summaryrefslogtreecommitdiff
path: root/scp2
ModeNameSize
-rw-r--r--AutoInstall.mk1502logplain
-rw-r--r--CustomTarget_langmacros.mk1003logplain
-rw-r--r--InstallModule_accessories.mk2131logplain
-rw-r--r--InstallModule_activex.mk721logplain
-rw-r--r--InstallModule_base.mk967logplain
-rw-r--r--InstallModule_calc.mk965logplain
-rw-r--r--InstallModule_crashrep.mk534logplain
-rw-r--r--InstallModule_draw.mk858logplain
-rw-r--r--InstallModule_extensions.mk1221logplain
-rw-r--r--InstallModule_firebird.mk725logplain
-rw-r--r--InstallModule_gnome.mk884logplain
-rw-r--r--InstallModule_graphicfilter.mk906logplain
-rw-r--r--InstallModule_impress.mk1067logplain
-rw-r--r--InstallModule_kde.mk595logplain
-rw-r--r--InstallModule_math.mk929logplain
-rw-r--r--InstallModule_onlineupdate.mk766logplain
-rw-r--r--InstallModule_ooo.mk4929logplain
-rw-r--r--InstallModule_python.mk1835logplain
-rw-r--r--InstallModule_quickstart.mk718logplain
-rw-r--r--InstallModule_sdkoo.mk684logplain
-rw-r--r--InstallModule_tde.mk595logplain
-rw-r--r--InstallModule_ure.mk817logplain
-rw-r--r--InstallModule_windows.mk1461logplain
-rw-r--r--InstallModule_winexplorerext.mk838logplain
-rw-r--r--InstallModule_writer.mk953logplain
-rw-r--r--InstallModule_xsltfilter.mk665logplain
-rw-r--r--InstallScript_sdkoo.mk493logplain
-rw-r--r--InstallScript_setup_osl.mk1391logplain
-rw-r--r--Makefile225logplain
-rw-r--r--Module_scp2.mk1615logplain
-rw-r--r--README266logplain
d---------inc38logplain
d---------macros36logplain
d---------source881logplain
o/core/diff/sfx2/sdi/sfxslots.sdi?h=private/lmamane/for-julien2412-master&id=fd069bee7e57ad529c3c0974559fd2d84ec3151a'>sfx2/sdi/sfxslots.sdi119
-rw-r--r--sfx2/sdi/viwslots.sdi154
-rw-r--r--sfx2/source/appl/app.cxx1859
-rw-r--r--sfx2/source/appl/app.hrc189
-rw-r--r--sfx2/source/appl/app.src3406
-rw-r--r--sfx2/source/appl/appbas.cxx1373
-rw-r--r--sfx2/source/appl/appcfg.cxx1849
-rw-r--r--sfx2/source/appl/appchild.cxx451
-rw-r--r--sfx2/source/appl/appdata.cxx602
-rw-r--r--sfx2/source/appl/appdde.cxx744
-rw-r--r--sfx2/source/appl/appinit.cxx905
-rw-r--r--sfx2/source/appl/appmain.cxx632
-rw-r--r--sfx2/source/appl/appmisc.cxx1170
-rw-r--r--sfx2/source/appl/appopen.cxx1402
-rw-r--r--sfx2/source/appl/appquit.cxx375
-rw-r--r--sfx2/source/appl/appreg.cxx274
-rw-r--r--sfx2/source/appl/appserv.cxx1066
-rw-r--r--sfx2/source/appl/appuno.cxx1239
-rw-r--r--sfx2/source/appl/childwin.cxx679
-rw-r--r--sfx2/source/appl/makefile.mk158
-rw-r--r--sfx2/source/appl/module.cxx470
-rw-r--r--sfx2/source/appl/sfx.src526
-rw-r--r--sfx2/source/appl/sfxdll.cxx108
-rw-r--r--sfx2/source/appl/sfxhelp.cxx1277
-rw-r--r--sfx2/source/appl/workwin.cxx3148
-rw-r--r--sfx2/source/bastyp/bastyp.hrc114
-rw-r--r--sfx2/source/bastyp/bastyp.src433
-rw-r--r--sfx2/source/bastyp/bitset.cxx428
-rw-r--r--sfx2/source/bastyp/fltfnc.cxx3215
-rw-r--r--sfx2/source/bastyp/fltfnc.src186
-rw-r--r--sfx2/source/bastyp/frmhtml.cxx880
-rw-r--r--sfx2/source/bastyp/frmhtmlw.cxx582
-rw-r--r--sfx2/source/bastyp/helper.cxx673
-rw-r--r--sfx2/source/bastyp/makefile.mk117
-rw-r--r--sfx2/source/bastyp/mieclip.cxx190
-rw-r--r--sfx2/source/bastyp/minarray.cxx766
-rw-r--r--sfx2/source/bastyp/misc.cxx141
-rw-r--r--sfx2/source/bastyp/progress.cxx849
-rw-r--r--sfx2/source/bastyp/sfxhtml.cxx762
-rw-r--r--sfx2/source/bastyp/sfxresid.cxx90
-rw-r--r--sfx2/source/config/config.hrc124
-rw-r--r--sfx2/source/config/config.src291
-rw-r--r--sfx2/source/config/evntconf.cxx714
-rw-r--r--sfx2/source/config/makefile.mk115
-rw-r--r--sfx2/source/control/bindings.cxx3022
-rw-r--r--sfx2/source/control/ctrlitem.cxx480
-rw-r--r--sfx2/source/control/dispatch.cxx3493
-rw-r--r--sfx2/source/control/macrconf.cxx947
-rw-r--r--sfx2/source/control/macro.cxx858
-rw-r--r--sfx2/source/control/makefile.mk120
-rw-r--r--sfx2/source/control/minfitem.cxx136
-rw-r--r--sfx2/source/control/msg.cxx101
-rw-r--r--sfx2/source/control/msgpool.cxx627
-rw-r--r--sfx2/source/control/objface.cxx1427
-rw-r--r--sfx2/source/control/request.cxx576
-rw-r--r--sfx2/source/control/shell.cxx1524
-rw-r--r--sfx2/source/control/srchitem.cxx306
-rw-r--r--sfx2/source/control/statcach.cxx577
-rw-r--r--sfx2/source/control/unoctitm.cxx560
-rw-r--r--sfx2/source/dialog/about.cxx421
-rw-r--r--sfx2/source/dialog/acccfg.cxx854
-rw-r--r--sfx2/source/dialog/basedlgs.cxx1041
-rw-r--r--sfx2/source/dialog/cfg.cxx1376
-rw-r--r--sfx2/source/dialog/cfg.hrc110
-rw-r--r--sfx2/source/dialog/cfg.src1918
-rw-r--r--sfx2/source/dialog/dialog.hrc184
-rw-r--r--sfx2/source/dialog/dialog.src1028
-rw-r--r--sfx2/source/dialog/dinfdlg.cxx962
-rw-r--r--sfx2/source/dialog/dinfdlg.hrc121
-rw-r--r--sfx2/source/dialog/dinfdlg.src1026
-rw-r--r--sfx2/source/dialog/dinfedt.cxx99
-rw-r--r--sfx2/source/dialog/dinfedt.hrc72
-rw-r--r--sfx2/source/dialog/dinfedt.src174
-rw-r--r--sfx2/source/dialog/dockwin.cxx1542
-rw-r--r--sfx2/source/dialog/intro.cxx119
-rw-r--r--sfx2/source/dialog/macropg.cxx698
-rw-r--r--sfx2/source/dialog/macropg.hrc80
-rw-r--r--sfx2/source/dialog/macropg.src502
-rw-r--r--sfx2/source/dialog/mailmodel.cxx364
-rw-r--r--sfx2/source/dialog/mailwindow.src545
-rw-r--r--sfx2/source/dialog/makefile.mk140
-rw-r--r--sfx2/source/dialog/mgetempl.cxx709
-rw-r--r--sfx2/source/dialog/mgetempl.hrc72
-rw-r--r--sfx2/source/dialog/mgetempl.src283
-rw-r--r--sfx2/source/dialog/navigat.cxx134
-rw-r--r--sfx2/source/dialog/newstyle.cxx134
-rw-r--r--sfx2/source/dialog/newstyle.hrc65
-rw-r--r--sfx2/source/dialog/newstyle.src177
-rw-r--r--sfx2/source/dialog/partwnd.cxx293
-rw-r--r--sfx2/source/dialog/passwd.cxx226
-rw-r--r--sfx2/source/dialog/passwd.hrc83
-rw-r--r--sfx2/source/dialog/passwd.src269
-rw-r--r--sfx2/source/dialog/sfxurl.cxx72
-rw-r--r--sfx2/source/dialog/splitwin.cxx1337
-rw-r--r--sfx2/source/dialog/styfitem.cxx175
-rw-r--r--sfx2/source/dialog/styledlg.cxx260
-rw-r--r--sfx2/source/dialog/tabdlg.cxx1494
-rw-r--r--sfx2/source/dialog/templdlg.cxx2644
-rw-r--r--sfx2/source/dialog/templdlg.hrc86
-rw-r--r--sfx2/source/dialog/templdlg.src435
-rw-r--r--sfx2/source/dialog/tplcitem.cxx187
-rw-r--r--sfx2/source/dialog/tplpitem.cxx123
-rw-r--r--sfx2/source/dialog/versdlg.cxx351
-rw-r--r--sfx2/source/dialog/versdlg.hrc82
-rw-r--r--sfx2/source/dialog/versdlg.src581
-rw-r--r--sfx2/source/doc/doc.hrc178
-rw-r--r--sfx2/source/doc/doc.src2066
-rw-r--r--sfx2/source/doc/docfac.cxx701
-rw-r--r--sfx2/source/doc/docfile.cxx3091
-rw-r--r--sfx2/source/doc/docfilt.cxx322
-rw-r--r--sfx2/source/doc/docinf.cxx1521
-rw-r--r--sfx2/source/doc/doctdlg.cxx262
-rw-r--r--sfx2/source/doc/doctdlg.hrc76
-rw-r--r--sfx2/source/doc/doctdlg.src298
-rw-r--r--sfx2/source/doc/doctempl.cxx2484
-rw-r--r--sfx2/source/doc/docvor.cxx1997
-rw-r--r--sfx2/source/doc/docvor.hrc90
-rw-r--r--sfx2/source/doc/docvor.src775
-rw-r--r--sfx2/source/doc/frmdescr.cxx1067
-rw-r--r--sfx2/source/doc/makefile.mk120
-rw-r--r--sfx2/source/doc/new.cxx695
-rw-r--r--sfx2/source/doc/new.hrc84
-rw-r--r--sfx2/source/doc/new.src439
-rw-r--r--sfx2/source/doc/objcont.cxx1669
-rw-r--r--sfx2/source/doc/objitem.cxx116
-rw-r--r--sfx2/source/doc/objmisc.cxx1452
-rw-r--r--sfx2/source/doc/objserv.cxx1173
-rw-r--r--sfx2/source/doc/objstor.cxx2044
-rw-r--r--sfx2/source/doc/objuno.cxx911
-rw-r--r--sfx2/source/doc/objxtor.cxx762
-rw-r--r--sfx2/source/doc/sfxbasemodel.cxx1483
-rw-r--r--sfx2/source/explorer/makefile.mk112
-rw-r--r--sfx2/source/explorer/nochaos.cxx247
-rw-r--r--sfx2/source/inc/acccfg.hxx150
-rw-r--r--sfx2/source/inc/appbas.hxx80
-rw-r--r--sfx2/source/inc/appdata.hxx301
-rw-r--r--sfx2/source/inc/cfg.hxx435
-rw-r--r--sfx2/source/inc/eventdlg.hxx109
-rw-r--r--sfx2/source/inc/fltfnc.hxx69
-rw-r--r--sfx2/source/inc/helper.hxx111
-rw-r--r--sfx2/source/inc/helpid.hrc344
-rw-r--r--sfx2/source/inc/hexplwnd.hxx173
-rw-r--r--sfx2/source/inc/intro.hxx93
-rw-r--r--sfx2/source/inc/mnucfga.hxx87
-rw-r--r--sfx2/source/inc/nfltdlg.hxx108
-rw-r--r--sfx2/source/inc/nochaos.hxx74
-rw-r--r--sfx2/source/inc/objmnctl.hxx90
-rw-r--r--sfx2/source/inc/objshimp.hxx237
-rw-r--r--sfx2/source/inc/openflag.hxx75
-rw-r--r--sfx2/source/inc/partwnd.hxx169
-rw-r--r--sfx2/source/inc/preview.hxx107
-rw-r--r--sfx2/source/inc/referers.hxx70
-rw-r--r--sfx2/source/inc/sfxlocal.hrc87
-rw-r--r--sfx2/source/inc/sfxtypes.hxx271
-rw-r--r--sfx2/source/inc/slotserv.hxx118
-rw-r--r--sfx2/source/inc/speakerdlg.hxx101
-rw-r--r--sfx2/source/inc/splitwin.hxx165
-rw-r--r--sfx2/source/inc/statcach.hxx220
-rw-r--r--sfx2/source/inc/templdgi.hxx377
-rw-r--r--sfx2/source/inc/tplcitem.hxx78
-rw-r--r--sfx2/source/inc/tplcomp.hxx313
-rw-r--r--sfx2/source/inc/versdlg.hxx144
-rw-r--r--sfx2/source/inc/virtmenu.hxx186
-rw-r--r--sfx2/source/inc/workwin.hxx400
-rw-r--r--sfx2/source/inet/inettbc.cxx1053
-rw-r--r--sfx2/source/inet/makefile.mk98
-rw-r--r--sfx2/source/menu/makefile.mk106
-rw-r--r--sfx2/source/menu/menu.hrc103
-rw-r--r--sfx2/source/menu/menu.src344
-rw-r--r--sfx2/source/menu/mnuitem.cxx460
-rw-r--r--sfx2/source/menu/mnumgr.cxx1426
-rw-r--r--sfx2/source/menu/objmnctl.cxx186
-rw-r--r--sfx2/source/menu/virtmenu.cxx1015
-rw-r--r--sfx2/source/notify/hintpost.cxx245
-rw-r--r--sfx2/source/notify/makefile.mk91
-rw-r--r--sfx2/source/statbar/makefile.mk100
-rw-r--r--sfx2/source/statbar/stbitem.cxx357
-rw-r--r--sfx2/source/toolbox/imgmgr.cxx1150
-rw-r--r--sfx2/source/toolbox/makefile.mk110
-rw-r--r--sfx2/source/toolbox/tbxitem.cxx880
-rw-r--r--sfx2/source/view/frame.cxx2181
-rw-r--r--sfx2/source/view/frmload.cxx436
-rw-r--r--sfx2/source/view/impframe.cxx271
-rw-r--r--sfx2/source/view/impframe.hxx221
-rw-r--r--sfx2/source/view/makefile.mk116
-rw-r--r--sfx2/source/view/orgmgr.cxx824
-rw-r--r--sfx2/source/view/printer.cxx556
-rw-r--r--sfx2/source/view/prnmon.cxx401
-rw-r--r--sfx2/source/view/sfxbasecontroller.cxx614
-rw-r--r--sfx2/source/view/topfrm.cxx1111
-rw-r--r--sfx2/source/view/view.hrc196
-rw-r--r--sfx2/source/view/view.hxx61
-rw-r--r--sfx2/source/view/view.src1265
-rw-r--r--sfx2/source/view/viewfac.cxx103
-rw-r--r--sfx2/source/view/viewfrm.cxx3489
-rw-r--r--sfx2/source/view/viewimp.hxx115
-rw-r--r--sfx2/source/view/viewprn.cxx870
-rw-r--r--sfx2/source/view/viewsh.cxx1723
-rw-r--r--sfx2/util/hidother.src232
-rw-r--r--sfx2/util/make_tco.btm1
-rw-r--r--sfx2/util/makefile.mk482
-rw-r--r--sfx2/util/makefile.pmk65
-rw-r--r--sfx2/util/mkdemo.pl7
-rw-r--r--sfx2/win/res/expdesk.icobin0 -> 4990 bytes-rw-r--r--sfx2/win/res/expexp.icobin0 -> 2758 bytes-rw-r--r--sfx2/win/res/expfld.icobin0 -> 2758 bytes-rw-r--r--sfx2/win/res/expftp.icobin0 -> 2758 bytes-rw-r--r--sfx2/win/res/exptrash.icobin0 -> 2758 bytes-rw-r--r--sfx2/win/res/expwork.icobin0 -> 2758 bytes-rw-r--r--sfx2/win/res/frameset.icobin0 -> 2758 bytes-rw-r--r--sfx2/win/res/search.icobin0 -> 2758 bytes-rw-r--r--sj2/doc/Todo.txt108
-rw-r--r--sj2/doc/concepts.html844
-rw-r--r--sj2/inc/sjapplet.hxx120
-rw-r--r--sj2/prj/d.lst15
-rw-r--r--sj2/source/inc/java_lang_object.hxx125
-rw-r--r--sj2/source/jscpp/makefile.mk103
-rw-r--r--sj2/source/jscpp/sjapplet.cxx601
-rw-r--r--sj2/stardiv/app/AppletMessageHandler.java148
-rw-r--r--sj2/stardiv/app/AppletProps.java221
-rw-r--r--sj2/stardiv/app/AppletViewer.java1025
-rw-r--r--sj2/stardiv/app/AppletViewerFactory.java77
-rw-r--r--sj2/stardiv/app/MsgAppletViewer.java220
-rw-r--r--sj2/stardiv/app/makefile.mk95
-rw-r--r--sj2/stardiv/applet/AppletExecutionContext.java415
-rw-r--r--sj2/stardiv/applet/Document.java182
-rw-r--r--sj2/stardiv/applet/DocumentProxy.java207
-rw-r--r--sj2/stardiv/applet/LiveConnectable.java76
-rw-r--r--sj2/stardiv/applet/makefile.mk110
-rw-r--r--sj2/stardiv/applet/resources/MsgAppletViewer.java166
-rw-r--r--sj2/stardiv/applet/resources/makefile.mk85
-rw-r--r--sj2/stardiv/controller/SjSettings.java261
-rw-r--r--sj2/stardiv/controller/makefile.mk102
-rw-r--r--sj2/stardiv/security/resources/MsgAppletViewer.java122
-rw-r--r--sj2/stardiv/security/resources/makefile.mk85
-rw-r--r--sj2/util/makefile.mk138
-rw-r--r--sj2/util/makefile.pmk85
-rw-r--r--sj2/util/target.pmk73
-rw-r--r--svx/inc/anchorid.hxx77
-rw-r--r--svx/inc/bolnitem.hxx117
-rw-r--r--svx/inc/bulitem.hxx204
-rw-r--r--svx/inc/chrtitem.hxx451
-rw-r--r--svx/inc/connctrl.hxx109
-rw-r--r--svx/inc/connect.hrc80
-rw-r--r--svx/inc/dbexch.hrc91
-rw-r--r--svx/inc/dgdefs_.hxx375
-rw-r--r--svx/inc/dialdll.hxx89
-rw-r--r--svx/inc/dlgutil.hxx173
-rw-r--r--svx/inc/dragmt3d.hxx203
-rw-r--r--svx/inc/drawitem.hxx270
-rw-r--r--svx/inc/drawuiks.hxx107
-rw-r--r--svx/inc/editstat.hxx174
-rw-r--r--svx/inc/editund2.hxx111
-rw-r--r--svx/inc/edtspell.hxx231
-rw-r--r--svx/inc/eerdll.hxx96
-rw-r--r--svx/inc/float3d.hrc198
-rw-r--r--svx/inc/flstitem.hxx112
-rw-r--r--svx/inc/fmgridif.hxx532
-rw-r--r--svx/inc/fmhelp.hrc322
-rw-r--r--svx/inc/fmobjfac.hxx86
-rw-r--r--svx/inc/fontitem.hxx157
-rw-r--r--svx/inc/fontlb.hxx122
-rw-r--r--svx/inc/fwdtitem.hxx147
-rw-r--r--svx/inc/galbrws.hxx144
-rw-r--r--svx/inc/gallery.hxx190
-rw-r--r--svx/inc/globl3d.hxx97
-rw-r--r--svx/inc/globlac.hrc245
-rw-r--r--svx/inc/grafctrl.hxx185
-rw-r--r--svx/inc/helpid.hrc461
-rw-r--r--svx/inc/hlnkitem.hxx150
-rw-r--r--svx/inc/htmlmode.hxx106
-rw-r--r--svx/inc/hyperdlg.hxx156
-rw-r--r--svx/inc/imapdlg.hxx239
-rw-r--r--svx/inc/impgrf.hxx179
-rw-r--r--svx/inc/insctrl.hxx97
-rw-r--r--svx/inc/layctrl.hxx113
-rw-r--r--svx/inc/lightdlg.hxx183
-rw-r--r--svx/inc/linectrl.hxx201
-rw-r--r--svx/inc/linkmgr.hxx135
-rw-r--r--svx/inc/measctrl.hxx104
-rw-r--r--svx/inc/modctrl.hxx95
-rw-r--r--svx/inc/msoleexp.hxx89
-rw-r--r--svx/inc/nlbkitem.hxx108
-rw-r--r--svx/inc/numvset.hxx170
-rw-r--r--svx/inc/objfac3d.hxx90
-rw-r--r--svx/inc/opaqitem.hxx123
-rw-r--r--svx/inc/optgenrl.hxx169
-rw-r--r--svx/inc/optgrid.hxx208
-rw-r--r--svx/inc/optitems.hxx168
-rw-r--r--svx/inc/passwd.hxx127
-rw-r--r--svx/inc/pfiledlg.hxx89
-rw-r--r--svx/inc/postattr.hxx168
-rw-r--r--svx/inc/prntitem.hxx117
-rw-r--r--svx/inc/protitem.hxx147
-rw-r--r--svx/inc/prtqry.hxx75
-rw-r--r--svx/inc/pszctrl.hxx101
-rw-r--r--svx/inc/relfld.hxx105
-rw-r--r--svx/inc/rotmodit.hxx104
-rw-r--r--svx/inc/rulritem.hxx306
-rw-r--r--svx/inc/selctrl.hxx96
-rw-r--r--svx/inc/sjctrl.hxx682
-rw-r--r--svx/inc/srchdlg.hxx340
-rw-r--r--svx/inc/srchitem.hxx68
-rw-r--r--svx/inc/svdglob.hxx108
-rw-r--r--svx/inc/svdibrow.hxx177
-rw-r--r--svx/inc/svditer.hxx124
-rw-r--r--svx/inc/svdpomv.hxx95
-rw-r--r--svx/inc/svdshort.hxx131
-rw-r--r--svx/inc/svdstr.hrc779
-rw-r--r--svx/inc/svdtouch.hxx98
-rw-r--r--svx/inc/svdviter.hxx150
-rw-r--r--svx/inc/svimbase.hxx556
-rw-r--r--svx/inc/svxempty.hxx81
-rw-r--r--svx/inc/svxerr.hxx130
-rw-r--r--svx/inc/svxmsbas.hxx128
-rw-r--r--svx/inc/svxrtf.hxx514
-rw-r--r--svx/inc/tbxalign.hxx80
-rw-r--r--svx/inc/tbxctl.hxx96
-rw-r--r--svx/inc/tbxdraw.hxx112
-rw-r--r--svx/inc/textconv.hxx160
-rw-r--r--svx/inc/txtrange.hxx148
-rw-r--r--svx/inc/uiks.hxx123
-rw-r--r--svx/inc/unoapi.hxx91
-rw-r--r--svx/inc/unofdesc.hxx97
-rw-r--r--svx/inc/unofill.hxx79
-rw-r--r--svx/inc/unolingu.hxx297
-rw-r--r--svx/inc/unomlstr.hxx93
-rw-r--r--svx/inc/unonrule.hxx182
-rw-r--r--svx/inc/unoshcol.hxx117
-rw-r--r--svx/inc/xattr.hxx101
-rw-r--r--svx/inc/xexch.hxx110
-rw-r--r--svx/inc/xlinjoit.hxx97
-rw-r--r--svx/inc/xoutbmp.hxx136
-rw-r--r--svx/inc/xpolyimp.hxx141
-rw-r--r--svx/inc/zoomctrl.hxx94
-rw-r--r--svx/prj/d.lst568
-rw-r--r--svx/sdi/fmslots.sdi639
-rw-r--r--svx/sdi/makefile.mk99
-rw-r--r--svx/sdi/svx.sdi8848
-rw-r--r--svx/sdi/svxitems.sdi720
-rw-r--r--svx/sdi/svxslots.hrc64
-rw-r--r--svx/sdi/svxslots.sdi53
-rw-r--r--svx/sdi/xoitems.sdi30
-rw-r--r--svx/source/dialog/_bmpmask.cxx1159
-rw-r--r--svx/source/dialog/_contdlg.cxx1158
-rw-r--r--svx/source/dialog/align.cxx631
-rw-r--r--svx/source/dialog/align.hrc119
-rw-r--r--svx/source/dialog/align.src952
-rw-r--r--svx/source/dialog/backgrnd.cxx1884
-rw-r--r--svx/source/dialog/backgrnd.hrc99
-rw-r--r--svx/source/dialog/backgrnd.src910
-rw-r--r--svx/source/dialog/bbdlg.cxx107
-rw-r--r--svx/source/dialog/bbdlg.src160
-rw-r--r--svx/source/dialog/bmpmask.hrc93
-rw-r--r--svx/source/dialog/bmpmask.src466
-rw-r--r--svx/source/dialog/border.cxx1790
-rw-r--r--svx/source/dialog/border.hrc126
-rw-r--r--svx/source/dialog/border.src738
-rw-r--r--svx/source/dialog/chardlg.cxx2953
-rw-r--r--svx/source/dialog/chardlg.h96
-rw-r--r--svx/source/dialog/chardlg.hrc131
-rw-r--r--svx/source/dialog/chardlg.src2413
-rw-r--r--svx/source/dialog/charmap.cxx683
-rw-r--r--svx/source/dialog/charmap.hrc80
-rw-r--r--svx/source/dialog/charmap.src234
-rw-r--r--svx/source/dialog/checklbx.cxx309
-rw-r--r--svx/source/dialog/connctrl.cxx381
-rw-r--r--svx/source/dialog/connect.cxx650
-rw-r--r--svx/source/dialog/connect.src510
-rw-r--r--svx/source/dialog/contdlg.hrc118
-rw-r--r--svx/source/dialog/contdlg.src783
-rw-r--r--svx/source/dialog/contimp.hxx154
-rw-r--r--svx/source/dialog/contwnd.cxx380
-rw-r--r--svx/source/dialog/contwnd.hxx129
-rw-r--r--svx/source/dialog/ctredlin.cxx1577
-rw-r--r--svx/source/dialog/ctredlin.hrc104
-rw-r--r--svx/source/dialog/ctredlin.src1005
-rw-r--r--svx/source/dialog/dlgctl3d.cxx1710
-rw-r--r--svx/source/dialog/dlgctrl.cxx1903
-rw-r--r--svx/source/dialog/dlgctrl.src68
-rw-r--r--svx/source/dialog/dlgname.cxx185
-rw-r--r--svx/source/dialog/dlgname.hrc68
-rw-r--r--svx/source/dialog/dlgname.src165
-rw-r--r--svx/source/dialog/dlgutil.cxx911
-rw-r--r--svx/source/dialog/dstribut.cxx275
-rw-r--r--svx/source/dialog/dstribut.hrc81
-rw-r--r--svx/source/dialog/dstribut.src514
-rw-r--r--svx/source/dialog/fntctrl.cxx264
-rw-r--r--svx/source/dialog/fontlb.cxx453
-rw-r--r--svx/source/dialog/fontwork.cxx1230
-rw-r--r--svx/source/dialog/fontwork.hrc88
-rw-r--r--svx/source/dialog/fontwork.src1348
-rw-r--r--svx/source/dialog/frmsel.cxx1265
-rw-r--r--svx/source/dialog/graphctl.cxx689
-rw-r--r--svx/source/dialog/grfpage.cxx907
-rw-r--r--svx/source/dialog/grfpage.hrc88
-rw-r--r--svx/source/dialog/grfpage.hxx180
-rw-r--r--svx/source/dialog/grfpage.src639
-rw-r--r--svx/source/dialog/hdft.cxx1010
-rw-r--r--svx/source/dialog/hdft.hrc86
-rw-r--r--svx/source/dialog/hdft.src863
-rw-r--r--svx/source/dialog/hldocntp.cxx781
-rw-r--r--svx/source/dialog/hldoctp.cxx589
-rw-r--r--svx/source/dialog/hlinettp.cxx979
-rw-r--r--svx/source/dialog/hlmailtp.cxx580
-rw-r--r--svx/source/dialog/hlmarkwn.cxx570
-rw-r--r--svx/source/dialog/hlmarkwn.src220
-rw-r--r--svx/source/dialog/hltpbase.cxx719
-rw-r--r--svx/source/dialog/hyperdlg.cxx412
-rw-r--r--svx/source/dialog/hyperdlg.src2573
-rw-r--r--svx/source/dialog/hyphen.cxx599
-rw-r--r--svx/source/dialog/hyphen.hrc79
-rw-r--r--svx/source/dialog/hyphen.hxx160
-rw-r--r--svx/source/dialog/hyphen.src248
-rw-r--r--svx/source/dialog/hyprlink.hrc78
-rw-r--r--svx/source/dialog/hyprlink.src390
-rw-r--r--svx/source/dialog/iconcdlg.cxx1446
-rw-r--r--svx/source/dialog/iconcdlg.src88
-rw-r--r--svx/source/dialog/imapdlg.cxx1039
-rw-r--r--svx/source/dialog/imapdlg.hrc157
-rw-r--r--svx/source/dialog/imapdlg.src1355
-rw-r--r--svx/source/dialog/imapimp.hxx92
-rw-r--r--svx/source/dialog/imapwnd.cxx1054
-rw-r--r--svx/source/dialog/imapwnd.hxx264
-rw-r--r--svx/source/dialog/impgrf.cxx1277
-rw-r--r--svx/source/dialog/impgrf.hrc90
-rw-r--r--svx/source/dialog/impgrf.src498
-rw-r--r--svx/source/dialog/labdlg.cxx629
-rw-r--r--svx/source/dialog/labdlg.hrc106
-rw-r--r--svx/source/dialog/labdlg.src974
-rw-r--r--svx/source/dialog/langbox.cxx165
-rw-r--r--svx/source/dialog/language.src94
-rw-r--r--svx/source/dialog/lingu.src556
-rw-r--r--svx/source/dialog/makefile.mk369
-rw-r--r--svx/source/dialog/measctrl.cxx215
-rw-r--r--svx/source/dialog/measure.cxx854
-rw-r--r--svx/source/dialog/measure.hrc83
-rw-r--r--svx/source/dialog/measure.src568
-rw-r--r--svx/source/dialog/numfmt.cxx1904
-rw-r--r--svx/source/dialog/numfmt.hrc110
-rw-r--r--svx/source/dialog/numfmt.src1006
-rw-r--r--svx/source/dialog/numpages.cxx3702
-rw-r--r--svx/source/dialog/numpages.hrc158
-rw-r--r--svx/source/dialog/numpages.src2345
-rw-r--r--svx/source/dialog/page.cxx1686
-rw-r--r--svx/source/dialog/page.h107
-rw-r--r--svx/source/dialog/page.hrc115
-rw-r--r--svx/source/dialog/page.src2848
-rw-r--r--svx/source/dialog/pagectrl.cxx361
-rw-r--r--svx/source/dialog/paragrph.cxx2123
-rw-r--r--svx/source/dialog/paragrph.hrc138
-rw-r--r--svx/source/dialog/paragrph.src1964
-rw-r--r--svx/source/dialog/paraprev.cxx235
-rw-r--r--svx/source/dialog/passwd.cxx190
-rw-r--r--svx/source/dialog/passwd.hrc85
-rw-r--r--svx/source/dialog/passwd.src326
-rw-r--r--svx/source/dialog/pfiledlg.cxx283
-rw-r--r--svx/source/dialog/postdlg.cxx307
-rw-r--r--svx/source/dialog/postdlg.hrc84
-rw-r--r--svx/source/dialog/postdlg.src305
-rw-r--r--svx/source/dialog/prtqry.cxx101
-rw-r--r--svx/source/dialog/prtqry.src157
-rw-r--r--svx/source/dialog/relfld.cxx177
-rw-r--r--svx/source/dialog/rlrcitem.cxx181
-rw-r--r--svx/source/dialog/rlrcitem.hxx87
-rw-r--r--svx/source/dialog/ruler.hrc71
-rw-r--r--svx/source/dialog/ruler.src393
-rw-r--r--svx/source/dialog/rulritem.cxx476
-rw-r--r--svx/source/dialog/sdstring.src4713
-rw-r--r--svx/source/dialog/simptabl.cxx599
-rw-r--r--svx/source/dialog/splwrap.cxx682
-rw-r--r--svx/source/dialog/srchctrl.cxx126
-rw-r--r--svx/source/dialog/srchctrl.hxx87
-rw-r--r--svx/source/dialog/srchdlg.cxx1996
-rw-r--r--svx/source/dialog/srchdlg.hrc115
-rw-r--r--svx/source/dialog/srchdlg.src1112
-rw-r--r--svx/source/dialog/srchxtra.cxx323
-rw-r--r--svx/source/dialog/srchxtra.hrc85
-rw-r--r--svx/source/dialog/srchxtra.src580
-rw-r--r--svx/source/dialog/stddlg.cxx100
-rw-r--r--svx/source/dialog/strarray.cxx134
-rw-r--r--svx/source/dialog/svxbox.cxx656
-rw-r--r--svx/source/dialog/svxruler.cxx3342
-rw-r--r--svx/source/dialog/tabarea.cxx360
-rw-r--r--svx/source/dialog/tabarea.hrc210
-rw-r--r--svx/source/dialog/tabarea.src4743
-rw-r--r--svx/source/dialog/tabline.cxx268
-rw-r--r--svx/source/dialog/tabline.hrc136
-rw-r--r--svx/source/dialog/tabline.src2104
-rw-r--r--svx/source/dialog/tabstpge.cxx768
-rw-r--r--svx/source/dialog/tabstpge.hrc95
-rw-r--r--svx/source/dialog/tabstpge.src530
-rw-r--r--svx/source/dialog/test.src1693
-rw-r--r--svx/source/dialog/textanim.cxx820
-rw-r--r--svx/source/dialog/textanim.hrc78
-rw-r--r--svx/source/dialog/textanim.src755
-rw-r--r--svx/source/dialog/textattr.cxx749
-rw-r--r--svx/source/dialog/textattr.hrc77
-rw-r--r--svx/source/dialog/textattr.src492
-rw-r--r--svx/source/dialog/thesdlg.cxx515
-rw-r--r--svx/source/dialog/thesdlg.hrc93
-rw-r--r--svx/source/dialog/thesdlg.src448
-rw-r--r--svx/source/dialog/tparea.cxx2564
-rw-r--r--svx/source/dialog/tpbitmap.cxx1057
-rw-r--r--svx/source/dialog/tpcolor.cxx1256
-rw-r--r--svx/source/dialog/tpgradnt.cxx968
-rw-r--r--svx/source/dialog/tphatch.cxx921
-rw-r--r--svx/source/dialog/tpline.cxx1770
-rw-r--r--svx/source/dialog/tplnedef.cxx1018
-rw-r--r--svx/source/dialog/tplneend.cxx738
-rw-r--r--svx/source/dialog/tpshadow.cxx617
-rw-r--r--svx/source/dialog/transfrm.cxx2017
-rw-r--r--svx/source/dialog/transfrm.hrc97
-rw-r--r--svx/source/dialog/transfrm.src1683
-rw-r--r--svx/source/dialog/zoom.cxx454
-rw-r--r--svx/source/dialog/zoom.hrc84
-rw-r--r--svx/source/dialog/zoom.src296
-rw-r--r--svx/source/editeng/editattr.cxx414
-rw-r--r--svx/source/editeng/editattr.hxx415
-rw-r--r--svx/source/editeng/editdbg.cxx537
-rw-r--r--svx/source/editeng/editdoc.cxx2039
-rw-r--r--svx/source/editeng/editdoc.hxx764
-rw-r--r--svx/source/editeng/editdoc2.cxx714
-rw-r--r--svx/source/editeng/editeng.cxx2291
-rw-r--r--svx/source/editeng/editeng.hrc89
-rw-r--r--svx/source/editeng/editeng.src408
-rw-r--r--svx/source/editeng/editobj.cxx1447
-rw-r--r--svx/source/editeng/editobj2.hxx282
-rw-r--r--svx/source/editeng/editsel.cxx153
-rw-r--r--svx/source/editeng/editsel.hxx111
-rw-r--r--svx/source/editeng/editundo.cxx767
-rw-r--r--svx/source/editeng/editundo.hxx334
-rw-r--r--svx/source/editeng/editview.cxx1214
-rw-r--r--svx/source/editeng/edtspell.cxx774
-rw-r--r--svx/source/editeng/eehtml.cxx846
-rw-r--r--svx/source/editeng/eerdll.cxx205
-rw-r--r--svx/source/editeng/eerdll2.hxx89
-rw-r--r--svx/source/editeng/eertfpar.cxx597
-rw-r--r--svx/source/editeng/impedit.cxx922
-rw-r--r--svx/source/editeng/impedit.hxx1004
-rw-r--r--svx/source/editeng/impedit2.cxx3338
-rw-r--r--svx/source/editeng/impedit3.cxx3412
-rw-r--r--svx/source/editeng/impedit4.cxx2074
-rw-r--r--svx/source/editeng/impedit5.cxx840
-rw-r--r--svx/source/editeng/makefile.mk169
-rw-r--r--svx/source/editeng/svxacorr.cxx2380
-rw-r--r--svx/source/editeng/swafopt.cxx213
-rw-r--r--svx/source/editeng/textconv.cxx360
-rw-r--r--svx/source/editeng/txtrange.cxx757
-rw-r--r--svx/source/editeng/unolingu.cxx778
-rw-r--r--svx/source/engine3d/camera3d.cxx464
-rw-r--r--svx/source/engine3d/cube3d.cxx471
-rw-r--r--svx/source/engine3d/deflt3d.cxx745
-rw-r--r--svx/source/engine3d/dragmt3d.cxx902
-rw-r--r--svx/source/engine3d/e3dundo.cxx243
-rw-r--r--svx/source/engine3d/extrud3d.cxx870
-rw-r--r--svx/source/engine3d/float3d.cxx3594
-rw-r--r--svx/source/engine3d/float3d.src3377
-rw-r--r--svx/source/engine3d/lathe3d.cxx1108
-rw-r--r--svx/source/engine3d/makefile.mk149
-rw-r--r--svx/source/engine3d/obj3d.cxx5405
-rw-r--r--svx/source/engine3d/objfac3d.cxx200
-rw-r--r--svx/source/engine3d/polygn3d.cxx581
-rw-r--r--svx/source/engine3d/polysc3d.cxx575
-rw-r--r--svx/source/engine3d/scene3d.cxx2350
-rw-r--r--svx/source/engine3d/sphere3d.cxx773
-rw-r--r--svx/source/engine3d/string3d.src338
-rw-r--r--svx/source/engine3d/view3d.cxx2261
-rw-r--r--svx/source/engine3d/view3d1.cxx501
-rw-r--r--svx/source/engine3d/viewpt3d.cxx654
-rw-r--r--svx/source/engine3d/volume3d.cxx283
-rw-r--r--svx/source/fmcomp/fmgridcl.cxx1761
-rw-r--r--svx/source/fmcomp/fmgridif.cxx2555
-rw-r--r--svx/source/fmcomp/gridcell.cxx3427
-rw-r--r--svx/source/fmcomp/gridcols.cxx160
-rw-r--r--svx/source/fmcomp/gridctrl.cxx3592
-rw-r--r--svx/source/fmcomp/gridctrl.src689
-rw-r--r--svx/source/fmcomp/makefile.mk122
-rw-r--r--svx/source/fmcomp/showcols.src147
-rw-r--r--svx/source/fmcomp/trace.cxx160
-rw-r--r--svx/source/form/filtnav.cxx2035
-rw-r--r--svx/source/form/filtnav.src171
-rw-r--r--svx/source/form/fmctrler.cxx3130
-rw-r--r--svx/source/form/fmdmod.cxx158
-rw-r--r--svx/source/form/fmdpage.cxx178
-rw-r--r--svx/source/form/fmexch.cxx222
-rw-r--r--svx/source/form/fmexpl.cxx3530
-rw-r--r--svx/source/form/fmexpl.src898
-rw-r--r--svx/source/form/fmitems.cxx165
-rw-r--r--svx/source/form/fmmodel.cxx446
-rw-r--r--svx/source/form/fmobj.cxx659
-rw-r--r--svx/source/form/fmobjfac.cxx317
-rw-r--r--svx/source/form/fmpage.cxx441
-rw-r--r--svx/source/form/fmpgeimp.cxx762
-rw-r--r--svx/source/form/fmprop.cxx574
-rw-r--r--svx/source/form/fmsearch.src919
-rw-r--r--svx/source/form/fmservs.cxx256
-rw-r--r--svx/source/form/fmshell.cxx1958
-rw-r--r--svx/source/form/fmshimp.cxx4871
-rw-r--r--svx/source/form/fmsrccfg.cxx356
-rw-r--r--svx/source/form/fmsrcimp.cxx1234
-rw-r--r--svx/source/form/fmstring.src6659
-rw-r--r--svx/source/form/fmtools.cxx2288
-rw-r--r--svx/source/form/fmundo.cxx1132
-rw-r--r--svx/source/form/fmurl.cxx86
-rw-r--r--svx/source/form/fmview.cxx1088
-rw-r--r--svx/source/form/fmvwimp.cxx656
-rw-r--r--svx/source/form/makefile.mk142
-rw-r--r--svx/source/form/tabwin.cxx542
-rw-r--r--svx/source/form/tbxform.cxx614
-rw-r--r--svx/source/form/tbxform.src616
-rw-r--r--svx/source/form/typemap.cxx148
-rw-r--r--svx/source/gallery2/codec.cxx369
-rw-r--r--svx/source/gallery2/codec.hxx85
-rw-r--r--svx/source/gallery2/galbrws.cxx216
-rw-r--r--svx/source/gallery2/galbrws1.cxx470
-rw-r--r--svx/source/gallery2/galbrws1.hxx127
-rw-r--r--svx/source/gallery2/galbrws2.cxx856
-rw-r--r--svx/source/gallery2/galexpl.cxx490
-rw-r--r--svx/source/gallery2/gallery.src2342
-rw-r--r--svx/source/gallery2/gallery1.cxx883
-rw-r--r--svx/source/gallery2/galmisc.cxx563
-rw-r--r--svx/source/gallery2/galobj.cxx499
-rw-r--r--svx/source/gallery2/galtheme.cxx1526
-rw-r--r--svx/source/gallery2/galtheme.src669
-rw-r--r--svx/source/gallery2/makefile.mk102
-rw-r--r--svx/source/inc/filtnav.hxx362
-rw-r--r--svx/source/inc/fmcontr.hxx310
-rw-r--r--svx/source/inc/fmctrler.hxx592
-rw-r--r--svx/source/inc/fmexch.hxx152
-rw-r--r--svx/source/inc/fmexpl.hrc74
-rw-r--r--svx/source/inc/fmexpl.hxx600
-rw-r--r--svx/source/inc/fmgroup.hxx154
-rw-r--r--svx/source/inc/fmhlpids.hrc70
-rw-r--r--svx/source/inc/fmitems.hxx158
-rw-r--r--svx/source/inc/fmobj.hxx143
-rw-r--r--svx/source/inc/fmpgeimp.hxx183
-rw-r--r--svx/source/inc/fmprop.hrc398
-rw-r--r--svx/source/inc/fmresids.hrc492
-rw-r--r--svx/source/inc/fmsearch.hrc100
-rw-r--r--svx/source/inc/fmservs.hxx264
-rw-r--r--svx/source/inc/fmshimp.hxx801
-rw-r--r--svx/source/inc/fmsrccfg.hxx167
-rw-r--r--svx/source/inc/fmsrcimp.hxx423
-rw-r--r--svx/source/inc/fmstatic.hxx90
-rw-r--r--svx/source/inc/fmtools.hxx959
-rw-r--r--svx/source/inc/fmundo.hxx284
-rw-r--r--svx/source/inc/fmurl.hxx90
-rw-r--r--svx/source/inc/fmvwimp.hxx229
-rw-r--r--svx/source/inc/gridcell.hxx758
-rw-r--r--svx/source/inc/gridcols.hxx98
-rw-r--r--svx/source/inc/hlmarkwn.hrc68
-rw-r--r--svx/source/inc/hlmarkwn.hxx159
-rw-r--r--svx/source/inc/hyperdlg.hrc124
-rw-r--r--svx/source/inc/linectrl.hrc62
-rw-r--r--svx/source/inc/tabwin.hxx173
-rw-r--r--svx/source/inc/tbxform.hxx249
-rw-r--r--svx/source/inc/trace.hxx110
-rw-r--r--svx/source/items/algitem.cxx669
-rw-r--r--svx/source/items/boxobj.hxx132
-rw-r--r--svx/source/items/bulitem.cxx463
-rw-r--r--svx/source/items/chrtitem.cxx522
-rw-r--r--svx/source/items/drawitem.cxx418
-rw-r--r--svx/source/items/e3ditem.cxx191
-rw-r--r--svx/source/items/flditem.cxx965
-rw-r--r--svx/source/items/frmitems.cxx5342
-rw-r--r--svx/source/items/grfitem.cxx221
-rw-r--r--svx/source/items/hlnkitem.cxx398
-rw-r--r--svx/source/items/itemtype.cxx283
-rw-r--r--svx/source/items/makefile.mk140
-rw-r--r--svx/source/items/numfmtsh.cxx1835
-rw-r--r--svx/source/items/numinf.cxx275
-rw-r--r--svx/source/items/numitem.cxx886
-rw-r--r--svx/source/items/pageitem.cxx378
-rw-r--r--svx/source/items/paperinf.cxx378
-rw-r--r--svx/source/items/paraitem.cxx1740
-rw-r--r--svx/source/items/postattr.cxx224
-rw-r--r--svx/source/items/rotmodit.cxx238
-rw-r--r--svx/source/items/svxempty.cxx77
-rw-r--r--svx/source/items/svxerr.cxx81
-rw-r--r--svx/source/items/svxerr.src645
-rw-r--r--svx/source/items/svxfont.cxx793
-rw-r--r--svx/source/items/svxitems.src7155
-rw-r--r--svx/source/items/textitem.cxx3668
-rw-r--r--svx/source/items/zoomitem.cxx151
-rw-r--r--svx/source/mnuctrls/fntctl.cxx232
-rw-r--r--svx/source/mnuctrls/fntszctl.cxx273
-rw-r--r--svx/source/mnuctrls/makefile.mk120
-rw-r--r--svx/source/mnuctrls/mnuctrls.src115
-rw-r--r--svx/source/msfilter/escherex.cxx1312
-rw-r--r--svx/source/msfilter/eschesdo.cxx2635
-rw-r--r--svx/source/msfilter/eschesdo.hxx389
-rw-r--r--svx/source/msfilter/makefile.mk93
-rw-r--r--svx/source/msfilter/msashape.cxx4031
-rw-r--r--svx/source/msfilter/msashape.hxx135
-rw-r--r--svx/source/msfilter/msdffimp.cxx5070
-rw-r--r--svx/source/msfilter/msoleexp.cxx154
-rw-r--r--svx/source/msfilter/msvbasic.cxx593
-rw-r--r--svx/source/msfilter/msvbasic.hxx154
-rw-r--r--svx/source/msfilter/svxmsbas.cxx277
-rw-r--r--svx/source/options/makefile.mk158
-rw-r--r--svx/source/options/multipat.src315
-rw-r--r--svx/source/options/optdict.src613
-rw-r--r--svx/source/options/optgenrl.src903
-rw-r--r--svx/source/options/optgrid.cxx624
-rw-r--r--svx/source/options/optgrid.hrc90
-rw-r--r--svx/source/options/optgrid.src587
-rw-r--r--svx/source/options/optinet2.src4677
-rw-r--r--svx/source/options/optitems.cxx244
-rw-r--r--svx/source/options/optlingu.cxx1156
-rw-r--r--svx/source/options/optlingu.hrc115
-rw-r--r--svx/source/options/optlingu.src1418
-rw-r--r--svx/source/options/optpath.src274
-rw-r--r--svx/source/options/optsave.src624
-rw-r--r--svx/source/options/optspell.src287
-rw-r--r--svx/source/outliner/makefile.mk117
-rw-r--r--svx/source/outliner/outl_pch.cxx63
-rw-r--r--svx/source/outliner/outl_pch.hxx76
-rw-r--r--svx/source/outliner/outleeng.cxx199
-rw-r--r--svx/source/outliner/outleeng.hxx100
-rw-r--r--svx/source/outliner/outlin2.cxx709
-rw-r--r--svx/source/outliner/outliner.cxx1887
-rw-r--r--svx/source/outliner/outliner.hrc79
-rw-r--r--svx/source/outliner/outliner.src232
-rw-r--r--svx/source/outliner/outlobj.cxx316
-rw-r--r--svx/source/outliner/outlundo.cxx291
-rw-r--r--svx/source/outliner/outlundo.hxx168
-rw-r--r--svx/source/outliner/outlvw.cxx1955
-rw-r--r--svx/source/outliner/paralist.cxx258
-rw-r--r--svx/source/outliner/paralist.hxx110
-rw-r--r--svx/source/stbctrls/insctrl.cxx166
-rw-r--r--svx/source/stbctrls/makefile.mk122
-rw-r--r--svx/source/stbctrls/modctrl.cxx134
-rw-r--r--svx/source/stbctrls/pszctrl.cxx486
-rw-r--r--svx/source/stbctrls/selctrl.cxx177
-rw-r--r--svx/source/stbctrls/stbctrls.h88
-rw-r--r--svx/source/stbctrls/stbctrls.src565
-rw-r--r--svx/source/stbctrls/zoomctrl.cxx257
-rw-r--r--svx/source/svdraw/gradtrns.cxx471
-rw-r--r--svx/source/svdraw/gradtrns.hxx117
-rw-r--r--svx/source/svdraw/makefile.mk223
-rw-r--r--svx/source/svdraw/svdattr.cxx2854
-rw-r--r--svx/source/svdraw/svdcrtmt.hxx139
-rw-r--r--svx/source/svdraw/svdcrtv.cxx1016
-rw-r--r--svx/source/svdraw/svddrag.cxx187
-rw-r--r--svx/source/svdraw/svddrgm1.hxx373
-rw-r--r--svx/source/svdraw/svddrgmt.cxx1985
-rw-r--r--svx/source/svdraw/svddrgv.cxx1151
-rw-r--r--svx/source/svdraw/svdedtv.cxx860
-rw-r--r--svx/source/svdraw/svdedtv1.cxx1287
-rw-r--r--svx/source/svdraw/svdedtv2.cxx1721
-rw-r--r--svx/source/svdraw/svdedxv.cxx1592
-rw-r--r--svx/source/svdraw/svdetc.cxx946
-rw-r--r--svx/source/svdraw/svdfmtf.cxx918
-rw-r--r--svx/source/svdraw/svdfmtf.hxx202
-rw-r--r--svx/source/svdraw/svdfppt.cxx6288
-rw-r--r--svx/source/svdraw/svdglev.cxx423
-rw-r--r--svx/source/svdraw/svdglue.cxx600
-rw-r--r--svx/source/svdraw/svdhdl.cxx1416
-rw-r--r--svx/source/svdraw/svdhlpln.cxx302
-rw-r--r--svx/source/svdraw/svdibrow.cxx1358
-rw-r--r--svx/source/svdraw/svditer.cxx209
-rw-r--r--svx/source/svdraw/svditext.hxx91
-rw-r--r--svx/source/svdraw/svdlayer.cxx577
-rw-r--r--svx/source/svdraw/svdmark.cxx648
-rw-r--r--svx/source/svdraw/svdmodel.cxx2395
-rw-r--r--svx/source/svdraw/svdmrkv.cxx2153
-rw-r--r--svx/source/svdraw/svdmrkv1.cxx716
-rw-r--r--svx/source/svdraw/svdoattr.cxx1327
-rw-r--r--svx/source/svdraw/svdobj.cxx4125
-rw-r--r--svx/source/svdraw/svdocapt.cxx973
-rw-r--r--svx/source/svdraw/svdocirc.cxx1482
-rw-r--r--svx/source/svdraw/svdoedge.cxx2525
-rw-r--r--svx/source/svdraw/svdograf.cxx2167
-rw-r--r--svx/source/svdraw/svdogrp.cxx1549
-rw-r--r--svx/source/svdraw/svdomeas.cxx1789
-rw-r--r--svx/source/svdraw/svdoole2.cxx1366
-rw-r--r--svx/source/svdraw/svdopage.cxx482
-rw-r--r--svx/source/svdraw/svdopath.cxx2999
-rw-r--r--svx/source/svdraw/svdorect.cxx877
-rw-r--r--svx/source/svdraw/svdotext.cxx2055
-rw-r--r--svx/source/svdraw/svdotxat.cxx786
-rw-r--r--svx/source/svdraw/svdotxdr.cxx351
-rw-r--r--svx/source/svdraw/svdotxed.cxx347
-rw-r--r--svx/source/svdraw/svdotxfl.cxx82
-rw-r--r--svx/source/svdraw/svdotxln.cxx441
-rw-r--r--svx/source/svdraw/svdotxtr.cxx458
-rw-r--r--svx/source/svdraw/svdouno.cxx775
-rw-r--r--svx/source/svdraw/svdoutl.cxx164
-rw-r--r--svx/source/svdraw/svdovirt.cxx675
-rw-r--r--svx/source/svdraw/svdpage.cxx1749
-rw-r--r--svx/source/svdraw/svdpagv.cxx2642
-rw-r--r--svx/source/svdraw/svdpntv.cxx2063
-rw-r--r--svx/source/svdraw/svdpoev.cxx604
-rw-r--r--svx/source/svdraw/svdscrol.cxx457
-rw-r--r--svx/source/svdraw/svdscrol.hxx194
-rw-r--r--svx/source/svdraw/svdsnpv.cxx794
-rw-r--r--svx/source/svdraw/svdstr.src16507
-rw-r--r--svx/source/svdraw/svdtouch.cxx396
-rw-r--r--svx/source/svdraw/svdtrans.cxx1285
-rw-r--r--svx/source/svdraw/svdtxhdl.cxx374
-rw-r--r--svx/source/svdraw/svdtxhdl.hxx136
-rw-r--r--svx/source/svdraw/svdundo.cxx1407
-rw-r--r--svx/source/svdraw/svdview.cxx1405
-rw-r--r--svx/source/svdraw/svdviter.cxx330
-rw-r--r--svx/source/svdraw/svdxcgv.cxx1254
-rw-r--r--svx/source/svrtf/makefile.mk103
-rw-r--r--svx/source/svrtf/rtfgrf.cxx571
-rw-r--r--svx/source/svrtf/rtfitem.cxx1606
-rw-r--r--svx/source/svrtf/segincr.asm12
-rw-r--r--svx/source/svrtf/svxrtf.cxx1337
-rw-r--r--svx/source/svxlink/fileobj.cxx1009
-rw-r--r--svx/source/svxlink/fileobj.hxx131
-rw-r--r--svx/source/svxlink/linkmgr.cxx425
-rw-r--r--svx/source/svxlink/linkmgr.src178
-rw-r--r--svx/source/svxlink/makefile.mk105
-rw-r--r--svx/source/tbxctrls/colrctrl.cxx633
-rw-r--r--svx/source/tbxctrls/colrctrl.src112
-rw-r--r--svx/source/tbxctrls/fillctrl.cxx809
-rw-r--r--svx/source/tbxctrls/grafctrl.cxx718
-rw-r--r--svx/source/tbxctrls/itemwin.cxx698
-rw-r--r--svx/source/tbxctrls/layctrl.cxx726
-rw-r--r--svx/source/tbxctrls/linectrl.cxx803
-rw-r--r--svx/source/tbxctrls/linectrl.src68
-rw-r--r--svx/source/tbxctrls/makefile.mk116
-rw-r--r--svx/source/tbxctrls/tbcontrl.cxx2678
-rw-r--r--svx/source/tbxctrls/tbcontrl.src310
-rw-r--r--svx/source/tbxctrls/tbxalign.cxx129
-rw-r--r--svx/source/tbxctrls/tbxdraw.hrc65
-rw-r--r--svx/source/tbxctrls/tbxdraw.src683
-rw-r--r--svx/source/tbxctrls/tbxdrctl.cxx168
-rw-r--r--svx/source/unodraw/makefile.mk127
-rw-r--r--svx/source/unodraw/unobtabl.cxx352
-rw-r--r--svx/source/unodraw/unoctabl.cxx347
-rw-r--r--svx/source/unodraw/unodraw.src76
-rw-r--r--svx/source/unodraw/unodtabl.cxx343
-rw-r--r--svx/source/unodraw/unofdesc.cxx332
-rw-r--r--svx/source/unodraw/unogtabl.cxx342
-rw-r--r--svx/source/unodraw/unohtabl.cxx322
-rw-r--r--svx/source/unodraw/unoipset.cxx355
-rw-r--r--svx/source/unodraw/unomlstr.cxx98
-rw-r--r--svx/source/unodraw/unomod.cxx177
-rw-r--r--svx/source/unodraw/unomtabl.cxx376
-rw-r--r--svx/source/unodraw/unonrule.cxx503
-rw-r--r--svx/source/unodraw/unopage.cxx720
-rw-r--r--svx/source/unodraw/unoprov.cxx643
-rw-r--r--svx/source/unodraw/unoshap2.cxx1386
-rw-r--r--svx/source/unodraw/unoshap3.cxx970
-rw-r--r--svx/source/unodraw/unoshape.cxx1786
-rw-r--r--svx/source/unodraw/unoshcol.cxx163
-rw-r--r--svx/source/unodraw/unoshtxt.cxx204
-rw-r--r--svx/source/unodraw/unottabl.cxx328
-rw-r--r--svx/source/unoedit/makefile.mk98
-rw-r--r--svx/source/unoedit/unoedsrc.cxx89
-rw-r--r--svx/source/unoedit/unofield.cxx1099
-rw-r--r--svx/source/unoedit/unofored.cxx299
-rw-r--r--svx/source/unoedit/unoforou.cxx215
-rw-r--r--svx/source/unoedit/unotext.cxx1412
-rw-r--r--svx/source/unoedit/unotext2.cxx661
-rw-r--r--svx/source/xoutdev/_xoutbmp.cxx904
-rw-r--r--svx/source/xoutdev/_xpoly.cxx2444
-rw-r--r--svx/source/xoutdev/makefile.mk191
-rw-r--r--svx/source/xoutdev/xattr.cxx4159
-rw-r--r--svx/source/xoutdev/xattr2.cxx1742
-rw-r--r--svx/source/xoutdev/xattrbmp.cxx801
-rw-r--r--svx/source/xoutdev/xexch.cxx229
-rw-r--r--svx/source/xoutdev/xpool.cxx475
-rw-r--r--svx/source/xoutdev/xtabbtmp.cxx662
-rw-r--r--svx/source/xoutdev/xtabcolr.cxx856
-rw-r--r--svx/source/xoutdev/xtabdash.cxx655
-rw-r--r--svx/source/xoutdev/xtabgrdt.cxx776
-rw-r--r--svx/source/xoutdev/xtabhtch.cxx657
-rw-r--r--svx/source/xoutdev/xtable.cxx544
-rw-r--r--svx/source/xoutdev/xtablend.cxx705
-rw-r--r--svx/util/gal.dxp21
-rw-r--r--svx/util/hidother.hrc61
-rw-r--r--svx/util/hidother.src361
-rw-r--r--svx/util/makefile.mk697
-rw-r--r--svx/util/makefile.pmk63
-rw-r--r--svx/util/svx.dxp2
-rw-r--r--svx/util/svxpch.cxx103
-rw-r--r--svx/workben/edittest.cxx2174
-rw-r--r--svx/workben/makefile.mk171
-rw-r--r--svx/xml/SvxDrawPage.xml33
-rw-r--r--svx/xml/SvxGraphicObject.xml33
-rw-r--r--svx/xml/SvxShape.xml33
-rw-r--r--svx/xml/SvxShapeCircle.xml33
-rw-r--r--svx/xml/SvxShapeCollection.xml33
-rw-r--r--svx/xml/SvxShapeConnector.xml33
-rw-r--r--svx/xml/SvxShapeControl.xml33
-rw-r--r--svx/xml/SvxShapeDimensioning.xml33
-rw-r--r--svx/xml/SvxShapeGroup.xml33
-rw-r--r--svx/xml/SvxShapePolyPolygon.xml33
-rw-r--r--svx/xml/SvxShapePolyPolygonBezier.xml33
-rw-r--r--svx/xml/SvxUnoNumberingRules.xml33
-rw-r--r--svx/xml/SvxUnoText.xml33
-rw-r--r--svx/xml/SvxUnoTextContent.xml33
-rw-r--r--svx/xml/SvxUnoTextContentEnum.xml33
-rw-r--r--svx/xml/SvxUnoTextCursor.xml33
-rw-r--r--svx/xml/SvxUnoTextField.xml33
-rw-r--r--svx/xml/SvxUnoTextRange.xml33
-rw-r--r--svx/xml/SvxUnoTextRangeEnumeration.xml33
-rw-r--r--uui/prj/d.lst4
-rw-r--r--uui/source/cookiedg.cxx186
-rw-r--r--uui/source/cookiedg.hrc79
-rw-r--r--uui/source/cookiedg.hxx105
-rw-r--r--uui/source/cookiedg.src393
-rw-r--r--uui/source/iahndl.cxx925
-rw-r--r--uui/source/iahndl.hxx138
-rw-r--r--uui/source/ids.hrc97
-rw-r--r--uui/source/ids.src171
-rw-r--r--uui/source/logindlg.cxx351
-rw-r--r--uui/source/logindlg.hrc91
-rw-r--r--uui/source/logindlg.hxx151
-rw-r--r--uui/source/logindlg.src388
-rw-r--r--uui/source/makefile.mk83
-rw-r--r--uui/source/services.cxx187
-rw-r--r--uui/util/makefile.mk96
-rw-r--r--xmlhelp/prj/d.lst1
-rw-r--r--xmloff/dtd/office.dtd27
-rw-r--r--xmloff/inc/DashStyle.hxx101
-rw-r--r--xmloff/inc/GradientStyle.hxx101
-rw-r--r--xmloff/inc/HatchStyle.hxx103
-rw-r--r--xmloff/inc/ImageStyle.hxx101
-rw-r--r--xmloff/inc/MarkerStyle.hxx101
-rw-r--r--xmloff/inc/SchXMLExport.hxx131
-rw-r--r--xmloff/inc/SchXMLImport.hxx202
-rw-r--r--xmloff/inc/TransGradientStyle.hxx101
-rw-r--r--xmloff/inc/XMLChartPropertySetMapper.hxx154
-rw-r--r--xmloff/inc/XMLChartStyleContext.hxx92
-rw-r--r--xmloff/inc/XMLClipPropertyHandler.hxx82
-rw-r--r--xmloff/inc/XMLElementPropertyContext.hxx106
-rw-r--r--xmloff/inc/XMLFootnoteConfigurationImportContext.hxx155
-rw-r--r--xmloff/inc/XMLTextListAutoStylePool.hxx112
-rw-r--r--xmloff/inc/i18nmap.hxx105
-rw-r--r--xmloff/inc/numehelp.hxx101
-rw-r--r--xmloff/inc/txtflde.hxx415
-rw-r--r--xmloff/inc/txtfldi.hxx1212
-rw-r--r--xmloff/inc/txtvfldi.hxx599
-rw-r--r--xmloff/inc/unoatrcn.hxx126
-rw-r--r--xmloff/inc/xexptran.hxx214
-rw-r--r--xmloff/inc/xmlcnitm.hxx125
-rw-r--r--xmloff/inc/xmlehelp.hxx86
-rw-r--r--xmloff/inc/xmlkywd.hxx1145
-rw-r--r--xmloff/inc/xmlnmspe.hxx108
-rw-r--r--xmloff/inc/xmltabe.hxx124
-rw-r--r--xmloff/inc/xmltabi.hxx101
-rw-r--r--xmloff/prj/d.lst73
-rw-r--r--xmloff/source/chart/PropertyMaps.cxx474
-rw-r--r--xmloff/source/chart/SchXMLChartContext.cxx525
-rw-r--r--xmloff/source/chart/SchXMLChartContext.hxx153
-rw-r--r--xmloff/source/chart/SchXMLExport.cxx1759
-rw-r--r--xmloff/source/chart/SchXMLImport.cxx509
-rw-r--r--xmloff/source/chart/SchXMLParagraphContext.cxx84
-rw-r--r--xmloff/source/chart/SchXMLParagraphContext.hxx88
-rw-r--r--xmloff/source/chart/SchXMLPlotAreaContext.cxx765
-rw-r--r--xmloff/source/chart/SchXMLPlotAreaContext.hxx207
-rw-r--r--xmloff/source/chart/SchXMLTableContext.cxx711
-rw-r--r--xmloff/source/chart/SchXMLTableContext.hxx255
-rw-r--r--xmloff/source/chart/XMLChartStyleContext.cxx103
-rw-r--r--xmloff/source/chart/contexts.cxx191
-rw-r--r--xmloff/source/chart/contexts.hxx129
-rw-r--r--xmloff/source/chart/makefile.mk90
-rw-r--r--xmloff/source/chart/transporttypes.hxx140
-rw-r--r--xmloff/source/draw/XMLShapeStyleContext.cxx97
-rw-r--r--xmloff/source/draw/makefile.mk95
-rw-r--r--xmloff/source/draw/propimp0.cxx183
-rw-r--r--xmloff/source/draw/propimp0.hxx90
-rw-r--r--xmloff/source/draw/sdpropls.cxx424
-rw-r--r--xmloff/source/draw/sdpropls.hxx120
-rw-r--r--xmloff/source/draw/sdxmlexp.cxx3090
-rw-r--r--xmloff/source/draw/sdxmlimp.cxx607
-rw-r--r--xmloff/source/draw/shapeexport.cxx234
-rw-r--r--xmloff/source/draw/shapeimport.cxx589
-rw-r--r--xmloff/source/draw/xexptran.cxx1661
-rw-r--r--xmloff/source/draw/ximpbody.cxx369
-rw-r--r--xmloff/source/draw/ximpbody.hxx124
-rw-r--r--xmloff/source/draw/ximpgrp.cxx120
-rw-r--r--xmloff/source/draw/ximpgrp.hxx116
-rw-r--r--xmloff/source/draw/ximpnote.cxx163
-rw-r--r--xmloff/source/draw/ximpnote.hxx104
-rw-r--r--xmloff/source/draw/ximpshap.cxx1544
-rw-r--r--xmloff/source/draw/ximpshap.hxx395
-rw-r--r--xmloff/source/draw/ximpstyl.cxx1086
-rw-r--r--xmloff/source/draw/ximpstyl.hxx288
-rw-r--r--xmloff/source/meta/makefile.mk94
-rw-r--r--xmloff/source/meta/xmlmetae.cxx583
-rw-r--r--xmloff/source/meta/xmlmetai.cxx790
-rw-r--r--xmloff/source/style/DashStyle.cxx367
-rw-r--r--xmloff/source/style/EnumPropertyHdl.cxx146
-rw-r--r--xmloff/source/style/FillStyleContext.cxx305
-rw-r--r--xmloff/source/style/FillStyleContext.hxx187
-rw-r--r--xmloff/source/style/GradientStyle.cxx370
-rw-r--r--xmloff/source/style/HatchStyle.cxx291
-rw-r--r--xmloff/source/style/ImageStyle.cxx269
-rw-r--r--xmloff/source/style/MarkerStyle.cxx255
-rw-r--r--xmloff/source/style/NamedBoolPropertyHdl.cxx129
-rw-r--r--xmloff/source/style/TransGradientStyle.cxx355
-rw-r--r--xmloff/source/style/XMLClipPropertyHandler.cxx179
-rw-r--r--xmloff/source/style/XMLElementPropertyContext.cxx94
-rw-r--r--xmloff/source/style/adjushdl.cxx187
-rw-r--r--xmloff/source/style/adjushdl.hxx93
-rw-r--r--xmloff/source/style/backhdl.cxx340
-rw-r--r--xmloff/source/style/backhdl.hxx94
-rw-r--r--xmloff/source/style/bordrhdl.cxx499
-rw-r--r--xmloff/source/style/bordrhdl.hxx91
-rw-r--r--xmloff/source/style/breakhdl.cxx229
-rw-r--r--xmloff/source/style/breakhdl.hxx93
-rw-r--r--xmloff/source/style/cdouthdl.cxx138
-rw-r--r--xmloff/source/style/cdouthdl.hxx81
-rw-r--r--xmloff/source/style/chrhghdl.cxx173
-rw-r--r--xmloff/source/style/chrhghdl.hxx91
-rw-r--r--xmloff/source/style/chrlohdl.cxx193
-rw-r--r--xmloff/source/style/chrlohdl.hxx95
-rw-r--r--xmloff/source/style/csmaphdl.cxx178
-rw-r--r--xmloff/source/style/csmaphdl.hxx90
-rw-r--r--xmloff/source/style/escphdl.cxx216
-rw-r--r--xmloff/source/style/escphdl.hxx91
-rw-r--r--xmloff/source/style/fonthdl.cxx354
-rw-r--r--xmloff/source/style/fonthdl.hxx118
-rw-r--r--xmloff/source/style/impastp1.cxx149
-rw-r--r--xmloff/source/style/impastp2.cxx98
-rw-r--r--xmloff/source/style/impastp3.cxx180
-rw-r--r--xmloff/source/style/impastp4.cxx360
-rw-r--r--xmloff/source/style/impastpl.hxx251
-rw-r--r--xmloff/source/style/kernihdl.cxx132
-rw-r--r--xmloff/source/style/kernihdl.hxx81
-rw-r--r--xmloff/source/style/lspachdl.cxx245
-rw-r--r--xmloff/source/style/lspachdl.hxx100
-rw-r--r--xmloff/source/style/makefile.mk207
-rw-r--r--xmloff/source/style/numehelp.cxx306
-rw-r--r--xmloff/source/style/opaquhdl.cxx124
-rw-r--r--xmloff/source/style/opaquhdl.hxx81
-rw-r--r--xmloff/source/style/postuhdl.cxx147
-rw-r--r--xmloff/source/style/postuhdl.hxx81
-rw-r--r--xmloff/source/style/prhdlfac.cxx341
-rw-r--r--xmloff/source/style/prstylei.cxx317
-rw-r--r--xmloff/source/style/shadwhdl.cxx220
-rw-r--r--xmloff/source/style/shadwhdl.hxx81
-rw-r--r--xmloff/source/style/shdwdhdl.cxx124
-rw-r--r--xmloff/source/style/shdwdhdl.hxx81
-rw-r--r--xmloff/source/style/styleexp.cxx440
-rw-r--r--xmloff/source/style/tabsthdl.cxx129
-rw-r--r--xmloff/source/style/tabsthdl.hxx84
-rw-r--r--xmloff/source/style/undlihdl.cxx151
-rw-r--r--xmloff/source/style/undlihdl.hxx81
-rw-r--r--xmloff/source/style/uniref.cxx74
-rw-r--r--xmloff/source/style/weighhdl.cxx231
-rw-r--r--xmloff/source/style/weighhdl.hxx82
-rw-r--r--xmloff/source/style/xmlaustp.cxx164
-rw-r--r--xmloff/source/style/xmlbahdl.cxx486
-rw-r--r--xmloff/source/style/xmlbahdl.hxx183
-rw-r--r--xmloff/source/style/xmlexppr.cxx356
-rw-r--r--xmloff/source/style/xmlimppr.cxx259
-rw-r--r--xmloff/source/style/xmlnume.cxx794
-rw-r--r--xmloff/source/style/xmlnumfe.cxx1218
-rw-r--r--xmloff/source/style/xmlnumfi.cxx1365
-rw-r--r--xmloff/source/style/xmlnumi.cxx1126
-rw-r--r--xmloff/source/style/xmlprcon.cxx128
-rw-r--r--xmloff/source/style/xmlprhdl.cxx78
-rw-r--r--xmloff/source/style/xmlprmap.cxx444
-rw-r--r--xmloff/source/style/xmlstyle.cxx963
-rw-r--r--xmloff/source/style/xmltabe.cxx250
-rw-r--r--xmloff/source/style/xmltabi.cxx319
-rw-r--r--xmloff/source/text/XMLAnchorTypePropHdl.hxx92
-rw-r--r--xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx502
-rw-r--r--xmloff/source/text/XMLFootnoteImportContext.cxx253
-rw-r--r--xmloff/source/text/XMLFootnoteImportContext.hxx134
-rw-r--r--xmloff/source/text/XMLTextColumnsExport.cxx146
-rw-r--r--xmloff/source/text/XMLTextFrameContext.cxx528
-rw-r--r--xmloff/source/text/XMLTextFrameContext.hxx130
-rw-r--r--xmloff/source/text/XMLTextListAutoStylePool.cxx265
-rw-r--r--xmloff/source/text/XMLTextListBlockContext.cxx295
-rw-r--r--xmloff/source/text/XMLTextListBlockContext.hxx121
-rw-r--r--xmloff/source/text/XMLTextListItemContext.cxx181
-rw-r--r--xmloff/source/text/XMLTextListItemContext.hxx104
-rw-r--r--xmloff/source/text/XMLTextMarkImportContext.cxx300
-rw-r--r--xmloff/source/text/XMLTextMarkImportContext.hxx132
-rw-r--r--xmloff/source/text/XMLTextNumRuleInfo.cxx185
-rw-r--r--xmloff/source/text/XMLTextNumRuleInfo.hxx138
-rw-r--r--xmloff/source/text/XMLTextPropertySetContext.cxx141
-rw-r--r--xmloff/source/text/XMLTextPropertySetContext.hxx96
-rw-r--r--xmloff/source/text/makefile.mk141
-rw-r--r--xmloff/source/text/txtdrope.cxx201
-rw-r--r--xmloff/source/text/txtdrope.hxx125
-rw-r--r--xmloff/source/text/txtdropi.cxx198
-rw-r--r--xmloff/source/text/txtdropi.hxx102
-rw-r--r--xmloff/source/text/txtexppr.cxx162
-rw-r--r--xmloff/source/text/txtexppr.hxx113
-rw-r--r--xmloff/source/text/txtflde.cxx2518
-rw-r--r--xmloff/source/text/txtfldi.cxx2844
-rw-r--r--xmloff/source/text/txtftne.cxx389
-rw-r--r--xmloff/source/text/txtimp.cxx1012
-rw-r--r--xmloff/source/text/txtimppr.cxx355
-rw-r--r--xmloff/source/text/txtparae.cxx1480
-rw-r--r--xmloff/source/text/txtparai.cxx821
-rw-r--r--xmloff/source/text/txtparai.hxx114
-rw-r--r--xmloff/source/text/txtprhdl.cxx1035
-rw-r--r--xmloff/source/text/txtprhdl.hxx84
-rw-r--r--xmloff/source/text/txtprmap.cxx998
-rw-r--r--xmloff/source/text/txtstyle.cxx175
-rw-r--r--xmloff/source/text/txtstyli.cxx276
-rw-r--r--xmloff/source/text/txtvfldi.cxx1365
-rw-r--r--xmloff/util/makefile.mk137
1134 files changed, 698930 insertions, 0 deletions
diff --git a/sfx2/inc/about.hxx b/sfx2/inc/about.hxx
new file mode 100644
index 000000000000..5f2076b5e776
--- /dev/null
+++ b/sfx2/inc/about.hxx
@@ -0,0 +1,122 @@
+/*************************************************************************
+ *
+ * $RCSfile: about.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:22 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _ABOUT_HXX
+#define _ABOUT_HXX
+
+// include ---------------------------------------------------------------
+
+#ifndef _RESARY_HXX //autogen
+#include <vcl/resary.hxx>
+#endif
+#ifndef _BUTTON_HXX //autogen
+#include <vcl/button.hxx>
+#endif
+#ifndef _ACCEL_HXX //autogen
+#include <vcl/accel.hxx>
+#endif
+#ifndef _LIST_HXX //autogen
+#include <tools/list.hxx>
+#endif
+#ifndef _STDCTRL_HXX //autogen
+#include <svtools/stdctrl.hxx>
+#endif
+#include "basedlgs.hxx" // SfxModalDialog
+
+DECLARE_LIST( AccelList, Accelerator* )
+
+// class AboutDialog -----------------------------------------------------
+
+class AboutDialog : public SfxModalDialog
+{
+private:
+ OKButton aOKButton;
+ Image aAppLogo;
+
+ FixedInfo aVersionText;
+ FixedInfo aCopyrightText;
+
+ ResStringArray aDeveloperAry;
+ String aDevVersionStr;
+ String aAccelStr;
+
+ AccelList aAccelList;
+
+ AutoTimer aTimer;
+ long nOff;
+ long nEnd;
+
+ BOOL bNormal;
+
+protected:
+ virtual BOOL Close();
+ virtual void Paint( const Rectangle& );
+
+public:
+ AboutDialog( Window* pParent, const ResId& rId, const String& rVerStr );
+ ~AboutDialog();
+
+ DECL_LINK( TimerHdl, Timer * );
+ DECL_LINK( AccelSelectHdl, Accelerator * );
+};
+
+#endif // #ifndef _ABOUT_HXX
+
+
diff --git a/sfx2/inc/arrdecl.hxx b/sfx2/inc/arrdecl.hxx
new file mode 100644
index 000000000000..b240d8ec734a
--- /dev/null
+++ b/sfx2/inc/arrdecl.hxx
@@ -0,0 +1,130 @@
+/*************************************************************************
+ *
+ * $RCSfile: arrdecl.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:22 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SFX_ARRDECL_HXX
+#define _SFX_ARRDECL_HXX
+
+#include <tools/list.hxx>
+
+#ifndef _SVARRAY_HXX
+#include <svtools/svarray.hxx>
+#endif
+#include "minarray.hxx"
+
+struct CntUpdateResult;
+
+SV_DECL_PTRARR_DEL(CntUpdateResults_Impl, CntUpdateResult*, 4, 4);
+
+class SfxObjectShell;
+SV_DECL_PTRARR( SfxObjectShellArr_Impl, SfxObjectShell*, 4, 4 );
+
+class SfxViewFrame;
+SV_DECL_PTRARR( SfxViewFrameArr_Impl, SfxViewFrame*, 4, 4 );
+
+class SfxViewShell;
+SV_DECL_PTRARR( SfxViewShellArr_Impl, SfxViewShell*, 4, 4 );
+
+class SfxObjectFactory;
+SV_DECL_PTRARR( SfxObjectFactoryArr_Impl, SfxObjectFactory*, 3, 3 );
+
+struct SfxTbxCtrlFactory;
+SV_DECL_PTRARR_DEL( SfxTbxCtrlFactArr_Impl, SfxTbxCtrlFactory*, 8, 4 );
+
+struct SfxStbCtrlFactory;
+SV_DECL_PTRARR_DEL( SfxStbCtrlFactArr_Impl, SfxStbCtrlFactory*, 8, 4 );
+
+struct SfxMenuCtrlFactory;
+SV_DECL_PTRARR_DEL( SfxMenuCtrlFactArr_Impl, SfxMenuCtrlFactory*, 2, 2 );
+
+struct SfxChildWinFactory;
+SV_DECL_PTRARR_DEL( SfxChildWinFactArr_Impl, SfxChildWinFactory*, 2, 2 );
+
+class SfxModule;
+SV_DECL_PTRARR( SfxModuleArr_Impl, SfxModule*, 2, 2 );
+
+class AsynchronLink;
+SV_DECL_PTRARR_DEL( AsynchronLinkArr_Impl, AsynchronLink*, 2, 2 );
+
+class SfxFilter;
+DECL_PTRARRAY( SfxFilterArr_Impl, SfxFilter*, 4, 4 );
+
+class SfxFrame;
+typedef SfxFrame* SfxFramePtr;
+SV_DECL_PTRARR( SfxFrameArr_Impl, SfxFramePtr, 4, 4 );
+
+DECLARE_LIST( SfxFilterList_Impl, SfxFilter* );
+
+struct SfxExternalLib_Impl;
+typedef SfxExternalLib_Impl* SfxExternalLibPtr;
+SV_DECL_PTRARR_DEL( SfxExternalLibArr_Impl, SfxExternalLibPtr, 2, 2 );
+
+//class XEventListenerRef;
+//typedef XEventListenerRef* XEventListenerPtr;
+//SV_DECL_PTRARR_DEL( XEventListenerArr_Impl, XEventListenerPtr, 4, 4 );
+
+//class XFrameRef;
+//typedef XFrameRef* XFramePtr;
+//SV_DECL_PTRARR_DEL( XFrameArr_Impl, XFramePtr, 4, 4 );
+
+class SfxSlot;
+typedef SfxSlot* SfxSlotPtr;
+SV_DECL_PTRARR( SfxSlotArr_Impl, SfxSlotPtr, 20, 20 );
+
+#endif
diff --git a/sfx2/inc/basmgr.hxx b/sfx2/inc/basmgr.hxx
new file mode 100644
index 000000000000..495608c0f0bb
--- /dev/null
+++ b/sfx2/inc/basmgr.hxx
@@ -0,0 +1,170 @@
+/*************************************************************************
+ *
+ * $RCSfile: basmgr.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:22 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _SFX_BASMGR_HXX
+#define _SFX_BASMGR_HXX
+
+#ifndef _BASMGR_HXX_
+#include <basic/basmgr.hxx>
+#endif
+
+class SfxBasicManager : public BasicManager
+{
+private:
+ BasicLibs* pLibs;
+ BasicErrorManager* pErrorMgr;
+
+ String aName;
+ String aStorageName;
+ BOOL bBasMgrModified;
+
+ void Init();
+
+protected:
+ BOOL ImpStoreLibary( StarBASIC* pLib, SvStorage& rStorage ) const;
+ BOOL ImpLoadLibary( BasicLibInfo* pLibInfo ) const;
+ BOOL ImpLoadLibary( BasicLibInfo* pLibInfo, SvStorage* pCurStorage, BOOL bInfosOnly = FALSE ) const;
+ void ImpCreateStdLib( StarBASIC* pParentFromStdLib );
+ void ImpMgrNotLoaded( const String& rStorageName );
+ BasicLibInfo* CreateLibInfo();
+ void LoadBasicManager( SvStorage& rStorage, BOOL bLoadBasics = TRUE );
+ void LoadOldBasicManager( SvStorage& rStorage );
+ BOOL ImplLoadBasic( SvStream& rStrm, StarBASICRef& rOldBasic ) const;
+ void ImplGetPassword( USHORT nLib ) const;
+ BOOL ImplEncryptStream( SvStream& rStream ) const;
+ BasicLibInfo* FindLibInfo( StarBASIC* pBasic ) const;
+ void CheckModules( StarBASIC* pBasic, BOOL bReference ) const;
+ void SetFlagToAllLibs( short nFlag, BOOL bSet ) const;
+ SfxBasicManager(); // Nur zum anpassen von Pfaden bei 'Speichern unter'.
+
+public:
+ TYPEINFO();
+ SfxBasicManager( SvStorage& rStorage, StarBASIC* pParentFromStdLib = NULL, String* pLibPath = NULL );
+ SfxBasicManager( StarBASIC* pStdLib, String* pLibPath = NULL );
+ ~SfxBasicManager();
+
+ void SetStorageName( const String& rName ) { aStorageName = rName; }
+ String GetStorageName() const { return aStorageName; }
+ void SetName( const String& rName ) { aName = rName; }
+ String GetName() const { return aName; }
+
+
+ static BOOL HasBasicManager( const SvStorage& rStorage );
+ static BOOL CopyBasicData( SvStorage* pFrom, const String& rSourceURL, SvStorage* pTo);
+ void Merge( SvStorage& rFromStorage );
+
+ USHORT GetLibCount() const;
+ StarBASIC* GetStdLib() const;
+ StarBASIC* GetLib( USHORT nLib ) const;
+ StarBASIC* GetLib( const String& rName ) const;
+ USHORT GetLibId( const String& rName ) const;
+ USHORT GetLibId( StarBASIC* pLib ) const;
+ BOOL HasLib( const String& rName ) const;
+
+ void Store( SvStorage& rStorage );
+ void Store( SvStorage& rStorage, BOOL bStoreLibs );
+
+ BOOL SetLibName( USHORT nLib, const String& rName );
+ String GetLibName( USHORT nLib );
+
+ BOOL SetLibStorageName( USHORT nLib, const String& rName );
+ String GetLibStorageName( USHORT nLib );
+ String GetRelLibStorageName( USHORT nLib );
+
+ BOOL IsLibLoaded( USHORT nLib ) const;
+ BOOL LoadLib( USHORT nLib );
+ BOOL UnloadLib( USHORT nLib );
+ BOOL StoreLib( USHORT nLib ) const;
+ BOOL RemoveLib( USHORT nLib );
+ BOOL RemoveLib( USHORT nLib, BOOL bDelBasicFromStorage );
+
+ BOOL IsReference( USHORT nLib );
+ BOOL IsExtern( USHORT nLib );
+
+ StarBASIC* CreateLib( const String& rLibName );
+ StarBASIC* AddLib( SvStorage& rStorage, const String& rLibName, BOOL bReference );
+ void AddLib( StarBASIC* pLib );
+ BOOL MoveLib( USHORT nLib, USHORT nNewPos );
+
+ BOOL HasPassword( USHORT nLib ) const;
+ String GetPassword( USHORT nLib ) const;
+ void SetPassword( USHORT nLib, const String& rNewPassword );
+
+ // Der BasicManager gibt die Basics auch raus, wenn das Passwort nicht
+ // geprueft wurde, da man auch ohne Passwort mit der Lib arbeiten kann.
+ // Es ist Sache der App, was Sie dem Anwender ohne Passwort nicht gestattet,
+ // also z.B. das Betrachten der Source oder das Anzeigen/Loeschen von Modulen.
+ BOOL IsPasswordVerified( USHORT nLib ) const;
+ void SetPasswordVerified( USHORT nLib );
+
+
+ // Modify-Flag wird nur beim Speichern zurueckgesetzt.
+ BOOL IsModified() const;
+ BOOL IsBasicModified() const;
+ BOOL IsManagerModified() const { return bBasMgrModified; }
+
+ BOOL HasErrors();
+ void ClearErrors();
+ BasicError* GetFirstError();
+ BasicError* GetNextError();
+};
+
+#endif //_SFX_BASMGR_HXX
diff --git a/sfx2/inc/bitset.hxx b/sfx2/inc/bitset.hxx
new file mode 100644
index 000000000000..90e60ee8d87a
--- /dev/null
+++ b/sfx2/inc/bitset.hxx
@@ -0,0 +1,293 @@
+/*************************************************************************
+ *
+ * $RCSfile: bitset.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:22 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SFXBITSET_HXX
+#define _SFXBITSET_HXX
+
+#ifndef _SOLAR_H
+#include <tools/solar.h>
+#endif
+
+class Range;
+
+class BitSet
+{
+private:
+ void CopyFrom( const BitSet& rSet );
+ USHORT nBlocks;
+ USHORT nCount;
+ ULONG* pBitmap;
+public:
+ BitSet operator<<( USHORT nOffset ) const;
+ BitSet operator>>( USHORT nOffset ) const;
+ static USHORT CountBits( ULONG nBits );
+ BOOL operator!() const;
+ BitSet();
+ BitSet( const BitSet& rOrig );
+ BitSet( USHORT* pArray, USHORT nSize );
+ ~BitSet();
+ BitSet( const Range& rRange );
+ USHORT Count() const;
+ BitSet& operator=( const BitSet& rOrig );
+ BitSet& operator=( USHORT nBit );
+ BitSet operator|( const BitSet& rSet ) const;
+ BitSet operator|( USHORT nBit ) const;
+ BitSet& operator|=( const BitSet& rSet );
+ BitSet& operator|=( USHORT nBit );
+ BitSet operator-( const BitSet& rSet ) const;
+ BitSet operator-( USHORT nId ) const;
+ BitSet& operator-=( const BitSet& rSet );
+ BitSet& operator-=( USHORT nBit );
+ BitSet operator&( const BitSet& rSet ) const;
+ BitSet& operator&=( const BitSet& rSet );
+ BitSet operator^( const BitSet& rSet ) const;
+ BitSet operator^( USHORT nBit ) const;
+ BitSet& operator^=( const BitSet& rSet );
+ BitSet& operator^=( USHORT nBit );
+ BOOL IsRealSubSet( const BitSet& rSet ) const;
+ BOOL IsSubSet( const BitSet& rSet ) const;
+ BOOL IsRealSuperSet( const BitSet& rSet ) const;
+ BOOL Contains( USHORT nBit ) const;
+ BOOL IsSuperSet( const BitSet& rSet ) const;
+ BOOL operator==( const BitSet& rSet ) const;
+ BOOL operator==( USHORT nBit ) const;
+ BOOL operator!=( const BitSet& rSet ) const;
+ BOOL operator!=( USHORT nBit ) const;
+
+};
+//--------------------------------------------------------------------
+
+// returns TRUE if the set is empty
+
+
+
+inline BOOL BitSet::operator!() const
+{
+ return nCount == 0;
+}
+//--------------------------------------------------------------------
+
+// returns the number of bits in the bitset
+
+inline USHORT BitSet::Count() const
+{
+ return nCount;
+}
+//--------------------------------------------------------------------
+
+// creates the union of two bitset
+
+inline BitSet BitSet::operator|( const BitSet& rSet ) const
+{
+ return BitSet(*this) |= rSet;
+}
+//--------------------------------------------------------------------
+
+// creates the union of a bitset with a single bit
+
+inline BitSet BitSet::operator|( USHORT nBit ) const
+{
+ return BitSet(*this) |= nBit;
+}
+//--------------------------------------------------------------------
+
+// creates the asymetric difference
+
+inline BitSet BitSet::operator-( const BitSet& rSet ) const
+{
+ return BitSet();
+}
+//--------------------------------------------------------------------
+
+// creates the asymetric difference with a single bit
+
+
+inline BitSet BitSet::operator-( USHORT nId ) const
+{
+ return BitSet();
+}
+//--------------------------------------------------------------------
+
+// removes the bits contained in rSet
+
+inline BitSet& BitSet::operator-=( const BitSet& rSet )
+{
+ return *this;
+}
+//--------------------------------------------------------------------
+
+
+// creates the intersection with another bitset
+
+inline BitSet BitSet::operator&( const BitSet& rSet ) const
+{
+ return BitSet();
+}
+//--------------------------------------------------------------------
+
+// intersects with another bitset
+
+inline BitSet& BitSet::operator&=( const BitSet& rSet )
+{
+ return *this;
+}
+//--------------------------------------------------------------------
+
+// creates the symetric difference with another bitset
+
+inline BitSet BitSet::operator^( const BitSet& rSet ) const
+{
+ return BitSet();
+}
+//--------------------------------------------------------------------
+
+// creates the symetric difference with a single bit
+
+inline BitSet BitSet::operator^( USHORT nBit ) const
+{
+ return BitSet();
+}
+//--------------------------------------------------------------------
+
+// builds the symetric difference with another bitset
+
+inline BitSet& BitSet::operator^=( const BitSet& rSet )
+{
+ return *this;
+}
+//--------------------------------------------------------------------
+#ifdef BITSET_READY
+// builds the symetric difference with a single bit
+
+inline BitSet& BitSet::operator^=( USHORT nBit )
+{
+ // crash!!!
+ return BitSet();
+}
+#endif
+//--------------------------------------------------------------------
+
+// determines if the other bitset is a real superset
+
+inline BOOL BitSet::IsRealSubSet( const BitSet& rSet ) const
+{
+ return FALSE;
+}
+//--------------------------------------------------------------------
+
+// detsermines if the other bitset is a superset or equal
+
+inline BOOL BitSet::IsSubSet( const BitSet& rSet ) const
+{
+ return FALSE;
+}
+//--------------------------------------------------------------------
+
+// determines if the other bitset is a real subset
+
+inline BOOL BitSet::IsRealSuperSet( const BitSet& rSet ) const
+{
+ return FALSE;
+}
+
+//--------------------------------------------------------------------
+
+// determines if the other bitset is a subset or equal
+
+inline BOOL BitSet::IsSuperSet( const BitSet& rSet ) const
+{
+ return FALSE;
+}
+//--------------------------------------------------------------------
+
+// determines if the bit is the only one in the bitset
+
+inline BOOL BitSet::operator==( USHORT nBit ) const
+{
+ return FALSE;
+}
+//--------------------------------------------------------------------
+
+// determines if the bitsets aren't equal
+
+inline BOOL BitSet::operator!=( const BitSet& rSet ) const
+{
+ return !( *this == rSet );
+}
+//--------------------------------------------------------------------
+
+// determines if the bitset doesn't contain only this bit
+
+inline BOOL BitSet::operator!=( USHORT nBit ) const
+{
+ return !( *this == nBit );
+}
+//--------------------------------------------------------------------
+
+class IndexBitSet : BitSet
+{
+public:
+ USHORT GetFreeIndex();
+ void ReleaseIndex(USHORT i){*this-=i;}
+};
+
+
+#endif
+
diff --git a/sfx2/inc/configmgr.hxx b/sfx2/inc/configmgr.hxx
new file mode 100644
index 000000000000..fa1f38ee5f5f
--- /dev/null
+++ b/sfx2/inc/configmgr.hxx
@@ -0,0 +1,73 @@
+/*************************************************************************
+ *
+ * $RCSfile: configmgr.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:22 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _SFX_CONFIGMGR_HXX_
+#define _SFX_CONFIGMGR_HXX_
+
+namespace utl{
+ class ConfigManager;
+}
+
+/* -----------------------------05.09.00 16:42--------------------------------
+ appdata.cxx
+ ---------------------------------------------------------------------------*/
+utl::ConfigManager* GetUtlConfigManager();
+#endif
diff --git a/sfx2/inc/dinfedt.hxx b/sfx2/inc/dinfedt.hxx
new file mode 100644
index 000000000000..514462f5a681
--- /dev/null
+++ b/sfx2/inc/dinfedt.hxx
@@ -0,0 +1,120 @@
+/*************************************************************************
+ *
+ * $RCSfile: dinfedt.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:22 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SFX_DINFEDT_HXX
+#define _SFX_DINFEDT_HXX
+
+// include ---------------------------------------------------------------
+
+#ifndef _SV_EDIT_HXX //autogen wg. Edit
+#include <vcl/edit.hxx>
+#endif
+#ifndef _SV_DIALOG_HXX //autogen wg. ModalDialog
+#include <vcl/dialog.hxx>
+#endif
+#ifndef _SV_GROUP_HXX //autogen wg. GroupBox
+#include <vcl/group.hxx>
+#endif
+#ifndef _SV_BUTTON_HXX //autogen wg. OKButton
+#include <vcl/button.hxx>
+#endif
+
+// class InfoEdit_Impl ---------------------------------------------------
+
+class InfoEdit_Impl : public Edit
+{
+public:
+ InfoEdit_Impl( Window* pParent, const ResId& rResId ) :
+ Edit( pParent, rResId ) {}
+
+ virtual void KeyInput( const KeyEvent& rKEvent );
+};
+
+// class SfxDocInfoEditDlg -----------------------------------------------
+
+class SfxDocInfoEditDlg : public ModalDialog
+{
+private:
+ InfoEdit_Impl aInfo1ED;
+ InfoEdit_Impl aInfo2ED;
+ InfoEdit_Impl aInfo3ED;
+ InfoEdit_Impl aInfo4ED;
+ GroupBox aInfoGB;
+ OKButton aOkBT;
+ CancelButton aCancelBT;
+ HelpButton aHelpBtn;
+
+public:
+ SfxDocInfoEditDlg( Window* pParent );
+
+ void SetText1( const String &rStr) { aInfo1ED.SetText( rStr ); }
+ void SetText2( const String &rStr) { aInfo2ED.SetText( rStr ); }
+ void SetText3( const String &rStr) { aInfo3ED.SetText( rStr ); }
+ void SetText4( const String &rStr) { aInfo4ED.SetText( rStr ); }
+
+ String GetText1() const { return aInfo1ED.GetText(); }
+ String GetText2() const { return aInfo2ED.GetText(); }
+ String GetText3() const { return aInfo3ED.GetText(); }
+ String GetText4() const { return aInfo4ED.GetText(); }
+};
+
+
+#endif
+
diff --git a/sfx2/inc/docvor.hxx b/sfx2/inc/docvor.hxx
new file mode 100644
index 000000000000..2334628397cd
--- /dev/null
+++ b/sfx2/inc/docvor.hxx
@@ -0,0 +1,183 @@
+/*************************************************************************
+ *
+ * $RCSfile: docvor.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:22 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SFXDOCVOR_HXX
+#define _SFXDOCVOR_HXX
+
+
+#ifndef _DIALOG_HXX //autogen
+#include <vcl/dialog.hxx>
+#endif
+#ifndef _SVTREEBOX_HXX //autogen
+#include <svtools/svtreebx.hxx>
+#endif
+
+#include "objsh.hxx"
+#include "orgmgr.hxx"
+
+//=========================================================================
+
+class SfxDocumentTemplates;
+class Path;
+
+//=========================================================================
+#ifndef _SFX_HXX
+
+class SfxOrganizeDlg_Impl;
+
+class SfxOrganizeListBox_Impl: public SvTreeListBox
+{
+friend class SfxOrganizeDlg_Impl;
+
+ SfxOrganizeMgr *pMgr;
+ Image aOpenedFolderBmp;
+ Image aClosedFolderBmp;
+ Image aOpenedDocBmp;
+ Image aClosedDocBmp;
+ SfxOrganizeDlg_Impl *pDlg;
+ static BOOL bDropMoveOk;
+
+protected:
+ virtual BOOL EditingEntry( SvLBoxEntry* pEntry, Selection & );
+ virtual BOOL EditedEntry( SvLBoxEntry* pEntry, const String& rNewText );
+ virtual BOOL NotifyQueryDrop(SvLBoxEntry *);
+ virtual BOOL NotifyMoving(SvLBoxEntry *pSource,
+ SvLBoxEntry* pTarget,
+ SvLBoxEntry *&pNewParent, ULONG &);
+ virtual BOOL NotifyCopying(SvLBoxEntry *pSource,
+ SvLBoxEntry* pTarget,
+ SvLBoxEntry *&pNewParent, ULONG &);
+ virtual void RequestingChilds( SvLBoxEntry* pParent );
+ virtual long ExpandingHdl();
+#if SUPD < 306
+ virtual BOOL Drop( const DropEvent& rEvt );
+ virtual BOOL QueryDrop( const DropEvent& rEvt );
+#else
+ virtual BOOL Drop( DropEvent& rEvt );
+ virtual BOOL QueryDrop( DropEvent& rEvt );
+#endif
+ virtual DragDropMode NotifyBeginDrag(SvLBoxEntry *);
+ virtual BOOL Select( SvLBoxEntry* pEntry, BOOL bSelect=TRUE );
+ virtual void Command( const CommandEvent& rCEvt );
+
+public:
+ enum DataEnum {
+ VIEW_TEMPLATES,
+ VIEW_FILES
+ } eViewType;
+ SfxOrganizeListBox_Impl(SfxOrganizeDlg_Impl *pDlg,
+ Window *pParent, WinBits, DataEnum);
+
+ DataEnum GetViewType() const { return eViewType; }
+ void SetViewType(DataEnum eType) { eViewType = eType; }
+
+ void SetMgr(SfxOrganizeMgr *pM) { pMgr = pM; }
+ void Reset();
+ void SetBitmaps(const Image &rOFolderBitmap,
+ const Image &rCFolderBitmap,
+ const Image &rODocBitmap,
+ const Image &rCDocBitmap) {
+ aOpenedFolderBmp = rOFolderBitmap;
+ aClosedFolderBmp = rCFolderBitmap;
+ aOpenedDocBmp = rODocBitmap;
+ aClosedDocBmp = rCDocBitmap;
+ }
+ const Image &GetClosedBmp(USHORT nLevel) const;
+ const Image &GetOpenedBmp(USHORT nLevel) const;
+
+private:
+ BOOL IsStandard_Impl( SvLBoxEntry *) const;
+ BOOL MoveOrCopyTemplates(SvLBox *pSourceBox,
+ SvLBoxEntry *pSource,
+ SvLBoxEntry* pTarget,
+ SvLBoxEntry *&pNewParent,
+ ULONG &rIdx,
+ BOOL bCopy);
+ BOOL MoveOrCopyContents(SvLBox *pSourceBox,
+ SvLBoxEntry *pSource,
+ SvLBoxEntry* pTarget,
+ SvLBoxEntry *&pNewParent,
+ ULONG &rIdx,
+ BOOL bCopy);
+ inline USHORT GetDocLevel() const;
+ SfxObjectShellRef GetObjectShell(const Path &);
+ BOOL IsUniqName_Impl(const String &rText, SvLBoxEntry* pParent, SvLBoxEntry *pEntry = 0) const;
+ USHORT GetLevelCount_Impl(SvLBoxEntry* pParent) const;
+};
+
+#endif
+//=========================================================================
+
+class SfxTemplateOrganizeDlg : public ModalDialog
+{
+friend class SfxOrganizeListBox_Impl;
+
+ class SfxOrganizeDlg_Impl *pImp;
+
+public:
+ SfxTemplateOrganizeDlg(Window * pParent, SfxDocumentTemplates* = 0);
+ ~SfxTemplateOrganizeDlg();
+
+#define RET_EDIT_STYLE 100
+
+ virtual short Execute();
+};
+
+#endif
diff --git a/sfx2/inc/frmload.hxx b/sfx2/inc/frmload.hxx
new file mode 100644
index 000000000000..d65b5909707a
--- /dev/null
+++ b/sfx2/inc/frmload.hxx
@@ -0,0 +1,221 @@
+/*************************************************************************
+ *
+ * $RCSfile: frmload.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:23 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _SFX_FRMLOAD_HXX
+#define _SFX_FRMLOAD_HXX
+
+#ifndef _COM_SUN_STAR_LANG_XINITIALIZATION_HDL_
+#include <com/sun/star/lang/XInitialization.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_FRAME_XFRAMELOADER_HPP_
+#include <com/sun/star/frame/XFrameLoader.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_FRAME_XEXTENDEDFILTERDETECTION_HPP_
+#include <com/sun/star/frame/XExtendedFilterDetection.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_UNO_EXCEPTION_HPP_
+#include <com/sun/star/uno/Exception.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_UNO_REFERENCE_H_
+#include <com/sun/star/uno/Reference.h>
+#endif
+
+#ifndef _CPPUHELPER_IMPLBASE1_HXX_
+#include <cppuhelper/implbase1.hxx>
+#endif
+
+#ifndef _CPPUHELPER_IMPLBASE2_HXX_
+#include <cppuhelper/implbase2.hxx>
+#endif
+
+#ifndef _CPPUHELPER_IMPLBASE3_HXX_
+#include <cppuhelper/implbase3.hxx>
+#endif
+
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/lang/XSingleServiceFactory.hpp>
+#include <cppuhelper/factory.hxx>
+#include <tools/link.hxx>
+#include <tools/string.hxx>
+
+class SfxObjectFactory;
+class SfxFilterMatcher;
+class LoadEnvironment_Impl;
+namespace com
+{
+ namespace sun
+ {
+ namespace star
+ {
+ namespace uno
+ {
+ class Any;
+ }
+ namespace lang
+ {
+ class XMultiServiceFactory;
+ }
+ namespace frame
+ {
+ class XFrame;
+ }
+ namespace beans
+ {
+ struct PropertyValue;
+ }
+ }
+ }
+}
+
+#include "sfxuno.hxx"
+
+#define REFERENCE ::com::sun::star::uno::Reference
+#define SEQUENCE ::com::sun::star::uno::Sequence
+#define RUNTIME_EXCEPTION ::com::sun::star::uno::RuntimeException
+
+class SfxFilterDetect_Impl : public ::cppu::WeakImplHelper3< ::com::sun::star::frame::XExtendedFilterDetection,
+ ::com::sun::star::lang::XInitialization, ::com::sun::star::lang::XServiceInfo >
+{
+ String aFilterName;
+public:
+ SFX_DECL_XSERVICEINFO
+ SfxFilterDetect_Impl( const REFERENCE < ::com::sun::star::lang::XMultiServiceFactory >& xFactory );
+ virtual ::rtl::OUString SAL_CALL detect( const ::rtl::OUString& sURL, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArgumentlist ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments )
+ throw(::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
+};
+
+class SfxFrameLoader : public ::cppu::WeakImplHelper2< ::com::sun::star::frame::XFrameLoader, ::com::sun::star::lang::XInitialization >
+{
+ REFERENCE < ::com::sun::star::frame::XFrame > xFrame;
+ REFERENCE < ::com::sun::star::frame::XLoadEventListener > xListener;
+ LoadEnvironment_Impl* pLoader;
+ SfxFilterMatcher* pMatcher;
+ String aFilterName;
+
+ DECL_LINK( LoadDone_Impl, void* );
+
+public:
+ SfxFrameLoader( const REFERENCE < ::com::sun::star::lang::XMultiServiceFactory >& xFactory );
+ virtual ~SfxFrameLoader();
+
+ void SetFilterName( const ::rtl::OUString& rFilterName )
+ { aFilterName = rFilterName; }
+ String GetFilterName() const
+ { return aFilterName; }
+
+ // XLoader
+ virtual void SAL_CALL load( const REFERENCE < ::com::sun::star::frame::XFrame >& aFrame,
+ const ::rtl::OUString& aURL,
+ const SEQUENCE < ::com::sun::star::beans::PropertyValue >& aArgs,
+ const REFERENCE < ::com::sun::star::frame::XLoadEventListener >& aListener) throw( RUNTIME_EXCEPTION );
+ virtual void SAL_CALL cancel() throw( RUNTIME_EXCEPTION );
+
+ // XInitialization
+ virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments )
+ throw(::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
+
+protected:
+ virtual SfxObjectFactory& GetFactory()=0;
+};
+
+class SfxFrameLoader_Impl : public SfxFrameLoader, public ::com::sun::star::lang::XServiceInfo
+{
+public:
+ SFX_DECL_XINTERFACE
+ SFX_DECL_XSERVICEINFO
+ SfxFrameLoader_Impl( const REFERENCE < ::com::sun::star::lang::XMultiServiceFactory >& xFactory );
+protected:
+ virtual SfxObjectFactory& GetFactory();
+};
+
+class SfxFrameLoaderFactory : public ::cppu::WeakImplHelper2< ::com::sun::star::lang::XServiceInfo, ::com::sun::star::lang::XSingleServiceFactory >
+{
+private:
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xSMgr;
+ ::rtl::OUString aImplementationName;
+ ::cppu::ComponentInstantiation pCreateFunction;
+
+public:
+ SfxFrameLoaderFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rServiceManager,
+ ::cppu::ComponentInstantiation pCreateFunction_, const ::rtl::OUString& rImplementationName_ )
+ : xSMgr( rServiceManager )
+ , aImplementationName( rImplementationName_ )
+ , pCreateFunction( pCreateFunction_ )
+ {}
+
+ // XSingleServiceFactory
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL createInstance(void)
+ throw(::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL createInstanceWithArguments(const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any>& Arguments)
+ throw(::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
+
+ // XServiceInfo
+ ::rtl::OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException);
+ sal_Bool SAL_CALL supportsService(const ::rtl::OUString& ServiceName) throw(::com::sun::star::uno::RuntimeException);
+ ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw(::com::sun::star::uno::RuntimeException);
+};
+
+#endif
diff --git a/sfx2/inc/idpool.hxx b/sfx2/inc/idpool.hxx
new file mode 100644
index 000000000000..b24db8ed9436
--- /dev/null
+++ b/sfx2/inc/idpool.hxx
@@ -0,0 +1,97 @@
+/*************************************************************************
+ *
+ * $RCSfile: idpool.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:23 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SFXIDPOOL_HXX
+#define _SFXIDPOOL_HXX
+
+#include <limits.h> // USHRT_MAX
+#include "bitset.hxx"
+
+// class IdPool ----------------------------------------------------------
+
+class IdPool: private BitSet
+{
+private:
+ USHORT nNextFree;
+ USHORT nRange;
+ USHORT nOffset;
+public:
+ BOOL Lock( const BitSet& rLockSet );
+ BOOL IsLocked( USHORT nId ) const;
+ IdPool( USHORT nMin = 1, USHORT nMax = USHRT_MAX );
+ USHORT Get();
+ BOOL Put( USHORT nId );
+ BOOL Lock( const Range& rRange );
+ BOOL Lock( USHORT nId );
+
+};
+
+//------------------------------------------------------------------------
+
+// returns TRUE if the id is locked
+
+inline BOOL IdPool::IsLocked( USHORT nId ) const
+{
+ return ( this->Contains(nId-nOffset) );
+}
+
+
+#endif
+
diff --git a/sfx2/inc/imgmgr.hxx b/sfx2/inc/imgmgr.hxx
new file mode 100644
index 000000000000..fddeb020b2ce
--- /dev/null
+++ b/sfx2/inc/imgmgr.hxx
@@ -0,0 +1,155 @@
+/*************************************************************************
+ *
+ * $RCSfile: imgmgr.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:23 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SFXIMGMGR_HXX
+#define _SFXIMGMGR_HXX
+
+#include "cfgitem.hxx"
+
+#include <imgdef.hxx>
+
+
+#ifndef _GEN_HXX //autogen
+#include <tools/gen.hxx>
+#endif
+#ifndef _IMAGE_HXX //autogen
+#include <vcl/image.hxx>
+#endif
+
+class ToolBox;
+
+class SfxModule;
+class SfxToolBoxManager;
+class SfxBitmapList_Impl;
+class SfxToolBoxArr_Impl;
+
+class SfxImageManager: public SfxConfigItem
+{
+ SfxBitmapList_Impl* pUserDefList;
+ ImageList* pImageList;
+ ImageList* pUserImageList;
+ ImageList* pOffImageList;
+ SfxSymbolSet eSymbolSet;
+ BOOL bImageDefault;
+ SfxToolBoxArr_Impl* pToolBoxList;
+ USHORT nOutStyle;
+
+protected:
+
+ virtual int Load(SvStream&);
+ virtual BOOL Store(SvStream&);
+ virtual void UseDefault();
+ virtual String GetName() const;
+
+#if __PRIVATE
+ void MakeDefaultImageList_Impl();
+ void MakeLists_Impl( SfxSymbolSet );
+#endif
+
+public:
+ SfxImageManager();
+ ~SfxImageManager();
+
+ // Allgemeine Properties
+ void SetSymbolSet(SfxSymbolSet);
+ void SetOutStyle(USHORT);
+
+ SfxSymbolSet GetSymbolSet() const
+ { return eSymbolSet; }
+ USHORT GetOutStyle() const
+ { return nOutStyle; }
+ Size GetImageSize() const
+ {return pImageList->GetImageSize(); }
+ Color GetMaskColor() const;
+
+ // Image(s) aus einem Modul oder der OFA-Liste
+ Image GetImage(USHORT nId, SfxModule* pMod = 0) const;
+ void SetImages( ToolBox& rToolBox, SfxModule* );
+ void LockImage(USHORT nNewId, ToolBox *pBox);
+
+ // Zugriff auf die Userdef-Liste
+ void ReplaceImage(USHORT nId, Bitmap* pBmp=0);
+ void AddImage(USHORT nId, const Image& rImage);
+
+ // Umkonfigurieren
+ void StartCustomize();
+ void EndCustomize();
+ Image SeekImage(USHORT nId, SfxModule* pModule = 0) const;
+
+ // Toolbox-Registrierung/Abmeldung
+ void RegisterToolBox(ToolBox*, USHORT nFlags=0xFFFF );
+ void RegisterToolBox(ToolBox*, SfxModule*, USHORT nFlags=0xFFFF );
+ void ReleaseToolBox(ToolBox*);
+ void RegisterToolBoxManager(SfxToolBoxManager*, USHORT nFlags=0xFFFF );
+ void ReleaseToolBoxManager(SfxToolBoxManager*);
+
+#if __PRIVATE
+ void ExchangeItemImage_Impl(USHORT nId, const Image& rImage);
+ BOOL IsUserDef_Impl(USHORT nId) const;
+ const Bitmap& GetUserDefBitmap_Impl(USHORT nId) const;
+ Image GetAndLockImage_Impl(USHORT nId, SfxModule* pMod = 0);
+ Image GetImageFromModule_Impl( USHORT nId, SfxModule *pMod );
+#endif
+
+};
+
+#define SFX_IMAGEMANAGER() SfxGetpApp()->GetImageManager()
+
+#endif
diff --git a/sfx2/inc/inettbc.hxx b/sfx2/inc/inettbc.hxx
new file mode 100644
index 000000000000..446912b8c831
--- /dev/null
+++ b/sfx2/inc/inettbc.hxx
@@ -0,0 +1,163 @@
+/*************************************************************************
+ *
+ * $RCSfile: inettbc.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:23 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _SFX_INETTBC_HXX
+#define _SFX_INETTBC_HXX
+
+// includes *****************************************************************
+#include <tools/string.hxx>
+#include <tools/urlobj.hxx>
+
+#ifndef _COMBOBOX_HXX //autogen
+#include <vcl/combobox.hxx>
+#endif
+
+#define _SVSTDARR_STRINGSDTOR
+#include <svtools/svstdarr.hxx>
+
+struct SfxPickEntry_Impl;
+class SfxURLBox : public ComboBox
+{
+friend class SfxMatchContext_Impl;
+friend class SfxURLBox_Impl;
+ Link aOpenHdl;
+ String aBaseURL;
+ INetProtocol eSmartProtocol;
+ SfxMatchContext_Impl* pCtx;
+ SfxURLBox_Impl* pImp;
+ BOOL bAutoCompleteMode;
+ BOOL bOnlyDirectories;
+ BOOL bModified;
+ BOOL bTryAutoComplete: 1,
+ bCtrlClick: 1;
+
+ BOOL ProcessKey( const KeyCode& rCode );
+ void TryAutoComplete( BOOL bForward, BOOL bForce );
+ void UpdatePicklistForSmartProtocol_Impl();
+ DECL_LINK( AutoCompleteHdl_Impl, void* );
+
+protected:
+ virtual long Notify( NotifyEvent& rNEvt );
+ virtual void Select();
+ virtual void Modify();
+ virtual BOOL QueryDrop( DropEvent &rEvt );
+ virtual BOOL Drop( const DropEvent &rEvt );
+ virtual long PreNotify( NotifyEvent& rNEvt );
+
+public:
+ SfxURLBox( Window* pParent, INetProtocol eSmart = INET_PROT_NOT_VALID );
+
+ void OpenURL( SfxPickEntry_Impl* pEntry, const String& rName, BOOL nMod ) const;
+ void SetBaseURL( const String& rURL ) { aBaseURL = rURL; }
+ const String& GetBaseURL() const { return aBaseURL; }
+ void SetOpenHdl( const Link& rLink ) { aOpenHdl = rLink; }
+ const Link& GetOpenHdl() const { return aOpenHdl; }
+ void SetOnlyDirectories( BOOL bDir = TRUE );
+ INetProtocol GetSmartProtocol() const { return eSmartProtocol; }
+ void SetSmartProtocol( INetProtocol eProt );
+ BOOL IsCtrlOpen()
+ { return bCtrlClick; }
+};
+
+#if __PRIVATE
+
+#include "tbxctrl.hxx"
+class SfxURLToolBoxControl_Impl : public SfxToolBoxControl
+{
+private:
+ SfxStatusForwarder aURLForwarder;
+ SfxURLBox* GetURLBox() const;
+ DECL_LINK( OpenHdl, void* );
+ DECL_LINK( SelectHdl, void* );
+public:
+
+ SFX_DECL_TOOLBOX_CONTROL();
+
+ SfxURLToolBoxControl_Impl( USHORT nId,
+ ToolBox& rBox,
+ SfxBindings& rBindings );
+
+ virtual Window* CreateItemWindow( Window* pParent );
+ virtual void StateChanged( USHORT nSID, SfxItemState eState,
+ const SfxPoolItem* pState );
+};
+
+class SfxCancelToolBoxControl_Impl : public SfxToolBoxControl
+{
+public:
+
+ SFX_DECL_TOOLBOX_CONTROL();
+
+ SfxCancelToolBoxControl_Impl(
+ USHORT nId,
+ ToolBox& rBox,
+ SfxBindings& rBindings );
+
+ virtual SfxPopupWindowType GetPopupWindowType() const;
+ virtual SfxPopupWindow* CreatePopupWindow();
+ virtual void StateChanged( USHORT nSID, SfxItemState eState,
+ const SfxPoolItem* pState );
+};
+
+#endif
+
+#endif
+
diff --git a/sfx2/inc/mieclip.hxx b/sfx2/inc/mieclip.hxx
new file mode 100644
index 000000000000..435dc0fc1526
--- /dev/null
+++ b/sfx2/inc/mieclip.hxx
@@ -0,0 +1,130 @@
+/*************************************************************************
+ *
+ * $RCSfile: mieclip.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:23 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _MIECLIP_HXX
+#define _MIECLIP_HXX
+
+#ifndef _SOLAR_H
+#include <tools/solar.h>
+#endif
+
+#ifndef _STRING_HXX //autogen
+#include <tools/string.hxx>
+#endif
+
+class SvStream;
+class SotDataObject;
+class SvData;
+
+class MSE40HTMLClipFormatObj
+{
+ SvStream* pStrm;
+ String sBaseURL;
+
+public:
+ MSE40HTMLClipFormatObj() : pStrm(0) {}
+ ~MSE40HTMLClipFormatObj();
+
+ BOOL GetData( SotDataObject& );
+ BOOL GetData( SvData& );
+
+ const SvStream* GetStream() const { return pStrm; }
+ SvStream* GetStream() { return pStrm; }
+ const String& GetBaseURL() const { return sBaseURL; }
+};
+
+
+////////////////////////////////////////////////////////////////////////////////
+//
+/*
+ $Log: not supported by cvs2svn $
+ Revision 1.8 2000/09/17 16:47:07 willem.vandorp
+ OpenOffice header added.
+
+ Revision 1.7 2000/09/06 14:49:36 willem.vandorp
+ Header and footer replaced.
+
+ Revision 1.6 1999/12/16 19:32:37 er
+ #60614# add: GetData with SvData
+
+ Revision 1.5 1999/07/23 08:34:06 hr
+ #65293#: misplaced comment
+
+ Revision 1.4 1999/01/18 13:35:50 JP
+ Task #59398#: unnoetiges RegisterClipb... gegen IDS ausgetauscht
+
+
+ Rev 1.3 18 Jan 1999 14:35:50 JP
+ Task #59398#: unnoetiges RegisterClipb... gegen IDS ausgetauscht
+
+ Rev 1.2 22 Jun 1998 21:20:36 JP
+ SvDataObject gegen SorDataObject ausgetauscht
+
+ Rev 1.1 23 Feb 1998 17:05:14 TJ
+ include
+
+ Rev 1.0 18 Feb 1998 17:28:26 OK
+ NEW: MSE40HTMLClipFormatObj
+
+*/
+
+#endif //_MIECLIP_HXX
+
diff --git a/sfx2/inc/minfitem.hxx b/sfx2/inc/minfitem.hxx
new file mode 100644
index 000000000000..36c52eee0353
--- /dev/null
+++ b/sfx2/inc/minfitem.hxx
@@ -0,0 +1,115 @@
+/*************************************************************************
+ *
+ * $RCSfile: minfitem.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:23 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SFX_MINFITEM_HXX
+#define _SFX_MINFITEM_HXX
+
+
+#ifndef _STRING_HXX //autogen
+#include <tools/string.hxx>
+#endif
+#ifndef _SFXPOOLITEM_HXX //autogen
+#include <svtools/poolitem.hxx>
+#endif
+class BasicManager;
+
+class SfxMacroInfoItem: public SfxPoolItem
+{
+ const BasicManager* pBasicManager;
+ String aLibName;
+ String aModuleName;
+ String aMethodName;
+ String aCommentText;
+
+public:
+ TYPEINFO();
+ SfxMacroInfoItem( USHORT nWhich,
+ const BasicManager* pMgr,
+ const String &rLibName,
+ const String &rModuleName,
+ const String &rMethodName,
+ const String &rComment);
+
+ SfxMacroInfoItem( const SfxMacroInfoItem& );
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual int operator==( const SfxPoolItem& ) const;
+ String GetComment() const
+ { return aCommentText; }
+ void SetComment( const String& r )
+ { aCommentText = r; }
+ String GetMethod() const
+ { return aMethodName; }
+ void SetMethod( const String& r )
+ { aMethodName = r; }
+ String GetModule() const
+ { return aModuleName; }
+ void SetModule( const String& r )
+ { aModuleName = r; }
+ String GetLib() const
+ { return aLibName; }
+ void SetLib( const String& r )
+ { aLibName = r; }
+ const BasicManager* GetBasicManager() const
+ { return pBasicManager; }
+ String GetQualifiedName() const;
+};
+
+#endif
diff --git a/sfx2/inc/msgnodei.hxx b/sfx2/inc/msgnodei.hxx
new file mode 100644
index 000000000000..6912eb5b9a7e
--- /dev/null
+++ b/sfx2/inc/msgnodei.hxx
@@ -0,0 +1,269 @@
+/*************************************************************************
+ *
+ * $RCSfile: msgnodei.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:23 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _MSGNODEI_HXX
+#define _MSGNODEI_HXX
+
+
+#ifndef _SFXENUMITEM_HXX //autogen
+#include <svtools/eitem.hxx>
+#endif
+#ifndef _STRING_HXX //autogen
+#include <tools/string.hxx>
+#endif
+#ifndef _SFXPOOLITEM_HXX //autogen
+#include <svtools/poolitem.hxx>
+#endif
+#ifndef _LIST_HXX //autogen
+#include <tools/list.hxx>
+#endif
+struct SfxMsgAttachFile {
+ String aFile;
+ String aName;
+
+ int operator==( const SfxMsgAttachFile& rRec ) const
+ {
+ if( aName == rRec.aName && aFile == rRec.aFile )
+ return TRUE;
+ return FALSE;
+ }
+
+ SfxMsgAttachFile( const String& rFile, const String& rName)
+ : aName( rName ), aFile( rFile ) {}
+
+ SfxMsgAttachFile( const SfxMsgAttachFile& rRec )
+ : aName( rRec.aName), aFile( rRec.aFile ) {}
+};
+
+enum SfxMsgReceiverRole
+{
+ MSG_RECEIVER_TO = 0,
+ MSG_RECEIVER_CC,
+ MSG_RECEIVER_BCC,
+ MSG_RECEIVER_NEWSGROUP
+};
+
+struct SfxMsgReceiver {
+ String aName;
+ SfxMsgReceiverRole eRole;
+
+ int operator==( const SfxMsgReceiver& rRec ) const
+ {
+ if( aName == rRec.aName && eRole == rRec.eRole )
+ return TRUE;
+ return FALSE;
+ }
+
+ SfxMsgReceiver( const String& rName, SfxMsgReceiverRole _eRole )
+ : aName( rName ), eRole( _eRole ) {}
+
+ SfxMsgReceiver( const SfxMsgReceiver& rRec )
+ : aName( rRec.aName), eRole( rRec.eRole ) {}
+};
+
+// ------------------------------------------------------------------------
+
+class SfxMsgReceiverList_Impl : public List
+{
+ ULONG nRef;
+ ~SfxMsgReceiverList_Impl();
+ SfxMsgReceiverList_Impl& operator=( const SfxMsgReceiverList_Impl&); //n.i.
+public:
+ SfxMsgReceiverList_Impl();
+ SfxMsgReceiverList_Impl(const SfxMsgReceiverList_Impl&);
+
+ void Load( SvStream& );
+ void Store( SvStream& ) const;
+ void IncRef() { nRef++; }
+ void DecRef() { nRef--; if( !nRef ) delete this; }
+ ULONG GetRefCount() const { return nRef; }
+ int operator==( const SfxMsgReceiverList_Impl& ) const;
+};
+
+class SfxMsgReceiverListItem : public SfxPoolItem
+{
+ void Disconnect();
+protected:
+ SfxMsgReceiverList_Impl* pImp;
+public:
+ TYPEINFO();
+
+ SfxMsgReceiverListItem();
+ SfxMsgReceiverListItem( USHORT nWhich );
+ SfxMsgReceiverListItem( USHORT nWhich, SvStream& rStream );
+ SfxMsgReceiverListItem( const SfxMsgReceiverListItem& rItem );
+ ~SfxMsgReceiverListItem();
+
+#if SUPD<355
+ virtual int IsPoolable() const;
+#endif
+
+ virtual int operator==( const SfxPoolItem& ) const;
+
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ XubString &rText ) const;
+
+ USHORT Count() const;
+ SfxMsgReceiver* GetObject( USHORT nPos );
+ void Remove( USHORT nPos );
+ void Add( const SfxMsgReceiver& );
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxPoolItem* Create( SvStream &, USHORT nVersion ) const;
+ virtual SvStream& Store( SvStream &, USHORT nItemVersion ) const;
+};
+
+
+// ------------------------------------------------------------------------
+
+class SfxMsgAttachFileList_Impl : public List
+{
+ ULONG nRef;
+ ~SfxMsgAttachFileList_Impl();
+ SfxMsgAttachFileList_Impl& operator=( const SfxMsgAttachFileList_Impl&); //n.i.
+
+public:
+ SfxMsgAttachFileList_Impl();
+ SfxMsgAttachFileList_Impl(const SfxMsgAttachFileList_Impl&);
+
+ int operator==( const SfxMsgAttachFileList_Impl& rRec ) const;
+ SfxMsgAttachFile* GetReceiver(ULONG nPos) { return (SfxMsgAttachFile*)List::GetObject(nPos); }
+ void Load( SvStream& );
+ void Store( SvStream& ) const;
+ void IncRef() { nRef++; }
+ void DecRef() { nRef--; if( !nRef ) delete this; }
+ ULONG GetRefCount() const { return nRef; }
+};
+
+class SfxMsgAttachFileListItem : public SfxPoolItem
+{
+protected:
+ SfxMsgAttachFileList_Impl* pImp;
+ void Disconnect();
+public:
+ TYPEINFO();
+
+ SfxMsgAttachFileListItem();
+ SfxMsgAttachFileListItem( USHORT nWhich );
+ SfxMsgAttachFileListItem( USHORT nWhich, SvStream& rStream );
+ SfxMsgAttachFileListItem( const SfxMsgAttachFileListItem& rItem );
+ ~SfxMsgAttachFileListItem();
+
+#if SUPD<355
+ virtual int IsPoolable() const;
+#endif
+
+ virtual int operator==( const SfxPoolItem& ) const;
+
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ XubString &rText ) const;
+
+ USHORT Count() const;
+ SfxMsgAttachFile* GetObject( USHORT nPos );
+ void Remove( USHORT nPos );
+ void Add( const SfxMsgAttachFile& );
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxPoolItem* Create( SvStream &, USHORT nVersion ) const;
+ virtual SvStream& Store( SvStream &, USHORT nItemVersion ) const;
+};
+
+
+//=========================================================================
+
+enum SfxMsgPriority
+{
+ MSG_PRIORITY_LOW = 0,
+ MSG_PRIORITY_NORMAL,
+ MSG_PRIORITY_URGENT
+};
+#define SFXMSGPRIORITYCOUNT 3
+
+class SfxMsgPriorityItem : public SfxEnumItem
+{
+public:
+ TYPEINFO();
+
+ SfxMsgPriorityItem( USHORT nWhich, SfxMsgPriority = MSG_PRIORITY_NORMAL);
+
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool=0 ) const;
+ virtual SfxPoolItem* Create( SvStream&, USHORT ) const;
+ virtual SvStream& Store( SvStream&, USHORT ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePresentation,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresentationMetric,
+ String &rText ) const;
+ virtual USHORT GetValueCount() const;
+ virtual String GetValueTextByPos( USHORT nPos ) const;
+
+ inline SfxMsgPriorityItem& operator=(const SfxMsgPriorityItem& rPrio)
+ {
+ SetValue( rPrio.GetValue() );
+ return *this;
+ }
+};
+
+
+#endif
diff --git a/sfx2/inc/orgmgr.hxx b/sfx2/inc/orgmgr.hxx
new file mode 100644
index 000000000000..697f5394a652
--- /dev/null
+++ b/sfx2/inc/orgmgr.hxx
@@ -0,0 +1,133 @@
+/*************************************************************************
+ *
+ * $RCSfile: orgmgr.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:24 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SFX_ORGMGR_HXX
+#define _SFX_ORGMGR_HXX
+
+#ifndef _SVARRAY_HXX //autogen
+#include <svtools/svarray.hxx>
+#endif
+
+class SfxDocumentTemplates;
+class SfxOrganizeListBox_Impl;
+class SfxObjectShell;
+struct _FileListEntry;
+
+//=========================================================================
+
+SV_DECL_PTRARR_SORT(_SfxObjectList, _FileListEntry*, 1, 4)
+
+class SfxObjectList: public _SfxObjectList
+{
+public:
+ SfxObjectList();
+ ~SfxObjectList();
+
+ const String& GetBaseName( USHORT nId ) const;
+ const String& GetFileName( USHORT nId ) const;
+};
+
+//=========================================================================
+
+class SfxOrganizeMgr
+{
+private:
+ SfxObjectList* pDocList;
+ SfxDocumentTemplates* pTemplates;
+ SfxOrganizeListBox_Impl* pLeftBox;
+ SfxOrganizeListBox_Impl* pRightBox;
+ BOOL bDeleteTemplates :1;
+ BOOL bModified :1;
+
+ SfxOrganizeListBox_Impl* GetOther( SfxOrganizeListBox_Impl* );
+
+public:
+ SfxOrganizeMgr( SfxOrganizeListBox_Impl* pLeft,
+ SfxOrganizeListBox_Impl* pRight,
+ SfxDocumentTemplates* pTempl = NULL );
+ ~SfxOrganizeMgr();
+
+ BOOL Copy( USHORT nTargetRegion, USHORT nTargetIdx, USHORT nSourceRegion, USHORT nSourceIdx );
+ BOOL Move( USHORT nTargetRegion, USHORT nTargetIdx, USHORT nSourceRegion, USHORT nSourceIdx );
+ BOOL Delete( SfxOrganizeListBox_Impl* pCaller, USHORT nRegion, USHORT nIdx );
+ BOOL InsertDir( SfxOrganizeListBox_Impl* pCaller, const String& rName, USHORT nRegion );
+ BOOL SetName( const String& rName, USHORT nRegion, USHORT nIdx = USHRT_MAX );
+ BOOL CopyTo( USHORT nRegion, USHORT nIdx, const String& rName ) const;
+ BOOL CopyFrom( SfxOrganizeListBox_Impl* pCaller, USHORT nRegion, USHORT nIdx, String& rName );
+
+ BOOL Rescan();
+ BOOL InsertFile( SfxOrganizeListBox_Impl* pCaller, const String& rFileName );
+
+ BOOL IsModified() const { return bModified ? TRUE : FALSE; }
+
+ const SfxDocumentTemplates* GetTemplates() const { return pTemplates; }
+ SfxObjectList& GetObjectList() { return *pDocList; }
+ const SfxObjectList& GetObjectList() const { return *pDocList; }
+
+ SfxObjectShellRef CreateObjectShell( USHORT nIdx );
+ SfxObjectShellRef CreateObjectShell( USHORT nRegion, USHORT nIdx );
+ BOOL DeleteObjectShell( USHORT );
+ BOOL DeleteObjectShell( USHORT, USHORT );
+ void SaveAll( Window* pParent );
+};
+
+#endif // #ifndef _SFX_ORGMGR_HXX
+
+
diff --git a/sfx2/inc/progind.hxx b/sfx2/inc/progind.hxx
new file mode 100644
index 000000000000..fe08683a68a9
--- /dev/null
+++ b/sfx2/inc/progind.hxx
@@ -0,0 +1,127 @@
+/*************************************************************************
+ *
+ * $RCSfile: progind.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:24 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SFX_PROGIND_HXX
+#define _SFX_PROGIND_HXX
+
+#ifndef _COM_SUN_STAR_TASK_XSTATUSINDICATORFACTORY_HPP_
+#include <com/sun/star/task/XStatusIndicatorFactory.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TASK_XSTATUSINDICATORSUPPLIER_HPP_
+#include <com/sun/star/task/XStatusIndicatorSupplier.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TASK_XSTATUSINDICATOR_HPP_
+#include <com/sun/star/task/XStatusIndicator.hpp>
+#endif
+#include <vcl/window.hxx>
+#include <vcl/fixed.hxx>
+#include <svtools/prgsbar.hxx>
+#ifndef _CPPUHELPER_WEAK_HXX_
+#include <cppuhelper/weak.hxx>
+#endif
+#ifndef _CPPUHELPER_IMPLBASE1_HXX_
+#include <cppuhelper/implbase1.hxx>
+#endif
+
+#include "sfxuno.hxx"
+
+class SfxStatusInd_Impl : public cppu::WeakImplHelper1< ::com::sun::star::task::XStatusIndicator >
+{
+ long nValue;
+ long nRange;
+ sal_uInt16 nProgressCount;
+
+friend class SfxPopupStatusIndicator;
+ SfxPopupStatusIndicator* pWindow;
+
+public:
+
+ SfxStatusInd_Impl();
+
+ // XStatusIndicator
+ virtual void SAL_CALL start(const ::rtl::OUString& aText, sal_Int32 nRange) throw ( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL end(void) throw ( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL setText(const ::rtl::OUString& aText) throw ( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL setValue(sal_Int32 nValue) throw ( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL reset() throw ( ::com::sun::star::uno::RuntimeException );
+};
+
+class SfxPopupStatusIndicator : public Window
+{
+friend class SfxStatusInd_Impl;
+ FixedText aTextBar;
+ ProgressBar aProgressBar;
+ SfxStatusInd_Impl* pInterface;
+
+public:
+ SfxPopupStatusIndicator( Window* pParent );
+ ~SfxPopupStatusIndicator();
+
+ virtual void MakeVisible( sal_Bool bVisible );
+ virtual void Resize();
+ virtual void Paint( const Rectangle& rRect );
+ Size CalcWindowSizePixel();
+ ::com::sun::star::task::XStatusIndicator* GetInterface()
+ { return pInterface; }
+};
+
+
+#endif
+
diff --git a/sfx2/inc/resmgr.hxx b/sfx2/inc/resmgr.hxx
new file mode 100644
index 000000000000..5f6cfe401130
--- /dev/null
+++ b/sfx2/inc/resmgr.hxx
@@ -0,0 +1,109 @@
+/*************************************************************************
+ *
+ * $RCSfile: resmgr.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:24 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SFX_RESMGR_HXX
+#define _SFX_RESMGR_HXX
+
+#include "app.hxx"
+#include "minarray.hxx"
+
+class SfxMessageDescription;
+class SfxMessageTable;
+class Bitmap;
+
+DECL_PTRARRAY(SfxResMgrArr, ResMgr *, 1, 1);
+
+// INCLUDE ---------------------------------------------------------------
+
+class SfxResourceManager
+{
+ SfxResMgrArr aResMgrArr;
+ SfxResMgrArr aResMgrBmpArr;
+ USHORT nEnterCount;
+ SfxMessageTable* pMessageTable;
+
+private:
+ void ClearMsgTable_Impl();
+ SfxMessageDescription* MakeDesc_Impl(USHORT);
+
+public:
+ SfxResourceManager();
+ ~SfxResourceManager();
+
+ USHORT RegisterResource( const char *pFileName);
+ void ReleaseResource( USHORT nRegisterId );
+
+ USHORT RegisterBitmap(const char *pMono, const char *pColor);
+
+ USHORT RegisterBitmap( const char *pSingleFile );
+ void ReleaseBitmap( USHORT nRegisterId );
+
+ Bitmap GetAllBitmap( USHORT nBmpsPerRow );
+
+ void Enter();
+ void Leave();
+ SfxMessageDescription* CreateDescription( USHORT nId );
+};
+
+
+#define SFX_RESMANAGER() SFX_APP()->GetResourceManager()
+
+#endif
+
diff --git a/sfx2/inc/sfxbasic.hxx b/sfx2/inc/sfxbasic.hxx
new file mode 100644
index 000000000000..4ec7d082a2a3
--- /dev/null
+++ b/sfx2/inc/sfxbasic.hxx
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * $RCSfile: sfxbasic.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:24 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SFXBASIC_HXX
+#define _SFXBASIC_HXX
+
+class BasicManager;
+class SbMethod;
+
+//------------------------------------------------------------------
+
+SbMethod* SfxQueryMacro( BasicManager* pMgr, const String& rMacro );
+
+ErrCode SfxCallMacro( BasicManager* pMgr, const String& rMacro,
+ SbxArray *pArgs = 0, SbxValue *pRet = 0 );
+
+
+#endif
+
diff --git a/sfx2/inc/sfxhelp.hxx b/sfx2/inc/sfxhelp.hxx
new file mode 100644
index 000000000000..f8ebb69422d0
--- /dev/null
+++ b/sfx2/inc/sfxhelp.hxx
@@ -0,0 +1,311 @@
+/*************************************************************************
+ *
+ * $RCSfile: sfxhelp.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:24 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SFX_HELP_HXX
+#define _SFX_HELP_HXX
+
+#ifndef _BUTTON_HXX //autogen
+#include <vcl/button.hxx>
+#endif
+#ifndef _HELP_HXX //autogen
+#include <vcl/help.hxx>
+#endif
+#include <childwin.hxx>
+#include <dockwin.hxx>
+
+#include <docfac.hxx>
+#include <viewfac.hxx>
+#include <objsh.hxx>
+#include <viewsh.hxx>
+
+class HelpPI;
+class SHelpInfo;
+struct SpecialLinkInfo;
+class Library;
+class SfxPrinter;
+class DirEntry;
+class SvStringsDtor;
+
+struct HelpFileInfo
+{
+ String aFileName;
+ String aTitle;
+};
+
+
+class SfxHelpPIWrapper : public SfxChildWindow
+{
+public:
+ SfxHelpPIWrapper(Window *pParent, USHORT nId,
+ SfxBindings *pBindings, SfxChildWinInfo *pInfo);
+
+ SFX_DECL_CHILDWINDOW(SfxHelpPIWrapper);
+
+ virtual BOOL QueryClose();
+};
+
+class SfxHelpTipsWrapper : public SfxChildWindow
+{
+public:
+ SfxHelpTipsWrapper(Window *pParent, USHORT nId,
+ SfxBindings *pBindings, SfxChildWinInfo *pInfo);
+
+ SFX_DECL_CHILDWINDOW(SfxHelpTipsWrapper);
+};
+
+
+
+class SfxHelpTipsWindow : public SfxDockingWindow
+{
+private:
+ HelpPI* mpHelpPI;
+ PushButton maCloseButton;
+ Window maTipWindow;
+ CheckBox maCheckBox;
+
+protected:
+ DECL_LINK( CloseButtonHdl, Button* );
+ DECL_LINK( ShowTip, void* );
+ DECL_LINK( CheckBoxHdl, CheckBox* );
+
+public:
+ SfxHelpTipsWindow( SfxBindings* pBindimgs, SfxChildWindow* pChildWin, Window* pParent );
+ ~SfxHelpTipsWindow();
+
+ virtual void FillInfo( SfxChildWinInfo& ) const;
+ virtual void Resize();
+};
+
+
+
+class SfxHelpPI : public SfxDockingWindow
+{
+ HelpPI* pHelpPI;
+ Window* pInnerWindow;
+
+ Timer aTopicJustRequestedTimer;
+
+ ULONG nTip;
+ CheckBox aTipBox;
+
+ BOOL bInShowMe;
+
+protected:
+ virtual void Resize();
+ virtual void Paint( const Rectangle& );
+
+public:
+ SfxHelpPI( SfxBindings* pBindimgs, SfxChildWindow* pChildWin,
+ Window* pParent, USHORT nScale );
+ ~SfxHelpPI();
+
+ void LoadTopic( const String& rFileName, ULONG nId );
+ void LoadTopic( ULONG nId );
+ void LoadTopic( const String& rKeyword );
+ void ResetTopic();
+
+ BOOL Close();
+
+ BOOL IsConstructed() const { return ( pHelpPI != 0 ); }
+ String GetExtraInfo() const;
+
+ HelpPI* GetHelpPI() const { return pHelpPI; }
+
+ virtual void FillInfo( SfxChildWinInfo& ) const;
+
+ void SetTip( ULONG nId );
+ ULONG GetTip() const { return nTip; }
+ void SetTipText( const String& rText );
+
+ BOOL IsInShowMe() const { return bInShowMe; }
+
+ // Nach F1 fuer einige ms nicht aufgrund von FocusChanged ein anderes Topic laden...
+ BOOL IsTopicJustRequested() const { return aTopicJustRequestedTimer.IsActive(); }
+ void SetTopicJustRequested( BOOL bOn ) { if( bOn )
+ aTopicJustRequestedTimer.Start();
+ else
+ aTopicJustRequestedTimer.Stop(); }
+
+#if __PRIVATE
+ DECL_LINK( TopicChangedHdl_Impl, void* );
+ DECL_LINK( SpecialLinkHdl, SpecialLinkInfo* );
+ DECL_LINK( TipBoxHdl, CheckBox* );
+ DECL_LINK( PIToolboxHdl, ToolBox* );
+#endif
+};
+
+
+
+class SfxHelp
+{
+public:
+ static BOOL ShowHelp( ULONG nId, BOOL bShowInHelpAgent, const char* pFileName = 0, BOOL bQuiet = FALSE );
+ static BOOL ShowHelp( const String& rKeyword, BOOL bShowInHelpAgent, const char* pFileName = 0 );
+ static void ShowHint( ULONG nId );
+ static void SetCustomHelpFile( const String& rName );
+ static USHORT GetHelpFileInfoCount();
+ static HelpFileInfo* GetHelpFileInfo( USHORT n );
+};
+
+USHORT ImplSetLanguageGroup( Config& rConfig, const String& rGroupName, BOOL bSearchLanguage );
+
+
+
+#if __PRIVATE
+
+SV_DECL_VARARR_SORT( SortedULONGs, ULONG, 0, 4 );
+//SV_DECL_PTRARR_DEL( HelpTextCaches, HelpTextCache*, 0, 4 );
+
+
+class SfxHelp_Impl : public Help, public SfxListener
+{
+ friend class SfxHelp;
+
+ String aCustomHelpFile;
+ String aCurHelpFile; // Kurzer Name ohne Pfad
+
+ SHelpInfo* pHelpInfo; // Fr GetHelpText()
+
+// HelpTextCache* pHelpCache;
+// HelpTextCaches aHelpCaches;
+
+ Timer aDialogDetector;
+
+ SortedULONGs* pPIStarterList;
+
+ ULONG nLastDialog;
+ BOOL bForcedFloatingPI;
+
+ List* pHelpFileInfos;
+
+private:
+ BOOL ImplStart( ULONG nHelpId, BOOL bCheckHelpFile, BOOL bChangeHelpFile, BOOL bHelpAgent );
+ virtual BOOL Start( ULONG nHelpId );
+#ifndef ENABLEUNICODE
+ virtual BOOL Start( const String& rKeyWord );
+#else
+ virtual BOOL Start( const UniString& rKeyWord );
+#endif
+ void SetCurrentHelpFile( ULONG nId );
+ String GetCurrentHelpFile() const { return aCurHelpFile; }
+
+ virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
+
+
+ inline SortedULONGs* GetPIStarterList();
+ void CreatePIStarterList();
+
+
+ DECL_LINK( DialogDetectHdl, Timer* );
+
+protected:
+ void AssertValidHelpDocInfo();
+
+public:
+
+ SfxHelp_Impl();
+ ~SfxHelp_Impl();
+
+ static String GetHelpPath();
+ static String GetHelpFileName( ULONG nId );
+ BOOL CheckHelpFile( BOOL bPrompt ) const;
+ static BOOL CheckHelpFile( const String& rFilename, BOOL bPrompt );
+
+ static Window* SearchFocusWindowParent();
+ void CheckPIPosition();
+
+ void SetHelpFile( const String &rHelpFileName, BOOL bAdjustExt = TRUE );
+ const String& GetCurHelpFile() const { return aCurHelpFile; }
+
+ XubString GetHelpText( ULONG nHelpId );
+
+ void GetHelpURLs( const String& rRootURL, SvStringsDtor& rLst );
+ void GetBookmarks( SvStringsDtor& rLst );
+ void AddBookmark( const String& rName, const String& rURL );
+ void RemoveBookmark( const String& rName );
+ void RenameBookmark( const String& rOldTitle, const String& rNewTitle );
+
+ void SlotExecutedOrFocusChanged( ULONG nId, BOOL bSlot, BOOL bAutoStart );
+ void EnableTip( ULONG nTip, BOOL bEnable );
+
+ void ResetPIStarterList();
+
+ void HelpAgentClosed();
+
+ void StartHelpPI( ULONG nHelpId, BOOL bSlot, BOOL bTip = FALSE );
+
+ USHORT GetHelpFileInfoCount();
+ HelpFileInfo* GetHelpFileInfo( USHORT n );
+
+ static String GetConfigDir( BOOL bGetSharedConfig );
+ static String GetHelpAgentConfig();
+};
+
+inline SortedULONGs* SfxHelp_Impl::GetPIStarterList()
+{
+ if ( !pPIStarterList )
+ CreatePIStarterList();
+ return pPIStarterList;
+}
+
+#endif // _PRIVATE
+
+#endif // #ifndef _SFX_HELP_HXX
+
diff --git a/sfx2/inc/sfxresid.hxx b/sfx2/inc/sfxresid.hxx
new file mode 100644
index 000000000000..f362dc87cdde
--- /dev/null
+++ b/sfx2/inc/sfxresid.hxx
@@ -0,0 +1,92 @@
+/*************************************************************************
+ *
+ * $RCSfile: sfxresid.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:24 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SFX_SFXRESID_HXX
+#define _SFX_SFXRESID_HXX
+
+#ifndef _STRING_HXX
+#include <tools/string.hxx>
+#endif
+
+#ifndef _RESID_HXX //autogen
+#include <vcl/resid.hxx>
+#endif
+
+class SfxResId: public ResId
+{
+public:
+ SfxResId( USHORT nId );
+};
+
+//============================================================================
+class SfxSimpleResId
+{
+ String m_sText;
+
+public:
+ SfxSimpleResId(USHORT nID);
+
+ String getText() const { return m_sText; }
+
+ operator String() const { return getText(); }
+};
+
+
+#endif
diff --git a/sfx2/inc/stbitem.hxx b/sfx2/inc/stbitem.hxx
new file mode 100644
index 000000000000..f0e1c60298bb
--- /dev/null
+++ b/sfx2/inc/stbitem.hxx
@@ -0,0 +1,143 @@
+/*************************************************************************
+ *
+ * $RCSfile: stbitem.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:24 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SFXSTBITEM_HXX
+#define _SFXSTBITEM_HXX
+
+#ifndef _SFXCTRLITEM_HXX
+#include "ctrlitem.hxx"
+#endif
+
+class SvStream;
+class SvStream;
+class SfxModule;
+
+//------------------------------------------------------------------
+
+class StatusBar;
+class SfxStatusBarControl;
+class SfxBindings;
+
+typedef SfxStatusBarControl* (*SfxStatusBarControlCtor)( USHORT nId, StatusBar &rStb, SfxBindings & );
+
+struct SfxStbCtrlFactory
+{
+ SfxStatusBarControlCtor pCtor;
+ TypeId nTypeId;
+ USHORT nSlotId;
+
+ SfxStbCtrlFactory( SfxStatusBarControlCtor pTheCtor,
+ TypeId nTheTypeId, USHORT nTheSlotId ):
+ pCtor(pTheCtor),
+ nTypeId(nTheTypeId),
+ nSlotId(nTheSlotId)
+ {}
+};
+
+//------------------------------------------------------------------
+
+class CommandEvent;
+class MouseEvent;
+class UserDrawEvent;
+
+class SfxStatusBarControl: public SfxControllerItem
+{
+friend class SfxStatusBar_Impl;
+
+ StatusBar* pBar;
+
+protected:
+ virtual void StateChanged( USHORT nSID, SfxItemState eState,
+ const SfxPoolItem* pState );
+ virtual void Click();
+ virtual void DoubleClick();
+ virtual void Command( const CommandEvent& rCEvt );
+ virtual BOOL MouseButtonDown( const MouseEvent & );
+ virtual BOOL MouseMove( const MouseEvent & );
+ virtual BOOL MouseButtonUp( const MouseEvent & );
+ virtual void Paint( const UserDrawEvent &rUDEvt );
+
+public:
+ SfxStatusBarControl( USHORT nId, StatusBar& rBar, SfxBindings & );
+ virtual ~SfxStatusBarControl();
+
+ StatusBar& GetStatusBar() const { return *pBar; }
+ void CaptureMouse();
+ void ReleaseMouse();
+
+ static SfxStatusBarControl* CreateControl( USHORT nId, StatusBar *pBar, SfxBindings&, SfxModule* );
+};
+
+//------------------------------------------------------------------
+
+#define SFX_DECL_STATUSBAR_CONTROL() \
+ static SfxStatusBarControl* CreateImpl( USHORT nId, StatusBar &rStb, SfxBindings &rBindings ); \
+ static void RegisterControl(USHORT nSlotId = 0, SfxModule *pMod=NULL)
+
+#define SFX_IMPL_STATUSBAR_CONTROL(Class, nItemClass) \
+ SfxStatusBarControl* __EXPORT Class::CreateImpl( USHORT nId, StatusBar &rStb, SfxBindings &rBindings ) \
+ { return new Class(nId, rStb, rBindings); } \
+ void Class::RegisterControl(USHORT nSlotId, SfxModule *pMod) \
+ { SFX_APP()->RegisterStatusBarControl( pMod, new SfxStbCtrlFactory( \
+ Class::CreateImpl, TYPE(nItemClass), nSlotId ) ); }
+
+
+#endif
+
diff --git a/sfx2/inc/tplpitem.hxx b/sfx2/inc/tplpitem.hxx
new file mode 100644
index 000000000000..1595e3b597f6
--- /dev/null
+++ b/sfx2/inc/tplpitem.hxx
@@ -0,0 +1,92 @@
+/*************************************************************************
+ *
+ * $RCSfile: tplpitem.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:25 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SFX_TPLPITEM_HXX
+#define _SFX_TPLPITEM_HXX
+
+
+#ifndef _STRING_HXX //autogen
+#include <tools/string.hxx>
+#endif
+#ifndef _RTTI_HXX //autogen
+#include <tools/rtti.hxx>
+#endif
+#ifndef _SFXFLAGITEM_HXX //autogen
+#include <svtools/flagitem.hxx>
+#endif
+
+class SfxTemplateItem: public SfxFlagItem
+{
+ String aStyle;
+public:
+ TYPEINFO();
+ SfxTemplateItem( USHORT nWhich,
+ const String &rStyle,
+ USHORT nMask = 0xffff );
+ SfxTemplateItem( const SfxTemplateItem& );
+
+ const String& GetStyleName() const { return aStyle; }
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual BYTE GetFlagCount() const;
+};
+
+#endif
diff --git a/sfx2/inc/viewfac.hxx b/sfx2/inc/viewfac.hxx
new file mode 100644
index 000000000000..e5234f1330b6
--- /dev/null
+++ b/sfx2/inc/viewfac.hxx
@@ -0,0 +1,102 @@
+/*************************************************************************
+ *
+ * $RCSfile: viewfac.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:25 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _VIEWFAC_HXX
+#define _VIEWFAC_HXX
+
+
+#ifndef _STRING_HXX //autogen
+#include <tools/string.hxx>
+#endif
+#ifndef _RESID_HXX //autogen
+#include <vcl/resid.hxx>
+#endif
+
+class SfxViewFrame;
+class SfxViewShell;
+class Window;
+
+typedef SfxViewShell* (*SfxViewCtor)(SfxViewFrame*, SfxViewShell*);
+typedef void (*SfxViewInit)();
+
+// CLASS -----------------------------------------------------------------
+class SfxViewFactory
+{
+public:
+ SfxViewFactory( SfxViewCtor fnC, SfxViewInit fnI,
+ USHORT nOrdinal, const ResId& aDescrResId );
+ ~SfxViewFactory();
+
+ SfxViewShell *CreateInstance(SfxViewFrame *pViewFrame, SfxViewShell *pOldSh);
+ void InitFactory();
+
+ String GetDescription() const
+ { return String( aDescription ); }
+ USHORT GetOrdinal() const { return nOrd; }
+
+private:
+ SfxViewCtor fnCreate;
+ SfxViewInit fnInit;
+ USHORT nOrd;
+ ResId aDescription;
+};
+
+#endif
+
diff --git a/sfx2/prj/d.lst b/sfx2/prj/d.lst
new file mode 100644
index 000000000000..0cec2284377d
--- /dev/null
+++ b/sfx2/prj/d.lst
@@ -0,0 +1,148 @@
+mkdir: %_DEST%\inc\sfx2
+mkdir: %_DEST%\inc\enus
+mkdir: %_DEST%\inc\fren
+mkdir: %_DEST%\inc\dtch
+mkdir: %_DEST%\inc\ital
+mkdir: %_DEST%\inc\swed
+mkdir: %_DEST%\inc\port
+mkdir: %_DEST%\inc\dan
+mkdir: %_DEST%\inc\span
+mkdir: %_DEST%\inc\chinsim
+mkdir: %_DEST%\inc\japn
+mkdir: %_DEST%\inc\russ
+mkdir: %_DEST%\inc\pol
+
+touch: ..\%__SRC%\misc\sfx2.hid %_DEST%\bin%_EXT%\sfx2.hid
+
+..\%__SRC%\inc\sfxslots.ilb %_DEST%\inc%_EXT%\sfxslots.ilb
+..\%__SRC%\inc\sfxslots.ilb* %_DEST%\inc%_EXT%\sfxslots.ilb*
+..\%__SRC%\lib\sfx.lib %_DEST%\lib%_EXT%\sfx.lib
+..\%__SRC%\lib\*.so %_DEST%\lib%_EXT%\*.so
+..\%__SRC%\lib\*.a %_DEST%\lib%_EXT%\*.a
+..\%__SRC%\slb\sfx.lib %_DEST%\lib%_EXT%\xsfx.lib
+..\%__SRC%\obj\appctor.obj %_DEST%\lib%_EXT%\xsfxapp.obj
+..\%__SRC%\lib\isfx.lib %_DEST%\lib%_EXT%\isfx.lib
+..\%__SRC%\lib\debug.lib %_DEST%\lib%_EXT%\sfxdebug.lib
+..\%__SRC%\bin\sfx?????.sym %_DEST%\bin%_EXT%\sfx?????.sym
+..\%__SRC%\bin\sfx?????.dll %_DEST%\bin%_EXT%\sfx?????.dll
+..\%__SRC%\bin\sfx???[0-9][0-9].dll %_DEST%\bin%_EXT%\sfx?????.dll
+..\%__SRC%\bin\sfx?????.res %_DEST%\bin%_EXT%\sfx?????.res
+..\%__SRC%\bin\sfx?????.sym %_DEST%\bin%_EXT%\sfx?????.sym
+..\%__SRC%\misc\sfx?????.map %_DEST%\bin%_EXT%\sfx?????.map
+..\%__SRC%\bin\elc?????.dll %_DEST%\bin%_EXT%\elc?????.dll
+..\%__SRC%\srs\sfx.srs %_DEST%\res%_EXT%\sfx.srs
+..\%__SRC%\srs\sfxslots.srs %_DEST%\res%_EXT%\sfxslots.srs
+..\%__SRC%\res\sfx.srs %_DEST%\res%_EXT%\sfx.srs
+..\util\svdbt.dll %_DEST%\bin%_EXT%\svdbt.dll
+..\%__SRC%\misc\sfx2.csv %_DEST%\inc%_EXT%\sfx2.csv
+..\%__SRC%\inc\macropg.hxx %_DEST%\inc%_EXT%\macropg.hxx
+..\%__SRC%\bin\odk?????.dll %_DEST%\odk\bin%_EXT%\odk?????.dll
+..\%__SRC%\bin\cli?????.dll %_DEST%\odk\bin%_EXT%\cli?????.dll
+
+hedabu: ..\inc\inettbc.hxx %_DEST%\inc%_EXT%\sfx2\inettbc.hxx
+hedabu: ..\inc\accmgr.hxx %_DEST%\inc%_EXT%\sfx2\accmgr.hxx
+hedabu: ..\inc\app.hxx %_DEST%\inc%_EXT%\sfx2\app.hxx
+hedabu: ..\inc\basedlgs.hxx %_DEST%\inc%_EXT%\sfx2\basedlgs.hxx
+hedabu: ..\inc\bindings.hxx %_DEST%\inc%_EXT%\sfx2\bindings.hxx
+hedabu: ..\inc\clientsh.hxx %_DEST%\inc%_EXT%\sfx2\clientsh.hxx
+hedabu: ..\inc\cfgitem.hxx %_DEST%\inc%_EXT%\sfx2\cfgitem.hxx
+hedabu: ..\inc\configmgr.hxx %_DEST%\inc%_EXT%\sfx2\configmgr.hxx
+hedabu: ..\inc\chalign.hxx %_DEST%\inc%_EXT%\sfx2\chalign.hxx
+hedabu: ..\inc\childwin.hxx %_DEST%\inc%_EXT%\sfx2\childwin.hxx
+hedabu: ..\inc\ctrlitem.hxx %_DEST%\inc%_EXT%\sfx2\ctrlitem.hxx
+hedabu: ..\inc\dispatch.hxx %_DEST%\inc%_EXT%\sfx2\dispatch.hxx
+hedabu: ..\inc\dinfdlg.hxx %_DEST%\inc%_EXT%\sfx2\dinfdlg.hxx
+hedabu: ..\inc\dinfedt.hxx %_DEST%\inc%_EXT%\sfx2\dinfedt.hxx
+hedabu: ..\inc\docinf.hxx %_DEST%\inc%_EXT%\sfx2\docinf.hxx
+hedabu: ..\inc\docfac.hxx %_DEST%\inc%_EXT%\sfx2\docfac.hxx
+hedabu: ..\inc\docfile.hxx %_DEST%\inc%_EXT%\sfx2\docfile.hxx
+hedabu: ..\inc\docfilt.hxx %_DEST%\inc%_EXT%\sfx2\docfilt.hxx
+hedabu: ..\inc\dockwin.hxx %_DEST%\inc%_EXT%\sfx2\dockwin.hxx
+hedabu: ..\inc\doctempl.hxx %_DEST%\inc%_EXT%\sfx2\doctempl.hxx
+hedabu: ..\inc\doctdlg.hxx %_DEST%\inc%_EXT%\sfx2\doctdlg.hxx
+hedabu: ..\inc\event.hxx %_DEST%\inc%_EXT%\sfx2\event.hxx
+hedabu: ..\inc\evntconf.hxx %_DEST%\inc%_EXT%\sfx2\evntconf.hxx
+hedabu: ..\inc\exchobj.hxx %_DEST%\inc%_EXT%\sfx2\exchobj.hxx
+hedabu: ..\inc\expfile.hxx %_DEST%\inc%_EXT%\sfx2\expfile.hxx
+hedabu: ..\inc\explorer.hxx %_DEST%\inc%_EXT%\sfx2\explorer.hxx
+hedabu: ..\inc\exptypes.hxx %_DEST%\inc%_EXT%\sfx2\exptypes.hxx
+hedabu: ..\inc\fcontnr.hxx %_DEST%\inc%_EXT%\sfx2\fcontnr.hxx
+hedabu: ..\inc\frame.hxx %_DEST%\inc%_EXT%\sfx2\frame.hxx
+hedabu: ..\inc\frameobj.hxx %_DEST%\inc%_EXT%\sfx2\frameobj.hxx
+hedabu: ..\inc\frmdescr.hxx %_DEST%\inc%_EXT%\sfx2\frmdescr.hxx
+hedabu: ..\inc\frmhtml.hxx %_DEST%\inc%_EXT%\sfx2\frmhtml.hxx
+hedabu: ..\inc\frmhtmlw.hxx %_DEST%\inc%_EXT%\sfx2\frmhtmlw.hxx
+hedabu: ..\inc\frmload.hxx %_DEST%\inc%_EXT%\sfx2\frmload.hxx
+hedabu: ..\inc\genlink.hxx %_DEST%\inc%_EXT%\sfx2\genlink.hxx
+hedabu: ..\inc\hintpost.hxx %_DEST%\inc%_EXT%\sfx2\hintpost.hxx
+hedabu: ..\inc\interno.hxx %_DEST%\inc%_EXT%\sfx2\interno.hxx
+hedabu: ..\inc\inimgr.hxx %_DEST%\inc%_EXT%\sfx2\inimgr.hxx
+hedabu: ..\inc\imgmgr.hxx %_DEST%\inc%_EXT%\sfx2\imgmgr.hxx
+hedabu: ..\inc\imgdef.hxx %_DEST%\inc%_EXT%\sfx2\imgdef.hxx
+hedabu: ..\inc\interno.hxx %_DEST%\inc%_EXT%\sfx2\interno.hxx
+hedabu: ..\inc\ipfrm.hxx %_DEST%\inc%_EXT%\sfx2\ipfrm.hxx
+hedabu: ..\inc\linkhdl.hxx %_DEST%\inc%_EXT%\sfx2\linkhdl.hxx
+hedabu: ..\inc\macrconf.hxx %_DEST%\inc%_EXT%\sfx2\macrconf.hxx
+hedabu: ..\inc\macropg.hxx %_DEST%\inc%_EXT%\sfx2\macropg.hxx
+hedabu: ..\inc\mailitem.hxx %_DEST%\inc%_EXT%\sfx2\mailitem.hxx
+hedabu: ..\inc\topfrm.hxx %_DEST%\inc%_EXT%\sfx2\topfrm.hxx
+hedabu: ..\inc\mfldmgr.hxx %_DEST%\inc%_EXT%\sfx2\mfldmgr.hxx
+hedabu: ..\inc\mgetempl.hxx %_DEST%\inc%_EXT%\sfx2\mgetempl.hxx
+hedabu: ..\inc\mieclip.hxx %_DEST%\inc%_EXT%\sfx2\mieclip.hxx
+hedabu: ..\inc\minarray.hxx %_DEST%\inc%_EXT%\sfx2\minarray.hxx
+hedabu: ..\inc\minfitem.hxx %_DEST%\inc%_EXT%\sfx2\minfitem.hxx
+hedabu: ..\inc\minfstack.hxx %_DEST%\inc%_EXT%\sfx2\minfstack.hxx
+hedabu: ..\inc\minstack.hxx %_DEST%\inc%_EXT%\sfx2\minstack.hxx
+hedabu: ..\inc\mnuitem.hxx %_DEST%\inc%_EXT%\sfx2\mnuitem.hxx
+hedabu: ..\inc\module.hxx %_DEST%\inc%_EXT%\sfx2\module.hxx
+hedabu: ..\inc\msg.hxx %_DEST%\inc%_EXT%\sfx2\msg.hxx
+hedabu: ..\inc\mnumgr.hxx %_DEST%\inc%_EXT%\sfx2\mnumgr.hxx
+hedabu: ..\inc\newstyle.hxx %_DEST%\inc%_EXT%\sfx2\newstyle.hxx
+hedabu: ..\inc\new.hxx %_DEST%\inc%_EXT%\sfx2\new.hxx
+hedabu: ..\inc\navigat.hxx %_DEST%\inc%_EXT%\sfx2\navigat.hxx
+hedabu: ..\inc\msgdescr.hxx %_DEST%\inc%_EXT%\sfx2\msgdescr.hxx
+hedabu: ..\inc\msgpool.hxx %_DEST%\inc%_EXT%\sfx2\msgpool.hxx
+hedabu: ..\inc\passwd.hxx %_DEST%\inc%_EXT%\sfx2\passwd.hxx
+hedabu: ..\inc\prnmon.hxx %_DEST%\inc%_EXT%\sfx2\prnmon.hxx
+hedabu: ..\inc\objface.hxx %_DEST%\inc%_EXT%\sfx2\objface.hxx
+hedabu: ..\inc\objitem.hxx %_DEST%\inc%_EXT%\sfx2\objitem.hxx
+hedabu: ..\inc\objsh.hxx %_DEST%\inc%_EXT%\sfx2\objsh.hxx
+hedabu: ..\inc\printer.hxx %_DEST%\inc%_EXT%\sfx2\printer.hxx
+hedabu: ..\inc\progress.hxx %_DEST%\inc%_EXT%\sfx2\progress.hxx
+hedabu: ..\inc\request.hxx %_DEST%\inc%_EXT%\sfx2\request.hxx
+hedabu: ..\inc\saveopt.hxx %_DEST%\inc%_EXT%\sfx2\saveopt.hxx
+hedabu: ..\inc\sfx.hrc %_DEST%\inc%_EXT%\sfx2\sfx.hrc
+hedabu: ..\inc\sfxdefs.hxx %_DEST%\inc%_EXT%\sfx2\sfxdefs.hxx
+hedabu: ..\inc\sfxdir.hxx %_DEST%\inc%_EXT%\sfx2\sfxdir.hxx
+hedabu: ..\inc\sfxhelp.hxx %_DEST%\inc%_EXT%\sfx2\sfxhelp.hxx
+hedabu: ..\inc\sfxhtml.hxx %_DEST%\inc%_EXT%\sfx2\sfxhtml.hxx
+hedabu: ..\inc\sfxsids.hrc %_DEST%\inc%_EXT%\sfx2\sfxsids.hrc
+hedabu: ..\inc\shell.hxx %_DEST%\inc%_EXT%\sfx2\shell.hxx
+hedabu: ..\inc\stbitem.hxx %_DEST%\inc%_EXT%\sfx2\stbitem.hxx
+hedabu: ..\inc\stbmgr.hxx %_DEST%\inc%_EXT%\sfx2\stbmgr.hxx
+hedabu: ..\inc\styfitem.hxx %_DEST%\inc%_EXT%\sfx2\styfitem.hxx
+hedabu: ..\inc\styledlg.hxx %_DEST%\inc%_EXT%\sfx2\styledlg.hxx
+hedabu: ..\inc\tabdlg.hxx %_DEST%\inc%_EXT%\sfx2\tabdlg.hxx
+hedabu: ..\inc\tbxctrl.hxx %_DEST%\inc%_EXT%\sfx2\tbxctrl.hxx
+hedabu: ..\inc\tbxmgr.hxx %_DEST%\inc%_EXT%\sfx2\tbxmgr.hxx
+hedabu: ..\inc\templdlg.hxx %_DEST%\inc%_EXT%\sfx2\templdlg.hxx
+hedabu: ..\inc\tplpitem.hxx %_DEST%\inc%_EXT%\sfx2\tplpitem.hxx
+hedabu: ..\inc\viewfrm.hxx %_DEST%\inc%_EXT%\sfx2\viewfrm.hxx
+hedabu: ..\inc\viewsh.hxx %_DEST%\inc%_EXT%\sfx2\viewsh.hxx
+hedabu: ..\inc\viewfac.hxx %_DEST%\inc%_EXT%\sfx2\viewfac.hxx
+hedabu: ..\inc\iodlg.hxx %_DEST%\inc%_EXT%\sfx2\iodlg.hxx
+hedabu: ..\inc\appuno.hxx %_DEST%\inc%_EXT%\sfx2\appuno.hxx
+hedabu: ..\inc\sfxuno.hxx %_DEST%\inc%_EXT%\sfx2\sfxuno.hxx
+hedabu: ..\inc\sfxbasemodel.hxx %_DEST%\inc%_EXT%\sfx2\sfxbasemodel.hxx
+hedabu: ..\inc\sfxbasecontroller.hxx %_DEST%\inc%_EXT%\sfx2\sfxbasecontroller.hxx
+hedabu: ..\inc\unoctitm.hxx %_DEST%\inc%_EXT%\sfx2\unoctitm.hxx
+hedabu: ..\inc\objuno.hxx %_DEST%\inc%_EXT%\sfx2\objuno.hxx
+hedabu: ..\inc\viewuno.hxx %_DEST%\inc%_EXT%\sfx2\viewuno.hxx
+hedabu: ..\inc\misccfg.hxx %_DEST%\inc%_EXT%\sfx2\misccfg.hxx
+hedabu: ..\inc\srchitem.hxx %_DEST%\inc%_EXT%\sfx2\srchitem.hxx
+hedabu: ..\inc\fontitem.hxx %_DEST%\inc%_EXT%\sfx2\fontitem.hxx
+hedabu: ..\inc\xmlmetae.hxx %_DEST%\inc%_EXT%\sfx2\xmlmetae.hxx
+hedabu: ..\inc\xmlmetai.hxx %_DEST%\inc%_EXT%\sfx2\xmlmetai.hxx
+hedabu: ..\inc\cntids.hrc %_DEST%\inc%_EXT%\sfx2\cntids.hrc
+hedabu: ..\inc\basmgr.hxx %_DEST%\inc%_EXT%\sfx2\basmgr.hxx
+
diff --git a/sfx2/sdi/appslots.sdi b/sfx2/sdi/appslots.sdi
new file mode 100644
index 000000000000..d51cb9a994d0
--- /dev/null
+++ b/sfx2/sdi/appslots.sdi
@@ -0,0 +1,375 @@
+/*************************************************************************
+#*
+#* $RCSfile: appslots.sdi,v $
+#*
+#* Description shell SfxApplication
+#*
+#* Creation date MI 01/31/1995
+#* last change $Author: hr $ $Date: 2000-09-18 16:52:25 $
+#* $Revision: 1.1.1.1 $
+#*
+#* Copyright 2000 Sun Microsystems, Inc. All Rights Reserved.
+#*
+#************************************************************************/
+
+interface Module : Object
+[
+ Automation = FALSE;
+]
+{
+}
+
+interface Application : Module
+
+/* [Beschreibung]
+
+ Dieses ist die Funktionalit"at jeder SFx-Applikation. Ein solches Objekt
+ existiert genau einmal pro Applikation. Angesprochen wird es beispiels-
+ weise "uber 'StarWriter'.
+
+
+ [Anmerkungen]
+
+ Die von OLE-Automation gewnschten (optional) Methoden Repeat und Undo
+ sind von uns hier nicht sinnvoll implementierbar, da Repeat, Undo
+ und Redo Dokument-spezifisch sind.
+*/
+
+
+[
+ Automation = FALSE ;
+]
+{
+ //---------------------------------------------------------------------
+ SID_AUTOPILOTMENU // ole(no) api(final/play/rec)
+ [
+ ]
+
+ //---------------------------------------------------------------------
+ SID_FORMATMENU // ole(no) api(no)
+ [
+ ]
+
+ //---------------------------------------------------------------------
+ SID_HELPMENU // ole(no) api(no)
+ [
+ ]
+
+ //---------------------------------------------------------------------
+ SID_PICKLIST // ole(no) api(no)
+ [
+ ]
+
+ //---------------------------------------------------------------------
+ SID_MDIWINDOWLIST // ole(no) api(no)
+ [
+ ]
+
+ //---------------------------------------------------------------------
+ SID_ABOUT // ole(no) api(final/play/rec)
+ [
+ ExecMethod = MiscExec_Impl ;
+ ]
+
+ //---------------------------------------------------------------------
+ SID_FOCUSURLBOX // ole(no) api(final/play/rec)
+ [
+ ExecMethod = INetExecute_Impl ;
+ StateMethod = INetState_Impl ;
+ ]
+
+ //---------------------------------------------------------------------
+ SID_SETOPTIONS
+ [
+ ExecMethod = MiscExec_Impl ;
+ ]
+
+ //---------------------------------------------------------------------
+ SID_QUITAPP // ole(req) api(final/play)
+ [
+ ExecMethod = MiscExec_Impl ;
+ StateMethod = MiscState_Impl ;
+ ]
+
+ //---------------------------------------------------------------------
+ SID_HELPINDEX // ole(no) api(final/todo)
+ [
+ ExecMethod = MiscExec_Impl ;
+ ]
+
+ //---------------------------------------------------------------------
+ SID_HELPONHELP // ole(no) api(final/todo)
+ [
+ ExecMethod = MiscExec_Impl ;
+ ]
+
+ //---------------------------------------------------------------------
+ SID_EXTENDEDHELP // ole(no) api(final/play/norec)
+ [
+ ExecMethod = MiscExec_Impl ;
+ StateMethod = MiscState_Impl ;
+ ]
+
+ //---------------------------------------------------------------------
+ SID_HELPBALLOONS // ole(no) api(final/play/rec)
+ [
+ ExecMethod = MiscExec_Impl ;
+ StateMethod = MiscState_Impl ;
+ ]
+
+ //---------------------------------------------------------------------
+ SID_HELPTIPS // ole(no) api(final/play/rec)
+ [
+ ExecMethod = MiscExec_Impl ;
+ StateMethod = MiscState_Impl ;
+ ]
+
+ //---------------------------------------------------------------------
+ SID_CURRENTTIME // ole(no) api(final/play/norec)
+ [
+ StateMethod = MiscState_Impl ;
+ ]
+
+ //---------------------------------------------------------------------
+ SID_CURRENTDATE // ole(no) api(final/play/norec)
+ [
+ StateMethod = MiscState_Impl ;
+ ]
+
+ //---------------------------------------------------------------------
+ SID_LOADCONFIG // ole(no) api(final/play)
+ [
+ ExecMethod = MiscExec_Impl ;
+ ]
+
+ //---------------------------------------------------------------------
+ SID_SAVECONFIG // ole(no) api(final/play)
+ [
+ ExecMethod = MiscExec_Impl ;
+ ]
+
+ //---------------------------------------------------------------------
+ SID_CONFIG // ole(no) api(final/play/rec)
+ [
+ ExecMethod = MiscExec_Impl ;
+ StateMethod = MiscState_Impl ;
+ ]
+
+ //---------------------------------------------------------------------
+ SID_TOOLBOXOPTIONS // ole(no) api(final/play)
+ [
+ ExecMethod = MiscExec_Impl ;
+ StateMethod = MiscState_Impl ;
+ ]
+
+ //---------------------------------------------------------------------
+ SID_CONFIGSTATUSBAR // ole(no) api(final/play)
+ [
+ ExecMethod = MiscExec_Impl ;
+ StateMethod = MiscState_Impl ;
+ ]
+
+ //---------------------------------------------------------------------
+ SID_CONFIGMENU // ole(no) api(final/play)
+ [
+ ExecMethod = MiscExec_Impl ;
+ StateMethod = MiscState_Impl ;
+ ]
+
+ //---------------------------------------------------------------------
+ SID_CONFIGACCEL // ole(no) api(final/play)
+ [
+ ExecMethod = MiscExec_Impl ;
+ StateMethod = MiscState_Impl ;
+ ]
+
+ //---------------------------------------------------------------------
+ SID_CONFIGEVENT // ole(no) api(final/play)
+ [
+ ExecMethod = MiscExec_Impl ;
+ StateMethod = MiscState_Impl ;
+ ]
+
+ //---------------------------------------------------------------------
+ SID_ORGANIZER // ole(no) api(final/play/rec)
+ [
+ ExecMethod = MiscExec_Impl ;
+ ]
+
+ //---------------------------------------------------------------------
+ SID_ATTR_UNDO_COUNT // ole(no) api(final/play)
+ [
+ ExecMethod = PropExec_Impl ;
+ StateMethod = PropState_Impl ;
+ ]
+
+ //---------------------------------------------------------------------
+ SID_PICK1 // ole(no) api(no)
+ [
+ ExecMethod = MiscExec_Impl ;
+ StateMethod = MiscState_Impl
+ ]
+
+ //---------------------------------------------------------------------
+ SID_PICK2 // ole(no) api(no)
+ [
+ ExecMethod = MiscExec_Impl ;
+ StateMethod = MiscState_Impl ;
+ ]
+
+ //---------------------------------------------------------------------
+ SID_PICK3 // ole(no) api(no)
+ [
+ ExecMethod = MiscExec_Impl ;
+ StateMethod = MiscState_Impl ;
+ ]
+
+ //---------------------------------------------------------------------
+ SID_PICK4 // ole(no) api(no)
+ [
+ ExecMethod = MiscExec_Impl ;
+ StateMethod = MiscState_Impl ;
+ ]
+
+ //---------------------------------------------------------------------
+ SID_PICK5 // ole(no) api(no)
+ [
+ ExecMethod = MiscExec_Impl ;
+ StateMethod = MiscState_Impl ;
+ ]
+
+ //---------------------------------------------------------------------
+ SID_PICK6 // ole(no) api(no)
+ [
+ ExecMethod = MiscExec_Impl ;
+ StateMethod = MiscState_Impl ;
+ ]
+
+ //---------------------------------------------------------------------
+ SID_PICK7 // ole(no) api(no)
+ [
+ ExecMethod = MiscExec_Impl ;
+ StateMethod = MiscState_Impl ;
+ ]
+
+ //---------------------------------------------------------------------
+ SID_PICK8 // ole(no) api(no)
+ [
+ ExecMethod = MiscExec_Impl ;
+ StateMethod = MiscState_Impl ;
+ ]
+
+ //---------------------------------------------------------------------
+ SID_PICK9 // ole(no) api(no)
+ [
+ ExecMethod = MiscExec_Impl ;
+ StateMethod = MiscState_Impl ;
+ ]
+
+ //---------------------------------------------------------------------
+ SID_BASICSTOP // ole(no) api(final/play/norec)
+ [
+ ExecMethod = MiscExec_Impl ;
+ StateMethod = MiscState_Impl ;
+ ]
+
+ //---------------------------------------------------------------------
+ SID_BASICBREAK // ole(no) api(final/play/norec)
+ [
+ ExecMethod = MiscExec_Impl ;
+ StateMethod = MiscState_Impl ;
+ ]
+
+ //---------------------------------------------------------------------
+ SID_BROWSE_STOP // ole(no) api()
+ [
+ ExecMethod = INetExecute_Impl ;
+ StateMethod = INetState_Impl ;
+ ]
+
+ //---------------------------------------------------------------------
+ SID_CLEARMEMCACHE
+ [
+ ExecMethod = INetExecute_Impl ;
+ ]
+
+ //---------------------------------------------------------------------
+ SID_LOAD_LIBRARY
+ [
+ ExecMethod = MiscExec_Impl ;
+ ]
+
+ //---------------------------------------------------------------------
+ SID_UNLOAD_LIBRARY
+ [
+ ExecMethod = MiscExec_Impl ;
+ ]
+
+ //---------------------------------------------------------------------
+ SID_ADD_LIBRARY
+ [
+ ExecMethod = MiscExec_Impl ;
+ ]
+
+ //---------------------------------------------------------------------
+ SID_REMOVE_LIBRARY
+ [
+ ExecMethod = MiscExec_Impl ;
+ ]
+
+ //---------------------------------------------------------------------
+ SID_CRASH
+ [
+ ExecMethod = MiscExec_Impl ;
+ ]
+}
+
+ //=========================================================================
+
+shell SfxApplication
+
+/* [Beschreibung]
+
+ Dieses ist die Funktionalit"at jeder SFx-Applikation. Ein solches Objekt
+ existiert genau einmal pro Applikation. Angesprochen wird es beispiels-
+ weise "uber 'StarWriter'.
+
+
+ [Anmerkungen]
+
+ Die von OLE-Automation gewnschten (optional) Methoden Repeat und Undo
+ sind von uns hier nicht sinnvoll implementierbar, da Repeat, Undo
+ und Redo Dokument-spezifisch sind.
+*/
+
+{
+ import Application [Automation];
+ import Documents "Documents";
+
+ SID_NEWDOCDIRECT // ole(no) api(no)
+ [
+ ExecMethod = NewDocDirectExec_Impl ;
+ StateMethod = CreateDocState_Impl ;
+ ]
+
+ SID_CLOSEDOCS
+ [
+ ExecMethod = MiscExec_Impl ;
+ StateMethod = MiscState_Impl ;
+ ]
+/*
+ SID_NEWFRAMESET
+ [
+ ExecMethod = NewFramesetExec_Impl ;
+ StateMethod = CreateDocState_Impl ;
+ ]
+*/
+}
+
+shell SfxModule
+{
+ import Module;
+}
+
+// eof ------------------------------------------------------------------------
+
diff --git a/sfx2/sdi/docslots.sdi b/sfx2/sdi/docslots.sdi
new file mode 100644
index 000000000000..844ebcc92643
--- /dev/null
+++ b/sfx2/sdi/docslots.sdi
@@ -0,0 +1,408 @@
+/*=========================================================================
+ shell SfxObjectShell
+
+ (C) 1994-1995 StarDivision GmbH, Hamburg, Germany
+ $Author: hr $ $Date: 2000-09-18 16:52:25 $ $Revision: 1.1.1.1 $
+ $Logfile: T:/sfx2/sdi/docslots.sdv $ $Workfile: DOCSLOTS.SDI $
+=========================================================================*/
+
+
+
+
+interface Documents : Collection
+[
+ uuid = "61753B60-1114-101D-B8ED-3273768855A7" ;
+]
+{
+ //---------------------------------------------------------------------
+ SID_NEWDOC // ole(opt) api(final/play/rec)
+ [
+ ExecMethod = NewDocExec_Impl ;
+ StateMethod = CreateDocState_Impl ;
+ ]
+ //---------------------------------------------------------------------
+ SID_OPENDOC // ole(no) api(final/play/rec)
+ [
+ ExecMethod = OpenDocExec_Impl ;
+ StateMethod = CreateDocState_Impl ;
+ ]
+ //---------------------------------------------------------------------
+ SID_OPENURL // ole(no) api(no)
+ [
+ ExecMethod = OpenDocExec_Impl ;
+ StateMethod = CreateDocState_Impl ;
+ ]
+
+ SID_CURRENT_URL // ole(no) api(no)
+ [
+ StateMethod = CreateDocState_Impl ;
+ ]
+ //---------------------------------------------------------------------
+ SID_OPENTEMPLATE // ole(no) api(final/play/rec)
+ [
+ ExecMethod = OpenDocExec_Impl ;
+ StateMethod = CreateDocState_Impl ;
+ ]
+ //---------------------------------------------------------------------
+ SID_CLOSEDOCS // ole(req) api(final/play/rec)
+ [
+ ExecMethod = MiscExec_Impl ;
+ StateMethod = MiscState_Impl ;
+ ]
+ //---------------------------------------------------------------------
+ SID_SAVEDOCS // ole(no) api(final/play/rec)
+ [
+ ExecMethod = MiscExec_Impl ;
+ StateMethod = MiscState_Impl ;
+ ]
+}
+
+ //=========================================================================
+
+interface DocumentInfo : Object
+[
+ uuid = "11A1EDE0-1308-101D-B8ED-3273768855A7"
+]
+{
+ //---------------------------------------------------------------------
+ SID_DOCINFO // ole(no) api(final/play)
+ [
+ ExecMethod = ExecFile_Impl ;
+ StateMethod = GetState_Impl ;
+ ]
+ //---------------------------------------------------------------------
+ BOOL Load SID_DOCINFO_LOAD ( String FileName SID_FILE_NAME ) ;
+ //---------------------------------------------------------------------
+ BOOL Save SID_DOCINFO_SAVE () ;
+}
+
+ //=========================================================================
+
+interface Document : Object
+[
+ Automation = FALSE ;
+]
+{
+ //---------------------------------------------------------------------
+ String Name // ole(no) api(final/play/norec)
+ [Readonly;]
+ //---------------------------------------------------------------------
+ SbxObject UNO SID_UNO // ole(no) api(final/play/norec)
+ [Readonly;]
+ //---------------------------------------------------------------------
+ SID_DOCTITLE // ole(opt) api(final/norec)
+ [
+ ExecMethod = ExecProps_Impl ;
+ StateMethod = StateProps_Impl ;
+ ]
+ //---------------------------------------------------------------------
+ SID_DOCPATH // ole(req) api(final/play/norec)
+ [
+ ExecMethod = ExecProps_Impl ;
+ StateMethod = StateProps_Impl ;
+ ]
+ //---------------------------------------------------------------------
+ SID_DOCFULLNAME // ole(req) api(final/play/norec)
+ [
+ ExecMethod = ExecProps_Impl ;
+ StateMethod = StateProps_Impl ;
+ ]
+ //---------------------------------------------------------------------
+ SID_CLOSEDOC // ole(req) api(final/play/rec)
+ [
+ ExecMethod = ExecFile_Impl ;
+ StateMethod = GetState_Impl ;
+ ]
+ //---------------------------------------------------------------------
+ SID_CLOSING // ole(no) api(final/play/norec)
+ [
+ StateMethod = StateProps_Impl ;
+ ]
+ //---------------------------------------------------------------------
+ SID_ACTIVATE // ole(no) api(final/play/norec)
+ [
+ ExecMethod = ExecView_Impl ;
+ StateMethod = StateView_Impl ;
+ ]
+ //---------------------------------------------------------------------
+ SID_ON_CREATEDOC // ole(no) api(final/play)
+ [
+ ExecMethod = ExecProps_Impl ;
+ StateMethod = StateProps_Impl ;
+ ]
+ //---------------------------------------------------------------------
+ SID_ON_OPENDOC // ole(no) api(final/play)
+ [
+ ExecMethod = ExecProps_Impl ;
+ StateMethod = StateProps_Impl ;
+ ]
+ //---------------------------------------------------------------------
+ SID_ON_PREPARECLOSEDOC // ole(no) api(final/play)
+ [
+ ExecMethod = ExecProps_Impl ;
+ StateMethod = StateProps_Impl ;
+ ]
+ //---------------------------------------------------------------------
+ SID_ON_CLOSEDOC // ole(no) api(final/play)
+ [
+ ExecMethod = ExecProps_Impl ;
+ StateMethod = StateProps_Impl ;
+ ]
+ //---------------------------------------------------------------------
+ SID_ON_SAVEDOC // ole(no) api(final/play)
+ [
+ ExecMethod = ExecProps_Impl ;
+ StateMethod = StateProps_Impl ;
+ ]
+ //---------------------------------------------------------------------
+ SID_ON_SAVEASDOC // ole(no) api(final/play)
+ [
+ ExecMethod = ExecProps_Impl ;
+ StateMethod = StateProps_Impl ;
+ ]
+
+ SID_ON_SAVEDOCDONE // ole(no) api(final/play)
+ [
+ ExecMethod = ExecProps_Impl ;
+ StateMethod = StateProps_Impl ;
+ ]
+
+ //---------------------------------------------------------------------
+ SID_ON_SAVEASDOCDONE // ole(no) api(final/play)
+ [
+ ExecMethod = ExecProps_Impl ;
+ StateMethod = StateProps_Impl ;
+ ]
+ //---------------------------------------------------------------------
+ SID_ON_ACTIVATEDOC // ole(no) api(final/play)
+ [
+ ExecMethod = ExecProps_Impl ;
+ StateMethod = StateProps_Impl ;
+ ]
+ //---------------------------------------------------------------------
+ SID_ON_DEACTIVATEDOC // ole(no) api(final/play)
+ [
+ ExecMethod = ExecProps_Impl ;
+ StateMethod = StateProps_Impl ;
+ ]
+ //---------------------------------------------------------------------
+ SID_ON_PRINTDOC // ole(no) api(final/play)
+ [
+ ExecMethod = ExecProps_Impl ;
+ StateMethod = StateProps_Impl ;
+ ]
+ //---------------------------------------------------------------------
+ SfxObjectItem Module SID_ACTIVEMODULE
+ [
+ StateMethod = StateProps_Impl ;
+ ]
+}
+
+interface OfficeDocument : Document
+[
+ Automation = FALSE
+]
+{
+ //---------------------------------------------------------------------
+ SbxObject DocumentInfo // ole(no) api(final/plac/norec)
+ [
+ Readonly ;
+ ]
+ //---------------------------------------------------------------------
+ SID_DOCINFO_AUTHOR // ole(opt) api(todo)
+ [
+ ExecMethod = ExecProps_Impl ;
+ StateMethod = StateProps_Impl ;
+ ]
+ //---------------------------------------------------------------------
+ SID_DOCINFO_COMMENTS // ole(opt) api(todo)
+ [
+ ExecMethod = ExecProps_Impl ;
+ StateMethod = StateProps_Impl ;
+ ]
+ //---------------------------------------------------------------------
+ SID_DOCINFO_KEYWORDS // ole(opt) api(todo)
+ [
+ ExecMethod = ExecProps_Impl ;
+ StateMethod = StateProps_Impl ;
+ ]
+ //---------------------------------------------------------------------
+ SID_DOC_READONLY // ole(opt) api(final/play/norec)
+ [
+ ExecMethod = ExecProps_Impl ;
+ StateMethod = StateProps_Impl ;
+ ]
+ //---------------------------------------------------------------------
+ SID_DOC_SAVED // ole(req) api(final/play/norec)
+ [
+ ExecMethod = ExecProps_Impl ;
+ StateMethod = StateProps_Impl ;
+ ]
+ //---------------------------------------------------------------------
+ SID_DOC_MODIFIED // ole(no) api(final/noplay/norec)
+ [
+ StateMethod = GetState_Impl ;
+ ]
+ //---------------------------------------------------------------------
+ SID_MODIFIED // ole(no) api(final/noplay/norec)
+ [
+ ExecMethod = ExecProps_Impl ;
+ StateMethod = GetState_Impl ;
+ ]
+ //---------------------------------------------------------------------
+ SID_SAVEDOC // ole(req) api(final/play/rec)
+ [
+ ExecMethod = ExecFile_Impl ;
+ StateMethod = GetState_Impl ;
+ ]
+ //---------------------------------------------------------------------
+ SID_SAVEASDOC // ole(req) api(final/play/rec)
+ [
+ ExecMethod = ExecFile_Impl ;
+ StateMethod = GetState_Impl ;
+ ]
+ //---------------------------------------------------------------------
+ SID_SAVEASURL // ole(no) api()
+ [
+ ExecMethod = ExecFile_Impl ;
+ StateMethod = GetState_Impl ;
+ ]
+ //---------------------------------------------------------------------
+ SID_DOCTEMPLATE // ole(no) api(final/play/rec)
+ [
+ ExecMethod = ExecFile_Impl ;
+ StateMethod = GetState_Impl ;
+ ]
+ //---------------------------------------------------------------------
+ SID_PRINTDOC //ole(req) api(final/play/norec)
+ [
+ ExecMethod = PrintExec_Impl ;
+ StateMethod = NoState ;
+ ]
+ //---------------------------------------------------------------------
+ SID_PRINTOUT // ole(opt) api(final/play/norec)
+ [
+ ExecMethod = PrintExec_Impl ;
+ StateMethod = PrintState_Impl ;
+ ]
+ //---------------------------------------------------------------------
+ SID_DOC_LOADING // ole(no) api(final/play/norec)
+ [
+ StateMethod = StateProps_Impl ;
+ ]
+ //---------------------------------------------------------------------
+ SID_IMG_LOADING // ole(no) api(final/play/norec)
+ [
+ StateMethod = StateProps_Impl ;
+ ]
+ //---------------------------------------------------------------------
+ SID_PLAYMACRO // ole(no) api(final/play/norec)
+ [
+ ExecMethod = ExecProps_Impl ;
+ StateMethod = StateProps_Impl ;
+ ]
+ SID_VERSION
+ [
+ ExecMethod = ExecFile_Impl;
+ StateMethod = GetState_Impl;
+ ]
+}
+
+ //=========================================================================
+
+shell SfxObjectShell
+
+/* [Beschreibung]
+
+ Funktionalit"at aller 'Dokumente' in SFx-Applikationen. Angesprochen
+ werden diese Objekte entweder als 'ActiveDocument' oder mit dem
+ Namen des Dokuments (i.d.R. der Dateiname) ohne Pfad in eckigen
+ Klammern (z.B. als '[unbenannt1]' oder '[brief6.sdw]').
+*/
+
+
+
+
+{
+ import OfficeDocument [Automation];
+ import DocumentInfo ".DocumentInfo";
+ //---------------------------------------------------------------------
+ SID_THISDOCUMENT // ole(no) api(no)
+ [
+ ExecMethod = ExecProps_Impl ;
+ StateMethod = StateProps_Impl ;
+ ]
+ //---------------------------------------------------------------------
+ SID_THISWINDOW // ole(no) api(no)
+ [
+ ExecMethod = ExecProps_Impl ;
+ StateMethod = StateProps_Impl ;
+ ]
+ //---------------------------------------------------------------------
+ SID_FILE_NAME // ole(no) api(final/play/rec)
+ [
+ StateMethod = GetState_Impl ;
+ ]
+ SID_DOCINFO_TITLE // ole(no) api(final/play/rec)
+ [
+ StateMethod = GetState_Impl ;
+ ]
+} ;
+
+/*-------------------------------------------------------------------------
+
+ $Log: not supported by cvs2svn $
+ Revision 1.82 2000/07/26 19:10:04 mba
+ LoadLibrary only in App
+
+ Revision 1.81 2000/03/09 15:34:31 mba
+ #70338#: use SID_CURRENT_URL / CurrentURL
+
+ Revision 1.80 1999/10/06 15:19:52 mba
+ #68854#: Events nach Speichern
+
+ Revision 1.79 1998/06/23 10:30:40 MBA
+ SID_VERSION
+
+
+ Rev 1.78 23 Jun 1998 12:30:40 MBA
+ SID_VERSION
+
+ Rev 1.77 12 Jun 1998 15:56:06 MI
+ UNO-Objekt Zugriff
+
+ Rev 1.76 13 Nov 1997 12:50:08 MBA
+ Save an DocInfo ohne Parameter
+
+ Rev 1.75 28 Oct 1997 15:33:24 MBA
+ Bugfix #45146#: Author, Comments und Keywords implementiert
+
+ Rev 1.74 04 Sep 1997 13:20:06 MBA
+ OfficeDocument eingefuehrt
+
+ Rev 1.72 28 Aug 1997 12:20:44 MBA
+ Neue Interface-Namen
+
+ Rev 1.71 05 Aug 1997 17:36:36 MI
+ #42439# Module-Property war kaputt-gespielt
+
+ Rev 1.70 08 Jul 1997 19:34:36 MI
+ Flags bei ObjShells: InCloseEvent+HiddenLocked (#40060#)
+
+ Rev 1.69 03 Jul 1997 16:45:28 MBA
+ SID_MODIFIED
+
+ Rev 1.68 01 Jul 1997 12:45:54 MBA
+ LOAD/UNLOAD/ADD/REMOVE-Library
+
+ Rev 1.67 01 Jul 1997 12:38:32 MI
+ Modified-Property setzbar
+
+ Rev 1.66 12 May 1997 13:53:30 MBA
+ Seitenansicht raus
+
+-------------------------------------------------------------------------*/
+
+
+
+
diff --git a/sfx2/sdi/frmslots.sdi b/sfx2/sdi/frmslots.sdi
new file mode 100644
index 000000000000..353a418aa2a9
--- /dev/null
+++ b/sfx2/sdi/frmslots.sdi
@@ -0,0 +1,696 @@
+/*=========================================================================
+ shell SfxViewFrame
+
+ (C) 1994-1995 StarDivision GmbH, Hamburg, Germany
+ $Author: hr $ $Date: 2000-09-18 16:52:25 $ $Revision: 1.1.1.1 $
+ $Logfile: T:/sfx2/sdi/frmslots.sdv $ $Workfile: FRMSLOTS.SDI $
+=========================================================================*/
+
+interface Window : Object
+[
+ Automation = FALSE ;
+]
+{
+ SID_CUSTOMIZETOOLBOX // ole(no) api(final/play/rec)
+ [
+ ExecMethod = ChildWindowExecute ;
+ StateMethod = ChildWindowState ;
+ ]
+
+ //----------------------------------------------------------------------
+ SID_HYPERLINK_INSERT
+ [
+ ExecMethod = ChildWindowExecute ;
+ StateMethod = ChildWindowState ;
+ ]
+
+ //----------------------------------------------------------------------
+ SID_HYPERLINK_DIALOG
+ [
+ ExecMethod = ChildWindowExecute ;
+ StateMethod = ChildWindowState ;
+ ]
+
+ //----------------------------------------------------------------------
+ SID_NAVIGATOR // status(final|play)
+ [
+ ExecMethod = ChildWindowExecute ;
+ StateMethod = ChildWindowState ;
+ ]
+
+ //---------------------------------------------------------------------
+ SID_SHOW_BROWSER // ole(no) api(final/play/rec)
+ [
+ ExecMethod = ChildWindowExecute ;
+ StateMethod = ChildWindowState ;
+ ]
+
+ //---------------------------------------------------------------------
+ SID_NEXTWINDOW
+ [
+ ExecMethod = MiscExec_Impl ;
+ StateMethod = MiscState_Impl ;
+ ]
+
+ //---------------------------------------------------------------------
+ SID_PREVWINDOW
+ [
+ ExecMethod = MiscExec_Impl ;
+ StateMethod = MiscState_Impl ;
+ ]
+
+ //---------------------------------------------------------------------
+ SID_BROWSER // ole(no) api()
+ [
+ ExecMethod = ChildWindowExecute ;
+ StateMethod = ChildWindowState ;
+ ]
+
+ //---------------------------------------------------------------------
+ SID_PARTWIN // ole(no) api()
+ [
+ ExecMethod = ChildWindowExecute ;
+ StateMethod = ChildWindowState ;
+ ]
+
+ //---------------------------------------------------------------------
+ SID_MAIL_CHILDWIN // ole(no) api()
+ [
+ ExecMethod = ChildWindowExecute ;
+ StateMethod = ChildWindowState ;
+ ]
+
+ SID_TIPWINDOW
+ [
+ ExecMethod = ChildWindowExecute ;
+ StateMethod = ChildWindowState ;
+ ]
+ //---------------------------------------------------------------------
+ SID_SEARCH_DLG // ole(no) api(final/play/rec)
+ [
+ ExecMethod = ChildWindowExecute ;
+ StateMethod = ChildWindowState ;
+ ]
+
+ //---------------------------------------------------------------------
+ SID_HELP_PI // ole(no) api(final/play/rec)
+ [
+ ExecMethod = ChildWindowExecute ;
+ StateMethod = ChildWindowState ;
+ ]
+
+ SID_TOGGLECOMMONTASKBAR // ole(no) api(final/play/rec)
+ [
+ ExecMethod = ToolboxExec_Impl ;
+ StateMethod = ToolboxState_Impl ;
+ ]
+
+ SID_TOGGLENAVBAR // ole(no) api(final/play/rec)
+ [
+ ExecMethod = ToolboxExec_Impl ;
+ StateMethod = ToolboxState_Impl ;
+ ]
+
+ SID_TOGGLEMACROBAR // ole(no) api(final/play/rec)
+ [
+ ExecMethod = ToolboxExec_Impl ;
+ StateMethod = ToolboxState_Impl ;
+ ]
+
+ SID_TOGGLEOPTIONBAR // ole(no) api(final/play/rec)
+ [
+ ExecMethod = ToolboxExec_Impl ;
+ StateMethod = ToolboxState_Impl ;
+ ]
+
+ //---------------------------------------------------------------------
+ SID_TOGGLEFUNCTIONBAR // ole(no) api(final/play/rec)
+ [
+ ExecMethod = ToolboxExec_Impl ;
+ StateMethod = ToolboxState_Impl ;
+ ]
+
+ //---------------------------------------------------------------------
+ SID_TOGGLEOBJECTBAR // ole(no) api(final/play/rec)
+ [
+ ExecMethod = ToolboxExec_Impl ;
+ StateMethod = ToolboxState_Impl ;
+ ]
+
+ //---------------------------------------------------------------------
+ SID_TOGGLETOOLBAR // ole(no) api(final/play/rec)
+ [
+ ExecMethod = ToolboxExec_Impl ;
+ StateMethod = ToolboxState_Impl ;
+ ]
+
+ //---------------------------------------------------------------------
+ SID_TOGGLESTATUSBAR // ole(no) api(final/play/rec)
+ [
+ ExecMethod = MiscExec_Impl ;
+ StateMethod = MiscState_Impl ;
+ ]
+
+ SID_STYLE_DESIGNER // ole(no) api(final/play/rec)
+ [
+ ReadOnlyDoc = FALSE ;
+ ExecMethod = ChildWindowExecute ;
+ StateMethod = ChildWindowState ;
+ ]
+
+ // Window.Document
+ SID_DOCUMENT
+ [
+ StateMethod = PropState_Impl;
+ ]
+
+ // Window.GetTopWindow
+ SID_TOPWINDOW
+ [
+ StateMethod = PropState_Impl;
+ ]
+
+ // Window.ParentWindow
+ SID_PARENTFRAME
+ [
+ StateMethod = PropState_Impl;
+ ]
+
+ // Window.IsTopWindow
+ SID_ISTOP
+ [
+ StateMethod = PropState_Impl;
+ ]
+
+ // Window.GetActiveFrameWindow
+ SfxObjectItem ActiveFrameWindow SID_ACTIVEWINDOW
+ [
+ StateMethod = PropState_Impl;
+ ]
+
+ // Window.GetFrameCount
+ SID_FRAMECOUNT
+ [
+ StateMethod = PropState_Impl;
+ ]
+
+ // Window.GetFrameWindow( "Name" )
+ SID_FILLFRAME
+ [
+ ExecMethod = ExecView_Impl;
+ ]
+
+ // Nur f"ur Gestalter: Slot mu\s vorhanden sein
+ SID_STYLE_NEW
+ [
+ Export = FALSE;
+ ]
+
+ // Nur f"ur Gestalter: Slot mu\s vorhanden sein
+ SID_STYLE_DRAGHIERARCHIE
+ [
+ Export = FALSE;
+ ]
+
+ SID_CLEARHISTORY // ole(no) api(final/play/rec)
+ [
+ ExecMethod = ExecHistory_Impl ;
+ StateMethod = StateHistory_Impl ;
+ ]
+
+ SID_UNDO // ole(no) api(final/play/rec)
+ [
+ ExecMethod = ExecHistory_Impl ;
+ StateMethod = StateHistory_Impl ;
+ ]
+
+ SID_REDO // ole(no) api(final/play/rec)
+ [
+ ExecMethod = ExecHistory_Impl ;
+ StateMethod = StateHistory_Impl ;
+ ]
+
+ SID_REPEAT // ole(no) api(final/play/rec)
+ [
+ ExecMethod = ExecHistory_Impl ;
+ StateMethod = StateHistory_Impl ;
+ ]
+
+ // Basic-only property Window.Selection
+ SbxObject Selection SID_SELECTION // ole(no) api(final/play/rec)
+ [
+ ]
+
+ // Basic-only property: Window.View
+ SbxObject View SID_VIEW
+ [
+ ]
+
+ // Stringlist mit den Verben( SFX only )
+ SID_OBJECT // ole(no) api(no)
+ [
+ StateMethod = GetState_Impl ;
+ ]
+
+ // F"ur slots.sdc-Macros eingebaut
+ SfxStringItem ConvertString SID_CONVERTSTRING
+ (
+ SfxStringItem Which SID_CONVERTSTRING
+ )
+ [
+ ExecMethod = ExecView_Impl ;
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Synchron;
+ Container = TRUE,
+ PlugComm = FALSE,
+ Export = TRUE,
+ Hidden = TRUE,
+ IsCollection = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_APPLICATION;
+ ]
+/*
+ SfxStringItem GetHelpText SID_HELP_STRING
+ (
+ SfxUInt16Item Which SID_CONFIGITEMID
+ )
+ [
+ ExecMethod = ExecView_Impl ;
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Synchron;
+ Container = TRUE,
+ PlugComm = FALSE,
+ Export = TRUE,
+ Hidden = TRUE,
+ IsCollection = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_APPLICATION;
+ ]
+
+ SfxStringItem GetFunctionName SID_METHODNAME
+ (
+ SfxUInt16Item Which SID_CONFIGITEMID
+ )
+ [
+ ExecMethod = ExecView_Impl ;
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Synchron;
+ Container = TRUE,
+ PlugComm = FALSE,
+ Export = TRUE,
+ Hidden = TRUE,
+ IsCollection = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_APPLICATION;
+ ]
+
+ SfxBoolItem IsToolboxConfig SID_CONFIGITEMID
+ (
+ SfxUInt16Item Which SID_CONFIGITEMID
+ )
+ [
+ ExecMethod = ExecView_Impl ;
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Synchron;
+ Container = TRUE,
+ PlugComm = FALSE,
+ Export = TRUE,
+ Hidden = TRUE,
+ IsCollection = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_APPLICATION;
+ ]
+*/
+}
+
+interface BrowseWindow : Window
+[
+ Automation = FALSE ;
+]
+{
+ SID_ACTIVATE // ole(no) api(final/play/rec)
+ [
+ // Implementierung in Subklassen
+ ]
+
+ SID_NEWWINDOW // ole(no) api(play/rec)
+ [
+ ExecMethod = ExecView_Impl ;
+ StateMethod = StateView_Impl ;
+ ]
+
+ SID_EDITDOC // ole(?opt) api(play/rec)
+ [
+ ExecMethod = ExecReload_Impl ;
+ StateMethod = StateReload_Impl ;
+ ]
+
+ SID_RELOAD // ole(?opt) api(play/rec)
+ [
+ ExecMethod = ExecReload_Impl ;
+ StateMethod = StateReload_Impl ;
+ ]
+
+ SID_VIEWSHELL // ole(no) api(no)
+ [
+ ExecMethod = ExecView_Impl ;
+ StateMethod = StateView_Impl ;
+ ]
+
+ SID_VIEWSHELL0 // ole(no) api(no)
+ [
+ ExecMethod = ExecView_Impl ;
+ StateMethod = StateView_Impl ;
+ ]
+
+ SID_VIEWSHELL1 // ole(no) api(no)
+ [
+ ExecMethod = ExecView_Impl ;
+ StateMethod = StateView_Impl ;
+ ]
+
+ SID_VIEWSHELL2 // ole(no) api(no)
+ [
+ ExecMethod = ExecView_Impl ;
+ StateMethod = StateView_Impl ;
+ ]
+
+ SID_VIEWSHELL3 // ole(no) api(no)
+ [
+ ExecMethod = ExecView_Impl ;
+ StateMethod = StateView_Impl ;
+ ]
+
+ SID_VIEWSHELL4 // ole(no) api(no)
+ [
+ ExecMethod = ExecView_Impl ;
+ StateMethod = StateView_Impl ;
+ ]
+}
+
+interface TopWindow : BrowseWindow
+[
+ Automation = FALSE ;
+]
+{
+ SID_WIN_FULLSCREEN // ole(no) api(final/play/rec)
+ [
+ ExecMethod = MiscExec_Impl ;
+ StateMethod = MiscState_Impl ;
+ ]
+
+ SID_FRAMETITLE // ole(no) api(play/rec)
+ [
+ StateMethod = StateView_Impl ;
+ ]
+
+ //---------------------------------------------------------------------
+ SID_WIN_POSSIZE // ole(no) api(final/play/rec)
+ [
+ ExecMethod = Exec_Impl ;
+ StateMethod = GetState_Impl ;
+ ]
+
+ //---------------------------------------------------------------------{
+ SID_OPTIMIZEWIN // ole(no) api(final/play/rec)
+ [
+ ExecMethod = Exec_Impl ;
+ StateMethod = GetState_Impl ;
+ ]
+
+ //---------------------------------------------------------------------{
+ SID_WIN_MINIMIZED // ole(no) api(final/play/rec)
+ [
+ ExecMethod = Exec_Impl ;
+ StateMethod = GetState_Impl ;
+ ]
+
+ //---------------------------------------------------------------------{
+ SID_WIN_MAXIMIZED // ole(no) api(final/play/rec)
+ [
+ ExecMethod = Exec_Impl ;
+ StateMethod = GetState_Impl ;
+ ]
+
+ //---------------------------------------------------------------------{
+ SID_RESTOREWIN // ole(no) api(final/play/rec)
+ [
+ ExecMethod = Exec_Impl ;
+ StateMethod = GetState_Impl ;
+ ]
+
+ //---------------------------------------------------------------------
+ SID_CLOSEWIN // ole(no) api(final/play/rec)
+ [
+ ExecMethod = Exec_Impl ;
+ StateMethod = GetState_Impl ;
+ ]
+
+ //---------------------------------------------------------------------
+ SID_BROWSE_FORWARD // ole(no) api()
+ [
+ ExecMethod = INetExecute_Impl ;
+ StateMethod = INetState_Impl ;
+ ]
+
+ //---------------------------------------------------------------------
+ SID_BROWSE_BACKWARD // ole(no) api()
+ [
+ ExecMethod = INetExecute_Impl ;
+ StateMethod = INetState_Impl ;
+ ]
+
+ //---------------------------------------------------------------------
+ SID_BROWSE_HOME // ole(no) api()
+ [
+ ExecMethod = INetExecute_Impl ;
+ StateMethod = INetState_Impl ;
+ ]
+
+ //---------------------------------------------------------------------
+ SID_CREATELINK // ole(no) api()
+ [
+ ExecMethod = INetExecute_Impl ;
+ StateMethod = INetState_Impl ;
+ ]
+}
+
+ //=========================================================================
+
+shell SfxViewFrame
+
+/* [Beschreibung]
+
+ Funktionalit"at jedes Fensters, in dem spezifische Views (Ansichten)
+ eines Dokuments dargestellt werden. Angesprochen werden diese Objekte
+ entweder als 'ActiveWindow' oder mit dem Namen des Dokuments (i.d.R.
+ der Dateiname) ohne Pfad aber mit der Nummer des Fensters, alles in eckigen Klammern (z.B. als
+ '[unbenannt1:1]' oder '[brief6.sdw:4]'). Im Ggs. zur Anzeige in der
+ Caption-Bar (solange nur ein Fenster f"ur das betreffende Dokument
+ existiert) darf die Nummer niemals ausgelassen werden. Die Numerierung
+ beginnt bei 1 und ist f"ur die Existenz des Fensters stabil.
+
+
+ [Anmerkung]
+
+ Im StarWriter ist das Verhalten einiger dieser Funktionen nicht definiert,
+ da dieser seinen eigenen History-Mechanismus hat.
+*/
+
+
+{
+ import BrowseWindow [Automation];
+}
+
+/*-------------------------------------------------------------------------
+
+ $Log: not supported by cvs2svn $
+ Revision 1.48 2000/09/12 10:42:32 mba
+ ChildWindow slot all in SfxViewFrame
+
+ Revision 1.47 2000/09/01 17:32:04 mba
+ some slots moved from appslots
+
+ Revision 1.46 1998/07/29 09:42:28 MI
+ #53054# Bookmarks auch ohne alten Explorer ablegbar
+
+
+ Rev 1.45 29 Jul 1998 11:42:28 MI
+ #53054# Bookmarks auch ohne alten Explorer ablegbar
+
+ Rev 1.44 16 Jan 1998 11:34:08 MBA
+ Topframe und Taskframe zusammengefasst
+
+ Rev 1.43 13 Nov 1997 12:51:56 MBA
+ Property Name gehoert in base class
+
+ Rev 1.42 28 Aug 1997 12:22:30 MBA
+ Neue Interface-Namen; BrowseWindow
+
+ Rev 1.40 28 May 1997 15:14:42 TLX
+ DOCFRAME war doppelt
+
+ Rev 1.39 13 May 1997 17:52:40 MBA
+ SID_VIEW fuer OLE-Automation
+
+ Rev 1.38 09 May 1997 18:15:16 MBA
+ Neue Slots fuer Frames-Handling ( BASIC, C-API )
+
+ Rev 1.37 06 Apr 1997 12:38:48 NF
+ syntax
+
+ Rev 1.36 05 Apr 1997 20:51:16 NF
+ Syntax
+
+ Rev 1.35 06 Mar 1997 12:38:06 MBA
+ Slots fuer Bmp-Listen
+
+ Rev 1.34 04 Mar 1997 12:37:54 MI
+ SID_TOPWINDOW
+
+ Rev 1.33 23 Feb 1997 21:20:50 MBA
+ SID_RELOAD, SID_EDITDOC raus
+
+ Rev 1.32 18 Dec 1996 15:57:42 MI
+ SID_LASTVERSIONDOC
+
+ Rev 1.31 09 Dec 1996 12:04:50 MBA
+ Helptext,Configname raus
+
+ Rev 1.30 06 Dec 1996 10:44:34 MI
+ Document-Property (SID_DOCUMENT)
+
+ Rev 1.29 28 Nov 1996 09:58:58 MBA
+ Voruebergehend: SID_CONVERTSTRING
+
+ Rev 1.28 06 Nov 1996 10:55:50 TLX
+ Gestalter Defaults
+
+ Rev 1.27 24 Oct 1996 13:49:36 MI
+ #32691# (OLE)-Object-Menu auch in plugins enablen
+
+ Rev 1.26 22 Oct 1996 20:10:16 HJS
+ merge 22.10.96
+
+ Rev 1.25 08 Oct 1996 14:30:36 HJS
+ merge 08.10.96
+
+ Rev 1.24 24 Sep 1996 16:37:54 MBA
+ SID_FRAME_TITLE in newslots.idl
+
+ Rev 1.23 12 Sep 1996 17:32:28 TLX
+ FRAMETITLE
+
+ Rev 1.22 12 Sep 1996 15:44:50 MBA
+
+
+ Rev 1.21 11 Sep 1996 13:09:58 TLX
+ LASTVERSION und EDITDOC in den ViewFrame
+
+ Rev 1.20 09 Sep 1996 16:42:40 MBA
+ Neue Slotfiles
+
+ Rev 1.19 30 Aug 1996 13:42:26 HJS
+ eu...
+
+ Rev 1.18 27 Aug 1996 18:55:42 MBA
+ SID_VIEWSHELL etc. an ViewFrame
+
+ Rev 1.17 30 Jul 1996 15:41:02 MI
+ fix #29879# Undo/Redo waren beim asynch laden enabled
+
+ Rev 1.16 16 Jul 1996 13:14:04 TLX
+ PlugComm eingetragen
+
+ Rev 1.15 12 Jul 1996 13:51:30 MI
+ fix #29412# Redo/Repeat waren Method+R/W-Prop daher GPF aus BASIC
+
+ Rev 1.14 08 Jul 1996 16:50:16 HJS
+ uebersetzung
+
+ Rev 1.13 30 Mar 1996 21:13:40 MI
+ Selection-Object jetzt per Property (effizienter)
+
+ Rev 1.12 20 Feb 1996 17:29:38 MI
+ Selection-Property
+
+ Rev 1.11 12 Dec 1995 18:50:54 MI
+ Ableitung von _Object
+
+ Rev 1.10 05 Dec 1995 10:46:30 MI
+ Fix #22800 Rechtschreibfehler
+
+ Rev 1.9 05 Dec 1995 09:36:16 MI
+ interne Interfaces nicht exportieren
+
+ Rev 1.8 28 Nov 1995 17:34:16 MI
+ neue Tags
+
+ Rev 1.7 23 Nov 1995 17:29:56 MI
+ neue IDL
+
+ Rev 1.6 18 Oct 1995 09:00:48 MI
+ Properties und Methoden duerfen nicht den gleichen Namen haben
+
+ Rev 1.5 17 Oct 1995 16:14:52 KL
+ Ueberarbeitung nach MS-Standard
+
+ Rev 1.4 11 Oct 1995 18:16:02 MI
+ undo: MS-kompatible Namen
+
+ Rev 1.3 06 Oct 1995 15:51:08 MI
+ HelpTexts scharfgeschaltet
+
+ Rev 1.2 29 Aug 1995 14:06:52 MI
+ Checkliste eingebaut
+
+-------------------------------------------------------------------------*/
+
+
+
+
+
diff --git a/sfx2/sdi/makefile.mk b/sfx2/sdi/makefile.mk
new file mode 100644
index 000000000000..2e489d83cd7c
--- /dev/null
+++ b/sfx2/sdi/makefile.mk
@@ -0,0 +1,105 @@
+#*************************************************************************
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.1.1.1 $
+#
+# last change: $Author: hr $ $Date: 2000-09-18 16:52:25 $
+#
+# The Contents of this file are made available subject to the terms of
+# either of the following licenses
+#
+# - GNU Lesser General Public License Version 2.1
+# - Sun Industry Standards Source License Version 1.1
+#
+# Sun Microsystems Inc., October, 2000
+#
+# GNU Lesser General Public License Version 2.1
+# =============================================
+# Copyright 2000 by Sun Microsystems, Inc.
+# 901 San Antonio Road, Palo Alto, CA 94303, USA
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License version 2.1, as published by the Free Software Foundation.
+#
+# This library 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 for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+#
+# Sun Industry Standards Source License Version 1.1
+# =================================================
+# The contents of this file are subject to the Sun Industry Standards
+# Source License Version 1.1 (the "License"); You may not use this file
+# except in compliance with the License. You may obtain a copy of the
+# License at http://www.openoffice.org/license.html.
+#
+# Software provided under this License is provided on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+# See the License for the specific provisions governing your rights and
+# obligations concerning the Software.
+#
+# The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+#
+# Copyright: 2000 by Sun Microsystems, Inc.
+#
+# All Rights Reserved.
+#
+# Contributor(s): _______________________________________
+#
+#
+#
+#*************************************************************************
+
+PRJ=..
+
+PRJNAME=sfx2
+TARGET=sfxslots
+.INCLUDE : $(PRJ)$/util$/makefile.pmk
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : svpre.mk
+.INCLUDE : settings.mk
+.INCLUDE : sv.mk
+
+SDINAME=$(TARGET)
+SDIEXPORT=newslots
+SIDHRCNAME=sfx.hrc
+
+# --- Files --------------------------------------------------------
+
+SVSDIDEPEND= \
+ $(PRJ)$/inc$/sfxsids.hrc \
+ sfx.sdi \
+ appslots.sdi \
+ sfxslots.sdi \
+ options.sdi \
+ progress.sdi \
+ docslots.sdi \
+ ipfslots.sdi \
+ mdislots.sdi \
+ viwslots.sdi \
+ pinslots.sdi \
+ frsslots.sdi \
+ object.sdi \
+ frmslots.sdi \
+ genslots.sdi \
+ newslots.sdi
+
+SRCFILES = \
+ sfxslots.src
+
+# --- Targets -------------------------------------------------------
+
+.INCLUDE : target.mk
+
diff --git a/sfx2/sdi/mdislots.sdi b/sfx2/sdi/mdislots.sdi
new file mode 100644
index 000000000000..e177b74ce674
--- /dev/null
+++ b/sfx2/sdi/mdislots.sdi
@@ -0,0 +1,404 @@
+/*=========================================================================
+ shell SfxMDIFrame
+
+ (C) 1994-1995 StarDivision GmbH, Hamburg, Germany
+ $Author: hr $ $Date: 2000-09-18 16:52:25 $ $Revision: 1.1.1.1 $
+ $Logfile: T:/sfx2/sdi/mdislots.sdv $ $Workfile: MDISLOTS.SDI $
+=========================================================================*/
+
+
+
+
+interface Windows : Collection
+[
+ uuid = "7ADC8720-1114-101D-B8ED-3273768855A7" ;
+]
+{
+ //---------------------------------------------------------------------
+ SID_CASCADEWINS // ole(no) api(final/play/rec)
+ [
+ ExecMethod = MiscExec_Impl ;
+ StateMethod = MiscState_Impl ;
+ ]
+
+ //---------------------------------------------------------------------
+ SID_TILEWINS // ole(no) api(final/play/rec)
+ [
+ ExecMethod = MiscExec_Impl ;
+ StateMethod = MiscState_Impl ;
+ ]
+
+ //---------------------------------------------------------------------
+ SID_HORIZONTALWINS // ole(no) api(final/play/rec)
+ [
+ ExecMethod = MiscExec_Impl ;
+ StateMethod = MiscState_Impl ;
+ ]
+
+ //---------------------------------------------------------------------
+ SID_VERTICALWINS // ole(no) api(final/play/rec)
+ [
+ ExecMethod = MiscExec_Impl ;
+ StateMethod = MiscState_Impl ;
+ ]
+
+ //---------------------------------------------------------------------
+ SID_ARRANGEICONS // ole(no) api(final/play/rec)
+ [
+ ExecMethod = MiscExec_Impl ;
+ StateMethod = MiscState_Impl ;
+ ]
+
+ //---------------------------------------------------------------------
+ SID_CLOSEWINS // ole(opt) api(final/play/rec)
+ [
+ ExecMethod = MiscExec_Impl ;
+ StateMethod = MiscState_Impl ;
+ ]
+
+ //---------------------------------------------------------------------
+ SID_MINIMIZEWINS // ole(no) api(final/play/rec)
+ [
+ ExecMethod = MiscExec_Impl ;
+ StateMethod = MiscState_Impl ;
+ ]
+}
+
+
+interface Task : Object
+[
+ uuid = "FC02CBE1-8D8A-11d1-89CC-00A0249D57BE" ;
+
+]
+{
+ //-----------------------------------------------------------------
+ SfxVoidItem CloseActiveWindow SID_CLOSEWIN ()
+ [
+ ExecMethod = Exec_Impl ;
+ StateMethod = State_Impl ;
+ ]
+ //---------------------------------------------------------------------
+ SID_FLOATING_TASK
+ [
+ ExecMethod = Exec_Impl ;
+ StateMethod = State_Impl ;
+ ]
+ //---------------------------------------------------------------------
+ SID_INSERT_TASKFRAME
+ [
+ ExecMethod = Exec_Impl ;
+ StateMethod = State_Impl ;
+ ]
+ //---------------------------------------------------------------------
+ SID_TASK_ALWAYSVISIBLE
+ [
+ ExecMethod = Exec_Impl ;
+ StateMethod = State_Impl ;
+ ]
+ //---------------------------------------------------------------------
+ SfxBoolItem Tile SID_TILEDOCKWINS // ole(no) api(final/play/rec)
+ [
+ ExecMethod = Exec_Impl ;
+ StateMethod = State_Impl ;
+ ]
+
+ //---------------------------------------------------------------------
+ SfxBoolItem ArrangeHorizontal SID_HORIZONTALDOCKWINS // ole(no) api(final/play/rec)
+ [
+ ExecMethod = Exec_Impl ;
+ StateMethod = State_Impl ;
+ ]
+
+ //---------------------------------------------------------------------
+ SfxBoolItem ArrangeVertical SID_VERTICALDOCKWINS // ole(no) api(final/play/rec)
+ [
+ ExecMethod = Exec_Impl ;
+ StateMethod = State_Impl ;
+ ]
+
+ SID_ACTIVEWINDOW
+ [
+ StateMethod = State_Impl;
+ ]
+
+ SID_CLOSETASK
+ [
+ ExecMethod = Exec_Impl ;
+ StateMethod = State_Impl ;
+ ]
+
+ SID_NEXTWINDOW
+ [
+ ExecMethod = Exec_Impl ;
+ StateMethod = State_Impl ;
+ ]
+
+ SID_PREVWINDOW
+ [
+ ExecMethod = Exec_Impl ;
+ StateMethod = State_Impl ;
+ ]
+}
+
+interface TaskPartWindow : TopWindow
+[
+ uuid = "A5EEDEF0-9CA3-11D1-AA41-00A0249D57BE";
+]
+{
+ // Window.Task
+ SID_TASK
+ [
+ StateMethod = GetState_Impl;
+ ]
+}
+
+ //=========================================================================
+
+shell SfxTopViewFrame : SfxViewFrame
+
+/* [Beschreibung]
+
+ Funktionalit"at jedes MDI-Fensters, in dem spezifische Views (Ansichten)
+ eines Dokuments dargestellt werden. Angesprochen werden diese Objekte
+ entweder als 'ActiveWindow' oder mit dem Namen des Dokuments (i.d.R.
+ der Dateiname) ohne Pfad aber mit der Nummer des Fensters, alles in eckigen Klammern (z.B. als
+ '[unbenannt1:1]' oder '[brief6.sdw:4]'). Im Ggs. zur Anzeige in der
+ Caption-Bar (solange nur ein Fenster f"ur das betreffende Dokument
+ existiert) darf die Nummer niemals ausgelassen werden. Die Numerierung
+ beginnt bei 1 und ist f"ur die Existenz des Fensters stabil.
+*/
+{
+ import TaskPartWindow [Automation];
+
+ // Slot ist schon in base interface, Exec/State-Methoden sind spezifisch
+ SID_ACTIVATE // ole(no) api(final/play/rec)
+ [
+ ExecMethod = Exec_Impl ;
+ StateMethod = GetState_Impl ;
+ ]
+
+ // Mu\s einfach nur drin sein, damit nicht disabled
+ SID_TOPDOC
+ [
+ ]
+}
+
+shell SfxExternalTopViewFrame_Impl : SfxViewFrame
+
+/* [Beschreibung]
+
+ Funktionalit"at jedes MDI-Fensters, in dem spezifische Views (Ansichten)
+ eines Dokuments dargestellt werden. Angesprochen werden diese Objekte
+ entweder als 'ActiveWindow' oder mit dem Namen des Dokuments (i.d.R.
+ der Dateiname) ohne Pfad aber mit der Nummer des Fensters, alles in eckigen Klammern (z.B. als
+ '[unbenannt1:1]' oder '[brief6.sdw:4]'). Im Ggs. zur Anzeige in der
+ Caption-Bar (solange nur ein Fenster f"ur das betreffende Dokument
+ existiert) darf die Nummer niemals ausgelassen werden. Die Numerierung
+ beginnt bei 1 und ist f"ur die Existenz des Fensters stabil.
+*/
+{
+ import TopWindow [Automation];
+
+ // Slot ist schon in base interface, Exec/State-Methoden sind spezifisch
+ SID_ACTIVATE // ole(no) api(final/play/rec)
+ [
+// ExecMethod = Exec_Impl ;
+// StateMethod = GetState_Impl ;
+ ]
+
+ // Mu\s einfach nur drin sein, damit nicht disabled
+ SID_TOPDOC
+ [
+ ]
+}
+
+shell SfxTask
+{
+ import Task [Automation];
+}
+
+/*-------------------------------------------------------------------------
+
+ $Log: not supported by cvs2svn $
+ Revision 1.66 1999/02/09 16:36:54 MBA
+ Fix #61564#: ArrangeSlots ohne Toggle
+
+
+ Rev 1.65 09 Feb 1999 17:36:54 MBA
+ Fix #61564#: ArrangeSlots ohne Toggle
+
+ Rev 1.64 20 Jan 1999 11:09:00 MBA
+ Fix #58947#: eigene Slots fuer Task-Arrange
+
+ Rev 1.63 18 Dec 1998 18:06:08 MBA
+ Fix #58947#: Next/PrevWindow
+
+ Rev 1.62 18 May 1998 13:31:48 MBA
+ ExternalTopViewFrame
+
+ Rev 1.61 04 Feb 1998 11:11:14 MBA
+ Import korrigiert
+
+ Rev 1.60 04 Feb 1998 10:45:20 MBA
+ Interface TaskPartWindow, neue TaskSlots
+
+ Rev 1.59 29 Jan 1998 10:07:20 MBA
+ SID_INSERT_FRAME jetzt SID_INSERT_TASKFRAME
+
+ Rev 1.58 26 Jan 1998 11:11:14 MBA
+ Neuer Slot SID_INSERT_FRAME
+
+ Rev 1.57 21 Jan 1998 09:53:22 MBA
+ Neue TaskSlots
+
+ Rev 1.56 19 Jan 1998 15:17:34 MBA
+ SID_SPLIT_TASK...
+
+ Rev 1.55 16 Jan 1998 11:33:50 MBA
+ SfxTopViewFrame, SfxTask
+
+ Rev 1.54 13 Nov 1997 12:49:32 MBA
+ Property Name gehoert in base class
+
+ Rev 1.53 28 Aug 1997 12:23:34 MBA
+ Neue Interface-Namen
+
+ Rev 1.52 04 Jun 1997 12:16:30 PB
+ rmv: alte Slots
+
+ Rev 1.51 23 Feb 1997 21:20:02 MBA
+ SID_RELOAD, SID_EDITDOC
+
+ Rev 1.50 19 Feb 1997 16:42:08 MBA
+ SID_TOPDOC
+
+ Rev 1.49 09 Dec 1996 12:06:30 MBA
+ Helptext,Configname raus
+
+ Rev 1.48 24 Oct 1996 13:49:34 MI
+ #32691# (OLE)-Object-Menu auch in plugins enablen
+
+ Rev 1.47 22 Oct 1996 20:10:18 HJS
+ merge 22.10.96
+
+ Rev 1.46 16 Oct 1996 15:14:50 MBA
+ SID_EDIT_FRAMESET entfernt
+
+ Rev 1.45 08 Oct 1996 14:30:38 HJS
+ merge 08.10.96
+
+ Rev 1.44 12 Sep 1996 18:19:56 TLX
+ State_Impl -> StateView_Impl
+
+ Rev 1.43 12 Sep 1996 18:13:06 TLX
+ NEWWINDOW in Window
+
+ Rev 1.42 12 Sep 1996 15:44:42 MBA
+
+
+ Rev 1.41 11 Sep 1996 13:10:10 TLX
+ LASTVERSION und EDITDOC in den ViewFrame
+
+ Rev 1.40 09 Sep 1996 16:42:48 MBA
+ Neue Slotfiles
+
+ Rev 1.39 05 Sep 1996 12:49:10 WP
+ Mergefehler
+
+ Rev 1.38 30 Aug 1996 13:41:40 HJS
+ eu...
+
+ Rev 1.38 30 Aug 1996 13:39:40 HJS
+
+ Rev 1.37 27 Aug 1996 18:55:30 MBA
+ SID_VIEWSHELL etc. an ViewFrame
+
+ Rev 1.36 19 Aug 1996 11:48:38 TLX
+ Neuer SuperCache Mode
+
+ Rev 1.35 12 Aug 1996 15:36:08 MBA
+ SID_EDIT_FRAMESETS kein ReadOnlyDoc-Slot
+
+ Rev 1.34 03 Aug 1996 09:13:12 EL
+ SID_CREATELINK_INSELECTED
+
+ Rev 1.33 30 Jul 1996 15:05:28 MI
+ fix #29621# Ablegen von Bookmarks bei unbenanntem Doc
+
+ Rev 1.32 24 Jun 1996 18:07:34 MI
+ fix #28983# 'bearbeiten' falsch geschrieben
+
+ Rev 1.31 21 Jun 1996 14:16:36 MBA
+ SID_RESTOREWIN
+
+ Rev 1.30 14 Jun 1996 16:02:14 MBA
+ ConfigName fuer SID_EDIT_FRAMESET
+
+ Rev 1.29 06 Jun 1996 18:01:28 MBA
+ New SID_EDIT_FRAMESET
+
+ Rev 1.28 28 May 1996 16:36:56 MBA
+ Neue INET-Slots
+
+ Rev 1.27 11 Mar 1996 10:32:08 MI
+ SID_EDITDOC
+
+ Rev 1.26 09 Mar 1996 17:21:24 MI
+ kein OpenUrl am ViewFrame
+
+ Rev 1.25 28 Feb 1996 21:34:52 MI
+ SID_OPENURL
+
+ Rev 1.24 17 Jan 1996 10:43:06 MI
+ Windows.Close mit Returnwert (Grosskunden)
+
+ Rev 1.23 11 Jan 1996 18:46:30 MI
+ fix #24226# Groessenaenderungen relativ Recorden
+
+ Rev 1.22 15 Dec 1995 19:06:32 MI
+ Area etc. Absolut recorden
+
+ Rev 1.21 13 Dec 1995 14:32:14 MI
+ Name-Property explizit
+
+ Rev 1.20 12 Dec 1995 18:50:32 MI
+ Windows ohne Coll...
+
+ Rev 1.19 07 Dec 1995 12:58:18 MI
+ Area
+
+ Rev 1.18 06 Dec 1995 21:56:50 MI
+ Windows
+
+ Rev 1.17 05 Dec 1995 09:36:10 MI
+ interne Interfaces nicht exportieren
+
+ Rev 1.16 04 Dec 1995 19:09:36 MI
+ Minimized/Maximized
+
+ Rev 1.15 03 Dec 1995 11:54:04 MI
+ interface Window
+
+ Rev 1.14 30 Nov 1995 10:34:20 MI
+ SwitchViewShell nicht exportiert
+
+ Rev 1.13 28 Nov 1995 17:34:18 MI
+ neue Tags
+
+ Rev 1.12 23 Nov 1995 17:30:14 MI
+ neue IDL
+
+ Rev 1.11 17 Oct 1995 16:14:54 KL
+ Ueberarbeitung nach MS-Standard
+
+ Rev 1.10 06 Oct 1995 15:51:16 MI
+ HelpTexts scharfgeschaltet
+
+ Rev 1.9 29 Aug 1995 14:07:36 MI
+ Checkliste eingebaut
+
+-------------------------------------------------------------------------*/
+
+
+
+
diff --git a/sfx2/sdi/sfx.sdi b/sfx2/sdi/sfx.sdi
new file mode 100644
index 000000000000..b34a3c309db4
--- /dev/null
+++ b/sfx2/sdi/sfx.sdi
@@ -0,0 +1,9267 @@
+//--------------------------------------------------------------------------
+SfxVoidItem AboutDialog SID_ABOUT
+()
+[
+ UnoName = "About";
+
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_APPLICATION;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem AddBookmark SID_CREATELINK
+(SfxStringItem URL SID_BOOKMARK_URL,SfxStringItem Title SID_BOOKMARK_TITLE)
+[
+ UnoName = "AddBookmark";
+
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EXPLORER;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem BrowseBackward SID_BROWSE_BACKWARD
+(SfxUInt16Item nSteps SID_BROWSE_BACKWARD)
+[
+ UnoName = "BrowseBackward";
+
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Asynchron;
+
+ /* status: */
+ SlotType = SfxStringItem
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem BrowseForward SID_BROWSE_FORWARD
+(SfxUInt16Item nSteps SID_BROWSE_FORWARD)
+[
+ UnoName = "BrowseForward";
+
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Asynchron;
+
+ /* status: */
+ SlotType = SfxStringItem
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem CancelDownloads SID_BROWSE_STOP
+()
+[
+ UnoName = "Cancel";
+
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ /* status: */
+ SlotType = SfxBoolItem
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem Close SID_CLOSEWIN
+()
+[
+ UnoName = "CloseFrame";
+
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem Copy SID_COPY
+()
+[
+ UnoName = "Copy";
+
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem CrashApp SID_CRASH
+(SfxBoolItem Direct SID_CRASH)
+[
+ UnoName = "Crash";
+
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = ;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem CreateBookmark SID_EXPLORER_CREATEBOOKMARK
+()
+[
+ UnoName = "CreateBookmark";
+
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EXPLORER;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem CreateDatabase SID_EXPLORER_CREATEDATABASE
+()
+[
+ UnoName = "CreateDatabase";
+
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EXPLORER;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem CreateFolder SID_EXPLORER_CREATEFOLDER
+()
+[
+ UnoName = "CreateFolder";
+
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EXPLORER;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem CreateFtpServer SID_EXPLORER_CREATEFTPSERVER
+()
+[
+ UnoName = "CreateFtpServer";
+
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EXPLORER;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem CreateGallery SID_EXPLORER_CREATEGALLERY
+()
+[
+ UnoName = "CreateGallery";
+
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EXPLORER;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem CreateIMapAccount SID_EXPLORER_CREATEIMAPACCOUNT
+()
+[
+ UnoName = "CreateIMapAccount";
+
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EXPLORER;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem CreateLink SID_EXPLORER_CREATELINK
+()
+[
+ UnoName = "CreateLink";
+
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EXPLORER;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem CreateLink_InSelected SID_CREATELINK_INSELECTED
+(SfxStringItem URL SID_BOOKMARK_URL,SfxStringItem Title SID_BOOKMARK_TITLE)
+[
+ UnoName = "CreateLinkInSelected";
+
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_EXPLORER;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem CreateNewsServer SID_EXPLORER_CREATENEWS
+()
+[
+ UnoName = "CreateNewsServer";
+
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EXPLORER;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem CreateOuttray SID_EXPLORER_CREATEOUTTRAY
+()
+[
+ UnoName = "CreateOuttray";
+
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EXPLORER;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem CreatePOP3Account SID_EXPLORER_CREATEPOP3ACCOUNT
+()
+[
+ UnoName = "CreatePOP3Account";
+
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EXPLORER;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem CreateSearchFolder SID_EXPLORER_CREATESEARCHFOLDER
+()
+[
+ UnoName = "CreateSearchFolder";
+
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EXPLORER;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem CreateWorkplace SID_EXPLORER_CREATEWORKPLACE
+()
+[
+ UnoName = "CreateWorkplace";
+
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EXPLORER;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem CurrentURL SID_CURRENT_URL
+
+[
+ UnoName = "CurrentURL";
+
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Asynchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = ;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem Cut SID_CUT
+()
+[
+ UnoName = "Cut";
+
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem Delete SID_DELETE
+()
+[
+ UnoName = "Delete";
+
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem IsDesktop SID_EXPLORER_ISDESKTOP
+
+[
+ UnoName = "DesktopFolder";
+
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = TRUE,
+ Container = TRUE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EXPLORER;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem ExplorerDetails SID_EXPLORER_DETAILS
+
+[
+ UnoName = "Details";
+
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EXPLORER;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem ExplorerDocinfo SID_EXPLORER_DOCINFO
+
+[
+ UnoName = "DocInfo";
+
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = TRUE,
+ Container = TRUE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EXPLORER;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem ReloadForEdit SID_EDITDOC
+(SfxBoolItem Editable SID_EDITDOC)
+[
+ UnoName = "EditDoc";
+
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Volatile,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DOCUMENT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem FocusBeamer SID_FOCUS_BEAMER
+
+[
+ UnoName = "FocusBeamer";
+
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = TRUE,
+ Container = TRUE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EXPLORER;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem FocusExplorer SID_FOCUS_EXPLORER
+
+[
+ UnoName = "FocusExplorer";
+
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = TRUE,
+ Container = TRUE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EXPLORER;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem GroupView SID_GROUPVIEW
+()
+[
+ UnoName = "GroupView";
+
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Asynchron;
+
+ /* status: */
+ SlotType = SfxStringItem
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = TRUE,
+ StatusBarConfig = TRUE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_APPLICATION;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem ImportBmkFile SID_EXPLORER_IMPORTBOOKMARKS
+()
+[
+ UnoName = "ImportBookmarks";
+
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EXPLORER;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem MakeExplorerRoot SID_EXPLORER_MAKEROOT
+()
+[
+ UnoName = "MakeRoot";
+
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EXPLORER;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem ModifiedStatus SID_DOC_MODIFIED
+
+[
+ UnoName = "Modified";
+
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = TRUE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = TRUE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem MultiQuickSearch SID_EXPLORER_MULTIQUICKSEARCH
+
+[
+ UnoName = "MultiQuickSearch";
+
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = TRUE,
+ Container = TRUE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EXPLORER;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem NextWindow SID_NEXTWINDOW
+()
+[
+ UnoName = "NextWindow";
+
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_APPLICATION;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem OpenUrl SID_OPENURL
+
+[
+ UnoName = "OpenURL";
+
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Asynchron;
+
+ /* status: */
+ SlotType = SfxStringItem
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_APPLICATION;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem Options SID_OPTIONS
+()
+[
+ UnoName = "Options";
+
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_OPTIONS;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem Paste SID_PASTE
+()
+[
+ UnoName = "Paste";
+
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Volatile,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem PGPDecode SID_PGP_DECODE
+()
+[
+ UnoName = "PGPDecode";
+
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_APPLICATION;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem PGPEncode SID_PGP_ENCODE
+(SfxBoolItem Encrypt FN_PARAM_1,SfxBoolItem Sign FN_PARAM_2)
+[
+ UnoName = "PGPEncode";
+
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_APPLICATION;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem ExplorerPreview SID_EXPLORER_PREVIEW
+
+[
+ UnoName = "Preview";
+
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = TRUE,
+ Container = TRUE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem PreviousWindow SID_PREVWINDOW
+()
+[
+ UnoName = "PreviousWindow";
+
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_APPLICATION;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem SwitchToPrevLevel SID_EXPLORER_PREVLEVEL
+()
+[
+ UnoName = "PrevLevel";
+
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EXPLORER;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem Print SID_PRINTDOC
+(SfxInt16Item from SID_PRINT_FIRST_PAGE,SfxInt16Item to SID_PRINT_LAST_PAGE,SfxInt16Item copies SID_PRINT_COPIES,SfxBoolItem silent SID_SILENT)
+[
+ UnoName = "Print";
+
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DOCUMENT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem PrintDefault SID_PRINTDOCDIRECT
+()
+[
+ UnoName = "PrintDefault";
+
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DOCUMENT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem PrinterSetup SID_SETUPPRINTER
+()
+[
+ UnoName = "PrinterSetup";
+
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DOCUMENT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem Properties SID_PROPERTIES
+()
+[
+ UnoName = "Properties";
+
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EXPLORER;
+]
+
+//--------------------------------------------------------------------------
+SfxDocumentInfoItem DocInfo SID_DOCINFO
+
+[
+ UnoName = "Properties";
+
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DOCUMENT;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem RedoAction SID_REDO
+[
+ SfxVoidItem Redo();
+
+ UnoName = "Redo";
+
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Volatile,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = TRUE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem Reload SID_RELOAD
+()
+[
+ UnoName = "Reload";
+
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Volatile,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Asynchron;
+
+ /* status: */
+ SlotType = SfxBoolItem
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DOCUMENT;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem RepeatAction SID_REPEAT
+[
+ SfxVoidItem Repeat();
+
+ UnoName = "Repeat";
+
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Volatile,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = TRUE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem Save SID_SAVEDOC
+(SfxStringItem VersionComment SID_VERSION,SfxStringItem Author SID_DOCINFO_AUTHOR)
+[
+ UnoName = "Save";
+
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Volatile,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Asynchron;
+
+ /* status: */
+ SlotType = SfxStringItem
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DOCUMENT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem SaveAs SID_SAVEASDOC
+(SfxStringItem FileName SID_FILE_NAME,SfxStringItem FilterName SID_FILTER_NAME,SfxStringItem PassWord SID_DOC_READONLY,SfxStringItem FilterOptions SID_FILE_FILTEROPTIONS)
+[
+ UnoName = "SaveAs";
+
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Asynchron;
+
+ /* status: */
+ SlotType = SfxStringItem
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DOCUMENT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem SaveAsTemplate SID_DOCTEMPLATE
+(SfxStringItem TemplateRegion SID_TEMPLATE_REGIONNAME,SfxStringItem TemplateName SID_TEMPLATE_NAME)
+[
+ UnoName = "SaveAsTemplate";
+
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_TEMPLATE;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem ScrollBodyPageDown SID_MAIL_SCROLLBODY_PAGEDOWN
+()
+[
+ UnoName = "ScrollMailBodyPageDown";
+
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_EXPLORER;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem ExecuteSearch FID_SEARCH_NOW
+(SvxSearchItem SearchItem SID_SEARCH_ITEM)
+[
+ UnoName = "Search";
+
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem SearchDialog SID_SEARCH_DLG
+
+[
+ UnoName = "SearchDialog";
+
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem ExplorerSearch SID_EXPLORER_SEARCH_DLG
+
+[
+ UnoName = "SearchFolder";
+
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EXPLORER;
+]
+
+//--------------------------------------------------------------------------
+SfxUInt16Item SearchOptions SID_SEARCH_OPTIONS
+
+[
+ UnoName = "SearchOptions";
+
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_INTERN;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem SearchOriginal SID_EXPLORER_SEARCHORIGINAL
+()
+[
+ UnoName = "SearchOriginal";
+
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EXPLORER;
+]
+
+//--------------------------------------------------------------------------
+SvxSearchItem _Search SID_SEARCH_ITEM
+
+[
+ UnoName = "SearchProperties";
+
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = ;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem SelectAll SID_SELECTALL
+()
+[
+ UnoName = "SelectAll";
+
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem ExplorerSelectionSize SID_EXPLORER_SELECTIONSIZE
+
+[
+ UnoName = "SelectionSize";
+
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = TRUE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_EXPLORER;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem SetAsBookmarkDir SID_EXPLORER_MAKEBMKDIR
+()
+[
+ UnoName = "SetAsBookmarkDir";
+
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EXPLORER;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem GalleryBackground SID_GALLERY_BG_BRUSH
+(SfxStringItem ImageFile SID_FILE_NAME)
+[
+ UnoName = "SetBackgroundImage";
+
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* status: */
+ SlotType = SfxStringItem
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_INSERT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem FramesetSource SID_SOURCEVIEW
+
+[
+ UnoName = "SourceView";
+
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = TRUE,
+ Container = TRUE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_OPTIONS;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem ExplorerSymbols SID_EXPLORER_ICONS
+
+[
+ UnoName = "Symbols";
+
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EXPLORER;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem SyncExplorer SID_SYNCEXPLORER
+()
+[
+ UnoName = "SyncExplorer";
+
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Volatile,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EXPLORER;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem UndoAction SID_UNDO
+[
+ SfxVoidItem Undo();
+
+ UnoName = "Undo";
+
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Volatile,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = TRUE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem GoUpBlockSel SID_CURSORPAGEUP_SEL
+(SfxInt16Item By FN_PARAM_1)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem GoUpSel SID_CURSORUP_SEL
+(SfxInt16Item By FN_PARAM_1)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem OnSaveAs SID_ON_SAVEASDOC
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = ;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem GoLeftBlock SID_CURSORPAGELEFT
+(SfxInt16Item By FN_PARAM_1,SfxBoolItem Sel FN_PARAM_2)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem GoDownBlockSel SID_CURSORPAGEDOWN_SEL
+(SfxInt16Item By FN_PARAM_1)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem HelpDownload SID_HELP_DOWNLOAD
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EXPLORER;
+]
+
+//--------------------------------------------------------------------------
+SfxUInt16Item EditStyle SID_STYLE_EDIT
+(SfxStringItem Param SID_STYLE_EDIT,SfxUInt16Item Family SID_STYLE_FAMILY)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_TEMPLATE;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem GoToStartSel SID_CURSORTOPOFFILE_SEL
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem LoadStatusBar SID_CONFIGSTATUSBAR
+(SfxStringItem FileName SID_CFGFILE)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_OPTIONS;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem GoRightSel SID_CURSORRIGHT_SEL
+(SfxInt16Item By FN_PARAM_1)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem OnDeactivate SID_ON_DEACTIVATEDOC
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = ;
+]
+
+//--------------------------------------------------------------------------
+SfxObjectItem ActiveModule SID_ACTIVEMODULE
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ Readonly = TRUE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_DOCUMENT;
+]
+
+//--------------------------------------------------------------------------
+SfxObjectItem FileName SID_FILE_NAME
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = TRUE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = ;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem Tile SID_TILEWINS
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem GoRight SID_CURSORRIGHT
+(SfxInt16Item By FN_PARAM_1,SfxBoolItem Sel FN_PARAM_2)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem StyleCatalog SID_STYLE_CATALOG
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_TEMPLATE;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem FrameContent SID_FRAME_CONTENT
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem _PickEntry8 SID_PICK8
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Asynchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_INTERN;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem CursorEndOfScreen SID_CURSORENDOFSCREEN
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_INTERN;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem GoToStartOfRowSel SID_CURSORHOME_SEL
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem InternetSearch SID_INTERNET_SEARCH
+(SfxStringItem SearchString SID_INTERNET_SEARCH)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = ;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem GoToEndOfDataSel SID_CURSORENDOFFILE_SEL
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem ObjectBarVisible SID_TOGGLEOBJECTBAR
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem GoToEndOfData SID_CURSORENDOFFILE
+(SfxBoolItem Sel FN_PARAM_2)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem FloatingTask SID_FLOATING_TASK
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = TRUE,
+ Container = TRUE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxUInt16Item DeleteStyle SID_STYLE_DELETE
+(SfxStringItem Param SID_STYLE_DELETE,SfxUInt16Item Family SID_STYLE_FAMILY)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_TEMPLATE;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem GoLeft SID_CURSORLEFT
+(SfxInt16Item By FN_PARAM_1,SfxBoolItem Sel FN_PARAM_2)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem OnSaveDone SID_ON_SAVEDOCDONE
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = ;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem EditFrameSet SID_EDIT_FRAMESET
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Asynchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem GoToStart SID_CURSORTOPOFFILE
+(SfxBoolItem Sel FN_PARAM_2)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxUInt16Item FrameSpacing SID_FRAMESPACING
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem PartWindow SID_PARTWIN
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem WindowList SID_MDIWINDOWLIST
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem CurrentTime SID_CURRENTTIME
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Volatile,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ Readonly = TRUE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = TRUE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem FrameTitle SID_FRAMETITLE
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = TRUE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = ;
+]
+
+//--------------------------------------------------------------------------
+SfxObjectItem Document SID_DOCUMENT
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ Readonly = TRUE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_INTERN;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem Path SID_DOCPATH
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = TRUE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = ;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem DocumentManager SID_DOCMANAGER
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_APPLICATION;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem Title SID_DOCTITLE
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = TRUE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = ;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem GoToStartOfRow SID_CURSORHOME
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem NewWindow SID_NEWWINDOW
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem Comments SID_DOCINFO_COMMENTS
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = ;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem Optimize SID_OPTIMIZEWIN
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxObjectItem Open SID_DOCINFO_TITLE
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = TRUE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = ;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem SendFax FN_FAX
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DOCUMENT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem SbxDeleted SID_BASICIDE_SBXDELETED
+(SbxItem Sbx SID_BASICIDE_ARG_SBX)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_MACRO;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem Quit SID_QUITAPP
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Asynchron;
+
+ /* status: */
+ SlotType = SfxStringItem
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_APPLICATION;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem OpenUrl SID_EXECUTE
+(SfxStringItem Comand SID_EXECUTE)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_APPLICATION;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem ToolsMacroEdit SID_EDITMACRO
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_MACRO;
+]
+
+//--------------------------------------------------------------------------
+SfxObjectItem SplitHorizontal SID_SPLIT_HORIZONTAL
+(SfxStringItem Frame SID_FRAMETITLE)
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem IsLoading SID_DOC_LOADING
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ Readonly = TRUE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxInt32Item CompareDocuments SID_DOCUMENT_COMPARE
+(SfxStringItem FileName SID_FILE_NAME,SfxStringItem FilterName SID_FILTER_NAME,SfxStringItem FilterFlags SID_FILE_FILTEROPTIONS,SfxInt16Item Version SID_VERSION)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem _SwitchViewShell1 SID_VIEWSHELL1
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Asynchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem DeleteFrame SID_DELETE_FRAME
+(SfxStringItem Frame SID_FRAMETITLE)
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem ReleaseObject SID_DELETE_BASICOBJECT
+(SfxObjectItem Object SID_DELETE_BASICOBJECT)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = ;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem GoToEndOfRowSel SID_CURSOREND_SEL
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem Close SID_CLOSETASK
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem FormatMenu SID_FORMATMENU
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem HyperlinkDialog SID_HYPERLINK_DIALOG
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem CursorTopOfScreen SID_CURSORTOPOFSCREEN
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_INTERN;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem ConfigureToolboxVisible SID_CUSTOMIZETOOLBOX
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Asynchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_OPTIONS;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem GoUp SID_CURSORUP
+(SfxInt16Item By FN_PARAM_1,SfxBoolItem Sel FN_PARAM_2)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem StartApplication SID_START_APP
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_APPLICATION;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem Caption SID_CAPTION
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ Readonly = TRUE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = ;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem GoUpBlock SID_CURSORPAGEUP
+(SfxInt16Item By FN_PARAM_1,SfxBoolItem Sel FN_PARAM_2)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem Author SID_DOCINFO_AUTHOR
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = ;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem ReadOnly SID_DOC_READONLY
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = TRUE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = ;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem DesktopMode SID_DESKTOPMODE
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_APPLICATION;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem UnloadLibrary SID_UNLOAD_LIBRARY
+(SfxStringItem LibraryName SID_UNLOAD_LIBRARY)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_MACRO;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem PrivateUse SID_OFFICE_PRIVATE_USE
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_SPECIAL;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem LibLoaded SID_BASICIDE_LIBLOADED
+(SfxStringItem LibName SID_BASICIDE_ARG_LIBNAME)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* status: */
+ SlotType = SfxStringItem
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_MACRO;
+]
+
+//--------------------------------------------------------------------------
+SfxObjectItem Selection SID_SELECTION
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ Readonly = TRUE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = ;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem SearchOriginal SID_SEARCHORIGINAL
+(SfxStringItem FileName SID_FILE_NAME)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_EXPLORER;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem FileDocument SID_SAVEDOCTOBOOKMARK
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DOCUMENT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem SaveAll SID_SAVEDOCS
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_APPLICATION;
+]
+
+//--------------------------------------------------------------------------
+SfxObjectItem StarWriter SID_STARWRITER
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ Readonly = TRUE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = ;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem SelectionTextExt SID_SELECTION_TEXT_EXT
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ Readonly = TRUE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = ;
+]
+
+//--------------------------------------------------------------------------
+SfxObjectItem Task SID_TASK
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ Readonly = TRUE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_DOCUMENT;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem SelectionText SID_SELECTION_TEXT
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ Readonly = TRUE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = ;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem Recording SID_RECORDMACRO
+[
+ SfxVoidItem StopRecording();
+
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ Readonly = TRUE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_MACRO;
+]
+
+//--------------------------------------------------------------------------
+SfxInt32Item MergeDocuments SID_DOCUMENT_MERGE
+(SfxStringItem FileName SID_FILE_NAME,SfxInt16Item Version SID_VERSION)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem FullName SID_PROGFILENAME
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ Readonly = TRUE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = ;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem PrintPreview SID_PRINTPREVIEW
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = TRUE,
+ Container = FALSE,
+ Asynchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem SaveConfiguration SID_SAVECONFIG
+(SfxStringItem FileName SID_CFGFILE)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_OPTIONS;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem SaveAsUrl SID_SAVEASURL
+(SfxStringItem FileName SID_FILE_NAME,SfxStringItem FilterName SID_FILTER_NAME,SfxStringItem PassWord SID_DOC_READONLY,SfxStringItem FilterOptions SID_FILE_FILTEROPTIONS)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Asynchron;
+
+ /* status: */
+ SlotType = SfxStringItem
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DOCUMENT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem Repaint SID_REPAINT
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem StatusBarVisible SID_TOGGLESTATUSBAR
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = TRUE,
+ Container = TRUE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem StartMenu SID_STARTMENU
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Asynchron;
+
+ /* status: */
+ SlotType = SfxStringItem
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_APPLICATION;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem JumpToMark SID_JUMPTOMARK
+(SfxStringItem Bookmark ID_VAL_DUMMY0)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxObjectItem StarDraw SID_STARDRAW
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ Readonly = TRUE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = ;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem RemoveLibrary SID_REMOVE_LIBRARY
+(SfxStringItem LibraryName SID_REMOVE_LIBRARY)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_MACRO;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem InternetUpdate SID_INTERNET_UPDATE
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = TRUE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EXPLORER;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem StatusBar SID_STATUSBARTEXT
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = ;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem IsTopWindow SID_ISTOP
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ Readonly = TRUE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = ;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem LoadConfiguration SID_LOADCONFIG
+(SfxStringItem FileName SID_CFGFILE)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_OPTIONS;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem MailWindow SID_MAIL_CHILDWIN
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem MailReadDialog SID_MAIL_INBOX
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Asynchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_EXPLORER;
+]
+
+//--------------------------------------------------------------------------
+SfxObjectItem OpenTemplate SID_OPENTEMPLATE
+(SfxStringItem Region SID_TEMPLATE_REGIONNAME,SfxStringItem Name SID_TEMPLATE_NAME)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_TEMPLATE;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem Printer SID_PRINTER_NAME
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Asynchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = ;
+]
+
+//--------------------------------------------------------------------------
+SfxObjectItem SplitParentVertical SID_SPLIT_PARENT_VERTICAL
+(SfxStringItem Frame SID_FRAMETITLE)
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem LoadLibrary SID_LOAD_LIBRARY
+(SfxStringItem LibraryName SID_LOAD_LIBRARY)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_MACRO;
+]
+
+//--------------------------------------------------------------------------
+SfxObjectItem SplitParentHorizontal SID_SPLIT_PARENT_HORIZONTAL
+(SfxStringItem Frame SID_FRAMETITLE)
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem OnSave SID_ON_SAVEDOC
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = ;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem Visible SID_WIN_VISIBLE
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = ;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem OnPrepareClose SID_ON_PREPARECLOSEDOC
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = ;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem OnOpen SID_ON_OPENDOC
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = ;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem PlayMacro SID_PLAYMACRO
+(SfxStringItem Statement SID_STATEMENT,SfxBoolItem Asynchron SID_ASYNCHRON)
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_MACRO;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem CommercialUse SID_OFFICE_COMMERCIAL_USE
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_SPECIAL;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem OnStart SID_ON_STARTAPP
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = ;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem BasicStepOut SID_BASICSTEPOUT
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem OnQuit SID_ON_CLOSEAPP
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = ;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem OldPALK SID_OLD_PALK
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ Readonly = TRUE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_SPECIAL;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem OfficeVersionId SID_OFFICE_VERSION_ID
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = TRUE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_SPECIAL;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem SetOptions SID_SETOPTIONS
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = ;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem OnCreate SID_ON_CREATEDOC
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = ;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem OnClose SID_ON_CLOSEDOC
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = ;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem SetPALK SID_OFFICE_PALK
+(SfxStringItem PALK SID_OFFICE_PALK)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_SPECIAL;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem Beamer SID_BROWSER
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem SendMail SID_MAIL_SENDDOC
+(SfxStringItem Recipient SID_MAIL_RECIPIENT,SfxStringItem Subject SID_MAIL_SUBJECT,SfxStringItem MailText SID_MAIL_TEXT,SfxUInt16Item Priority SID_MAIL_PRIORITY,SfxBoolItem AttachedDoc SID_MAIL_ATTACH,SfxStringItem AttachFiles SID_MAIL_ATTACH_FILE)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Asynchron;
+
+ /* status: */
+ SlotType = SfxStringItem
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DOCUMENT;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem _PickEntry9 SID_PICK9
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Asynchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_INTERN;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem DefaultFilePath SID_DEFAULTFILEPATH
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = ;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem IsPrinting SID_PRINTOUT
+[
+ SfxVoidItem PrintOut(SfxInt16Item from SID_PRINT_FIRST_PAGE,SfxInt16Item to SID_PRINT_LAST_PAGE,SfxInt16Item copies SID_PRINT_COPIES,SfxBoolItem silent SID_SILENT);
+
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ Readonly = TRUE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_DOCUMENT;
+]
+
+//--------------------------------------------------------------------------
+SfxObjectItem SplitVertical SID_SPLIT_VERTICAL
+(SfxStringItem Frame SID_FRAMETITLE)
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem CreateMacro SID_BASICIDE_CREATEMACRO
+(SfxMacroInfoItem aMacroInfo SID_BASICIDE_ARG_MACROINFO)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_MACRO;
+]
+
+//--------------------------------------------------------------------------
+SfxObjectItem Add SID_NEWDOC
+(SfxStringItem Region SID_TEMPLATE_REGIONNAME,SfxStringItem Name SID_TEMPLATE_NAME)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Asynchron;
+
+ /* status: */
+ SlotType = SfxStringItem
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_APPLICATION;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem _PickEntry2 SID_PICK2
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Asynchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_INTERN;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem _PickEntry1 SID_PICK1
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Asynchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_INTERN;
+]
+
+//--------------------------------------------------------------------------
+SfxObjectItem NewFrameSet SID_NEWFRAMESET
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Asynchron;
+
+ /* status: */
+ SlotType = SfxStringItem
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_APPLICATION;
+]
+
+//--------------------------------------------------------------------------
+SfxObjectItem ParentWindow SID_PARENTFRAME
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ Readonly = TRUE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_EXPLORER;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem _PickEntry7 SID_PICK7
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Asynchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_INTERN;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem _PickEntry6 SID_PICK6
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Asynchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_INTERN;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem ModifyFrame SID_MODIFY_FRAME
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem _PickEntry3 SID_PICK3
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Asynchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_INTERN;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem ArrangeVertical SID_VERTICALWINS
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem Modified SID_MODIFIED
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Volatile,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+TbxImageItem ZoomToolBox SID_ZOOM_TOOLBOX
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem VersionVisible SID_VERSION_VISIBLE
+(SfxBoolItem Show SID_VERSION_VISIBLE)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* status: */
+ SlotType = SfxBoolItem
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem ZoomIn SID_ZOOM_IN
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem HelperDialog SID_HELP_PI
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_APPLICATION;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem _SwitchViewShell0 SID_VIEWSHELL0
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Asynchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxUInt16Item SwitchViewShell SID_VIEWSHELL
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Asynchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem HelpZoomIn SID_HELP_ZOOMIN
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EXPLORER;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem HelpZoomOut SID_HELP_ZOOMOUT
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EXPLORER;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem ActiveHelp SID_HELPBALLOONS
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_APPLICATION;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem HelpMenu SID_HELPMENU
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_APPLICATION;
+]
+
+//--------------------------------------------------------------------------
+SfxUInt32Item UpdateVersion SID_UPDATE_VERSION
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = TRUE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_INTERN;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem LoadToolBox SID_TOOLBOXOPTIONS
+(SfxStringItem FileName SID_CFGFILE,SfxUInt16Item ObjectBarId SID_CONFIGITEMID)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_OPTIONS;
+]
+
+//--------------------------------------------------------------------------
+SfxObjectItem TopWindow SID_TOPWINDOW
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ Readonly = TRUE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem GetActiveTask SID_TOPDOC
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ /* status: */
+ SlotType = SfxStringItem
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EXPLORER;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem Zooming SID_ZOOM
+(SfxUInt32Item ZoomScale ID_VAL_ZOOM)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = ;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem HelpAnnotate SID_HELP_ANNOTATE
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EXPLORER;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem HelpBookmark SID_HELP_BOOKMARK
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EXPLORER;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem ArrangeVertical SID_VERTICALDOCKWINS
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem ZoomPrevious SID_ZOOM_PREV
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxObjectItem Open SID_OPENDOC
+(SfxStringItem FileName SID_FILE_NAME,SfxStringItem FilterName SID_FILTER_NAME,SfxStringItem OpenFlags SID_OPTIONS,SfxStringItem FilterFlags SID_FILE_FILTEROPTIONS,SfxInt16Item Version SID_VERSION,SfxStringItem Referer SID_REFERER)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_APPLICATION;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem Help SID_HELP
+(SfxStringItem helpfile SID_HELP_FILENAME,SfxInt32Item helpcontextID SID_HELP_CONTEXTID,SfxStringItem helpstring SID_HELP_STRING)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = ;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem HelpIndex SID_HELP_INDEX
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EXPLORER;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem _SwitchViewShell4 SID_VIEWSHELL4
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Asynchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem _SwitchViewShell3 SID_VIEWSHELL3
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Asynchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem _SwitchViewShell2 SID_VIEWSHELL2
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Asynchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxRectangleItem Area SID_WIN_POSSIZE
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = ;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem Minimized SID_WIN_MINIMIZED
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxObjectItem AddDirect SID_NEWDOCDIRECT
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Asynchron;
+
+ /* status: */
+ SlotType = SfxStringItem
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_APPLICATION;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem Maximized SID_WIN_MAXIMIZED
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxTemplateItem ParaStyle SID_STYLE_FAMILY2
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = TRUE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_DOCUMENT;
+]
+
+//--------------------------------------------------------------------------
+SfxTemplateItem CharStyle SID_STYLE_FAMILY1
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = TRUE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_DOCUMENT;
+]
+
+//--------------------------------------------------------------------------
+SfxUInt16Item ActualStyleFamily SID_STYLE_FAMILY
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_DOCUMENT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem LoadBasic SID_BASICLOAD
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_INSERT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem HelpTip SID_HELPTIPS
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_APPLICATION;
+]
+
+//--------------------------------------------------------------------------
+SfxTemplateItem TemplateFamily5 SID_STYLE_FAMILY5
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = TRUE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_DOCUMENT;
+]
+
+//--------------------------------------------------------------------------
+SfxTemplateItem PageStyle SID_STYLE_FAMILY4
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = TRUE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_DOCUMENT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem IsLoadingImages SID_IMG_LOADING
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ Readonly = TRUE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem DesignerDialog SID_STYLE_DESIGNER
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem Interactive SID_INTERACTIVEMODE
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = ;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem ExtendedHelp SID_EXTENDEDHELP
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_APPLICATION;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem InternetOnline SID_INTERNET_ONLINE
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = TRUE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = TRUE,
+ Container = TRUE,
+ Asynchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EXPLORER;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem HelpIndex SID_HELPINDEX
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_APPLICATION;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem TipsDialog SID_TIPWINDOW
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_APPLICATION;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem InsertFile SID_INSERTDOC
+(SfxStringItem Name SID_INSERTDOC,SfxStringItem Filter FN_PARAM_1)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_INSERT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem DragHierarchy SID_STYLE_DRAGHIERARCHIE
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = ;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem Title SID_TITLE
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem ArrangeHorizontal SID_HORIZONTALDOCKWINS
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem Tile SID_TILEDOCKWINS
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem OptionBarVisible SID_TOGGLEOPTIONBAR
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem NavigationBarVisible SID_TOGGLENAVBAR
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem MacroBarVisible SID_TOGGLEMACROBAR
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_OPTIONS;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem FunctionBarVisible SID_TOGGLEFUNCTIONBAR
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem StyleWatercanMode SID_STYLE_WATERCAN
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem StyleUpdateByExample SID_STYLE_UPDATE_BY_EXAMPLE
+(SfxStringItem Param SID_STYLE_UPDATE_BY_EXAMPLE,SfxUInt16Item Family SID_STYLE_FAMILY)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_TEMPLATE;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem ArrangeHorizontal SID_HORIZONTALWINS
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxUInt16Item NewStyle SID_STYLE_NEW
+(SfxStringItem Param SID_STYLE_NEW,SfxUInt16Item Family SID_STYLE_FAMILY)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_TEMPLATE;
+]
+
+//--------------------------------------------------------------------------
+SfxObjectItem ThisDocument SID_THISDOCUMENT
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = ;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem TaskBarVisible SID_TASKBAR
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem AlwaysVisible SID_TASK_ALWAYSVISIBLE
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = TRUE,
+ Container = TRUE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem ShowPopups SID_SHOWPOPUPS
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_OPTIONS;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem BrowseHome SID_BROWSE_HOME
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem AddWatch SID_BASICIDE_ADDWATCH
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_MACRO;
+]
+
+//--------------------------------------------------------------------------
+SfxObjectItem GetFrameWindow SID_FILLFRAME
+(SfxStringItem WindowName SID_FILLFRAME)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = ;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem BasicStop SID_BASICSTOP
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_MACRO;
+]
+
+//--------------------------------------------------------------------------
+SfxTemplateItem FrameStyle SID_STYLE_FAMILY3
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = TRUE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_DOCUMENT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem VersionDialog SID_VERSION
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DOCUMENT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem Cascade SID_CASCADEWINS
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem _PickEntry5 SID_PICK5
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Asynchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_INTERN;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem CheckKey SID_CHECK_KEY
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = TRUE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_SPECIAL;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem BrowseView SID_BROWSER_MODE
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Volatile,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem BeamerTaskSensitive SID_BROWSER_TASK
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = TRUE,
+ Container = TRUE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxUInt32Item BuildVersion SID_BUILD_VERSION
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = TRUE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_INTERN;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem Saved SID_DOC_SAVED
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = TRUE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = ;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem UpdateModuleSource SID_BASICIDE_UPDATEMODULESOURCE
+(SfxMacroInfoItem aMacroInfo SID_BASICIDE_ARG_MACROINFO)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_MACRO;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem MailNotifyReset SID_MAIL_NOTIFY_RESET
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = TRUE,
+ Container = TRUE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EXPLORER;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem Restore SID_RESTOREWIN
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem ToggleBreakPoint SID_BASICIDE_TOGGLEBRKPNT
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_MACRO;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem UpdateAllModuleSources SID_BASICIDE_UPDATEALLMODULESOURCES
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_MACRO;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem Close SID_CLOSEDOC
+(SfxBoolItem saveChanges SID_CLOSEDOC_SAVE,SfxStringItem fileName SID_CLOSEDOC_FILENAME)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Asynchron;
+
+ /* status: */
+ SlotType = SfxStringItem
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DOCUMENT;
+]
+
+//--------------------------------------------------------------------------
+SfxObjectItem ThisWindow SID_THISWINDOW
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = ;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem BasicStepOver SID_BASICSTEPOVER
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem SaveBasicAs SID_BASICSAVEAS
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DOCUMENT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem BasicStepInto SID_BASICSTEPINTO
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem StartRegistrationDialog SID_ONLINE_REGISTRATION_DLG
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_SPECIAL;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem FullName SID_DOCFULLNAME
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = TRUE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = ;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem FocusUrlBox SID_FOCUSURLBOX
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ /* status: */
+ SlotType = SfxStringItem
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_EXPLORER;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem RunBasic SID_BASICRUN
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem LoadEvents SID_CONFIGEVENT
+(SfxStringItem FileName SID_CFGFILE)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_OPTIONS;
+]
+
+//--------------------------------------------------------------------------
+SfxTemplateItem StyleApplyState SID_STYLE_APPLY
+[
+ SfxUInt16Item StyleApply(SfxStringItem Template SID_STYLE_APPLY,SfxUInt16Item Family SID_STYLE_FAMILY);
+
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = TRUE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DOCUMENT;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem ObjectMenue SID_OBJECT
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Asynchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem LicenceKey SID_OFFICE_PLK
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = TRUE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = ;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem LoadMenu SID_CONFIGMENU
+(SfxStringItem FileName SID_CFGFILE)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_OPTIONS;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem StatusGetDate SID_BASICIDE_STAT_DATE
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem StyleNewByExample SID_STYLE_NEW_BY_EXAMPLE
+(SfxStringItem Param SID_STYLE_NEW_BY_EXAMPLE,SfxUInt16Item Family SID_STYLE_FAMILY)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_TEMPLATE;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem NewModule SID_BASICIDE_NEWMODULE
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_MACRO;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem Closing SID_CLOSING
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = TRUE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_INTERN;
+]
+
+//--------------------------------------------------------------------------
+SfxUInt16Item FrameCount SID_FRAMECOUNT
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ Readonly = TRUE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = ;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem NameChangedOnTab SID_BASICIDE_NAMECHANGEDONTAB
+(SfxUInt16Item TabId SID_BASICIDE_ARG_TABID,SfxStringItem NewName SID_BASICIDE_ARG_MODULENAME)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_MACRO;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem ClearMemCache SID_CLEARMEMCACHE
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_OPTIONS;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem PickList SID_PICKLIST
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_APPLICATION;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem Minimize SID_MINIMIZEWINS
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem ClearDiskCache SID_CLEARDISKCACHE
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_OPTIONS;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem Navigator SID_NAVIGATOR
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxObjectItem ActiveTask SID_ACTIVETASK
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ Readonly = TRUE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_DOCUMENT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem LoadAccel SID_CONFIGACCEL
+(SfxStringItem FileName SID_CFGFILE)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_OPTIONS;
+]
+
+//--------------------------------------------------------------------------
+SfxUInt16Item MailReceipt SID_MAIL_NOTIFY
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Asynchron;
+
+ Readonly = TRUE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem Close SID_CLOSEDOCS
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_APPLICATION;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem _PickEntry4 SID_PICK4
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Asynchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_INTERN;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem Close SID_CLOSEWINS
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem Explorer SID_EXPLORER
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem CompileBasic SID_BASICCOMPILE
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_MACRO;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem CustomerNumber SID_OFFICE_CUSTOMERNUMBER
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_SPECIAL;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem InsertHyperlink SID_HYPERLINK_INSERT
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem AutoPilotMenu SID_AUTOPILOTMENU
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ /* status: */
+ SlotType = SfxStringItem
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_APPLICATION;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem MacroDialog SID_BASICCHOOSER
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_MACRO;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem BasicIDEAppear SID_BASICIDE_APPEAR
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_APPLICATION;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem BreakPointsChanged SID_BASICIDE_BRKPNTSCHANGED
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_MACRO;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem HelpChooseFile SID_HELP_HELPFILEBOX
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* status: */
+ SlotType = SfxStringItem
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_MACRO;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem StoreAllModuleSources SID_BASICIDE_STOREALLMODULESOURCES
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_MACRO;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem BasicBreak SID_BASICBREAK
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_MACRO;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem CommonTaskBarVisible SID_TOGGLECOMMONTASKBAR
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxObjectItem ActiveDocument SID_ACTIVEDOCUMENT
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ Readonly = TRUE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_DOCUMENT;
+]
+
+//--------------------------------------------------------------------------
+SfxObjectItem ActiveWindow SID_ACTIVEWINDOW
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ Readonly = TRUE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem InsertWindow SID_INSERT_TASKFRAME
+(SfxObjectItem Frame SID_INSERT_TASKFRAME,SfxBoolItem Copy SID_COPY)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxUInt16Item MetricUnit SID_ATTR_METRIC
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = ;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem InsertObjectFloatingFrame SID_INSERT_FLOATINGFRAME
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_INSERT;
+]
+
+//--------------------------------------------------------------------------
+SfxObjectItem Activate SID_ACTIVATE
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxUInt16Item UndoCount SID_ATTR_UNDO_COUNT
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = ;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem AutoHide SID_AUTOHIDE
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_APPLICATION;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem GoLeftBlockSel SID_CURSORPAGELEFT_SEL
+(SfxInt16Item By FN_PARAM_1)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem AddLibrary SID_ADD_LIBRARY
+(SfxStringItem LibraryFileName SID_FILE_NAME,SfxUInt16Item Mode SID_ADD_LIBRARY,SfxBoolItem Replace SID_REMOVE_LIBRARY,SfxStringItem LibraryName SID_LOAD_LIBRARY,SfxStringItem LibraryExternalName SID_DOCTITLE)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_MACRO;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem ArrangeIcons SID_ARRANGEICONS
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem ChooseMacro SID_BASICIDE_CHOOSEMACRO
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_MACRO;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem ToolBarVisible SID_TOGGLETOOLBAR
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem RenameCurrent SID_BASICIDE_RENAMECURRENT
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_MACRO;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem SbxInserted SID_BASICIDE_SBXINSERTED
+(SbxItem Sbx SID_BASICIDE_ARG_SBX)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_MACRO;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem SbxRenamed SID_BASICIDE_SBXRENAMED
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_MACRO;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem ObjectCatalog SID_BASICIDE_OBJCAT
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_MACRO;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem RemoveWatch SID_BASICIDE_REMOVEWATCH
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_MACRO;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem ShowBrowser SID_SHOW_BROWSER
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem StatusGetTitle SID_BASICIDE_STAT_TITLE
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = TRUE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem LateInitDone SID_LATEINIT_DONE
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ Readonly = TRUE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_APPLICATION;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem Path SID_PROGPATH
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ Readonly = TRUE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = ;
+]
+
+//--------------------------------------------------------------------------
+SfxObjectItem StarCalc SID_STARCALC
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ Readonly = TRUE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = ;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem ShowSbx SID_BASICIDE_SHOWSBX
+(SbxItem Sbx SID_BASICIDE_ARG_SBX)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem StatusGetPosition SID_BASICIDE_STAT_POS
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = TRUE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem ZoomNext SID_ZOOM_NEXT
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem LibRemoved SID_BASICIDE_LIBREMOVED
+(SfxStringItem LibName SID_BASICIDE_ARG_LIBNAME)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* status: */
+ SlotType = SfxStringItem
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_MACRO;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem MatchGroup SID_BASICIDE_MATCHGROUP
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_MACRO;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem DeleteCurrent SID_BASICIDE_DELETECURRENT
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_MACRO;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem EditMacro SID_BASICIDE_EDITMACRO
+(SfxMacroInfoItem aMacroInfo SID_BASICIDE_ARG_MACROINFO)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_MACRO;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem HideCurPage SID_BASICIDE_HIDECURPAGE
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_MACRO;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem FullScreen SID_WIN_FULLSCREEN
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Asynchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem ModuleDialog SID_BASICIDE_MODULEDLG
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_MACRO;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem NewDialog SID_BASICIDE_NEWDIALOG
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_MACRO;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem LibSelect SID_BASICIDE_LIBSELECTED
+(SfxStringItem LibName SID_BASICIDE_ARG_LIBNAME)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* status: */
+ SlotType = SfxStringItem
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_MACRO;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem LibSelector SID_BASICIDE_LIBSELECTOR
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_MACRO;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem PlugInsActive SID_PLUGINS_ACTIVE
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem GoToEndOfRow SID_CURSOREND
+(SfxBoolItem Sel FN_PARAM_2)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem GoDown SID_CURSORDOWN
+(SfxInt16Item By SID_CURSORDOWN)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem Context SID_CONTEXT
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = TRUE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem ZoomPlus SID_ZOOM_OUT
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem HelpOnHelp SID_HELPONHELP
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_APPLICATION;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem OnPrint SID_ON_PRINTDOC
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = ;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem CurrentDate SID_CURRENTDATE
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Volatile,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ Readonly = TRUE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = TRUE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem ClearHistory SID_CLEARHISTORY
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Volatile,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_OPTIONS;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem StoreModuleSource SID_BASICIDE_STOREMODULESOURCE
+(SfxMacroInfoItem aMacroInfo SID_BASICIDE_ARG_MACROINFO)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_MACRO;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem ConfigureDialog SID_CONFIG
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_OPTIONS;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem Organizer SID_ORGANIZER
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_TEMPLATE;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem RunStarWriter SID_STARTSW
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_APPLICATION;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem BookmarkMenu SID_BOOKMARKS
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ /* status: */
+ SlotType = SfxStringItem
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_APPLICATION;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem OnSaveAsDone SID_ON_SAVEASDOCDONE
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = ;
+]
+
+//--------------------------------------------------------------------------
+SfxObjectItem NewObject SID_CREATE_BASICOBJECT
+(SfxStringItem ClassName SID_CREATE_BASICOBJECT)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = ;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem GoDownSel SID_CURSORDOWN_SEL
+(SfxInt16Item By FN_PARAM_1)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem HelpSearch SID_HELP_SEARCH
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EXPLORER;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem FrameName SID_FRAME_NAME
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem Keywords SID_DOCINFO_KEYWORDS
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = ;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem OnActivate SID_ON_ACTIVATEDOC
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = ;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem GoDownBlock SID_CURSORPAGEDOWN
+(SfxInt16Item By FN_PARAM_1,SfxBoolItem Sel FN_PARAM_2)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem GoLeftSel SID_CURSORLEFT_SEL
+(SfxInt16Item By FN_PARAM_1)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_NAVIGATOR;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem Backspace SID_BACKSPACE
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_EDIT;
+]
+
diff --git a/sfx2/sdi/sfxslots.sdi b/sfx2/sdi/sfxslots.sdi
new file mode 100644
index 000000000000..3eee3ed5ff8c
--- /dev/null
+++ b/sfx2/sdi/sfxslots.sdi
@@ -0,0 +1,119 @@
+/*=========================================================================
+ module StarApplicationFrame
+
+ (C) 1994-1995 StarDivision GmbH, Hamburg, Germany
+ $Author: hr $ $Date: 2000-09-18 16:52:26 $ $Revision: 1.1.1.1 $
+ $Logfile: T:/sfx2/sdi/sfxslots.sdv $ $Workfile: SFXSLOTS.SDI $
+=========================================================================*/
+
+module
+"384E40E0-1F22-101C-9961-04021C007002"
+"5A30E000-1F22-101C-9961-04021C007002"
+StarApplicationFrame
+[
+HelpText( "StarDivision Application Framework" ),
+SlotIdFile( "sfx.hrc" )
+TypeLibFile( "sfxslots.tlb" )
+]
+{
+ item void SfxVoidItem;
+ item BOOL SfxBoolItem;
+ item INT32 SfxUInt16Item;
+ item INT16 SfxInt16Item;
+ item INT32 SfxUInt32Item;
+ item INT32 SfxInt32Item;
+ item String SfxStringItem;
+ item INT16 SfxByteItem;
+
+ item INT16 SfxEnumItem;
+ item INT16 SfxAllEnumItem;
+
+ item SbxObject SfxObjectItem;
+
+ item String SfxTemplateItem; //! Dummy
+ item String SfxMacroInfoItem; //! Dummy
+
+ item BOOL SfxBoolItem;
+
+ struct Point
+ {
+ INT32 X MID_X;
+ INT32 Y MID_Y;
+ };
+ item Point SfxPointItem;
+
+ struct Rectangle
+ {
+ INT32 Left MID_LEFT;
+ INT32 Top MID_TOP;
+ INT32 Width MID_WIDTH;
+ INT32 Height MID_HEIGHT;
+ };
+ item Rectangle SfxRectangleItem;
+
+ struct DocInfo
+ {
+ String Author MID_DOCINFO_AUTHOR;
+ String CreationDate MID_DOCINFO_CREATIONDATE;
+ String CreationTime MID_DOCINFO_CREATIONTIME;
+ String Description MID_DOCINFO_DESCRIPTION;
+ String FileName MID_DOCINFO_FILENAME;
+ String Revision MID_DOCINFO_REVISION;
+ String EditTime MID_DOCINFO_EDITTIME;
+ String KeyWords MID_DOCINFO_KEYWORDS;
+ String ModificationAuthor MID_DOCINFO_MODIFICATIONAUTHOR;
+ String ModificationDate MID_DOCINFO_MODIFICATIONDATE;
+ String ModificationTime MID_DOCINFO_MODIFICATIONTIME;
+ String Subject MID_DOCINFO_SUBJECT;
+ String Template MID_DOCINFO_TEMPLATE;
+ String Title MID_DOCINFO_TITLE;
+ String Field1Title MID_DOCINFO_FIELD1TITLE;
+ String Field2Title MID_DOCINFO_FIELD2TITLE;
+ String Field3Title MID_DOCINFO_FIELD3TITLE;
+ String Field4Title MID_DOCINFO_FIELD4TITLE;
+ String Field1 MID_DOCINFO_FIELD1;
+ String Field2 MID_DOCINFO_FIELD2;
+ String Field3 MID_DOCINFO_FIELD3;
+ String Field4 MID_DOCINFO_FIELD4;
+ };
+ item DocInfo SfxDocumentInfoItem;
+
+ item String SbxItem;
+
+ item INT16 TbxImageItem;
+
+ struct SvxSearch
+ {
+ BOOL Backward MID_SEARCH_BACKWARD;
+ BOOL InSelection MID_SEARCH_INSELECTION;
+ BOOL CaseSensitive MID_SEARCH_CASESENSITIVE;
+ BOOL RegExp MID_SEARCH_REGEXPR;
+ BOOL WordOnly MID_SEARCH_WORDONLY;
+ UINT16 Mode MID_SEARCH_MODE;
+ UINT16 Order MID_SEARCH_ORDER;
+ BOOL AllTables MID_SEARCH_ALLTABLES;
+ BOOL Similarity MID_SEARCH_LEV_ON;
+ BOOL Relaxed MID_SEARCH_LEV_RELAXED;
+ UINT16 Other MID_SEARCH_LEV_OTHER;
+ UINT16 Shorter MID_SEARCH_LEV_SHORTER;
+ UINT16 Longer MID_SEARCH_LEV_LONGER;
+ BOOL Pattern MID_SEARCH_PATTERN;
+ };
+ item SvxSearch SvxSearchItem;
+
+
+ include "newslots.sdi"
+ include "sfx.sdi"
+ include "object.sdi"
+ include "progress.sdi"
+ include "options.sdi"
+ include "docslots.sdi"
+ include "frmslots.sdi"
+ include "viwslots.sdi"
+ include "pinslots.sdi"
+ include "mdislots.sdi"
+ include "ipfslots.sdi"
+ include "appslots.sdi"
+ include "frsslots.sdi"
+}
+
diff --git a/sfx2/sdi/viwslots.sdi b/sfx2/sdi/viwslots.sdi
new file mode 100644
index 000000000000..57a749f793ff
--- /dev/null
+++ b/sfx2/sdi/viwslots.sdi
@@ -0,0 +1,154 @@
+ //=========================================================================
+ // interface View
+ // shell SfxViewShell
+ //
+ // (C) 1996 StarDivision GmbH, Hamburg, Germany
+ // $Author: hr $ $Date: 2000-09-18 16:52:26 $ $Revision: 1.1.1.1 $
+ // $Logfile: T:/sfx2/sdi/viwslots.sdv $ $Workfile: viwslots.sdi $
+ //-------------------------------------------------------------------------
+interface View : Object
+[
+ Automation = FALSE ;
+]
+{
+ //---------------------------------------------------------------------
+ SbxObject UNO SID_UNO // ole(no) api(final/play/norec)
+ [Readonly;]
+ //---------------------------------------------------------------------
+ SID_MAIL_SENDDOC // ole(no) api(todo)
+ [
+ ExecMethod = ExecMisc_Impl ;
+ StateMethod = GetState_Impl ;
+ ]
+ //---------------------------------------------------------------------
+ SID_PRINTDOC // ole(no) api(play/rec)
+ [
+ ExecMethod = ExecPrint_Impl ;
+ StateMethod = GetState_Impl ;
+ ]
+ //---------------------------------------------------------------------
+ SID_PRINTDOCDIRECT // ole(no) api(final/play/rec)
+ [
+ ExecMethod = ExecPrint_Impl ;
+ StateMethod = GetState_Impl ;
+ ]
+ //---------------------------------------------------------------------
+ SID_SETUPPRINTER // ole(no) api(play/rec)
+ [
+ ExecMethod = ExecPrint_Impl ;
+ StateMethod = GetState_Impl ;
+ ]
+ //---------------------------------------------------------------------
+ SID_PRINTER_NAME // ole(no) api(play/norec)
+ [
+ ExecMethod = ExecPrint_Impl ;
+ StateMethod = GetState_Impl ;
+ ]
+ //---------------------------------------------------------------------
+ SID_STYLE_CATALOG // ole(no) api(play/rec)
+ [
+ ExecMethod = ExecMisc_Impl ;
+ StateMethod = GetState_Impl ;
+ ]
+ //---------------------------------------------------------------------
+ SID_PLUGINS_ACTIVE // ole(no) api(play/rec)
+ [
+ ExecMethod = ExecMisc_Impl ;
+ StateMethod = GetState_Impl ;
+ ]
+ //---------------------------------------------------------------------
+ SID_SELECTION_TEXT // ole(no) api(play/norec)
+ [
+ StateMethod = GetState_Impl ;
+ ]
+ //---------------------------------------------------------------------
+ SID_SELECTION_TEXT_EXT // ole(no) api(play/norec)
+ [
+ StateMethod = GetState_Impl ;
+ ]
+
+ SID_STYLE_FAMILY
+ [
+ ExecMethod = ExecMisc_Impl ;
+ StateMethod = GetState_Impl ;
+ ]
+}
+
+ //=========================================================================
+
+shell SfxViewShell
+
+/*
+ Funktionalit"at jeder View (Ansicht) eines SFx-Dokuments. Angesprochen
+ werden diese Objekte entweder als 'ActiveWindow' oder mit dem Namen
+ des Dokuments (i.d.R. der Dateiname) ohne Pfad aber mit der Nummer
+ des Fensters, alles in eckigen Klammern (z.B. als '[unbenannt1:1]'
+ oder '[brief6.sdw:4]'). Im Ggs. zur Anzeige in der Caption-Bar (solange
+ nur ein Fenster f"ur das betreffende Dokument existiert) darf die
+ Nummer niemals ausgelassen werden. Die Numerierung beginnt bei 1 und
+ ist f"ur die Existenz des Fensters stabil.
+
+ Falls es Konflikte mit anderen "uber den Namen des Fensters
+ angesprochenen Objekten gibt (z.B. dem Window selbst oder
+ Selektionsmodi), kann der Name der spezifischen View zus"atzlich
+ qualifiziert werden (z.B. '[demo.sdd:2].Outliner').
+*/
+
+
+{
+ import View [Automation];
+}
+
+
+/*-------------------------------------------------------------------------
+
+ $Log: not supported by cvs2svn $
+ Revision 1.36 1998/10/26 14:49:02 MBA
+ Fix #58128#: SID_STYLE_FAMILY
+
+
+ Rev 1.35 26 Oct 1998 15:49:02 MBA
+ Fix #58128#: SID_STYLE_FAMILY
+
+ Rev 1.34 12 Jun 1998 15:56:08 MI
+ UNO-Objekt Zugriff
+
+ Rev 1.33 28 Aug 1997 12:24:20 MBA
+ Neue Interface-Namen
+
+ Rev 1.32 09 Dec 1996 12:07:46 MBA
+ Helptext,Configname raus
+
+ Rev 1.31 13 Nov 1996 12:45:24 MI
+ MUSS/SFx/345-346: SIDs aufgeraeumt
+
+ Rev 1.30 22 Oct 1996 20:10:20 HJS
+ merge 22.10.96
+
+ Rev 1.29 08 Oct 1996 14:30:42 HJS
+ merge 08.10.96
+
+ Rev 1.28 12 Sep 1996 15:44:34 MBA
+
+
+ Rev 1.27 09 Sep 1996 16:42:30 MBA
+ Neue Slotfiles
+
+ Rev 1.26 30 Aug 1996 13:41:46 HJS
+ eu...
+
+ Rev 1.25 16 Jul 1996 17:22:32 MBA
+ SID_PLUGINSACTIVE kein ReadOnlyDoc
+
+ Rev 1.24 11 Jul 1996 10:39:16 MI
+ SID_SELECTION_TEXT
+
+ Rev 1.23 08 Jul 1996 16:50:04 HJS
+ uebersetzung
+
+-------------------------------------------------------------------------*/
+
+
+
+
+
diff --git a/sfx2/source/appl/app.cxx b/sfx2/source/appl/app.cxx
new file mode 100644
index 000000000000..a89b7d050796
--- /dev/null
+++ b/sfx2/source/appl/app.cxx
@@ -0,0 +1,1859 @@
+/*************************************************************************
+ *
+ * $RCSfile: app.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:26 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#if defined UNX
+#include <limits.h>
+#else // UNX
+#include <stdlib.h>
+#define PATH_MAX _MAX_PATH
+#endif // UNX
+
+#include "app.hxx"
+#include "frame.hxx"
+
+#ifndef _VOS_PROCESS_HXX_
+#include <vos/process.hxx>
+#endif
+#ifndef _TOOLS_SIMPLERESMGR_HXX_
+#include <tools/simplerm.hxx>
+#endif
+#ifndef _CONFIG_HXX //autogen
+#include <vcl/config.hxx>
+#endif
+#ifndef _DRAG_HXX //autogen
+#include <vcl/drag.hxx>
+#endif
+#ifndef _SYSTEM_HXX //autogen
+#include <vcl/system.hxx>
+#endif
+#ifndef _SFXSTRITEM_HXX //autogen
+#include <svtools/stritem.hxx>
+#endif
+#ifndef _SOUND_HXX //autogen
+#include <vcl/sound.hxx>
+#endif
+#ifndef _SFXENUMITEM_HXX //autogen
+#include <svtools/eitem.hxx>
+#endif
+#ifndef _FILELIST_HXX //autogen
+#include <so3/filelist.hxx>
+#endif
+#ifndef _URLBMK_HXX //autogen
+#include <svtools/urlbmk.hxx>
+#endif
+#ifndef _MSGBOX_HXX //autogen
+#include <vcl/msgbox.hxx>
+#endif
+#ifndef _EXTATTR_HXX //autogen
+#include <svtools/extattr.hxx>
+#endif
+#ifndef _INET_WRAPPER_HXX
+#include <inet/wrapper.hxx>
+#endif
+#ifndef _SFXECODE_HXX
+#include <svtools/sfxecode.hxx>
+#endif
+#ifndef _EHDL_HXX
+#include <svtools/ehdl.hxx>
+#endif
+
+#include <svtools/svdde.hxx>
+#include <tools/tempfile.hxx>
+#pragma hdrstop
+
+#define _SVSTDARR_STRINGSDTOR
+#include <svtools/svstdarr.hxx>
+
+#ifndef _COM_SUN_STAR_FRAME_XFRAMEACTIONLISTENER_HPP_
+#include <com/sun/star/frame/XFrameActionListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XCOMPONENTLOADER_HPP_
+#include <com/sun/star/frame/XComponentLoader.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XFRAME_HPP_
+#include <com/sun/star/frame/XFrame.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_FRAMEACTIONEVENT_HPP_
+#include <com/sun/star/frame/FrameActionEvent.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_FRAMEACTION_HPP_
+#include <com/sun/star/frame/FrameAction.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LOADER_XIMPLEMENTATIONLOADER_HPP_
+#include <com/sun/star/loader/XImplementationLoader.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LOADER_CANNOTACTIVATEFACTORYEXCEPTION_HPP_
+#include <com/sun/star/loader/CannotActivateFactoryException.hpp>
+#endif
+#ifndef _COM_SUN_STAR_MOZILLA_XPLUGININSTANCE_HPP_
+#include <com/sun/star/mozilla/XPluginInstance.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XTASKSSUPPLIER_HPP_
+#include <com/sun/star/frame/XTasksSupplier.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CONTAINER_XENUMERATION_HPP_
+#include <com/sun/star/container/XEnumeration.hpp>
+#endif
+#ifndef _UNOTOOLS_PROCESSFACTORY_HXX
+#include <unotools/processfactory.hxx>
+#endif
+
+#include <basic/basmgr.hxx>
+
+#include <appuno.hxx>
+#include "sfxhelp.hxx"
+#include "request.hxx"
+#include "sfxtypes.hxx"
+#include "sfxresid.hxx"
+#include "arrdecl.hxx"
+#include "progress.hxx"
+#include "objsh.hxx"
+#include "docfac.hxx"
+#include "docfile.hxx"
+#include "docfilt.hxx"
+#include "cfgmgr.hxx"
+#include "fltfnc.hxx"
+#include "nfltdlg.hxx"
+#include "iodlg.hxx"
+#include "new.hxx"
+#include "bindings.hxx"
+#include "dispatch.hxx"
+#include "viewsh.hxx"
+#include "genlink.hxx"
+#include "accmgr.hxx"
+#include "tbxmgr.hxx"
+#include "mnumgr.hxx"
+#include "topfrm.hxx"
+#include "newhdl.hxx"
+#include "appdata.hxx"
+#include "openflag.hxx"
+#include "app.hrc"
+#include "interno.hxx"
+#include "ipenv.hxx"
+#include "saveopt.hxx"
+#include "intfrm.hxx"
+#include "virtmenu.hxx"
+#include "module.hxx"
+#include "sfxdir.hxx"
+#include "event.hxx"
+#include "oregdlg.hxx"
+#include "appimp.hxx"
+
+#ifdef DBG_UTIL
+#include "tbxctrl.hxx"
+#include "stbitem.hxx"
+#include "mnuitem.hxx"
+#endif
+
+#if defined( WIN ) || defined( WNT ) || defined( OS2 )
+#define DDE_AVAILABLE
+#endif
+
+// Static member
+SfxApplication* SfxApplication::pApp = NULL;
+
+SfxApplication* SfxApplication::GetOrCreate()
+{
+ ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
+#if 0 // SFX on demand
+ if ( !pApp )
+ {
+ SfxApplication *pNew = new SfxApplication;
+ pNew->StartUpScreen( NULL );
+ SetApp( pNew );
+ }
+#endif
+ return pApp;
+}
+
+void SfxApplication::SetApp( SfxApplication* pSfxApp )
+{
+ static ::osl::Mutex aProtector;
+ ::osl::MutexGuard aGuard( aProtector );
+
+ DBG_ASSERT( !pApp, "SfxApplication already created!" );
+ if ( pApp )
+ DELETEZ( pApp );
+
+ pApp = pSfxApp;
+
+ // at the moment a bug may occur when Initialize_Impl returns FALSE, but this is only temporary because all code that may cause such a
+ // fault will be moved outside the SFX
+ pApp->Initialize_Impl();
+}
+
+SfxApplication::SfxApplication()
+ : _nFeatures( ULONG_MAX )
+ , pImp( 0 )
+ , pAppData_Impl( 0 )
+ , pMenuMgr( 0 )
+ , pAcceleratorMgr( 0 )
+ , pStatusBarMgr( 0 )
+ , pAppDispat( 0 )
+ , bDispatcherLocked( sal_False )
+ , pResMgr( 0 )
+ , pAppIniMgr( 0 )
+ , pCfgMgr( 0 )
+ , pSlotPool( 0 )
+ , pInterfaces( 0 )
+ , bInInit( sal_False )
+ , bInExit( sal_False )
+ , bDowning( sal_True )
+ , bCreatedExternal( sal_False )
+ , pOptions( 0 )
+ , pViewFrame( 0 )
+ , pImageMgr( 0 )
+ , nInterfaces( 0 )
+{
+ pImp = new SfxApplication_Impl;
+ pImp->bConfigLoaded = sal_False;
+ pImp->pEmptyMenu = 0;
+ pImp->nDocNo = 0;
+ pImp->pIntro = 0;
+ pImp->pTbxCtrlFac = 0;
+ pImp->pStbCtrlFac = 0;
+ pImp->pViewFrames = 0;
+ pImp->pObjShells = 0;
+ pImp->bAutoSaveNow = sal_False;
+ pImp->pTemplateDlg = 0;
+ pImp->pBasicMgr = 0;
+ pImp->pBasicTestWin = 0;
+ pImp->pSfxResManager = 0;
+ pImp->pSimpleResManager = 0;
+ pImp->nWarnLevel = 0;
+ pImp->pAutoSaveTimer = 0;
+ pAppIniMgr = CreateIniManager();
+ pAppData_Impl = new SfxAppData_Impl( this );
+ pAppData_Impl->StartListening( *pAppIniMgr );
+ pAppData_Impl->UpdateApplicationSettings( pAppIniMgr->IsDontHideDisabledEntries() );
+ pApp->PreInit();
+
+#ifdef DDE_AVAILABLE
+#ifdef PRODUCT
+ InitializeDde();
+#else
+ if( !InitializeDde() )
+ {
+ ByteString aStr( "Kein DDE-Service moeglich. Fehler: " );
+ if( GetDdeService() )
+ aStr += ByteString::CreateFromInt32(GetDdeService()->GetError());
+ else
+ aStr += '?';
+ DBG_ASSERT( sal_False, aStr.GetBuffer() )
+ }
+#endif
+#endif
+}
+
+SfxApplication::~SfxApplication()
+{
+ if ( !bDowning )
+ Deinitialize();
+ Broadcast( SfxSimpleHint(SFX_HINT_DYING) );
+ delete pImp;
+ delete pAppData_Impl;
+ SfxIniManager::Close();
+ pApp = 0;
+}
+
+//====================================================================
+
+class SfxResourceTimer : public Timer
+{
+ sal_uInt16 *pnWarnLevel;
+public:
+ SfxResourceTimer(sal_uInt16 *pn, sal_uInt32 nTimeOut) : pnWarnLevel(pn)
+ { SetTimeout(nTimeOut); Start(); }
+ virtual void Timeout() { --*pnWarnLevel; delete this; }
+};
+
+//--------------------------------------------------------------------
+
+//====================================================================
+
+void SfxApplication::LockDispatcher
+(
+ sal_Bool bLock /* sal_True
+ schaltet alle SfxDispatcher ein
+
+ sal_False
+ schaltet alle SfxDispatcher aus */
+)
+
+/* [Beschreibung]
+
+ Mit dieser Methode werden alle Dispatcher der Applikation global
+ blockiert (bLock==sal_True) bzw. grundsaetzlich freigegeben
+ (bLock==sal_False).
+
+ Unabhaengig von diesem zentralen Schalter kann jeder Dispatcher
+ einzeln gelockt sein:
+
+ Dispatcher X global => gesamt
+
+ gelockt gelockt => gelockt
+ freigegeben gelockt => gelockt
+ gelockt freigegeben => gelockt
+ freigegeben freigegeben => freigegeben
+
+ Wenn der aktive Dispatcher gelockt ist, werden keine Requests mehr
+ dispatcht.
+
+ [Querverweise]
+ <SfxDispatcher::Lock(sal_Bool)> */
+
+{
+ bDispatcherLocked = bLock;
+ if ( !bLock )
+ {
+ GetDispatcher().InvalidateBindings_Impl( pAppData_Impl->bInvalidateOnUnlock );
+ pAppData_Impl->bInvalidateOnUnlock = sal_False;
+ }
+}
+
+//--------------------------------------------------------------------
+
+SfxObjectShell* SfxApplication::GetActiveObjectShell() const
+
+/* [Beschreibung]
+
+ Diese Methode liefert einen Zeiger auf die aktive <SfxObjectShell>-
+ Instanz oder einen 0-Pointer, falls keine SfxObjectShell-Instanz
+ aktiv ist.
+*/
+
+{
+ if ( pViewFrame )
+ return pViewFrame->GetObjectShell();
+ return 0;
+}
+
+//--------------------------------------------------------------------
+#if SUPD<594
+sal_uInt32 SfxApplication::InsertEventHdl
+(
+ const GenLink& rLink /* Link, der auf ein StarView-UserEvent
+ gerufen werden soll. */
+)
+
+/* [Beschreibung]
+
+ Diese Methode fuegt einen Handler fuer ein StarView-UserEnvent
+ ein und liefert die Id fuer das Event zurueck.
+
+ PostAppEvent() mit dieser Id ruft daher den eingefuegen Handler.
+
+ Somit koennen verschiedenen, sich gegenseitig unbekannte Programmteile
+ in derselben Applikation koexistieren und UserEvents verschicken.
+*/
+
+{
+ return ( pImp->pEventHdl->Insert( new GenLink(rLink) ) ) + DYNAMIC_USERID_OFFSET;
+}
+
+//--------------------------------------------------------------------
+
+void SfxApplication::RemoveEventHdl
+(
+ sal_uInt32 nId /* Id des StarView-UserEvents, das entfernt
+ werden soll. */
+)
+
+/* [Beschreibung]
+
+ Diese Methode entfernt den unter der Id nId eingefuegten Handler
+ fuer StarView-UserEvents. Die Id wird damit zur Wiederverwendung
+ freigegeben, darf also nicht mehr verwendet werden, bis sie durch
+ ein erneutes <SfxApplication::InsertEventHdl()> wieder
+ zurueckgegeben wurde.
+
+ */
+
+{
+ delete (GenLink*) pImp->pEventHdl->Remove( nId - DYNAMIC_USERID_OFFSET );
+}
+#endif
+
+//--------------------------------------------------------------------
+
+#if SUPD<594
+void SfxApplication::UserEvent
+(
+ sal_uInt32 nEvent /* Id des StarView-UserEvents */,
+
+ void* pEventData /* Event-Daten abhaengig von der Event-Id */
+)
+
+/* [Beschreibung]
+
+ StarView-Handler zum Ausfuehrend eines UserEvents.
+
+ In SFx-Applikationen muessen die Event-Ids durch die Methode
+ <SfxApplication::InsertEventHdl()> ermittelt werden. Sollte eine
+ Subklasse von SfxApplication diese Methode ueberladen, mu"s die
+ Basisimplementierung gerufen werden.
+
+ */
+
+{
+ // z.b. ein Channel-Agent kann so Directories updaten
+ if ( SID_RELOAD == nEvent && pEventData )
+ {
+ String aString = S2U( (const char*) pEventData );
+ SFX_APP()->Broadcast( SfxDirEntryHint( 0, aString ) );
+ return;
+ }
+
+ if ( nEvent >= DYNAMIC_USERID_OFFSET )
+ {
+ GenLink* pLink = (GenLink*) pImp->pEventHdl->Get( nEvent-DYNAMIC_USERID_OFFSET );
+ if ( pLink )
+ {
+ pLink->Call( (SfxHint*) pEventData );
+ return;
+ }
+ }
+
+ if ( nEvent == ULONG_MAX )
+ {
+ if ( pEventData )
+ DELETEZ(pAppData_Impl->pProgress);
+ else
+ {
+ pAppData_Impl->pProgress = new SfxProgress(0, String(SfxResId(RID_PLUGIN)), 0, sal_True);
+ pAppData_Impl->pProgress->Lock();
+ }
+ }
+ else
+ DBG_ERROR( "unregistered user event occured" );
+}
+#endif
+
+//--------------------------------------------------------------------
+
+sal_Bool IsTemplate_Impl( const String& aPath )
+{
+ INetURLObject aObj( aPath, INET_PROT_FILE );
+ if ( aObj.getExtension().CompareIgnoreCaseToAscii( "vor" ) == COMPARE_EQUAL )
+ return sal_True;
+
+ SvEaMgr aMgr( aPath );
+ String aType;
+
+ if ( aMgr.GetFileType(aType) )
+ {
+ const SfxFilter* pFilter = SFX_APP()->GetFilterMatcher().GetFilter4EA( aType );
+ if( pFilter && pFilter->IsOwnTemplateFormat() )
+ return sal_True;
+ }
+
+ return sal_False;
+}
+
+void SfxApplication::HandleAppEvent( const ApplicationEvent& rAppEvent )
+{
+ if ( rAppEvent.IsOpenEvent() )
+ {
+ // die Parameter enthalten die zu "offnenden Dateien
+ for(sal_uInt16 i=0;i<rAppEvent.GetParamCount();i++)
+ {
+ // Dateiname rausholen
+ String aName( rAppEvent.GetParam(i) );
+ if ( COMPARE_EQUAL == aName.CompareToAscii("/userid:",8) )
+ continue;
+#ifdef WNT
+ FATToVFat_Impl( aName );
+#endif
+ SfxStringItem aFileName( SID_FILE_NAME, aName );
+
+#ifdef APPEVENT_DBG
+ aStream << "Open: " << (const char *)aFileName.GetValue();
+#endif
+ // Art, Existens und Groesse
+ INetURLObject aURL( aFileName.GetValue(), INET_PROT_FILE );
+ sal_Bool bIsFileURL = INET_PROT_FILE == aURL.GetProtocol();
+
+ // ist ein oeffnen grundsaetzlich moeglich
+ if ( TRUE ) // (pb)
+ {
+ // ist es eine Vorlage?
+ if ( bIsFileURL && IsTemplate_Impl( aURL.GetMainURL() ) )
+ {
+#ifdef APPEVENT_DBG
+ aStream << " Neues Dokument aus Vorlage angelegt\n";
+#endif
+ // neue Datei aus der Vorlage erzeugen
+ pAppDispat->Execute( SID_NEWDOC, SFX_CALLMODE_SYNCHRON, &aFileName, 0L );
+ }
+ else
+ {
+#ifdef APPEVENT_DBG
+ aStream << " Neues Dokument geoeffnet\n";
+#endif
+ // ::com::sun::star::util::URL "offnen
+ if ( !DocAlreadyLoaded( aFileName.GetValue(), sal_True, sal_True, sal_False ) )
+ {
+ SfxBoolItem aNewView( SID_OPEN_NEW_VIEW, sal_False );
+ SfxStringItem aTargetName( SID_TARGETNAME, DEFINE_CONST_UNICODE("_blank") );
+ SfxStringItem aReferer( SID_REFERER, DEFINE_CONST_UNICODE("private:OpenEvent") );
+ pAppDispat->Execute( SID_OPENDOC,
+ SFX_CALLMODE_SYNCHRON, &aTargetName,
+ &aFileName, &aNewView, &aReferer, 0L );
+ }
+ }
+ }
+ else
+ {
+ // ACHTUNG: keine Fehlermeldung bei '.' (unterdr"uckt OpenClients)
+ HACK(Fehlermeldung fehlt);
+#ifdef APPEVENT_DBG
+ aStream << " FEHLER\n";
+#endif
+ }
+ }
+ }
+ else if(rAppEvent.IsPrintEvent() )
+ {
+ // "uber die Parameter iterieren (zu druckende Dateien + Druckername)
+ SfxStringItem aPrinterName(SID_PRINTER_NAME, String());
+ for (sal_uInt16 i=0;i<rAppEvent.GetParamCount();i++)
+ {
+ // Druckername?
+ String aArg(rAppEvent.GetParam(i));
+ if(aArg.Len()>1 && *aArg.GetBuffer()=='@')
+ {
+ aPrinterName.SetValue( aArg.Copy(1) );
+ continue;
+ }
+
+ // Datei "offnen -- immer neue ::com::sun::star::sdbcx::View erzeugen
+ SfxStringItem aTargetName( SID_TARGETNAME, DEFINE_CONST_UNICODE("_blank") );
+ SfxStringItem aFileName( SID_FILE_NAME, aArg );
+ SfxBoolItem aNewView(SID_OPEN_NEW_VIEW, sal_True);
+ SfxBoolItem aHidden(SID_HIDDEN, sal_True);
+ SfxBoolItem aSilent(SID_SILENT, sal_True);
+ const SfxPoolItem *pRet = pAppDispat->Execute( SID_OPENDOC,
+ SFX_CALLMODE_SYNCHRON, &aTargetName,
+ &aFileName, &aNewView, &aHidden, &aSilent, 0L );
+ if ( !pRet )
+ continue;
+
+ // die neue ::com::sun::star::sdbcx::View des Dokuments ermitteln
+ const SfxViewFrameItem *pFrameItem =
+ PTR_CAST(SfxViewFrameItem, pRet);
+ if ( pFrameItem && pFrameItem->GetFrame() )
+ {
+ // "uber die ::com::sun::star::sdbcx::View drucken
+ SfxViewFrame *pFrame = pFrameItem->GetFrame();
+ SfxBoolItem aSilent( SID_SILENT, sal_True );
+ pFrame->GetDispatcher()->Execute( SID_PRINTDOC,
+ SFX_CALLMODE_SYNCHRON,
+ &aPrinterName, &aSilent, 0L );
+ pFrame->GetFrame()->DoClose();
+ }
+ }
+ }
+}
+
+//--------------------------------------------------------------------
+
+long SfxAppFocusChanged_Impl( void* pObj, void* pArg )
+{
+ SfxApplication *pApp = SFX_APP();
+ if ( pApp && !pApp->IsDowning() )
+ {
+ Help* pHelp = Application::GetHelp();
+ Window* pFocusWindow = Application::GetFocusWindow();
+ if ( pHelp && pFocusWindow )
+ {
+ sal_uInt32 nId = pFocusWindow->GetHelpId();
+ while ( !nId && pFocusWindow )
+ {
+ pFocusWindow = pFocusWindow->GetParent();
+ nId = pFocusWindow ? pFocusWindow->GetHelpId() : 0;
+ }
+ ((SfxHelp_Impl*)pHelp)->SlotExecutedOrFocusChanged(
+ nId, sal_False, pApp->GetOptions().IsAutoHelpAgent() );
+ }
+ }
+
+ return 0;
+}
+
+void SfxApplication::FocusChanged()
+{
+ static AsynchronLink *pFocusCallback = new AsynchronLink( Link( 0, SfxAppFocusChanged_Impl ) );
+ pFocusCallback->Call( this, sal_True );
+}
+
+//--------------------------------------------------------------------
+
+FASTBOOL SfxApplication::KeyInput( const KeyEvent &rKeyEvent )
+
+/* [Beschreibung]
+
+ Diese Methode fuehrt das ::com::sun::star::awt::KeyEvent 'rKeyEvent' ueber die an der
+ Applikation konfigurieren Tasten (Applikations-Accelerator) aus.
+
+ In der Regel sollten konfigurierbare Tasten ueber die Methode
+ <SfxViewShell::KeyInput(const ::com::sun::star::awt::KeyEvent&)> der aktiven SfxViewShell
+ ausgefuehrt werden.
+
+
+ [Rueckgabewert]
+
+ FASTBOOL sal_True
+ die Taste ist konfiguriert, der betreffende
+ Handler wurde gerufen
+
+ sal_False
+ die Taste ist nicht konfiguriert, es konnte
+ also kein Handler gerufen werden */
+
+{
+ const KeyCode& rKeyCode = rKeyEvent.GetKeyCode();
+ if ( rKeyCode.IsMod2() && rKeyCode.IsMod1() )
+ {
+ switch ( rKeyCode.GetCode() )
+ {
+ case KEY_D :
+ {
+ // ehemals ChaosDump
+ break;
+ }
+ }
+ }
+
+ if ( pViewFrame && pAcceleratorMgr->Call(rKeyEvent, pViewFrame->GetBindings() ) )
+ return sal_True;
+ return sal_False;
+}
+
+//--------------------------------------------------------------------
+
+const String& SfxApplication::GetLastDir_Impl() const
+
+/* [Beschreibung]
+
+ Interne Methode, mit der im SFx das zuletzt mit der Methode
+ <SfxApplication::SetLastDir_Impl()> gesetzte Verzeichnis
+ zurueckgegeben wird.
+
+ Dieses ist i.d.R. das zuletzt durch den SfxFileDialog
+ angesprochene Verzeichnis.
+
+ [Querverweis]
+ <SfxApplication::SetLastDir_Impl()>
+*/
+
+{
+ return pAppData_Impl->aLastDir;
+}
+
+const String& SfxApplication::GetLastSaveDirectory() const
+
+/* [Beschreibung]
+
+ Wie <SfxApplication::GetLastDir_Impl()>, nur extern
+
+ [Querverweis]
+ <SfxApplication::GetLastDir_Impl()>
+*/
+
+{
+ return GetLastDir_Impl();
+}
+
+//--------------------------------------------------------------------
+
+void SfxApplication::SetLastDir_Impl
+(
+ const String& rNewDir /* kompletter Verzeichnis-Pfad als String */
+ )
+
+/* [Beschreibung]
+
+ Interne Methode, mit der ein Verzeichnis-Pfad gesetzt wird, der
+ zuletzt (z.B. durch den SfxFileDialog) angesprochen wurde.
+
+ [Querverweis]
+ <SfxApplication::GetLastDir_Impl()>
+*/
+
+{
+ pAppData_Impl->aLastDir = rNewDir;
+}
+
+//--------------------------------------------------------------------
+
+const String& SfxApplication::GetLastFilter_Impl() const
+{
+ return pAppData_Impl->aLastFilter;
+}
+
+//--------------------------------------------------------------------
+
+void SfxApplication::SetLastFilter_Impl( const String &rNewFilter )
+{
+ pAppData_Impl->aLastFilter = rNewFilter;
+}
+
+//--------------------------------------------------------------------
+#if SUPD<606
+SfxDispatcher& SfxApplication::GetDispatcher()
+{
+ return pViewFrame? *pViewFrame->GetDispatcher(): *pAppDispat;
+}
+
+SfxBindings& SfxApplication::GetBindings() const
+{
+ DBG_ASSERT( pViewFrame, "No ViewFrame available!" );
+ return pViewFrame? pViewFrame->GetBindings(): SfxViewFrame::GetFirst( 0, 0, sal_False )->GetBindings();
+}
+#endif
+
+SfxDispatcher* SfxApplication::GetDispatcher_Impl()
+{
+ return pViewFrame? pViewFrame->GetDispatcher(): pAppDispat;
+}
+
+//--------------------------------------------------------------------
+void SfxApplication::SetViewFrame( SfxViewFrame *pFrame )
+{
+ if( pFrame && !pFrame->IsSetViewFrameAllowed_Impl() )
+ return;
+
+ if ( pFrame != pViewFrame )
+ {
+ SfxInPlaceFrame *pOld = PTR_CAST( SfxInPlaceFrame, pViewFrame );
+ SfxInPlaceFrame *pNew = PTR_CAST( SfxInPlaceFrame, pFrame );
+ FASTBOOL bTaskActivate = !pNew;
+ SfxViewFrame *pContainer = pViewFrame;
+ while ( pContainer && pContainer->GetParentViewFrame_Impl() )
+ pContainer = pContainer->GetParentViewFrame_Impl();
+
+ BOOL bDocWinActivate = pContainer && pFrame &&
+ ( pContainer->GetTopViewFrame() == pFrame || pFrame->GetTopViewFrame() == pContainer );
+
+ if ( bTaskActivate )
+ {
+ if ( pViewFrame )
+ {
+ // BeamerConfig sichern
+ pViewFrame->GetFrame()->Deactivate_Impl();
+
+ // DeactivateEvent f"ur den alten ViewFrame verschicken
+ NotifyEvent( SfxEventHint( SFX_EVENT_DEACTIVATEDOC, pViewFrame->GetObjectShell() ) );
+
+ // Ggf. auch InPlaceDeactivate
+ // Daf"ur den aktiven ContainerFrame suchen
+ if ( pOld )
+ {
+ // Falls aktiver IPClient, diesen deaktivieren
+ SvInPlaceClient *pCli = pContainer->GetViewShell() ? pContainer->GetViewShell()->GetIPClient() : NULL;
+ if ( pCli && pCli->GetProtocol().IsUIActive() )
+ {
+ if ( bDocWinActivate )
+ {
+ pCli->GetIPObj()->GetIPEnv()->DoShowUITools( sal_False );
+ pCli->GetProtocol().DocWinActivate( sal_False );
+ }
+ else
+ pCli->GetProtocol().TopWinActivate( sal_False );
+ }
+ }
+ }
+ }
+
+ SfxViewFrame *pOldContainerFrame = pViewFrame;
+ if( pOldContainerFrame )
+ {
+ // Wenn der alte Frame ein IPFrame ist, mu\s dessen ContainerDokument aktiviert werden,
+ // der IPFrame wurde schon im Top/DocWinDeactivate
+ if ( pOld )
+ pOldContainerFrame = pOld->GetParentViewFrame_Impl();
+
+ if ( bTaskActivate && pOldContainerFrame != pViewFrame )
+ NotifyEvent( SfxEventHint( SFX_EVENT_DEACTIVATEDOC, pOldContainerFrame->GetObjectShell() ) );
+
+ pOldContainerFrame->DoDeactivate( bTaskActivate, pFrame );
+ }
+
+ pViewFrame = pFrame;
+
+ // Jetzt ist der ViewFrame gesetzt, das TopWindow kann abgefragt werden
+ Application::SetDefDialogParent( pViewFrame ? GetWorkWindow_Impl(pViewFrame)->GetTopWindow() : NULL );
+
+ const SfxObjectShell* pSh = pViewFrame ? pViewFrame->GetObjectShell() : 0;
+ if ( !pSh )
+ {
+ // Wenn es ein Dokument gibt, wird die BaseURL im Activate gesetzt
+ INetURLObject aObject( GetIniManager()->Get( SFX_KEY_WORK_PATH ), INET_PROT_FILE );
+ aObject.setFinalSlash();
+ INetURLObject::SetBaseURL( aObject.GetMainURL() );
+ }
+
+ // Activate mit sal_True auch wenn die zu aktivierenden Bindings gerade
+ // keinen Dispatcher haben
+ if ( pViewFrame && bTaskActivate )
+ pViewFrame->GetObjectShell()->PostActivateEvent_Impl();
+
+ if( pViewFrame )
+ pViewFrame->DoActivate(
+ bTaskActivate ||
+ pViewFrame->GetBindings().GetDispatcher_Impl() !=
+ pViewFrame->GetDispatcher(), pOldContainerFrame );
+
+ if( pOldContainerFrame && pOldContainerFrame->GetProgress() )
+ pOldContainerFrame->GetProgress()->Suspend();
+
+ // Beim Browsen kann es passieren, da\s gerade keine ViewShell da ist
+ if ( pViewFrame && !pViewFrame->GetViewShell() )
+ return;
+
+ if ( pViewFrame )
+ {
+ if ( pNew )
+ {
+ pNew->GetEnv_Impl()->ActivateConfig();
+ }
+ else
+ {
+ SfxObjectShell *pObjSh = pViewFrame->GetObjectShell();
+ if ( pObjSh->GetConfigManager())
+ {
+ pObjSh->GetConfigManager()->ActivateTask( pViewFrame );
+ pObjSh->GetConfigManager()->SetParent(pAppData_Impl->pAppCfg);
+ pObjSh->GetConfigManager()->Activate(pCfgMgr);
+ }
+ else
+ {
+ pAppData_Impl->pAppCfg->ActivateTask( pViewFrame );
+ pAppData_Impl->pAppCfg->Activate(pCfgMgr);
+ }
+
+ SfxDispatcher* pDisp = pViewFrame->GetDispatcher();
+ pDisp->Flush();
+ pDisp->Update_Impl(sal_True);
+
+ SfxProgress *pProgress = pViewFrame->GetProgress();
+ if ( !pProgress )
+ pProgress = pAppData_Impl->pProgress;
+ if ( pProgress )
+ {
+ if( pProgress->IsSuspended() )
+ pProgress->Resume();
+ else
+ pProgress->SetState( pProgress->GetState() );
+ }
+
+ // Falls aktiver IPClient, diesen aktivieren
+ SvInPlaceClient *pCli = pViewFrame->GetViewShell()->GetIPClient();
+ if ( pCli && pCli->GetProtocol().IsUIActive() )
+ {
+ if ( bDocWinActivate )
+ {
+ pCli->GetIPObj()->GetIPEnv()->DoShowUITools( sal_True );
+ pCli->GetProtocol().DocWinActivate( sal_True );
+ }
+ else
+ pCli->GetProtocol().TopWinActivate( sal_True );
+ }
+ }
+ }
+ else
+ {
+ pCfgMgr->ActivateTask( NULL );
+ pAppData_Impl->pAppCfg->Activate( pCfgMgr );
+ }
+ }
+}
+
+//--------------------------------------------------------------------
+
+//--------------------------------------------------------------------
+
+sal_uInt32 SfxApplication::DetectFilter( const String &rFileName,
+ const SfxFilter **ppFilter,
+ sal_uInt16 nFilterClass )
+{
+ SfxMedium aSfxMedium(rFileName,(STREAM_READ | STREAM_SHARE_DENYNONE),sal_False);
+
+ return DetectFilter(aSfxMedium, ppFilter, nFilterClass );
+}
+
+//-------------------------------------------------------------------------
+
+sal_uInt32 SfxApplication::DetectFilter(
+ SfxMedium& rMedium,const SfxFilter **ppFilter, sal_uInt16 nFilterClass )
+{
+ const SfxFilter *pFilter=0;
+ SvEaMgr aMgr( rMedium.GetName() );
+ String aType;
+ if ( !SfxObjectFactory::HasObjectFactories() )
+ return 1; HACK(Error-Code verwenden) ;
+
+ SfxFilterMatcher rMatcher( SfxObjectFactory::GetDefaultFactory().GetFilterContainer() );
+ if( aMgr.GetFileType( aType ))
+ pFilter = rMatcher.GetFilter4EA( aType );
+
+ if( !pFilter)
+ {
+ if ( !rMedium.IsRemote() && rMedium.IsStorage() )
+ {
+ SvStorageRef aStor = rMedium.GetStorage();
+ if ( !aStor.Is() )
+ return ERRCODE_IO_GENERAL;
+ pFilter = rMatcher.GetFilter4ClipBoardId(aStor->GetFormat());
+ }
+ else
+ {
+ // Finden anhand der Extension
+ pFilter = rMatcher.GetFilter4Extension(
+ rMedium.GetURLObject().GetName() );
+ if ( pFilter && pFilter->UsesStorage() )
+ pFilter = 0;
+ }
+ }
+
+ if(pFilter)
+ *ppFilter=pFilter;
+
+ return pFilter? 0: 1; HACK(Error-Code verwenden)
+}
+
+
+
+//--------------------------------------------------------------------
+
+ErrCode SfxApplication::FileOpenDialog_Impl
+(
+ sal_uInt32 nFlags,
+ const SfxObjectFactory& rFact,
+ SvStringsDtor*& rpURLList,
+ String& rFilter,
+ SfxItemSet *& rpSet,
+ sal_Bool* pConvert
+)
+{
+ const SfxFilter* pFilt = GetFilterMatcher().GetDefaultFilter();
+ if( pFilt )
+ rFilter = pFilt->GetName();
+
+ SfxViewFrame *pFrame = SfxViewFrame::Current();
+ while ( pFrame->GetParentViewFrame_Impl() )
+ pFrame = pFrame->GetParentViewFrame_Impl();
+
+ SfxFileDialog* pDlg =
+ GetISfxModule( pFrame )->CreateDocFileDialog( nFlags ? nFlags : WB_OPEN | WB_3DLOOK, rFact );
+ const short nRet = pDlg->Execute();
+ if ( nRet == RET_OK )
+ {
+ rFilter = pDlg->GetCurFilter();
+ rpSet = new SfxAllItemSet( *pDlg->GetItemSet() );
+ if ( SFXWB_INSERT == (nFlags & SFXWB_INSERT) )
+ rpSet->Put( SfxBoolItem( SID_DOC_READONLY, sal_True ) );
+ sal_Bool bActivate = sal_False;
+ rFilter = pDlg->GetCurFilter();
+ rpURLList = pDlg->GetPathList();
+ delete pDlg;
+ return ERRCODE_NONE;
+ }
+ else
+ {
+ delete pDlg;
+ return ERRCODE_ABORT;
+ }
+}
+
+//--------------------------------------------------------------------
+
+SfxNewFileDialog* SfxApplication::CreateNewDialog()
+{
+ return new SfxNewFileDialog(GetTopWindow(), SFXWB_DOCINFO | SFXWB_PREVIEW );
+}
+
+//--------------------------------------------------------------------
+
+const SfxFilter* SfxApplication::GetFilter
+(
+ const SfxObjectFactory &rFact,
+ const String &rFilterName
+ ) const
+{
+ DBG_ASSERT( rFilterName.Search( ':' ) == STRING_NOTFOUND,
+ "SfxApplication::GetFilter erwartet unqualifizierte Namen" );
+ return rFact.GetFilterContainer()->GetFilter4FilterName(rFilterName);
+}
+
+//--------------------------------------------------------------------
+
+short SfxApplication::QuerySave_Impl( SfxObjectShell& rDoc, sal_Bool bAutoSave )
+{
+ if ( !rDoc.IsModified() )
+ return RET_NO;
+
+ String aMsg( SfxResId( STR_ISMODIFIED ) );
+ aMsg.SearchAndReplaceAscii( "%1", rDoc.GetTitle() );
+
+ SfxFrame *pFrame = SfxViewFrame::GetFirst(&rDoc)->GetFrame();
+ pFrame->Appear();
+
+ WinBits nBits = WB_YES_NO_CANCEL;
+ nBits |= bAutoSave ? WB_DEF_YES : WB_DEF_NO;
+ QueryBox aBox( &pFrame->GetWindow(), nBits, aMsg );
+
+ if ( bAutoSave )
+ aBox.SetText( String( SfxResId( STR_AUTOSAVE ) ) );
+
+ return aBox.Execute();
+}
+
+//--------------------------------------------------------------------
+
+sal_Bool Drop1_Impl( sal_uInt16 nSID, const String &rFile, sal_Bool bHidden,
+ SfxExecuteItem *&rpExecItem, SfxExecuteItem *&rpPrintItem )
+{
+ // Parameter bestimmen
+ SfxStringItem aFileNameItem(SID_FILE_NAME, rFile);
+ SfxBoolItem aHiddenItem(SID_HIDDEN, bHidden);
+ SfxStringItem aRefererItem(SID_REFERER, DEFINE_CONST_UNICODE("private:user") );
+ SfxExecuteItem* pOld = rpExecItem;
+ if( !rpPrintItem )
+ rpExecItem = new SfxExecuteItem(
+ SID_SUBREQUEST, nSID, SFX_CALLMODE_SYNCHRON,
+ &aFileNameItem, &aHiddenItem, &aRefererItem,
+ (SfxPoolItem*)rpExecItem, 0L );
+ else
+ rpExecItem = new SfxExecuteItem(
+ SID_SUBREQUEST, nSID, SFX_CALLMODE_SYNCHRON,
+ &aFileNameItem, &aHiddenItem, &aRefererItem, rpPrintItem,
+ (SfxPoolItem*)rpExecItem, 0L );
+ delete pOld;
+ return sal_True;
+}
+
+//--------------------------------------------------------------------
+
+sal_Bool SfxApplication::Drop_Impl( sal_uInt16 nSID, DropEvent& rEvt )
+
+/* [Beschreibung]
+
+ F"uhrt 'nSID' mit den Files aus, die im DragServer stehen.
+*/
+
+{
+ // Actions bestimmen
+ sal_uInt16 n2ndSID = 0; // nach SID_OPENDOC auszuf"uhren
+ sal_Bool bHidden = sal_False; // unsichtbar "offnen
+ switch ( nSID )
+ {
+ case SID_OPENDOC:
+ case SID_OPENURL:
+ break;
+
+ case SID_PRINTDOC:
+ case SID_PRINTDOCDIRECT:
+ n2ndSID = SID_PRINTDOCDIRECT;
+ bHidden = sal_True;
+ break;
+
+ case SID_NEWDOC:
+ case SID_NEWDOCDIRECT:
+ nSID = SID_NEWDOC;
+ break;
+
+ default:
+ // unbekannte SID
+ return sal_False;
+ }
+
+ // "uber die Items im DragServer iterieren
+ const sal_uInt16 nCount = DragServer::GetItemCount();
+ sal_Bool bSuccess = sal_False;
+
+ SfxExecuteItem* pExecItem = 0;
+ SfxExecuteItem* pPrintItem = n2ndSID ? new SfxExecuteItem(
+ SID_AFTEROPENEVENT, n2ndSID, SFX_CALLMODE_SYNCHRON ) : 0;
+
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
+ {
+ // Format erkennen
+ String aFile;
+ INetBookmark aBmk;
+ if ( DragServer::HasFormat(i, FORMAT_FILE_LIST) )
+ {
+ // SvData basteln
+ SvData aData( FORMAT_FILE_LIST );
+ SvDataObjectRef xDataObj = SvDataObject::PasteDragServer( rEvt );
+ xDataObj->GetData( &aData );
+
+ // Daten holen
+ FileList aFileList;
+ FileList* pFileList = &aFileList;
+ aData.GetData( (SvDataCopyStream**)&pFileList, pFileList->Type() );
+ for ( sal_uInt16 n = (sal_uInt16)aFileList.Count(); n--; )
+ Drop1_Impl( nSID, aFileList.GetFile(n), bHidden,
+ pExecItem, pPrintItem );
+ }
+ else if ( DragServer::HasFormat(i, FORMAT_FILE) )
+ {
+ String aFile = DragServer::PasteFile(i);
+ Drop1_Impl( nSID, aFile, bHidden, pExecItem, pPrintItem );
+ }
+ else if ( aBmk.PasteDragServer(i) )
+ {
+ // Format via ::com::sun::star::text::Bookmark rausholen
+ Drop1_Impl( nSID, aBmk.GetURL(), bHidden, pExecItem, pPrintItem );
+ }
+ }
+
+ if( pExecItem )
+ {
+ // Fuer Mac muss erstes Execute Asyncron kommen
+ pExecItem->SetCallMode( SFX_CALLMODE_ASYNCHRON );
+ pViewFrame->GetDispatcher()->Execute( *pExecItem );
+ delete pExecItem;
+ }
+
+
+ // scheinbar annehmen, sonst kommt zweites Drop im falschen Window
+ return DROP_COPY == rEvt.GetAction();
+}
+
+//--------------------------------------------------------------------
+
+sal_Bool SfxApplication::QueryDrop_Impl( sal_uInt16 nSID, DropEvent& rEvt )
+
+/* [Beschreibung]
+
+ QueryDrop-Handler; wird in der Regel aus dem QueryDrop() an den
+ Windows gerufen;
+ er returned sal_True, wenn FORMAT_FILE im DragServer vorliegt.
+*/
+{
+ if ( nSID == SID_OPENDOC || nSID == SID_OPENURL ||
+ nSID == SID_PRINTDOC || nSID == SID_PRINTDOCDIRECT ||
+ nSID == SID_NEWDOC || nSID == SID_NEWDOCDIRECT )
+ {
+ const sal_uInt16 nCount = DragServer::GetItemCount();
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
+ {
+ if ( INetBookmark::DragServerHasFormat( i ) ||
+ DragServer::HasFormat(i, FORMAT_FILE) ||
+ DragServer::HasFormat(i, FORMAT_FILE_LIST) )
+ {
+ // if ( rEvt.IsDefaultAction() )
+ {
+ rEvt.SetAction( DROP_COPY );
+ return sal_True;
+ }
+ if ( rEvt.GetAction() == DROP_COPY )
+ return sal_True;
+ }
+ }
+ }
+ return sal_False;
+}
+
+//--------------------------------------------------------------------
+
+sal_Bool SfxApplication::Drop( DropEvent& rEvt )
+
+/* [Beschreibung]
+
+ Dieser Drop-Handler kann von den Applikationen, die i.d.R. keine
+ Ableitug vom SfxApplicationWindow haben, "uberladen werden. Er wird in
+ der Regel aus dem Drop() an den Windows gerufen.
+
+ In der Basisimplementierung wird versucht, alle Elemente im DragServer
+ als Datei zu oeffnen, indem sie als Event ueber den Dispatcher verschickt
+ werden.
+*/
+
+{
+ return Drop_Impl( SID_OPENDOC, rEvt );
+}
+
+//--------------------------------------------------------------------
+
+sal_Bool SfxApplication::QueryDrop( DropEvent& rEvt )
+
+/* [Beschreibung]
+
+ Dieser QueryDrop-Handler kann von den Applikationen, die i.d.R. keine
+ Ableitug vom SfxApplicationWindow haben, "uberladen werden. Er wird in
+ der Regel aus dem QueryDrop() an den Windows gerufen.
+
+ Die Basisimplementierung returned sal_True, wenn FORMAT_FILE im DragServer
+ vorliegt.
+*/
+
+{
+ return QueryDrop_Impl( SID_OPENDOC, rEvt );
+}
+
+//--------------------------------------------------------------------
+
+sal_Bool SfxApplication::IsInException() const
+{
+ return pAppData_Impl->bInException;
+}
+
+//--------------------------------------------------------------------
+
+sal_uInt16 SfxApplication::Exception( sal_uInt16 nError )
+{
+ if ( pAppData_Impl->bInException )
+ Application::Abort( pImp->aDoubleExceptionString );
+
+ pAppData_Impl->bInException = sal_True;
+
+ if( SfxNewHdl::Get() )
+ {
+ SfxNewHdl::Get()->FlushWarnMem();
+ SfxNewHdl::Get()->FlushExceptMem();
+ }
+
+#ifndef TF_UCB
+ // Flush all CHAOS data.
+ CntSystem::Flush();
+#endif
+
+ INetURLObject aSaveObj( pAppIniMgr->Get( SFX_KEY_BACKUP_PATH ), INET_PROT_FILE );
+ if ( Application::IsInExecute() )
+ {
+ // save all modified documents and close all documents
+ SfxObjectShell *pIter, *pNext;
+ sal_uInt16 n = 0;
+ for(pIter = SfxObjectShell::GetFirst(); pIter; pIter = pNext)
+ {
+ pNext = SfxObjectShell::GetNext(*pIter);
+ if( pIter->IsModified() && pIter->GetName().CompareToAscii("BasicIDE") != COMPARE_EQUAL && !pIter->IsLoading() )
+ {
+ //try
+ {
+ // backup unsaved document
+ SFX_ITEMSET_ARG( pIter->GetMedium()->GetItemSet(), pPassItem, SfxStringItem, SID_PASSWORD, sal_False );
+ SfxRequest aReq(SID_SAVEASDOC, SFX_CALLMODE_SYNCHRON, pIter->GetPool());
+
+ sal_Bool bHadName = pIter->HasName();
+ INetURLObject aOldURL = pIter->GetMedium()->GetURLObject();
+ String aOldName = pIter->GetTitle();
+
+ const SfxFilter *pFilter = pIter->GetMedium()->GetFilter();
+ const SfxFilter *pOrigFilter = pFilter;
+ if ( !pFilter || ( pFilter->GetFilterFlags() & SFX_FILTER_PACKED ) || !( pFilter->GetFilterFlags() & SFX_FILTER_EXPORT ) )
+ // packed files must be saved with default format, but remember original filter !
+ pFilter = pIter->GetFactory().GetFilter(0);
+
+ String aSaveName, aSavePath = aSaveObj.GetMainURL();
+ String aFilterName;
+ if ( pFilter )
+ {
+ aFilterName = pFilter->GetName();
+ TempFile aTempFile( &aSavePath );
+ aSaveName = aTempFile.GetName();
+ }
+ else
+ {
+ String aExt( DEFINE_CONST_UNICODE( ".sav" ) );
+ TempFile aTempFile( DEFINE_CONST_UNICODE( "exc" ), &aExt, &aSavePath );
+ aSaveName = aTempFile.GetName();
+ }
+
+ aReq.AppendItem( SfxStringItem( SID_FILE_NAME, aSaveName ) );
+ aReq.AppendItem( SfxStringItem( SID_FILTER_NAME, aFilterName ) );
+ if ( pPassItem )
+ aReq.AppendItem( *pPassItem );
+
+ pIter->ExecuteSlot(aReq);
+
+ String aEntry( aSaveName );
+ aEntry += DEFINE_CONST_UNICODE(";");
+ aEntry += pOrigFilter ? pOrigFilter->GetName() : aFilterName;
+ aEntry += DEFINE_CONST_UNICODE(";");
+
+ if ( bHadName && INET_PROT_FILE == aOldURL.GetProtocol() )
+ {
+ aEntry += DEFINE_CONST_UNICODE("url;"),
+ aEntry += aOldURL.GetMainURL();
+ }
+ else
+ {
+ aEntry += DEFINE_CONST_UNICODE("title;"),
+ aEntry += aOldName;
+ }
+
+ pAppIniMgr->Set( aEntry, SFX_GROUP_WORKINGSET_IMPL, DEFINE_CONST_UNICODE("Recover"), n++ );
+ }
+ /*catch ( ::Exception & )
+ {
+ }*/
+ }
+ }
+
+ pAppIniMgr->Flush();
+
+ if ( ( nError & EXC_MAJORTYPE ) != EXC_DISPLAY && ( nError & EXC_MAJORTYPE ) != EXC_REMOTE )
+ {
+ Window *pTopWindow = GetTopWindow(); // GCC needs temporary
+ WarningBox( pTopWindow, SfxResId(STR_RECOVER_PREPARED) ).Execute();
+ }
+ }
+ else
+ pAppIniMgr->Flush();
+
+ sal_Bool bSendMail = (sal_uInt16) pAppIniMgr->ReadKey( DEFINE_CONST_UNICODE("Common"), DEFINE_CONST_UNICODE("SendCrashMail") ).ToInt32();
+ if ( !pAppData_Impl->bBean && bSendMail )
+ {
+ String aInfo = System::GetSummarySystemInfos();
+ if ( aInfo.Len() )
+ {
+ TempFile aTempFile( aSaveObj.GetMainURL() );
+ String aFileName = aTempFile.GetName();
+ SvFileStream aStr( aFileName, STREAM_STD_READWRITE );
+ aStr.WriteByteString(aInfo);
+ aStr << "\n<Build>\n";
+ aStr << BUILD;
+ aStr << '\n';
+ aStr << "</Build>\n";
+ aStr << "\n<Plattform>\n";
+#ifdef WNT
+ ByteString aPlattform( "wntmsci3" );
+#elif defined ( C50 )
+# if defined ( SPARC )
+ ByteString aPlattform( "unxsols2" );
+# elif defined ( INTEL )
+ ByteString aPlattform( "unxsoli2" );
+# endif
+#elif GLIBC == 2
+ ByteString aPlattform( "unxlngi2" );
+#elif defined ( SPARC ) && defined ( GCC )
+ ByteString aPlattform( "unxsogs" );
+#endif
+#ifndef DBG_UTIL
+ aPlattform += ".pro";
+#endif
+ aStr << aPlattform.GetBuffer();
+ aStr << '\n';
+ aStr << "</Plattform>\n";
+ aStr << "\n<OfficeLanguage>\n";
+ aStr.WriteByteString( ByteString(Application::GetAppInternational().GetLanguage()) );
+ aStr << '\n';
+ aStr << "</OfficeLanguage>\n";
+ aStr << "\n<ExceptionType>\n";
+ aStr << nError;
+ aStr << '\n';
+ aStr << "</ExceptionType>\n";
+ aStr.Close();
+
+ pAppIniMgr->WriteKey( pAppIniMgr->GetGroupName( SFX_GROUP_WORKINGSET_IMPL ),
+ DEFINE_CONST_UNICODE("Info"), aFileName );
+ pAppIniMgr->Flush();
+ }
+ }
+
+ switch( nError & EXC_MAJORTYPE )
+ {
+ case EXC_USER:
+ if( nError == EXC_OUTOFMEMORY )
+ Application::Abort( pImp->aMemExceptionString );
+ break;
+
+ case EXC_RSCNOTLOADED:
+ Application::Abort( pImp->aResExceptionString );
+ break;
+
+ case EXC_SYSOBJNOTCREATED:
+ Application::Abort( pImp->aSysResExceptionString );
+ break;
+ }
+
+ pAppData_Impl->bInException = sal_False;
+ return 0;
+}
+
+//---------------------------------------------------------------------
+
+ResMgr* SfxApplication::CreateResManager( const char *pPrefix )
+{
+ DBG_ASSERT( pAppIniMgr, "call CreateIniManger() before!" )
+
+ String aMgrName = String::CreateFromAscii( pPrefix );
+ aMgrName += String::CreateFromInt32(SOLARUPD); // aktuelle Versionsnummer
+ return ResMgr::CreateResMgr(U2S(aMgrName));
+}
+
+//---------------------------------------------------------------------
+
+SimpleResMgr* SfxApplication::CreateSimpleResManager()
+{
+ SimpleResMgr *pRet;
+ ::rtl::OUString sAppName;
+
+ if ( ::vos::OStartupInfo().getExecutableFile(sAppName) != ::vos::OStartupInfo::E_None )
+ {
+ sAppName = ::rtl::OUString();
+ }
+
+ LanguageType nType = Application::GetAppInternational().GetLanguage();
+ if ( nType == LANGUAGE_SYSTEM )
+ nType = System::GetLanguage();
+
+ String sTemp( sAppName );
+ pRet = new SimpleResMgr( CREATEVERSIONRESMGR_NAME(sfx),
+ nType, &sTemp, 0 );
+
+ return pRet;
+}
+
+//--------------------------------------------------------------------
+
+ResMgr* SfxApplication::GetSfxResManager()
+{
+ if ( !pImp->pSfxResManager )
+ {
+ pImp->pSfxResManager = CreateResManager("sfx");
+#if 0 // SFX on demand
+ if ( !Resource::GetResManager() )
+ Resource::SetResManager( pImp->pSfxResManager );
+#endif
+ }
+
+ return pImp->pSfxResManager;
+}
+
+//--------------------------------------------------------------------
+
+ResMgr* SfxApplication::GetLabelResManager() const
+{
+ return pAppData_Impl->pLabelResMgr;
+}
+
+//--------------------------------------------------------------------
+
+SimpleResMgr* SfxApplication::GetSimpleResManager()
+{
+ if ( !pImp->pSimpleResManager )
+ {
+ pImp->pSimpleResManager = CreateSimpleResManager();
+ }
+ return pImp->pSimpleResManager;
+}
+
+//------------------------------------------------------------------------
+
+void SfxApplication::SetProgress_Impl
+(
+ SfxProgress *pProgress /* zu startender <SfxProgress> oder 0, falls
+ der Progress zurueckgesetzt werden soll */
+)
+
+/* [Beschreibung]
+
+ Interne Methode zum setzen oder zuruecksetzen des Progress-Modes
+ fuer die gesamte Applikation.
+*/
+
+{
+ DBG_ASSERT( ( !pAppData_Impl->pProgress && pProgress ) ||
+ ( pAppData_Impl->pProgress && !pProgress ),
+ "Progress acitivation/deacitivation mismatch" );
+
+ if ( pAppData_Impl->pProgress && pProgress )
+ {
+ pAppData_Impl->pProgress->Suspend();
+ pAppData_Impl->pProgress->UnLock();
+ delete pAppData_Impl->pProgress;
+ }
+
+ pAppData_Impl->pProgress = pProgress;
+}
+
+//------------------------------------------------------------------------
+
+sal_uInt16 SfxApplication::GetFreeIndex()
+{
+ return pAppData_Impl->aIndexBitSet.GetFreeIndex()+1;
+}
+
+//------------------------------------------------------------------------
+
+void SfxApplication::ReleaseIndex(sal_uInt16 i)
+{
+ pAppData_Impl->aIndexBitSet.ReleaseIndex(i-1);
+}
+
+//--------------------------------------------------------------------
+
+void SfxApplication::EnterAsynchronCall_Impl()
+{
+ ++pAppData_Impl->nAsynchronCalls;
+}
+
+//--------------------------------------------------------------------
+
+void SfxApplication::LeaveAsynchronCall_Impl()
+{
+ --pAppData_Impl->nAsynchronCalls;
+}
+
+//--------------------------------------------------------------------
+
+FASTBOOL SfxApplication::IsInAsynchronCall_Impl() const
+{
+ return pAppData_Impl->nAsynchronCalls > 0;
+}
+
+//--------------------------------------------------------------------
+
+Window* SfxApplication::GetTopWindow() const
+{
+ SfxWorkWindow* pWork = GetWorkWindow_Impl( SfxViewFrame::Current() );
+ return pWork ? pWork->GetWindow() : NULL;
+}
+
+//--------------------------------------------------------------------
+
+void SfxApplication::SetTopWindow( WorkWindow *pWindow )
+{
+/*
+ sal_Bool bMode = sal_True;
+ if ( !pWindow || pWindow == GetAppWindow() )
+ bMode = sal_False;
+
+ SfxPlugInFrame* pPlug = PTR_CAST( SfxPlugInFrame,
+ GetViewFrame()->GetTopViewFrame() );
+ if ( pPlug )
+ pPlug->GetEnv_Impl()->SetPresentationMode( bMode, pWindow );
+ else
+ GetAppWindow()->SetPresentationMode( bMode, pWindow );
+*/
+}
+
+//--------------------------------------------------------------------
+
+void SfxApplication::StartPresentationMode
+(
+ WorkWindow* pWindow, // Presentations-Top-Window
+ sal_uInt16 nFlags /* 0 oder arithmetische Veroderung von:
+ PRESENTATION_HIDEALLAPPS
+ PRESENTATION_LIVEMODE */
+)
+
+/* [Beschreibung]
+
+ Wie SV, nur da\s zust"atzlich der Live-Modus ein und ausgeschaltet
+ werden kann.
+*/
+
+{
+// SfxApplicationWindow::Get()->SetPresentationMode( sal_True, pWindow );
+// Application::StartPresentationMode( pWindow, nFlags );
+}
+
+//--------------------------------------------------------------------
+
+void SfxApplication::EndPresentationMode()
+
+/* [Beschreibung]
+
+ Wie SV, nur da\s zust"atzlich der Live-Modus ber"ucksichtigt wird.
+*/
+
+{
+// Application::EndPresentationMode();
+// SfxApplicationWindow::Get()->SetPresentationMode( sal_False, NULL );
+}
+
+//--------------------------------------------------------------------
+
+sal_Bool SfxApplication::IsPresentationMode( sal_uInt16 nFlags )
+
+/* [Beschreibung]
+
+ Pr"uft, ob der Presentationsmodus aktiv ist. Falls Flags angegeben sind,
+ ob auch diese mit dem Modus "ubereinstimmen.
+
+
+ [Beispiel]
+
+ SfxApplication::StartPresentation( pWin, PRESENTATION_LIVAMODE );
+ DBG_ASSERT( sal_True == SfxApplication::IsPresentation(PRESENTATION_LIVAMODE) );
+*/
+
+{
+ return FALSE /*!!! (pb) Application::IsPresentationMode()*/;
+}
+
+sal_Bool SfxApplication::IsPlugin()
+{
+/* Reference < XPluginInstance > xPlugin ( pImp->xFrame, UNO_QUERY );
+ return xPlugin.is();*/
+
+ // Set default return value if method failed.
+ sal_Bool bReturn = sal_False;
+ // Get Desktop to get a list of all current tasks on it.
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XTasksSupplier > xDesktop( ::utl::getProcessServiceFactory()->createInstance( OUSTRING(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Desktop")) ), ::com::sun::star::uno::UNO_QUERY );
+ DBG_ASSERT( !(xDesktop.is()==sal_False), "SfxFrame::IsPlugin_Impl()Can't get reference to desktop service!\n" );
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > xList = xDesktop->getTasks()->createEnumeration();
+ while( xList->hasMoreElements() == sal_True )
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XTask > xTask;
+ xList->nextElement() >>= xTask;
+ ::com::sun::star::uno::Reference< ::com::sun::star::mozilla::XPluginInstance > xPlugIn( xTask, ::com::sun::star::uno::UNO_QUERY );
+ if( xPlugIn.is() == sal_True )
+ {
+ bReturn = sal_True;
+ break;
+ }
+ }
+ return bReturn;
+}
+
+//--------------------------------------------------------------------
+
+const Accelerator& SfxApplication::GetAccelerator_Impl() const
+{
+ return *GetAcceleratorManager()->GetAccel();
+}
+
+//--------------------------------------------------------------------
+
+SvVerbList* SfxApplication::GetVerbList_Impl() const
+{
+ if ( !pAppData_Impl->pVerbs )
+ {
+ // globale Verb-List anlegen
+ pAppData_Impl->pVerbs = new SvVerbList;
+ pAppData_Impl->pVerbs->Append( SvVerb( 0, String( SfxResId( STR_EDITOBJECT ) ) ) );
+ pAppData_Impl->pVerbs->Append( SvVerb( 1, String( SfxResId( STR_OPENOBJECT ) ) ) );
+ pAppData_Impl->pVerbs->Append( SvVerb( 2, DEFINE_CONST_UNICODE(STARAPP_VERB), sal_True, sal_False ) );
+ }
+
+ return pAppData_Impl->pVerbs;
+}
+
+//--------------------------------------------------------------------
+
+/* [Beschreibung]
+
+*/
+
+String SfxApplication::LocalizeDBName
+(
+ SfxDBNameConvert eConvert,
+ const String& rList,
+ char aDel
+) const
+{
+/* String aActName;
+ String aResult;
+ String aNationalName = SfxResId(STR_ADDRESS_NAME);
+ String aIniName( "Address" );
+ sal_uInt16 nCnt = rList.GetTokenCount( aDel );
+
+ for( sal_uInt16 i=0 ; i<nCnt ; i++ )
+ {
+ aActName = rList.GetToken( i, aDel );
+
+ if( eConvert == INI2NATIONAL )
+ {
+ if( aActName == aIniName )
+ aResult += aNationalName;
+ else
+ aResult += aActName;
+ }
+ else
+ {
+ if( aActName == aNationalName )
+ aResult += aIniName;
+ else
+ aResult += aActName;
+ }
+
+ aResult += aDel;
+ }
+
+ aResult.EraseTrailingChars( aDel );
+
+ return aResult;*/
+
+ return rList;
+}
+
+//--------------------------------------------------------------------
+
+IMPL_STATIC_LINK( SfxApplication, CookieAlertHdl_Impl, void*, EMPTYARG )
+{
+ return 0;
+}
+
+//--------------------------------------------------------------------
+
+void SfxApplication::SetUserEMailAddress( const String &rEMail )
+{
+ pAppData_Impl->aUserEMailAddr = rEMail;
+}
+
+//-------------------------------------------------------------------------
+
+void SfxApplication::SetDefFocusWindow( Window *pWin )
+
+/* [Beschreibung]
+
+ Mit dieser Methode wird das Window gesetzt, auf das beim n"achsten
+ <SfxApplication::GrabFocus()> der Focus gesetzt werden soll.
+
+ Ein 'SetDefFocusWindow()' wirkt f"ur genau einen einzigen Aufruf von
+ 'SfxApplication::GrabFocus()'.
+
+ Damit kann z.B. das in verschiedenen Situationen von Windows kommende
+ Focus-Setzen auf MDIWindows verhindert werden.
+*/
+
+{
+ pAppData_Impl->pDefFocusWin = pWin;
+}
+
+//-------------------------------------------------------------------------
+
+void SfxApplication::GrabFocus( Window *pAlternate )
+
+/* [Beschreibung]
+
+ Mit dieser Methode wird der Focus auf das zuvor mit der Methode
+ <SfxApplicaton::SetDefFocusWindow()> gesetzte Window gegrabt. Ist
+ keins mehr gesetzt oder wurde es bereits verwendet, wird der Focus
+ auf 'pAlternate' gesetzt. Ein 'SetDefFocusWindow()' wirkt f"ur genau
+ ein einziges 'SfxApplication::GrabFocus()'.
+*/
+
+{
+ Window *pWin = pAppData_Impl->pDefFocusWin
+ ? pAppData_Impl->pDefFocusWin
+ : pAlternate;
+ pWin->GrabFocus();
+ pAppData_Impl->pDefFocusWin = 0;
+}
+
+//-------------------------------------------------------------------------
+
+SfxFrame* SfxApplication::GetTargetFrame( const SfxItemSet* pSet,
+ sal_Bool& rbOwner )
+
+/* [Beschreibung]
+
+ Mit dieser Methode wird <GetTargetFrame_Impl(const SfxItemSet*, sal_Bool&)>
+ exportiert.
+*/
+
+{
+ return GetTargetFrame_Impl( pSet, rbOwner );
+}
+
+SfxStatusBarManager* SfxApplication::GetStatusBarManager() const
+{
+ return GetWorkWindow_Impl(SfxViewFrame::Current())->GetStatusBarManager_Impl();
+}
+
+SfxViewFrame* SfxApplication::GetViewFrame()
+{
+ return pViewFrame;
+}
+
+UniqueIndex* SfxApplication::GetEventHandler_Impl()
+{
+ return pImp->pEventHdl;
+}
+
+SfxTbxCtrlFactArr_Impl& SfxApplication::GetTbxCtrlFactories_Impl() const
+{
+ return *pImp->pTbxCtrlFac;
+}
+
+SfxStbCtrlFactArr_Impl& SfxApplication::GetStbCtrlFactories_Impl() const
+{
+ return *pImp->pStbCtrlFac;
+}
+
+SfxMenuCtrlFactArr_Impl& SfxApplication::GetMenuCtrlFactories_Impl() const
+{
+ return *pImp->pMenuCtrlFac;
+}
+
+SfxViewFrameArr_Impl& SfxApplication::GetViewFrames_Impl() const
+{
+ return *pImp->pViewFrames;
+}
+
+SfxViewShellArr_Impl& SfxApplication::GetViewShells_Impl() const
+{
+ return *pImp->pViewShells;
+}
+
+SfxObjectShellArr_Impl& SfxApplication::GetObjectShells_Impl() const
+{
+ return *pImp->pObjShells;
+}
+
+
diff --git a/sfx2/source/appl/app.hrc b/sfx2/source/appl/app.hrc
new file mode 100644
index 000000000000..fc5d528d3cfd
--- /dev/null
+++ b/sfx2/source/appl/app.hrc
@@ -0,0 +1,189 @@
+/*************************************************************************
+ *
+ * $RCSfile: app.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:26 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SFX_APP_HRC
+#define _SFX_APP_HRC
+
+#include "sfx.hrc"
+
+// #defines *****************************************************************
+
+#define ACC_IBM (RID_SFX_APP_START+2)
+#define MSG_ERR_WRITE_CFG (RID_SFX_APP_START+2)
+#define MSG_ERR_READ_CFG (RID_SFX_APP_START+3)
+#define MSG_ERR_OPEN_CFG (RID_SFX_APP_START+4)
+#define MSG_ERR_FILETYPE_CFG (RID_SFX_APP_START+5)
+#define MSG_ERR_VERSION_CFG (RID_SFX_APP_START+6)
+
+#define MSG_ISPRINTING_QUERYABORT (RID_SFX_APP_START+9)
+#define MSG_CANT_QUIT (RID_SFX_APP_START+10)
+#define STR_ISMODIFIED (RID_SFX_APP_START+11)
+#define STR_AUTOSAVE (RID_SFX_APP_START+12)
+#define STR_MAIL (RID_SFX_APP_START+13)
+#define MSG_ERR_WRITE_SBL (RID_SFX_APP_START+14)
+#define MSG_IS_SERVER (RID_SFX_APP_START+15)
+
+#define STR_RESEXCEPTION (RID_SFX_APP_START+21)
+#define STR_SYSRESEXCEPTION (RID_SFX_APP_START+22)
+#define STR_DOUBLEEXCEPTION (RID_SFX_APP_START+23)
+#define STR_RESWARNING (RID_SFX_APP_START+24)
+#define STR_ERR_NOTEMPLATE (RID_SFX_APP_START+27)
+#define STR_RECOVER_TITLE (RID_SFX_APP_START+28)
+#define STR_RECOVER_QUERY (RID_SFX_APP_START+29)
+#define STR_RECOVER_PREPARED (RID_SFX_APP_START+30)
+#define MSG_ERR_SOINIT (RID_SFX_APP_START+31)
+
+#define MSG_IOERR_FILE_NOT_FOUND (RID_SFX_APP_START+32)
+#define MSG_IOERR_PATH_NOT_FOUND (RID_SFX_APP_START+33)
+#define MSG_IOERR_TOO_MANY_OPEN_FILES (RID_SFX_APP_START+34)
+#define MSG_IOERR_ACCESS_DENIED (RID_SFX_APP_START+35)
+#define MSG_IOERR_INVALID_ACCESS (RID_SFX_APP_START+36)
+#define MSG_IOERR_INVALID_HANDLE (RID_SFX_APP_START+37)
+#define MSG_IOERR_CANNOT_MAKE (RID_SFX_APP_START+38)
+#define MSG_IOERR_SHARING (RID_SFX_APP_START+39)
+#define MSG_IOERR_INVALID_PARAMETER (RID_SFX_APP_START+40)
+#define MSG_IOERR_GENERAL (RID_SFX_APP_START+41)
+
+#define RID_FULLSCREENTOOLBOX (RID_SFX_APP_START+42)
+#define RID_RECORDINGTOOLBOX (RID_SFX_APP_START+43)
+#define RID_ENVTOOLBOX (RID_SFX_APP_START+44)
+
+#define STR_EVENT_STARTAPP (RID_SFX_APP_START+50)
+#define STR_EVENT_CLOSEAPP (RID_SFX_APP_START+51)
+#define STR_EVENT_CREATEDOC (RID_SFX_APP_START+52)
+#define STR_EVENT_OPENDOC (RID_SFX_APP_START+53)
+#define STR_EVENT_CLOSEDOC (RID_SFX_APP_START+54)
+#define STR_EVENT_SAVEDOC (RID_SFX_APP_START+55)
+#define STR_EVENT_SAVEASDOC (RID_SFX_APP_START+56)
+#define STR_EVENT_ACTIVATEDOC (RID_SFX_APP_START+57)
+#define STR_EVENT_DEACTIVATEDOC (RID_SFX_APP_START+58)
+#define STR_EVENT_ONERROR (RID_SFX_APP_START+78)
+#define STR_EVENT_PREPARECLOSEDOC (RID_SFX_APP_START+89)
+#define STR_EVENT_NEWMESSAGE (RID_SFX_APP_START+90)
+#define STR_EVENT_SAVEDOCDONE (RID_SFX_APP_START+95)
+#define STR_EVENT_SAVEASDOCDONE (RID_SFX_APP_START+96)
+
+#define STR_QUITAPP (RID_SFX_APP_START+59)
+#define STR_EXITANDRETURN (RID_SFX_APP_START+60)
+#define STR_ERR_NOFILE (RID_SFX_APP_START+61)
+#define STR_EXTHELPSTATUS (RID_SFX_APP_START+62)
+
+#define STR_EVENT_PRINTDOC (RID_SFX_APP_START+64)
+#define STR_ADDRESS_NAME (RID_SFX_APP_START+65)
+
+#define RID_MAIL_INBOX (RID_SFX_APP_START+66)
+#define RID_DELETE_MAIL_QBX (RID_SFX_APP_START+67)
+
+#define RID_STR_HLPFILENOTEXIST (RID_SFX_APP_START+68)
+#define RID_STR_HLPAPPNOTSTARTED (RID_SFX_APP_START+69)
+
+#define STR_NOMODUL (RID_SFX_APP_START+73)
+#define STR_NOOFFICE (RID_SFX_APP_START+74)
+#define STR_NODOUBLE (RID_SFX_APP_START+75)
+#define STR_NOPRINTER (RID_SFX_APP_START+76)
+
+#define MSG_SIGNAL (RID_SFX_APP_START+77)
+
+#define RID_STR_HELP (RID_SFX_APP_START+79)
+#define RID_STR_NOAUTOSTARTHELPAGENT (RID_SFX_APP_START+80)
+#define RID_HELPBAR (RID_SFX_APP_START+81)
+#define RID_SPECIALCONFIG_ERROR (RID_SFX_APP_START+82)
+
+#define RID_IMAGE_RES (RID_SFX_APP_START+83)
+
+#define STR_MEMINFO_HEADER (RID_SFX_APP_START+84)
+#define STR_MEMINFO_FOOTER (RID_SFX_APP_START+85)
+#define STR_MEMINFO_OBJINFO (RID_SFX_APP_START+86)
+
+#define RID_PLUGIN (RID_SFX_APP_START+87)
+
+#define RID_WARN_POST_MAILTO (RID_SFX_APP_START+88)
+
+#define RID_STR_NOWELCOMESCREEN (RID_SFX_APP_START+91)
+
+#define STR_EDITOBJECT (RID_SFX_APP_START+92)
+#define STR_OPENOBJECT (RID_SFX_APP_START+93)
+#define STR_CORRUPT_INSTALLATION (RID_SFX_APP_START+94)
+#define IDS_SBERR_STOREREF (RID_SFX_APP_START+97)
+
+#define RID_IMAGE_USER1 1
+#define RID_IMAGE_USER2 2
+#define RID_IMAGE_USER3 3
+#define RID_IMAGE_USER4 4
+#define RID_IMAGE_BADDATA 5
+#define RID_IMAGE_BINARY 6
+#define RID_IMAGE_DELAYED 7
+#define RID_IMAGE_EMBED 8
+#define RID_IMAGE_IMAGE 9
+#define RID_IMAGE_INDEX 10
+#define RID_IMAGE_MENU 11
+#define RID_IMAGE_MOVIE 12
+#define RID_IMAGE_NOTFOUND 13
+#define RID_IMAGE_SOUND 14
+#define RID_IMAGE_TELNET 15
+#define RID_IMAGE_TEXT 16
+#define RID_IMAGE_UNKNOWN 17
+#define RID_IMAGE_UNSECURE 18
+#define RID_IMAGE_SPECIAL 19
+
+#endif // #ifndef _SFX_APP_HRC
+
+// ******************************************************************* EOF
+
diff --git a/sfx2/source/appl/app.src b/sfx2/source/appl/app.src
new file mode 100644
index 000000000000..a31d7a2efee9
--- /dev/null
+++ b/sfx2/source/appl/app.src
@@ -0,0 +1,3406 @@
+/*************************************************************************
+ *
+ * $RCSfile: app.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:26 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+ // include ------------------------------------------------------------------
+
+#include "sfx.hrc"
+#include "app.hrc"
+#include "helpid.hrc"
+
+InfoBox RID_DOCALREADYLOADED_DLG
+{
+ Message = "Das Dokument war bereits geladen und wurde aktiviert." ;
+ Message [ ENGLISH ] = "Document was already open." ;
+ Message [ norwegian ] = "Dokumentet er allerede pent." ;
+ Message [ italian ] = "Documento gi aperto ed attivato." ;
+ Message [ portuguese_brazilian ] = "O documento j est aberto." ;
+ Message [ portuguese ] = "O documento j se encontra aberto e foi activado." ;
+ Message [ finnish ] = "Asiakirja on jo avoinna." ;
+ Message [ danish ] = "Dokumentet var allerede indlst og blev aktiveret." ;
+ Message [ french ] = "Document dj charg et activ." ;
+ Message [ swedish ] = "Dokumentet var redan laddat och har aktiverats." ;
+ Message [ dutch ] = "Document is reeds geladen en geactiveerd." ;
+ Message [ spanish ] = "El documento ya est cargado y activado." ;
+ Message [ english_us ] = "Document already open." ;
+ Message[ chinese_simplified ] = "Ѿװļڼ״̬";
+ Message[ russian ] = " .";
+ Message[ polish ] = "Dokument zosta ju zaadowany i uaktywniony.";
+ Message[ japanese ] = "޷Ă͂łɓǂݍ܂걸èނɂȂĂ܂B";
+ Message[ chinese_traditional ] = "wg˸oɮרóBEAC";
+ Message[ arabic ] = " .";
+ Message[ dutch ] = "Document is reeds geladen en geactiveerd.";
+ Message[ chinese_simplified ] = "Ѿװļڼ״̬";
+ Message[ greek ] = " .";
+ Message[ korean ] = " ̹ ֽϴ.";
+ Message[ turkish ] = "Belge zaten ykl ve ak.";
+ Message[ language_user1 ] = " ";
+};
+
+ErrorBox RID_CANTLOADDOC_DLG
+{
+ Message = "Das Dokument kann nicht geladen werden." ;
+ Message [ ENGLISH ] = "Cannot open document." ;
+ Message [ norwegian ] = "Kan ikke pne dokument." ;
+ Message [ italian ] = "Impossibile aprire il documento." ;
+ Message [ portuguese_brazilian ] = "No consigo abrir o documento." ;
+ Message [ portuguese ] = "Impossvel abrir o documento." ;
+ Message [ finnish ] = "Asiakirjaa ei voi avata." ;
+ Message [ danish ] = "Det er ikke muligt at indlse dokumentet." ;
+ Message [ french ] = "Impossible de charger le document." ;
+ Message [ swedish ] = "Dokumentet kan inte laddas." ;
+ Message [ dutch ] = "Het document kan niet worden geopend." ;
+ Message [ spanish ] = "No es posible cargar el documento." ;
+ Message [ english_us ] = "Cannot open document." ;
+ Message[ chinese_simplified ] = "޷װĵ";
+ Message[ russian ] = " .";
+ Message[ polish ] = "Dokument nie moe by zaadowany.";
+ Message[ japanese ] = "޷Ă͓ǂݍ݂ł܂B";
+ Message[ chinese_traditional ] = "Lk˸oɮסC";
+ Message[ arabic ] = " .";
+ Message[ dutch ] = "Het document kan niet worden geopend.";
+ Message[ chinese_simplified ] = "޷װĵ";
+ Message[ greek ] = " .";
+ Message[ korean ] = " ϴ.";
+ Message[ turkish ] = "Belge yklenemiyor.";
+ Message[ language_user1 ] = " ";
+};
+
+ErrorBox MSG_ERR_READ_CFG
+{
+ BUTTONS = WB_OK ;
+ DEFBUTTON = WB_DEF_OK ;
+ Message = "Fehler beim Lesen der Konfiguration." ;
+ Message [ ENGLISH ] = "Error reading configuration file." ;
+ Message [ norwegian ] = "Feil ved lesing av konfigurasjonsfil." ;
+ Message [ italian ] = "Errore durante la lettura del file di configurazione." ;
+ Message [ portuguese_brazilian ] = "Erro ao ler o arquivo de configurao." ;
+ Message [ portuguese ] = "Erro durante a leitura do ficheiro de configurao." ;
+ Message [ finnish ] = "Virhe asetustiedostoa luettaessa." ;
+ Message [ danish ] = "Fejl under lsning af konfiguration." ;
+ Message [ french ] = "Erreur de lecture de la configuration." ;
+ Message [ swedish ] = "Fel vid lsning av konfiguration." ;
+ Message [ dutch ] = "Fout bij het lezen van het configuratiebestand." ;
+ Message [ spanish ] = "Error al leer el archivo de configuracin." ;
+ Message [ english_us ] = "Error reading configuration file." ;
+ Message[ chinese_simplified ] = "ڶȡļʱ";
+ Message[ russian ] = " .";
+ Message[ polish ] = "Bd przy odczycie konfiguracji.";
+ Message[ japanese ] = "ݒǂݎۂ̴װ";
+ Message[ chinese_traditional ] = "bŪtmɮ׮ɵoͿ~C";
+ Message[ arabic ] = " .";
+ Message[ dutch ] = "Fout bij het lezen van het configuratiebestand.";
+ Message[ chinese_simplified ] = "ڶȡļʱ";
+ Message[ greek ] = " ";
+ Message[ korean ] = " б .";
+ Message[ turkish ] = "Konfigrasyon dosyas okunurken hata olutu.";
+ Message[ language_user1 ] = " ";
+};
+
+ErrorBox MSG_ERR_WRITE_CFG
+{
+ BUTTONS = WB_OK ;
+ DEFBUTTON = WB_DEF_OK ;
+ Message = "Fehler beim Schreiben der Konfiguration." ;
+ Message [ ENGLISH ] = "Error writing configuration file." ;
+ Message [ norwegian ] = "Feil ved skriving av konfigurasjonsfil." ;
+ Message [ italian ] = "Errore durante la scrittura del file di configurazione." ;
+ Message [ portuguese_brazilian ] = "Erro ao gravar o arquivo de configurao." ;
+ Message [ portuguese ] = "Erro ao gravar o ficheiro de configurao." ;
+ Message [ finnish ] = "Virhe asetustiedostoa kirjoitettaessa." ;
+ Message [ danish ] = "Fejl under skrivning af konfiguration." ;
+ Message [ french ] = "Erreur lors de l'criture du fichier de configuration." ;
+ Message [ swedish ] = "Fel vid skrivning av konfigurationsfil." ;
+ Message [ dutch ] = "Fout bij het schrijven van het configuratiebestand." ;
+ Message [ spanish ] = "Error al escribir el archivo de configuracin." ;
+ Message [ english_us ] = "Error writing configuration file." ;
+ Message[ chinese_simplified ] = "дļʱ";
+ Message[ russian ] = " .";
+ Message[ polish ] = "Bd przy zapisie konfiguracji.";
+ Message[ japanese ] = "ݒ̓ǂݍ݂̍ۂ̴װ";
+ Message[ chinese_traditional ] = "bgJtmɮ׮ɵoX~C";
+ Message[ arabic ] = " .";
+ Message[ dutch ] = "Fout bij het schrijven van het configuratiebestand.";
+ Message[ chinese_simplified ] = "дļʱ";
+ Message[ greek ] = " .";
+ Message[ korean ] = " .";
+ Message[ turkish ] = "Konfigrasyon dosyasna yazlrken hata olutu.";
+ Message[ language_user1 ] = " ";
+};
+
+ErrorBox MSG_ERR_OPEN_CFG
+{
+ BUTTONS = WB_OK ;
+ DEFBUTTON = WB_DEF_OK ;
+ Message = "Fehler beim ffnen der Konfiguration." ;
+ Message [ ENGLISH ] = "Error opening configuration file." ;
+ Message [ norwegian ] = "Feil ved pning av konfigurasjonsfil." ;
+ Message [ italian ] = "Errore durante l'apertura del file di configurazione." ;
+ Message [ portuguese_brazilian ] = "Erro ao abrir o arquivo de configurao." ;
+ Message [ portuguese ] = "Erro ao abrir o ficheiro de configurao." ;
+ Message [ finnish ] = "Virhe asetustiedostoa avattaessa." ;
+ Message [ danish ] = "Fejl ved bning af konfiguration." ;
+ Message [ french ] = "Erreur lors de l'ouverture du fichier de configuration." ;
+ Message [ swedish ] = "Fel vid ppning av konfiguration." ;
+ Message [ dutch ] = "Fout bij het openen van het configuratiebestand." ;
+ Message [ spanish ] = "Error al abrir el archivo de configuracin." ;
+ Message [ english_us ] = "Error opening configuration file." ;
+ Message[ chinese_simplified ] = "ڴļʱ";
+ Message[ russian ] = " .";
+ Message[ polish ] = "Bd przy otwieraniu konfiguracji.";
+ Message[ japanese ] = "ݒJۂ̴װ";
+ Message[ chinese_traditional ] = "b}ҰtmɮɵoͿ~C";
+ Message[ arabic ] = " .";
+ Message[ dutch ] = "Fout bij het openen van het configuratiebestand.";
+ Message[ chinese_simplified ] = "ڴļʱ";
+ Message[ greek ] = " .";
+ Message[ korean ] = " .";
+ Message[ turkish ] = "Konfigrasyon dosyas alrken hata olutu.";
+ Message[ language_user1 ] = " ";
+};
+
+ErrorBox MSG_ERR_FILETYPE_CFG
+{
+ BUTTONS = WB_OK ;
+ DEFBUTTON = WB_DEF_OK ;
+ Message = "Datei ist keine Konfigurationsdatei." ;
+ Message [ ENGLISH ] = "File is not a configuration file." ;
+ Message [ norwegian ] = "Filen er ikke en konfigurasjonsfil." ;
+ Message [ italian ] = "Il file non un file di configurazione." ;
+ Message [ portuguese_brazilian ] = "O arquivo no um arquivo de configurao." ;
+ Message [ portuguese ] = "Este ficheiro no um ficheiro de configurao." ;
+ Message [ finnish ] = "Tiedosto ei ole asetustiedosto." ;
+ Message [ danish ] = "Filen er ikke en konfigurationsfil." ;
+ Message [ french ] = "Ce fichier n'est pas un fichier de configuration." ;
+ Message [ swedish ] = "Filen r inte en konfigurationsfil." ;
+ Message [ dutch ] = "Dit bestand is geen configuratiebestand." ;
+ Message [ spanish ] = "El archivo no es un archivo de configuracin." ;
+ Message [ english_us ] = "File is not a configuration file." ;
+ Message[ chinese_simplified ] = "ļļ";
+ Message[ russian ] = " .";
+ Message[ polish ] = "Ten plik nie jest plikiem konfiguracyjnym.";
+ Message[ japanese ] = "̧ق͐ݒ̧قł͂܂B";
+ Message[ chinese_traditional ] = "ɮפOtmɮסC";
+ Message[ arabic ] = " .";
+ Message[ dutch ] = "Dit bestand is geen configuratiebestand.";
+ Message[ chinese_simplified ] = "ļļ";
+ Message[ greek ] = " .";
+ Message[ korean ] = " ƴմϴ.";
+ Message[ turkish ] = "Dosya, konfigrasyon dosyas deil.";
+ Message[ language_user1 ] = " ";
+};
+
+ErrorBox MSG_ERR_VERSION_CFG
+{
+ BUTTONS = WB_OK ;
+ DEFBUTTON = WB_DEF_OK ;
+ Message = "Konfigurationsdatei hat falsche Version." ;
+ Message [ ENGLISH ] = "Configuration file has wrong version." ;
+ Message [ norwegian ] = "Konfigurasjonsfilen har feil versjon." ;
+ Message [ italian ] = "Il file di configurazione di versione errata." ;
+ Message [ portuguese_brazilian ] = "Verso errada do arquivo de configurao." ;
+ Message [ portuguese ] = "Verso errada do ficheiro de configurao." ;
+ Message [ finnish ] = "Asetustiedoston versio on vr." ;
+ Message [ danish ] = "Konfigurationsfilen indeholder forkert version." ;
+ Message [ french ] = "Version incorrecte du fichier de configuration." ;
+ Message [ swedish ] = "Konfigurationsfil har fel version." ;
+ Message [ dutch ] = "Verkeerde versie van configuratiebestand." ;
+ Message [ spanish ] = "El archivo de configuracin tiene una versin falsa." ;
+ Message [ english_us ] = "Configuration file contains the wrong version." ;
+ Message[ chinese_simplified ] = "ļ汾";
+ Message[ russian ] = " .";
+ Message[ polish ] = "Plik konfiguracji zawiera nieprawidow wersj.";
+ Message[ japanese ] = "ݒ̧ق Ȃްޮ݂łB";
+ Message[ chinese_traditional ] = "tmɮת~C";
+ Message[ arabic ] = " .";
+ Message[ dutch ] = "Verkeerde versie van configuratiebestand.";
+ Message[ chinese_simplified ] = "ļ汾";
+ Message[ greek ] = " .";
+ Message[ korean ] = " ߸ ϰ ֽϴ.";
+ Message[ turkish ] = "Konfigrasyon dosyasnn srm yanl.";
+ Message[ language_user1 ] = " ";
+};
+
+ErrorBox MSG_ERR_WRITE_SBL
+{
+ BUTTONS = WB_OK ;
+ DEFBUTTON = WB_DEF_OK ;
+ Message = "Fehler beim Schreiben der BASIC-Bibliothek in\n'@'." ;
+ Message [ ENGLISH ] = "Error writing BASIC library to file\n'@'." ;
+ Message [ norwegian ] = "Feil oppstod ved skriving av BASIC bibliotek til fil\n'@'." ;
+ Message [ italian ] = "Errore durante la scrittura della libreria BASIC nel file\n'@'." ;
+ Message [ portuguese_brazilian ] = "Erro ao gravar a biblioteca BASICA no arquivo\n'@'." ;
+ Message [ portuguese ] = "Erro ao gravar a biblioteca BASIC em \n'@'." ;
+ Message [ finnish ] = "Virhe kirjoitettaessa BASIC-kirjastoa tiedostoon\n'@'." ;
+ Message [ danish ] = "Fejl under skrivning af BASIC-biblioteket til \n'@'." ;
+ Message [ french ] = "Erreur lors de l'criture de la bibliothque BASIC dans \n'@'." ;
+ Message [ swedish ] = "Fel vid skrivning av BASIC-bibliotek i\n'@'." ;
+ Message [ dutch ] = "Fout bij het schrijven van de BASIC-bibliotheek in\n'@'." ;
+ Message [ spanish ] = "Error al escribir la biblioteca BASIC en\n'@'." ;
+ Message [ english_us ] = "Error recording BASIC library in\n'@'." ;
+ Message[ chinese_simplified ] = "BASIC д\n'@' ʱ";
+ Message[ russian ] = " BASIC \n'@'.";
+ Message[ polish ] = "Bd przy zapisie biblioteki BASIC w in\n'@'.";
+ Message[ japanese ] = "\n'@'łBASIC ײ؂̓ǂݍ݂̍ۂ̴װ";
+ Message[ chinese_traditional ] = "BASIC wbgJ\n'@' ɵoͿ~C";
+ Message[ arabic ] = " BASIC \n'@'.";
+ Message[ dutch ] = "Fout bij het schrijven van de BASIC-bibliotheek in\n'@'.";
+ Message[ chinese_simplified ] = "BASIC д\n'@' ʱ";
+ Message[ greek ] = " BASIC \n'@'.";
+ Message[ korean ] = "BASIC ̺귯\n'@' .";
+ Message[ turkish ] = "BASIC kitapl, \n'@' iine kaydedilirken hata olutu.";
+ Message[ language_user1 ] = " ";
+};
+
+ErrorBox MSG_SIGNAL
+{
+ BUTTONS = WB_YES_NO ;
+ DEFBUTTON = WB_DEF_YES ;
+ Message = "Es ist ein unerwarter Anwendungsfehler aufgetreten!\nSie knnen jetzt auf eigene Gefahr hin versuchen,\nalle offenen Dokumente zu sichern!\n\nSoll versucht werden, Ihre Arbeit zu sichern, bevor die Applikation beendet wird?" ;
+ Message [ ENGLISH ] = "-" ;
+ Message [ dutch ] = "Er is een onverwachte programmafout opgetreden!\nU kunt nu op eigen risico proberen,\nalle geopende documenten op te slaan!\n\nWilt u proberen uw werk op te slaan voordat de applicatie wordt beindigd?" ;
+ Message [ swedish ] = "Ett ovntat programfel har uppsttt!\nDu kan nu p eget bevg frska\nspara alla ppna dokument!\n\nVill Du frska spara alla ndringar i dokumenten innan programmet avslutas?" ;
+ Message [ danish ] = "Der opstod en uventet programfejl\nDu kan p eget ansvar prve p at\ngemme alle bne dokumenter!\n\nVil du prve p at gemme dine dokumenter, fr programmet afsluttes?" ;
+ Message [ italian ] = "Nell'applicazione si verificato un errore inatteso!\nAdesso potete provare, a proprio rischio, di\nsalvare tutti i documenti aperti!\n\nVolete che si provi a salvare il lavoro prima di chiudere l'applicazione?" ;
+ Message [ spanish ] = "Se ha producido un error inesperado de la aplicacin!\nUsted puede ahora, a riesgo propio, intentar\nsalvar todos los documentos abiertos!\n\nDesea guardar su trabajo antes de cerrar la aplicacin?" ;
+ Message [ french ] = "Erreur d'application inattendue !\nVous pouvez tout de mme essayer de \nsauvegarder tous les documents ouverts !\n\nSauvegarder votre travail avant de fermer l'application ?" ;
+ Message [ english_us ] = "An unexpected program error has occurred.\n\nDo you want to try to save your changes in all nopen documents before the program is terminated?" ;
+ Message [ portuguese ] = "Surgiu um erro de programa inesperado!\n\nPoder agora, sob o seu prprio risco, \ntentar guardar todos os documentos abertos.\nTentar guardar o seu trabalho antes que a aplicao seja fechada?" ;
+ Message [ portuguese_brazilian ] = "Es ist ein unerwarter Anwendungsfehler aufgetreten!\nSie knnen jetzt auf eigene Gefahr hin versuchen,\nalle offenen Dokumente zu sichern!\n\nSoll versucht werden, Ihre Arbeit zu sichern, bevor die Applikation beendet wird?" ;
+ Message[ chinese_simplified ] = "һij\nڿԳԱб򿪵ļ\nҪڹرӦó֮ǰеļ";
+ Message[ russian ] = " !\n ,\n !\n\n ?";
+ Message[ polish ] = "Wystpi nieoczekiwany bd w programie!\nNa wasn odpowiedzialno moesz sprbowa \nzapisa wszystkie otwarte dokumenty!\n\nCzy sprbowa zapisa twoj prac przed zamkniciem aplikacji?";
+ Message[ japanese ] = "\\Ȃ۸ װ܂B\nؽ͂܂\nJĂ޷Ăׂ͂ĕۑĂ݂ĂB\n\nع݂IOɁAƒ޷ĂۑĂ݂܂H";
+ Message[ chinese_traditional ] = "oͤF@ӷN~{~I\nz{biHիOsҦQ}ҪɮסI\nznboε{exsҦɮסH";
+ Message[ arabic ] = " !\n ɡ \n !\n\n ߡ ޿";
+ Message[ dutch ] = "Er is een onverwachte programmafout opgetreden!\nU kunt nu op eigen risico proberen,\nalle geopende documenten op te slaan!\n\nWilt u proberen uw werk op te slaan voordat de applicatie wordt beindigd?";
+ Message[ chinese_simplified ] = "һij\nڿԳԱб򿪵ļ\nҪڹرӦó֮ǰеļ";
+ Message[ greek ] = " !\n\n ( ) ;";
+ Message[ korean ] = "ġ α׷ ߻߽ϴ.\n\n õ ֽϴ. α׷ ϱ ۾ õ ðڽϱ?";
+ Message[ turkish ] = "Beklenmeyen bir program hatas olutu!\nu an ak olan tm belgeleri\nkaydetmeyi deneyebilirsiniz!\n\nUygulama kapatlmadan nce belgeleriniz kaydedilmeye allsn m?";
+ Message[ language_user1 ] = " ";
+};
+
+Resource SID_UNKNOWN
+{
+ String 1 "-" ;
+};
+
+Resource BMP_SFX_COLOR
+{
+ ExtraData =
+ {
+ SID_NEWDOC; // 043
+ SID_OPENDOC; // 044
+ SID_CLOSEDOC; // 045
+ SID_RELOAD; // 046
+ SID_SAVEASDOC; // 047
+ SID_PRINTDOC; // 051
+ SID_SETUPPRINTER; // 053
+ SID_QUITAPP; // 054
+ SID_UNDO; // 055
+ SID_REDO; // 056
+ SID_REPEAT; // 057
+ SID_CUT; // 058
+ SID_COPY; // 059
+ SID_PASTE; // 060
+ SID_DELETE; // 061
+ SID_SELECTALL; // 062
+ SID_SAVEDOC; // 063 vormals 046
+ SID_EXITANDRETURN; // 064 vormals 054
+ SID_RECORDMACRO; // 095
+ SID_EDITMACRO; // 096
+ SID_HELPMENU; // 098
+ SID_CONFIG; // 123
+ SID_CONFIGTOOLBOX; // 124
+ 0;
+ };
+ Bitmap BMP_SFX_SMALL { File = "sco.bmp" ; };
+ Bitmap BMP_SFX_LARGE { File = "lco.bmp" ; };
+};
+
+Resource BMP_SFX_MONO
+{
+ ExtraData =
+ {
+ SID_NEWDOC; // 043
+ SID_OPENDOC; // 044
+ SID_CLOSEDOC; // 045
+ SID_RELOAD; // 046
+ SID_SAVEASDOC; // 047
+ SID_PRINTDOC; // 051
+ SID_SETUPPRINTER; // 053
+ SID_QUITAPP; // 054
+ SID_UNDO; // 055
+ SID_REDO; // 056
+ SID_REPEAT; // 057
+ SID_CUT; // 058
+ SID_COPY; // 059
+ SID_PASTE; // 060
+ SID_DELETE; // 061
+ SID_SELECTALL; // 062
+ SID_SAVEDOC; // 063 vormals 046
+ SID_EXITANDRETURN; // 064 vormals 054
+ SID_RECORDMACRO; // 095
+ SID_EDITMACRO; // 096
+ SID_HELPMENU; // 098
+ SID_CONFIG; // 123
+ SID_CONFIGTOOLBOX; // 124
+ 0;
+ };
+ Bitmap BMP_SFX_SMALL { File = "smo.bmp" ; };
+ Bitmap BMP_SFX_LARGE { File = "lmo.bmp" ; };
+};
+
+WarningBox STR_RECOVER_PREPARED
+{
+ Message = "Es ist ein nicht behebbarer Fehler aufgetreten.\n\nAlle modifizierten Dateien wurden jedoch\ngesichert und knnen voraussichtlich beim nchsten\nProgrammstart wiederhergestellt werden." ;
+ Message [ ENGLISH ] = "An unrecoverable error has occured.\n\nAll modified files are saved and can\nprobably be recovered on application restart." ;
+ Message [ portuguese ] = "Surgiu um erro irrecupervel. Contudo, todos os ficheiros \nmodificados foram guardados e podero provavelmente \nser recuperados ao reiniciar o programa." ;
+ Message [ english_us ] = "An unrecoverable error has occurred.\n\nAll modified files have been saved and can\nprobably be recovered at program restart." ;
+ Message [ portuguese_brazilian ] = "Es ist ein nicht behebbarer Fehler aufgetreten.\n\nAlle modifizierten Dateien wurden jedoch\ngesichert und knnen voraussichtlich beim nchsten\nProgrammstart wiederhergestellt werden." ;
+ Message [ swedish ] = "Ett icke reparerbart fel har upptrtt.\n\nAlla ndrade filer sparades\noch kan frmodligen terupprttas\nvid nsta programstart." ;
+ Message [ danish ] = "Der opstod en irreparabel fejl.\n\nAlle ndrede filer er dog\nblevet gemt og kan sandsynligvis gendannes\nved nste programstart." ;
+ Message [ italian ] = "Si verificato un errore irrimediabile.\n\nTutti i file modificati sono stati \nsalvati e probabilmente verranno recuperati \nal prossimo avvio del programma." ;
+ Message [ spanish ] = "Ha ocurrido un error irreparable.\n\nSin embargo se guardaron todos los cambios realizados\nen los archivos y quizs podrn recuperarse\nal iniciar de nuevo el programa." ;
+ Message [ french ] = "Une erreur fatale est survenue.\n\nTous les fichiers dits ont t sauvegards\net devraient tre restaurs au\nredmarrage du programme." ;
+ Message [ dutch ] = "Er is een niet-corrigeerbare fout opgetreden.\n\nAlle gemodificeerde bestanden werden echter\nopgeslagen en kunnen waarschijnlijk bij de volgende\nprogrammastart opnieuw gemaakt worden." ;
+ Message[ chinese_simplified ] = "ǷdzǸIJһ޷ųĴ\nղ޸ĹļѾ档\nһʱܿ»ָЩļ";
+ Message[ russian ] = " .\n\n \n \n .";
+ Message[ polish ] = "Wystpi nieodwracalny bd.\n\nWszystkie zmodyfikowane pliki zostay jednak\nzabezpieczone i zostan prawdopodobnie przywrcone przy nastpnym rozpoczciu programu.\n.";
+ Message[ japanese ] = "łȂװ܂B\n\nύX̧قׂ̂ĂۑĂ܂\n۸тJnۂɂ͕͂łB";
+ Message[ chinese_traditional ] = "uOD`pMzާ@޵oF@ӵLkư~C\nzeקLɮפwgxsC\nbU@Ұʵ{ɫܥi୫s_oɮסC";
+ Message[ arabic ] = " .\n\n ǡ \n \n .";
+ Message[ dutch ] = "Er is een niet-corrigeerbare fout opgetreden.\n\nAlle gemodificeerde bestanden werden echter\nopgeslagen en kunnen waarschijnlijk bij de volgende\nprogrammastart opnieuw gemaakt worden.";
+ Message[ chinese_simplified ] = "ǷdzǸIJһ޷ųĴ\nղ޸ĹļѾ档\nһʱܿ»ָЩļ";
+ Message[ greek ] = " .\n\n \n \n .";
+ Message[ korean ] = " Ұ ߻߽ϴ.\n\n׷ \nǾǷ Ƹ \nα׷ Դϴ.";
+ Message[ turkish ] = "Dzeltilemeyen bir hata olutu.\n\nDeitirilen tm dosyalar\nkaydedildi ve muhtemelen uygulama yeniden balatldnda\nkurtarlabilecek.";
+ Message[ language_user1 ] = " ";
+};
+
+WarningBox RID_WARN_POST_MAILTO
+{
+ BUTTONS = WB_OK_CANCEL ;
+ DEFBUTTON = WB_DEF_OK ;
+ Message = "Ein Formular soll per E-Mail versendet werden.\nDadurch wird dem Empfnger Ihre E-Mail-Adresse bekannt." ;
+ Message [ english ] = "A form is to be posted by email.\nThe receiver will get your email-address." ;
+ Message [ portuguese ] = "O formulrio ser enviado por e-mail.\nO seu endereo electrnico ser fornecido ao destinatrio." ;
+ Message [ english_us ] = "A form is to be sent by e-mail.\nThis means that the receiver will get to see your e-mail address." ;
+ Message [ portuguese_brazilian ] = "Ein Formular soll per E-Mail versendet werden.\nDadurch wird dem Empfnger Ihre E-Mail-Adresse bekannt." ;
+ Message [ swedish ] = "Ett formulr skall skickas per e-post.\nDrigenom fr mottagaren reda p Din e-postadress." ;
+ Message [ danish ] = "Du vil sende en formular via e-mail.\nBemrk at modtageren herved fr din e-mail-adresse." ;
+ Message [ italian ] = "Un formulario deve essere inviato via eMail.\nIn tal modo il destinatario verr a conoscenza dell'indirizzo eMail dell'utente." ;
+ Message [ spanish ] = "Se debe enviar un formulario por correo electrnico.\nCon ello se dar a conocer al destinatario su direccin electrnica." ;
+ Message [ french ] = "Vous voulez envoyer un formulaire par e-mail.\nVous communiquerez ainsi votre adresse e-mail au destinataire." ;
+ Message [ dutch ] = "Een formulier moet per e-mail gestuurd worden.\nDaardoor wordt uw e-mail adres door de ontvanger bekend." ;
+ Message[ chinese_simplified ] = "Ӧýʼķ\nĵʼַҲʹݸռˡ";
+ Message[ russian ] = " .\n . .";
+ Message[ polish ] = "Formularz ma zosta wysany jako e-mail.\nPrzez to adresat otrzyma twj adres e-mail.";
+ Message[ japanese ] = "pE-mailőM܂B\nʂĎM҂հްE-mailڽm邱ƂɂȂ܂B";
+ Message[ chinese_traditional ] = "ӳzLqllHoC\no˱zqlla}]NǻF̡C";
+ Message[ arabic ] = " .\n .";
+ Message[ dutch ] = "Een formulier moet per e-mail gestuurd worden.\nDaardoor wordt uw e-mail adres door de ontvanger bekend.";
+ Message[ chinese_simplified ] = "Ӧýʼķ\nĵʼַҲʹݸռˡ";
+ Message[ greek ] = " e-mail.\n ";
+ Message[ korean ] = " ڿ Դϴ .\n ޴ ڿ ּҰ Դϴ.";
+ Message[ turkish ] = "E-posta ile form gnderilecek.\nBu ekilde alc e-posta adresinizi de grecektir.";
+ Message[ language_user1 ] = " ";
+};
+
+String STR_RECOVER_TITLE
+{
+ Text = "Datei-Wiederherstellung" ;
+ Text [ ENGLISH ] = "File Recovery" ;
+ Text [ english_us ] = "File Recovery" ;
+ Text [ portuguese_brazilian ] = "Datei-Wiederherstellung" ;
+ Text [ swedish ] = "Filterstllande" ;
+ Text [ danish ] = "Fil-gendannelse" ;
+ Text [ italian ] = "Recupero file" ;
+ Text [ spanish ] = "Recuperar archivo" ;
+ Text [ french ] = "Restauration de fichier" ;
+ Text [ dutch ] = "Herstel bestand" ;
+ Text [ portuguese ] = "Restaurar ficheiro" ;
+ Text[ chinese_simplified ] = "޸ļ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Odtwarzanie plikw";
+ Text[ japanese ] = "̧ق̕";
+ Text[ chinese_traditional ] = "״_ɮ";
+ Text[ arabic ] = " ";
+ Text[ dutch ] = "Herstel bestand";
+ Text[ chinese_simplified ] = "޸ļ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ";
+ Text[ turkish ] = "Dosya kurtarma";
+ Text[ language_user1 ] = " ";
+};
+
+String STR_RECOVER_QUERY
+{
+ Text = "Soll die Datei \"$1\" wiederhergestellt werden?" ;
+ Text [ ENGLISH ] = "Recover file $1?" ;
+ Text [ portuguese ] = "Deseja restaurar o ficheiro \"$1\"?" ;
+ Text [ english_us ] = "Should the file \"$1\" be restored?" ;
+ Text [ portuguese_brazilian ] = "Soll die Datei \"$1\" wiederhergestellt werden?" ;
+ Text [ swedish ] = "Skall filen \"$1\" terskapas?" ;
+ Text [ danish ] = "Skal filen \"$1\" gendannes?" ;
+ Text [ italian ] = "Recuperare il file \"$1\"?" ;
+ Text [ spanish ] = "Desea restaurar el archivo \"$1\"?" ;
+ Text [ french ] = "Le fichier \"$1\" doit-il tre restaur ?" ;
+ Text [ dutch ] = "Wilt u dat het bestand \"$1\" hersteld wordt?" ;
+ Text[ chinese_simplified ] = "Ҫ޸ļ \"$1\" ";
+ Text[ russian ] = " \"$1\"?";
+ Text[ polish ] = "Odtworzy plik \"$1\"?";
+ Text[ japanese ] = "̧\"$1\"𕜌܂H";
+ Text[ chinese_traditional ] = "zn״_oɮ";
+ Text[ arabic ] = " \"$1\"";
+ Text[ dutch ] = "Wilt u dat het bestand \"$1\" hersteld wordt?";
+ Text[ chinese_simplified ] = "Ҫ޸ļ \"$1\" ";
+ Text[ greek ] = " \"$1\";";
+ Text[ korean ] = " \"$1\" ؾ մϱ?";
+ Text[ turkish ] = "\"$1\" dosyas geri getirilsin mi?";
+ Text[ language_user1 ] = " ";
+};
+
+String GID_INTERN
+{
+ Text = "Intern" ;
+ Text [ ENGLISH ] = "Internal" ;
+ Text [ norwegian ] = "Intern" ;
+ Text [ italian ] = "Interno" ;
+ Text [ portuguese_brazilian ] = "Aplicativo" ;
+ Text [ portuguese ] = "Interno" ;
+ Text [ finnish ] = "Sisinen" ;
+ Text [ danish ] = "Intern" ;
+ Text [ french ] = "Interne" ;
+ Text [ swedish ] = "Internt" ;
+ Text [ dutch ] = "Intern" ;
+ Text [ spanish ] = "Interno" ;
+ Text [ english_us ] = "Internal" ;
+ Text[ chinese_simplified ] = "ڲ";
+ Text[ russian ] = "";
+ Text[ polish ] = "Wewntrzny";
+ Text[ japanese ] = "";
+ Text[ chinese_traditional ] = "";
+ Text[ arabic ] = "";
+ Text[ dutch ] = "Intern";
+ Text[ chinese_simplified ] = "ڲ";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "";
+ Text[ language_user1 ] = " ";
+};
+
+String GID_APPLICATION
+{
+ Text = "Applikation" ;
+ Text [ ENGLISH ] = "Application" ;
+ Text [ norwegian ] = "Applikasjon" ;
+ Text [ italian ] = "Applicazione" ;
+ Text [ portuguese_brazilian ] = "Interna" ;
+ Text [ portuguese ] = "Aplicao" ;
+ Text [ finnish ] = "Sovellus" ;
+ Text [ danish ] = "Applikation" ;
+ Text [ french ] = "Application" ;
+ Text [ swedish ] = "Tillmpning" ;
+ Text [ dutch ] = "Applicatie" ;
+ Text [ spanish ] = "Aplicacin" ;
+ Text [ english_us ] = "Application" ;
+ Text[ chinese_simplified ] = "Ӧó";
+ Text[ russian ] = "";
+ Text[ polish ] = "Aplikacja";
+ Text[ japanese ] = "ع";
+ Text[ chinese_traditional ] = "ε{";
+ Text[ arabic ] = "";
+ Text[ dutch ] = "Applicatie";
+ Text[ chinese_simplified ] = "Ӧó";
+ Text[ greek ] = "";
+ Text[ korean ] = "α׷";
+ Text[ turkish ] = "Uygulama";
+ Text[ language_user1 ] = " ";
+};
+
+String GID_VIEW
+{
+ Text = "Ansicht" ;
+ Text [ ENGLISH ] = "View" ;
+ Text [ norwegian ] = "View" ;
+ Text [ italian ] = "Visualizza" ;
+ Text [ portuguese_brazilian ] = "Ver" ;
+ Text [ portuguese ] = "Visualizar" ;
+ Text [ finnish ] = "Nyt" ;
+ Text [ danish ] = "Vis" ;
+ Text [ french ] = "Affichage" ;
+ Text [ swedish ] = "Vy" ;
+ Text [ dutch ] = "Beeld" ;
+ Text [ spanish ] = "Ver" ;
+ Text [ english_us ] = "View" ;
+ Text[ chinese_simplified ] = "ͼ";
+ Text[ russian ] = "";
+ Text[ polish ] = "Widok";
+ Text[ japanese ] = "\\";
+ Text[ chinese_traditional ] = "˵";
+ Text[ arabic ] = "";
+ Text[ dutch ] = "Beeld";
+ Text[ chinese_simplified ] = "ͼ";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "Grnm";
+ Text[ language_user1 ] = " ";
+};
+
+String GID_DOCUMENT
+{
+ Text = "Dokumente" ;
+ Text [ ENGLISH ] = "Documents" ;
+ Text [ norwegian ] = "Documents" ;
+ Text [ italian ] = "Documenti" ;
+ Text [ portuguese_brazilian ] = "Documentos" ;
+ Text [ portuguese ] = "Documentos" ;
+ Text [ finnish ] = "Asiakirjat" ;
+ Text [ danish ] = "Dokumenter" ;
+ Text [ french ] = "Documents" ;
+ Text [ swedish ] = "Dokument" ;
+ Text [ dutch ] = "Documenten" ;
+ Text [ spanish ] = "Documentos" ;
+ Text [ english_us ] = "Documents" ;
+ Text[ chinese_simplified ] = "ĵ";
+ Text[ russian ] = "";
+ Text[ polish ] = "Dokumenty";
+ Text[ japanese ] = "޷";
+ Text[ chinese_traditional ] = "";
+ Text[ arabic ] = "";
+ Text[ dutch ] = "Documenten";
+ Text[ chinese_simplified ] = "ĵ";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "Belge";
+ Text[ language_user1 ] = " ";
+};
+
+String GID_EDIT
+{
+ Text = "Bearbeiten" ;
+ Text [ ENGLISH ] = "Editing" ;
+ Text [ norwegian ] = "Redigering" ;
+ Text [ italian ] = "Modifica" ;
+ Text [ portuguese_brazilian ] = "Editando" ;
+ Text [ portuguese ] = "Editar" ;
+ Text [ finnish ] = "Muokkaus" ;
+ Text [ danish ] = "Rediger" ;
+ Text [ french ] = "Edition" ;
+ Text [ swedish ] = "Redigera" ;
+ Text [ dutch ] = "Bewerken" ;
+ Text [ spanish ] = "Editar" ;
+ Text [ english_us ] = "Edit" ;
+ Text[ chinese_simplified ] = "༭";
+ Text[ russian ] = "";
+ Text[ polish ] = "Edytuj";
+ Text[ japanese ] = "ҏW";
+ Text[ chinese_traditional ] = "s";
+ Text[ arabic ] = "";
+ Text[ dutch ] = "Bewerken";
+ Text[ chinese_simplified ] = "༭";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "Dzenle";
+ Text[ language_user1 ] = " ";
+};
+
+String GID_MACRO
+{
+ Text = "BASIC" ;
+ Text [ ENGLISH ] = "BASIC" ;
+ Text [ english_us ] = "BASIC" ;
+ Text [ italian ] = "BASIC" ;
+ Text [ spanish ] = "BASIC" ;
+ Text [ french ] = "BASIC" ;
+ Text [ dutch ] = "BASIC" ;
+ Text [ swedish ] = "BASIC" ;
+ Text [ danish ] = "BASIC" ;
+ Text [ portuguese ] = "BASIC" ;
+ Text [ portuguese_brazilian ] = "BASIC" ;
+ Text[ chinese_simplified ] = "BASIC";
+ Text[ russian ] = "BASIC";
+ Text[ polish ] = "BASIC";
+ Text[ japanese ] = "BASIC";
+ Text[ chinese_traditional ] = "BASIC";
+ Text[ arabic ] = "BASIC";
+ Text[ dutch ] = "BASIC";
+ Text[ chinese_simplified ] = "BASIC";
+ Text[ greek ] = "BASIC";
+ Text[ korean ] = "BASIC";
+ Text[ turkish ] = "BASIC";
+ Text[ language_user1 ] = " ";
+};
+
+String GID_OPTIONS
+{
+ Text = "Extras" ;
+ Text [ ENGLISH ] = "Options" ;
+ Text [ norwegian ] = "Options" ;
+ Text [ italian ] = "Varie" ;
+ Text [ portuguese_brazilian ] = "Opes" ;
+ Text [ portuguese ] = "Ferramentas" ;
+ Text [ finnish ] = "Mritykset" ;
+ Text [ danish ] = "Funktioner" ;
+ Text [ french ] = "Options" ;
+ Text [ swedish ] = "Verktyg" ;
+ Text [ dutch ] = "Extra" ;
+ Text [ spanish ] = "Opciones" ;
+ Text [ english_us ] = "Options" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "Narzdzia";
+ Text[ japanese ] = "ڍאݒ";
+ Text[ chinese_traditional ] = "䥦";
+ Text[ arabic ] = "";
+ Text[ dutch ] = "Extra";
+ Text[ chinese_simplified ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "ɼ";
+ Text[ turkish ] = "Aralar";
+ Text[ language_user1 ] = " ";
+};
+
+String GID_MATH
+{
+ Text = "Math" ;
+ Text [ ENGLISH ] = "Formula" ;
+ Text [ norwegian ] = "Formel" ;
+ Text [ italian ] = "Math" ;
+ Text [ portuguese_brazilian ] = "Frmula" ;
+ Text [ portuguese ] = "Math" ;
+ Text [ finnish ] = "Kaava" ;
+ Text [ danish ] = "Math" ;
+ Text [ french ] = "Formule" ;
+ Text [ swedish ] = "Math" ;
+ Text [ dutch ] = "Math" ;
+ Text [ spanish ] = "Math" ;
+ Text [ english_us ] = "Math" ;
+ Text[ chinese_simplified ] = "ѧ";
+ Text[ russian ] = "Math";
+ Text[ polish ] = "Math";
+ Text[ japanese ] = "w";
+ Text[ chinese_traditional ] = "ƾ";
+ Text[ arabic ] = "Math";
+ Text[ dutch ] = "Math";
+ Text[ chinese_simplified ] = "ѧ";
+ Text[ greek ] = "Math";
+ Text[ korean ] = "";
+ Text[ turkish ] = "Math";
+ Text[ language_user1 ] = " ";
+};
+
+String GID_NAVIGATOR
+{
+ Text = "Navigieren" ;
+ Text [ english ] = "Navigator" ;
+ Text [ english_us ] = "Navigate" ;
+ Text [ italian ] = "Naviga" ;
+ Text [ spanish ] = "Navegar" ;
+ Text [ french ] = "Navigation" ;
+ Text [ dutch ] = "Navigeren" ;
+ Text [ swedish ] = "Navigera" ;
+ Text [ danish ] = "Naviger" ;
+ Text [ portuguese ] = "Navegar" ;
+ Text [ portuguese_brazilian ] = "Navigieren" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "Nawigacja";
+ Text[ japanese ] = "޹ް";
+ Text[ chinese_traditional ] = "s";
+ Text[ arabic ] = "";
+ Text[ dutch ] = "Navigeren";
+ Text[ chinese_simplified ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "Ž";
+ Text[ turkish ] = "Dola";
+ Text[ language_user1 ] = " ";
+};
+
+String GID_INSERT
+{
+ Text = "Einfgen" ;
+ Text [ english ] = "Insert" ;
+ Text [ dutch ] = "Invoegen" ;
+ Text [ english_us ] = "Insert" ;
+ Text [ italian ] = "Inserisci" ;
+ Text [ spanish ] = "Insertar" ;
+ Text [ french ] = "Insrer" ;
+ Text [ swedish ] = "Infoga" ;
+ Text [ danish ] = "Indst" ;
+ Text [ portuguese ] = "Inserir" ;
+ Text [ portuguese_brazilian ] = "Einfgen" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "Wstaw";
+ Text[ japanese ] = "}";
+ Text[ chinese_traditional ] = "J";
+ Text[ arabic ] = "";
+ Text[ dutch ] = "Invoegen";
+ Text[ chinese_simplified ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "Ekle";
+ Text[ language_user1 ] = " ";
+};
+
+String GID_FORMAT
+{
+ Text = "Format" ;
+ Text [ english ] = "Format" ;
+ Text [ dutch ] = "Formaat" ;
+ Text [ english_us ] = "Format" ;
+ Text [ italian ] = "Formato" ;
+ Text [ spanish ] = "Formato" ;
+ Text [ french ] = "Format" ;
+ Text [ swedish ] = "Format" ;
+ Text [ danish ] = "Format" ;
+ Text [ portuguese ] = "Formato" ;
+ Text [ portuguese_brazilian ] = "Format" ;
+ Text[ chinese_simplified ] = "ʽ";
+ Text[ russian ] = "";
+ Text[ polish ] = "Format";
+ Text[ japanese ] = "";
+ Text[ chinese_traditional ] = "榡";
+ Text[ arabic ] = "";
+ Text[ dutch ] = "Formaat";
+ Text[ chinese_simplified ] = "ʽ";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "Format";
+ Text[ language_user1 ] = " ";
+};
+
+String GID_TEMPLATE
+{
+ Text = "Vorlagen" ;
+ Text [ english ] = "Template" ;
+ Text [ english_us ] = "Templates" ;
+ Text [ italian ] = "Modelli" ;
+ Text [ spanish ] = "Plantillas" ;
+ Text [ french ] = "Modles" ;
+ Text [ dutch ] = "Sjablonen" ;
+ Text [ swedish ] = "Mallar" ;
+ Text [ danish ] = "Skabeloner" ;
+ Text [ portuguese ] = "Modelos" ;
+ Text [ portuguese_brazilian ] = "Vorlagen" ;
+ Text[ chinese_simplified ] = "ʽ";
+ Text[ russian ] = "";
+ Text[ polish ] = "Szablony";
+ Text[ japanese ] = "ڰ";
+ Text[ chinese_traditional ] = "˦";
+ Text[ arabic ] = "";
+ Text[ dutch ] = "Sjablonen";
+ Text[ chinese_simplified ] = "ʽ";
+ Text[ greek ] = "";
+ Text[ korean ] = "øƮ";
+ Text[ turkish ] = "ablon";
+ Text[ language_user1 ] = " ";
+};
+
+String GID_TEXT
+{
+ Text = "Text" ;
+ Text [ english ] = "Text" ;
+ Text [ english_us ] = "Text" ;
+ Text [ italian ] = "Testo" ;
+ Text [ spanish ] = "Texto" ;
+ Text [ french ] = "Texte" ;
+ Text [ dutch ] = "Tekst" ;
+ Text [ swedish ] = "Text" ;
+ Text [ danish ] = "Tekst" ;
+ Text [ portuguese ] = "Texto" ;
+ Text [ portuguese_brazilian ] = "Text" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "Tekst";
+ Text[ japanese ] = "÷";
+ Text[ chinese_traditional ] = "r";
+ Text[ arabic ] = "";
+ Text[ dutch ] = "Tekst";
+ Text[ chinese_simplified ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "ؽƮ";
+ Text[ turkish ] = "Metin";
+ Text[ language_user1 ] = " ";
+};
+
+String GID_FRAME
+{
+ Text = "Rahmen" ;
+ Text [ english ] = "Frame" ;
+ Text [ dutch ] = "Kader" ;
+ Text [ english_us ] = "Frame" ;
+ Text [ italian ] = "Cornice" ;
+ Text [ spanish ] = "Marco" ;
+ Text [ french ] = "Cadre" ;
+ Text [ swedish ] = "Ram" ;
+ Text [ danish ] = "Ramme" ;
+ Text [ portuguese ] = "Moldura" ;
+ Text [ portuguese_brazilian ] = "Rahmen" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "Ramka";
+ Text[ japanese ] = "g";
+ Text[ chinese_traditional ] = "T";
+ Text[ arabic ] = "";
+ Text[ dutch ] = "Kader";
+ Text[ chinese_simplified ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "ereve";
+ Text[ language_user1 ] = " ";
+};
+
+String GID_GRAPHIC
+{
+ Text = "Grafik" ;
+ Text [ english ] = "Graphic" ;
+ Text [ english_us ] = "Graphic" ;
+ Text [ italian ] = "Immagine" ;
+ Text [ spanish ] = "Imagen" ;
+ Text [ french ] = "Image" ;
+ Text [ dutch ] = "Afbeelding" ;
+ Text [ swedish ] = "Grafik" ;
+ Text [ danish ] = "Grafik" ;
+ Text [ portuguese ] = "Imagem" ;
+ Text [ portuguese_brazilian ] = "Grafik" ;
+ Text[ chinese_simplified ] = "ͼ";
+ Text[ russian ] = "";
+ Text[ polish ] = "Grafika";
+ Text[ japanese ] = "̨";
+ Text[ chinese_traditional ] = "ϧ";
+ Text[ arabic ] = "";
+ Text[ dutch ] = "Afbeelding";
+ Text[ chinese_simplified ] = "ͼ";
+ Text[ greek ] = "";
+ Text[ korean ] = "׷";
+ Text[ turkish ] = "Grafik";
+ Text[ language_user1 ] = " ";
+};
+
+String GID_TABLE
+{
+ Text = "Tabelle" ;
+ Text [ english ] = "Table" ;
+ Text [ english_us ] = "Table" ;
+ Text [ italian ] = "Tabella" ;
+ Text [ spanish ] = "Tabla" ;
+ Text [ french ] = "Table" ;
+ Text [ dutch ] = "Tabel" ;
+ Text [ swedish ] = "Tabell" ;
+ Text [ danish ] = "Tabel" ;
+ Text [ portuguese ] = "Tabela" ;
+ Text [ portuguese_brazilian ] = "Tabelle" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "Tabela";
+ Text[ japanese ] = "ð";
+ Text[ chinese_traditional ] = "";
+ Text[ arabic ] = "";
+ Text[ dutch ] = "Tabel";
+ Text[ chinese_simplified ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "̺";
+ Text[ turkish ] = "Tablo";
+ Text[ language_user1 ] = " ";
+};
+
+String GID_ENUMERATION
+{
+ Text = "Nummerierung" ;
+ Text [ english ] = "Enumeration" ;
+ Text [ dutch ] = "Nummering" ;
+ Text [ english_us ] = "Numbering" ;
+ Text [ italian ] = "Numerazione" ;
+ Text [ spanish ] = "Numeracin" ;
+ Text [ french ] = "Numrotation" ;
+ Text [ swedish ] = "Numrering" ;
+ Text [ danish ] = "Nummerering" ;
+ Text [ portuguese ] = "Numerao" ;
+ Text [ portuguese_brazilian ] = "Numerierung" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "Numeracja";
+ Text[ japanese ] = "ԍt";
+ Text[ chinese_traditional ] = "s";
+ Text[ arabic ] = "";
+ Text[ dutch ] = "Nummering";
+ Text[ chinese_simplified ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "ȣ";
+ Text[ turkish ] = "Numaralama";
+ Text[ language_user1 ] = " ";
+};
+
+String GID_DATA
+{
+ Text = "Daten" ;
+ Text [ english ] = "Data" ;
+ Text [ dutch ] = "Gegevens" ;
+ Text [ english_us ] = "Data" ;
+ Text [ italian ] = "Dati" ;
+ Text [ spanish ] = "Datos" ;
+ Text [ french ] = "Donnes" ;
+ Text [ swedish ] = "Data" ;
+ Text [ danish ] = "Data" ;
+ Text [ portuguese ] = "Dados" ;
+ Text [ portuguese_brazilian ] = "Daten" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "Dane";
+ Text[ japanese ] = "ް";
+ Text[ chinese_traditional ] = "";
+ Text[ arabic ] = "";
+ Text[ dutch ] = "Gegevens";
+ Text[ chinese_simplified ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "Veri";
+ Text[ language_user1 ] = " ";
+};
+
+String GID_SPECIAL
+{
+ Text = "Sonderfunktionen" ;
+ Text [ english ] = "Special" ;
+ Text [ english_us ] = "Special Functions" ;
+ Text [ italian ] = "Funzioni speciali" ;
+ Text [ spanish ] = "Funciones especiales" ;
+ Text [ french ] = "Fonctions spciales" ;
+ Text [ dutch ] = "Speciale functies" ;
+ Text [ swedish ] = "Specialfunktioner" ;
+ Text [ danish ] = "Specialfunktioner" ;
+ Text [ portuguese ] = "Funes especiais" ;
+ Text [ portuguese_brazilian ] = "Sonderfunktionen" ;
+ Text[ chinese_simplified ] = "⹦";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Funkcje specjalne";
+ Text[ japanese ] = "@\\";
+ Text[ chinese_traditional ] = "S\\";
+ Text[ arabic ] = " ";
+ Text[ dutch ] = "Speciale functies";
+ Text[ chinese_simplified ] = "⹦";
+ Text[ greek ] = " ";
+ Text[ korean ] = "Ư Լ";
+ Text[ turkish ] = "zel ilevler";
+ Text[ language_user1 ] = " ";
+};
+
+String GID_IMAGE
+{
+ Text = "Image" ;
+ Text [ english ] = "Image" ;
+ Text [ dutch ] = "Image" ;
+ Text [ english_us ] = "Image" ;
+ Text [ italian ] = "Image" ;
+ Text [ spanish ] = "Imagen" ;
+ Text [ french ] = "Image" ;
+ Text [ swedish ] = "Bild" ;
+ Text [ danish ] = "Billede" ;
+ Text [ portuguese ] = "Imagem" ;
+ Text [ portuguese_brazilian ] = "Image" ;
+ Text[ chinese_simplified ] = "ͼ";
+ Text[ russian ] = "";
+ Text[ polish ] = "Obraz";
+ Text[ japanese ] = "Ұ";
+ Text[ chinese_traditional ] = "v";
+ Text[ arabic ] = "";
+ Text[ dutch ] = "Image";
+ Text[ chinese_simplified ] = "ͼ";
+ Text[ greek ] = "";
+ Text[ korean ] = "̹";
+ Text[ turkish ] = "Resim";
+ Text[ language_user1 ] = " ";
+};
+
+String GID_CHART
+{
+ Text = "Chart" ;
+ Text [ english ] = "Chart" ;
+ Text [ dutch ] = "Chart" ;
+ Text [ english_us ] = "Chart" ;
+ Text [ italian ] = "Diagramma" ;
+ Text [ spanish ] = "Diagrama" ;
+ Text [ french ] = "Diagramme" ;
+ Text [ swedish ] = "Chart" ;
+ Text [ danish ] = "Diagram" ;
+ Text [ portuguese ] = "Chart" ;
+ Text [ portuguese_brazilian ] = "Chart" ;
+ Text[ chinese_simplified ] = "ͼ";
+ Text[ russian ] = "";
+ Text[ polish ] = "Wykres";
+ Text[ japanese ] = "";
+ Text[ chinese_traditional ] = "Ϫ";
+ Text[ arabic ] = " ";
+ Text[ dutch ] = "Chart";
+ Text[ chinese_simplified ] = "ͼ";
+ Text[ greek ] = "";
+ Text[ korean ] = "Ʈ";
+ Text[ turkish ] = "ema";
+ Text[ language_user1 ] = " ";
+};
+
+String GID_EXPLORER
+{
+ Text = "Explorer" ;
+ Text [ english ] = "Explorer" ;
+ Text [ english_us ] = "Explorer" ;
+ Text [ italian ] = "Explorer" ;
+ Text [ spanish ] = "Explorador" ;
+ Text [ french ] = "Explorer" ;
+ Text [ dutch ] = "Explorer" ;
+ Text [ swedish ] = "Explorer" ;
+ Text [ danish ] = "Explorer" ;
+ Text [ portuguese ] = "Explorer" ;
+ Text [ portuguese_brazilian ] = "Explorer" ;
+ Text[ chinese_simplified ] = "Դ";
+ Text[ russian ] = "";
+ Text[ polish ] = "Eksplorator";
+ Text[ japanese ] = "۰";
+ Text[ language_user1 ] = " ";
+ Text[ chinese_traditional ] = "ɮ`";
+ Text[ arabic ] = "";
+ Text[ dutch ] = "Explorer";
+ Text[ chinese_simplified ] = "Դ";
+ Text[ greek ] = "Explorer";
+ Text[ korean ] = "ͽ÷η";
+ Text[ turkish ] = "Explorer";
+};
+
+String GID_CONNECTOR
+{
+ Text = "Verbinder" ;
+ Text [ english ] = "Connector" ;
+ Text [ portuguese ] = "Conectores" ;
+ Text [ english_us ] = "Connector" ;
+ Text [ portuguese_brazilian ] = "Verbinder" ;
+ Text [ swedish ] = "Frbindelse" ;
+ Text [ danish ] = "Forbindelse" ;
+ Text [ italian ] = "Connettore" ;
+ Text [ spanish ] = "Conector" ;
+ Text [ french ] = "Connecteur" ;
+ Text [ dutch ] = "Verbinding" ;
+ Text[ chinese_simplified ] = "ӷ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "cznik";
+ Text[ japanese ] = "ȸ";
+ Text[ chinese_traditional ] = "s";
+ Text[ arabic ] = "";
+ Text[ dutch ] = "Verbinding";
+ Text[ chinese_simplified ] = "ӷ";
+ Text[ greek ] = "";
+ Text[ korean ] = "Ŀ";
+ Text[ turkish ] = "Balayc";
+ Text[ language_user1 ] = " ";
+};
+
+String GID_MODIFY
+{
+ Text = "ndern" ;
+ Text [ english ] = "Modify" ;
+ Text [ portuguese ] = "Alterar" ;
+ Text [ english_us ] = "Modify" ;
+ Text [ portuguese_brazilian ] = "ndern" ;
+ Text [ swedish ] = "ndra" ;
+ Text [ danish ] = "Modificer" ;
+ Text [ italian ] = "Modifica" ;
+ Text [ spanish ] = "Modificar" ;
+ Text [ french ] = "Modifier" ;
+ Text [ dutch ] = "Wijzigen" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "Modyfikuj";
+ Text[ japanese ] = "ύX";
+ Text[ chinese_traditional ] = "ק";
+ Text[ arabic ] = "";
+ Text[ dutch ] = "Wijzigen";
+ Text[ chinese_simplified ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "Deitir";
+ Text[ language_user1 ] = " ";
+};
+
+String GID_DRAWING
+{
+ Text = "Zeichnen" ;
+ Text [ english ] = "Drawing" ;
+ Text [ portuguese ] = "Desenhar" ;
+ Text [ english_us ] = "Drawing" ;
+ Text [ portuguese_brazilian ] = "Zeichnen" ;
+ Text [ swedish ] = "Rita" ;
+ Text [ danish ] = "Tegn" ;
+ Text [ italian ] = "Disegna" ;
+ Text [ spanish ] = "Dibujar" ;
+ Text [ french ] = "Dessiner" ;
+ Text [ dutch ] = "Tekenen" ;
+ Text[ chinese_simplified ] = "ͼ";
+ Text[ russian ] = "";
+ Text[ polish ] = "Rysowanie";
+ Text[ japanese ] = "`";
+ Text[ chinese_traditional ] = "ø";
+ Text[ arabic ] = "";
+ Text[ dutch ] = "Tekenen";
+ Text[ chinese_simplified ] = "ͼ";
+ Text[ greek ] = "";
+ Text[ korean ] = "׸";
+ Text[ turkish ] = "izim";
+ Text[ language_user1 ] = " ";
+};
+
+String GID_CONTROLS
+{
+ Text = "Kontrollelemente" ;
+ Text [ english ] = "Controls" ;
+ Text [ portuguese ] = "Controlos" ;
+ Text [ english_us ] = "Controls" ;
+ Text [ italian ] = "Elementi di controllo" ;
+ Text [ spanish ] = "Elementos de control" ;
+ Text [ french ] = "lments de contrle" ;
+ Text [ dutch ] = "Controle-elementen" ;
+ Text [ portuguese_brazilian ] = "Kontrollelemente" ;
+ Text [ swedish ] = "Kontrollelement" ;
+ Text [ danish ] = "Kontrolelementer" ;
+ Text[ chinese_simplified ] = "ؼ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Formanty";
+ Text[ japanese ] = "۰";
+ Text[ chinese_traditional ] = "";
+ Text[ arabic ] = " ";
+ Text[ dutch ] = "Controle-elementen";
+ Text[ chinese_simplified ] = "ؼ";
+ Text[ greek ] = " ";
+ Text[ korean ] = "Ʈ";
+ Text[ turkish ] = "Kumanda eleri";
+ Text[ language_user1 ] = " ";
+};
+
+TabDialog SID_OPTIONS
+{
+ OutputSize = TRUE ;
+ SVLook = TRUE ;
+ Size = MAP_APPFONT ( 244 , 155 ) ;
+ Text = "Optionen" ;
+ Text [ English ] = "Options" ;
+ Text [ norwegian ] = "Options" ;
+ Text [ italian ] = "Opzioni" ;
+ Text [ portuguese_brazilian ] = "Opes" ;
+ Text [ portuguese ] = "Opes" ;
+ Text [ finnish ] = "Mritykset" ;
+ Text [ danish ] = "Indstillinger" ;
+ Text [ french ] = "Options" ;
+ Text [ swedish ] = "Alternativ" ;
+ Text [ dutch ] = "Opties" ;
+ Text [ spanish ] = "Opciones" ;
+ Text [ english_us ] = "Options" ;
+ Moveable = TRUE ;
+ Closeable = TRUE ;
+ TabControl 1
+ {
+ SVLook = TRUE ;
+ Pos = MAP_APPFONT ( 3 , 15 ) ;
+ Size = MAP_APPFONT ( 221 , 130 ) ;
+ PageList =
+ {
+ PageItem
+ {
+ Identifier = RID_SFXPAGE_GENERAL ;
+ Text = "Allgemeines" ;
+ Text [ English ] = "General" ;
+ Text [ norwegian ] = "Generell" ;
+ Text [ italian ] = "Generale" ;
+ Text [ portuguese_brazilian ] = "Geral" ;
+ Text [ portuguese ] = "Geral" ;
+ Text [ finnish ] = "Yleiset" ;
+ Text [ danish ] = "Generelt" ;
+ Text [ french ] = "En gnral" ;
+ Text [ swedish ] = "Allmnt" ;
+ Text [ dutch ] = "Algemeen" ;
+ Text [ spanish ] = "General" ;
+ Text [ english_us ] = "General" ;
+ PageResID = 256 ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "Oglne";
+ Text[ japanese ] = "";
+ Text[ chinese_traditional ] = "@";
+ Text[ arabic ] = "";
+ Text[ dutch ] = "Algemeen";
+ Text[ chinese_simplified ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "Ϲ";
+ Text[ turkish ] = "Genel";
+ Text[ language_user1 ] = " ";
+ };
+ PageItem
+ {
+ Identifier = RID_SFXPAGE_SAVE ;
+ Text = "Speichern" ;
+ Text [ English ] = "Save" ;
+ Text [ norwegian ] = "Save" ;
+ Text [ italian ] = "Salva" ;
+ Text [ portuguese_brazilian ] = "Gravar" ;
+ Text [ portuguese ] = "Guardar" ;
+ Text [ finnish ] = "Tallennus" ;
+ Text [ danish ] = "Gem" ;
+ Text [ french ] = "Enregistrer" ;
+ Text [ swedish ] = "Spara" ;
+ Text [ dutch ] = "Opslaan" ;
+ Text [ spanish ] = "Guardar" ;
+ Text [ english_us ] = "Save" ;
+ PageResID = 257 ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "Zapisz";
+ Text[ japanese ] = "ۑ";
+ Text[ chinese_traditional ] = "xs";
+ Text[ arabic ] = "";
+ Text[ dutch ] = "Opslaan";
+ Text[ chinese_simplified ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "Kaydet";
+ Text[ language_user1 ] = " ";
+ };
+ PageItem
+ {
+ Identifier = RID_SFXPAGE_PATH ;
+ Text = "Pfade" ;
+ Text [ English ] = "Path" ;
+ Text [ norwegian ] = "Bane" ;
+ Text [ italian ] = "Percorsi" ;
+ Text [ portuguese_brazilian ] = "Caminho" ;
+ Text [ portuguese ] = "Atalhos" ;
+ Text [ finnish ] = "Polku" ;
+ Text [ danish ] = "Stier" ;
+ Text [ french ] = "Chemins" ;
+ Text [ swedish ] = "Skvgar" ;
+ Text [ dutch ] = "Pad" ;
+ Text [ spanish ] = "Rutas" ;
+ Text [ english_us ] = "Paths" ;
+ PageResID = 258 ;
+ Text[ chinese_simplified ] = "·";
+ Text[ russian ] = "";
+ Text[ polish ] = "cieki";
+ Text[ japanese ] = "߽";
+ Text[ chinese_traditional ] = "|";
+ Text[ arabic ] = "";
+ Text[ dutch ] = "Pad";
+ Text[ chinese_simplified ] = "·";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "Veri yolu";
+ Text[ language_user1 ] = " ";
+ };
+ PageItem
+ {
+ Identifier = RID_SFXPAGE_SPELL ;
+ Text = "Rechtschreibprfung" ;
+ Text [ English ] = "Spellchecker" ;
+ Text [ norwegian ] = "Spellchecker" ;
+ Text [ italian ] = "Controllo ortografico" ;
+ Text [ portuguese_brazilian ] = "Corretor Ortogrfico" ;
+ Text [ portuguese ] = "Verificar ortografia" ;
+ Text [ finnish ] = "Korjausluku" ;
+ Text [ danish ] = "Stavekontrol" ;
+ Text [ french ] = "Vrification orthographique" ;
+ Text [ swedish ] = "Rttstavningskontroll" ;
+ Text [ dutch ] = "Spellingcontrole" ;
+ Text [ spanish ] = "Revisin ortogrfica" ;
+ Text [ english_us ] = "Spellcheck" ;
+ PageResID = 259 ;
+ Text[ chinese_simplified ] = "ַ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Sprawdzanie pisowni";
+ Text[ japanese ] = "͍Z";
+ Text[ chinese_traditional ] = "r";
+ Text[ arabic ] = " ";
+ Text[ dutch ] = "Spellingcontrole";
+ Text[ chinese_simplified ] = "ַ";
+ Text[ greek ] = " ";
+ Text[ korean ] = "";
+ Text[ turkish ] = "Yazm denetimi";
+ Text[ language_user1 ] = " ";
+ };
+ };
+ };
+ Text[ chinese_simplified ] = "ѡ";
+ Text[ russian ] = "";
+ Text[ polish ] = "Opcje";
+ Text[ japanese ] = "߼";
+ Text[ chinese_traditional ] = "ﶵ";
+ Text[ arabic ] = "";
+ Text[ dutch ] = "Opties";
+ Text[ chinese_simplified ] = "ѡ";
+ Text[ greek ] = "";
+ Text[ korean ] = "ɼ";
+ Text[ turkish ] = "Seenekler";
+ Text[ language_user1 ] = " ";
+};
+
+InfoBox MSG_CANT_QUIT
+{
+ Message = "Die Anwendung kann zur Zeit nicht beendet werden.\nBitte warten Sie das Ende aller Druckauftrge und/oder\nOLE-Aktivierungen ab und schlieen Sie alle Dialoge." ;
+ Message [ English ] = "Can't quit the application at this moment.\nPlease wait until all print jobs and/or\nOLE-activations are terminated and close\nall dialogs." ;
+ Message [ norwegian ] = "Kan ikke avslutte applikasjonen for yeblikket.\nPlease wait until all print jobs and/or\nOLE-activations are terminated and close\nall dialogs." ;
+ Message [ italian ] = "Impossibile uscire dall'applicazione in questo momento.\nAttendendete la concluisione della stampa e/o\n tutte le attivazioni OLE, quindi chiudete\ntutti i dialoghi." ;
+ Message [ portuguese_brazilian ] = "No consigo sair do aplicativo neste momento.\nPlease wait until all print jobs and/or\nOLE-activations are terminated and close\nall dialogs." ;
+ Message [ portuguese ] = "De momento impossvel sair desta aplicao.\nAguarde a impresso de todos os documentos\n e/ou o fim das activaes OLE e feche todos os dilogos." ;
+ Message [ french ] = "Impossible de quitter l'application maintenant.\nVeuillez attendre la fin des activits d'impression et/ou des activations OLE\net fermez tous les dialogues." ;
+ Message [ dutch ] = "De applicatie kan op dit moment niet worden beindigd.\nWacht tot alle drukopdrachten en/of\nOLE-activiteiten zijn beindigd en \nsluit alle dialogen." ;
+ Message [ spanish ] = "La aplicacin no se puede cerrar por el momento. \nPor favor espere hasta que finalice la impresin de\n todos los documentos y/o activaciones OLE\ny cierre todos los dilogos." ;
+ Message [ danish ] = "Det er for tiden ikke muligt at afslutte programmet.\nVent venligst til alle udskriftsjob og/eller \nOLE-handlinger er afslutte og luk s alle dialoger." ;
+ Message [ swedish ] = "Programmet kan inte avslutas fr tillfllet.\nVnta tills alla utskriftsuppdrag och/eller\nOLE-aktiveringar r utfrda och stng alla dialoger." ;
+ Message [ finnish ] = "Can't quit the application at this moment.\nPlease wait until all print jobs and/or\nOLE-activations are terminated and close\nall dialogs." ;
+ Message [ english_us ] = "The application cannot be terminated at the moment.\nPlease wait until all print jobs and/or\nOLE actions have finished and close all dialogs." ;
+ Message[ chinese_simplified ] = "޷Ӧó\nԵֱдӡOLE״̬\nȻٹرжԻ";
+ Message[ russian ] = " .\n, , /\n OLE .";
+ Message[ polish ] = "Aplikacji nie mona zakoczy.\nProsz zaczeka na koniec zada wydruku i/lub\nakcji OLE i zamkn wszystkie aplikacje.";
+ Message[ japanese ] = "۸т܏Ił܂B\nׂĂ̈ޮ /܂ \nOLE ̏I܂ő҂ ׂĂ޲۸ނ‚ĉB";
+ Message[ chinese_traditional ] = "{bLkoε{C\nеԩҦCLȩOLEEAwgM\nMAҦܤC";
+ Message[ arabic ] = " .\n ɡ /\n OLE .";
+ Message[ dutch ] = "De applicatie kan op dit moment niet worden beindigd.\nWacht tot alle drukopdrachten en/of\nOLE-activiteiten zijn beindigd en \nsluit alle dialogen.";
+ Message[ chinese_simplified ] = "޷Ӧó\nԵֱдӡOLE״̬\nȻٹرжԻ";
+ Message[ greek ] = " .\n /\n OLE .";
+ Message[ korean ] = " α׷ ϴ.\nμ ۾ ׸/Ǵ \nOLE Ȱȭ ٷȴٰ ȭڸ ʽÿ.";
+ Message[ turkish ] = "u an uygulamadan klamyor.\nTm yazdrma ilerinin ve/veya\nOLE ilemlerinin bitmesini bekleyip tm diyaloglar kapatnz.";
+ Message[ language_user1 ] = " ";
+};
+
+QueryBox MSG_IS_SERVER
+{
+ Buttons = WB_YES_NO ;
+ DefButton = WB_DEF_NO ;
+ Message = "Die Applikation ist noch als Objekt- oder Druck-Server aktiv.\nSoll sie trotzdem geschlossen werden?" ;
+ Message [ English ] = "This application is an active object- or printserver.\nTerminata nevertheless?" ;
+ Message [ norwegian ] = "Denne applikasjonen er en aktiv server.\nAvslutt likevel?" ;
+ Message [ italian ] = "Questa applicazione un server attivo.\nTerminare in ogni caso?" ;
+ Message [ portuguese_brazilian ] = "Este aplicativo um ativo no servidor.\nTerminar assim mesmo?" ;
+ Message [ portuguese ] = "Esta aplicao est ainda activa como servidor de objecto ou da impressora.\nMesmo assim, finalizar?" ;
+ Message [ finnish ] = "Tm sovellus on aktiivinen lhdesovellus.\nLopetetaanko silti?" ;
+ Message [ danish ] = "Denne applikation er stadig aktiv som objekt- eller printserver.\nSkal der lukkes alligevel?" ;
+ Message [ french ] = "Cette application est encore active en tant que serveur d'objets ou d'imprimante.\nInterrompre malgr tout ?" ;
+ Message [ swedish ] = "Tillmpningen r fortfarande aktiv antingen som objekt- eller skrivarserver.\nVill Du trots det stnga den?" ;
+ Message [ dutch ] = "Deze toepassing is nog actief als object- of afdrukserver.\nToch afsluiten ?" ;
+ Message [ spanish ] = "Esta aplicacin est an activa como servidor de objeto o de impresin.\nDesea finalizarla?" ;
+ Message [ english_us ] = "This application is as object or print server active.\nDo you want to terminate anyway?" ;
+ Message[ chinese_simplified ] = "ӦóΪӡڼ״̬\nҪر?";
+ Message[ russian ] = " .\n ?";
+ Message[ polish ] = "Aplikacja jest jeszcze aktywna jako obiekt lub serwer wydruku.\nCzy j mimo to zamkn?";
+ Message[ japanese ] = "ع݂ ܂޼ުĂ܂ ްƂıèނłB\n‚Ă낵ł?";
+ Message[ chinese_traditional ] = "oε{@ΦCLAٳBEAC\nz٬OnH";
+ Message[ arabic ] = " .\n ߿";
+ Message[ dutch ] = "Deze toepassing is nog actief als object- of afdrukserver.\nToch afsluiten ?";
+ Message[ chinese_simplified ] = "ӦóΪӡڼ״̬\nҪر?";
+ Message[ greek ] = " .\n ;";
+ Message[ korean ] = "üǴ μ α׷ ȰȭǾ ֽϴ.\n Ͻðڽϱ?";
+ Message[ turkish ] = "Uygulama u an nesne ya da yazdrma sunucusu olarak alyor.\nYine de kapatlsn m?";
+ Message[ language_user1 ] = " ";
+};
+
+String STR_NODOUBLE
+{
+ TEXT = "StarOffice kann nicht mehrfach gestartet werden." ;
+ TEXT [ English ] = "StarOffice cannot be started multiply." ;
+ Text [ english_us ] = "StarOffice cannot be started more than once." ;
+ Text [ portuguese_brazilian ] = "StarOffice Applikationen knnen nicht mehrfach\ngestartet werden." ;
+ Text [ swedish ] = "StarOffice kan inte startas flera gnger samtidigt." ;
+ Text [ danish ] = "Det er ikke muligt at starte StarOffice flere gange." ;
+ Text [ italian ] = "StarOffice non pu essere avviato pi volte" ;
+ Text [ spanish ] = "StarOffice no se puede iniciar ms de una vez." ;
+ Text [ french ] = "Impossible de lancer plusieurs applications de \nStarOffice la fois." ;
+ Text [ dutch ] = "StarOffice kan maar n keer tegelijk worden gestart." ;
+ Text [ portuguese ] = "O StarOffice no pode ser inicializado mais do que uma vez." ;
+ Text[ chinese_simplified ] = "޷ͬʱ StarOffice ";
+ Text[ russian ] = " StarOffice .";
+ Text[ polish ] = "StarOffice nie mona kilkakrotnie uruchomi.";
+ Text[ japanese ] = "StarOffice Ăł܂B";
+ Text[ chinese_traditional ] = "LkPɦhҰStarOfficeC";
+ Text[ arabic ] = " StarOffice .";
+ Text[ dutch ] = "StarOffice kan maar n keer tegelijk worden gestart.";
+ Text[ chinese_simplified ] = "޷ͬʱ StarOffice ";
+ Text[ greek ] = " StarOffice .";
+ Text[ korean ] = "StarOffice ѹ̻ ۵ մϴ .";
+ Text[ turkish ] = "StarOffice iin birden fazla oturum alamaz.";
+ Text[ language_user1 ] = " ";
+};
+
+String STR_NOPRINTER
+{
+ TEXT = "Einige StarOffice-Funktionen knnen ohne Druckertreiber nicht korrekt arbeiten.\nBitte installieren Sie einen Druckertreiber." ;
+ TEXT [ English ] = "Some StarOffice functions are not available without printer driver.\nPlease install a priter driver." ;
+ Text [ english_us ] = "Some StarOffice functions will not work properly without a printer driver.\nPlease install a printer driver." ;
+ Text [ swedish ] = "Ngra StarOffice-funktioner kan inte arbeta korrekt utan en skrivardrivrutin.\nVar vnlig och installera en skrivardrivrutin." ;
+ Text [ danish ] = "Enkelte StarOffice-funktioner kanl ikke arbejde korrekt uden en printerdriver.\nInstaller venligst en printerdriver." ;
+ Text [ italian ] = "Alcune funzioni StarOffice non funzionano correttamente senza il driver stampante.\nInstallatene uno." ;
+ Text [ spanish ] = "Algunas funciones de StarOffice no pueden trabajar correctamente sin un controlador para la impresora.\nPor favor instale uno." ;
+ Text [ french ] = "Certaines fonctions StarOffice ne peuvent pas travailler correctement sans pilote d'imprimante.\nVeuillez installer un pilote d'imprimante." ;
+ Text [ dutch ] = "Enkele StarOffice-functies kunnen zonder printerdriver niet correct werken.\nInstalleer een printerdriver." ;
+ Text [ portuguese_brazilian ] = "Einige StarOffice-Funktionen knnen ohne Druckertreiber nicht korrekt arbeiten.\nBitte installieren Sie einen Druckertreiber." ;
+ Text [ portuguese ] = "Algumas das funes do StarOffice no podem funcionar correctamente sem um controlador de impressora.\nFaa a respectiva instalao." ;
+ Text[ chinese_simplified ] = "ΪûаװӡһЩStarOfficeܿܲת\nװһӡ";
+ Text[ russian ] = " StarOffice .\n, , .";
+ Text[ polish ] = "Niektre funkcje w StarOffice nie mog poprawnie pracowa bez sterownika drukarki.\nZainstaluj sterownik drukarki.";
+ Text[ japanese ] = "StarOffice ̂‚̋@\\ ײނȂŐN܂B\n ײނݽİقĂB";
+ Text[ chinese_traditional ] = "Sw˦CLXʵ{M@StarOffice\\Bण|`C\nбzwˤ@ӦCLXʵ{C";
+ Text[ arabic ] = " StarOffice .\n .";
+ Text[ dutch ] = "Enkele StarOffice-functies kunnen zonder printerdriver niet correct werken.\nInstalleer een printerdriver.";
+ Text[ chinese_simplified ] = "ΪûаװӡһЩStarOfficeܿܲת\nװһӡ";
+ Text[ greek ] = " StarOffice .\n .";
+ Text[ korean ] = " StarOffice ̹ ̴ ۵ ʽϴ.\n ̹ ġ Ͻʽÿ.";
+ Text[ turkish ] = "Baz StarOffice ilevleri yazc srcs olmadan doru alamaz.\nBir yazc srcs kurun.";
+ Text[ language_user1 ] = " ";
+};
+
+String STR_NOMODUL
+{
+ TEXT = "Applikationsmodule knnen nicht als Applikationen\ngestartet werden, wenn der StarDesktop aktiv ist." ;
+ TEXT [ English ] = "Application modules may not be started\nif StarDesktop is active." ;
+ Text [ english_us ] = "Application modules may not be started\n when StarOffice Desktop is active." ;
+ Text [ italian ] = "Se lo StarOffice Desktop attivo i moduli applicativi\n non possono essere avviati come apllicazioni." ;
+ Text [ spanish ] = "Los mdulos de aplicacin no pueden ser\niniciados como aplicaciones si el escritorio (StarOffice Desktop) est activo." ;
+ Text [ french ] = "Impossible de dmarrer les modules d'application comme applications,\n si le StarOffice Desktop est actif." ;
+ Text [ dutch ] = "Applicatiemodules kunnen niet als applicaties\nworden gestart als StarDesktop actief is." ;
+ Text [ swedish ] = "Tillmpningsmoduler kan inte startas som\ntillmpningar nr StarOffice Desktop r aktiv." ;
+ Text [ danish ] = "Det er ikke muligt at starte applikationsmoduler som applikationer,\nr StarOffice Desktop er aktiv." ;
+ Text [ portuguese_brazilian ] = "Applikationsmodule knnen nicht als Applikationen\ngestartet werden, wenn der StarOffice Desktop aktiv ist." ;
+ Text [ portuguese ] = "Impossvel iniciar os mdulos como aplicaes quando o StarOffice Desktop se encontra activo." ;
+ Text[ chinese_simplified ] = "StarOffice Desktopڼ״̬\nӦóģ鲻ܹӦóС";
+ Text[ russian ] = " ,\n StarDeskto.";
+ Text[ polish ] = "Moduy aplikacji nie mog zosta uruchomione jako aplikacje\n, jeli jest wczony pulpit StarOffice Desktop.";
+ Text[ japanese ] = "StarOffice Desktop èނ̂Ƃ́Aع݂Ƃıع Ӽޭق\nJnł܂B";
+ Text[ chinese_traditional ] = "bStarOffice DesktopB_EA\nMε{ǪҶ@ε{ҰʹBC";
+ Text[ arabic ] = " ʡ\n StarOffice Desktop .";
+ Text[ dutch ] = "Applicatiemodules kunnen niet als applicaties\nworden gestart als StarDesktop actief is.";
+ Text[ chinese_simplified ] = "StarOffice Desktopڼ״̬\nӦóģ鲻ܹӦóС";
+ Text[ greek ] = " \n StarOffice Desktop.";
+ Text[ korean ] = "StarOffice ũ ž Ȱȭ Ǿ.\n α׷ ɼ ϴ.";
+ Text[ turkish ] = "Uygulama modlleri, StarOffice masast etkinken uygulama olarak\naltrlamaz.";
+ Text[ language_user1 ] = " ";
+};
+
+String STR_NOOFFICE
+{
+ TEXT = "Der StarDesktop kann nicht gestartet werden,\nwenn das StarWriter Applikationsmodul als\nApplikation gestartet wurde." ;
+ TEXT [ English ] = "StarDesktop may not be started if StarWriter\napplication module is active in application mode\n" ;
+ Text [ english_us ] = "StarOffice Desktop cannot be started if the StarOffice Writer\napplication module has been started\nas an application." ;
+ Text [ italian ] = "Se il modulo di applicazione StarOffice Writer stato avviato\ncome applicazione non possibile\navviare lo StarOffice Desktop." ;
+ Text [ spanish ] = "No se pude iniciar el escritorio\nsi se ha iniciado StarOffice Writer\ncomo aplicacin." ;
+ Text [ french ] = "Impossible de lancer le StarOffice Desktop,\nsi le module d'application StarOffice Writer a t lanc\ncomme application." ;
+ Text [ dutch ] = "StarOffice Desktop kan niet worden gestart\nals een StarOffice Writer applicatiemodule als\napplicatie werd gestart." ;
+ Text [ swedish ] = "StarOffice Desktop kan inte startas\nnr StarOffice Writer-tillmpningsmodulen\nhar startats som tillmpning." ;
+ Text [ danish ] = "Det er ikke muligt at starte StarOffice Desktop,\nnr StarOffice Writer applikationsmodulet er blevet startet \nsom applikation." ;
+ Text [ portuguese_brazilian ] = "Der StarOffice Desktop kann nicht gestartet werden,\nwenn das StarOffice Writer Applikationsmodul als\nApplikation gestartet wurde." ;
+ Text [ portuguese ] = "Impossvel iniciar o StarOffice Desktop quando o mdulo da\naplicao StarOffice Writer iniciado\ncomo aplicao." ;
+ Text[ chinese_simplified ] = "StarOffice WriterӦóģ鱻\nӦóʱ޷StarOffice Desktop ";
+ Text[ russian ] = " StarOffice Desktop ,\n StarOffice Writer \n.";
+ Text[ polish ] = "Pulpitu StarOffice Desktop nie mona uruchomi, \njeli modu aplikacji StarOffice Writer \nzosta uruchomiony jako aplikacja.";
+ Text[ japanese ] = "StarOffice Writer ع Ӽޭق\nع݂ƂĊJnĂ鎞́A\nStarOffice Desktop͊Jnł܂B";
+ Text[ chinese_traditional ] = "bStarOffice Writerε{ҶQ@\nε{ҰʹBɵLkҰStarOffice DesktopC";
+ Text[ arabic ] = " StarOffice Desktop\n StarOffice Writer \n.";
+ Text[ dutch ] = "StarOffice Desktop kan niet worden gestart\nals een StarOffice Writer applicatiemodule als\napplicatie werd gestart.";
+ Text[ chinese_simplified ] = "StarOffice WriterӦóģ鱻\nӦóʱ޷StarOffice Desktop ";
+ Text[ greek ] = " StarOffice Desktop\n \n StarOffice Writer .";
+ Text[ korean ] = "StarOffice Writer α׷ \n α׷μ ۵Ǿٸ,\n StarOffice ũ ž ɼ ϴ.";
+ Text[ turkish ] = "StarOffice masast, StarOffice Writer uygulama modul\nuygulama olarak altrlmsa balatlamaz.";
+ Text[ language_user1 ] = " ";
+};
+
+String STR_ISMODIFIED
+{
+ TEXT[ language_user1 ] = "PB: waren frueher zwei String";
+ TEXT = "Sollen nderungen in %1 gespeichert werden?" ;
+ TEXT [ English ] = "Should the changes to %1 be saved?" ;
+ TEXT [ norwegian ] = "Lagre endringer som " ;
+ TEXT [ italian ] = "Volete salvare le modifiche apportate a %1?" ;
+ TEXT [ portuguese_brazilian ] = "Gravar modificaes como " ;
+ TEXT [ portuguese ] = "Guardar modificaes em %1?" ;
+ TEXT [ finnish ] = "Tallenetaanko muutokset" ;
+ TEXT [ danish ] = "Skal ndringer gemmes i %1?" ;
+ TEXT [ french ] = "Souhaitez-vous enregistrer les modifications apportes %1 ?" ;
+ TEXT [ swedish ] = "Skall ndringar sparas i %1?" ;
+ TEXT [ dutch ] = "Wijzigingen opslaan in %1?" ;
+ TEXT [ spanish ] = "Desea guardar las modificaciones en %1?" ;
+ TEXT [ english_us ] = "Do you want to save the changes to %1?" ;
+ TEXT[ chinese_simplified ] = "Ҫ̸ %1 ";
+ TEXT[ russian ] = " %1 ?";
+ TEXT[ polish ] = "Zapisa modyfikacje w %1 ?";
+ TEXT[ japanese ] = "ύX %1 ɕۑ܂H";
+ TEXT[ chinese_traditional ] = "xsܧ %1 H";
+ TEXT[ arabic ] = " %1";
+ TEXT[ dutch ] = "Wijzigingen opslaan in %1?";
+ TEXT[ chinese_simplified ] = "Ҫ̸ %1 ";
+ TEXT[ greek ] = " %1;";
+ TEXT[ korean ] = "%1 Ͻðڽϱ?";
+ TEXT[ turkish ] = "%1 iinde yaplan deiiklikler kaydedilsin mi?";
+};
+
+String STR_AUTOSAVE
+{
+ TEXT = "Automatisch speichern" ;
+ TEXT [ English ] = "Automatic save" ;
+ TEXT [ norwegian ] = "Automatisk lagring" ;
+ TEXT [ italian ] = "Salva automaticamente" ;
+ TEXT [ portuguese_brazilian ] = "Gravao Automtica" ;
+ TEXT [ portuguese ] = "Guardar automaticamente" ;
+ TEXT [ finnish ] = "Automaattitallennus" ;
+ TEXT [ danish ] = "Gem automatisk" ;
+ TEXT [ french ] = "Enregistrement automatique" ;
+ TEXT [ swedish ] = "Spara automatiskt" ;
+ TEXT [ dutch ] = "Automatisch opslaan" ;
+ TEXT [ spanish ] = "Guardar automticamente" ;
+ TEXT [ english_us ] = "AutoSave" ;
+ TEXT[ chinese_simplified ] = "Զ";
+ TEXT[ russian ] = " ";
+ TEXT[ polish ] = "Zapisz automatycznie";
+ TEXT[ japanese ] = "Iɕۑ";
+ TEXT[ chinese_traditional ] = "۰xs";
+ TEXT[ arabic ] = " ";
+ TEXT[ dutch ] = "Automatisch opslaan";
+ TEXT[ chinese_simplified ] = "Զ";
+ TEXT[ greek ] = " ";
+ TEXT[ korean ] = "ڵ ";
+ TEXT[ turkish ] = "Otomatik kayt";
+ TEXT[ language_user1 ] = " ";
+};
+
+String STR_RESWARNING
+{
+ TEXT = "Die Systemresourcen werden knapp. Bitte beenden Sie andere Applikationen oder schlieen Sie einige Fenster, bevor Sie weiterarbeiten." ;
+ TEXT [ English ] = "Not enough resources. Please quit other applications or close some windows before continuing." ;
+ TEXT [ norwegian ] = "Ikke nok ressurser. Avslutt andre applikasjoner eller lukk noen vinduer fr du fortsetter." ;
+ TEXT [ italian ] = "Risorse insufficienti. Uscire dalle altre applicazioni o chiudere alcune finestre prima di continuare." ;
+ TEXT [ portuguese_brazilian ] = "No h recursos suficientes. Sai de outros aplicativos ou feche algumas janelas antes de continuar." ;
+ TEXT [ portuguese ] = "Recursos do sistema insuficientes. Por favor, saia dos outros programas ou feche algumas janelas antes de continuar." ;
+ TEXT [ finnish ] = "Resurssit eivt riit. Lopeta muita sovelluksia tai sulje ikkunoita ennen kuin jatkat." ;
+ TEXT [ danish ] = "Begrnsede systemressourcer. Afslut venligst andre applikationer eller luk nogle vinduer, fr du fortstter." ;
+ TEXT [ french ] = "Ressources insuffisantes. Veuillez quitter les autres applications ou fermer certaines fentres avant de continuer." ;
+ TEXT [ swedish ] = "Inte tillrckligt med resurser. Stng andra program eller stng ngra fnster innan Du fortstter." ;
+ TEXT [ dutch ] = "Onvoldoende systeemgeheugen beschikbaar. Sluit andere toepassingen af.of sluit een aantal vensters voordat u uw werkvoortzet." ;
+ TEXT [ spanish ] = "No hay suficientes recursos del sistema. Por favor, elimine otras aplicaciones o cierre algunas ventanas antes de continuar." ;
+ TEXT [ english_us ] = "Limited system resources. Please quit other applications or close some windows before continuing." ;
+ TEXT[ chinese_simplified ] = "ϵͳԴ㡣رij߹رһЩӴȻ³ִ";
+ TEXT[ russian ] = " . , , , .";
+ TEXT[ polish ] = "Zasoby systemu s ograniczone. Przed kontynuacj pracy zakocz kilka aplikacji lub zamknij kilka okien.";
+ TEXT[ japanese ] = " ؿ肬łBƂ𑱂Oɤ̱ع݂I邩 ‚̳޳‚ĉB";
+ TEXT[ chinese_traditional ] = "tθ귽C䥦{Ϊ@ǵMM᭫sհROC";
+ TEXT[ arabic ] = " . С .";
+ TEXT[ dutch ] = "Onvoldoende systeemgeheugen beschikbaar. Sluit andere toepassingen af.of sluit een aantal vensters voordat u uw werkvoortzet.";
+ TEXT[ chinese_simplified ] = "ϵͳԴ㡣رij߹رһЩӴȻ³ִ";
+ TEXT[ greek ] = " . .";
+ TEXT[ korean ] = "ý ڿ մϴ . Ͻñ ٸ α׷ ϰų ִ â ʽÿ.";
+ TEXT[ turkish ] = "Sistem kaynaklar azalyor. almaya devam etmeden nce dier uygulamalar ya da bir ka pencere kapatn.";
+ TEXT[ language_user1 ] = " ";
+};
+String STR_RESEXCEPTION
+{
+ TEXT = "Wichtige Programmteile nicht gefunden. Bitte berprfen Sie Ihre Installation." ;
+ TEXT [ ENGLISH ] = "There are files missing. Please check application setup." ;
+ TEXT [ norwegian ] = "Filer mangler. Kontroller applikasjonsoppsett." ;
+ TEXT [ italian ] = "Mancano alcuni file. Verificare la configurazione dell'applicazione." ;
+ TEXT [ portuguese_brazilian ] = "Faltam arquivos. Verifique a configurao do aplicativo." ;
+ TEXT [ portuguese ] = "Faltam alguns ficheiros importantes. Por favor, verifique a configurao do programa." ;
+ TEXT [ finnish ] = "Tiedostoja puuttuu. Tarkista sovelluksen asetukset." ;
+ TEXT [ danish ] = "Vigtige programdele blev ikke fundet. Kontroller venligst din installation." ;
+ TEXT [ french ] = "Certains fichiers sont manquants. Veuillez vrifier le paramtrage de l'application." ;
+ TEXT [ swedish ] = "Viktiga programdelar hittades inte. Kontrollera Din installation." ;
+ TEXT [ dutch ] = "Er ontbreken belangrijke programmaonderdelen. Controleer of de installatie juist is doorgevoerd." ;
+ TEXT [ spanish ] = "No se encuentran archivos importantes del programa. Compruebe la instalacin." ;
+ TEXT [ english_us ] = "There are files missing. Please check application setup." ;
+ TEXT[ chinese_simplified ] = "ûҵҪij򲿼İװ";
+ TEXT[ russian ] = " . , , .";
+ TEXT[ polish ] = "Wane czci programu nie zostay znalezione.Sprawd instalacj aplikacji.";
+ TEXT[ japanese ] = "dv۸т̈ꕔ‚܂BݽİقĉB";
+ TEXT[ chinese_traditional ] = "S쥲n{CˬdzwˡC";
+ TEXT[ arabic ] = " . .";
+ TEXT[ dutch ] = "Er ontbreken belangrijke programmaonderdelen. Controleer of de installatie juist is doorgevoerd.";
+ TEXT[ chinese_simplified ] = "ûҵҪij򲿼İװ";
+ TEXT[ greek ] = " . .";
+ TEXT[ korean ] = " ֽϴ. ȮϽʽÿ.";
+ TEXT[ turkish ] = "nemli program eleri bulunamad. Kurulumunuzu kontrol edin.";
+ TEXT[ language_user1 ] = " ";
+};
+
+String STR_DOUBLEEXCEPTION
+{
+ Text = "Whrend der Alarmdatensicherung ist ein weiterer Systemfehler aufgetreten.\nDie Daten sind evtl. unvollstndig gesichert.";
+ Text[English] = "Within the emergency save a second system error has occured.\The data may be saved incompletely.";
+ TEXT[ italian ] = "Durante il backup di sicurezza si verificato un altro errore di sistema.\nI dati salvati potrebbero essere incompleti.";
+ TEXT[ portuguese_brazilian ] = "Whrend der Alarmdatensicherung ist ein weiterer Systemfehler aufgetreten.\nDie Daten sind evtl. unvollstndig gesichert.";
+ TEXT[ portuguese ] = "Surgiu mais um erro no sistema enquanto se executava o backup de segurana.\nProvavelmente, foi impossvel guardar os dados de forma completa.";
+ TEXT[ danish ] = "Der opstod en yderligere systemfejl ved alarmdatasikringen.\nAlle data er muligvis ikke gemt fuldstndigt.";
+ TEXT[ french ] = "Au cours de la sauvegarde, une nouvelle erreur systme s'est produite.\nIl n'est par certain que toutes les donnes aient pas pu tre enregistres correctement.";
+ TEXT[ swedish ] = "Ytterligare ett systemfel uppstod nr alarmdata sparades.\nEventuellt har inte alla data sparats fullstndigt.";
+ TEXT[ dutch ] = "Tijdens het opslaan van alarmgegevens is nog een systeemfout opgetreden.\nDe gegevens werden evtl. niet compleet opgeslagen.";
+ TEXT[ spanish ] = "Ha ocurrido otro error en el sistema mientras se guardaban los datos.\nEs posible que no se hayan guardado completamente.";
+ TEXT[ english_us ] = "Another error occurred during the save recovery.\nPossibly, the data could not be entirely saved.";
+ TEXT[ chinese_simplified ] = "޸ʱһ\nݴ̺пܲ";
+ TEXT[ russian ] = " .\n .";
+ TEXT[ polish ] = "Podczas alarmowego zabezpieczenia danych wystpi dalszy bd w systemie.\nDane s event. niekompletnie zabezpieczone.";
+ TEXT[ japanese ] = "x̧ٕی̍ۂɑ̼Ѵװ܂B\nް͂炭SɕۑĂ܂B";
+ TEXT[ chinese_traditional ] = "b״_xsɵoͤF@ӿ~C\nxsܦiणC";
+ TEXT[ arabic ] = " .\n .";
+ TEXT[ dutch ] = "Tijdens het opslaan van alarmgegevens is nog een systeemfout opgetreden.\nDe gegevens werden evtl. niet compleet opgeslagen.";
+ TEXT[ chinese_simplified ] = "޸ʱһ\nݴ̺пܲ";
+ TEXT[ greek ] = " .\n .";
+ TEXT[ korean ] = " ϴ ٸ ߻߽ϴ.\nƸ, Ͱ ʾ Դϴ.";
+ TEXT[ turkish ] = "Alarm verileri kayd srasnda baka bir sistem hatas olutu.\nVeriler tam olarak kaydedilmemi olabilir.";
+ TEXT[ language_user1 ] = " ";
+};
+
+String STR_SYSRESEXCEPTION
+{
+ TEXT = "Die Systemresourcen sind verbraucht. Bitte starten Sie die Anwendung neu." ;
+ TEXT [ English ] = "Not enough system resources. Please restart the application." ;
+ Text [ english_us ] = "System resources exhausted. Please restart the application." ;
+ Text [ italian ] = "Le risorse del sistema sono esaurite. Riavviare l'applicazione." ;
+ Text [ spanish ] = "Los recursos del sistema se han acabado. Por favor reinicie la aplicacin." ;
+ Text [ french ] = "Les ressources du systme sont puises. Veuillez relancer l'application ." ;
+ Text [ dutch ] = "De systeemresources zijn verbruikt. Start de applicatie opnieuw." ;
+ Text [ swedish ] = "Inte tillrckligt med systemresurser. Starta om programmet." ;
+ Text [ danish ] = "Systemressourcerne er opbrugt. Genstart venligst denne applikation." ;
+ Text [ portuguese_brazilian ] = "Die Systemresourcen sind verbraucht. Bitte starten Sie die Anwendung neu." ;
+ Text [ portuguese ] = "Recursos do sistema esgotados. Reinicie a aplicao." ;
+ Text[ chinese_simplified ] = "ϵͳԴѾꡣӦó";
+ Text[ russian ] = " . .";
+ Text[ polish ] = "Zasoby systemu s zuyte. Rozpocznij aplikacj ponownie.";
+ Text[ japanese ] = " ؿςłB۸тVĂĉB";
+ Text[ chinese_traditional ] = "tθ귽wgΧCбzsҰε{C";
+ Text[ arabic ] = " . .";
+ Text[ dutch ] = "De systeemresources zijn verbruikt. Start de applicatie opnieuw.";
+ Text[ chinese_simplified ] = "ϵͳԴѾꡣӦó";
+ Text[ greek ] = " . .";
+ Text[ korean ] = "ý ڿ ҸǾϴ. α׷ ٽ Ͻʽÿ.";
+ Text[ turkish ] = "Sistem kaynaklar tkendi. Uygulamay yeniden balatnz.";
+ Text[ language_user1 ] = " ";
+};
+
+ErrorBox MSG_ERR_SOINIT
+{
+ Message = "Fehler beim Initialisieren des Objekt-Systems." ;
+ Message [ ENGLISH ] = "Error initializing object-system." ;
+ Message [ norwegian ] = "Feil ved start av objekt-system." ;
+ Message [ italian ] = "Errore durante l'inizializzazione del sistema oggetto." ;
+ Message [ portuguese_brazilian ] = "Erro ao inicializar o objeto-systema." ;
+ Message [ portuguese ] = "Erro ao inicializar o sistema de objectos." ;
+ Message [ finnish ] = "Virhe objektijrjestelm alustettaessa." ;
+ Message [ danish ] = "Fejl ved initialisering af objekt-systemet." ;
+ Message [ french ] = "Erreur lors de l'initialisation du systme d'objets." ;
+ Message [ swedish ] = "Fel vid initiering av objektsystem." ;
+ Message [ dutch ] = "Fout bij de initialisatie van het objectsysteem." ;
+ Message [ spanish ] = "Error al inicializar el sistema objeto." ;
+ Message [ english_us ] = "Error initializing object-system." ;
+ Message[ chinese_simplified ] = "ڳʼϵͳʱ";
+ Message[ russian ] = " .";
+ Message[ polish ] = "Bd inicjalizacji systemu obiektw.";
+ Message[ japanese ] = "޼ު т̏̍ۂ̴װ";
+ Message[ chinese_traditional ] = "blƪtήɵoͿ~C";
+ Message[ arabic ] = " .";
+ Message[ dutch ] = "Fout bij de initialisatie van het objectsysteem.";
+ Message[ chinese_simplified ] = "ڳʼϵͳʱ";
+ Message[ greek ] = " .";
+ Message[ korean ] = "ü ý ʱȭ .";
+ Message[ turkish ] = "Nesne sistemi balatlrken hata olutu.";
+ Message[ language_user1 ] = " ";
+};
+
+String MSG_IOERR_FILE_NOT_FOUND
+{
+ Text = "Die Datei $(FILE) existiert nicht." ;
+ Text [ English ] = "The file $(FILE) doesn't exist." ;
+ Text [ norwegian ] = "Filen $(FIL) finnes ikke." ;
+ Text [ italian ] = "Il file $(FILE) non esiste." ;
+ Text [ portuguese_brazilian ] = "O arquivo $(FILE) no existe." ;
+ Text [ portuguese ] = "O ficheiro $(FILE) no existe." ;
+ Text [ finnish ] = "Tiedostoa $(FILE) ei ole." ;
+ Text [ danish ] = "Filen $(FILE) eksisterer ikke." ;
+ Text [ french ] = "Le fichier $(FILE) n'existe pas." ;
+ Text [ swedish ] = "Filen $(FILE) finns inte." ;
+ Text [ dutch ] = "Bestand $(FILE) bestaat niet." ;
+ Text [ spanish ] = "No existe el archivo $(FILE)." ;
+ Text [ english_us ] = "The file $(FILE) doesn't exist." ;
+ Text[ chinese_simplified ] = "ļ$(FILE)ڡ";
+ Text[ russian ] = " $(FILE) .";
+ Text[ polish ] = "Plik $(FILE) nie istnieje.";
+ Text[ japanese ] = "̧$(FILE)͂܂B";
+ Text[ chinese_traditional ] = "ɮ$(FILE)sbC";
+ Text[ arabic ] = " $(FILE) .";
+ Text[ dutch ] = "Bestand $(FILE) bestaat niet.";
+ Text[ chinese_simplified ] = "ļ$(FILE)ڡ";
+ Text[ greek ] = " $(FILE) .";
+ Text[ korean ] = " $(FILE) ʽϴ.";
+ Text[ turkish ] = "$(FILE) dosyas mevcut deil.";
+ Text[ language_user1 ] = " ";
+};
+
+String MSG_IOERR_PATH_NOT_FOUND
+{
+ Text = "Der Pfad zu der Datei $(FILE) existiert nicht." ;
+ Text [ English ] = "The path to file $(FILE) doesn't exist." ;
+ Text [ norwegian ] = "Banen til filen $(FIL) finnes ikke." ;
+ Text [ italian ] = "Il percorso per il file $(FILE) non esiste." ;
+ Text [ portuguese_brazilian ] = "O caminho do arquivo $(FILE) no existe." ;
+ Text [ portuguese ] = "O atalho para o ficheiro $(FILE) no existe." ;
+ Text [ finnish ] = "Polkua tiedostoon $(FILE) ei ole." ;
+ Text [ danish ] = "Stien til filen $(FILE) eksisterer ikke." ;
+ Text [ french ] = "Chemin au fichier $(FILE) inexistant." ;
+ Text [ swedish ] = "Skvgen till filen $(FILE) existerar inte." ;
+ Text [ dutch ] = "Pad naar bestand $(FILE) bestaat niet." ;
+ Text [ spanish ] = "No existe la ruta de acceso al archivo $(FILE)." ;
+ Text [ english_us ] = "The path to file $(FILE) doesn't exist." ;
+ Text[ chinese_simplified ] = "ָļ $(FILE) ·ڡ";
+ Text[ russian ] = " $(FILE) .";
+ Text[ polish ] = "cieka do pliku $(FILE) nie istnieje.";
+ Text[ japanese ] = "̧$(FILE)ւ߽͂܂B";
+ Text[ chinese_traditional ] = "Vɮ $(FILE) |sbC";
+ Text[ arabic ] = " $(FILE) .";
+ Text[ dutch ] = "Pad naar bestand $(FILE) bestaat niet.";
+ Text[ chinese_simplified ] = "ָļ $(FILE) ·ڡ";
+ Text[ greek ] = " $(FILE) .";
+ Text[ korean ] = " $(FILE) ΰ ʽϴ.";
+ Text[ turkish ] = "$(FILE) dosyasnn veri yolu mevcut deil.";
+ Text[ language_user1 ] = " ";
+};
+
+String MSG_IOERR_TOO_MANY_OPEN_FILES
+{
+ Text = "Die Datei $(FILE) konnte nicht geffnet werden,\nda zur Zeit zu viele Dateien offen sind.\nSchlieen Sie einige Dateien und versuchen Sie es erneut." ;
+ Text [ English ] = "The file $(FILE) could not be opened,\nbecause there are no more file handles available.\nPlease close some files and try again." ;
+ Text [ norwegian ] = "Filen $(FILE) kan ikke pnes,\ndet er ikke flere filhndtak tilgjengelig.\nLukk noen filer og prv igjen." ;
+ Text [ italian ] = "Impossibile aprire il file $(FILE),\nin quando vi sono troppi file aperti.\nChiudete i file e riprovate." ;
+ Text [ portuguese_brazilian ] = "O arquivo $(FILE) no pode ser aberto\npor que no existem mais alas de arquivo disponveis.\nFeche alguns arquivos e tent" ;
+ Text [ portuguese ] = "Foi impossvel abrir o ficheiro $(FILE), j que de\nmomento se encontram demasiados ficheiros abertos.\nFeche alguns destes ficheiros e tente novamente." ;
+ Text [ finnish ] = "Tiedostoa $(FILE) ei voi avata,\nkoska tiedostokahvoja ei ole vapaana.\nSulje tiedostoja ja yrit uudelleen." ;
+ Text [ danish ] = "Det var ikke muligt at bne filen $(FILE),\nda der for tiden er for mange bne filer.\nLuk nogle filer og prv igen." ;
+ Text [ french ] = "Impossible d'ouvrir le fichier $(FILE)\n cause d'un trop grand nombre de fichiers ouverts\n.Fermez en quelques-uns avant de ressayer." ;
+ Text [ swedish ] = "Filen $(FILE) kunde inte ppnas\np grund av att fr mnga filer r ppna fr tillfllet.\nStng ngra filer och frsk igen." ;
+ Text [ dutch ] = "Bestand $(FILE) kon niet worden geopend \nomdat er teveel bestanden gelijktijdig geopend zijn.\nSluit enkele bestanden en probeert u het opnieuw." ;
+ Text [ spanish ] = "No se pudo abrir el archivo $(FILE)\nya que hay muchos archivos abiertos.\nCierre algunos archivos e intntelo otra vez." ;
+ Text [ english_us ] = "The file $(FILE) could not be opened,\nbecause too many files are open.\nPlease close some files and try again." ;
+ Text[ chinese_simplified ] = "޷ļ$(FILE) \nΪѾ̫ļ\nرһЩļȻ³ԡ";
+ Text[ russian ] = " $(FILE) ,\n.. .\n .";
+ Text[ polish ] = "Plik $(FILE) nie mg zosta otwarty,\nponiewa w tym czasie byo otwarte za duo plikw.\nZamknij kilka plikw i sprbuj je otworzy ponownie.";
+ Text[ japanese ] = "\n܂̧قJ߂ŁA̧$(FILE)͊J܂B\n‚̧ق‚ ēx݂ĂB";
+ Text[ chinese_traditional ] = "Lk}ɮ$(FILE) M\n]wg}ҤӦhɮסC\n@ɮסMMbsաC";
+ Text[ arabic ] = " $(FILE) \n .\n ʡ .";
+ Text[ dutch ] = "Bestand $(FILE) kon niet worden geopend \nomdat er teveel bestanden gelijktijdig geopend zijn.\nSluit enkele bestanden en probeert u het opnieuw.";
+ Text[ chinese_simplified ] = "޷ļ$(FILE) \nΪѾ̫ļ\nرһЩļȻ³ԡ";
+ Text[ greek ] = " $(FILE),\n .\n .";
+ Text[ korean ] = " ʹ ֱ \n$(FILE) ߽ϴ. \n ݰ õϽʽÿ.";
+ Text[ turkish ] = "$(FILE) dosyas, u an ok fazla dosya ak olduu\niin alamyor.\nBirka dosyay kapatp yeniden deneyin.";
+ Text[ language_user1 ] = " ";
+};
+
+String MSG_IOERR_ACCESS_DENIED
+{
+ Text = "Auf die Datei $(FILE) konnte wegen fehlender Zugriffsrechte nicht zugegriffen werden." ;
+ Text [ English ] = "The file $(FILE) could not be accessed because of missing access rights." ;
+ Text [ norwegian ] = "The file $(FILE) could not be accessed because of missing access rights." ;
+ Text [ italian ] = "Non stato possibile accedere al file $(FILE) per mancanza dei diritti." ;
+ Text [ portuguese_brazilian ] = "The file $(FILE) could not be accessed because of missing access rights." ;
+ Text [ portuguese ] = "Impossvel o acesso ao ficheiro $(FILE) devido a direitos de acesso inexistentes." ;
+ Text [ finnish ] = "Tiedostoa $(FILE) ei voi avata, koska kyttoikeudet puuttuvat." ;
+ Text [ danish ] = "Det var ikke muligt at bne filen $(FILE) pga. manglende adgangsrettigheder." ;
+ Text [ french ] = "Le fichier $(FILE) n'a pas pu tre ouvert du fait de droits d'accs manquants." ;
+ Text [ swedish ] = "Filen $(FILE) kunde inte ppnas eftersom tkomstrttigheter saknas." ;
+ Text [ dutch ] = "Bestand $(FILE) kon niet worden geopend omdat toegangsrechten ontbreken." ;
+ Text [ spanish ] = "No se pudo se abrir el archivo $(FILE) por falta de derechos." ;
+ Text [ english_us ] = "The file $(FILE) could not be opened due to missing access rights." ;
+ Text[ chinese_simplified ] = "ΪûжȡȨȡļ$(FILE)";
+ Text[ russian ] = "- , $(FILE) .";
+ Text[ polish ] = "Brak dostpu do pliku $(FILE) z powodu brakujcych praw dostpu.";
+ Text[ japanese ] = "̧ $(FILE)ɂ Ȃ̂űł܂B";
+ Text[ chinese_traditional ] = "]SŪvQӵLkŪɮ$(FILE)C";
+ Text[ arabic ] = " $(FILE) .";
+ Text[ dutch ] = "Bestand $(FILE) kon niet worden geopend omdat toegangsrechten ontbreken.";
+ Text[ chinese_simplified ] = "ΪûжȡȨȡļ$(FILE)";
+ Text[ greek ] = " $(FILE) , .";
+ Text[ korean ] = " $(FILE) ʽϴ.";
+ Text[ turkish ] = "$(FILE) dosyas, eriim haklarnn olmamas nedeniyle alamad.";
+ Text[ language_user1 ] = " ";
+};
+
+String MSG_IOERR_INVALID_ACCESS
+{
+ Text = "Auf Datei $(FILE) konnte nicht zugegriffen werden." ;
+ Text [ English ] = "The file $(FILE) could not be accessed." ;
+ Text [ norwegian ] = "The file $(FILE) could not be accessed." ;
+ Text [ italian ] = "Non stato possibile accedere al file $(FILE)." ;
+ Text [ portuguese_brazilian ] = "The file $(FILE) could not be accessed." ;
+ Text [ portuguese ] = "Impossvel o acesso ao ficheiro $(FILE)." ;
+ Text [ finnish ] = "Tiedostoa $(FILE) ei voi avata, koska kyttoikeudet eivt kelpaa." ;
+ Text [ danish ] = "Det var ikke muligt at f adgang til filen $(FILE)." ;
+ Text [ french ] = "Le fichier $(FILE) n'a pas pu tre ouvert du fait de droits d'accs incorrects." ;
+ Text [ swedish ] = "Det var inte mjligt att f tkomst till filen $(FILE)." ;
+ Text [ dutch ] = "Bestand $(FILE) kon niet worden geopend." ;
+ Text [ spanish ] = "No se pudo acceder al archivo $(FILE)." ;
+ Text [ english_us ] = "The file $(FILE) could not be accessed." ;
+ Text[ chinese_simplified ] = "޷ȡļ $(FILE) ";
+ Text[ russian ] = " $(FILE) .";
+ Text[ polish ] = "Brak dostpu do pliku $(FILE).";
+ Text[ japanese ] = "̧$(FILE)ɂͱł܂B";
+ Text[ chinese_traditional ] = "LkŪɮ $(FILE) C";
+ Text[ arabic ] = " $(FILE).";
+ Text[ dutch ] = "Bestand $(FILE) kon niet worden geopend.";
+ Text[ chinese_simplified ] = "޷ȡļ $(FILE) ";
+ Text[ greek ] = " $(FILE).";
+ Text[ korean ] = " $(FILE) ٵ ʽϴ.";
+ Text[ turkish ] = "$(FILE) dosyasna eriilemedi.";
+ Text[ language_user1 ] = " ";
+};
+
+String MSG_IOERR_INVALID_HANDLE
+{
+ Text = "Die Datei $(FILE) konnte wegen einer ungltiger Dateidescriptors nicht geffnet werden." ;
+ Text [ English ] = "The file $(FILE) could not be opened because of an invalid file handle." ;
+ Text [ norwegian ] = "+++The file $(FILE) could not be opened because of an invalid file handle." ;
+ Text [ italian ] = "Impossibile aprire il file $(FILE) in quando l'handle di file non valido." ;
+ Text [ portuguese_brazilian ] = "O arquivo $(FILE) no pode ser aberto devido a uma ala de arquivo invlida." ;
+ Text [ portuguese ] = "Foi impossvel abrir o ficheiro $(FILE) devido a uma guia de ficheiro incorrecta." ;
+ Text [ finnish ] = "Tiedostoa $(FILE) ei voi avata, koska tiedostokahva on virheellinen." ;
+ Text [ danish ] = "Det var ikke muligt at bne filen $(FILE) pga. en ugyldig filhandle." ;
+ Text [ french ] = "Le fichier $(FILE) n'a pas pu tre ouvert suite une erreur de numrisation." ;
+ Text [ swedish ] = "Filen $(FILE) kunde inte ppnas p grund av en ogiltig Fildescriptor." ;
+ Text [ dutch ] = "Bestand $(FILE) kon niet worden geopend als gevolg van ongeldige filedescriptor." ;
+ Text [ spanish ] = "No se pudo abrir el archivo $(FILE) debido a un controlador de archivos no vlido." ;
+ Text [ english_us ] = "The file $(FILE) could not be opened due to an invalid file handle." ;
+ Text[ chinese_simplified ] = "Чļʶֵ޷ļ $(FILE) ";
+ Text[ russian ] = "- , $(FILE) .";
+ Text[ polish ] = "Pliku $(FILE) nie mona byo otworzy z powodu nieprawidowego dojcia.";
+ Text[ japanese ] = "̧$(FILE)ً̧͖Lq̂߂ɊJ܂B";
+ Text[ chinese_traditional ] = "]LĪɮ׼ѭȦӵLk}ɮ$(FILE) C";
+ Text[ arabic ] = " $(FILE) .";
+ Text[ dutch ] = "Bestand $(FILE) kon niet worden geopend als gevolg van ongeldige filedescriptor.";
+ Text[ chinese_simplified ] = "Чļʶֵ޷ļ $(FILE) ";
+ Text[ greek ] = " $(FILE) .";
+ Text[ korean ] = "߸ ڵ $(FILE) ʽϴ.";
+ Text[ turkish ] = "$(FILE) dosyas geersiz bir dosya tutamac nedeniyle alamad.";
+ Text[ language_user1 ] = " ";
+};
+
+String MSG_IOERR_CANNOT_MAKE
+{
+ Text = "Die Datei $(FILE) konnte nicht angelegt werden." ;
+ Text [ English ] = "The file $(FILE) could not be created." ;
+ Text [ norwegian ] = "+++The file $(FILE) could not be created." ;
+ Text [ italian ] = "Impossibile creare il file $(FILE)." ;
+ Text [ portuguese_brazilian ] = "O arquivo $(FILE) no pode ser criado." ;
+ Text [ portuguese ] = "Foi impossvel criar o ficheiro $(FILE)." ;
+ Text [ finnish ] = "Tiedostoa $(FILE) ei voi luoda." ;
+ Text [ danish ] = "Det var ikke muligt at oprette filen $(FILE)." ;
+ Text [ french ] = "Le fichier $(FILE) n'a pas pu tre cr." ;
+ Text [ swedish ] = "Filen $(FILE) kunde inte skapas." ;
+ Text [ dutch ] = "Bestand $(FILE) kon niet worden gemaakt." ;
+ Text [ spanish ] = "No se pudo crear el archivo $(FILE)." ;
+ Text [ english_us ] = "The file $(FILE) could not be created." ;
+ Text[ chinese_simplified ] = "޷ļ $(FILE)";
+ Text[ russian ] = " $(FILE).";
+ Text[ polish ] = "Pliku $(FILE) nie mona byo utworzy.";
+ Text[ japanese ] = "̧$(FILE)͍쐬ł܂łB";
+ Text[ chinese_traditional ] = "Lk}ҷs$(FILE)C";
+ Text[ arabic ] = " $(FILE).";
+ Text[ dutch ] = "Bestand $(FILE) kon niet worden gemaakt.";
+ Text[ chinese_simplified ] = "޷ļ $(FILE)";
+ Text[ greek ] = " $(FILE).";
+ Text[ korean ] = " $(FILE) ʽϴ.";
+ Text[ turkish ] = "$(FILE) dosyas oluturulamad.";
+ Text[ language_user1 ] = " ";
+};
+
+String MSG_IOERR_SHARING
+{
+ Text = "Fehler beim gemeinsamen Zugriff auf die Datei $(FILE)." ;
+ Text [ English ] = "Sharing violation while accessing $(FILE)." ;
+ Text [ norwegian ] = "+++Sharing violation while accessing $(FILE)." ;
+ Text [ italian ] = "Violazione di condivisione durante l'accesso al $(FILE)." ;
+ Text [ portuguese_brazilian ] = "Violao de compartilhamento durante o acesso do $(FILE)." ;
+ Text [ portuguese ] = "Erro durante o acesso compartilhado ao ficheiro $(FILE)." ;
+ Text [ finnish ] = "Yhteiskyttvirhe tiedostossa $(FILE)." ;
+ Text [ danish ] = "Fejl under flles adgang til filen $(FILE)." ;
+ Text [ french ] = "Violation du partage pendant l'accs au $(FILE)." ;
+ Text [ swedish ] = "Fel vid gemensam tkomst till filen $(FILE)." ;
+ Text [ dutch ] = "Fout bij gelijktijdige toegang tot $(FILE)." ;
+ Text [ spanish ] = "Error durante el acceso compartido al archivo $(FILE)." ;
+ Text [ english_us ] = "Error by shared access to $(FILE)." ;
+ Text[ chinese_simplified ] = "ͬʱȡļ $(FILE) ʱ";
+ Text[ russian ] = " $(FILE).";
+ Text[ polish ] = "Brak wsplnego dostpu do pliku $(FILE).";
+ Text[ japanese ] = "̧$(FILE)ւ̋L̍ۂ̴װ";
+ Text[ chinese_traditional ] = "bPŪɮ$(FILE) ɵoͿ~C";
+ Text[ arabic ] = " $(FILE).";
+ Text[ dutch ] = "Fout bij gelijktijdige toegang tot $(FILE).";
+ Text[ chinese_simplified ] = "ͬʱȡļ $(FILE) ʱ";
+ Text[ greek ] = " $(FILE).";
+ Text[ korean ] = "$(FILE) ٿ .";
+ Text[ turkish ] = "$(FILE) dosyasna paylalan eriimde hata olutu.";
+ Text[ language_user1 ] = " ";
+};
+
+String MSG_IOERR_INVALID_PARAMETER
+{
+ Text = "" ;
+ Text [ English ] = "" ;
+ Text [ norwegian ] = "" ;
+ Text [ italian ] = "" ;
+ Text [ portuguese_brazilian ] = "" ;
+ Text [ portuguese ] = "" ;
+ Text [ finnish ] = "" ;
+ Text [ danish ] = "" ;
+ Text [ french ] = "" ;
+ Text [ swedish ] = "" ;
+ Text [ dutch ] = "" ;
+ Text [ spanish ] = "" ;
+ Text [ english_us ] = "" ;
+};
+
+String MSG_IOERR_GENERAL
+{
+ Text = "Allgemeiner Ein-/Ausgabefehler beim Zugriff auf $(FILE)." ;
+ Text [ English ] = "General I/O Error accessing $(FILE)." ;
+ Text [ norwegian ] = "" ;
+ Text [ italian ] = "Errore generale di I/O nell'accesso a $(FILE)." ;
+ Text [ portuguese_brazilian ] = "Allgemeiner Ein-/Ausgabefehler beim Zugriff auf $(FILE)." ;
+ Text [ french ] = "Erreur d'entre/sortie gnrale lors de l'accs au fichier $(FILE)." ;
+ Text [ swedish ] = "Allmnt input/outputfel vid tkomst av $(FILE)." ;
+ Text [ dutch ] = "Algemene in-/uitvoerfout bij toegang op $(FILE)." ;
+ Text [ spanish ] = "Error general de entrada/salida al acceder a $(FILE)." ;
+ Text [ english_us ] = "General I/O error accessing $(FILE)." ;
+ Text [ dutch ] = "Algemene in-/uitvoerfout bij toegang op $(FILE)." ;
+ Text [ italian ] = "Errore generale di I/O nell'accesso a $(FILE)." ;
+ Text [ french ] = "Erreur d'entre/sortie gnrale lors de l'accs au fichier $(FILE)." ;
+ Text [ danish ] = "Generel I/O fejl ved adgang til $(FILE)." ;
+ Text [ portuguese ] = "Erro geral de acesso/sada ao tentar entrar em $(FILE)." ;
+ Text[ chinese_simplified ] = "ڶȡ$(FILE)ʱһһ/";
+ Text[ russian ] = " $(FILE).";
+ Text[ polish ] = "Oglny bd dostpu We/Wy podczas dostpu do $(FILE).";
+ Text[ japanese ] = "$(FILE)ւ̱̍ۂ̈ʓII/OװB";
+ Text[ chinese_traditional ] = "bŪ$(FILE)ɵoͤ@Ӥ@몺J/X~C";
+ Text[ arabic ] = " $(FILE).";
+ Text[ dutch ] = "Algemene in-/uitvoerfout bij toegang op $(FILE).";
+ Text[ chinese_simplified ] = "ڶȡ$(FILE)ʱһһ/";
+ Text[ greek ] = " / $(FILE).";
+ Text[ korean ] = " $(FILE) Ϲ .";
+ Text[ turkish ] = "$(FILE) dosyasna eriimde genel girdi/kt hatas olutu..";
+ Text[ language_user1 ] = " ";
+};
+
+String RID_FULLSCREENTOOLBOX
+{
+ Text = "" ;
+ /*
+ Text = "Gesamtbild";
+ Text [ENGLISH] = "Full screen";
+ Text [norwegian] = "Fullt skjermbilde";
+ Text [italian] = "Schermo intero";
+ Text [portuguese_brazilian] = "Tela completa";
+ Text [portuguese] = "Ecr inteiro";
+ Text [finnish] = "Koko nytt";
+ Text [danish] = "Helskrm";
+ Text [french] = "Plein cran";
+ Text [swedish] = "Helskrm";
+ Text [dutch] = "Volledig scherm";
+ Text [spanish] = "Pantalla completa";
+ Text [english_us] = "Full screen";
+*/
+};
+
+ToolBox RID_FULLSCREENTOOLBOX
+{
+ HelpId = HID_FULLSCREENTOOLBOX ;
+ ButtonType = BUTTON_SYMBOL ;
+ LineSpacing = TRUE ;
+ Border = TRUE ;
+ Scroll = TRUE ;
+ SVLook = TRUE ;
+ Moveable = TRUE ;
+ Sizeable = TRUE ;
+ Closeable = TRUE ;
+ Zoomable = TRUE ;
+ Customize = TRUE ;
+ FloatingMode = TRUE ;
+ Hide = TRUE ;
+ _FloatingPosMapMode = MAP_APPFONT ;
+ _FloatingPosX = -50 ;
+ _FloatingPosY = -70 ;
+ FloatingLines = 1 ;
+ HideWhenDeactivate = TRUE ;
+ Align = BOXALIGN_TOP ;
+ ItemList =
+ {
+ ToolBoxItem
+ {
+ Identifier = SID_WIN_FULLSCREEN ;
+ };
+ };
+};
+
+String RID_RECORDINGTOOLBOX
+{
+ Text = "" ;
+ /*
+ Text = "Makro Aufzeichnung";
+ Text [ENGLISH] = "Macro Recorder";
+ Text [english_us] = "Macro Recorder";
+*/
+};
+
+ToolBox RID_RECORDINGTOOLBOX
+{
+ HelpId = HID_RECORDINGTOOLBOX ;
+ ButtonType = BUTTON_SYMBOL ;
+ LineSpacing = TRUE ;
+ Border = TRUE ;
+ Scroll = TRUE ;
+ SVLook = TRUE ;
+ Moveable = TRUE ;
+ Sizeable = TRUE ;
+ Closeable = FALSE ;
+ Zoomable = TRUE ;
+ Customize = FALSE ;
+ FloatingMode = TRUE ;
+ Hide = TRUE ;
+ _FloatingPosMapMode = MAP_APPFONT ;
+ _FloatingPosX = -50 ;
+ _FloatingPosY = -70 ;
+ FloatingLines = 1 ;
+ HideWhenDeactivate = TRUE ;
+ Align = BOXALIGN_TOP ;
+ ItemList =
+ {
+ ToolBoxItem
+ {
+ Identifier = SID_RECORDMACRO ;
+ };
+ };
+};
+
+String STR_EVENT_NEWMESSAGE
+{
+ Text = "Nachricht eingetroffen" ;
+ Text [ ENGLISH ] = "Message arrived" ;
+ Text [ english_us ] = "Message received" ;
+ Text [ portuguese_brazilian ] = "Nachricht eingetroffen" ;
+ Text [ swedish ] = "Meddelande har kommit" ;
+ Text [ danish ] = "Modtaget meddelelse" ;
+ Text [ italian ] = "Messaggio arrivato" ;
+ Text [ spanish ] = "Mensaje recibido" ;
+ Text [ french ] = "Message reu" ;
+ Text [ dutch ] = "Bericht ontvangen" ;
+ Text [ portuguese ] = "Mensagem recebida" ;
+ Text[ chinese_simplified ] = "µĵʼ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Nadesza wiadomo";
+ Text[ japanese ] = "үނ̎M";
+ Text[ chinese_traditional ] = "sqll";
+ Text[ arabic ] = " ";
+ Text[ dutch ] = "Bericht ontvangen";
+ Text[ chinese_simplified ] = "µĵʼ";
+ Text[ greek ] = " ";
+ Text[ korean ] = "޼ ŵǾϴ.";
+ Text[ turkish ] = "leti alnd";
+ Text[ language_user1 ] = " ";
+};
+
+String STR_EVENT_STARTAPP
+{
+ Text = "Programmstart" ;
+ Text [ ENGLISH ] = "Start Application" ;
+ Text [ norwegian ] = "Start Applikasjon" ;
+ Text [ italian ] = "Avvia applicazione" ;
+ Text [ portuguese_brazilian ] = "Incio Aplicativo" ;
+ Text [ portuguese ] = "Iniciar programa" ;
+ Text [ finnish ] = "Start Application" ;
+ Text [ danish ] = "Programstart" ;
+ Text [ french ] = "Lancer l'application" ;
+ Text [ swedish ] = "Programstart" ;
+ Text [ dutch ] = "Programma starten" ;
+ Text [ spanish ] = "Iniciar aplicacin" ;
+ Text [ ENGLISH_US ] = "Start Application" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Pocztek programu";
+ Text[ japanese ] = "۸т̊Jn";
+ Text[ chinese_traditional ] = "Ұʵ{";
+ Text[ arabic ] = " ";
+ Text[ dutch ] = "Programma starten";
+ Text[ chinese_simplified ] = "";
+ Text[ greek ] = " ";
+ Text[ korean ] = "α׷ ";
+ Text[ turkish ] = "Program altr";
+ Text[ language_user1 ] = " ";
+};
+
+String STR_EVENT_ONERROR
+{
+ Text = "Javascript-Laufzeitfehler" ;
+ Text [ ENGLISH ] = "Javascript runtime error" ;
+ Text [ english_us ] = "JavaScript runtime error" ;
+ Text [ portuguese_brazilian ] = "Programm- / Ausfhrungsfehler" ;
+ Text [ swedish ] = "Javascript runtime error" ;
+ Text [ danish ] = "JavaScript-runtimefejl" ;
+ Text [ italian ] = "Errore di runtime JavaScript" ;
+ Text [ spanish ] = "Error de ejecucin Javascript" ;
+ Text [ french ] = "Runtime error JavaScript" ;
+ Text [ dutch ] = "Javascript runtime error" ;
+ Text [ portuguese ] = "Erro na execuo de JavaScript" ;
+ Text[ chinese_simplified ] = "Javascript-ʱ";
+ Text[ russian ] = " Javascript";
+ Text[ polish ] = "Bd czasu przeb. w Javascript";
+ Text[ japanese ] = "JavaScript runtime װ\\̎";
+ Text[ chinese_traditional ] = "Javascript Bɶ~";
+ Text[ arabic ] = " JavaScript ";
+ Text[ dutch ] = "Javascript runtime error";
+ Text[ chinese_simplified ] = "Javascript-ʱ";
+ Text[ greek ] = " . JavaScript";
+ Text[ korean ] = "JavaScript Ÿ ";
+ Text[ turkish ] = "Javascript yrtm sresi hatas";
+ Text[ language_user1 ] = " ";
+};
+
+String STR_EVENT_CLOSEAPP
+{
+ Text = "Programmende" ;
+ Text [ ENGLISH ] = "Close Application" ;
+ Text [ norwegian ] = "Lukk Applikasjon" ;
+ Text [ italian ] = "Chiudi applicazione" ;
+ Text [ portuguese_brazilian ] = "Fechar Aplicativo" ;
+ Text [ portuguese ] = "Sair do programa" ;
+ Text [ finnish ] = "Close Application" ;
+ Text [ danish ] = "Luk programmet" ;
+ Text [ french ] = "Fermer l'application" ;
+ Text [ swedish ] = "Programslut" ;
+ Text [ dutch ] = "Programma beindigen" ;
+ Text [ spanish ] = "Cerrar aplicacin" ;
+ Text [ ENGLISH_US ] = "Close Application" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Koniec programu";
+ Text[ japanese ] = "۸яI";
+ Text[ chinese_traditional ] = "{";
+ Text[ arabic ] = " ";
+ Text[ dutch ] = "Programma beindigen";
+ Text[ chinese_simplified ] = "";
+ Text[ greek ] = " ";
+ Text[ korean ] = "α׷ ݱ";
+ Text[ turkish ] = "Programdan k";
+ Text[ language_user1 ] = " ";
+};
+
+String STR_EVENT_CREATEDOC
+{
+ Text = "Dokument erzeugen" ;
+ Text [ ENGLISH ] = "Create Document" ;
+ Text [ norwegian ] = "Lag Dokument" ;
+ Text [ italian ] = "Crea documento" ;
+ Text [ portuguese_brazilian ] = "Criar Documento" ;
+ Text [ portuguese ] = "Criar documento" ;
+ Text [ finnish ] = "Create Document" ;
+ Text [ danish ] = "Opret dokument" ;
+ Text [ french ] = "Crer le document" ;
+ Text [ swedish ] = "Skapa dokument" ;
+ Text [ dutch ] = "Document maken" ;
+ Text [ spanish ] = "Crear documento" ;
+ Text [ ENGLISH_US ] = "Create Document" ;
+ Text[ chinese_simplified ] = "ĵ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Utwrz dokument";
+ Text[ japanese ] = "޷Ă̍쐬";
+ Text[ chinese_traditional ] = "إߤ";
+ Text[ arabic ] = " ";
+ Text[ dutch ] = "Document maken";
+ Text[ chinese_simplified ] = "ĵ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ";
+ Text[ turkish ] = "Belge olutur";
+ Text[ language_user1 ] = " ";
+};
+
+String STR_EVENT_CLOSEDOC
+{
+ Text = "Dokument wird geschlossen" ;
+ Text [ ENGLISH ] = "Document closes" ;
+ Text [ ENGLISH_US ] = "Close Document" ;
+ Text [ portuguese_brazilian ] = "Close Document" ;
+ Text [ swedish ] = "Dokumentet stngs" ;
+ Text [ danish ] = "Programmet lukkes" ;
+ Text [ italian ] = "Il documento viene chiuso" ;
+ Text [ spanish ] = "El documento se va a cerrar" ;
+ Text [ french ] = "Le document va tre ferm" ;
+ Text [ dutch ] = "Document sluiten" ;
+ Text [ portuguese ] = "Fechar documento" ;
+ Text[ chinese_simplified ] = "ڹرĵ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Zamknij dokument";
+ Text[ japanese ] = "޷Â鎞";
+ Text[ chinese_traditional ] = "{b";
+ Text[ arabic ] = " ";
+ Text[ dutch ] = "Document sluiten";
+ Text[ chinese_simplified ] = "ڹرĵ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ݱ";
+ Text[ turkish ] = "Belgeyi kapat";
+ Text[ language_user1 ] = " ";
+};
+
+String STR_EVENT_PREPARECLOSEDOC
+{
+ Text = "Dokument schlieen" ;
+ Text [ ENGLISH ] = "Close Document" ;
+ Text [ norwegian ] = "Close Document" ;
+ Text [ italian ] = "Chiudi documento" ;
+ Text [ portuguese_brazilian ] = "Close Document" ;
+ Text [ portuguese ] = "Fechar documento" ;
+ Text [ french ] = "Fermer le document" ;
+ Text [ dutch ] = "Document sluiten" ;
+ Text [ spanish ] = "Cerrar documento" ;
+ Text [ danish ] = "Luk dokument" ;
+ Text [ swedish ] = "Stng dokument" ;
+ Text [ finnish ] = "Close Document" ;
+ Text [ ENGLISH_US ] = "Close Document" ;
+ Text[ chinese_simplified ] = "رĵ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Zamknij dokument";
+ Text[ japanese ] = "޷Â";
+ Text[ chinese_traditional ] = "";
+ Text[ arabic ] = " ";
+ Text[ dutch ] = "Document sluiten";
+ Text[ chinese_simplified ] = "رĵ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ݱ";
+ Text[ turkish ] = "Belgeyi kapat";
+ Text[ language_user1 ] = " ";
+};
+
+String STR_EVENT_OPENDOC
+{
+ Text = "Dokument ffnen" ;
+ Text [ ENGLISH ] = "Open Document" ;
+ Text [ norwegian ] = "pne Dokument" ;
+ Text [ italian ] = "Apri documento" ;
+ Text [ portuguese_brazilian ] = "Abrir Documento" ;
+ Text [ portuguese ] = "Abrir documento" ;
+ Text [ finnish ] = "Open Document" ;
+ Text [ danish ] = "bn dokument" ;
+ Text [ french ] = "Ouvrir un document" ;
+ Text [ swedish ] = "ppna dokument" ;
+ Text [ dutch ] = "Document openen" ;
+ Text [ spanish ] = "Abrir documento" ;
+ Text [ ENGLISH_US ] = "Open Document" ;
+ Text[ chinese_simplified ] = "ĵ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Otwrz dokument";
+ Text[ japanese ] = "޷ĂJ";
+ Text[ chinese_traditional ] = "}Ҥ";
+ Text[ arabic ] = " ";
+ Text[ dutch ] = "Document openen";
+ Text[ chinese_simplified ] = "ĵ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ";
+ Text[ turkish ] = "Belge a";
+ Text[ language_user1 ] = " ";
+};
+
+String STR_EVENT_SAVEDOC
+{
+ Text = "Dokument sichern" ;
+ Text [ ENGLISH ] = "Save Document" ;
+ Text [ norwegian ] = "Save Document" ;
+ Text [ italian ] = "Salva documento" ;
+ Text [ portuguese_brazilian ] = "Save Document" ;
+ Text [ portuguese ] = "Guardar documento" ;
+ Text [ french ] = "Sauvegarder le document" ;
+ Text [ dutch ] = "Document opslaan" ;
+ Text [ spanish ] = "Guardar documento" ;
+ Text [ danish ] = "Gem dokument" ;
+ Text [ swedish ] = "Spara dokument" ;
+ Text [ finnish ] = "Save Document" ;
+ Text [ ENGLISH_US ] = "Save Document" ;
+ Text[ chinese_simplified ] = "ĵ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Zapisz dokument";
+ Text[ japanese ] = "޷Ă̕ۑ";
+ Text[ chinese_traditional ] = "Os";
+ Text[ arabic ] = " ";
+ Text[ dutch ] = "Document opslaan";
+ Text[ chinese_simplified ] = "ĵ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ";
+ Text[ turkish ] = "Belgeyi kaydet";
+ Text[ language_user1 ] = " ";
+};
+
+String STR_EVENT_SAVEASDOC
+{
+ Text = "Dokument sichern als" ;
+ Text [ ENGLISH ] = "Save Document As" ;
+ Text [ norwegian ] = "Save Document As" ;
+ Text [ italian ] = "Salva documento con nome" ;
+ Text [ portuguese_brazilian ] = "Save Document As" ;
+ Text [ portuguese ] = "Guardar como" ;
+ Text [ french ] = "Sauvegarder le document sous" ;
+ Text [ dutch ] = "Document opslaan als" ;
+ Text [ spanish ] = "Guardar documento como" ;
+ Text [ danish ] = "Gem dokument som" ;
+ Text [ swedish ] = "Spara dokument som" ;
+ Text [ finnish ] = "Save Document As" ;
+ Text [ ENGLISH_US ] = "Save Document As" ;
+ Text[ chinese_simplified ] = "ĵΪ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Zapisz dokument jako";
+ Text[ japanese ] = "޷ĂɖOtĕۑ鎞";
+ Text[ chinese_traditional ] = "ts";
+ Text[ arabic ] = " ";
+ Text[ dutch ] = "Document opslaan als";
+ Text[ chinese_simplified ] = "ĵΪ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ٸ̸ ";
+ Text[ turkish ] = "Belgeyi farkl kaydet";
+ Text[ language_user1 ] = " ";
+};
+
+String STR_EVENT_SAVEDOCDONE
+{
+ Text = "Dokument wurde gesichert" ;
+ Text [ ENGLISH ] = "Document was saved" ;
+ Text [ ENGLISH_US ] = "Document has been saved" ;
+ Text[ portuguese ] = "O documento foi guardado";
+ Text[ russian ] = " ";
+ Text[ greek ] = " ";
+ Text[ dutch ] = "Document is opgeslagen";
+ Text[ french ] = "Le document a bien t enregistr";
+ Text[ spanish ] = "El documento se guard";
+ Text[ italian ] = "Il documento stato salvato";
+ Text[ danish ] = "Dokumentet er blevet gemt";
+ Text[ swedish ] = "Dokument har sparats";
+ Text[ polish ] = "Dokument zapisany";
+ Text[ portuguese_brazilian ] = "Document was saved";
+ Text[ japanese ] = "޷Ăۑꂽ";
+ Text[ korean ] = " Ǿϴ.";
+ Text[ chinese_simplified ] = "ĵѾ";
+ Text[ chinese_traditional ] = "wgxs";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "Belge kaydedildi";
+ Text[ language_user1 ] = " ";
+};
+
+String STR_EVENT_SAVEASDOCDONE
+{
+ Text = "Dokument wurde gesichert als" ;
+ Text [ ENGLISH ] = "Document was saved as" ;
+ Text [ ENGLISH_US ] = "Document has been saved as" ;
+ Text[ portuguese ] = "O documento foi guardado como";
+ Text[ russian ] = " ";
+ Text[ greek ] = " ";
+ Text[ dutch ] = "Document is opgeslagen als";
+ Text[ french ] = "Le document a t enregistr en tant que";
+ Text[ spanish ] = "El documento se guard como";
+ Text[ italian ] = "Il documento stato salvato con il nome";
+ Text[ danish ] = "Dokumentet er blevet gemt som";
+ Text[ swedish ] = "Dokument har sparats som";
+ Text[ polish ] = "Dokument zapisany jako";
+ Text[ portuguese_brazilian ] = "Document was saved as";
+ Text[ japanese ] = "޷ĂɖOtĕۑ";
+ Text[ korean ] = " ̸ Ǿϴ";
+ Text[ chinese_simplified ] = "ĵѾΪ";
+ Text[ chinese_traditional ] = "wgxs";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "Belge farkl kaydedildi";
+ Text[ language_user1 ] = " ";
+};
+
+String STR_EVENT_ACTIVATEDOC
+{
+ Text = "Dokument aktivieren" ;
+ Text [ ENGLISH ] = "Activate Document" ;
+ Text [ norwegian ] = "Activate Document" ;
+ Text [ italian ] = "Attiva documento" ;
+ Text [ portuguese_brazilian ] = "Activate Document" ;
+ Text [ portuguese ] = "Activar documento" ;
+ Text [ french ] = "Activer document" ;
+ Text [ dutch ] = "Document activeren" ;
+ Text [ spanish ] = "Activar documento" ;
+ Text [ danish ] = "Aktiver dokument" ;
+ Text [ swedish ] = "Aktivera dokument" ;
+ Text [ finnish ] = "Activate Document" ;
+ Text [ ENGLISH_US ] = "Activate Document" ;
+ Text[ chinese_simplified ] = "ĵ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Uaktywnij dokument";
+ Text[ japanese ] = "޷Ăèނɂ";
+ Text[ chinese_traditional ] = "E";
+ Text[ arabic ] = " ";
+ Text[ dutch ] = "Document activeren";
+ Text[ chinese_simplified ] = "ĵ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " Ȱȭ";
+ Text[ turkish ] = "Belgeyi etkinletir";
+ Text[ language_user1 ] = " ";
+};
+
+String STR_EVENT_DEACTIVATEDOC
+{
+ Text = "Dokument deaktivieren" ;
+ Text [ ENGLISH ] = "Deactivate Document" ;
+ Text [ norwegian ] = "Deactivate Document" ;
+ Text [ italian ] = "Disattiva documento" ;
+ Text [ portuguese_brazilian ] = "Deactivate Document" ;
+ Text [ portuguese ] = "Desactivar documento" ;
+ Text [ french ] = "Dsactiver le document" ;
+ Text [ dutch ] = "Document deactiveren" ;
+ Text [ spanish ] = "Desactivar documento" ;
+ Text [ danish ] = "Deaktiver dokument" ;
+ Text [ swedish ] = "Deaktivera dokument" ;
+ Text [ finnish ] = "Deactivate Document" ;
+ Text [ ENGLISH_US ] = "Deactivate Document" ;
+ Text[ chinese_simplified ] = "ʧĵ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Dezaktywuj dokument";
+ Text[ japanese ] = "޷Ăèނɂ";
+ Text[ chinese_traditional ] = "";
+ Text[ arabic ] = " ";
+ Text[ dutch ] = "Document deactiveren";
+ Text[ chinese_simplified ] = "ʧĵ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " Ȱȭ";
+ Text[ turkish ] = "Belgeyi devreden kart";
+ Text[ language_user1 ] = " ";
+};
+
+String STR_EVENT_PRINTDOC
+{
+ Text = "Dokument drucken" ;
+ Text [ ENGLISH ] = "Print Document" ;
+ Text [ english_us ] = "Print Document" ;
+ Text [ italian ] = "Stampa documento" ;
+ Text [ spanish ] = "Imprimir documento" ;
+ Text [ french ] = "Imprimer le document" ;
+ Text [ dutch ] = "Document afdrukken" ;
+ Text [ swedish ] = "Skriv ut dokument" ;
+ Text [ danish ] = "Udskriv dokument" ;
+ Text [ portuguese_brazilian ] = "Dokument drucken" ;
+ Text [ portuguese ] = "Imprimir documento" ;
+ Text[ chinese_simplified ] = "ӡĵ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Drukuj dokument";
+ Text[ japanese ] = "޷Ă̈";
+ Text[ chinese_traditional ] = "CL";
+ Text[ arabic ] = " ";
+ Text[ dutch ] = "Document afdrukken";
+ Text[ chinese_simplified ] = "ӡĵ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " μ";
+ Text[ turkish ] = "Belgeyi yazdr";
+ Text[ language_user1 ] = " ";
+};
+
+
+String STR_ERR_NOTEMPLATE
+{
+ Text = "Die Vorlage hat ein falsches Format" ;
+ Text [ ENGLISH ] = "Chosen template has wrong format" ;
+ Text [ dutch ] = "De geselecteerde sjabloon heeft een verkeerd formaat" ;
+ Text [ english_us ] = "The selected template has an incorrect format" ;
+ Text [ italian ] = "Il modello ha un formato errato" ;
+ Text [ spanish ] = "La plantilla tiene un formato incorrecto" ;
+ Text [ french ] = "Le format du modle est incorrect" ;
+ Text [ swedish ] = "Mallen har ett felaktigt format" ;
+ Text [ danish ] = "Skabelonen har et forkert format" ;
+ Text [ portuguese_brazilian ] = "Die Vorlage hat ein falsches Format" ;
+ Text [ portuguese ] = "O modelo seleccionado tem um formato errado" ;
+ Text[ chinese_simplified ] = "ʽʽ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Szablon ma nieprawidowy format";
+ Text[ japanese ] = "ڰĂ͏܂";
+ Text[ chinese_traditional ] = "˦榡~C";
+ Text[ arabic ] = " ";
+ Text[ dutch ] = "De geselecteerde sjabloon heeft een verkeerd formaat";
+ Text[ chinese_simplified ] = "ʽʽ";
+ Text[ greek ] = " ";
+ Text[ korean ] = "õ øƮ ߸ ֽϴ.";
+ Text[ turkish ] = "Seilen ablonun format yanl";
+ Text[ language_user1 ] = " ";
+};
+
+String STR_ERR_NOFILE
+{
+ Text = "Die Datei $ kann nicht geffnet werden." ;
+ Text [ ENGLISH ] = "Can't open file $." ;
+ Text [ dutch ] = "Het bestand $ kan niet worden geopend." ;
+ Text [ english_us ] = "Can't open file $." ;
+ Text [ italian ] = "Non possibile aprire il file $." ;
+ Text [ spanish ] = "El archivo $ no se puede abrir." ;
+ Text [ french ] = "Impossible d'ouvrir le fichier $ ." ;
+ Text [ swedish ] = "Filen $ kan inte ppnas." ;
+ Text [ danish ] = "Det er ikke muligt at bne filen $." ;
+ Text [ portuguese_brazilian ] = "Die Datei $ kann nicht geffnet werden." ;
+ Text [ portuguese ] = "Foi impossvel abrir o ficheiro $." ;
+ Text[ chinese_simplified ] = "޷ļ $ ";
+ Text[ russian ] = " $ .";
+ Text[ polish ] = "Plik $ nie moe zosta otworzony.";
+ Text[ japanese ] = "̧$͊JƂł܂B";
+ Text[ chinese_traditional ] = "Lk}ɮ $ C";
+ Text[ arabic ] = " $.";
+ Text[ dutch ] = "Het bestand $ kan niet worden geopend.";
+ Text[ chinese_simplified ] = "޷ļ $ ";
+ Text[ greek ] = " $.";
+ Text[ korean ] = " $ ϴ.";
+ Text[ turkish ] = "$ dosyas alamyor.";
+ Text[ language_user1 ] = " ";
+};
+
+
+String STR_QUITAPP
+{
+ Text = "~Beenden" ;
+ Text [ ENGLISH ] = "E~xit" ;
+ Text [ english_us ] = "E~xit" ;
+ Text [ italian ] = "~Esci" ;
+ Text [ spanish ] = "~Terminar" ;
+ Text [ french ] = "~Quitter" ;
+ Text [ dutch ] = "~Beindigen" ;
+ Text [ swedish ] = "A~vsluta" ;
+ Text [ danish ] = "Afslut" ;
+ Text [ portuguese_brazilian ] = "~Beenden" ;
+ Text [ portuguese ] = "~Sair" ;
+ Text[ chinese_simplified ] = "(~X)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Za~kocz";
+ Text[ japanese ] = "I(~X)";
+ Text[ chinese_traditional ] = "(~X)";
+ Text[ arabic ] = "";
+ Text[ dutch ] = "~Beindigen";
+ Text[ chinese_simplified ] = "(~X)";
+ Text[ greek ] = "";
+ Text[ korean ] = "(~X)";
+ Text[ turkish ] = "~k";
+ Text[ language_user1 ] = " ";
+};
+
+String STR_EXITANDRETURN
+{
+ Text = "~Beenden & zurck zu " ;
+ Text [ ENGLISH ] = "E~xit & return to " ;
+ Text [ dutch ] = "~Beindigen & terug naar " ;
+ Text [ english_us ] = "E~xit & return to " ;
+ Text [ italian ] = "~Esci e ritorna a " ;
+ Text [ spanish ] = "~Terminar y regresar a " ;
+ Text [ french ] = "~Quitter & retourner " ;
+ Text [ swedish ] = "~Avsluta och tillbaka till " ;
+ Text [ danish ] = "Afslut og g tilbage til " ;
+ Text [ portuguese_brazilian ] = "~Beenden & zurck zu " ;
+ Text [ portuguese ] = "~Sair & Regressar a " ;
+ Text[ chinese_simplified ] = "ͷ(~X)";
+ Text[ russian ] = " & ";
+ Text[ polish ] = "Zakocz & Powr do ";
+ Text[ japanese ] = "I&߂(~X)";
+ Text[ chinese_traditional ] = "M^(~X)";
+ Text[ arabic ] = " ";
+ Text[ dutch ] = "~Beindigen & terug naar ";
+ Text[ chinese_simplified ] = "ͷ(~X)";
+ Text[ greek ] = "~ ";
+ Text[ korean ] = " & ư (~X)";
+ Text[ turkish ] = "~k ve dn: ";
+ Text[ language_user1 ] = " ";
+};
+
+String STR_EXTHELPSTATUS
+{
+ Text = "Whlen Sie einen Befehl oder klicken Sie, um ein Thema auszuwhlen." ;
+ Text [ English ] = "Select a command or click for a overview." ;
+ Text [ english_us ] = "Select a command or click to select a theme." ;
+ Text [ italian ] = "Scegliete un comando o cliccate per scegliere un argomento." ;
+ Text [ spanish ] = "Seleccione un comando o pulse para seleccionar un tema." ;
+ Text [ french ] = "Slectionnez une commande ou cliquez pour choisir une rubrique." ;
+ Text [ dutch ] = "Kies een optie of klik om een onderwerp te kiezen." ;
+ Text [ swedish ] = "Vlj ett kommando eller klicka fr att vlja ett tema." ;
+ Text [ danish ] = "Vlg en kommando eller klik for udvlge et emne." ;
+ Text [ portuguese_brazilian ] = "Whlen Sie einen Befehl oder klicken Sie, um ein Thema auszuwhlen." ;
+ Text [ portuguese ] = "Seleccione um comando ou clique para escolher um tema." ;
+ Text[ chinese_simplified ] = "ѡ߰һѡһ⡣";
+ Text[ russian ] = " .";
+ Text[ polish ] = "Wybierz polecenie lub kliknij, by wybra temat.";
+ Text[ japanese ] = "ނIԂ ܂ðςI邽߂ɸدĉB";
+ Text[ chinese_traditional ] = "бzܩΪ̫@өROMܤ@ӥDDC";
+ Text[ arabic ] = " ѡ ѡ .";
+ Text[ dutch ] = "Kies een optie of klik om een onderwerp te kiezen.";
+ Text[ chinese_simplified ] = "ѡ߰һѡһ⡣";
+ Text[ greek ] = " .";
+ Text[ korean ] = "ɾ ϰų õ ŬϽʽÿ.";
+ Text[ turkish ] = "Bir komut sein ya da bir konu semek iin tklayn.";
+ Text[ language_user1 ] = " ";
+};
+
+String STR_MAIL
+{
+ Text = "Post" ;
+ Text [ English ] = "Mail" ;
+ Text [ norwegian ] = "Mail" ;
+ Text [ italian ] = "Posta" ;
+ Text [ portuguese_brazilian ] = "Correio" ;
+ Text [ portuguese ] = "Correio" ;
+ Text [ finnish ] = "Shkposti" ;
+ Text [ danish ] = "Post" ;
+ Text [ french ] = "Courrier" ;
+ Text [ swedish ] = "Post" ;
+ Text [ dutch ] = "Post" ;
+ Text [ spanish ] = "Correo" ;
+ Text [ english_us ] = "Mail" ;
+ Text[ chinese_simplified ] = "ʼ";
+ Text[ russian ] = "";
+ Text[ polish ] = "Poczta";
+ Text[ japanese ] = "Ұ";
+ Text[ chinese_traditional ] = "qll";
+ Text[ arabic ] = "";
+ Text[ dutch ] = "Post";
+ Text[ chinese_simplified ] = "ʼ";
+ Text[ greek ] = "";
+ Text[ korean ] = "ڿ";
+ Text[ turkish ] = "Posta";
+ Text[ language_user1 ] = " ";
+};
+
+String STR_ADDRESS_NAME
+{
+ TEXT = "Adressen" ;
+ Text [ English ] = "Address" ;
+ Text [ english_us ] = "Addresses" ;
+ Text [ dutch ] = "Adressen" ;
+ Text [ italian ] = "Indirizzi" ;
+ Text [ spanish ] = "Direcciones" ;
+ Text [ french ] = "Adresses" ;
+ Text [ swedish ] = "Adresser" ;
+ Text [ danish ] = "Adresser" ;
+ Text [ portuguese_brazilian ] = "Adressen" ;
+ Text [ portuguese ] = "Endereos" ;
+ Text[ chinese_simplified ] = "ַ";
+ Text[ russian ] = "";
+ Text[ polish ] = "Adresy";
+ Text[ japanese ] = "ڽ";
+ Text[ chinese_traditional ] = "a}";
+ Text[ arabic ] = "";
+ Text[ dutch ] = "Adressen";
+ Text[ chinese_simplified ] = "ַ";
+ Text[ greek ] = "";
+ Text[ korean ] = "ּ";
+ Text[ turkish ] = "Adres";
+ Text[ language_user1 ] = " ";
+};
+
+String RID_STR_HELP
+{
+ TEXT = "Hilfe" ;
+ TEXT [ english ] = "help" ;
+ Text [ portuguese ] = "Ajuda" ;
+ Text [ english_us ] = "Help" ;
+ Text [ portuguese_brazilian ] = "Hilfe" ;
+ Text [ swedish ] = "Hjlp" ;
+ Text [ danish ] = "Hjlp" ;
+ Text [ italian ] = "Guida" ;
+ Text [ spanish ] = "Ayuda" ;
+ Text [ french ] = "Aide" ;
+ Text [ dutch ] = "Help" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "Pomoc";
+ Text[ japanese ] = "";
+ Text[ chinese_traditional ] = "";
+ Text[ arabic ] = "";
+ Text[ dutch ] = "Help";
+ Text[ chinese_simplified ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "Yardm";
+ Text[ language_user1 ] = " ";
+};
+
+String RID_STR_NOAUTOSTARTHELPAGENT
+{
+ TEXT = "Bei 'XX' nicht automatisch starten" ;
+ TEXT [ English ] = "Bei 'XX' nicht automatisch starten" ;
+ Text [ english_us ] = "No automatic start at 'XX'" ;
+ Text [ portuguese_brazilian ] = "Bei ''XX'' nicht automatisch starten" ;
+ Text [ swedish ] = "Ingen automatisk start vid 'XX'" ;
+ Text [ danish ] = "Start ikke automatisk ved ''XX''" ;
+ Text [ italian ] = "Non avviare automaticamente con 'XX'" ;
+ Text [ spanish ] = "No iniciar automticamente con 'XX'" ;
+ Text [ french ] = "Ne pas lancer automatiquement pour la fonction 'XX'" ;
+ Text [ dutch ] = "Bij 'XX' niet automatisch starten" ;
+ Text [ portuguese ] = "No iniciar 'XX' automaticamente." ;
+ Text[ chinese_simplified ] = " 'XX' ʱԶС";
+ Text[ russian ] = " 'XX'";
+ Text[ polish ] = "Przy 'XX' nie startuj automatycznie";
+ Text[ japanese ] = "'XX'ŎIɊJnȂB";
+ Text[ chinese_traditional ] = "b 'XX' ɤ۰ʹBC";
+ Text[ arabic ] = " 'XX'";
+ Text[ dutch ] = "Bij 'XX' niet automatisch starten";
+ Text[ chinese_simplified ] = " 'XX' ʱԶС";
+ Text[ greek ] = " 'XX'";
+ Text[ korean ] = "'XX' ڵ ȵ˴ϴ.";
+ Text[ turkish ] = "'XX' olduunda otomatik balatma yaplmasn";
+ Text[ language_user1 ] = " ";
+};
+
+String RID_STR_NOWELCOMESCREEN
+{
+ TEXT = "Tipps nicht mehr anzeigen" ;
+ TEXT [ English ] = "Tips nicht mehr anzeigen" ;
+ Text [ english_us ] = "Don't display tips" ;
+ Text [ portuguese_brazilian ] = "Tips nicht mehr anzeigen" ;
+ Text [ swedish ] = "Visa inte tips mer" ;
+ Text [ danish ] = "Vis ikke flere tip" ;
+ Text [ italian ] = "Non mostrare pi i suggerimenti" ;
+ Text [ spanish ] = "No mostrar ms las sugerencias" ;
+ Text [ french ] = "Ne plus afficher les astuces" ;
+ Text [ dutch ] = "Tips niet meer weergeven" ;
+ Text [ portuguese ] = "No mostrar sugestes" ;
+ Text[ chinese_simplified ] = "ʾʾ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Nie wywietlaj porad";
+ Text[ japanese ] = "Ă\\Ȃ";
+ Text[ chinese_traditional ] = "nAܴ";
+ Text[ arabic ] = " ";
+ Text[ dutch ] = "Tips niet meer weergeven";
+ Text[ chinese_simplified ] = "ʾʾ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ǥ ";
+ Text[ turkish ] = "neri grntleme";
+ Text[ language_user1 ] = " ";
+};
+
+String RID_HELPBAR
+{
+ TEXT = "Hilfe-Leiste" ;
+ TEXT [ English ] = "Hilfe-Leiste" ;
+ Text [ portuguese ] = "Barra da Ajuda" ;
+ Text [ english_us ] = "Help Bar" ;
+ Text [ portuguese_brazilian ] = "Hilfe-Leiste" ;
+ Text [ swedish ] = "Hjlplist" ;
+ Text [ danish ] = "Hjlp-linje" ;
+ Text [ italian ] = "Barra della Guida" ;
+ Text [ spanish ] = "Barra de ayuda" ;
+ Text [ french ] = "Barre de l'aide" ;
+ Text [ dutch ] = "Helpbalk" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Pasek pomocy";
+ Text[ japanese ] = " ް";
+ Text[ chinese_traditional ] = "C";
+ Text[ arabic ] = " ";
+ Text[ dutch ] = "Helpbalk";
+ Text[ chinese_simplified ] = "";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ";
+ Text[ turkish ] = "Yardm ubuu";
+ Text[ language_user1 ] = " ";
+};
+
+ToolBox RID_HELPBAR
+{
+ HelpId = HID_HELPBAR ;
+ Hide = TRUE ;
+ ItemList =
+ {
+ ToolBoxItem
+ {
+ Identifier = SID_HELP_INDEX ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_HELP_HELPFILEBOX ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SEPARATOR ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_HELP_ZOOMOUT;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_HELP_ZOOMIN;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SEPARATOR ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_HELP_SEARCH ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_HELP_BOOKMARK ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_HELP_ANNOTATE ;
+ };
+ /*
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SEPARATOR ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_HELP_DOWNLOAD ;
+ };
+*/
+ };
+};
+
+String RID_STR_HLPFILENOTEXIST
+{
+ TEXT = "Es ist zu diesem Thema keine Hilfe installiert." ;
+ TEXT [ english ] = "Es ist zu diesem Thema keine Hilfe installiert." ;
+ Text [ english_us ] = "The help file for this topic is not installed." ;
+ Text [ portuguese_brazilian ] = "Die Hilfedatei 'XX' existiert nicht" ;
+ Text [ swedish ] = "Det finns ingen hjlp installerad fr detta mne." ;
+ Text [ danish ] = "Der er ikke installeret Hjlp til dette emne." ;
+ Text [ italian ] = "La Guida relativa a questo argomento non stata installata." ;
+ Text [ spanish ] = "El archivo de ayuda para este tema no ha sido instalado." ;
+ Text [ french ] = "Vous n'avez pas install l'aide correspondant ce sujet." ;
+ Text [ dutch ] = "Bij dit onderwerp werd geen Help genstalleerd." ;
+ Text [ portuguese ] = "O ficheiro de ajuda para este tpico no est instalado." ;
+ Text[ chinese_simplified ] = "ûаװйļ";
+ Text[ russian ] = " .";
+ Text[ polish ] = "Dla tego tematu nie zainstalowano pliku pomocy.";
+ Text[ japanese ] = "ðςɊւ߂ͲݽİقĂ܂B";
+ Text[ chinese_traditional ] = "SwoӥDDɮסC";
+ Text[ arabic ] = " .";
+ Text[ dutch ] = "Bij dit onderwerp werd geen Help genstalleerd.";
+ Text[ chinese_simplified ] = "ûаװйļ";
+ Text[ greek ] = " .";
+ Text[ korean ] = " ġ ʾҽϴ.";
+ Text[ turkish ] = "Bu konu ile ilgili yardm kurulmad.";
+ Text[ language_user1 ] = " ";
+};
+
+String RID_STR_HLPAPPNOTSTARTED
+{
+ TEXT = "Die Hilfeapplikation konnte nicht gestartet werden" ;
+ TEXT [ english ] = "The help application could not be started" ;
+ Text [ dutch ] = "De Help-applicatie kon niet worden opgestart" ;
+ Text [ english_us ] = "The help system could not be started" ;
+ Text [ italian ] = "Non stato possibile avviare l'applicazione ausiliaria" ;
+ Text [ spanish ] = "No se pudo iniciar la aplicacin de ayuda." ;
+ Text [ french ] = "Impossible de lancer l'application d'aide" ;
+ Text [ swedish ] = "Hjlptillmpningen kunde inte startas" ;
+ Text [ danish ] = "Det var ikke muligt at starte Hjlp-applikationen" ;
+ Text [ portuguese ] = "Foi impossvel iniciar o sistema de ajuda." ;
+ Text [ portuguese_brazilian ] = "Die Hilfeapplikation konnte nicht gestartet werden" ;
+ Text[ chinese_simplified ] = "޷Ӧó";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Systemu pomocy nie mona byo uruchomi";
+ Text[ japanese ] = "߱ع݂Jnł܂ł";
+ Text[ chinese_traditional ] = "LkҰʻε{C";
+ Text[ arabic ] = " ";
+ Text[ dutch ] = "De Help-applicatie kon niet worden opgestart";
+ Text[ chinese_simplified ] = "޷Ӧó";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ý ۵ ʾҽϴ.";
+ Text[ turkish ] = "Yardm uygulamas balatlamad";
+ Text[ language_user1 ] = " ";
+};
+
+ //----------------------------------------------------------------------------
+
+String RID_ENVTOOLBOX
+{
+ TEXT = "Funktionsleiste" ;
+ TEXT [ english ] = "Function bar" ;
+ Text [ dutch ] = "Werkbalk" ;
+ Text [ english_us ] = "Function Bar" ;
+ Text [ italian ] = "Barra delle funzioni" ;
+ Text [ spanish ] = "Barra de funciones" ;
+ Text [ french ] = "Barre de fonctions" ;
+ Text [ swedish ] = "Funktionslist" ;
+ Text [ danish ] = "Funktionslinje" ;
+ Text [ portuguese_brazilian ] = "Funktionsleiste" ;
+ Text [ portuguese ] = "Barra de funes" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Pasek funkcji";
+ Text[ japanese ] = "̧ݸ ް";
+ Text[ chinese_traditional ] = "uC";
+ Text[ arabic ] = " ";
+ Text[ dutch ] = "Werkbalk";
+ Text[ chinese_simplified ] = "";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ";
+ Text[ turkish ] = "lev ubuu";
+ Text[ language_user1 ] = " ";
+};
+
+ToolBox RID_ENVTOOLBOX
+{
+ HelpId = RID_ENVTOOLBOX ;
+ ButtonType = BUTTON_SYMBOL ;
+ LineSpacing = TRUE ;
+ Border = TRUE ;
+ Scroll = TRUE ;
+ SVLook = TRUE ;
+ Dockable = TRUE ;
+ Moveable = TRUE ;
+ Sizeable = TRUE ;
+ Closeable = TRUE ;
+ Zoomable = TRUE ;
+ Customize = TRUE ;
+ FloatingMode = FALSE ;
+ Hide = TRUE ;
+ HideWhenDeactivate = TRUE ;
+ Align = BOXALIGN_TOP ;
+ ItemList =
+ {
+ ToolBoxItem
+ {
+ Identifier = SID_TOPDOC ;
+ };
+/* ToolBoxItem
+ {
+ Identifier = SID_OPENURL ;
+ };*/
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SEPARATOR ;
+ };
+/* ToolBoxItem
+ {
+ Identifier = SID_BROWSE_BACKWARD ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_BROWSE_FORWARD ;
+ };*/
+ ToolBoxItem
+ {
+ Identifier = SID_BROWSE_STOP ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SEPARATOR ;
+ };
+/* ToolBoxItem
+ {
+ Identifier = SID_RELOAD ;
+ };*/
+ ToolBoxItem
+ {
+ Identifier = SID_EDITDOC ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SEPARATOR ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_NEWDOC ;
+ Hide = TRUE;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_OPENDOC ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_SAVEDOC ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_SAVEASDOC ;
+ Hide = TRUE;
+ };
+/* ToolBoxItem
+ {
+ Identifier = SID_MAIL_SEND ;
+ };*/
+ ToolBoxItem
+ {
+ Identifier = SID_PRINTDOCDIRECT ;
+ };
+ ToolBoxItem
+ {
+ Identifier = FN_FAX ;
+ Hide = TRUE;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SEPARATOR ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_CUT ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_COPY ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_PASTE ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SEPARATOR ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_UNDO ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_REDO ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SEPARATOR ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_NAVIGATOR ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_STYLE_DESIGNER ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_HYPERLINK_DIALOG ;
+ };
+/* ToolBoxItem
+ {
+ Identifier = SID_HELP_PI ;
+ };*/
+ ToolBoxItem
+ {
+ Identifier = SID_WIN_FULLSCREEN ;
+ Hide = TRUE;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SEPARATOR ;
+ };
+/* ToolBoxItem
+ {
+ Identifier = SID_INTERNET_ONLINE ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SEPARATOR ;
+ };*/
+ ToolBoxItem
+ {
+ Identifier = SID_CLOSEDOC;
+ Hide = TRUE;
+ };
+ };
+};
+
+ // Image-Listen ----------------------------------------------------------
+
+#define IMAGE_ID_LIST\
+ IdList = {\
+ SID_OPENURL;\
+ SID_BROWSE_BACKWARD;\
+ SID_BROWSE_FORWARD;\
+ SID_BROWSE_STOP;\
+ SID_BROWSE_HOME;\
+ SID_RELOAD;\
+ SID_EDITDOC;\
+ SID_SAVEDOC;\
+ SID_SAVEDOCTOBOOKMARK;\
+ SID_CREATELINK;\
+ SID_MAIL_SEND;\
+ SID_PRINTDOCDIRECT;\
+ SID_CUT;\
+ SID_COPY;\
+ SID_UNDO;\
+ SID_REDO;\
+ SID_EXPLORER;\
+ SID_BROWSER;\
+ SID_NAVIGATOR;\
+ SID_STYLE_DESIGNER;\
+ SID_AUTOMAIL;\
+ SID_AUTOBROWSE;\
+ SID_EXPLORER_CREATEFOLDER;\
+ SID_EXPLORER_CREATEBOOKMARK;\
+ SID_EXPLORER_CREATEWORKPLACE;\
+ SID_EXPLORER_CREATELINK;\
+ SID_EXPLORER_CREATEMAILINTRAY;\
+ SID_EXPLORER_CREATENEWSSERVER;\
+ SID_EXPLORER_CREATEFTPSERVER;\
+ SID_EXPLORER_CREATEDATABASE;\
+ SID_EXPLORER_CREATEGALLERY;\
+ SID_PROPERTIES;\
+ SID_EXPLORER_MAKEROOT;\
+ SID_EXPLORER_MAKEBMKDIR;\
+ SID_EXPLORER_PREVLEVEL;\
+ SID_EXPLORER_IMPORTBOOKMARKS;\
+ SID_EDIT_FRAMESET;\
+ SID_SPLIT_HORIZONTAL;\
+ SID_SPLIT_VERTICAL;\
+ SID_SPLIT_PARENT_HORIZONTAL;\
+ SID_SPLIT_PARENT_VERTICAL;\
+ SID_MODIFY_FRAME;\
+ SID_EXPLORER_SEARCHORIGINAL;\
+ SID_EXPLORER_DETAILS;\
+ SID_EXPLORER_ICONS;\
+ };\
+ IdCount = {\
+ 45;\
+ };
+
+#ifndef IMAGE_STDBTN_COLOR
+#define IMAGE_STDBTN_COLOR Color { Red = 0xC000; Green = 0xC000; Blue = 0xC000; }
+#endif
+
+ImageList RID_DEFAULTIMAGELIST_SC
+{
+ ImageBitmap = Bitmap { FILE = "sc_out.bmp" ; };
+ MaskColor = IMAGE_STDBTN_COLOR ;
+ IMAGE_ID_LIST
+};
+
+ImageList RID_DEFAULTIMAGELIST_LC
+{
+ ImageBitmap = Bitmap { FILE = "lc_out.bmp" ; };
+ MaskColor = IMAGE_STDBTN_COLOR ;
+ IMAGE_ID_LIST
+};
+
+String RID_SPECIALCONFIG_ERROR
+{
+ Text[ language_user1 ] = " "; \
+ Text = "In der Spezialkonfiguration wurde ein Fehler festgestellt.\nBitte wenden Sie sich an Ihren Administrator!" ;
+ Text [ English ] = "An error has occurred in the special configuration.\nPlease contact your administrator!" ;
+ Text [ portuguese ] = "Foi detectado um erro na configurao especial. Queira contactar o seu Administrador!" ;
+ Text [ english_us ] = "An error has occurred in the special configuration.\nPlease contact your administrator." ;
+ Text [ portuguese_brazilian ] = "In der Spezialkonfiguration wurde ein Fehler festgestellt. Bitte wenden Sie sich an Ihren Administrator!" ;
+ Text [ swedish ] = "Ett fel har upptckts i specialkonfigurationen.\nKontakta Din administratr!" ;
+ Text [ danish ] = "Der blev opdaget en fejl i specialkonfigurationen.\nHenvend dig venligst til din administrator!" ;
+ Text [ italian ] = "Nella configurazione speciale stato trovato un errore.\nRivolgetevi al vostro amministratore!" ;
+ Text [ spanish ] = "En la configuracin especial se ha detectado un error.\nPngase por favor en contacto con su administrador." ;
+ Text [ french ] = "Une erreur a t dtecte dans la configuration spciale.\nVeuillez consulter l'administrateur !" ;
+ Text [ dutch ] = "In de speciale configuratie is een fout opgetreden. Wendt u zich s.v.p. aan uw administrator!" ;
+ Text[ chinese_simplified ] = "һļڷһ\nĹԱϵ";
+ Text[ russian ] = " .\n, !";
+ Text[ polish ] = "W konfiguracji specjalnej stwierdzono bd.\nZwr si do swojego administratora!";
+ Text[ japanese ] = "ȐݒŴװ܂B\nƽڰɘAĂB";
+ Text[ chinese_traditional ] = "b@ӯStmɮפo{@ӿ~CЩM޲zpT";
+ Text[ arabic ] = " .\n !";
+ Text[ dutch ] = "In de speciale configuratie is een fout opgetreden. Wendt u zich s.v.p. aan uw administrator!";
+ Text[ chinese_simplified ] = "һļڷһ\nĹԱϵ";
+ Text[ greek ] = " .\n !";
+ Text[ korean ] = "Ư ߻Ǿϴ. ڿ Ͻñ ٶϴ !";
+ Text[ turkish ] = "zel konfigrasyonda bir hata bulundu.\nLtfen sistem yneticinize bavurun!";
+};
+
+
+String STR_MEMINFO_HEADER
+{
+ Text = "In der Applikation existieren derzeit $(TOTAL) Dokumente. Davon sind $(VISIBLE) Dokumente sichtbar. Im Memory Cache befinden sich $(CACHE) Dokumente.<BR><BR><b>Dokumente:</b><BR><table width=100%><tr><td >Sicht.</td><td>Cached</td><td>Exp.</td><td>Dirty</td><td>Exec</td><td>Forb</td><td>Dokumenttyp</td><td>URL</td><td>PreRedirect URL</td><td>Poststring</td></tr>" ;
+};
+
+String STR_MEMINFO_FOOTER
+{
+ Text = "</table>" ;
+};
+
+String STR_MEMINFO_OBJINFO
+{
+ Text = "<tr><td >$(VISIBLE)</td><td>$(CACHED)</td><td>$(EXPIRE)</td><td>$(JSDIRTY)</td><td>$(JSEXEC)</td><td>$(FORBID)</td><td>$(FACTORY)</td><td>$(URL)</td><td>$(ORIGURL)</td><td>$(POSTSTRING)</td></tr>" ;
+};
+
+String RID_PLUGIN
+{
+ Text = "PlugIn Aktivierung" ;
+ Text [ English ] = "PlugIn activation" ;
+ Text [ portuguese ] = "Activar PlugIn" ;
+ Text [ english_us ] = "Enable plug-ins" ;
+ Text [ portuguese_brazilian ] = "PlugIn Aktivierung" ;
+ Text [ swedish ] = "Aktivera PlugIn" ;
+ Text [ danish ] = "Aktiver PlugIns" ;
+ Text [ italian ] = "Attivazione PlugIn " ;
+ Text [ spanish ] = "Activar Plug-in" ;
+ Text [ french ] = "Activer Plug-In" ;
+ Text [ dutch ] = "PlugIn-activering" ;
+ Text[ chinese_simplified ] = " Plug-In";
+ Text[ russian ] = " Plug-In";
+ Text[ polish ] = "Wcz PlugIn";
+ Text[ japanese ] = "׸޲݂èނɂ";
+ Text[ chinese_traditional ] = "E Plug-In";
+ Text[ arabic ] = " Plug-In";
+ Text[ dutch ] = "PlugIn-activering";
+ Text[ chinese_simplified ] = " Plug-In";
+ Text[ greek ] = " PlugIn";
+ Text[ korean ] = "÷ ";
+ Text[ turkish ] = "Plug-In'leri etkinletir";
+ Text[ language_user1 ] = " ";
+};
+
+String STR_EDITOBJECT
+{
+ Text = "~Bearbeiten";
+ Text [ English ] = "~Edit";
+ Text [ English_us ] = "~Edit";
+ Text[ portuguese ] = "~Editar";
+ Text[ russian ] = "";
+ Text[ dutch ] = "~Bewerken";
+ Text[ french ] = "~diter";
+ Text[ spanish ] = "~Editar";
+ Text[ italian ] = "~Modifica";
+ Text[ danish ] = "Rediger";
+ Text[ swedish ] = "~Redigera";
+ Text[ polish ] = "~Edytuj";
+ Text[ portuguese_brazilian ] = "~Edit";
+ Text[ japanese ] = "ҏW(~E)";
+ Text[ chinese_simplified ] = "༭(~E)";
+ Text[ chinese_traditional ] = "s(~E)";
+ Text[ arabic ] = "";
+ Text[ dutch ] = "~Bewerken";
+ Text[ chinese_simplified ] = "༭(~E)";
+ Text[ greek ] = "~";
+ Text[ korean ] = "(~E)";
+ Text[ turkish ] = "~Dzenle";
+ Text[ language_user1 ] = " ";
+};
+
+String STR_OPENOBJECT
+{
+ Text = "~ffnen";
+ Text [ English ] = "~Open";
+ Text [ English_us ] = "~Open";
+ Text[ portuguese ] = "~Abrir";
+ Text[ russian ] = "";
+ Text[ dutch ] = "~Openen";
+ Text[ french ] = "~Ouvrir";
+ Text[ spanish ] = "~Abrir";
+ Text[ italian ] = "~Apri";
+ Text[ danish ] = "bn";
+ Text[ swedish ] = "~ppna";
+ Text[ polish ] = "Otwrz";
+ Text[ portuguese_brazilian ] = "~Open";
+ Text[ japanese ] = "J(~O)";
+ Text[ chinese_simplified ] = "(~O)";
+ Text[ chinese_traditional ] = "}ҷs(~O)";
+ Text[ arabic ] = "";
+ Text[ dutch ] = "~Openen";
+ Text[ chinese_simplified ] = "(~O)";
+ Text[ greek ] = "";
+ Text[ korean ] = "(~O)";
+ Text[ turkish ] = "~A";
+ Text[ language_user1 ] = " ";
+};
+
+String STR_CORRUPT_INSTALLATION
+{
+ Text = "Wichtige Programmteile konnten nicht korrekt initialisiert werden.\nBitte starten sie Setup mit der Option /repair.";
+ Text [ English ] = "Important program components could not be initialized correctly. Please start the setup program with the option /repair.";
+ Text [ English_us ] = "Important program components could not be initialized correctly.\nPlease start the setup program with the option /Repair.";
+ Text[ portuguese ] = "Foi impossvel iniciar a importao dos componentes do programa correctamente.\nInicie o programa de instalao (Setup) com a opo /repair.";
+ Text[ greek ] = " .\n /repair..";
+ Text[ dutch ] = "Belangrijke programmaonderdelen konden niet correct worden genitialiseerd.\nStart het setup programma met de optie /Repareren.";
+ Text[ french ] = "Certains composants importants du programme n'ont pas pu tre initialiss. Veuillez activer le programme d'installation (Setup) et y activer l'option de rparation (Repair).";
+ Text[ spanish ] = "Algunos componentes importantes del programa no se pudieron instalar.\nInicie por favor el programa de instalacin con la opcin /repair.";
+ Text[ swedish ] = "Viktiga programdelar kunde inte initialiseras korrekt.\nVar vnlig och starta setupen med alternativet /repair.";
+ Text[ russian ] = " .\n, , /repair.";
+ Text[ italian ] = "Impossibile inizializzare importanti componenti del programma.\nAvviate il setup con l'opzione /Riparazione.";
+ Text[ danish ] = "Det var ikke muligt at initialisere vigtige programdele korrekt.\nStart venligst installationsprogrammet (Setup) med alternativet / reparation.";
+ Text[ polish ] = "Wane czci programu nie mogy zosta prawidowo zainstalowane.\nProsz uruchomi program instalacyjny uywajc opcji / repair";
+ Text[ portuguese_brazilian ] = "Important program components could not be initialized correctly. Please start the setup program with the option /repair.";
+ Text[ japanese ] = "؂۸т̕ɏ܂łB\nı߂߼/CŊJnĉB";
+ Text[ korean ] = "α׷ ߿ κ ʱȭ ߽ϴ. \nɼ/ Setup Ͻʽÿ.";
+ Text[ chinese_simplified ] = "޷ȷʼҪij̲\nװִѡ޲";
+ Text[ chinese_traditional ] = "Lk̪lƭn{CбzҰʦw˵{A`ﶵC";
+ Text[ arabic ] = " .\n /repair.";
+ Text[ turkish ] = "nemli program eleri doru bir ekilde balatlamad.\nKurulumu /repair seenei ile balatn.";
+};
+
+String IDS_SBERR_STOREREF
+{
+ Text = "Referenz wird nicht gespeichert: ";
+ Text [ italian ] = "Il riferimento non viene salvato: ";
+ Text [ portuguese_brazilian ] = "reference will not be saved: ";
+ Text [ portuguese ] = "A referncia no ser guardada: ";
+ Text [ danish ] = "Referencen bliver ikke gemt: ";
+ Text [ french ] = "Impossible d'enregistrer la rfrence : ";
+ Text [ swedish ] = "Referens sparas inte: ";
+ Text [ dutch ] = "Verwijzing wordt niet opgeslagen: ";
+ Text [ spanish ] = "No se guardar la referencia: ";
+ Text [ english_us ] = "Reference will not be saved: ";
+ Text[ chinese_simplified ] = "ᱣ ";
+ Text[ language_user1 ] = " ";
+ Text[ russian ] = " : ";
+ Text[ polish ] = "Odwoanie nie zostao zapisane: ";
+ Text[ japanese ] = "QƂ͕ۑ܂: ";
+ Text[ chinese_traditional ] = "xsѷӡG ";
+ Text[ arabic ] = " :";
+ Text[ dutch ] = "Verwijzing wordt niet opgeslagen: ";
+ Text[ chinese_simplified ] = "ᱣ ";
+ Text[ greek ] = " : ";
+ Text[ korean ] = " Դϴ: ";
+ Text[ turkish ] = "Referans kaydedilmeyecek: ";
+};
+
+ // ********************************************************************** EOF
+
diff --git a/sfx2/source/appl/appbas.cxx b/sfx2/source/appl/appbas.cxx
new file mode 100644
index 000000000000..d429fb1d745f
--- /dev/null
+++ b/sfx2/source/appl/appbas.cxx
@@ -0,0 +1,1373 @@
+/*************************************************************************
+ *
+ * $RCSfile: appbas.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:26 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _COM_SUN_STAR_FRAME_XDESKTOP_HPP_
+#include <com/sun/star/frame/XDesktop.hpp>
+#endif
+#ifndef _UNOTOOLS_PROCESSFACTORY_HXX
+#include <unotools/processfactory.hxx>
+#endif
+#ifndef _COM_SUN_STAR_UNO_REFERENCE_H_
+#include <com/sun/star/uno/Reference.h>
+#endif
+
+#ifndef _BASRDLL_HXX //autogen
+#include <basic/basrdll.hxx>
+#endif
+#ifndef _URLOBJ_HXX
+#include <tools/urlobj.hxx>
+#endif
+#ifndef _SFXMACITEM_HXX //autogen
+#include <svtools/macitem.hxx>
+#endif
+#ifndef __SBX_SBX_FACTORY_HXX //autogen
+#include <svtools/sbxfac.hxx>
+#endif
+#ifndef _SBXCLASS_HXX //autogen
+#include <svtools/sbx.hxx>
+#endif
+#ifndef _SV_GRADIENT_HXX
+#include <vcl/gradient.hxx>
+#endif
+#ifndef _SFXRECTITEM_HXX //autogen
+#include <svtools/rectitem.hxx>
+#endif
+#ifndef _SFXINTITEM_HXX //autogen
+#include <svtools/intitem.hxx>
+#endif
+#ifndef _SFXENUMITEM_HXX //autogen
+#include <svtools/eitem.hxx>
+#endif
+#ifndef _SB_SBMOD_HXX //autogen
+#include <basic/sbmod.hxx>
+#endif
+#ifndef _SFX_WHITER_HXX //autogen
+#include <svtools/whiter.hxx>
+#endif
+#ifndef _SB_SBMETH_HXX //autogen
+#include <basic/sbmeth.hxx>
+#endif
+#ifndef _SB_SBSTAR_HXX //autogen
+#include <basic/sbstar.hxx>
+#endif
+#ifndef _SFXINIMGR_HXX //autogen
+#include <svtools/iniman.hxx>
+#endif
+#ifndef _SVSTOR_HXX //autogen
+#include <so3/svstor.hxx>
+#endif
+#ifndef _SV_WRKWIN_HXX
+#include <vcl/wrkwin.hxx>
+#endif
+#ifndef _MSGBOX_HXX //autogen
+#include <vcl/msgbox.hxx>
+#endif
+#ifndef _SVTDEMO_HXX //autogen
+#include <svtools/svtdemo.hxx>
+#endif
+#ifndef _REGCODE_HXX
+//#include <tools/regcode.hxx>
+#endif
+#ifndef _SB_SBUNO_HXX
+#include <basic/sbuno.hxx>
+#endif
+#ifndef _SFXECODE_HXX
+#include <svtools/sfxecode.hxx>
+#endif
+#ifndef _EHDL_HXX
+#include <svtools/ehdl.hxx>
+#endif
+
+#pragma hdrstop
+
+#include "appuno.hxx"
+#include "module.hxx"
+#include "arrdecl.hxx"
+#include "app.hxx"
+#include "sfxtypes.hxx"
+#include "sfxresid.hxx"
+#include "msg.hxx"
+#include "msgpool.hxx"
+#include "progress.hxx"
+#include "objsh.hxx"
+#include "objitem.hxx"
+#include "viewfrm.hxx"
+#include "viewsh.hxx"
+#include "dispatch.hxx"
+#include "tplpitem.hxx"
+#include "minfitem.hxx"
+#include "app.hrc"
+#include "saveopt.hxx"
+#include "evntconf.hxx"
+#include "macrconf.hxx"
+#include "request.hxx"
+#include "docinf.hxx"
+#include "dinfdlg.hxx"
+#include "appdata.hxx"
+#include "appbas.hxx"
+#include "sfxhelp.hxx"
+#include "stbmgr.hxx"
+#include "appimp.hxx"
+#include "basmgr.hxx"
+#include "helper.hxx"
+
+#define ITEMID_SEARCH SID_SEARCH_ITEM
+
+#include "srchitem.hxx"
+#ifndef _VOS_SOCKET_HXX_ //autogen
+#include <vos/socket.hxx>
+#endif
+
+#define SFX_TYPEMAP
+#define Selection
+#include "sfxslots.hxx"
+
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::frame;
+
+// #ifndef STR_VERSION_ID
+// #define STR_VERSION_ID 1
+// #endif
+// #ifndef STR_VERSION_TYPE
+// #define STR_VERSION_TYPE 1
+// #endif
+
+//=========================================================================
+/*ASDBG
+const SfxConstant __FAR_DATA aConstants[] =
+{
+ SFX_USHORT_CONSTANT( "AlignBottom", ALIGN_BOTTOM ),
+ SFX_USHORT_CONSTANT( "AlignTop", ALIGN_TOP ),
+ SFX_USHORT_CONSTANT( "CharSetANSI", CHARSET_ANSI ),
+ SFX_USHORT_CONSTANT( "CharSetDontKnow", CHARSET_DONTKNOW ),
+ SFX_USHORT_CONSTANT( "CharSetIBMPC437", CHARSET_IBMPC_437 ),
+ SFX_USHORT_CONSTANT( "CharSetIBMPC850", CHARSET_IBMPC_850 ),
+ SFX_USHORT_CONSTANT( "CharSetIBMPC860", CHARSET_IBMPC_860 ),
+ SFX_USHORT_CONSTANT( "CharSetIBMPC861", CHARSET_IBMPC_861 ),
+ SFX_USHORT_CONSTANT( "CharSetIBMPC863", CHARSET_IBMPC_863 ),
+ SFX_USHORT_CONSTANT( "CharSetIBMPC865", CHARSET_IBMPC_865 ),
+ SFX_USHORT_CONSTANT( "CharSetIBMPC", CHARSET_IBMPC ),
+ SFX_USHORT_CONSTANT( "CharSetMac", CHARSET_MAC ),
+ SFX_USHORT_CONSTANT( "CharSetSymbol", CHARSET_SYMBOL ),
+ SFX_USHORT_CONSTANT( "CharSetSystem", RTL_TEXTENCODING_UTF8 ),
+ SFX_USHORT_CONSTANT( "FamilyDecorative", FAMILY_DECORATIVE ),
+ SFX_USHORT_CONSTANT( "FamilyDontknow", FAMILY_DONTKNOW ),
+ SFX_USHORT_CONSTANT( "FamilyModern", FAMILY_MODERN ),
+ SFX_USHORT_CONSTANT( "FamilyRoman", FAMILY_ROMAN ),
+ SFX_USHORT_CONSTANT( "FamilyScript", FAMILY_SCRIPT ),
+ SFX_USHORT_CONSTANT( "FamilySwiss", FAMILY_SWISS ),
+ SFX_USHORT_CONSTANT( "FamilySystem", FAMILY_SYSTEM ),
+ SFX_USHORT_CONSTANT( "GradientAxial", GRADIENT_AXIAL ),
+ SFX_USHORT_CONSTANT( "GradientElliptical", GRADIENT_ELLIPTICAL ),
+ SFX_USHORT_CONSTANT( "GradientLinear", GRADIENT_LINEAR ),
+ SFX_USHORT_CONSTANT( "GradientRadial", GRADIENT_RADIAL ),
+ SFX_USHORT_CONSTANT( "GradientRect", GRADIENT_RECT ),
+ SFX_USHORT_CONSTANT( "GradientSquare", GRADIENT_SQUARE ),
+ SFX_USHORT_CONSTANT( "ItalicNone", ITALIC_NONE ),
+ SFX_USHORT_CONSTANT( "ItalicOblique", ITALIC_OBLIQUE ),
+ SFX_USHORT_CONSTANT( "StrikeThroughDouble", STRIKEOUT_DOUBLE ),
+ SFX_USHORT_CONSTANT( "StrikeThroughNone", STRIKEOUT_NONE ),
+ SFX_USHORT_CONSTANT( "StrikeThroughSingle", STRIKEOUT_SINGLE ),
+ SFX_USHORT_CONSTANT( "UnderlineDotted", UNDERLINE_DOTTED ),
+ SFX_USHORT_CONSTANT( "UnderlineDouble", UNDERLINE_DOUBLE ),
+ SFX_USHORT_CONSTANT( "UnderlineNone", UNDERLINE_NONE ),
+ SFX_USHORT_CONSTANT( "UnderlineSingle", UNDERLINE_SINGLE ),
+ SFX_USHORT_CONSTANT( "UnitFoot", FUNIT_FOOT ),
+ SFX_USHORT_CONSTANT( "UnitInch", FUNIT_INCH ),
+ SFX_USHORT_CONSTANT( "UnitMile", FUNIT_MILE ),
+ SFX_USHORT_CONSTANT( "UnitPercent", FUNIT_PERCENT ),
+ SFX_USHORT_CONSTANT( "UnitPoint", FUNIT_POINT ),
+ SFX_USHORT_CONSTANT( "UnitTwip", FUNIT_TWIP ),
+ SFX_USHORT_CONSTANT( "Unit_cm", FUNIT_CM ),
+ SFX_USHORT_CONSTANT( "Unit_m", FUNIT_M ),
+ SFX_USHORT_CONSTANT( "Unit_mm", FUNIT_MM ),
+ SFX_USHORT_CONSTANT( "WeightBlack", WEIGHT_BLACK ),
+ SFX_USHORT_CONSTANT( "WeightBold", WEIGHT_BOLD ),
+ SFX_USHORT_CONSTANT( "WeightDontKnow", WEIGHT_DONTKNOW ),
+ SFX_USHORT_CONSTANT( "WeightLight", WEIGHT_LIGHT ),
+ SFX_USHORT_CONSTANT( "WeightMedium", WEIGHT_MEDIUM ),
+ SFX_USHORT_CONSTANT( "WeightNormal", WEIGHT_NORMAL ),
+ SFX_USHORT_CONSTANT( "WeightSemibold", WEIGHT_SEMIBOLD ),
+ SFX_USHORT_CONSTANT( "WeightSemilight", WEIGHT_SEMILIGHT ),
+ SFX_USHORT_CONSTANT( "WeightThin", WEIGHT_THIN ),
+ SFX_USHORT_CONSTANT( "WeightUltrabold", WEIGHT_ULTRABOLD ),
+ SFX_USHORT_CONSTANT( "WeightUltralight", WEIGHT_ULTRALIGHT )
+};
+*/
+//========================================================================
+
+StarBASIC* SfxApplication::GetBasic_Impl() const
+{
+ return pImp->pBasicMgr ? pImp->pBasicMgr->GetLib(0) : NULL;
+}
+
+//------------------------------------------------------------------------
+String lcl_GetVersionString(ResMgr* pImpResMgr)
+{
+ ResId aVerId( RID_BUILDVERSION, pImpResMgr );
+ ResMgr *pResMgr = pImpResMgr->IsAvailable(
+ aVerId.SetRT( RSC_STRING ) )
+ ? pImpResMgr
+ : 0;
+ aVerId.SetResMgr( pResMgr );
+ if ( !Resource::GetResManager()->IsAvailable( aVerId ) )
+ DBG_ERROR( "No RID_BUILD_VERSION in label-resource-dll" );
+ String aVersion( aVerId );
+ aVersion.Erase( 0, aVersion.Search( ':' ) + 1 );
+ aVersion.Erase( aVersion.Search( ')' ) );
+ return aVersion;
+}
+
+//------------------------------------------------------------------------
+/*(mba)
+SbxObject* SfxSbxObjectFactory_Impl::CreateObject( const String &rType )
+{
+ if ( COMPARE_EQUAL == rType.CompareIgnoreCaseToAscii( "DocumentInfo" ) )
+ return new SfxDocumentInfoObject_Impl;
+ if ( COMPARE_EQUAL == rType.CompareIgnoreCaseToAscii( "Progress" ) )
+ return SfxProgress::CreateObject_Impl();
+ return 0;
+}*/
+
+//=========================================================================
+/*
+SfxSelectionObject::SfxSelectionObject
+(
+ SfxViewFrame *pFrame // ein Frame als Parent
+)
+
+// [Beschreibung]
+
+// interner Ctor f"ur Default-Behandlung
+
+
+: SfxShellSubObject( pFrame, SFX_TYPELIB_INFO(Selection), "Selection" ),
+ _pFrame( pFrame )
+{
+ SetFlag( SBX_EXTSEARCH | SBX_DONTSTORE ); // unsichtbar
+}
+
+//-------------------------------------------------------------------------
+
+SfxSelectionObject::SfxSelectionObject
+(
+ SfxViewFrame *pFrame, // ein Frame als Parent
+ const String& rClassName,
+ const SfxTypeLibImpl &rTypeLibInfo
+)
+
+: SfxShellSubObject( pFrame, rClassName, rTypeLibInfo, "Selection" ),
+ _pFrame( pFrame )
+{
+ SetFlag( SBX_EXTSEARCH | SBX_DONTSTORE ); // unsichtbar
+}
+
+//-------------------------------------------------------------------------
+
+SvDispatch* SfxSelectionObject::GetAggObject( sal_uInt16 nIdx )
+
+{
+ // selbst?
+ if ( 0 == nIdx )
+ return SfxShellSubObject::GetAggObject( 0 );
+
+ // die oberhalb der ::com::sun::star::sdbcx::View auf dem Dispatcher befindlichen Shells indizieren
+ SfxDispatcher *pDispat = _pFrame->GetDispatcher();
+ SfxShell *pSh = pDispat->GetShell( nIdx-1 );
+ if ( !pSh || pSh->ISA(SfxObjectShell) )
+ return 0;
+ return (SvDispatch*) pSh->GetSbxObject();
+}
+
+//-------------------------------------------------------------------------
+
+SbxVariable* SfxSelectionObject::Find
+(
+ const String& rName,
+ SbxClassType t
+)
+{
+ // einige Member selbst bedienen
+ String aName( rName.ToLowerAscii() );
+ if ( aName == "name" || aName == "classname" )
+ return SfxShellSubObject::Find( rName, t );
+
+ // nur die oberhalb der ::com::sun::star::sdbcx::View auf dem Dispatcher liegenden Shells durchsuchen
+ SfxDispatcher *pDispat = _pFrame->GetDispatcher();
+ pDispat->Flush();
+ SfxShell *pSh;
+ for ( sal_uInt16 n = 0;
+ ( pSh = pDispat->GetShell( n ) ) && !pSh->ISA(SfxViewFrame);
+ ++n )
+ {
+ SbxObject *pObj = pSh->GetSbxObject();
+ if ( pObj )
+ {
+ if ( ( t == SbxCLASS_DONTCARE || t == SbxCLASS_OBJECT ) &&
+ pObj->GetName() == rName )
+ return pObj;
+ else
+ {
+ SbxVariable *pRes = pObj->Find( rName, t );
+ if ( pRes )
+ return pRes;
+ }
+ }
+ }
+
+ return 0;
+}
+
+//-------------------------------------------------------------------------
+
+SbxVariable* SfxSelectionObject::FindUserData
+(
+ sal_uInt32 nId
+)
+{
+ // nur die oberhalb der ::com::sun::star::sdbcx::View auf dem Dispatcher liegenden Shells durchsuchen
+ SfxDispatcher *pDispat = _pFrame->GetDispatcher();
+ SfxShell *pSh;
+ for ( sal_uInt16 n = 0;
+ ( pSh = pDispat->GetShell( n ) ) && !pSh->ISA(SfxViewFrame);
+ ++n )
+ {
+ SbxObject *pObj = pSh->GetSbxObject();
+ if ( pObj )
+ {
+ SbxVariable *pRes = pObj->FindUserData( nId );
+ if ( pRes )
+ return pRes;
+ }
+ }
+
+ return 0;
+}
+
+//=========================================================================
+
+class SfxConstants_Impl: public SbxObject
+{
+ const char* _pPrefix;
+ const SfxConstant* _pConsts;
+ sal_uInt16 _nCount;
+
+public:
+ SfxConstants_Impl( const char *pPrefix,
+ const SfxConstant *pConsts,
+ sal_uInt16 n );
+ SbxVariable* Find( const String& rName, SbxClassType t );
+};
+
+//-------------------------------------------------------------------------
+
+SfxConstants_Impl::SfxConstants_Impl
+(
+ const char* pPrefix,
+ const SfxConstant* pConsts,
+ sal_uInt16 nCount
+)
+: SbxObject( "Constants" ),
+ _pPrefix( pPrefix ),
+ _pConsts( pConsts ),
+ _nCount( nCount )
+{
+ SetFlag( SBX_EXTSEARCH | SBX_DONTSTORE ); // unsichtbar
+ SetName( String( (long) this ) ); // random
+}
+
+//-------------------------------------------------------------------------
+
+SbxVariable* SfxConstants_Impl::Find
+(
+ const String& rName,
+ SbxClassType t
+)
+{
+ // stimmt Typ und Prefix?
+ String aPrefix;
+ if ( _pPrefix )
+ aPrefix += _pPrefix;
+ if ( ( SbxCLASS_DONTCARE != t && SbxCLASS_PROPERTY != t ) ||
+ ( aPrefix.Len() && aPrefix.Len() != rName.Match( _pPrefix ) ) )
+ return 0;
+
+ // schon drin?
+ SbxVariable* pRes = SbxObject::Find( rName, t );
+ if( pRes )
+ return pRes;
+
+ // sonst suchen
+ String aSearched( rName );
+ aSearched.ToLowerAscii();
+ for ( sal_uInt16 n = 0; n < _nCount; ++n )
+ {
+ // gefunden?
+ const SfxConstant &rConst = _pConsts[n];
+ String aName( aPrefix );
+ aName += rConst.pName;
+ if ( aSearched == aName.ToLowerAscii() )
+ {
+ // on-demand erzeugen
+ SbxVariable *pVar = Make( aName, SbxCLASS_PROPERTY, rConst.eType );
+ switch ( rConst.eType )
+ {
+ case SbxUSHORT:
+ pVar->PutUShort( (sal_uInt16)(int) rConst.pData );
+ break;
+
+ case SbxCHAR:
+ pVar->PutChar( (char)(int) rConst.pData );
+ break;
+
+ case SbxBYTE:
+ pVar->PutByte( (sal_Int8)(int) rConst.pData );
+ break;
+
+ case SbxBOOL:
+ pVar->PutBool( (sal_Bool)(int) rConst.pData );
+ break;
+
+ case SbxINTEGER:
+ pVar->PutInteger( (short)(int) rConst.pData );
+ break;
+
+ case SbxLONG:
+ pVar->PutLong( (long) rConst.pData );
+ break;
+
+ case SbxUINT:
+ pVar->PutUShort( (sal_uInt16)(int) rConst.pData );
+ break;
+
+ case SbxULONG:
+ pVar->PutULong( (sal_uInt32) rConst.pData );
+ break;
+
+ case SbxLPSTR:
+ pVar->PutString( (char*) rConst.pData );
+ break;
+
+ default:
+ DBG_ERROR( "type of constant not supported" );
+ }
+
+ pVar->ResetFlag( SBX_WRITE );
+ pVar->SetFlag( SBX_CONST );
+ pVar->SetFlag( SBX_FIXED );
+ return pVar;
+ }
+ }
+
+ return 0;
+}
+*/
+//=========================================================================
+sal_uInt16 SfxApplication::SaveBasicManager() const
+{
+ // MT: #47347# AppBasicDir ist jetzt ein PATH!
+ // Ncht den vom BasicManager, falls inzwischen der Pfad geaendert wurde !?
+ // So wird natuerlich auch das erste Dir genommen, wenn der BasicManager
+ // vorher im zweiten gefunden wurde...
+ String aBasicPath( GetIniManager()->Get( SFX_KEY_BASIC_PATH ) );
+ INetURLObject aAppBasicObj( aBasicPath.GetToken(0), INET_PROT_FILE );
+ aAppBasicObj.insertName( Application::GetAppName() );
+ aAppBasicObj.setExtension( DEFINE_CONST_UNICODE( "sbl" ) );
+ String aAppBasicPath( aAppBasicObj.PathToFileName() );
+ SvStorageRef aStor = new SvStorage( aAppBasicPath );
+ if ( aStor->GetError() == 0 )
+ {
+ String aBaseURL = INetURLObject::GetBaseURL();
+ INetURLObject::SetBaseURL( aAppBasicObj.GetMainURL() );
+ pImp->pBasicMgr->Store( *aStor, NULL );
+ INetURLObject::SetBaseURL( aBaseURL );
+ }
+ if ( aStor->GetError() != 0 )
+ {
+ ErrorBox aBox(GetTopWindow(), SfxResId(MSG_ERR_WRITE_SBL));
+ String aMsg( SearchAndReplace( aBox.GetMessText(), 0x0040, aAppBasicPath ) ); // 40h = '@'
+ aBox.SetMessText( aMsg );
+ aBox.Execute();
+ }
+
+ return (sal_uInt16)aStor->GetError();
+}
+
+//--------------------------------------------------------------------
+
+void SfxApplication::RegisterBasicConstants
+(
+ const char* pPrefix, // Prefix vor Konstanten-Namen
+ const SfxConstant* pConsts, // Array von <SfxConstant> Instanzen
+ sal_uInt16 nCount // Anahl der Kontanten in pConsts
+)
+
+/* [Beschreibung]
+
+ Diese Methode meldet Konstanten beim BASIC an. Sie sollte on-demand
+ (in GetSbxObject() der Applikation) gerufen werden. Das Array mu\s
+ alphabetisch nach den Namen sortiert sein!
+
+ Durch den Prefix kann Speicher gespart und das Suchen beschleunigt
+ werden. Im StarOffice soll der Prefix "so" verwendet werden.
+
+
+ [Beispiel]
+
+ const SfxConstant __FAR_DATA aConstants[] =
+ {
+ SFX_BOOL_CONSTANT( "False", sal_False ),
+ SFX_BOOL_CONSTANT( "True", sal_True ),
+ };
+
+ ...
+ SFX_APP()->RegisterBasicConstants( 0, aConstants, 2 );
+ ...
+
+*/
+
+{
+// DBG_ASSERT( pImp->pBasicMgr, "no basic available" );
+
+// pImp->pBasicMgr->GetLib(0)->Insert(
+// new SfxConstants_Impl( pPrefix, pConsts, nCount ) );
+}
+
+//--------------------------------------------------------------------
+
+SbxVariable* MakeVariable( StarBASIC *pBas, SbxObject *pObject,
+ const char *pName, sal_uInt32 nSID, SbxDataType eType, SbxClassType eClassType )
+{
+ SbxVariable *pVar = pBas->Make( String::CreateFromAscii(pName), eClassType, eType ); //SbxCLASS_PROPERTY
+ pVar->SetUserData( nSID );
+ pVar->SetFlag( SBX_DONTSTORE );
+ pObject->StartListening( pVar->GetBroadcaster() );
+ return pVar;
+}
+
+//--------------------------------------------------------------------
+
+BasicManager* SfxApplication::GetBasicManager()
+{
+// DBG_ASSERT( pAppData_Impl->nBasicCallLevel != 0,
+// "unnecessary call to GetBasicManager() - inefficient!" );
+ if ( pAppData_Impl->nBasicCallLevel == 0 )
+ // sicherheitshalber
+ EnterBasicCall();
+
+ if ( !pImp->pBasicMgr )
+ {
+ // Directory bestimmen
+ SfxIniManager* pIniMgr = GetIniManager();
+ String aAppBasicDir( pIniMgr->Get( SFX_KEY_BASIC_PATH ) );
+ if ( !aAppBasicDir.Len() )
+ {
+ aAppBasicDir = pIniMgr->GetProgramPath();
+ pIniMgr->Set( aAppBasicDir, SFX_KEY_BASIC_PATH );
+ }
+
+ // #58293# soffice.new nur im ::com::sun::star::sdbcx::User-Dir suchen => erstes Verzeichnis
+ String aAppFirstBasicDir = aAppBasicDir.GetToken(0);
+ sal_Bool bBasicUpdated = sal_False;
+
+ // Basic erzeugen und laden
+ // MT: #47347# AppBasicDir ist jetzt ein PATH!
+ INetURLObject aAppBasic( Application::GetAppFileName(), INET_PROT_FILE );
+ aAppBasic.setExtension( DEFINE_CONST_UNICODE( "sbl" ) );
+ String aAppBasicFile, aNewBasicFile;
+ // Direkt nach der Installation gibt es ggf. _nur_ eine SOFFICE.NEW
+ if ( !SfxContentHelper::Find( aAppBasicDir, aAppBasic.getName(), aAppBasicFile ) )
+ {
+ INetURLObject aNewBasic = aAppBasic;
+ aNewBasic.setExtension( DEFINE_CONST_UNICODE( "new" ) );
+ if ( SfxContentHelper::Find( aAppFirstBasicDir, aNewBasic.getName(), aNewBasicFile ) )
+ {
+ aAppBasic = INetURLObject( aNewBasicFile );
+ aAppBasic.setExtension( DEFINE_CONST_UNICODE( "sbl" ) );
+ SfxContentHelper::MoveTo( aNewBasicFile, aAppBasic.GetMainURL() );
+ }
+ }
+ else
+ aAppBasic = INetURLObject( aAppBasicFile );
+ SvStorageRef aStor;
+ if ( SfxContentHelper::Exists( aAppBasic.GetMainURL() ) )
+ aStor = new SvStorage( aAppBasic.PathToFileName(), STREAM_READ | STREAM_SHARE_DENYWRITE );
+ if ( aStor.Is() && 0 == aStor->GetError() )
+ {
+ SfxErrorContext aErrContext( ERRCTX_SFX_LOADBASIC, Application::GetAppName() );
+ String aOldBaseURL = INetURLObject::GetBaseURL();
+ INetURLObject::SetBaseURL( aAppBasic.GetMainURL() );
+ pImp->pBasicMgr = new SfxBasicManager( *aStor, NULL, &aAppBasicDir );
+ pImp->pBasicMgr->SetStorageName( aAppBasic.PathToFileName() );
+
+ // ggf. nach einem Channel-Update den BasicManager aktualisieren
+ INetURLObject aNewBasic = aAppBasic;
+ aNewBasic.setExtension( DEFINE_CONST_UNICODE( "new" ) );
+ if ( SfxContentHelper::Find( aAppFirstBasicDir, aNewBasic.getName(), aNewBasicFile ) )
+ {
+ aNewBasic = INetURLObject( aNewBasicFile );
+ SvStorageRef xTmpStor = new SvStorage( aNewBasic.PathToFileName(), STREAM_READ | STREAM_SHARE_DENYWRITE );
+ pImp->pBasicMgr->Merge( *xTmpStor );
+ bBasicUpdated = sal_True;
+ xTmpStor.Clear(); // Sonst kein Kill() moeglich
+ SfxContentHelper::Kill( aNewBasicFile ); // SOFFICE.NEW loeschen
+ }
+ INetURLObject::SetBaseURL( aOldBaseURL );
+ if ( pImp->pBasicMgr->HasErrors() )
+ {
+ // handle errors
+ BasicError *pErr = pImp->pBasicMgr->GetFirstError();
+ while ( pErr )
+ {
+ // show message to user
+ if ( ERRCODE_BUTTON_CANCEL ==
+ ErrorHandler::HandleError( pErr->GetErrorId() ) )
+ {
+ // user wants to break loading of BASIC-manager
+ delete pImp->pBasicMgr;
+ aStor.Clear();
+ break;
+ }
+ pErr = pImp->pBasicMgr->GetNextError();
+ }
+ }
+ }
+ if ( !aStor.Is() || 0 != aStor->GetError() )
+ {
+ pImp->pBasicMgr = new SfxBasicManager( new StarBASIC, &aAppBasicDir );
+
+ // Als Destination das erste Dir im Pfad:
+ String aFileName( aAppBasic.getName() );
+ aAppBasic = INetURLObject( aAppBasicDir.GetToken(0), INET_PROT_FILE );
+ aAppBasic.insertName( aFileName );
+ pImp->pBasicMgr->SetStorageName( aAppBasic.PathToFileName() );
+ }
+
+ aStor.Clear();
+ if ( bBasicUpdated )
+ SaveBasicManager();
+
+ // globale Variablen
+ StarBASIC *pBas = pImp->pBasicMgr->GetLib(0);
+ sal_Bool bBasicWasModified = pBas->IsModified();
+/*
+ MakeVariable( pBas, pAppObj, "ActiveModule", SID_ACTIVEMODULE|0x20000 );
+ MakeVariable( pBas, pAppObj, "ActiveDocument", SID_ACTIVEDOCUMENT|0x20000 );
+ MakeVariable( pBas, pAppObj, "ActiveWindow", SID_ACTIVEWINDOW|0x20000 );
+ MakeVariable( pBas, pAppObj, "ActiveTask", SID_ACTIVETASK|0x20000 );
+ MakeVariable( pBas, pAppObj, "Application", SID_APPLICATION );
+ MakeVariable( pBas, pAppObj, "Selection", SID_SELECTION|0x20000 );
+ MakeVariable( pBas, pAppObj, "Documents", SID_DOCUMENTS|0x40000 );
+ MakeVariable( pBas, pAppObj, "Windows", SID_WINDOWS|0x40000 );
+ MakeVariable( pBas, pAppObj, "StarWriter", SID_STARWRITER|0x20000 );
+ MakeVariable( pBas, pAppObj, "StarDraw", SID_STARDRAW|0x20000 );
+ MakeVariable( pBas, pAppObj, "StarCalc", SID_STARCALC|0x20000 );
+ MakeVariable( pBas, pAppObj, "LanguageId", SID_LANGUAGEID, SbxUSHORT );
+ MakeVariable( pBas, pAppObj, "CountryId", SID_COUNTRYID, SbxUSHORT );
+ // MI: wenn der drin ist, findet BASIC die Datenbank-Wizard Makros
+ // nicht mehr - warum auch immer
+ MakeVariable( pBas, pAppObj, "ThisDocument", SID_THISDOCUMENT|0x20000 );
+ MakeVariable( pBas, pAppObj, "ThisWindow", SID_THISWINDOW|0x20000 );
+ MakeVariable( pBas, pAppObj, "ThisComponent", 0x20000 );
+ MakeVariable( pBas, pAppObj, "SubstPathVars", SID_SUBSTPATHVARS,SbxSTRING, SbxCLASS_METHOD );
+*/
+ // ::com::sun::star::frame::Desktop
+ Reference< ::com::sun::star::lang::XMultiServiceFactory > xSMgr = ::utl::getProcessServiceFactory();
+ Any aDesktop;
+ Reference< XDesktop > xDesktop( xSMgr->createInstance(::rtl::OUString::createFromAscii("com.sun.star.frame.Desktop")), UNO_QUERY );
+ aDesktop <<= xDesktop ;
+ SbxObjectRef xUnoObj = GetSbUnoObject( DEFINE_CONST_UNICODE("StarDesktop"), aDesktop );
+ xUnoObj->SetFlag( SBX_DONTSTORE );
+ pBas->Insert( xUnoObj );
+ //pBas->setRoot( xDesktop );
+
+ // Konstanten
+//ASDBG RegisterBasicConstants( "so", aConstants, sizeof(aConstants)/sizeof(SfxConstant) );
+
+ // Durch MakeVariable wird das Basic modifiziert.
+ if ( !bBasicWasModified )
+ pBas->SetModified( sal_False );
+ }
+ return pImp->pBasicMgr;
+}
+
+//--------------------------------------------------------------------
+
+StarBASIC* SfxApplication::GetBasic()
+{
+ return GetBasicManager()->GetLib(0);
+}
+
+//--------------------------------------------------------------------
+
+FASTBOOL SfxApplication::IsInBasicCall() const
+{
+ return 0 != pAppData_Impl->nBasicCallLevel;
+}
+
+//--------------------------------------------------------------------
+
+void SfxApplication::EnterBasicCall()
+{
+ if ( 1 == ++pAppData_Impl->nBasicCallLevel )
+ {
+ DBG_TRACE( "SfxShellObject: BASIC-on-demand" );
+
+ // das kann l"anger dauern, da Progress nicht geht, wenigstens Sanduhr
+//(mba)/task SfxWaitCursor aWait;
+
+ // zuerst das BASIC laden
+ GetBasic();
+/*
+ // als erstes SfxShellObject das SbxObject der SfxApplication erzeugen
+ SbxObject *pSbx = GetSbxObject();
+ DBG_ASSERT( pSbx, "SfxShellObject: can't create SbxObject for SfxApplication" );
+
+ // die SbxObjects aller Module erzeugen
+ SfxModuleArr_Impl& rArr = GetModules_Impl();
+ for ( sal_uInt16 n = 0; n < rArr.Count(); ++n )
+ {
+ SfxModule *pMod = rArr.GetObject(n);
+ if ( pMod->IsLoaded() )
+ {
+ pSbx = pMod->GetSbxObject();
+ DBG_ASSERT( pSbx, "SfxModule: can't create SbxObject" );
+ }
+ }
+
+ // die SbxObjects aller Tasks erzeugen
+ for ( SfxTask *pTask = SfxTask::GetFirst(); pTask; pTask = SfxTask::GetNext( *pTask ) )
+ pTask->GetSbxObject();
+
+ // die SbxObjects aller SfxObjectShells erzeugen (ggf. Frame-los!)
+ for ( SfxObjectShell *pObjSh = SfxObjectShell::GetFirst( NULL, sal_False );
+ pObjSh;
+ pObjSh = SfxObjectShell::GetNext(*pObjSh, NULL, sal_False) )
+ {
+ // kein IP-Object oder wenn doch dann initialisiert?
+ SvStorageRef aStorage;
+ if ( !pObjSh->IsHandsOff() )
+ aStorage = pObjSh->GetStorage();
+ if ( !pObjSh->GetInPlaceObject() || aStorage.Is() )
+ {
+ DBG( DbgOutf( "SfxShellObject: BASIC-on-demand for %s",
+ pObjSh->SfxShell::GetName().GetBuffer() ) );
+ pSbx = pObjSh->GetSbxObject();
+ DBG_ASSERT( pSbx, "SfxShellObject: can't create SbxObject" );
+ }
+ }
+
+ // die SbxObjects der SfxShells auf den Stacks der Frames erzeugen
+ for ( SfxViewFrame *pFrame = SfxViewFrame::GetFirst(0,0,sal_False);
+ pFrame;
+ pFrame = SfxViewFrame::GetNext(*pFrame,0,0,sal_False) )
+ {
+ // den Dispatcher des Frames rausholen
+ SfxDispatcher *pDispat = pFrame->GetDispatcher();
+ pDispat->Flush();
+
+ // "uber alle SfxShells auf dem Stack des Dispatchers iterieren
+ // Frame selbst wird ausgespart, da er indirekt angezogen wird,
+ // sofern er ein Dokument enth"alt.
+ for ( sal_uInt16 nStackIdx = pDispat->GetShellLevel(*pFrame);
+ 0 != nStackIdx;
+ --nStackIdx )
+ {
+ DBG( DbgOutf( "SfxShellObject: BASIC-on-demand for level %u", nStackIdx-1 ); )
+ pSbx = pDispat->GetShell(nStackIdx - 1)->GetSbxObject();
+ DBG_ASSERT( pSbx, "SfxShellObject: can't create SbxObject" );
+ }
+
+ if ( !pFrame->GetObjectShell() )
+ {
+ DBG( DbgOutf( "SfxShellObject: BASIC-on-demand for empty frame" ); )
+ pSbx = pFrame->GetSbxObject();
+ DBG_ASSERT( pSbx, "SfxShellObject: can't create SbxObject" );
+ }
+ }
+*/
+ // Factories anmelden
+// SbxBase::AddFactory( new SfxSbxObjectFactory_Impl );
+ }
+}
+
+//--------------------------------------------------------------------
+
+void SfxApplication::LeaveBasicCall()
+{
+ --pAppData_Impl->nBasicCallLevel;
+}
+
+//--------------------------------------------------------------------
+
+void SfxApplication::EventExec_Impl( SfxRequest &rReq, SfxObjectShell *pObjSh )
+{
+ // SID nur einmal holen
+ sal_uInt16 nSID = rReq.GetSlot();
+
+ SFX_REQUEST_ARG(rReq, pItem, SfxStringItem, nSID, sal_False);
+ if ( pItem )
+ {
+ String aArg( pItem->GetValue() );
+ GetEventConfig()->ConfigureEvent( nSID, aArg, pObjSh );
+ }
+}
+
+//-------------------------------------------------------------------------
+
+void SfxApplication::EventState_Impl
+(
+ sal_uInt16 nSID,
+ SfxItemSet& rSet,
+ SfxObjectShell* pObjSh
+)
+{
+ // Config auslesen
+ SfxMacroConfig *pMC = GetMacroConfig();
+ SfxEventConfiguration *pEC = GetEventConfig();
+ const SvxMacro* pMacro = pEC->GetMacroForEventId( nSID, pObjSh );
+
+ // "Library.Modul.Method" zusammensetzen
+ String aRet;
+ if ( pMacro )
+ aRet = pMacro->GetMacName();
+ rSet.Put( SfxStringItem( nSID, aRet ) );
+}
+
+//-------------------------------------------------------------------------
+void SfxApplication::PropExec_Impl( SfxRequest &rReq )
+{
+ SfxIniManager *pIniMgr = GetIniManager();
+
+ const SfxItemSet *pArgs = rReq.GetArgs();
+ sal_uInt16 nSID = rReq.GetSlot();
+ switch ( nSID )
+ {
+ case SID_CREATE_BASICOBJECT:
+ {
+ SFX_REQUEST_ARG(rReq, pItem, SfxStringItem, nSID, sal_False);
+ if ( pItem )
+ {
+ SbxObject* pObject = SbxBase::CreateObject( pItem->GetValue() );
+ pObject->AddRef();
+//(mba) rReq.SetReturnValue( SfxObjectItem( 0, pObject ) );
+ rReq.Done();
+ }
+ break;
+ }
+
+ case SID_DELETE_BASICOBJECT:
+ {
+ SFX_REQUEST_ARG(rReq, pItem, SfxObjectItem, nSID, sal_False);
+ if ( pItem )
+ {
+//(mba) SbxObject* pObject = pItem->GetObject();
+//(mba) pObject->ReleaseRef();
+ }
+ break;
+ }
+
+ case SID_WIN_POSSIZE:
+ {
+ break;
+ }
+
+ case SID_DEFAULTFILEPATH:
+ {
+ SFX_REQUEST_ARG(rReq, pPathItem, SfxStringItem, nSID, sal_False);
+ pIniMgr->Set(pPathItem->GetValue(), SFX_KEY_WORK_PATH );
+ break;
+ }
+
+ case SID_INTERACTIVEMODE:
+ {
+ break;
+ }
+
+ case SID_ATTR_UNDO_COUNT:
+ {
+ SFX_REQUEST_ARG(rReq, pCountItem, SfxUInt16Item, nSID, sal_False);
+ GetOptions().SetUndoCount( pCountItem->GetValue() );
+ break;
+ }
+
+#if 0
+ case SID_ATTR_METRIC:
+ {
+ SFX_REQUEST_ARG(rReq, pMetricItem, SfxUInt16Item, nSID, sal_False);
+ GetOptions().SetMetric( (FieldUnit) pMetricItem->GetValue() );
+ break;
+ }
+#endif
+
+ case SID_WIN_VISIBLE:
+ {
+ break;
+ }
+
+ case SID_ON_STARTAPP:
+ case SID_ON_CLOSEAPP:
+ case SID_ON_CREATEDOC:
+ case SID_ON_OPENDOC:
+ case SID_ON_PREPARECLOSEDOC:
+ case SID_ON_CLOSEDOC:
+ case SID_ON_SAVEDOC:
+ case SID_ON_SAVEASDOC:
+ case SID_ON_ACTIVATEDOC:
+ case SID_ON_DEACTIVATEDOC:
+ case SID_ON_PRINTDOC:
+ case SID_ON_SAVEDOCDONE:
+ case SID_ON_SAVEASDOCDONE:
+ EventExec_Impl( rReq, 0 );
+ break;
+
+ case SID_STATUSBARTEXT:
+ {
+ SFX_REQUEST_ARG(rReq, pStringItem, SfxStringItem, nSID, sal_False);
+ String aText = pStringItem->GetValue();
+ if ( aText.Len() )
+ GetpApp()->ShowStatusText( aText );
+ else
+ GetpApp()->HideStatusText();
+ break;
+ }
+
+ case SID_HELP:
+ {
+ break;
+ }
+
+ case SID_PLAYMACRO:
+ PlayMacro_Impl( rReq, GetBasic() );
+ break;
+
+ case SID_OFFICE_PALK:
+ {
+ SFX_REQUEST_ARG(rReq, pStringItem, SfxStringItem, nSID, sal_False);
+ if ( pStringItem )
+ {
+ String aPALK = pStringItem->GetValue();
+ sal_Bool bCheck = SvDemo::CheckPALK(aPALK, String());
+ rReq.SetReturnValue(SfxBoolItem(nSID, bCheck ));
+ if( aPALK.Len() && bCheck )
+ SvDemo::SetAuthorizedState(Application::GetAppName(), aPALK );
+ }
+ else
+ SbxBase::SetError( SbxERR_WRONG_ARGS );
+ break;
+ }
+
+ case SID_OFFICE_PRIVATE_USE:
+ case SID_OFFICE_COMMERCIAL_USE:
+ {
+ SFX_REQUEST_ARG(rReq, pStringItem, SfxStringItem, nSID, sal_False);
+
+ if ( pStringItem )
+ {
+ String aValue = pIniMgr->Get( SFX_KEY_USINGOFFICE );
+
+ if ( !aValue.Len() || aValue.Len() != 2 )
+ aValue = DEFINE_CONST_UNICODE("00");
+
+ sal_uInt16 nPos = SID_OFFICE_PRIVATE_USE == nSID ? 0 : 1;
+ String aNew = pStringItem->GetValue().Copy( 0, 1 );
+ aValue.Replace( nPos, aNew.Len(), aNew );
+ pIniMgr->Set( aValue, SFX_KEY_USINGOFFICE );
+ }
+ break;
+ }
+
+ case SID_OFFICE_CUSTOMERNUMBER:
+ {
+ SFX_REQUEST_ARG(rReq, pStringItem, SfxStringItem, nSID, sal_False);
+
+ if ( pStringItem )
+ pIniMgr->Set( pStringItem->GetValue(),
+ SFX_KEY_CUSTOMERNUMBER );
+ break;
+ }
+ }
+}
+
+//-------------------------------------------------------------------------
+void SfxApplication::PropState_Impl( SfxItemSet &rSet )
+{
+ SfxViewFrame *pFrame = SfxViewFrame::Current();
+ SfxIniManager *pIniMgr = GetIniManager();
+
+ SfxWhichIter aIter(rSet);
+ for ( sal_uInt16 nSID = aIter.FirstWhich(); nSID; nSID = aIter.NextWhich() )
+ {
+ switch ( nSID )
+ {
+ case SID_THISDOCUMENT:
+ {
+ rSet.Put( SfxObjectItem( SID_THISDOCUMENT, pAppData_Impl->pThisDocument ? pAppData_Impl->pThisDocument : SfxObjectShell::Current() ) );
+ break;
+ }
+
+ case SID_THISWINDOW:
+ {
+ rSet.Put( SfxObjectItem( SID_THISWINDOW, pAppData_Impl->pThisDocument ? SfxViewFrame::GetFirst( pAppData_Impl->pThisDocument ) : SfxViewFrame::Current() ) );
+ break;
+ }
+ case SID_PROGNAME:
+ rSet.Put( SfxStringItem( SID_PROGNAME, GetName() ) );
+ break;
+
+ case SID_ACTIVEDOCUMENT:
+ rSet.Put( SfxObjectItem( SID_ACTIVEDOCUMENT, SfxObjectShell::Current() ) );
+ break;
+
+ case SID_APPLICATION:
+ rSet.Put( SfxObjectItem( SID_APPLICATION, this ) );
+ break;
+
+ case SID_STARWRITER:
+ {
+ SfxModule *pMod = (*(SfxModule**) GetAppData(SHL_WRITER))->Load();
+ if ( pMod ) HACK(muss vom Modul selbst gemacht werden)
+ pMod->SetName( DEFINE_CONST_UNICODE("StarWriter") );
+ rSet.Put( SfxObjectItem( nSID, pMod ) );
+ break;
+ }
+
+ case SID_STARDRAW:
+ {
+ SfxModule *pMod = (*(SfxModule**) GetAppData(SHL_DRAW))->Load();
+ if ( pMod ) HACK(muss vom Modul selbst gemacht werden)
+ pMod->SetName( DEFINE_CONST_UNICODE("StarDraw") );
+ rSet.Put( SfxObjectItem( nSID, pMod ) );
+ break;
+ }
+
+ case SID_STARCALC:
+ {
+ SfxModule *pMod = (*(SfxModule**) GetAppData(SHL_CALC))->Load();
+ if ( pMod ) HACK(muss vom Modul selbst gemacht werden)
+ pMod->SetName( DEFINE_CONST_UNICODE("StarCalc") );
+ rSet.Put( SfxObjectItem( nSID, pMod ) );
+ break;
+ }
+
+ case SID_ACTIVEMODULE:
+ {
+ SfxShell *pSh = GetActiveModule();
+ if ( !pSh )
+ pSh = this;
+ rSet.Put( SfxObjectItem( SID_ACTIVEMODULE, pSh ) );
+ break;
+ }
+
+ case SID_ACTIVEWINDOW:
+ rSet.Put( SfxObjectItem( SID_ACTIVEWINDOW, pFrame ) );
+ break;
+
+ case SID_SELECTION:
+ break;
+
+ case SID_WIN_POSSIZE:
+ {
+ break;
+ }
+
+ case SID_CAPTION:
+ break;
+
+ case SID_DEFAULTFILEPATH:
+ rSet.Put( SfxStringItem( SID_DEFAULTFILEPATH, pIniMgr->Get(SFX_KEY_WORK_PATH) ) );
+ break;
+
+ case SID_PROGFILENAME:
+ rSet.Put( SfxStringItem( SID_PROGFILENAME, Application::GetAppFileName() ) );
+ break;
+
+ case SID_PROGPATH:
+ rSet.Put( SfxStringItem( SID_PROGPATH, pIniMgr->GetProgramPath() ) );
+ break;
+
+ case SID_INTERACTIVEMODE:
+ rSet.Put( SfxBoolItem( SID_INTERACTIVEMODE, !IsDispatcherLocked() ) );
+ break;
+
+ case SID_ATTR_UNDO_COUNT:
+ rSet.Put( SfxUInt16Item( SID_ATTR_UNDO_COUNT, GetOptions().GetUndoCount() ) );
+ break;
+
+#if 0
+ case SID_ATTR_METRIC:
+ rSet.Put( SfxByteItem( SID_ATTR_METRIC, (sal_Int8) GetOptions().GetMetric() ) );
+ break;
+#endif
+
+ case SID_WIN_VISIBLE:
+ break;
+
+ case SID_ON_STARTAPP:
+ case SID_ON_CLOSEAPP:
+ case SID_ON_CREATEDOC:
+ case SID_ON_OPENDOC:
+ case SID_ON_PREPARECLOSEDOC:
+ case SID_ON_CLOSEDOC:
+ case SID_ON_SAVEDOC:
+ case SID_ON_SAVEASDOC:
+ case SID_ON_ACTIVATEDOC:
+ case SID_ON_DEACTIVATEDOC:
+ case SID_ON_PRINTDOC:
+ case SID_ON_SAVEDOCDONE:
+ case SID_ON_SAVEASDOCDONE:
+ EventState_Impl( nSID, rSet, 0 );
+
+ case SID_UPDATE_VERSION:
+ rSet.Put( SfxUInt32Item( SID_UPDATE_VERSION, SUPD ) );
+ break;
+
+ case SID_BUILD_VERSION:
+ {
+ String aVersion = lcl_GetVersionString(pAppData_Impl->pLabelResMgr);
+ rSet.Put( SfxUInt32Item( SID_BUILD_VERSION, (sal_uInt32) aVersion.ToInt32() ) );
+ break;
+ }
+
+ case SID_STATUSBARTEXT:
+ {
+ rSet.Put( SfxStringItem( SID_STATUSBARTEXT, GetStatusBarManager()->GetStatusBar()->GetText() ) );
+ break;
+ }
+ case SID_OFFICE_VERSION_ID:
+ {
+ String sVersionString;
+ ResId aVerId( STR_VERSION_ID, pAppData_Impl->pLabelResMgr );
+ if(pAppData_Impl->pLabelResMgr->IsAvailable( aVerId.SetRT( RSC_STRING ) ))
+ sVersionString += String(aVerId);
+ else
+ sVersionString += DEFINE_CONST_UNICODE("50"); // wenn man keine Iso-Dll haben sollte und vorher nicht abgeraucht ist
+ String sOS(S2U(getenv("OS")));
+ String sProc(S2U(getenv("CPU")));
+
+ sal_uInt16 nSystem = SYSTEM_ID;
+ if(nSystem < 10)
+ sVersionString += 0x0030 ; // '0' = 30h
+ sVersionString += String::CreateFromInt32( nSystem );
+ String sBuildVersion = lcl_GetVersionString(pAppData_Impl->pLabelResMgr);
+ sal_uInt16 nLen = sBuildVersion.Len();
+ if(nLen > 4)
+ {
+ DBG_ERROR("Buildversion laenger als 4 Zeichen ?")
+ sBuildVersion.Erase(4, nLen - 4);
+ }
+ else if(nLen < 4)
+ {
+ DBG_ERROR("Buildversion kuerzer als 4 Zeichen ?")
+
+ while(5 > nLen++)
+ sBuildVersion.Insert(DEFINE_CONST_UNICODE("0"), 0);
+ }
+ sVersionString += sBuildVersion;
+ String sResStr(S2U(ResMgr::GetLang()));
+ if( sResStr.Len() < 2)
+ sResStr.Insert(DEFINE_CONST_UNICODE("0"), 0);
+ sVersionString += sResStr;
+
+ aVerId = ResId( STR_VERSION_TYPE, pAppData_Impl->pLabelResMgr );
+ if(pAppData_Impl->pLabelResMgr->IsAvailable( aVerId.SetRT( RSC_STRING ) ))
+ sVersionString += String(aVerId);
+ else
+ sVersionString += DEFINE_CONST_UNICODE("99"); // wenn man keine Iso-Dll haben sollte
+
+ sal_uInt16 nDemoKind = GetDemoKind();
+ switch(nDemoKind)
+ {
+ case SFX_DEMOKIND_FULL : sVersionString += '1'; break;
+ case SFX_DEMOKIND_TRYBUY: sVersionString += '2'; break;
+ case SFX_DEMOKIND_DEMO : sVersionString += '3'; break;
+ default: sVersionString += '0';
+ }
+
+ sVersionString += Application::IsRemoteServer() ? '1' : '0';
+ rSet.Put(SfxStringItem(nSID, sVersionString));
+
+ }
+ break;
+
+ case SID_OFFICE_PLK:
+ {
+ String sPLK(SvDemo::GetPLK());
+ rSet.Put(SfxStringItem(nSID, sPLK));
+ }
+ break;
+
+ case SID_OLD_PALK:
+ {
+ rSet.Put(SfxStringItem(nSID, SvDemo::GetOldPALK()));
+ }
+ break;
+
+ case SID_OFFICE_PRIVATE_USE:
+ case SID_OFFICE_COMMERCIAL_USE:
+ {
+ String aUsing = pIniMgr->Get( SFX_KEY_USINGOFFICE );
+
+ if ( !aUsing.Len() || aUsing.Len() != 2 )
+ aUsing = DEFINE_CONST_UNICODE("00");
+
+ sal_uInt16 nPos = SID_OFFICE_PRIVATE_USE == nSID ? 0 : 1;
+ String aRet = aUsing.Copy( nPos, 1 );
+ rSet.Put( SfxStringItem( nSID, aRet ) );
+ break;
+ }
+
+ case SID_OFFICE_CUSTOMERNUMBER:
+ {
+ String aCustomerNumber = pIniMgr->Get(SFX_KEY_CUSTOMERNUMBER);
+ rSet.Put( SfxStringItem( nSID, aCustomerNumber ) );
+ break;
+ }
+ }
+ }
+}
+
+//--------------------------------------------------------------------
+void SfxApplication::MacroExec_Impl( SfxRequest& rReq )
+{
+ DBG_MEMTEST();
+ if ( SfxMacroConfig::IsMacroSlot( rReq.GetSlot() ) )
+ {
+ // SlotId referenzieren, damit nicht im Execute der Slot abgeschossen
+ // werden kann
+ GetMacroConfig()->RegisterSlotId(rReq.GetSlot());
+ SFX_REQUEST_ARG(rReq, pArgs, SfxStringItem,
+ rReq.GetSlot(), sal_False);
+ String aArgs;
+ if( pArgs ) aArgs = pArgs->GetValue();
+ if ( GetMacroConfig()->ExecuteMacro(rReq.GetSlot(), aArgs ) )
+ rReq.Done();
+ GetMacroConfig()->ReleaseSlotId(rReq.GetSlot());
+ }
+}
+
+//--------------------------------------------------------------------
+void SfxApplication::MacroState_Impl( SfxItemSet& rSet )
+{
+ DBG_MEMTEST();
+
+ // Gestrichen, da zu teuer! Ausserdem waere ein EnterBasicCall noetig
+/*
+ const sal_uInt16 *pRanges = rSet.GetRanges();
+ DBG_ASSERT(pRanges && *pRanges, "Set ohne Bereich");
+ while ( *pRanges )
+ {
+ for(sal_uInt16 nWhich = *pRanges++; nWhich <= *pRanges; ++nWhich)
+ {
+ sal_Bool bOK = sal_False;
+ if ( SfxMacroConfig::IsMacroSlot( nWhich ) )
+ bOK = GetMacroConfig()->CheckMacro(nWhich);
+
+ if ( !bOK )
+ rSet.DisableItem(nWhich);
+ }
+
+ ++pRanges;
+ }
+ */
+}
+
+//-------------------------------------------------------------------------
+
+void SfxApplication::PlayMacro_Impl( SfxRequest &rReq, StarBASIC *pBasic )
+{
+ EnterBasicCall();
+ sal_Bool bOK = sal_False;
+
+ // Makro und asynch-Flag
+ SFX_REQUEST_ARG(rReq,pMacro,SfxStringItem,SID_STATEMENT,sal_False);
+ SFX_REQUEST_ARG(rReq,pAsynch,SfxBoolItem,SID_ASYNCHRON,sal_False);
+
+ if ( pAsynch && pAsynch->GetValue() )
+ {
+ // asynchron ausf"uhren
+ GetDispatcher().Execute( SID_PLAYMACRO, SFX_CALLMODE_ASYNCHRON,
+ pMacro, 0L );
+ rReq.Done();
+ }
+ else if ( pMacro )
+ {
+ // Statement aufbereiten
+ DBG_ASSERT( pBasic, "no BASIC found" ) ;
+ String aStatement( '[' );
+ aStatement += pMacro->GetValue();
+ aStatement += ']';
+
+ // P"aventiv den Request abschlie\sen, da er ggf. zerst"ort wird
+ rReq.Done();
+ rReq.ReleaseArgs();
+
+ // Statement ausf"uhren
+ SbxVariable* pRet = pBasic->Execute( aStatement );
+ bOK = 0 == SbxBase::GetError();
+ SbxBase::ResetError();
+ }
+
+ LeaveBasicCall();
+ rReq.SetReturnValue(SfxBoolItem(0,bOK));
+}
+
+
diff --git a/sfx2/source/appl/appcfg.cxx b/sfx2/source/appl/appcfg.cxx
new file mode 100644
index 000000000000..5e363b4cd146
--- /dev/null
+++ b/sfx2/source/appl/appcfg.cxx
@@ -0,0 +1,1849 @@
+/*************************************************************************
+ *
+ * $RCSfile: appcfg.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:26 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _STDLIB_H
+#include <stdlib.h>
+#endif
+
+#ifndef _SV_CONFIG_HXX //autogen
+#include <vcl/config.hxx>
+#endif
+#ifndef _SV_SOUND_HXX //autogen
+#include <vcl/sound.hxx>
+#endif
+#ifndef _SV_MSGBOX_HXX //autogen
+#include <vcl/msgbox.hxx>
+#endif
+
+#ifndef _SFXITEMPOOL_HXX //autogen
+#include <svtools/itempool.hxx>
+#endif
+#ifndef _SFXINIMGR_HXX //autogen
+#include <svtools/iniman.hxx>
+#endif
+#ifndef _AEITEM_HXX //autogen
+#include <svtools/aeitem.hxx>
+#endif
+#ifndef _SFXSLSTITM_HXX //autogen
+#include <svtools/slstitm.hxx>
+#endif
+#ifndef _SFXSTRITEM_HXX //autogen
+#include <svtools/stritem.hxx>
+#endif
+#ifndef _SFXINTITEM_HXX //autogen
+#include <svtools/intitem.hxx>
+#endif
+#ifndef _SFXENUMITEM_HXX //autogen
+#include <svtools/eitem.hxx>
+#endif
+#ifndef _SFXSZITEM_HXX
+#include <svtools/szitem.hxx>
+#endif
+#ifndef _UNDO_HXX //autogen
+#include <svtools/undo.hxx>
+#endif
+#ifndef _SFXINIPROP_HXX
+#include <svtools/iniprop.hxx>
+#endif
+
+#ifndef _INET_WRAPPER_HXX
+#include <inet/wrapper.hxx>
+#endif
+#ifndef _INET_CONFIG_HXX
+#include <inet/inetcfg.hxx>
+#endif
+
+#define _SVSTDARR_STRINGS
+#include <svtools/svstdarr.hxx>
+
+#ifndef _SVTOOLS_TTPROPS_HXX // handmade
+#include <svtools/ttprops.hxx>
+#endif
+#ifndef _SFXSIDS_HRC // handmade
+#include <sfxsids.hrc>
+#endif
+#ifndef _SOT_EXCHANGE_HXX //autogen
+#include <sot/exchange.hxx>
+#endif
+
+#pragma hdrstop
+
+#include <svtools/agprop.hxx>
+#include <sj2/sjapplet.hxx>
+
+#ifndef _SFXISETHINT_HXX
+#include <svtools/isethint.hxx>
+#endif
+
+#include <tools/urlobj.hxx>
+#include <tools/wldcrd.hxx>
+
+#include "viewfrm.hxx"
+#include "sfxhelp.hxx"
+#include "sfxtypes.hxx"
+#include "dispatch.hxx"
+#include "objsh.hxx"
+#include "objshimp.hxx"
+#include "saveopt.hxx"
+#include "viewsh.hxx"
+#include "request.hxx"
+#include "evntconf.hxx"
+#include "cfgmgr.hxx"
+#include "docinf.hxx"
+#include "appdata.hxx"
+#include "picklist.hxx"
+#include "tbxconf.hxx"
+#include "workwin.hxx"
+#include <misccfg.hxx>
+#include <macrconf.hxx>
+#include "appimp.hxx"
+#include "helper.hxx" // SfxContentHelper::...
+
+//-------------------------------------------------------------------------
+
+const USHORT* SfxApplication::GetOptionsRanges() const
+{
+ static USHORT pRange[] =
+ {
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0,
+ };
+
+ if (0 == pRange[0])
+ {
+ SfxItemPool &rPool = GetPool();
+ pRange[ 0] = SID_OPTIONS_START;
+ pRange[ 1] = SID_OPTIONS_FIRSTFREE-1;
+ pRange[ 2] = SID_HELPBALLOONS;
+ pRange[ 3] = SID_HELPTIPS;
+ pRange[ 4] = SID_SECURE_URL;
+ pRange[ 5] = SID_SECURE_URL;
+ pRange[ 6] = SID_BASIC_ENABLED;
+ pRange[ 7] = SID_BASIC_ENABLED;
+ pRange[ 8] = SID_AUTO_ADJUSTICONS;
+ pRange[ 9] = SID_ICONGRID;
+ pRange[ 10 ] = SID_RESTORE_EXPAND_STATE;
+ pRange[ 11 ] = SID_RESTORE_EXPAND_STATE;
+ }
+ return pRange;
+}
+
+// -----------------------------------------------------------------------
+
+String GetJavaIniEntry_Impl( SfxIniKey eKey, SfxIniManager* pIniMgr )
+{
+ INetURLObject aObj;
+ aObj.SetSmartProtocol( INET_PROT_FILE );
+ aObj.SetSmartURL( Config::GetConfigName( pIniMgr->Get( SFX_KEY_USERCONFIG_PATH ),
+ DEFINE_CONST_UNICODE("java") ) );
+ String aIniEntry;
+ String aIniPath = aObj.getName();
+ if ( pIniMgr->SearchFile( aIniPath ) )
+ {
+ Config aJavaCfg( aIniPath );
+ aJavaCfg.SetGroup( "Java" );
+ String aIniKey = pIniMgr->GetKeyName( eKey );
+ aIniEntry = (String)S2U(aJavaCfg.ReadKey( U2S(aIniKey) ));
+ }
+ return aIniEntry;
+}
+
+// -----------------------------------------------------------------------
+
+BOOL SetJavaIniEntry_Impl( SfxIniKey eKey, const String& rValue, SfxIniManager* pIniMgr )
+{
+ String aIniFile =
+ Config::GetConfigName( pIniMgr->Get( SFX_KEY_USERCONFIG_PATH ), DEFINE_CONST_UNICODE("java") );
+ if ( !SfxContentHelper::Exists( aIniFile ) )
+ {
+ INetURLObject aObj( aIniFile, INET_PROT_FILE );
+ String aIniFileName = aObj.getName();
+ aObj.SetSmartURL( pIniMgr->Get( SFX_KEY_CONFIG_DIR ) );
+ aObj.insertName( aIniFileName );
+ String aShareFile = aObj.PathToFileName();
+
+ if ( !SfxContentHelper::Exists( aShareFile ) ||
+ !SfxContentHelper::CopyTo( aShareFile, aIniFile ) )
+ return FALSE;
+ }
+ Config aJavaCfg( aIniFile );
+ aJavaCfg.SetGroup( "Java" );
+ String aIniKey = pIniMgr->GetKeyName( eKey );
+ aJavaCfg.WriteKey( U2S(aIniKey), U2S(rValue) );
+ return TRUE;
+}
+
+//--------------------------------------------------------------------
+
+BOOL SfxApplication::GetOptions( SfxItemSet& rSet )
+{
+ BOOL bRet = FALSE;
+ SfxIniManager *pIni = GetIniManager();
+ SfxItemPool &rPool = GetPool();
+ SfxToolBoxConfig *pTbxCfg = SfxToolBoxConfig::GetOrCreate();
+ String aTRUEStr = 0x0031; // ^= '1'
+
+ const USHORT *pRanges = rSet.GetRanges();
+ while ( *pRanges )
+ {
+ for(USHORT nWhich = *pRanges++; nWhich <= *pRanges; ++nWhich)
+ {
+ switch(nWhich)
+ {
+ case SID_ATTR_BUTTON_OUTSTYLE3D :
+ if(rSet.Put( SfxBoolItem( rPool.GetWhich( SID_ATTR_BUTTON_OUTSTYLE3D ),
+ pTbxCfg->GetOutStyle() != TOOLBOX_STYLE_FLAT)))
+ bRet = TRUE;
+ break;
+ case SID_ATTR_BUTTON_BIGSIZE :
+ if(rSet.Put( SfxBoolItem( rPool.GetWhich( SID_ATTR_BUTTON_BIGSIZE ),
+ pTbxCfg->GetSymbolSet() == SFX_SYMBOLS_LARGE_COLOR)))
+ bRet = TRUE;
+ break;
+ case SID_ATTR_BACKUP :
+ if(rSet.Put( SfxBoolItem( rPool.GetWhich( SID_ATTR_BACKUP ),
+ pOptions->IsBackup())))
+ bRet = TRUE;
+ break;
+ case SID_ATTR_AUTOSAVE :
+ if(rSet.Put( SfxBoolItem( rPool.GetWhich( SID_ATTR_AUTOSAVE ),
+ pOptions->IsAutoSave())))
+ bRet = TRUE;
+ break;
+ case SID_ATTR_AUTOSAVEPROMPT :
+ if(rSet.Put( SfxBoolItem( rPool.GetWhich( SID_ATTR_AUTOSAVEPROMPT ),
+ pOptions->IsAutoSavePrompt())))
+ bRet = TRUE;
+ break;
+ case SID_ATTR_AUTOSAVEMINUTE :
+ if(rSet.Put( SfxUInt16Item( rPool.GetWhich( SID_ATTR_AUTOSAVEMINUTE ),
+ pOptions->GetAutoSaveTime())))
+ bRet = TRUE;
+ break;
+ case SID_ATTR_DOCINFO :
+ if(rSet.Put( SfxBoolItem( rPool.GetWhich( SID_ATTR_DOCINFO ),
+ pOptions->IsDocInfoSave())))
+ bRet = TRUE;
+ break;
+ case SID_ATTR_INDEP_METAFILE :
+ {
+ SfxDocumentInfo *pDocInf = SfxObjectShell::Current() ? &SfxObjectShell::Current()->GetDocInfo() : 0;
+ BOOL bIndepGraph = pDocInf ? pDocInf->IsPortableGraphics() : pOptions->IsIndepGrfFmt();
+ if(rSet.Put( SfxBoolItem( rPool.GetWhich( SID_ATTR_INDEP_METAFILE ),
+ bIndepGraph)))
+ bRet = TRUE;
+ break;
+ }
+ case SID_OPT_SAVEGRAPHICSCOMPRESSED :
+ {
+ SfxDocumentInfo *pDocInf = SfxObjectShell::Current() ? &SfxObjectShell::Current()->GetDocInfo() : 0;
+ BOOL bComprGraph = pDocInf ? pDocInf->IsSaveGraphicsCompressed() : pOptions->IsSaveGraphicsCompressed();
+ if(rSet.Put( SfxBoolItem( rPool.GetWhich( SID_OPT_SAVEGRAPHICSCOMPRESSED ),
+ bComprGraph ) ) )
+ bRet = TRUE;
+ break;
+ }
+ case SID_OPT_SAVEORIGINALGRAPHICS :
+ {
+ SfxDocumentInfo *pDocInf = SfxObjectShell::Current() ? &SfxObjectShell::Current()->GetDocInfo() : 0;
+ BOOL bOrigGraph = pDocInf ? pDocInf->IsSaveOriginalGraphics() : pOptions->IsSaveOriginalGraphics();
+ if(rSet.Put( SfxBoolItem( rPool.GetWhich( SID_OPT_SAVEORIGINALGRAPHICS ),
+ bOrigGraph ) ) )
+ bRet = TRUE;
+ break;
+ }
+ case SID_ATTR_WORKINGSET :
+ if(rSet.Put( SfxBoolItem( rPool.GetWhich( SID_ATTR_WORKINGSET ),
+ pOptions->IsSaveWorkingSet())))
+ bRet = TRUE;
+ break;
+ case SID_ATTR_SAVEDOCWINS :
+ if(rSet.Put( SfxBoolItem( rPool.GetWhich( SID_ATTR_SAVEDOCWINS ),
+ pOptions->IsSaveDocWins())))
+ bRet = TRUE;
+ break;
+ case SID_ATTR_SAVEDOCVIEW :
+ if(rSet.Put( SfxBoolItem( rPool.GetWhich( SID_ATTR_SAVEDOCVIEW ),
+ pOptions->IsSaveDocView())))
+ bRet = TRUE;
+ break;
+ case SID_ATTR_METRIC :
+ if(rSet.Put( SfxUInt16Item( rPool.GetWhich( SID_ATTR_METRIC ),
+ pOptions->GetMetric() ) ) )
+ bRet = TRUE;
+ break;
+ case SID_DOCMANAGER :
+ if(rSet.Put( SfxStringItem ( rPool.GetWhich( SID_DOCMANAGER ),
+ pOptions->GetDocumentManagerConfig() ) ) )
+ bRet = TRUE;
+ break;
+ case SID_HELPBALLOONS :
+ if(rSet.Put( SfxBoolItem ( rPool.GetWhich( SID_HELPBALLOONS ),
+ pOptions->IsHelpBalloons() ) ) )
+ bRet = TRUE;
+ break;
+ case SID_HELPTIPS :
+ if(rSet.Put( SfxBoolItem ( rPool.GetWhich( SID_HELPTIPS ),
+ pOptions->IsHelpTips() ) ) )
+ bRet = TRUE;
+ break;
+ case SID_ATTR_AUTOHELPAGENT :
+ if(rSet.Put( SfxBoolItem ( rPool.GetWhich( SID_ATTR_AUTOHELPAGENT ),
+ pOptions->IsAutoHelpAgent() ) ) )
+ bRet = TRUE;
+ break;
+ case SID_ATTR_WELCOMESCREEN :
+ if(rSet.Put( SfxBoolItem ( rPool.GetWhich( SID_ATTR_WELCOMESCREEN ),
+ pOptions->IsWelcomeScreen() ) ) )
+ bRet = TRUE;
+ break;
+ case SID_ATTR_UNDO_COUNT :
+ if(rSet.Put( SfxUInt16Item ( rPool.GetWhich( SID_ATTR_UNDO_COUNT ),
+ pOptions->GetUndoCount() ) ) )
+ bRet = TRUE;
+ break;
+ case SID_INET_HOMEPAGE :
+ if(rSet.Put( SfxStringItem ( rPool.GetWhich( SID_INET_HOMEPAGE ),
+ pIni->Get(SFX_KEY_INET_HOME) ) ) )
+ bRet = TRUE;
+ break;
+ case SID_INET_MEMCACHE :
+ if(rSet.Put( SfxUInt16Item ( rPool.GetWhich( SID_INET_MEMCACHE ),
+ pIni->Get(SFX_KEY_INET_MEMCACHE).ToInt32() ) ) )
+ bRet = TRUE;
+ break;
+ case SID_INET_DISKCACHE :
+ if(rSet.Put( SfxUInt32Item ( rPool.GetWhich( SID_INET_DISKCACHE ),
+ pIni->Get(SFX_KEY_INET_DISKCACHE).ToInt32() ) ) )
+ bRet = TRUE;
+ break;
+ case SID_INET_EXPIRATION :
+ if(rSet.Put( SfxUInt16Item ( rPool.GetWhich( SID_INET_EXPIRATION ),
+ pIni->Get(SFX_KEY_INET_CACHEEXPIRATION).ToInt32() ) ) )
+ bRet = TRUE;
+ break;
+ case SID_INET_CACHEJS :
+ if(rSet.Put( SfxBoolItem( rPool.GetWhich( SID_INET_CACHEJS),
+ pIni->Get(SFX_KEY_INET_CACHEJS).ToInt32() ) ) )
+ bRet = TRUE;
+ break;
+ case SID_INET_CACHEEXPIRED :
+ if(rSet.Put( SfxBoolItem( rPool.GetWhich( SID_INET_CACHEEXPIRED),
+ pIni->Get(SFX_KEY_INET_CACHEEXPIRED).ToInt32() ) ) )
+ bRet = TRUE;
+ break;
+ case SID_INET_CACHEABORTED :
+ if(rSet.Put( SfxBoolItem( rPool.GetWhich( SID_INET_CACHEABORTED),
+ pIni->Get(SFX_KEY_INET_CACHEABORTED).ToInt32() ) ) )
+ bRet = TRUE;
+ break;
+ case SID_INET_REVEAL_MAILADDR :
+ if(rSet.Put( SfxBoolItem ( rPool.GetWhich( SID_INET_REVEAL_MAILADDR),
+ (BOOL)(USHORT)pIni->Get(SFX_KEY_INET_REVEAL_MAILADDR).ToInt32() ) ) )
+ bRet = TRUE;
+ break;
+ case SID_SAVEREL_INET :
+ if(rSet.Put( SfxBoolItem ( rPool.GetWhich( SID_SAVEREL_INET ),
+ pOptions->IsSaveRelINet() ) ) )
+ bRet = TRUE;
+ break;
+ case SID_SAVEREL_FSYS :
+ if(rSet.Put( SfxBoolItem ( rPool.GetWhich( SID_SAVEREL_FSYS ),
+ pOptions->IsSaveRelFSys() ) ) )
+ bRet = TRUE;
+ break;
+ case SID_INET_SMTPSERVER :
+ if(rSet.Put( SfxStringItem ( rPool.GetWhich( SID_INET_SMTPSERVER),
+ pIni->Get(SFX_KEY_INET_SMTPSERVER) ) ) )
+ bRet = TRUE;
+ break;
+ case SID_INET_POPSERVER :
+ if(rSet.Put( SfxStringItem ( rPool.GetWhich( SID_INET_POPSERVER),
+ pIni->Get(SFX_KEY_INET_POPSERVER) ) ) )
+ bRet = TRUE;
+ break;
+ case SID_INET_NNTPSERVER :
+ if(rSet.Put( SfxStringItem ( rPool.GetWhich( SID_INET_NNTPSERVER),
+ pIni->Get(SFX_KEY_INET_NNTPSERVER) ) ) )
+ bRet = TRUE;
+ break;
+ case SID_INET_MAXNEWS :
+ if(rSet.Put( SfxUInt16Item ( rPool.GetWhich( SID_INET_MAXNEWS),
+ pIni->Get(SFX_KEY_INET_MAXNEWS).ToInt32() ) ) )
+ bRet = TRUE;
+ break;
+ case SID_INET_MAXHTTPCONS :
+ if(rSet.Put( SfxUInt16Item ( rPool.GetWhich( SID_INET_MAXHTTPCONS),
+ pIni->Get(SFX_KEY_INET_MAXHTTPCONS).ToInt32() ) ) )
+ bRet = TRUE;
+ break;
+ case SID_INET_MAXFTPCONS :
+ if(rSet.Put( SfxUInt16Item ( rPool.GetWhich( SID_INET_MAXFTPCONS),
+ pIni->Get(SFX_KEY_INET_MAXFTPCONS).ToInt32() ) ) )
+ bRet = TRUE;
+ break;
+ case SID_INET_SMTPGATEWAY :
+ if(rSet.Put( SfxStringItem ( rPool.GetWhich( SID_INET_SMTPGATEWAY),
+ pIni->Get(SFX_KEY_INET_MAILGATEWAY) ) ) )
+ bRet = TRUE;
+ break;
+ case SID_INET_MAILUSERNAME :
+ if(rSet.Put( SfxStringItem ( rPool.GetWhich( SID_INET_MAILUSERNAME),
+ pIni->Get(SFX_KEY_INET_MAILUSERNAME) ) ) )
+ bRet = TRUE;
+ break;
+ case SID_ATTR_ALLOWFOLDERWEBVIEW :
+ if(rSet.Put( SfxStringItem( rPool.GetWhich(SID_ATTR_ALLOWFOLDERWEBVIEW),
+ pIni->Get(SFX_KEY_ALLOWFOLDERWEBVIEW) ) ) )
+ bRet = TRUE;
+ break;
+ case SID_INET_MAILPASSWORD :
+ if(rSet.Put( SfxStringItem ( rPool.GetWhich( SID_INET_MAILPASSWORD),
+ SfxStringDecode( pIni->Get(SFX_KEY_INET_MAILPASSWORD) ) ) ) )
+ bRet = TRUE;
+ break;
+ case SID_INET_MAILTEXTFORMAT :
+ {
+ String aTextFormat = pIni->Get( SFX_KEY_INET_MAILTEXTFORMAT );
+ BYTE nTextFormat = (BYTE)(USHORT)aTextFormat.ToInt32();
+ if(rSet.Put( SfxByteItem( rPool.GetWhich( SID_INET_MAILTEXTFORMAT ),
+ nTextFormat ) ) )
+ bRet = TRUE;
+ break;
+ }
+ case SID_BASIC_ENABLED :
+ if ( rSet.Put( SfxUInt16Item( rPool.GetWhich( SID_BASIC_ENABLED ),
+ pIni->Get(SFX_KEY_BASIC_ENABLE).ToInt32()) ) )
+ bRet = TRUE;
+ break;
+
+ case SID_INET_JAVA_ENABLE:
+ {
+ String aIniEntry = GetJavaIniEntry_Impl( SFX_KEY_JAVA_ENABLE, pIni );
+ if ( rSet.Put( SfxBoolItem(
+ rPool.GetWhich( SID_INET_JAVA_ENABLE ), ( aIniEntry == aTRUEStr ) ) ) )
+ bRet = TRUE;
+ break;
+ }
+
+ case SID_INET_EXE_APPLETS :
+ {
+ String aIniEntry = GetJavaIniEntry_Impl( SFX_KEY_INET_EXE_APPLETS, pIni );
+ if ( rSet.Put( SfxBoolItem(
+ rPool.GetWhich( SID_INET_EXE_APPLETS ), ( aIniEntry == aTRUEStr ) ) ) )
+ bRet = TRUE;
+ break;
+ }
+ case SID_INET_JAVA_ACCESSTYPE:
+ {
+ SjNetAccess eAccess = NET_HOST;
+ String aNetAccess = GetJavaIniEntry_Impl( SFX_KEY_JAVA_NETACCESS, pIni );
+ if ( aNetAccess.Len() )
+ {
+ if ( aNetAccess.CompareIgnoreCaseToAscii( "UNRESTRICTED" ) == COMPARE_EQUAL )
+ eAccess = NET_UNRESTRICTED;
+ else if ( aNetAccess.CompareIgnoreCaseToAscii( "NONE" ) == COMPARE_EQUAL )
+ eAccess = NET_NONE;
+ }
+
+ if ( rSet.Put( SfxUInt16Item( rPool.GetWhich( SID_INET_JAVA_ACCESSTYPE ), (USHORT)eAccess ) ) )
+ bRet = TRUE;
+ break;
+ }
+ case SID_INET_JAVA_SECURITY:
+ {
+ String aIniEntry = GetJavaIniEntry_Impl( SFX_KEY_JAVA_SECURITY, pIni );
+ if ( rSet.Put( SfxBoolItem(
+ rPool.GetWhich( SID_INET_JAVA_SECURITY ), ( aIniEntry.CompareToAscii("0") != COMPARE_EQUAL ) ) ) )
+ bRet = TRUE;
+ break;
+ }
+ case SID_INET_JAVA_CLASSPATH :
+ {
+ String aIniEntry = GetJavaIniEntry_Impl( SFX_KEY_JAVA_USERCLASSPATH, pIni );
+ if ( rSet.Put( SfxStringItem( rPool.GetWhich( SID_INET_JAVA_CLASSPATH ), aIniEntry ) ) )
+ bRet = TRUE;
+ break;
+ }
+
+ case SID_INET_EXE_PLUGIN :
+ if ( rSet.Put( SfxBoolItem( rPool.GetWhich( SID_INET_EXE_PLUGIN ),
+ ( pIni->Get( SFX_KEY_INET_EXE_PLUGIN ) == aTRUEStr ) ) ) )
+ bRet = TRUE;
+ break;
+ case SID_INET_USERAGENT :
+ if ( rSet.Put( SfxStringItem( rPool.GetWhich(SID_INET_USERAGENT ),
+ pIni->Get( SFX_KEY_INET_USERAGENT ) ) ) )
+ bRet = TRUE;
+ break;
+ case SID_INET_NONCACHED_SERVER :
+ if ( rSet.Put( SfxStringItem( rPool.GetWhich( SID_INET_NONCACHED_SERVER ),
+ pIni->Get( SFX_KEY_INET_NONCACHED_SERVER ) ) ) )
+ bRet = TRUE;
+ break;
+ case SID_INET_DNS_SERVER :
+ if ( rSet.Put( SfxStringItem( rPool.GetWhich(SID_INET_DNS_SERVER),
+ pIni->Get(SFX_KEY_INET_DNS ) ) ) )
+ bRet = TRUE;
+ break;
+ case SID_INET_DNS_AUTO :
+ if ( rSet.Put( SfxBoolItem( rPool.GetWhich( SID_INET_DNS_AUTO ),
+ !pIni->Get(SFX_KEY_INET_DNS).Len() ) ) )
+ bRet = TRUE;
+ break;
+ case SID_INET_CHANNELS_ONOFF :
+ if ( rSet.Put( SfxBoolItem( rPool.GetWhich( SID_INET_CHANNELS_ONOFF ),
+ ( pIni->Get( SFX_KEY_INET_CHANNELS ) == aTRUEStr ) ) ) )
+ bRet = TRUE;
+ break;
+ case SID_INET_COOKIESHANDLE :
+ if ( rSet.Put( SfxUInt16Item ( rPool.GetWhich(SID_INET_COOKIESHANDLE),
+ pIni->Get(SFX_KEY_INET_COOKIES).ToInt32() ) ) )
+ bRet = TRUE;
+ break;
+ case SID_ATTR_SMARTBEAMER :
+ if ( rSet.Put( SfxBoolItem( rPool.GetWhich( SID_ATTR_SMARTBEAMER ),
+ pAppData_Impl->bSmartBeamer ) ) )
+ bRet = TRUE;
+ break;
+ case SID_OPT_EXTBRW_ON :
+ if ( rSet.Put( SfxBoolItem( rPool.GetWhich( SID_OPT_EXTBRW_ON ),
+ ( pIni->Get( SFX_KEY_EXTBRW_ON ) == aTRUEStr ) ) ) )
+ bRet = TRUE;
+ break;
+ case SID_OPT_EXTBRW_ON_EXCEPTION :
+ {
+ List aList;
+ USHORT nCount = pIni->Get(SFX_KEY_EXTBRW_ON_EXCEPTION).ToInt32();
+ USHORT n;
+ for ( n = 0; n < nCount; ++n )
+ aList.Insert( new String( pIni->Get(SFX_KEY_EXTBRW_ON_EXCEPTION, n) ), LIST_APPEND );
+ if ( rSet.Put( SfxStringListItem( rPool.GetWhich(SID_OPT_EXTBRW_ON_EXCEPTION),
+ &aList ) ) )
+ bRet = TRUE;
+ for ( n = 0; n < nCount; ++n )
+ delete (String*)aList.GetObject(n);
+ aList.Clear();
+ break;
+ }
+ case SID_OPT_EXTBRW_OFF_EXCEPTION :
+ {
+ List aList;
+ USHORT nCount = pIni->Get(SFX_KEY_EXTBRW_OFF_EXCEPTION).ToInt32();
+ USHORT n;
+ for ( n = 0; n < nCount; ++n )
+ aList.Insert( new String( pIni->Get(SFX_KEY_EXTBRW_OFF_EXCEPTION, n) ), LIST_APPEND );
+ if ( rSet.Put( SfxStringListItem( rPool.GetWhich(SID_OPT_EXTBRW_OFF_EXCEPTION),
+ &aList ) ) )
+ bRet = TRUE;
+ for ( n = 0; n < nCount; ++n )
+ delete (String*)aList.GetObject(n);
+ aList.Clear();
+ break;
+ }
+ case SID_SECURE_URL :
+ {
+ List aList;
+ USHORT nCount = pIni->Get( SFX_KEY_SECURE_URL ).ToInt32();
+ USHORT n;
+ for ( n = 0; n < nCount; ++n )
+ aList.Insert( new String( pIni->Get(SFX_KEY_SECURE_URL, n) ), LIST_APPEND );
+ if ( rSet.Put( SfxStringListItem( rPool.GetWhich(SID_SECURE_URL),
+ &aList ) ) )
+ bRet = TRUE;
+ for ( n = 0; n < nCount; ++n )
+ delete (String*)aList.GetObject(n);
+ aList.Clear();
+ break;
+ }
+ case SID_ICONGRID :
+ {
+ String aIconGrid( pIni->Get(SFX_KEY_ICONGRID) );
+ if ( rSet.Put( SfxSizeItem( rPool.GetWhich( SID_ICONGRID ),
+ Size( aIconGrid.GetToken(0).ToInt32(), aIconGrid.GetToken(1).ToInt32() ) ) ) )
+ bRet = TRUE;
+ break;
+ }
+
+ case SID_AUTO_ADJUSTICONS :
+ {
+ String aIconGrid( pIni->Get(SFX_KEY_ICONGRID) );
+ if ( rSet.Put( SfxUInt16Item( rPool.GetWhich( SID_AUTO_ADJUSTICONS ),
+ (UINT16)aIconGrid.GetToken(2).ToInt32() )) )
+ bRet = TRUE;
+ break;
+ }
+ case SID_RESTORE_EXPAND_STATE :
+ {
+ String aRestoreExpand( pIni->Get( SFX_KEY_AUTOOPEN ));
+ BOOL bRestoreExpand = TRUE;
+ if( aRestoreExpand.Len() )
+ bRestoreExpand = ((USHORT)aRestoreExpand.ToInt32()) > 0 ? TRUE : FALSE;
+ if( rSet.Put( SfxBoolItem( rPool.GetWhich( SID_RESTORE_EXPAND_STATE ),
+ bRestoreExpand )))
+ bRet = TRUE;
+ break;
+ }
+ case SID_ENABLE_METAFILEPRINT :
+ if( rSet.Put( SfxBoolItem( rPool.GetWhich( SID_ENABLE_METAFILEPRINT ),
+ (BOOL)(USHORT)pIni->Get(SFX_KEY_METAFILEPRINT ).ToInt32() ) ) )
+ bRet = TRUE;
+ break;
+ case SID_INET_PROXY_TYPE :
+ if(rSet.Put( SfxUInt16Item ( rPool.GetWhich( SID_INET_PROXY_TYPE ),
+ pIni->Get(SFX_KEY_INET_PROXYTYPE).ToInt32() ) ) )
+ bRet = TRUE;
+ break;
+ case SID_INET_FTP_PROXY_NAME :
+ if ( rSet.Put( SfxStringItem ( rPool.GetWhich(SID_INET_FTP_PROXY_NAME ),
+ pIni->Get(SFX_KEY_INET_FTPPROXYNAME) ) ) )
+ bRet = TRUE;
+ break;
+ case SID_INET_FTP_PROXY_PORT :
+ if ( rSet.Put( SfxInt32Item ( rPool.GetWhich(SID_INET_FTP_PROXY_PORT ),
+ pIni->Get(SFX_KEY_INET_FTPPROXYPORT).ToInt32() ) ) )
+ bRet = TRUE;
+ break;
+ case SID_INET_HTTP_PROXY_NAME :
+ if ( rSet.Put( SfxStringItem ( rPool.GetWhich(SID_INET_HTTP_PROXY_NAME ),
+ pIni->Get(SFX_KEY_INET_HTTPPROXYNAME) ) ) )
+ bRet = TRUE;
+ break;
+ case SID_INET_HTTP_PROXY_PORT :
+ if ( rSet.Put( SfxInt32Item( rPool.GetWhich(SID_INET_HTTP_PROXY_PORT ),
+ pIni->Get(SFX_KEY_INET_HTTPPROXYPORT).ToInt32() ) ) )
+ bRet = TRUE;
+ break;
+ case SID_INET_SOCKS_PROXY_NAME :
+ if ( rSet.Put( SfxStringItem ( rPool.GetWhich(SID_INET_SOCKS_PROXY_NAME ),
+ pIni->Get(SFX_KEY_INET_SOCKSPROXYNAME) ) ) )
+ bRet = TRUE;
+ break;
+ case SID_INET_SOCKS_PROXY_PORT :
+ if ( rSet.Put( SfxInt32Item( rPool.GetWhich(SID_INET_SOCKS_PROXY_PORT ),
+ pIni->Get(SFX_KEY_INET_SOCKSPROXYPORT).ToInt32() ) ) )
+ bRet = TRUE;
+ break;
+ case SID_INET_SECURITY_PROXY_NAME :
+ if ( rSet.Put( SfxStringItem ( rPool.GetWhich(SID_INET_SECURITY_PROXY_NAME ),
+ pIni->Get(SFX_KEY_INET_SECURITYPROXYNAME) ) ) )
+ bRet = TRUE;
+ break;
+ case SID_INET_SECURITY_PROXY_PORT :
+ if ( rSet.Put( SfxInt32Item( rPool.GetWhich(SID_INET_SECURITY_PROXY_PORT ),
+ pIni->Get(SFX_KEY_INET_SECURITYPROXYPORT).ToInt32() ) ) )
+ bRet = TRUE;
+ break;
+ case SID_INET_NOPROXY :
+ if(rSet.Put( SfxStringItem ( rPool.GetWhich( SID_INET_NOPROXY),
+ pIni->Get(SFX_KEY_INET_NOPROXY) ) ) )
+ bRet = TRUE;
+ break;
+ case SID_ATTR_PATHNAME :
+ case SID_ATTR_PATHGROUP :
+ {
+ SfxAllEnumItem aNames(rPool.GetWhich(SID_ATTR_PATHGROUP));
+ SfxAllEnumItem aValues(rPool.GetWhich(SID_ATTR_PATHNAME));
+ pIni->Fill(SFX_GROUP_DIR, aNames, aValues);
+ if ( rSet.Put(aNames) || rSet.Put(aValues) )
+ bRet = TRUE;
+ break;
+ }
+ default:
+ DBG_WARNING( "W1:Wrong ID while getting Options!" );
+ break;
+ }
+#ifdef DBG_UTIL
+ if ( !bRet )
+ DBG_ERROR( "Putting options failed!" );
+#endif
+ }
+ }
+
+ return bRet;
+}
+
+//--------------------------------------------------------------------
+
+BOOL SfxApplication::IsSecureURL( const INetURLObject& rURL, const String* pReferer ) const
+{
+ // unkritisches Protokoll?
+ INetProtocol eProt = rURL.GetProtocol();
+ if ( INET_PROT_MACRO != eProt && INET_PROT_SLOT != eProt )
+ return TRUE;
+ if ( rURL.GetMainURL().CompareIgnoreCaseToAscii( "macro://#", 9 ) == COMPARE_EQUAL )
+ return TRUE;
+
+ if ( rURL.GetMainURL().CompareToAscii("slot:5500") == COMPARE_EQUAL )
+ return TRUE;
+
+ // StarBasic-Modus abholen
+ SfxIniManager *pIni = GetIniManager();
+ USHORT nStarBasicMode = pIni->Get(SFX_KEY_BASIC_ENABLE).ToInt32();
+
+ // StarBasic gar nicht erlaubt?
+ if ( 0 == nStarBasicMode )
+ return FALSE;
+
+ // StarBasic immer erlaubt?
+ if ( 2 == nStarBasicMode )
+ return TRUE;
+
+ // trusted referer?
+ BOOL bTrusted = FALSE;
+ if ( pReferer && pReferer->Len() )
+ {
+ // secure-URLs noch nicht geladen?
+ if ( !pAppData_Impl->pSecureURLs )
+ {
+ pAppData_Impl->pSecureURLs = new SvStrings;
+ USHORT nCount = pIni->Get(SFX_KEY_SECURE_URL).ToInt32();
+ USHORT nPos = 0;
+ for ( USHORT n = 0; n < nCount; ++n )
+ {
+ String aURL = pIni->Get(SFX_KEY_SECURE_URL, n);
+ if ( aURL.Len() )
+ pAppData_Impl->pSecureURLs->Insert( new String( aURL ), nPos++ );
+ }
+ }
+
+ // suchen
+ for ( USHORT n = 0; !bTrusted && n < pAppData_Impl->pSecureURLs->Count(); ++n )
+ {
+ const String* pSecureURL = pAppData_Impl->pSecureURLs->GetObject(n);
+ String aSecureURL( *pSecureURL );
+ aSecureURL += DEFINE_CONST_UNICODE('*');
+ bTrusted = WildCard( aSecureURL ).Matches( *pReferer );
+ }
+ }
+
+ // gemaess Liste
+ return bTrusted;
+}
+
+//--------------------------------------------------------------------
+
+BOOL SfxApplication::UseExternBrowser() const
+{
+ if ( pAppData_Impl->bUseExternBrowser == 2 )
+ {
+ // Noch nicht initialisiert
+ SfxIniManager* pIni = GetIniManager();
+ pAppData_Impl->bUseExternBrowser = ((BOOL) (USHORT) pIni->Get(SFX_KEY_EXTBRW_ON).ToInt32() ) &&
+ ( pIni->IsInternetExplorerAvailable() || pIni->Get( SFX_KEY_EXTBRW_FILE ).Len() );
+ }
+
+ return pAppData_Impl->bUseExternBrowser;
+}
+
+//--------------------------------------------------------------------
+
+BOOL SfxApplication::ShouldUseExternalBrowser( const INetURLObject& rURL ) const
+{
+ SfxIniManager* pIni = GetIniManager();
+ if( !pIni->IsInternetExplorerAvailable() && !pIni->Get( SFX_KEY_EXTBRW_FILE ).Len() )
+ // Wenn es keinen externen Browser gibt
+ return FALSE;
+
+ // Welche Liste ?
+ SvStrings*& rpList = UseExternBrowser() ? pAppData_Impl->pExtBrwOnExceptionList
+ : pAppData_Impl->pExtBrwOffExceptionList;
+
+ // ExceptionList noch nicht geladen?
+ if ( !rpList )
+ {
+ rpList = new SvStrings;
+ USHORT nKey = pAppData_Impl->bUseExternBrowser ? SFX_KEY_EXTBRW_ON_EXCEPTION : SFX_KEY_EXTBRW_OFF_EXCEPTION;
+ USHORT nCount = pIni->Get( nKey ).ToInt32();
+ for ( USHORT i = 0; i < nCount; ++i )
+ rpList->Insert( new String( pIni->Get( nKey, i ) ), i );
+ }
+
+ BOOL bIn = FALSE;
+ String aURL( rURL.GetMainURL().ToLowerAscii() );
+ USHORT nCount = rpList->Count();
+ String aName = rURL.GetMainURL();
+
+ for ( USHORT n = 0; !bIn && n<nCount; ++n )
+ {
+ String aURL = rpList->GetObject(n)->ToLowerAscii();
+ aURL += DEFINE_CONST_UNICODE('*');
+ bIn = WildCard( aURL ).Matches( aName );
+ }
+
+ return pAppData_Impl->bUseExternBrowser ? !bIn : bIn;
+}
+
+//--------------------------------------------------------------------
+
+void SfxApplication::SetOptions_Impl( const SfxItemSet& rSet )
+{
+ SfxIniManager *pIni = GetIniManager();
+ pIni->EnterLock();
+ const SfxPoolItem *pItem = 0;
+ SfxItemPool &rPool = GetPool();
+ BOOL bResetSession = FALSE;
+ BOOL bProxiesModified = FALSE;
+
+ SfxToolBoxConfig *pTbxCfg = SfxToolBoxConfig::GetOrCreate();
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_BUTTON_OUTSTYLE3D), TRUE, &pItem) )
+ {
+ DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected");
+ USHORT nOutStyle =
+ ( (const SfxBoolItem *)pItem)->GetValue() ? 0 : TOOLBOX_STYLE_FLAT;
+ pTbxCfg->SetOutStyle( nOutStyle );
+ }
+
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_BUTTON_BIGSIZE), TRUE, &pItem) )
+ {
+ DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected");
+ BOOL bBigSize = ( (const SfxBoolItem*)pItem )->GetValue();
+ pTbxCfg->SetSymbolSet( bBigSize ? SFX_SYMBOLS_LARGE_COLOR : SFX_SYMBOLS_SMALL_COLOR );
+ GetWorkWindow_Impl( SfxViewFrame::Current() )->UpdateObjectBars_Impl();
+ }
+
+ // Backup
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_BACKUP), TRUE, &pItem) )
+ {
+ DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected");
+ pOptions->SetBackup( ( (const SfxBoolItem*)pItem )->GetValue() );
+ }
+
+ // AutoSave
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_AUTOSAVE), TRUE, &pItem))
+ {
+ DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected");
+ pOptions->SetAutoSave( ( (const SfxBoolItem*)pItem )->GetValue() );
+ }
+
+ // AutoSave-Propt
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_AUTOSAVEPROMPT), TRUE, &pItem))
+ {
+ DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected");
+ pOptions->SetAutoSavePrompt(((const SfxBoolItem *)pItem)->GetValue());
+ }
+
+ // AutoSave-Time
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_AUTOSAVEMINUTE), TRUE, &pItem))
+ {
+ DBG_ASSERT(pItem->ISA(SfxUInt16Item), "UInt16Item expected");
+ pOptions->SetAutoSaveTime(((const SfxUInt16Item *)pItem)->GetValue());
+ }
+
+ // DocInfo
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_DOCINFO), TRUE, &pItem))
+ {
+ DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected");
+ pOptions->SetDocInfoSave(((const SfxBoolItem *)pItem)->GetValue());
+ }
+
+ // portable Grafiken
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_INDEP_METAFILE), TRUE, &pItem))
+ {
+ DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected");
+ BOOL b = ((const SfxBoolItem *)pItem)->GetValue();
+ pOptions->SetIndepGrfFmt(b);
+ }
+
+ // Grafiken komprimiert speichern
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_OPT_SAVEGRAPHICSCOMPRESSED), TRUE, &pItem))
+ {
+ DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected");
+ BOOL b = ((const SfxBoolItem *)pItem)->GetValue();
+ pOptions->SetSaveGraphicsCompressed(b);
+ }
+
+ // Grafiken im Original speichern
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_OPT_SAVEORIGINALGRAPHICS), TRUE, &pItem))
+ {
+ DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected");
+ BOOL b = ((const SfxBoolItem *)pItem)->GetValue();
+ pOptions->SetSaveOriginalGraphics(b);
+ }
+
+ // offende Dokumente merken
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_WORKINGSET), TRUE, &pItem))
+ {
+ DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected");
+ pOptions->SetSaveWorkingSet(((const SfxBoolItem *)pItem)->GetValue());
+ }
+
+ // offene Fenster speichern
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_SAVEDOCWINS), TRUE, &pItem))
+ {
+ DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected");
+ pOptions->SetSaveDocWins(((const SfxBoolItem *)pItem)->GetValue());
+ }
+
+ // Fenster-Einstellung speichern
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_SAVEDOCVIEW), TRUE, &pItem))
+ {
+ DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected");
+ pOptions->SetSaveDocView(((const SfxBoolItem *)pItem)->GetValue());
+ }
+
+ // Metric
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_METRIC), TRUE, &pItem))
+ {
+ DBG_ASSERT(pItem->ISA(SfxUInt16Item), "UInt16Item expected");
+ pOptions->SetMetric((FieldUnit)((const SfxUInt16Item*)pItem)->GetValue());
+ }
+
+ // Docmanager
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_DOCMANAGER), TRUE, &pItem))
+ {
+ DBG_ASSERT(pItem->ISA(SfxStringItem), "StringItem expected");
+ pOptions->SetDocumentManagerConfig(((const SfxStringItem *)pItem)->GetValue());
+ }
+
+ // HelpBalloons
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_HELPBALLOONS), TRUE, &pItem))
+ {
+ DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected");
+ pOptions->SetHelpBalloons(((const SfxBoolItem *)pItem)->GetValue());
+ }
+
+ // HelpTips
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_HELPTIPS), TRUE, &pItem))
+ {
+ DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected");
+ pOptions->SetHelpTips(((const SfxBoolItem *)pItem)->GetValue());
+ }
+
+ // AutoHelpAgent
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_AUTOHELPAGENT ), TRUE, &pItem))
+ {
+ DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected");
+ pOptions->SetAutoHelpAgent( ((const SfxBoolItem *)pItem)->GetValue() );
+ }
+
+ // AutoHelpAgent-Reset
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_AUTOHELPAGENT_RESET ), TRUE, &pItem))
+ {
+ DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected");
+ BOOL bReset = ((const SfxBoolItem *)pItem)->GetValue();
+ Help* pHelp = Application::GetHelp();
+ if ( bReset && pHelp )
+ ((SfxHelp_Impl*)pHelp)->ResetPIStarterList();
+ }
+
+ // WelcomeScreen
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_WELCOMESCREEN ), TRUE, &pItem))
+ {
+ DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected");
+ pOptions->SetWelcomeScreen( ((const SfxBoolItem *)pItem)->GetValue() );
+ }
+
+ // WelcomeScreen
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_WELCOMESCREEN_RESET ), TRUE, &pItem))
+ {
+ DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected");
+ BOOL bReset = ((const SfxBoolItem *)pItem)->GetValue();
+ if ( bReset )
+ {
+ Config aConfig( SfxHelp_Impl::GetHelpAgentConfig() );
+ ImplSetLanguageGroup( aConfig, DEFINE_CONST_UNICODE( "WelcomeScreen" ), TRUE );
+ USHORT nTips = aConfig.GetKeyCount();
+ ByteString aOn = ByteString::CreateFromInt32( 1 );
+ for ( USHORT nTip = 0; nTip < nTips; nTip++ )
+ aConfig.WriteKey( aConfig.GetKeyName( nTip ), aOn );
+ }
+ }
+
+ // SaveRelINet
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_SAVEREL_INET), TRUE, &pItem))
+ {
+ DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected");
+ pOptions->SetSaveRelINet(((const SfxBoolItem *)pItem)->GetValue());
+ }
+
+ // SaveRelFSys
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_SAVEREL_FSYS), TRUE, &pItem))
+ {
+ DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected");
+ pOptions->SetSaveRelFSys(((const SfxBoolItem *)pItem)->GetValue());
+ }
+
+ // Undo-Count
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_UNDO_COUNT), TRUE, &pItem))
+ {
+ DBG_ASSERT(pItem->ISA(SfxUInt16Item), "UInt16Item expected");
+ USHORT nUndoCount = ((const SfxUInt16Item*)pItem)->GetValue();
+ pOptions->SetUndoCount( nUndoCount );
+
+ // um alle Undo-Manager zu erwischen: "uber alle Frames iterieren
+ for ( SfxViewFrame *pFrame = SfxViewFrame::GetFirst();
+ pFrame;
+ pFrame = SfxViewFrame::GetNext(*pFrame) )
+ {
+ // den Dispatcher des Frames rausholen
+ SfxDispatcher *pDispat = pFrame->GetDispatcher();
+ pDispat->Flush();
+
+ // "uber alle SfxShells auf dem Stack des Dispatchers iterieren
+ USHORT nIdx = 0;
+ for ( SfxShell *pSh = pDispat->GetShell(nIdx);
+ pSh;
+ ++nIdx, pSh = pDispat->GetShell(nIdx) )
+ {
+ SfxUndoManager *pUndoMgr = pSh->GetUndoManager();
+ if ( pUndoMgr )
+ pUndoMgr->SetMaxUndoActionCount( nUndoCount );
+ }
+ }
+ }
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_INET_HOMEPAGE), TRUE, &pItem))
+ {
+ DBG_ASSERT(pItem->ISA(SfxStringItem), "StringItem expected");
+ pIni->Set(((const SfxStringItem *)pItem)->GetValue(), SFX_KEY_INET_HOME);
+ }
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_INET_MEMCACHE), TRUE, &pItem))
+ {
+ DBG_ASSERT( pItem->ISA(SfxUInt16Item), "UInt16Item expected" );
+ USHORT nCount = ( (const SfxUInt16Item *)pItem )->GetValue();
+ pIni->Set( String::CreateFromInt32( nCount ), SFX_KEY_INET_MEMCACHE );
+ SfxPickList_Impl::Get()->GetMemCache().ClearToLimit( nCount );
+ }
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_INET_DISKCACHE), TRUE, &pItem))
+ {
+ DBG_ASSERT( pItem->ISA(SfxUInt32Item), "UInt32Item expected" );
+ String aValue = String::CreateFromInt32( ( (const SfxUInt32Item*)pItem )->GetValue() );
+ pIni->Set( aValue, SFX_KEY_INET_DISKCACHE );
+ bResetSession = TRUE;
+ }
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_INET_EXPIRATION), TRUE, &pItem))
+ {
+ DBG_ASSERT( pItem->ISA(SfxUInt16Item), "UInt16Item expected" );
+ String aValue = String::CreateFromInt32( ( (const SfxUInt16Item*)pItem )->GetValue() );
+ pIni->Set( aValue, SFX_KEY_INET_CACHEEXPIRATION );
+ bResetSession = TRUE;
+ }
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_INET_CACHEJS), TRUE, &pItem))
+ {
+ DBG_ASSERT( pItem->ISA(SfxBoolItem), "BoolItem expected" );
+ INT32 nFlag = (USHORT)( (const SfxBoolItem*)pItem )->GetValue();
+ pIni->Set( String::CreateFromInt32( nFlag ), SFX_KEY_INET_CACHEJS );
+ }
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_INET_CACHEEXPIRED), TRUE, &pItem))
+ {
+ DBG_ASSERT( pItem->ISA(SfxBoolItem), "BoolItem expected" );
+ INT32 nFlag = (USHORT)( (const SfxBoolItem*)pItem )->GetValue();
+ pIni->Set( String::CreateFromInt32( nFlag ), SFX_KEY_INET_CACHEEXPIRED );
+ // Ist auch eine Einstellung fuer die Session
+ bResetSession = TRUE;
+ }
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_INET_CACHEABORTED), TRUE, &pItem))
+ {
+ DBG_ASSERT( pItem->ISA(SfxBoolItem), "BoolItem expected" );
+ INT32 nFlag = (USHORT)( (const SfxBoolItem*)pItem )->GetValue();
+ pIni->Set( String::CreateFromInt32( nFlag ), SFX_KEY_INET_CACHEABORTED );
+ }
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_INET_REVEAL_MAILADDR), TRUE, &pItem))
+ {
+ DBG_ASSERT( pItem->ISA(SfxBoolItem), "BoolItem expected" );
+ INT32 nFlag = (USHORT)( (const SfxBoolItem*)pItem )->GetValue();
+ pIni->Set( String::CreateFromInt32( nFlag ), SFX_KEY_INET_REVEAL_MAILADDR );
+ bResetSession = TRUE;
+ }
+
+ // SMTP-Server
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_INET_SMTPSERVER), TRUE, &pItem))
+ {
+ DBG_ASSERT(pItem->ISA(SfxStringItem), "StringItem expected");
+ pIni->Set(((const SfxStringItem *)pItem)->GetValue(), SFX_KEY_INET_SMTPSERVER);
+ bResetSession = TRUE;
+ }
+
+ // POP-Server
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_INET_POPSERVER), TRUE, &pItem))
+ {
+ DBG_ASSERT(pItem->ISA(SfxStringItem), "StringItem expected");
+ pIni->Set(((const SfxStringItem *)pItem)->GetValue(), SFX_KEY_INET_POPSERVER);
+ bResetSession = TRUE;
+ }
+
+ // NNTP-Server
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_INET_NNTPSERVER), TRUE, &pItem))
+ {
+ DBG_ASSERT(pItem->ISA(SfxStringItem), "StringItem expected");
+ pIni->Set(((const SfxStringItem *)pItem)->GetValue(), SFX_KEY_INET_NNTPSERVER);
+ bResetSession = TRUE;
+ }
+
+ // MaxNewsMessages
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_INET_MAXNEWS), TRUE, &pItem))
+ {
+ DBG_ASSERT( pItem->ISA(SfxUInt16Item), "UInt16Item expected" );
+ String aValue = String::CreateFromInt32( ( (const SfxUInt16Item*)pItem )->GetValue() );
+ pIni->Set( aValue, SFX_KEY_INET_MAXNEWS );
+ bResetSession = TRUE;
+ }
+
+ // MaxHttpCons
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_INET_MAXHTTPCONS), TRUE, &pItem))
+ {
+ DBG_ASSERT( pItem->ISA(SfxUInt16Item), "UInt16Item expected" );
+ String aValue = String::CreateFromInt32( ( (const SfxUInt16Item*)pItem )->GetValue() );
+ pIni->Set( aValue, SFX_KEY_INET_MAXHTTPCONS );
+ bResetSession = TRUE;
+ }
+
+ // MaxFtpCons
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_INET_MAXFTPCONS), TRUE, &pItem))
+ {
+ DBG_ASSERT(pItem->ISA(SfxUInt16Item), "UInt16Item expected");
+ String aValue = String::CreateFromInt32( ( (const SfxUInt16Item*)pItem )->GetValue() );
+ pIni->Set( aValue, SFX_KEY_INET_MAXFTPCONS);
+ bResetSession = TRUE;
+ }
+
+ // Mail-Gateway zum SMTP
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_INET_SMTPGATEWAY), TRUE, &pItem))
+ {
+ DBG_ASSERT(pItem->ISA(SfxStringItem), "StringItem expected");
+ pIni->Set(((const SfxStringItem *)pItem)->GetValue(), SFX_KEY_INET_MAILGATEWAY);
+ }
+
+ // Mail-Username
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_INET_MAILUSERNAME), TRUE, &pItem))
+ {
+ DBG_ASSERT(pItem->ISA(SfxStringItem), "StringItem expected");
+ pIni->Set(((const SfxStringItem *)pItem)->GetValue(), SFX_KEY_INET_MAILUSERNAME);
+ }
+
+ // Mail-Password
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_INET_MAILPASSWORD), TRUE, &pItem))
+ {
+ DBG_ASSERT(pItem->ISA(SfxStringItem), "StringItem expected");
+ String aPassword( ((const SfxStringItem *)pItem)->GetValue() );
+ pIni->Set( SfxStringEncode( aPassword ), SFX_KEY_INET_MAILPASSWORD );
+ }
+
+ // Mail-Text-Format
+ if ( SFX_ITEM_SET == rSet.GetItemState( rPool.GetWhich( SID_INET_MAILTEXTFORMAT ), TRUE, &pItem ) )
+ {
+ DBG_ASSERT( pItem->ISA(SfxByteItem), "ByteItem expected" );
+ INT32 nFlag = (USHORT)( (const SfxByteItem*)pItem )->GetValue();
+ pIni->Set( String::CreateFromInt32( nFlag ), SFX_KEY_INET_MAILTEXTFORMAT );
+ }
+
+ // Proxy-Type
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_INET_PROXY_TYPE), TRUE, &pItem))
+ {
+ DBG_ASSERT( pItem->ISA(SfxUInt16Item), "UInt16Item expected" );
+ String aValue = String::CreateFromInt32( ( (const SfxUInt16Item*)pItem )->GetValue() );
+ pIni->Set( aValue, SFX_KEY_INET_PROXYTYPE );
+ bResetSession = TRUE;
+ bProxiesModified = TRUE;
+ }
+
+ // NoProxy
+ if ( SFX_ITEM_SET == rSet.GetItemState(SID_INET_NOPROXY, TRUE, &pItem))
+ {
+ DBG_ASSERT(pItem->ISA(SfxStringItem), "StringItem expected");
+ pIni->Set(((const SfxStringItem *)pItem)->GetValue(), SFX_KEY_INET_NOPROXY);
+ bResetSession = TRUE;
+ bProxiesModified = TRUE;
+ }
+
+ // StarBasic Enable
+ if ( SFX_ITEM_SET == rSet.GetItemState(SID_BASIC_ENABLED, TRUE, &pItem))
+ {
+ DBG_ASSERT(pItem->ISA(SfxUInt16Item), "SfxInt16Item expected");
+ String aValue = String::CreateFromInt32( ( (const SfxUInt16Item*)pItem )->GetValue() );
+ pIni->Set( aValue, SFX_KEY_BASIC_ENABLE );
+ }
+
+ // Java Enable
+ if ( SFX_ITEM_SET == rSet.GetItemState( SID_INET_JAVA_ENABLE, TRUE, &pItem ) )
+ {
+ DBG_ASSERT(pItem->ISA(SfxBoolItem), "SfxBoolItem expected");
+ BOOL bJava = ( (const SfxBoolItem*)pItem )->GetValue();
+ String aVal = bJava ? 0x0031 : 0x0030; // ^= '1' or '0'
+ BOOL bSet = SetJavaIniEntry_Impl( SFX_KEY_JAVA_ENABLE, aVal, pIni );
+ bResetSession = TRUE;
+ }
+ // Applets Enable
+ if ( SFX_ITEM_SET == rSet.GetItemState( SID_INET_EXE_APPLETS, TRUE, &pItem ) )
+ {
+ DBG_ASSERT(pItem->ISA(SfxBoolItem), "SfxBoolItem expected");
+ BOOL bApplets = ( (const SfxBoolItem*)pItem )->GetValue();
+ String aVal = bApplets ? 0x0031 : 0x0030; // ^= '1' or '0'
+ BOOL bSet = SetJavaIniEntry_Impl( SFX_KEY_INET_EXE_APPLETS, aVal, pIni );
+ bResetSession = TRUE;
+ }
+
+ // Java AccessType
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_INET_JAVA_ACCESSTYPE), TRUE, &pItem))
+ {
+ DBG_ASSERT(pItem->ISA(SfxUInt16Item), "UInt16Item expected");
+ SjNetAccess eAccess = (SjNetAccess) ((const SfxUInt16Item *)pItem)->GetValue();
+ String aVal;
+ if ( eAccess == NET_HOST )
+ aVal = DEFINE_CONST_UNICODE("HOST");
+ else if ( eAccess == NET_UNRESTRICTED )
+ aVal = DEFINE_CONST_UNICODE("UNRESTRICTED");
+ else
+ aVal = DEFINE_CONST_UNICODE("NONE");
+ BOOL bSet = SetJavaIniEntry_Impl( SFX_KEY_JAVA_NETACCESS, aVal, pIni );
+ bResetSession = TRUE;
+ }
+
+ // Java Security
+ if ( SFX_ITEM_SET == rSet.GetItemState(SID_INET_JAVA_SECURITY, TRUE, &pItem))
+ {
+ DBG_ASSERT(pItem->ISA(SfxBoolItem), "SfxBoolItem expected");
+ BOOL bSecurity = ((const SfxBoolItem *)pItem)->GetValue();
+ String aVal = bSecurity ? 0x0031 : 0x0030; // ^= '1' or '0'
+ BOOL bSet = SetJavaIniEntry_Impl( SFX_KEY_JAVA_SECURITY, aVal, pIni );
+ bResetSession = TRUE;
+ }
+
+ // Java ClassPath
+ if ( SFX_ITEM_SET == rSet.GetItemState(SID_INET_JAVA_CLASSPATH, TRUE, &pItem))
+ {
+ DBG_ASSERT( pItem->ISA(SfxStringItem), "SfxStringItem expected" );
+ String aVal = ( (const SfxStringItem *)pItem )->GetValue();
+ BOOL bSet = SetJavaIniEntry_Impl( SFX_KEY_JAVA_USERCLASSPATH, aVal, pIni );
+ bResetSession = TRUE;
+ }
+
+ // Execute PlugIns
+ if ( SFX_ITEM_SET == rSet.GetItemState(SID_INET_EXE_PLUGIN, TRUE, &pItem))
+ {
+ DBG_ASSERT(pItem->ISA(SfxBoolItem), "SfxBoolItem expected");
+ BOOL bExe = ( (const SfxBoolItem *)pItem )->GetValue();
+ pIni->Set( bExe ? 0x0031 : 0x0030 /* ^= '1' or '0' */, SFX_KEY_INET_EXE_PLUGIN );
+ bResetSession = TRUE;
+ }
+
+ // DNS Server
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_INET_DNS_AUTO), TRUE, &pItem))
+ {
+ DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected");
+ BOOL bIsAuto = ((const SfxBoolItem *)pItem)->GetValue();
+ if( bIsAuto )
+ pIni->Set( String(), SFX_KEY_INET_DNS );
+ else
+ {
+ String aDNS;
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_INET_DNS_SERVER), TRUE, &pItem) )
+ {
+ DBG_ASSERT(pItem->ISA(SfxStringItem), "SfxStringItem expected");
+ aDNS = ((const SfxStringItem *)pItem)->GetValue();
+ }
+ pIni->Set( aDNS, SFX_KEY_INET_DNS );
+ }
+ bResetSession = TRUE;
+ }
+
+ // Noncahed Server
+ if ( SFX_ITEM_SET == rSet.GetItemState(SID_INET_NONCACHED_SERVER, TRUE, &pItem))
+ {
+ DBG_ASSERT(pItem->ISA(SfxStringItem), "StringItem expected");
+ pIni->Set(((const SfxStringItem *)pItem)->GetValue(), SFX_KEY_INET_NONCACHED_SERVER);
+ bResetSession = TRUE;
+ }
+
+ // UserAgent
+ if ( SFX_ITEM_SET == rSet.GetItemState(SID_INET_USERAGENT, TRUE, &pItem))
+ {
+ DBG_ASSERT(pItem->ISA(SfxStringItem), "StringItem expected");
+ pIni->Set(((const SfxStringItem *)pItem)->GetValue(), SFX_KEY_INET_USERAGENT);
+ bResetSession = TRUE;
+ }
+
+ // Proxies
+ for ( USHORT nOfs = 0;
+ nOfs <= SID_INET_SECURITY_PROXY_PORT - SID_INET_HTTP_PROXY_NAME;
+ nOfs += 2 )
+ {
+ if ( SFX_ITEM_SET == rSet.GetItemState( rPool.GetWhich( SID_INET_HTTP_PROXY_NAME + nOfs ), TRUE, &pItem ) )
+ {
+ DBG_ASSERT( pItem->ISA(SfxStringItem), "StringItem expected" );
+ String aVal( ((const SfxStringItem *)pItem)->GetValue() );
+ pIni->Set( aVal, SFX_KEY_INET_HTTPPROXYNAME+nOfs );
+ bResetSession = TRUE;
+ bProxiesModified = TRUE;
+ }
+ if ( SFX_ITEM_SET == rSet.GetItemState( rPool.GetWhich( SID_INET_HTTP_PROXY_PORT + nOfs ), TRUE, &pItem ) )
+ {
+ DBG_ASSERT( pItem->ISA(SfxInt32Item), "Int32Item expected" );
+ String aValue = String::CreateFromInt32( ( (const SfxInt32Item*)pItem )->GetValue() );
+ pIni->Set( aValue, SFX_KEY_INET_HTTPPROXYPORT + nOfs );
+ bResetSession = TRUE;
+ bProxiesModified = TRUE;
+ }
+ }
+
+ // Channels
+ if ( SFX_ITEM_SET == rSet.GetItemState(SID_INET_CHANNELS_ONOFF, TRUE, &pItem))
+ {
+ DBG_ASSERT(pItem->ISA(SfxBoolItem), "SfxBoolItem expected");
+ BOOL bExe = ((const SfxBoolItem *)pItem)->GetValue();
+ pIni->Set( bExe ? 0x0031 : 0x0030 /* ^= '1' or '0' */, SFX_KEY_INET_CHANNELS );
+ }
+
+ // Cookies
+ if ( SFX_ITEM_SET == rSet.GetItemState(SID_INET_COOKIESHANDLE, TRUE, &pItem))
+ {
+ DBG_ASSERT(pItem->ISA(SfxUInt16Item), "SfxUInt16Item expected");
+ String aValue = String::CreateFromInt32( ( (const SfxUInt16Item*)pItem )->GetValue() );
+ pIni->Set( aValue, SFX_KEY_INET_COOKIES );
+ }
+
+ // Secure-Referers
+ if ( SFX_ITEM_SET == rSet.GetItemState(SID_SECURE_URL, TRUE, &pItem))
+ {
+ DELETEZ(pAppData_Impl->pSecureURLs);
+
+ DBG_ASSERT(pItem->ISA(SfxStringListItem), "StringListItem expected");
+ const List *pList = ((SfxStringListItem*)pItem)->GetList();
+ pIni->Set( String::CreateFromInt32( pList->Count() ), SFX_KEY_SECURE_URL );
+ for ( USHORT n = 0; n < pList->Count(); ++n )
+ pIni->Set( *(const String*)(pList->GetObject(n)), SFX_KEY_SECURE_URL, n );
+ }
+
+ // ExternBrowser
+ if ( SFX_ITEM_SET == rSet.GetItemState(SID_OPT_EXTBRW_ON, TRUE, &pItem) )
+ {
+ DBG_ASSERT(pItem->ISA(SfxBoolItem), "SfxBoolItem expected");
+ BOOL bOn = ((const SfxBoolItem *)pItem)->GetValue();
+ pIni->Set( bOn ? 0x0031 : 0x0030 /* ^= '1' or '0' */, SFX_KEY_EXTBRW_ON );
+ pAppData_Impl->bUseExternBrowser = bOn &&
+ ( pIni->IsInternetExplorerAvailable() || pIni->Get( SFX_KEY_EXTBRW_FILE ).Len() );
+ }
+ if ( SFX_ITEM_SET == rSet.GetItemState(SID_OPT_EXTBRW_ON_EXCEPTION, TRUE, &pItem))
+ {
+ DELETEZ(pAppData_Impl->pExtBrwOnExceptionList);
+ DBG_ASSERT(pItem->ISA(SfxStringListItem), "StringListItem expected");
+ const List* pList = ((SfxStringListItem*)pItem)->GetList();
+ ULONG n, nCount = pIni->Get( SFX_KEY_EXTBRW_ON_EXCEPTION ).ToInt32();
+ for ( n = 0; n < nCount; ++n )
+ pIni->Delete( SFX_KEY_EXTBRW_ON_EXCEPTION, n );
+ nCount = pList->Count();
+ pIni->Set( String::CreateFromInt32( nCount ), SFX_KEY_EXTBRW_ON_EXCEPTION );
+ for ( n = 0; n < nCount; ++n )
+ pIni->Set( *(const String*)(pList->GetObject(n)), SFX_KEY_EXTBRW_ON_EXCEPTION, n );
+ }
+ if ( SFX_ITEM_SET == rSet.GetItemState(SID_OPT_EXTBRW_OFF_EXCEPTION, TRUE, &pItem))
+ {
+ DELETEZ(pAppData_Impl->pExtBrwOffExceptionList);
+ DBG_ASSERT(pItem->ISA(SfxStringListItem), "StringListItem expected");
+ const List* pList = ((SfxStringListItem*)pItem)->GetList();
+ ULONG n, nCount = pIni->Get( SFX_KEY_EXTBRW_OFF_EXCEPTION ).ToInt32();
+ for ( n = 0; n < nCount; ++n )
+ pIni->Delete( SFX_KEY_EXTBRW_OFF_EXCEPTION, n );
+ nCount = pList->Count();
+ pIni->Set( String::CreateFromInt32( nCount ), SFX_KEY_EXTBRW_OFF_EXCEPTION );
+ for ( n = 0; n < nCount; ++n )
+ pIni->Set( *(const String*)(pList->GetObject(n)), SFX_KEY_EXTBRW_OFF_EXCEPTION, n );
+ }
+
+ // EnableMetafilePrint
+ if ( SFX_ITEM_SET == rSet.GetItemState( rPool.GetWhich( SID_ENABLE_METAFILEPRINT ), TRUE, &pItem ) )
+ {
+ DBG_ASSERT( pItem->ISA(SfxBoolItem), "BoolItem expected" );
+ BOOL bPrint = (( const SfxBoolItem*)pItem )->GetValue();
+ pIni->Set( bPrint ? 0x0031 : 0x0030 /* ^= '1' or '0' */, SFX_KEY_METAFILEPRINT );
+ }
+
+ // Web-View
+ if( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_ALLOWFOLDERWEBVIEW), TRUE, &pItem))
+ {
+ DBG_ASSERT(pItem->ISA(SfxStringItem), "SfxStringItem expected");
+ pIni->Set(((const SfxStringItem*)pItem)->GetValue(), SFX_KEY_ALLOWFOLDERWEBVIEW);
+ }
+
+ // Explorer
+ String aIconGrid( pIni->Get(SFX_KEY_ICONGRID) );
+ Size aGrid( aIconGrid.GetToken(0).ToInt32(), aIconGrid.GetToken(1).ToInt32() );
+ UINT16 nMode = (UINT16)aIconGrid.GetToken(2).ToInt32();
+ BOOL bSet = FALSE;
+ if ( SFX_ITEM_SET == rSet.GetItemState(SID_AUTO_ADJUSTICONS, TRUE, &pItem) )
+ {
+ const SfxUInt16Item *pUInt16Item = (const SfxUInt16Item*) pItem;
+ nMode = pUInt16Item->GetValue();
+ bSet = TRUE;
+ }
+ if ( SFX_ITEM_SET == rSet.GetItemState(SID_ICONGRID, TRUE, &pItem) )
+ {
+ const SfxSizeItem *pSizeItem = (const SfxSizeItem*) pItem;
+ aGrid = pSizeItem->GetValue();
+ bSet = TRUE;
+ }
+ if ( bSet )
+ {
+ aIconGrid = String::CreateFromInt32( aGrid.Width() );
+ aIconGrid += DEFINE_CONST_UNICODE( ";" );
+ aIconGrid += String::CreateFromInt32( aGrid.Height() );
+ aIconGrid += DEFINE_CONST_UNICODE( ";" );
+ aIconGrid += String::CreateFromInt32( nMode );
+ pIni->Set( aIconGrid, SFX_KEY_ICONGRID );
+ }
+
+ if ( SFX_ITEM_SET == rSet.GetItemState( SID_RESTORE_EXPAND_STATE, TRUE, &pItem ) )
+ {
+ DBG_ASSERT( pItem->ISA(SfxBoolItem), "BoolItem expected" );
+ BOOL bRestoreExpand = ( (const SfxBoolItem*)pItem )->GetValue();
+ pIni->Set( bRestoreExpand ? 0x0031 : 0x0030 /* ^= '1' or '0' */, SFX_KEY_AUTOOPEN );
+ }
+
+ if ( bResetSession )
+ {
+ NAMESPACE_INET(INetWrapper) aWrapper;
+ ::vos::ORef< ::inet::INetConfig > xINetConfig;
+ if ( aWrapper.getINetConfig( xINetConfig ) )
+ {
+ xINetConfig->setDomainNameServer( pIni->Get( SFX_KEY_INET_DNS ) );
+ xINetConfig->setUserAgent( pIni->Get( SFX_KEY_INET_USERAGENT ) );
+
+ if ( bProxiesModified )
+ {
+ ::inet::INetProxyConfig aProxyCfg (xINetConfig->getProxyConfig());
+ USHORT bProxy = (USHORT)(pIni->Get (SFX_KEY_INET_PROXYTYPE).ToInt32());
+ if (bProxy)
+ aProxyCfg.setNoProxyList(pIni->Get (SFX_KEY_INET_NOPROXY));
+ else
+ aProxyCfg.setNoProxyList(DEFINE_CONST_UNICODE("*:*"));
+
+ aProxyCfg.setHttpProxy (
+ pIni->Get (SFX_KEY_INET_HTTPPROXYNAME),
+ pIni->Get (SFX_KEY_INET_HTTPPROXYPORT).ToInt32());
+
+ aProxyCfg.setFtpProxy (
+ pIni->Get (SFX_KEY_INET_FTPPROXYNAME),
+ pIni->Get (SFX_KEY_INET_FTPPROXYPORT).ToInt32());
+
+ aProxyCfg.setSecureSocketProxy (
+ pIni->Get (SFX_KEY_INET_SECURITYPROXYNAME),
+ pIni->Get (SFX_KEY_INET_SECURITYPROXYPORT).ToInt32());
+
+ aProxyCfg.setSocksProxy (
+ pIni->Get (SFX_KEY_INET_SOCKSPROXYNAME),
+ pIni->Get (SFX_KEY_INET_SOCKSPROXYPORT).ToInt32());
+
+ xINetConfig->setProxyConfig (aProxyCfg);
+ }
+ }
+ }
+
+ // AutoSave starten oder anhalten
+ UpdateAutoSave_Impl();
+
+ // INet Session neu aufsetzen
+ if ( bResetSession )
+ {
+ try
+ {
+ SjApplet2::settingsChanged();
+ }
+ catch ( ... )
+ {
+ DBG_ERRORFILE( "SjApplet2::settingsChanged() throws an exception" );
+ }
+ }
+
+ // geaenderte Daten speichern
+ pIni->LeaveLock();
+ pIni->Flush();
+ SaveConfiguration();
+}
+
+//--------------------------------------------------------------------
+
+void SfxApplication::SetOptions(const SfxItemSet &rSet)
+{
+ // Daten werden in DocInfo und IniManager gespeichert
+ SfxDocumentInfo *pDocInf = SfxObjectShell::Current()
+ ? &SfxObjectShell::Current()->GetDocInfo()
+ : 0;
+ const SfxPoolItem *pItem = 0;
+ SfxItemPool &rPool = GetPool();
+
+ SfxAllItemSet aSendSet( rSet );
+
+ // portable Grafiken
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_INDEP_METAFILE), TRUE, &pItem))
+ {
+ DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected");
+ BOOL b = ((const SfxBoolItem *)pItem)->GetValue();
+ if ( pDocInf )
+ pDocInf->SetPortableGraphics(b);
+ }
+
+ // Grafiken komprimiert speichern
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_OPT_SAVEGRAPHICSCOMPRESSED), TRUE, &pItem))
+ {
+ DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected");
+ BOOL b = ((const SfxBoolItem *)pItem)->GetValue();
+ if ( pDocInf )
+ pDocInf->SetSaveGraphicsCompressed(b);
+ }
+
+ // Grafiken im Original speichern
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_OPT_SAVEORIGINALGRAPHICS), TRUE, &pItem))
+ {
+ DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected");
+ BOOL b = ((const SfxBoolItem *)pItem)->GetValue();
+ if ( pDocInf )
+ pDocInf->SetSaveOriginalGraphics(b);
+ }
+
+ // PathName
+ if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_PATHNAME), TRUE, &pItem))
+ {
+ DBG_ASSERT(pItem->ISA(SfxAllEnumItem), "AllEnumItem expected");
+ GetAppIniManager()->Set(SFX_GROUP_DIR, *(const SfxAllEnumItem *)pItem);
+ aSendSet.ClearItem( rPool.GetWhich( SID_ATTR_PATHNAME ) );
+ }
+
+ SetOptions_Impl( rSet );
+
+ // Undo-Count
+ Broadcast( SfxItemSetHint( rSet ) );
+}
+
+//--------------------------------------------------------------------
+
+void SfxApplication::UpdateAutoSave_Impl()
+{
+ pImp->pAutoSaveTimer->Stop();
+
+ // AutoSave soll ab jetzt neu anlaufen
+ if ( pOptions->IsAutoSave() )
+ {
+ pImp->pAutoSaveTimer->SetTimeout( pOptions->GetAutoSaveTime() * 60000 );
+ pImp->pAutoSaveTimer->Start();
+ }
+}
+
+//--------------------------------------------------------------------
+
+
+Timer* SfxApplication::GetAutoSaveTimer_Impl()
+{
+ return pImp->pAutoSaveTimer;
+}
+
+//--------------------------------------------------------------------
+
+IMPL_LINK( SfxApplication, AutoSaveHdl_Impl, Timer*, pTimer )
+{
+ FASTBOOL bAutoSave = pOptions->IsAutoSave() &&
+ !bDispatcherLocked && !Application::IsInModalMode() &&
+ !Application::IsUICaptured() && Application::GetLastInputInterval() > 300;
+ if ( bAutoSave )
+ {
+ SfxViewShell *pVSh = pViewFrame ? pViewFrame->GetViewShell() : 0;
+ bAutoSave = pVSh && pVSh->GetWindow() &&
+ !pVSh->GetWindow()->IsMouseCaptured() ;
+ }
+
+ if ( bAutoSave )
+ {
+ SaveAll_Impl( pOptions->IsAutoSavePrompt(), TRUE );
+ pImp->bAutoSaveNow = FALSE;
+ pImp->pAutoSaveTimer->SetTimeout( pOptions->GetAutoSaveTime() * 60000 );
+ pImp->pAutoSaveTimer->Start();
+ }
+ else if ( pOptions->IsAutoSave() )
+ {
+ // Wenn wir gelockt sind, dann in 5 Sekunden nochmal probieren
+ pImp->bAutoSaveNow = TRUE;
+ pImp->pAutoSaveTimer->SetTimeout( 5000 );
+ pImp->pAutoSaveTimer->Start();
+
+#ifndef PRODUCT
+ Sound::Beep();
+#endif
+ }
+
+ return 0;
+}
+
+//--------------------------------------------------------------------
+
+// alle Dokumente speichern
+
+BOOL SfxApplication::SaveAll_Impl(BOOL bPrompt, BOOL bAutoSave)
+{
+ BOOL bFunc = TRUE;
+ short nRet;
+
+ for ( SfxObjectShell *pDoc = SfxObjectShell::GetFirst();
+ pDoc;
+ pDoc = SfxObjectShell::GetNext(*pDoc) )
+ {
+ if( SFX_CREATE_MODE_STANDARD == pDoc->GetCreateMode() &&
+ SfxViewFrame::GetFirst(pDoc) )
+ {
+ if ( pDoc->GetProgress() == 0 )
+ {
+ if (!pDoc->IsModified() ||
+ bAutoSave && pDoc->GetModifyTime()<pImp->aAutoSaveTime)
+ continue;
+
+ if ( bPrompt || (bAutoSave && !pDoc->HasName()) )
+ nRet = QuerySave_Impl( *pDoc, bAutoSave );
+ else
+ nRet = RET_YES;
+
+ if ( nRet == RET_YES )
+ {
+ SfxRequest aReq( SID_SAVEDOC, 0, pDoc->GetPool() );
+ const SfxPoolItem *pPoolItem = pDoc->ExecuteSlot( aReq );
+ if ( !pPoolItem || !pPoolItem->ISA(SfxBoolItem) ||
+ !( (const SfxBoolItem*) pPoolItem )->GetValue() )
+ bFunc = FALSE; // kein Abbruch mehr!
+ }
+ else if ( nRet == RET_CANCEL )
+ {
+ bFunc = FALSE; // kein Abbruch mehr!
+ break;
+ }
+ else if ( nRet == RET_NO )
+ {
+ }
+ }
+ }
+ }
+ pImp->aAutoSaveTime=Time();
+ return bFunc;
+}
+
+//--------------------------------------------------------------------
+
+SfxMacroConfig* SfxApplication::GetMacroConfig() const
+{
+ return SfxMacroConfig::GetOrCreate();
+}
+
+//--------------------------------------------------------------------
+
+void SfxApplication::RegisterEvent(USHORT nId, const String& rEventName)
+{
+ if (!pAppData_Impl->pEventConfig)
+ pAppData_Impl->pEventConfig = new SfxEventConfiguration;
+ pAppData_Impl->pEventConfig->RegisterEvent(nId, rEventName);
+}
+
+//--------------------------------------------------------------------
+
+SfxEventConfiguration* SfxApplication::GetEventConfig() const
+{
+ return pAppData_Impl->pEventConfig;
+}
+
+//--------------------------------------------------------------------
+
+void SfxApplication::SaveConfiguration() const
+{
+ if ( !bDowning )
+ {
+ // bei bDowning koennten falsche Sachen gespeichert werden bishin
+ // zu Abstuerzen
+ if (!pAppData_Impl->pAppCfg->SaveConfig())
+ HandleConfigError_Impl((USHORT)pCfgMgr->GetErrorCode());
+ }
+}
+
+//--------------------------------------------------------------------
+
+SfxConfigManager* SfxApplication::GetAppConfigManager_Impl() const
+{
+ return pAppData_Impl->pAppCfg;
+}
+//--------------------------------------------------------------------
+
+void SfxApplication::NotifyEvent( const SfxEventHint& rEventHint, FASTBOOL bSynchron )
+{
+ DBG_ASSERT(pAppData_Impl->pEventConfig,"Keine Events angemeldet!");
+
+ SfxObjectShell *pDoc = rEventHint.GetObjShell();
+ if ( !pDoc || !pDoc->IsPreview() )
+ pAppData_Impl->pEventConfig->ExecuteEvent( rEventHint.GetEventId(), pDoc, bSynchron, rEventHint.GetArgs() );
+ Broadcast(rEventHint);
+ if ( pDoc )
+ pDoc->Broadcast( rEventHint );
+}
+
+//-------------------------------------------------------------------------
+/* ASOBSOLETE
+static void CorrectUpdateNumber_Impl(String& rName)
+{
+ String aUPD( SOLARUPD );
+ USHORT nLen = aUPD.Len();
+ USHORT nCount,nPos=0;
+ do
+ {
+ nCount=0;
+ xub_StrLen nNameLength = rName.Len();
+ for ( USHORT i=nPos; i<nNameLength; i++ )
+ {
+ if ( rName.GetChar(i).CompareToAscii('?') == COMPARE_EQUAL )
+ {
+ if ( nCount == 0 )
+ nPos=i;
+ nCount++;
+ }
+ else if ( nCount == nLen )
+ break;
+ else
+ nCount=0;
+ }
+ if ( nCount == nLen )
+ {
+ rName.Replace( aUPD, nPos );
+ nPos += nCount;
+ }
+ }
+ while ( nCount );
+}
+*/
+
+void SfxApplicationClass::Property( ApplicationProperty& rProp )
+{
+ SfxApplication* pApp = SFX_APP();
+ SfxIniManager* pIni = pApp->GetIniManager();
+
+ // AppIniManger?
+ SfxAppIniManagerProperty* pAppIniMgr = PTR_CAST(SfxAppIniManagerProperty, &rProp);
+ if ( pAppIniMgr )
+ {
+ pAppIniMgr->SetIniManager( pIni );
+ return;
+ }
+
+ TTProperties* pTTProperties = PTR_CAST( TTProperties, &rProp );
+ if ( pTTProperties )
+ {
+ pTTProperties->nPropertyVersion = TT_PROPERTIES_VERSION;
+ switch ( pTTProperties->nActualPR )
+ {
+ case TT_PR_SLOTS:
+ {
+ pTTProperties->nSidOpenUrl = SID_OPENURL;
+ pTTProperties->nSidFileName = SID_FILE_NAME;
+ pTTProperties->nSidNewDocDirect = SID_NEWDOCDIRECT;
+ pTTProperties->nSidCopy = SID_COPY;
+ pTTProperties->nSidPaste = SID_PASTE;
+ pTTProperties->nSidSourceView = SID_SOURCEVIEW;
+ pTTProperties->nSidSelectAll = SID_SELECTALL;
+ pTTProperties->nSidReferer = SID_REFERER;
+ pTTProperties->nActualPR = 0;
+ }
+ break;
+ case TT_PR_DISPATCHER:
+ {
+ SfxDispatcher* pDispatcher = SfxViewFrame::Current()->GetDispatcher();
+ if ( !pDispatcher )
+ pTTProperties->nActualPR = TT_PR_ERR_NODISPATCHER;
+ else
+ {
+ pDispatcher->SetExecuteMode(EXECUTEMODE_DIALOGASYNCHRON);
+ if ( pDispatcher->ExecuteFunction(
+ pTTProperties->mnSID, pTTProperties->mppArgs, pTTProperties->mnMode )
+ == EXECUTE_NO )
+ pTTProperties->nActualPR = TT_PR_ERR_NOEXECUTE;
+ else
+ pTTProperties->nActualPR = 0;
+ }
+ }
+ break;
+ case TT_PR_IMG:
+ {
+ SvDataMemberObjectRef aDataObject = new SvDataMemberObject();
+ SvData* pDataBmp = new SvData( FORMAT_BITMAP );
+ pDataBmp->SetData( pTTProperties->mpBmp );
+ aDataObject->Append( pDataBmp );
+ aDataObject->CopyClipboard();
+ pTTProperties->nActualPR = 0;
+ }
+ break;
+ default:
+ {
+ pTTProperties->nPropertyVersion = 0;
+ }
+ }
+ return;
+ }
+}
+
+IMPL_OBJHINT( SfxStringHint, String )
+
+OfaMiscCfg* SfxApplication::GetMiscConfig()
+{
+ if ( !pAppData_Impl->pMiscConfig )
+ {
+ pAppData_Impl->pMiscConfig = new OfaMiscCfg;
+ pAppData_Impl->pMiscConfig->Initialize();
+ }
+
+ return pAppData_Impl->pMiscConfig;
+}
+
+
diff --git a/sfx2/source/appl/appchild.cxx b/sfx2/source/appl/appchild.cxx
new file mode 100644
index 000000000000..66a97c433ce8
--- /dev/null
+++ b/sfx2/source/appl/appchild.cxx
@@ -0,0 +1,451 @@
+/*************************************************************************
+ *
+ * $RCSfile: appchild.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:26 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#pragma hdrstop
+
+#ifndef _SFX_WHITER_HXX //autogen
+#include <svtools/whiter.hxx>
+#endif
+#ifndef _SFXENUMITEM_HXX //autogen
+#include <svtools/eitem.hxx>
+#endif
+
+#include "app.hxx"
+#include "appdata.hxx"
+#include "workwin.hxx"
+#include "childwin.hxx"
+#include "arrdecl.hxx"
+#include "templdlg.hxx"
+#include "sfxhelp.hxx"
+#include "ipfrm.hxx"
+#include "ipenv.hxx"
+#include "request.hxx"
+#include "bindings.hxx"
+#include "dispatch.hxx"
+#include "sfxtypes.hxx"
+#include "module.hxx"
+#include "sfxsids.hrc"
+
+//=========================================================================
+
+ResId SfxApplication::GetCurrentObjectBar( USHORT nPosId ) const
+
+/* [Beschreibung]
+
+ Mit dieser Methode kann die ResId der an der angegebenen Positions-Nummer
+ aktuell stehenden Symbol-Leiste erfragt werden. Als Positions-Nummern
+ k"onnen verwendet werden:
+
+ SFX_OBJECTBAR_APPLICATION
+ SFX_OBJECTBAR_OBJECT
+ SFX_OBJECTBAR_TOOLS
+ SFX_OBJECTBAR_MACRO
+ SFX_OBJECTBAR_FULLSCREEN
+ SFX_OBJECTBAR_RECORDING
+ SFX_OBJECTBAR_OPTIONS
+ SFX_OBJECTBAR_USERDEF1
+ SFX_OBJECTBAR_USERDEF2
+ SFX_OBJECTBAR_USERDEF3
+
+ Ist an der Position keine Symbol-Leiste vorhanden, dann wird eine ResId
+ mit einer Id von 0 und ohne ResManager zur"uckgegeben.
+
+
+ [Anmerkung]
+
+ Da intern keine fertige ResId verf"ugbar ist, mu\s leider eine Instanz
+ returnt werden.
+*/
+
+{
+ ResId aResId(0, 0);
+ SfxWorkWindow* pWork = GetWorkWindow_Impl(SfxViewFrame::Current());
+ if ( pWork )
+ pWork->GetObjectBar_Impl(nPosId, aResId);
+ return aResId;
+}
+
+//--------------------------------------------------------------------
+
+void SfxApplication::RegisterChildWindow( SfxModule *pMod, SfxChildWinFactory *pFact )
+{
+ if ( pMod )
+ {
+ pMod->RegisterChildWindow( pFact );
+ return;
+ }
+
+ if (!pAppData_Impl->pFactArr)
+ pAppData_Impl->pFactArr = new SfxChildWinFactArr_Impl;
+
+//#ifdef DBG_UTIL
+ for (USHORT nFactory=0; nFactory<pAppData_Impl->pFactArr->Count(); ++nFactory)
+ {
+ if (pFact->nId == (*pAppData_Impl->pFactArr)[nFactory]->nId)
+ {
+ pAppData_Impl->pFactArr->Remove( nFactory );
+// DBG_ERROR("ChildWindow mehrfach registriert!");
+// return;
+ }
+ }
+//#endif
+
+ pAppData_Impl->pFactArr->C40_INSERT(
+ SfxChildWinFactory, pFact, pAppData_Impl->pFactArr->Count() );
+}
+
+void SfxApplication::RegisterChildWindowContext( SfxModule *pMod, USHORT nId,
+ SfxChildWinContextFactory *pFact)
+{
+ SfxChildWinFactArr_Impl *pFactories;
+ SfxChildWinFactory *pF = NULL;
+ if ( pMod )
+ {
+ // Modul "ubergeben, ChildwindowFactory dort suchen
+ pFactories = pMod->GetChildWinFactories_Impl();
+ if ( pFactories )
+ {
+ USHORT nCount = pFactories->Count();
+ for (USHORT nFactory=0; nFactory<nCount; ++nFactory)
+ {
+ SfxChildWinFactory *pFac = (*pFactories)[nFactory];
+ if ( nId == pFac->nId )
+ {
+ // Factory gefunden, Context dort registrieren
+ pF = pFac;
+ break;
+ }
+ }
+ }
+ }
+
+ if ( !pF )
+ {
+ // Factory an der Application suchen
+ DBG_ASSERT( pAppData_Impl, "Keine AppDaten!" );
+ DBG_ASSERT( pAppData_Impl->pFactArr, "Keine Factories!" );
+
+ pFactories = pAppData_Impl->pFactArr;
+ USHORT nCount = pFactories->Count();
+ for (USHORT nFactory=0; nFactory<nCount; ++nFactory)
+ {
+ SfxChildWinFactory *pFac = (*pFactories)[nFactory];
+ if ( nId == pFac->nId )
+ {
+ if ( pMod )
+ {
+ // Wenn der Context von einem Modul registriert wurde,
+ // mu\s die ChildwindowFactory auch dort zur Verf"ugung
+ // stehen, sonst m"u\ste sich die Contextfactory im DLL-Exit
+ // wieder abmelden !
+ pF = new SfxChildWinFactory( pFac->pCtor, pFac->nId,
+ pFac->nPos );
+ pMod->RegisterChildWindow( pF );
+ }
+ else
+ pF = pFac;
+ break;
+ }
+ }
+ }
+
+ if ( pF )
+ {
+ if ( !pF->pArr )
+ pF->pArr = new SfxChildWinContextArr_Impl;
+ pF->pArr->C40_INSERT( SfxChildWinContextFactory, pFact, pF->pArr->Count() );
+ return;
+ }
+
+ DBG_ERROR( "Kein ChildWindow fuer diesen Context!" );
+}
+
+//--------------------------------------------------------------------
+
+SfxChildWinFactArr_Impl& SfxApplication::GetChildWinFactories_Impl() const
+{
+ return ( *(pAppData_Impl->pFactArr));
+}
+
+//--------------------------------------------------------------------
+#if SUPD<604
+void SfxApplication::SetChildWindow(USHORT nId, BOOL bOn)
+{
+ if ( pViewFrame )
+ pViewFrame->SetChildWindow( nId, bOn );
+}
+
+//--------------------------------------------------------------------
+
+void SfxApplication::ToggleChildWindow(USHORT nId)
+{
+
+ if ( pViewFrame )
+ pViewFrame->ToggleChildWindow( nId );
+}
+
+//--------------------------------------------------------------------
+
+BOOL SfxApplication::HasChildWindow( USHORT nId )
+{
+ if ( pViewFrame )
+ return pViewFrame->HasChildWindow(nId);
+ else
+ return FALSE;
+}
+
+//--------------------------------------------------------------------
+
+BOOL SfxApplication::KnowsChildWindow( USHORT nId )
+{
+ if ( pViewFrame )
+ return pViewFrame->KnowsChildWindow(nId);
+ else
+ return FALSE;
+}
+
+//--------------------------------------------------------------------
+
+void SfxApplication::ShowChildWindow( USHORT nId, BOOL bVisible )
+{
+ if ( pViewFrame )
+ pViewFrame->ShowChildWindow(nId, bVisible);
+}
+
+//--------------------------------------------------------------------
+
+SfxChildWindow* SfxApplication::GetChildWindow(USHORT nId)
+{
+ if ( pViewFrame )
+ return pViewFrame->GetChildWindow(nId);
+ else
+ return NULL;
+}
+
+#endif
+
+//--------------------------------------------------------------------
+
+SfxTemplateDialog* SfxApplication::GetTemplateDialog()
+{
+ if ( pViewFrame )
+ {
+ SfxChildWindow *pChild = pViewFrame->GetChildWindow(SfxTemplateDialogWrapper::GetChildWindowId());
+ return pChild ? (SfxTemplateDialog*) pChild->GetWindow() : 0;
+ }
+
+ return NULL;
+}
+
+//--------------------------------------------------------------------
+
+SfxHelpPI* SfxApplication::GetHelpPI()
+{
+ if ( pViewFrame )
+ {
+ SfxChildWindow *pChild = pViewFrame->GetChildWindow(SfxHelpPIWrapper::GetChildWindowId());
+ return pChild ? (SfxHelpPI*) pChild->GetWindow() : 0;
+ }
+
+ return NULL;
+}
+
+//--------------------------------------------------------------------
+
+SfxWorkWindow* SfxApplication::GetWorkWindow_Impl(const SfxViewFrame *pFrame) const
+{
+ SfxInPlaceFrame *pIPFrame = PTR_CAST(SfxInPlaceFrame,pFrame);
+ if ( pIPFrame )
+ return pIPFrame->GetEnv_Impl()->GetWorkWindow();
+ else
+ {
+ if ( pFrame )
+ return pFrame->GetFrame()->GetWorkWindow_Impl();
+ else if ( pViewFrame )
+ {
+ SfxInPlaceFrame *pIPFrame = PTR_CAST(SfxInPlaceFrame,pViewFrame);
+ if ( pIPFrame )
+ return pViewFrame->GetParentViewFrame_Impl()->GetFrame()->GetWorkWindow_Impl();
+// return pIPFrame->GetEnv_Impl()->GetWorkWindow();
+ else
+ return pViewFrame->GetFrame()->GetWorkWindow_Impl();
+ }
+ else
+ return NULL;
+ }
+}
+
+//--------------------------------------------------------------------
+#if SUPD<604
+void SfxApplication::ChildWindowExecute( SfxRequest &rReq )
+
+/* [Beschreibung]
+
+ Diese Methode kann in der Execute-Methode f"ur das ein- und ausschalten
+ von Child-Windows eingesetzt werden, um dieses inkl. API-Anbindung zu
+ implementieren.
+
+ Einfach in der IDL als 'ExecuteMethod' eintragen.
+*/
+
+{
+ // Parameter auswerten
+ USHORT nSID = rReq.GetSlot();
+
+ SFX_REQUEST_ARG(rReq, pShowItem, SfxBoolItem, nSID, FALSE);
+ BOOL bShow = FALSE;
+ BOOL bHasChild = HasChildWindow(nSID);
+ bShow = pShowItem ? pShowItem->GetValue() : !bHasChild;
+
+ if ( bShow && ( nSID == SID_HELP_PI ) )
+ {
+ // Nur starten wenn Hilfe installiert...
+ SfxHelp_Impl* pHelp = (SfxHelp_Impl*)Application::GetHelp();
+ if ( !pHelp || !pHelp->CheckHelpFile( TRUE ) )
+ return;
+ }
+
+ // ausf"uhren
+ if ( !pShowItem || bShow != bHasChild )
+ {
+ // Vor dem Toggle ausf"uhren, denn hartes Anschalten hat Vorrang
+ // vor weichem Anschalten
+ if ( nSID == SID_BROWSER )
+ SfxFrame::BeamerSwitched_Impl( bShow );
+
+ ToggleChildWindow( nSID );
+
+ if ( bShow && nSID == SID_BROWSER )
+ {
+ // Beamer soll sichtbar sein, da explizit eingeschaltet
+ SfxChildWindow* pChild = SFX_APP()->GetChildWindow( SID_BROWSER );
+ if ( pChild )
+ {
+// SfxExplorerHorizDockWnd_Impl* pBeamer = (SfxExplorerHorizDockWnd_Impl*) pChild->GetWindow();
+// pBeamer->AutoShow_Impl( TRUE );
+ }
+ }
+ }
+
+ GetBindings().Invalidate( nSID );
+ GetDispatcher().Update_Impl( TRUE );
+
+ if ( bShow && ( nSID == SID_HELP_PI ) )
+ GetpApp()->FocusChanged(); // Hilfe passend zum FocusWindow...
+
+ // ggf. recorden
+ if ( !rReq.IsAPI() )
+ rReq.AppendItem( SfxBoolItem( nSID, bShow ) );
+
+ rReq.Done();
+}
+
+//--------------------------------------------------------------------
+
+void SfxApplication::ChildWindowState( SfxItemSet& rState )
+
+/* [Beschreibung]
+
+ Diese Methode kann in der Status-Methode f"ur das Ein- und Ausschalt-
+ Zustand von Child-Windows eingesetzt werden, um dieses zu implementieren.
+
+ Einfach in der IDL als 'StateMethod' eintragen.
+*/
+
+{
+ SfxWhichIter aIter( rState );
+ for ( USHORT nSID = aIter.FirstWhich(); nSID; nSID = aIter.NextWhich() )
+ {
+ if ( nSID == SID_CUSTOMIZETOOLBOX )
+ {
+ if ( pViewFrame &&
+ pViewFrame->GetFrame()->HasComponent() &&
+ pViewFrame->GetViewShell()->GetMenuBar_Impl() )
+ rState.DisableItem(nSID);
+ }
+ else if ( nSID == SID_HYPERLINK_DIALOG )
+ {
+ const SfxPoolItem* pDummy = NULL;
+ SfxItemState eState = GetDispatcher().QueryState( SID_HYPERLINK_SETLINK, pDummy );
+ if ( SFX_ITEM_DISABLED == eState )
+ rState.DisableItem(nSID);
+ else
+ {
+ if ( KnowsChildWindow(nSID) )
+ rState.Put( SfxBoolItem( nSID, HasChildWindow(nSID)) );
+ else
+ rState.DisableItem(nSID);
+ }
+ }
+ else if ( nSID == SID_MAIL_CHILDWIN )
+//! (pb) temporary till the implementation is finished
+ rState.DisableItem(nSID);
+ else if ( nSID == SID_HELP_PI )
+//! (pb) what about help?
+ rState.DisableItem(nSID);
+ else if ( KnowsChildWindow(nSID) )
+ rState.Put( SfxBoolItem( nSID, HasChildWindow(nSID) ) );
+ else
+ rState.DisableItem(nSID);
+ }
+}
+
+#endif
diff --git a/sfx2/source/appl/appdata.cxx b/sfx2/source/appl/appdata.cxx
new file mode 100644
index 000000000000..916de4d3a74d
--- /dev/null
+++ b/sfx2/source/appl/appdata.cxx
@@ -0,0 +1,602 @@
+/*************************************************************************
+ *
+ * $RCSfile: appdata.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:26 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _CACHESTR_HXX //autogen
+#include <tools/cachestr.hxx>
+#endif
+#ifndef _SV_CONFIG_HXX //autogen
+#include <vcl/config.hxx>
+#endif
+#ifndef _INIMAN_HXX
+#include <svtools/iniman.hxx>
+#endif
+#ifndef _INETSTRM_HXX //autogen
+#include <svtools/inetstrm.hxx>
+#endif
+#ifndef _SFXSTRITEM_HXX //autogen
+#include <svtools/stritem.hxx>
+#endif
+
+#define _SVSTDARR_STRINGS
+#include <svtools/svstdarr.hxx>
+#include <vos/mutex.hxx>
+#pragma hdrstop
+
+#include <vcl/menu.hxx>
+
+#include "viewfrm.hxx"
+#include "appdata.hxx"
+#include "bitset.hxx"
+#include "dispatch.hxx"
+#include "event.hxx"
+#include "sfxtypes.hxx"
+#include "sfxdir.hxx"
+#include "doctempl.hxx"
+
+#ifndef _LOGINERR_HXX
+#include <svtools/loginerr.hxx>
+#endif
+#ifndef _SV_MSGBOX_HXX
+#include <vcl/msgbox.hxx>
+#endif
+#ifndef _DATETIMEITEM_HXX //autogen
+#include <svtools/dateitem.hxx>
+#endif
+#ifndef _SV_MENU_HXX
+#include <vcl/menu.hxx>
+#endif
+#ifndef _SV_WRKWIN_HXX
+#include <vcl/wrkwin.hxx>
+#endif
+
+#include "dataurl.hxx"
+#include "arrdecl.hxx"
+#include "docfac.hxx"
+#include "picklist.hxx"
+#include "docfile.hxx"
+#include "request.hxx"
+#include "referers.hxx"
+#include "app.hrc"
+#include "sfxresid.hxx"
+#include "objshimp.hxx"
+#include "inimgr.hxx"
+#include "ucbhelp.hxx"
+#include "appuno.hxx"
+
+class SfxModelCollection;
+class SvVerbList;
+class SfxProgress;
+class SfxConfigManager;
+class SfxChildWinFactArr_Impl;
+class SfxToolBoxConfig;
+class SfxMacro;
+class SfxDdeDocTopics_Impl;
+class DdeService;
+class SfxEventConfiguration;
+class SfxMacroConfig;
+class SvFactory;
+class SfxItemPool;
+class SfxInitLinkList;
+class NotesData;
+class SfxFilterMatcher;
+class DemoData_Impl;
+class SfxExplorer;
+class SfxMenuBarManager;
+class StopButtonTimer_Impl;
+class SvUShorts;
+class SfxNodeData_Impl;
+class SfxSIDList_Impl;
+struct SfxFrameObjectFactoryPtr;
+struct SfxPluginObjectFactoryPtr;
+class ISfxTemplateCommon;
+class SfxAnchorJobList_Impl;
+class SfxFilterMatcher;
+
+#ifdef _USE_NAMESPACE
+using namespace ::vos;
+#endif
+
+extern int put_GlobalOffline( int bOffline );
+
+class SfxIniDefaultManager
+{};
+
+//--------------------------------------------------------------------
+// SfxAppData_Impl
+//--------------------------------------------------------------------
+
+SfxAppData_Impl::SfxAppData_Impl( SfxApplication* pApp ) :
+ pAppCfg (0),
+ pProgress(0),
+ pPool(0),
+ pFactArr(0),
+ pMacro(0),
+ pODKLib(0),
+ nConfigManagerAvailable(-1),
+ pDdeService( 0 ),
+ pDocTopics( 0 ),
+ pEventConfig(0),
+ pSfxApplicationObjectFactory(0),
+ nAsynchronCalls(0),
+ pVerbs(0),
+ nBasicCallLevel(0),
+ nRescheduleLocks(0),
+ nInReschedule(0),
+ pDemoData(0),
+ pInitLinkList(0),
+ pMatcher( 0 ),
+ pExplorer(0),
+ pSfxPlugInObjectShellFactory( 0 ),
+ pDefFocusWin( 0 ),
+ pAppManager( 0 ),
+ pSfxFrameObjectFactoryPtr( 0 ),
+ pIniDefMgr( 0 ),
+ pPlugService( 0 ),
+ pStopButtonTimer( 0 ),
+ pCancelMgr( 0 ),
+ nDocModalMode(0),
+ pDisabledSlotList( 0 ),
+ pFilterIni( 0 ),
+ pISfxModule( 0 ),
+ pSfxPluginObjectFactoryPtr( 0 ),
+ pNodeData_Impl( 0 ),
+ pSIDList_Impl( 0 ),
+ pTemplateCommon( 0 ),
+ pActiveInplaceWindow( 0 ),
+ pAnchorJobList( 0 ),
+ pLabelResMgr( 0 ),
+ nDemoKind( 0 ),
+ pTopFrames( new SfxFrameArr_Impl ),
+ pTrash(0),
+ pSecureURLs(0),
+ nAutoTabPageId(0),
+ pDataLockBytesFactory( 0 ),
+ nExecutingSID( 0 ),
+ pImageLockBytesFactory( 0 ),
+ pInfoLockBytesFactory( 0 ),
+ pNewMenu( 0 ),
+ pBookmarkMenu( 0 ),
+ pAutoPilotMenu( 0 ),
+ pStartMenu( 0 ),
+ pAppDispatch(NULL),
+ pTriggerTopic(0),
+ pDdeService2(0),
+ pExtBrwOnExceptionList(NULL),
+ pExtBrwOffExceptionList(NULL),
+ pMiscConfig(0),
+ pThisDocument(0),
+ bMultiQuickSearch( 2 ),
+ bShowFsysExtension( 2 ),
+ bUseExternBrowser(2), // Zugriff auf INIMAN jetzt noch nicht m"oglich
+ bAccelEnabled(sal_False),
+ bIBMTitle(sal_False),
+ bOLEResize(sal_False),
+ bDirectAliveCount(sal_False),
+ bInQuit(sal_False),
+ bStbWasVisible(sal_False),
+ bSessionFailed(sal_False),
+ bInvalidateOnUnlock(sal_False),
+ bBean( sal_False ),
+ bMinimized( sal_False ),
+ bInvisible( sal_False ),
+ bInException( sal_False ),
+ bLateInit_BrowseRegistrationPage(sal_False),
+ nAppEvent( 0 ),
+ pTemplates( 0 )
+{
+ StartListening( *pApp );
+}
+
+SfxAppData_Impl::~SfxAppData_Impl()
+{
+#ifdef DBG_UTIL
+ delete pTopFrames;
+ delete pCancelMgr;
+ delete pFilterIni;
+ delete pSecureURLs;
+#endif
+}
+
+IMPL_STATIC_LINK( SfxAppData_Impl, CreateDataLockBytesFactory, void*, EMPTYARG)
+{
+ pThis->GetDocumentTemplates();
+// pThis->pDataLockBytesFactory = new DataLockByteFactory_Impl;
+// pThis->pImageLockBytesFactory = new ImageLockByteFactory_Impl;
+// pThis->pInfoLockBytesFactory = new InfoLockByteFactory_Impl;
+ return 0;
+}
+
+/*
+ImageLockByteFactory_Impl::ImageLockByteFactory_Impl()
+ : SvLockBytesFactory( DEFINE_CONST_UNICODE("private:image/*") )
+{
+}
+
+struct ImageMap_Impl
+{
+ const char* pName;
+ sal_uInt16 nResId;
+};
+
+static ImageMap_Impl aImageMap[] =
+{
+ "sfx", RID_IMAGE_SPECIAL,
+ "tlx", RID_IMAGE_USER1,
+ "pb", RID_IMAGE_USER2,
+ "mi", RID_IMAGE_USER3,
+ "mba", RID_IMAGE_USER4,
+ "internal-icon-baddata", RID_IMAGE_BADDATA,
+ "internal-gopher-binary", RID_IMAGE_BINARY,
+ "internal-icon-delayed", RID_IMAGE_DELAYED,
+ "internal-icon-embed", RID_IMAGE_EMBED,
+ "internal-gopher-image", RID_IMAGE_IMAGE,
+ "internal-gopher-index", RID_IMAGE_INDEX,
+ "internal-gopher-menu", RID_IMAGE_MENU,
+ "internal-gopher-movie", RID_IMAGE_MOVIE,
+ "internal-icon-notfound", RID_IMAGE_NOTFOUND,
+ "internal-gopher-sound", RID_IMAGE_SOUND,
+ "internal-gopher-telnet", RID_IMAGE_TELNET,
+ "internal-gopher-text", RID_IMAGE_TEXT,
+ "internal-gopher-unknown", RID_IMAGE_UNKNOWN,
+ "internal-icon-insecure", RID_IMAGE_UNSECURE
+};
+*/
+
+class BinaryGlobalLoader : public Resource
+{
+public:
+ BinaryGlobalLoader( SvStream& rStrm, sal_uInt16 nId );
+};
+
+class BinaryResLoader : public Resource
+{
+public:
+ BinaryResLoader( SvStream& rStrm, const ResId& rId );
+};
+
+BinaryGlobalLoader::BinaryGlobalLoader( SvStream& rStrm, sal_uInt16 nId )
+ : Resource( SfxResId( RID_IMAGE_RES ) )
+{
+ BinaryResLoader( rStrm, ResId(nId ) );
+ FreeResource();
+}
+
+BinaryResLoader::BinaryResLoader( SvStream& rStrm, const ResId& rId )
+ : Resource ( rId )
+{
+ char* pStr;
+ sal_uInt16 nStrLen;
+ sal_uInt16 nBytesLeft;
+
+ nStrLen = *((sal_uInt16*)GetClassRes());
+ IncrementRes( sizeof( short ) );
+
+ nBytesLeft = GetRemainSizeRes();
+
+ while( nBytesLeft )
+ {
+ sal_uInt16 nOut = Min( nStrLen, nBytesLeft );
+ sal_uInt16 nInc = Min( (sal_uInt16)(nStrLen+2), nBytesLeft );
+
+ pStr = (char*)GetClassRes();
+ rStrm.Write( pStr, nOut );
+ IncrementRes( nInc );
+ nBytesLeft = (nInc != nBytesLeft) ? GetRemainSizeRes() : 0;
+ }
+}
+/*
+SvLockBytesRef ImageLockByteFactory_Impl::CreateLockBytes(
+ const String& rName, String& rMime )
+{
+ SvLockBytesRef xRet;
+ String aImage( rName, GetWildcard().Len() - 1,
+ rName.Len() - GetWildcard().Len() + 1 );
+ for( sal_uInt16 nPos = sizeof( aImageMap ) / sizeof( ImageMap_Impl ); nPos-- ; )
+ if( aImage == aImageMap[ nPos ].pName )
+ {
+ SvCacheStream* pStream = new SvCacheStream;
+ BinaryGlobalLoader aLoader(
+ *pStream, aImageMap[ nPos ].nResId );
+ xRet = new SvLockBytes( pStream );
+ if( aImage == "sfx" )
+ rMime = "text/html";
+ else
+ rMime = "image/gif";
+ return xRet;
+ }
+ return xRet;
+}
+
+DataLockByteFactory_Impl::DataLockByteFactory_Impl()
+ : SvLockBytesFactory( "data:*" )
+{
+}
+
+
+SvLockBytesRef DataLockByteFactory_Impl::CreateLockBytes(
+ const String& rName, String& rMime )
+{
+#ifndef DBG_MI
+ String aPath( rName, rName.Search( ':' ) + 1, STRING_LEN );
+ String aType = aPath.GetToken( 0, ',' );
+ sal_uInt16 nTok = aType.GetTokenCount( ';' );
+ sal_Bool b64 = sal_False;
+ if( nTok > 1 )
+ {
+ String aLast = aType.GetToken( nTok - 1, ';');
+ if( aLast == "base64" )
+ b64 = sal_True;
+ }
+ rMime = aType.GetToken( 0, ';' );
+ sal_uInt16 nContent = aPath.Search( ',' );
+ String aContent;
+ SvCacheStream* pCache = new SvCacheStream;
+ if( nContent != STRING_NOTFOUND )
+ {
+ aContent = String( aPath, nContent + 1, STRING_LEN );
+ if( b64 )
+ {
+ SvMemoryStream aTmp;
+ aTmp << aContent.GetBuffer();
+ aTmp.Seek( 0L);
+ INetIStream::Decode64( aTmp, *pCache );
+ }
+ else
+ {
+ INetURLObject::Unescape( aContent );
+ *pCache << aContent.GetBuffer();
+ }
+ pCache->Seek( 0L );
+ }
+ SvLockBytesRef xRef = new SvLockBytes( pCache, sal_True );
+#else
+ SvLockBytesRef xRef;
+#endif
+ return xRef;
+}
+
+
+InfoLockByteFactory_Impl::InfoLockByteFactory_Impl()
+ : SvLockBytesFactory( "private:info/*" )
+{
+}
+*/
+String MakeAnchor_Impl( const String& rURL )
+{
+ String aRet( DEFINE_CONST_UNICODE("<a target=\"_blank\" href=\"") );
+ aRet += rURL;
+ aRet += DEFINE_CONST_UNICODE("\">");
+ aRet += rURL;
+ aRet += DEFINE_CONST_UNICODE("</a>");
+ return aRet;
+}
+
+
+void PrepareLine_Impl( SfxObjectShell* pSh, String& aCur )
+{
+ aCur.SearchAndReplaceAscii(
+ "$(FACTORY)", S2U(pSh->GetFactory().GetShortName()) );
+ SfxMedium* pMed = pSh->GetMedium();
+ String aString;
+ if(pMed)
+ aString = MakeAnchor_Impl( pMed->GetName());
+ else
+ aString = String();
+ aCur.SearchAndReplaceAscii( "$(URL)", aString);
+ String aURL;
+ if( pMed ) aURL = pMed->GetPreRedirectedURL();
+ if( aURL == pMed->GetName() ) aURL.Erase();
+ aCur.SearchAndReplaceAscii(
+ "$(ORIGURL)", MakeAnchor_Impl( aURL ) );
+ SfxViewFrame* pFrame = SfxViewFrame::GetFirst( pSh );
+ aCur.SearchAndReplaceAscii(
+ "$(VISIBLE)", ( pFrame && pFrame->IsVisible() ) ? '+' : '-' );
+
+ String aJSDirty;
+ String aJSExec;
+ aCur.SearchAndReplaceAscii( "$(JSEXEC)", aJSExec );
+ aCur.SearchAndReplaceAscii( "$(JSDIRTY)", aJSDirty );
+ aCur.SearchAndReplaceAscii( "$(FORBID)", pSh->Get_Impl()->bForbidCaching ? 0x002B : 0x002D ); // 2Bh = '+', 2Dh = '-'
+
+ MemCache_Impl& rCache = SfxPickList_Impl::Get()->GetMemCache();
+ sal_uInt16 nPos;
+ for( nPos = (sal_uInt16)rCache.Count(); nPos--; )
+ if( pSh == *rCache.GetObject( nPos ) )
+ break;
+
+ aCur.SearchAndReplaceAscii( "$(CACHED)", nPos == USHRT_MAX ? 0x002D : 0x002B ); // 2Bh = '+', 2Dh = '-'
+
+ aCur.SearchAndReplaceAscii(
+ "$(EXPIRE)", pMed && pMed->IsExpired() ? 0x002B : 0x002D ); // 2Bh = '+', 2Dh = '-'
+ String aPost;
+ if( pMed )
+ {
+ SFX_ITEMSET_ARG(
+ pMed->GetItemSet(), pPostItem, SfxStringItem, SID_POSTSTRING,
+ sal_False );
+ if( pPostItem ) aPost = pPostItem->GetValue();
+ }
+ aCur.SearchAndReplaceAscii( "$(POSTSTRING)", aPost);
+}
+
+/*
+SvLockBytesRef InfoLockByteFactory_Impl::CreateLockBytes(
+ const String& rName, String& rMime )
+{
+ SvLockBytesRef xRef;
+ String aPath( rName, rName.Search( '/' ) + 1, STRING_LEN );
+
+ if( aPath == "docs" )
+ {
+ rMime = "text/html";
+ SvCacheStream* pStream = new SvCacheStream;
+ *pStream << "<html><body>";
+ String aStr( SfxResId( STR_MEMINFO_HEADER ) );
+
+ aStr.SearchAndReplace( "$(TOTAL)", SfxObjectShell::Count() );
+ sal_uInt16 nVisCount = 0;
+ SfxObjectShell* pSh;
+ for( pSh = SfxObjectShell::GetFirst( 0, sal_True );
+ pSh; pSh = SfxObjectShell::GetNext( *pSh, 0, sal_True ) )
+ nVisCount++;
+ aStr.SearchAndReplace( "$(VISIBLE)", nVisCount );
+ aStr.SearchAndReplace(
+ "$(CACHE)", SfxPickList_Impl::Get()->GetMemCache().Count() );
+ *pStream << aStr.GetBuffer();
+
+ String aLine( SfxResId( STR_MEMINFO_OBJINFO ) );
+ String aCur;
+ for( pSh = SfxObjectShell::GetFirst( 0, sal_False );
+ pSh; pSh = SfxObjectShell::GetNext( *pSh, 0, sal_False ) )
+ {
+ aCur = aLine;
+ PrepareLine_Impl( pSh, aCur );
+ *pStream << aCur.GetBuffer();
+ }
+ *pStream << "</body></html>";
+ xRef = new SvLockBytes( pStream, sal_True );
+ }
+ return xRef;
+}
+*/
+//--------------------------------------------------------------------
+
+void SfxAppData_Impl::Notify( SfxBroadcaster &rBC, const SfxHint &rHint )
+{
+ // FileSystem?
+ const SfxDirEntryHint* pDirEntryHint = PTR_CAST(SfxDirEntryHint, &rHint);
+ if ( pDirEntryHint )
+ UCB_Helper::ExecuteCommand( pDirEntryHint->GetObject(), WID_UPDATE );
+
+ // aus INet?
+#if 0//(mba)
+ INetHint *pINetHint = PTR_CAST(INetHint, &rHint);
+ sal_Bool bInvalidateStop = pINetHint &&
+ pINetHint->GetId() != INET_WRITE_STATUS &&
+ pINetHint->GetId() != INET_READ_STATUS;
+ if ( !bInvalidateStop )
+ {
+ // vom CancelManager?
+ SfxSimpleHint *pSimpleHint = PTR_CAST(SfxSimpleHint, &rHint);
+ bInvalidateStop = pSimpleHint &&
+ ( pSimpleHint->GetId() & SFX_HINT_CANCELLABLE );
+ }
+
+ // k"onnte etwas stoppbar geworden sein (oder nicht mehr)
+ if ( bInvalidateStop )
+ {
+ SfxViewFrame *pFrame = SfxViewFrame::Current();
+
+ // Da viele Notifies aus anderen Threads als dem Main thread kommen ( Chaos! )
+ IMutex &rMutex = Application::GetSolarMutex();
+ if ( pFrame && rMutex.tryToAcquire() )
+ {
+ SfxBindings &rBind = pFrame->GetBindings();
+ if( rBind.IsInUpdate() )
+ {
+ DBG_WARNING( "W1:Cancelable whrend StatusUpdate angelegt!" );
+ }
+ else
+ {
+ rBind.Invalidate( SID_BROWSE_STOP );
+ rBind.Update( SID_BROWSE_STOP );
+ rBind.Invalidate( SID_BROWSE_STOP );// geht sonst nicht aus
+ }
+
+ rMutex.release();
+ }
+ }
+#endif
+
+ const SfxIniManagerHint* pIniManHint = PTR_CAST(SfxIniManagerHint, &rHint);
+ if ( pIniManHint && pIniManHint->GetIniKey() == SFX_KEY_DONTHIDE_DISABLEDENTRIES )
+ {
+ sal_Bool bDontHide = (sal_Bool)(sal_uInt16)pIniManHint->GetNewValue().ToInt32();
+ UpdateApplicationSettings( bDontHide );
+ }
+}
+
+//------------------------------------------------------------------------
+
+void SfxAppData_Impl::UpdateApplicationSettings( sal_Bool bDontHide )
+{
+ AllSettings aAllSet = Application::GetSettings();
+ StyleSettings aStyleSet = aAllSet.GetStyleSettings();
+ sal_uInt32 nStyleOptions = aStyleSet.GetOptions();
+ if ( bDontHide )
+ nStyleOptions &= ~STYLE_OPTION_HIDEDISABLED;
+ else
+ nStyleOptions |= STYLE_OPTION_HIDEDISABLED;
+ aStyleSet.SetOptions( nStyleOptions );
+ aAllSet.SetStyleSettings( aStyleSet );
+ Application::SetSettings( aAllSet );
+}
+
+SfxDocumentTemplates* SfxAppData_Impl::GetDocumentTemplates()
+{
+ if ( !pTemplates )
+ {
+ pTemplates = new SfxDocumentTemplates;
+ pTemplates->Construct();
+ }
+
+ return pTemplates;
+}
+
diff --git a/sfx2/source/appl/appdde.cxx b/sfx2/source/appl/appdde.cxx
new file mode 100644
index 000000000000..5c8b4ebfc655
--- /dev/null
+++ b/sfx2/source/appl/appdde.cxx
@@ -0,0 +1,744 @@
+/*************************************************************************
+ *
+ * $RCSfile: appdde.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:26 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _SV_WRKWIN_HXX //autogen
+#include <vcl/wrkwin.hxx>
+#endif
+#ifndef _SFXRECTITEM_HXX //autogen
+#include <svtools/rectitem.hxx>
+#endif
+#ifndef _SFXENUMITEM_HXX //autogen
+#include <svtools/eitem.hxx>
+#endif
+#ifndef _SFXINTITEM_HXX //autogen
+#include <svtools/intitem.hxx>
+#endif
+#ifndef _SB_SBSTAR_HXX //autogen
+#include <basic/sbstar.hxx>
+#endif
+#ifndef _SFXSTRITEM_HXX //autogen
+#include <svtools/stritem.hxx>
+#endif
+#ifndef _SVDDE_HXX //autogen
+#include <svtools/svdde.hxx>
+#endif
+#ifndef _LNKBASE_HXX //autogen
+#include <so3/lnkbase.hxx>
+#endif
+#ifndef _LINKMGR_HXX //autogen
+#include <so3/linkmgr.hxx>
+#endif
+#include <tools/urlobj.hxx>
+#pragma hdrstop
+
+#include "app.hxx"
+#include "appdata.hxx"
+#include "objsh.hxx"
+#include "viewfrm.hxx"
+#include "topfrm.hxx"
+#include "dispatch.hxx"
+#include "sfxtypes.hxx"
+#include "sfxsids.hrc"
+#include "inimgr.hxx"
+#include "helper.hxx"
+
+//========================================================================
+
+String SfxDdeServiceName_Impl( const String& sIn )
+{
+ ByteString sTemp = U2S( sIn );
+ ByteString sReturn;
+
+ for ( sal_uInt16 n = sTemp.Len(); n; --n )
+ if ( sTemp.Copy( n-1, 1 ).IsAlphaNumericAscii() )
+ sReturn += sTemp.GetChar(n-1);
+
+ return S2U( sReturn );
+}
+
+
+class ImplDdeService : public DdeService
+{
+public:
+ ImplDdeService( const String& rNm )
+ : DdeService( rNm )
+ {}
+ virtual BOOL MakeTopic( const String& );
+
+ virtual String Topics();
+// virtual String Formats();
+// virtual String SysItems();
+// virtual String Status();
+
+ virtual BOOL SysTopicExecute( const String* pStr );
+};
+
+class SfxDdeTriggerTopic_Impl : public DdeTopic
+{
+public:
+ SfxDdeTriggerTopic_Impl()
+ : DdeTopic( DEFINE_CONST_UNICODE("TRIGGER") )
+ {}
+
+ virtual BOOL Execute( const String* );
+};
+
+class SfxDdeDocTopic_Impl : public DdeTopic
+{
+public:
+ SfxObjectShell* pSh;
+ DdeData aData;
+ SvData aSvData;
+
+ SfxDdeDocTopic_Impl( SfxObjectShell* pShell )
+ : DdeTopic( pShell->GetTitle(SFX_TITLE_FULLNAME) ), pSh( pShell )
+ {}
+
+ virtual DdeData* Get( ULONG );
+ virtual BOOL Put( const DdeData* );
+ virtual BOOL Execute( const String* );
+ virtual BOOL StartAdviseLoop();
+ virtual BOOL MakeItem( const String& rItem );
+
+// wird benoetigt?
+// virtual void Connect( long n );
+// virtual void Disconnect( long n );
+// virtual void StopAdviseLoop();
+
+};
+
+
+SV_DECL_PTRARR( SfxDdeDocTopics_Impl, SfxDdeDocTopic_Impl * const, 4, 4 )
+SV_IMPL_PTRARR( SfxDdeDocTopics_Impl, SfxDdeDocTopic_Impl * const )
+
+//========================================================================
+
+BOOL SfxAppEvent_Impl( ApplicationEvent &rAppEvent,
+ const String &rCmd, const String &rEvent )
+
+/* [Beschreibung]
+
+ Pr"uft, ob 'rCmd' das Event 'rEvent' ist (ohne '(') und baut
+ aus diesem dann ein <ApplicationEvent> zusammen, das per
+ <Application::AppEvent()> ausgef"uhrt werden kann. Ist 'rCmd' das
+ angegegeben Event 'rEvent', dann wird TRUE zur"uckgegeben, sonst FALSE.
+
+
+ [Beispiel]
+
+ rCmd = "Open(\"d:\doc\doc.sdw\")"
+ rEvent = "Open"
+*/
+
+{
+ String aEvent( rEvent );
+ aEvent += 0x0028 ;// "(" = 28h
+ if ( rCmd.CompareIgnoreCaseToAscii( aEvent, aEvent.Len() ) == COMPARE_EQUAL )
+ {
+ String aData( rCmd );
+ aData.Erase( 0, aEvent.Len() );
+ if ( aData.Len() > 2 )
+ {
+ // in das ApplicationEvent-Format wandeln
+ aData.Erase( aData.Len()-1, 1 );
+ for ( USHORT n = 0; n < aData.Len(); ++n )
+ {
+ if ( aData.GetChar(n) == 0x0022 ) // " = 22h
+ for ( ; aData.GetChar(++n) != 0x0022 ; )
+ /* empty loop */ ;
+ else if ( aData.GetChar(n) == 0x0020 ) // SPACE = 20h
+ aData.SetChar(n, '\n');
+ }
+ aData.EraseAllChars( 0x0022 );
+ ApplicationAddress aAddr;
+ rAppEvent = ApplicationEvent( String(), aAddr, U2S(rEvent), aData );
+ return TRUE;
+ }
+ }
+
+ return FALSE;
+}
+
+//-------------------------------------------------------------------------
+
+long SfxApplication::DdeExecute
+(
+ const String& rCmd // in unserer BASIC-Syntax formuliert
+)
+
+/* [Beschreibung]
+
+ Diese Methode kann vom Applikationsentwickler "uberladen werden,
+ um an seine SfxApplication-Subklasse gerichtete DDE-Kommandos
+ zu empfangen.
+
+ Die Basisimplementierung versteht die API-Funktionalit"at der
+ betreffenden SfxApplication-Subklasse in BASIC-Syntax. R"uckgabewerte
+ k"onnen dabei leider nicht "ubertragen werden.
+*/
+
+{
+ // Print oder Open-Event?
+ ApplicationEvent aAppEvent;
+ if ( SfxAppEvent_Impl( aAppEvent, rCmd, DEFINE_CONST_UNICODE("Print") ) ||
+ SfxAppEvent_Impl( aAppEvent, rCmd, DEFINE_CONST_UNICODE("Open") ) )
+ GetpApp()->AppEvent( aAppEvent );
+ else
+ {
+ // alle anderen per BASIC
+ EnterBasicCall();
+ StarBASIC* pBasic = GetBasic();
+ DBG_ASSERT( pBasic, "Wo ist mein Basic???" );
+ SbxVariable* pRet = pBasic->Execute( rCmd );
+ LeaveBasicCall();
+ if( !pRet )
+ {
+ SbxBase::ResetError();
+ return 0;
+ }
+ }
+ return 1;
+}
+
+//--------------------------------------------------------------------
+
+long SfxApplication::DdeGetData
+(
+ const String& rItem, // das anzusprechende Item
+ SvData& rData // in: Format, out: angeforderte Daten
+)
+
+/* [Beschreibung]
+
+ Diese Methode kann vom Applikationsentwickler "uberladen werden,
+ um an seine SfxApplication-Subklasse gerichtete DDE-Daten-Anforderungen
+ zu empfangen.
+
+ Die Basisimplementierung liefert keine Daten und gibt 0 zur"uck.
+*/
+
+{
+ return 0;
+}
+
+//--------------------------------------------------------------------
+
+long SfxApplication::DdeSetData
+(
+ const String& rItem, // das anzusprechende Item
+ const SvData& rData // Daten-Format und Daten selbst
+)
+
+/* [Beschreibung]
+
+ Diese Methode kann vom Applikationsentwickler "uberladen werden,
+ um an seine SfxApplication-Subklasse gerichtete DDE-Daten
+ zu empfangen.
+
+ Die Basisimplementierung nimmt keine Daten entgegen und liefert 0 zur"uck.
+*/
+
+{
+ return 0;
+}
+
+//--------------------------------------------------------------------
+
+SvPseudoObject* SfxApplication::DdeCreateHotLink
+(
+ const String& rItem // das zu erzeugende Item
+)
+
+/* [Beschreibung]
+
+ Diese Methode kann vom Applikationsentwickler "uberladen werden,
+ um an seiner SfxApplication-Subklasse einen DDE-Hotlink einzurichten
+
+ Die Basisimplementierung erzeugt keinen und liefert 0 zur"uck.
+*/
+
+{
+ return 0;
+}
+
+//========================================================================
+
+long SfxObjectShell::DdeExecute
+(
+ const String& rCmd // in unserer BASIC-Syntax formuliert
+)
+
+/* [Beschreibung]
+
+ Diese Methode kann vom Applikationsentwickler "uberladen werden,
+ um an seine SfxObjectShell-Subklasse gerichtete DDE-Kommandos
+ zu empfangen.
+
+ Die Basisimplementierung f"uhrt nichts aus und liefert 0 zur"uck.
+*/
+
+{
+ StarBASIC* pBasic = GetBasic();
+ DBG_ASSERT( pBasic, "Wo ist mein Basic???" ) ;
+ SbxVariable* pRet = pBasic->Execute( rCmd );
+ if( !pRet )
+ {
+ SbxBase::ResetError();
+ return 0;
+ }
+
+ return 1;
+}
+
+//--------------------------------------------------------------------
+
+long SfxObjectShell::DdeGetData
+(
+ const String& rItem, // das anzusprechende Item
+ SvData& rData // in: Format, out: angeforderte Daten
+)
+
+/* [Beschreibung]
+
+ Diese Methode kann vom Applikationsentwickler "uberladen werden,
+ um an seine SfxObjectShell-Subklasse gerichtete DDE-Daten-Anforderungen
+ zu empfangen.
+
+ Die Basisimplementierung liefert keine Daten und gibt 0 zur"uck.
+*/
+
+{
+ return 0;
+}
+
+//--------------------------------------------------------------------
+
+long SfxObjectShell::DdeSetData
+(
+ const String& rItem, // das anzusprechende Item
+ const SvData& rData // Daten-Format und Daten selbst
+)
+
+/* [Beschreibung]
+
+ Diese Methode kann vom Applikationsentwickler "uberladen werden,
+ um an seine SfxObjectShell-Subklasse gerichtete DDE-Daten
+ zu empfangen.
+
+ Die Basisimplementierung nimmt keine Daten entgegen und liefert 0 zur"uck.
+*/
+
+{
+ return 0;
+}
+
+//--------------------------------------------------------------------
+
+SvPseudoObject* SfxObjectShell::DdeCreateHotLink
+(
+ const String& rItem // das zu erzeugende Item
+)
+
+/* [Beschreibung]
+
+ Diese Methode kann vom Applikationsentwickler "uberladen werden,
+ um an seiner SfxObjectShell-Subklasse einen DDE-Hotlink einzurichten
+
+ Die Basisimplementierung erzeugt keinen und liefert 0 zur"uck.
+*/
+
+{
+ return 0;
+}
+
+//========================================================================
+
+long SfxViewFrame::DdeExecute
+(
+ const String& rCmd // in unserer BASIC-Syntax formuliert
+)
+
+/* [Beschreibung]
+
+ Diese Methode kann vom Applikationsentwickler "uberladen werden,
+ um an seine SfxViewFrame-Subklasse gerichtete DDE-Kommandos
+ zu empfangen.
+
+ Die Basisimplementierung versteht die API-Funktionalit"at des
+ betreffenden SfxViewFrame, der darin dargestellten SfxViewShell und
+ der betreffenden SfxObjectShell-Subklasse in BASIC-Syntax.
+ R"uckgabewerte k"onnen dabei leider nicht "ubertragen werden.
+*/
+
+{
+ if ( GetObjectShell() )
+ return GetObjectShell()->DdeExecute( rCmd );
+
+ return 0;
+}
+
+//--------------------------------------------------------------------
+
+long SfxViewFrame::DdeGetData
+(
+ const String& rItem, // das anzusprechende Item
+ SvData& rData // in: Format, out: angeforderte Daten
+)
+
+/* [Beschreibung]
+
+ Diese Methode kann vom Applikationsentwickler "uberladen werden,
+ um an seine SfxViewFrame-Subklasse gerichtete DDE-Daten-Anforderungen
+ zu empfangen.
+
+ Die Basisimplementierung liefert keine Daten und gibt 0 zur"uck.
+*/
+
+{
+ return 0;
+}
+
+//--------------------------------------------------------------------
+
+long SfxViewFrame::DdeSetData
+(
+ const String& rItem, // das anzusprechende Item
+ const SvData& rData // Daten-Format und Daten selbst
+)
+
+/* [Beschreibung]
+
+ Diese Methode kann vom Applikationsentwickler "uberladen werden,
+ um an seine SfxViewFrame-Subklasse gerichtete DDE-Daten
+ zu empfangen.
+
+ Die Basisimplementierung nimmt keine Daten entgegen und liefert 0 zur"uck.
+*/
+
+{
+ return 0;
+}
+
+//--------------------------------------------------------------------
+
+SvPseudoObject* SfxViewFrame::DdeCreateHotLink
+(
+ const String& rItem // das zu erzeugende Item
+)
+
+/* [Beschreibung]
+
+ Diese Methode kann vom Applikationsentwickler "uberladen werden,
+ um an seiner SfxViewFrame-Subklasse einen DDE-Hotlink einzurichten
+
+ Die Basisimplementierung erzeugt keinen und liefert 0 zur"uck.
+*/
+
+{
+ return 0;
+}
+
+
+//========================================================================
+
+BOOL SfxApplication::InitializeDde()
+{
+ DBG_ASSERT( !pAppData_Impl->pDdeService,
+ "Dde kann nicht mehrfach initialisiert werden" )
+
+ pAppData_Impl->pDdeService = new ImplDdeService( Application::GetAppName() );
+ int nError = pAppData_Impl->pDdeService->GetError();
+ if( !nError )
+ {
+ pAppData_Impl->pDocTopics = new SfxDdeDocTopics_Impl;
+
+ // wir wollen auf jedenfall RTF unterstuetzen!
+ pAppData_Impl->pDdeService->AddFormat( FORMAT_RTF );
+
+ // Config-Pfad als Topic wegen Mehrfachstart
+ INetURLObject aOfficeLockFile( GetIniManager()->Get( SFX_KEY_USERCONFIG_PATH ), INET_PROT_FILE );
+ aOfficeLockFile.insertName( DEFINE_CONST_UNICODE( "soffice.lck" ) );
+ String aService( SfxDdeServiceName_Impl( aOfficeLockFile.PathToFileName() ) );
+ aService.ToUpperAscii();
+ pAppData_Impl->pDdeService2 = new ImplDdeService( aService );
+ pAppData_Impl->pTriggerTopic = new SfxDdeTriggerTopic_Impl;
+ pAppData_Impl->pDdeService2->AddTopic( *pAppData_Impl->pTriggerTopic );
+ }
+ return !nError;
+}
+
+//--------------------------------------------------------------------
+
+void SfxApplication::AddDdeTopic( SfxObjectShell* pSh )
+{
+ DBG_ASSERT( pAppData_Impl->pDocTopics, "es gibt gar keinen Dde-Service" )
+ //OV: Im Serverbetrieb ist DDE abgeklemmt!
+ if( !pAppData_Impl->pDocTopics )
+ return;
+
+ // doppeltes Eintragen verhindern
+ String sShellNm;
+ BOOL bFnd = FALSE;
+ for( USHORT n = pAppData_Impl->pDocTopics->Count(); n; )
+ if( (*pAppData_Impl->pDocTopics)[ --n ]->pSh == pSh )
+ {
+ // JP 18.03.96 - Bug 26470
+ // falls das Document unbenannt wurde, ist trotzdem ein
+ // neues Topics anzulegen!
+ if( !bFnd )
+ {
+ bFnd = TRUE;
+ (sShellNm = pSh->GetTitle(SFX_TITLE_FULLNAME)).ToLowerAscii();
+ }
+ String sNm( (*pAppData_Impl->pDocTopics)[ n ]->GetName() );
+ if( sShellNm == sNm.ToLowerAscii() )
+ return ;
+ }
+
+ const SfxDdeDocTopic_Impl* pTopic = new SfxDdeDocTopic_Impl( pSh );
+ pAppData_Impl->pDocTopics->Insert( pTopic,
+ pAppData_Impl->pDocTopics->Count() );
+ pAppData_Impl->pDdeService->AddTopic( *pTopic );
+}
+
+void SfxApplication::RemoveDdeTopic( SfxObjectShell* pSh )
+{
+ DBG_ASSERT( pAppData_Impl->pDocTopics, "es gibt gar keinen Dde-Service" )
+ //OV: Im Serverbetrieb ist DDE abgeklemmt!
+ if( !pAppData_Impl->pDocTopics )
+ return;
+
+ SfxDdeDocTopic_Impl* pTopic;
+ for( USHORT n = pAppData_Impl->pDocTopics->Count(); n; )
+ if( ( pTopic = (*pAppData_Impl->pDocTopics)[ --n ])->pSh == pSh )
+ {
+ pAppData_Impl->pDdeService->RemoveTopic( *pTopic );
+ pAppData_Impl->pDocTopics->DeleteAndDestroy( n );
+ }
+}
+
+const DdeService* SfxApplication::GetDdeService() const
+{
+ return pAppData_Impl->pDdeService;
+}
+
+DdeService* SfxApplication::GetDdeService()
+{
+ return pAppData_Impl->pDdeService;
+}
+
+//--------------------------------------------------------------------
+
+BOOL ImplDdeService::MakeTopic( const String& rNm )
+{
+ // Workaround gegen Event nach unserem Main() unter OS/2
+ // passierte wenn man beim Beenden aus dem OffMgr die App neu startet
+ if ( !Application::IsInExecute() )
+ return FALSE;
+
+ // das Topic rNm wird gesucht, haben wir es ?
+ // erstmal nur ueber die ObjectShells laufen und die mit dem
+ // Namen heraussuchen:
+ BOOL bRet = FALSE;
+ String sNm( rNm );
+ sNm.ToLowerAscii();
+ TypeId aType( TYPE(SfxObjectShell) );
+ SfxObjectShell* pShell = SfxObjectShell::GetFirst( &aType );
+ while( pShell )
+ {
+ String sTmp( pShell->GetTitle(SFX_TITLE_FULLNAME) );
+ sTmp.ToLowerAscii();
+ if( sTmp == sNm ) // die wollen wir haben
+ {
+ SFX_APP()->AddDdeTopic( pShell );
+ bRet = TRUE;
+ break;
+ }
+ pShell = SfxObjectShell::GetNext( *pShell, &aType );
+ }
+
+ if( !bRet )
+ {
+ INetURLObject aWorkPath( SFX_INIMANAGER()->Get( SFX_KEY_WORK_PATH ), INET_PROT_FILE );
+ INetURLObject aFile;
+ if ( aWorkPath.GetNewAbsURL( rNm, &aFile ) &&
+ SfxContentHelper::IsDocument( aFile.GetMainURL() ) )
+ {
+ // File vorhanden
+
+ // dann versuche die Datei zu laden:
+ SfxStringItem aName( SID_FILE_NAME, aFile.GetMainURL() );
+ SfxBoolItem aNewView(SID_OPEN_NEW_VIEW, TRUE);
+// SfxBoolItem aHidden(SID_HIDDEN, TRUE);
+ // minimiert!
+ SfxUInt16Item aViewStat( SID_VIEW_ZOOM_MODE, 0 );
+ SfxRectangleItem aRectItem( SID_VIEW_POS_SIZE, Rectangle() );
+
+ SfxBoolItem aSilent(SID_SILENT, TRUE);
+ SfxDispatcher* pDispatcher = SFX_APP()->GetDispatcher_Impl();
+ const SfxPoolItem* pRet = pDispatcher->Execute( SID_OPENDOC,
+ SFX_CALLMODE_SYNCHRON,
+ &aName, &aNewView,
+ &aViewStat,&aRectItem/*aHidden*/,
+ &aSilent, 0L );
+
+ if( pRet && pRet->ISA( SfxViewFrameItem ) &&
+ ((SfxViewFrameItem*)pRet)->GetFrame() &&
+ 0 != ( pShell = ((SfxViewFrameItem*)pRet)
+ ->GetFrame()->GetObjectShell() ) )
+ {
+ SFX_APP()->AddDdeTopic( pShell );
+ bRet = TRUE;
+ }
+ }
+ }
+ return bRet;
+}
+
+String ImplDdeService::Topics()
+{
+ String sRet;
+ if( GetSysTopic() )
+ sRet += GetSysTopic()->GetName();
+
+ TypeId aType( TYPE(SfxObjectShell) );
+ SfxObjectShell* pShell = SfxObjectShell::GetFirst( &aType );
+ while( pShell )
+ {
+ if( SfxViewFrame::GetFirst( pShell, TYPE(SfxTopViewFrame) ))
+ {
+ if( sRet.Len() )
+ sRet += '\t';
+ sRet += pShell->GetTitle(SFX_TITLE_FULLNAME);
+ }
+ pShell = SfxObjectShell::GetNext( *pShell, &aType );
+ }
+ if( sRet.Len() )
+ sRet += DEFINE_CONST_UNICODE("\r\n");
+ return sRet;
+}
+
+BOOL ImplDdeService::SysTopicExecute( const String* pStr )
+{
+ return (BOOL)SFX_APP()->DdeExecute( *pStr );
+}
+
+//--------------------------------------------------------------------
+
+BOOL SfxDdeTriggerTopic_Impl::Execute( const String* pStr )
+{
+// Application::GetAppWindow()->ToTop(TOTOP_RESTOREWHENMIN);
+ return TRUE;
+}
+
+//--------------------------------------------------------------------
+DdeData* SfxDdeDocTopic_Impl::Get( ULONG nFormat )
+{
+ aSvData = SvData( nFormat );
+ long nRet = pSh->DdeGetData( GetCurItem(), aSvData );
+ if( nRet && aSvData.HasData() )
+ {
+ const char * pGetData;
+ long nLen = aSvData.GetMemorySize();
+ aSvData.GetData( (void**)&pGetData, TRANSFER_REFERENCE );
+ aData = DdeData( pGetData, nLen, nFormat );
+ return &aData;
+ }
+ return 0;
+}
+
+BOOL SfxDdeDocTopic_Impl::Put( const DdeData* pData )
+{
+ aSvData = SvData( pData->GetFormat() );
+ aSvData.SetData( (void*)(const void*)*pData,
+ (long)*pData, TRANSFER_REFERENCE );
+
+ long nRet = aSvData.HasData() ? pSh->DdeSetData( GetCurItem(), aSvData ) : 0;
+
+ return 0 != nRet;
+}
+
+BOOL SfxDdeDocTopic_Impl::Execute( const String* pStr )
+{
+ long nRet = pStr ? pSh->DdeExecute( *pStr ) : 0;
+ return 0 != nRet;
+}
+
+BOOL SfxDdeDocTopic_Impl::MakeItem( const String& rItem )
+{
+ AddItem( DdeItem( rItem ) );
+ return TRUE;
+}
+
+BOOL SfxDdeDocTopic_Impl::StartAdviseLoop()
+{
+ SvPseudoObject* pNewObj = pSh->DdeCreateHotLink( GetCurItem() );
+ if( !pNewObj )
+ return FALSE;
+
+ // dann richten wir auch einen entsprechenden SvBaseLink ein
+ String sNm, sTmp( Application::GetAppName() );
+ ::MakeLnkName( sNm, &sTmp, pSh->GetTitle(SFX_TITLE_FULLNAME), GetCurItem() );
+ new SvBaseLink( sNm, OBJECT_DDE_EXTERN, pNewObj );
+ return TRUE;
+}
+
+
diff --git a/sfx2/source/appl/appinit.cxx b/sfx2/source/appl/appinit.cxx
new file mode 100644
index 000000000000..77f01d362be2
--- /dev/null
+++ b/sfx2/source/appl/appinit.cxx
@@ -0,0 +1,905 @@
+/*************************************************************************
+ *
+ * $RCSfile: appinit.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:26 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include "app.hxx"
+
+#ifndef _CPPUHELPER_IMPLBASE1_HXX_
+#include <cppuhelper/implbase1.hxx>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XTERMINATELISTENER_HPP_
+#include <com/sun/star/frame/XTerminateListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UNO_REFERENCE_H_
+#include <com/sun/star/uno/Reference.h>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XDESKTOP_HPP_
+#include <com/sun/star/frame/XDesktop.hpp>
+#endif
+
+#include <svtools/svtools.hrc>
+
+#ifndef _SV_CONFIG_HXX
+#include <vcl/config.hxx>
+#endif
+#ifndef _SOERR_HXX //autogen
+#include <so3/soerr.hxx>
+#endif
+#ifndef _SFXINTITEM_HXX //autogen
+#include <svtools/intitem.hxx>
+#endif
+#ifndef _SFXENUMITEM_HXX //autogen
+#include <svtools/eitem.hxx>
+#endif
+#ifndef _SFXSTRITEM_HXX //autogen
+#include <svtools/stritem.hxx>
+#endif
+#ifndef _INETBND_HXX //autogen
+#include <so3/inetbnd.hxx>
+#endif
+#ifndef _INET_WRAPPER_HXX
+#include <inet/wrapper.hxx>
+#endif
+#ifndef _MSGBOX_HXX //autogen
+#include <vcl/msgbox.hxx>
+#endif
+#ifndef _SYSTEM_HXX //autogen
+#include <vcl/system.hxx>
+#endif
+#ifndef _EHDL_HXX
+#include <svtools/ehdl.hxx>
+#endif
+#include <svtools/inethist.hxx>
+#ifndef _COM_SUN_STAR_INSTALLATION_XPROTOCOLHANDLERCHECK_HPP_
+#include <com/sun/star/installation/XProtocolHandlerCheck.hpp>
+#endif
+#ifndef _COM_SUN_STAR_INSTALLATION_PROTOCOLS_HPP_
+#include <com/sun/star/installation/protocols.hpp>
+#endif
+#ifndef _COM_SUN_STAR_INSTALLATION_PROTDLGRES_HPP_
+#include <com/sun/star/installation/ProtDlgRes.hpp>
+#endif
+#ifndef _COM_SUN_STAR_INSTALLATION_XINSTALLATIONCHECK_HPP_
+#include <com/sun/star/installation/XInstallationCheck.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LOADER_XIMPLEMENTATIONLOADER_HPP_
+#include <com/sun/star/loader/XImplementationLoader.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LOADER_CANNOTACTIVATEFACTORYEXCEPTION_HPP_
+#include <com/sun/star/loader/CannotActivateFactoryException.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UCB_XCONTENTPROVIDERMANAGER_HPP_
+#include <com/sun/star/ucb/XContentProviderManager.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UCB_XPARAMETERIZEDCONTENTPROVIDER_HPP_
+#include <com/sun/star/ucb/XParameterizedContentProvider.hpp>
+#endif
+#ifndef _COM_SUN_STAR_INSTALLATION_PROTDLGRES_HPP_
+#include <com/sun/star/installation/ProtDlgRes.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BRIDGE_XUNOURLRESOLVER_HPP_
+#include <com/sun/star/bridge/XUnoUrlResolver.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_XDIALOG_HPP_
+#include <com/sun/star/awt/XDialog.hpp>
+#endif
+#ifndef _UNOTOOLS_PROCESSFACTORY_HXX
+#include <unotools/processfactory.hxx>
+#endif
+
+#pragma hdrstop
+
+#include "unoctitm.hxx"
+#include "appimp.hxx"
+#include "accmgr.hxx"
+#include "app.hrc"
+#include "appdata.hxx"
+#include "arrdecl.hxx"
+#include "cfgmgr.hxx"
+#include "dispatch.hxx"
+#include "docfac.hxx"
+#include "evntconf.hxx"
+#include "frameobj.hxx"
+#include "fsetobsh.hxx"
+#include "fsetview.hxx"
+#include "imgmgr.hxx"
+#include "interno.hxx"
+#include "intro.hxx"
+#include "macrconf.hxx"
+#include "mnumgr.hxx"
+#include "msgpool.hxx"
+#include "newhdl.hxx"
+#include "picklist.hxx"
+#include "plugobj.hxx"
+#include "progress.hxx"
+#include "saveopt.hxx"
+#include "sfxhelp.hxx"
+#include "sfxresid.hxx"
+#include "sfxtypes.hxx"
+#include "stbmgr.hxx"
+#include "tbxconf.hxx"
+#include "viewsh.hxx"
+#include "eacopier.hxx"
+#include "nochaos.hxx"
+#include "ucbhelp.hxx"
+#include "fcontnr.hxx"
+#include "helper.hxx" // SfxContentHelper::Kill()
+
+#ifdef UNX
+#define stricmp(a,b) strcmp(a,b)
+#endif
+
+#ifdef MAC
+int svstricmp( const char* pStr1, const char* pStr2);
+#define stricmp svstricmp
+#endif
+
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::frame;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star;
+
+void doFirstTimeInit();
+
+class SfxTerminateListener_Impl : public ::cppu::WeakImplHelper1< XTerminateListener >
+{
+public:
+ virtual void SAL_CALL queryTermination( const EventObject& aEvent ) throw( TerminationVetoException, RuntimeException );
+ virtual void SAL_CALL notifyTermination( const EventObject& aEvent ) throw( RuntimeException );
+ virtual void SAL_CALL disposing( const EventObject& Source ) throw( RuntimeException );
+};
+
+void SAL_CALL SfxTerminateListener_Impl::disposing( const EventObject& Source ) throw( RuntimeException )
+{
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ SFX_APP()->Deinitialize();
+}
+
+void SAL_CALL SfxTerminateListener_Impl::queryTermination( const EventObject& aEvent ) throw(TerminationVetoException, RuntimeException )
+{
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ if ( !SFX_APP()->QueryExit_Impl() )
+ throw TerminationVetoException();
+}
+
+void SAL_CALL SfxTerminateListener_Impl::notifyTermination( const EventObject& aEvent ) throw(RuntimeException )
+{
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ SfxApplication* pApp = SFX_APP();
+ SfxPickList_Impl::Get()->ClearMemCache();
+ pApp->Get_Impl()->aLateInitTimer.Stop();
+ pApp->Broadcast( SfxSimpleHint( SFX_HINT_DEINITIALIZING ) );
+ pApp->Get_Impl()->pAppDispatch->ReleaseAll();
+ pApp->Get_Impl()->pAppDispatch->release();
+ pApp->NotifyEvent(SfxEventHint( SFX_EVENT_CLOSEAPP) );
+ Application::Quit();
+}
+
+//====================================================================
+
+static bool configureUcb(String const & rUcbUrl)
+{
+ Reference< XMultiServiceFactory >
+ xFactory(utl::getProcessServiceFactory());
+ if (!xFactory.is())
+ {
+ DBG_ERROR("configureUcb: No XMultiServiceFactory");
+ return false;
+ }
+
+ // Create (local) UCB configured as specified in the registry (it should
+ // be configured to have no content providers, otherwise the rUcbUrl
+ // (i.e., the '-ucb=...' command line argument) will be ignored:
+ Reference< ucb::XContentProviderManager > xUcb;
+ Sequence< Any > aArgs(1);
+ aArgs[0] <<= sal_True;
+ try
+ {
+ xUcb
+ = Reference< ucb::XContentProviderManager >(
+ xFactory->
+ createInstanceWithArguments(
+ rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.ucb.UniversalContentBroker")),
+ aArgs),
+ UNO_QUERY);
+ }
+ catch (RuntimeException const &) { throw; }
+ catch (Exception const &) {}
+ if (!xUcb.is())
+ {
+ DBG_ERROR("configureUcb(): No UniversalContentBroker service");
+ return false;
+ }
+
+ // If there's already any content providers registered, ignore rUcbUrl:
+ if (xUcb->queryContentProviders().getLength() != 0)
+ {
+ DBG_WARNING(
+ "configureUcb(): Configured UCB and -ucb command line arg");
+ return true;
+ }
+
+ // Modify rUcbUrl with user supplied information until connecting to this
+ // URL succeeds:
+ Reference< bridge::XUnoUrlResolver > xResolver;
+ try
+ {
+ xResolver
+ = Reference< bridge::XUnoUrlResolver >(
+ xFactory->
+ createInstance(
+ rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.bridge.UnoUrlResolver"))),
+ UNO_QUERY);
+ }
+ catch (RuntimeException const &) { throw; }
+ catch (Exception const &) {}
+ if (!xResolver.is())
+ {
+ DBG_ERROR("configureUcb(): No UnoUrlResolver service");
+ return false;
+ }
+ String aTheUcbUrl(rUcbUrl);
+ Reference< awt::XDialog > xDialog;
+ Reference< beans::XPropertySet > xPropertySet;
+ for (;;)
+ {
+ bool bSuccess = false;
+ try
+ {
+ bSuccess = xResolver->resolve(aTheUcbUrl).is() != false;
+ }
+ catch (connection::NoConnectException const &) {}
+ catch (connection::ConnectionSetupException const &) {}
+ catch (IllegalArgumentException const &) {}
+ if (bSuccess)
+ break;
+
+ // Get the login dialog:
+ if (!xDialog.is())
+ {
+ try
+ {
+ xDialog
+ = Reference< awt::XDialog >(
+ xFactory->
+ createInstance(
+ rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.framework."
+ "LoginDialog"))),
+ UNO_QUERY);
+ }
+ catch (RuntimeException const &) { throw; }
+ catch (Exception const &) {}
+ xPropertySet
+ = Reference< beans::XPropertySet >(xDialog, UNO_QUERY);
+ if (!(xDialog.is() && xPropertySet.is()))
+ {
+ DBG_ERROR("configureUcb(): No LoginDialog service");
+ return false;
+ }
+ }
+
+ // Identify the authentication data within the URL:
+ enum Parameter
+ {
+ PARAM_NONE = 0,
+ PARAM_HOST = 2,
+ PARAM_PORT = 4,
+ PARAM_USER = 6,
+ PARAM_PASSWORD = 8,
+ PARAM_TICKET = 9
+ };
+ struct Occurence
+ {
+ xub_StrLen m_nStart;
+ xub_StrLen m_nValue;
+ xub_StrLen m_nEnd;
+ Parameter m_eParam;
+ };
+ Occurence aParams[4];
+ int nParamCount = 0;
+ xub_StrLen nEnd = aTheUcbUrl.Len();
+ xub_StrLen nPos = 0;
+ while (nPos != nEnd && aTheUcbUrl.GetChar(nPos++) != ':');
+ // skip <scheme> part...
+ while (nPos != nEnd && aTheUcbUrl.GetChar(nPos) != ',')
+ ++nPos; // skip 'name' of <connection> part...
+ xub_StrLen nInsert = nPos;
+ if (nPos != nEnd && aTheUcbUrl.GetChar(nPos) == ',')
+ ++nPos;
+ while (nPos != nEnd && aTheUcbUrl.GetChar(nPos) != ';')
+ {
+ xub_StrLen nStart = nPos;
+ while (nPos != nEnd
+ && aTheUcbUrl.GetChar(nPos) != '='
+ && aTheUcbUrl.GetChar(nPos) != ','
+ && aTheUcbUrl.GetChar(nPos) != ';')
+ ++nPos;
+ if (nPos != nEnd && aTheUcbUrl.GetChar(nPos) == '=')
+ {
+ String aName(aTheUcbUrl, nStart, nPos - nStart);
+ Parameter eParam
+ = aName.EqualsIgnoreCaseAscii("host") ? PARAM_HOST :
+ aName.EqualsIgnoreCaseAscii("port") ? PARAM_PORT :
+ aName.EqualsIgnoreCaseAscii("user") ? PARAM_USER :
+ aName.EqualsIgnoreCaseAscii("password") ?
+ PARAM_PASSWORD :
+ aName.EqualsIgnoreCaseAscii("ticket") ? PARAM_TICKET :
+ PARAM_NONE;
+ if (int(eParam) != int(PARAM_NONE))
+ // work around compiler bug...
+ {
+ bool bNew = true;
+ for (int i = 0; i != nParamCount; ++i)
+ if ((aParams[i].m_eParam & ~1) == (eParam & ~1))
+ // treat 'password' and 'ticket' the same...
+ {
+ bNew = false;
+ break;
+ }
+ if (bNew)
+ {
+ aParams[nParamCount].m_eParam = eParam;
+ aParams[nParamCount].m_nStart = nStart - 1;
+ aParams[nParamCount].m_nValue = ++nPos;
+ while (nPos != nEnd
+ && aTheUcbUrl.GetChar(nPos) != ','
+ && aTheUcbUrl.GetChar(nPos) != ';')
+ ++nPos;
+ aParams[nParamCount].m_nEnd = nPos;
+ ++nParamCount;
+ }
+ }
+ }
+ while (nPos != nEnd
+ && aTheUcbUrl.GetChar(nPos) != ','
+ && aTheUcbUrl.GetChar(nPos) != ';')
+ ++nPos;
+ if (nPos != nEnd && aTheUcbUrl.GetChar(nPos) == ',')
+ ++nPos;
+ }
+
+ // Copy the authentication data from the URL to the dialog:
+ try
+ {
+ String aHostPort;
+ for (int i = 0; i < nParamCount; ++i)
+ {
+ String aValue(INetURLObject::decode(
+ aTheUcbUrl.Copy(aParams[i].m_nValue,
+ aParams[i].m_nEnd
+ - aParams[i].m_nValue),
+ '%', INetURLObject::DECODE_WITH_CHARSET));
+ if (aValue.Len() != 0)
+ switch (aParams[i].m_eParam)
+ {
+ case PARAM_HOST:
+ aHostPort.Insert(aValue, 0);
+ break;
+
+ case PARAM_PORT:
+ aHostPort.Append(':');
+ aHostPort.Append(aValue);
+ break;
+
+ case PARAM_USER:
+ xPropertySet->
+ setPropertyValue(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "UserName")),
+ makeAny(rtl::OUString(aValue)));
+ break;
+
+ case PARAM_PASSWORD:
+ xPropertySet->
+ setPropertyValue(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "Password")),
+ makeAny(rtl::OUString(aValue)));
+ break;
+ }
+ }
+ if (aHostPort.Len() != 0)
+ xPropertySet->
+ setPropertyValue(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Server")),
+ makeAny(rtl::OUString(aHostPort)));
+ }
+ catch (beans::UnknownPropertyException const &) {}
+ catch (beans::PropertyVetoException const &) {}
+ catch (IllegalArgumentException const &) {}
+ catch (WrappedTargetException const &) {}
+
+ if (xDialog->execute() == 0)
+ return false;
+
+ // Copy the authentication data back from the dialog into the URL:
+ rtl::OUString aHost;
+ rtl::OUString aUser;
+ rtl::OUString aPassword;
+ bSuccess = false;
+ try
+ {
+ bSuccess
+ = (xPropertySet->
+ getPropertyValue(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "Server")))
+ >>= aHost)
+ && (xPropertySet->
+ getPropertyValue(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "UserName")))
+ >>= aUser)
+ && (xPropertySet->
+ getPropertyValue(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "Password")))
+ >>= aPassword);
+ }
+ catch (beans::UnknownPropertyException const &) {}
+ catch (WrappedTargetException const &) {}
+ if (!bSuccess)
+ {
+ DBG_ERROR("configureUcb(): Bad LoginDialog service");
+ return false;
+ }
+ sal_Int32 nColon = aHost.indexOf(':');
+ if (nColon == -1)
+ nColon = aHost.getLength();
+ while (nParamCount-- > 0)
+ aTheUcbUrl.Erase(aParams[nParamCount].m_nStart,
+ aParams[nParamCount].m_nEnd
+ - aParams[nParamCount].m_nStart);
+ if (aPassword.getLength() != 0)
+ {
+ aTheUcbUrl.InsertAscii(",password=", nInsert);
+ aTheUcbUrl.Insert(INetURLObject::encode(
+ aPassword,
+ INetURLObject::PART_UNO_PARAM_VALUE,
+ '%',
+ INetURLObject::ENCODE_ALL),
+ nInsert + RTL_CONSTASCII_LENGTH(",password="));
+ }
+ if (aUser.getLength() != 0)
+ {
+ aTheUcbUrl.InsertAscii(",user=", nInsert);
+ aTheUcbUrl.Insert(INetURLObject::encode(
+ aUser,
+ INetURLObject::PART_UNO_PARAM_VALUE,
+ '%',
+ INetURLObject::ENCODE_ALL),
+ nInsert + RTL_CONSTASCII_LENGTH(",user="));
+ }
+ if (aHost.getLength() - nColon > 1)
+ {
+ aTheUcbUrl.InsertAscii(",port=", nInsert);
+ aTheUcbUrl.Insert(INetURLObject::encode(
+ aHost.copy(nColon + 1),
+ INetURLObject::PART_UNO_PARAM_VALUE,
+ '%',
+ INetURLObject::ENCODE_ALL),
+ nInsert + RTL_CONSTASCII_LENGTH(",port="));
+ }
+ if (nColon > 0)
+ {
+ aTheUcbUrl.InsertAscii(",host=", nInsert);
+ aTheUcbUrl.Insert(INetURLObject::encode(
+ aHost.copy(0, nColon),
+ INetURLObject::PART_UNO_PARAM_VALUE,
+ '%',
+ INetURLObject::ENCODE_ALL),
+ nInsert + RTL_CONSTASCII_LENGTH(",host="));
+ }
+ }
+
+ // Get the (local) RemoteAccessUCP:
+ Reference< ucb::XParameterizedContentProvider > xRemoteAccessUcp;
+ try
+ {
+ xRemoteAccessUcp
+ = Reference< ucb::XParameterizedContentProvider >(
+ xFactory->
+ createInstance(
+ rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.ucb."
+ "RemoteAccessContentProvider"))),
+ UNO_QUERY);
+ }
+ catch (RuntimeException const &) { throw; }
+ catch (Exception const &) {}
+ if (!xRemoteAccessUcp.is())
+ {
+ DBG_ERROR("configureUcb(): No RemoteAccessContentProvider service");
+ return false;
+ }
+
+ // Create an instance of the RemoteAccessUCP specialized on the
+ // (template, url) pair:
+ rtl::OUString aTemplate(RTL_CONSTASCII_USTRINGPARAM(".*"));
+ Reference< ucb::XContentProvider > xInstance;
+ try
+ {
+ xInstance
+ = xRemoteAccessUcp->registerInstance(aTemplate, aTheUcbUrl, false);
+ }
+ catch (IllegalArgumentException const &)
+ {
+ DBG_ERROR("configureUcb(): Can't registerInstance()");
+ return false;
+ }
+ if (!xInstance.is())
+ {
+ DBG_ERROR("configureUcb(): Bad registerInstance()");
+ return false;
+ }
+
+ // Register the specialized RemoteAccessUCP instance at the (local) UCB:
+ try
+ {
+ xUcb->registerContentProvider(xInstance, aTemplate, false);
+ }
+ catch (ucb::DuplicateProviderException const &)
+ {
+ DBG_ERROR("configureUcb(): Bad registerContentProvider()");
+ try
+ {
+ xRemoteAccessUcp->deregisterInstance(aTemplate, aTheUcbUrl);
+ }
+ catch (lang::IllegalArgumentException const &) {}
+ return false;
+ }
+ catch (uno::RuntimeException const &)
+ {
+ DBG_ERROR("configureUcb(): Bad registerContentProvider()");
+ try
+ {
+ xRemoteAccessUcp->deregisterInstance(aTemplate, aTheUcbUrl);
+ }
+ catch (lang::IllegalArgumentException const &) {}
+ throw;
+ }
+
+ return true;
+}
+
+//====================================================================
+
+FASTBOOL SfxApplication::Initialize_Impl()
+{
+#ifdef TLX_VALIDATE
+ StgIo::SetErrorLink( LINK( this, SfxStorageErrHdl, Error ) );
+#endif
+
+//! FSysEnableSysErrorBox( FALSE ); (pb) replaceable?
+
+ Reference < XDesktop > xDesktop ( ::utl::getProcessServiceFactory()->createInstance( DEFINE_CONST_UNICODE("com.sun.star.frame.Desktop") ), UNO_QUERY );
+ xDesktop->addTerminateListener( new SfxTerminateListener_Impl() );
+
+ if( !CheckTryBuy_Impl() )
+ {
+ exit(-1);
+ return FALSE;;
+ }
+
+ Application::EnableAutoHelpId();
+
+ InsertLateInitHdl( STATIC_LINK( pAppData_Impl, SfxAppData_Impl, CreateDataLockBytesFactory ) );
+
+ pAppData_Impl->pAppDispatch = new SfxStatusDispatcher;
+ pAppData_Impl->pAppDispatch->acquire();
+
+ // SV-Look
+ Help::EnableContextHelp();
+ Help::EnableExtHelp();
+ Help::EnableQuickHelp();
+
+ // falls der IniManager nicht schon durch CreateResManager erzeugt wurde
+ if ( !pAppIniMgr )
+ pAppIniMgr = CreateIniManager();
+
+ // StarObjects initialisieren
+ if ( !SvFactory::Init() )
+ ErrorBox( 0, SfxResId(MSG_ERR_SOINIT) ).Execute();
+
+ // Factory f"ur das SfxFrameObject anlegen; da der Pointer in den AppDaten
+ // liegt, dieser aber nicht exportierbar ist, mu\s ein exportierbarer
+ // Wrapper angelegt werden
+ pAppData_Impl->pSfxFrameObjectFactoryPtr = new SfxFrameObjectFactoryPtr;
+ pAppData_Impl->pSfxFrameObjectFactoryPtr->pSfxFrameObjectFactory = SfxFrameObject::ClassFactory();
+ SvBindStatusCallback::SetProgressCallback( STATIC_LINK( 0, SfxProgress, DefaultBindingProgress ) );
+ INetURLHistory::GetOrCreate()->SetLocation( GetIniManager()->Get( SFX_KEY_USERCONFIG_PATH ) );
+
+ // merken, falls Applikation normal gestartet wurde
+ if ( pAppData_Impl->bDirectAliveCount )
+ SvFactory::IncAliveCount();
+
+ pImp->pEventHdl = new UniqueIndex( 1, 4, 4 );
+ InitializeDisplayName_Impl();
+
+#ifdef DBG_UTIL
+ // Der SimplerErrorHandler dient Debugzwecken. In der Product werden
+ // nichtgehandelte Fehler durch Errorcode 1 an SFX gegeben.
+ new SimpleErrorHandler;
+#endif
+ new SfxErrorHandler(RID_ERRHDL, ERRCODE_AREA_TOOLS, ERRCODE_AREA_LIB1);
+ new SfxErrorHandler(
+ RID_SO_ERROR_HANDLER, ERRCODE_AREA_SO, ERRCODE_AREA_SO_END);
+ new SfxErrorHandler(
+ (RID_SJ_START +1), ERRCODE_AREA_JAVA, ERRCODE_AREA_JAVA_END);
+ new SfxErrorHandler(
+ RID_BASIC_START, ERRCODE_AREA_SBX, ERRCODE_AREA_SBX_END );
+
+ // diverse Pointer
+ pImp->pAutoSaveTimer = new Timer;
+ String aPickSize = GetIniManager()->Get( SFX_KEY_PICKLIST );
+ int nPickSize = !aPickSize.Len() ? 4 : (int) aPickSize.ToInt32();
+ SfxPickList_Impl::GetOrCreate( Min(9, nPickSize) );
+
+ /////////////////////////////////////////////////////////////////
+
+ DBG_ASSERT( !pAppDispat, "AppDispatcher already exists" );
+ pAppDispat = new SfxDispatcher((SfxDispatcher*)0);
+ pSlotPool = new SfxSlotPool;
+ pImp->pTbxCtrlFac = new SfxTbxCtrlFactArr_Impl;
+ pImp->pStbCtrlFac = new SfxStbCtrlFactArr_Impl;
+ pImp->pMenuCtrlFac = new SfxMenuCtrlFactArr_Impl;
+ pImp->pViewFrames = new SfxViewFrameArr_Impl;
+ pImp->pViewShells = new SfxViewShellArr_Impl;
+ pImp->pObjShells = new SfxObjectShellArr_Impl;
+ nInterfaces = SFX_INTERFACE_APP+8;
+ pInterfaces = new SfxInterface*[nInterfaces];
+ memset( pInterfaces, 0, sizeof(SfxInterface*) * nInterfaces );
+
+ pAppData_Impl->pAppCfg = new SfxConfigManager;
+ pAppData_Impl->pAppCfg->Activate( pCfgMgr );
+
+ pAcceleratorMgr = new SfxAcceleratorManager;
+
+ pImageMgr = new SfxImageManager;
+ pOptions = new SfxOptions;
+
+ SfxNewHdl* pNewHdl = SfxNewHdl::GetOrCreate();
+ InsertLateInitHdl( LINK(pNewHdl, SfxNewHdl, InitMem_Impl) );
+ InsertLateInitHdl( LINK(this, SfxApplication,SpecialService_Impl) );
+
+ // Die Strings muessen leider zur Laufzeit gehalten werden, da wir bei
+ // einer ::com::sun::star::uno::Exception keine Resourcen mehr laden duerfen.
+ pImp->aMemExceptionString = pNewHdl->GetMemExceptionString();
+ pImp->aResWarningString = String( SfxResId( STR_RESWARNING ) );
+ pImp->aResExceptionString = String( SfxResId( STR_RESEXCEPTION ) );
+ pImp->aSysResExceptionString = String( SfxResId( STR_SYSRESEXCEPTION ) );
+
+ Registrations_Impl();
+
+ RegisterEvent(SFX_EVENT_STARTAPP, String(SfxResId(STR_EVENT_STARTAPP)));
+ RegisterEvent(SFX_EVENT_CLOSEAPP, String(SfxResId(STR_EVENT_CLOSEAPP)));
+ RegisterEvent(SFX_EVENT_CREATEDOC,String(SfxResId(STR_EVENT_CREATEDOC)));
+ RegisterEvent(SFX_EVENT_OPENDOC, String(SfxResId(STR_EVENT_OPENDOC)));
+ RegisterEvent(SFX_EVENT_SAVEASDOC, String(SfxResId(STR_EVENT_SAVEASDOC)));
+ RegisterEvent(SFX_EVENT_SAVEASDOCDONE, String(SfxResId(STR_EVENT_SAVEASDOCDONE)));
+ RegisterEvent(SFX_EVENT_SAVEDOC, String(SfxResId(STR_EVENT_SAVEDOC)));
+ RegisterEvent(SFX_EVENT_SAVEDOCDONE, String(SfxResId(STR_EVENT_SAVEDOCDONE)));
+ RegisterEvent(SFX_EVENT_PREPARECLOSEDOC, String(SfxResId(STR_EVENT_PREPARECLOSEDOC)));
+ RegisterEvent(SFX_EVENT_CLOSEDOC, String(SfxResId(STR_EVENT_CLOSEDOC)));
+ RegisterEvent(SFX_EVENT_ACTIVATEDOC, String(SfxResId(STR_EVENT_ACTIVATEDOC)));
+ RegisterEvent(SFX_EVENT_DEACTIVATEDOC, String(SfxResId(STR_EVENT_DEACTIVATEDOC)));
+ RegisterEvent(SFX_EVENT_PRINTDOC, String(SfxResId(STR_EVENT_PRINTDOC)));
+ RegisterEvent(SFX_EVENT_ONERROR, String(SfxResId(STR_EVENT_ONERROR)));
+ RegisterEvent(SFX_EVENT_NEWMESSAGE, String(SfxResId(STR_EVENT_NEWMESSAGE)));
+
+ // Filtercontainer fuer ::com::sun::star::sdbcx::User Overrides registrieren
+ SfxFilterContainer* pDefaults = new SfxFilterContainer( DEFINE_CONST_UNICODE(SFX_FCONTNR_REDIRECTS) );
+ SfxFilterMatcher& rMatcher = GetFilterMatcher();
+ rMatcher.AddContainer( pDefaults );
+ pDefaults->LoadFilters(
+ DEFINE_CONST_UNICODE(SFX_FCONTNR_REDIRECTS), sal_False,
+ SFX_FILTER_REDIRECT | SFX_FILTER_IMPORT | SFX_FILTER_ALIEN |
+ SFX_FILTER_NOTINFILEDLG | SFX_FILTER_NOTINCHOOSER );
+
+ if( _nFeatures & SFX_FEATURE_SCALC &&
+ _nFeatures & SFX_FEATURE_SIMPRESS &&
+ _nFeatures & SFX_FEATURE_SDRAW &&
+ _nFeatures & SFX_FEATURE_SIMAGE &&
+ _nFeatures & SFX_FEATURE_SCHART &&
+ _nFeatures & SFX_FEATURE_SMATH &&
+ _nFeatures & SFX_FEATURE_SWRITER )
+ {
+ // Office Filter registrieren
+ SfxFilterContainer* pContainer =
+ new SfxFilterContainer( DEFINE_CONST_UNICODE("soffice4") );
+ pContainer->AddFilter( new SfxOfficeFilter( pContainer ), 0 );
+ rMatcher.AddContainer( pContainer );
+ }
+
+ // Subklasse initialisieren
+ bDowning = sal_False;
+ bInInit = sal_True;
+ Init();
+
+ // get CHAOS item pool...
+ pAppData_Impl->pPool = NoChaos::GetItemPool();
+ SetPool( pAppData_Impl->pPool );
+
+ // If '-ucb=...' was specified on the command line, configure the UCB now:
+ if (pAppData_Impl->aUcbUrl.Len() != 0
+ && !configureUcb(pAppData_Impl->aUcbUrl))
+ {
+ exit(-1);
+ return FALSE;
+ }
+
+// SfxFrameSetObjectShell::RegisterFactory(0);
+// SfxFrameSetView_Impl::RegisterFactory(0);
+// SfxFrameSetSourceView_Impl::RegisterFactory(1);
+
+// rMatcher.AddContainer( new SfxExecutableFilterContainer() );
+// rMatcher.AddContainer( new SfxExternalAppFilterContainer() );
+// rMatcher.AddContainer( new SfxPluginFilterContainer() );
+
+ InsertLateInitHdl( LINK(this, SfxApplication,LateInitOLEReg_Impl) );
+ InsertLateInitHdl( LINK(this, SfxApplication,LateInitCHAOSReg_Impl) );
+ InsertLateInitHdl( LINK(this, SfxApplication,LateInitNewMenu_Impl) );
+ InsertLateInitHdl( LINK(this, SfxApplication,LateInitWizMenu_Impl) );
+ InsertLateInitHdl( LINK(this, SfxApplication,AutoStart_Impl) );
+
+ bInInit = sal_False;
+ if ( bDowning )
+ return sal_False;
+
+ // App-Dispatcher aufbauen
+ pAppDispat->Push(*this);
+ pAppDispat->DoActivate_Impl( sal_True );
+
+ // if not done in Init(), load the configuration
+ if ( !pImp->bConfigLoaded )
+ LoadConfig();
+ pImp->pAutoSaveTimer->SetTimeout( pOptions->GetAutoSaveTime() * 60000 );
+ pImp->pAutoSaveTimer->SetTimeoutHdl( LINK( pApp, SfxApplication, AutoSaveHdl_Impl ) );
+
+ // App-StartEvent
+ NotifyEvent(SfxEventHint(SFX_EVENT_STARTAPP), sal_False);
+
+//(dv) if ( !pAppData_Impl->bBean )
+//(mba) doFirstTimeInit();
+
+ Application::PostUserEvent( LINK( this, SfxApplication, OpenClients_Impl ) );
+
+ DELETEZ(pImp->pIntro);
+
+ // start LateInit
+ SfxAppData_Impl *pAppData = Get_Impl();
+ pAppData->aLateInitTimer.SetTimeout( 250 );
+ pAppData->aLateInitTimer.SetTimeoutHdl( LINK( this, SfxApplication, LateInitTimerHdl_Impl ) );
+ pAppData->aLateInitTimer.Start();
+
+/*! (pb) no help at this time
+ Application::PostUserEvent( LINK( this, SfxApplication, StartWelcomeScreenHdl_Impl ) );
+*/
+ return sal_True;
+}
+
+IMPL_LINK( SfxApplication, SpecialService_Impl, void*, pVoid )
+{
+ if ( pAppData_Impl->bBean )
+ return 0;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xMgr( ::utl::getProcessServiceFactory() );
+ ::com::sun::star::uno::Reference< ::com::sun::star::installation::XInstallationCheck > xInst( xMgr->createInstance( DEFINE_CONST_UNICODE("com.sun.star.installation.FontCheck") ), ::com::sun::star::uno::UNO_QUERY );
+ if ( xInst.is() )
+ xInst->checkWithDialog( sal_False );
+
+ String aWizard = GetIniManager()->Get( DEFINE_CONST_UNICODE("Common"), 0, 0, DEFINE_CONST_UNICODE("RunWizard") );
+ sal_Bool bRunWizard = (sal_Bool) (sal_uInt16) aWizard.ToInt32();
+ if ( bRunWizard )
+ {
+ SfxStringItem aReferer( SID_REFERER, DEFINE_CONST_UNICODE("private:user") );
+ SfxStringItem aMacro( SID_FILE_NAME, DEFINE_CONST_UNICODE("macro://#InternetSetup.Run.Main()") );
+//(mba) pAppDispat->Execute( SID_OPENDOC, SFX_CALLMODE_ASYNCHRON, &aMacro, &aReferer, 0L );
+ GetIniManager()->DeleteKey( DEFINE_CONST_UNICODE("Common"), DEFINE_CONST_UNICODE("RunWizard") );
+ GetIniManager()->Flush();
+ }
+ else if ( !pAppData_Impl->bBean )
+ {
+ // StarOffice registration
+ INetURLObject aORegObj( GetIniManager()->Get( SFX_KEY_USERCONFIG_PATH ), INET_PROT_FILE );
+ aORegObj.insertName( DEFINE_CONST_UNICODE( "oreg.ini" ) );
+ Config aCfg( aORegObj.PathToFileName() );
+ aCfg.SetGroup( "reg" );
+ sal_uInt16 nRegKey = (sal_uInt16) aCfg.ReadKey( "registration", "0" ).ToInt32();
+ if( nRegKey == 0 )
+ GetAppDispatcher_Impl()->Execute(SID_ONLINE_REGISTRATION_DLG, SFX_CALLMODE_ASYNCHRON);
+ }
+
+ return 0;
+}
+
+IMPL_LINK( SfxApplication, AutoStart_Impl, void*, pVoid )
+{
+ // Autostart-Code
+ SfxStringItem aReferer( SID_REFERER, DEFINE_CONST_UNICODE("private:user") );
+ String aName = SFX_INIMANAGER()->Get( SFX_KEY_AUTOSTART_DIR );
+ if ( aName.Len() )
+ {
+ ::com::sun::star::uno::Sequence< ::rtl::OUString > aFiles =
+ SfxContentHelper::GetFolderContents( aName, sal_False );
+ const ::rtl::OUString* pFiles = aFiles.getConstArray();
+ UINT32 nCount = aFiles.getLength();
+ for ( UINT32 i = 0; i < nCount; i++ )
+ {
+ String aURL( pFiles[i] );
+ if ( aURL.Len() )
+ {
+ SfxStringItem aItem( SID_FILE_NAME, aURL );
+ GetAppDispatcher_Impl()->Execute( SID_OPENDOC, SFX_CALLMODE_ASYNCHRON, &aItem, &aReferer, 0L );
+ }
+ }
+ }
+
+ return 0L;
+}
+
+
diff --git a/sfx2/source/appl/appmain.cxx b/sfx2/source/appl/appmain.cxx
new file mode 100644
index 000000000000..9e416ee53a0b
--- /dev/null
+++ b/sfx2/source/appl/appmain.cxx
@@ -0,0 +1,632 @@
+/*************************************************************************
+ *
+ * $RCSfile: appmain.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:26 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+//#define TF_NEWDESKTOP
+
+#define _SDINTERN_HXX
+
+#pragma hdrstop
+
+#ifndef _PVER_HXX //autogen
+#include <svtools/pver.hxx>
+#endif
+#ifndef _URLOBJ_HXX //autogen
+#include <tools/urlobj.hxx>
+#endif
+#ifndef _SFXINIMGR_HXX //autogen
+#include <svtools/iniman.hxx>
+#endif
+#ifndef _CSTITEM_HXX //autogen
+#include <svtools/cstitem.hxx>
+#endif
+#ifndef _SV_CONFIG_HXX //autogen
+#include <vcl/config.hxx>
+#endif
+#ifndef _EHDL_HXX
+#include <svtools/ehdl.hxx>
+#endif
+
+#include <svtools/itempool.hxx>
+#include <svtools/urihelper.hxx>
+
+#include "appimp.hxx"
+#include "sfxtypes.hxx"
+#include "appdata.hxx"
+#include "docfac.hxx"
+#include "app.hxx"
+#include "arrdecl.hxx"
+#include "dispatch.hxx"
+#include "sfxresid.hxx"
+#include "interno.hxx"
+#include "fcontnr.hxx"
+#include "viewsh.hxx"
+#include "picklist.hxx"
+#include "intro.hxx"
+#include "msgpool.hxx"
+#include "cfgmgr.hxx"
+#include "accmgr.hxx"
+#include "mnumgr.hxx"
+#include "stbmgr.hxx"
+#include "imgmgr.hxx"
+#include "saveopt.hxx"
+#include "eacopier.hxx"
+#include "appuno.hxx"
+#include "objuno.hxx"
+#include "urltrans.hxx"
+#include "app.hrc"
+#include "docfile.hxx"
+#include "inimgr.hxx"
+
+#ifdef WNT
+#include <tools/svwin.h>
+#endif
+
+#ifdef UNX
+#define stricmp(a,b) strcmp(a,b)
+#endif
+
+
+//===================================================================
+
+/*DBG_NAME(SfxAppMainIntro);
+DBG_NAME(SfxAppMainSO_Init);
+DBG_NAME(SfxAppMainAppRes);
+DBG_NAME(SfxAppMainInit0);
+DBG_NAME(SfxAppMainCreateAppWin);
+DBG_NAME(SfxAppMainInit1);
+DBG_NAME(SfxAppMainCfgMgr);
+DBG_NAME(SfxAppMainInitController);
+DBG_NAME(SfxAppMainInitException);
+DBG_NAME(SfxAppMainRegisterIF);
+DBG_NAME(SfxAppMainInit);
+DBG_NAME(SfxAppMainLoadBasMgr);
+DBG_NAME(SfxAppMainSbxInit);*/
+DBG_NAME(SfxAppMainNewMenu);
+DBG_NAME(SfxAppMainBmkMenu);
+DBG_NAME(SfxAppMainWizMenu);
+DBG_NAME(SfxAppMainOLEReg);
+DBG_NAME(SfxAppMainCHAOSReg);
+/*DBG_NAME(SfxAppMainInitDispatcher);
+DBG_NAME(SfxAppMainLoadConfig);
+DBG_NAME(SfxAppMainInitAppWin);
+DBG_NAME(SfxAppMainAppEvents);*/
+
+//===================================================================
+
+#define SFX_TEMPNAMEBASE_DIR "soffice.tmp"
+#define SFX_KEY_TEMPNAMEBASE "Temp-Dir"
+
+//===================================================================
+
+#pragma code_seg("STATICS")
+static SfxVoidItem aStaticDefault(1);
+#pragma code_seg()
+
+static SfxPoolItem* aStaticDefaults[1] =
+{
+ &aStaticDefault
+};
+
+#ifdef TF_POOLABLE
+static SfxItemInfo __READONLY_DATA aItemInfos[] =
+{
+ { 0, 0 }
+};
+#endif
+
+static SfxEA_Copier* pEA_Copier = 0;
+
+//===================================================================
+
+typedef Link* LinkPtr;
+SV_DECL_PTRARR(SfxInitLinkList, LinkPtr, 4, 4);
+
+TYPEINIT1(SfxSysChangeHint, SfxHint);
+TYPEINIT2(SfxApplication,SfxShell,SfxBroadcaster);
+
+//--------------------------------------------------------------------
+
+BOOL SfxApplication::HasFeature( ULONG nFeature ) const
+
+/** [Description]
+
+ Determines if 'nFeature' is supported by this running application.
+ If more than one feature is given (by arithmetic 'or') and at least
+ one of them is supported, it will return TRUE.
+
+ The supported features are set in the ctor of SfxApplication.
+*/
+
+{
+ return 0 != ( nFeature & _nFeatures );
+}
+
+//--------------------------------------------------------------------
+void SfxApplication::Init
+(
+)
+
+/* [Beschreibung]
+
+ Diese virtuelle Methode wird vom SFx aus Application:a:Main() gerufen,
+ bevor Execute() ausgef"uhrt wird und
+ - das Intro bereits angezeigt ist,
+ - das Applikationsfenster exisitiert, aber noch hidden ist,
+ - die Bindings bereits existieren (Controller sind anmeldbar),
+ - der Ini- und Config-Manager bereits existiert,
+ - die Standard-Controller bereits exisitieren,
+ - die SFx-Shells ihre Interfaces bereits registriert haben.
+
+ [Querverweise]
+ <SfxApplication::Exit()>
+ <SfxApplication::OpenClients()>
+*/
+{
+#ifdef DDE_AVAILABLE
+#ifdef PRODUCT
+ InitializeDde();
+#else
+ if( !InitializeDde() )
+ {
+ ByteString aStr( "Kein DDE-Service moeglich. Fehler: " );
+ if( GetDdeService() )
+ aStr += GetDdeService()->GetError();
+ else
+ aStr += '?';
+ DBG_ASSERT( sal_False, aStr.GetBuffer() )
+ }
+#endif
+#endif
+}
+
+//--------------------------------------------------------------------
+
+void SfxApplication::Exit()
+
+/* [Beschreibung]
+
+ Diese virtuelle Methode wird vom SFx aus Application::Main() gerufen,
+ nachdem Execute() beendet ist und
+ - die Konfiguration (SfxConfigManager) bereits gespeichert wurde,
+ - die Fensterpostionen etc. in den SfxIniManager geschrieben wurden,
+ - das Applikationsfenster noch existiert, aber hidden ist
+ - s"amtliche Dokumente und deren Views bereits geschlossen sind.
+ - Dispatcher, Bindings etc. bereits zerst"ort sind
+
+ [Querverweise]
+ <SfxApplication::Init(int,char*[])>
+*/
+
+{
+}
+
+//---------------------------------------------------------------------------
+
+void SfxApplication::PreInit( )
+{
+ // in Tools das kopieren von EAs ermoeglichen
+ if ( !pEA_Copier )
+ pEA_Copier = new SfxEA_Copier;
+}
+
+USHORT SfxApplication::ParseCommandLine_Impl()
+{
+ USHORT nEvents = 0; // return value ( event mask )
+
+ BOOL bPrintEvent = FALSE;
+ BOOL bOpenEvent = TRUE;
+ USHORT nCount = Application::GetCommandLineParamCount();
+ for( USHORT i=0; i < nCount; i++ )
+ {
+ String aArg = Application::GetCommandLineParam( i );
+
+ if ( aArg.EqualsIgnoreCaseAscii("-minimized") == sal_True )
+ pAppData_Impl->bMinimized = TRUE;
+ if ( aArg.EqualsIgnoreCaseAscii("-invisible") == sal_True )
+ pAppData_Impl->bInvisible = TRUE;
+ if ( aArg.EqualsIgnoreCaseAscii("-embedding") == sal_True )
+ pAppData_Impl->nAppEvent |= DISPATCH_SERVER;
+ if ( aArg.EqualsIgnoreCaseAscii("-bean") == sal_True )
+ {
+ pAppData_Impl->bBean = TRUE;
+ pAppData_Impl->bInvisible = TRUE;
+ }
+ if ( aArg.EqualsIgnoreCaseAscii("-plugin") == sal_True )
+ {
+ pAppData_Impl->bBean = TRUE;
+ pAppData_Impl->bInvisible = TRUE;
+ pAppData_Impl->bIBMTitle = TRUE;
+ }
+ if ( aArg.CompareIgnoreCaseToAscii("-ucb=",
+ RTL_CONSTASCII_LENGTH("-ucb="))
+ == COMPARE_EQUAL )
+ pAppData_Impl->aUcbUrl
+ = aArg.Copy(RTL_CONSTASCII_LENGTH("-ucb="));
+
+ const xub_Unicode* pArg = aArg.GetBuffer();
+ // Erstmal nur mit -, da unter Unix Dateinmane auch mit Slasch anfangen koennen
+ if ( (*pArg == '-') /* || (*pArg == '/') */ )
+ {
+ pArg++;
+
+ // Ein Schalter
+ if ( (*pArg == 'p') || (*pArg == 'P') )
+ {
+ bPrintEvent = TRUE;
+ bOpenEvent = FALSE; // Ab hier keine OpenEvents mehr
+ }
+ }
+ else
+ {
+ // Dies wird als Dateiname interpretiert
+ if ( bOpenEvent )
+ {
+ // Open Event anhaengen
+ if ( pAppData_Impl->aOpenList.Len() )
+ pAppData_Impl->aOpenList += APPEVENT_PARAM_DELIMITER;
+ pAppData_Impl->aOpenList += aArg;
+ }
+ else if ( bPrintEvent )
+ {
+ // Print Event anhaengen
+ if( pAppData_Impl->aPrintList.Len() )
+ pAppData_Impl->aPrintList += APPEVENT_PARAM_DELIMITER;
+ pAppData_Impl->aPrintList += aArg;
+ }
+ }
+ }
+
+ if ( pAppData_Impl->aOpenList.Len() )
+ nEvents |= DISPATCH_OPEN;
+
+ if ( pAppData_Impl->aPrintList.Len() )
+ nEvents |= DISPATCH_PRINT;
+
+ return nEvents;
+}
+
+//---------------------------------------------------------------------------
+void SfxApplication::StartUpScreen( const char* pLabelPrefix )
+{
+ // Label-DLL mit diversen Resourcen fuer OEM-Ver. etc. (Intro, Titel, About)
+ pAppData_Impl->bBean = FALSE;
+ pAppData_Impl->nAppEvent = ParseCommandLine_Impl();
+ if ( pLabelPrefix )
+ {
+ // versuchen, die Label-DLL zu erzeugen
+ pAppData_Impl->pLabelResMgr = CreateResManager( pLabelPrefix );
+
+ // keine separate Label-DLL vorhanden?
+ if ( !pAppData_Impl->pLabelResMgr )
+ // dann den ResMgr vom Executable verwenden
+ pAppData_Impl->pLabelResMgr = new ResMgr;
+
+ // Intro nur anzeigen, wenn normaler Start (kein Print/Server etc.)
+ if ( !pAppData_Impl->bInvisible && !pAppData_Impl->bMinimized &&
+ pAppData_Impl->nAppEvent != DISPATCH_PRINT && pAppData_Impl->nAppEvent != DISPATCH_SERVER )
+ {
+ // und es nicht ausgeschaltet ist
+ String aIntroIni = pAppIniMgr->Get(SFX_KEY_SHOW_INTRO);
+ ULONG nDisplayTime = ULONG(aIntroIni.ToInt32());
+
+ if ( 2 == nDisplayTime || aIntroIni.Len() < 1 )
+ {
+ // 2 oder 'kein Ini-Eintrag' bedeutet
+ // Einstellungen aus dem System holen
+ AllSettings aSettings = Application::GetSettings();
+ Application::MergeSystemSettings( aSettings );
+ nDisplayTime = aSettings.GetStyleSettings().GetLogoDisplayTime();
+ }
+
+ if ( nDisplayTime != LOGO_DISPLAYTIME_NOLOGO )
+ {
+ USHORT nResId = RID_DEFAULTINTRO;
+ if ( Application::IsRemoteServer() )
+ nResId = RID_DEFAULTINTRO_PORTAL;
+ // die ggf. im System eingestellte Zeit wird hier nicht ber"ucksichtigt
+ pImp->pIntro = new IntroWindow_Impl(
+ Bitmap( ResId( nResId, pAppData_Impl->pLabelResMgr ) ) );
+ }
+ }
+ }
+ else
+ {
+ pAppData_Impl->bBean = TRUE;
+ pAppData_Impl->bInvisible = TRUE;
+ }
+
+ // merken, falls Applikation normal gestartet wurde
+ if ( 0 == pAppData_Impl->nAppEvent || DISPATCH_OPEN == pAppData_Impl->nAppEvent )
+ pAppData_Impl->bDirectAliveCount = TRUE;
+}
+
+void SfxApplication::Main( )
+{
+}
+
+//--------------------------------------------------------------------
+#if defined( MAC )
+ void InstallAppleScriptHdl();
+#endif
+
+//-------------------------------------------------------------------------
+
+IMPL_LINK( SfxApplication, LateInitNewMenu_Impl, void*, pvoid)
+{
+ DBG_PROFSTART(SfxAppMainNewMenu);
+ pAppData_Impl->GetPopupMenu( SID_NEWDOCDIRECT );
+ DBG_PROFSTOP(SfxAppMainNewMenu);
+
+ return 0;
+}
+
+//-------------------------------------------------------------------------
+
+IMPL_LINK( SfxApplication, LateInitBmkMenu_Impl, void*, pvoid)
+{
+ DBG_PROFSTART(SfxAppMainBmkMenu);
+ pAppData_Impl->GetPopupMenu( SID_BOOKMARKS);
+ DBG_PROFSTOP(SfxAppMainBmkMenu);
+
+ return 0;
+}
+
+//-------------------------------------------------------------------------
+
+IMPL_LINK( SfxApplication, LateInitWizMenu_Impl, void*, pvoid)
+{
+ DBG_PROFSTART(SfxAppMainWizMenu);
+ pAppData_Impl->GetPopupMenu( SID_AUTOPILOTMENU );
+ DBG_PROFSTOP(SfxAppMainWizMenu);
+
+ return 0;
+}
+
+//-------------------------------------------------------------------------
+
+IMPL_LINK( SfxApplication, LateInitOLEReg_Impl, void*, pvoid)
+{
+#if 0
+ // OLE-Registrierung nur wenn Default-Factory OLE-f"ahig ist
+ DBG_PROFSTART(SfxAppMainOLEReg);
+ if ( GetObjFacArray_Impl().Count() )
+ if ( SvGlobalName() != *GetObjFacArray_Impl()[0] )
+ {
+ // StarOffice-Manager hat keine Doc-Factories
+ WriteRegistration( GetObjFacArray_Impl()[0],
+ HACK(MM will den folgenden Parameter rausnehmen)
+ "So'n Sch..., war wohl doch wichtig! (MM oder MI fragen)" );
+ SfxShellObject *pShObj = GetShellObj_Impl();
+ if ( pShObj && pShObj->GetSvFactory() )
+ WriteRegistration( ( /*not const*/ SvFactory*) pShObj->GetSvFactory(),
+ HACK(MM will den folgenden Parameter rausnehmen)
+ "So'n Sch..., war wohl doch wichtig! (MM oder MI fragen)" );
+ }
+ DBG_PROFSTOP(SfxAppMainOLEReg);
+ #endif
+ return 0;
+}
+
+//-------------------------------------------------------------------------
+
+IMPL_LINK( SfxApplication, LateInitCHAOSReg_Impl, void*, pvoid)
+{
+ return 0;
+}
+
+//-------------------------------------------------------------------------
+
+void SfxApplication::InsertLateInitHdl(const Link& rLink)
+{
+ if ( Application::IsInExecute() )
+ Application::PostUserEvent( rLink );
+ else
+ {
+ if ( !pAppData_Impl->pInitLinkList )
+ pAppData_Impl->pInitLinkList = new SfxInitLinkList;
+
+ Link *pLink = new Link;
+ *pLink = rLink;
+ USHORT nCount = ( USHORT ) pAppData_Impl->pInitLinkList->Count();
+ pAppData_Impl->pInitLinkList->Insert(pLink, nCount);
+ }
+}
+
+void SfxApplication::ForcePendingInitFactories()
+{
+ List& rList = Get_Impl()->aPendingInitFactories;
+ USHORT nPos = (USHORT) rList.Count();
+#if LATEINIT
+ DBG_ASSERT( !nPos, "Filter nicht im LateInit" );
+#endif
+ while( nPos = rList.Count() )
+ {
+ SfxObjectFactory* pFac = (SfxObjectFactory*)rList.Remove( --nPos );
+ pFac->DoInitFactory();
+ }
+}
+
+//-------------------------------------------------------------------------
+
+IMPL_LINK( SfxApplication, LateInitTimerHdl_Impl, void*, pvoid)
+{
+ // Ersten Link aus der Liste holen und ausf"uhren
+ Link *pLink = (*pAppData_Impl->pInitLinkList)[0];
+ pLink->Call(0);
+
+ // Link entfernen
+ pAppData_Impl->pInitLinkList->Remove(0);
+ delete pLink;
+
+ // Timer wieder starten, wenn noch weitere Links da sind
+ if ( pAppData_Impl->pInitLinkList->Count() )
+ pAppData_Impl->aLateInitTimer.Start();
+ else
+ {
+ // LateInit ist fertig
+ DELETEZ (pAppData_Impl->pInitLinkList);
+ pAppIniMgr->ResetLock();
+ }
+ return 0;
+}
+
+//-------------------------------------------------------------------------
+
+IMPL_LINK( SfxApplication, StartWelcomeScreenHdl_Impl, void*, EMPTYARG )
+{
+ // User-Event kommt zu schnell, also 0,5s warten, wenn er nicht sowieso schon da ist.
+ static Timer* pTimer = NULL;
+ if ( !pTimer && !SFX_APP()->GetHelpPI() )
+ {
+ pTimer = new Timer;
+ pTimer->SetTimeout( 500 );
+ pTimer->SetTimeoutHdl( LINK( this, SfxApplication, StartWelcomeScreenHdl_Impl ) );
+ pTimer->Start();
+ return 0;
+ }
+
+ delete pTimer;
+ pTimer = NULL;
+
+ if ( GetOptions().IsWelcomeScreen() )
+ {
+/*
+ ULONG nId = 0;
+ Config aConfig( SfxHelp_Impl::GetHelpAgentConfig() );
+ ImplSetLanguageGroup( aConfig, String::CreateFromAscii("WelcomeScreen"), TRUE );
+ USHORT nTips = aConfig.GetKeyCount();
+ for ( USHORT nTip = 0; nTip < nTips; nTip++ )
+ {
+ if ( (BOOL)(USHORT)(aConfig.ReadKey( nTip ).ToInt32()) )
+ {
+ nId = aConfig.GetKeyName( nTip ).ToInt32();
+ break;
+ }
+ }
+
+ if ( nId )
+ {
+ SetChildWindow( SID_TIPWINDOW, TRUE );
+
+ // Das muss irgendwie in den ctor des Fensters
+ String aHFile( "tips.svh" );
+ SfxHelp::ShowHelp( nId, TRUE, aHFile, TRUE );
+ SfxHelpPI* pHelpPI = SFX_APP()->GetHelpPI();
+ if ( pHelpPI )
+ {
+ pHelpPI->SetWelcomeMode( TRUE );
+ aConfig.WriteKey( nId, (USHORT)0 ); // gleich als gelesen flaggen
+ }
+ }
+ */
+ }
+ return 1;
+}
+
+//-------------------------------------------------------------------------
+
+SfxFilterMatcher& SfxApplication::GetFilterMatcher()
+{
+ if( !pAppData_Impl->pMatcher )
+ {
+ pAppData_Impl->pMatcher = new SfxFilterMatcher( TRUE );
+ URIHelper::SetMaybeFileHdl( STATIC_LINK(
+ pAppData_Impl->pMatcher, SfxFilterMatcher, MaybeFileHdl_Impl ) );
+ }
+ return *pAppData_Impl->pMatcher;
+}
+
+//-------------------------------------------------------------------------
+
+BOOL SfxApplication::IsStandalone() const
+{
+ // Wenn ohne UI gestartet, nat"urlich niemals integrierter Desktop
+ if ( pAppData_Impl->bBean )
+ return TRUE;
+
+ String aExt = SFX_INIMANAGER()->Get( String::CreateFromAscii( "Common"), 0, 0, String::CreateFromAscii("FullScreenDesktop") );
+ if ( aExt.Len() )
+ {
+ // INI-Eintrag auswerten
+ return !( (BOOL) (USHORT) aExt.ToInt32() );
+ }
+ else
+ {
+ // Defaults: bei AppServer kein integrierter Desktop, bei FatOffice
+ // unter WNT integriert, ansonsten nicht
+ if ( Application::IsRemoteServer() )
+ return TRUE;
+#ifdef WNT
+ return FALSE;
+#else
+ return TRUE;
+#endif
+ }
+}
+
+//========================================================================
+
+String& SfxApplication::GetSaveAsTargetURLHack()
+{
+ return pAppData_Impl->aSaveAsTarget;
+}
+
+
diff --git a/sfx2/source/appl/appmisc.cxx b/sfx2/source/appl/appmisc.cxx
new file mode 100644
index 000000000000..24916015b673
--- /dev/null
+++ b/sfx2/source/appl/appmisc.cxx
@@ -0,0 +1,1170 @@
+/*************************************************************************
+ *
+ * $RCSfile: appmisc.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:26 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+ //==================================================================
+// class SfxApplication: Interface, Array-Impls und allerlei anderes
+//
+// Copyright 2000 Sun Microsystems, Inc. All rights reserved.
+// $Author: hr $ $Date: 2000-09-18 16:52:26 $ $Revision: 1.1.1.1 $
+// $Logfile: T:/sfx2/source/appl/appmisc.cxv $ $Workfile: APPMISC.CXX $
+//------------------------------------------------------------------
+
+#ifndef _SV_STATUS_HXX
+#include <vcl/status.hxx>
+#endif
+#ifndef _SV_MSGBOX_HXX
+#include <vcl/msgbox.hxx>
+#endif
+#ifndef _VOS_PROCESS_HXX //autogen
+#include <vos/process.hxx>
+#endif
+#ifndef _XCEPTION_HXX_
+#include <vos/xception.hxx>
+#endif
+#ifndef _SYSTEM_HXX //autogen
+#include <vcl/system.hxx>
+#endif
+#ifndef _SFX_WHITER_HXX //autogen
+#include <svtools/whiter.hxx>
+#endif
+#ifndef _SFXSTRITEM_HXX //autogen
+#include <svtools/stritem.hxx>
+#endif
+#ifndef _SFXINTITEM_HXX //autogen
+#include <svtools/intitem.hxx>
+#endif
+#ifndef _SFXENUMITEM_HXX //autogen
+#include <svtools/eitem.hxx>
+#endif
+#ifndef _LIBCALL_HXX //autogen
+#include <svtools/libcall.hxx>
+#endif
+#ifndef _FILTER_HXX //autogen
+#include <svtools/filter.hxx>
+#endif
+
+#ifndef _COM_SUN_STAR_REGISTRY_INVALIDREGISTRYEXCEPTION_HPP_
+#include <com/sun/star/registry/InvalidRegistryException.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XFRAME_HPP_
+#include <com/sun/star/frame/XFrame.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UNO_REFERENCE_H_
+#include <com/sun/star/uno/Reference.h>
+#endif
+#include <vcl/config.hxx>
+#include <tools/rcid.h>
+#include <vos/mutex.hxx>
+#include <svtools/pver.hxx>
+#pragma hdrstop
+#ifndef _UTL_CONFIGMGR_HXX_
+#include <unotools/configmgr.hxx>
+#endif
+#include "sfxresid.hxx"
+#include "app.hxx"
+#include "picklist.hxx"
+#include "appdata.hxx"
+#include "arrdecl.hxx"
+#include "cfgmgr.hxx"
+#include "cfgitem.hxx"
+#include "tbxctrl.hxx"
+#include "tbxconf.hxx"
+#include "stbitem.hxx"
+#include "accitem.hxx"
+#include "mnuitem.hxx"
+#include "docfac.hxx"
+#include "docfile.hxx"
+#include "docfilt.hxx"
+#include "request.hxx"
+#include "bindings.hxx"
+#include "dispatch.hxx"
+#include "workwin.hxx"
+#include "iodlg.hxx"
+#include "intro.hxx"
+#include "about.hxx"
+#include "fcontnr.hxx"
+#include "saveopt.hxx"
+#include "sfxlocal.hrc"
+#include "sfx.hrc"
+#include "app.hrc"
+#include "templdlg.hxx"
+#include "module.hxx"
+#include "msgpool.hxx"
+#include "topfrm.hxx"
+#include "openflag.hxx"
+#include "viewsh.hxx"
+#include "appimp.hxx"
+#include "bmkmenu.hxx"
+#include "objface.hxx"
+#include "helper.hxx" // SfxContentHelper::Kill()
+
+using namespace vos;
+
+//===================================================================
+
+SV_IMPL_PTRARR( SfxTbxCtrlFactArr_Impl, SfxTbxCtrlFactory* );
+SV_IMPL_PTRARR( SfxStbCtrlFactArr_Impl, SfxStbCtrlFactory* );
+SV_IMPL_PTRARR( SfxMenuCtrlFactArr_Impl, SfxMenuCtrlFactory* );
+SV_IMPL_PTRARR( SfxChildWinFactArr_Impl, SfxChildWinFactory* );
+SV_IMPL_PTRARR( SfxModuleArr_Impl, SfxModule* );
+
+//===================================================================
+
+#define SfxApplication
+#include "sfxslots.hxx"
+
+class SfxSpecialConfigError_Impl
+{
+ String aError;
+
+public:
+
+ SfxSpecialConfigError_Impl( const String& rStr );
+ DECL_LINK( TimerHdl, Timer*);
+};
+
+
+SfxSpecialConfigError_Impl::SfxSpecialConfigError_Impl( const String& rStr ) :
+ aError( rStr )
+{
+ Timer *pTimer = new Timer;
+ pTimer->SetTimeoutHdl( LINK(this, SfxSpecialConfigError_Impl, TimerHdl) );
+ pTimer->SetTimeout( 0 );
+ pTimer->Start();
+}
+
+IMPL_LINK( SfxSpecialConfigError_Impl, TimerHdl, Timer*, pTimer )
+{
+ delete pTimer;
+ ErrorBox( 0, WinBits( WB_OK ) , aError ).Execute();
+ delete this;
+ SFX_APP()->GetAppDispatcher_Impl()->Execute( SID_QUITAPP );
+ return 0L;
+}
+
+//====================================================================
+
+
+SFX_IMPL_INTERFACE(SfxApplication,SfxShell,SfxResId(0))
+{
+ SFX_CHILDWINDOW_REGISTRATION( SID_CUSTOMIZETOOLBOX );
+
+ // Menu ist auf dem Macintosh sowieso sichtbar
+// SFX_OBJECTBAR_REGISTRATION(
+// SFX_OBJECTBAR_FULLSCREEN | SFX_VISIBILITY_FULLSCREEN,
+// SfxResId(RID_FULLSCREENTOOLBOX) );
+ SFX_OBJECTBAR_REGISTRATION( SFX_OBJECTBAR_APPLICATION |
+ SFX_VISIBILITY_DESKTOP | SFX_VISIBILITY_STANDARD | SFX_VISIBILITY_CLIENT,
+ SfxResId(RID_ENVTOOLBOX) );
+
+ SFX_STATUSBAR_REGISTRATION(SfxResId(SFX_ITEMTYPE_STATBAR));
+}
+
+//--------------------------------------------------------------------
+
+
+void SfxApplicationClass::ActivateExtHelp()
+{
+ SFX_APP()->GetBindings().Invalidate( SID_EXTENDEDHELP );
+ ShowStatusText(String());
+}
+
+//-------------------------------------------------------------------------
+
+
+void SfxApplicationClass::DeactivateExtHelp()
+{
+ SFX_APP()->GetBindings().Invalidate( SID_EXTENDEDHELP );
+ HideStatusText();
+}
+
+//-------------------------------------------------------------------------
+
+SfxViewFrame* SfxApplication::CreateViewFrame(
+ SfxObjectShell& rDoc, sal_uInt16 nViewId, sal_Bool bHidden )
+{
+ SfxItemSet *pSet = rDoc.GetMedium()->GetItemSet();
+ if ( nViewId )
+ pSet->Put( SfxUInt16Item( SID_VIEW_ID, nViewId ) );
+ if ( bHidden )
+ pSet->Put( SfxBoolItem( SID_HIDDEN, sal_True ) );
+
+ SfxFrame *pFrame = SfxTopFrame::Create( &rDoc, 0, bHidden );
+ return pFrame->GetCurrentViewFrame();
+}
+
+void SfxApplication::InitializeDisplayName_Impl()
+{
+ SfxAppData_Impl* pAppData_Impl = Get_Impl();
+ if ( !pAppData_Impl->pLabelResMgr )
+ return;
+
+ String aTitle = Application::GetDisplayName();
+ if ( !aTitle.Len() )
+ {
+ OClearableGuard aGuard( OMutex::getGlobalMutex() );
+
+ // create version string
+/*!!! (pb) don't show a version number at the moment
+ USHORT nProductVersion = ProductVersion::GetVersion().ToInt32();
+ String aVersion( String::CreateFromInt32( nProductVersion / 10 ) );
+ aVersion += 0x002E ; // 2Eh ^= '.'
+ aVersion += ( String::CreateFromInt32( nProductVersion % 10 ) );
+*/
+ // load application title
+ aTitle = String( ResId( RID_APPTITLE, pAppData_Impl->pLabelResMgr ) );
+ // merge version into title
+ aTitle.SearchAndReplaceAscii( "$(VER)", String() /*aVersion*/ );
+
+ aGuard.clear();
+
+#ifndef PRODUCT
+ aTitle += DEFINE_CONST_UNICODE(" [");
+ ResId aVerId( RID_BUILDVERSION, pAppData_Impl->pLabelResMgr );
+ ResMgr* pResMgr = pAppData_Impl->pLabelResMgr->IsAvailable( aVerId.SetRT( RSC_STRING ) )
+ ? pAppData_Impl->pLabelResMgr
+ : NULL;
+ aVerId.SetResMgr( pResMgr );
+ aTitle += String( aVerId );
+ aTitle += 0x005D ; // 5Dh ^= ']'
+#endif
+ if ( GetDemoKind() == SFX_DEMOKIND_DEMO )
+ aTitle += DEFINE_CONST_UNICODE(" (Demo Version)");
+
+ Application::SetDisplayName( aTitle );
+ }
+}
+
+//--------------------------------------------------------------------
+
+IMPL_LINK( SfxApplication, OpenClients_Impl, void*, pvoid )
+{
+ OpenClients();
+ return 0;
+}
+
+void SfxApplication::OpenClients()
+
+/* [Beschreibung]
+
+ Diese virtuelle Hook-Methode gibt dem Applikationsentwickler
+ Gelegenheit, bei bereits sichtbarem Applikationsfenster unmittelbar
+ vor Application::Execute() z.B. initiale Fenster (insbesondere
+ das initiale Dokumentfenster) zu "offnen.
+
+ Die Basisklasse sollte nicht gerufen werden.
+*/
+{
+ if ( !( pAppData_Impl->nAppEvent & DISPATCH_SERVER ) )
+ {
+ // Crash-Recovery
+ SfxIniManager *pIni = GetIniManager();
+ sal_Bool bSendMail = (sal_uInt16) pIni->ReadKey( DEFINE_CONST_UNICODE("Common"), DEFINE_CONST_UNICODE("SendCrashMail") ).ToInt32();
+ String aFileName = pIni->ReadKey( pIni->GetGroupName( SFX_GROUP_WORKINGSET_IMPL ), DEFINE_CONST_UNICODE("Info") );
+ if ( bSendMail && aFileName.Len() )
+ {
+ SvFileStream aStr( aFileName, STREAM_STD_READ );
+ if ( !aStr.GetError() )
+ {
+ aStr.Seek( STREAM_SEEK_TO_END );
+ sal_uInt32 nLen = aStr.Tell();
+ aStr.Seek( STREAM_SEEK_TO_BEGIN );
+ char *pBuffer = new char[nLen+1];
+ aStr.Read( pBuffer, nLen );
+ pBuffer[nLen] = 0;
+ String aBodyText( pBuffer, nLen );
+ delete pBuffer;
+
+ SfxStringItem aTarget( SID_TARGETNAME, DEFINE_CONST_UNICODE("_blank") );
+ SfxStringItem aBody( SID_POSTSTRING, aBodyText );
+ SfxStringItem aMail( SID_FILE_NAME, DEFINE_CONST_UNICODE("mailto:staroffice-bugs@staroffice.de") );
+ SfxStringItem aReferer( SID_REFERER, DEFINE_CONST_UNICODE("private:user") );
+ SfxBoolItem aSend( SID_MAIL_SEND, sal_False );
+
+ pAppDispat->Execute( SID_OPENDOC, SFX_CALLMODE_SLOT, &aReferer, &aBody, &aMail, &aSend, &aTarget, 0L );
+ pIni->DeleteKey( pIni->GetGroupName( SFX_GROUP_WORKINGSET_IMPL ), DEFINE_CONST_UNICODE("Info") );
+ aStr.Close();
+ SfxContentHelper::Kill( aFileName );
+ }
+ }
+
+ sal_Bool bCancel = sal_False;
+ for ( sal_uInt16 n = 0; sal_True; ++n )
+ {
+ String aEntry( pIni->Get( SFX_GROUP_WORKINGSET_IMPL, DEFINE_CONST_UNICODE("Recover"), n ) );
+ if ( !aEntry.GetTokenCount() )
+ break;
+
+ sal_Bool bIsURL = ( aEntry.GetToken( 2 ).CompareToAscii("url") == COMPARE_EQUAL );
+ String aRealFileName( aEntry.GetToken( 3 ) );
+ String aTempFileName( aEntry.GetToken( 0 ) );
+ sal_uInt16 nRet;
+ if ( bCancel )
+ nRet = RET_NO;
+ else
+ {
+ String aMsg( SfxResId( STR_RECOVER_QUERY ) );
+ aMsg.SearchAndReplaceAscii( "$1", aRealFileName );
+ MessBox aBox( NULL, WB_YES_NO_CANCEL | WB_DEF_YES | WB_3DLOOK,
+ String( SfxResId( STR_RECOVER_TITLE ) ), aMsg );
+ nRet = aBox.Execute();
+ }
+
+ switch ( nRet )
+ {
+ case RET_YES: // recover a file
+ {
+ SfxStringItem aTargetName( SID_TARGETNAME, DEFINE_CONST_UNICODE("_blank") );
+ SfxStringItem aReferer( SID_REFERER, DEFINE_CONST_UNICODE("private:user") );
+ SfxStringItem aTempFileItem( SID_FILE_NAME, aTempFileName );
+ SfxStringItem aFilterItem( SID_FILTER_NAME, aEntry.GetToken( 1 ) );
+ SfxBoolItem aReadOnlyItem( SID_DOC_READONLY, sal_False );
+ if ( !bIsURL )
+ aRealFileName.Erase();
+ SfxStringItem aSalvageItem( SID_DOC_SALVAGE, aRealFileName );
+ if ( bIsURL )
+ {
+ SfxStringItem aRealURLItem( SID_ORIGURL, aRealFileName );
+ pAppDispat->Execute( SID_OPENDOC, SFX_CALLMODE_SYNCHRON,
+ &aTempFileItem, &aFilterItem, &aSalvageItem, &aTargetName,
+ &aRealURLItem, &aReadOnlyItem, &aReferer, 0L );
+ }
+ else
+ {
+ SfxBoolItem aAsTemplateItem( SID_TEMPLATE, !bIsURL );
+ pAppDispat->Execute( SID_OPENDOC, SFX_CALLMODE_SYNCHRON,
+ &aTempFileItem, &aFilterItem, &aSalvageItem, &aTargetName,
+ &aAsTemplateItem, &aReadOnlyItem, &aReferer, 0L );
+ }
+ }
+
+ case RET_NO: // skip this file
+ // remove ini-entry
+ pIni->Delete( SFX_GROUP_WORKINGSET_IMPL, DEFINE_CONST_UNICODE("Recover"), n );
+ if ( nRet == RET_NO )
+ SfxContentHelper::Kill( aTempFileName );
+ break;
+
+ case RET_CANCEL: // cancel recovering
+ // remove ini-entry
+ pIni->Delete( SFX_GROUP_WORKINGSET_IMPL, DEFINE_CONST_UNICODE("Recover"), n );
+ SfxContentHelper::Kill( aTempFileName );
+ bCancel = sal_True; // and all following
+ break;
+ }
+ }
+ }
+
+ String aEmptyStr;
+ if ( pAppData_Impl->aOpenList.Len() )
+ {
+ ApplicationEvent* pAppEvt = new ApplicationEvent( aEmptyStr, aEmptyStr,
+ APPEVENT_OPEN_STRING,
+ pAppData_Impl->aOpenList );
+ GetpApp()->AppEvent( *pAppEvt );
+ delete pAppEvt;
+ }
+
+ if ( pAppData_Impl->aPrintList.Len() )
+ {
+ ApplicationEvent* pAppEvt = new ApplicationEvent( aEmptyStr, aEmptyStr,
+ APPEVENT_PRINT_STRING,
+ pAppData_Impl->aPrintList );
+ GetpApp()->AppEvent( *pAppEvt );
+ delete pAppEvt;
+ }
+
+ if ( SfxObjectShell::GetFirst() || ( pAppData_Impl->nAppEvent & DISPATCH_SERVER ) )
+ return;
+
+ if( pAppData_Impl->bBean )
+ return;
+
+//(mba/task): neu zu implementieren
+// if ( pOptions->IsSaveWorkingSet() )
+// SfxTaskManager::RestoreWorkingSet();
+// else
+ {
+ SfxAllItemSet aSet( GetPool() );
+
+ // Dateiname
+ String aName = SFX_INIMANAGER()->ReadKey( DEFINE_CONST_UNICODE("Common"), DEFINE_CONST_UNICODE("StartDocument") );
+ if ( !aName.Len() )
+ aName = String( DEFINE_CONST_UNICODE("private:factory/swriter" ) );
+ SfxStringItem aNameItem( SID_FILE_NAME, aName );
+ aSet.Put( aNameItem, aNameItem.Which() );
+ aSet.Put( SfxStringItem( SID_TARGETNAME, DEFINE_CONST_UNICODE("_blank") ) );
+
+ // Referer
+ aSet.Put( SfxStringItem( SID_REFERER, DEFINE_CONST_UNICODE( "private/user" ) ) );
+ pAppDispat->Execute( SID_OPENDOC, SFX_CALLMODE_SYNCHRON, aSet );
+ }
+}
+
+//--------------------------------------------------------------------
+
+void SfxApplication::FillStatusBar( StatusBar& rBar )
+
+/* [Beschreibung]
+
+ Diese virtuelle Factory-Methode wird vom SFx gerufen, um die
+ StatusBar f"ur das Applikationsfenster zu erzeugen. Im Ggs. zu
+ den anderen Standard-Controllern Menu, Accelerator und ToolBoxen
+ kann die Status-Zeile nur mit dieser Factory erzeugt werden,
+ da in der SV-Resource keine StatusBar-Items angegeben werden k"oennen.
+*/
+
+{
+// rBar.InsertItem( SID_MAIL_NOTIFY, 18, SIB_IN|SIB_USERDRAW );
+ rBar.InsertItem( SID_EXPLORER_SELECTIONSIZE, 200, SIB_IN|SIB_LEFT|SIB_AUTOSIZE );
+// rBar.InsertItem( SID_CURRENTTIME, rBar.GetTextSize(
+// String("::") + GetAppInternational().GetTime( ::com::sun::star::util::Time() ) ).Width() );
+// rBar.InsertItem( SID_CURRENTDATE, rBar.GetTextSize(
+// String("::") + GetAppInternational().GetDate( Date() ) ).Width() );
+}
+
+//--------------------------------------------------------------------
+
+void SfxApplication::IntroSlide()
+
+/* [Beschreibung]
+
+ Diese virtuelle Methode wird vom SFx gerufen, um die bei einem
+ Mehrbild-Intro das n"achte Bild anzuzeigen. Sie sollte w"ahrend
+ des Startups mehrmals gerufen werden, wenn l"angere Initialisierungen
+ ausgef"uhrt werden.
+*/
+
+{
+ if ( pImp->pIntro )
+ pImp->pIntro->Slide();
+}
+
+//--------------------------------------------------------------------
+
+SfxFileDialog* SfxApplication::CreateDocFileDialog
+(
+ sal_uInt32 nFlags, // arithmetische Veroderung der u.g. Sfx-Winbits
+ const SfxObjectFactory& rFact, /* <SfxObjectFactory>, deren Filter angezeigt
+ werden sollten */
+ const SfxItemSet* pSet // to forward on FileDialog
+)
+
+/* [Beschreibung]
+
+ Diese virtuelle Factory-Methode wird vom SFx gerufen, um den
+ f"ur Dokumente den Dialog zum "Offnen und Speichern unter einem
+ neuen Namen zu erzeugen.
+
+ Die Default-Implementierung erzeugt abh"angig von nFlags einen Dialog
+ mit
+ - WB_SAVEAS: SFXWB_PASSWORD
+ - WB_OPEN: SFXWB_READONLY
+*/
+
+{
+ SfxItemSet aSet( GetPool(),
+ SID_DOC_READONLY, SID_DOC_READONLY,
+ SID_HAS_PASSWORD, SID_HAS_PASSWORD,
+ SID_PASSWORD, SID_PASSWORD,
+ SID_LOAD_LAYOUT, SID_LOAD_LAYOUT,
+ SID_FILE_FILTEROPTIONS, SID_FILE_FILTEROPTIONS,
+ SID_FILE_NAME, SID_FILE_NAME,
+ 0 );
+ if ( pSet )
+ aSet.Put( *pSet );
+ if ( WB_SAVEAS == (nFlags & WB_SAVEAS) )
+ nFlags |= SFXWB_PASSWORD;
+ else
+ {
+ if ( SFXWB_INSERT != ( nFlags & SFXWB_INSERT ) )
+ nFlags |= SFXWB_READONLY;
+ }
+ return new SfxFileDialog( NULL, nFlags, rFact, aSet );
+}
+
+//--------------------------------------------------------------------
+
+PrinterDialog* SfxApplication::CreatePrinterDialog()
+
+/* [Beschreibung]
+
+ Diese virtuelle Factory-Methode wird vom SFx gerufen, um einen
+ Applikations-spezifischen PrinterDialog zu erzeugen.
+
+ Die Default-Implementierung liefert einen 0-Pointer zur"uck.
+*/
+
+{
+ return 0;
+}
+//--------------------------------------------------------------------
+
+ModalDialog* SfxApplication::CreateAboutDialog()
+
+/* [Beschreibung]
+
+ Diese virtuelle Factory-Methode wird vom SFx gerufen, um einen
+ Modul-spezifischen AboutDialog zu erzeugen.
+
+ Die Default-Implementierung erzeugt einen AboutDialog aus
+ der Resource 'ModalDialog RID_DEFAULTABOUT' und verwendet
+ zus"atzlich einen String RID_BUILDVERSION, f"ur die Update-Version
+ der Applikation. Letztere wird angezeigt, sobald der Anwender
+ eine spezielle, im Dialog definierte, Sequenz von Zeichen
+ eingibt (z.B. 'Ctrl' 's' 'f' 'x').
+*/
+
+{
+ // Buildversion suchen
+ ResId aVerId( RID_BUILDVERSION, pAppData_Impl->pLabelResMgr );
+ ResMgr *pResMgr = pAppData_Impl->pLabelResMgr->IsAvailable(
+ aVerId.SetRT( RSC_STRING ) )
+ ? pAppData_Impl->pLabelResMgr
+ : 0;
+ aVerId.SetResMgr( pResMgr );
+ if ( !Resource::GetResManager()->IsAvailable( aVerId ) )
+ DBG_ERROR( "No RID_BUILD_VERSION in label-resource-dll" );
+ String aVersion( '[' );
+ ( aVersion += String( aVerId ) ) += ']';
+
+ // About-Dialog suchen
+ ResId aDialogResId( RID_DEFAULTABOUT, pAppData_Impl->pLabelResMgr );
+ pResMgr = pAppData_Impl->pLabelResMgr->IsAvailable(
+ aDialogResId.SetRT( RSC_MODALDIALOG ) )
+ ? pAppData_Impl->pLabelResMgr
+ : 0;
+ aDialogResId.SetResMgr( pResMgr );
+ if ( !Resource::GetResManager()->IsAvailable( aDialogResId ) )
+ DBG_ERROR( "No RID_DEFAULTABOUT in label-resource-dll" );
+
+ // About-Dialog anzeigen
+ AboutDialog* pDlg = new AboutDialog( 0, aDialogResId, aVersion );
+ return pDlg;
+}
+
+//--------------------------------------------------------------------
+
+void SfxApplication::HandleConfigError_Impl
+(
+ sal_uInt16 nErrorCode
+
+) const
+
+/* [Beschreibung]
+
+ Hilfsroutine zum Anzeigen einer ErrorBox mit einer von nErrorCode
+ abh"angigen Fehlermeldung.
+*/
+
+{
+ sal_uInt16 nResId = 0;
+ switch(nErrorCode)
+ {
+ case SfxConfigManager::ERR_READ:
+ nResId = MSG_ERR_READ_CFG;
+ break;
+ case SfxConfigManager::ERR_WRITE:
+ nResId = MSG_ERR_WRITE_CFG;
+ break;
+ case SfxConfigManager::ERR_OPEN:
+ nResId = MSG_ERR_OPEN_CFG;
+ break;
+ case SfxConfigManager::ERR_FILETYPE:
+ nResId = MSG_ERR_FILETYPE_CFG;
+ break;
+ case SfxConfigManager::ERR_VERSION:
+ nResId = MSG_ERR_VERSION_CFG;
+ break;
+ }
+ DBG_ASSERT(nResId != 0, "unbekannte Fehlerkonstante aus Konfiguration");
+ if(nResId)
+ {
+ ErrorBox aErrorBox(NULL, SfxResId(nResId));
+ aErrorBox.Execute();
+ }
+}
+
+//--------------------------------------------------------------------
+
+void SfxApplication::LoadConfig()
+
+/* [Beschreibung]
+
+ Interne Routine zum Einlesen der Konfiguration aus SfxIniManager
+ und SfxConfigManager.
+*/
+
+{
+ if ( pImp->bConfigLoaded )
+ return;
+/*
+ sal_Bool bUpdateMode;
+ WorkWindow* pAppWin = Application::GetAppWindow();
+ if ( pAppWin->IsVisible() )
+ {
+ bUpdateMode = pAppWin->IsUpdateMode();
+ pAppWin->SetUpdateMode(sal_False);
+ }
+*/
+ if (!pCfgMgr->LoadConfig())
+ HandleConfigError_Impl((sal_uInt16)pCfgMgr->GetErrorCode());
+
+/*
+ if ( pAppWin->IsVisible() )
+ {
+ pAppWin->SetUpdateMode( bUpdateMode );
+ SfxWorkWindow *pWork = GetWorkWindow_Impl();
+ pWork->ArrangeChilds_Impl();
+ pWork->ShowChilds_Impl();
+ pAppWin->Invalidate();
+ }
+*/
+ pImp->bConfigLoaded = sal_True;
+}
+
+//--------------------------------------------------------------------
+
+void SfxApplication::StoreConfig()
+
+/* [Beschreibung]
+
+ Interne Routine zum Speichern der Konfiguration in SfxIniManager
+ und SfxConfigManager.
+*/
+
+{
+ // Workingset schreiben?
+// if ( pOptions->IsSaveWorkingSet() )
+// SfxTaskManager::SaveWorkingSet();
+//(mba/task): Implementierung fehlt
+
+ if (!pAppData_Impl->pAppCfg->StoreConfig())
+ HandleConfigError_Impl((sal_uInt16)pCfgMgr->GetErrorCode());
+ else
+ SaveConfiguration();
+
+ utl::ConfigManager::GetConfigManager()->StoreConfigItems();
+}
+
+//--------------------------------------------------------------------
+#ifdef WNT
+extern String GetUserID();
+#endif
+
+SfxIniManager* SfxApplication::CreateIniManager()
+{
+ SfxIniManager *pIniMgr = NULL;
+ try
+ {
+ pIniMgr = SfxIniManager::Get();
+ if ( pIniMgr )
+ {
+ pIniMgr->EnterLock();
+
+ // Dialog-Mnemonics/Scaling
+ LanguageType eLang = Application::GetAppInternational().GetLanguage();
+ Application::EnableAutoMnemonic( pIniMgr->Get( SFX_KEY_INTERNATIONAL_AUTOMNEMONIC,(sal_uInt16) eLang ).CompareToAscii("1") == COMPARE_EQUAL );
+ Application::SetDialogScaleX( (short)
+ pIniMgr->Get( SFX_KEY_INTERNATIONAL_DIALOGSCALEX,
+ (sal_uInt16) eLang ).ToInt32() );
+ return pIniMgr;
+ }
+ }
+ catch ( ::com::sun::star::registry::InvalidRegistryException& )
+ {
+ pIniMgr = NULL;
+ }
+
+ // If some configurtation files are missing or corrupt
+ // try to start setup. If starting failed show a errorbox and exit application with an error code.
+ INetURLObject aSetupObj( Application::GetAppFileName(), INET_PROT_FILE );
+ #if defined(UNX)
+ aSetupObj.setName( DEFINE_CONST_UNICODE("setup") );
+ #endif
+ #if defined(WIN) || defined(WNT) || defined(OS2)
+ aSetupObj.setName( DEFINE_CONST_UNICODE("setup.exe") );
+ #endif
+ #if defined(MAC)
+ aSetupObj.setName( DEFINE_CONST_UNICODE("Setup") );
+ #endif
+
+ // We must use different messages for fat office and portal.
+ // A fat office can be repaired by user himself ...
+ // but portal problems must fixed by an admin!
+ String aMsg;
+ if( Application::IsRemoteServer())
+ {
+ aMsg += DEFINE_CONST_UNICODE("Your user account is not configured correctly.\n");
+ aMsg += DEFINE_CONST_UNICODE("Please contact your StarPortal administator.\n");
+ }
+ else
+ {
+ aMsg += DEFINE_CONST_UNICODE("Configuration files could not be found.\n");
+ aMsg += DEFINE_CONST_UNICODE("Can't start neither StarOffice nor Setup.\n");
+ aMsg += DEFINE_CONST_UNICODE("Please try to start setup by yourself.");
+ }
+
+ String aImageName( aSetupObj.PathToFileName() );
+ VOS_NAMESPACE(OProcess,vos) aProcess( aImageName.GetBuffer(), DEFINE_CONST_UNICODE("/officemode") );
+ if ( 0 != aProcess.execute( VOS_NAMESPACE(OProcess,vos)::TOption_Detached ) )
+ Application::Abort( aMsg );
+ exit(-1);
+/*
+ INetURLObject aSetupObj( Application::GetAppFileName(), INET_PROT_FILE );
+#if defined(UNX)
+ aSetupObj.setName( DEFINE_CONST_UNICODE("setup") );
+#endif
+#if defined(WIN) || defined(WNT) || defined(OS2)
+ aSetupObj.setName( DEFINE_CONST_UNICODE("setup.exe") );
+#endif
+#if defined(MAC)
+ aSetupObj.setName( DEFINE_CONST_UNICODE("Setup") );
+#endif
+ String aMsg = DEFINE_CONST_UNICODE("Configuration files could not be found.\n");
+ aMsg += DEFINE_CONST_UNICODE("Can't start neither StarOffice nor Setup.\n");
+ aMsg += DEFINE_CONST_UNICODE("Please try to start setup by yourself.");
+ String aImageName( aSetupObj.PathToFileName() );
+ VOS_NAMESPACE(OProcess,vos) aProcess( aImageName.GetBuffer(), DEFINE_CONST_UNICODE("/officemode") );
+ if ( 0 != aProcess.execute( VOS_NAMESPACE(OProcess,vos)::TOption_Detached ) )
+ Application::Abort( aMsg );
+ exit(0);*/
+ return 0;
+}
+
+//------------------------------------------------------------------------
+
+SfxIniManager* SfxApplication::GetIniManager() const
+
+/* [Beschreibung]
+
+ Diese Methode liefert den Ini-Manager der Dokument-Factory
+ des aktiven Dokuments, insofern ein Dokument aktiv ist.
+ Ansonsten liefert sie den Ini-Manager der Applikation.
+
+ W"ahrend 'Application:Execute()' ist der R"uckgabewert
+ immer ein g"ultiger Pointer, ansonsten kann es auch ein
+ 0-Pointer sein.
+*/
+
+{
+ return pViewFrame ? pViewFrame->GetIniManager() : pAppIniMgr;
+}
+
+//------------------------------------------------------------------------
+
+SfxProgress* SfxApplication::GetProgress() const
+
+/* [Beschreibung]
+
+ Liefert den f"ur die gesamte Applikation laufenden SfxProgress
+ oder 0, falls keiner f"ur die gesamte Applikation l"auft.
+
+
+ [Querverweise]
+
+ <SfxProgress::GetActiveProgress(SfxViewFrame*)>
+ <SfxViewFrame::GetProgress()const>
+*/
+
+{
+ return pAppData_Impl->pProgress;
+}
+
+//------------------------------------------------------------------------
+
+void SfxApplication::ToolboxExec_Impl( SfxRequest &rReq )
+{
+ // Object-Bar-Id ermitteln
+ sal_uInt16 nSID = rReq.GetSlot(), nTbxID;
+ switch ( nSID )
+ {
+ case SID_TOGGLEFUNCTIONBAR: nTbxID = SFX_OBJECTBAR_APPLICATION; break;
+ case SID_TOGGLEOBJECTBAR: nTbxID = SFX_OBJECTBAR_OBJECT; break;
+ case SID_TOGGLETOOLBAR: nTbxID = SFX_OBJECTBAR_TOOLS; break;
+ case SID_TOGGLEMACROBAR: nTbxID = SFX_OBJECTBAR_MACRO; break;
+ case SID_TOGGLEOPTIONBAR: nTbxID = SFX_OBJECTBAR_OPTIONS; break;
+ case SID_TOGGLECOMMONTASKBAR: nTbxID = SFX_OBJECTBAR_COMMONTASK; break;
+ case SID_TOGGLENAVBAR: nTbxID = SFX_OBJECTBAR_NAVIGATION; break;
+ //case SID_TOGGLERECORDINGBAR: nTbxID = SFX_OBJECTBAR_RECORDING; break;
+ //case SID_TOGGLEFULLSCREENBAR: nTbxID = SFX_OBJECTBAR_FULLSCREEN; break;
+ default:
+ DBG_ERROR( "invalid ObjectBar`s SID" );
+ }
+
+ // Parameter auswerten
+ SfxToolBoxConfig *pTbxConfig = SfxToolBoxConfig::GetOrCreate();
+ SFX_REQUEST_ARG(rReq, pShowItem, SfxBoolItem, nSID, sal_False);
+ sal_Bool bShow = pShowItem ? pShowItem->GetValue() : !pTbxConfig->IsToolBoxPositionVisible(nTbxID);
+
+ // ausfuehren
+ pTbxConfig->SetToolBoxPositionVisible(nTbxID, bShow);
+ GetBindings().Invalidate( nSID );
+
+ SfxViewFrame* pViewFrame = SfxViewFrame::GetFirst();
+ while ( pViewFrame )
+ {
+ // update all "final" dispatchers
+ if ( !pViewFrame->GetActiveChildFrame_Impl() )
+ pViewFrame->GetDispatcher()->Update_Impl(sal_True);
+ pViewFrame = SfxViewFrame::GetNext(*pViewFrame);
+ }
+
+ // ggf. recorden
+ if ( !rReq.IsAPI() )
+ rReq.AppendItem( SfxBoolItem( nSID, bShow ) );
+ rReq.Done();
+}
+
+//------------------------------------------------------------------------
+
+
+void SfxApplication::ToolboxState_Impl( SfxItemSet &rSet )
+{
+ SfxWhichIter aIter(rSet);
+ for ( sal_uInt16 nSID = aIter.FirstWhich(); nSID; nSID = aIter.NextWhich() )
+ {
+ SfxToolBoxConfig *pTbxConfig = SfxToolBoxConfig::GetOrCreate();
+ switch ( nSID )
+ {
+ case SID_TOGGLEFUNCTIONBAR:
+ rSet.Put( SfxBoolItem( nSID, pTbxConfig->
+ IsToolBoxPositionVisible(SFX_OBJECTBAR_APPLICATION)));
+ break;
+
+ case SID_TOGGLEOBJECTBAR:
+ rSet.Put( SfxBoolItem( nSID, pTbxConfig->
+ IsToolBoxPositionVisible(SFX_OBJECTBAR_OBJECT)));
+ break;
+
+ case SID_TOGGLEOPTIONBAR:
+ rSet.Put( SfxBoolItem( nSID, pTbxConfig->
+ IsToolBoxPositionVisible(SFX_OBJECTBAR_OPTIONS)));
+ break;
+
+ case SID_TOGGLETOOLBAR:
+ rSet.Put( SfxBoolItem( nSID, pTbxConfig->
+ IsToolBoxPositionVisible(SFX_OBJECTBAR_TOOLS)));
+ break;
+
+ case SID_TOGGLEMACROBAR:
+ rSet.Put( SfxBoolItem( nSID, pTbxConfig->
+ IsToolBoxPositionVisible(SFX_OBJECTBAR_MACRO)));
+ break;
+
+ case SID_TOGGLECOMMONTASKBAR:
+ rSet.Put( SfxBoolItem( nSID, pTbxConfig->
+ IsToolBoxPositionVisible(SFX_OBJECTBAR_COMMONTASK)));
+ break;
+
+ case SID_TOGGLENAVBAR:
+ rSet.Put( SfxBoolItem( nSID, pTbxConfig->
+ IsToolBoxPositionVisible(SFX_OBJECTBAR_NAVIGATION)));
+ break;
+
+ default:
+ DBG_ERROR( "invalid ObjectBar`s SID" );
+ }
+ }
+}
+
+//------------------------------------------------------------------------
+
+
+VclFileDialog* SfxApplicationClass::CreateFileDialog( Window* pParent, sal_uInt32 nWinBits )
+{
+ return new SfxFileDialog( pParent, nWinBits );
+}
+
+SvUShorts* SfxApplication::GetDisabledSlotList_Impl()
+{
+ sal_Bool bError = sal_False;
+ SvUShorts* pList = pAppData_Impl->pDisabledSlotList;
+ if ( !pList )
+ {
+ // Gibt es eine Slotdatei ?
+ INetURLObject aObj( GetIniManager()->Get( SFX_KEY_CONFIG_DIR ), INET_PROT_FILE );
+ aObj.insertName( DEFINE_CONST_UNICODE( "slots.cfg" ) );
+ SvFileStream aStrm( aObj.GetMainURL(), STREAM_STD_READ );
+
+ // Speziell f"ur AK: wenn in der INI "Slots=AK" steht, slots.cfg
+ // ignorieren und weitermachen
+ String aSlotEntry = GetIniManager()->Get( SFX_KEY_SLOTLIST );
+ if ( aSlotEntry.CompareIgnoreCaseToAscii( "AK" ) == COMPARE_EQUAL )
+ return NULL;
+
+ sal_uInt16 nSlotEntry = (sal_uInt16) aSlotEntry.ToInt32();
+ if ( nSlotEntry )
+ {
+ // Gibt es einen "Slotlist"-Eintrag ??
+ if ( aStrm.GetError() )
+ {
+ bError = sal_True;
+ }
+ else
+ {
+ // SlotDatei einlesen
+ String aTitle;
+ aStrm.ReadByteString(aTitle);
+ if ( aTitle.CompareToAscii("SfxSlotFile" ) == COMPARE_EQUAL )
+ {
+ sal_uInt16 nCount;
+ aStrm >> nCount;
+ pList = pAppData_Impl->pDisabledSlotList =
+ new SvUShorts( nCount < 255 ? (sal_Int8) nCount : 255, 255 );
+
+ sal_uInt16 nSlot;
+ for ( sal_uInt16 n=0; n<nCount; n++ )
+ {
+ aStrm >> nSlot;
+ pList->Insert( nSlot, n );
+ }
+
+ aStrm.ReadByteString(aTitle);
+ if ( aTitle.CompareToAscii("END" ) != COMPARE_EQUAL || aStrm.GetError() )
+ {
+ // Lesen schief gegangen
+ DELETEZ( pList );
+ bError = sal_True;
+ }
+ }
+ else
+ {
+ // Streamerkennung fehlgeschlagen
+ bError = sal_True;
+ }
+ }
+ }
+ else
+ {
+ // Wenn kein Slotlist-Eintrag, dann darf auch keine SlotDatei
+ // vorhanden sein
+ if ( !aStrm.GetError() )
+ bError = sal_True;
+ }
+ }
+ else if ( pList == (SvUShorts*) -1L )
+ {
+ return NULL;
+ }
+
+ if ( !pList )
+ pAppData_Impl->pDisabledSlotList = (SvUShorts*) -1L;
+
+ if ( bError )
+ {
+ // Wenn ein Sloteintrag vorhanden ist, aber keine oder eine fehlerhafte
+ // SlotDatei, oder aber eine Slotdatei, aber kein Sloteintrag, dann
+ // gilt dies als fehlerhafte Konfiguration
+ new SfxSpecialConfigError_Impl(
+ String( SfxResId( RID_SPECIALCONFIG_ERROR ) ) );
+ }
+
+ return pList;
+}
+
+
+Config* SfxApplication::GetFilterIni()
+{
+ if( !pAppData_Impl->pFilterIni )
+ {
+ String aIniFile( DEFINE_CONST_UNICODE( FILTER_INI ) );
+ if ( GetIniManager()->SearchFile( aIniFile, SFX_KEY_MODULES_PATH ) )
+ pAppData_Impl->pFilterIni = new Config( aIniFile );
+ else
+ // da fr"uher immer ein pointer != NULL returniert wurde, m"ussen
+ // wir das jetzt wohl auch tun
+ pAppData_Impl->pFilterIni = new Config();
+ }
+ return pAppData_Impl->pFilterIni;
+}
+
+
+SfxModule* SfxApplication::GetActiveModule( SfxViewFrame *pFrame ) const
+{
+ if ( !pFrame )
+ pFrame = SfxViewFrame::Current();
+ SfxObjectShell* pSh = 0;
+ if( pFrame ) pSh = pFrame->GetObjectShell();
+ return pSh ? pSh->GetModule() : 0;
+}
+
+class AppISfxModule : public ISfxModule
+{
+ SfxApplication* pApp;
+public:
+ AppISfxModule( SfxApplication* pAppP ) : pApp( pAppP ) {}
+
+ virtual SfxFileDialog* CreateDocFileDialog(
+ sal_uInt32 nBits, const SfxObjectFactory& rFact, const SfxItemSet* pSet = NULL ) {
+ return pApp->CreateDocFileDialog( nBits, rFact, pSet );
+ }
+ virtual ModalDialog* CreateAboutDialog() {
+ return pApp->CreateAboutDialog();
+ }
+ virtual ResMgr* GetResMgr() {
+ return Resource::GetResManager();
+ }
+};
+
+ISfxModule* SfxApplication::GetISfxModule( SfxViewFrame *pFrame )
+{
+ SfxModule* pModule = GetActiveModule( pFrame );
+ if( pModule )
+ return pModule;
+ ISfxModule*& rpI = pAppData_Impl->pISfxModule;
+ if( !rpI ) rpI = new AppISfxModule( this );
+ return rpI;
+}
+
+
+SfxSlotPool& SfxApplication::GetSlotPool( SfxViewFrame *pFrame ) const
+{
+ SfxModule *pMod = GetActiveModule( pFrame );
+ if ( pMod && pMod->GetSlotPool() )
+ return *pMod->GetSlotPool();
+ else
+ return *pSlotPool;
+}
+
+
+SfxAcceleratorManager* SfxApplication::GetAcceleratorManager() const
+{
+ // Accelerator immer mit ContainerBindings
+ SfxViewFrame *pFrame = pViewFrame;
+ if ( !pFrame )
+ return pAcceleratorMgr;
+
+ while ( pFrame->GetParentViewFrame_Impl() )
+ pFrame = pFrame->GetParentViewFrame_Impl();
+
+ SfxViewShell* pSh = 0;
+ if( pFrame )
+ pSh = pFrame->GetViewShell();
+ if ( pSh )
+ {
+ SfxAcceleratorManager *pMgr = pSh->GetAccMgr_Impl();
+ if ( pMgr )
+ return pMgr;
+ }
+
+ return pAcceleratorMgr;
+}
+
+ISfxTemplateCommon* SfxApplication::GetCurrentTemplateCommon()
+{
+ if( pAppData_Impl->pTemplateCommon )
+ return pAppData_Impl->pTemplateCommon;
+ return NULL;
+}
+
+
+ISfxTemplateCommon* SfxApplication::GetCurrentTemplateCommon( SfxBindings& rBindings )
+{
+ if( pAppData_Impl->pTemplateCommon )
+ return pAppData_Impl->pTemplateCommon;
+ SfxChildWindow *pChild = rBindings.GetWorkWindow_Impl()->GetChildWindow_Impl(
+ SfxTemplateDialogWrapper::GetChildWindowId() );
+ if ( pChild )
+ return ((SfxTemplateDialog*) pChild->GetWindow())->GetISfxTemplateCommon();
+ return 0;
+}
+
+PopupMenu* SfxAppData_Impl::GetPopupMenu( sal_uInt16 nSID, sal_Bool bBig, sal_Bool bNew )
+{
+ String aPath;
+ SfxBmkMenu** ppMenu;
+ sal_uInt16 nKey;
+ switch( nSID )
+ {
+ case SID_NEWDOCDIRECT:
+ ppMenu = &pNewMenu; nKey = SFX_KEY_NEW_DIR; break;
+ case SID_BOOKMARKS:
+ ppMenu = &pBookmarkMenu; nKey = SFX_KEY_BOOKMARK_DIR; break;
+ case SID_AUTOPILOTMENU:
+ ppMenu = &pAutoPilotMenu; nKey = SFX_KEY_AUTOPILOT_DIR; break;
+ case SID_STARTMENU:
+ ppMenu = &pStartMenu; nKey = SFX_KEY_STARTMENU_DIR; break;
+ default:
+ ppMenu = 0;
+ }
+
+ if( ppMenu && ( !*ppMenu || bNew ) )
+ {
+ INetURLObject aObj( SFX_INIMANAGER()->Get( nKey ), INET_PROT_FILE );
+ String aURL = aObj.GetMainURL();
+ if ( *ppMenu )
+ delete *ppMenu;
+ *ppMenu = new SfxBmkMenu( aURL, aURL );
+ (*ppMenu)->Initialize();
+ }
+ return ppMenu ? *ppMenu : NULL;
+}
+
+SfxMenuBarManager* SfxApplication::GetMenuBarManager() const
+{
+ SfxViewFrame *pFrame = SfxViewFrame::Current();
+ if ( pFrame )
+ return pFrame->GetViewShell()->GetMenuBar_Impl();
+ else
+ return 0;
+}
+
+
diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx
new file mode 100644
index 000000000000..04ac70847e49
--- /dev/null
+++ b/sfx2/source/appl/appopen.cxx
@@ -0,0 +1,1402 @@
+/*************************************************************************
+ *
+ * $RCSfile: appopen.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:26 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _COM_SUN_STAR_UNO_REFERENCE_H_
+#include <com/sun/star/uno/Reference.h>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_FRAMESEARCHFLAG_HPP_
+#include <com/sun/star/frame/FrameSearchFlag.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XDISPATCH_HPP_
+#include <com/sun/star/frame/XDispatch.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XDISPATCHPROVIDER_HPP_
+#include <com/sun/star/frame/XDispatchProvider.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XFRAME_HPP_
+#include <com/sun/star/frame/XFrame.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UTIL_URL_HPP_
+#include <com/sun/star/util/URL.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_
+#include <com/sun/star/beans/PropertyValue.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UTIL_XURLTRANSFORMER_HPP_
+#include <com/sun/star/util/XURLTransformer.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XSTATUSLISTENER_HPP_
+#include <com/sun/star/frame/XStatusListener.hpp>
+#endif
+#ifndef _CPPUHELPER_IMPLBASE1_HXX_
+#include <cppuhelper/implbase1.hxx>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XCOMPONENTLOADER_HPP_
+#include <com/sun/star/frame/XComponentLoader.hpp>
+#endif
+#ifndef _SV_WRKWIN_HXX
+#include <vcl/wrkwin.hxx>
+#endif
+#ifndef _SFXINTITEM_HXX //autogen
+#include <svtools/intitem.hxx>
+#endif
+#ifndef _SV_MSGBOX_HXX
+#include <vcl/msgbox.hxx>
+#endif
+#ifndef _SFXSTRITEM_HXX //autogen
+#include <svtools/stritem.hxx>
+#endif
+#ifndef _SFXENUMITEM_HXX //autogen
+#include <svtools/eitem.hxx>
+#endif
+#ifndef _SVSTOR_HXX //autogen
+#include <so3/svstor.hxx>
+#endif
+#ifndef _SFXDOCTEMPL_HXX //autogen
+#include <doctempl.hxx>
+#endif
+#ifndef _EXTATTR_HXX
+#include <svtools/extattr.hxx>
+#endif
+#ifndef _SFXECODE_HXX
+#include <svtools/sfxecode.hxx>
+#endif
+
+#include <svtools/ehdl.hxx>
+#include <svtools/sbxobj.hxx>
+#include <svtools/urihelper.hxx>
+#include <unotools/processfactory.hxx>
+
+#pragma hdrstop
+
+#include "app.hxx"
+#include "appdata.hxx"
+#include "bindings.hxx"
+#include "cfgmgr.hxx"
+#include "dispatch.hxx"
+#include "docfile.hxx"
+#include "docinf.hxx"
+#include "fcontnr.hxx"
+#include "fsetobsh.hxx"
+#include "loadenv.hxx"
+#include "new.hxx"
+#include "objitem.hxx"
+#include "objsh.hxx"
+#include "objshimp.hxx"
+#include "openflag.hxx"
+#include "passwd.hxx"
+#include "picklist.hxx"
+#include "referers.hxx"
+#include "request.hxx"
+#include "sfxresid.hxx"
+#include "viewsh.hxx"
+#include "app.hrc"
+#include "topfrm.hxx"
+#include "appimp.hxx"
+#include "iodlg.hxx"
+#include "sfxuno.hxx"
+
+#define _SVSTDARR_STRINGSDTOR
+#include <svtools/svstdarr.hxx>
+
+using namespace ::com::sun::star::util;
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::frame;
+using namespace ::com::sun::star::lang;
+using namespace ::cppu;
+
+//=========================================================================
+
+class SfxOpenDocStatusListener_Impl : public WeakImplHelper1< XStatusListener >
+{
+public:
+ BOOL bFinished;
+ BOOL bSuccess;
+ virtual void SAL_CALL statusChanged( const FeatureStateEvent& Event ) throw(RuntimeException);
+ virtual void SAL_CALL disposing( const EventObject& Source ) throw(RuntimeException);
+ SfxOpenDocStatusListener_Impl()
+ : bFinished( FALSE )
+ , bSuccess( FALSE )
+ {}
+
+};
+
+void SAL_CALL SfxOpenDocStatusListener_Impl::statusChanged( const FeatureStateEvent& Event ) throw(RuntimeException)
+{
+ bSuccess = Event.IsEnabled;
+ bFinished = TRUE;
+}
+
+void SAL_CALL SfxOpenDocStatusListener_Impl::disposing( const EventObject& Source ) throw(RuntimeException)
+{
+}
+
+SfxObjectShellRef SfxApplication::DocAlreadyLoaded
+(
+ const String& rName, // Name des Dokuments mit Pfad
+ BOOL bSilent, // TRUE: nicht nach neuer Sicht fragen
+ BOOL bActivate, // soll bestehende Sicht aktiviert werden
+ BOOL bForbidVisible,
+ const String* pPostStr
+)
+
+/* [Beschreibung]
+
+ Stellt fest, ob ein Dokument mit dem Namen 'rName' bereits geladen
+ ist und liefert einen Pointer darauf zu"uck.
+
+ Ist das Dokument noch nicht geladen, wird ein 0-Pointer zur"uckgeliefert.
+*/
+
+{
+ // zu suchenden Namen als URL aufbereiten
+ INetURLObject aUrlToFind( rName, INET_PROT_FILE );
+ String aPostString;
+ if ( pPostStr )
+ aPostString = *pPostStr;
+
+ // noch offen?
+ SfxObjectShellRef xDoc;
+
+ if ( !aUrlToFind.HasError() )
+ {
+ // erst im Cache suchen
+ MemCache_Impl &rCache = SfxPickList_Impl::Get()->GetMemCache();
+ xDoc = rCache.Find( aUrlToFind, aPostString );
+
+ // dann bei den normal geoeffneten Docs
+ if ( !xDoc.Is() )
+ {
+ xDoc = SfxObjectShell::GetFirst( 0, FALSE ); // auch hidden Docs
+ while( xDoc.Is() )
+ {
+ if ( xDoc->GetMedium() &&
+ xDoc->GetCreateMode() == SFX_CREATE_MODE_STANDARD &&
+ !xDoc->IsAbortingImport() && !xDoc->IsLoading() )
+ {
+ // Vergleiche anhand der URLs
+ INetURLObject aUrl( xDoc->GetMedium()->GetName(), INET_PROT_FILE );
+ if ( !aUrl.HasError() && aUrl == aUrlToFind &&
+ (!bForbidVisible ||
+ !SfxViewFrame::GetFirst( xDoc, 0, TRUE )) &&
+ !xDoc->IsLoading())
+ {
+ SFX_ITEMSET_ARG(
+ xDoc->GetMedium()->GetItemSet(), pPostItem, SfxStringItem,
+ SID_POSTSTRING, FALSE );
+ SFX_ITEMSET_ARG(
+ xDoc->GetMedium()->GetItemSet(), pPost2Item,
+ SfxRefItem, SID_POSTLOCKBYTES, FALSE );
+ if( !pPost2Item && ( !pPostItem && (aPostString.Len()<1) ||
+ pPostItem && pPostItem->GetValue() == aPostString ))
+ break;
+ }
+ }
+ xDoc = SfxObjectShell::GetNext( *xDoc, 0, FALSE );
+ }
+ }
+ }
+
+ // gefunden?
+ if ( xDoc.Is() && bActivate )
+ {
+ DBG_ASSERT(
+ !bForbidVisible, "Unsichtbares kann nicht aktiviert werden" );
+
+ SfxTopViewFrame *pFrame;
+ for( pFrame = (SfxTopViewFrame*)
+ SfxViewFrame::GetFirst( xDoc, TYPE(SfxTopViewFrame) );
+ pFrame && !pFrame->IsVisible();
+ pFrame = (SfxTopViewFrame*)
+ SfxViewFrame::GetNext( *pFrame, xDoc, TYPE(SfxTopViewFrame) ) );
+ if ( pFrame )
+ {
+ SfxViewFrame *pCur = SfxViewFrame::Current();
+ if ( !bSilent && pFrame == pCur )
+ InfoBox( 0, SfxResId(RID_DOCALREADYLOADED_DLG)).Execute();
+ if ( bActivate )
+ {
+ pFrame->MakeActive_Impl( TRUE );
+ }
+ }
+ }
+ return xDoc;
+}
+
+//====================================================================
+
+void SetTemplate_Impl( SvStorage *pStorage,
+ const String &rFileName,
+ const String &rLongName,
+ SfxObjectShell *pDoc)
+{
+ // DocInfo von pDoc 'plattmachen'
+ SfxDocumentInfo &rInfo = pDoc->GetDocInfo();
+ rInfo.Clear();
+
+ // DocInfo vom Template laden
+ SvStorageRef xTemplStor = new SvStorage( rFileName, STREAM_STD_READ );
+ SfxDocumentInfo aTemplInfo;
+
+ if ( aTemplInfo.Load( xTemplStor ) )
+ rInfo.SetTemplateDate( aTemplInfo.GetChanged().GetTime() );
+
+ // Template in DocInfo von pDoc eintragen
+ INetURLObject aObj( rFileName, INET_PROT_FILE );
+ if ( aObj.GetProtocol() == INET_PROT_FILE )
+ {
+ String aFoundName;
+ if( SFX_APP()->Get_Impl()->GetDocumentTemplates()->GetFull( String(), rLongName, aFoundName ) )
+ {
+ rInfo.SetTemplateFileName( aObj.GetMainURL() );
+ rInfo.SetTemplateName( rLongName );
+
+ // wenn schon eine Config da ist, mu\s sie aus dem Template sein
+ BOOL bHasConfig = (pDoc->GetConfigManager() != 0);
+ rInfo.SetTemplateConfig( bHasConfig );
+ pDoc->SetTemplateConfig( bHasConfig );
+ }
+ }
+
+ // DocInfo in Stream schreiben
+ pDoc->FlushDocInfo();
+}
+
+//--------------------------------------------------------------------
+
+ULONG CheckPasswd_Impl
+(
+ Window *pWin, // Parent des Dialogs
+ SfxItemPool &rPool, // Pool, falls ein Set erzeugt werden mus
+ SfxMedium *pFile // das Medium, dessen Passwort gfs. erfragt werden soll
+)
+
+/* [Beschreibung]
+
+ Zu einem Medium das Passwort erfragen; funktioniert nur, wenn es sich
+ um einen Storage handelt.
+ Wenn in der Documentinfo das Passwort-Flag gesetzt ist, wird
+ das Passwort vom Benutzer per Dialog erfragt und an dem Set
+ des Mediums gesetzt; das Set wird, wenn nicht vorhanden, erzeugt.
+
+*/
+
+{
+ ULONG nRet=0;
+ if( ( !pFile->GetFilter() || pFile->GetFilter()->UsesStorage() ) &&
+ pFile->ProvidesData_Impl() && pFile->IsStorage())
+ {
+ SvStorageRef aRef = pFile->GetStorage();
+ if(aRef.Is())
+ {
+ SfxDocumentInfo *pInfo = new SfxDocumentInfo;
+ if(pInfo->Load(aRef) && pInfo->IsPasswd())
+ {
+ SfxPasswordDialog *pDlg = new SfxPasswordDialog(pWin);
+ String aTitle( pDlg->GetText() );
+ aTitle += String::CreateFromAscii(" [");
+ aTitle += INetURLObject( pFile->GetOrigURL() ).GetName();
+ aTitle += String::CreateFromAscii("]");
+ pDlg->SetText( aTitle );
+ if(RET_OK == pDlg->Execute())
+ {
+ SfxItemSet *pSet = pFile->GetItemSet();
+ if(!pSet)
+ {
+ pSet =
+ new SfxItemSet(rPool,
+ SID_PASSWORD, SID_PASSWORD, 0 );
+ pFile->SetItemSet(pSet);
+ }
+ pSet->Put(SfxStringItem(SID_PASSWORD, pDlg->GetPassword()));
+ }
+ else
+ nRet=ERRCODE_IO_ABORT;
+ delete pDlg;
+ }
+ delete pInfo;
+ }
+ }
+ return nRet;
+}
+
+//--------------------------------------------------------------------
+
+
+SfxObjectShell* FindNoName_Impl( TypeId aDocType )
+
+/* [Beschreibung]
+
+ Findet die erste unbenannte und unver"anderte SfxObjectShell vom
+ angegeben Typ, f"ur das ein SfxMDIFrame exist
+*/
+
+{
+ // suchen
+ for ( SfxObjectShell *pFirst = SfxObjectShell::GetFirst();
+ pFirst;
+ pFirst = SfxObjectShell::GetNext(*pFirst) )
+ {
+ // passend?
+ SfxTopViewFrame *pTopFrame = (SfxTopViewFrame*)
+ SfxViewFrame::GetFirst(pFirst, TYPE(SfxTopViewFrame));
+ if ( pTopFrame && !pFirst->HasName() && !pFirst->IsModified() &&
+ pFirst->Type() == aDocType )
+ {
+ // => gefundenen zur"uckgeben
+ return (pFirst->GetFlags() &
+ SFXOBJECTSHELL_DONTREPLACE ) ? 0 : pFirst;
+ }
+ }
+
+ // keins gefunden => 0 zur"uckgeben
+ return 0;
+}
+
+ULONG SfxApplication::LoadTemplate( SfxObjectShellLock& xDoc, const String &rFileName,
+ const String &rLongName, BOOL bCopy, SfxItemSet* pSet )
+{
+ BOOL bWithInfo = ( rLongName.Len() != 0 );
+ const SfxFilter* pFilter = NULL;
+ SfxMedium aMedium( rFileName, ( STREAM_READ | STREAM_SHARE_DENYNONE ), FALSE );
+
+ if ( aMedium.IsStorage() )
+ aMedium.GetStorage();
+ else
+ aMedium.GetInStream();
+
+ if ( aMedium.GetError() )
+ {
+ delete pSet;
+ return aMedium.GetErrorCode();
+ }
+
+ ULONG nErr = GetFilterMatcher().GuessFilter( aMedium,&pFilter,SFX_FILTER_TEMPLATE, 0 );
+ if ( 0 != nErr)
+ {
+ delete pSet;
+ return ERRCODE_SFX_NOTATEMPLATE;
+ }
+
+ if( !pFilter || !pFilter->IsAllowedAsTemplate() )
+ {
+ delete pSet;
+ return ERRCODE_SFX_NOTATEMPLATE;
+ }
+
+ if ( pFilter->GetFilterFlags() & SFX_FILTER_STARONEFILTER )
+ {
+ DBG_ASSERT( !xDoc.Is(), "Sorry, not implemented!" );
+ delete pSet;
+ SfxStringItem aName( SID_FILE_NAME, rFileName );
+ SfxStringItem aReferer( SID_REFERER, String::CreateFromAscii("private:user") );
+ SfxStringItem aFlags( SID_OPTIONS, String::CreateFromAscii("T") );
+ SfxBoolItem aHidden( SID_VIEW, FALSE );
+ const SfxPoolItem *pRet = GetDispatcher().Execute( SID_OPENDOC, SFX_CALLMODE_SYNCHRON, &aName, &aHidden, &aReferer, &aFlags, 0L );
+ const SfxObjectItem *pObj = PTR_CAST( SfxObjectItem, pRet );
+ xDoc = PTR_CAST( SfxObjectShell, pObj->GetShell() );
+ if ( !xDoc.Is() )
+ return ERRCODE_SFX_DOLOADFAILED;
+ xDoc->OwnerLock( FALSE ); // lock was set by hidden load
+ }
+ else
+ {
+ if ( !xDoc.Is() )
+ xDoc = ((SfxFactoryFilterContainer*)pFilter->GetFilterContainer())->GetFactory().CreateObject();
+
+ SfxMedium *pMedium = new SfxMedium( rFileName, STREAM_STD_READ, FALSE, TRUE, pFilter, pSet );
+ if(!xDoc->DoLoad(pMedium))
+ {
+ ErrCode nErr = xDoc->GetErrorCode();
+ xDoc->DoClose();
+ xDoc.Clear();
+ return nErr;
+ }
+ }
+
+ if( bCopy )
+ {
+ SvStorageRef aTmpStor = new SvStorage(String());
+ if( 0 != aTmpStor->GetError())
+ {
+ xDoc->DoClose();
+ xDoc.Clear();
+ return aTmpStor->GetErrorCode();
+ }
+ xDoc->GetStorage()->CopyTo( &aTmpStor );
+ xDoc->DoHandsOff();
+ if ( !xDoc->DoSaveCompleted( aTmpStor ) )
+ {
+ xDoc->DoClose();
+ xDoc.Clear();
+ return aTmpStor->GetErrorCode();
+ }
+
+ if ( bWithInfo )
+ SetTemplate_Impl( aTmpStor, rFileName, rLongName, xDoc );
+ }
+ else if ( bWithInfo )
+ SetTemplate_Impl( xDoc->GetStorage(), rFileName, rLongName, xDoc );
+
+ if ( bWithInfo )
+ xDoc->Broadcast( SfxDocumentInfoHint( &xDoc->GetDocInfo() ) );
+
+ xDoc->SetNoName();
+ xDoc->InvalidateName();
+ xDoc->SetModified(FALSE);
+ xDoc->ResetError();
+ return xDoc->GetErrorCode();
+}
+
+//--------------------------------------------------------------------
+
+void SfxApplication::LoadEa_Impl(SfxMedium &rMedium, SfxObjectShell& rObj)
+{
+ if ( !rMedium.ProvidesData_Impl() || !rMedium.IsStorage() )
+ return;
+ const SfxFilter *pFilter = rMedium.GetFilter();
+ if ( !pFilter || !pFilter->IsOwnFormat() )
+ return;
+ SvStorage *pStor = rMedium.GetStorage();
+ if ( !pStor )
+ return;
+ SvStream *pStream = pStor->GetTargetSvStream();
+ if ( pStream && pStream->IsA() == ID_FILESTREAM )
+ {
+ SvEaMgr aEaMgr(*(SvFileStream *)pStream);
+ String aBuffer;
+ // Langnamen merken f"ur Titel und erneutes Setzen
+ // beim Speichern
+ if ( aEaMgr.GetLongName(aBuffer) )
+ rMedium.SetLongName(aBuffer);
+ if ( aEaMgr.GetComment(aBuffer) )
+ {
+ SfxDocumentInfo *pInfo = &rObj.GetDocInfo();
+ // Kommentar aus der WPS mit DocInfo abgleichen
+ pInfo->SetComment(aBuffer);
+ }
+ }
+}
+
+//--------------------------------------------------------------------
+
+SfxMedium* SfxApplication::InsertDocumentDialog
+(
+ ULONG nFlags,
+ const SfxObjectFactory& rFact
+)
+{
+ SfxMedium *pMedium;
+ while(1)
+ {
+ pMedium = 0;
+ SvStringsDtor* pURLList = NULL;
+ String aFilter;
+ SfxItemSet* pSet;
+ ErrCode nErr = FileOpenDialog_Impl( nFlags | SFXWB_INSERT | WB_3DLOOK, rFact, pURLList, aFilter, pSet );
+ if( !nErr )
+ {
+ DBG_ASSERT( pURLList, "invalid URLList" );
+ DBG_ASSERT( pURLList->Count() == 1, "invalid URLList count" );
+ String aURL = *(pURLList->GetObject(0));
+ pMedium = new SfxMedium(
+ aURL, SFX_STREAM_READONLY, FALSE, TRUE,
+ GetFilterMatcher().GetFilter( aFilter ), pSet );
+
+ LoadEnvironment_ImplRef xLoader = new LoadEnvironment_Impl( pMedium );
+ SfxFilterMatcher aMatcher( rFact.GetFilterContainer() );
+ xLoader->SetFilterMatcher( &aMatcher );
+ xLoader->Start();
+ while( xLoader->GetState() != LoadEnvironment_Impl::DONE )
+ Application::Yield();
+ pMedium = xLoader->GetMedium();
+
+ if( pMedium )
+ if( CheckPasswd_Impl( 0, SFX_APP()->GetPool(), pMedium ) ==
+ ERRCODE_ABORT )
+ {
+ DELETEZ( pMedium );
+ }
+ }
+ delete pURLList;
+ break;
+ }
+ return pMedium;
+}
+
+
+//--------------------------------------------------------------------
+
+void SfxApplication::NewFramesetExec_Impl( SfxRequest& rReq )
+{
+ DBG_MEMTEST();
+/*
+ // Factory-RegNo kann per Parameter angegeben sein
+ SfxErrorContext aEc(ERRCTX_SFX_NEWDOCDIRECT);
+
+ SfxFrameSetObjectShell *pDoc =
+ new SfxFrameSetObjectShell( SFX_CREATE_MODE_STANDARD );
+ SfxObjectShellRef xDoc(pDoc);
+ pDoc->Initialize( String() );
+ xDoc->SetActivateEvent_Impl( SFX_EVENT_CREATEDOC );
+
+ SFX_REQUEST_ARG(rReq, pFrameItem, SfxFrameItem,
+ SID_DOCFRAME, FALSE);
+ if ( pFrameItem && pFrameItem->GetFrame() )
+ pFrameItem->GetFrame()->InsertDocument( pDoc );
+ else
+ CreateView_Impl( rReq, pDoc, TRUE );
+
+ GetAppDispatcher_Impl()->Execute( SID_EDIT_FRAMESET );
+ */
+}
+
+//--------------------------------------------------------------------
+SfxObjectShellLock SfxApplication::NewDoc_Impl( const String& rFact, const SfxItemSet *pSet )
+{
+ SfxObjectShellLock xDoc;
+ const SfxObjectFactory* pFactory = 0;
+ String aFact( rFact );
+ String aPrefix = String::CreateFromAscii( "private:factory/" );
+ if ( aPrefix.Len() == aFact.Match( aPrefix ) )
+ aFact.Erase( 0, aPrefix.Len() );
+ USHORT nPos = aFact.Search( '?' );
+ String aParam;
+ if ( nPos != STRING_NOTFOUND )
+ {
+ aParam = aFact.Copy( nPos, aFact.Len() );
+ aFact.Erase( nPos, aFact.Len() );
+ aParam.Erase(0,1);
+ }
+
+ WildCard aSearchedFac( aFact.EraseAllChars('4').ToUpperAscii() );
+ for( USHORT n = SfxObjectFactory::GetObjectFactoryCount_Impl(); !pFactory && n--; )
+ {
+ pFactory = &SfxObjectFactory::GetObjectFactory_Impl( n );
+ if( !aSearchedFac.Matches( String::CreateFromAscii( pFactory->GetShortName() ).ToUpperAscii() ) )
+ pFactory = 0;
+ }
+
+ if( !pFactory )
+ pFactory = &SfxObjectFactory::GetDefaultFactory();
+
+ // Objekt erzeugen
+ USHORT nSlotId = pFactory->GetCreateNewSlotId();
+ if ( pSet )
+ {
+ SFX_ITEMSET_ARG( pSet, pFrmItem, SfxFrameItem, SID_DOCFRAME, FALSE);
+ if ( pFrmItem && pFrmItem->GetFrame() && !pFrmItem->GetFrame()->IsTop() )
+ // In SubFrames ohne Dialog laden
+ nSlotId = 0;
+ SFX_ITEMSET_ARG( pSet, pSilentItem, SfxBoolItem, SID_SILENT, FALSE);
+ if ( pSilentItem && pSilentItem->GetValue() )
+ nSlotId = 0;
+ }
+
+ if ( nSlotId )
+ {
+ const SfxFrameItem* pFrmItem = NULL;
+ if ( pSet )
+ pFrmItem = (const SfxFrameItem*) SfxRequest::GetItem( pSet, SID_DOCFRAME, FALSE, TYPE(SfxFrameItem) );
+ SfxBoolItem aItem( SID_NEWDOCDIRECT, TRUE );
+ if ( pFrmItem && pFrmItem->GetFrame() && !pFrmItem->GetFrame()->GetCurrentDocument() )
+ GetDispatcher().Execute( nSlotId, SFX_CALLMODE_SYNCHRON, &aItem, pFrmItem, 0L );
+ else
+ GetDispatcher().Execute( nSlotId, SFX_CALLMODE_ASYNCHRON, &aItem, pFrmItem, 0L );
+ }
+ else
+ {
+ xDoc = pFactory->CreateObject();
+ aParam = INetURLObject::decode( aParam, '%', INetURLObject::DECODE_WITH_CHARSET );
+ if( xDoc.Is() )
+ xDoc->DoInitNew_Impl( aParam );
+ }
+
+ return xDoc;
+}
+
+void SfxApplication::NewDocDirectExec_Impl( SfxRequest& rReq )
+{
+ DBG_MEMTEST();
+
+ SFX_REQUEST_ARG(rReq, pHidden, SfxBoolItem, SID_HIDDEN, FALSE);
+//(mba)/task
+/*
+ if ( !pHidden || !pHidden->GetValue() )
+ Application::GetAppWindow()->EnterWait();
+*/
+ SfxObjectShellLock xDoc;
+ BOOL bNewView = TRUE;
+
+ // Factory-RegNo kann per Parameter angegeben sein
+ SfxErrorContext aEc(ERRCTX_SFX_NEWDOCDIRECT);
+ const SfxItemSet *pArgs = rReq.GetArgs();
+ const SfxObjectFactory* pFactory = 0;
+ String aFactory;
+ rReq.AppendItem( SfxBoolItem( SID_TEMPLATE, TRUE ) );
+ SFX_REQUEST_ARG( rReq, pFactoryName, SfxStringItem, SID_NEWDOCDIRECT, FALSE );
+ if( pFactoryName )
+ aFactory = pFactoryName->GetValue();
+
+ SFX_REQUEST_ARG( rReq, pFileFlagsItem, SfxStringItem, SID_OPTIONS, FALSE);
+ if ( pFileFlagsItem )
+ {
+ // Werte auf einzelne Items verteilen
+ String aFileFlags = pFileFlagsItem->GetValue();
+ aFileFlags.ToUpperAscii();
+ if ( STRING_NOTFOUND != aFileFlags.Search( 0x0054 ) ) // T = 54h
+ rReq.AppendItem( SfxBoolItem( SID_TEMPLATE, TRUE ) );
+ if ( STRING_NOTFOUND != aFileFlags.Search( 0x0048 ) ) // H = 48h
+ rReq.AppendItem( SfxBoolItem( SID_HIDDEN, TRUE ) );
+ if ( STRING_NOTFOUND != aFileFlags.Search( 0x0052 ) ) // R = 52h
+ rReq.AppendItem( SfxBoolItem( SID_DOC_READONLY, TRUE ) );
+ if ( STRING_NOTFOUND != aFileFlags.Search( 0x0042 ) ) // B = 42h
+ rReq.AppendItem( SfxBoolItem( SID_PREVIEW, TRUE ) );
+ if ( STRING_NOTFOUND != aFileFlags.Search( 0x0053 ) ) // S = 53h
+ rReq.AppendItem( SfxBoolItem( SID_SILENT, TRUE ) );
+ }
+
+ xDoc = NewDoc_Impl( aFactory, rReq.GetArgs() );
+ if ( xDoc.Is() )
+ {
+ SFX_REQUEST_ARG(rReq, pReadonly, SfxBoolItem, SID_DOC_READONLY, FALSE);
+ if ( pReadonly )
+ xDoc->GetMedium()->GetItemSet()->Put( *pReadonly );
+
+ SFX_REQUEST_ARG(rReq, pPreview, SfxBoolItem, SID_PREVIEW, FALSE);
+ if ( pPreview )
+ xDoc->GetMedium()->GetItemSet()->Put( *pPreview );
+
+ SFX_REQUEST_ARG(rReq, pFlags, SfxStringItem, SID_OPTIONS, FALSE);
+ if ( pFlags )
+ xDoc->GetMedium()->GetItemSet()->Put( *pFlags );
+
+ SfxStringItem aPath( SID_TARGETPATH, String() );
+ SFX_REQUEST_ARG(rReq, pReferer, SfxStringItem, SID_REFERER, FALSE);
+ SFX_REQUEST_ARG(rReq, pPath, SfxStringItem, SID_TARGETPATH, FALSE);
+ if ( pReferer )
+ {
+ // Wenn eine Factory-URL aus einem Bookmark stammt, wird kein Targetpath gesetzt;
+ // stammt sie aus dem Neu - oder Startmenue, k"onnte der Request von einem Contextmenu
+ // kommen. Daher wird der "ubergebene Targetpath "ubernommen.
+ // Ist dieser allerdings selbst wieder Start - oder Neumen"u, wird das beim Speichern
+ // "ubergangen ( ->objstor.cxx )
+ xDoc->GetMedium()->GetItemSet()->Put( *pReferer, SID_REFERER );
+ INetURLObject aURLObj;
+ aURLObj.SetSmartURL( pReferer->GetValue() );
+
+ BOOL bBookmark=TRUE;
+ if( aURLObj.GetProtocol() == INET_PROT_FILE )
+ {
+ SfxIniManager* pMgr = GetIniManager();
+ SfxIniKey aKey[] =
+ {
+ SFX_KEY_NEW_DIR,
+ SFX_KEY_STARTMENU_DIR,
+// SFX_KEY_TEMPLATE_PATH,
+ 0
+ };
+ USHORT nPathLevel = aURLObj.getSegmentCount();
+ USHORT nIndex = 0;
+ while ( aKey[ nIndex ] )
+ {
+ INetURLObject aNewPathObj( pMgr->Get( aKey[ nIndex ] ), INET_PROT_FILE );
+ USHORT nNewLevel = aNewPathObj.getSegmentCount();
+ int nOffset = nPathLevel;
+ nOffset -= nNewLevel;
+ if ( nOffset >= 0 )
+ {
+ INetURLObject aTempObj = aURLObj;
+ for ( ; nOffset > 0; nOffset-- )
+ aTempObj.removeSegment();
+ if ( aTempObj == aNewPathObj )
+ {
+ bBookmark = FALSE;
+ break;
+ }
+ }
+ ++nIndex;
+ }
+ }
+
+ if ( !bBookmark && pPath )
+ aPath.SetValue( pPath->GetValue() );
+ }
+
+ xDoc->GetMedium()->GetItemSet()->Put( aPath, SID_TARGETPATH );
+ }
+
+ // View erzeugen
+ SfxViewFrame* pViewFrame = 0;
+ if ( xDoc.Is() )
+ {
+ SFX_REQUEST_ARG(rReq, pHidden, SfxBoolItem, SID_HIDDEN, FALSE);
+ if ( pHidden )
+ xDoc->GetMedium()->GetItemSet()->Put( *pHidden, SID_HIDDEN );
+
+ SFX_REQUEST_ARG(rReq, pViewId, SfxUInt16Item, SID_VIEW_ID, FALSE);
+ if ( pViewId )
+ xDoc->GetMedium()->GetItemSet()->Put( *pViewId, SID_VIEW_ID );
+
+ xDoc->SetActivateEvent_Impl( SFX_EVENT_CREATEDOC );
+// xDoc->Get_Impl()->nLoadedFlags = SFX_LOADED_ALL;
+ const SfxItemSet* pInternalArgs = rReq.GetInternalArgs_Impl();
+ if( pInternalArgs )
+ xDoc->GetMedium()->GetItemSet()->Put( *pInternalArgs );
+ BOOL bOwnsFrame = FALSE;
+ SfxFrame* pFrame = GetTargetFrame_Impl( rReq.GetArgs(), bOwnsFrame );
+
+ if ( pFrame->PrepareClose_Impl( TRUE, TRUE ) == TRUE )
+ {
+ if ( pHidden && pHidden->GetValue() )
+ {
+ xDoc->RestoreNoDelete();
+ xDoc->OwnerLock( TRUE );
+ }
+ pFrame->InsertDocument( xDoc );
+ pViewFrame = pFrame->GetCurrentViewFrame();
+ }
+ else if ( pFrame->PrepareClose_Impl( TRUE, TRUE ) == RET_NEWTASK )
+ {
+ pFrame = SfxTopFrame::Create();
+ bOwnsFrame = TRUE;
+ DBG_ERROR( "NYI!" );
+ xDoc.Clear();
+ }
+ else
+ xDoc.Clear();
+/*
+ SFX_REQUEST_ARG(rReq, pTargetItem, SfxStringItem,
+ SID_TARGETNAME, FALSE);
+ String aTargetName;
+ if( pTargetItem ) pTargetItem->GetValue();
+ if ( aTargetName.Len() &&
+ aTargetName.CompareIgnoreCaseToAscii("_blank") != COMPARE_EQUAL &&
+ aTargetName.CompareIgnoreCaseToAscii("_top") != COMPARE_EQUAL )
+ pFrame->SetFrameName( aTargetName );
+*/
+ rReq.SetReturnValue( SfxFrameItem( 0, pFrame ) );
+ }
+
+//(mba)/task
+/*
+ if ( !pHidden || !pHidden->GetValue() )
+ Application::GetAppWindow()->LeaveWait();
+ */
+}
+
+//--------------------------------------------------------------------
+
+void SfxApplication::NewDocExec_Impl( SfxRequest& rReq )
+{
+ DBG_MEMTEST();
+
+ // keine Parameter vom BASIC nur Factory angegeben?
+ SFX_REQUEST_ARG(rReq, pTemplNameItem, SfxStringItem, SID_TEMPLATE_NAME, FALSE);
+ SFX_REQUEST_ARG(rReq, pTemplFileNameItem, SfxStringItem, SID_FILE_NAME, FALSE);
+ SFX_REQUEST_ARG(rReq, pTemplRegionNameItem, SfxStringItem, SID_TEMPLATE_REGIONNAME, FALSE);
+
+ SfxObjectShellLock xDoc;
+ BOOL bNewView = TRUE;
+
+ String aTemplateRegion, aTemplateName, aTemplateFileName;
+ BOOL bDirect = FALSE; // "uber FileName anstelle Region/Template
+ SfxErrorContext aEc(ERRCTX_SFX_NEWDOC);
+ if ( !pTemplNameItem && !pTemplFileNameItem )
+ {
+ SfxNewFileDialog *pDlg = CreateNewDialog();
+ if ( RET_OK == pDlg->Execute() )
+ {
+ if ( pDlg->IsTemplate() )
+ {
+ aTemplateName = pDlg->GetTemplateName();
+ aTemplateRegion = pDlg->GetTemplateRegion();
+ aTemplateFileName = pDlg->GetTemplateFileName();
+ rReq.AppendItem( SfxStringItem( SID_TEMPLATE_NAME, aTemplateName) );
+ rReq.AppendItem( SfxStringItem( SID_TEMPLATE_REGIONNAME, aTemplateRegion) );
+ rReq.AppendItem( SfxStringItem( SID_FILE_NAME, aTemplateFileName) );
+ delete pDlg;
+ }
+ else
+ {
+ delete pDlg;
+ bDirect = TRUE;
+ return;
+ }
+ }
+ else
+ {
+ delete pDlg;
+ return;
+ }
+ }
+ else
+ {
+ // Template-Name
+ if ( pTemplNameItem )
+ aTemplateName = pTemplNameItem->GetValue();
+
+ // Template-Region
+ if ( pTemplRegionNameItem )
+ aTemplateRegion = pTemplRegionNameItem->GetValue();
+
+ // Template-File-Name
+ if ( pTemplFileNameItem )
+ {
+ aTemplateFileName = pTemplFileNameItem->GetValue();
+ bDirect = TRUE;
+ }
+ }
+
+ INetURLObject aObj( aTemplateName, INET_PROT_FILE );
+ SfxErrorContext aEC( ERRCTX_SFX_LOADTEMPLATE, aObj.PathToFileName() );
+//! (pb) MaxLen? DirEntry(aTemplateName).GetFull( FSYS_STYLE_HOST,FALSE,20));
+
+ ULONG lErr = 0;
+ SfxItemSet* pSet = new SfxAllItemSet( GetPool() );
+ pSet->Put( SfxBoolItem( SID_TEMPLATE, TRUE ) );
+ if ( !bDirect )
+ {
+ SfxDocumentTemplates aTmpFac;
+ aTmpFac.Construct();
+ if( !aTemplateFileName.Len() )
+ aTmpFac.GetFull( aTemplateRegion, aTemplateName, aTemplateFileName );
+
+ if( !aTemplateFileName.Len() )
+ lErr = ERRCODE_SFX_TEMPLATENOTFOUND;
+ }
+
+ if ( lErr != ERRCODE_NONE )
+ {
+ ULONG lFatalErr = ERRCODE_TOERROR(lErr);
+ if ( lFatalErr )
+ ErrorHandler::HandleError(lErr);
+ }
+ else
+ {
+ const SfxPoolItem *pRet=0;
+ SfxCallMode eMode = rReq.IsSynchronCall() ? SFX_CALLMODE_SYNCHRON : SFX_CALLMODE_ASYNCHRON;
+ SfxStringItem aReferer( SID_REFERER, DEFINE_CONST_UNICODE("private:user") );
+ SfxStringItem aTarget( SID_TARGETNAME, DEFINE_CONST_UNICODE("_blank") );
+ if ( aTemplateFileName.Len() )
+ {
+ INetURLObject aObj( aTemplateFileName, INET_PROT_FILE );
+ SfxStringItem aName( SID_FILE_NAME, aObj.GetMainURL() );
+ SfxStringItem aTemplName( SID_TEMPLATE_NAME, aTemplateName );
+ SfxStringItem aTemplRegionName( SID_TEMPLATE_REGIONNAME, aTemplateRegion );
+ pRet = GetDispatcher().Execute( SID_OPENDOC, eMode, &aName, &aTarget, &aReferer, &aTemplName, &aTemplRegionName, 0L );
+ }
+ else
+ {
+ SfxStringItem aName( SID_FILE_NAME, DEFINE_CONST_UNICODE("private:factory") );
+ pRet = GetDispatcher().Execute( SID_OPENDOC, eMode, &aName, &aTarget, &aReferer, 0L );
+ }
+
+ if ( pRet )
+ rReq.SetReturnValue( *pRet );
+ }
+}
+
+
+//-------------------------------------------------------------------------
+
+SfxFrame* SfxApplication::GetTargetFrame_Impl( const SfxItemSet* pSet, BOOL& rbOwner )
+{
+ SFX_ITEMSET_ARG(pSet, pViewItem, SfxBoolItem, SID_VIEW, FALSE);
+
+ if ( pViewItem && !pViewItem->GetValue() )
+ // ohne View laden
+ return NULL;
+
+ SFX_ITEMSET_ARG(pSet, pFrmItem, SfxFrameItem, SID_DOCFRAME, FALSE);
+ SFX_ITEMSET_ARG(pSet, pTargetItem, SfxStringItem, SID_TARGETNAME, FALSE);
+ SFX_ITEMSET_ARG(pSet, pBoolItem, SfxBoolItem, SID_ONLYSUBFRAMES, FALSE);
+ SFX_ITEMSET_ARG(pSet, pRefererItem, SfxStringItem, SID_REFERER, FALSE);
+ SFX_ITEMSET_ARG(pSet, pBrowsingItem, SfxUInt16Item, SID_BROWSEMODE, FALSE);
+ SFX_ITEMSET_ARG(pSet, pPreviewItem, SfxBoolItem, SID_PREVIEW, FALSE);
+
+ // Frame als Parameter mitgegeben?
+ SfxFrame *pFrame = NULL;
+ if ( pFrmItem )
+ pFrame = pFrmItem->GetFrame();
+ SfxFrame *pSource = pFrame;
+ SfxFrame *pStart = pFrame;
+
+ if ( pPreviewItem && pPreviewItem->GetValue() )
+ {
+ DBG_ASSERT( pFrame, "Preview without frame!" );
+ return pFrame;
+ }
+
+ String aTargetName;
+ if ( pRefererItem && ( !pBrowsingItem || pBrowsingItem->GetValue() == BROWSE_NORMAL ) )
+ {
+ INetURLObject aURLObj;
+ aURLObj.SetSmartURL( pRefererItem->GetValue() );
+ if ( aURLObj.GetProtocol() == INET_PROT_FILE && ( !pFrame || pFrame->IsTop() ) )
+ {
+ SfxIniManager* pIniMgr = GetIniManager();
+ INetURLObject aStartMenuObj( pIniMgr->Get( SFX_KEY_STARTMENU_DIR ), INET_PROT_FILE );
+ INetURLObject aQuickStartObj( pIniMgr->Get( SFX_KEY_QUICKSTART_DIR ), INET_PROT_FILE );
+ if ( aURLObj == aStartMenuObj || aURLObj == aQuickStartObj )
+ {
+ aTargetName = String::CreateFromAscii( "_blank" );
+ pTargetItem = NULL;
+ }
+ }
+ }
+
+ if ( pTargetItem && pTargetItem->GetValue().Len() )
+ {
+ // Wenn ein TargetItem mitgegeben wurde, aber kein Frame, den
+ // Current ViewFrame nehmen
+ SfxViewFrame* pCurViewFrame = SfxViewFrame::Current();
+ if ( !pCurViewFrame )
+ pCurViewFrame = SfxViewFrame::GetFirst();
+
+ if ( !pFrame && pCurViewFrame )
+ {
+ pFrame = pCurViewFrame->GetFrame();
+ pStart = pFrame;
+ }
+
+ if ( pFrame )
+ {
+ aTargetName = pTargetItem->GetValue();
+
+ // Wenn kein TargetName, dann den vom Current Document
+ SfxObjectShell* pCur = SfxObjectShell::Current();
+ if( !aTargetName.Len() && pCur )
+ aTargetName = pCur->GetDocInfo().GetDefaultTarget();
+ }
+ }
+ else if ( pFrame && (pFrame->GetFrameName().CompareToAscii("mail-body") == COMPARE_EQUAL) )
+ {
+ // Hack for MailDocument in Office 5.2
+ aTargetName = String::CreateFromAscii("_blank");
+ }
+
+ BOOL bNewTask =
+ aTargetName.CompareToAscii("_blank") == COMPARE_EQUAL ||
+ aTargetName.CompareToAscii("_null") == COMPARE_EQUAL;
+
+ if ( pFrame )
+ {
+ if ( pBoolItem && pBoolItem->GetValue() )
+ {
+ DBG_ASSERT( aTargetName.Len(), "OnlySubFrames, aber kein Name!" );
+ pFrame = pFrame->SearchChildrenForName_Impl( aTargetName );
+ }
+ else
+ {
+ if ( !bNewTask || pFrame->GetFrameName().Len() || pFrame->GetCurrentDocument() || pFrame->GetParentFrame() )
+ // Auch bei leerem TargetName suchen wg. SmartSelf
+ // _blank nur suchen, wenn pFrame nicht schon _blank ist!
+ pFrame = pFrame->SearchFrame( aTargetName );
+ }
+ }
+
+ BOOL bName = ( pFrame == NULL );
+ if ( pFrame && ( !pBrowsingItem || pBrowsingItem->GetValue() == BROWSE_NORMAL ) )
+ {
+ // Es wurde ein Frame gefunden; dessen Doc darf nicht ersetzt werden,
+ // wenn es der Desktop ist oder wenn es embedded ist
+ // Ausnahme: neuerdings k"onnen wir auch innerhalb des Desktops browsen, wenn dieser ein Frameset ist
+ SfxObjectShell* pCur = pFrame->GetCurrentDocument();
+ if( pCur &&
+ ( ( pCur->GetFlags() & SFXOBJECTSHELL_DONTREPLACE ) ||
+ pCur->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED ) )
+ {
+ pFrame = 0;
+ pSource = 0;
+ pStart = 0;
+ }
+ }
+
+ // Kein Frame gefunden -> Neuen Frame nehmen
+ if ( !pFrame )
+ {
+ SFX_ITEMSET_ARG( pSet, pHiddenItem, SfxBoolItem, SID_HIDDEN, FALSE);
+ BOOL bHidden = pHiddenItem && pHiddenItem->GetValue();
+ pFrame = SfxTopFrame::Create( NULL, 0, bHidden );
+ rbOwner = TRUE;
+ if ( !bNewTask && bName )
+ pFrame->SetFrameName( aTargetName );
+ }
+ else
+ rbOwner = FALSE;
+
+ return pFrame;
+}
+
+//---------------------------------------------------------------------------
+
+void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
+{
+ DBG_MEMTEST();
+
+ USHORT nSID = rReq.GetSlot();
+ SFX_REQUEST_ARG( rReq, pFileNameItem, SfxStringItem, SID_FILE_NAME, FALSE );
+ if ( !pFileNameItem )
+ {
+ // FileDialog ausf"uhren
+ SvStringsDtor* pURLList = NULL;
+ String aFilter;
+ void* pDummy = 0; // wegen GCC und C272
+ SfxItemSet* pSet;
+ ULONG nErr = FileOpenDialog_Impl(
+ WB_OPEN | SFXWB_MULTISELECTION | SFXWB_SHOWVERSIONS, *(SfxObjectFactory*)pDummy, pURLList, aFilter, pSet );
+ if ( nErr == ERRCODE_ABORT )
+ {
+ delete pURLList;
+ return;
+ }
+
+ rReq.SetArgs( *(SfxAllItemSet*)pSet );
+ rReq.AppendItem( SfxStringItem( SID_FILTER_NAME, aFilter ) );
+ rReq.AppendItem( SfxStringItem( SID_TARGETNAME, String::CreateFromAscii("_blank") ) );
+ delete pSet;
+
+ if ( pURLList->Count() > 1 )
+ {
+ rReq.AppendItem( SfxStringItem( SID_REFERER, String::CreateFromAscii(SFX_REFERER_USER) ) );
+
+ for ( USHORT i = 0; i < pURLList->Count(); ++i )
+ {
+ String aURL = *(pURLList->GetObject(i));
+ rReq.RemoveItem( SID_FILE_NAME );
+ rReq.AppendItem( SfxStringItem( SID_FILE_NAME, aURL ) );
+
+ // synchron ausf"uhren, damit beim Reschedulen nicht schon das n"achste Dokument
+ // geladen wird
+ GetDispatcher().Execute( SID_OPENDOC, SFX_CALLMODE_SYNCHRON, *rReq.GetArgs() );
+ }
+ delete pURLList;
+ return;
+ }
+ else
+ {
+ String aURL;
+ if ( pURLList->Count() == 1 )
+ aURL = *(pURLList->GetObject(0));
+ rReq.AppendItem( SfxStringItem( SID_FILE_NAME, aURL ) );
+ delete pURLList;
+ }
+
+ rReq.AppendItem( SfxStringItem( SID_REFERER, String::CreateFromAscii(SFX_REFERER_USER) ) );
+ }
+
+ if ( SID_OPENURL == nSID )
+ {
+ // SID_OPENURL does the same as SID_OPENDOC!
+ rReq.SetSlot( SID_OPENDOC );
+ nSID = SID_OPENDOC;
+ }
+ else if ( nSID == SID_OPENTEMPLATE )
+ {
+ rReq.AppendItem( SfxBoolItem( SID_TEMPLATE, TRUE ) );
+ }
+
+ SFX_REQUEST_ARG(rReq, pFrmItem, SfxFrameItem, SID_DOCFRAME, FALSE);
+ SfxFrame *pFrame = NULL;
+ if ( pFrmItem )
+ pFrame = pFrmItem->GetFrame();
+ else if ( SfxViewFrame::Current() )
+ pFrame = SfxViewFrame::Current()->GetFrame();
+
+ // check if caller has set a callback
+ SFX_REQUEST_ARG(rReq, pLinkItem, SfxLinkItem, SID_DONELINK, FALSE );
+
+ // check if caller wants to create a view
+ BOOL bCreateView = TRUE;
+ SFX_REQUEST_ARG( rReq, pCreateViewItem, SfxBoolItem, SID_VIEW, FALSE );
+ if ( pCreateViewItem && !pCreateViewItem->GetValue() )
+ bCreateView = FALSE;
+
+ // we can't load without a view - switch to hidden view
+ if ( !bCreateView )
+ rReq.AppendItem( SfxBoolItem( SID_HIDDEN, TRUE ) );
+
+ // check if the view must be hidden
+ BOOL bHidden = FALSE;
+ SFX_REQUEST_ARG(rReq, pHidItem, SfxBoolItem, SID_HIDDEN, FALSE);
+ if ( pHidItem )
+ bHidden = pHidItem->GetValue();
+
+ // convert items to properties for framework API calls
+ Sequence < PropertyValue > aArgs;
+ TransformItems( SID_OPENDOC, *rReq.GetArgs(), aArgs );
+
+ Reference < XController > xController;
+ if ( pFrame || pLinkItem || !rReq.IsSynchronCall() )
+ {
+ // extract target name
+ ::rtl::OUString aTarget;
+ SFX_REQUEST_ARG(rReq, pTargetItem, SfxStringItem, SID_TARGETNAME, FALSE);
+ if ( pTargetItem )
+ aTarget = pTargetItem->GetValue();
+ else
+ {
+ SFX_REQUEST_ARG( rReq, pNewViewItem, SfxBoolItem, SID_OPEN_NEW_VIEW, FALSE );
+ if ( pNewViewItem && pNewViewItem->GetValue() )
+ aTarget = String::CreateFromAscii("_blank" );
+ }
+
+ if ( bHidden )
+ aTarget = String::CreateFromAscii("_blank");
+
+ // if a frame is given, it must be used for the starting point of the targetting mechanism
+ // this code is also used if asynchron loading is possible, because loadComponent always is synchron
+ Reference < XFrame > xFrame;
+ if ( pFrame )
+ xFrame = pFrame->GetFrameInterface();
+ else
+ xFrame = Reference < XFrame >( ::utl::getProcessServiceFactory()->createInstance(::rtl::OUString::createFromAscii("com.sun.star.frame.Desktop")), UNO_QUERY );
+
+ // make URL ready
+ URL aURL;
+ SFX_REQUEST_ARG( rReq, pFileNameItem, SfxStringItem, SID_FILE_NAME, FALSE );
+ String aFileName = pFileNameItem->GetValue();
+
+ INetURLObject aObj;
+ SfxObjectShell* pCur = pFrame ? pFrame->GetCurrentDocument() : 0;
+ if ( !pCur )
+ pCur = SfxObjectShell::Current();
+ if( aFileName.Len() && aFileName.GetChar(0) == '#' ) // Mark without URL
+ {
+ SfxViewFrame *pView = pFrame ? pFrame->GetCurrentViewFrame() : 0;
+ if ( !pView )
+ pView = SfxViewFrame::Current();
+ pView->GetViewShell()->JumpToMark( aFileName.Copy(1) );
+ rReq.SetReturnValue( SfxViewFrameItem( 0, pView ) );
+ return;
+ }
+
+ aURL.Complete = aFileName;
+ Reference < XURLTransformer > xTrans( ::utl::getProcessServiceFactory()->createInstance( rtl::OUString::createFromAscii("com.sun.star.util.URLTransformer" )), UNO_QUERY );
+ xTrans->parseStrict( aURL );
+
+ // load document using dispatch framework
+ if( !pLinkItem && rReq.IsSynchronCall() )
+ {
+ // if loading must be done synchron, we must wait for completion to get a return value
+ // find frame by myself; I must konw the exact frame to get the controller for the return value from it
+ if( aTarget.getLength() )
+ xFrame = xFrame->findFrame( aTarget, FrameSearchFlag::ALL );
+
+ // targeting has been resolved, so target name must not be used in queryDispatch
+ Reference < XDispatchProvider > xProv( xFrame, UNO_QUERY );
+ Reference < XDispatch > xDisp = xProv.is() ? xProv->queryDispatch( aURL, ::rtl::OUString(), 0 ) : Reference < XDispatch >();
+ if ( xDisp.is() )
+ {
+ // create listener for notification of load success or fail
+ SfxOpenDocStatusListener_Impl* pListener = new SfxOpenDocStatusListener_Impl();
+ pListener->acquire();
+ xDisp->addStatusListener( pListener, aURL );
+ xDisp->dispatch( aURL, aArgs );
+
+ // stay on the stack until result has been notified
+ while ( !pListener->bFinished )
+ Application::Yield();
+
+ if ( pListener->bSuccess )
+ // successful loading, get loaded controller
+ xController = xFrame->getController();
+
+ xDisp->removeStatusListener( pListener, aURL );
+ pListener->release();
+ }
+
+ if ( !xController.is() && aTarget.compareToAscii( "_blank" ) == COMPARE_EQUAL )
+ // a blank frame would have been created in findFrame; in this case I am the owner and I must delete it
+ xFrame->dispose();
+ }
+ else
+ {
+ // otherwise we just dispatch and that's it
+ Reference < XDispatchProvider > xProv( xFrame, UNO_QUERY );
+ Reference < XDispatch > xDisp = xProv.is() ? xProv->queryDispatch( aURL, aTarget, FrameSearchFlag::ALL ) : Reference < XDispatch >();;
+ if ( xDisp.is() )
+ xDisp->dispatch( aURL, aArgs );
+ }
+ }
+ else
+ {
+ // synchron loading without a given frame
+ SFX_REQUEST_ARG( rReq, pFileNameItem, SfxStringItem, SID_FILE_NAME, FALSE );
+ Reference < XComponentLoader > xDesktop( ::utl::getProcessServiceFactory()->createInstance(::rtl::OUString::createFromAscii("com.sun.star.frame.Desktop")), UNO_QUERY );
+ Reference < XModel > xModel( xDesktop->loadComponentFromURL( pFileNameItem->GetValue(), ::rtl::OUString::createFromAscii("_blank"), 0, aArgs ), UNO_QUERY );
+ if ( xModel.is() )
+ xController = xModel->getCurrentController();
+ }
+
+ if ( xController.is() )
+ {
+ // try to find the SfxFrame for the controller
+ SfxFrame* pFrame = NULL;
+ for ( SfxViewShell* pShell = SfxViewShell::GetFirst( 0, FALSE ); pShell; pShell = SfxViewShell::GetNext( *pShell, 0, FALSE ) )
+ {
+ if ( pShell->GetController() == xController )
+ {
+ pFrame = pShell->GetViewFrame()->GetFrame();
+ break;
+ }
+ }
+
+ if ( pFrame )
+ {
+ SfxObjectShell* pSh = pFrame->GetCurrentDocument();
+ DBG_ASSERT( pSh, "Controller without ObjectShell ?!" );
+
+ if ( bCreateView )
+ rReq.SetReturnValue( SfxViewFrameItem( 0, pFrame->GetCurrentViewFrame() ) );
+ else
+ rReq.SetReturnValue( SfxObjectItem( 0, pSh ) );
+
+ SFX_REQUEST_ARG(rReq, pExecItem, SfxExecuteItem, SID_AFTEROPENEVENT, FALSE );
+ if( pExecItem )
+ pFrame->GetDispatcher_Impl()->Execute( *pExecItem );
+
+ if( ( bHidden || !bCreateView ) )
+ {
+ pSh->RestoreNoDelete();
+ // Locking is now done in LoadEnvironment_Impl, otherwise it would be too late!
+// pSh->OwnerLock( TRUE );
+ }
+ }
+ }
+}
+
+//--------------------------------------------------------------------
+
+SfxViewFrame *SfxApplication::CreateView_Impl
+(
+ SfxRequest& rReq,
+ SfxObjectShell* pDoc,
+ FASTBOOL bNewView, // neue View erzwingen
+ FASTBOOL bHidden
+)
+{
+ SfxViewFrame* pFrame = CreateView_Impl( rReq.GetArgs(), pDoc, bNewView, bHidden );
+ rReq.SetReturnValue( SfxViewFrameItem( pFrame ) );
+ return pFrame;
+}
+
+SfxViewFrame *SfxApplication::CreateView_Impl
+(
+ const SfxItemSet* pSet,
+ SfxObjectShell* pDoc,
+ FASTBOOL bNewView, // neue View erzwingen
+ FASTBOOL bHidden
+)
+{
+ DBG_MEMTEST();
+
+ SfxFrame* pFrame = SfxTopFrame::Create( pDoc, 0, bHidden, pSet );
+ return pFrame->GetCurrentViewFrame();
+}
+
+//--------------------------------------------------------------------
+
+void SfxApplication::CreateDocState_Impl(SfxItemSet &rSet)
+{
+ DBG_MEMTEST();
+ const USHORT *pRanges = rSet.GetRanges();
+ DBG_ASSERT(pRanges, "Set ohne Bereich");
+ while(*pRanges)
+ {
+ for(USHORT nWhich = *pRanges++; nWhich <= *pRanges; ++nWhich)
+ {
+ switch(nWhich)
+ {
+ case SID_CURRENT_URL:
+ {
+ SfxViewFrame *pFrame = pViewFrame;
+ if ( pFrame )
+ {
+ // Bei internem InPlace den ContainerFrame nehmen
+ if ( pFrame->GetParentViewFrame_Impl() )
+ pFrame = pFrame->GetParentViewFrame_Impl();
+
+ // URL des aktiven Frames anzeigen; wenn es ein Frame
+ // in einem als Frameset implementierten Dokument ist, dann
+ // die URL des Framesets anzeigen ( Explorer, Mail ).
+ if ( pFrame->GetParentViewFrame() )
+ {
+ if ( pFrame->GetParentViewFrame()->GetViewShell()->
+ IsImplementedAsFrameset_Impl() )
+ pFrame = pFrame->GetParentViewFrame();
+ }
+
+ rSet.Put( SfxStringItem( nWhich, pFrame->GetActualPresentationURL_Impl() ) );
+ }
+ else
+ rSet.Put( SfxStringItem( nWhich, String() ) );
+ break;
+ }
+ }
+ }
+ ++pRanges;
+ }
+}
+
+
diff --git a/sfx2/source/appl/appquit.cxx b/sfx2/source/appl/appquit.cxx
new file mode 100644
index 000000000000..d4b2335653be
--- /dev/null
+++ b/sfx2/source/appl/appquit.cxx
@@ -0,0 +1,375 @@
+/*************************************************************************
+ *
+ * $RCSfile: appquit.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:27 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _BASMGR_HXX //autogen
+#include <basic/basmgr.hxx>
+#endif
+#ifndef _SB_SBSTAR_HXX //autogen
+#include <basic/sbstar.hxx>
+#endif
+
+#ifdef WIN
+#define _TL_LANG_SPECIAL
+#endif
+
+#ifndef _SVDDE_HXX //autogen
+#include <svtools/svdde.hxx>
+#endif
+#ifndef _MSGBOX_HXX //autogen
+#include <vcl/msgbox.hxx>
+#endif
+
+#ifndef _SFXENUMITEM_HXX
+#include <svtools/eitem.hxx>
+#endif
+
+#include <svtools/inethist.hxx>
+
+#pragma hdrstop
+
+#ifndef _UTL_CONFIGMGR_HXX_
+#include <unotools/configmgr.hxx>
+#endif
+
+#include "app.hrc"
+#include "app.hxx"
+#include "unoctitm.hxx"
+#include "appdata.hxx"
+#include "viewsh.hxx"
+#include "dispatch.hxx"
+#include "printer.hxx"
+#include "picklist.hxx"
+#include "plugobj.hxx"
+#include "arrdecl.hxx"
+#include "sfxresid.hxx"
+#include "newhdl.hxx"
+#include "cfgmgr.hxx"
+#include "accmgr.hxx"
+#include "event.hxx"
+#include "macrconf.hxx"
+#include "mnumgr.hxx"
+#include "imgmgr.hxx"
+#include "templdlg.hxx"
+#include "tbxconf.hxx"
+#include "saveopt.hxx"
+#include "msgpool.hxx"
+#include "frameobj.hxx"
+#include "docfile.hxx"
+#include "sfxtypes.hxx"
+#include "explorer.hxx"
+#include "appimp.hxx"
+#include "sfxlocal.hrc"
+#include "dataurl.hxx"
+#include "fcontnr.hxx"
+#include "nochaos.hxx"
+#include "ucbhelp.hxx"
+#include "appuno.hxx"
+#include "doctempl.hxx"
+#include "viewfrm.hxx"
+#include "bmkmenu.hxx"
+
+#ifndef PRODUCT
+DECLARE_LIST( SfxFrameWindowFactoryArray_Impl, SfxFrameWindowFactory* )
+SV_DECL_PTRARR(SfxInitLinkList, Link*, 2, 2);
+#endif
+
+//===================================================================
+/*
+void SfxApplication::Quit()
+{
+ QueryExit_Impl();
+}
+*/
+//--------------------------------------------------------------------
+BOOL SfxApplicationClass::QueryExit()
+{
+ const SfxBoolItem *pRet = (const SfxBoolItem*) SFX_APP()->GetAppDispatcher_Impl()->Execute( SID_QUITAPP, SFX_CALLMODE_SYNCHRON );
+ return pRet ? pRet->GetValue() : FALSE;
+}
+
+BOOL SfxApplication::QueryExit_Impl()
+
+/* [Beschreibung]
+
+ Liefert FALSE, wenn entweder ein modaler Dialog offen ist, oder
+ der Printer einer SfxViewShell einen laufenden Druckjob hat.
+
+ [Anmerkung]
+
+ Wenn diese aus StarView stammende virtuelle Methode vom Applikations-
+ entwickler "uberladen wird, mu"s diese SfxApplication::QueryExit() rufen
+ und falls diese FALSE zur"uckgibt, ebenfalls FALSE zur"uckgeben.
+*/
+
+{
+ StoreConfig();
+ pAppData_Impl->bInQuit = TRUE;
+ BOOL bQuit = TRUE;
+
+ // laufen noch Drucker?
+ BOOL bPrinting = FALSE;
+ for ( SfxViewShell *pViewSh = SfxViewShell::GetFirst();
+ !bPrinting && pViewSh;
+ pViewSh = SfxViewShell::GetNext(*pViewSh) )
+ {
+ SfxPrinter *pPrinter = pViewSh->GetPrinter();
+ bPrinting = pPrinter && pPrinter->IsPrinting();
+ }
+
+ if ( bPrinting )
+ {
+ // Benutzer fragen, ob abgebrochen werden soll
+ if ( RET_OK == QueryBox( 0, SfxResId( MSG_ISPRINTING_QUERYABORT ) ).Execute() )
+ {
+ // alle Jobs canceln
+ for ( SfxViewShell *pViewSh = SfxViewShell::GetFirst();
+ !bPrinting && pViewSh;
+ pViewSh = SfxViewShell::GetNext(*pViewSh) )
+ {
+ SfxPrinter *pPrinter = pViewSh->GetPrinter();
+ if ( pPrinter && pPrinter->IsPrinting() )
+ pPrinter->AbortJob();
+ }
+
+ // da das Canceln asynchron ist, Quit erstmal wieder verlassen
+ GetDispatcher().Execute( SID_QUITAPP, SFX_CALLMODE_ASYNCHRON );
+ DBG_TRACE( "QueryExit => FALSE (printing)" );
+ pAppData_Impl->bInQuit = FALSE;
+ return FALSE;
+ }
+ }
+
+ // alles canceln was zu canceln ist
+ GetCancelManager()->Cancel(TRUE);
+
+ // direkte Benutzung is beendet
+ if ( pAppData_Impl->bDirectAliveCount )
+ {
+ SvFactory::DecAliveCount();
+ pAppData_Impl->bDirectAliveCount = FALSE;
+ }
+
+ // vor Parasiten wie BasicIDESh etc. sch"utzen
+ pAppDispat->Flush();
+
+ // alle "normal" bearbeiteten Dokumente schlie\sen
+ MemCache_Impl &rCache = SfxPickList_Impl::Get()->GetMemCache();
+ rCache.ClearObjects();
+
+ SfxObjectShell *pLastDocSh = SfxObjectShell::GetFirst();
+ if ( bQuit )
+ {
+ // Jetzt zur Sicherheit auch hidden Frames abr"aumen
+ SfxViewFrame::CloseHiddenFrames_Impl();
+
+ pLastDocSh = SfxObjectShell::GetFirst();
+ // nur dann auch die externen beseitigen
+ SvFactory::CloseExtConObj( TRUE );
+
+ // Alle externen Verbindungen zu eigenen Objekten terminieren
+ SvFactory::CloseExtConObj( FALSE );
+ }
+
+ // will trotzdem noch jemand, den man nicht abschiessen kann, die App haben?
+ if ( !bQuit || SvFactory::GetAliveCount() )
+ {
+ // nicht wirklich beenden, nur minimieren
+ pAppData_Impl->bOLEResize = TRUE;
+ InfoBox aInfoBox( NULL, SfxResId(MSG_CANT_QUIT) );
+ aInfoBox.Execute();
+ pAppData_Impl->bInQuit = FALSE;
+ DBG_TRACE( "QueryExit => FALSE (in use)" );
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+//-------------------------------------------------------------------------
+
+void SfxApplication::Deinitialize()
+{
+ if ( bDowning )
+ return;
+
+ // Falls man nochmal beim Runterfahren in ein Reschedule l"auft
+ pAppData_Impl->EndListening( *pAppIniMgr );
+ pAppData_Impl->EndListening( *this );
+ if ( pAppData_Impl->pCancelMgr )
+ pAppData_Impl->EndListening( *pAppData_Impl->pCancelMgr );
+
+ // Falls noch mal zwischendurch eine Task ( BasicIDE! ) angelegt wurde ...
+ do
+ {
+ SfxObjectShell* pFirst = SfxObjectShell::GetFirst();
+ if ( pFirst )
+ pFirst->DoClose();
+ else
+ break;
+ }
+ while ( sal_True );
+
+ //!Wait();
+ StarBASIC::Stop();
+
+ // Pickliste (nicht in StoreConfig wegen letztem Doc)
+ SfxPickList_Impl::Get()->SavePicklist();
+
+ // ggf. BASIC speichern
+ if ( pImp->pBasicMgr && pImp->pBasicMgr->IsModified() )
+ SaveBasicManager();
+
+ bDowning = TRUE; // wegen Timer aus DecAliveCount und QueryExit
+ // free Windows and Controllers
+ DELETEZ( pAppData_Impl->pExplorer );
+
+ DELETEZ( pAppData_Impl->pTemplates );
+
+#ifdef TF_OFFLINEREADING
+ delete pAppData_Impl->pOfflineURLMgr;
+#endif
+ delete pAppData_Impl->pStopButtonTimer;
+#if SUPD>603
+ utl::ConfigManager::RemoveConfigManager();
+#endif
+//(dv) DELETEZ( pAppData_Impl->pAnchorJobList );
+ SvFactory::ClearDemandObjects();
+ DELETEZ(pImp->pTemplateDlg);
+ SetViewFrame(0);
+ bDowning = FALSE;
+ DBG_ASSERT( !SfxViewFrame::GetFirst(),
+ "existing SfxViewFrame after Execute" );
+ DBG_ASSERT( !SfxObjectShell::GetFirst(),
+ "existing SfxObjectShell after Execute" );
+ pAppDispat->Pop( *this, SFX_SHELL_POP_UNTIL );
+ pAppDispat->Flush();
+ bDowning = TRUE;
+ pAppDispat->DoDeactivate_Impl( TRUE );
+
+ INetURLHistory::Delete();
+
+ // call derived application-exit
+ bInExit = TRUE;
+ Exit();
+
+ // Controller u."a. freigeben
+ // dabei sollten auch restliche Komponenten ( Beamer! ) verschwinden
+ DELETEZ(pMenuMgr);
+ DELETEZ(pAcceleratorMgr);
+ DELETEZ( pImp->pBasicMgr );
+
+ SvFactory::ClearDemandObjects();
+ bInExit = FALSE;
+
+ DBG_ASSERT( pViewFrame == 0, "active foreign ViewFrame" );
+
+ DELETEZ(pInterfaces);
+ DELETEZ(pImageMgr);
+ DELETEZ(pOptions);
+
+ // free administration managers
+ DELETEZ(pImp->pAutoSaveTimer);
+ DELETEZ(pAppDispat);
+ DELETEZ(pImp->pSfxResManager);
+
+ DELETEZ( pAppData_Impl->pNewMenu );
+ DELETEZ( pAppData_Impl->pAutoPilotMenu );
+
+ // ab hier d"urfen keine SvObjects mehr existieren
+ DELETEX(pAppData_Impl->pMatcher);
+ DELETEX(pAppData_Impl->pDataLockBytesFactory);
+ DELETEX(pAppData_Impl->pImageLockBytesFactory);
+ DELETEX(pAppData_Impl->pSfxFrameObjectFactoryPtr);
+ DELETEX(pAppData_Impl->pSfxPluginObjectFactoryPtr);
+ SvFactory::DeInit();
+
+ SfxPickList_Impl::Delete();
+ delete GetDdeService();
+ delete pAppData_Impl->pLabelResMgr;
+
+#ifndef PRODUCT
+ DELETEX(pSlotPool);
+ SfxToolBoxConfig::Release();
+ DELETEX(pAppData_Impl->pEventConfig);
+ SfxMacroConfig::Release_Impl();
+ DELETEX(pAppData_Impl->pVerbs);
+ DELETEX(pAppData_Impl->pFactArr);
+ DELETEX(pAppData_Impl->pInitLinkList);
+#endif
+
+ pAppIniMgr->LeaveLock();
+ DELETEZ(pCfgMgr);
+
+#ifndef PRODUCT
+ DELETEX(pImp->pTbxCtrlFac);
+ DELETEX(pImp->pStbCtrlFac);
+ DELETEX(pImp->pMenuCtrlFac);
+ DELETEX(pImp->pEventHdl);
+ SfxNewHdl::Delete();
+ DELETEX(pImp->pAutoSaveTimer);
+ DELETEX(pImp->pViewFrames);
+ DELETEX(pImp->pViewShells);
+ DELETEX(pImp->pObjShells);
+#endif
+
+ NoChaos::ReleaseItemPool();
+ pAppData_Impl->pPool = NULL;
+}
diff --git a/sfx2/source/appl/appreg.cxx b/sfx2/source/appl/appreg.cxx
new file mode 100644
index 000000000000..61a010c7ef76
--- /dev/null
+++ b/sfx2/source/appl/appreg.cxx
@@ -0,0 +1,274 @@
+/*************************************************************************
+ *
+ * $RCSfile: appreg.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:27 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+ //==================================================================
+// class SfxApplication: Register...
+//
+// Copyright 2000 Sun Microsystems, Inc.
+// $Author: hr $ $Date: 2000-09-18 16:52:27 $ $Revision: 1.1.1.1 $
+// $Logfile: T:/sfx2/source/appl/appreg.cxv $ $Workfile: appreg.CXX $
+//------------------------------------------------------------------
+
+#ifndef _SV_CONFIG_HXX
+#include <vcl/config.hxx>
+#endif
+#ifndef _SFXINIMGR_HXX //autogen
+#include <svtools/iniman.hxx>
+#endif
+
+#pragma hdrstop
+
+#include "appdata.hxx"
+#include "arrdecl.hxx"
+#include "intfrm.hxx"
+#include "ipfrm.hxx"
+#include "fsetobsh.hxx"
+#include "fsetview.hxx"
+#include "tbxcust.hxx"
+#include "sfxhelp.hxx"
+#include "templdlg.hxx"
+#include "objmnctl.hxx"
+#include "inettbc.hxx"
+#include "stbitem.hxx"
+#include "tbedctrl.hxx"
+#include "navigat.hxx"
+#include "module.hxx"
+#include "topfrm.hxx"
+#include "appimp.hxx"
+#include "mailchildwin.hxx"
+#include "sfxsids.hrc"
+
+//===================================================================
+
+void SfxApplication::Registrations_Impl()
+{
+ // Interfaces
+ SfxApplication::RegisterInterface();
+ SfxModule::RegisterInterface();
+ SfxViewFrame::RegisterInterface();
+ SfxInternalFrame::RegisterInterface();
+ SfxInPlaceFrame::RegisterInterface();
+ SfxTopViewFrame::RegisterInterface();
+ SfxObjectShell::RegisterInterface();
+ SfxViewShell::RegisterInterface();
+// SfxFrameSetObjectShell::RegisterInterface();
+// SfxFrameSetViewShell::RegisterInterface();
+// SfxFrameSetView_Impl::RegisterInterface();
+// SfxFrameSetSourceView_Impl::RegisterInterface();
+
+ // ChildWindows
+ SfxNavigatorWrapper::RegisterChildWindow();
+ SfxToolboxCustomWindow::RegisterChildWindow();
+ SfxMailChildWinWrapper_Impl::RegisterChildWindow();
+
+/*! (pb) no help at this time
+ SfxHelpPIWrapper::RegisterChildWindow();
+ SfxHelpTipsWrapper::RegisterChildWindow();
+*/
+ SfxTemplateDialogWrapper::RegisterChildWindow(TRUE);
+
+ // Controller
+ SfxObjectVerbsControl::RegisterControl(SID_OBJECT);
+ SfxMenuControl::RegisterControl(SID_QUITAPP);
+ SfxMenuControl::RegisterControl(SID_SAVEASDOC);
+ SfxMenuControl::RegisterControl(SID_SAVEDOC);
+ SfxMenuControl::RegisterControl(SID_OPENDOC);
+ SfxMenuControl::RegisterControl(SID_CLOSEDOC);
+ SfxMenuControl::RegisterControl(SID_OBJECTMENU0);
+ SfxMenuControl::RegisterControl(SID_OBJECTMENU1);
+ SfxMenuControl::RegisterControl(SID_OBJECTMENU2);
+ SfxMenuControl::RegisterControl(SID_OBJECTMENU3);
+ SfxMenuControl::RegisterControl(SID_UNDO);
+ SfxMenuControl::RegisterControl(SID_REDO);
+ SfxMenuControl::RegisterControl(SID_REPEAT);
+ SfxMenuControl::RegisterControl(SID_MAIL_SENDDOC);
+ SfxAppMenuControl_Impl::RegisterControl( SID_NEWDOCDIRECT );
+ SfxAppMenuControl_Impl::RegisterControl( SID_BOOKMARKS );
+ SfxAppMenuControl_Impl::RegisterControl( SID_AUTOPILOTMENU );
+ SfxToolBoxControl::RegisterControl(SID_UNDO);
+ SfxToolBoxControl::RegisterControl(SID_REDO);
+ SfxToolBoxControl::RegisterControl(SID_REPEAT);
+ SfxURLToolBoxControl_Impl::RegisterControl(SID_OPENURL);
+ SfxCancelToolBoxControl_Impl::RegisterControl(SID_BROWSE_STOP);
+ SfxAppToolBoxControl_Impl::RegisterControl( SID_NEWDOCDIRECT );
+ SfxAppToolBoxControl_Impl::RegisterControl( SID_BOOKMARKS );
+ SfxAppToolBoxControl_Impl::RegisterControl( SID_AUTOPILOTMENU );
+ SfxDragToolBoxControl_Impl::RegisterControl( SID_TOPDOC );
+ SfxFrameEditToolBoxControl_Impl::RegisterControl(SID_FRAME_NAME);
+ SfxFrameEditToolBoxControl_Impl::RegisterControl(SID_FRAME_CONTENT);
+ SfxFrameSpacingControl_Impl::RegisterControl(SID_FRAMESPACING);
+ SfxHistoryToolBoxControl_Impl::RegisterControl( SID_BROWSE_FORWARD );
+ SfxHistoryToolBoxControl_Impl::RegisterControl( SID_BROWSE_BACKWARD );
+ SfxReloadToolBoxControl_Impl::RegisterControl( SID_RELOAD );
+};
+
+//--------------------------------------------------------------------
+
+void SfxApplication::RegisterToolBoxControl( SfxModule *pMod, SfxTbxCtrlFactory *pFact )
+{
+ if ( pMod )
+ {
+ pMod->RegisterToolBoxControl( pFact );
+ return;
+ }
+
+#ifdef DBG_UTIL
+ for ( USHORT n=0; n<pImp->pTbxCtrlFac->Count(); n++ )
+ {
+ SfxTbxCtrlFactory *pF = (*pImp->pTbxCtrlFac)[n];
+ if ( pF->nTypeId && pF->nTypeId == pFact->nTypeId &&
+ (pF->nSlotId == pFact->nSlotId || pF->nSlotId == 0) )
+ {
+ DBG_WARNING("TbxController-Registrierung ist nicht eindeutig!");
+ }
+ }
+#endif
+
+ pImp->pTbxCtrlFac->C40_INSERT( SfxTbxCtrlFactory, pFact, pImp->pTbxCtrlFac->Count() );
+}
+
+//--------------------------------------------------------------------
+
+void SfxApplication::RegisterStatusBarControl( SfxModule *pMod, SfxStbCtrlFactory *pFact )
+{
+ if ( pMod )
+ {
+ pMod->RegisterStatusBarControl( pFact );
+ return;
+ }
+
+#ifdef DBG_UTIL
+ for ( USHORT n=0; n<pImp->pStbCtrlFac->Count(); n++ )
+ {
+ SfxStbCtrlFactory *pF = (*pImp->pStbCtrlFac)[n];
+ if ( pF->nTypeId && pF->nTypeId == pFact->nTypeId &&
+ (pF->nSlotId == pFact->nSlotId || pF->nSlotId == 0) )
+ {
+ DBG_WARNING("StbController-Registrierung ist nicht eindeutig!");
+ }
+ }
+#endif
+
+ pImp->pStbCtrlFac->C40_INSERT( SfxStbCtrlFactory, pFact, pImp->pStbCtrlFac->Count() );
+}
+
+//--------------------------------------------------------------------
+
+void SfxApplication::RegisterMenuControl( SfxModule *pMod, SfxMenuCtrlFactory *pFact )
+{
+ if ( pMod )
+ {
+ pMod->RegisterMenuControl( pFact );
+ return;
+ }
+
+#ifdef DBG_UTIL
+ for ( USHORT n=0; n<pImp->pMenuCtrlFac->Count(); n++ )
+ {
+ SfxMenuCtrlFactory *pF = (*pImp->pMenuCtrlFac)[n];
+ if ( pF->nTypeId && pF->nTypeId == pFact->nTypeId &&
+ (pF->nSlotId == pFact->nSlotId || pF->nSlotId == 0) )
+ {
+ DBG_WARNING("MenuController-Registrierung ist nicht eindeutig!");
+ }
+ }
+#endif
+
+ pImp->pMenuCtrlFac->C40_INSERT( SfxMenuCtrlFactory, pFact, pImp->pMenuCtrlFac->Count() );
+}
+
+//--------------------------------------------------------------------
+
+void SfxApplication::SetInterfaceByIdImpl( SfxInterfaceId eId,
+ SfxInterface* pIF )
+{
+ if ( (USHORT) eId >= nInterfaces )
+ {
+ USHORT nNewInterfaces = eId + 4;
+ SfxInterface **pNewInterfaces = new SfxInterface*[nNewInterfaces];
+ memcpy( pNewInterfaces, pInterfaces,
+ sizeof(SfxInterface*) * nInterfaces );
+ memset( pNewInterfaces+nInterfaces, 0,
+ sizeof(SfxInterface*) * (nNewInterfaces-nInterfaces) );
+ delete pInterfaces;
+ nInterfaces = nNewInterfaces;
+ pInterfaces = pNewInterfaces;
+ }
+
+ DBG_ASSERT( 0 == pInterfaces[ USHORT(eId) ],
+ "interface registered more than once" );
+#if defined(DBG_UTIL) && defined(MSC)
+ USHORT nId = USHORT(eId);
+ if ( 0 != pInterfaces[ nId ] )
+ {
+ ByteString aMsg( pIF->GetClassName() );
+ aMsg += " registers over ";
+ aMsg += pInterfaces[ nId ]->GetClassName();
+ DbgTrace( aMsg.GetBuffer() );
+ }
+#endif
+
+ pInterfaces[ USHORT(eId) ] = pIF;
+}
+
+const SfxObjectFactory& SfxApplication::GetDefaultFactory() const
+{
+ return SfxObjectFactory::GetDefaultFactory();
+}
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
new file mode 100644
index 000000000000..a21c70ec1fb0
--- /dev/null
+++ b/sfx2/source/appl/appserv.cxx
@@ -0,0 +1,1066 @@
+/*************************************************************************
+ *
+ * $RCSfile: appserv.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:27 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _COM_SUN_STAR_UNO_REFERENCE_H_
+#include <com/sun/star/uno/Reference.h>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XTASK_HPP_
+#include <com/sun/star/frame/XTask.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XDESKTOP_HPP_
+#include <com/sun/star/frame/XDesktop.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XTASKSSUPPLIER_HPP_
+#include <com/sun/star/frame/XTasksSupplier.hpp>
+#endif
+#ifndef _UNOTOOLS_PROCESSFACTORY_HXX
+#include <unotools/processfactory.hxx>
+#endif
+
+#ifndef _SV_CONFIG_HXX
+#include <vcl/config.hxx>
+#endif
+#ifndef _SV_MSGBOX_HXX
+#include <vcl/msgbox.hxx>
+#endif
+#ifndef _SV_SYSTEM_HXX
+#include <vcl/system.hxx>
+#endif
+#ifndef _SFXCANCEL_HXX //autogen
+#include <svtools/cancel.hxx>
+#endif
+#ifndef _SFXINTITEM_HXX //autogen
+#include <svtools/intitem.hxx>
+#endif
+#ifndef _SFXENUMITEM_HXX //autogen
+#include <svtools/eitem.hxx>
+#endif
+#ifndef _SFXSTRITEM_HXX //autogen
+#include <svtools/stritem.hxx>
+#endif
+#ifndef _SVSTOR_HXX //autogen
+#include <so3/svstor.hxx>
+#endif
+#ifndef _SB_SBSTAR_HXX //autogen
+#include <basic/sbstar.hxx>
+#endif
+#ifndef _BASMGR_HXX //autogen
+#include <basic/basmgr.hxx>
+#endif
+#ifndef _BASRDLL_HXX
+#include <basic/basrdll.hxx>
+#endif
+#ifndef _SFXECODE_HXX
+#include <svtools/sfxecode.hxx>
+#endif
+#ifndef _EHDL_HXX
+#include <svtools/ehdl.hxx>
+#endif
+
+#pragma hdrstop
+
+#include "appimp.hxx"
+#include "referers.hxx"
+#include "app.hxx"
+#include "request.hxx"
+#include "dispatch.hxx"
+#include "bindings.hxx"
+#include "msg.hxx"
+#include "objface.hxx"
+#include "objitem.hxx"
+#include "objsh.hxx"
+#include "hintpost.hxx"
+#include "stbmgr.hxx"
+#include "viewsh.hxx"
+#include "docfac.hxx"
+#include "docfile.hxx"
+#include "docfilt.hxx"
+#include "docvor.hxx"
+#include "cfg.hxx"
+#include "new.hxx"
+#include "docinf.hxx"
+#include "templdlg.hxx"
+#include "inimgr.hxx"
+#include "sfxtypes.hxx"
+#include "sfxbasic.hxx"
+#include "tabdlg.hxx"
+#include "arrdecl.hxx"
+#include "fltfnc.hxx"
+#include "iodlg.hxx"
+#include "picklist.hxx"
+#include "sfx.hrc"
+#include "app.hrc"
+#include "tbxcust.hxx"
+#include "passwd.hxx"
+#include "interno.hxx"
+#include "ipenv.hxx"
+#include "sfxresid.hxx"
+#include "arrdecl.hxx"
+#include "childwin.hxx"
+#include "appdata.hxx"
+#include "tbxconf.hxx"
+#include "macrconf.hxx"
+#include "minfitem.hxx"
+#include "event.hxx"
+#include "cfgmgr.hxx"
+#include "saveopt.hxx"
+#include "accmgr.hxx"
+#include "mnumgr.hxx"
+#include "intfrm.hxx"
+#include "urlframe.hxx"
+#include "module.hxx"
+#include "topfrm.hxx"
+
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::frame;
+using namespace ::com::sun::star::container;
+
+#define SFX_KEY_MULTIQUICKSEARCH "ExplorerMultiQuickSearch"
+
+//-------------------------------------------------------------------------
+long QuitAgain_Impl( void* pObj, void* pArg )
+{
+ SfxApplication* pApp = (SfxApplication*)pObj;
+ Timer* pTimer = (Timer*)pArg;
+ delete pTimer;
+ pApp->GetDispatcher().Execute( SID_QUITAPP, SFX_CALLMODE_ASYNCHRON );
+ return 0;
+}
+
+struct ApplicationType
+{
+ String aPathName;
+ String aParams;
+ String aDomainName;
+};
+
+BOOL SfxApplication::InitOfficeAppType_Impl( USHORT nAppId, ApplicationType& rType, BOOL bEmbed )
+{
+ if ( nAppId < SID_START_BEGIN || nAppId > SID_START_END )
+ return FALSE;
+ // App in Config suchen
+ String aAppName = String( SfxResId( nAppId ) );
+ SfxIniManager* pIni = SFX_INIMANAGER();
+ DBG_ASSERT( pIni, "Kein IniManager?!" );
+ String aFullName;
+ while ( pIni && !aFullName.Len() )
+ {
+ aFullName = pIni->ReadKey( DEFINE_CONST_UNICODE("OfficeApplications"), aAppName );
+ if ( !aFullName.Len() )
+ pIni = pIni->GetSubManager();
+ }
+
+ if ( !aFullName.Len() )
+ {
+ // not found, but new try
+ INetURLObject aTryObj( Application::GetAppFileName(), INET_PROT_FILE );
+ aTryObj.setBase( aAppName );
+ aFullName = aTryObj.PathToFileName();
+ }
+
+ rType.aPathName = aFullName;
+ if ( bEmbed )
+ rType.aParams = DEFINE_CONST_UNICODE( "/embedding" );
+ INetURLObject aObj( aFullName, INET_PROT_FILE );
+ rType.aDomainName = aObj.getBase();
+ return TRUE;
+}
+
+FASTBOOL SfxApplication::PostOfficeAppEvent( USHORT nAppId, const String& rEvent, const String& rParam )
+{
+
+//(mba)/task SfxWaitCursor aWait;
+
+ ApplicationType aType;
+ if( !InitOfficeAppType_Impl( nAppId, aType ) )
+ return FALSE;
+
+ // Event posten, ggf. App mit . auf Kommandozeile starten
+ ApplicationAddress aAppAdr;
+ String aAppParam( rParam.Len() ? DEFINE_CONST_UNICODE(".") : String() );
+ SvFactory::IncAliveCount(); // Quit verhindern
+ BOOL bOk = FALSE; //! (pb) OldSV: Application::PostAppEvent( aType.aPathName, aAppAdr, rEvent, rParam, TRUE, &aAppParam );
+ SvFactory::DecAliveCount();
+ return bOk;
+}
+
+void SfxApplication::BasicLibExec_Impl( SfxRequest &rReq, BasicManager *pMgr )
+{
+ // Zuerst den LibName holen
+ BOOL bRet = FALSE;
+ USHORT nItemId = rReq.GetSlot();
+ SFX_REQUEST_ARG( rReq, pNameItem, SfxStringItem, nItemId == SID_ADD_LIBRARY ? SID_FILE_NAME : rReq.GetSlot(), FALSE );
+
+ String aFileName; // F"ur AddLibrary
+ String aLibName;
+ if ( pNameItem )
+ {
+ if ( nItemId == SID_ADD_LIBRARY )
+ {
+ // Bei AddLibrary ist der LibName optional, er kann mit dem
+ // FileName identisch sein
+ INetURLObject aObj( pNameItem->GetValue(), INET_PROT_FILE );
+ aFileName = aObj.GetMainURL();
+
+ // Nach optionalem LibName suchen
+ SFX_REQUEST_ARG( rReq, pItem, SfxStringItem, SID_LOAD_LIBRARY, FALSE );
+ if ( pItem )
+ aLibName = pItem->GetValue();
+ else
+ aLibName = aObj.GetBase();
+ }
+ else
+ aLibName = pNameItem->GetValue();
+ }
+
+ if ( aLibName.Len() )
+ {
+ // Die Library zum "ubergebenen Namen suchen
+ const International &rInter = Application::GetAppInternational();
+ USHORT nLibCount = pMgr->GetLibCount();
+ StarBASIC *pLib = NULL;
+ USHORT nLib;
+ for ( nLib = 0; nLib < nLibCount; ++nLib )
+ {
+ if ( COMPARE_EQUAL == rInter.Compare( pMgr->GetLibName( nLib ), aLibName, INTN_COMPARE_IGNORECASE ) )
+ {
+ pLib = pMgr->GetLib( nLib );
+ break;
+ }
+ }
+
+ switch ( rReq.GetSlot() )
+ {
+ case SID_LOAD_LIBRARY:
+ {
+ // Wenn eine Library gefunden wurde, die noch nicht
+ // geladen ist
+ if( nLib<nLibCount && !pLib )
+ bRet = pMgr->LoadLib( nLib );
+ break;
+ }
+
+ case SID_UNLOAD_LIBRARY:
+ {
+ // Wenn eine Library gefunden wurde, die geladen ist
+ if( pLib )
+ bRet = pMgr->UnloadLib( nLib );
+ break;
+ }
+
+ case SID_REMOVE_LIBRARY:
+ {
+ // Wenn eine Library gefunden wurde
+ // Lib wird nur physikalisch gel"oscht, wenn sie im
+ // Storage des BasicMgr liegt
+ if ( nLib<nLibCount )
+ bRet = pMgr->RemoveLib( nLib,
+ !pMgr->IsReference(nLib) && !pMgr->IsExtern(nLib) );
+ break;
+ }
+
+ case SID_ADD_LIBRARY:
+ {
+ // Library laden
+ SvStorageRef aStor = new SvStorage( aFileName, STREAM_STD_READ );
+ if ( aStor->GetError() )
+ break;
+
+ // Weitere Parameter: Art des Ladens der Library
+ // ( einbinden, per Referenz oder extern ) und Replace
+ BOOL bReplace = TRUE;
+ BOOL bReference = FALSE;
+ BOOL bExternal = FALSE;
+
+ SFX_REQUEST_ARG( rReq, pRefItem, SfxUInt16Item, SID_ADD_LIBRARY, FALSE );
+ if ( pRefItem )
+ {
+ bReference = pRefItem->GetValue() == SFX_BASICLIB_ADDMODE_REFERENCE;
+ bExternal = pRefItem->GetValue() == SFX_BASICLIB_ADDMODE_EXTERNAL;
+ if ( pMgr != GetBasicManager() )
+ bExternal = FALSE;
+ }
+
+ SFX_REQUEST_ARG( rReq, pReplaceItem, SfxBoolItem, SID_REMOVE_LIBRARY, FALSE );
+ if ( pReplaceItem )
+ bReplace = pReplaceItem->GetValue();
+
+ if ( nLib<nLibCount )
+ {
+ // Es gibt schon eine Library dieses Namens
+ if ( bReplace && ( pMgr->GetLib( nLib ) == pMgr->GetStdLib() ) )
+ // die Standard-Lib kann nicht ersetzt werden
+ break;
+
+ if ( bReplace )
+ // Library soll eine vorhandene ersetzen
+ pMgr->RemoveLib( nLib );
+
+ else if ( bReference )
+ // Referenz nicht moeglich, wenn Lib mit
+ // Namen schon existiert, ausser bei Replace.
+ break;
+ }
+
+ // Library einf"ugen
+ StarBASIC *pLib = pMgr->AddLib( *aStor, aLibName, bReference );
+ if ( pLib )
+ {
+ nLib = pMgr->GetLibId( pLib );
+
+ // Einf"ugen extern
+ if ( bExternal )
+ {
+ INetURLObject aAppBasic( pMgr->GetStorageName(), INET_PROT_FILE );
+ String aExt = aAppBasic.GetExtension();
+
+ // Optionaler Parameter fuer Name der sbl-Datei
+ String aDest;
+ SFX_REQUEST_ARG( rReq, pDestItem, SfxStringItem, SID_DOCTITLE, FALSE );
+ if ( pDestItem && pDestItem->GetValue().Len() )
+ aDest = pDestItem->GetValue();
+ else
+ {
+ INetURLObject aOld( aFileName, INET_PROT_FILE );
+ aDest = aOld.GetName();
+ }
+
+ INetURLObject aNew( SFX_INIMANAGER()->Get( SFX_KEY_BASIC_PATH ).GetToken( 0, ';' ), INET_PROT_FILE );
+ aNew.SetExtension( aExt );
+ pMgr->SetLibStorageName( nLib, aNew.GetFull() );
+ SaveBasicManager();
+ }
+
+ bRet = TRUE;
+ }
+ }
+ }
+ }
+
+ rReq.SetReturnValue( SfxBoolItem( 0, bRet ) );
+}
+
+void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
+{
+ DBG_MEMTEST();
+ FASTBOOL bDone = FALSE;
+ switch ( rReq.GetSlot() )
+ {
+ case SID_LOAD_LIBRARY:
+ case SID_UNLOAD_LIBRARY:
+ case SID_REMOVE_LIBRARY:
+ case SID_ADD_LIBRARY:
+ {
+ // Diese Funktionen sind nur f"ur Aufrufe aus dem Basic gedacht
+ if ( IsInBasicCall() )
+ BasicLibExec_Impl( rReq, GetBasicManager() );
+ break;
+ }
+
+ case SID_NEXTWINDOW :
+ case SID_PREVWINDOW :
+ {
+ SfxWorkWindow *pWork = GetWorkWindow_Impl();
+ pWork->ActivateNextChild_Impl( rReq.GetSlot() == SID_NEXTWINDOW ? TRUE :FALSE );
+ rReq.Done();
+ break;
+ }
+
+ case SID_SETOPTIONS:
+ {
+ if( rReq.GetArgs() )
+ SetOptions_Impl( *rReq.GetArgs() );
+ break;
+ }
+
+ case SID_QUITAPP:
+ case SID_EXITANDRETURN:
+ {
+ if ( pAppData_Impl->bInQuit )
+ return;
+
+ // aus verschachtelten Requests nach 100ms nochmal probieren
+ if( Application::GetDispatchLevel() > 1 )
+ {
+ Timer *pTimer = new Timer;
+ pTimer->SetTimeout( 100 );
+ pTimer->SetTimeoutHdl( Link( this, QuitAgain_Impl ) );
+ pTimer->Start();
+ DBG_TRACE1( "QueryExit => FALSE (DispatchLevel == %u)", Application::GetDispatchLevel() );
+ return;
+ }
+
+ // prepare documents for closing
+ Reference < XDesktop > xDesktop ( ::utl::getProcessServiceFactory()->createInstance( DEFINE_CONST_UNICODE("com.sun.star.frame.Desktop") ), UNO_QUERY );
+ BOOL bQuit = xDesktop->terminate();
+
+ // Returnwert setzten, ggf. terminieren
+ rReq.SetReturnValue(SfxBoolItem(rReq.GetSlot(), bQuit));
+ return;
+ }
+
+ case SID_PICK1:
+ case SID_PICK2:
+ case SID_PICK3:
+ case SID_PICK4:
+ case SID_PICK5:
+ case SID_PICK6:
+ case SID_PICK7:
+ case SID_PICK8:
+ case SID_PICK9:
+ {
+ USHORT nPickNo = rReq.GetSlot()-SID_PICK1;
+ if ( nPickNo >= SfxPickList_Impl::Get()->GetAllowedMenuSize() )
+ break;
+
+ rReq.SetSlot( SID_OPENDOC );
+ SfxPickEntry_Impl *pPick = SfxPickList_Impl::Get()->GetMenuPickEntry( nPickNo );
+ rReq.AppendItem(SfxStringItem(SID_FILE_NAME, pPick->aName ));
+ rReq.AppendItem( SfxStringItem( SID_REFERER, DEFINE_CONST_UNICODE(SFX_REFERER_USER) ) );
+ rReq.AppendItem( SfxStringItem( SID_TARGETNAME, DEFINE_CONST_UNICODE("_blank") ) );
+ rReq.AppendItem( SfxBoolItem( SID_DOC_READONLY, FALSE ) );
+ String aFilter(pPick->aFilter);
+ USHORT nPos=aFilter.Search('|');
+ if( nPos != STRING_NOTFOUND )
+ {
+ String aOptions(aFilter.Copy( nPos ).GetBuffer()+1);
+ aFilter.Erase( nPos );
+ rReq.AppendItem(
+ SfxStringItem(SID_FILE_FILTEROPTIONS, aOptions));
+ }
+
+ rReq.AppendItem(SfxStringItem(SID_FILTER_NAME, aFilter));
+ ExecuteSlot( rReq );
+ return;
+ }
+
+ case SID_CONFIG:
+ case SID_TOOLBOXOPTIONS:
+ case SID_CONFIGSTATUSBAR:
+ case SID_CONFIGMENU:
+ case SID_CONFIGACCEL:
+ case SID_CONFIGEVENT:
+ {
+ Window *pParent = GetTopWindow();
+ const SfxStringItem *pStringItem=0;
+ const SfxUInt16Item *pItem=0;
+ USHORT nId=0;
+
+ // Versuche, einen "ubergebenen ConfigNamen zu holen
+ const SfxItemSet *pArgs = rReq.GetArgs();
+ if ( pArgs && pArgs->GetItemState(SID_CFGFILE) >= SFX_ITEM_AVAILABLE )
+ {
+ const SfxPoolItem *pSfxItem = &pArgs->Get(SID_CFGFILE);
+ DBG_ASSERT(pSfxItem->ISA(SfxStringItem),"Fehlerhafte Parameter!");
+ pStringItem = (const SfxStringItem*) pSfxItem;
+
+ }
+
+ // Versuche, eine "ubergebene ConfigID zu holen
+ if (pArgs && pArgs->GetItemState(SID_CONFIGITEMID) >= SFX_ITEM_AVAILABLE)
+ {
+ const SfxPoolItem *pSfxItem = &pArgs->Get(SID_CONFIGITEMID);
+ DBG_ASSERT(pSfxItem->ISA(SfxUInt16Item),"Fehlerhafte Parameter!");
+ pItem = (const SfxUInt16Item*) pSfxItem;
+ nId = pItem->GetValue();
+ bDone = TRUE;
+ }
+ else
+ {
+ switch ( rReq.GetSlot() )
+ {
+ case SID_CONFIGSTATUSBAR:
+ if ( GetStatusBarManager() )
+ nId = GetStatusBarManager()->GetType();
+ break;
+ case SID_CONFIGMENU:
+ nId = GetMenuBarManager()->GetType();
+ break;
+ case SID_CONFIGACCEL:
+ nId = GetAcceleratorManager()->GetType();
+ break;
+ case SID_TOOLBOXOPTIONS:
+ nId = SfxToolBoxConfig::GetOrCreate()->GetType();
+ break;
+ default:
+ break;
+ }
+ }
+
+ if ( pStringItem && nId )
+ {
+ // Ausf"uhren ohne Dialog
+ SfxConfigManager *pCfgMgr = new SfxConfigManager(pStringItem->GetValue());
+ pAppData_Impl->pAppCfg->CopyItem(nId, pCfgMgr);
+ GetDispatcher().Update_Impl(TRUE);
+ if ( nId == GetMenuBarManager()->GetType() || nId == SID_CONFIG )
+ GetMenuBarManager()->ReconfigureObjectMenus();
+ }
+ else
+ {
+ SfxItemSet aSet( GetPool(), SID_ATTR_MACROITEM, SID_ATTR_MACROITEM );
+ SfxConfigDialog *pDlg = new SfxConfigDialog( pParent, &aSet );
+
+ switch ( rReq.GetSlot() )
+ {
+ case SID_CONFIG:
+ {
+ // Soll ein Macro vorselektiert werden ?
+ if (pArgs && pArgs->GetItemState(SID_MACROINFO) >= SFX_ITEM_AVAILABLE)
+ {
+ const SfxPoolItem *pSfxItem = &pArgs->Get(SID_MACROINFO);
+ DBG_ASSERT(pSfxItem->ISA(SfxMacroInfoItem),"Fehlerhafte Parameter!");
+ const SfxMacroInfoItem *pMItem = (const SfxMacroInfoItem*) pSfxItem;
+ if (pMItem)
+ pDlg->ActivateMacroConfig(pMItem);
+ }
+ break;
+ }
+
+ case SID_TOOLBOXOPTIONS:
+ {
+ if ( nId )
+ // Es soll eine Objektleiste vorselektiert werden
+ pDlg->ActivateToolBoxConfig(nId);
+ }
+ }
+
+ const short nRet = pDlg->Execute();
+ GetDispatcher().Update_Impl(TRUE);
+
+ if (nRet)
+ bDone = TRUE;
+
+ if (nRet == 3)
+ {
+ pViewFrame->SetChildWindow( SfxToolboxCustomWindow::GetChildWindowId(), TRUE );
+ Invalidate(rReq.GetSlot());
+ }
+ delete pDlg;
+ }
+ break;
+ }
+
+ case SID_SAVECONFIG:
+ {
+ SfxConfigManager *pMgr = 0;
+ BOOL bCreated = TRUE;
+ String aCfgName;
+
+ // Versuche, einen "ubergebenen ConfigNamen zu holen
+ const SfxItemSet *pArgs = rReq.GetArgs();
+ if ( !rReq.IsAPI() || pArgs )
+ {
+ if ( !pArgs )
+ {
+ // Kein Parameter, kein API, also Dialog
+ aCfgName = SfxConfigDialog::FileDialog_Impl(
+ GetTopWindow(), WB_SAVEAS | WB_STDMODAL | WB_3DLOOK, String() );
+ }
+ else
+ {
+ // Name "uber Parameter
+ const SfxPoolItem *pSfxItem = &pArgs->Get( SID_CFGFILE );
+ DBG_ASSERT( pSfxItem && pSfxItem->ISA(SfxStringItem), "Fehlerhafte Parameter!" );
+ const SfxStringItem *pStringItem = (const SfxStringItem*) pSfxItem;
+ if ( pStringItem )
+ {
+ aCfgName = pStringItem->GetValue();
+ INetURLObject aObj( pStringItem->GetValue(), INET_PROT_FILE );
+ if ( aObj.HasError() )
+ {
+ // Wenn relativ, ConfigDir verwenden
+ aObj.SetSmartURL( SFX_INIMANAGER()->Get( SFX_KEY_USERCONFIG_PATH) );
+ aObj.insertName( pStringItem->GetValue() );
+ aCfgName = aObj.PathToFileName();
+ }
+ }
+ }
+ }
+ else
+ {
+ pAppData_Impl->pAppCfg->Backup();
+ }
+
+ if ( aCfgName.Len() )
+ {
+ // ConfigManager anlegen
+//(mba)/task SfxWaitCursor aWait;
+ BOOL bCreated = FALSE;
+ pMgr = SfxConfigDialog::MakeCfgMgr_Impl( aCfgName, bCreated );
+
+ // Wenn es nicht der globale ConfigManager ist, kopieren
+ if ( pMgr && pAppData_Impl->pAppCfg != pMgr )
+ pMgr->CopyItems( pAppData_Impl->pAppCfg );
+
+ // Dann abspeichern
+ if ( !pMgr->SaveConfig() )
+ HandleConfigError_Impl( (USHORT)pMgr->GetErrorCode() );
+ if ( bCreated )
+ delete pMgr;
+ }
+
+ bDone = TRUE;
+ break;
+ }
+
+ case SID_LOADCONFIG:
+ {
+ SfxConfigManager *pMgr = 0;
+ BOOL bCreated = TRUE;
+ String aCfgName;
+
+ // Versuche, einen "ubergebenen ConfigNamen zu holen
+ const SfxItemSet *pArgs = rReq.GetArgs();
+ if ( !rReq.IsAPI() || pArgs )
+ {
+ if ( !pArgs )
+ {
+ // Kein Parameter, kein API, also Dialog
+ aCfgName = SfxConfigDialog::FileDialog_Impl(
+ GetTopWindow(), WB_OPEN | WB_STDMODAL | WB_3DLOOK, String() );
+ }
+ else
+ {
+ // Name "uber Parameter
+ const SfxPoolItem *pSfxItem = &pArgs->Get( SID_CFGFILE );
+ DBG_ASSERT( pSfxItem && pSfxItem->ISA(SfxStringItem), "Fehlerhafte Parameter!" );
+ const SfxStringItem *pStringItem = (const SfxStringItem*) pSfxItem;
+ if ( pStringItem )
+ {
+ aCfgName = pStringItem->GetValue();
+ INetURLObject aObj( pStringItem->GetValue(), INET_PROT_FILE );
+ if ( aObj.HasError() )
+ {
+ // Wenn relativ, ConfigDir verwenden
+ aObj.SetSmartURL( SFX_INIMANAGER()->Get( SFX_KEY_USERCONFIG_PATH) );
+ aObj.insertName( pStringItem->GetValue() );
+ aCfgName = aObj.PathToFileName();
+ }
+ }
+ }
+ }
+ else
+ {
+ // Aus dem aktuellen Backup laden
+ pAppData_Impl->pAppCfg->Restore();
+ }
+
+ if ( aCfgName.Len() )
+ {
+ // ConfigManager anlegen
+//(mba)/task SfxWaitCursor aWait;
+ BOOL bCreated = FALSE;
+ pMgr = SfxConfigDialog::MakeCfgMgr_Impl( aCfgName, bCreated );
+
+ // Wenn es nicht der globale ConfigManager ist, kopieren
+ if ( pMgr && pAppData_Impl->pAppCfg != pMgr )
+ pAppData_Impl->pAppCfg->CopyItems( pMgr );
+
+ if ( bCreated )
+ delete pMgr;
+ }
+
+ GetDispatcher().Update_Impl(TRUE);
+ bDone = TRUE;
+ break;
+ }
+
+ case SID_CLOSEDOCS:
+ case SID_CLOSEWINS:
+ {
+
+ Reference < XTasksSupplier > xDesktop ( ::utl::getProcessServiceFactory()->createInstance( DEFINE_CONST_UNICODE("com.sun.star.frame.Desktop") ), UNO_QUERY );
+ Reference< XIndexAccess > xTasks( xDesktop->getTasks(), UNO_QUERY );
+ if ( !xTasks.is() )
+ break;
+
+ sal_Int32 n=0;
+ do
+ {
+ if ( xTasks->getCount() <= n )
+ break;
+
+ Any aAny = xTasks->getByIndex(n);
+ Reference < XTask > xTask;
+ aAny >>= xTask;
+ if ( !xTask->close() )
+ n++;
+ }
+ while( sal_True );
+
+ BOOL bOk = ( n == 0);
+ rReq.SetReturnValue( SfxBoolItem( 0, bOk ) );
+ bDone = TRUE;
+ break;
+ }
+
+ case SID_SAVEDOCS:
+ {
+ BOOL bOK = TRUE;
+ BOOL bDone = TRUE;
+ for ( SfxObjectShell *pObjSh = SfxObjectShell::GetFirst();
+ pObjSh;
+ pObjSh = SfxObjectShell::GetNext( *pObjSh ) )
+ {
+ SfxRequest aReq( SID_SAVEDOC, 0, pObjSh->GetPool() );
+ if ( pObjSh->IsModified() )
+ {
+ pObjSh->ExecuteSlot( aReq );
+ SfxBoolItem *pItem = PTR_CAST( SfxBoolItem, aReq.GetReturnValue() );
+ bDone = aReq.IsDone();
+ if ( !pItem || !pItem->GetValue() )
+ bOK = FALSE;
+ }
+ }
+
+ rReq.SetReturnValue( SfxBoolItem( 0, bOK ) );
+ rReq.Done();
+ break;
+ }
+
+/*! (pb) what about help?
+ case SID_HELPINDEX:
+ {
+ Help* pHelp = Application::GetHelp();
+ if ( pHelp )
+ {
+ pHelp->Start( HELP_INDEX );
+ bDone = TRUE;
+ }
+ break;
+ }
+
+ case SID_EXTENDEDHELP:
+ {
+ // Parameter auswerten
+ SFX_REQUEST_ARG(rReq, pOnItem, SfxBoolItem, SID_EXTENDEDHELP, FALSE);
+ FASTBOOL bOn = pOnItem
+ ? ((SfxBoolItem*)pOnItem)->GetValue()
+ : !Help::IsExtHelpActive();
+
+ // ausf"uhren
+ if ( bOn )
+ Help::StartExtHelp();
+ else
+ Help::EndExtHelp();
+ bDone = TRUE;
+
+ // ggf. recorden
+ if ( !rReq.IsAPI() )
+ rReq.AppendItem( SfxBoolItem( SID_EXTENDEDHELP, bOn) );
+ break;
+ }
+
+ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ case SID_HELPBALLOONS:
+ {
+ // Parameter auswerten
+ SFX_REQUEST_ARG(rReq, pOnItem, SfxBoolItem, SID_HELPBALLOONS, FALSE);
+ FASTBOOL bOn = pOnItem
+ ? ((SfxBoolItem*)pOnItem)->GetValue()
+ : !Help::IsBalloonHelpEnabled();
+
+ // ausf"uhren
+ if ( bOn )
+ Help::EnableBalloonHelp();
+ else
+ Help::DisableBalloonHelp();
+ GetOptions().SetHelpBalloons(bOn);
+ bDone = TRUE;
+
+ // ggf. recorden
+ if ( !rReq.IsAPI() )
+ rReq.AppendItem( SfxBoolItem( SID_HELPBALLOONS, bOn) );
+ break;
+ }
+
+ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ case SID_HELPTIPS:
+ {
+ // Parameter aus werten
+ SFX_REQUEST_ARG(rReq, pOnItem, SfxBoolItem, SID_HELPTIPS, FALSE);
+ FASTBOOL bOn = pOnItem
+ ? ((SfxBoolItem*)pOnItem)->GetValue()
+ : !Help::IsQuickHelpEnabled();
+
+ // ausf"uhren
+ if ( bOn )
+ Help::EnableQuickHelp();
+ else
+ Help::DisableQuickHelp();
+ GetOptions().SetHelpTips(bOn);
+ Invalidate(SID_HELPTIPS);
+ bDone = TRUE;
+
+ // ggf. recorden
+ if ( !rReq.IsAPI() )
+ rReq.AppendItem( SfxBoolItem( SID_HELPTIPS, bOn) );
+ break;
+ }
+
+ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ case SID_HELPONHELP:
+ {
+ Help* pHelp = Application::GetHelp();
+ if ( pHelp )
+ {
+ pHelp->Start( HELP_HELPONHELP );
+ bDone = TRUE;
+ }
+ break;
+ }
+(pb) what about help? */
+
+ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ case SID_ABOUT:
+ {
+ ModalDialog *pDlg = CreateAboutDialog();
+ pDlg->Execute();
+ delete pDlg;
+ bDone = TRUE;
+ break;
+ }
+
+ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ case SID_ORGANIZER:
+ {
+ SfxTemplateOrganizeDlg *pDlg =
+ new SfxTemplateOrganizeDlg(GetTopWindow());
+ pDlg->Execute();
+ delete pDlg;
+ bDone = TRUE;
+ break;
+ }
+
+ case SID_BASICSTOP:
+ StarBASIC::Stop();
+ break;
+
+ case SID_BASICBREAK :
+ BASIC_DLL()->BasicBreak();
+ break;
+
+ case SID_CRASH :
+ {
+ Exception( EXC_SYSTEM );
+ abort();
+ }
+
+ default:
+ break;
+ }
+
+ if ( bDone )
+ rReq.Done();
+}
+
+//--------------------------------------------------------------------
+
+void SfxApplication::MiscState_Impl(SfxItemSet &rSet)
+{
+ DBG_MEMTEST();
+
+ int bSearchedMDI = FALSE;
+ int bFoundNormMDI = FALSE;
+ int bFoundMiniMDI = FALSE;
+ int bFoundNonDesktopMDI = FALSE;
+
+ const USHORT *pRanges = rSet.GetRanges();
+ DBG_ASSERT(pRanges && *pRanges, "Set ohne Bereich");
+ while ( *pRanges )
+ {
+ for(USHORT nWhich = *pRanges++; nWhich <= *pRanges; ++nWhich)
+ {
+ switch(nWhich)
+ {
+ case SID_EXITANDRETURN:
+ case SID_QUITAPP:
+ {
+ if ( pAppData_Impl->nDocModalMode )
+ rSet.DisableItem(nWhich);
+ else
+ {
+ SfxObjectShell *pDoc = pViewFrame ? pViewFrame->GetObjectShell() : 0;
+ SfxInPlaceObject *pIPObj = pDoc ? pDoc->GetInPlaceObject() : 0;
+ if (pIPObj && pIPObj->GetProtocol().IsEmbed() &&
+ !pIPObj->GetClient()->Owner())
+ {
+ String aEntry(SfxResId(STR_EXITANDRETURN));
+ aEntry += pIPObj->GetDocumentName();
+ rSet.Put(SfxStringItem(nWhich, aEntry));
+ }
+ else
+ rSet.Put(SfxStringItem(nWhich, String(SfxResId(STR_QUITAPP))));
+ }
+ break;
+ }
+
+ case SID_BASICSTOP:
+ if ( !StarBASIC::IsRunning() )
+ rSet.DisableItem(nWhich);
+ break;
+
+ case SID_PICK1:
+ case SID_PICK2:
+ case SID_PICK3:
+ case SID_PICK4:
+ case SID_PICK5:
+ case SID_PICK6:
+ case SID_PICK7:
+ case SID_PICK8:
+ case SID_PICK9: {
+ if ( ( nWhich - SID_PICK1 ) <
+ (USHORT)SfxPickList_Impl::Get()->GetAllowedMenuSize() )
+ rSet.Put( SfxStringItem( nWhich,
+ SfxPickList_Impl::Get()->GetMenuPickEntry(nWhich - SID_PICK1)->aTitle ) );
+ break;
+ }
+
+ case SID_CURRENTTIME:
+ {
+ rSet.Put( SfxStringItem( nWhich, Application::GetAppInternational().GetTime( Time(), FALSE ) ) );
+ break;
+ }
+ case SID_CURRENTDATE:
+ {
+ rSet.Put( SfxStringItem( nWhich, Application::GetAppInternational().GetDate( Date() ) ) );
+ break;
+ }
+
+ case SID_CONFIGTOOLBOX:
+ break;
+
+ case SID_HELPTIPS:
+ {
+/*! (pb) what about help?
+ rSet.Put( SfxBoolItem( SID_HELPTIPS, Help::IsQuickHelpEnabled() ) );
+*/
+ rSet.DisableItem( SID_HELPTIPS );
+ }
+ break;
+ case SID_HELPBALLOONS:
+ {
+/*! (pb) what about help?
+ short nHelpMode = ImplGetHelpMode();
+ if ( ( nHelpMode & HELPTEXTMODE_NORESHELPTEXT ) && !( nHelpMode & HELPTEXTMODE_EXTERN ) )
+ {
+ rSet.DisableItem( SID_HELPBALLOONS );
+ }
+ else
+ rSet.Put( SfxBoolItem( SID_HELPBALLOONS, Help::IsBalloonHelpEnabled() ) );
+*/
+ rSet.DisableItem( SID_HELPBALLOONS );
+ }
+ break;
+ case SID_EXTENDEDHELP:
+ {
+/*! (pb) what about help?
+ BOOL bExtHelp = Help::IsExtHelpActive();
+ // Wenn weder aus Resource noch aus Hilfesystem:
+ short nHelpMode = ImplGetHelpMode();
+ if ( ( nHelpMode & HELPTEXTMODE_NORESHELPTEXT ) &&
+ !( nHelpMode & HELPTEXTMODE_EXTERN ) )
+ bExtHelp = FALSE;
+ rSet.Put( SfxBoolItem( SID_EXTENDEDHELP, bExtHelp ) );
+*/
+ }
+ break;
+
+ case SID_CLOSEDOCS:
+ case SID_CLOSEWINS:
+ {
+ Reference < XTasksSupplier > xDesktop ( ::utl::getProcessServiceFactory()->createInstance( DEFINE_CONST_UNICODE("com.sun.star.frame.Desktop") ), UNO_QUERY );
+ Reference< XIndexAccess > xTasks( xDesktop->getTasks(), UNO_QUERY );
+ if ( !xTasks.is() || !xTasks->getCount() )
+ rSet.DisableItem(nWhich);
+ break;
+ }
+
+ case SID_SAVEDOCS:
+ {
+ BOOL bModified = FALSE;
+ for ( SfxObjectShell *pObjSh = SfxObjectShell::GetFirst();
+ pObjSh;
+ pObjSh = SfxObjectShell::GetNext( *pObjSh ) )
+ {
+ if ( pObjSh->IsModified() )
+ {
+ bModified = TRUE;
+ break;
+ }
+ }
+
+ if ( !bModified )
+ rSet.DisableItem( nWhich );
+ break;
+ }
+
+ default:
+ break;
+ }
+ }
+
+ ++pRanges;
+ }
+}
+
+
diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx
new file mode 100644
index 000000000000..2a20f16c6db7
--- /dev/null
+++ b/sfx2/source/appl/appuno.cxx
@@ -0,0 +1,1239 @@
+/*************************************************************************
+ *
+ * $RCSfile: appuno.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:27 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _SFXRECTITEM_HXX //autogen
+#include <svtools/rectitem.hxx>
+#endif
+#ifndef _TOOLS_DEBUG_HXX //autogen
+#include <tools/debug.hxx>
+#endif
+#ifndef _WLDCRD_HXX //autogen
+#include <tools/wldcrd.hxx>
+#endif
+#ifndef _SV_CONFIG_HXX //autogen
+#include <vcl/config.hxx>
+#endif
+#ifndef _INET_CONFIG_HXX //autogen
+#include <inet/inetcfg.hxx>
+#endif
+#ifndef __SBX_SBXMETHOD_HXX
+#include <svtools/sbxmeth.hxx>
+#endif
+#ifndef _SB_SBMETH_HXX
+#include <basic/sbmeth.hxx>
+#endif
+#ifndef _SBX_SBXOBJECT_HXX
+#include <svtools/sbxobj.hxx>
+#endif
+#ifndef _SB_SBERRORS_HXX
+#include <basic/sberrors.hxx>
+#endif
+#ifndef _BASMGR_HXX
+#include <basic/basmgr.hxx>
+#endif
+
+#include <svtools/ownlist.hxx>
+#include <svtools/lckbitem.hxx>
+#include <svtools/stritem.hxx>
+#include <svtools/intitem.hxx>
+#include <svtools/eitem.hxx>
+
+#ifndef _COM_SUN_STAR_IO_XINPUTSTREAM_HPP_
+#include <com/sun/star/io/XInputStream.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
+#include <com/sun/star/beans/XPropertySet.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XFRAMEACTIONLISTENER_HPP_
+#include <com/sun/star/frame/XFrameActionListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XCOMPONENTLOADER_HPP_
+#include <com/sun/star/frame/XComponentLoader.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XFRAME_HPP_
+#include <com/sun/star/frame/XFrame.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_FRAMEACTIONEVENT_HPP_
+#include <com/sun/star/frame/FrameActionEvent.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_FRAMEACTION_HPP_
+#include <com/sun/star/frame/FrameAction.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CONTAINER_XCONTAINER_HPP_
+#include <com/sun/star/container/XContainer.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CONTAINER_XINDEXCONTAINER_HPP_
+#include <com/sun/star/container/XIndexContainer.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CONTAINER_XNAMEREPLACE_HPP_
+#include <com/sun/star/container/XNameReplace.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CONTAINER_XCONTAINERLISTENER_HPP_
+#include <com/sun/star/container/XContainerListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CONTAINER_XSET_HPP_
+#include <com/sun/star/container/XSet.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CONTAINER_CONTAINEREVENT_HPP_
+#include <com/sun/star/container/ContainerEvent.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CONTAINER_XINDEXREPLACE_HPP_
+#include <com/sun/star/container/XIndexReplace.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_
+#include <com/sun/star/container/XNameContainer.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_XTOPWINDOW_HPP_
+#include <com/sun/star/awt/XTopWindow.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_XWINDOW_HPP_
+#include <com/sun/star/awt/XWindow.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_POSSIZE_HPP_
+#include <com/sun/star/awt/PosSize.hpp>
+#endif
+#ifndef _COM_SUN_STAR_REGISTRY_REGISTRYVALUETYPE_HPP_
+#include <com/sun/star/registry/RegistryValueType.hpp>
+#endif
+#ifndef _UNOTOOLS_PROCESSFACTORY_HXX
+#include <unotools/processfactory.hxx>
+#endif
+#ifndef _COM_SUN_STAR_AWT_POSSIZE_HPP_
+#include <com/sun/star/awt/PosSize.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_XBUTTON_HPP_
+#include <com/sun/star/awt/XButton.hpp>
+#endif
+
+#include <tools/cachestr.hxx>
+#include <osl/mutex.hxx>
+
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::registry;
+using namespace ::com::sun::star::frame;
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::io;
+using namespace ::rtl;
+
+#pragma hdrstop
+
+#include "appuno.hxx"
+#include "urltrans.hxx"
+#include "sfxtypes.hxx"
+#include "sfxuno.hxx"
+#include "appdata.hxx"
+#include "app.hxx"
+#include "inimgr.hxx"
+#include "sfxsids.hrc"
+#include "msg.hxx"
+#include "msgpool.hxx"
+#include "request.hxx"
+#include "module.hxx"
+#include "downloadcontroller.hxx"
+#include "ucbhelp.hxx"
+#include "fcontnr.hxx"
+#include "frmload.hxx"
+#include "frame.hxx"
+#include "sfxbasic.hxx"
+
+#define FRAMELOADER_SERVICENAME "com.sun.star.frame.FrameLoader"
+
+void TestFunc( ::com::sun::star::util::URL aUrl );
+
+void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& rArgs, SfxAllItemSet& rSet, const SfxSlot* pSlot )
+{
+ if ( !pSlot )
+ pSlot = SFX_SLOTPOOL().GetSlot( nSlotId );
+
+ if ( nSlotId == SID_OPENURL )
+ nSlotId = SID_OPENDOC;
+
+ sal_uInt16 nCount = rArgs.getLength();
+ const ::com::sun::star::beans::PropertyValue* pPropsVal = rArgs.getConstArray();
+ for ( sal_uInt16 n=0; n<nCount; n++ )
+ {
+ const ::com::sun::star::beans::PropertyValue& rProp = pPropsVal[n];
+ String aName = rProp.Name ;
+
+ sal_uInt16 nArgs;
+ for ( nArgs=0; nArgs<pSlot->nArgDefCount; nArgs++ )
+ {
+ const SfxFormalArgument* pArg = pSlot->pFirstArgDef + nArgs;
+ if ( aName.CompareToAscii(pArg->pName) == COMPARE_EQUAL )
+ {
+ SfxPoolItem* pItem = pArg->CreateItem();
+ pItem->SetWhich( pArg->nSlotId );
+ if ( pItem->PutValue( rProp.Value ) )
+ rSet.Put( *pItem );
+ delete pItem;
+ break;
+ }
+ }
+
+ if ( nArgs >= pSlot->nArgDefCount && nSlotId == SID_OPENDOC )
+ {
+ static const String sTemplateRegionName = String::CreateFromAscii( "TemplateRegionName" );
+ static const String sTemplateName = String::CreateFromAscii( "TemplateName" );
+ static const String sAsTemplate = String::CreateFromAscii( "AsTemplate" );
+ static const String sOpenNewView = String::CreateFromAscii( "OpenNewView" );
+ static const String sViewId = String::CreateFromAscii( "ViewId" );
+ static const String sPluginMode = String::CreateFromAscii( "PluginMode" );
+ static const String sReadOnly = String::CreateFromAscii( "ReadOnly" );
+ static const String sPostString = String::CreateFromAscii( "PostString" );
+ static const String sFrameName = String::CreateFromAscii( "FrameName" );
+ static const String sContentType = String::CreateFromAscii( "ContentType" );
+ static const String sPostData = String::CreateFromAscii( "PostData" );
+ static const String sPosSize = String::CreateFromAscii( "PosSize" );
+ static const String sCharacterSet = String::CreateFromAscii( "CharacterSet" );
+ static const String sInputStream = String::CreateFromAscii( "InputStream" );
+ static const String sHidden = String::CreateFromAscii( "Hidden" );
+ static const String sPreview = String::CreateFromAscii( "Preview" );
+
+ if ( aName == sInputStream && rProp.Value.getValueType() == ::getCppuType( (Reference < XInputStream >*)0 ) )
+ rSet.Put( SfxUsrAnyItem( SID_INPUTSTREAM, rProp.Value ) );
+
+ // AsTemplate-Property?
+ if ( aName == sAsTemplate && rProp.Value.getValueType() == ::getBooleanCppuType() )
+ rSet.Put( SfxBoolItem( SID_TEMPLATE, *((sal_Bool*)rProp.Value.getValue()) ) );
+
+ // OpenNewView-Parameter ?
+ else if ( aName == sOpenNewView && rProp.Value.getValueType() == ::getBooleanCppuType() )
+
+ rSet.Put( SfxBoolItem( SID_OPEN_NEW_VIEW, *((sal_Bool*)rProp.Value.getValue()) ) );
+
+ // ViewId-Parameter ?
+ else if ( aName == sViewId && rProp.Value.getValueType() == ::getCppuType((const sal_Int16*)0) )
+ rSet.Put( SfxUInt16Item( SID_VIEW_ID, *((sal_Int16*)rProp.Value.getValue()) ) );
+
+ // PluginMode-Parameter ?
+ else if ( aName == sPluginMode && rProp.Value.getValueType() == ::getCppuType((const sal_Int16*)0) )
+ rSet.Put( SfxUInt16Item( SID_PLUGIN_MODE, *((sal_Int16*)rProp.Value.getValue()) ) );
+
+ // ReadOnly-Property?
+ else if ( aName == sReadOnly && rProp.Value.getValueType() == ::getBooleanCppuType() )
+ rSet.Put( SfxBoolItem( SID_DOC_READONLY, *((sal_Bool*)rProp.Value.getValue()) ) );
+
+ else if ( aName == sHidden && rProp.Value.getValueType() == ::getBooleanCppuType() )
+ rSet.Put( SfxBoolItem( SID_HIDDEN, *((sal_Bool*)rProp.Value.getValue()) ) );
+
+ else if ( aName == sPreview && rProp.Value.getValueType() == ::getBooleanCppuType() )
+ rSet.Put( SfxBoolItem( SID_PREVIEW, *((sal_Bool*)rProp.Value.getValue()) ) );
+
+ // PostString-Property?
+ else if ( aName == sPostString && rProp.Value.getValueType() == ::getCppuType((const ::rtl::OUString*)0) )
+ rSet.Put( SfxStringItem( SID_POSTSTRING, *((::rtl::OUString*)rProp.Value.getValue()) ) );
+
+ else if ( aName == sFrameName && rProp.Value.getValueType() == ::getCppuType((const ::rtl::OUString*)0) )
+ rSet.Put( SfxStringItem( SID_TARGETNAME, *((::rtl::OUString*)rProp.Value.getValue()) ) );
+
+ else if ( aName == sContentType && rProp.Value.getValueType() == ::getCppuType((const ::rtl::OUString*)0) )
+ rSet.Put( SfxStringItem( SID_CONTENTTYPE, *((::rtl::OUString*)rProp.Value.getValue()) ) );
+
+ else if ( aName == sTemplateName && rProp.Value.getValueType() == ::getCppuType((const ::rtl::OUString*)0) )
+ rSet.Put( SfxStringItem( SID_TEMPLATE_NAME, *((::rtl::OUString*)rProp.Value.getValue()) ) );
+
+ else if ( aName == sTemplateRegionName && rProp.Value.getValueType() == ::getCppuType((const ::rtl::OUString*)0) )
+ rSet.Put( SfxStringItem( SID_TEMPLATE_REGIONNAME, *((::rtl::OUString*)rProp.Value.getValue()) ) );
+
+ else if ( aName == sPostData && rProp.Value.getValueType() == ::getCppuType((const ::com::sun::star::uno::Sequence<sal_Int8>*)0) )
+ {
+ SvCacheStream* pStream = new SvCacheStream;
+ ::com::sun::star::uno::Sequence<sal_Int8> aSequ = *((::com::sun::star::uno::Sequence<sal_Int8>*) rProp.Value.getValue());
+ pStream->Write( (void*) aSequ.getConstArray(), aSequ.getLength() );
+ SfxRefItem aItem( SID_POSTLOCKBYTES, new SvLockBytes( pStream, sal_True ) );
+ rSet.Put( aItem );
+ }
+
+ // PosSize-Property?
+ else if ( aName == sPosSize && rProp.Value.getValueType() == ::getCppuType((const ::rtl::OUString*)0) )
+ {
+ String aPar = *((::rtl::OUString*)rProp.Value.getValue());
+ Size aSize;
+ Point aPos;
+ if ( SfxIniManager::GetPosSize( aPar, aPos, aSize ) )
+ rSet.Put( SfxRectangleItem( SID_VIEW_POS_SIZE, Rectangle( aPos, aSize ) ) );
+ }
+
+ // CharacterSet-Property?
+ else if ( aName == sCharacterSet && rProp.Value.getValueType() == ::getCppuType((const ::rtl::OUString*)0) )
+ rSet.Put( SfxStringItem( SID_CHARSET, *((::rtl::OUString*)rProp.Value.getValue()) ) );
+ }
+ }
+}
+
+void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& rArgs, const SfxSlot* pSlot )
+{
+ if ( !pSlot )
+ pSlot = SFX_SLOTPOOL().GetSlot( nSlotId );
+
+ if ( nSlotId == SID_OPENURL )
+ nSlotId = SID_OPENDOC;
+
+ sal_uInt16 nArgs;
+ sal_uInt16 nItems=0;
+ for ( nArgs=0; nArgs<pSlot->nArgDefCount; nArgs++ )
+ {
+ const SfxFormalArgument* pArg = pSlot->pFirstArgDef + nArgs;
+ if ( rSet.GetItemState( pArg->nSlotId ) == SFX_ITEM_SET )
+ nItems++;
+ }
+
+ if ( nSlotId == SID_OPENDOC || nSlotId == SID_OPENURL )
+ {
+ if ( rSet.GetItemState( SID_INPUTSTREAM ) == SFX_ITEM_SET )
+ nItems++;
+ if ( rSet.GetItemState( SID_TEMPLATE ) == SFX_ITEM_SET )
+ nItems++;
+ if ( rSet.GetItemState( SID_OPEN_NEW_VIEW ) == SFX_ITEM_SET )
+ nItems++;
+ if ( rSet.GetItemState( SID_VIEW_ID ) == SFX_ITEM_SET )
+ nItems++;
+ if ( rSet.GetItemState( SID_PLUGIN_MODE ) == SFX_ITEM_SET )
+ nItems++;
+ if ( rSet.GetItemState( SID_DOC_READONLY ) == SFX_ITEM_SET )
+ nItems++;
+ if ( rSet.GetItemState( SID_POSTSTRING ) == SFX_ITEM_SET )
+ nItems++;
+ if ( rSet.GetItemState( SID_CONTENTTYPE ) == SFX_ITEM_SET )
+ nItems++;
+ if ( rSet.GetItemState( SID_VIEW_POS_SIZE ) == SFX_ITEM_SET )
+ nItems++;
+ if ( rSet.GetItemState( SID_POSTLOCKBYTES ) == SFX_ITEM_SET )
+ nItems++;
+ if ( rSet.GetItemState( SID_CHARSET ) == SFX_ITEM_SET )
+ nItems++;
+ if ( rSet.GetItemState( SID_TARGETNAME ) == SFX_ITEM_SET )
+ nItems++;
+ if ( rSet.GetItemState( SID_TEMPLATE_NAME ) == SFX_ITEM_SET )
+ nItems++;
+ if ( rSet.GetItemState( SID_TEMPLATE_REGIONNAME ) == SFX_ITEM_SET )
+ nItems++;
+ if ( rSet.GetItemState( SID_HIDDEN ) == SFX_ITEM_SET )
+ nItems++;
+ if ( rSet.GetItemState( SID_PREVIEW ) == SFX_ITEM_SET )
+ nItems++;
+ }
+
+ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue> aSequ( nItems );
+ ::com::sun::star::beans::PropertyValue *pValue = aSequ.getArray();
+ for ( nArgs=0, nItems=0; nArgs<pSlot->nArgDefCount; nArgs++ )
+ {
+ const SfxFormalArgument* pArg = pSlot->pFirstArgDef + nArgs;
+ SFX_ITEMSET_ARG( &rSet, pItem, SfxPoolItem, pArg->nSlotId, sal_False );
+ if ( pItem )
+ {
+ pValue[nItems].Name = String( String::CreateFromAscii( pArg->pName ) ) ;
+ pItem->QueryValue( pValue[nItems++].Value );
+ }
+ }
+
+ if ( nSlotId == SID_OPENDOC || nSlotId == SID_OPENURL )
+ {
+ static const String sTemplateRegionName = String::CreateFromAscii( "TemplateRegionName" );
+ static const String sTemplateName = String::CreateFromAscii( "TemplateName" );
+ static const String sAsTemplate = String::CreateFromAscii( "AsTemplate" );
+ static const String sOpenNewView = String::CreateFromAscii( "OpenNewView" );
+ static const String sViewId = String::CreateFromAscii( "ViewId" );
+ static const String sPluginMode = String::CreateFromAscii( "PluginMode" );
+ static const String sReadOnly = String::CreateFromAscii( "ReadOnly" );
+ static const String sPostString = String::CreateFromAscii( "PostString" );
+ static const String sFrameName = String::CreateFromAscii( "FrameName" );
+ static const String sContentType = String::CreateFromAscii( "ContentType" );
+ static const String sPostData = String::CreateFromAscii( "PostData" );
+ static const String sPosSize = String::CreateFromAscii( "PosSize" );
+ static const String sCharacterSet = String::CreateFromAscii( "CharacterSet" );
+ static const String sInputStream = String::CreateFromAscii( "InputStream" );
+ static const String sHidden = String::CreateFromAscii( "Hidden" );
+ static const String sPreview = String::CreateFromAscii( "Preview" );
+
+ const SfxPoolItem *pItem=0;
+ if ( rSet.GetItemState( SID_INPUTSTREAM, sal_False, &pItem ) == SFX_ITEM_SET )
+ {
+ pValue[nItems].Name = sInputStream;
+ pValue[nItems++].Value = ( ((SfxUsrAnyItem*)pItem)->GetValue() );
+ }
+ if ( rSet.GetItemState( SID_TEMPLATE, sal_False, &pItem ) == SFX_ITEM_SET )
+ {
+ pValue[nItems].Name = sAsTemplate;
+ pValue[nItems++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() );
+ }
+ if ( rSet.GetItemState( SID_OPEN_NEW_VIEW, sal_False, &pItem ) == SFX_ITEM_SET )
+ {
+ pValue[nItems].Name = sOpenNewView;
+ pValue[nItems++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() );
+ }
+ if ( rSet.GetItemState( SID_VIEW_ID, sal_False, &pItem ) == SFX_ITEM_SET )
+ {
+ pValue[nItems].Name = sViewId;
+ pValue[nItems++].Value <<= ( (sal_uInt16) ((SfxUInt16Item*)pItem)->GetValue() );
+ }
+ if ( rSet.GetItemState( SID_PLUGIN_MODE, sal_False, &pItem ) == SFX_ITEM_SET )
+ {
+ pValue[nItems].Name = sPluginMode;
+ pValue[nItems++].Value <<= ( (sal_uInt16) ((SfxUInt16Item*)pItem)->GetValue() );
+ }
+ if ( rSet.GetItemState( SID_DOC_READONLY, sal_False, &pItem ) == SFX_ITEM_SET )
+ {
+ pValue[nItems].Name = sReadOnly;
+ pValue[nItems++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() );
+ }
+ if ( rSet.GetItemState( SID_HIDDEN, sal_False, &pItem ) == SFX_ITEM_SET )
+ {
+ pValue[nItems].Name = sHidden;
+ pValue[nItems++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() );
+ }
+ if ( rSet.GetItemState( SID_PREVIEW, sal_False, &pItem ) == SFX_ITEM_SET )
+ {
+ pValue[nItems].Name = sPreview;
+ pValue[nItems++].Value <<= ( ((SfxBoolItem*)pItem)->GetValue() );
+ }
+ if ( rSet.GetItemState( SID_POSTSTRING, sal_False, &pItem ) == SFX_ITEM_SET )
+ {
+ pValue[nItems].Name = sPostString;
+ pValue[nItems++].Value <<= ( ::rtl::OUString(((SfxStringItem*)pItem)->GetValue()) );
+ }
+ if ( rSet.GetItemState( SID_TARGETNAME, sal_False, &pItem ) == SFX_ITEM_SET )
+ {
+ pValue[nItems].Name = sFrameName;
+ pValue[nItems++].Value <<= ( ::rtl::OUString(((SfxStringItem*)pItem)->GetValue()) );
+ }
+ if ( rSet.GetItemState( SID_CONTENTTYPE, sal_False, &pItem ) == SFX_ITEM_SET )
+ {
+ pValue[nItems].Name = sContentType;
+ pValue[nItems++].Value <<= ( ::rtl::OUString(((SfxStringItem*)pItem)->GetValue()) );
+ }
+ if ( rSet.GetItemState( SID_TEMPLATE_NAME, sal_False, &pItem ) == SFX_ITEM_SET )
+ {
+ pValue[nItems].Name = sTemplateName;
+ pValue[nItems++].Value <<= ( ::rtl::OUString(((SfxStringItem*)pItem)->GetValue()) );
+ }
+ if ( rSet.GetItemState( SID_TEMPLATE_REGIONNAME, sal_False, &pItem ) == SFX_ITEM_SET )
+ {
+ pValue[nItems].Name = sTemplateRegionName;
+ pValue[nItems++].Value <<= ( ::rtl::OUString(((SfxStringItem*)pItem)->GetValue()) );
+ }
+
+ SFX_ITEMSET_ARG( &rSet, pRectItem, SfxRectangleItem, SID_VIEW_POS_SIZE, sal_False );
+ if ( pRectItem )
+ {
+ pValue[nItems].Name = sPosSize;
+ Rectangle aRect = pRectItem->GetValue();
+ pValue[nItems++].Value <<= ( ::rtl::OUString(SfxIniManager::GetString( aRect.TopLeft(), aRect.GetSize() ) ) );
+ }
+
+ SFX_ITEMSET_ARG( &rSet, pRefItem, SfxRefItem, SID_POSTLOCKBYTES, sal_False );
+ if ( pRefItem )
+ {
+ // Mit TLX-Spezialhack fuer die Pointercasts
+ pValue[nItems].Name = sPostData;
+ SvLockBytes* pBytes = new SvLockBytes;
+ int nDiff = (char*)pBytes - (char*)(SvRefBase*)pBytes;
+ SvLockBytes* pLB = (SvLockBytes*)(
+ (char*)(SvRefBase*)&((SfxRefItem*)pRefItem )->GetValue() + nDiff );
+ delete pBytes;
+ SfxLockBytesItem aLock( SID_POSTLOCKBYTES, pLB );
+ aLock.QueryValue( pValue[nItems++].Value );
+ }
+
+ if ( rSet.GetItemState( SID_CHARSET, sal_False, &pItem ) == SFX_ITEM_SET )
+ {
+ pValue[nItems].Name = sCharacterSet;
+ pValue[nItems++].Value <<= ( ::rtl::OUString(((SfxStringItem*)pItem)->GetValue()) );
+ }
+ }
+
+ rArgs = aSequ;
+}
+
+SV_IMPL_PTRARR( SfxComponentKeyArr_Impl, SfxComponentKeyPtr_Impl );
+
+// Implementation of XInterface, XTypeProvider, XServiceInfo, helper- and static-methods
+SFX_IMPL_XINTERFACE_1( SfxComponentFactory, OWeakObject, ::com::sun::star::lang::XMultiServiceFactory )
+SFX_IMPL_XTYPEPROVIDER_1( SfxComponentFactory, ::com::sun::star::lang::XMultiServiceFactory )
+SFX_IMPL_XSERVICEINFO( SfxComponentFactory, "com.sun.star.frame.FrameLoaderFactory", "com.sun.star.comp.sfx2.FrameLoaderFactory" )
+SFX_IMPL_ONEINSTANCEFACTORY( SfxComponentFactory )
+
+SfxComponentFactory::SfxComponentFactory( com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > const &)
+{
+}
+
+SfxComponentFactory::~SfxComponentFactory()
+{
+}
+
+::com::sun::star::uno::Sequence< ::rtl::OUString > SfxComponentFactory::getAvailableServiceNames(void) throw( ::com::sun::star::uno::RuntimeException )
+{
+ return ::com::sun::star::uno::Sequence < ::rtl::OUString >();
+}
+
+void SfxComponentFactory::Init_Impl()
+{
+// TRY
+ {
+ Reference< XPropertySet > xMan( ::utl::getProcessServiceFactory(), UNO_QUERY );
+ Any aAny = xMan->getPropertyValue( DEFINE_CONST_UNICODE("Registry") );
+ aAny >>= xRegistry;
+ if ( xRegistry.is() )
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::registry::XRegistryKey > xRootKey = xRegistry->getRootKey();
+ ::com::sun::star::uno::Reference< ::com::sun::star::registry::XRegistryKey > xKey = xRootKey->openKey( DEFINE_CONST_UNICODE("/Loader") );
+ if ( xKey.is() && xKey->getValueType() == ::com::sun::star::registry::RegistryValueType_ASCIILIST )
+ {
+ ::com::sun::star::uno::Sequence< ::rtl::OUString > aNames = xKey->getAsciiListValue();
+ const ::rtl::OUString* pStr = aNames.getConstArray();
+ for ( sal_uInt32 n=0; n<aNames.getLength(); n++ )
+ {
+ ::rtl::OUString aKeyStr = DEFINE_CONST_UNICODE("/IMPLEMENTATIONS/");
+ aKeyStr += pStr[n];
+
+ SfxComponentKey_Impl *pEntry = new SfxComponentKey_Impl;
+ pEntry->aImplName = pStr[n];
+ ::rtl::OUString aTempStr = aKeyStr;
+ aTempStr += DEFINE_CONST_UNICODE("/Loader/Pattern");
+ xKey = xRootKey->openKey(aTempStr);
+ if ( xKey.is() )
+ {
+ ::com::sun::star::registry::RegistryValueType aType = xKey->getValueType();
+ switch ( aType )
+ {
+ case ::com::sun::star::registry::RegistryValueType_ASCII :
+ {
+ pEntry->aPatterns.Insert( new String( xKey->getAsciiValue() ), pEntry->aPatterns.Count() ) ;
+ break;
+ }
+ case ::com::sun::star::registry::RegistryValueType_STRING :
+ {
+ pEntry->aPatterns.Insert( new String( xKey->getStringValue() ), pEntry->aPatterns.Count() ) ;
+ break;
+ }
+ case ::com::sun::star::registry::RegistryValueType_ASCIILIST :
+ {
+ ::com::sun::star::uno::Sequence < ::rtl::OUString > aKey = xKey->getAsciiListValue();
+ long nLen = aKey.getLength();
+ const ::rtl::OUString* pUStrings = aKey.getConstArray();
+ for ( long n=0; n<nLen; n++ )
+ pEntry->aPatterns.Insert( new String( pUStrings[n] ), pEntry->aPatterns.Count() ) ;
+ break;
+ }
+ case ::com::sun::star::registry::RegistryValueType_STRINGLIST :
+ {
+ ::com::sun::star::uno::Sequence < ::rtl::OUString > aKey = xKey->getStringListValue();
+ long nLen = aKey.getLength();
+ const ::rtl::OUString* pUStrings = aKey.getConstArray();
+ for ( long n=0; n<nLen; n++ )
+ pEntry->aPatterns.Insert( new String( pUStrings[n] ), pEntry->aPatterns.Count() ) ;
+ break;
+ }
+ }
+ }
+
+ aTempStr = aKeyStr;
+ aTempStr += DEFINE_CONST_UNICODE("/Loader/Extension");
+ xKey = xRootKey->openKey(aTempStr);
+ if ( xKey.is() )
+ {
+ ::com::sun::star::registry::RegistryValueType aType = xKey->getValueType();
+ switch ( aType )
+ {
+ case ::com::sun::star::registry::RegistryValueType_ASCII :
+ {
+ pEntry->aExtensions.Insert( new String( xKey->getAsciiValue() ), pEntry->aExtensions.Count() ) ;
+ break;
+ }
+ case ::com::sun::star::registry::RegistryValueType_STRING :
+ {
+ pEntry->aExtensions.Insert( new String( xKey->getStringValue() ), pEntry->aExtensions.Count() ) ;
+ break;
+ }
+ case ::com::sun::star::registry::RegistryValueType_ASCIILIST :
+ {
+ ::com::sun::star::uno::Sequence < ::rtl::OUString > aKey = xKey->getAsciiListValue();
+ long nLen = aKey.getLength();
+ const ::rtl::OUString* pUStrings = aKey.getConstArray();
+ for ( long n=0; n<nLen; n++ )
+ pEntry->aExtensions.Insert( new String( pUStrings[n] ), pEntry->aExtensions.Count() ) ;
+ break;
+ }
+ case ::com::sun::star::registry::RegistryValueType_STRINGLIST :
+ {
+ ::com::sun::star::uno::Sequence < ::rtl::OUString > aKey = xKey->getStringListValue();
+ long nLen = aKey.getLength();
+ const ::rtl::OUString* pUStrings = aKey.getConstArray();
+ for ( long n=0; n<nLen; n++ )
+ pEntry->aExtensions.Insert( new String( pUStrings[n] ), pEntry->aExtensions.Count() ) ;
+ break;
+ }
+ }
+ }
+
+ aTempStr = aKeyStr;
+ aTempStr += DEFINE_CONST_UNICODE("/Loader/MimeType");
+ xKey = xRootKey->openKey(aTempStr);
+ if ( xKey.is() )
+ {
+ ::com::sun::star::registry::RegistryValueType aType = xKey->getValueType();
+ switch ( aType )
+ {
+ case ::com::sun::star::registry::RegistryValueType_ASCII :
+ {
+ pEntry->aMimeTypes.Insert( new String( xKey->getAsciiValue() ), pEntry->aMimeTypes.Count() ) ;
+ break;
+ }
+ case ::com::sun::star::registry::RegistryValueType_STRING :
+ {
+ pEntry->aMimeTypes.Insert( new String( xKey->getStringValue() ), pEntry->aMimeTypes.Count() ) ;
+ break;
+ }
+ case ::com::sun::star::registry::RegistryValueType_ASCIILIST :
+ {
+ ::com::sun::star::uno::Sequence < ::rtl::OUString > aKey = xKey->getAsciiListValue();
+ long nLen = aKey.getLength();
+ const ::rtl::OUString* pUStrings = aKey.getConstArray();
+ for ( long n=0; n<nLen; n++ )
+ pEntry->aMimeTypes.Insert( new String( pUStrings[n] ), pEntry->aMimeTypes.Count() ) ;
+ break;
+ }
+ case ::com::sun::star::registry::RegistryValueType_STRINGLIST :
+ {
+ ::com::sun::star::uno::Sequence < ::rtl::OUString > aKey = xKey->getStringListValue();
+ long nLen = aKey.getLength();
+ const ::rtl::OUString* pUStrings = aKey.getConstArray();
+ for ( long n=0; n<nLen; n++ )
+ pEntry->aMimeTypes.Insert( new String( pUStrings[n] ), pEntry->aMimeTypes.Count() ) ;
+ break;
+ }
+ }
+ }
+
+ aKeyArr.Insert( pEntry, n );
+ }
+ }
+ }
+ }
+/*
+ CATCH ( OUnoException, e )
+ {
+ }
+ END_CATCH;
+*/
+}
+
+::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SfxComponentFactory::createInstance( const ::rtl::OUString& aURL ) throw( ::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException )
+{
+ return CreateInstance_Impl( aURL, NULL );
+}
+
+::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SfxComponentFactory::createInstanceWithArguments( const ::rtl::OUString& aURL, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& Arguments ) throw( ::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException )
+{
+ ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue > aSequ;
+ if ( Arguments.getLength() )
+ {
+ const ::com::sun::star::uno::Any aAny = Arguments.getConstArray()[0];
+ if ( aAny.getValueType() == ::getCppuType((const ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >*)0) )
+ aAny >>= aSequ ;
+ }
+
+ return CreateInstance_Impl( aURL, &aSequ );
+}
+
+::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SfxComponentFactory::CreateInstance_Impl( const ::rtl::OUString& aURL, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >* pArguments )
+{
+ if ( !xRegistry.is() )
+ {
+ Init_Impl();
+ }
+
+ String aName( aURL );
+ Any aAny( UCB_Helper::GetProperty( aName, WID_FLAG_IS_FOLDER ) );
+ BOOL bIsFolder = FALSE;
+ if ( ( aAny >>= bIsFolder ) && bIsFolder )
+ {
+ Reference< XFrameLoader > xLoader;
+#ifdef WNT
+ SfxIniManager* pIni = SfxIniManager::Get();
+ if( !Application::IsRemoteServer() && pIni->IsInternetExplorerAvailable() )
+ xLoader = Reference< XFrameLoader >( createInstance( DEFINE_CONST_UNICODE("private:iexplorer") ), ::com::sun::star::uno::UNO_QUERY );
+ if ( !xLoader.is() )
+#endif
+ xLoader = Reference< XFrameLoader >( createInstance( DEFINE_CONST_UNICODE(".component:Text") ), ::com::sun::star::uno::UNO_QUERY );
+ return xLoader;
+ }
+
+ if ( xRegistry.is() )
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xMan = ::utl::getProcessServiceFactory();
+ sal_uInt16 nCount = aKeyArr.Count();
+ sal_uInt16 n;
+ for ( n=0; n<nCount; n++ )
+ {
+ SfxComponentKey_Impl* pEntry = aKeyArr[n];
+ sal_uInt16 nLen = pEntry->aPatterns.Count();
+ for ( sal_uInt16 n=0; n<nLen; n++ )
+ {
+ if ( WildCard( *pEntry->aPatterns[n] ).Matches( aName ) )
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrameLoader > xLoader( xMan->createInstance( pEntry->aImplName ), ::com::sun::star::uno::UNO_QUERY );
+ if ( xLoader.is() )
+ return xLoader;
+ }
+ }
+ }
+
+ INetURLObject aObject( aName );
+ String aExt( aObject.GetExtension() );
+ if ( aExt.Len() )
+ {
+ for ( n=0; n<nCount; n++ )
+ {
+ SfxComponentKey_Impl* pEntry = aKeyArr[n];
+ sal_uInt16 nLen = pEntry->aExtensions.Count();
+ for ( long n=0; n<nLen; n++ )
+ {
+ if ( *pEntry->aExtensions[n] == aExt )
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrameLoader > xLoader( xMan->createInstance( pEntry->aImplName ), ::com::sun::star::uno::UNO_QUERY );
+ if ( xLoader.is() )
+ return xLoader;
+ }
+ }
+ }
+ }
+ }
+
+ return ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > ();
+}
+
+#if 0 // (mba)
+#ifdef SOLAR_JAVA
+SFX_IMPL_XINTERFACE_1( SfxJavaLoader, OWeakObject, ::com::sun::star::frame::XFrameLoader )
+SFX_IMPL_XTYPEPROVIDER_1( SfxJavaLoader, ::com::sun::star::frame::XFrameLoader )
+SFX_IMPL_XSERVICEINFO( SfxJavaLoader, FRAMELOADER_SERVICENAME, "com.sun.star.comp.sfx2.JavaLoader" )
+SFX_IMPL_SINGLEFACTORY( SfxJavaLoader )
+
+void SAL_CALL SfxJavaLoader::load(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > & rFrame, const ::rtl::OUString& rURL,
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rArgs,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XLoadEventListener > & rListener) throw ( ::com::sun::star::uno::RuntimeException )
+{
+ xFrame = rFrame;
+ xListener = rListener;
+ aURL.Complete = rURL;
+ aArgs = rArgs;
+
+ SfxURLTransformer aTrans ( ::utl::getProcessServiceFactory() );
+ aTrans.parseStrict( aURL );
+
+ String aName( aURL.Path );
+ aName.Erase( 0,5 ); // java/
+
+ SvCommandList aList;
+ String aParam( aURL.Arguments );
+ aParam += ' ';
+ if ( aParam.Len() )
+ {
+ const char* pStr = aParam.GetBuffer();
+ const char* pStart = pStr;
+ sal_Bool bEscaped = sal_False, bSeparated = sal_True;
+
+ while ( *pStr )
+ {
+ if ( *pStr != ' ' || bEscaped )
+ {
+ if ( *pStr == '"' )
+ {
+ if ( *(pStr+1) != '"' )
+ bEscaped = ! bEscaped;
+ else
+ pStr++;
+ }
+
+ bSeparated = sal_False;
+ }
+ else
+ {
+ if ( !bSeparated )
+ {
+ String aPar( pStart, pStr-pStart );
+ pStart = pStr+1;
+ bSeparated = sal_True;
+
+ if ( aPar.GetTokenCount( '=' ) > 1 )
+ {
+ String aName = aPar.GetToken( 0, '=' );
+ aPar.Erase( 0, aName.Len() + 1 );
+ aList.Append( aName, aPar );
+ }
+ else
+ aList.Append( aPar, "" );
+ }
+ }
+
+ pStr++;
+ }
+ }
+
+ pApp = new JavaApplication;
+ pApp->Init(aName, aList, this);
+// pApp = new JavaApplication( aName, aList, this );
+}
+
+// -----------------------------------------------------------------------
+
+void SAL_CALL SfxJavaLoader::cancel(void) throw ( ::com::sun::star::uno::RuntimeException )
+{
+ if ( pApp )
+ pApp->cancel();
+ xListener = ::com::sun::star::uno::Reference< ::com::sun::star::frame::XLoadEventListener > ();
+ xFrame = ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > ();
+}
+
+// -----------------------------------------------------------------------
+
+void SfxJavaLoader::status( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & xObject, short nObjectType )
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > xComp;
+
+ if ( ( nObjectType == OBJECTTYPE_AWTCOMPONENT || nObjectType == OBJECTTYPE_AWTAPPLET ) && xObject.is() )
+ xComp = ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > ( xObject, ::com::sun::star::uno::UNO_QUERY );
+
+ if ( xComp.is() )
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl > xCtrl( xComp, ::com::sun::star::uno::UNO_QUERY );
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > xPeer( xFrame->getContainerWindow(), ::com::sun::star::uno::UNO_QUERY );
+#if SUPD > 582
+ xCtrl->createPeer( Application::GetVCLToolkit(), xPeer );
+#endif
+ xComp->setPosSize( 0, 0, 100, 100, PosSize_POSSIZE );
+ xFrame->setComponent( xComp, ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController > () );
+ }
+
+ LoadFinished( xComp.is() );
+}
+
+void SfxJavaLoader::abort( const String & rReason )
+{
+ DELETEZ( pApp );
+ LoadFinished( sal_False );
+}
+
+void SfxJavaLoader::LoadFinished( sal_Bool bOK )
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrameLoader > xRef( this );
+ DELETEZ( pApp );
+
+ if ( bOK )
+ xListener->loadFinished( this );
+ else
+ xListener->loadCancelled( this );
+}
+
+#endif
+#endif // (mba)
+/*
+::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SfxLoaderFactory::createInstance(const ::rtl::OUString& ServiceSpecifier) throw( ::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException )
+{
+}
+
+SFX_IMPL_UNO_OBJECT_1( SfxLoaderFactory, "LoaderFactory", ::com::sun::star::lang::XMultiServiceFactory );
+
+SfxLoaderFactory::SfxLoaderFactory()
+{
+}
+
+::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SfxLoaderFactory::createInstanceWithArguments(const ::rtl::OUString& ServiceSpecifier, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& Arguments) throw( ::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException )
+{
+ return xRet;
+}
+
+::com::sun::star::uno::Sequence< ::rtl::OUString > SfxLoaderFactory::getAvailableServiceNames(void) throw( ::com::sun::star::uno::RuntimeException )
+{
+
+ ::com::sun::star::uno::Sequence< ::rtl::OUString > aRet(9);
+ ::rtl::OUString *pArr = aRet.getArray();
+ pArr[0] = "ftp:";
+ pArr[1] = "http:";
+ pArr[2] = "https:";
+ pArr[3] = "file:";
+ pArr[4] = "news:";
+ pArr[5] = "staroffice.private:";
+ pArr[6] = "imap:";
+ pArr[7] = "pop3:";
+ pArr[8] = "vim:";
+
+ return aRet;
+}
+*/
+SFX_IMPL_XINTERFACE_1( DownloaderLoader, OWeakObject, ::com::sun::star::frame::XFrameLoader )
+SFX_IMPL_XTYPEPROVIDER_1( DownloaderLoader, ::com::sun::star::frame::XFrameLoader )
+SFX_IMPL_XSERVICEINFO( DownloaderLoader, FRAMELOADER_SERVICENAME, "com.sun.star.comp.sfx2.DownloaderLoader" )
+SFX_IMPL_SINGLEFACTORY( DownloaderLoader )
+
+// -----------------------------------------------------------------------
+void SAL_CALL DownloaderLoader::load ( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > & rFrame ,
+ const ::rtl::OUString& rURL,
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rArgs ,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XLoadEventListener > & rListener ) throw ( ::com::sun::star::uno::RuntimeException )
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > aRef = rFrame->getContainerWindow () ;
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xMgr( ::utl::getProcessServiceFactory() ) ;
+
+ DownloadController* pController = new DownloadController(xMgr) ;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController > xController = ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController > ( pController ) ;
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl > xControl ( xMgr->createInstance (DEFINE_CONST_UNICODE("com.sun.star.awt.XProgressMonitor") ), ::com::sun::star::uno::UNO_QUERY ) ;
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > xWindow ( xControl , ::com::sun::star::uno::UNO_QUERY ) ;
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > xPeer ( aRef , ::com::sun::star::uno::UNO_QUERY ) ;
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XButton > xButton ( xControl , ::com::sun::star::uno::UNO_QUERY ) ;
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener > xActionListener ( xController , ::com::sun::star::uno::UNO_QUERY ) ;
+
+ DBG_ASSERT ( xControl.is() , "DownloaderLoader::load(..)\nXProgressMonitor has no valid interface ::com::sun::star::awt::XControl!\n" ) ;
+ DBG_ASSERT ( xWindow.is() , "DownloaderLoader::load(..)\nXProgressMonitor has no valid interface ::com::sun::star::awt::XWindow!\n" ) ;
+ DBG_ASSERT ( xPeer.is() , "DownloaderLoader::load(..)\nXFrame->getContainerWindow() has no valid interface ::com::sun::star::awt::XWindowPeer!\n" ) ;
+ DBG_ASSERT ( xButton.is() , "DownloaderLoader::load(..)\nXProgressMonitor has no valid interface ::com::sun::star::awt::XButton!\n" ) ;
+ DBG_ASSERT ( xActionListener.is(), "DownloaderLoader::load(..)\nDownloadController has no valid interface ::com::sun::star::awt::XActionListener!\n" ) ;
+
+ // dont't forget to create peer BEFORE call "setComponent" at FRAME !!!
+ // (else frame calls this method without valid toolkit and parent!!! => CRASH )
+ xControl->createPeer ( xPeer->getToolkit(), xPeer ) ;
+
+ // try to start download
+ String aTempURL = rURL ;
+ sal_Bool bOK = pController->StartDownload ( aTempURL ) ;
+ if ( bOK)
+ {
+ rFrame->setComponent ( xWindow, xController );
+ xController->attachFrame ( rFrame );
+ xButton->addActionListener ( xActionListener );
+ xButton->setActionCommand ( DEFINE_CONST_UNICODE("BreakDownload") );
+
+ if ( rListener.is() )
+ rListener->loadFinished (this) ;
+ }
+ else if (rListener.is() )
+ // no download - no download monitor !
+ rListener->loadCancelled( this ) ;
+}
+
+// -----------------------------------------------------------------------
+DownloaderLoader::DownloaderLoader( com::sun::star::uno::Reference < class com::sun::star::lang::XMultiServiceFactory > const &)
+{
+}
+
+// -----------------------------------------------------------------------
+DownloaderLoader::~DownloaderLoader()
+{
+}
+
+// -----------------------------------------------------------------------
+
+void SAL_CALL DownloaderLoader::cancel(void) throw ( ::com::sun::star::uno::RuntimeException )
+{
+}
+
+SFX_IMPL_XINTERFACE_1( SfxMacroLoader, OWeakObject, ::com::sun::star::frame::XFrameLoader )
+SFX_IMPL_XTYPEPROVIDER_1( SfxMacroLoader, ::com::sun::star::frame::XFrameLoader )
+SFX_IMPL_XSERVICEINFO( SfxMacroLoader, FRAMELOADER_SERVICENAME, "com.sun.star.comp.sfx2.SfxMacroLoader" )
+SFX_IMPL_SINGLEFACTORY( SfxMacroLoader )
+
+// -----------------------------------------------------------------------
+void SAL_CALL SfxMacroLoader::load ( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > & rFrame ,
+ const ::rtl::OUString& rURL,
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rArgs ,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XLoadEventListener > & rListener ) throw ( ::com::sun::star::uno::RuntimeException )
+{
+ SfxApplication* pApp = SFX_APP();
+ pApp->EnterBasicCall();
+
+ // macro:-::com::sun::star::util::URL analysiern
+ // 'macro://#lib.mod.proc(args)' => Macro via App-BASIC-Mgr
+ // 'macro:#lib.mod.proc(args)' => Macro via zugehoerigen Doc-BASIC-Mgr
+ // 'macro:obj.method(args)' => Object via App-BASIC-Mgr
+ String aMacro( rURL );
+ sal_uInt16 nHashPos = aMacro.Search( '#' );
+ sal_uInt16 nArgsPos = aMacro.Search( '(' );
+ BasicManager *pBasMgr = 0;
+ ErrCode nErr = ERRCODE_NONE;
+
+ // wird Macro angesprochen (also KEIN Object)?
+ if ( STRING_NOTFOUND != nHashPos && nHashPos < nArgsPos )
+ {
+ // BasManager ermitteln
+ String aBasMgrName( INetURLObject::decode(aMacro.Copy( 6, nHashPos-6 ), INET_HEX_ESCAPE, INetURLObject::DECODE_WITH_CHARSET) );
+ if ( aBasMgrName.EqualsAscii("//") )
+ pBasMgr = pApp->GetBasicManager();
+ else if ( !aBasMgrName.Len() )
+ pBasMgr = SfxObjectShell::Current()->GetBasicManager();
+ else
+ for ( SfxObjectShell *pObjSh = SfxObjectShell::GetFirst();
+ pObjSh && !pBasMgr;
+ pObjSh = SfxObjectShell::GetNext(*pObjSh) )
+ if ( aBasMgrName == pObjSh->GetTitle(SFX_TITLE_APINAME) )
+ pBasMgr = pObjSh->GetBasicManager();
+ if ( pBasMgr )
+ {
+ // Funktion suchen
+ String aQualifiedMethod( INetURLObject::decode(aMacro.Copy( nHashPos+1 ), INET_HEX_ESCAPE, INetURLObject::DECODE_WITH_CHARSET) );
+ String aArgs;
+ if ( STRING_NOTFOUND != nArgsPos )
+ {
+ aArgs = aQualifiedMethod.Copy( nArgsPos - nHashPos - 1 );
+ aQualifiedMethod.Erase( nArgsPos - nHashPos - 1 );
+ }
+
+ SbxMethod *pMethod = SfxQueryMacro( pBasMgr, aQualifiedMethod );
+
+ // falls gefunden Funktion ueber ihren Parent ausfuehren
+ if ( pMethod )
+ {
+ String aQuotedArgs;
+ if ( aArgs.Len()<2 || aArgs.GetBuffer()[1] == '\"')
+ aQuotedArgs = aArgs;
+ else
+ {
+ // Klammern entfernen
+ aArgs.Erase(0,1);
+ aArgs.Erase( aArgs.Len()-1,1);
+
+ aQuotedArgs = '(';
+
+ // Alle Parameter mit T"uddelchen
+ sal_uInt16 nCount = aArgs.GetTokenCount(',');
+ for ( sal_uInt16 n=0; n<nCount; n++ )
+ {
+ aQuotedArgs += '\"';
+ aQuotedArgs += aArgs.GetToken( n, ',' );
+ aQuotedArgs += '\"';
+ if ( n<nCount-1 )
+ aQuotedArgs += ',';
+ }
+
+ aQuotedArgs += ')';
+ }
+
+ String aCall( '[' );
+ aCall += pMethod->GetName();
+ aCall += aQuotedArgs;
+ aCall += ']';
+ pMethod->GetParent()->Execute( aCall );
+ nErr = SbxBase::GetError();
+ }
+ else
+ nErr = ERRCODE_BASIC_PROC_UNDEFINED;
+ }
+ else
+ nErr = ERRCODE_IO_NOTEXISTS;
+ }
+ else
+ {
+ // (optional Objekt-qualifizierte) Basic-Funktion ausfuehren
+ String aCall( '[' );
+ aCall += INetURLObject::decode(aMacro.Copy(6), INET_HEX_ESCAPE, INetURLObject::DECODE_WITH_CHARSET);
+ aCall += ']';
+ pApp->GetBasicManager()->GetLib(0)->Execute( aCall );
+ nErr = SbxBase::GetError();
+ }
+
+ pApp->LeaveBasicCall();
+ SbxBase::ResetError();
+ if ( rListener.is() )
+ {
+ if( nErr == ERRCODE_NONE )
+ rListener->loadFinished (this) ;
+ else
+ rListener->loadCancelled( this ) ;
+ }
+}
+
+// -----------------------------------------------------------------------
+SfxMacroLoader::SfxMacroLoader( com::sun::star::uno::Reference < class com::sun::star::lang::XMultiServiceFactory > const &)
+{
+}
+
+// -----------------------------------------------------------------------
+SfxMacroLoader::~SfxMacroLoader()
+{
+}
+
+// -----------------------------------------------------------------------
+
+void SAL_CALL SfxMacroLoader::cancel(void) throw ( ::com::sun::star::uno::RuntimeException )
+{
+}
+
+
+
+// -----------------------------------------------------------------------
+
+extern "C" {
+
+void SAL_CALL component_getImplementationEnvironment( const sal_Char** ppEnvironmentTypeName ,
+ uno_Environment** ppEnvironment )
+{
+ *ppEnvironmentTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME ;
+}
+
+sal_Bool SAL_CALL component_writeInfo( void* pServiceManager ,
+ void* pRegistryKey )
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::registry::XRegistryKey > xKey( reinterpret_cast< ::com::sun::star::registry::XRegistryKey* >( pRegistryKey ) ) ;
+
+ // Eigentliche Implementierung und ihre Services registrieren
+ ::rtl::OUString aImpl;
+ ::rtl::OUString aTempStr;
+ ::rtl::OUString aKeyStr;
+ Reference< XRegistryKey > xNewKey;
+ Reference< XRegistryKey > xLoaderKey;
+
+ aImpl = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/"));
+ aImpl += DownloaderLoader::impl_getStaticImplementationName();
+
+ aTempStr = aImpl;
+ aTempStr += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES"));
+ xNewKey = xKey->createKey( aTempStr );
+ xNewKey->createKey( ::rtl::OUString::createFromAscii("com.sun.star.frame.FrameLoader") );
+
+ aImpl = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/"));
+ aImpl += SfxFrameLoader_Impl::impl_getStaticImplementationName();
+
+ aTempStr = aImpl;
+ aTempStr += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES"));
+ xNewKey = xKey->createKey( aTempStr );
+ xNewKey->createKey( ::rtl::OUString::createFromAscii("com.sun.star.frame.FrameLoader") );
+
+ aTempStr = aImpl;
+ aTempStr += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/Loader"));
+ xNewKey = xKey->createKey( aTempStr );
+
+ aTempStr = aImpl;
+ aTempStr += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/Loader"));
+ xLoaderKey = xKey->createKey( aTempStr );
+ xNewKey = xLoaderKey->createKey( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Pattern")) );
+ xNewKey->setAsciiValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("private:factory/*" )) );
+
+ aImpl = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/"));
+ aImpl += SfxFilterDetect_Impl::impl_getStaticImplementationName();
+
+ aTempStr = aImpl;
+ aTempStr += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES"));
+ xNewKey = xKey->createKey( aTempStr );
+ xNewKey->createKey( ::rtl::OUString::createFromAscii("com.sun.star.frame.ExtendedFilterDetect") );
+
+ aImpl = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/"));
+ aImpl += SfxMacroLoader::impl_getStaticImplementationName();
+
+ aTempStr = aImpl;
+ aTempStr += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES"));
+ xNewKey = xKey->createKey( aTempStr );
+ xNewKey->createKey( ::rtl::OUString::createFromAscii("com.sun.star.frame.FrameLoader") );
+
+ aTempStr = aImpl;
+ aTempStr += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/Loader"));
+ xNewKey = xKey->createKey( aTempStr );
+
+ aTempStr = aImpl;
+ aTempStr += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/Loader"));
+ xLoaderKey = xKey->createKey( aTempStr );
+ xNewKey = xLoaderKey->createKey( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Pattern")) );
+ xNewKey->setAsciiValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("macro:*" )) );
+
+ return True;
+}
+
+void* SAL_CALL component_getFactory( const sal_Char* pImplementationName ,
+ void* pServiceManager ,
+ void* pRegistryKey )
+{
+ // Set default return value for this operation - if it failed.
+ void* pReturn = NULL ;
+
+ if (
+ ( pImplementationName != NULL ) &&
+ ( pServiceManager != NULL )
+ )
+ {
+ // Define variables which are used in following macros.
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > xFactory ;
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceManager( reinterpret_cast< ::com::sun::star::lang::XMultiServiceFactory* >( pServiceManager ) ) ;
+
+ //=============================================================================
+ // Add new macro line to handle new service.
+ //
+ // !!! ATTENTION !!!
+ // Write no ";" at end of line and dont forget "else" ! (see macro)
+ //=============================================================================
+ IF_NAME_CREATECOMPONENTFACTORY( DownloaderLoader )
+ IF_NAME_CREATECOMPONENTFACTORY( SfxFrameLoader_Impl )
+ IF_NAME_CREATECOMPONENTFACTORY( SfxFilterDetect_Impl )
+ IF_NAME_CREATECOMPONENTFACTORY( SfxMacroLoader )
+
+ // Factory is valid - service was found.
+ if ( xFactory.is() )
+ {
+ xFactory->acquire();
+ pReturn = xFactory.get();
+ }
+ }
+
+ // Return with result of this operation.
+ return pReturn ;
+}
+} // extern "C"
+
+
diff --git a/sfx2/source/appl/childwin.cxx b/sfx2/source/appl/childwin.cxx
new file mode 100644
index 000000000000..99ae007dae5b
--- /dev/null
+++ b/sfx2/source/appl/childwin.cxx
@@ -0,0 +1,679 @@
+/*************************************************************************
+ *
+ * $RCSfile: childwin.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:27 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _SFXINIMGR_HXX //autogen
+#include <svtools/iniman.hxx>
+#endif
+#ifndef _TOOLBOX_HXX //autogen
+#include <vcl/toolbox.hxx>
+#endif
+#ifndef _RCID_H
+#include <vcl/rcid.h>
+#endif
+
+#ifndef _COM_SUN_STAR_FRAME_XCONTROLLER_HPP_
+#include <com/sun/star/frame/XController.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XFRAME_HPP_
+#include <com/sun/star/frame/XFrame.hpp>
+#endif
+
+#pragma hdrstop
+
+#include "childwin.hxx"
+#include "app.hxx"
+#include "arrdecl.hxx"
+#include "bindings.hxx"
+#include "module.hxx"
+#include "dockwin.hxx"
+#include "dispatch.hxx"
+#include "appdata.hxx"
+#include <workwin.hxx>
+
+static const sal_uInt16 nVersion = 1;
+
+DBG_NAME(SfxChildWindow)
+
+SV_IMPL_PTRARR( SfxChildWinContextArr_Impl, SfxChildWinContextFactory* );
+
+struct SfxChildWindow_Impl
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > xFrame;
+ SfxChildWinFactory* pFact;
+ sal_Bool bHideNotDelete;
+ sal_Bool bVisible;
+ sal_Bool bHideAtToggle;
+ SfxModule* pContextModule;
+ SfxWorkWindow* pWorkWin;
+};
+
+//=========================================================================
+SfxChildWindow::SfxChildWindow(Window *pParentWindow, sal_uInt16 nId)
+ : pParent(pParentWindow)
+ , eChildAlignment(SFX_ALIGN_NOALIGNMENT)
+ , nType(nId)
+ , pWindow(0L)
+{
+ pImp = new SfxChildWindow_Impl;
+ pImp->pFact = 0L;
+ pImp->bHideNotDelete = sal_False;
+ pImp->bHideAtToggle = sal_False;
+ pImp->bVisible = sal_True;
+ pImp->pContextModule = NULL;
+ pImp->pWorkWin = NULL;
+
+ pContext = 0L;
+ DBG_CTOR(SfxChildWindow,0);
+}
+
+//-------------------------------------------------------------------------
+SfxChildWindow::~SfxChildWindow()
+{
+ DBG_DTOR(SfxChildWindow,0);
+ if ( pContext )
+ delete pContext;
+ delete pWindow;
+ delete pImp;
+}
+
+//-------------------------------------------------------------------------
+SfxChildWindow* SfxChildWindow::CreateChildWindow( sal_uInt16 nId,
+ Window *pParent, SfxBindings* pBindings, SfxChildWinInfo& rInfo)
+{
+ SfxChildWindow *pChild=0;
+ SfxChildWinFactory* pFact=0;
+ sal_uInt16 nOldMode = Application::GetSystemWindowMode();
+
+ // Zuerst ChildWindow im SDT suchen; "Uberlagerungen m"ussen mit einem
+ // ChildWindowContext realisiert werden
+ SfxApplication *pApp = SFX_APP();
+ SfxChildWinFactArr_Impl &rFactories = pApp->GetChildWinFactories_Impl();
+ for ( sal_uInt16 nFactory = 0; nFactory < rFactories.Count(); ++nFactory )
+ {
+ pFact = rFactories[nFactory];
+ if ( pFact->nId == nId )
+ {
+ SfxChildWinInfo& rFactInfo = pFact->aInfo;
+ if ( rInfo.bVisible )
+ {
+ if ( pBindings )
+ pBindings->ENTERREGISTRATIONS();
+ rFactInfo.nFlags |= rInfo.nFlags & SFX_CHILDWIN_FORCEDOCK;
+ SfxChildWinInfo aInfo = rFactInfo;
+ Application::SetSystemWindowMode( SYSTEMWINDOW_MODE_NOAUTOMODE );
+ pChild = pFact->pCtor( pParent, nId, pBindings, &aInfo );
+ Application::SetSystemWindowMode( nOldMode );
+ rFactInfo.nFlags &= ~(rInfo.nFlags & SFX_CHILDWIN_FORCEDOCK );
+ if ( pBindings )
+ pBindings->LEAVEREGISTRATIONS();
+ }
+
+ break;
+ }
+ }
+
+ SfxDispatcher *pDisp = pBindings->GetDispatcher_Impl();
+ SfxModule *pMod = pDisp ? pApp->GetActiveModule( pDisp->GetFrame() ) :0;
+ if ( !pChild && pMod )
+ {
+ SfxChildWinFactArr_Impl *pFactories = pMod->GetChildWinFactories_Impl();
+ if ( pFactories )
+ {
+ SfxChildWinFactArr_Impl &rFactories = *pFactories;
+ for ( sal_uInt16 nFactory = 0; nFactory < rFactories.Count(); ++nFactory )
+ {
+ pFact = rFactories[nFactory];
+ if ( pFact->nId == nId )
+ {
+ SfxChildWinInfo& rFactInfo = pFact->aInfo;
+ if ( rInfo.bVisible )
+ {
+ if ( pBindings )
+ pBindings->ENTERREGISTRATIONS();
+ rFactInfo.nFlags |= rInfo.nFlags & SFX_CHILDWIN_FORCEDOCK;
+ SfxChildWinInfo aInfo = rFactInfo;
+ Application::SetSystemWindowMode( SYSTEMWINDOW_MODE_NOAUTOMODE );
+ pChild = pFact->pCtor( pParent, nId, pBindings, &aInfo );
+ Application::SetSystemWindowMode( nOldMode );
+ rFactInfo.nFlags &= ~(rInfo.nFlags & SFX_CHILDWIN_FORCEDOCK );
+ if ( pBindings )
+ pBindings->LEAVEREGISTRATIONS();
+ }
+
+ break;
+ }
+ }
+ }
+ }
+
+ if ( pChild )
+ pChild->SetFactory_Impl( pFact );
+
+ DBG_ASSERT(pFact && (pChild || !rInfo.bVisible), "ChildWindow-Typ nicht registriert!");
+
+ if ( pChild && !pChild->pWindow )
+ {
+ DELETEZ(pChild);
+ DBG_WARNING("ChildWindow hat kein Fenster!");
+ }
+
+ return pChild;
+}
+
+//-------------------------------------------------------------------------
+void SfxChildWindow::SaveStatus(const SfxChildWinInfo& rInfo)
+{
+// if ( SFX_APP()->Get_Impl()->bBean )
+// return;
+
+ SfxIniManager *pIniMgr = SFX_INIMANAGER();
+ char cToken = pIniMgr->GetToken();;
+ String aWinData('V');
+ aWinData += String::CreateFromInt32( nVersion );
+ aWinData += cToken;
+ aWinData += String( pIniMgr->GetString( rInfo.aPos, rInfo.aSize ) );
+ aWinData += cToken;
+ aWinData += rInfo.bVisible ? 'V' : 'H';
+ aWinData += cToken;
+ aWinData += String::CreateFromInt32(rInfo.nFlags);
+ if ( rInfo.aExtraString.Len() )
+ {
+ aWinData += cToken;
+ aWinData += rInfo.aExtraString;
+ }
+ pIniMgr->Set( aWinData, SFX_KEY_WINDOW, GetType() );
+ pImp->pFact->aInfo = rInfo;
+}
+
+//-------------------------------------------------------------------------
+void SfxChildWindow::SetAlignment(SfxChildAlignment eAlign)
+{
+ DBG_CHKTHIS(SfxChildWindow,0);
+
+ eChildAlignment = eAlign;
+}
+
+//-------------------------------------------------------------------------
+void SfxChildWindow::SetPosSizePixel(const Point& rPoint, Size& rSize)
+{
+ DBG_CHKTHIS(SfxChildWindow,0);
+
+ pWindow->SetPosSizePixel(rPoint, rSize);
+}
+
+//-------------------------------------------------------------------------
+SfxChildWinInfo SfxChildWindow::GetInfo() const
+{
+ DBG_CHKTHIS(SfxChildWindow,0);
+
+ SfxChildWinInfo aInfo;
+ aInfo.aPos = pWindow->GetPosPixel();
+ aInfo.aSize = pWindow->GetSizePixel();
+ aInfo.bVisible = pImp->bVisible;
+ aInfo.nFlags = 0;
+ return aInfo;
+}
+
+//-------------------------------------------------------------------------
+sal_uInt16 SfxChildWindow::GetPosition()
+{
+ return pImp->pFact->nPos;
+}
+
+//-------------------------------------------------------------------------
+void SfxChildWindow::InitializeChildWinFactory_Impl( sal_uInt16 nId, SfxChildWinInfo& rInfo )
+{
+ // Konfiguration aus Ini-Manager laden
+ SfxIniManager *pAppIniMgr = SFX_APP()->GetAppIniManager();
+ String aWinData( pAppIniMgr->Get( SFX_KEY_WINDOW, nId ) );
+
+ if ( /*!SFX_APP()->Get_Impl()->bBean && */ aWinData.Len() )
+ {
+ // Nach Versionskennung suchen
+ if ( aWinData.GetChar((sal_uInt16)0) != 0x0056 ) // 'V' = 56h
+ // Keine Versionskennung, daher nicht verwenden
+ return;
+
+ // 'V' l"oschen
+ aWinData.Erase(0,1);
+
+ // Version lesen
+ char cToken = pAppIniMgr->GetToken();
+ sal_uInt16 nPos = aWinData.Search( cToken );
+ sal_uInt16 nVersion = (sal_uInt16) aWinData.Copy( 0, nPos+1 ).ToInt32();
+ aWinData.Erase(0,nPos+1);
+
+ // Gr"o\se und Position laden
+ Point aPos;
+ Size aSize;
+ if ( pAppIniMgr->GetPosSize(
+ aWinData.Copy( 0 , aWinData.Search( cToken ) ),
+ aPos, aSize ) )
+ {
+ rInfo.aPos = aPos;
+ rInfo.aSize = aSize;
+ }
+ aWinData.Erase(0,aWinData.Search(cToken));
+
+ // Sichtbarkeit laden: ist als ein char codiert
+ rInfo.bVisible = (aWinData.Copy(1,1) == 0x0056); // 'V' = 56h
+ aWinData.Erase(1,1);
+
+ nPos = aWinData.Search( pAppIniMgr->GetToken(), 2 );
+ if (nPos != STRING_NOTFOUND)
+ {
+ // es gibt noch Extra-Information
+ rInfo.nFlags = aWinData.Copy( 2 , nPos-2 ).ToInt32();
+ aWinData.Erase(2,nPos-2);
+ rInfo.aExtraString = aWinData.Copy( 3 );
+ aWinData.Erase(3);
+ }
+ else
+ {
+ // Zeile ist nach Flags zu Ende
+ rInfo.nFlags = aWinData.Copy( 2 ).ToInt32();
+ aWinData.Erase(2);
+ }
+ }
+
+// if ( SFX_APP()->Get_Impl()->bBean )
+// {
+// if ( rInfo.bVisible != 42 )
+// rInfo.bVisible = sal_False;
+// }
+}
+
+void SfxChildWindow::CreateContext( sal_uInt16 nContextId, SfxBindings& rBindings )
+{
+ SfxChildWindowContext *pCon = NULL;
+ SfxChildWindow *pChild=0;
+ SfxChildWinFactory* pFact=0;
+ SfxApplication *pApp = SFX_APP();
+ SfxDispatcher *pDisp = rBindings.GetDispatcher_Impl();
+ SfxModule *pMod = pDisp ? pApp->GetActiveModule( pDisp->GetFrame() ) :0;
+ if ( pMod )
+ {
+ SfxChildWinFactArr_Impl *pFactories = pMod->GetChildWinFactories_Impl();
+ if ( pFactories )
+ {
+ SfxChildWinFactArr_Impl &rFactories = *pFactories;
+ for ( sal_uInt16 nFactory = 0; nFactory < rFactories.Count(); ++nFactory )
+ {
+ pFact = rFactories[nFactory];
+ if ( pFact->nId == GetType() )
+ {
+ DBG_ASSERT( pFact->pArr, "Kein Kontext angemeldet!" );
+ if ( !pFact->pArr )
+ break;
+
+ SfxChildWinContextFactory *pConFact=0;
+ for ( sal_uInt16 n=0; n<pFact->pArr->Count(); ++n )
+ {
+ pConFact = (*pFact->pArr)[n];
+ rBindings.ENTERREGISTRATIONS();
+ if ( pConFact->nContextId == nContextId )
+ {
+ SfxChildWinInfo aInfo = pFact->aInfo;
+ pCon = pConFact->pCtor( GetWindow(), &rBindings, &aInfo );
+ pCon->nContextId = pConFact->nContextId;
+ pImp->pContextModule = pMod;
+ }
+ rBindings.LEAVEREGISTRATIONS();
+ }
+ break;
+ }
+ }
+ }
+ }
+
+ if ( !pCon )
+ {
+ SfxChildWinFactArr_Impl &rFactories = pApp->GetChildWinFactories_Impl();
+ for ( sal_uInt16 nFactory = 0; nFactory < rFactories.Count(); ++nFactory )
+ {
+ pFact = rFactories[nFactory];
+ if ( pFact->nId == GetType() )
+ {
+ DBG_ASSERT( pFact->pArr, "Kein Kontext angemeldet!" );
+ if ( !pFact->pArr )
+ break;
+
+ SfxChildWinContextFactory *pConFact=0;
+ for ( sal_uInt16 n=0; n<pFact->pArr->Count(); ++n )
+ {
+ pConFact = (*pFact->pArr)[n];
+ rBindings.ENTERREGISTRATIONS();
+ if ( pConFact->nContextId == nContextId )
+ {
+ SfxChildWinInfo aInfo = pFact->aInfo;
+ pCon = pConFact->pCtor( GetWindow(), &rBindings, &aInfo );
+ pCon->nContextId = pConFact->nContextId;
+ pImp->pContextModule = NULL;
+ }
+ rBindings.LEAVEREGISTRATIONS();
+ }
+ break;
+ }
+ }
+ }
+
+ if ( !pCon )
+ {
+ DBG_ERROR( "Kein geeigneter Context gefunden!" );
+ return;
+ }
+
+ if ( pContext )
+ delete( pContext );
+ pContext = pCon;
+ pContext->GetWindow()->SetSizePixel( pWindow->GetOutputSizePixel() );
+ pContext->GetWindow()->Show();
+}
+
+SfxChildWindowContext::SfxChildWindowContext( sal_uInt16 nId )
+ : pWindow( NULL )
+ , nContextId( nId )
+{
+}
+
+SfxChildWindowContext::~SfxChildWindowContext()
+{
+ delete pWindow;
+}
+
+FloatingWindow* SfxChildWindowContext::GetFloatingWindow() const
+{
+ Window *pParent = pWindow->GetParent();
+ if ( pParent->GetType() == RSC_DOCKINGWINDOW || pParent->GetType() == RSC_TOOLBOX )
+ {
+ return ((DockingWindow*)pParent)->GetFloatingWindow();
+ }
+ else if ( pParent->GetType() == RSC_FLOATINGWINDOW )
+ {
+ return (FloatingWindow*) pParent;
+ }
+ else
+ {
+ DBG_ERROR("Kein FloatingWindow-Context!");
+ return NULL;
+ }
+}
+
+SfxChildAlignment SfxChildWindowContext::GetAlignment() const
+{
+ Window *pParent = pWindow->GetParent();
+ if ( pParent->GetType() == RSC_DOCKINGWINDOW )
+ {
+ return ((SfxDockingWindow*)pParent)->GetAlignment();
+ }
+ else if ( pParent->GetType() == RSC_TOOLBOX )
+ {
+ HACK(noch nicht verwendet und noch nicht implementiert);
+ return SFX_ALIGN_NOALIGNMENT;
+ }
+ else
+ return SFX_ALIGN_NOALIGNMENT;
+}
+
+void SfxChildWindowContext::Resizing( Size& rSize )
+{
+}
+
+sal_Bool SfxChildWindowContext::Close()
+{
+ return sal_True;
+}
+
+void SfxChildWindow::SetFactory_Impl( SfxChildWinFactory *pF )
+{
+ pImp->pFact = pF;
+}
+
+void SfxChildWindow::SetHideNotDelete( sal_Bool bOn )
+{
+ pImp->bHideNotDelete = bOn;
+}
+
+sal_Bool SfxChildWindow::IsHideNotDelete() const
+{
+ return pImp->bHideNotDelete;
+}
+
+void SfxChildWindow::SetHideAtToggle( sal_Bool bOn )
+{
+ pImp->bHideAtToggle = bOn;
+}
+
+sal_Bool SfxChildWindow::IsHideAtToggle() const
+{
+ return pImp->bHideAtToggle;
+}
+
+sal_Bool SfxChildWinInfo::GetExtraData_Impl
+(
+ SfxChildAlignment *pAlign,
+ SfxChildAlignment *pLastAlign,
+ Size *pSize,
+ sal_uInt16 *pLine,
+ sal_uInt16 *pPos
+) const
+{
+ // ung"ultig?
+ if ( !aExtraString.Len() )
+ return sal_False;
+ String aStr;
+ sal_uInt16 nPos = aExtraString.SearchAscii("AL:");
+ if ( nPos == STRING_NOTFOUND )
+ return sal_False;
+
+ // Versuche, den Alignment-String "ALIGN:(...)" einzulesen; wenn
+ // er nicht vorhanden ist, liegt eine "altere Version vor
+ if ( nPos != STRING_NOTFOUND )
+ {
+ sal_uInt16 n1 = aExtraString.Search('(', nPos);
+ if ( n1 != STRING_NOTFOUND )
+ {
+ sal_uInt16 n2 = aExtraString.Search(')', n1);
+ if ( n2 != STRING_NOTFOUND )
+ {
+ // Alignment-String herausschneiden
+ aStr = aExtraString.Copy(nPos, n2 - nPos + 1);
+ aStr.Erase(nPos, n1-nPos+1);
+ }
+ }
+ }
+
+ // Zuerst das Alignment extrahieren
+ if ( !aStr.Len() )
+ return sal_False;
+ if ( pAlign )
+ *pAlign = (SfxChildAlignment) (sal_uInt16) aStr.ToInt32();
+
+ // Dann das LastAlignment
+ nPos = aStr.Search(',');
+ if ( nPos == STRING_NOTFOUND )
+ return sal_False;
+ aStr.Erase(0, nPos+1);
+ if ( pLastAlign )
+ *pLastAlign = (SfxChildAlignment) (sal_uInt16) aStr.ToInt32();
+
+ // Dann die Splitting-Informationen
+ nPos = aStr.Search(',');
+ if ( nPos == STRING_NOTFOUND )
+ // Dockt nicht in einem Splitwindow
+ return sal_True;
+ aStr.Erase(0, nPos+1);
+ SfxIniManager *pAppIniMgr = SFX_APP()->GetAppIniManager();
+ Point aPos;
+ Size aSize;
+ if ( pAppIniMgr->GetPosSize( aStr, aPos, aSize ) )
+ {
+ if ( pSize )
+ *pSize = aSize;
+ if ( pLine )
+ *pLine = (sal_uInt16) aPos.X();
+ if ( pPos )
+ *pPos = (sal_uInt16) aPos.Y();
+ return sal_True;
+ }
+
+ return sal_False;
+}
+
+sal_Bool SfxChildWindow::IsVisible() const
+{
+ return pImp->bVisible;
+}
+
+void SfxChildWindow::SetVisible_Impl( sal_Bool bVis )
+{
+ pImp->bVisible = bVis;
+}
+
+void SfxChildWindow::Hide()
+{
+ switch ( pWindow->GetType() )
+ {
+ case RSC_DOCKINGWINDOW :
+ ((DockingWindow*)pWindow)->Hide();
+ break;
+ case RSC_TOOLBOX :
+ ((ToolBox*)pWindow)->Hide();
+ break;
+ default:
+ pWindow->Hide();
+ break;
+ }
+}
+
+
+
+void SfxChildWindow::Show()
+{
+ switch ( pWindow->GetType() )
+ {
+ case RSC_DOCKINGWINDOW :
+ ((DockingWindow*)pWindow)->Show();
+ break;
+ case RSC_TOOLBOX :
+ ((ToolBox*)pWindow)->Show();
+ break;
+ default:
+ pWindow->Show();
+ break;
+ }
+}
+
+Window* SfxChildWindow::GetContextWindow( SfxModule *pModule ) const
+{
+ return pModule == pImp->pContextModule && pContext ? pContext->GetWindow(): 0;
+}
+
+void SfxChildWindow::SetWorkWindow_Impl( SfxWorkWindow* pWin )
+{
+ pImp->pWorkWin = pWin;
+ if ( pWindow->HasChildPathFocus() )
+ pImp->pWorkWin->SetActiveChild_Impl( pWindow );
+}
+
+SfxWorkWindow* SfxChildWindow::GetWorkWindow_Impl() const
+{
+ return pImp->pWorkWin;
+}
+
+void SfxChildWindow::Activate_Impl()
+{
+ if(pImp->pWorkWin!=NULL) //@#60568#
+ pImp->pWorkWin->SetActiveChild_Impl( pWindow );
+}
+
+void SfxChildWindow::Deactivate_Impl()
+{
+// pImp->pWorkWin->SetActiveChild_Impl( NULL );
+}
+
+sal_Bool SfxChildWindow::QueryClose()
+{
+ if ( pImp->xFrame.is() )
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController > xCtrl = pImp->xFrame->getController();
+ if ( xCtrl.is() )
+ xCtrl->suspend( sal_True );
+ }
+
+ return sal_True;
+}
+
+::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > SfxChildWindow::GetFrame()
+{
+ return pImp->xFrame;
+}
+
+void SfxChildWindow::SetFrame( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > & rFrame )
+{
+ pImp->xFrame = rFrame;
+}
+
+sal_Bool SfxChildWindow::CanGetFocus() const
+{
+ return !(pImp->pFact->aInfo.nFlags & SFX_CHILDWIN_CANTGETFOCUS);
+}
+
diff --git a/sfx2/source/appl/makefile.mk b/sfx2/source/appl/makefile.mk
new file mode 100644
index 000000000000..900d0349df37
--- /dev/null
+++ b/sfx2/source/appl/makefile.mk
@@ -0,0 +1,158 @@
+#*************************************************************************
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.1.1.1 $
+#
+# last change: $Author: hr $ $Date: 2000-09-18 16:52:27 $
+#
+# The Contents of this file are made available subject to the terms of
+# either of the following licenses
+#
+# - GNU Lesser General Public License Version 2.1
+# - Sun Industry Standards Source License Version 1.1
+#
+# Sun Microsystems Inc., October, 2000
+#
+# GNU Lesser General Public License Version 2.1
+# =============================================
+# Copyright 2000 by Sun Microsystems, Inc.
+# 901 San Antonio Road, Palo Alto, CA 94303, USA
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License version 2.1, as published by the Free Software Foundation.
+#
+# This library 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 for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+#
+# Sun Industry Standards Source License Version 1.1
+# =================================================
+# The contents of this file are subject to the Sun Industry Standards
+# Source License Version 1.1 (the "License"); You may not use this file
+# except in compliance with the License. You may obtain a copy of the
+# License at http://www.openoffice.org/license.html.
+#
+# Software provided under this License is provided on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+# See the License for the specific provisions governing your rights and
+# obligations concerning the Software.
+#
+# The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+#
+# Copyright: 2000 by Sun Microsystems, Inc.
+#
+# All Rights Reserved.
+#
+# Contributor(s): _______________________________________
+#
+#
+#
+#*************************************************************************
+
+PRJ=..$/..
+
+PRJNAME=sfx2
+TARGET=appl
+ENABLE_EXCEPTIONS=TRUE
+.INCLUDE : $(PRJ)$/util$/makefile.pmk
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : svpre.mk
+.INCLUDE : settings.mk
+.INCLUDE : sv.mk
+
+IMGLST_SRS=$(SRS)$/appl.srs
+BMP_IN=$(PRJ)$/win/res
+
+# w.g. compilerbugs
+.IF "$(GUI)"=="WNT"
+CFLAGS+=-Od
+.ENDIF
+
+# --- Files --------------------------------------------------------
+
+SRS1NAME=appl
+SRC1FILES = \
+ app.src sfx.src image.src
+
+SRS2NAME=sfx
+SRC2FILES = \
+ sfx.src
+
+OBJFILES = \
+ $(OBJ)$/appctor.obj
+
+SLOFILES = \
+ $(SLO)$/rmacceptor.obj\
+ $(SLO)$/appuno.obj \
+ $(SLO)$/applicat.obj \
+ $(SLO)$/appmail.obj \
+ $(SLO)$/appmain.obj \
+ $(SLO)$/appopen.obj \
+ $(SLO)$/appinit.obj \
+ $(SLO)$/appmisc.obj \
+ $(SLO)$/appdemo.obj \
+ $(SLO)$/appreg.obj \
+ $(SLO)$/appcfg.obj \
+ $(SLO)$/appquit.obj \
+ $(SLO)$/appchild.obj \
+ $(SLO)$/appserv.obj \
+ $(SLO)$/appdata.obj \
+ $(SLO)$/app.obj \
+ $(SLO)$/appbas.obj \
+ $(SLO)$/appdde.obj \
+ $(SLO)$/workwin.obj \
+ $(SLO)$/sfxhelp.obj \
+ $(SLO)$/sfxhelp2.obj \
+ $(SLO)$/childwin.obj \
+ $(SLO)$/sfxdemo.obj \
+ $(SLO)$/sfxdll.obj \
+ $(SLO)$/module.obj \
+ $(SLO)$/picklist.obj \
+ $(SLO)$/exchobj.obj \
+ $(SLO)$/appsys.obj \
+ $(SLO)$/loadenv.obj \
+ $(SLO)$/frstinit.obj \
+ $(SLO)$/basmgr.obj \
+ $(SLO)$/oinstanceprovider.obj \
+ $(SLO)$/opipeconnection.obj \
+ $(SLO)$/opluginframefactory.obj
+
+EXCEPTIONSFILES=\
+ $(SLO)$/appmain.obj \
+ $(SLO)$/appmisc.obj \
+ $(SLO)$/frstinit.obj \
+ $(SLO)$/appinit.obj \
+ $(SLO)$/applicat.obj \
+ $(SLO)$/picklist.obj \
+ $(SLO)$/rmacceptor.obj \
+ $(SLO)$/appcfg.obj \
+
+.IF "$(GUI)" == "MAC"
+SLOFILES +=\
+ $(SLO)$/appctor.obj \
+ $(SLO)$/appmac.obj
+.ENDIF
+
+.IF "$(GUI)" == "UNX"
+SLOFILES +=\
+ $(SLO)$/appctor.obj
+.ENDIF
+
+# --- Targets -------------------------------------------------------
+
+.INCLUDE : target.mk
+
+
diff --git a/sfx2/source/appl/module.cxx b/sfx2/source/appl/module.cxx
new file mode 100644
index 000000000000..e136dc18addb
--- /dev/null
+++ b/sfx2/source/appl/module.cxx
@@ -0,0 +1,470 @@
+/*************************************************************************
+ *
+ * $RCSfile: module.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:27 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#pragma hdrstop
+
+//#include <tools/solar.h>
+
+#include <cstdarg>
+#include "module.hxx"
+#include "app.hxx"
+#include "arrdecl.hxx"
+#include "sfxresid.hxx"
+#include "msgpool.hxx"
+#include "tbxctrl.hxx"
+#include "stbitem.hxx"
+#include "mnuitem.hxx"
+#include "childwin.hxx"
+#include "mnumgr.hxx"
+#include "docfac.hxx"
+#include "accmgr.hxx"
+#include "objface.hxx"
+#include "viewfrm.hxx"
+
+#define SfxModule
+#include <sfxslots.hxx>
+
+static SfxModuleArr_Impl* pModules=0;
+
+class SfxModule_Impl
+{
+public:
+
+ SfxSlotPool* pSlotPool;
+ SfxTbxCtrlFactArr_Impl* pTbxCtrlFac;
+ SfxStbCtrlFactArr_Impl* pStbCtrlFac;
+ SfxMenuCtrlFactArr_Impl* pMenuCtrlFac;
+ SfxChildWinFactArr_Impl* pFactArr;
+ ImageList* pImgList;
+ SfxSymbolSet eSet;
+
+ SfxModule_Impl();
+ ~SfxModule_Impl();
+};
+
+SfxModule_Impl::SfxModule_Impl()
+ : pSlotPool(0)
+{
+}
+
+SfxModule_Impl::~SfxModule_Impl()
+{
+ delete pSlotPool;
+ delete pTbxCtrlFac;
+ delete pStbCtrlFac;
+ delete pMenuCtrlFac;
+ delete pFactArr;
+ delete pImgList;
+}
+
+TYPEINIT1(SfxModule, SfxShell);
+
+//=========================================================================
+
+SFX_IMPL_INTERFACE(SfxModule,SfxShell,SfxResId(0))
+{
+}
+
+//====================================================================
+
+SfxFileDialog* SfxModule::CreateDocFileDialog
+(
+ ULONG nFlags, // arithmetische Veroderung der u.g. Sfx-Winbits
+ const SfxObjectFactory& rFact, /* <SfxObjectFactory>, deren Filter angezeigt
+ werden sollten */
+ const SfxItemSet* pSet // to forward on FileDialog
+)
+{
+ return SFX_APP()->CreateDocFileDialog( nFlags, rFact, pSet );
+}
+
+//====================================================================
+
+ModalDialog* SfxModule::CreateAboutDialog()
+{
+ return SFX_APP()->CreateAboutDialog();
+}
+
+//====================================================================
+
+BOOL SfxModule::QueryUnload()
+{
+ return TRUE;
+}
+
+//====================================================================
+
+SfxModule* SfxModule::Load()
+
+/* [Description]
+
+ This methode must be overrided in subclasses to load the real module.
+ In your dummy subclass you implement it as follows ('...' is the name
+ of your library, e.g. 'Sd'):
+
+ SfxModule* ...ModuleDummy::Load()
+ {
+ return LoadLib...() ? ..._MOD() : 0;
+ }
+
+ In your real subclass you implement it as follows:
+
+ SfxModule* ...Module::Load()
+ {
+ return this;
+ }
+
+ The code must be behind the invocation of SFX_...OBJECTFACTORY_LIB,
+ which defines the function LoadLib...().
+*/
+
+{
+ return 0;
+}
+
+//====================================================================
+
+void SfxModule::Free()
+
+/* [Description]
+
+ This methode must be overrided in subclasses to free the real module.
+ In your real subclass you implement it as follows ('...' is the name
+ of your library, e.g. 'Sd'):
+
+ void ...Module::Free()
+ {
+ FreeLib...();
+ }
+
+ The code must be behind the invocation of SFX_...OBJECTFACTORY_LIB,
+ which defines the function LoadLib...().
+*/
+
+{
+}
+
+
+//====================================================================
+
+ResMgr* SfxModule::GetResMgr()
+{
+ return pResMgr;
+}
+
+//====================================================================
+/*
+SfxModule::SfxModule( ResMgr* pMgrP, BOOL bDummyP,
+ SfxObjectFactory* pFactoryP )
+ : pResMgr( pMgrP ), bDummy( bDummyP ), pImpl(0L)
+{
+ Construct_Impl();
+ if ( pFactoryP )
+ pFactoryP->SetModule_Impl( this );
+}
+*/
+SfxModule::SfxModule( ResMgr* pMgrP, BOOL bDummyP,
+ SfxObjectFactory* pFactoryP, ... )
+ : pResMgr( pMgrP ), bDummy( bDummyP ), pImpl(0L)
+{
+ Construct_Impl();
+ va_list pVarArgs;
+ va_start( pVarArgs, pFactoryP );
+ for ( SfxObjectFactory *pArg = pFactoryP; pArg;
+ pArg = va_arg( pVarArgs, SfxObjectFactory* ) )
+ pArg->SetModule_Impl( this );
+ va_end(pVarArgs);
+}
+
+void SfxModule::Construct_Impl()
+{
+ if( !bDummy )
+ {
+ SfxApplication *pApp = SFX_APP();
+ SfxModuleArr_Impl& rArr = GetModules_Impl();
+ SfxModule* pPtr = (SfxModule*)this;
+ rArr.C40_INSERT( SfxModule, pPtr, rArr.Count() );
+ pImpl = new SfxModule_Impl;
+ pImpl->pSlotPool = new SfxSlotPool( &pApp->GetAppSlotPool_Impl(), pResMgr );
+
+ pImpl->pTbxCtrlFac=0;
+ pImpl->pStbCtrlFac=0;
+ pImpl->pMenuCtrlFac=0;
+ pImpl->pFactArr=0;
+ pImpl->pImgList=0;
+
+ SetPool( &pApp->GetPool() );
+ }
+}
+
+//====================================================================
+
+SfxModule::~SfxModule()
+{
+ if( !bDummy )
+ {
+ if ( SFX_APP()->Get_Impl() )
+ {
+ // Das Modul wird noch vor dem DeInitialize zerst"ort, also auis dem Array entfernen
+ SfxModuleArr_Impl& rArr = GetModules_Impl();
+ for( USHORT nPos = rArr.Count(); nPos--; )
+ {
+ if( rArr[ nPos ] == this )
+ {
+ rArr.Remove( nPos );
+ break;
+ }
+ }
+ delete pImpl;
+ }
+
+ delete pResMgr;
+ }
+}
+
+//-------------------------------------------------------------------------
+
+SfxSlotPool* SfxModule::GetSlotPool() const
+{
+ return pImpl->pSlotPool;
+}
+
+//-------------------------------------------------------------------------
+
+void SfxModule::RegisterChildWindow(SfxChildWinFactory *pFact)
+{
+ DBG_ASSERT( pImpl, "Kein echtes Modul!" );
+
+ if (!pImpl->pFactArr)
+ pImpl->pFactArr = new SfxChildWinFactArr_Impl;
+
+//#ifdef DBG_UTIL
+ for (USHORT nFactory=0; nFactory<pImpl->pFactArr->Count(); ++nFactory)
+ {
+ if (pFact->nId == (*pImpl->pFactArr)[nFactory]->nId)
+ {
+ pImpl->pFactArr->Remove( nFactory );
+ DBG_ERROR("ChildWindow mehrfach registriert!");
+ return;
+ }
+ }
+//#endif
+
+ pImpl->pFactArr->C40_INSERT(
+ SfxChildWinFactory, pFact, pImpl->pFactArr->Count() );
+}
+
+//-------------------------------------------------------------------------
+
+void SfxModule::RegisterChildWindowContext( USHORT nId,
+ SfxChildWinContextFactory *pFact)
+{
+ DBG_ASSERT( pImpl, "Kein echtes Modul!" );
+
+ USHORT nCount = pImpl->pFactArr->Count();
+ for (USHORT nFactory=0; nFactory<nCount; ++nFactory)
+ {
+ SfxChildWinFactory *pF = (*pImpl->pFactArr)[nFactory];
+ if ( nId == pF->nId )
+ {
+ if ( !pF->pArr )
+ pF->pArr = new SfxChildWinContextArr_Impl;
+ pF->pArr->C40_INSERT( SfxChildWinContextFactory, pFact, pF->pArr->Count() );
+ return;
+ }
+ }
+
+ DBG_ERROR( "Kein ChildWindow fuer diesen Context!" );
+}
+
+//-------------------------------------------------------------------------
+
+void SfxModule::RegisterToolBoxControl( SfxTbxCtrlFactory *pFact )
+{
+ if (!pImpl->pTbxCtrlFac)
+ pImpl->pTbxCtrlFac = new SfxTbxCtrlFactArr_Impl;
+
+#ifdef DBG_UTIL
+ for ( USHORT n=0; n<pImpl->pTbxCtrlFac->Count(); n++ )
+ {
+ SfxTbxCtrlFactory *pF = (*pImpl->pTbxCtrlFac)[n];
+ if ( pF->nTypeId && pF->nTypeId == pFact->nTypeId &&
+ (pF->nSlotId == pFact->nSlotId || pF->nSlotId == 0) )
+ {
+ DBG_WARNING("TbxController-Registrierung ist nicht eindeutig!");
+ }
+ }
+#endif
+
+ pImpl->pTbxCtrlFac->C40_INSERT( SfxTbxCtrlFactory, pFact, pImpl->pTbxCtrlFac->Count() );
+}
+
+//-------------------------------------------------------------------------
+
+void SfxModule::RegisterStatusBarControl( SfxStbCtrlFactory *pFact )
+{
+ if (!pImpl->pStbCtrlFac)
+ pImpl->pStbCtrlFac = new SfxStbCtrlFactArr_Impl;
+
+#ifdef DBG_UTIL
+ for ( USHORT n=0; n<pImpl->pStbCtrlFac->Count(); n++ )
+ {
+ SfxStbCtrlFactory *pF = (*pImpl->pStbCtrlFac)[n];
+ if ( pF->nTypeId && pF->nTypeId == pFact->nTypeId &&
+ (pF->nSlotId == pFact->nSlotId || pF->nSlotId == 0) )
+ {
+ DBG_WARNING("StbController-Registrierung ist nicht eindeutig!");
+ }
+ }
+#endif
+
+ pImpl->pStbCtrlFac->C40_INSERT( SfxStbCtrlFactory, pFact, pImpl->pStbCtrlFac->Count() );
+}
+
+//-------------------------------------------------------------------------
+
+void SfxModule::RegisterMenuControl( SfxMenuCtrlFactory *pFact )
+{
+ if (!pImpl->pMenuCtrlFac)
+ pImpl->pMenuCtrlFac = new SfxMenuCtrlFactArr_Impl;
+
+#ifdef DBG_UTIL
+ for ( USHORT n=0; n<pImpl->pMenuCtrlFac->Count(); n++ )
+ {
+ SfxMenuCtrlFactory *pF = (*pImpl->pMenuCtrlFac)[n];
+ if ( pF->nTypeId && pF->nTypeId == pFact->nTypeId &&
+ (pF->nSlotId == pFact->nSlotId || pF->nSlotId == 0) )
+ {
+ DBG_WARNING("MenuController-Registrierung ist nicht eindeutig!");
+ }
+ }
+#endif
+
+ pImpl->pMenuCtrlFac->C40_INSERT( SfxMenuCtrlFactory, pFact, pImpl->pMenuCtrlFac->Count() );
+}
+
+//-------------------------------------------------------------------------
+
+SfxTbxCtrlFactArr_Impl* SfxModule::GetTbxCtrlFactories_Impl() const
+{
+ return pImpl->pTbxCtrlFac;
+}
+
+//-------------------------------------------------------------------------
+
+SfxStbCtrlFactArr_Impl* SfxModule::GetStbCtrlFactories_Impl() const
+{
+ return pImpl->pStbCtrlFac;
+}
+
+//-------------------------------------------------------------------------
+
+SfxMenuCtrlFactArr_Impl* SfxModule::GetMenuCtrlFactories_Impl() const
+{
+ return pImpl->pMenuCtrlFac;
+}
+
+//-------------------------------------------------------------------------
+
+SfxChildWinFactArr_Impl* SfxModule::GetChildWinFactories_Impl() const
+{
+ return pImpl->pFactArr;
+}
+
+ImageList* SfxModule::GetImageList_Impl( SfxSymbolSet eSet )
+{
+ if ( !pImpl->pImgList || pImpl->eSet != eSet )
+ {
+ pImpl->eSet = eSet;
+ delete pImpl->pImgList;
+ pImpl->pImgList = new ImageList(
+ ResId( eSet == SFX_SYMBOLS_SMALL_COLOR ?
+ RID_DEFAULTIMAGELIST_SC : RID_DEFAULTIMAGELIST_LC,
+ GetResMgr() ) );
+ }
+
+ return pImpl->pImgList;
+}
+/* ASDBG
+Reflection* SfxModule::GetReflection( UsrUik aUIK )
+{
+ return NULL;
+}
+*/
+SfxTabPage* SfxModule::CreateTabPage( USHORT nId, Window* pParent, const SfxItemSet& rSet )
+{
+ return NULL;
+}
+
+SfxModuleArr_Impl& SfxModule::GetModules_Impl()
+{
+ if( !pModules )
+ pModules = new SfxModuleArr_Impl;
+ return *pModules;
+};
+
+void SfxModule::Invalidate( USHORT nId )
+{
+ for( SfxViewFrame* pFrame = SfxViewFrame::GetFirst(); pFrame; pFrame = SfxViewFrame::GetNext( *pFrame ) )
+ if ( pFrame->GetObjectShell()->GetModule() == this )
+ Invalidate_Impl( pFrame->GetBindings(), nId );
+}
+
diff --git a/sfx2/source/appl/sfx.src b/sfx2/source/appl/sfx.src
new file mode 100644
index 000000000000..dbcb92ac8ce7
--- /dev/null
+++ b/sfx2/source/appl/sfx.src
@@ -0,0 +1,526 @@
+/*************************************************************************
+ *
+ * $RCSfile: sfx.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:27 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include "sfx.hrc"
+
+String STR_NONAME
+{
+ Text = "unbenannt" ;
+ Text [ ENGLISH ] = "noname" ;
+ Text [ norwegian ] = "noname" ;
+ Text [ italian ] = "Senza nome" ;
+ Text [ portuguese_brazilian ] = "Sem nome" ;
+ Text [ portuguese ] = "Sem nome" ;
+ Text [ finnish ] = "nimetn" ;
+ Text [ danish ] = "ikke-navngivet" ;
+ Text [ french ] = "Sans nom" ;
+ Text [ swedish ] = "namnls" ;
+ Text [ dutch ] = "naamloos" ;
+ Text [ spanish ] = "Sin nombre" ;
+ Text [ english_us ] = "Untitled" ;
+ Text[ chinese_simplified ] = "δ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Bez nazwy";
+ Text[ japanese ] = "";
+ Text[ chinese_traditional ] = "RW";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = "";
+ Text[ turkish ] = "Adsz";
+};
+
+String STR_NONE
+{
+ Text = "- Keine -" ;
+ Text [ ENGLISH ] = "- None -" ;
+ Text [ norwegian ] = "- Ingen -" ;
+ Text [ italian ] = "- Senza -" ;
+ Text [ portuguese_brazilian ] = "- Nenhum -" ;
+ Text [ portuguese ] = "- Nenhum -" ;
+ Text [ finnish ] = "- Ei ole -" ;
+ Text [ danish ] = "- Ingen -" ;
+ Text [ french ] = "- Aucun(e) -" ;
+ Text [ swedish ] = "- Inga -" ;
+ Text [ dutch ] = "- Geen -" ;
+ Text [ spanish ] = "- Ninguno -" ;
+ Text [ english_us ] = "- None -" ;
+ Text[ chinese_simplified ] = "- -";
+ Text[ russian ] = "- -";
+ Text[ polish ] = "- Brak -";
+ Text[ japanese ] = "-Ȃ-";
+ Text[ chinese_traditional ] = "- L -";
+ Text[ arabic ] = "- -";
+ Text[ greek ] = "- -";
+ Text[ korean ] = "- -";
+ Text[ turkish ] = "- Yok -";
+};
+
+String STR_CLOSE
+{
+ Text = "Schlieen" ;
+ Text [ ENGLISH ] = "Close" ;
+ Text [ norwegian ] = "Lukk" ;
+ Text [ italian ] = "Chiudi" ;
+ Text [ portuguese_brazilian ] = "Fechar" ;
+ Text [ portuguese ] = "Fechar" ;
+ Text [ finnish ] = "Sulje" ;
+ Text [ danish ] = "Luk" ;
+ Text [ french ] = "Fermer" ;
+ Text [ swedish ] = "Stng" ;
+ Text [ dutch ] = "Sluiten" ;
+ Text [ spanish ] = "Cerrar" ;
+ Text [ english_us ] = "Close" ;
+ Text[ chinese_simplified ] = "ر";
+ Text[ russian ] = "";
+ Text[ polish ] = "Zamknij";
+ Text[ japanese ] = "‚";
+ Text[ chinese_traditional ] = "";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "ݱ";
+ Text[ turkish ] = "Kapat";
+};
+
+String STR_STYLE_FILTER_AUTO
+{
+ TEXT = "Automatisch" ;
+ TEXT [ English ] = "Automatic" ;
+ TEXT [ norwegian ] = "Automatic" ;
+ TEXT [ italian ] = "Automatico" ;
+ TEXT [ portuguese_brazilian ] = "Automtico" ;
+ TEXT [ portuguese ] = "Automtico" ;
+ TEXT [ finnish ] = "Automaattinen" ;
+ TEXT [ danish ] = "Automatisk" ;
+ TEXT [ french ] = "Automatique" ;
+ TEXT [ swedish ] = "Automatisk" ;
+ TEXT [ dutch ] = "Automatisch" ;
+ TEXT [ spanish ] = "Automtico" ;
+ TEXT [ english_us ] = "Automatic" ;
+ TEXT[ chinese_simplified ] = "Զ";
+ TEXT[ russian ] = "";
+ TEXT[ polish ] = "Automatycznie";
+ TEXT[ japanese ] = "";
+ TEXT[ chinese_traditional ] = "۰";
+ TEXT[ arabic ] = "";
+ TEXT[ greek ] = "";
+ TEXT[ korean ] = "ڵ";
+ TEXT[ turkish ] = "Otomatik";
+};
+
+String STR_STYLE_FILTER_USED
+{
+ TEXT = "Verwendete Vorlagen" ;
+ TEXT [ English ] = "Used styles" ;
+ TEXT [ norwegian ] = "Brukte stiler" ;
+ TEXT [ italian ] = "Modelli usati" ;
+ TEXT [ portuguese_brazilian ] = "Estilos usados" ;
+ TEXT [ portuguese ] = "Estilos usados" ;
+ TEXT [ finnish ] = "Kytetyt tyylit" ;
+ TEXT [ danish ] = "Anvendte typografier" ;
+ TEXT [ french ] = "Styles utiliss" ;
+ TEXT [ swedish ] = "Anvnda mallar" ;
+ TEXT [ dutch ] = "Gebruikte opmaakprofielen" ;
+ TEXT [ spanish ] = "Estilos utilizados" ;
+ TEXT [ english_us ] = "Applied Styles" ;
+ TEXT[ chinese_simplified ] = "ʹõʽ";
+ TEXT[ russian ] = " ";
+ TEXT[ polish ] = "Uywane style";
+ TEXT[ japanese ] = "gp";
+ TEXT[ chinese_traditional ] = "ϥΪ˦";
+ TEXT[ arabic ] = " ";
+ TEXT[ greek ] = " ";
+ TEXT[ korean ] = " Ǿϴ.";
+ TEXT[ turkish ] = "Kullanlan biimler";
+};
+
+
+
+String STR_STYLE_FILTER_USERDEF
+{
+ TEXT = "Benutzervorlagen" ;
+ TEXT [ English ] = "User styles" ;
+ TEXT [ norwegian ] = "Brukerstiler" ;
+ TEXT [ italian ] = "Modelli utente" ;
+ TEXT [ portuguese_brazilian ] = "Estilos do usurio" ;
+ TEXT [ portuguese ] = "Estilos do utilizador" ;
+ TEXT [ finnish ] = "Kyttjn tyylit" ;
+ TEXT [ danish ] = "Brugertypografier" ;
+ TEXT [ french ] = "Styles personnaliss" ;
+ TEXT [ swedish ] = "Anvndardefinierade formatmallar" ;
+ TEXT [ dutch ] = "Eigen opmaakprofielen" ;
+ TEXT [ spanish ] = "Estilos del usuario" ;
+ TEXT [ english_us ] = "Custom Styles" ;
+ TEXT[ chinese_simplified ] = "ûʽ";
+ TEXT[ russian ] = " ";
+ TEXT[ polish ] = "Style uytkownika";
+ TEXT[ japanese ] = "հް`̽";
+ TEXT[ chinese_traditional ] = "ۭq˦";
+ TEXT[ arabic ] = " ";
+ TEXT[ greek ] = " ";
+ TEXT[ korean ] = " ";
+ TEXT[ turkish ] = "Kullanc tanml biimler";
+};
+
+String STR_STYLE_FILTER_ALL
+{
+ TEXT = "Alle Vorlagen" ;
+ TEXT [ English ] = "All styles" ;
+ TEXT [ norwegian ] = "Alle stiler" ;
+ TEXT [ italian ] = "Tutti i modelli" ;
+ TEXT [ portuguese_brazilian ] = "Todos os estilos" ;
+ TEXT [ portuguese ] = "Estilos todos" ;
+ TEXT [ finnish ] = "Kaikki tyylit" ;
+ TEXT [ danish ] = "Alle typografier" ;
+ TEXT [ french ] = "Tous les styles" ;
+ TEXT [ swedish ] = "Alla mallar" ;
+ TEXT [ dutch ] = "Alle opmaakprofielen" ;
+ TEXT [ spanish ] = "Todos los estilos" ;
+ TEXT [ english_us ] = "All Styles" ;
+ TEXT[ chinese_simplified ] = "ȫʽ";
+ TEXT[ russian ] = " ";
+ TEXT[ polish ] = "Wszystkie style";
+ TEXT[ japanese ] = "ׂĂ̽";
+ TEXT[ chinese_traditional ] = "˦";
+ TEXT[ arabic ] = " ";
+ TEXT[ greek ] = " ";
+ TEXT[ korean ] = " ";
+ TEXT[ turkish ] = "Tm biimler";
+};
+
+String STR_STANDARD
+{
+ Text = "Standard" ;
+ Text [ English ] = "Standard" ;
+ Text [ english_us ] = "Standard" ;
+ Text[ portuguese ] = "Padro";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "Standaard";
+ Text[ french ] = "Par dfaut";
+ Text[ spanish ] = "Predeterminado";
+ Text[ italian ] = "Standard";
+ Text[ danish ] = "Standard";
+ Text[ swedish ] = "Standard";
+ Text[ polish ] = "Domylnie";
+ Text[ portuguese_brazilian ] = "Standard";
+ Text[ japanese ] = "W";
+ Text[ korean ] = "ǥ";
+ Text[ chinese_simplified ] = "׼";
+ Text[ chinese_traditional ] = "Э";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "Standart";
+};
+
+String STR_FILTERNAME_ALL
+{
+ TEXT = "<Alle>" ;
+ TEXT [ ENGLISH ] = "<All>" ;
+ TEXT [ norwegian ] = "<Alle>" ;
+ TEXT [ italian ] = "<tutto>" ;
+ TEXT [ portuguese_brazilian ] = "<Tudo>" ;
+ TEXT [ portuguese ] = "<Todos>" ;
+ TEXT [ finnish ] = "<All>" ;
+ TEXT [ danish ] = "<Alle>" ;
+ TEXT [ french ] = "<Tout>" ;
+ TEXT [ swedish ] = "<Alla>" ;
+ TEXT [ dutch ] = "<Alle>" ;
+ TEXT [ spanish ] = "<Todos>" ;
+ TEXT [ english_us ] = "<All>" ;
+ TEXT[ chinese_simplified ] = "<ȫ>";
+ TEXT[ russian ] = "<>";
+ TEXT[ polish ] = "<Wszystkie>";
+ TEXT[ japanese ] = "<ׂ>";
+ TEXT[ chinese_traditional ] = "<>";
+ TEXT[ arabic ] = "<>";
+ TEXT[ greek ] = "<>";
+ TEXT[ korean ] = "<>";
+ TEXT[ turkish ] = "<Tm>";
+};
+
+String STR_HUMAN_APPNAME
+{
+ TEXT = "StarOffice" ;
+};
+
+String STR_BYTES
+{
+ Text = "Bytes" ;
+ Text [ ENGLISH ] = "Bytes" ;
+ Text [ english_us ] = "Bytes" ;
+ Text [ portuguese_brazilian ] = "Bytes" ;
+ Text [ swedish ] = "Byte" ;
+ Text [ danish ] = "Bytes" ;
+ Text [ italian ] = "Byte" ;
+ Text [ spanish ] = "Bytes" ;
+ Text [ french ] = "Octet(s)" ;
+ Text [ dutch ] = "Bytes" ;
+ Text [ portuguese ] = "Bytes" ;
+ Text[ chinese_simplified ] = "ֽ";
+ Text[ russian ] = "";
+ Text[ polish ] = "Bajty";
+ Text[ japanese ] = "޲";
+ Text[ chinese_traditional ] = "Bytes";
+ Text[ arabic ] = "";
+ Text[ greek ] = "Bytes";
+ Text[ korean ] = "Ʈ";
+ Text[ turkish ] = "Byte";
+};
+
+String STR_KB
+{
+ Text = "KB" ;
+ Text [ ENGLISH ] = "KB" ;
+ Text [ portuguese ] = "KB" ;
+ Text [ english_us ] = "KB" ;
+ Text [ portuguese_brazilian ] = "KB" ;
+ Text [ swedish ] = "kB" ;
+ Text [ danish ] = "kB" ;
+ Text [ italian ] = "KB" ;
+ Text [ spanish ] = "KB" ;
+ Text [ french ] = "Ko" ;
+ Text [ dutch ] = "KB" ;
+ Text[ chinese_simplified ] = "ǧֽ";
+ Text[ russian ] = "";
+ Text[ polish ] = "KB";
+ Text[ japanese ] = "޲";
+ Text[ chinese_traditional ] = "KB";
+ Text[ arabic ] = "";
+ Text[ greek ] = "KB";
+ Text[ korean ] = "KB";
+ Text[ turkish ] = "KB";
+};
+
+String STR_MB
+{
+ Text = "MB" ;
+ Text [ ENGLISH ] = "MB" ;
+ Text [ portuguese ] = "MB" ;
+ Text [ english_us ] = "MB" ;
+ Text [ portuguese_brazilian ] = "MB" ;
+ Text [ swedish ] = "MB" ;
+ Text [ danish ] = "MB" ;
+ Text [ italian ] = "MB" ;
+ Text [ spanish ] = "MB" ;
+ Text [ french ] = "Mo" ;
+ Text [ dutch ] = "MB" ;
+ Text[ chinese_simplified ] = "ֽ";
+ Text[ russian ] = "";
+ Text[ polish ] = "MB";
+ Text[ japanese ] = "MB";
+ Text[ chinese_traditional ] = "MB";
+ Text[ arabic ] = "";
+ Text[ greek ] = "MB";
+ Text[ korean ] = "MB";
+ Text[ turkish ] = "MB";
+};
+
+
+String STR_GB
+{
+ Text = "GB" ;
+ Text [ ENGLISH ] = "GB" ;
+ Text [ portuguese ] = "GB" ;
+ Text [ english_us ] = "GB" ;
+ Text [ portuguese_brazilian ] = "GB" ;
+ Text [ swedish ] = "GB" ;
+ Text [ danish ] = "GB" ;
+ Text [ italian ] = "GB" ;
+ Text [ spanish ] = "GB" ;
+ Text [ french ] = "Go" ;
+ Text [ dutch ] = "GB" ;
+ Text[ chinese_simplified ] = "ǧ";
+ Text[ russian ] = "";
+ Text[ polish ] = "GB";
+ Text[ japanese ] = "GB";
+ Text[ chinese_traditional ] = "GB";
+ Text[ arabic ] = "";
+ Text[ greek ] = "GB";
+ Text[ korean ] = "GB";
+ Text[ turkish ] = "GB";
+};
+
+String STR_UNDO
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Rckgngig: : Rckgngig: */
+ Text = "Rckgngig: " ;
+ Text [ English ] = "Undo " ;
+ Text [ norwegian ] = "Angre " ;
+ Text [ italian ] = "Annulla " ;
+ Text [ portuguese_brazilian ] = "Desfazer " ;
+ Text [ portuguese ] = "Desfazer: " ;
+ Text [ finnish ] = "Kumoa " ;
+ Text [ danish ] = "Fortryd: " ;
+ Text [ french ] = "Annuler : " ;
+ Text [ swedish ] = "ngra: " ;
+ Text [ dutch ] = "Ongedaan: " ;
+ Text [ spanish ] = "Deshacer: " ;
+ Text [ english_us ] = "Undo: " ;
+ Text[ chinese_simplified ] = " ";
+ Text[ russian ] = ": ";
+ Text[ polish ] = "Cofnij: ";
+ Text[ japanese ] = "ɖ߂: ";
+ Text[ chinese_traditional ] = "MROG ";
+ Text[ arabic ] = ": ";
+ Text[ greek ] = ": ";
+ Text[ korean ] = ": ";
+ Text[ turkish ] = "Geri al: ";
+};
+
+String STR_REDO
+{
+ Text = "Wiederherstellen: " ;
+ Text [ English ] = "Redo: " ;
+ Text [ english_us ] = "Re~do: " ;
+ Text [ portuguese ] = "Refazer: " ;
+ Text [ portuguese_brazilian ] = "Refazer " ;
+ Text [ swedish ] = "terstll: " ;
+ Text [ danish ] = "Gendan: " ;
+ Text [ italian ] = "Ripristina: " ;
+ Text [ spanish ] = "Restaurar: " ;
+ Text [ french ] = "Restaurer : " ;
+ Text [ dutch ] = "Herstellen: " ;
+ Text[ chinese_simplified ] = "ָ (~D)";
+ Text[ russian ] = ": ";
+ Text[ polish ] = "Ponw: ";
+ Text[ japanese ] = "蒼: (~D)";
+ Text[ chinese_traditional ] = "_MRO (~D)";
+ Text[ arabic ] = ": ";
+ Text[ greek ] = ": ";
+ Text[ korean ] = "ٽ : (~D)";
+ Text[ turkish ] = "~Yinele: ";
+};
+
+String STR_REPEAT
+{
+ Text = "Letzter ~Befehl: " ;
+ Text [ English ] = "~Repeat: " ;
+ Text [ english_us ] = "~Repeat: " ;
+ Text [ portuguese ] = "~Repetir: " ;
+ Text [ portuguese_brazilian ] = "Repetir " ;
+ Text [ swedish ] = "Senaste ~kommando: " ;
+ Text [ danish ] = "Sidste ~kommado: " ;
+ Text [ italian ] = "Ultimo ~comando: " ;
+ Text [ spanish ] = "~ltimo comando: " ;
+ Text [ french ] = "~Rpter : " ;
+ Text [ dutch ] = "~Herhalen: " ;
+ Text[ chinese_simplified ] = "һ(~R)";
+ Text[ russian ] = ": ";
+ Text[ polish ] = "Ostatnie polecenie: ";
+ Text[ japanese ] = "JԂ:(~R) ";
+ Text[ chinese_traditional ] = "W@өRO(~R)";
+ Text[ arabic ] = " : ";
+ Text[ greek ] = ": ";
+ Text[ korean ] = "ݺ: (~R)";
+ Text[ turkish ] = "Son ~komutu yinele: ";
+};
+
+String RID_STR_NEW_TASK
+{
+ Text = "Neue Task";
+ Text [ english ] = "New task";
+ Text[ english_us ] = "New task";
+ Text[ portuguese ] = "Nova tarefa";
+ Text[ russian ] = " ";
+ Text[ dutch ] = "Nieuwe taak";
+ Text[ french ] = "Nouvelle tche";
+ Text[ spanish ] = "Nueva tarea";
+ Text[ italian ] = "Nuovo compito";
+ Text[ danish ] = "Ny opgave";
+ Text[ swedish ] = "Ny aktivitet";
+ Text[ polish ] = "Nowe zadanie";
+ Text[ portuguese_brazilian ] = "New task";
+ Text[ japanese ] = "V޳";
+ Text[ chinese_simplified ] = "Ӵ";
+ Text[ chinese_traditional ] = "sWf";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = "ο ۾";
+ Text[ turkish ] = "Yeni grev";
+};
+QueryBox MSG_QUERY_LASTVERSION
+{
+ Buttons = WB_YES_NO ;
+ DefButton = WB_DEF_NO ;
+ /* ### ACHTUNG: Neuer Text in Resource? Alle nderungen aufheben? : Alle nderungen aufheben? */
+ Message = "Alle nderungen aufheben?" ;
+ Message [ English ] = "Cancel all changes?" ;
+ Message [ norwegian ] = "Slett alle endringer?" ;
+ Message [ italian ] = "Volete annullare tutte le modifiche?" ;
+ Message [ portuguese_brazilian ] = "Cancelar todas as modificaes?" ;
+ Message [ portuguese ] = "Cancelar todas as modificaes?" ;
+ Message [ finnish ] = "Kumotaanko kaikki muutokset?" ;
+ Message [ danish ] = "Vil du annullere alle ndringer?" ;
+ Message [ french ] = "Annuler toutes les modifications ?" ;
+ Message [ swedish ] = "ngra alla ndringar?" ;
+ Message [ dutch ] = "Alle wijzigingen ongedaan maken?" ;
+ Message [ spanish ] = "Cancelar todos los cambios?" ;
+ Message [ english_us ] = "Cancel all changes?" ;
+ Message[ chinese_simplified ] = "Ҫȡ?";
+ Message[ russian ] = " ?";
+ Message[ polish ] = "Usun wszystkie zmiany?";
+ Message[ japanese ] = "ׂĂ̕ύX܂?";
+ Message[ chinese_traditional ] = "ҦܧH";
+ Message[ greek ] = " ;";
+ Message[ korean ] = " Ͻðڽϱ?";
+ Message[ arabic ] = " ʿ";
+ Message[ turkish ] = "Tm deiiklikleri iptal et?";
+};
+
diff --git a/sfx2/source/appl/sfxdll.cxx b/sfx2/source/appl/sfxdll.cxx
new file mode 100644
index 000000000000..a03f8c3c6b2e
--- /dev/null
+++ b/sfx2/source/appl/sfxdll.cxx
@@ -0,0 +1,108 @@
+/*************************************************************************
+ *
+ * $RCSfile: sfxdll.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:27 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifdef WIN
+#ifndef _SVWIN_H
+#include <svwin.h>
+#endif
+#endif
+
+#pragma hdrstop
+
+#ifdef WIN
+#include "segmentc.hxx"
+
+// Statische DLL-Verwaltungs-Variablen
+static HINSTANCE hDLLInst = 0;
+
+SEG_EOFGLOBALS()
+
+//==========================================================================
+#pragma SEG_SEGCLASS(DLLINIT_SEG,DLLINITEXIT_CODE)
+
+extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR )
+{
+#ifndef WNT
+ if ( nHeap )
+ UnlockData( 0 );
+#endif
+
+ hDLLInst = hDLL;
+
+ return TRUE;
+}
+
+
+//--------------------------------------------------------------------------
+#pragma SEG_SEGCLASS(DLLEXIT_SEG,DLLINITEXIT_CODE)
+
+extern "C" int CALLBACK WEP( int )
+{
+ return 1;
+}
+
+
+
+//==========================================================================
+
+#endif
+
+
diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx
new file mode 100644
index 000000000000..30d21f2e4def
--- /dev/null
+++ b/sfx2/source/appl/sfxhelp.cxx
@@ -0,0 +1,1277 @@
+/*************************************************************************
+ *
+ * $RCSfile: sfxhelp.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:27 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _SV_CLIP_HXX //autogen
+#include <vcl/clip.hxx>
+#endif
+#ifndef _SV_CONFIG_HXX //autogen
+#include <vcl/config.hxx>
+#endif
+#ifndef _SFXITEMPOOL_HXX //autogen
+#include <svtools/itempool.hxx>
+#endif
+#ifndef _SFXITEMSET_HXX //autogen
+#include <svtools/itemset.hxx>
+#endif
+#ifndef _SFXINIMGR_HXX //autogen
+#include <svtools/iniman.hxx>
+#endif
+#ifndef _WRKWIN_HXX //autogen
+#include <vcl/wrkwin.hxx>
+#endif
+#ifndef _MSGBOX_HXX //autogen
+#include <vcl/msgbox.hxx>
+#endif
+#ifndef _SVSTOR_HXX //autogen
+#include <so3/svstor.hxx>
+#endif
+#ifndef _SFX_WHITER_HXX //autogen
+#include <svtools/whiter.hxx>
+#endif
+#ifndef _SYSTEM_HXX //autogen
+#include <vcl/system.hxx>
+#endif
+#ifndef _SFXSTRITEM_HXX //autogen
+#include <svtools/stritem.hxx>
+#endif
+#ifndef _SB_SBSTAR_HXX //autogen
+#include <basic/sbstar.hxx>
+#endif
+#ifndef _SB_SBMETH_HXX //autogen
+#include <basic/sbmeth.hxx>
+#endif
+#ifndef _SB_SBMOD_HXX //autogen
+#include <basic/sbmod.hxx>
+#endif
+
+#ifndef _SV_SOUND_HXX //autogen
+#include <vcl/sound.hxx>
+#endif
+
+#include <automation/automation.hxx>
+#pragma hdrstop
+
+#include <saveopt.hxx> // Welcome-Screen Optionen
+
+#ifndef _SFXENUMITEM_HXX //autogen
+#include <svtools/eitem.hxx>
+#endif
+
+#ifdef WNT
+#pragma optimize ( "", off )
+#endif
+
+#include <helpid.hrc>
+#include <app.hxx>
+#include <sfx.hrc>
+#include <sfxhelp.hxx>
+#include <sfxhelp2.hxx>
+#include <docfac.hxx>
+#include <openflag.hxx>
+#include <bindings.hxx>
+#include <dispatch.hxx>
+#include <genlink.hxx>
+#include <viewsh.hxx>
+#include <sfxresid.hxx>
+#include <printer.hxx>
+#include <request.hxx>
+#include <docfile.hxx>
+#include <app.hrc>
+#include <msgpool.hxx>
+#include <appdata.hxx>
+#include "objshimp.hxx"
+#include "macrconf.hxx"
+#include "viewfrm.hxx"
+#include "objface.hxx"
+
+#ifdef MAC
+#define HELP_APP_NAME "StarHelp 4.0"
+#elif defined UNX
+#define HELP_APP_NAME "shelp"
+#else
+#define HELP_APP_NAME "SHELP.EXE"
+#endif
+
+static const char __FAR_DATA zsHelpAgentConfig[] = "hlpagent.ini";
+static const char __FAR_DATA zsHelpAgentConfig_Tips[] = "Tips";
+
+static const USHORT nBorder = 10; // So war's im Writer - aber warum ???
+
+SV_IMPL_VARARR_SORT( SortedULONGs, ULONG );
+//SV_IMPL_PTRARR( HelpTextCaches, HelpTextCache* );
+
+USHORT ImplSetLanguageGroup( Config& rConfig, const String& rGroupName, BOOL bSearchLanguage )
+{
+ USHORT nFound = 0;
+
+ // Nach Prioritaeten die richtige Language-Section suchen...
+ LanguageType eLanguage = Application::GetSettings().GetInternational().GetLanguage();
+ for ( USHORT nPrio = 0; nPrio <= 4; nPrio++ )
+ {
+ const char* pLang = ResMgr::GetLang( eLanguage, nPrio );
+ if ( pLang )
+ {
+ String aGroup( rGroupName );
+ aGroup += '-';
+ aGroup += String::CreateFromAscii(pLang);
+ if ( !bSearchLanguage || rConfig.HasGroup( U2S(aGroup) ) )
+ {
+ rConfig.SetGroup( U2S(aGroup) );
+ nFound = nPrio+1;
+ break;
+ }
+ // Falls keine gefunden wird, dann die genaueste einstellen
+ if ( nPrio == 0 )
+ rConfig.SetGroup( U2S(aGroup) );
+ }
+ }
+ return nFound;
+}
+
+//=========================================================================
+SFX_IMPL_DOCKINGWINDOW(SfxHelpPIWrapper, SID_HELP_PI);
+SFX_IMPL_DOCKINGWINDOW(SfxHelpTipsWrapper, SID_TIPWINDOW);
+
+static Point CalcFloaterPos( Window *pPI, Rectangle& rFloaterRect, const Rectangle& rDialogRect )
+{
+ Point aPos = rFloaterRect.TopLeft();
+ if ( rFloaterRect.IsOver( rDialogRect ) )
+ {
+ Size aScreenSize = pPI->GetDesktopRectPixel().GetSize();
+ Size aFloaterSz = rFloaterRect.GetSize();
+ long nMinWidth = aScreenSize.Width() / 5;
+// long nMinHeight = aScreenSize.Height() / 5;
+
+ // Minimalgroessen nur, wenn nicht vorher schon kleiner, weil der
+ // Anwender es wollte:
+ if ( aFloaterSz.Width() < nMinWidth )
+ nMinWidth = aFloaterSz.Width();
+// if ( aFloaterSz.Height() < nMinHeight )
+// nMinHeight= aFloaterSz.Height();
+
+
+ long nTopDiff = -(rFloaterRect.Top() - rDialogRect.Top());
+ long nBottomDiff = rFloaterRect.Bottom() - rDialogRect.Bottom();
+ long nLeftDiff = -(rFloaterRect.Left() - rDialogRect.Left());
+ long nRightDiff = rFloaterRect.Right() - rDialogRect.Right();
+
+ BOOL bRight = ( rDialogRect.Right() + rFloaterRect.GetWidth() ) < aScreenSize.Width();
+ BOOL bLeft = ( rDialogRect.Left() - rFloaterRect.GetWidth() ) > 0;
+ BOOL bTop = ( rDialogRect.Top() - rFloaterRect.GetHeight() ) > 0;
+ BOOL bBottom = ( rDialogRect.Bottom() + rFloaterRect.GetHeight() ) < aScreenSize.Height();
+
+ if ( bLeft || bRight )
+ aPos.X() = ( bRight && ( !bLeft || ( nLeftDiff < nRightDiff ) ) )
+ ? rDialogRect.Right()
+ : rDialogRect.Left() - rFloaterRect.GetWidth();
+ else if ( bTop || bBottom )
+ aPos.Y() = ( bTop && ( !bBottom || ( nBottomDiff < nTopDiff ) ) )
+ ? rDialogRect.Top() - rFloaterRect.GetHeight()
+ : rDialogRect.Bottom();
+ else
+ {
+ // Rechts oder links daneben, wo mehr Platz ist...
+ long nLeftSpace = rDialogRect.Left();
+ long nRightSpace = aScreenSize.Width() - rDialogRect.Right();
+ if ( nLeftSpace > nRightSpace )
+ {
+ aPos.X() = 0;
+ long nWidth = nLeftSpace;
+ if ( nWidth < nMinWidth )
+ nWidth = nMinWidth;
+ rFloaterRect.Right() = rFloaterRect.Left() + nWidth;
+
+ }
+ else
+ {
+ long nWidth = nRightSpace;
+ if ( nWidth < nMinWidth )
+ nWidth = nMinWidth;
+ aPos.X() = aScreenSize.Width() - nWidth;
+ rFloaterRect.Right() = rFloaterRect.Left() + nWidth;
+ }
+ }
+ }
+ rFloaterRect.SetPos( aPos );
+ return aPos;
+}
+
+
+//=========================================================================
+
+SfxHelpPIWrapper::SfxHelpPIWrapper(Window *pParent,
+ USHORT nId, SfxBindings *pBindings, SfxChildWinInfo* pInfo) :
+ SfxChildWindow(pParent, nId)
+{
+ // Skalierung des HelpPI initialisieren
+ USHORT nScale = 100;
+ if ( pInfo->aExtraString.Len() )
+ {
+ USHORT nPos = pInfo->aExtraString.Search(0x0023); // '#' = 23h
+ if ( nPos != STRING_NOTFOUND )
+ {
+ String aScale = pInfo->aExtraString.Copy(nPos+1);
+ pInfo->aExtraString.Erase(nPos+1);
+ pInfo->aExtraString.Erase(nPos,1);
+ nScale = (USHORT) aScale.ToInt32();
+ }
+ else
+ {
+ // Es ist noch ein alter Eintrag (FloatingWindow); das Alignment
+ // wird dann in Initialize nicht ver"andert.
+ pInfo->aExtraString.Erase();
+ }
+ }
+
+ // Versuche, das Helferlein zu laden
+ SfxHelpPI *pSfxHelpPI = new SfxHelpPI(pBindings, this, pParent, nScale);
+
+ pWindow = pSfxHelpPI;
+ eChildAlignment = SFX_ALIGN_NOALIGNMENT;
+
+ if ( !pInfo->aSize.Width() )
+ {
+ // initial zentriert hochkommen
+ Size aSz( 400, 250 );
+ pSfxHelpPI->SetSizePixel( aSz );
+
+ if ( SFX_APP()->GetDemoKind() == SFX_DEMOKIND_TRYBUY )
+ {
+ Rectangle aRect = Rectangle( Point(), pParent->GetOutputSizePixel() );
+ Point aPoint = aRect.BottomRight();
+ aPoint.X() -= ( aSz.Width() + 10 );
+ aPoint.Y() -= ( aSz.Height() + 10 );
+ pSfxHelpPI->SetFloatingPos( aPoint );
+ }
+ }
+
+ pSfxHelpPI->Initialize(pInfo);
+ pSfxHelpPI->ResetTopic();
+}
+
+BOOL SfxHelpPIWrapper::QueryClose()
+{
+ BOOL bCanClose = TRUE;
+ SfxHelpPI* pHelpPI = SFX_APP()->GetHelpPI();
+ if ( pHelpPI )
+ {
+// HelpPI* pH = pHelpPI->GetHelpPI();
+// if ( pH && pH->HasDialog() )
+// bCanClose = FALSE;
+ }
+ return bCanClose;
+}
+
+void SfxHelpPI::ResetTopic()
+{
+ // initial antriggern
+ ULONG nHelpId = 0L;
+ SfxDispatcher* pDispatcher = SFX_APP()->GetDispatcher_Impl();
+ SfxShell *pShell;
+ for ( USHORT nShellLevel = 0;
+ !nHelpId && 0 != ( pShell = pDispatcher->GetShell(nShellLevel) );
+ ++nShellLevel )
+ nHelpId = pShell->GetHelpId();
+ LoadTopic( nHelpId );
+}
+
+//-------------------------------------------------------------------------
+
+void SfxHelpPI::FillInfo(SfxChildWinInfo& rInfo ) const
+{
+ SfxDockingWindow::FillInfo( rInfo );
+ rInfo.aExtraString += '#';
+// rInfo.aExtraString += String( pHelpPI->GetCurScale() );
+}
+
+//-------------------------------------------------------------------------
+
+SfxHelpPI::SfxHelpPI(SfxBindings* pBindinx, SfxChildWindow* pCW, Window* pParent, USHORT nScale )
+ : SfxDockingWindow( pBindinx, pCW, pParent,
+ WB_CLOSEABLE | WB_DOCKABLE | WB_CLIPCHILDREN | WB_MOVEABLE | WB_SIZEABLE | WB_DIALOGCONTROL | WB_3DLOOK ),
+ pInnerWindow( NULL ),
+ aTipBox( this, WB_3DLOOK )
+{
+ AlwaysEnableInput( TRUE, TRUE );
+ Enable( TRUE, TRUE );
+ bInShowMe = FALSE;
+ nTip = 0;
+
+ aTopicJustRequestedTimer.SetTimeout( 200 );
+
+ pInnerWindow = new Window( this, WB_DIALOGCONTROL );
+
+// pHelpPI = new HelpPI( pInnerWindow, TRUE );
+// pHelpPI->SetSpecialLinkHdl( LINK( this, SfxHelpPI, SpecialLinkHdl ) );
+// pHelpPI->SetToolboxHdl( LINK( this, SfxHelpPI, PIToolboxHdl ) );
+
+ SetText( DEFINE_CONST_UNICODE("Help Agent") );
+
+ SetSizePixel( LogicToPixel( Size( 150, 70 ), MapMode( MAP_SYSFONT ) ) );
+ pInnerWindow->SetSizePixel( LogicToPixel ( Size( 147, 67 ), MapMode( MAP_SYSFONT ) ) );
+ pInnerWindow->SetPosPixel( LogicToPixel ( Point( 3, 3 ), MapMode( MAP_SYSFONT ) ) );
+
+ pInnerWindow->Show();
+
+ SetUniqueId( SID_HELP_PI );
+ SetMinOutputSizePixel( Size( 200, 100 ) );
+// if ( nScale )
+// pHelpPI->ChangeScale( nScale );
+// else
+ {
+ const long nDPI = LogicToPixel(Point(1, 1), MapMode(MAP_INCH)).X();
+// if(nDPI < 90 && GetDesktopRectPixel().GetWidth() > 1000)
+// pHelpPI->ChangeScale( 150 );
+ }
+
+// pHelpPI->GetTopicChangedHdl() = LINK( this, SfxHelpPI, TopicChangedHdl_Impl );
+ LoadTopic( HELP_INDEX );
+}
+
+BOOL SfxHelpPI::Close()
+{
+// return pHelpPI->HasDialog() ? FALSE : SfxDockingWindow::Close();
+ return TRUE;
+}
+
+void SfxHelpPI::SetTip( ULONG nTp )
+{
+ nTip = nTp;
+ if ( nTip )
+ {
+ Resize(); // Falls keine Aenderung von aussen kommt...
+ aTipBox.SetHelpId( HID_HELPAGENT_TIP_BOX );
+ aTipBox.SetClickHdl( LINK( this, SfxHelpPI, TipBoxHdl ) );
+ aTipBox.Show();
+ }
+ else
+ {
+ aTipBox.Hide();
+ Resize();
+ }
+}
+
+void SfxHelpPI::SetTipText( const String& rTip )
+{
+ String aText( SfxResId( RID_STR_NOAUTOSTARTHELPAGENT ) );
+ aText.SearchAndReplace( DEFINE_CONST_UNICODE("XX"), rTip );
+ aTipBox.SetText( aText );
+}
+
+IMPL_LINK( SfxHelpPI, PIToolboxHdl, ToolBox* , pToolBox )
+{
+ // Wird z.Zt nur fuer 'Volle Hilfe' gerufen
+ if ( pToolBox )
+ {
+ // Link kommt von ToolBox, im Hdl darf diese aber nicht durch das
+ // Abschalten des HelpPI zerstoert werden
+ // => Diesen Link nochmal als UserEvent rufen...
+ Application::PostUserEvent( LINK( this, SfxHelpPI, PIToolboxHdl ) );
+ }
+ else
+ {
+ Help* pHelp = Application::GetHelp();
+ }
+
+ return 1;
+}
+#if 0
+IMPL_LINK( SfxHelpPI, SpecialLinkHdl, SpecialLinkInfo* , pInfo )
+{
+ bInShowMe = TRUE;
+ if ( pInfo->aURL.Len() )
+ {
+ SfxStringItem aDoc( SID_FILE_NAME, pInfo->aURL );
+ SfxStringItem aRef( SID_REFERER, DEFINE_CONST_UNICODE("private:help") );
+ SFX_APP()->GetDispatcher_Impl()->Execute( SID_OPENDOC, SFX_CALLMODE_SYNCHRON, &aDoc, &aRef, 0L );
+ }
+ bInShowMe = FALSE;
+ delete pInfo; // Dieser Link wird asynchron gerufen, deshalb wurden die Daten mit new angelegt...
+ return 0L;
+}
+#endif
+
+IMPL_LINK( SfxHelpPI, TopicChangedHdl_Impl, void* , pVoid )
+{
+ if ( nTip && !aTipBox.GetText().Len() )
+ {
+// String aTitle( pHelpPI->GetTitle( nTip ) );
+ // Tip-Text erst hier, da der HelpAgent asynchron starten soll...
+// SetTipText( aTitle );
+ }
+
+ return 0L;
+}
+
+IMPL_LINK( SfxHelpPI, TipBoxHdl, CheckBox* , pBox )
+{
+ Help* pHelp = Application::GetHelp();
+ if ( pHelp )
+ ((SfxHelp_Impl*)pHelp)->EnableTip( nTip, !pBox->IsChecked() );
+
+ return 0L;
+}
+
+//-------------------------------------------------------------------------
+
+SfxHelpPI::~SfxHelpPI()
+{
+// delete pHelpPI;
+ delete pInnerWindow;
+
+ SfxHelp_Impl* pHelp = (SfxHelp_Impl*) Application::GetHelp();
+ if ( pHelp )
+ pHelp->HelpAgentClosed();
+}
+
+//-------------------------------------------------------------------------
+
+void SfxHelpPI::Paint( const Rectangle& rRect)
+{
+}
+
+//-------------------------------------------------------------------------
+
+void SfxHelpPI::Resize()
+{
+ Size aSize( GetOutputSizePixel() );
+ Point aPos( pInnerWindow->GetPosPixel() );
+ aSize.Width() -= 2 * aPos.X();
+ aSize.Height() -= 2 * aPos.Y();
+
+ if ( nTip )
+ {
+ Size aTextSize( aTipBox.GetTextWidth( String() ), aTipBox.GetTextHeight());
+ if ( aSize.Height() > ( aTextSize.Height() + aPos.X() ) )
+ {
+ aSize.Height() -= aTextSize.Height() + aPos.X();
+ aTipBox.SetPosSizePixel( Point( aPos.X(), aPos.Y()+aPos.X()+aSize.Height() ),
+ Size( aSize.Width(), aTextSize.Height() ) );
+ aTipBox.Show();
+ }
+ else
+ aTipBox.Hide();
+ }
+
+ pInnerWindow->SetSizePixel( aSize );
+// pHelpPI->Resize();
+ SfxDockingWindow::Resize();
+ Invalidate();
+}
+
+//-------------------------------------------------------------------------
+
+String SfxHelpPI::GetExtraInfo() const
+{
+ return String();
+// return pHelpPI->GetCurScale();
+}
+
+void SfxHelpPI::LoadTopic( const String& rFileName, ULONG nId)
+{
+// pHelpPI->LoadTopic( rFileName, nId );
+}
+
+void SfxHelpPI::LoadTopic( ULONG nId )
+{
+ // at the moment no implementation
+}
+
+void SfxHelpPI::LoadTopic( const String& rKeyword )
+{
+ SfxObjectShell* pShell = SfxObjectShell::Current();
+ if ( pShell )
+ {
+ INetURLObject aAbsName( SfxHelp_Impl::GetHelpPath() );
+ aAbsName.insertName( pShell->GetFactory().GetHelpFile() );
+ aAbsName.setExtension( DEFINE_CONST_UNICODE("svh") );
+ String aFileName = aAbsName.GetMainURL();
+// pHelpPI->LoadTopic( aFileName, rKeyword );
+ }
+}
+
+SfxHelp_Impl::SfxHelp_Impl()
+{
+ nLastDialog = 0;
+ pHelpInfo = 0;
+// pHelpCache = 0;
+ pPIStarterList = 0;
+ pHelpFileInfos = 0;
+
+ aDialogDetector.SetTimeout( 10 );
+ aDialogDetector.SetTimeoutHdl( LINK( this, SfxHelp_Impl, DialogDetectHdl ) );
+}
+
+SfxHelp_Impl::~SfxHelp_Impl()
+{
+ aDialogDetector.Stop();
+
+// delete pHelpInfo;
+ delete pPIStarterList;
+
+ if ( pHelpFileInfos )
+ {
+ for ( USHORT n = pHelpFileInfos->Count(); n; )
+ {
+ HelpFileInfo* pInf = (HelpFileInfo*)pHelpFileInfos->GetObject( --n );
+ delete pInf;
+ }
+ delete pHelpFileInfos;
+ }
+
+ // HelpCache wird durch PTRARR_DEL geloescht.
+}
+
+USHORT SfxHelp_Impl::GetHelpFileInfoCount()
+{
+ // at the moment no implementation
+ if ( !pHelpFileInfos )
+ pHelpFileInfos = new List;
+ return pHelpFileInfos->Count();
+}
+
+HelpFileInfo* SfxHelp_Impl::GetHelpFileInfo( USHORT n )
+{
+ // GetHelpFileInfoCount() rufen, weil die Liste ggf. erst erzeugt wird
+ if ( n < GetHelpFileInfoCount() )
+ return (HelpFileInfo*) pHelpFileInfos->GetObject( n );
+ return NULL;
+
+}
+
+void SfxHelp_Impl::HelpAgentClosed()
+{
+ nLastDialog = 0;
+}
+
+String SfxHelp_Impl::GetHelpFileName( ULONG nHelpId )
+{
+ SfxHelp_Impl* pHelp = (SfxHelp_Impl*) Application::GetHelp();
+ if ( pHelp && pHelp->aCustomHelpFile.Len() )
+ return pHelp->aCustomHelpFile;
+
+ String aHelpFileName;
+ SfxApplication *pSfxApp = SFX_APP();
+ SfxViewFrame *pViewFrame = pSfxApp->GetViewFrame();
+ if ( pViewFrame )
+ {
+ // Wenn es ein Slot ist, kann es sein, da\s internes InPlace vorliegt
+ // und eine Container-SlotId gefragt ist
+ if (nHelpId >= (ULONG) SID_SFX_START && nHelpId <= (ULONG) SHRT_MAX)
+ {
+ if ( pViewFrame->GetParentViewFrame_Impl() )
+ {
+ // Ist es ein ContainerSlot ?
+ const SfxSlot* pSlot =
+ pSfxApp->GetSlotPool(pViewFrame).GetSlot( (USHORT) nHelpId );
+ if ( !pSlot || pSlot->IsMode( SFX_SLOT_CONTAINER ) )
+ pViewFrame = pViewFrame->GetParentViewFrame_Impl();
+ }
+ }
+
+ if( pViewFrame->GetObjectShell() )
+ aHelpFileName = pViewFrame->GetHelpFile_Impl();
+ }
+
+ if ( !aHelpFileName.Len() )
+ aHelpFileName = DEFINE_CONST_UNICODE(SFX_DESKTOP_HELPFILE_NAME);
+
+ return aHelpFileName;
+}
+
+void SfxHelp_Impl::SetCurrentHelpFile( ULONG nHelpId )
+{
+ String aString = GetHelpFileName( nHelpId );
+ if ( GetCurrentHelpFile() != aString )
+ SetHelpFile( aString );
+}
+
+Window* SfxHelp_Impl::SearchFocusWindowParent()
+{
+ RESOURCE_TYPE nType;
+ Window* pFocusParent = Application::GetFocusWindow();
+ while ( pFocusParent &&
+ ( ( nType = pFocusParent->GetType() ) != WINDOW_MODELESSDIALOG ) &&
+ ( nType != WINDOW_MODALDIALOG ) &&
+ ( nType != WINDOW_TABDIALOG ) &&
+ ( nType != WINDOW_PATHDIALOG ) &&
+ ( nType != WINDOW_FILEDIALOG ) &&
+ ( nType != WINDOW_PRINTERSETUPDIALOG ) &&
+// ( nType != WINDOW_FLOATINGWINDOW ) &&
+// ( nType != WINDOW_DOCKINGWINDOW ) &&
+ ( nType != WINDOW_PRINTDIALOG ) )
+ {
+ pFocusParent = pFocusParent->GetParent();
+ }
+ return pFocusParent;
+}
+
+void SfxHelp_Impl::CheckPIPosition()
+{
+ Window* pDialog = SearchFocusWindowParent();
+ if( ( nLastDialog != (ULONG)pDialog ) &&
+ ( !pDialog || ( ! pDialog->GetText().EqualsAscii("HelpWindow") ) ) )
+ {
+ BOOL bAccepted = TRUE;
+ SfxHelpPI* pHelpPI = SFX_APP()->GetHelpPI();
+
+ if ( pDialog && pHelpPI )
+ {
+// if ( pHelpPI->IsWindowOrChild( pDialog, TRUE ) && !pHelpPI->GetHelpPI()->HasDialogFocus() )
+// return;
+
+ if ( !pDialog->IsVisible() )
+ {
+ aDialogDetector.Start();
+ bAccepted = FALSE;
+ }
+ else if ( pDialog == pHelpPI->GetFloatingWindow() )
+ {
+ bAccepted = FALSE;
+ }
+ else if ( pHelpPI && pHelpPI->IsFloatingMode() )
+ {
+ // Dialog schon fertig?
+ Size aDlgSize = pDialog->GetSizePixel();
+ Point aDlgPos = pDialog->GetPosPixel();
+ // Sind Position und Groesse schon eingestellt?
+ if ( aDlgSize.Width() && ( aDlgPos.X() || aDlgPos.Y() ) )
+ {
+ Rectangle aDlgRect( aDlgPos, aDlgSize );
+ Rectangle aPIRect( pHelpPI->GetPosPixel(), pHelpPI->GetSizePixel() );
+ /* Point aPos = */ CalcFloaterPos( pHelpPI, aPIRect, aDlgRect );
+ pHelpPI->SetPosSizePixel( aPIRect.TopLeft(), aPIRect.GetSize() );
+ pHelpPI->GetFloatingWindow()->ToTop();
+ }
+ else
+ {
+ aDialogDetector.Start();
+ bAccepted = FALSE;
+ }
+ }
+ }
+
+ if ( bAccepted )
+ nLastDialog = (ULONG)pDialog;
+ }
+}
+
+IMPL_LINK( SfxHelp_Impl, DialogDetectHdl, Timer* , EMPTYARG )
+{
+ SfxHelpPI* pHelpPI = SFX_APP()->GetHelpPI();
+ if ( pHelpPI && pHelpPI->IsFloatingMode() )
+ CheckPIPosition();
+ return 1;
+}
+
+BOOL SfxHelp_Impl::Start( ULONG nHelpId )
+{
+ return ImplStart( nHelpId, TRUE, TRUE, TRUE );
+}
+
+BOOL SfxHelp_Impl::ImplStart( ULONG nHelpId, BOOL bCheckHelpFile, BOOL bChangeHelpFile, BOOL bHelpAgent )
+{
+/*! (pb) what about help?
+ static BOOL bInHelpRequest = FALSE;
+ if ( bInHelpRequest || !nHelpId || ( nHelpId == SID_EXTENDEDHELP ) )
+ {
+ if ( bInHelpRequest )
+ Sound::Beep();
+ return FALSE;
+ }
+
+
+ if ( Help::IsRightHelp() )
+ {
+ if( ImplGetHelpMode() & HELPTEXTMODE_NOHELPAGENT )
+ return FALSE;
+
+ if ( ( nHelpId == HELP_INDEX ) || !CheckHelpFile( TRUE ) )
+ return FALSE;
+
+ bInHelpRequest = TRUE;
+ SetCurrentHelpFile( nHelpId );
+ StartHelpPI( nHelpId, FALSE, FALSE );
+ bInHelpRequest = FALSE;
+ return TRUE;
+ }
+
+ bInHelpRequest = TRUE;
+
+ if( ImplGetHelpMode() & HELPTEXTMODE_NOCONTEXTHELP )
+ {
+ if( nHelpId < 20000 || nHelpId > 20006 )
+ nHelpId = HELP_INDEX;
+ }
+
+ if ( bChangeHelpFile )
+ SetCurrentHelpFile( nHelpId );
+
+ BOOL bDone = FALSE;
+ if ( !bCheckHelpFile || CheckHelpFile( TRUE ) )
+ {
+ SfxViewFrame* pFrame = SfxViewFrame::Current();
+ if ( !bHelpAgent || ( nHelpId == HELP_INDEX ) )
+// !Application::IsInModalMode() &&
+// Application::GetAppWindow()->IsEnabled() &&
+// !SearchFocusWindowParent() && // kein Dialog aktiv
+// ( !pFrame || !pFrame->GetObjectShell()->IsInModalMode() ) )
+ {
+ SfxHelpViewShell* pViewShell = GetHelpViewShell( TRUE );
+ if ( pViewShell )
+ bDone = pViewShell->ShowHelp( GetHelpFile(), nHelpId );
+ }
+ else
+ {
+ StartHelpPI( nHelpId, TRUE, FALSE );
+ SfxHelpPI* pHelpPI= SFX_APP()->GetHelpPI();
+ if ( pHelpPI )
+ {
+ if ( !pHelpPI->IsFloatingMode() )
+ {
+ pHelpPI->SetFloatingMode( TRUE );
+ bForcedFloatingPI = TRUE;
+ }
+ if ( pHelpPI->GetFloatingWindow() )
+ pHelpPI->GetFloatingWindow()->ToTop();
+ CheckPIPosition();
+ bDone = TRUE;
+ }
+ }
+ }
+ bInHelpRequest = FALSE;
+ return bDone;
+*/
+ return FALSE;
+}
+
+
+BOOL SfxHelp_Impl::Start( const XubString& rKeyword )
+{
+ BOOL bDone = FALSE;
+ SetCurrentHelpFile( HELP_INDEX );
+ if ( CheckHelpFile( TRUE ) )
+ {
+ }
+ return bDone;
+}
+
+void SfxHelp_Impl::SlotExecutedOrFocusChanged( ULONG nId, BOOL bSlot, BOOL bAutoStart )
+{
+ BOOL bAutoStarted = FALSE;
+ SfxHelpPI* pHelpPI = SFX_APP()->GetHelpPI();
+ if ( pHelpPI )
+ {
+// if ( !bSlot && pHelpPI->IsWindowOrChild( Application::GetFocusWindow(), TRUE ) && !pHelpPI->GetHelpPI()->HasDialogFocus() )
+ if ( !bSlot && pHelpPI->IsWindowOrChild( Application::GetFocusWindow(), TRUE ) )
+ return; // Wenn Navigation im HelpPI, dann nicht triggern...
+ // Nicht auf Focus reagieren, wenn gerade mit F1 angetriggert
+ if ( pHelpPI->IsTopicJustRequested() )
+ return;
+
+ if ( !bSlot || !pHelpPI->IsInShowMe() )
+ pHelpPI->LoadTopic( nId );
+ }
+ else if ( bAutoStart && GetPIStarterList()->Seek_Entry( nId, 0 ) )
+ {
+ SetCurrentHelpFile( nId );
+ StartHelpPI( nId, bSlot, TRUE );
+ bAutoStarted = TRUE;
+ }
+
+ if ( !bSlot && ( pHelpPI || bAutoStarted ) )
+ CheckPIPosition();
+}
+
+
+XubString SfxHelp_Impl::GetHelpText( ULONG nHelpId )
+{
+#if defined DBG_UTIL && ( defined WNT || defined OS2 || defined UNX )
+ static int bTraceHelpIds = 2;
+ if ( bTraceHelpIds == 2 )
+ {
+ char *pHELP = getenv( "HELP" );
+ if( pHELP && !strcmp( pHELP, "MP" ) )
+ bTraceHelpIds = 1;
+ else
+ bTraceHelpIds = 0;
+ }
+ if ( bTraceHelpIds )
+ {
+ ByteString aTraceStr( "HELPID: " );
+ aTraceStr += ByteString::CreateFromInt32( nHelpId );
+ DBG_TRACE( aTraceStr.GetBuffer() );
+ }
+#endif
+
+ // at the moment no implementation
+ return XubString();
+}
+
+void SfxHelp_Impl::GetHelpURLs( const String& rRootURL, SvStringsDtor& rLst )
+{
+ AssertValidHelpDocInfo();
+ // pHelpInfo->GetHelpURLs( rRootURL, rLst );
+}
+
+void SfxHelp_Impl::GetBookmarks( SvStringsDtor& rLst )
+{
+ AssertValidHelpDocInfo();
+// pHelpInfo->GetBookmarks( rLst );
+}
+
+void SfxHelp_Impl::AddBookmark( const String& rName, const String& rURL )
+{
+ AssertValidHelpDocInfo();
+// pHelpInfo->AddBookmark( rName, rURL );
+}
+
+void SfxHelp_Impl::RemoveBookmark( const String& rName )
+{
+ AssertValidHelpDocInfo();
+// pHelpInfo->RemoveBookmark( rName );
+}
+
+void SfxHelp_Impl::RenameBookmark( const String& rOldTitle, const String& rNewTitle )
+{
+ AssertValidHelpDocInfo();
+// pHelpInfo->RenameBookmark( rOldTitle, rNewTitle );
+}
+
+
+BOOL SfxHelp_Impl::CheckHelpFile( BOOL bPrompt ) const
+{
+ return SfxHelp_Impl::CheckHelpFile( GetHelpFile(), bPrompt );
+}
+
+BOOL SfxHelp_Impl::CheckHelpFile( const String& rFileName, BOOL bPrompt )
+{
+ // at the moment no implementation
+ BOOL bOK = FALSE;
+ if ( !bOK && bPrompt )
+ {
+ Window* pParent = Application::GetFocusWindow();
+ String aErrorStr( SfxResId( RID_STR_HLPFILENOTEXIST ) );
+ InfoBox( pParent, aErrorStr ).Execute();
+ }
+
+ return bOK;
+}
+
+void SfxHelp_Impl::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
+{
+ SfxSimpleHint *pHint = PTR_CAST( SfxSimpleHint, &rHint );
+ if ( pHint && ( pHint->GetId() & SFX_HINT_DYING ) )
+ {
+ // z.Zt. lausche ich nur am HelpDoc...
+ }
+}
+
+//-------------------------------------------------------------------------
+
+void SfxHelp_Impl::SetHelpFile( const String &rFileName, BOOL bAdjustExt )
+{
+ INetURLObject aAbsName( GetHelpPath() );
+ aAbsName.insertName( rFileName );
+
+ if ( bAdjustExt )
+ aAbsName.setExtension( DEFINE_CONST_UNICODE("svh") );
+
+ String aFileName = aAbsName.PathToFileName();
+// InfoBox( 0, aFileName ).Execute();
+ Help::SetHelpFile( aFileName );
+ aCurHelpFile = rFileName;
+}
+
+void SfxHelp_Impl::AssertValidHelpDocInfo()
+{
+// if ( !pHelpInfo || ( pHelpInfo->GetRequestedFileName() != GetHelpFile() ) )
+ {
+// delete pHelpInfo;
+// pHelpInfo = new SHelpInfo( GetHelpFile(), FALSE ); // vielleicht doch cachable?
+ }
+}
+
+String SfxHelp_Impl::GetHelpPath()
+{
+ SfxIniManager* pIni = SFX_INIMANAGER()->Find( SFX_KEY_HELP_DIR );
+ if ( !pIni )
+ pIni = SFX_INIMANAGER();
+ String aHelpDir = pIni->Get( SFX_KEY_HELP_DIR );
+
+ if ( aHelpDir.Len() )
+ {
+ String aPath;
+ INetURLObject aHelpRoot( aHelpDir, INET_PROT_FILE );
+
+ // Nach Prioritaeten das richtige Language-Dir suchen...
+ LanguageType eLanguage = Application::GetSettings().GetInternational().GetLanguage();
+ for ( USHORT nPrio = 0; nPrio <= 4; nPrio++ )
+ {
+ const char* pLang = ResMgr::GetLang( eLanguage, nPrio );
+ if ( pLang )
+ {
+ INetURLObject aTemp = aHelpRoot;
+ aTemp.insertName( String::CreateFromAscii( pLang ) );
+ if ( 0 /*! Exists??? */ )
+ {
+ return aTemp.GetMainURL();
+ }
+ }
+ }
+ return aPath;
+ }
+ else
+ {
+ INetURLObject aObj( Application::GetAppFileName(), INET_PROT_FILE );
+ return aObj.GetMainURL();
+ }
+}
+
+void SfxHelp_Impl::CreatePIStarterList()
+{
+ // Config:
+ // [Tips]
+ // Slot=0/1
+
+ DBG_ASSERT( !pPIStarterList, "PIStarterList existiert schon!" );
+ pPIStarterList = new SortedULONGs;
+ Config aConfig( GetHelpAgentConfig() );
+ ImplSetLanguageGroup( aConfig, String::CreateFromAscii(zsHelpAgentConfig_Tips), TRUE );
+ USHORT nTips = aConfig.GetKeyCount();
+ for ( USHORT nTip = 0; nTip < nTips; nTip++ )
+ {
+ if ( (BOOL)(USHORT)aConfig.ReadKey( nTip ).ToInt32() )
+ {
+ ULONG nId = aConfig.GetKeyName( nTip ).ToInt32();
+ if ( nId )
+ pPIStarterList->Insert( nId );
+ }
+ }
+}
+
+void SfxHelp_Impl::StartHelpPI( ULONG nHelpId, BOOL bSlot, BOOL bTip )
+{
+/*! (pb) what about help?
+ if( ImplGetHelpMode() & HELPTEXTMODE_NOHELPAGENT )
+ return;
+
+ BOOL bValidHelpFile = CheckHelpFile( FALSE );
+ SfxHelpPI* pHelpPI = SFX_APP()->GetHelpPI();
+ if ( !pHelpPI && bValidHelpFile )
+ {
+ SFX_APP()->SetChildWindow( SID_HELP_PI, TRUE );
+ pHelpPI = SFX_APP()->GetHelpPI();
+ CheckPIPosition();
+ }
+ else if ( pHelpPI && !bValidHelpFile )
+ {
+ SFX_APP()->SetChildWindow( SID_HELP_PI, FALSE );
+ pHelpPI = NULL;
+ }
+
+ if ( pHelpPI )
+ {
+ if ( bTip )
+ {
+ pHelpPI->SetTip( nHelpId );
+ if ( !bSlot )
+ {
+ // Start ueber Focus => Text des Controls...
+ Window* pWin = Application::GetFocusWindow();
+ if ( pWin && pWin->GetText().Len() )
+ {
+ String aText( pWin->GetText() );
+ aText.EraseAllChars( '~' );
+ pHelpPI->SetTipText( aText );
+ }
+ }
+ }
+ pHelpPI->LoadTopic( nHelpId );
+ pHelpPI->SetTopicJustRequested( TRUE );
+ }
+*/
+}
+
+void SfxHelp_Impl::EnableTip( ULONG nTip, BOOL bEnable )
+{
+ Config aConfig( GetHelpAgentConfig() );
+ ImplSetLanguageGroup( aConfig, String::CreateFromAscii(zsHelpAgentConfig_Tips), TRUE );
+ aConfig.WriteKey( ByteString::CreateFromInt32( nTip ),
+ ByteString::CreateFromInt32( (USHORT)bEnable ) );
+ if ( !bEnable )
+ {
+ USHORT nPos;
+ if ( GetPIStarterList()->Seek_Entry( nTip, &nPos ) )
+ GetPIStarterList()->Remove( nPos );
+ }
+ else
+ GetPIStarterList()->Insert( nTip );
+}
+
+void SfxHelp_Impl::ResetPIStarterList()
+{
+ delete pPIStarterList;
+ pPIStarterList = 0;
+
+ Config aConfig( GetHelpAgentConfig() );
+ ImplSetLanguageGroup( aConfig, String::CreateFromAscii(zsHelpAgentConfig_Tips), TRUE );
+ USHORT nTips = aConfig.GetKeyCount();
+ ByteString aOn = ByteString::CreateFromInt32( 1 );
+ for ( USHORT nTip = 0; nTip < nTips; nTip++ )
+ aConfig.WriteKey( aConfig.GetKeyName( nTip ), aOn );
+}
+
+String SfxHelp_Impl::GetConfigDir( BOOL bGetSharedConfig )
+{
+ ULONG nKey = bGetSharedConfig ? SFX_KEY_CONFIG_DIR : SFX_KEY_USERCONFIG_PATH;
+ SfxIniManager* pIni = SFX_INIMANAGER()->Find( nKey );
+ if ( !pIni )
+ pIni = SFX_INIMANAGER();
+ return pIni->Get( nKey );
+}
+
+String SfxHelp_Impl::GetHelpAgentConfig()
+{
+ INetURLObject aObj( GetConfigDir( FALSE ), INET_PROT_FILE );
+ aObj.insertName( String::CreateFromAscii( zsHelpAgentConfig ) );
+ return aObj.PathToFileName();
+}
+
+
+void SfxHelp::SetCustomHelpFile( const String& rName )
+{
+ SfxHelp_Impl* pHelp = (SfxHelp_Impl*) Application::GetHelp();
+ pHelp->aCustomHelpFile = rName;
+}
+
+void SfxHelp::ShowHint( ULONG nId )
+{
+ SfxHelp_Impl* pHelp = (SfxHelp_Impl*) Application::GetHelp();
+ if ( pHelp )
+ {
+ pHelp->SlotExecutedOrFocusChanged( nId, TRUE, TRUE );
+ // Falls sofort eine Slot-Id folgt, diese unterdruecken
+ SfxHelpPI* pHelpPI = SFX_APP()->GetHelpPI();
+ if ( pHelpPI )
+ pHelpPI->SetTopicJustRequested( TRUE );
+ }
+}
+
+BOOL SfxHelp::ShowHelp( ULONG nId, BOOL bShowInHelpAgent, const char* pFileName, BOOL bQuiet )
+{
+ // at the moment no implementation
+ return FALSE;
+}
+
+BOOL SfxHelp::ShowHelp( const String& rKeyword, BOOL bShowInHelpAgent, const char* pFileName )
+{
+ // at the moment no implementation
+ BOOL bDone = FALSE;
+ return bDone;
+}
+
+USHORT SfxHelp::GetHelpFileInfoCount()
+{
+ SfxHelp_Impl* pHelp = (SfxHelp_Impl*) Application::GetHelp();
+ return pHelp ? pHelp->GetHelpFileInfoCount() : 0;
+}
+
+HelpFileInfo* SfxHelp::GetHelpFileInfo( USHORT n )
+{
+ SfxHelp_Impl* pHelp = (SfxHelp_Impl*) Application::GetHelp();
+ return pHelp ? pHelp->GetHelpFileInfo( n ) : NULL;
+}
+
+// class SfxHelpTipsWrapper ----------------------------------------------
+
+SfxHelpTipsWrapper::SfxHelpTipsWrapper(Window *pParent,
+ USHORT nId, SfxBindings *pBindings, SfxChildWinInfo* pInfo) :
+ SfxChildWindow(pParent, nId)
+{
+ // Skalierung des HelpPI initialisieren
+ USHORT nScale = 100;
+ if ( pInfo->aExtraString.Len() )
+ {
+ USHORT nPos = pInfo->aExtraString.Search(0x0023); // '#' = 23h
+ if ( nPos != STRING_NOTFOUND )
+ {
+ String aScale = pInfo->aExtraString.Erase(nPos+1);
+ pInfo->aExtraString.Erase(nPos,1);
+ nScale = (USHORT) aScale.ToInt32();
+ }
+ else
+ {
+ // Es ist noch ein alter Eintrag (FloatingWindow); das Alignment
+ // wird dann in Initialize nicht ver"andert.
+ pInfo->aExtraString.Erase();
+ }
+ }
+
+ // Versuche, das TipWindow zu laden
+ SfxHelpTipsWindow* pDockWindow = new SfxHelpTipsWindow( pBindings, this, pParent );
+ pWindow = pDockWindow;
+
+ eChildAlignment = SFX_ALIGN_BOTTOM;
+ if ( !pInfo->aSize.Width() )
+ {
+ Size aSz( 400, 150 );
+ pWindow->SetSizePixel( aSz );
+ }
+
+ pDockWindow->Initialize( pInfo );
+}
+
+SfxHelpTipsWindow::SfxHelpTipsWindow( SfxBindings* pBindings, SfxChildWindow* pChildWin, Window* pParent )
+ : SfxDockingWindow( pBindings, pChildWin, pParent,
+ WB_CLOSEABLE | WB_DOCKABLE | WB_CLIPCHILDREN | WB_MOVEABLE | WB_SIZEABLE | WB_DIALOGCONTROL | WB_3DLOOK ),
+
+ maCloseButton( this, 0 ),
+ maCheckBox( this, 0 ),
+ maTipWindow( this, WB_BORDER )
+{
+ mpHelpPI = NULL;
+
+ maCloseButton.SetSymbol( SYMBOL_CLOSE );
+ maCloseButton.SetClickHdl( LINK( this, SfxHelpTipsWindow, CloseButtonHdl ) );
+
+ maCheckBox.SetClickHdl( LINK( this, SfxHelpTipsWindow, CheckBoxHdl ) );
+ maCheckBox.SetHelpId( HID_HELPAGENT_TIP_BOX );
+ maCheckBox.SetText( String( SfxResId( RID_STR_NOWELCOMESCREEN ) ) );
+
+ PostUserEvent( LINK( this, SfxHelpTipsWindow, ShowTip ) );
+
+#ifdef DEBUG
+ maTipWindow.SetBackground( Wallpaper( COL_GREEN ) );
+#endif
+
+ maCloseButton.Show();
+ maTipWindow.Show();
+ maCheckBox.Show();
+}
+
+SfxHelpTipsWindow::~SfxHelpTipsWindow()
+{
+// delete mpHelpPI;
+}
+
+void SfxHelpTipsWindow::FillInfo( SfxChildWinInfo& rInfo ) const
+{
+ SfxDockingWindow::FillInfo( rInfo );
+ rInfo.bVisible = FALSE; // Visibility wird ueber Config gesteuert
+}
+
+void SfxHelpTipsWindow::Resize()
+{
+ Size aOutSz( GetOutputSizePixel() );
+ const long nButtonSize = 16;
+ const long nSpace = 2;
+ Size aCheckBoxSz = maCheckBox.CalcMinimumSize();
+ aCheckBoxSz.Width() += 4; // FocusRect
+ long nWindowPos = IsFloatingMode() ? 0 : (nButtonSize+2*nSpace);
+ maCloseButton.Show( !IsFloatingMode() );
+
+ maCloseButton.SetPosSizePixel( nSpace, nSpace, nButtonSize, nButtonSize );
+ maCheckBox.SetPosSizePixel( nWindowPos, aOutSz.Height() - aCheckBoxSz.Height() - nSpace,
+ aCheckBoxSz.Width(), aCheckBoxSz.Height() );
+ maTipWindow.SetPosSizePixel( nWindowPos, 0,
+ aOutSz.Width() - nWindowPos, aOutSz.Height() - aCheckBoxSz.Height() - 2*nSpace );
+
+// if ( mpHelpPI )
+// mpHelpPI->Resize();
+}
+
+IMPL_LINK( SfxHelpTipsWindow, ShowTip, void*, EMPTYARG )
+{
+ ULONG nId = 0;
+ Config aConfig( SfxHelp_Impl::GetHelpAgentConfig() );
+ ImplSetLanguageGroup( aConfig, DEFINE_CONST_UNICODE("WelcomeScreen"), TRUE );
+ USHORT nTips = aConfig.GetKeyCount();
+ for ( USHORT nTip = 0; nTip < nTips; nTip++ )
+ {
+ if ( (BOOL)(USHORT)aConfig.ReadKey( nTip ).ToInt32() )
+ {
+ nId = aConfig.GetKeyName( nTip ).ToInt32();
+ break;
+ }
+ }
+
+ if ( nId )
+ {
+ // at the moment no implementation
+ }
+
+ return 0;
+}
+
+IMPL_LINK( SfxHelpTipsWindow, CloseButtonHdl, Button*, EMPTYARG )
+{
+ Close();
+ return 0;
+}
+
+IMPL_LINK( SfxHelpTipsWindow, CheckBoxHdl, CheckBox*, EMPTYARG )
+{
+ SFX_APP()->GetOptions().SetWelcomeScreen( !maCheckBox.IsChecked() );
+ return 0;
+}
+
+
diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx
new file mode 100644
index 000000000000..edfd1544c114
--- /dev/null
+++ b/sfx2/source/appl/workwin.cxx
@@ -0,0 +1,3148 @@
+/*************************************************************************
+ *
+ * $RCSfile: workwin.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:28 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#pragma hdrstop
+
+#include "workwin.hxx"
+#include "topfrm.hxx"
+#include "clientsh.hxx"
+#include "arrdecl.hxx"
+#include "viewfrm.hxx"
+#include "module.hxx"
+#include "dispatch.hxx"
+#include "tbxmgr.hxx"
+#include "tbxchild.hxx"
+#include "tbxconf.hxx"
+#include "imgmgr.hxx"
+#include "dockwin.hxx"
+#include "viewsh.hxx"
+#include "ipenv.hxx"
+#include "splitwin.hxx"
+#include "msgpool.hxx"
+#include "sfxhelp.hxx"
+#include "stbmgr.hxx"
+
+DBG_NAME(SfxWorkWindow);
+
+SV_IMPL_OBJARR( SfxObjectBarArr_Impl, SfxObjectBar_Impl );
+
+//====================================================================
+// Sortiert die Children nach ihrem Alignment
+// Reihenfolge entspricht der im enum SfxChildAlignment (->CHILDWIN.HXX).
+//
+
+// Hilfe, um die "Anderungen am Alignment kompatibal zu machen!
+
+BOOL IsAppWorkWinToolbox_Impl( USHORT nPos )
+{
+ switch ( nPos )
+ {
+ case SFX_OBJECTBAR_APPLICATION :
+ case SFX_OBJECTBAR_MACRO:
+ case SFX_OBJECTBAR_FULLSCREEN:
+ return TRUE;
+ default:
+ return FALSE;
+ }
+}
+
+USHORT TbxMatch( USHORT nPos )
+{
+ switch ( nPos )
+ {
+ case SFX_OBJECTBAR_APPLICATION :
+ return 0;
+ break;
+ case SFX_OBJECTBAR_OPTIONS:
+ return 1;
+ break;
+ case SFX_OBJECTBAR_MACRO:
+ return 2;
+ break;
+ case SFX_OBJECTBAR_OBJECT:
+ return 3;
+ break;
+ case SFX_OBJECTBAR_TOOLS:
+ return 4;
+ break;
+ case SFX_OBJECTBAR_FULLSCREEN:
+ case SFX_OBJECTBAR_COMMONTASK:
+ case SFX_OBJECTBAR_RECORDING:
+ return nPos+1;
+ break;
+ default:
+ return nPos;
+ break;
+ }
+}
+
+USHORT ChildAlignValue(SfxChildAlignment eAlign)
+{
+ USHORT ret = 17;
+
+ switch (eAlign)
+ {
+ case SFX_ALIGN_HIGHESTTOP:
+ ret = 1;
+ break;
+ case SFX_ALIGN_LOWESTBOTTOM:
+ ret = 2;
+ break;
+ case SFX_ALIGN_FIRSTLEFT:
+ ret = 3;
+ break;
+ case SFX_ALIGN_LASTRIGHT:
+ ret = 4;
+ break;
+ case SFX_ALIGN_LEFT:
+ ret = 5;
+ break;
+ case SFX_ALIGN_RIGHT:
+ ret = 6;
+ break;
+ case SFX_ALIGN_FIRSTRIGHT:
+ ret = 7;
+ break;
+ case SFX_ALIGN_LASTLEFT:
+ ret = 8;
+ break;
+ case SFX_ALIGN_TOP:
+ ret = 9;
+ break;
+ case SFX_ALIGN_BOTTOM:
+ ret = 10;
+ break;
+ case SFX_ALIGN_TOOLBOXTOP:
+ ret = 11;
+ break;
+ case SFX_ALIGN_TOOLBOXBOTTOM:
+ ret = 12;
+ break;
+ case SFX_ALIGN_LOWESTTOP:
+ ret = 13;
+ break;
+ case SFX_ALIGN_HIGHESTBOTTOM:
+ ret = 14;
+ break;
+ case SFX_ALIGN_TOOLBOXLEFT:
+ ret = 15;
+ break;
+ case SFX_ALIGN_TOOLBOXRIGHT:
+ ret = 16;
+ break;
+ }
+
+ return ret;
+}
+
+USHORT ChildTravelValue( SfxChildAlignment eAlign )
+{
+ USHORT ret = 17;
+
+ switch (eAlign)
+ {
+ case SFX_ALIGN_FIRSTLEFT:
+ ret = 1;
+ break;
+ case SFX_ALIGN_LEFT:
+ ret = 2;
+ break;
+ case SFX_ALIGN_LASTLEFT:
+ ret = 3;
+ break;
+ case SFX_ALIGN_TOOLBOXLEFT:
+ ret = 4;
+ break;
+ case SFX_ALIGN_HIGHESTTOP:
+ ret = 5;
+ break;
+ case SFX_ALIGN_TOP:
+ ret = 6;
+ break;
+ case SFX_ALIGN_TOOLBOXTOP:
+ ret = 7;
+ break;
+ case SFX_ALIGN_LOWESTTOP:
+ ret = 8;
+ break;
+ case SFX_ALIGN_HIGHESTBOTTOM:
+ ret = 9;
+ break;
+ case SFX_ALIGN_TOOLBOXBOTTOM:
+ ret = 10;
+ break;
+ case SFX_ALIGN_BOTTOM:
+ ret = 11;
+ break;
+ case SFX_ALIGN_LOWESTBOTTOM:
+ ret = 12;
+ break;
+ case SFX_ALIGN_TOOLBOXRIGHT:
+ ret = 13;
+ break;
+ case SFX_ALIGN_FIRSTRIGHT:
+ ret = 14;
+ break;
+ case SFX_ALIGN_RIGHT:
+ ret = 15;
+ break;
+ case SFX_ALIGN_LASTRIGHT:
+ ret = 16;
+ break;
+ }
+
+ return ret;
+}
+
+void SfxWorkWindow::Sort_Impl()
+{
+ aSortedList.Remove(0, aSortedList.Count());
+ for (USHORT i=0; i<pChilds->Count(); i++)
+ {
+ SfxChild_Impl *pCli = (*pChilds)[i];
+ if (pCli)
+ {
+ USHORT k;
+ for (k=0; k<aSortedList.Count(); k++)
+// if ( (*pChilds)[aSortedList[k]]->eAlign > pCli->eAlign )
+ if (ChildAlignValue((*pChilds)[aSortedList[k]]->eAlign) >
+ ChildAlignValue(pCli->eAlign))
+ break;
+ aSortedList.Insert (i,k);
+ }
+ }
+
+ bSorted = TRUE;
+}
+
+
+//====================================================================
+// ctor f"ur workwin eines Frames
+
+SfxFrameWorkWin_Impl::SfxFrameWorkWin_Impl( Window *pWin, SfxFrame *pFrm )
+ : SfxWorkWindow(
+ pWin,
+ pFrm->GetCurrentViewFrame()->GetBindings(),
+ pFrm->GetParentFrame() ? pFrm->GetParentFrame()->GetWorkWindow_Impl() : NULL )
+ , pFrame( pFrm )
+{
+ pConfigShell = pFrm->GetCurrentViewFrame();
+
+ // Die ben"otigten SplitWindows (je eins f"ur jede Seite) werden erzeugt
+ for ( USHORT n=0; n<SFX_SPLITWINDOWS_MAX; n++ )
+ {
+ // Die SplitWindows sind direkte ChildWindows des WorkWindows und enthalten
+ // die angedockten Fenster.
+
+ SfxChildAlignment eAlign =
+ ( n == SFX_SPLITWINDOWS_LEFT ? SFX_ALIGN_LEFT :
+ n == SFX_SPLITWINDOWS_RIGHT ? SFX_ALIGN_RIGHT :
+ n == SFX_SPLITWINDOWS_TOP ? SFX_ALIGN_TOP :
+ SFX_ALIGN_BOTTOM );
+ SfxSplitWindow *pWin = new SfxSplitWindow(pWorkWin, eAlign, this, pParent==0 );
+ pSplit[n] = pWin;
+ }
+
+ nOrigMode = SFX_VISIBILITY_CLIENT;
+ nUpdateMode = SFX_VISIBILITY_STANDARD;
+}
+
+//====================================================================
+// ctor f"ur workwin eines InPlaceObjects.
+
+SfxIPWorkWin_Impl::SfxIPWorkWin_Impl( WorkWindow *pWin, SfxBindings& rB,
+ SfxInPlaceEnv_Impl *pE) :
+ SfxWorkWindow(pWin, rB),
+ pEnv(pE)
+{
+ // Die ben"otigten SplitWindows (je eins f"ur jede Seite) werden erzeugt
+ for ( USHORT n=0; n<SFX_SPLITWINDOWS_MAX; n++ )
+ {
+ // Die SplitWindows sind direkte ChildWindows des WorkWindows und enthalten
+ // die angedockten Fenster.
+
+ SfxChildAlignment eAlign =
+ ( n == SFX_SPLITWINDOWS_LEFT ? SFX_ALIGN_LEFT :
+ n == SFX_SPLITWINDOWS_RIGHT ? SFX_ALIGN_RIGHT :
+ n == SFX_SPLITWINDOWS_TOP ? SFX_ALIGN_TOP :
+ SFX_ALIGN_BOTTOM );
+ SfxSplitWindow *pWin = new SfxSplitWindow(pWorkWin, eAlign, this, FALSE);
+ pSplit[n] = pWin;
+ }
+
+ nOrigMode = SFX_VISIBILITY_SERVER;
+ nUpdateMode = SFX_VISIBILITY_SERVER;
+ if ( !pParent )
+ aStatBar.bOn = sal_True;
+}
+
+//====================================================================
+// ctor der Basisklasse
+
+SfxWorkWindow::SfxWorkWindow( Window *pWin, SfxBindings& rB, SfxWorkWindow* pParentWorkwin ) :
+ pWorkWin (pWin),
+ pParent( pParentWorkwin ),
+ bSorted( TRUE ),
+ pBindings(&rB),
+ bDockingAllowed(TRUE),
+ bAllChildsVisible(TRUE),
+ nChilds( 0 ),
+ nOrigMode( 0 ),
+ pConfigShell( 0 ),
+ pActiveChild( 0 )
+{
+ DBG_CTOR(SfxWorkWindow, 0);
+ DBG_ASSERT (pBindings, "Keine Bindings!");
+
+ pBindings->SetWorkWindow_Impl( this );
+
+ pChildWins = new SfxChildWindows_Impl;
+ pChilds = new SfxChildList_Impl;
+
+ // F"ur die ObjectBars wird ein fester Platz in der ChildList reserviert,
+ // damit sie immer in einer definierten Reihenfolge kommen.
+ SfxChild_Impl* pChild=0;
+ for (USHORT n=0; n < SFX_OBJECTBAR_MAX; ++n)
+ pChilds->Insert(0,pChild);
+}
+
+//====================================================================
+// dtor
+
+SfxWorkWindow::~SfxWorkWindow()
+{
+ DBG_DTOR(SfxWorkWindow, 0);
+
+ // Hilfsstruktur f"ur Child-Windows l"oschen
+ DBG_ASSERT( pChilds->Count() == 0, "dangling childs" );
+ delete pChilds;
+ delete pChildWins;
+}
+
+SystemWindow* SfxWorkWindow::GetTopWindow() const
+{
+ Window* pRet = pWorkWin;
+ while ( pRet && !pRet->IsSystemWindow() )
+ pRet = pRet->GetParent();
+ return (SystemWindow*) pRet;
+}
+
+void SfxWorkWindow::ChangeWindow_Impl( Window *pNew )
+{
+ Window *pOld = pWorkWin;
+ pWorkWin = pNew;
+ for ( USHORT nPos = 0; nPos < pChilds->Count(); ++nPos )
+ {
+ SfxChild_Impl *pCli = (*pChilds)[nPos];
+ if ( pCli && pCli->pWin && pCli->pWin->GetParent() == pOld )
+ {
+ pCli->pWin->SetParent( pNew );
+ }
+ }
+}
+
+//--------------------------------------------------------------------
+// Hilfsmethode zum Freigeben der Childlisten. Wenn danach nicht der dtor
+// aufgerufen wird, sondern weiter gearbeitet wird, mu\s wie im ctor von
+// SfxWorkWindow noch Platz f"ur die Objectbars und SplitWindows reserviert
+// werden.
+
+void SfxWorkWindow::DeleteControllers_Impl()
+{
+ DBG_CHKTHIS(SfxWorkWindow, 0);
+
+ // SplitWindows locken (d.h. Resize-Reaktion an den
+ // DockingWindows unterdr"ucken)
+ USHORT n;
+ for ( n=0; n<SFX_SPLITWINDOWS_MAX; n++ )
+ {
+ SfxSplitWindow *p = pSplit[n];
+ if (p->GetWindowCount())
+ p->Lock();
+ }
+
+ // Child-Windows l"oschen
+ USHORT nCount = pChildWins->Count();
+ for ( n=0; n<nCount; n++ )
+ {
+ SfxChildWin_Impl* pCW = (*pChildWins)[n];
+ SfxChildWindow *pChild = pCW->pWin;
+ if (pChild)
+ {
+ pChild->Hide();
+
+ // Wenn das ChildWindow ein direktes Childfenster ist und nicht
+ // in einem SplitWindow liegt, am WorkWindow abmelden.
+ // Nach TH ist eine Abmeldung am Splitwindow nicht erforderlich,
+ // wenn dieses auch gleich mit zerst"ort wird (s.u.).
+ if (pCW->pCli)
+ ReleaseChild_Impl(*pChild->GetWindow());
+ pCW->pWin = 0;
+ delete pChild;
+ }
+ delete pCW->pControl;
+ delete pCW;
+ }
+
+ pChildWins->Remove((USHORT)0, nCount);
+
+ // SplitWindows l"oschen
+ for ( n=0; n<SFX_SPLITWINDOWS_MAX; n++ )
+ {
+ SfxSplitWindow *p = pSplit[n];
+ if (p->GetWindowCount())
+ ReleaseChild_Impl(*p);
+ delete p;
+ }
+
+ // StatusBar l"oschen
+ if ( aStatBar.pStatusBar )
+ {
+ StatusBar *pBar = aStatBar.pStatusBar->GetStatusBar();
+ aStatBar.pStatusBar->StoreConfig();
+ ReleaseChild_Impl( *pBar );
+ DELETEZ( aStatBar.pStatusBar );
+ delete pBar;
+ }
+
+ // ObjectBars l"oschen( zuletzt, damit pChilds nicht tote Pointer enh"alt )
+ for (n=0; n<SFX_OBJECTBAR_MAX; n++)
+ {
+ delete (*pChilds)[TbxMatch(n)];
+
+ // Nicht jede Position mu\s belegt sein
+ SfxToolBoxManager *pTbx = aObjBars[n].pTbx;
+ if (pTbx)
+ {
+ // Release siehe unten
+ pTbx->StoreConfig();
+ delete(pTbx);
+ }
+ }
+
+ // ObjectBars werden alle auf einmal released, da sie einen
+ // festen zusammenh"angenden Bereich im Array pChilds belegen
+ pChilds->Remove(0, SFX_OBJECTBAR_MAX);
+ nChilds = 0;
+}
+
+//====================================================================
+// Virtuelle Methode zum Anordnen der Childfenster.
+
+void SfxWorkWindow::ArrangeChilds_Impl()
+{
+ aClientArea = GetTopRect_Impl();
+ if ( nChilds )
+ Arrange_Impl (aClientArea);
+}
+
+//====================================================================
+// Virtuelle Methode zum Anordnen der Childfenster. Bei InPlaceObjects
+// steht daf"ur als Fl"ache das Rectangle zur Verf"ugung, das am
+// InPlaceClient als TopOuterRect abgefragt werden kann. Diese wird
+// durch den von Arrange_Impl() errechneten SvBorder verringert.
+
+void SfxIPWorkWin_Impl::ArrangeChilds_Impl()
+{
+ aClientArea = GetTopRect_Impl();
+
+ SvBorder aBorder;
+ if ( nChilds )
+ aBorder = Arrange_Impl( aClientArea );
+
+ // Wenn das zugeh"orige Objekt noch die UI-Kontrolle hat, mu\s der
+ // AppBorder gesetzt werden; wenn hier allerdings die UITools entfernt
+ // werden, tut das demn"achst der Container.
+ // (->SfxContainerEnv_Impl::UIToolsShown())
+
+ if ( pEnv->IsShowUITools() )
+ pEnv->GetContainerEnv()->SetTopToolSpacePixel(aBorder);
+ ArrangeAutoHideWindows( NULL );
+}
+
+//====================================================================
+// Virtuelle Methode zum Anordnen der Childfenster. Bei einer Task
+// steht daf"ur als Fl"ache die OutputSize des TaskWindows zur Verf"ugung.
+// Sie wird durch den von Arrange_Impl() errechneten SvBorder verringert.
+
+void SfxFrameWorkWin_Impl::ArrangeChilds_Impl()
+{
+ if ( pFrame->IsClosing_Impl() )
+ return;
+
+ aClientArea = GetTopRect_Impl();
+
+ SvBorder aBorder;
+ if ( nChilds )
+ aBorder = Arrange_Impl (aClientArea);
+
+ // Wenn das aktuelle Dokument der Applikation einen IPClient enth"alt, mu\s
+ // dem dazugeh"origen Objekt durch SetTopToolFramePixel der zur Verf"ugung
+ // stehende Platz zugeteilt werden. Das Objekt zeigt dann seine UITools an
+ // und setzt den App-Border(->SfxInPlaceEnv_Impl::ArrangeChilds_Impl()).
+ // Anderenfalls wird hier direkt der AppBorder gesetzt, um evtl. den Border
+ // zu "uberschreiben, den bisher ein Objekt aus einem anderen Dokument
+ // gesetzt hatte.
+ // Das Objekt setzt, wenn es seine UI-Tools wegnimmt, den SetAppBorder nicht,
+ // damit kein ObjectBar-Zappeln entsteht.
+ // (->SfxInPlaceEnv_Impl::ArrangeChilds_Impl())
+ SfxInPlaceClient *pClient = 0;
+ SfxViewFrame *pF = pFrame->GetCurrentViewFrame();
+ if ( pF && pF->GetViewShell() )
+ pClient = pF->GetViewShell()->GetIPClient();
+
+ if ( pClient )
+ pClient->GetEnv()->SetTopToolFramePixel( aBorder );
+ else
+ pFrame->SetToolSpaceBorderPixel_Impl( aBorder );
+
+ ArrangeAutoHideWindows( NULL );
+}
+
+//--------------------------------------------------------------------
+
+SvBorder SfxWorkWindow::Arrange_Impl(Rectangle &rRect)
+
+/* [Beschreibung]
+
+ Diese Methode ordnet alle sichtbaren ChildFenster so an, da\s die angedockten
+ Fenster nach der Sorierreihenfolge von au\sen nach innen aneinander
+ gesetzt werden. Wenn ein an sich sichtbares Fenster nicht mehr in die
+ noch freie ClientArea pa\st, wird es auf "nicht sichtbar" gesetzt.
+
+*/
+{
+ DBG_CHKTHIS(SfxWorkWindow, 0);
+
+ Rectangle aTmp( rRect );
+
+ if (!bSorted)
+ Sort_Impl();
+
+ SvBorder aBorder;
+ Point aPos;
+ Size aSize;
+
+ for ( USHORT n=0; n<aSortedList.Count(); ++n )
+ {
+ SfxChild_Impl* pCli = (*pChilds)[aSortedList[n]];
+ if ( !pCli->pWin )
+ continue;
+
+ // Zun"achst nehmen wir an, da\s das Fenster Platz hat
+ pCli->nVisible |= CHILD_FITS_IN;
+
+ // Nicht sichtbare Fenster "uberspringen
+ if (pCli->nVisible != CHILD_VISIBLE)
+ continue;
+
+ if ( pCli->bResize )
+ aSize = pCli->aSize;
+ else
+ aSize = pCli->pWin->GetSizePixel();
+
+ SvBorder aTemp = aBorder;
+ BOOL bAllowHiding = TRUE;
+ switch ( pCli->eAlign )
+ {
+ case SFX_ALIGN_TOP:
+ case SFX_ALIGN_TOOLBOXTOP:
+ case SFX_ALIGN_LOWESTTOP:
+ case SFX_ALIGN_HIGHESTTOP:
+ bAllowHiding = FALSE;
+ aBorder.Top() += aSize.Height();
+ aPos = aTmp.TopLeft();
+ aTmp.Top() += aSize.Height();
+ aSize.Width() = aTmp.GetWidth();
+ break;
+
+ case SFX_ALIGN_BOTTOM:
+ case SFX_ALIGN_TOOLBOXBOTTOM:
+ case SFX_ALIGN_LOWESTBOTTOM:
+ case SFX_ALIGN_HIGHESTBOTTOM:
+ aBorder.Bottom() += aSize.Height();
+ aPos = aTmp.BottomLeft();
+ aPos.Y() -= (aSize.Height()-1);
+ aTmp.Bottom() -= aSize.Height();
+ aSize.Width() = aTmp.GetWidth();
+ break;
+
+ case SFX_ALIGN_LEFT:
+ case SFX_ALIGN_TOOLBOXLEFT:
+ case SFX_ALIGN_FIRSTLEFT:
+ case SFX_ALIGN_LASTLEFT:
+ bAllowHiding = FALSE;
+ aBorder.Left() += aSize.Width();
+ aPos = aTmp.TopLeft();
+ aTmp.Left() += aSize.Width();
+ aSize.Height() = aTmp.GetHeight();
+ break;
+
+ case SFX_ALIGN_RIGHT:
+ case SFX_ALIGN_TOOLBOXRIGHT:
+ case SFX_ALIGN_FIRSTRIGHT:
+ case SFX_ALIGN_LASTRIGHT:
+ aBorder.Right() += aSize.Width();
+ aPos = aTmp.TopRight();
+ aPos.X() -= (aSize.Width()-1);
+ aTmp.Right() -= aSize.Width();
+ aSize.Height() = aTmp.GetHeight();
+ break;
+
+ default:
+ pCli->aSize = pCli->pWin->GetSizePixel();
+ pCli->bResize = FALSE;
+ continue;
+ break;
+ }
+
+ pCli->pWin->SetPosSizePixel( aPos, aSize );
+ pCli->bResize = FALSE;
+ pCli->aSize = aSize;
+ if( bAllowHiding && !RequestTopToolSpacePixel_Impl( aBorder ) )
+ {
+ pCli->nVisible ^= CHILD_FITS_IN;
+ aBorder = aTemp;
+ }
+ }
+
+ if ( rRect.GetWidth() >= aBorder.Left() + aBorder.Right() )
+ {
+ rRect.Left() += aBorder.Left();
+ rRect.Right() -= aBorder.Right();
+ }
+ else
+ {
+ aBorder.Left() = rRect.Left();
+ aBorder.Right() = rRect.Right();
+ rRect.Right() = rRect.Left() = aTmp.Left();
+ }
+
+ if ( rRect.GetHeight() >= aBorder.Top() + aBorder.Bottom() )
+ {
+ rRect.Top() += aBorder.Top();
+ rRect.Bottom() -= aBorder.Bottom();
+ }
+ else
+ {
+ aBorder.Top() = rRect.Top();
+ aBorder.Bottom() = rRect.Bottom();
+ rRect.Top() = rRect.Bottom() = aTmp.Top();
+ }
+
+ return IsDockingAllowed() ? aBorder : SvBorder();
+}
+
+//--------------------------------------------------------------------
+// Close-Handler: die Konfiguration der ChildWindows wird gespeichert.
+//
+
+void SfxWorkWindow::Close_Impl()
+{
+ for (USHORT n=0; n<pChildWins->Count(); n++)
+ {
+ SfxChildWin_Impl *pCW = (*pChildWins)[n];
+ SfxChildWindow *pChild = pCW->pWin;
+ if (pChild)
+ {
+ BOOL bTask = ( pCW->aInfo.nFlags & SFX_CHILDWIN_TASK ) != 0;
+ pCW->aInfo = pChild->GetInfo();
+ if ( bTask )
+ pCW->aInfo.nFlags |= SFX_CHILDWIN_TASK;
+ SaveStatus_Impl(pChild, pCW->aInfo);
+ }
+ }
+}
+
+BOOL SfxWorkWindow::PrepareClose_Impl()
+{
+ for (USHORT n=0; n<pChildWins->Count(); n++)
+ {
+ SfxChildWin_Impl *pCW = (*pChildWins)[n];
+ SfxChildWindow *pChild = pCW->pWin;
+ if ( pChild && !pChild->QueryClose() )
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+//--------------------------------------------------------------------
+
+SfxChild_Impl* SfxWorkWindow::RegisterChild_Impl( Window& rWindow,
+ SfxChildAlignment eAlign, BOOL bCanGetFocus )
+{
+ DBG_CHKTHIS(SfxWorkWindow, 0);
+ DBG_ASSERT( pChilds->Count() < 255, "too many childs" );
+ DBG_ASSERT( SfxChildAlignValid(eAlign), "invalid align" );
+ DBG_ASSERT( !FindChild_Impl(rWindow), "child registered more than once" );
+
+
+ if ( rWindow.GetParent() != pWorkWin )
+ rWindow.SetParent( pWorkWin );
+
+ SfxChild_Impl *pChild = new SfxChild_Impl(rWindow, rWindow.GetSizePixel(),
+ eAlign, rWindow.IsVisible());
+ pChild->bCanGetFocus = bCanGetFocus;
+
+ pChilds->Insert(pChilds->Count(), pChild);
+ bSorted = FALSE;
+ nChilds++;
+ return (*pChilds)[pChilds->Count()-1];
+}
+
+//--------------------------------------------------------------------
+
+void SfxWorkWindow::AlignChild_Impl( Window& rWindow,
+ const Size& rNewSize,
+ SfxChildAlignment eAlign )
+{
+ DBG_CHKTHIS(SfxWorkWindow, 0);
+ DBG_ASSERT( pChilds, "aligning unregistered child" );
+ DBG_ASSERT( SfxChildAlignValid(eAlign), "invalid align" );
+
+ SfxChild_Impl *pChild = FindChild_Impl(rWindow);
+ if ( pChild )
+ {
+ if (pChild->eAlign != eAlign)
+ bSorted = FALSE;
+
+ pChild->eAlign = eAlign;
+ pChild->aSize = rNewSize;
+ pChild->bResize = TRUE;
+ }
+ else
+ DBG_ERROR( "aligning unregistered child" );
+}
+
+//--------------------------------------------------------------------
+
+void SfxWorkWindow::ReleaseChild_Impl( Window& rWindow )
+{
+ DBG_CHKTHIS(SfxWorkWindow, 0);
+ DBG_ASSERT( pChilds, "releasing unregistered child" );
+
+ SfxChild_Impl *pChild = 0;
+ USHORT nCount = pChilds->Count();
+ USHORT nPos;
+ for ( nPos = 0; nPos < nCount; ++nPos )
+ {
+ pChild = (*pChilds)[nPos];
+ if ( pChild )
+ if ( pChild->pWin == &rWindow )
+ break;
+ }
+
+ if ( nPos < nCount )
+ {
+ bSorted = FALSE;
+ nChilds--;
+ pChilds->Remove(nPos);
+ delete pChild;
+ }
+ else
+ DBG_ERROR( "releasing unregistered child" );
+}
+
+//--------------------------------------------------------------------
+
+SfxChild_Impl* SfxWorkWindow::FindChild_Impl( const Window& rWindow ) const
+{
+ DBG_CHKTHIS(SfxWorkWindow, 0);
+
+ SfxChild_Impl *pChild = 0;
+ USHORT nCount = pChilds->Count();
+ for ( USHORT nPos = 0; nPos < nCount; ++nPos )
+ {
+ pChild = (*pChilds)[nPos];
+ if ( pChild )
+ if ( pChild->pWin == &rWindow )
+ return pChild;
+ }
+
+ return 0;
+}
+
+//--------------------------------------------------------------------
+
+void SfxWorkWindow::ShowChilds_Impl()
+{
+ DBG_CHKTHIS(SfxWorkWindow, 0);
+
+ SfxChild_Impl *pCli = 0;
+ for ( USHORT nPos = 0; nPos < pChilds->Count(); ++nPos )
+ {
+ pCli = (*pChilds)[nPos];
+ if (pCli && pCli->pWin)
+ {
+ if ( CHILD_VISIBLE == (pCli->nVisible & CHILD_VISIBLE) )
+ {
+ switch ( pCli->pWin->GetType() )
+ {
+ case RSC_DOCKINGWINDOW :
+ ((DockingWindow*)pCli->pWin)->Show();
+ break;
+ case RSC_TOOLBOX :
+ ((ToolBox*)pCli->pWin)->Show();
+ break;
+ case RSC_SPLITWINDOW :
+ ((SplitWindow*)pCli->pWin)->Show();
+ break;
+ default:
+ pCli->pWin->Show();
+ break;
+ }
+ }
+ else
+ {
+ switch ( pCli->pWin->GetType() )
+ {
+ case RSC_DOCKINGWINDOW :
+ case RSC_TOOLBOX :
+ ((DockingWindow*)pCli->pWin)->Hide();
+ break;
+ default:
+ pCli->pWin->Hide();
+ break;
+ }
+ }
+ }
+ }
+}
+
+//--------------------------------------------------------------------
+
+void SfxWorkWindow::HideChilds_Impl()
+{
+ SfxChild_Impl *pChild = 0;
+ for ( USHORT nPos = pChilds->Count(); nPos > 0; --nPos )
+ {
+ pChild = (*pChilds)[nPos-1];
+ if (pChild && pChild->pWin)
+ {
+ switch ( pChild->pWin->GetType() )
+ {
+ case RSC_DOCKINGWINDOW :
+ case RSC_TOOLBOX :
+ ((DockingWindow*)pChild->pWin)->Hide();
+ break;
+ default:
+ pChild->pWin->Hide();
+ break;
+ }
+ }
+ }
+}
+
+//------------------------------------------------------------------------
+
+void SfxWorkWindow::ResetObjectBars_Impl()
+{
+ USHORT n;
+ for ( n = 0; n < SFX_OBJECTBAR_MAX; ++n )
+ {
+ aObjBars[n].nId = 0;
+ aObjBarLists[n].aArr.Remove(0, aObjBarLists[n].aArr.Count() );
+ aObjBarLists[n].nAct = 0;
+ }
+
+ for ( n = 0; n < pChildWins->Count(); ++n )
+ (*pChildWins)[n]->nId = 0;
+
+// if ( pParent )
+// pParent->ResetObjectBars_Impl();
+}
+
+void SfxWorkWindow::NextObjectBar_Impl( USHORT nPos )
+{
+ USHORT nCount = aObjBarLists[nPos].aArr.Count();
+ if ( nCount > 1 )
+ {
+ if ( ++(aObjBarLists[nPos].nAct) == nCount )
+ aObjBarLists[nPos].nAct = 0;
+
+ aObjBars[nPos] = aObjBarLists[nPos].Actual();
+ UpdateObjectBars_Impl();
+ }
+}
+
+USHORT SfxWorkWindow::HasNextObjectBar_Impl( USHORT nPos, String *pStr )
+{
+ USHORT nCount = aObjBarLists[nPos].aArr.Count();
+ if ( nCount > 1 )
+ {
+ USHORT nAct = aObjBarLists[nPos].nAct;
+ if ( ++nAct == nCount )
+ nAct = 0;
+ const SfxObjectBar_Impl& rObjbar = aObjBarLists[nPos].aArr[nAct];
+ if ( pStr )
+ *pStr = rObjbar.aName;
+ return rObjbar.nId;
+ }
+
+ return 0;
+}
+
+//------------------------------------------------------------------------
+
+void SfxWorkWindow::SetObjectBar_Impl( USHORT nPos, const ResId& rResId,
+ SfxInterface* pIFace, const String *pName)
+{
+ DBG_ASSERT( (nPos & SFX_POSITION_MASK) < SFX_OBJECTBAR_MAX,
+ "object bar position overflow" );
+
+ USHORT nRealPos = nPos & SFX_POSITION_MASK;
+ if ( pParent && IsAppWorkWinToolbox_Impl( nRealPos ) )
+ {
+ pParent->SetObjectBar_Impl( nPos, rResId, pIFace, pName );
+ return;
+ }
+
+ SfxObjectBar_Impl& rObjBar = aObjBars[nRealPos];
+ rObjBar.pIFace = pIFace;
+ rObjBar.nId = rResId.GetId();
+ rObjBar.pResMgr = rResId.GetResMgr();
+ rObjBar.nMode = (nPos & SFX_VISIBILITY_MASK);
+ if (pName)
+ rObjBar.aName = *pName;
+ else
+ rObjBar.aName.Erase();
+
+ SfxObjectBarArr_Impl& rArr = aObjBarLists[nRealPos].aArr;
+ for ( USHORT n=0; n<rArr.Count(); n++ )
+ {
+ if ( rArr[n].nId == rObjBar.nId )
+ {
+ aObjBarLists[nRealPos].nAct = n;
+ return;
+ }
+ }
+
+ rArr.Insert( rObjBar, 0 );
+}
+
+//------------------------------------------------------------------------
+
+FASTBOOL SfxWorkWindow::KnowsObjectBar_Impl( USHORT nPos ) const
+
+/* [Beschreibung]
+
+ Stellt fest, ob an der betreffenden Position "uberhaupt eine
+ Objektleiste zur Verf"ugung stehen w"urde. Ist unabh"agig davon,
+ ob diese tats"achlich ein- oder ausgeschaltet ist.
+*/
+
+{
+ USHORT nRealPos = nPos & SFX_POSITION_MASK;
+ if ( pParent && IsAppWorkWinToolbox_Impl( nRealPos ) )
+ return pParent->KnowsObjectBar_Impl( nPos );
+
+ return 0 != aObjBars[nPos & SFX_POSITION_MASK].nId;
+}
+
+//------------------------------------------------------------------------
+
+BOOL SfxWorkWindow::IsVisible_Impl( USHORT nMode ) const
+{
+ switch( nUpdateMode )
+ {
+ case SFX_VISIBILITY_STANDARD:
+ return TRUE;
+ case SFX_VISIBILITY_UNVISIBLE:
+ return FALSE;
+ case SFX_VISIBILITY_PLUGSERVER:
+ case SFX_VISIBILITY_PLUGCLIENT:
+ case SFX_VISIBILITY_CLIENT:
+ case SFX_VISIBILITY_SERVER:
+ return !!(nMode & nUpdateMode);
+ default:
+ return !!(nMode & nOrigMode ) ||
+ nOrigMode == SFX_VISIBILITY_STANDARD;
+ }
+}
+
+Window* SfxWorkWindow::GetObjectBar_Impl( USHORT nPos, ResId& rResId )
+{
+ USHORT nRealPos = nPos & SFX_POSITION_MASK;
+ DBG_ASSERT( nRealPos < SFX_OBJECTBAR_MAX,
+ "object bar position overflow" );
+
+ if ( pParent && IsAppWorkWinToolbox_Impl( nRealPos ) )
+ return pParent->GetObjectBar_Impl( nPos, rResId );
+
+ rResId = ResId(aObjBars[nPos & SFX_POSITION_MASK].nId);
+ rResId.SetResMgr(aObjBars[nPos & SFX_POSITION_MASK].pResMgr);
+
+ return &aObjBars[nPos].pTbx->GetToolBox();
+}
+
+//------------------------------------------------------------------------
+void SfxFrameWorkWin_Impl::UpdateObjectBars_Impl()
+{
+ SfxWorkWindow *pWork = pParent;
+ while ( pWork )
+ {
+ pWork->SfxWorkWindow::UpdateObjectBars_Impl();
+ pWork = pWork->GetParent_Impl();
+ }
+
+ SfxWorkWindow::UpdateObjectBars_Impl();
+
+// if ( pTask->IsActive() )
+ {
+ pWork = pParent;
+ while ( pWork )
+ {
+ pWork->ArrangeChilds_Impl();
+ pWork = pWork->GetParent_Impl();
+ }
+
+ ArrangeChilds_Impl();
+
+ pWork = pParent;
+ while ( pWork )
+ {
+ pWork->ShowChilds_Impl();
+ pWork = pWork->GetParent_Impl();
+ }
+
+ ShowChilds_Impl();
+ }
+
+ if ( aStatBar.pStatusBar )
+ {
+ StatusBar *pBar = aStatBar.pStatusBar->GetStatusBar();
+// pBar->SetBottomBorder( FALSE );
+ pBar->SetPosSizePixel( 0, 0, 0, pBar->CalcWindowSizePixel().Height(), WINDOW_POSSIZE_HEIGHT );
+ ArrangeChilds_Impl();
+ }
+
+ ShowChilds_Impl();
+}
+
+void SfxIPWorkWin_Impl::UpdateObjectBars_Impl()
+{
+ SfxWorkWindow::UpdateObjectBars_Impl();
+ if ( pWorkWin->IsVisible() )
+ {
+ ArrangeChilds_Impl();
+ ShowChilds_Impl();
+ }
+}
+
+SfxStatusBarManager* SfxWorkWindow::GetStatusBarManager_Impl()
+{
+ return aStatBar.pStatusBar;
+}
+
+//------------------------------------------------------------------------
+
+void SfxWorkWindow::UpdateObjectBars_Impl()
+{
+ // SplitWindows locken (d.h. Resize-Reaktion an den
+ // DockingWindows unterdr"ucken)
+ USHORT n;
+ for ( n=0; n<SFX_SPLITWINDOWS_MAX; n++ )
+ {
+ SfxSplitWindow *p = pSplit[n];
+ if (p->GetWindowCount())
+ p->Lock();
+ }
+
+ // was man so "ofters braucht, merkt man sich (spart Code und Laufzeit)
+ SfxApplication *pSfxApp = SFX_APP();
+ SfxImageManager *pImgMgr = SFX_IMAGEMANAGER();
+ SfxToolBoxConfig *pTbxCfg = SfxToolBoxConfig::GetOrCreate();
+
+ // die Modi bestimmen, die im Kontext gelten
+ // Geht InPlace nur bein internem InPlace, was aber egal ist, da bei
+ // externem InPlace es schon wegen OLE nicht gehen kann !
+ FASTBOOL bIsFullScreen = FALSE;
+ Window* pSysWin = GetTopWindow();
+ if ( pSysWin )
+ {
+ while ( pSysWin && pSysWin->GetType() != WINDOW_WORKWINDOW )
+ pSysWin = pSysWin->GetParent();
+
+ if ( pSysWin )
+ bIsFullScreen = ((WorkWindow*)pSysWin)->IsFullScreenMode();
+ }
+
+ // "uber alle Toolbox-Positionen iterieren
+ for ( n = 0; n < SFX_OBJECTBAR_MAX; ++n )
+ {
+ SfxChild_Impl *&rpCli = (*pChilds)[TbxMatch(n)];
+
+ // Toolbox und/oder Id an der Position 'n'
+ USHORT nId = aObjBars[n].nId;
+ SfxToolBoxManager *&rpTbx = aObjBars[n].pTbx;
+ FASTBOOL bToolBoxVisible = pTbxCfg->IsToolBoxPositionVisible(n);
+
+ // die Modi bestimmen, f"ur die die ToolBox gilt
+ USHORT nTbxMode = aObjBars[n].nMode;
+ FASTBOOL bFullScreenTbx = SFX_VISIBILITY_FULLSCREEN ==
+ ( nTbxMode & SFX_VISIBILITY_FULLSCREEN );
+ nTbxMode &= ~SFX_VISIBILITY_FULLSCREEN;
+
+ // wird in diesem Kontext eine ToolBox gefordert?
+ FASTBOOL bModesMatching = nUpdateMode && ( nTbxMode & nUpdateMode) == nUpdateMode;
+ if ( nId != 0 && bToolBoxVisible == TRUE &&
+ ( ( bModesMatching && !bIsFullScreen ) ||
+ ( bIsFullScreen && bFullScreenTbx ) ) )
+ {
+ // keine oder falsche Toolbox an der Position 'n' vorhanden?
+ if ( !rpTbx || ( rpTbx && rpTbx->GetType() != nId ) )
+ {
+ // (falsche) Toolbox vorhanden?
+ if (rpTbx)
+ {
+ // dann Toolbox-Inhalt autauschen
+ rpTbx = new SfxToolBoxManager(
+ ResId( aObjBars[n].nId,
+ aObjBars[n].pResMgr ),
+ aObjBars[n].pIFace,
+ aObjBars[n].aName,
+ rpTbx, pConfigShell);
+ rpCli->pWin = &rpTbx->GetToolBox();
+ }
+ else
+ {
+ // sonst Toolbox neu erzeugen
+ rpTbx = new SfxToolBoxManager( pWorkWin,
+ GetBindings(),
+ ResId( aObjBars[n].nId,
+ aObjBars[n].pResMgr ),
+ aObjBars[n].pIFace,
+ n, pConfigShell );
+
+ rpTbx->Initialize();
+ SfxToolbox& rTbx = (SfxToolbox&) rpTbx->GetToolBox();
+ if ( !rpCli )
+ {
+ rpCli = new SfxChild_Impl( rTbx, Size(),
+ rTbx.IsFloatingMode() ? SFX_ALIGN_NOALIGNMENT : rTbx.GetAlignment(), TRUE );
+ }
+ else
+ {
+ rpCli->pWin = &rTbx;
+ }
+
+ bSorted = FALSE;
+ nChilds++;
+ }
+
+ ToolBox& rTbx = rpTbx->GetToolBox();
+ rTbx.SetText(aObjBars[n].aName);
+ if ( rTbx.IsFloatingMode() )
+ rpCli->aSize = rTbx.GetFloatingWindow()->GetSizePixel();
+ else
+ {
+ rpCli->bResize = TRUE;
+ rpCli->aSize = rTbx.GetSizePixel();
+ }
+
+ // Schnelles Statusupdate wirkt optisch besser
+ rpTbx->UpdateControls_Impl();
+ }
+ else
+ {
+ ToolBox& rTbx = rpTbx->GetToolBox();
+ BOOL bWasFloating = rTbx.IsFloatingMode();
+ rpTbx->Reconfigure_Impl( pTbxCfg->GetCfgItem_Impl( n ) );
+ rTbx.SetText(aObjBars[n].aName);
+ String aNext;
+ rpTbx->GetNextToolBox_Impl( &aNext );
+ rTbx.SetNextToolBox( aNext );
+
+ if ( bWasFloating && !rTbx.IsFloatingMode() )
+ {
+ // Toolbox einer nicht aktiven Task wurde angedockt und
+ // jetzt wurde sie wieder aktiviert.
+ // Falls angedockte Toolboxen sichtbar sein sollen, mu\s
+ // sie geshowed werden, da sie vorher in HidePopups
+ // gehidet wurde
+ if ( IsDockingAllowed() && bAllChildsVisible )
+ rpCli->nVisible |= CHILD_ACTIVE;
+ if ( CHILD_VISIBLE == (rpCli->nVisible & CHILD_VISIBLE) )
+ rTbx.Show();
+ }
+ }
+ }
+ else
+ {
+ // ggf. Toolbox an dieser Position l"oschen
+ if (rpTbx)
+ {
+ rpTbx->StoreConfig();
+ rpCli->pWin = 0;
+ SfxToolBoxManager *p = rpTbx;
+ rpTbx = 0;
+ p->Delete();
+ bSorted = FALSE;
+ nChilds--;
+ }
+ }
+
+ if ( rpTbx && !IsDockingAllowed() )
+ {
+ // Presentation mode
+ if ( !rpTbx->GetToolBox().IsFloatingMode() )
+ {
+ // keine angedockten Toolboxen
+ rpCli->pWin = 0;
+ SfxToolBoxManager *p = rpTbx;
+ rpTbx = 0;
+ p->Delete();
+ bSorted = FALSE;
+ nChilds--;
+ }
+ else if( !bAllChildsVisible )
+ // angedockte Toolboxen bis zum Livemodus hiden
+ rpCli->nVisible &= ~CHILD_ACTIVE;
+ }
+ }
+
+ UpdateChildWindows_Impl();
+
+ // SplitWindows wieder ent-locken
+ for ( n=0; n<SFX_SPLITWINDOWS_MAX; n++ )
+ {
+ SfxSplitWindow *p = pSplit[n];
+ if (p->GetWindowCount())
+ p->Lock(FALSE);
+ }
+
+ UpdateStatusBar_Impl();
+}
+
+void SfxWorkWindow::UpdateChildWindows_Impl()
+{
+ FASTBOOL bIsFullScreen = FALSE;
+ Window* pSysWin = GetTopWindow();
+ if ( pSysWin )
+ {
+ while ( pSysWin && pSysWin->GetType() != WINDOW_WORKWINDOW )
+ pSysWin = pSysWin->GetParent();
+
+ if ( pSysWin )
+ bIsFullScreen = ((WorkWindow*)pSysWin)->IsFullScreenMode();
+ }
+
+ // alle vorhandenen oder in den Kontext gekommenen ChildWindows
+ for ( USHORT n=0; n<pChildWins->Count(); n++ )
+ {
+ SfxChildWin_Impl *pCW = (*pChildWins)[n];
+ SfxChildWindow *pChildWin = pCW->pWin;
+ BOOL bCreate = FALSE;
+ if ( pCW->nId && !pCW->bDisabled && IsVisible_Impl( pCW->nVisibility ) )
+ {
+ // Im Kontext ist ein geeignetes ChildWindow erlaubt;
+ // ist es auch eingeschaltet ?
+ if ( pChildWin == 0 && pCW->bCreate )
+ {
+ if ( !IsDockingAllowed() || bIsFullScreen )
+ {
+ // im PresentationMode oder FullScreen nur FloatingWindows
+ SfxChildAlignment eAlign;
+ if ( pCW->aInfo.GetExtraData_Impl( &eAlign ) )
+ bCreate = ( eAlign == SFX_ALIGN_NOALIGNMENT );
+ }
+ else
+ bCreate = TRUE;
+
+ // Momentan kein Fenster da, aber es ist eingeschaltet; Fenster
+ // und ggf. Context erzeugen
+ if ( bCreate )
+ CreateChildWin_Impl( pCW );
+
+ if ( !bAllChildsVisible )
+ {
+ if ( pCW->pCli )
+ pCW->pCli->nVisible &= ~CHILD_ACTIVE;
+ }
+ }
+ else if ( pChildWin )
+ {
+ // Fenster existiert schon; soll es auch sichtbar sein ?
+ if ( ( !bIsFullScreen || pChildWin->GetAlignment() == SFX_ALIGN_NOALIGNMENT ) && bAllChildsVisible )
+ {
+ // Updatemode ist kompatibel; auf jeden Fall wieder einschalten
+ bCreate = TRUE;
+ if ( pCW->pCli )
+ {
+ // Fenster ist direktes Child
+ if ( bAllChildsVisible && ( IsDockingAllowed() || pCW->pCli->eAlign == SFX_ALIGN_NOALIGNMENT ) )
+ pCW->pCli->nVisible |= CHILD_NOT_HIDDEN;
+ }
+ else if ( pCW->bCreate && IsDockingAllowed() )
+ // Fenster liegt in einem SplitWindow
+ ((SfxDockingWindow*)pChildWin->GetWindow())->Reappear_Impl();
+
+ if ( pCW->nInterfaceId != pChildWin->GetContextId() )
+ pChildWin->CreateContext( pCW->nInterfaceId, GetBindings() );
+ }
+ }
+ }
+
+ if ( pChildWin && !bCreate )
+ {
+ Window *pWindow = pChildWin->GetWindow();
+ if ( pWindow && ( pWindow->HasFocus() || pWindow->HasChildPathFocus( TRUE ) ) )
+ {
+ // Wenn der Focus auf dem Childwindow sitzt, mu\s er auf das aktuelle
+ // Dokument gesetzt werden
+ // Nein !! Das fhrt gerne mal zu Rekursionen, da im GetFocus-Notify erneut ein Update ausgel"ost wird!
+ // ->#66426#
+ // SfxViewFrame *pView = SfxViewFrame::Current();
+ // if ( pView )
+ // pView->GetFrame()->GrabFocusOnComponent_Impl();
+ }
+
+ if ( !pChildWin->QueryClose() || pChildWin->IsHideNotDelete() || Application::IsUICaptured() )
+ {
+ if ( pCW->pCli )
+ {
+ if ( pCW->pCli->nVisible & CHILD_NOT_HIDDEN )
+ pCW->pCli->nVisible ^= CHILD_NOT_HIDDEN;
+ }
+ else
+ ((SfxDockingWindow*)pChildWin->GetWindow())->Disappear_Impl();
+ }
+ else
+ RemoveChildWin_Impl( pCW );
+ }
+ }
+}
+
+void SfxWorkWindow::CreateChildWin_Impl( SfxChildWin_Impl *pCW )
+{
+ if ( pCW->aInfo.bVisible != 42 )
+ pCW->aInfo.bVisible = TRUE;
+
+ SfxChildWindow *pChildWin = SfxChildWindow::CreateChildWindow( pCW->nId, pWorkWin, &GetBindings(), pCW->aInfo);
+ if (pChildWin)
+ {
+ pChildWin->SetWorkWindow_Impl( this );
+#if 0
+ // Enable-Status richtig setzen
+ pChildWin->GetWindow()->EnableInput( pCW->bEnable &&
+ ( pWorkWin->IsInputEnabled() /* || pChildWin->GetAlignment() == SFX_ALIGN_NOALIGNMENT */ ) );
+#endif
+ // Zumindest der ExtraString wird beim Auswerten ver"andert, also neu holen
+ BOOL bTask = ( pCW->aInfo.nFlags & SFX_CHILDWIN_TASK ) != 0;
+ pCW->aInfo = pChildWin->GetInfo();
+ if ( bTask )
+ pCW->aInfo.nFlags |= SFX_CHILDWIN_TASK;
+
+ // Nein !! Sonst kann man keine Fenster defaultmaessig ausschalten ( Partwindow! )
+// pCW->aInfo.bVisible = TRUE;
+
+ // Erzeugung war erfolgreich
+ GetBindings().Invalidate(pCW->nId);
+
+ USHORT nPos = pChildWin->GetPosition();
+ if (nPos != CHILDWIN_NOPOS)
+ {
+ DBG_ASSERT(nPos < SFX_OBJECTBAR_MAX, "Illegal objectbar position!");
+ if ((*pChilds)[TbxMatch(nPos)])// &&
+// pChildWin->GetAlignment() == (*pChilds)[nPos]->eAlign )
+ {
+ // ChildWindow ersetzt ObjectBar
+ (*pChilds)[TbxMatch(nPos)]->nVisible ^= CHILD_NOT_HIDDEN;
+ }
+ }
+
+ pCW->pWin = pChildWin;
+
+ if ( pChildWin->GetAlignment() == SFX_ALIGN_NOALIGNMENT ||
+ pChildWin->GetWindow()->GetParent() == pWorkWin)
+ {
+ // Das Fenster ist entweder nicht angedockt oder au\serhalb
+ // eines SplitWindows angedockt und mu\s daher explizit als
+ // Child registriert werden
+ pCW->pCli = RegisterChild_Impl(*(pChildWin->GetWindow()),
+ pChildWin->GetAlignment(), pChildWin->CanGetFocus());
+ pCW->pCli->nVisible = CHILD_VISIBLE;
+ FASTBOOL bIsFullScreen = FALSE;
+ Window* pSysWin = GetTopWindow();
+ if ( pSysWin )
+ {
+ while ( pSysWin && pSysWin->GetType() != WINDOW_WORKWINDOW )
+ pSysWin = pSysWin->GetParent();
+
+ if ( pSysWin )
+ bIsFullScreen = ((WorkWindow*)pSysWin)->IsFullScreenMode();
+ }
+
+ if ( pChildWin->GetAlignment() != SFX_ALIGN_NOALIGNMENT && bIsFullScreen )
+ pCW->pCli->nVisible ^= CHILD_ACTIVE;
+ }
+ else
+ {
+ // Ein angedocktes Fenster, dessen Parent nicht das WorkWindow ist,
+ // mu\s in einem SplitWindow liegen und daher nicht explizit
+ // registriert werden.
+ // Das passiert aber schon bei der Initialisierung des
+ // SfxDockingWindows!
+ }
+
+ if ( pCW->nInterfaceId != pChildWin->GetContextId() )
+ pChildWin->CreateContext( pCW->nInterfaceId, GetBindings() );
+
+ // Information in der INI-Datei sichern
+ SaveStatus_Impl(pChildWin, pCW->aInfo);
+ }
+}
+
+void SfxWorkWindow::RemoveChildWin_Impl( SfxChildWin_Impl *pCW )
+{
+ USHORT nId = pCW->nSaveId;
+ SfxChildWindow *pChildWin = pCW->pWin;
+
+ // vorhandenes Fenster geht aus dem Kontext und wird daher entfernt
+ USHORT nPos = pChildWin->GetPosition();
+ if (nPos != CHILDWIN_NOPOS)
+ {
+ // ChildWindow "uberlagert einen ObjectBar
+ DBG_ASSERT(nPos < SFX_OBJECTBAR_MAX, "Illegal objectbar position!");
+ if ((*pChilds)[TbxMatch(nPos)] &&
+ (aObjBars[nPos].nMode & nUpdateMode) ) //&&
+// pChildWin->GetAlignment() == (*pChilds)[nPos]->eAlign )
+ {
+ // ObjectBar war "uberlagert; jetzt wieder anzeigen
+ (*pChilds)[TbxMatch(nPos)]->nVisible ^= CHILD_NOT_HIDDEN;
+ }
+ }
+
+ // Information in der INI-Datei sichern
+ BOOL bTask = ( pCW->aInfo.nFlags & SFX_CHILDWIN_TASK ) != 0;
+ pCW->aInfo = pChildWin->GetInfo();
+ if ( bTask )
+ pCW->aInfo.nFlags |= SFX_CHILDWIN_TASK;
+ SaveStatus_Impl(pChildWin, pCW->aInfo);
+
+ pChildWin->Hide();
+
+ if ( pCW->pCli )
+ {
+ // ChildWindow ist ein direktes ChildWindow und mu\s sich daher
+ // beim WorkWindow abmelden
+ pCW->pCli = 0;
+ ReleaseChild_Impl(*pChildWin->GetWindow());
+ }
+ else
+ {
+ // ChildWindow liegt in einem SplitWindow und meldet sich
+ // selbst im dtor dort ab
+ }
+
+ pCW->pWin = 0;
+ delete pChildWin;
+
+ GetBindings().Invalidate( nId );
+}
+
+void SfxWorkWindow::ResetStatusBar_Impl()
+{
+ aStatBar.nId = 0;
+ aStatBar.pShell = NULL;
+ aStatBar.pBindings = NULL;
+}
+
+//--------------------------------------------------------------------
+void SfxWorkWindow::SetStatusBar_Impl( const ResId& rResId, SfxShell *pSh, SfxBindings& rBindings )
+{
+ if ( rResId.GetId() )
+ {
+ aStatBar.nId = rResId.GetId();
+ aStatBar.pShell = pSh;
+ aStatBar.pBindings = &rBindings;
+ }
+}
+
+void SfxWorkWindow::SetTempStatusBar_Impl( BOOL bSet )
+{
+ if ( aStatBar.bTemp != bSet )
+ {
+ BOOL bOn = FALSE;
+ SfxToolBoxConfig *pTbxCfg = SfxToolBoxConfig::GetOrCreate();
+ FASTBOOL bIsFullScreen = FALSE;
+ Window* pSysWin = GetTopWindow();
+ if ( pSysWin )
+ {
+ while ( pSysWin && pSysWin->GetType() != WINDOW_WORKWINDOW )
+ pSysWin = pSysWin->GetParent();
+
+ if ( pSysWin )
+ bIsFullScreen = ((WorkWindow*)pSysWin)->IsFullScreenMode();
+ }
+
+ if ( aStatBar.nId && aStatBar.bOn && !bIsFullScreen && pTbxCfg->IsStatusBarVisible() )
+ bOn = TRUE;
+
+ aStatBar.bTemp = bSet;
+ if ( !bOn )
+ {
+ if ( aStatBar.pStatusBar && !aStatBar.pStatusBar->GetBindings_Impl() )
+ {
+ DBG_ERROR( "Kaputte Statusbar-Bindings!" );
+ return;
+ }
+
+ // Nur was tun, wenn die Temp-Einstellung wirklich was bewirkt
+ UpdateStatusBar_Impl();
+ ArrangeChilds_Impl();
+
+ if ( aStatBar.pStatusBar )
+ {
+ StatusBar *pBar = aStatBar.pStatusBar->GetStatusBar();
+ pBar->SetBottomBorder( TRUE );
+ pBar->SetPosSizePixel( 0, 0, 0, pBar->CalcWindowSizePixel().Height(), WINDOW_POSSIZE_HEIGHT );
+ ArrangeChilds_Impl();
+ }
+
+ ShowChilds_Impl();
+ }
+ }
+}
+
+//------------------------------------------------------------------------
+void SfxWorkWindow::UpdateStatusBar_Impl()
+{
+ // Die aktuelle Statusleiste
+ StatusBar *pBar = NULL;
+ SfxToolBoxConfig *pTbxCfg = SfxToolBoxConfig::GetOrCreate();
+
+ // Falls schon eine StatusBar existiert: ist es die gew"unschte?
+ USHORT nActId = 0;
+ if ( aStatBar.pStatusBar )
+ {
+ pBar = aStatBar.pStatusBar->GetStatusBar();
+ nActId = aStatBar.pStatusBar->GetType();
+ }
+
+ // keine Statusleiste, wenn keine Id gew"unscht oder bei FullScreenView
+ // oder wenn ausgeschaltet
+ FASTBOOL bIsFullScreen = FALSE;
+ Window* pSysWin = GetTopWindow();
+ if ( pSysWin )
+ {
+ while ( pSysWin && pSysWin->GetType() != WINDOW_WORKWINDOW )
+ pSysWin = pSysWin->GetParent();
+
+ if ( pSysWin )
+ bIsFullScreen = ((WorkWindow*)pSysWin)->IsFullScreenMode();
+ }
+
+ if ( aStatBar.nId && IsDockingAllowed() &&
+ ( aStatBar.bOn && !bIsFullScreen && pTbxCfg->IsStatusBarVisible() || aStatBar.bTemp ) )
+ {
+ if ( aStatBar.nId != nActId || aStatBar.pStatusBar && aStatBar.pStatusBar->GetBindings_Impl() != aStatBar.pBindings )
+ {
+ // Id hat sich ge"andert, also passenden Statusbarmanager erzeugen,
+ // dieser "ubernimmt die aktuelle Statusleiste;
+ if ( aStatBar.pStatusBar )
+ {
+ // Der Manager erzeugt die Statusleiste nur, er zerst"ort sie
+ // nicht !
+ aStatBar.pStatusBar->StoreConfig();
+ DELETEZ( aStatBar.pStatusBar );
+ }
+
+ aStatBar.pStatusBar = new SfxStatusBarManager(
+ GetWindow(),
+ *aStatBar.pBindings,
+ aStatBar.pShell,
+ aStatBar.nId, pBar, pConfigShell );
+
+ if ( !pBar )
+ {
+ pBar = aStatBar.pStatusBar->GetStatusBar();
+ RegisterChild_Impl( *pBar, SFX_ALIGN_LOWESTBOTTOM );
+ }
+ }
+ }
+ else if ( nActId )
+ {
+ // Aktuelle StatusBar vernichten
+ // Der Manager erzeugt die Statusleiste nur, er zerst"ort sie
+ // nicht !
+ aStatBar.pStatusBar->StoreConfig();
+ ReleaseChild_Impl( *pBar );
+ DELETEZ( aStatBar.pStatusBar );
+ DELETEZ( pBar );
+ }
+}
+
+//------------------------------------------------------------------------
+
+void SfxWorkWindow::SetObjectBarVisibility_Impl( USHORT nMask )
+{
+ switch( nMask )
+ {
+ case SFX_VISIBILITY_UNVISIBLE:
+ case SFX_VISIBILITY_STANDARD:
+ case SFX_VISIBILITY_PLUGSERVER:
+ case SFX_VISIBILITY_PLUGCLIENT:
+ case SFX_VISIBILITY_CLIENT:
+ case SFX_VISIBILITY_SERVER:
+ nOrigMode = nMask;
+ }
+ if (nMask != nUpdateMode)
+ nUpdateMode = nMask;
+}
+
+BOOL SfxWorkWindow::IsContainer_Impl() const
+{
+ return nUpdateMode == SFX_VISIBILITY_CLIENT;
+}
+
+//------------------------------------------------------------------------
+void SfxWorkWindow::HidePopups_Impl(BOOL bHide, BOOL bParent, USHORT nId )
+{
+ if ( nId )
+ {
+ for ( USHORT n = 0; n < SFX_OBJECTBAR_MAX; ++n )
+ {
+ SfxChild_Impl *pCli = (*pChilds)[TbxMatch(n)];
+ if ( pCli && pCli->eAlign == SFX_ALIGN_NOALIGNMENT )
+ {
+ BOOL bHasTbx = ( aObjBars[n].pTbx != 0 );
+ if (bHide)
+ {
+ pCli->nVisible &= ~CHILD_ACTIVE;
+ if ( bHasTbx )
+ aObjBars[n].pTbx->GetToolBox().Hide();
+ }
+ else
+ {
+ pCli->nVisible |= CHILD_ACTIVE;
+ if ( bHasTbx && CHILD_VISIBLE == (pCli->nVisible & CHILD_VISIBLE) )
+ aObjBars[n].pTbx->GetToolBox().Show();
+ }
+ }
+ }
+ }
+
+ for ( USHORT n = 0; n < pChildWins->Count(); ++n )
+ {
+ SfxChildWindow *pCW = (*pChildWins)[n]->pWin;
+ if (pCW && pCW->GetAlignment() == SFX_ALIGN_NOALIGNMENT && pCW->GetType() != nId)
+ {
+ Window *pWin = pCW->GetWindow();
+ SfxChild_Impl *pChild = FindChild_Impl(*pWin);
+ if (bHide)
+ {
+ pChild->nVisible &= ~CHILD_ACTIVE;
+ pCW->Hide();
+ }
+ else
+ {
+ pChild->nVisible |= CHILD_ACTIVE;
+ if ( CHILD_VISIBLE == (pChild->nVisible & CHILD_VISIBLE) )
+ pCW->Show();
+ }
+ }
+ }
+
+ if ( bParent && pParent )
+ pParent->HidePopups_Impl( bHide, bParent, nId );
+}
+
+//------------------------------------------------------------------------
+
+void SfxWorkWindow::ConfigChild_Impl(SfxChildIdentifier eChild,
+ SfxDockingConfig eConfig, USHORT nId)
+{
+ SfxDockingWindow* pDockWin=0;
+ SfxToolbox *pBox=0;
+ USHORT nPos = USHRT_MAX;
+ Window *pWin=0;
+ SfxChildWin_Impl *pCW = 0;
+
+ if (eChild == SFX_CHILDWIN_OBJECTBAR)
+ {
+ // Es soll eine Toolbox konfiguriert werden
+ USHORT n;
+ for (n=0; n<SFX_OBJECTBAR_MAX; n++)
+ {
+ if (aObjBars[n].nId == nId && aObjBars[n].pTbx)
+ break;
+ }
+
+ DBG_ASSERT( pParent || n<SFX_OBJECTBAR_MAX, "Unbekannte ToolBox!" );
+ if (n>=SFX_OBJECTBAR_MAX)
+ {
+ if (pParent)
+ pParent->ConfigChild_Impl( eChild, eConfig, nId );
+ return;
+ }
+
+ pWin = pBox = (SfxToolbox*) &aObjBars[n].pTbx->GetToolBox();
+ }
+ else
+ {
+ // Es soll ein DockingWindow als direktes Child konfiguriert werden
+ for (USHORT n=0; n<pChildWins->Count(); n++)
+ {
+ pCW = (*pChildWins)[n];
+ SfxChildWindow *pChild = pCW->pWin;
+ if (pChild)
+ {
+ if (pChild->GetType() == nId)
+ {
+ pDockWin = (SfxDockingWindow*) pChild->GetWindow();
+ break;
+ }
+ }
+ }
+
+ if ( pDockWin )
+ {
+ if ( eChild == SFX_CHILDWIN_DOCKINGWINDOW ||
+ pDockWin->GetAlignment() == SFX_ALIGN_NOALIGNMENT )
+ {
+ if ( eChild == SFX_CHILDWIN_SPLITWINDOW && eConfig == SFX_TOGGLEFLOATMODE)
+ {
+ // Ein DockingWindow wurde aus einem SplitWindow rausgezogen
+ pCW->pCli =
+ RegisterChild_Impl(*pDockWin, pDockWin->GetAlignment(), pCW->pWin->CanGetFocus());
+ pCW->pCli->nVisible = CHILD_VISIBLE;
+ }
+
+ pWin = pDockWin;
+ }
+ else
+ {
+ SfxSplitWindow *pSplitWin = GetSplitWindow_Impl(pDockWin->GetAlignment());
+
+ // Es soll ein DockingWindow in einem SplitWindow konfiguriert werden
+ if ( eConfig == SFX_TOGGLEFLOATMODE)
+ {
+ // Ein DockingWindow wurde in ein SplitWindow hineingezogen
+ pCW->pCli = 0;
+ ReleaseChild_Impl(*pDockWin);
+ }
+
+ pWin = pSplitWin->GetSplitWindow();
+ if ( pSplitWin->GetWindowCount() == 1 )
+ ((SplitWindow*)pWin)->Show();
+ }
+ }
+
+ DBG_ASSERT( pDockWin, "Unbekanntes DockingWindow!" );
+ if ( !pDockWin && pParent )
+ {
+ pParent->ConfigChild_Impl( eChild, eConfig, nId );
+ return;
+ }
+ }
+
+ // Eventuell sind Childs an - oder abgemeldet worden
+ if (!bSorted)
+ Sort_Impl();
+
+ SfxChild_Impl *pChild = 0;
+ USHORT n;
+ for ( n=0; n<aSortedList.Count(); ++n )
+ {
+ pChild = (*pChilds)[aSortedList[n]];
+ if ( pChild )
+ if ( pChild->pWin == pWin )
+ break;
+ }
+
+ nPos = aSortedList[n];
+
+ switch ( eConfig )
+ {
+ case SFX_SETDOCKINGRECTS :
+ {
+ SfxChild_Impl *pChild = (*pChilds)[nPos];
+ Rectangle aOuterRect( GetTopRect_Impl() );
+ aOuterRect.SetPos(
+ pWorkWin->OutputToScreenPixel( aOuterRect.TopLeft() ));
+ Rectangle aInnerRect(aOuterRect);
+ BOOL bTbx = (eChild == SFX_CHILDWIN_OBJECTBAR);
+
+ // Das gerade betroffene Fenster wird bei der Berechnung des
+ // inneren Rechtecks mit eingeschlossen!
+ for ( USHORT m=0; m<aSortedList.Count(); ++m )
+ {
+ USHORT n=aSortedList[m];
+ SfxChild_Impl* pCli = (*pChilds)[n];
+
+ if ( pCli && pCli->nVisible == CHILD_VISIBLE && pCli->pWin )
+ {
+ switch ( pCli->eAlign )
+ {
+ case SFX_ALIGN_TOP:
+ // Objekt-Toolboxen kommen immer zuletzt
+ if ( bTbx || n <= nPos)
+ aInnerRect.Top() += pCli->aSize.Height();
+ break;
+
+ case SFX_ALIGN_TOOLBOXTOP:
+ // Toolbox geht nur vor, wenn nicht h"ohere Position
+ if ( bTbx && n <= nPos)
+ aInnerRect.Top() += pCli->aSize.Height();
+ break;
+
+ case SFX_ALIGN_HIGHESTTOP:
+ // Geht immer vor
+ aInnerRect.Top() += pCli->aSize.Height();
+ break;
+
+ case SFX_ALIGN_LOWESTTOP:
+ // Wird nur mitgez"ahlt, wenn es das aktuelle Fenster ist
+ if ( n == nPos )
+ aInnerRect.Top() += pCli->aSize.Height();
+ break;
+
+ case SFX_ALIGN_BOTTOM:
+ // Objekt-Toolboxen kommen immer zuletzt
+ if ( bTbx || n <= nPos)
+ aInnerRect.Bottom() -= pCli->aSize.Height();
+ break;
+
+ case SFX_ALIGN_TOOLBOXBOTTOM:
+ // Toolbox geht nur vor, wenn nicht h"ohere Position
+ if ( bTbx && n <= nPos)
+ aInnerRect.Bottom() -= pCli->aSize.Height();
+ break;
+
+ case SFX_ALIGN_LOWESTBOTTOM:
+ // Geht immer vor
+ aInnerRect.Bottom() -= pCli->aSize.Height();
+ break;
+
+ case SFX_ALIGN_HIGHESTBOTTOM:
+ // Wird nur mitgez"ahlt, wenn es das aktuelle Fenster ist
+ if ( n == nPos )
+ aInnerRect.Bottom() -= pCli->aSize.Height();
+ break;
+
+ case SFX_ALIGN_LEFT:
+ // Toolboxen kommen immer zuletzt
+ if (bTbx || n <= nPos)
+ aInnerRect.Left() += pCli->aSize.Width();
+ break;
+
+ case SFX_ALIGN_TOOLBOXLEFT:
+ // Toolboxen kommen immer zuletzt
+ if (bTbx && n <= nPos)
+ aInnerRect.Left() += pCli->aSize.Width();
+ break;
+
+ case SFX_ALIGN_FIRSTLEFT:
+ // Geht immer vor
+ aInnerRect.Left() += pCli->aSize.Width();
+ break;
+
+ case SFX_ALIGN_LASTLEFT:
+ // Wird nur mitgez"ahlt, wenn es das aktuelle Fenster ist
+ if (n == nPos)
+ aInnerRect.Left() += pCli->aSize.Width();
+
+ case SFX_ALIGN_RIGHT:
+ // Toolboxen kommen immer zuletzt
+ if (bTbx || n <= nPos)
+ aInnerRect.Right() -= pCli->aSize.Width();
+ break;
+
+ case SFX_ALIGN_TOOLBOXRIGHT:
+ // Toolboxen kommen immer zuletzt
+ if (bTbx && n <= nPos)
+ aInnerRect.Right() -= pCli->aSize.Width();
+ break;
+
+ case SFX_ALIGN_FIRSTRIGHT:
+ // Wird nur mitgez"ahlt, wenn es das aktuelle Fenster ist
+ if (n == nPos)
+ aInnerRect.Right() -= pCli->aSize.Width();
+ break;
+
+ case SFX_ALIGN_LASTRIGHT:
+ // Geht immer vor
+ aInnerRect.Right() -= pCli->aSize.Width();
+ break;
+
+ default:
+ break;
+ }
+ }
+ }
+
+ if (pBox)
+ pBox->SetDockingRects(aOuterRect, aInnerRect);
+ else
+ pDockWin->SetDockingRects(aOuterRect, aInnerRect);
+ break;
+ }
+
+ case SFX_MOVEDOCKINGWINDOW :
+ case SFX_ALIGNDOCKINGWINDOW :
+ case SFX_TOGGLEFLOATMODE:
+ {
+ SfxChildAlignment eAlign;
+ SfxChild_Impl *pCli = (*pChilds)[nPos];
+ if (pBox)
+ {
+ if ( pBox->IsFloatingMode() )
+ {
+ eAlign = SFX_ALIGN_NOALIGNMENT;
+ pCli->aSize = pBox->GetFloatingWindow()->GetSizePixel();
+ }
+ else
+ {
+ eAlign = pBox->GetAlignment();
+ pCli->bResize = TRUE;
+ Size aActSize( pBox->GetSizePixel() );
+ pCli->aSize = pBox->CalcWindowSizePixel();
+ if ( pBox->IsHorizontal() )
+ pCli->aSize.Width() = aActSize.Width();
+ else
+ pCli->aSize.Height() = aActSize.Height();
+ }
+ }
+ else
+ {
+ eAlign = pDockWin->GetAlignment();
+ if ( eChild == SFX_CHILDWIN_DOCKINGWINDOW ||
+ eAlign == SFX_ALIGN_NOALIGNMENT)
+ {
+ // wenn innerhalb eines SplitWindows umkonfiguriert
+ // wurde, "andert sich am SplitWindow selbst nichts
+ pCli->bResize = TRUE;
+ pCli->aSize = pDockWin->GetSizePixel();
+ }
+ }
+
+ if ( pCli->eAlign != eAlign )
+ bSorted = FALSE;
+ pCli->eAlign = eAlign;
+ ArrangeChilds_Impl();
+ ShowChilds_Impl();
+
+ // INI schreiben
+ if ( pCW )
+ {
+ BOOL bTask = ( pCW->aInfo.nFlags & SFX_CHILDWIN_TASK ) != 0;
+ pCW->aInfo = pCW->pWin->GetInfo();
+ if ( bTask )
+ pCW->aInfo.nFlags |= SFX_CHILDWIN_TASK;
+ if ( eConfig != SFX_MOVEDOCKINGWINDOW )
+ SaveStatus_Impl( pCW->pWin, pCW->aInfo);
+ }
+ break;
+ }
+ }
+}
+
+
+//--------------------------------------------------------------------
+
+void SfxWorkWindow::SetChildWindowVisible_Impl( ULONG lId, BOOL bEnabled, USHORT nMode )
+{
+ USHORT nInter = (USHORT) ( lId >> 16 );
+ USHORT nId = (USHORT) ( lId & 0xFFFF );
+
+ SfxChildWin_Impl *pCW=NULL;
+ SfxWorkWindow *pWork = pParent;
+
+ // Den obersten parent nehmen; ChildWindows werden immer am WorkWindow
+ // der Task bzw. des Frames oder am AppWorkWindow angemeldet
+ while ( pWork && pWork->pParent )
+ pWork = pWork->pParent;
+
+ if ( pWork )
+ {
+ // Dem Parent schon bekannt ?
+ USHORT nCount = pWork->pChildWins->Count();
+ for (USHORT n=0; n<nCount; n++)
+ if ((*pWork->pChildWins)[n]->nSaveId == nId)
+ {
+ pCW = (*pWork->pChildWins)[n];
+ break;
+ }
+ }
+
+ if ( !pCW )
+ {
+ // Kein Parent oder dem Parent noch unbekannt, dann bei mir suchen
+ USHORT nCount = pChildWins->Count();
+ for (USHORT n=0; n<nCount; n++)
+ if ((*pChildWins)[n]->nSaveId == nId)
+ {
+ pCW = (*pChildWins)[n];
+ break;
+ }
+ }
+
+ if ( !pCW )
+ {
+ // Ist neu, also initialisieren; je nach Flag beim Parent oder bei
+ // mir eintragen
+ pCW = new SfxChildWin_Impl( lId );
+ pCW->nId = nId;
+ InitializeChild_Impl( pCW );
+ if ( pWork && !( pCW->aInfo.nFlags & SFX_CHILDWIN_TASK ) )
+ pWork->pChildWins->Insert( pWork->pChildWins->Count(), pCW );
+ else
+ pChildWins->Insert( pChildWins->Count(), pCW );
+ }
+
+ pCW->nId = nId;
+ if ( nInter )
+ pCW->nInterfaceId = nInter;
+ pCW->nVisibility = nMode;
+ pCW->bEnable = bEnabled;
+#if 0
+ if ( pCW->pWin )
+ pCW->pWin->GetWindow()->EnableInput( bEnabled &&
+ ( pWorkWin->IsInputEnabled() /* || pCW->pWin->GetAlignment() == SFX_ALIGN_NOALIGNMENT */ ) );
+#endif
+ pCW->nVisibility = nMode;
+}
+
+//--------------------------------------------------------------------
+// Der An/Aus-Status eines ChildWindows wird umgeschaltet.
+
+void SfxWorkWindow::ToggleChildWindow_Impl(USHORT nId)
+{
+ USHORT nCount = pChildWins->Count();
+ USHORT n;
+ for (n=0; n<nCount; n++)
+ if ((*pChildWins)[n]->nId == nId)
+ break;
+
+ if ( n<nCount )
+ {
+ // Das Fenster ist schon bekannt
+ SfxChildWin_Impl *pCW = (*pChildWins)[n];
+ SfxChildWindow *pChild = pCW->pWin;
+
+ if ( pChild && pCW->bCreate )
+ {
+ if ( pChild->QueryClose() )
+ {
+ Window *pWindow = pChild->GetWindow();
+ if ( pWindow && ( pWindow->HasFocus() || pWindow->HasChildPathFocus( TRUE ) ) )
+ {
+ // Wenn der Focus auf dem Childwindow sitzt, mu\s er auf das aktuelle
+ // Dokument gesetzt werden
+ // Nein !! Das fhrt gerne mal zu Rekursionen, da im GetFocus-Notify erneut ein Update ausgel"ost wird!
+ // ->#66426#
+ // SfxViewFrame *pView = SfxViewFrame::Current();
+ // if ( pView )
+ // pView->GetFrame()->GrabFocusOnComponent_Impl();
+ }
+
+ if ( pChild && pChild->IsHideAtToggle() )
+ {
+ pCW->bCreate = !pCW->bCreate;
+ ShowChildWindow_Impl( nId, pCW->bCreate );
+ }
+ else
+ {
+ // Fenster soll ausgeschaltet werdem
+ pCW->bCreate = FALSE;
+ pChild->SetVisible_Impl( FALSE );
+ RemoveChildWin_Impl( pCW );
+ }
+ }
+ }
+ else if ( pCW->bCreate )
+ {
+ pCW->bCreate = FALSE;
+ }
+ else
+ {
+ pCW->bCreate = TRUE;
+
+ if ( pChild )
+ {
+ ShowChildWindow_Impl( nId, pCW->bCreate );
+ }
+ else
+ {
+ // Fenster erzeugen
+ CreateChildWin_Impl( pCW );
+ if ( !pCW->pWin )
+ // Erzeugung war erfolglos
+ pCW->bCreate = FALSE;
+ }
+ }
+
+ ArrangeChilds_Impl();
+ ShowChilds_Impl();
+
+ if ( pCW->bCreate )
+ {
+ if ( !pCW->pCli )
+ {
+ SfxDockingWindow *pDock =
+ (SfxDockingWindow*) pCW->pWin->GetWindow();
+ if ( nId == SID_BROWSER )
+ SfxFrame::BeamerSet_Impl();
+ else if ( pDock->IsAutoHide_Impl() )
+ pDock->AutoShow_Impl();
+ }
+
+ if ( nId != SID_HELP_PI )
+ {
+ SfxHelpPI *pHelpPI = SFX_APP()->GetHelpPI();
+ if ( pHelpPI )
+ pHelpPI->LoadTopic(pCW->pWin->GetWindow()->GetHelpId() );
+ }
+ }
+
+ return;
+ }
+ else if ( pParent )
+ {
+ pParent->ToggleChildWindow_Impl( nId );
+ return;
+ }
+
+#ifdef DBG_UTIL
+ nCount = pChildWins->Count();
+ for (n=0; n<nCount; n++)
+ if ((*pChildWins)[n]->nSaveId == nId)
+ break;
+
+ if ( n < nCount )
+ {
+ DBG_ERROR("ChildWindow ist nicht im Kontext!");
+ }
+ else
+ {
+ DBG_ERROR("ChildWindow ist nicht registriert!");
+ }
+#endif
+}
+
+//--------------------------------------------------------------------
+
+BOOL SfxWorkWindow::HasChildWindow_Impl(USHORT nId)
+{
+ USHORT nCount = pChildWins->Count();
+ USHORT n;
+ for (n=0; n<nCount; n++)
+ if ((*pChildWins)[n]->nSaveId == nId)
+ break;
+
+ if (n<nCount)
+ {
+ SfxChildWin_Impl *pCW = (*pChildWins)[n];
+ SfxChildWindow *pChild = pCW->pWin;
+ return ( pChild && pCW->bCreate );
+ }
+
+ if ( pParent )
+ return pParent->HasChildWindow_Impl( nId );
+
+ return FALSE;
+}
+
+BOOL SfxWorkWindow::IsFloating( USHORT nId )
+{
+ SfxChildWin_Impl *pCW=NULL;
+ SfxWorkWindow *pWork = pParent;
+
+ // Den obersten parent nehmen; ChildWindows werden immer am WorkWindow
+ // der Task bzw. des Frames oder am AppWorkWindow angemeldet
+ while ( pWork && pWork->pParent )
+ pWork = pWork->pParent;
+
+ if ( pWork )
+ {
+ // Dem Parent schon bekannt ?
+ USHORT nCount = pWork->pChildWins->Count();
+ for (USHORT n=0; n<nCount; n++)
+ if ((*pWork->pChildWins)[n]->nSaveId == nId)
+ {
+ pCW = (*pWork->pChildWins)[n];
+ break;
+ }
+ }
+
+ if ( !pCW )
+ {
+ // Kein Parent oder dem Parent noch unbekannt, dann bei mir suchen
+ USHORT nCount = pChildWins->Count();
+ for (USHORT n=0; n<nCount; n++)
+ if ((*pChildWins)[n]->nSaveId == nId)
+ {
+ pCW = (*pChildWins)[n];
+ break;
+ }
+ }
+
+ if ( !pCW )
+ {
+ // Ist neu, also initialisieren; je nach Flag beim Parent oder bei
+ // mir eintragen
+ pCW = new SfxChildWin_Impl( nId );
+ pCW->bEnable = FALSE;
+ pCW->nId = 0;
+ pCW->nVisibility = 0;
+ InitializeChild_Impl( pCW );
+ if ( pWork && !( pCW->aInfo.nFlags & SFX_CHILDWIN_TASK ) )
+ pWork->pChildWins->Insert( pWork->pChildWins->Count(), pCW );
+ else
+ pChildWins->Insert( pChildWins->Count(), pCW );
+ }
+
+ SfxChildAlignment eAlign;
+ if ( pCW->aInfo.GetExtraData_Impl( &eAlign ) )
+ return( eAlign == SFX_ALIGN_NOALIGNMENT );
+ else
+ return TRUE;
+}
+
+//--------------------------------------------------------------------
+
+BOOL SfxWorkWindow::KnowsChildWindow_Impl(USHORT nId)
+{
+ SfxChildWin_Impl *pCW=0;
+ USHORT nCount = pChildWins->Count();
+ USHORT n;
+ for (n=0; n<nCount; n++)
+ {
+ pCW = (*pChildWins)[n];
+ if ( pCW->nSaveId == nId)
+ break;
+ }
+
+ if (n<nCount)
+ {
+ if ( !IsVisible_Impl( pCW->nVisibility ) )
+ return FALSE;
+ return pCW->bEnable;
+ }
+ else if ( pParent )
+ return pParent->KnowsChildWindow_Impl( nId );
+ else
+ return FALSE;
+}
+
+//--------------------------------------------------------------------
+
+void SfxWorkWindow::SetChildWindow_Impl(USHORT nId, BOOL bOn)
+{
+ SfxChildWin_Impl *pCW=NULL;
+ SfxWorkWindow *pWork = pParent;
+
+ // Den obersten parent nehmen; ChildWindows werden immer am WorkWindow
+ // der Task bzw. des Frames oder am AppWorkWindow angemeldet
+ while ( pWork && pWork->pParent )
+ pWork = pWork->pParent;
+
+ if ( pWork )
+ {
+ // Dem Parent schon bekannt ?
+ USHORT nCount = pWork->pChildWins->Count();
+ for (USHORT n=0; n<nCount; n++)
+ if ((*pWork->pChildWins)[n]->nSaveId == nId)
+ {
+ pCW = (*pWork->pChildWins)[n];
+ break;
+ }
+ }
+
+ if ( !pCW )
+ {
+ // Kein Parent oder dem Parent noch unbekannt, dann bei mir suchen
+ USHORT nCount = pChildWins->Count();
+ for (USHORT n=0; n<nCount; n++)
+ if ((*pChildWins)[n]->nSaveId == nId)
+ {
+ pCW = (*pChildWins)[n];
+ pWork = this;
+ break;
+ }
+ }
+
+ if ( !pCW )
+ {
+ // Ist neu, also initialisieren; je nach Flag beim Parent oder bei
+ // mir eintragen
+ pCW = new SfxChildWin_Impl( nId );
+ InitializeChild_Impl( pCW );
+ if ( !pWork || pCW->aInfo.nFlags & SFX_CHILDWIN_TASK )
+ pWork = this;
+ pWork->pChildWins->Insert( pWork->pChildWins->Count(), pCW );
+ }
+
+ if ( pCW->bCreate != bOn )
+ pWork->ToggleChildWindow_Impl(nId);
+}
+
+//--------------------------------------------------------------------
+
+void SfxWorkWindow::ShowChildWindow_Impl(USHORT nId, BOOL bVisible)
+{
+ USHORT nCount = pChildWins->Count();
+ SfxChildWin_Impl* pCW=0;
+ USHORT n;
+ for (n=0; n<nCount; n++)
+ {
+ pCW = (*pChildWins)[n];
+ if (pCW->nId == nId)
+ break;
+ }
+
+ if ( n<nCount )
+ {
+ SfxChildWindow *pChildWin = pCW->pWin;
+ if ( pChildWin )
+ {
+// pCW->bCreate = bVisible;
+ if ( bVisible )
+ {
+ if ( pCW->pCli )
+ {
+ pCW->pCli->nVisible = CHILD_VISIBLE;
+ pChildWin->Show();
+ }
+ else
+ ((SfxDockingWindow*)pChildWin->GetWindow())->Reappear_Impl();
+
+ }
+ else
+ {
+ if ( pCW->pCli )
+ {
+ pCW->pCli->nVisible = CHILD_VISIBLE ^ CHILD_NOT_HIDDEN;
+ pCW->pWin->Hide();
+ }
+ else
+ ((SfxDockingWindow*)pChildWin->GetWindow())->Disappear_Impl();
+
+ }
+
+ ArrangeChilds_Impl();
+ ShowChilds_Impl();
+ }
+ else if ( bVisible )
+ {
+ SetChildWindow_Impl( nId, TRUE );
+ pChildWin = pCW->pWin;
+ }
+
+ if ( pChildWin )
+ {
+ pChildWin->SetVisible_Impl( bVisible );
+ BOOL bTask = ( pCW->aInfo.nFlags & SFX_CHILDWIN_TASK ) != 0;
+ pCW->aInfo = pChildWin->GetInfo();
+ if ( bTask )
+ pCW->aInfo.nFlags |= SFX_CHILDWIN_TASK;
+ if ( !pCW->bCreate )
+ SaveStatus_Impl( pChildWin, pCW->aInfo );
+ }
+
+ return;
+ }
+
+ if ( pParent )
+ {
+ pParent->ShowChildWindow_Impl( nId, bVisible );
+ return;
+ }
+
+#ifdef DBG_UTIL
+ nCount = pChildWins->Count();
+ for (n=0; n<nCount; n++)
+ if ((*pChildWins)[n]->nSaveId == nId)
+ break;
+
+ if ( n<nCount )
+ {
+ DBG_ERROR("ChildWindow ist nicht im Kontext!");
+ }
+ else
+ {
+ DBG_ERROR("ChildWindow ist nicht registriert!");
+ }
+#endif
+}
+
+//--------------------------------------------------------------------
+
+SfxChildWindow* SfxWorkWindow::GetChildWindow_Impl(USHORT nId)
+{
+ USHORT nCount = pChildWins->Count();
+ USHORT n;
+ for (n=0; n<nCount; n++)
+ if ((*pChildWins)[n]->nSaveId == nId)
+ break;
+
+ if (n<nCount)
+ return (*pChildWins)[n]->pWin;
+ else if ( pParent )
+ return pParent->GetChildWindow_Impl( nId );
+ return 0;
+}
+
+//------------------------------------------------------------------------
+
+void SfxWorkWindow::ResetChildWindows_Impl()
+{
+// if ( pParent )
+// pParent->ResetChildWindows_Impl();
+
+ for ( USHORT n = 0; n < pChildWins->Count(); ++n )
+ {
+ (*pChildWins)[n]->nId = 0;
+ (*pChildWins)[n]->bEnable = FALSE;
+ }
+}
+
+//------------------------------------------------------------------------
+// Virtuelle Methode, die die Gr"o\se der Fl"ache (client area) des parent
+// windows liefert, in der Child-Fenster angeordnet werden k"onnen.
+// in der ClientArea des parent findet.
+
+Rectangle SfxWorkWindow::GetTopRect_Impl()
+{
+ return Rectangle (Point(), pWorkWin->GetOutputSizePixel() );
+}
+
+//------------------------------------------------------------------------
+// Virtuelle Methode, die die Gr"o\se der Fl"ache (client area) des parent
+// windows liefert, in der Child-Fenster angeordnet werden k"onnen.
+// in der ClientArea des parent findet.
+
+Rectangle SfxFrameWorkWin_Impl::GetTopRect_Impl()
+{
+ return pFrame->GetTopOuterRectPixel_Impl();
+}
+
+//------------------------------------------------------------------------
+// Virtuelle Methode, die die Gr"o\se der Fl"ache (client area) des parent
+// windows liefert, in der Child-Fenster angeordnet werden k"onnen.
+// in der ClientArea des parent findet.
+
+Rectangle SfxIPWorkWin_Impl::GetTopRect_Impl()
+{
+ return pEnv->GetContainerEnv()->GetTopOuterRectPixel();
+}
+
+//------------------------------------------------------------------------
+// Virtuelle Methode, um herauszufinden, ob ein Child-Fenster noch Platz
+// in der ClientArea des parent findet.
+
+BOOL SfxWorkWindow::RequestTopToolSpacePixel_Impl( SvBorder aBorder )
+{
+ if ( !IsDockingAllowed() ||
+ aClientArea.GetWidth() < aBorder.Left() + aBorder.Right() ||
+ aClientArea.GetHeight() < aBorder.Top() + aBorder.Bottom() )
+ return FALSE;
+ else
+ return TRUE;;
+}
+
+//------------------------------------------------------------------------
+// Implementation am InPlaceObject: benutzt die SO-Methode, um am InPlaceClient
+// um Platz nachzusuchen.
+
+BOOL SfxIPWorkWin_Impl::RequestTopToolSpacePixel_Impl( SvBorder aBorder )
+{
+ if ( !IsDockingAllowed() )
+ return FALSE;
+ else
+ return pEnv->GetContainerEnv()->RequestTopToolSpacePixel( aBorder );
+}
+
+
+void SfxIPWorkWin_Impl::SaveStatus_Impl(SfxChildWindow *pChild, const SfxChildWinInfo &rInfo)
+{
+ if ( pEnv->IsInternalInPlace() )
+ SfxWorkWindow::SaveStatus_Impl( pChild, rInfo );
+}
+
+void SfxWorkWindow::SaveStatus_Impl(SfxChildWindow *pChild, const SfxChildWinInfo &rInfo)
+{
+ // Den Status vom Presentation mode wollen wir nicht sichern
+ if ( IsDockingAllowed() )
+ pChild->SaveStatus(rInfo);
+}
+
+void SfxWorkWindow::InitializeChild_Impl(SfxChildWin_Impl *pCW)
+{
+ SfxChildWinFactory* pFact=0;
+ SfxApplication *pApp = SFX_APP();
+ SfxChildWinFactArr_Impl &rFactories = pApp->GetChildWinFactories_Impl();
+ for ( USHORT nFactory = 0; nFactory < rFactories.Count(); ++nFactory )
+ {
+ pFact = rFactories[nFactory];
+ if ( pFact->nId == pCW->nSaveId )
+ {
+ pCW->aInfo = pFact->aInfo;
+ SfxChildWindow::InitializeChildWinFactory_Impl(
+ pCW->nSaveId, pCW->aInfo);
+ pCW->bCreate = pCW->aInfo.bVisible;
+ USHORT nFlags = pFact->aInfo.nFlags;
+ if ( nFlags & SFX_CHILDWIN_TASK )
+ pCW->aInfo.nFlags |= SFX_CHILDWIN_TASK;
+ if ( nFlags & SFX_CHILDWIN_CANTGETFOCUS )
+ pCW->aInfo.nFlags |= SFX_CHILDWIN_CANTGETFOCUS;
+ pFact->aInfo = pCW->aInfo;
+ return;
+ }
+ }
+
+ SfxDispatcher *pDisp = pBindings->GetDispatcher_Impl();
+ SfxModule *pMod = pDisp ? pApp->GetActiveModule( pDisp->GetFrame() ) :0;
+ if ( pMod )
+ {
+ SfxChildWinFactArr_Impl *pFactories = pMod->GetChildWinFactories_Impl();
+ if ( pFactories )
+ {
+ SfxChildWinFactArr_Impl &rFactories = *pFactories;
+ for ( USHORT nFactory = 0; nFactory < rFactories.Count(); ++nFactory )
+ {
+ pFact = rFactories[nFactory];
+ if ( pFact->nId == pCW->nSaveId )
+ {
+ pCW->aInfo = pFact->aInfo;
+ SfxChildWindow::InitializeChildWinFactory_Impl(
+ pCW->nSaveId, pCW->aInfo);
+ pCW->bCreate = pCW->aInfo.bVisible;
+ USHORT nFlags = pFact->aInfo.nFlags;
+ if ( nFlags & SFX_CHILDWIN_TASK )
+ pCW->aInfo.nFlags |= SFX_CHILDWIN_TASK;
+ if ( nFlags & SFX_CHILDWIN_CANTGETFOCUS )
+ pCW->aInfo.nFlags |= SFX_CHILDWIN_CANTGETFOCUS;
+ pFact->aInfo = pCW->aInfo;
+ return;
+ }
+ }
+ }
+ }
+}
+
+SfxSplitWindow* SfxWorkWindow::GetSplitWindow_Impl( SfxChildAlignment eAlign )
+{
+ switch ( eAlign )
+ {
+ case SFX_ALIGN_TOP:
+ return pSplit[2];
+ break;
+
+ case SFX_ALIGN_BOTTOM:
+ return pSplit[3];
+ break;
+
+ case SFX_ALIGN_LEFT:
+ return pSplit[0];
+ break;
+
+ case SFX_ALIGN_RIGHT:
+ return pSplit[1];
+ break;
+
+ default:
+ return 0;
+ break;
+ }
+}
+
+void SfxWorkWindow::MakeChildsVisible_Impl( BOOL bVis )
+{
+ if ( pParent )
+ pParent->MakeChildsVisible_Impl( bVis );
+
+ bAllChildsVisible = bVis;
+ if ( bVis )
+ {
+ if ( !bSorted )
+ Sort_Impl();
+ for ( USHORT n=0; n<aSortedList.Count(); ++n )
+ {
+ SfxChild_Impl* pCli = (*pChilds)[aSortedList[n]];
+ if ( pCli->eAlign == SFX_ALIGN_NOALIGNMENT || IsDockingAllowed() )
+ pCli->nVisible |= CHILD_ACTIVE;
+ }
+ }
+ else
+ {
+ if ( !bSorted )
+ Sort_Impl();
+ for ( USHORT n=0; n<aSortedList.Count(); ++n )
+ {
+ SfxChild_Impl* pCli = (*pChilds)[aSortedList[n]];
+ pCli->nVisible &= ~CHILD_ACTIVE;
+ }
+ }
+}
+
+BOOL SfxWorkWindow::IsAutoHideMode( const SfxSplitWindow *pSplitWin )
+{
+ for ( USHORT n=0; n<SFX_SPLITWINDOWS_MAX; n++ )
+ {
+ if ( pSplit[n] != pSplitWin && pSplit[n]->IsAutoHide( TRUE ) )
+ return TRUE;
+ }
+ return FALSE;
+}
+
+
+void SfxWorkWindow::EndAutoShow_Impl()
+{
+ if ( pParent )
+ pParent->EndAutoShow_Impl();
+
+ for ( USHORT n=0; n<SFX_SPLITWINDOWS_MAX; n++ )
+ {
+ SfxSplitWindow *p = pSplit[n];
+ if ( p && p->IsAutoHide() )
+ p->FadeOut();
+ }
+}
+
+void SfxWorkWindow::ArrangeAutoHideWindows( SfxSplitWindow *pActSplitWin )
+{
+ if ( pParent )
+ pParent->ArrangeAutoHideWindows( pActSplitWin );
+
+ Rectangle aArea( aClientArea );
+ for ( USHORT n=0; n<SFX_SPLITWINDOWS_MAX; n++ )
+ {
+ // Es werden entweder Dummyfenster oder Fenster im AutoShow-Modus
+ // ( nicht gepinned, FadeIn ) behandelt.
+ // Nur das "ubergebene Fenster darf unsichtbar sein, denn vielleicht
+ // soll daf"ur gerade die Gr"o\se berechnet werden, bevor es angezeigt
+ // wird.
+ SfxSplitWindow* pSplitWin = pSplit[n];
+ BOOL bDummyWindow = !pSplitWin->IsFadeIn();
+ Window *pDummy = pSplitWin->GetSplitWindow();
+ Window *pWin = bDummyWindow ? pDummy : pSplitWin;
+ if ( pSplitWin->IsPinned() && !bDummyWindow || !pWin->IsVisible() && pActSplitWin != pSplitWin )
+ continue;
+
+ // Breite und Position des Dummy-Fensters als Ausgangspunkt
+ Size aSize = pDummy->GetSizePixel();
+ Point aPos = pDummy->GetPosPixel();
+
+ switch ( n )
+ {
+ case ( 0 ) :
+ {
+ // Linkes SplitWindow
+ // Breite vom Fenster selbst holen, wenn nicht das DummyWindow
+ if ( !bDummyWindow )
+ aSize.Width() = pSplitWin->GetSizePixel().Width();
+
+ // Wenn links ein Window sichtbar ist, beginnt der freie
+ // Bereich rechts davon bzw. bei der Client area
+ long nLeft = aPos.X() + aSize.Width();
+ if ( nLeft > aArea.Left() )
+ aArea.Left() = nLeft;
+ break;
+ }
+ case ( 1 ) :
+ {
+ // Rechtes SplitWindow
+ // Position um Differenz der Breiten korrigieren
+ aPos.X() += aSize.Width();
+
+ // Breite vom Fenster selbst holen, wenn nicht das DummyWindow
+ if ( !bDummyWindow )
+ aSize.Width() = pSplitWin->GetSizePixel().Width();
+
+ aPos.X() -= aSize.Width();
+
+ // Wenn links schon ein Fenster aufgeklappt ist, darf
+ // das rechte nicht dar"uber gehen
+ if ( aPos.X() < aArea.Left() )
+ {
+ aPos.X() = aArea.Left();
+ aSize.Width() = aArea.GetWidth();
+ }
+
+ // Wenn rechts ein Window sichtbar ist, endet der freie
+ // Bereich links davon bzw. bei der Client area
+ long nRight = aPos.X();
+ if ( nRight < aArea.Right() )
+ aArea.Right() = nRight;
+ break;
+ }
+ case ( 2 ) :
+ {
+ // Oberes SplitWindow
+ // H"ohe vom Fenster selbst holen, wenn nicht das DummyWindow
+ if ( !bDummyWindow )
+ aSize.Height() = pSplitWin->GetSizePixel().Height();
+
+ // Breite anpassen, je nachdem ob links oder rechts
+ // schon ein Fenster aufgeklappt ist
+ aPos.X() = aArea.Left();
+ aSize.Width() = aArea.GetWidth();
+
+ // Wenn oben ein Window sichtbar ist, beginnt der freie
+ // Bereich darunter bzw. bei der Client Area
+ long nTop = aPos.Y() + aSize.Height();
+ if ( nTop > aArea.Top() )
+ aArea.Top() = nTop;
+ break;
+ }
+ case ( 3 ) :
+ {
+ // Das untere SplitWindow
+ // Position um Differenz der H"ohen korrigieren
+ aPos.Y() += aSize.Height();
+
+ // H"ohe vom Fenster selbst holen, wenn nicht das DummmyWindow
+ if ( !bDummyWindow )
+ aSize.Height() = pSplitWin->GetSizePixel().Height();
+
+ aPos.Y() -= aSize.Height();
+
+ // Breite anpassen, je nachdem ob links oder rechts
+ // schon ein Fenster aufgeklappt ist
+ aPos.X() = aArea.Left();
+ aSize.Width() = aArea.GetWidth();
+
+ // Wenn oben schon ein Fenster aufgeklappt ist, darf
+ // das untere nicht dar"uber gehen
+ if ( aPos.Y() < aArea.Top() )
+ {
+ aPos.Y() = aArea.Top();
+ aSize.Height() = aArea.GetHeight();
+ }
+
+ break;
+ }
+ }
+
+ if ( !bDummyWindow )
+ // Das FadeIn-Window ist ein Float, dessen Koordinaten in
+ // Screenkoordinaten gesetzt werden
+ pSplitWin->SetPosSizePixel( pWorkWin->OutputToScreenPixel(aPos), aSize );
+ else
+ // Das angedockte DummyWindow
+ pDummy->SetPosSizePixel( aPos, aSize );
+ }
+}
+
+Rectangle SfxWorkWindow::GetFreeArea( BOOL bAutoHide ) const
+{
+ if ( bAutoHide )
+ {
+ Rectangle aArea( aClientArea );
+ for ( USHORT n=0; n<SFX_SPLITWINDOWS_MAX; n++ )
+ {
+ if ( pSplit[n]->IsPinned() || !pSplit[n]->IsVisible() )
+ continue;
+
+ Size aSize = pSplit[n]->GetSizePixel();
+ switch ( n )
+ {
+ case ( 0 ) :
+ aArea.Left() += aSize.Width();
+ break;
+ case ( 1 ) :
+ aArea.Right() -= aSize.Width();
+ break;
+ case ( 2 ) :
+ aArea.Top() += aSize.Height();
+ break;
+ case ( 3 ) :
+ aArea.Bottom() -= aSize.Height();
+ break;
+ }
+ }
+
+ return aArea;
+ }
+ else
+ return aClientArea;
+}
+
+SfxChildWinController_Impl::SfxChildWinController_Impl( USHORT nId, SfxWorkWindow *pWork )
+ : SfxControllerItem( nId, pWork->GetBindings() )
+ , pWorkwin( pWork )
+{}
+
+::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > SfxWorkWindow::CreateDispatch( const String& )
+{
+ return ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch >();
+}
+
+void SfxChildWinController_Impl::StateChanged( USHORT nSID, SfxItemState eState,
+ const SfxPoolItem* pState )
+{
+ pWorkwin->DisableChildWindow_Impl( nSID, eState == SFX_ITEM_DISABLED );
+}
+
+void SfxWorkWindow::DisableChildWindow_Impl( USHORT nId, BOOL bDisable )
+{
+ USHORT nCount = pChildWins->Count();
+ USHORT n;
+ for (n=0; n<nCount; n++)
+ if ((*pChildWins)[n]->nSaveId == nId)
+ break;
+ if ( n<nCount && (*pChildWins)[n]->bDisabled != bDisable )
+ {
+ (*pChildWins)[n]->bDisabled = bDisable;
+ UpdateChildWindows_Impl();
+ ArrangeChilds_Impl();
+ ShowChilds_Impl();
+ }
+}
+
+void SfxWorkWindow::SetActiveChild_Impl( Window *pChild )
+{
+ pActiveChild = pChild;
+}
+
+Window* SfxWorkWindow::GetActiveChild_Impl()
+{
+ return pActiveChild;
+}
+
+BOOL SfxWorkWindow::ActivateNextChild_Impl( BOOL bForward )
+{
+ // Alle Kinder gem"a\s Liste sortieren
+ SvUShorts aList;
+ USHORT i;
+ for (i=SFX_OBJECTBAR_MAX; i<pChilds->Count(); i++)
+ {
+ SfxChild_Impl *pCli = (*pChilds)[i];
+ if ( pCli && pCli->bCanGetFocus && pCli->pWin )
+ {
+ USHORT k;
+ for (k=0; k<aList.Count(); k++)
+ if ( ChildTravelValue((*pChilds)[aList[k]]->eAlign) > ChildTravelValue(pCli->eAlign) )
+ break;
+ aList.Insert(i,k);
+ }
+ }
+
+ // Wenn der Focus in der Task liegt, ist pActiveChild zu ignorieren
+ SfxFrame *pTask = SfxViewFrame::Current()->GetFrame();
+ BOOL bTaskActive = pTask->GetWindow().HasChildPathFocus();
+
+ // F"ur das Taskfenster einen Dummy-Eintrag in die Liste
+ USHORT nDummy =0xFFFF;
+ USHORT nTopValue = ChildTravelValue( SFX_ALIGN_LOWESTTOP );
+ for ( i=0; i<aList.Count(); i++ )
+ {
+ SfxChild_Impl* pCli = (*pChilds)[aList[i]];
+ if ( pCli->pWin && ChildTravelValue( pCli->eAlign ) > nTopValue )
+ break;
+ }
+
+ aList.Insert( nDummy, i );
+
+ USHORT n = bForward ? 0 : aList.Count()-1;
+ if ( bTaskActive )
+ n = i;
+
+ SfxChild_Impl *pAct=NULL;
+ if ( pActiveChild && !bTaskActive )
+ {
+ // Das aktive Fenster suchen
+ for ( n=0; n<aList.Count(); n++ )
+ {
+ if ( aList[n] == nDummy )
+ continue;
+
+ SfxChild_Impl* pCli = (*pChilds)[aList[n]];
+ if ( pCli && pCli->pWin && ( pCli->pWin == pActiveChild || !pActiveChild ) )
+ {
+ pAct = pCli;
+ break;
+ }
+ }
+ }
+
+ if ( pAct )
+ {
+ for ( USHORT i=0; i<SFX_SPLITWINDOWS_MAX; i++ )
+ {
+ // Eventuell ist pAct ein Splitwindow
+ SfxSplitWindow *p = pSplit[i];
+ if ( pAct->pWin == p )
+ {
+ if( p->ActivateNextChild_Impl( bForward ) )
+ return TRUE;
+ break;
+ }
+ }
+
+ // pAct ist ein direktes ChildWindow
+ // mit dem Nachfolger bzw. Vorg"anger des aktiven Fensters weitermachen
+ if ( bForward )
+ n = n+1<aList.Count() ? n+1 : 0;
+ else
+ n = n>0 ? n-1 : aList.Count() - 1;
+ }
+
+ USHORT nStart = n;
+ for( ;; )
+ {
+ if ( aList[n] == nDummy )
+ {
+ // Das n"achste Fenster ist das Taskfenster
+ SfxWorkWindow* pTaskWin = pTask->GetWorkWindow_Impl();
+ if ( pActiveChild && !bTaskActive )
+ pTaskWin->pActiveChild = NULL;
+ if ( pTaskWin->ActivateNextChild_Impl( bForward ) )
+ return TRUE;
+ }
+ else
+ {
+ SfxChild_Impl* pCli = (*pChilds)[aList[n]];
+ if ( pCli == pAct )
+ // Alle durchgesehen
+ break;
+ else if ( pCli->pWin )
+ {
+ SfxChild_Impl* pNext = pCli;
+ for ( USHORT n=0; n<SFX_SPLITWINDOWS_MAX; n++ )
+ {
+ // Eventuell ist pNext ein Splitwindow
+ SfxSplitWindow *p = pSplit[n];
+ if ( pNext->pWin == p )
+ {
+ // Das erste/letzte Fenster dort aktivieren
+ p->SetActiveWindow_Impl( NULL );
+ pNext = NULL;
+ if( p->ActivateNextChild_Impl( bForward ) )
+ return TRUE;
+ break;
+ }
+ }
+
+ if ( pNext )
+ {
+ pNext->pWin->GrabFocus();
+ pActiveChild = pNext->pWin;
+ return TRUE;
+ }
+ }
+ }
+
+ if ( bForward )
+ n = n+1<aList.Count() ? n+1 : 0;
+ else
+ n = n>0 ? n-1 : aList.Count() - 1;
+
+ if ( n == nStart )
+ // Alle durchgesehen
+ break;
+ }
+
+ return FALSE;
+}
+
+/*
+BOOL SfxTaskWorkWin_Impl::ActivateNextChild_Impl( BOOL bForward )
+{
+ // Alle Kinder gem"a\s Liste sortieren
+ SvUShorts aList;
+ USHORT i;
+ for (i=SFX_OBJECTBAR_MAX; i<pChilds->Count(); i++)
+ {
+ SfxChild_Impl *pCli = (*pChilds)[i];
+ if ( pCli && pCli->bCanGetFocus && pCli->pWin )
+ {
+ USHORT k;
+ for (k=0; k<aList.Count(); k++)
+ if ( ChildTravelValue((*pChilds)[aList[k]]->eAlign) > ChildTravelValue(pCli->eAlign) )
+ break;
+ aList.Insert(i,k);
+ }
+ }
+
+ BOOL bFrameActive = pTask->GetActiveFrame()->GetWindow().HasChildPathFocus();
+
+ // F"ur das Taskfenster einen Dummy-Eintrag in die Liste
+ USHORT nDummy =0xFFFF;
+ USHORT nTopValue = ChildTravelValue( SFX_ALIGN_LOWESTTOP );
+ for ( i=0; i<aList.Count(); i++ )
+ {
+ SfxChild_Impl* pCli = (*pChilds)[aList[i]];
+ if ( pCli->pWin && ChildTravelValue( pCli->eAlign ) > nTopValue )
+ break;
+ }
+
+ aList.Insert( nDummy, i );
+
+ // Index des aktiven Fensters
+ USHORT n = bForward ? 0 : aList.Count()-1;
+ if ( bFrameActive )
+ n = i;
+
+ SfxChild_Impl *pAct=NULL;
+ if ( pActiveChild && !bFrameActive )
+ {
+ // Das aktive Fenster suchen
+ for ( n=0; n<aList.Count(); n++ )
+ {
+ if ( aList[n] == nDummy )
+ continue;
+
+ SfxChild_Impl* pCli = (*pChilds)[aList[n]];
+ if ( pCli && pCli->pWin && ( pCli->pWin == pActiveChild || !pActiveChild ) )
+ {
+ pAct = pCli;
+ break;
+ }
+ }
+ }
+
+ if ( pAct )
+ {
+ for ( USHORT i=0; i<SFX_SPLITWINDOWS_MAX; i++ )
+ {
+ // Eventuell ist pAct ein Splitwindow
+ SfxSplitWindow *p = pSplit[i];
+ if ( pAct->pWin == p )
+ {
+ if( p->ActivateNextChild_Impl( bForward ) )
+ return TRUE;
+ break;
+ }
+ }
+ }
+
+ if ( pAct || bFrameActive )
+ {
+ // mit dem Nachfolger bzw. Vorg"anger des aktiven Fensters weitermachen
+ if ( bForward )
+ {
+ n = n+1;
+ if ( n == aList.Count() )
+ return FALSE;
+ }
+ else
+ {
+ if ( n == 0 )
+ return FALSE;
+ n = n-1;
+ }
+ }
+
+ for( ;; )
+ {
+ if ( aList[n] == nDummy )
+ {
+ SfxFrame *pFrame = pTask->GetFrame_Impl( bForward ? 0 : ( pTask->GetFrameCount_Impl() - 1 ) );
+ if ( !pFrame->ActivateNextChildWindow_Impl( bForward ) )
+ pFrame->GetFrameInterface()->activate();
+ return TRUE;
+ }
+ else
+ {
+ SfxChild_Impl* pCli = (*pChilds)[aList[n]];
+ if ( pCli == pAct )
+ // Alle durchgesehen
+ break;
+ else if ( pCli->pWin )
+ {
+ SfxChild_Impl* pNext = pCli;
+ for ( USHORT n=0; n<SFX_SPLITWINDOWS_MAX; n++ )
+ {
+ // Eventuell ist pNext ein Splitwindow
+ SfxSplitWindow *p = pSplit[n];
+ if ( pNext->pWin == p )
+ {
+ // Das erste/letzte Fenster dort aktivieren
+ p->SetActiveWindow_Impl( NULL );
+ pNext = NULL;
+ if( p->ActivateNextChild_Impl( bForward ) )
+ return TRUE;
+ break;
+ }
+ }
+
+ if ( pNext )
+ {
+ pNext->pWin->GrabFocus();
+ pActiveChild = pNext->pWin;
+ return TRUE;
+ }
+ }
+ }
+
+ if ( bForward )
+ {
+ n = n+1;
+ if ( n == aList.Count() )
+ break;
+ }
+ else
+ {
+ if ( n == 0 )
+ break;
+ n = n-1;
+ }
+
+ }
+
+ return FALSE;
+}
+ */
+
diff --git a/sfx2/source/bastyp/bastyp.hrc b/sfx2/source/bastyp/bastyp.hrc
new file mode 100644
index 000000000000..f243028afdba
--- /dev/null
+++ b/sfx2/source/bastyp/bastyp.hrc
@@ -0,0 +1,114 @@
+/*************************************************************************
+ *
+ * $RCSfile: bastyp.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:28 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include "sfx.hrc"
+
+//fuer das Mapping Fehlercode -> ResId
+
+#define RC_BASTYP RID_SFX_BASTYP_START
+#define DLG_FILTER_SELECT (RC_BASTYP)
+#if SUPD<552
+#define STR_ERR_HDLMESS (RC_BASTYP+1)
+#define RID_ERRHDL_CLASS (RC_BASTYP+2)
+#endif
+#define STR_FILTER_DOWNLOAD (RC_BASTYP+3)
+#define STR_FILTER_CHOOSER (RC_BASTYP+4)
+#define STR_FILTER_OTHERS (RC_BASTYP+5)
+#define STR_FILTER_ZIPPED (RC_BASTYP+6)
+#define STR_FILTER_CHANNELON_OFFLINE (RC_BASTYP+7)
+#define STR_FILTER_EXTERNAL (RC_BASTYP+8)
+#define STR_FILTER_NOT_INSTALLED (RC_BASTYP+9)
+#define STR_FILTER_CONSULT_SERVICE (RC_BASTYP+10)
+#define STR_FILTER_COMPONENT (RC_BASTYP+11)
+#define STR_MEMEXCEPTION (RC_BASTYP+28)
+#define MSG_MEM_WARN (RC_BASTYP+29)
+
+#define RID_JSPROMPT (RC_BASTYP+8)
+#define RID_JSPROMPT_TEXT 1
+#define RID_JSPROMPT_CANCEL 2
+#define RID_JSPROMPT_OK 3
+
+#define RID_FLT_INTERACTIVE (RC_BASTYP+9)
+#define RID_FLT_INTERACTIVE_TEXT 1
+#define RID_FLT_INTERACTIVE_EDIT 2
+#define RID_FLT_INTERACTIVE_CANCEL 3
+#define RID_FLT_INTERACTIVE_OK 4
+
+//= ErrorTexte "downloadcontroller" =================================================================
+#define ERR_INET_NAME_RESOLVE (RC_BASTYP + 12)
+#define ERR_INET_CONNECT (RC_BASTYP + 13)
+#define ERR_INET_READ (RC_BASTYP + 14)
+#define ERR_INET_WRITE (RC_BASTYP + 15)
+#define ERR_INET_GENERAL (RC_BASTYP + 16)
+#define ERR_WRONG_URL (RC_BASTYP + 17)
+#define ERR_ACTIVEDOWNLOADS (RC_BASTYP + 18)
+#define ERR_QUEUEDDOWNLOADS (RC_BASTYP + 19)
+#define ERR_FILEISLOCAL (RC_BASTYP + 20)
+#define ERR_FILENAMECHECK83 (RC_BASTYP + 21)
+#define ERR_INSUFFICIENTDISKSPACE (RC_BASTYP + 22)
+
+//= Texte "downloadcontroller" =================================================================
+#define STR_DOWNLOAD_SOURCE (RC_BASTYP + 23)
+#define STR_DOWNLOAD_DESTINATION (RC_BASTYP + 24)
+#define STR_DOWNLOAD_STATE (RC_BASTYP + 25)
+#define STR_DOWNLOAD_REMAININGTIME (RC_BASTYP + 26)
+#define STR_DOWNLOAD_STATEFORMAT (RC_BASTYP + 27)
+
diff --git a/sfx2/source/bastyp/bastyp.src b/sfx2/source/bastyp/bastyp.src
new file mode 100644
index 000000000000..fccc51dc3c54
--- /dev/null
+++ b/sfx2/source/bastyp/bastyp.src
@@ -0,0 +1,433 @@
+/*************************************************************************
+ *
+ * $RCSfile: bastyp.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:28 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+ //==============================================================================
+ // (C) 1992-1995 StarDivision GmbH, Hamburg, Germany
+ //==============================================================================
+#include "bastyp.hrc"
+
+ // == Error Strings ====================================================================
+String ERR_INET_NAME_RESOLVE
+{
+ Text = "Der Rechnername konnte nicht aufgelst werden\n" ;
+ Text [ ENGLISH ] = "Could not resolve hostname" ;
+ Text [ dutch ] = "De naam van de computer kon niet worden herleid\n" ;
+ Text [ english_us ] = "The computer name could not be resolved\n" ;
+ Text [ italian ] = "Non stato possibile risolvere il nome dell'host\n" ;
+ Text [ spanish ] = "El nombre del ordenador no se pudo resolver.\n" ;
+ Text [ french ] = "Impossible de rsoudre le nom de l'ordinateur\n" ;
+ Text [ swedish ] = "Datornamnet kunde inte lsas upp\n" ;
+ Text [ danish ] = "Det var ikke muligt at fortolke computernavnet\n" ;
+ Text [ portuguese ] = "Impossvel resolver o nome do computador.\n" ;
+ Text [ portuguese_brazilian ] = "Der Rechnername konnte nicht aufgelst werden\n" ;
+ Text[ chinese_simplified ] = "޷ҵַ\n";
+ Text[ russian ] = " \n";
+ Text[ polish ] = "Nazwy komputera nie mona byo przetworzy\n";
+ Text[ japanese ] = "νĖ͌‚܂ł\n";
+ Text[ chinese_traditional ] = "LkDq}C\n";
+ Text[ arabic ] = " \n";
+ Text[ greek ] = " $(ARG1)";
+ Text[ korean ] = "ǻ ̸ Ȯ ߽ϴ \n";
+ Text[ turkish ] = "Bilgisayarn ad zlemedi\n";
+};
+String ERR_INET_CONNECT
+{
+ Text = "Die Internetverbindung konnte nicht hergestellt werden" ;
+ Text [ ENGLISH ] = "The Internetconnection could not be established" ;
+ Text [ dutch ] = "De Internet-verbinding kon niet worden tot stand gebracht worden" ;
+ Text [ english_us ] = "Internet connection could not be established" ;
+ Text [ italian ] = "Non stato possibile ripristinare il collegamento Internet" ;
+ Text [ spanish ] = "No se pudo crear la conexin Internet" ;
+ Text [ french ] = "Impossible d'tablir la connexion Internet" ;
+ Text [ swedish ] = "Det gick inte att upprtta en Internet-frbindelse" ;
+ Text [ danish ] = "Det var ikke muligt at oprette en forbindelse til Internettet" ;
+ Text [ portuguese_brazilian ] = "Die Internetverbindung konnte nicht hergestellt werden" ;
+ Text [ portuguese ] = "Impossvel estabelecer a ligao com a Internet." ;
+ Text[ chinese_simplified ] = "޷͹ʻ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Nie mona byo uzyska poczenia z sieci Internetu";
+ Text[ japanese ] = "ȯĂ̐ڑłĂ܂B";
+ Text[ chinese_traditional ] = "LkM Internet إ߳sC";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " Internet";
+ Text[ korean ] = "ͳ ϼ ʾҽϴ.";
+ Text[ turkish ] = "Internet balants gerekletirilemedi.";
+};
+String ERR_INET_READ
+{
+ Text = "Daten konnten nicht ber das Internet gelesen werden.\nServerfehlermeldung: $(ARG1)" ;
+ Text [ ENGLISH ] = "Error reading from the internet\n.Server error message: $(ARG1)" ;
+ Text [ dutch ] = "De gegevens konden niet via Internet worden gelezen.\nFoutmelding server: $(ARG1)" ;
+ Text [ english_us ] = "Error reading data from the internet\n.Server error message: $(ARG1)" ;
+ Text [ italian ] = "Non stato possibile leggere i dati tramite Internet.\nErrore di server: $(ARG1)" ;
+ Text [ spanish ] = "Los datos no se pudieron leer a travs de Internet.\nMensaje de error del servidor: $(ARG1)" ;
+ Text [ french ] = "Impossible de lire des donnes via Internet.\nMessage d'erreur du serveur : $(ARG1)" ;
+ Text [ swedish ] = "Data kunde inte lsas via Internet.\nServerfelmeddelande: $(ARG1)" ;
+ Text [ danish ] = "Det var ikke muligt at indlse data over Internettet.\nServerfejlmelding: $(ARG1)" ;
+ Text [ portuguese ] = "Foi impossvel ler os dados via Internet.\nMensagem de erro do servidor: $(ARG1)" ;
+ Text [ portuguese_brazilian ] = "Daten konnten nicht ber das Internet gelesen werden.\nServerfehlermeldung: $(ARG1)" ;
+ Text[ chinese_simplified ] = "޷ͨʻȡݡ\n$(ARG1)";
+ Text[ russian ] = " .\n : $(ARG1)";
+ Text[ polish ] = "Danych nie mona odczyta przez Internet. \nKomunikat o bdzie serwera: $(ARG1)";
+ Text[ japanese ] = "ްͲȯĂ͓ǂݎ܂ł\nBް װ ү: $(ARG1)";
+ Text[ chinese_traditional ] = "LkzL Internet ŪơC\nAi~G$(ARG1)";
+ Text[ arabic ] = " .\n : $(ARG1)";
+ Text[ greek ] = " Internet.\n : $(ARG1)";
+ Text[ korean ] = "ͳݿ б \n. ޼: $(ARG1)";
+ Text[ turkish ] = "Internet zerinden veri okunurken hata olutu.\nSunucu hata iletisi: $(ARG1)";
+};
+String ERR_INET_WRITE
+{
+ Text = "Daten konnten nicht ins Internet bertragen werden.\nServerfehlermeldung: $(ARG1)" ;
+ Text [ ENGLISH ] = "Error writing to the internet.Server error message: $(ARG1)" ;
+ Text [ dutch ] = "De gegevens konden niet naar Internet worden getransfereerd.\nFoutmelding server: $(ARG1)" ;
+ Text [ english_us ] = "Error transferring data to the internet.\nServer error message: $(ARG1)" ;
+ Text [ italian ] = "Non stato possibile trasmettere i dati in Internet.\nErrore di server: $(ARG1)" ;
+ Text [ spanish ] = "Los datos no se pudieron transferir a Internet.\nMensaje de error del servidor: $(ARG1)" ;
+ Text [ french ] = "Impossible de transmettre les donnes l'Internet.\nMessage d'erreur du serveur : $(ARG1)" ;
+ Text [ swedish ] = "Data kunde inte verfras till Internet.\nServerfelmeddelande: $(ARG1)" ;
+ Text [ danish ] = "Det var ikke muligt at overfre data til Internettet.\nServerfejlmelding: $(ARG1)" ;
+ Text [ portuguese ] = "Foi impossvel transmitir dados para a Internet.\nMensagem de erro do servidor: $(ARG1)" ;
+ Text [ portuguese_brazilian ] = "Daten konnten nicht ins Internet bertragen werden.\nServerfehlermeldung: $(ARG1)" ;
+ Text[ chinese_simplified ] = "޷ʻݡ\n$(ARG1)";
+ Text[ russian ] = " .\n : $(ARG1)";
+ Text[ polish ] = "Danych nie mona przesa przez Internet.\nKomunikat o bdzie z serwera: $(ARG1)";
+ Text[ japanese ] = "ްͲȯĂɓ]ł܂ł\nBް װ ү: $(ARG1)";
+ Text[ chinese_traditional ] = "LkV Internet ǻơC\nAi~G$(ARG1)";
+ Text[ arabic ] = " .\n : $(ARG1)";
+ Text[ greek ] = " Internet.\n : $(ARG1)";
+ Text[ korean ] = "ͳݿ ȯ .\n ޼: $(ARG1)";
+ Text[ turkish ] = "Veriler Internet zerinden aktarlamad.\nSunucu hata iletisi: $(ARG1)";
+};
+String ERR_INET_GENERAL
+{
+ Text = "Ein allgemeiner Fehler im Internetbereich trat auf" ;
+ Text [ ENGLISH ] = "Gereral Internet Error" ;
+ Text [ dutch ] = "Algemene fout in Internet" ;
+ Text [ english_us ] = "General Internet Error" ;
+ Text [ italian ] = "Si verificato un errore generale nell'area Internet" ;
+ Text [ spanish ] = "Error general en Internet" ;
+ Text [ french ] = "Erreur gnrale Internet" ;
+ Text [ swedish ] = "Ett allmnt Internet-fel uppstod" ;
+ Text [ danish ] = "Der opstod en generel Internetfejl" ;
+ Text [ portuguese ] = "Surgiu um erro geral na rea da Internet." ;
+ Text [ portuguese_brazilian ] = "Ein allgemeiner Fehler im Internetbereich trat auf" ;
+ Text[ chinese_simplified ] = "ڹʻڷһһ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Wystpi oglny bd w sieci Internetu";
+ Text[ japanese ] = "ȯė̈̈ʓIȴװ̔";
+ Text[ chinese_traditional ] = "b Internet sS򤺵oͤ@Ӥ@~C";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " Internet";
+ Text[ korean ] = "Ϲ ͳ ";
+ Text[ turkish ] = "Genel Internet hatas";
+};
+String ERR_WRONG_URL
+{
+ Text = "Fehlerhafter URL\n" ;
+ Text [ ENGLISH ] = "Wrong URL\n" ;
+ Text [ dutch ] = "Foutief URL\n" ;
+ Text [ english_us ] = "Faulty URL\n" ;
+ Text [ italian ] = "URL errato\n" ;
+ Text [ spanish ] = "URL errnea\n" ;
+ Text [ french ] = "URL erron\n" ;
+ Text [ swedish ] = "Felaktig URL\n" ;
+ Text [ danish ] = "Fejlagtig URL\n" ;
+ Text [ portuguese ] = "Erro no URL\n" ;
+ Text [ portuguese_brazilian ] = "Fehlerhafter URL\n" ;
+ Text[ chinese_simplified ] = "URLַ\n";
+ Text[ russian ] = " URL\n";
+ Text[ polish ] = "Bd w URL\n";
+ Text[ japanese ] = "URLɴװ\n";
+ Text[ chinese_traditional ] = "URL }\n";
+ Text[ arabic ] = "URL \n";
+ Text[ greek ] = " URL\n";
+ Text[ korean ] = "URL \n";
+ Text[ turkish ] = "Hatal URL\n";
+};
+String ERR_ACTIVEDOWNLOADS
+{
+ Text = "Es sind noch Downloads aktiv.\nWollen Sie wirklich abbrechen?\n" ;
+ Text [ english_us ] = "There are still downloads that are active.\nAre you sure you want to quit?\n" ;
+ Text[ italian ] = "Ci sono ancora dei download attivi.\nVolete davvero terminare?\n";
+ Text[ portuguese_brazilian ] = "Es sind noch Downloads aktiv.\nWollen Sie wirklich beenden?\n";
+ Text[ portuguese ] = "Existem ainda alguns downloads em curso.\nCancelar?\n";
+ Text[ danish ] = "Der er fortsat aktive overfrsler.\nEr du sikker p, at du vil annullere?\n";
+ Text[ french ] = "Vous avez des tlchargements en cours.\nVoulez-vous vraiment annuler ?\n";
+ Text[ swedish ] = "Det finns fortfarande aktiva nedladdningar.\nVill Du verkligen avbryta?\n";
+ Text[ dutch ] = "Er zijn nog downloads actief.\nWilt u de applicatie werkelijk stoppen?\n";
+ Text[ spanish ] = "Todava existen descargas activas.\nDesea realmente cancelar?\n";
+ Text[ chinese_simplified ] = "ļ\nҪж\n";
+ Text[ russian ] = " .\n ?\n";
+ Text[ polish ] = "Trwa jeszcze pobieranie.\nCzy chcesz je przerwa?\n";
+ Text[ japanese ] = "܂޳۰ޒłB\n~Ă낵ł?\n";
+ Text[ chinese_traditional ] = "٥bUɮסC\nun_H\n";
+ Text[ arabic ] = " .\n \n";
+ Text[ greek ] = " .\n ;\n";
+ Text[ korean ] = "ٿε尡 Դϴ.\n׷ Ͻðڽϱ?\n";
+ Text[ turkish ] = "u an devam eden veri indirme ileri var.\nGerekten kmak istiyor musunuz?\n";
+};
+String ERR_QUEUEDDOWNLOADS
+{
+ Text = "Es stehen noch Downloads in der Warteschlange.\nWollen Sie wirklich beenden?\n" ;
+ Text [ english ] = "There are still downloads in the queue.\nDo you really want to quit?\n" ;
+ Text [ english_us ] = "There are still downloads to be performed.\nDo you really want to quit?\n" ;
+ Text [ portuguese ] = "Ainda existem downloads em fila de espera.\\Deseja realmente cancelar?\n" ;
+ Text [ portuguese_brazilian ] = "Es stehen noch Downloads in der Warteschlange.\nWollen Sie wirklich beenden?\n" ;
+ Text [ swedish ] = "Det finns fortfarande nedladdningar i k.\nVill Du nd avsluta?\n" ;
+ Text [ danish ] = "Der er fortsat overfrsler i k.\nEr du sikker p, at du vil afslutte?\n" ;
+ Text [ italian ] = "Ci sono ancora dei download in corso.\nVolete davvero terminare?\n" ;
+ Text [ spanish ] = "Todava hay documentos para descargar.\nDesea realmente cancelar?\n" ;
+ Text [ french ] = "Il y a des tlchargements dans la file d'attente.\ntes-vous sr de vouloir quitter ?\n" ;
+ Text [ dutch ] = "Er staan nog downloads op de wachtlijst.\nWilt u werkelijk beindigen?\n" ;
+ Text[ chinese_simplified ] = "Ⱥ\nҪ\n";
+ Text[ russian ] = " .\n ?\n";
+ Text[ polish ] = "Dokumenty czekaj jeszcze na zaadowanie.\nCzy chcesz na pewno zakoczy?\n";
+ Text[ japanese ] = "޳۰ނ͂܂ҋ@łB\nIĂ낵ł?\n";
+ Text[ chinese_traditional ] = "٥bUɮסC\nunH\n";
+ Text[ arabic ] = " .\n \n";
+ Text[ greek ] = " .\n ;\n";
+ Text[ korean ] = "ٿε尡 Դϴ.\n׷ Ͻðڽϱ?\n";
+ Text[ turkish ] = "Bekleme srasnda veri indirme ileri var.\nGerekten kmak istiyor musunuz?\n";
+};
+String ERR_FILEISLOCAL
+{
+ Text = "Die Datei liegt bereits lokal auf Ihrem Rechner.\nSoll sie trotzdem kopiert werden?" ;
+ Text [ english ] = "The file already exists on your computer.\nDo you really want to copy?" ;
+ Text [ english_us ] = "The file already exists on your computer.\nDo you want to copy it anyway?" ;
+ Text [ portuguese ] = "O ficheiro j se encontra no seu computador.\nMesmo assim copiar?" ;
+ Text [ portuguese_brazilian ] = "Die Datei liegt bereits lokal auf Ihrem Rechner.\nSoll sie trotzdem kopiert werden?" ;
+ Text [ swedish ] = "Filen finns redan lokalt p Din dator.\nSkall den nd kopieras?" ;
+ Text [ danish ] = "Filen findes allerede lokalt p din computer.\nSkal den kopieres alligevel?" ;
+ Text [ italian ] = "Il file si trova gi sul computer dell'utente.\nVolete copiarlo lo stesso?" ;
+ Text [ spanish ] = "El archivo ya est guardado localmente en su ordenador.\nDesea copiarlo de todas maneras?" ;
+ Text [ french ] = "Ce fichier existe dj sur votre disque dur.\nSouhaitez-vous tout de mme la copier?" ;
+ Text [ dutch ] = "Het bestand bevindt zich reeds op uw computer.\nWilt u het toch kopiren?" ;
+ Text[ chinese_simplified ] = "ļѾļϡ\nҪ";
+ Text[ russian ] = " .\n ?";
+ Text[ polish ] = "Plik jest ju ulokowany w twoim komputerze.\nCzy ma on pomimo tego zosta skopiowany?";
+ Text[ japanese ] = "̧ق͂łɺ߭ɂ܂B\nł߰܂H";
+ Text[ chinese_traditional ] = "oɮפwgxsbϺФWC\n٬OnƻsH";
+ Text[ arabic ] = " .\n ߿";
+ Text[ greek ] = " .\n ' ;";
+ Text[ korean ] = " ̹ մϴ.\n׷ Ͻðڽϱ?";
+ Text[ turkish ] = "Dosya bilgisayarnzda zaten mevcut.\nYine de kopyalansn m?";
+};
+String ERR_FILENAMECHECK83
+{
+ Text = "Der eingegebene Dateiname ist ungltig.\nBitte beachten sie, dass der Dateiname maximal 8 Zeichen\nund die Dateierweiterung maximal 3 Zeichen lang sein drfen." ;
+ Text [ english ] = "Der eingegebene Dateiname ist ungltig.\nBitte beachten sie, da der Dateiname maximal 8 Zeichen\n und die Dateierweiterung maximal 3 Zeichen lang sein drfen." ;
+ Text [ english_us ] = "The file name entered is invalid.\nPlease note that file names may not exceed 8 characters\n and the file extension may only consist of 3 characters." ;
+ Text [ portuguese ] = "O nome do ficheiro indicado no vlido.\nO nome do ficheiro dever ter no mximo 8 caracteres\n e a respectiva extenso o mximo de 3." ;
+ Text [ portuguese_brazilian ] = "Der eingegebene Dateiname ist ungltig.\nBitte beachten sie, da der Dateiname maximal 8 Zeichen\n und die Dateierweiterung maximal 3 Zeichen lang sein drfen." ;
+ Text [ swedish ] = "Det inmatade filnamnet r ogiltigt.\nVar vnlig och se till att filnamnet innehller maximalt 8 tecken\n och filnamnstillgget maximalt 3 tecken." ;
+ Text [ danish ] = "Det indtastede navn er ugyldigt.\nBemrk venligst at filnavnet hjst m indeholde 8 tegn \nog filypenavnet hjst m best af 3 tegn." ;
+ Text [ italian ] = "Il nome del file digitato non valido.\nTenete presente che il nome del file pu avere una lunghezza massima di 8 caratteri\ne l'estensione del file di 3." ;
+ Text [ spanish ] = "El nombre del archivo especificado no es vlido.\\Tenga en cuenta que el nombre debe tener un mximo de 8 caracteres\ny la terminacin 3." ;
+ Text [ french ] = "Le nom de fichier indiqu est incorrect.\nIl peut comporter au maximum 8 caractres\net l'extension de fichier au maximum 3 caractres." ;
+ Text [ dutch ] = "De aangegeven bestandsnaam is ongeldig.\nWij wijzen u erop dat de bestandsnaam maximaal 8 tekens\nen de extensie maximaal 3 tekens lang mag zijn." ;
+ Text[ chinese_simplified ] = "ļЧ\nע⣺ļó8ַ\nļչó 3 ַ";
+ Text[ russian ] = " .\n, , 8 \n, 3 .";
+ Text[ polish ] = "Podana nazwa pliku jest nieprawidowa.\nProsz uwzgldni, e nazwa pliku moe zawiera maksym. 8 znakw\n,a rozszerzenie pliku maksym. 3 znaki.";
+ Text[ japanese ] = "w肵̧ٖłB\ņٖ͍ō8܂\ņيgq͍ō3܂łłȂĂ͂ȂƂɒӂĉB";
+ Text[ chinese_traditional ] = "JɮצWLġC\nбzdNɮצWoWL8ӦrC\nɦWoWL 3 ӦrC";
+ Text[ arabic ] = " .\n \n .";
+ Text[ greek ] = " .\n 8 \n 3 .";
+ Text[ korean ] = " ̸ ȿ ʽϴ.\n ̸ 8ڸ ʰ ٴ°Ͱ \n Ȯڰ3ڸ ʰ Ҽ ٴ° Ͻʽÿ.";
+ Text[ turkish ] = "Girilen dosya ad geerli deil.\nDosya ad en fazla 8 ve dosyan\\uzants en fazla 3 karakter uzunluunda olabilir.";
+};
+String ERR_INSUFFICIENTDISKSPACE
+{
+ Text = "Die Datei %1 wird grer als der zur Verfgung stehende Plattenplatz.\nWollen Sie fortfahren ?\n" ;
+ Text [ english_us ] = "The file %1 exceeds the available disk space.\nDo you want to continue anyway?\n" ;
+ Text[ italian ] = "Il file %1 occupa pi spazio di quello disponibile sul disco.\nVolete continuare?\n";
+ Text[ portuguese_brazilian ] = "Die Datei %1 wird grer als der zur Verfgung stehende Plattenplatz.\nWollen Sie fortfahren ?\n";
+ Text[ portuguese ] = "O ficheiro %1 excede o espao disponvel no disco.\nContinuar?\n";
+ Text[ danish ] = "Filen %1 overskrider den tilgngelige diskplads.\nVil du fortstte alligevel?\n";
+ Text[ french ] = "La taille du fichier %1 dpasse l'espace libre sur votre disque dur.\nSouhaitez-vous poursuivre ?\n";
+ Text[ swedish ] = "Filen %1 blir strre n det tillgngliga diskutrymmet.\nVill Du nd fortstta?\n";
+ Text[ dutch ] = "Bestand %1 wordt groter dan de beschikbare schuifruimte.\nWilt u doorgaan ?\n";
+ Text[ spanish ] = "El tamao del archivo %1 exceder al del disponible en el disco.\nDesea continuar?\n";
+ Text[ chinese_simplified ] = "ļ %1 ռеĿÿռ䡣\nҪ\n";
+ Text[ russian ] = " %1 , .\n ?\n";
+ Text[ polish ] = "Plik %1 przewysza ilo miejsca na dysku.\nKontynuowa ?\n";
+ Text[ japanese ] = "̧ %1͋޽eʗ̈zĂ܂\ns܂?\n";
+ Text[ chinese_traditional ] = "ɮ %1 һݪŶj{siΪŶC\nn~S\n";
+ Text[ arabic ] = " %1 .\n ɿ\n";
+ Text[ greek ] = " %1 .\n ;\n";
+ Text[ korean ] = " %1 ũ ʰ߽ϴ.\n׷ Ͻðڽϱ?\n";
+ Text[ turkish ] = "%1 dosyas mevcut disk alann ayor.\nDevam etmek istiyor musunuz ?\n";
+};
+//= Texte "downloadcontroller" =================================================================
+String STR_DOWNLOAD_SOURCE
+{
+ Text = "Quelle" ;
+ Text [ English ] = "Location" ;
+ Text [ English_us ] = "Source" ;
+ Text [ italian ] = "Sorgente" ;
+ Text [ spanish ] = "Fuente" ;
+ Text [ french ] = "Source" ;
+ Text [ dutch ] = "Bron" ;
+ Text [ swedish ] = "Klla" ;
+ Text [ danish ] = "Kilde" ;
+ Text [ portuguese ] = "Fonte" ;
+ Text [ portuguese_brazilian ] = "Quelle" ;
+ Text [ chinese_simplified ] = "Դ";
+ Text [ russian ] = "";
+ Text [ polish ] = "rdo";
+ Text [ japanese ] = "";
+ Text [ chinese_traditional ] = "ӷ";
+ Text [ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "ҽ";
+ Text[ turkish ] = "Kaynak";
+};
+String STR_DOWNLOAD_DESTINATION
+{
+ Text = "Ziel" ;
+ Text [ English ] = "Saving" ;
+ Text [ English_us ] = "Target" ;
+ Text [ italian ] = "Destinazione" ;
+ Text [ spanish ] = "Destino" ;
+ Text [ french ] = "Destination" ;
+ Text [ dutch ] = "Doel" ;
+ Text [ swedish ] = "Ml" ;
+ Text [ danish ] = "Ml" ;
+ Text [ portuguese ] = "Destino" ;
+ Text [ portuguese_brazilian ] = "Ziel" ;
+ Text [ chinese_simplified ] = "Ŀ";
+ Text [ russian ] = "";
+ Text [ polish ] = "Cel";
+ Text [ japanese ] = "ޯ";
+ Text [ chinese_traditional ] = "ؼ";
+ Text [ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "ǥ";
+ Text[ turkish ] = "Hedef";
+};
+String STR_DOWNLOAD_STATE
+{
+ Text = "Status" ;
+ Text [ English ] = "Status" ;
+ Text [ English_us ] = "Status" ;
+ Text [ italian ] = "Stato" ;
+ Text [ spanish ] = "Estado" ;
+ Text [ french ] = "Statut" ;
+ Text [ dutch ] = "Status" ;
+ Text [ swedish ] = "Status" ;
+ Text [ danish ] = "Status" ;
+ Text [ portuguese ] = "Estado" ;
+ Text [ portuguese_brazilian ] = "Status" ;
+ Text [ chinese_simplified ] = "״̬";
+ Text [ russian ] = "";
+ Text [ polish ] = "Stan";
+ Text [ japanese ] = "ð";
+ Text [ chinese_traditional ] = "A";
+ Text [ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "Durum";
+};
+String STR_DOWNLOAD_REMAININGTIME
+{
+ Text = "Restzeit" ;
+ Text [ English ] = "Time Left" ;
+ Text [ English_us ] = "Remaining Time" ;
+ Text [ italian ] = "Tempo restante" ;
+ Text [ spanish ] = "Tiempo restante" ;
+ Text [ french ] = "Temps restant" ;
+ Text [ dutch ] = "Resttijd" ;
+ Text [ swedish ] = "Resterande tid" ;
+ Text [ danish ] = "Resterende tid" ;
+ Text [ portuguese ] = "Tempo restante" ;
+ Text [ portuguese_brazilian ] = "Restzeit" ;
+ Text [ chinese_simplified ] = "ʣʱ";
+ Text [ russian ] = " ";
+ Text [ polish ] = "Pozostay czas";
+ Text [ japanese ] = "c莞";
+ Text [ chinese_traditional ] = "Ѿlɶ";
+ Text [ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ð";
+ Text[ turkish ] = "Kalan sre";
+};
+String STR_DOWNLOAD_STATEFORMAT
+{
+ Text = "$(READ) von $(TOTAL) [ $(TIME) ]" ;
+ Text [ English ] = "$(READ) of $(TOTAL) [ $(TIME) ]" ;
+ Text[ english_us ] = "$(READ) of $(TOTAL) [ $(TIME) ]";
+ Text[ portuguese ] = "$(READ) de $(TOTAL) [ $(TIME) ]";
+ Text[ russian ] = "$(READ) $(TOTAL) [ $(TIME) ]";
+ Text[ greek ] = "$(READ) $(TOTAL) [ $(TIME) ]";
+ Text[ dutch ] = "$(READ) van $(TOTAL) [ $(TIME) ]";
+ Text[ french ] = "$(READ) de $(TOTAL) [ $(TIME) ]";
+ Text[ spanish ] = "$(READ) de $(TOTAL) [ $(TIME) ]";
+ Text[ italian ] = "$(READ) di $(TOTAL) [ $(TIME) ]";
+ Text[ danish ] = "$(READ) af $(TOTAL) [ $(TIME) ]";
+ Text[ swedish ] = "$(READ) av $(TOTAL) [ $(TIME) ]";
+ Text[ polish ] = "$(READ) z $(TOTAL) [ $(TIME) ]";
+ Text[ portuguese_brazilian ] = "$(READ) of $(TOTAL) [ $(TIME) ]";
+ Text[ japanese ] = "$(READ) von $(TOTAL) [ $(TIME) ]";
+ Text[ korean ] = "$(TOTAL) $(READ) [ $(TIME) ]";
+ Text[ chinese_simplified ] = "$(READ) ܼ $(TOTAL) [ $(TIME) ]";
+ Text[ chinese_traditional ] = "$(READ) `p $(TOTAL) [ $(TIME) ]";
+ Text[ arabic ] = "$(READ) of $(TOTAL) [ $(TIME) ]";
+ Text[ turkish ] = "$(READ) Toplam $(TOTAL) [ $(TIME) ]";
+};
diff --git a/sfx2/source/bastyp/bitset.cxx b/sfx2/source/bastyp/bitset.cxx
new file mode 100644
index 000000000000..1e88ff5c1646
--- /dev/null
+++ b/sfx2/source/bastyp/bitset.cxx
@@ -0,0 +1,428 @@
+/*************************************************************************
+ *
+ * $RCSfile: bitset.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:28 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _TOOLS_DEBUG_HXX //autogen
+#include <tools/debug.hxx>
+#endif
+#pragma hdrstop
+
+#include "bitset.hxx"
+
+#include <string.h> // memset(), memcpy()
+#include <limits.h> // USHRT_MAX
+
+//====================================================================
+// add nOffset to each bit-value in the set
+
+BitSet BitSet::operator<<( USHORT nOffset ) const
+{
+ DBG_MEMTEST();
+ // create a work-copy, return it if nothing to shift
+ BitSet aSet(*this);
+ if ( nOffset == 0 )
+ return aSet;
+
+ // compute the shiftment in long-words and bits
+ USHORT nBlockDiff = nOffset / 32;
+ ULONG nBitValDiff = nOffset % 32;
+
+ // compute the new number of bits
+ for ( USHORT nBlock = 0; nBlock < nBlockDiff; ++nBlock )
+ aSet.nCount -= CountBits( *(aSet.pBitmap+nBlock) );
+ aSet.nCount -= CountBits( *(aSet.pBitmap+nBlockDiff) >> (32-nBitValDiff) );
+
+ // shift complete long-words
+ USHORT nTarget, nSource;
+ for ( nTarget = 0, nSource = nBlockDiff;
+ (nSource+1) < aSet.nBlocks;
+ ++nTarget, ++nSource )
+ *(aSet.pBitmap+nTarget) =
+ ( *(aSet.pBitmap+nSource) << nBitValDiff ) |
+ ( *(aSet.pBitmap+nSource+1) >> (32-nBitValDiff) );
+
+ // shift the remainder (if in total minor 32 bits, only this)
+ *(aSet.pBitmap+nTarget) = *(aSet.pBitmap+nSource) << nBitValDiff;
+
+ // determine the last used block
+ while ( *(aSet.pBitmap+nTarget) == 0 )
+ --nTarget;
+
+ // shorten the block-array
+ if ( nTarget < aSet.nBlocks )
+ {
+ ULONG* pNewMap = new ULONG[nTarget];
+ memcpy( pNewMap, aSet.pBitmap, 4 * nTarget );
+ delete aSet.pBitmap;
+ aSet.pBitmap = pNewMap;
+ aSet.nBlocks = nTarget;
+ }
+
+ return aSet;
+}
+
+//--------------------------------------------------------------------
+
+// substracts nOffset from each bit-value in the set
+
+BitSet BitSet::operator>>( USHORT nOffset ) const
+{
+ DBG_MEMTEST();
+ return BitSet();
+}
+
+//--------------------------------------------------------------------
+
+// internal code for operator= and copy-ctor
+
+void BitSet::CopyFrom( const BitSet& rSet )
+{
+ DBG_MEMTEST();
+ nCount = rSet.nCount;
+ nBlocks = rSet.nBlocks;
+ if ( rSet.nBlocks )
+ {
+ DBG_MEMTEST();
+ pBitmap = new ULONG[nBlocks];
+ memcpy( pBitmap, rSet.pBitmap, 4 * nBlocks );
+ }
+ else
+ pBitmap = 0;
+}
+
+//--------------------------------------------------------------------
+
+// creates an empty bitset
+
+BitSet::BitSet()
+{
+ DBG_MEMTEST();
+ nCount = 0;
+ nBlocks = 0;
+ pBitmap = 0;
+}
+
+//--------------------------------------------------------------------
+
+// creates a copy of bitset rOrig
+
+BitSet::BitSet( const BitSet& rOrig )
+{
+ DBG_MEMTEST();
+ CopyFrom(rOrig);
+}
+
+//--------------------------------------------------------------------
+
+// creates a bitset from an array
+
+BitSet::BitSet( USHORT* pArray, USHORT nSize ):
+ nCount(0)
+{
+ DBG_MEMTEST();
+ // find the highest bit to set
+ USHORT nMax = 0;
+ for ( USHORT n = 0; n < nCount; ++n )
+ if ( pArray[n] > nMax )
+ nMax = pArray[n];
+
+ // if there are bits at all
+ if ( nMax > 0 )
+ {
+ // allocate memory for all blocks needed
+ nBlocks = nMax / 32 + 1;
+ pBitmap = new ULONG[nBlocks];
+ memset( pBitmap, 0, 4 * nBlocks );
+
+ // set all the bits
+ for ( USHORT n = 0; n < nCount; ++n )
+ {
+ // compute the block no. and bitvalue
+ USHORT nBlock = n / 32;
+ ULONG nBitVal = 1L << (n % 32);
+
+ // set a single bit
+ if ( ( *(pBitmap+nBlock) & nBitVal ) == 0 )
+ {
+ *(pBitmap+nBlock) |= nBitVal;
+ ++nCount;
+ }
+ }
+ }
+ else
+ {
+ // initalize emtpy set
+ nBlocks = 0;
+ pBitmap = 0;
+ }
+}
+
+//--------------------------------------------------------------------
+
+// frees the storage
+
+BitSet::~BitSet()
+{
+ DBG_MEMTEST();
+ delete pBitmap;
+}
+
+//--------------------------------------------------------------------
+
+// creates a bitmap with all bits in rRange set
+
+BitSet::BitSet( const Range& rRange )
+{
+ DBG_MEMTEST();
+
+}
+
+//--------------------------------------------------------------------
+
+// assignment from another bitset
+
+BitSet& BitSet::operator=( const BitSet& rOrig )
+{
+ DBG_MEMTEST();
+ if ( this != &rOrig )
+ {
+ delete pBitmap;
+ CopyFrom(rOrig);
+ }
+ return *this;
+}
+
+//--------------------------------------------------------------------
+
+// assignment from a single bit
+
+BitSet& BitSet::operator=( USHORT nBit )
+{
+ DBG_MEMTEST();
+ delete pBitmap;
+
+ USHORT nBlocks = nBit / 32;
+ ULONG nBitVal = 1L << (nBit % 32);
+ nCount = 1;
+
+ ULONG *pBitmap = new ULONG[nBlocks];
+ memset( pBitmap + nBlocks, 0, 4 * nBlocks );
+
+ *(pBitmap+nBlocks) = nBitVal;
+
+ return *this;
+}
+
+//--------------------------------------------------------------------
+
+// creates the asymetric difference with another bitset
+
+BitSet& BitSet::operator-=(USHORT nBit)
+{
+ DBG_MEMTEST();
+ USHORT nBlock = nBit / 32;
+ ULONG nBitVal = 1L << (nBit % 32);
+
+ if ( nBlock >= nBlocks )
+ return *this;
+
+ if ( (*(pBitmap+nBlock) & nBitVal) )
+ {
+ *(pBitmap+nBlock) &= ~nBitVal;
+ --nCount;
+ }
+
+ return *this;
+}
+
+//--------------------------------------------------------------------
+
+// unites with the bits of rSet
+
+BitSet& BitSet::operator|=( const BitSet& rSet )
+{
+ DBG_MEMTEST();
+ USHORT nMax = Min(nBlocks, rSet.nBlocks);
+
+ // expand the bitmap
+ if ( nBlocks < rSet.nBlocks )
+ {
+ ULONG *pNewMap = new ULONG[rSet.nBlocks];
+ memset( pNewMap + nBlocks, 0, 4 * (rSet.nBlocks - nBlocks) );
+
+ if ( pBitmap )
+ {
+ memcpy( pNewMap, pBitmap, 4 * nBlocks );
+ delete pBitmap;
+ }
+ pBitmap = pNewMap;
+ nBlocks = rSet.nBlocks;
+ }
+
+ // add the bits blocks by block
+ for ( USHORT nBlock = 0; nBlock < nMax; ++nBlock )
+ {
+ // compute numberof additional bits
+ ULONG nDiff = ~*(pBitmap+nBlock) & *(rSet.pBitmap+nBlock);
+ nCount += CountBits(nDiff);
+
+ *(pBitmap+nBlock) |= *(rSet.pBitmap+nBlock);
+ }
+
+ return *this;
+}
+
+//--------------------------------------------------------------------
+
+// unites with a single bit
+
+BitSet& BitSet::operator|=( USHORT nBit )
+{
+ DBG_MEMTEST();
+ USHORT nBlock = nBit / 32;
+ ULONG nBitVal = 1L << (nBit % 32);
+
+ if ( nBlock >= nBlocks )
+ {
+ ULONG *pNewMap = new ULONG[nBlock+1];
+ memset( pNewMap + nBlocks, 0, 4 * (nBlock - nBlocks + 1) );
+
+ if ( pBitmap )
+ {
+ memcpy( pNewMap, pBitmap, 4 * nBlocks );
+ delete pBitmap;
+ }
+ pBitmap = pNewMap;
+ nBlocks = nBlock+1;
+ }
+
+ if ( (*(pBitmap+nBlock) & nBitVal) == 0 )
+ {
+ *(pBitmap+nBlock) |= nBitVal;
+ ++nCount;
+ }
+
+ return *this;
+}
+
+//--------------------------------------------------------------------
+
+// determines if the bit is set (may be the only one)
+
+BOOL BitSet::Contains( USHORT nBit ) const
+{
+ DBG_MEMTEST();
+ USHORT nBlock = nBit / 32;
+ ULONG nBitVal = 1L << (nBit % 32);
+
+ if ( nBlock >= nBlocks )
+ return FALSE;
+ return ( nBitVal & *(pBitmap+nBlock) ) == nBitVal;
+}
+
+//--------------------------------------------------------------------
+
+// determines if the bitsets are equal
+
+BOOL BitSet::operator==( const BitSet& rSet ) const
+{
+ DBG_MEMTEST();
+ if ( nBlocks != rSet.nBlocks )
+ return FALSE;
+
+ USHORT nBlock = nBlocks;
+ while ( nBlock-- > 0 )
+ if ( *(pBitmap+nBlock) != *(rSet.pBitmap+nBlock) )
+ return FALSE;
+
+ return TRUE;
+}
+
+//--------------------------------------------------------------------
+
+// counts the number of 1-bits in the parameter
+
+USHORT BitSet::CountBits( ULONG nBits )
+{
+ USHORT nCount = 0;
+ int nBit = 32;
+ while ( nBit-- && nBits )
+ { if ( ( (long)nBits ) < 0 )
+ ++nCount;
+ nBits = nBits << 1;
+ }
+ return nCount;
+}
+
+//--------------------------------------------------------------------
+
+USHORT IndexBitSet::GetFreeIndex()
+{
+ for(USHORT i=0;i<USHRT_MAX;i++)
+ if(!Contains(i))
+ {
+ *this|=i;
+ return i;
+ }
+ DBG_ASSERT(FALSE, "IndexBitSet enthaelt mehr als USHRT_MAX Eintraege");
+ return 0;
+}
+
+
diff --git a/sfx2/source/bastyp/fltfnc.cxx b/sfx2/source/bastyp/fltfnc.cxx
new file mode 100644
index 000000000000..c23b6eeb2842
--- /dev/null
+++ b/sfx2/source/bastyp/fltfnc.cxx
@@ -0,0 +1,3215 @@
+/*************************************************************************
+ *
+ * $RCSfile: fltfnc.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:28 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include "fltfnc.hxx"
+
+#ifndef _EXCHANGE_HXX //autogen
+#include <vcl/exchange.hxx>
+#endif
+#ifndef _CONFIG_HXX //autogen
+#include <vcl/config.hxx>
+#endif
+#ifndef _SB_SBMETH_HXX //autogen
+#include <basic/sbmeth.hxx>
+#endif
+#ifndef _BASMGR_HXX //autogen
+#include <basic/basmgr.hxx>
+#endif
+#ifndef _SB_SBSTAR_HXX //autogen
+#include <basic/sbstar.hxx>
+#endif
+#ifndef _SBX_SBXOBJECT_HXX //autogen
+#include <svtools/sbxobj.hxx>
+#endif
+#ifndef __SBX_SBXMETHOD_HXX //autogen
+#include <svtools/sbxmeth.hxx>
+#endif
+#ifndef _SBXCORE_HXX //autogen
+#include <svtools/sbxcore.hxx>
+#endif
+#ifndef _MSGBOX_HXX //autogen
+#include <vcl/msgbox.hxx>
+#endif
+#ifndef _RTL_USTRING_HXX //autogen
+#include <rtl/ustring.hxx>
+#endif
+#ifndef _INTN_HXX //autogen
+#include <tools/intn.hxx>
+#endif
+#ifndef _SFXINIMGR_HXX //autogen
+#include <svtools/iniman.hxx>
+#endif
+#ifndef _SFXENUMITEM_HXX //autogen
+#include <svtools/eitem.hxx>
+#endif
+#ifndef _SFXINTITEM_HXX //autogen
+#include <svtools/intitem.hxx>
+#endif
+#ifndef _SFXSTRITEM_HXX //autogen
+#include <svtools/stritem.hxx>
+#endif
+#ifndef _SVSTOR_HXX //autogen
+#include <so3/svstor.hxx>
+#endif
+#ifndef _EXTATTR_HXX
+#include <svtools/extattr.hxx>
+#endif
+#ifndef _LCKBITEM_HXX //autogen
+#include <svtools/lckbitem.hxx>
+#endif
+#ifndef _INETTYPE_HXX //autogen
+#include <svtools/inettype.hxx>
+#endif
+#ifndef _INET_CONFIG_HXX //autogen
+#include <inet/inetcfg.hxx>
+#endif
+#ifndef _SFXRECTITEM_HXX
+#include <svtools/rectitem.hxx>
+#endif
+
+#ifndef _COM_SUN_STAR_DOCUMENT_XDOCUMENTINFO_HPP_
+#include <com/sun/star/document/XDocumentInfo.hpp>
+#endif
+#ifndef _COM_SUN_STAR_DOCUMENT_XDOCUMENTINFOSUPPLIER_HPP_
+#include <com/sun/star/document/XDocumentInfoSupplier.hpp>
+#endif
+#ifndef _COM_SUN_STAR_DOCUMENT_XSTANDALONEDOCUMENTINFO_HPP_
+#include <com/sun/star/document/XStandaloneDocumentInfo.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XDISPATCHPROVIDERINTERCEPTOR_HPP_
+#include <com/sun/star/frame/XDispatchProviderInterceptor.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XDISPATCH_HPP_
+#include <com/sun/star/frame/XDispatch.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XDISPATCHPROVIDER_HPP_
+#include <com/sun/star/frame/XDispatchProvider.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XSTATUSLISTENER_HPP_
+#include <com/sun/star/frame/XStatusListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_FRAMESEARCHFLAG_HPP_
+#include <com/sun/star/frame/FrameSearchFlag.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XDISPATCHPROVIDERINTERCEPTION_HPP_
+#include <com/sun/star/frame/XDispatchProviderInterception.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_FEATURESTATEEVENT_HPP_
+#include <com/sun/star/frame/FeatureStateEvent.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_DISPATCHDESCRIPTOR_HPP_
+#include <com/sun/star/frame/DispatchDescriptor.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XCONTROLLER_HPP_
+#include <com/sun/star/frame/XController.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XFRAMEACTIONLISTENER_HPP_
+#include <com/sun/star/frame/XFrameActionListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XCOMPONENTLOADER_HPP_
+#include <com/sun/star/frame/XComponentLoader.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XFRAME_HPP_
+#include <com/sun/star/frame/XFrame.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_FRAMEACTIONEVENT_HPP_
+#include <com/sun/star/frame/FrameActionEvent.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_FRAMEACTION_HPP_
+#include <com/sun/star/frame/FrameAction.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XFRAMELOADER_HPP_
+#include <com/sun/star/frame/XFrameLoader.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XLOADEVENTLISTENER_HPP_
+#include <com/sun/star/frame/XLoadEventListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XFILTERDETECT_HPP_
+#include <com/sun/star/frame/XFilterDetect.hpp>
+#endif
+#ifndef _COM_SUN_STAR_PLUGIN_PLUGINMODE_HPP_
+#include <com/sun/star/plugin/PluginMode.hpp>
+#endif
+#ifndef _COM_SUN_STAR_PLUGIN_PLUGINDESCRIPTION_HPP_
+#include <com/sun/star/plugin/PluginDescription.hpp>
+#endif
+#ifndef _COM_SUN_STAR_PLUGIN_PLUGINEXCEPTION_HPP_
+#include <com/sun/star/plugin/PluginException.hpp>
+#endif
+#ifndef _COM_SUN_STAR_PLUGIN_PLUGINVARIABLE_HPP_
+#include <com/sun/star/plugin/PluginVariable.hpp>
+#endif
+#ifndef _COM_SUN_STAR_PLUGIN_XPLUGIN_HPP_
+#include <com/sun/star/plugin/XPlugin.hpp>
+#endif
+#ifndef _COM_SUN_STAR_PLUGIN_XPLUGINMANAGER_HPP_
+#include <com/sun/star/plugin/XPluginManager.hpp>
+#endif
+#ifndef _COM_SUN_STAR_PLUGIN_XPLUGINCONTEXT_HPP_
+#include <com/sun/star/plugin/XPluginContext.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LOADER_XIMPLEMENTATIONLOADER_HPP_
+#include <com/sun/star/loader/XImplementationLoader.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LOADER_CANNOTACTIVATEFACTORYEXCEPTION_HPP_
+#include <com/sun/star/loader/CannotActivateFactoryException.hpp>
+#endif
+#ifndef _UNOTOOLS_PROCESSFACTORY_HXX
+#include <unotools/processfactory.hxx>
+#endif
+
+#ifndef _COM_SUN_STAR_CHAOS_DOCUMENTHEADERFIELD_HPP_
+#include <com/sun/star/chaos/DocumentHeaderField.hpp>
+#endif
+
+#include <sal/types.h>
+#include <com/sun/star/uno/Reference.h>
+#include <com/sun/star/ucb/XContent.hpp>
+#include <rtl/ustring.hxx>
+#include <vos/process.hxx>
+
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::ucb;
+using namespace ::com::sun::star::chaos;
+using namespace ::rtl;
+using namespace ::vos;
+
+#ifndef _SV_SOUND_HXX
+#include <vcl/sound.hxx>
+#endif
+#ifndef _SV_SYSTEM_HXX
+#include <vcl/system.hxx>
+#endif
+#ifndef _SVTOOLS_CTYPEITM_HXX
+#include <svtools/ctypeitm.hxx>
+#endif
+#ifndef _SFXECODE_HXX
+#include <svtools/sfxecode.hxx>
+#endif
+
+#include "inimgr.hxx"
+#include "app.hxx"
+#include "fltdlg.hxx"
+#include "sfxhelp.hxx"
+#include "sfxbasic.hxx"
+#include "docfilt.hxx"
+#include "docfac.hxx"
+#include "sfxtypes.hxx"
+#include "sfxuno.hxx"
+#include "docfile.hxx"
+#include "progress.hxx"
+#include "loadenv.hxx"
+#include "iodlg.hxx"
+#include "openflag.hxx"
+#include "bastyp.hrc"
+#include "sfxresid.hxx"
+#include "doctempl.hxx"
+#include "frame.hxx"
+#include "dispatch.hxx"
+#include "urlframe.hxx"
+#include "picklist.hxx"
+#include "topfrm.hxx"
+#include "plugwin.hxx"
+#include "helper.hxx"
+
+// wg. EXPLORER_BROWSER
+#include "request.hxx"
+#include "nfltdlg.hxx"
+#include "arrdecl.hxx"
+#include "appdata.hxx"
+#include "appuno.hxx"
+#include "viewfrm.hxx"
+#include "ucbhelp.hxx"
+
+#define SFX_STR_OVERRIDE "Override"
+
+#ifndef ERRCODE_SFX_RESTART
+#define ERRCODE_SFX_RESTART 0
+#endif
+
+#define EXPLORER_URL_FILTER "explorer"
+#define SFX_FILTERNAME_COMPONENT "component"
+#define SFX_FILTERNAME_HELPENTRY "helpentry"
+
+class SfxSound_Impl
+{
+ Sound* pSound;
+ String aSoundFile;
+ sal_Bool bDeleteFile;
+ DECL_LINK( Done, void* );
+ DECL_LINK( Start, void* );
+
+public:
+ SfxSound_Impl( const String& rSound, sal_Bool bTemp );
+ ~SfxSound_Impl()
+ { delete pSound; }
+};
+
+SfxSound_Impl::SfxSound_Impl( const String& rSound, sal_Bool bTemp )
+ : aSoundFile( rSound )
+ , pSound( new Sound )
+ , bDeleteFile( bTemp )
+{
+ Application::PostUserEvent( LINK( this, SfxSound_Impl, Start ) );
+}
+
+IMPL_LINK( SfxSound_Impl, Start, void*, pVoid )
+{
+ INetURLObject aObj;
+ aObj.SetSmartProtocol( INET_PROT_FILE );
+ aObj.SetSmartURL( aSoundFile );
+ if ( pSound->SetSoundName( aObj.PathToFileName() ) )
+ {
+ pSound->SetNotifyHdl( LINK( this, SfxSound_Impl, Done ) );
+ pSound->Play();
+ }
+ else
+ delete this;
+ if ( bDeleteFile )
+ SfxContentHelper::Kill( aObj.GetMainURL() );
+ return 0L;
+}
+
+IMPL_LINK( SfxSound_Impl, Done, void*, pVoid )
+{
+ if ( !pSound->IsPlaying() || pSound->GetLastError() )
+ delete this;
+ return 0L;
+}
+
+class SfxAsyncChaosFactory_Impl : public SfxListener
+{
+//(dv) CntAnchorRef xAnchor;
+ SfxItemSet* pArgs;
+
+public:
+ SfxAsyncChaosFactory_Impl( /*(dv)CntAnchorRef& rAnchor,*/ SfxItemSet* pSet );
+ ~SfxAsyncChaosFactory_Impl();
+ virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
+};
+
+
+SfxAsyncChaosFactory_Impl::SfxAsyncChaosFactory_Impl( /*(dv)CntAnchorRef& rAnchor, */SfxItemSet* pSet )
+ : /*(dv)xAnchor( &rAnchor )
+ , */ pArgs( pSet )
+{
+ if (!pArgs)
+ pArgs = new SfxAllItemSet( SFX_APP()->GetPool() );
+//(dv) StartListening( *xAnchor );
+}
+
+SfxAsyncChaosFactory_Impl::~SfxAsyncChaosFactory_Impl()
+{
+//(dv) EndListening( *xAnchor );
+ delete pArgs;
+}
+
+void SfxAsyncChaosFactory_Impl::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
+{
+#if 0 //(dv)
+ if( rHint.ISA(CntStatusHint) )
+ {
+ const CntStatusHint& rStatusHint = (const CntStatusHint&)rHint;
+ CntStatus eStatus = rStatusHint.GetStatus();
+ sal_uInt16 nWhich = rStatusHint.GetRequest() ? rStatusHint.GetRequest()->Which() : 0;
+ if ( nWhich == WID_INSERT )
+ {
+ if( eStatus == CNT_STATUS_DONE )
+ {
+ pArgs->Put( SfxStringItem ( SID_FILE_NAME, xAnchor->GetViewURL() ), SID_FILE_NAME );
+ SFX_APP()->GetDispatcher().Execute( SID_OPENDOC, SFX_CALLMODE_ASYNCHRON, *pArgs );
+ delete this;
+ }
+ else if( eStatus == CNT_STATUS_ERROR )
+ {
+ ErrCode nErr = rStatusHint.GetError();
+ nErr &= ~(ERRCODE_DYNAMIC_MASK);
+ if( nErr == ERRCODE_ABORT )
+ delete this;
+ }
+ }
+ }
+#endif //(dv)
+}
+
+struct FlagMapping_Impl
+{
+ const char* pName;
+ SfxFilterFlags nValue;
+};
+
+static const FlagMapping_Impl aMap[] =
+{
+ "Import", SFX_FILTER_IMPORT,
+ "Export", SFX_FILTER_EXPORT,
+ "Internal", SFX_FILTER_INTERNAL,
+ "Template", SFX_FILTER_TEMPLATE,
+ "TemplatePath", SFX_FILTER_TEMPLATEPATH,
+ "Own", SFX_FILTER_OWN,
+ "Alien", SFX_FILTER_ALIEN,
+ "Asynchron", SFX_FILTER_ASYNC,
+ "Readonly", SFX_FILTER_OPENREADONLY,
+ "UsesOptions", SFX_FILTER_USESOPTIONS,
+ "NotInstalled", SFX_FILTER_MUSTINSTALL,
+ "ConsultService", SFX_FILTER_CONSULTSERVICE,
+ "NotInChooser", SFX_FILTER_NOTINCHOOSER,
+ "NotInFileDialog", SFX_FILTER_NOTINFILEDLG,
+ "Packed", SFX_FILTER_PACKED,
+ "SilentExport", SFX_FILTER_SILENTEXPORT,
+ "Prefered", SFX_FILTER_PREFERED,
+ "BrowserPrefered", SFX_FILTER_BROWSERPREFERED,
+ 0, 0
+};
+
+SfxFilterFlags NameToFlag_Impl( const String& aName )
+/* [Beschreibung]
+
+ Konvertiert einen Namen aus der Install.ini in das zug. SFX_FILTER_FLAG
+
+ */
+
+{
+ sal_uInt16 n = 0;
+ for( const char* pc = aMap[0].pName; pc;
+ pc = aMap[++n].pName)
+ if( aName.EqualsAscii(pc) )
+ return aMap[n].nValue;
+ DBG_ERROR("Name nicht gefunden" );
+ return 0;
+}
+
+String FlagsToName_Impl( SfxFilterFlags nValue )
+/* [Beschreibung]
+
+ Konvertiert ein SFX_FILTER_FLAG in einen Text, der in die Install.ini
+ geschrieben werden kann
+ */
+{
+ ByteString aRet;
+ sal_uInt16 n = 0;
+ for( const char* pc = aMap[0].pName; pc;
+ pc = aMap[++n].pName)
+ if( nValue & aMap[n].nValue )
+ {
+ if( !aRet.Len() )
+ aRet = pc;
+ else
+ {
+ aRet+="|";
+ aRet+=pc;
+ }
+ }
+
+ return String(S2U(aRet));
+}
+
+//----------------------------------------------------------------
+
+inline String ToUpper_Impl( const String &rStr )
+{
+ String aRet(rStr);
+ Application::GetAppInternational().ToUpper(aRet);
+ return aRet;
+}
+
+//----------------------------------------------------------------
+
+struct LoadArg_Impl
+{
+ String aGroup;
+ sal_Bool bInstallIni;
+ SfxFilterFlags nOrFlags;
+ SfxFilterFlags nNotFlags;
+};
+
+class SfxFilterContainer_Impl
+{
+public:
+ SfxFilterContainer_Impl() : bLoadPending( sal_False ), pArg( 0 ) {}
+ SfxFilterList_Impl aList;
+ String aName;
+ LoadArg_Impl* pArg;
+ sal_Bool bLoadPending;
+ SfxFilterContainerFlags eFlags;
+};
+
+
+//----------------------------------------------------------------
+
+SfxFilterContainer::SfxFilterContainer( const String& rName )
+{
+ pImpl = new SfxFilterContainer_Impl;
+ pImpl->eFlags = 0;
+ pImpl->aName = rName;
+}
+
+//----------------------------------------------------------------
+
+SfxFilterContainer::~SfxFilterContainer()
+{
+ DELETEZ( pImpl->pArg );
+ SfxFilterList_Impl& rList = pImpl->aList;
+ sal_uInt16 nCount = (sal_uInt16 )rList.Count();
+ for( sal_uInt16 n = 0; n<nCount; n++ )
+ delete rList.GetObject( n );
+ delete pImpl;
+}
+
+SfxFilterContainerFlags SfxFilterContainer::GetFlags() const
+{
+ return pImpl->eFlags;
+}
+
+void SfxFilterContainer::SetFlags( SfxFilterContainerFlags eFlags )
+{
+ pImpl->eFlags = eFlags;
+}
+
+//----------------------------------------------------------------
+
+const SfxFilter* SfxFilterContainer::GetFilter4Protocol(
+ SfxMedium& rMed, SfxFilterFlags nMust, SfxFilterFlags nDont ) const
+/* [Beschreibung]
+
+ Gibt den Filter zu einem bestimmten Protokoll zurueck. Diese Methode
+ darf sich nicht auf Inhalte beziehen, sondern soll allein anhand von
+ Protokoll / ::com::sun::star::util::URL einen Filter auswaehlen.
+ In der Basisimplementierung werden einige Protokolle direkt auf
+ GetFilter4FilterName abgebildet, man zur Integration des Filters
+ in die Filterdetection einfach einen Filter des Protokollnames anlegen
+ kann.
+ */
+{
+ const INetURLObject& rObj = rMed.GetURLObject();
+ String aName = rMed.GetURLObject().GetMainURL();
+ // Hier noch pruefen, ob das Doc im Browser dargestellt werden soll
+ SFX_ITEMSET_ARG( rMed.GetItemSet(), pTargetItem, SfxStringItem,
+ SID_TARGETNAME, sal_False);
+ if( pTargetItem && pTargetItem->GetValue().EqualsAscii("_beamer") )
+ return 0;
+ return GetFilter4Protocol( aName, nMust, nDont );
+}
+
+const SfxFilter* SfxFilterContainer::GetFilter4Protocol( const String& rName, SfxFilterFlags nMust, SfxFilterFlags nDont ) const
+{
+ String aName( rName );
+ ForceFilterLoad_Impl();
+ aName.ToLowerAscii();
+ sal_uInt16 nCount = ( sal_uInt16 ) pImpl->aList.Count();
+ for( sal_uInt16 n = 0; n < nCount; n++ )
+ {
+ const SfxFilter* pFilter = pImpl->aList.GetObject( n );
+ SfxFilterFlags nFlags = pFilter->GetFilterFlags();
+ String aString( pFilter->GetURLPattern());
+ if ( (nFlags & nMust) == nMust && !(nFlags & nDont ) &&
+ WildCard(aString ).Matches( aName ) )
+ return pFilter;
+ }
+ return 0;
+}
+
+//----------------------------------------------------------------
+
+sal_Bool SfxFilterContainer::IsUsableForRedirects() const
+/* [Beschreibung]
+
+ Alle FilterContainer, die hier stehen, werden fuer den InternetFileTypen
+ Dialog benutzt (koennen dort MIME Types usw. zugeordnet werden).
+ */
+{
+ String aName = pImpl->aName;
+ // Bloed, aber erstmal notwendig. Spaeter ueber MussAenderung beim
+ // Impl Makro
+ return aName.EqualsAscii("swriter") || aName.EqualsAscii("simpress") || aName.EqualsAscii("scalc") ||
+ aName.EqualsAscii("simage") || aName.EqualsAscii("schart") || aName.EqualsAscii("smath") ||
+ aName.EqualsAscii("PlugIn") || aName.EqualsAscii("swriter/web") || aName.EqualsAscii("sdraw") ||
+ aName.EqualsAscii(SFX_FCONTNR_EXTAPP) ||
+// aName == String( SfxResId( STR_FILTER_OTHERS ) );
+ aName.EqualsAscii("soffice");
+}
+
+//----------------------------------------------------------------
+
+sal_uInt32 SfxFilterContainer::Execute( SfxMedium& rMedium, SfxFrame*& pFrame) const
+{
+ return ERRCODE_ABORT;
+}
+
+//----------------------------------------------------------------
+
+sal_uInt16 SfxFilterContainer::GetFilterCount() const
+{
+ // Dazu muessen die Filter geladen werden
+ ForceFilterLoad_Impl();
+ return (sal_uInt16) pImpl->aList.Count();
+}
+
+//----------------------------------------------------------------
+
+const SfxFilter* SfxFilterContainer::GetFilter( sal_uInt16 nPos ) const
+{
+ ForceFilterLoad_Impl();
+ return pImpl->aList.GetObject( nPos );
+}
+
+IMPL_STATIC_LINK( SfxFilterContainer, LoadHdl_Impl, void*, EMPTYARG )
+/* [Beschreibung]
+
+ Handler, der ueber LateInit das echte Laden des
+ SfxFilterContainers aus;loesst. */
+{
+ if( pThis->pImpl->bLoadPending )
+ {
+ pThis->pImpl->bLoadPending = sal_False;
+ pThis->RealLoad_Impl();
+ }
+ return 0;
+}
+
+//----------------------------------------------------------------
+
+void SfxFilterContainer::RealLoad_Impl()
+/* [Beschreibung]
+
+ Eigentliches Laden der Filter eines Containers aus der install.ini
+ */
+
+{
+ static sal_Bool bRecurse = sal_False;
+
+ LoadArg_Impl* pArg = pImpl->pArg;
+ String aString( pArg->aGroup);
+ aString+=DEFINE_CONST_UNICODE("-Filters");
+ if( pArg->bInstallIni )
+ {
+ if( !bRecurse )
+ {
+ bRecurse = sal_True;
+ sal_uInt32 nCount = pImpl->aList.Count();
+ RealLoad_Impl();
+ bRecurse = sal_False;
+ // Falls wir keine lokalisierten Filter gefunden haben, nehmen wir
+ // die alten
+ if( pImpl->aList.Count() != nCount )
+ {
+// DELETEZ( pImpl->pArg );
+ return;
+ }
+ }
+ else
+ {
+ aString += '-';
+ aString += String::CreateFromAscii(ResMgr::GetLang());
+ }
+ }
+ Config* pConfig = SFX_APP()->GetFilterIni();
+ SfxIniManager *pMgr = SFX_INIMANAGER();
+ SfxIniManager *pSubMgr = pMgr->GetSubManager();
+ if( pSubMgr )
+ pMgr = pSubMgr;
+
+ if( pArg->bInstallIni )
+ pConfig->SetGroup( U2S(aString) );
+
+ sal_uInt16 nCount = pArg->bInstallIni ? pConfig->GetKeyCount() : pMgr->GetKeyCount( aString );
+ String aOver( DEFINE_CONST_UNICODE(SFX_STR_OVERRIDE) );
+ String aName, aLine, aUIType, aMimeType, aClipFormat, aMacType, aTypeName, aWild, aFlags, aDefaultTemplate, aUserData;
+ for( sal_uInt16 n = 0; n < nCount; n++ )
+ {
+ aName = pArg->bInstallIni ? String(S2U(pConfig->GetKeyName( n ))) : pMgr->GetKeyName( aString, n );
+ aLine = pArg->bInstallIni ? String(S2U(pConfig->ReadKey( n ))) : pMgr->ReadKey( aString, aName );
+ sal_uInt16 nTokCount = aLine.GetTokenCount( ',' );
+ if( nTokCount < 8 )
+ {
+#ifdef DBG_UTIL
+ ByteString aMsg( "Falsches FilterFormat: " );
+ aMsg += U2S(aLine).getStr();
+ DBG_ERRORFILE( aMsg.GetBuffer() );
+#endif
+ continue;
+ }
+
+#ifdef DBG_UTIL
+ if( nTokCount < 10 )
+ {
+ ByteString aMsg( "Obsoletes FilterFormat: " );
+ aMsg += U2S(aLine).getStr();
+ DBG_ERRORFILE( aMsg.GetBuffer() );
+ }
+ static bWarned = sal_False;
+ if( nTokCount > 11 && !bWarned )
+ {
+ bWarned = sal_True;
+ ByteString aMsg( "Neueres FilterFormat: " );
+ aMsg += U2S(aLine).getStr();
+ DBG_ERRORFILE( aMsg.GetBuffer() );
+ }
+#endif
+ // Override-Filter haben keinen Namen
+ if( aName.Match( aOver ) >= aOver.Len() )
+ aName.Erase();
+
+ sal_uInt16 i = 0;
+ if( nTokCount >= 10 )
+ aUIType = aLine.GetToken( i++, ',' );
+ else
+ aUIType = aName;
+
+ aMimeType = aLine.GetToken( i++, ',' );
+ aClipFormat = aLine.GetToken( i++, ',' );
+ aMacType = aLine.GetToken( i++, ',' );
+ aTypeName = aLine.GetToken( i++, ',' );
+ aWild = aLine.GetToken( i++, ',' );
+ sal_uInt16 nDocIconId = aLine.GetToken( i++, ',' ).ToInt32();
+ aUserData = aLine.GetToken( i++, ',' );
+ sal_uInt32 nVersion = SOFFICE_FILEFORMAT_NOW;
+ if( nTokCount >= 8 )
+ nVersion = aLine.GetToken( i++, ',' ).ToInt32();
+ aFlags = aLine.GetToken( i++, ',' );
+ if( nTokCount >= 11 )
+ aDefaultTemplate = aLine.GetToken( i++, ',' );
+ else aDefaultTemplate.Erase();
+ SfxFilterFlags nFlags = pArg->nOrFlags;
+ nTokCount = aFlags.GetTokenCount('|');
+ for( i = 0; i < nTokCount; i++ )
+ {
+ String aTok = aFlags.GetToken( i, '|' );
+ nFlags |= NameToFlag_Impl( aTok );
+ }
+
+ nFlags &= ~pArg->nNotFlags;
+ sal_uInt32 nClipId = 0;
+ if( aClipFormat.Len() )
+ nClipId = Exchange::RegisterFormatName( aClipFormat );
+ SfxFilter* pFilter = new SfxFilter(
+ aName, aWild, nFlags, nClipId, aMacType, aTypeName, nDocIconId,
+ aMimeType, this, aUserData );
+ pFilter->SetUIName( aUIType );
+ pFilter->SetDefaultTemplate( aDefaultTemplate );
+ if( nVersion )
+ pFilter->SetVersion( nVersion );
+ AddFilter( pFilter, GetFilterCount() );
+ }
+// if( !bRecurse ) DELETEZ( pImpl->pArg );
+}
+
+//----------------------------------------------------------------
+
+void SfxFilterContainer::ForceFilterLoad_Impl() const
+/* [Beschreibung]
+
+ Erzwingt das echte Laden der Filter vor Eintritt des Lateinits
+ */
+{
+ if( pImpl->bLoadPending )
+ {
+ ((SfxFilterContainer*)this)->LoadHdl_Impl(
+ (SfxFilterContainer*)this ,0 );
+ }
+}
+
+//----------------------------------------------------------------
+/* [Beschreibung]
+
+ Da die meisten GetFilter4xxx Routinen in einem Container einfach eine
+ Abfrage ueber alle enthaltenen Filter durchlaufen, sind diese in
+ einem Makro kodiert.
+
+ nMust sind die Flags, die gesetzt sein muessen, damit der Filter
+ in Betracht gezogen wird, nDont duerfen nicht gesetzt sein.
+ */
+
+#define IMPL_CONTAINER_LOOP( aMethod, aArgType, aTest ) \
+const SfxFilter* SfxFilterContainer::aMethod( \
+ aArgType aArg, SfxFilterFlags nMust, SfxFilterFlags nDont ) const \
+{ \
+ ForceFilterLoad_Impl(); \
+ sal_uInt16 nCount = ( sal_uInt16 ) pImpl->aList.Count(); \
+ for( sal_uInt16 n = 0; n < nCount; n++ ) \
+ { \
+ const SfxFilter* pFilter = pImpl->aList.GetObject( n ); \
+ SfxFilterFlags nFlags = pFilter->GetFilterFlags(); \
+ if ( (nFlags & nMust) == nMust && \
+ !(nFlags & nDont ) && aTest ) \
+ return pFilter; \
+ } \
+ return 0; \
+}
+
+/* [Beschreibung]
+
+ Ermitelt einen Filter nach seinem Namen. Dieser enthaelt vorangestellt
+ den Namen des Containers, falls er nicht im DefaultContainer steckt.
+ */
+
+IMPL_CONTAINER_LOOP( GetFilter, const String&,
+ pFilter->GetName().CompareIgnoreCaseToAscii( aArg ) == COMPARE_EQUAL )
+
+/* [Beschreibung]
+ Ermitelt einen Filter nach seinem Mimetypen.
+ */
+IMPL_CONTAINER_LOOP(
+ GetFilter4Mime, const String&,
+ pFilter->GetMimeType().CompareIgnoreCaseToAscii( aArg ) == COMPARE_EQUAL )
+
+/* [Beschreibung]
+ Ermitelt einen Filter nach seinem FilterNamen. Dies ist der Name ohne
+ vorangestellten Containernamen.
+ */
+IMPL_CONTAINER_LOOP(
+ GetFilter4FilterName, const String&,
+ pFilter->GetFilterName().CompareIgnoreCaseToAscii(aArg ) == COMPARE_EQUAL )
+
+/* [Beschreibung]
+ Ermitelt einen Filter nach seiner ClipboardID. Diese steckt im Storage.
+ */
+IMPL_CONTAINER_LOOP(
+ GetFilter4ClipBoardId, sal_uInt32, aArg && pFilter->GetFormat() == aArg )
+
+#ifdef MAC
+#define CONDITION \
+ String( aArg ).Erase( 5 ) == String( pFilter->GetTypeName() ).Erase( 5 )
+#else
+#define CONDITION \
+ aArg == pFilter->GetTypeName()
+#endif
+/* [Beschreibung]
+ Ermitelt einen Filter nach seinen Extended Attributes.
+ Nur auf MAC und OS/2 von Interesse.
+ */
+IMPL_CONTAINER_LOOP(
+ GetFilter4EA, const String&, CONDITION )
+#undef CONDITION
+
+/* [Beschreibung]
+ Ermitelt einen Filter nach seiner Extension.
+ (2Ah = '*')
+ */
+IMPL_CONTAINER_LOOP(
+ GetFilter4Extension, const String&,
+ pFilter->GetWildcard() != String() && pFilter->GetWildcard() != DEFINE_CONST_UNICODE("*.*") && pFilter->GetWildcard() != 0x002A &&
+ WildCard( ToUpper_Impl( pFilter->GetWildcard()() ), ';' ) == ToUpper_Impl( aArg ))
+
+IMPL_CONTAINER_LOOP(
+ GetFilter4UIName, const String&,
+ pFilter->GetUIName() == aArg )
+
+//----------------------------------------------------------------
+
+const String SfxFilterContainer::GetName() const
+{
+ return pImpl->aName;
+}
+
+//----------------------------------------------------------------
+
+void SfxFilterContainer::DeleteFilter( const SfxFilter* pFilter )
+/* [Beschreibung]
+
+ Loescht einen Filter aus seinem Container und den Filter selbst.
+ */
+{
+ ForceFilterLoad_Impl();
+ pImpl->aList.Remove( (SfxFilter*)pFilter );
+ delete (SfxFilter*)pFilter;
+}
+
+//----------------------------------------------------------------
+
+void SfxFilterContainer::AddFilter( SfxFilter* pFilter, sal_uInt16 nPos )
+{
+/* [Beschreibung]
+
+ Fuegt einen Filter in einen Container ein.
+ */
+ ForceFilterLoad_Impl();
+ if ( pImpl->pArg )
+ {
+ pFilter->nFormatType |= pImpl->pArg->nOrFlags;
+ pFilter->nFormatType &= ~pImpl->pArg->nNotFlags;
+ }
+
+ if ( !pFilter->GetFilterName().Len() ||
+ !GetFilter4FilterName( pFilter->GetFilterName() ))
+ pImpl->aList.Insert( pFilter, nPos );
+#if !defined(PRODUCT)
+ else
+ delete pFilter;
+#endif
+}
+
+//----------------------------------------------------------------
+
+void SfxFilterContainer::LoadFilters(
+ const String& rGroup, // ConfigGruppe, aus der gelesen werden soll
+ sal_Bool bInstallIni, // Falls sal_True aus install.ini lesen,
+ // sonst soffice3.ini
+ SfxFilterFlags nOrFlags, // Flags zusaetzlich zu denen in der Ini
+ SfxFilterFlags nNotFlags ) // Flags, die nicht aus der ini genommen werden
+/* [Beschreibung]
+
+ Stoesst das Laden eines FilterContainers an. Das eigentliche
+ Laden erfolgt im LateInitHandler bzw. in ForceFilterLoad_Impl,
+ falls vor LateInit auf den FilterContainer zugegriffen wird. */
+{
+ LoadArg_Impl* pArg = new LoadArg_Impl;
+ pArg->aGroup = rGroup;
+ pArg->bInstallIni = bInstallIni;
+ pArg->nOrFlags = nOrFlags;
+ pArg->nNotFlags = nNotFlags;
+ pImpl->pArg = pArg;
+ SFX_APP()->InsertLateInitHdl( STATIC_LINK(
+ this, SfxFilterContainer, LoadHdl_Impl ) );
+ pImpl->bLoadPending = sal_True;
+}
+
+//----------------------------------------------------------------
+
+void SfxFilterContainer::SaveFilters( const String& rGroup, SfxFilterFlags nMask ) const
+/* [Beschreibung]
+
+ Speichert die Filter des Containers in der soffice3.ini.
+ */
+{
+ String aString( rGroup);
+ aString+=DEFINE_CONST_UNICODE("-Filters");
+ SfxIniManager *pMgr = SFX_INIMANAGER();
+ SfxIniManager *pSubMgr = pMgr->GetSubManager();
+ if( pSubMgr )
+ pMgr = pSubMgr;
+
+ pMgr->DeleteGroup( aString );
+
+ SfxFilterMatcher aMatcher( ( SfxFilterContainer* ) this );
+ SfxFilterMatcherIter aIter( &aMatcher, nMask );
+ sal_uInt16 n = 1;
+ String aLine, aKey;
+ for( const SfxFilter* pFilter = aIter.First(); pFilter; pFilter = aIter.Next() )
+ {
+ if ( pFilter->GetURLPattern().Len() )
+ // Filter mit URLPattern k"onnen wir nicht einlesen, also auch nicht speichern!
+ continue;
+
+ aLine = pFilter->GetUIName();
+ aLine += ',';
+ aLine += pFilter->GetMimeType();
+ aLine+=',';
+ sal_uInt32 nFormat = pFilter->GetFormat();
+ if( nFormat )
+ aLine += Exchange::GetFormatName( pFilter->GetFormat() );
+ aLine += ',';
+ aLine += pFilter->GetMacType();
+ aLine+=',';
+ aLine += pFilter->GetRealTypeName();
+ aLine+=',';
+ aLine += pFilter->GetWildcard()();
+ aLine+=',';
+ aLine += String::CreateFromInt32( pFilter->GetDocIconId() );
+ aLine+=',';
+ aLine += pFilter->GetUserData();
+ aLine+=',';
+ if( pFilter->GetVersion() != SOFFICE_FILEFORMAT_NOW )
+ aLine += String::CreateFromInt32( pFilter->GetVersion() );
+ aLine += ',';
+ aLine += FlagsToName_Impl( pFilter->GetFilterFlags() );
+ aLine += ',';
+ aLine += pFilter->GetDefaultTemplate();
+ aKey = pFilter->GetFilterName();
+ if ( !aKey.Len() )
+ aKey = DEFINE_CONST_UNICODE( SFX_STR_OVERRIDE );
+ aKey += String::CreateFromInt32( n++ );
+ pMgr->WriteKey( aString, aKey, aLine );
+ }
+}
+
+//-------------------------------------------------------------------------
+
+sal_uInt32 SfxFilterContainer::GetFilter4Content(
+ SfxMedium& rMedium, const SfxFilter** ppFilter,
+ SfxFilterFlags, SfxFilterFlags ) const
+{
+ return 0;
+}
+
+//-------------------------------------------------------------------------
+
+const SfxFilter* SfxExternalAppFilterContainer::GetFilter4Protocol(
+ SfxMedium& rMed, SfxFilterFlags nMust, SfxFilterFlags nDont ) const
+/* [Beschreibung]
+
+ Diese Methode ist ueberladen, um zu verhindern, dass fuer jedes Protokoll
+ ein Filter erzeugt wird (denn in dem SfxExternalAppFilterContainer ist
+ jeder Filter vorhanden, so wie nach ihm gefragt wird und
+ GetFilter4Protocol forwarded in der Basisimplementierung an
+ GetFilter4FilterName ).
+ */
+{
+ return 0;
+}
+
+//----------------------------------------------------------------
+
+sal_uInt32 SfxExecutableFilterContainer::Choose_Impl( SfxMedium& rMedium ) const
+{
+ SfxFilterMatcher& rMatcher = SFX_APP()->GetFilterMatcher();
+ SfxFilterDialog *pDlg =
+ new SfxFilterDialog(
+ 0, &rMedium, rMatcher, 0, 0 );
+ const sal_Bool bOk = RET_OK == pDlg->Execute();
+ if (bOk)
+ {
+ const SfxFilter* pFilter = rMatcher.GetFilter4UIName(
+ pDlg->GetSelectEntry() );
+ delete pDlg;
+ rMedium.SetFilter( pFilter );
+ return ERRCODE_NONE;
+ }
+ delete pDlg;
+ return ERRCODE_ABORT;
+}
+
+SV_DECL_VARARR( SfxExecutableFilterTypes_Impl, SfxExecutableFilterType_Impl,
+ 5, 5 )
+SV_IMPL_VARARR( SfxExecutableFilterTypes_Impl, SfxExecutableFilterType_Impl )
+
+
+void SfxExecutableFilterContainer::AddExeFilter(
+ SfxFilter* pFilter, SfxExecutableFilterType_Impl eType,
+ const String& rPattern )
+{
+ AddFilter( pFilter, GetFilterCount() );
+ pTypes->Insert( eType, pTypes->Count() );
+ if( rPattern.Len() )
+ pFilter->SetURLPattern( rPattern );
+}
+
+
+#define SFX_EXE_FILTERFLAGS (SFX_FILTER_IMPORT | SFX_FILTER_NOTINFILEDLG |\
+ SFX_FILTER_EXECUTABLE|SFX_FILTER_NOTINCHOOSER|SFX_FILTER_INTERNAL)
+
+//----------------------------------------------------------------
+
+SfxExecutableFilterContainer::SfxExecutableFilterContainer()
+// : SfxFilterContainer( String( SfxResId( STR_FILTER_OTHERS ) ) )
+ : SfxFilterContainer( DEFINE_CONST_UNICODE("soffice") )
+/* [Beschreibung]
+
+ Der SfxExecutableFilterContainer enthaelt alle Filter, die
+ nicht direkt zum Laden eines Dokumentes fuehren, sondern
+ statt dessen ausgefuehrt werden. Indirekt koennen durchaus
+ Docs geladen werden, wenn z.B. der bugdoc Filter ein
+ Dokument raussucht.
+ */
+{
+ pTypes = new SfxExecutableFilterTypes_Impl;
+ String aEmpty;
+ sal_uInt16 nPos = 0;
+
+// Was ist denn hiermit ??
+#ifdef SOLAR_JAVA
+ AddExeFilter( new SfxFilter( "JavaApplication", DEFINE_CONST_UNICODE("*.class"), SFX_EXE_FILTERFLAGS | SFX_FILTER_ASYNC, this ),
+ SFX_EXE_FILTER_COMPONENT, DEFINE_CONST_UNICODE("private:java/*") );
+#endif
+/*
+ AddExeFilter( new SfxFilter( DEFINE_CONST_UNICODE("ExternBrowser"), DEFINE_CONST_UNICODE("*.htm;*.html"), SFX_EXE_FILTERFLAGS | SFX_FILTER_ASYNC, 0,
+ aEmpty, aEmpty, 0, DEFINE_CONST_UNICODE("text/html"),this, aEmpty ),
+ SFX_EXE_FILTER_EXTERNBROWSER, aEmpty );
+*/
+ AddExeFilter( new SfxFilter( "bookmark", DEFINE_CONST_UNICODE("*.*"), SFX_EXE_FILTERFLAGS, this ),
+ SFX_EXE_FILTER_BOOKMARK, aEmpty );
+ AddExeFilter( new SfxFilter( "link", DEFINE_CONST_UNICODE("*.lnk"), SFX_EXE_FILTERFLAGS, this ),
+ SFX_EXE_FILTER_BOOKMARK, aEmpty );
+ AddExeFilter( new SfxFilter( SFX_FILTERNAME_HELPENTRY, DEFINE_CONST_UNICODE("*.svh"), SFX_EXE_FILTERFLAGS, this ),
+ SFX_EXE_FILTER_HELPENTRY, aEmpty );
+ AddExeFilter( new SfxFilter( "helpid", aEmpty, SFX_EXE_FILTERFLAGS, this ),
+ SFX_EXE_FILTER_HELPID, DEFINE_CONST_UNICODE("private:helpid/*") );
+ AddExeFilter( new SfxFilter( "bugid", aEmpty, SFX_EXE_FILTERFLAGS, this),
+ SFX_EXE_FILTER_BUGID, DEFINE_CONST_UNICODE("bugid:*") );
+ AddExeFilter( new SfxFilter( "mailto", aEmpty, SFX_EXE_FILTERFLAGS, this),
+ SFX_EXE_FILTER_MAILTO, DEFINE_CONST_UNICODE("mailto:*") );
+ AddExeFilter( new SfxFilter( "command", aEmpty, SFX_EXE_FILTERFLAGS, this),
+ SFX_EXE_FILTER_COMMAND, DEFINE_CONST_UNICODE("file:///{*}/*") );
+ AddExeFilter( new SfxFilter( "macro", aEmpty, SFX_EXE_FILTERFLAGS, this),
+ SFX_EXE_FILTER_MACRO, DEFINE_CONST_UNICODE("macro:*") );
+ AddExeFilter( new SfxFilter( "uno", aEmpty, SFX_EXE_FILTERFLAGS, this),
+ SFX_EXE_FILTER_UNO, DEFINE_CONST_UNICODE(".uno:*") );
+ AddExeFilter( new SfxFilter( "slot", aEmpty, SFX_EXE_FILTERFLAGS, this),
+ SFX_EXE_FILTER_SLOT, DEFINE_CONST_UNICODE("slot:*") );
+ AddExeFilter( new SfxFilter( "factory", aEmpty, SFX_EXE_FILTERFLAGS, this),
+ SFX_EXE_FILTER_FACTORY, DEFINE_CONST_UNICODE("private:factory/*") );
+ AddExeFilter( new SfxFilter( "bugdoc", aEmpty, SFX_EXE_FILTERFLAGS, this),
+ SFX_EXE_FILTER_BUGDOC, DEFINE_CONST_UNICODE("bugdoc:*") );
+ AddExeFilter( new SfxFilter( "exe", aEmpty, SFX_EXE_FILTERFLAGS, this),
+ SFX_EXE_FILTER_EXECUTE, DEFINE_CONST_UNICODE("internal") );
+ AddExeFilter( new SfxFilter( DEFINE_CONST_UNICODE(EXPLORER_URL_FILTER), aEmpty, SFX_EXE_FILTERFLAGS, 0, aEmpty, aEmpty, 0, aEmpty, this, aEmpty),
+ SFX_EXE_FILTER_EXPLORER, aEmpty );
+ AddExeFilter( new SfxFilter( "sound", DEFINE_CONST_UNICODE("*.wav;*.au"), SFX_EXE_FILTERFLAGS, this),
+ SFX_EXE_FILTER_SOUND, DEFINE_CONST_UNICODE("internal") );
+/*
+ AddExeFilter( new SfxFilter( SFX_FILTER_DOWNLOAD, DEFINE_CONST_UNICODE("*.*"), SFX_FILTER_IMPORT | SFX_FILTER_NOTINFILEDLG | SFX_FILTER_EXECUTABLE | SFX_FILTER_ASYNC, this),
+ SFX_EXE_FILTER_DOWNLOAD, aEmpty );
+*/
+ // Und nun die Filter, die auch im Dateitypendialog sichtbar sein sollen
+ SfxFilter *pFilter = new SfxFilter( DEFINE_CONST_UNICODE("choose"), DEFINE_CONST_UNICODE("*.*"),
+ SFX_FILTER_IMPORT | SFX_FILTER_NOTINFILEDLG | SFX_FILTER_EXECUTABLE| SFX_FILTER_NOTINCHOOSER, 0, aEmpty, aEmpty, 0, aEmpty, this, aEmpty);
+ pFilter->SetUIName( SfxResId( STR_FILTER_CHOOSER ) );
+ AddExeFilter( pFilter, SFX_EXE_FILTER_CHOOSER, aEmpty);
+
+ pFilter = new SfxFilter( "extern", DEFINE_CONST_UNICODE("*.*"), SFX_FILTER_IMPORT | SFX_FILTER_EXECUTABLE, this );
+ pFilter->SetUIName( SfxResId( STR_FILTER_EXTERNAL ) );
+ AddExeFilter( pFilter, SFX_EXE_FILTER_EXECUTE, DEFINE_CONST_UNICODE("external") );
+
+ pFilter = new SfxFilter( "component", DEFINE_CONST_UNICODE("*.*"), SFX_FILTER_IMPORT | SFX_FILTER_EXECUTABLE | SFX_FILTER_ASYNC, this );
+ pFilter->SetUIName( SfxResId( STR_FILTER_COMPONENT ) );
+ AddExeFilter( pFilter, SFX_EXE_FILTER_COMPONENT, aEmpty );
+}
+
+SfxExecutableFilterContainer::~SfxExecutableFilterContainer()
+{
+ delete pTypes;
+}
+
+sal_Bool SfxIsHelpEntryURL( const String &rURL, const String &rExtMask )
+{
+ INetURLObject aURL( rURL );
+ if ( aURL.GetProtocol() == INET_PROT_FILE && aURL.GetMainURL().Len() > 8 )
+ {
+ String aExt = aURL.getExtension().ToLowerAscii();
+ INetURLObject aHelpDir( SFX_INIMANAGER()->Get( SFX_KEY_HELP_DIR ), INET_PROT_FILE );
+ if ( WildCard( aHelpDir.GetMainURL() ).Matches( rURL ) && WildCard( rExtMask ).Matches( aExt ) )
+ return sal_True;
+ }
+ return sal_False;
+}
+
+const SfxFilter* SfxExecutableFilterContainer::GetFilter4Protocol(
+ SfxMedium& rMed, SfxFilterFlags nMust, SfxFilterFlags nDont ) const
+/* [Beschreibung]
+ */
+{
+ INetProtocol eProt;
+ String aName;
+ const INetURLObject &rURL = rMed.GetURLObject();
+ aName = rURL.GetMainURL();
+ eProt = rURL.GetProtocol();
+
+ // ::com::sun::star::util::URL within Help-Directory?
+ if ( eProt == INET_PROT_FILE && SfxIsHelpEntryURL( aName, DEFINE_CONST_UNICODE("htm*") ) )
+ return SfxFilterContainer::GetFilter4FilterName( DEFINE_CONST_UNICODE(SFX_FILTERNAME_HELPENTRY), nMust, nDont );
+
+ return SfxFilterContainer::GetFilter4Protocol( rMed, nMust, nDont );
+}
+
+const SfxFilter* SfxExecutableFilterContainer::CheckForFolder( SfxMedium& rMed, SfxFilterFlags nMust, SfxFilterFlags nDont )
+{
+ INetProtocol eProt;
+ String aName;
+ const INetURLObject &rURL = rMed.GetURLObject();
+ aName = rURL.GetMainURL();
+ eProt = rURL.GetProtocol();
+
+ Reference < XContent > xContent( rMed.GetContent() );
+ FASTBOOL bHandled = sal_False;
+ sal_Bool bTest = sal_True;
+
+ if ( INET_PROT_FTP == eProt && SvBinding::ShouldUseFtpProxy( aName ) )
+ bTest = sal_False;
+
+ if ( bTest )
+ {
+ if ( xContent.is() )
+ {
+ Any aAny( UCB_Helper::GetProperty( xContent, WID_FLAG_IS_FOLDER ) );
+ Any aNotherAny( UCB_Helper::GetProperty( xContent, WID_FLAG_IS_DOCUMENT ) );
+ sal_Bool bIsDocument = TRUE;
+ sal_Bool bIsFolder = FALSE;
+ aAny >>= bIsFolder;
+ aNotherAny >>= bIsDocument;
+ bHandled = bIsFolder && !bIsDocument;
+ }
+ }
+
+ return bHandled ? GetExplorerFilter() : NULL;
+}
+
+//----------------------------------------------------------------
+
+const SfxFilter* SfxExecutableFilterContainer::GetDownloadFilter()
+{
+ String aName( DEFINE_CONST_UNICODE(SFX_FILTER_DOWNLOAD) );
+ return SFX_APP()->GetFilterMatcher().GetFilter4FilterName( aName );
+}
+
+const SfxFilter* SfxExecutableFilterContainer::GetComponentFilter()
+{
+ String aName( DEFINE_CONST_UNICODE(SFX_FILTERNAME_COMPONENT) );
+ return SFX_APP()->GetFilterMatcher().GetContainer( DEFINE_CONST_UNICODE("soffice") )->GetFilter4FilterName( aName );
+}
+
+//----------------------------------------------------------------
+
+const SfxFilter* SfxExecutableFilterContainer::GetChooserFilter()
+{
+// String aName( SfxResId( STR_FILTER_OTHERS ) );
+ String aName( DEFINE_CONST_UNICODE("soffice") );
+ aName+=DEFINE_CONST_UNICODE(": ");
+ aName+=DEFINE_CONST_UNICODE("choose");
+// aName+=String( SfxResId( STR_FILTER_CHOOSER ) );
+ return SFX_APP()->GetFilterMatcher().GetFilter( aName );
+}
+
+const SfxFilter* SfxExecutableFilterContainer::GetExplorerFilter()
+{
+ String aName( DEFINE_CONST_UNICODE(EXPLORER_URL_FILTER) );
+ return SFX_APP()->GetFilterMatcher().GetFilter4FilterName( aName );
+}
+
+//----------------------------------------------------------------
+
+String SfxExecutableFilterContainer::GetBugdocName_Impl(
+ const String& rName ) const
+/* [Beschreibung]
+
+ Sucht ein Bugdoc in den ueblichen Verzeichnissen
+ */
+{
+/*! (pb)
+ static const char* pNames[] =
+ {
+ "q:\\sw\\bugdoc",
+ "q:\\sd\\bugdoc",
+ "q:\\sc\\bugdoc",
+ "q:\\sch\\bugdoc",
+ "q:\\solar\\bugdoc",
+ "q:\\bugdoc",
+ 0
+ };
+ sal_uInt32 nNumber = rName.ToInt32();
+ String aMatch = rName;
+ aMatch += '*';
+ sal_uInt16 n = 1;
+ const char* pName = pNames[ 0 ];
+ while( pName )
+ {
+ DirEntry aEntry( String::CreateFromAscii(pName) );
+ for( sal_uInt32 nBase = ( nNumber / 500 + 1 ) * 500;
+ nBase - nNumber < 5000; nBase+=500 )
+ {
+ DirEntry aAkt( aEntry );
+ String aBis( DEFINE_CONST_UNICODE("bis") );
+ aBis += String::CreateFromInt32( nBase );
+ aAkt += DirEntry( aBis );
+ if( aAkt.Exists() )
+ {
+ aAkt += DirEntry( aMatch );
+ Dir aDir( aAkt );
+ if( aDir.Count() )
+ return aDir[ 0 ].GetFull();
+ }
+ }
+ pName = pNames[ n++ ];
+ }
+*/
+ return String();
+}
+
+//----------------------------------------------------------------
+
+sal_uInt32 SfxExecutableFilterContainer::Execute(
+ SfxMedium& rMedium, SfxFrame*& rpFrame ) const
+/* [Beschreibung]
+
+ Fuehrt die Funktionalitaet eines mit SFX_FILTER_EXECUTABLE registrierten
+ Filters aus.
+ */
+{
+ SfxApplication* pApp = SFX_APP();
+ const SfxFilter* pFilter = rMedium.GetFilter();
+ DBG_ASSERT( pFilter, "Medium braucht Filter" );
+
+ // Referer und TargetPath zum Speichern
+ SfxStringItem aReferer( SID_REFERER, String() );
+ SfxStringItem aPath( SID_TARGETPATH, String() );
+
+ // Wurden welche mitgeschickt ?
+ SFX_ITEMSET_ARG(rMedium.GetItemSet(), pReferer, SfxStringItem, SID_REFERER, sal_False);
+ SFX_ITEMSET_ARG(rMedium.GetItemSet(), pPath, SfxStringItem, SID_TARGETPATH, sal_False);
+ if ( !pReferer )
+ pReferer = &aReferer;
+ if ( !pPath )
+ {
+ // Wenn kein TargetPath, dann diesen mit dem Referer belegen
+ if ( pReferer )
+ aPath.SetValue( pReferer->GetValue() );
+ rMedium.GetItemSet()->Put( aPath, SID_TARGETPATH );
+ pPath = &aPath;
+ }
+
+ SfxFrameItem aFrameItem( SID_DOCFRAME, rpFrame );
+ SFX_ITEMSET_ARG( rMedium.GetItemSet(), pTarget, SfxStringItem,
+ SID_TARGETPATH, sal_False);
+
+ sal_Bool bPreview = rMedium.IsPreview_Impl();
+ const SfxPoolItem* ppInternalArgs[] =
+ {
+ &aFrameItem, pReferer, pTarget, 0
+ };
+
+ SfxExecutableFilterType_Impl eType;
+ for( sal_uInt16 nPos = GetFilterCount(); nPos--; )
+ if( GetFilter( nPos ) == pFilter )
+ {
+ eType = pTypes->GetObject( nPos );
+ break;
+ }
+ switch( eType )
+ {
+ case SFX_EXE_FILTER_SOUND:
+ {
+ // Achtung: GetPhysicalName nicht im ctor, IsTemporary() k"onnte vorher aufgerufen werden !!
+ String aName = rMedium.GetPhysicalName();
+ new SfxSound_Impl( aName, rMedium.IsTemporary() );
+ rMedium.SetTemporary( sal_False );
+ return ERRCODE_ABORT;
+ break;
+ }
+
+ case SFX_EXE_FILTER_COMMAND:
+ {
+ if ( bPreview )
+ return ERRCODE_ABORT;
+
+#if 0 //(dv)
+ CntAnchorRef xAnchor = rMedium.GetAnchor(); // MI: ???
+ if ( !xAnchor.Is() )
+ return ERRCODE_IO_UNKNOWN; // MI: kann das ueberhaupt passieren?
+#ifndef TF_UCB
+ xAnchor->Put( CntCmpCommandItem( WID_COMPONENT_COMMAND, ::rtl::OUString("executeDefaultCommand") ) );
+#else
+ xAnchor->Put( CntCmpCommandItem( WID_COMPONENT_COMMAND, "executeDefaultCommand" ) );
+#endif
+#endif //(dv)
+ return ERRCODE_ABORT;
+ break;
+ }
+
+ case SFX_EXE_FILTER_EXPLORER:
+ {
+ if ( bPreview )
+ return ERRCODE_ABORT;
+
+ // ansonsten als Komponente laden
+ }
+
+/*
+ case SFX_EXE_FILTER_COMPONENT:
+ {
+ rMedium.Close();
+
+ const INetURLObject& rURLObj = rMedium.GetURLObject();
+ String aName( rURLObj.GetMainURL() );
+ SfxURLTransformer aTrans ( ::utl::getProcessServiceFactory() );
+ ::rtl::OUString aTargetURL = aName;
+
+ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > aArgs;
+ TransformItems( SID_OPENDOC, *rMedium.GetItemSet(), aArgs );
+
+ sal_uInt16 nRet = rpFrame->LoadComponent_Impl( aTargetURL, aArgs, ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrameLoader > (), rMedium.GetItemSet() );
+ if ( nRet == RET_NEWTASK )
+ rMedium.GetItemSet()->Put( SfxStringItem( SID_TARGETNAME, DEFINE_CONST_UNICODE("_blank") ) );
+
+ if ( nRet == RET_OK || nRet == RET_CANCEL )
+ return ERRCODE_ABORT;
+ else if ( nRet == RET_NEWTASK )
+ return ERRCODE_SFX_RESTART;
+ else // nRet == RET_PENDING !
+ return ERRCODE_IO_PENDING;
+ break;
+ }
+
+ case SFX_EXE_FILTER_EXTERNBROWSER:
+ {
+ String aExtBrw( SfxIniManager::Get()->Get( SFX_KEY_EXTBRW_FILE ) );
+ if ( !rpFrame->IsTop() && aExtBrw.Len() )
+ {
+ // external Browser in subframes only possible if IExplorer
+ const SfxFilter* pFilter = SFX_APP()->GetFilterMatcher().GetFilter4Mime( DEFINE_CONST_UNICODE("text/html"), SFX_FILTER_IMPORT | SFX_FILTER_EXPORT );
+ rMedium.SetFilter(pFilter);
+
+ return pFilter ? ERRCODE_SFX_RESTART : ERRCODE_IO_NOTSUPPORTED;
+ }
+
+ rMedium.Close();
+
+ // put filter into itemset, otherwise mediums filter will become component filter!
+ rMedium.GetItemSet()->Put( SfxStringItem( SID_FILTER_NAME, pFilter->GetName() ) );
+
+ const INetURLObject& rURLObj = rMedium.GetURLObject();
+ INetProtocol eProt = rURLObj.GetProtocol();
+ String aName;
+ if ( eProt != INET_PROT_FILE && eProt != INET_PROT_HTTP && eProt != INET_PROT_HTTPS && eProt != INET_PROT_FTP )
+ {
+ aName = rMedium.GetPhysicalName();
+ rMedium.SetTemporary( sal_False );
+ }
+ else
+ aName = rURLObj.GetMainURL();
+
+ if ( aExtBrw.Len() )
+ {
+ String aFile( '\"');
+ aFile += aExtBrw;
+ aFile += '\"';
+ aFile += ' ';
+ aFile += '\"';
+ aFile += aName;
+ aFile += '\"';
+ sal_Bool bOk = System::StartProcess( Application::GetAppWindow(), aFile );
+ return bOk ? ERRCODE_ABORT : ERRCODE_IO_NOTSUPPORTED;
+ }
+
+ SfxURLTransformer aTrans ( ::utl::getProcessServiceFactory() );
+ ::rtl::OUString aTargetURL = aName;
+
+ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > aArgs;
+ TransformItems( SID_OPENDOC, *rMedium.GetItemSet(), aArgs );
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xMgr( ::utl::getProcessServiceFactory() );
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xReg( xMgr->createInstance( DEFINE_CONST_UNICODE("com.sun.star.frame.FrameLoaderFactory") ), ::com::sun::star::uno::UNO_QUERY );
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrameLoader > xLoader( xReg->createInstance( DEFINE_CONST_UNICODE("private:iexplorer") ), ::com::sun::star::uno::UNO_QUERY );
+
+ sal_uInt16 nRet = rpFrame->LoadComponent_Impl( aTargetURL, aArgs, xLoader, rMedium.GetItemSet() );
+ if ( nRet == RET_NEWTASK )
+ rMedium.GetItemSet()->Put( SfxStringItem( SID_TARGETNAME, DEFINE_CONST_UNICODE("_blank") ) );
+
+ if ( nRet == RET_OK || nRet == RET_CANCEL )
+ return ERRCODE_ABORT;
+ else if ( nRet == RET_NEWTASK )
+ return ERRCODE_SFX_RESTART;
+ else // nRet == RET_PENDING !
+ return ERRCODE_IO_PENDING;
+ break;
+ }
+*/
+/*
+ case SFX_EXE_FILTER_DOWNLOAD:
+ {
+ if ( bPreview )
+ return ERRCODE_ABORT;
+
+ rMedium.Close();
+
+ const INetURLObject& rURLObj = rMedium.GetURLObject();
+ String aName( rURLObj.GetMainURL() );
+ ::rtl::OUString aTargetURL = aName;
+
+
+ // Downloader always uses his own special task
+ SfxFrame *pFrame = SfxTopFrame::Create();
+ rMedium.GetItemSet()->Put( SfxRectangleItem( SID_VIEW_POS_SIZE, Rectangle( 0, 0, 500, 250 ) ) );
+
+ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > aArgs;
+ TransformItems( SID_OPENDOC, *rMedium.GetItemSet(), aArgs );
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xMgr( ::utl::getProcessServiceFactory() );
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrameLoader > xFrameLoader ( xMgr->createInstance( DEFINE_CONST_UNICODE("com.sun.star.comp.sfx2.DownloaderLoader") ), ::com::sun::star::uno::UNO_QUERY );
+ if ( xFrameLoader.is() )
+ {
+ USHORT nRet = pFrame->LoadComponent_Impl( aTargetURL, aArgs, xFrameLoader, rMedium.GetItemSet() );
+ if ( nRet == RET_OK )
+ pFrame->GetCurrentDocument()->SetFlags( pFrame->GetCurrentDocument()->GetFlags() | SFXOBJECTSHELL_DONTREPLACE );
+ }
+
+ return ERRCODE_ABORT;
+ break;
+ }
+ */
+ case SFX_EXE_FILTER_CHOOSER:
+ if ( bPreview )
+ return ERRCODE_ABORT;
+ return Choose_Impl( rMedium ); break;
+ case SFX_EXE_FILTER_MAILTO:
+ {
+ if ( bPreview )
+ return ERRCODE_ABORT;
+
+ // an SID_MAIL_SENDDOC forwarden
+ SfxAllItemSet aSet( pApp->GetPool() );
+ aSet.Put( SfxStringItem( SID_MAIL_RECIPIENT, rMedium.GetURLObject().GetMainURL() ) );
+ aSet.Put( SfxBoolItem( SID_MAIL_ATTACH, sal_False ) );
+
+ String aRefererStr = pReferer ? pReferer->GetValue() : String();
+ if ( aRefererStr.CompareToAscii("private:msgid/", 14 ) != COMPARE_EQUAL )
+ aSet.Put( aFrameItem );
+
+ // look for subject and body
+ SfxItemSet* pSet = rMedium.GetItemSet();
+ if( pSet )
+ {
+ SFX_ITEMSET_ARG( pSet, pSendDirect, SfxBoolItem, SID_MAIL_SEND, sal_False);
+ if ( pSendDirect )
+ aSet.Put( *pSendDirect );
+
+ SFX_ITEMSET_ARG( pSet, pToPost, SfxStringItem, SID_POSTSTRING, sal_False);
+ if ( pToPost )
+ {
+ aSet.Put( SfxStringItem( SID_MAIL_TEXT, pToPost->GetValue() ) );
+
+ // Subject nur setzen, wenn nicht in mailto-::com::sun::star::util::URL
+ String aParam = rMedium.GetURLObject().GetParam().ToLowerAscii();
+ FASTBOOL bSubjectFound = sal_False;
+ sal_uInt16 nIdx = 0;
+ while ( nIdx != STRING_NOTFOUND )
+ {
+ String aParamTok = aParam.GetToken( 0, '&', nIdx );
+ aParamTok.EraseLeadingChars();
+ if ( aParamTok.SearchAscii( "subject=" ) == 0 )
+ {
+ bSubjectFound = sal_True;
+ break;
+ }
+ }
+
+ if ( !bSubjectFound )
+ aSet.Put( SfxStringItem( SID_MAIL_SUBJECT, DEFINE_CONST_UNICODE("Mail Posted by StarOffice") ) );
+ }
+ }
+
+ if ( rpFrame->GetCurrentDocument() || !rpFrame->IsTop() )
+ {
+ SfxFrame *pFrame = SfxTopFrame::Create();
+ aSet.Put( SfxFrameItem( SID_DOCFRAME, pFrame ) );
+ }
+
+ pApp->GetDispatcher().Execute( SID_MAIL_SENDDOC, SFX_CALLMODE_SYNCHRON, aSet );
+ return ERRCODE_ABORT;
+ }
+ case SFX_EXE_FILTER_HELPENTRY:
+ {
+ rMedium.Close();
+
+ // Redirection within Help-Directory
+ INetURLObject aObj( rMedium.GetName() );
+ if ( aObj.getExtension().CompareIgnoreCaseToAscii( "svh" ) == COMPARE_EQUAL )
+ {
+ SfxHelp::ShowHelp( HELP_INDEX, sal_False, U2S( aObj.PathToFileName() ).getStr() );
+ return ERRCODE_ABORT;
+ }
+ else
+ {
+ INetURLObject aHelpDir( SFX_INIMANAGER()->Get(SFX_KEY_HELP_DIR ), INET_PROT_FILE );
+ aHelpDir.setFinalSlash();
+ String aNewURL = DEFINE_CONST_UNICODE(".component:Help/Content.Contents;\001");
+ aNewURL += aObj.getBase();
+ aNewURL += DEFINE_CONST_UNICODE("\001");
+ aNewURL += aHelpDir.GetMainURL();
+ aNewURL += String::CreateFromAscii( ResMgr::GetLang() );
+ aNewURL += DEFINE_CONST_UNICODE("/text/sbasic/starone/ref/");
+ aNewURL += aObj.getName();
+ aNewURL += DEFINE_CONST_UNICODE("\001.Content");
+ rMedium.SetName( aNewURL, sal_True );
+ rMedium.SetPhysicalName( String() );
+ rMedium.Init_Impl();
+ rMedium.SetFilter(0);
+ return ERRCODE_SFX_RESTART;
+ }
+ }
+/*
+ case SFX_EXE_FILTER_BOOKMARK:
+ {
+ rMedium.Close();
+ String aTitle, aFrame, aOpen, aWorkDir, aArguments, aURL;
+
+ Reference < XContent > xContent( rMedium.GetContent() );
+ Any aAny( UCB_Helper::GetProperty( xContent, WID_TARGET_URL ) );
+ OUString aTarget;
+ if ( !( aAny >>= aTarget ) || !aTarget.len() )
+ return ERRCODE_SFX_INVALIDLINK;
+ else
+ aURL = String(aTarget);
+
+ aAny = UCB_Helper::GetProperty( xContent, WID_DOCUMENT_HEADER );
+ Sequence < DocumentHeaderField > aSeq;
+ if ( aAny >>= aSeq )
+ {
+ USHORT nCount = aSeq.getLength();
+ for ( USHORT n = 0; n < nCount; ++n )
+ {
+ String aName( aSeq.getArray()[ n ].Name );
+ String aValue( aSeq.getArray()[ n ].Value );
+ if ( aName.ToLowerAscii().EqualsAscii("title") )
+ aTitle = aValue;
+
+ if ( aName.ToLowerAscii().EqualsAscii( "workingdirectory" ) )
+ {
+ aWorkDir = aValue;
+ if ( aWorkDir.Len() )
+ {
+ INetURLObject aObj( aWorkDir, INET_PROT_FILE );
+ aWorkDir = aObj.PathToFileName();
+ }
+ }
+
+ if ( aName.ToLowerAscii().EqualsAscii( "arguments" ) )
+ aArguments = aValue;
+
+ if ( aName.EqualsAscii( "frame" ) )
+ aFrame = aValue;
+
+ if ( aName.EqualsAscii( "openas" ) )
+ aOpen = aValue;
+ }
+ }
+
+ INetURLObject aPresObj( rMedium.GetName() );
+ sal_Bool bIsURLFile = aPresObj.GetExtension().EqualsAscii( "url" );
+ if ( aArguments.Len() || aWorkDir.Len() )
+ {
+ if ( bPreview )
+ return ERRCODE_ABORT;
+
+ String aName( aURL );
+ Any aAny( UCB_Helper::GetProperty( aName, WID_FLAG_IS_FOLDER ) );
+ BOOL bIsFolder = FALSE;
+ if ( !( aAny >>= bIsFolder ) || !bIsFolder )
+ {
+ INetURLObject aFake( "macro:" );
+ if ( pApp->IsSecureURL( aFake, &rMedium.GetReferer() ) )
+ {
+ String aName;
+ if ( bIsURLFile )
+ {
+ INetURLObject aObj;
+ aObj.SetSmartProtocol( INET_PROT_FILE );
+ aObj.SetSmartURL( aURL );
+ aName += '\"';
+ aName += aObj.PathToFileName();
+ aName += '\"';
+
+ if ( aArguments.Len() )
+ {
+ aName += ' ';
+ // Don't quote the arguments because StartProcess doesn't know which
+ // quotes should be removed and which not. If the argument needs to
+ // be quoted it has to be quoted in the URL file itself
+ aName += aArguments;
+ }
+ }
+ else if ( rMedium.GetPhysicalName().Len() )
+ {
+ // Bei propriet"aren Formaten lassen wir lieber das BS die Arbeit tun
+ aName += '\"';
+ aName += rMedium.GetPhysicalName();
+ aName += '\"';
+ }
+
+ sal_Bool bOK = sal_False;
+ if ( aWorkDir.Len() )
+ bOK = System::StartProcess( NULL, aName, aWorkDir );
+ else
+ bOK = System::StartProcess( NULL, aName );
+ return bOK ? ERRCODE_ABORT : ERRCODE_IO_NOTSUPPORTED;
+ }
+ }
+ }
+
+ if ( aOpen.EqualsAscii(INTERNETSHORTCUT_TEMPLATE_TAG) )
+ rMedium.GetItemSet()->Put( SfxBoolItem( SID_TEMPLATE, sal_True ) );
+
+ if ( aFrame.Len() )
+ rMedium.GetItemSet()->Put( SfxStringItem( SID_TARGETNAME, aFrame ) );
+ rMedium.GetItemSet()->Put( SfxStringItem( SID_REFERER, rMedium.GetName() ) );
+ rMedium.GetItemSet()->Put( aPath, SID_TARGETPATH );
+ rMedium.SetName( aURL, sal_True );
+ rMedium.SetOrigFilter_Impl( 0 );
+ rMedium.SetPhysicalName( String() );
+ rMedium.Init_Impl();
+ rMedium.SetFilter( 0 );
+
+ SFX_ITEMSET_ARG( rMedium.GetItemSet(), pROItem, SfxBoolItem, SID_DOC_READONLY, sal_False);
+ sal_Bool bReadOnly = pROItem ? pROItem->GetValue() : sal_False;
+ rMedium.SetOpenMode( bReadOnly ? SFX_STREAM_READONLY : SFX_STREAM_READWRITE, sal_False );
+
+ return ERRCODE_SFX_RESTART;
+ }
+
+ case SFX_EXE_FILTER_HELPID:
+ {
+ if ( bPreview )
+ return ERRCODE_ABORT;
+
+ rMedium.Close();
+
+#ifdef WNT
+ String aName( rMedium.GetName() );
+ if ( aName.GetTokenCount( '/' ) == 2 )
+ {
+ String aHelpFile( aName.GetToken( 1, '/' ) );
+ if ( WildCard( DEFINE_CONST_UNICODE("*.chm") ).Matches( aHelpFile ) )
+ {
+ String aHelp( DEFINE_CONST_UNICODE("hh.exe ") );
+ aHelp += aHelpFile;
+ System::StartProcess( NULL, aHelp );
+ }
+ }
+#endif
+
+ String aHID( rMedium.GetURLObject().GetMark() );
+ String aFileName;
+ sal_uInt32 nHID;
+ if ( aHID.Search( ':' ) != STRING_NOTFOUND )
+ {
+ aFileName = aHID.GetToken( 0, ':' );
+ nHID = aHID.GetToken( 1, ':' ).ToInt32();
+ }
+ else
+ {
+ nHID = aHID.ToInt32();
+ }
+ SfxHelp::ShowHelp( nHID, sal_False, aFileName.Len() ? U2S(aFileName).getStr() : NULL );
+ return ERRCODE_ABORT;
+ }
+
+ case SFX_EXE_FILTER_EXECUTE:
+ {
+ if ( bPreview )
+ return ERRCODE_ABORT;
+
+ rMedium.SetTemporary( sal_False );
+ INetURLObject aURL( "macro:" );
+ if ( pApp->IsSecureURL( aURL, &rMedium.GetReferer() ) && rMedium.GetPhysicalName().Len() )
+ {
+ String aName( '\"');
+ aName += rMedium.GetPhysicalName();
+ aName += '\"';
+ rMedium.SetTemporary( sal_False );
+ rMedium.CloseInStream();
+ sal_Bool bOk = System::StartProcess( NULL, aName );
+ return bOk ? ERRCODE_ABORT : ERRCODE_IO_NOTEXISTS;
+ }
+ return ERRCODE_IO_ACCESSDENIED;
+ }
+ */
+ case SFX_EXE_FILTER_BUGID:
+ {
+ String aPathName = DEFINE_CONST_UNICODE("http://webserver1.stardiv.de/Bugtracker/Source/Body_ReportDetail.asp?ID=");
+ aPathName += rMedium.GetURLObject().GetURLPath();
+ rMedium.SetName( aPathName );
+ rMedium.SetPhysicalName( String() );
+ rMedium.Init_Impl();
+ rMedium.SetFilter( 0 );
+ return ERRCODE_SFX_RESTART;
+ }
+
+ case SFX_EXE_FILTER_BUGDOC:
+ {
+ String aPathName = GetBugdocName_Impl(
+ rMedium.GetURLObject().GetURLPath() );
+ if( aPathName.Len() )
+ {
+ rMedium.SetName( aPathName );
+ rMedium.SetPhysicalName( String() );
+ rMedium.Init_Impl();
+ rMedium.SetFilter( 0 );
+ return ERRCODE_SFX_RESTART;
+ }
+ else return ERRCODE_SFX_INVALIDLINK;
+ }
+ case SFX_EXE_FILTER_MACRO:
+ {
+ if ( bPreview )
+ return ERRCODE_ABORT;
+
+ pApp->EnterBasicCall();
+
+ // macro:-::com::sun::star::util::URL analysiern
+ // 'macro://#lib.mod.proc(args)' => Macro via App-BASIC-Mgr
+ // 'macro:#lib.mod.proc(args)' => Macro via zugehoerigen Doc-BASIC-Mgr
+ // 'macro:obj.method(args)' => Object via App-BASIC-Mgr
+ String aMacro = rMedium.GetURLObject().GetMainURL();
+ sal_uInt16 nHashPos = aMacro.Search( '#' );
+ sal_uInt16 nArgsPos = aMacro.Search( '(' );
+ BasicManager *pBasMgr = 0;
+ ErrCode nErr;
+
+ // wird Macro angesprochen (also KEIN Object)?
+ if ( STRING_NOTFOUND != nHashPos && nHashPos < nArgsPos )
+ {
+ // BasManager ermitteln
+ String aBasMgrName( INetURLObject::decode(aMacro.Copy( 6, nHashPos-6 ), INET_HEX_ESCAPE, INetURLObject::DECODE_WITH_CHARSET) );
+ if ( aBasMgrName.EqualsAscii("//") )
+ pBasMgr = pApp->GetBasicManager();
+ else if ( !aBasMgrName.Len() )
+ pBasMgr = SfxObjectShell::Current()->GetBasicManager();
+ else
+ for ( SfxObjectShell *pObjSh = SfxObjectShell::GetFirst();
+ pObjSh && !pBasMgr;
+ pObjSh = SfxObjectShell::GetNext(*pObjSh) )
+ if ( aBasMgrName == pObjSh->GetTitle(SFX_TITLE_APINAME) )
+ pBasMgr = pObjSh->GetBasicManager();
+ if ( pBasMgr )
+ {
+ // Funktion suchen
+ String aQualifiedMethod( INetURLObject::decode(aMacro.Copy( nHashPos+1 ), INET_HEX_ESCAPE, INetURLObject::DECODE_WITH_CHARSET) );
+ String aArgs;
+ if ( STRING_NOTFOUND != nArgsPos )
+ {
+ aArgs = aQualifiedMethod.Copy( nArgsPos - nHashPos - 1 );
+ aQualifiedMethod.Erase( nArgsPos - nHashPos - 1 );
+ }
+ SbxMethod *pMethod = SfxQueryMacro( pBasMgr, aQualifiedMethod );
+
+ // falls gefunden Funktion ueber ihren Parent ausfuehren
+ if ( pMethod )
+ {
+ String aQuotedArgs;
+ if ( aArgs.Len()<2 || aArgs.GetBuffer()[1] == '\"')
+ aQuotedArgs = aArgs;
+ else
+ {
+ // Klammern entfernen
+ aArgs.Erase(0,1);
+ aArgs.Erase( aArgs.Len()-1,1);
+
+ aQuotedArgs = '(';
+
+ // Alle Parameter mit T"uddelchen
+ sal_uInt16 nCount = aArgs.GetTokenCount(',');
+ for ( sal_uInt16 n=0; n<nCount; n++ )
+ {
+ aQuotedArgs += '\"';
+ aQuotedArgs += aArgs.GetToken( n, ',' );
+ aQuotedArgs += '\"';
+ if ( n<nCount-1 )
+ aQuotedArgs += ',';
+ }
+
+ aQuotedArgs += ')';
+ }
+
+ String aCall( '[' );
+ aCall += pMethod->GetName();
+ aCall += aQuotedArgs;
+ aCall += ']';
+ pMethod->GetParent()->Execute( aCall );
+ nErr = SbxBase::GetError();
+ }
+ else
+ nErr = ERRCODE_BASIC_PROC_UNDEFINED;
+ }
+ else
+ nErr = ERRCODE_IO_NOTEXISTS;
+ }
+ else
+ {
+ // (optional Objekt-qualifizierte) Basic-Funktion ausfuehren
+ String aCall( '[' );
+ aCall += INetURLObject::decode(aMacro.Copy(6), INET_HEX_ESCAPE, INetURLObject::DECODE_WITH_CHARSET);
+ aCall += ']';
+ pApp->GetBasicManager()->GetLib(0)->Execute( aCall );
+ nErr = SbxBase::GetError();
+ }
+
+ pApp->LeaveBasicCall();
+ SbxBase::ResetError();
+ return nErr ? nErr : ERRCODE_ABORT;
+ }
+/*
+ case SFX_EXE_FILTER_FACTORY:
+ {
+ INetURLObject aObj( rMedium.GetURLObject() );
+ String aParam;
+ if ( aObj.HasParam() && (sal_uInt16) aObj.GetParam().ToInt32() )
+ {
+ aParam = aObj.GetParam();
+ aObj.SetParam("");
+ }
+
+ String aPathName( aObj.GetMainURL() );
+ const SfxObjectFactory* pFact = SfxObjectFactory::GetFactory( aPathName );
+ if ( pFact )
+ {
+ if ( aParam.Len() )
+ {
+ sal_uInt16 nSlotId = aParam.ToInt32();
+ SfxModule* pMod = pFact->GetModule()->Load();
+ pMod->ExecuteSlot( SfxRequest( nSlotId, SFX_CALLMODE_SYNCHRON, pMod->GetPool() ) );
+ return ERRCODE_ABORT;
+ }
+
+ SfxAllItemSet aSet( SFX_APP()->GetPool() );
+ sal_uInt16 nSlotId = SID_NEWDOCDIRECT;
+ if( pFact->GetStandardTemplate().Len() )
+ {
+ aSet.Put( SfxStringItem ( SID_FILE_NAME, pFact->GetStandardTemplate() ) );
+ aSet.Put( SfxBoolItem( SID_TEMPLATE, sal_True ) );
+ nSlotId = SID_OPENDOC;
+ }
+ else
+ aSet.Put( SfxStringItem ( SID_NEWDOCDIRECT, aPathName ) );
+
+ aSet.Put( aFrameItem );
+
+ SFX_ITEMSET_ARG( rMedium.GetItemSet(), pViewId, SfxUInt16Item, SID_VIEW_ID, sal_False );
+ if ( pViewId )
+ aSet.Put( *pViewId );
+
+ SFX_ITEMSET_ARG( rMedium.GetItemSet(), pHidden, SfxBoolItem, SID_HIDDEN, sal_False );
+ if ( pHidden )
+ aSet.Put( *pHidden );
+
+ if ( rMedium.IsPreview_Impl() )
+ aSet.Put( SfxBoolItem( SID_PREVIEW, sal_True ) );
+
+ SFX_ITEMSET_ARG( rMedium.GetItemSet(), pReadonly, SfxBoolItem, SID_DOC_READONLY, sal_False );
+ if ( pReadonly )
+ aSet.Put( *pReadonly );
+
+ if ( pTarget )
+ aSet.Put( *pTarget );
+ if ( pReferer )
+ aSet.Put( *pReferer );
+ if ( pPath )
+ aSet.Put( *pPath );
+
+ SFX_ITEMSET_ARG( rMedium.GetItemSet(), pAPI, SfxBoolItem, SID_SILENT, sal_False );
+ SfxCallMode eMode = SFX_CALLMODE_SYNCHRON;
+ if ( pAPI && pAPI->GetValue() )
+ eMode |= SFX_CALLMODE_API;
+
+ const SfxPoolItem *pRet = pApp->GetAppDispatcher().Execute( nSlotId, eMode, aSet );
+ if ( pRet )
+ rMedium.GetItemSet()->Put( *pRet, SID_OPENURL );
+
+ return ERRCODE_ABORT;
+ }
+ else
+ {
+ // Chaos-Factory ??
+ String aFact( aPathName );
+ String aPrefix( DEFINE_CONST_UNICODE("private:factory/") );
+ if ( aPrefix.Len() == aFact.Match( aPrefix ) )
+ // Factory-Namen extrahieren
+ aFact.Erase( 0, aPrefix.Len() );
+
+ // ContentType ermitteln
+ INetContentType eType = INetContentTypes::GetContentType( aFact );
+ if ( eType != CONTENT_TYPE_UNKNOWN )
+ {
+ // ChaosObjekte werden immer in der Explorer-Root angelegt
+ String aExplorerRoot( SFX_INIMANAGER()->Get( SFX_KEY_EXPLORER_DIR ) );
+ INetURLObject aExp;
+ aExp.SetSmartURL( aExplorerRoot );
+#if 0 //(dv)
+ CntAnchorRef xRoot = new CntAnchor( NULL, aExp.GetMainURL() );
+
+ // Chaos-Factory daf"ur besorgen
+ sal_uInt16 nPos = CntHelperFunctions::GetFactoryPosByContentType( *xRoot, eType, sal_True, 0, 0, 0, CNT_CREATION_FLAG_HIDDEN );
+ if ( nPos != CNTFACTORY_NOTFOUND )
+ {
+ SfxItemSet* pSet = new SfxAllItemSet( SFX_APP()->GetPool() );
+ if ( rpFrame && rpFrame->GetCurrentDocument() )
+ pSet->Put( SfxFrameItem( SID_DOCFRAME, rpFrame ), SID_DOCFRAME );
+ if ( pReferer )
+ pSet->Put( *pReferer, SID_REFERER );
+ CntAnchorRef xRef = CntHelperFunctions::CreateAnchor( *xRoot, nPos, 0, sal_False );
+ if ( xRef.Is() && !xRef->GetError() )
+ {
+ new SfxAsyncChaosFactory_Impl( xRef, pSet );
+ xRef->Put( SfxVoidItem(WID_INSERT) );
+ return ERRCODE_ABORT;
+ }
+ }
+#endif //(dv)
+ }
+ }
+
+ return ERRCODE_IO_NOTSUPPORTED;
+ }
+
+ case SFX_EXE_FILTER_UNO:
+ {
+ if ( bPreview )
+ return ERRCODE_ABORT;
+
+ SfxViewFrame *pView = SfxViewFrame::Current();
+ if ( pView )
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > xFrame;
+ SfxFrame *pFrame = pView->GetFrame();
+ while ( pFrame )
+ {
+ // Falls es eine Mutter-Komponente gibt, diese ansprechen
+ if ( pFrame->HasComponent() )
+ xFrame = pFrame->GetFrameInterface();
+ pFrame = pFrame->GetParentFrame();
+ }
+
+ if ( !xFrame.is() )
+ xFrame = pView->GetFrame()->GetFrameInterface();
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > xProv( xFrame, ::com::sun::star::uno::UNO_QUERY );
+ if ( xProv.is())
+ {
+ ::com::sun::star::util::URL aURL;
+ aURL.Complete = rMedium.GetName();
+ SfxURLTransformer aTrans ( ::utl::getProcessServiceFactory() );
+ aTrans.parseStrict( aURL );
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > xDisp = xProv->queryDispatch( aURL, ::rtl::OUString(), 0 );
+ if ( xDisp.is() )
+ xDisp->dispatch( aURL, ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >() );
+ }
+ }
+
+ return ERRCODE_ABORT;
+ }
+*/
+ case SFX_EXE_FILTER_SLOT:
+ {
+ if ( bPreview )
+ return ERRCODE_ABORT;
+
+ const INetURLObject &rURL = rMedium.GetURLObject();
+ SfxUInt16Item aTabPageNoItem( SID_TABPAGE, rURL.GetMark().ToInt32() );
+ const SfxPoolItem* pArgs[] =
+ {
+ &aTabPageNoItem, 0
+ };
+
+ String aSlots( rURL.GetURLPath() );
+ sal_uInt16 nCount = aSlots.GetTokenCount(',');
+ for ( sal_uInt16 nSlot=0; nSlot<nCount; nSlot++ )
+ {
+ sal_uInt16 nSlotId = (sal_uInt16) aSlots.GetToken( nSlot, ',' ).ToInt32();
+ pApp->GetDispatcher().Execute( nSlotId, SFX_CALLMODE_SYNCHRON, pArgs, 0, ppInternalArgs );
+ }
+
+ return ERRCODE_ABORT;
+ }
+
+ default:
+ return ERRCODE_IO_NOTSUPPORTED;
+ }
+}
+
+//----------------------------------------------------------------
+
+SfxExternalAppFilterContainer::SfxExternalAppFilterContainer( )
+ : SfxFilterContainer( DEFINE_CONST_UNICODE(SFX_FCONTNR_EXTAPP) )
+/* [Beschreibung]
+
+ Der SfxExternalAppFilterContainer enthaellt jeden Filter, nach
+ dem er per GetFilter4FilterName gefragt wird. Er ist fuer
+ Redirects von Bedeutung. Im Execute oeffnet er die durch den
+ Filter bezeichnete Applikation. */
+
+{
+}
+
+//----------------------------------------------------------------
+
+sal_uInt32 SfxExternalAppFilterContainer::Execute( SfxMedium& rMedium, SfxFrame*& ) const
+{
+ const SfxFilter* pFilter = rMedium.GetFilter();
+ DBG_ASSERT( pFilter, "Medium braucht Filter" );
+ const UniString& rPhysicalName = rMedium.GetPhysicalName();
+ // GetPhysicalName() setzt das tmp-Flag zurueck auf sal_True
+ rMedium.SetTemporary( sal_False );
+
+ OProcess aApp( pFilter->GetFilterName(), rPhysicalName );
+ OProcess::TProcessOption eOption =
+ (OProcess::TProcessOption)( OProcess::TOption_SearchPath | OProcess::TOption_Detached );
+ sal_Bool bOk = ( aApp.execute( eOption ) == OProcess::E_None );
+ return bOk ? ERRCODE_ABORT : ERRCODE_IO_NOTEXISTS;
+}
+
+//----------------------------------------------------------------
+
+sal_uInt16 SfxExternalAppFilterContainer::GetFilterCount() const
+{
+ return SfxFilterContainer::GetFilterCount();
+}
+
+//----------------------------------------------------------------
+
+const SfxFilter* SfxExternalAppFilterContainer::GetFilter4FilterName(
+ const String& rName, SfxFilterFlags nMust, SfxFilterFlags nDont ) const
+/* [Beschreibung]
+
+ Erzeugt einen entspr. Filter, falls er noch nicht existiert und gibt
+ diesen zurueck.
+ */
+{
+ String aEmpty;
+ SfxFilterFlags nFlags = SFX_FILTER_IMPORT|SFX_FILTER_NOTINFILEDLG|
+ SFX_FILTER_EXECUTABLE;
+ if ( (nFlags & nMust) != nMust ||
+ (nFlags & nDont ) )
+ return 0;
+ const SfxFilter* pFilt =
+ SfxFilterContainer::GetFilter4FilterName( rName );
+ if( !pFilt )
+ {
+ SfxFilter* pFilter = new SfxFilter(
+ rName, DEFINE_CONST_UNICODE("none"), nFlags, 0, aEmpty, aEmpty, 0, aEmpty, this,
+ aEmpty );
+ pImpl->aList.Insert( pFilter, (sal_uInt32)0 );
+ pFilt = pFilter;
+ }
+ return pFilt;
+}
+
+//----------------------------------------------------------------
+
+SfxFactoryFilterContainer::SfxFactoryFilterContainer(
+ const String& rName, const SfxObjectFactory& rFactP )
+ : SfxFilterContainer( rName ), rFact( rFactP ), pFunc(0)
+/* [Beschreibung]
+
+ Im SfxFactoryFilterContainer befinden sich die Filter einer
+ SfxObjectFactory. Wird kein DetectFilter registriert, so wird
+ fuer die DefaultFactory <SfxApplication::DetectFilter> genommen
+ */
+{
+ //Defaults in den Container der DefaultFactory laden
+ SetFlags( GetFlags() | SFX_FILTER_CONTAINER_FACTORY );
+ if( &SfxObjectFactory::GetDefaultFactory() == &rFactP )
+ {
+ pFunc = &SfxFilterMatcher::AppDetectFilter;
+ }
+}
+//----------------------------------------------------------------
+
+sal_uInt32 SfxFactoryFilterContainer::GetFilter4Content(
+ SfxMedium& rMedium, const SfxFilter** ppFilter, SfxFilterFlags nMust, SfxFilterFlags nDont ) const
+{
+ ForceFilterLoad_Impl();
+ SFX_ITEMSET_ARG( rMedium.GetItemSet(), pTargetItem, SfxStringItem,
+ SID_TARGETNAME, sal_False);
+ SFX_ITEMSET_ARG( rMedium.GetItemSet(), pDontItem, SfxBoolItem,
+ SID_FILTER_DONTDETECTONCONTENT, sal_False);
+ if( pDontItem && pDontItem->GetValue() )
+ return 0;
+
+ if ( *ppFilter && ( (*ppFilter)->GetFilterFlags() & SFX_FILTER_STARONEFILTER ) )
+ return 0;
+
+ if( pFunc )
+ {
+ sal_uInt32 nErr = (*pFunc)(rMedium, ppFilter, nMust, nDont);
+ DBG_ASSERT( !*ppFilter ||
+ (((*ppFilter)->GetFilterFlags() & nMust ) == nMust &&
+ ((*ppFilter)->GetFilterFlags() & nDont ) == 0 ),
+ "DetectFilter Spec nicht eingehalten" );
+ return nErr;
+ }
+ else
+ return 0;
+}
+
+//----------------------------------------------------------------
+
+DECLARE_LIST( SfxFContainerList_Impl, SfxFilterContainer * );
+
+class SfxFilterMatcher_Impl
+{
+public:
+ sal_uInt16 nAkt;
+ SfxFContainerList_Impl aList;
+ sal_Bool bDeleteContainers;
+};
+
+//----------------------------------------------------------------
+
+SfxFilterMatcher::SfxFilterMatcher( SfxFilterContainer* pCont)
+{
+ pImpl = new SfxFilterMatcher_Impl;
+ pImpl->bDeleteContainers = sal_False;
+ AddContainer( pCont );
+}
+
+//----------------------------------------------------------------
+
+SfxFilterMatcher::SfxFilterMatcher()
+{
+ pImpl = new SfxFilterMatcher_Impl;
+ pImpl->bDeleteContainers = sal_False;
+}
+
+SfxFilterMatcher::SfxFilterMatcher(sal_Bool bDeleteContainers)
+{
+ pImpl = new SfxFilterMatcher_Impl;
+ pImpl->bDeleteContainers = bDeleteContainers;
+}
+
+//----------------------------------------------------------------
+
+SfxFilterMatcher::~SfxFilterMatcher()
+{
+ if ( pImpl->bDeleteContainers )
+ {
+ for ( sal_uInt32 n = pImpl->aList.Count(); n--; )
+ {
+ SfxFilterContainer *pFCont = pImpl->aList.Remove(n);
+ delete pFCont;
+ }
+ }
+ delete pImpl;
+}
+
+//----------------------------------------------------------------
+
+void SfxFilterMatcher::AddContainer( SfxFilterContainer* pC )
+{
+ pImpl->aList.Insert( pC, pImpl->aList.Count() );
+}
+
+//----------------------------------------------------------------
+
+sal_uInt16 SfxFilterMatcher::GetContainerCount() const
+{
+ return (sal_uInt16)pImpl->aList.Count();
+}
+
+//----------------------------------------------------------------
+
+SfxFilterContainer* SfxFilterMatcher::GetContainer( sal_uInt16 nPos ) const
+{
+ return pImpl->aList.GetObject( nPos );
+}
+
+//----------------------------------------------------------------
+
+SfxFilterContainer* SfxFilterMatcher::GetContainer( const String &rName ) const
+{
+ SfxFContainerList_Impl& rList = pImpl->aList;
+ sal_uInt16 nCount = (sal_uInt16) rList.Count();
+ for( sal_uInt16 n = 0; n < nCount; n++ )
+ if( rList.GetObject( n )->GetName() == rName )
+ return rList.GetObject( n );
+ return 0;
+}
+
+//----------------------------------------------------------------
+
+sal_uInt32 SfxFilterMatcher::GuessFilterIgnoringContent(
+ SfxMedium& rMedium, const SfxFilter**ppFilter,
+ SfxFilterFlags nMust, SfxFilterFlags nDont ) const
+{
+ String aFileName = rMedium.GetName();
+ sal_uInt32 nErr = ERRCODE_NONE;
+ const SfxFilter* pFilter = *ppFilter;
+ const INetURLObject& rObj = rMedium.GetURLObject();
+
+#if defined(WNT) || defined(WIN) || defined(OS2)
+ if( !pFilter )
+ {
+ // Hier kommen zunaechst fest eingehackte Regeln:
+ if( rObj.GetProtocol() == INET_PROT_FILE && rObj.GetExtension().CompareIgnoreCaseToAscii( "exe" ) == COMPARE_EQUAL )
+ {
+ String aStr( DEFINE_CONST_UNICODE("soffice") );
+// String aStr( SfxResId( STR_FILTER_OTHERS ) );
+ aStr += DEFINE_CONST_UNICODE(": exe");
+ pFilter = GetFilter( aStr, nMust, nDont );
+ }
+ }
+#endif
+
+ SfxFilterContainer *pCont = GetContainer( DEFINE_CONST_UNICODE("soffice") );
+ if ( pCont )
+ {
+ if ( !pFilter )
+ pFilter = SfxExecutableFilterContainer::CheckForFolder( rMedium, nMust, nDont );
+/*
+ if ( !pFilter )
+ {
+ // Wenn eine Komponente f"ur das vorhandene ::com::sun::star::util::URL-Pattern registriert ist und sie auch
+ // mit der speziellen ::com::sun::star::util::URL was anfangen kann, gibt createObject einen Loader zur"uck
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xMgr( ::utl::getProcessServiceFactory() );
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xReg( xMgr->createInstance( DEFINE_CONST_UNICODE("com.sun.star.frame.FrameLoaderFactory") ), ::com::sun::star::uno::UNO_QUERY );
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > aRef = xReg->createInstance( aFileName );
+ if ( aRef.is() )
+ pFilter = pCont->GetFilter4FilterName(DEFINE_CONST_UNICODE("component"), nMust, nDont );
+ }
+ */
+ }
+
+ if( !pFilter )
+ pFilter = SFX_APP()->GetFilterMatcher().GetFilter4Protocol( rMedium );
+
+ sal_Bool bCheckExternBrowser = rMedium.IsAllowedForExternalBrowser();
+ if ( bCheckExternBrowser && !GetContainer( DEFINE_CONST_UNICODE("soffice") ) )
+ bCheckExternBrowser = sal_False;
+ if ( bCheckExternBrowser && ( (nDont & SFX_EXE_FILTERFLAGS ) || (( nMust & SFX_EXE_FILTERFLAGS ) != nMust ) ) )
+ bCheckExternBrowser = sal_False;
+
+ if( pFilter )
+ {
+ pFilter = ResolveRedirection( pFilter, rMedium );
+ }
+ else if ( rMedium.ProvidesData_Impl() )
+ {
+ // Falls Medium Remote, Zunaechst ueber Mimetypen pruefen ( nicht bei ExternBrowser, sofern dabei angeladen wird )
+ if( !pFilter && rMedium.SupportsMIME_Impl() && ( !bCheckExternBrowser || rObj.GetProtocol() != INET_PROT_HTTP && rObj.GetProtocol() != INET_PROT_HTTPS ) )
+ {
+ // Mime Typen holen
+ String aMime;
+ nErr = rMedium.GetMIMEAndRedirect( aMime );
+ nErr = ERRCODE_TOERROR( nErr );
+ if ( nErr == ERRCODE_IO_PENDING )
+ return nErr;
+ else if( !nErr && aMime.Len() )
+ {
+ if ( aMime.EqualsAscii(CONTENT_TYPE_STR_X_CNT_HTTPFILE) )
+ // FilterDetection nur "uber den Content
+ return ERRCODE_NONE;
+ else
+ pFilter = GetFilter4Mime( aMime, nMust, nDont );
+
+ if ( pFilter && aMime.EqualsAscii(CONTENT_TYPE_STR_APP_OCTSTREAM) )
+ {
+ // Damit eigene Formate wie sdw auch bei falsch konfiguriertem Server erkannt werden, bevor
+ // wir GetInStream rufen
+ const SfxFilter* pMimeFilter = pFilter;
+ pFilter = GetFilter4Extension( rMedium.GetURLObject().GetName(), nMust, nDont );
+ pFilter = ResolveRedirection( pFilter, rMedium );
+ if( pFilter )
+ {
+ nErr = ERRCODE_NONE;
+ if ( ( pFilter == SfxExecutableFilterContainer::GetChooserFilter() ||
+ pFilter->GetFilterName().EqualsAscii(SFX_FILTER_DOWNLOAD) ) && !rMedium.IsRemote() )
+ // Chooser/Downloader bei MIME nur wenn remote
+ pFilter = 0;
+ }
+
+ if ( !pFilter )
+ pFilter = pMimeFilter;
+ }
+
+ // Bei MIME Typen keinen Storage anfordern
+ if( !nErr && rMedium.SupportsMIME_Impl() && rMedium.ProvidesData_Impl() &&
+ pFilter && !pFilter->UsesStorage() )
+ {
+ rMedium.GetInStream();
+ nErr = rMedium.GetError();
+ }
+ }
+
+ if( nErr )
+ {
+ if ( nErr == ERRCODE_SFX_CONSULTUSER )
+ *ppFilter = pFilter;
+ return nErr;
+ }
+ else if ( pFilter && aMime.EqualsAscii(CONTENT_TYPE_STR_TEXT_HTML) )
+ {
+ // MIME ist vertrauenswuerdig ( !? )
+ nErr = ERRCODE_SFX_NEVERCHECKCONTENT;
+ }
+ }
+
+ if( !pFilter && rMedium.ProvidesFile_Impl() && rMedium.IsDownloadDone_Impl() )
+ {
+ // dann ueber Storage CLSID
+ // Remote macht das keinen Sinn, wenn der Download noch la"uft
+ if( rMedium.IsStorage() )
+ {
+ SvStorageRef aStor = rMedium.GetStorage();
+ if ( !aStor.Is() )
+ return ERRCODE_IO_GENERAL;
+ pFilter = GetFilter4ClipBoardId( aStor->GetFormat(), nMust, nDont );
+ }
+
+ // Als naechstes ueber Extended Attributes pruefen
+ String aNewFileName;
+ if( !pFilter )
+ {
+ aNewFileName = rMedium.GetPhysicalName();
+ SvEaMgr aMgr( aNewFileName );
+ String aType;
+ if( aMgr.GetFileType( aType ))
+ {
+ // Plain text verwerfen wir, damit unter OS/2
+ // html Dateien mit attribut Text als html geladen werden
+ if( aType.CompareIgnoreCaseToAscii( "Plain Text" ) != COMPARE_EQUAL )
+ pFilter = GetFilter4EA( aType, nMust, nDont );
+ }
+ }
+ }
+
+ // Zu allerletzt ueber Extension mappen
+ pFilter = ResolveRedirection( pFilter, rMedium );
+ if( !pFilter )
+ {
+ pFilter = GetFilter4Extension( rMedium.GetURLObject().GetName(), nMust, nDont );
+ if( !pFilter || pFilter->GetWildcard()==DEFINE_CONST_UNICODE("*.*") || pFilter->GetWildcard() == '*' )
+ pFilter = 0;
+ pFilter = ResolveRedirection( pFilter, rMedium );
+ if( pFilter &&
+ ( pFilter == SfxExecutableFilterContainer::GetChooserFilter() ||
+ pFilter->GetFilterName().EqualsAscii(SFX_FILTER_DOWNLOAD) ) &&
+ !rMedium.IsRemote() )
+ pFilter = 0;
+ }
+ }
+
+ if ( bCheckExternBrowser &&
+ ( ( pFilter && pFilter->GetMimeType().EqualsAscii(CONTENT_TYPE_STR_TEXT_HTML) ) ||
+ (!pFilter && ( rObj.GetProtocol() == INET_PROT_HTTP || rObj.GetProtocol() == INET_PROT_HTTPS || rObj.GetProtocol() == INET_PROT_FTP && rMedium.SupportsMIME_Impl() ) ) ) )
+ {
+ const SfxFilter* pBrwFilter = GetFilter4FilterName( DEFINE_CONST_UNICODE("ExternBrowser"), nMust, nDont );
+ if ( pBrwFilter )
+ {
+ rMedium.GetItemSet()->Put( SfxBoolItem (SID_DOC_READONLY, sal_True ) );
+ rMedium.SetOpenMode( SFX_STREAM_READONLY, sal_True );
+ pFilter = pBrwFilter;
+ if ( rMedium.GetFilter() )
+ rMedium.SetFilter( 0 );
+/*(dv) CntAnchorRef xAnchor( rMedium.GetAnchor() );
+ if ( xAnchor.Is() )
+ xAnchor->Put( CntContentTypeItem(WID_CONTENT_TYPE, CONTENT_TYPE_TEXT_HTML ) );
+*/ }
+ }
+
+ if ( !pFilter && rObj.GetProtocol() == INET_PROT_FTP )
+ {
+ pFilter = SfxExecutableFilterContainer::GetDownloadFilter();
+ nErr = ERRCODE_SFX_CONSULTUSER;
+ }
+
+ *ppFilter = pFilter;
+ return nErr;
+}
+
+//----------------------------------------------------------------
+
+#define CHECKERROR() \
+if( nErr == 1 || nErr == USHRT_MAX || nErr == ULONG_MAX ) \
+{ \
+ ByteString aText = "Fehler in FilterDetection: Returnwert ";\
+ aText += ByteString::CreateFromInt32(nErr); \
+ if( pFilter ) \
+ { \
+ aText += ' '; \
+ aText += ByteString(U2S(pFilter->GetName())); \
+ } \
+ DBG_ERROR( aText.GetBuffer() ); \
+ nErr = ERRCODE_ABORT; \
+}
+
+//----------------------------------------------------------------
+
+sal_uInt32 SfxFilterMatcher::GuessFilter(
+ SfxMedium& rMedium, const SfxFilter**ppFilter,
+ SfxFilterFlags nMust, SfxFilterFlags nDont ) const
+{
+ const SfxFilter* pOldFilter = ResolveRedirection( *ppFilter, rMedium );
+ const SfxFilter* pFilter = pOldFilter;
+
+ sal_Bool bConsultUser = sal_False;
+ sal_Bool bProvidesData = rMedium.ProvidesData_Impl();
+ sal_Bool bSupportsMime = rMedium.SupportsMIME_Impl();
+
+ // Zunaechst, falls Filter mitkommt einmal testen, ob dieser in Ordnung ist.
+ ErrCode nErr = ERRCODE_NONE;
+ if( pFilter && bProvidesData && ( pFilter->GetFilterContainer()->GetFlags() & SFX_FILTER_CONTAINER_FACTORY ) )
+ {
+ rMedium.StartDownload();
+ if ( !rMedium.IsDownloadDone_Impl() )
+ {
+ if ( pFilter->GetFilterFlags() & SFX_FILTER_ASYNC )
+ {
+ // kurzzeitig auf synchron schalten solange die Apps sich weigern asynchron
+ // zu detecten
+ rMedium.ForceSynchronStream_Impl( sal_True );
+ if ( !rMedium.GetInStream() )
+ {
+ ErrCode e = rMedium.GetErrorCode();
+ if ( e == ERRCODE_NONE )
+ {
+ *ppFilter = pFilter;
+ return ERRCODE_IO_PENDING;
+ }
+ else
+ return e;
+ }
+ }
+ else
+ {
+ *ppFilter = pFilter;
+ return ERRCODE_IO_PENDING;
+ }
+ }
+
+ if( bSupportsMime && !pFilter->UsesStorage() )
+ rMedium.GetInStream();
+
+ nErr = pFilter->GetFilterContainer()->GetFilter4Content( rMedium, &pFilter, nMust, nDont );
+ CHECKERROR();
+
+ rMedium.ForceSynchronStream_Impl( sal_False );
+
+ // ABORT bedeutet Filter ungueltig
+ if( nErr && (nErr != ERRCODE_ABORT && nErr != ERRCODE_SFX_FORCEQUIET ) )
+ return nErr;
+
+ // War der Filter ungueltig oder wurde ein anderer zurueckgegeben,
+ // so detecten wir selbst (wg. redirection)
+ if( nErr == ERRCODE_ABORT && pFilter )
+ bConsultUser = sal_True;
+
+ if( nErr != ERRCODE_SFX_FORCEQUIET && pOldFilter && pFilter != pOldFilter )
+ pFilter = 0;
+ }
+
+ if( !pFilter )
+ {
+ bConsultUser = sal_False;
+//DV !!!! don't close InStream when using the new medium
+// rMedium.CloseInStream();
+
+ // Als erstes Protocol, MIME-Type, Extension etc. probieren
+ nErr = GuessFilterIgnoringContent( rMedium, &pFilter, nMust, nDont );
+ if ( nErr == ERRCODE_IO_PENDING )
+ {
+ *ppFilter = pFilter;
+ return nErr;
+ }
+
+ if ( pFilter && nErr == ERRCODE_SFX_CONSULTUSER )
+ {
+ pFilter = ResolveRedirection( pFilter, rMedium );
+ *ppFilter = pFilter;
+ }
+
+ if ( !pFilter && SFX_APP()->ShouldUseExternalBrowser( rMedium.GetName() ) )
+ {
+ sal_Bool bIExplorer = sal_False;
+ INetURLObject aObj( rMedium.GetName() );
+ if ( aObj.GetProtocol() == INET_PROT_HTTP )
+ {
+ bIExplorer = sal_True;
+ }
+ else if ( aObj.GetProtocol() == INET_PROT_FILE || aObj.GetProtocol() == INET_PROT_FTP )
+ {
+ String aExt = aObj.GetExtension().ToLowerAscii();
+ if ( aExt.EqualsAscii("htm") || aExt.EqualsAscii("html") )
+ bIExplorer = sal_True;
+ }
+
+ if ( bIExplorer )
+ DBG_ERROR( "Das wre ihr Preis gewesen ... " );
+ }
+
+/*
+ // Erst jetzt auch das Betriebssystem einschalten
+ if ( !pFilter && 0 != GetContainer( DEFINE_CONST_UNICODE(SFX_FCONTNR_EXTAPP) ) )
+ {
+ sal_Bool bExternalAllowed = sal_True;
+ SFX_ITEMSET_ARG( rMedium.GetItemSet(), pFlags, SfxStringItem, SID_OPTIONS, sal_False);
+ if ( pFlags )
+ {
+ // Werte auf einzelne Items verteilen
+ String aFileFlags = pFlags->GetValue();
+ aFileFlags.ToUpperAscii();
+ if ( STRING_NOTFOUND != aFileFlags.Search( 'B' ) )
+ bExternalAllowed = sal_False;
+ else if ( STRING_NOTFOUND != aFileFlags.Search( 'H' ) )
+ bExternalAllowed = sal_False;
+ }
+
+ INetURLObject aURL( "macro:" );
+ String aReferer( rMedium.GetReferer() );
+ if ( !SFX_APP()->IsSecureURL( aURL, &aReferer ) )
+ bExternalAllowed = sal_False;
+
+ if ( bExternalAllowed && rMedium.GetURLObject().GetProtocol() == INET_PROT_HTTP )
+ bExternalAllowed = sal_False;
+
+ if ( aReferer.EqualsAscii("private:OpenEvent") )
+ bExternalAllowed = sal_False;
+
+ if ( bExternalAllowed && rMedium.GetPhysicalName().Len() )
+ {
+ String aName( '\"');
+ aName += rMedium.GetPhysicalName();
+ aName += '\"';
+ rMedium.SetTemporary(sal_False);
+
+ // Wenn "uber das Betriebssystem geladen werden kann, wird der aktuelle Ladevorgang
+ // abgebrochen
+ if ( System::StartProcess( NULL, aName ) )
+ return ERRCODE_ABORT;
+ }
+ }
+*/
+ if( nErr && nErr != ERRCODE_ABORT && nErr != ERRCODE_SFX_FORCEQUIET && nErr != ERRCODE_SFX_NEVERCHECKCONTENT )
+ return nErr;
+
+ if( nErr == ERRCODE_ABORT )
+ pFilter = 0;
+
+ pFilter = ResolveRedirection( pFilter, rMedium );
+
+ // Jetzt wird geprueft, ob das Modul auch einverstanden ist; ist das nicht der Fall, wird auf
+ // jeden Fall auf ConsultUser umgeschaltet
+ if( pFilter && bProvidesData )
+ {
+ if( nErr == ERRCODE_SFX_NEVERCHECKCONTENT )
+ nErr = ERRCODE_NONE;
+ else if( pFilter->GetFilterContainer()->GetFlags() & SFX_FILTER_CONTAINER_FACTORY )
+ {
+ rMedium.StartDownload();
+ if ( !rMedium.IsDownloadDone_Impl() )
+ {
+ if ( !pFilter->UsesStorage() && rMedium.GetInStream() && ( pFilter->GetFilterFlags() & SFX_FILTER_ASYNC ) )
+ // kurzzeitig auf synchron schalten solange die Apps sich weigern asynchron
+ // zu detecten
+ rMedium.ForceSynchronStream_Impl( sal_True );
+ else
+ {
+ *ppFilter = pFilter;
+ return ERRCODE_IO_PENDING;
+ }
+ }
+
+ const SfxFilter* pTmpFilter = pFilter;
+ nErr = pFilter->GetFilterContainer()->GetFilter4Content( rMedium, &pFilter, nMust, nDont );
+ CHECKERROR();
+
+ rMedium.ForceSynchronStream_Impl( sal_False );
+
+ // ABORT bedeutet Filter ungueltig
+ if( nErr && (nErr != ERRCODE_ABORT && nErr != ERRCODE_SFX_FORCEQUIET ) )
+ return nErr;
+
+ if( nErr == ERRCODE_ABORT && pFilter )
+ pFilter = 0;
+ }
+ }
+ }
+
+ // Jetzt einmal drueberiterieren und nur die perfekten Filter nehmen
+ if( !pFilter )
+ {
+ // Achtung: hier k"onnte auch asynchron detected werden!
+ rMedium.StartDownload();
+ if ( !rMedium.IsDownloadDone_Impl() )
+ return ERRCODE_IO_PENDING;
+
+ rMedium.IsStorage();
+ nErr = rMedium.GetErrorCode();
+ if( nErr )
+ return nErr;
+ nErr = GetFilter4Content( rMedium, &pFilter, nMust, nDont, sal_True );
+ CHECKERROR();
+ if( nErr && (nErr != ERRCODE_ABORT && nErr != ERRCODE_SFX_FORCEQUIET ) )
+ return nErr;
+
+ if( nErr == ERRCODE_ABORT && pFilter )
+ pFilter = 0;
+ }
+
+ // Letzte Moeglichkeit ist die Befragung aller ObjectFactories.
+ if( !pFilter )
+ {
+ // Achtung: hier k"onnte auch asynchron detected werden!
+ if ( !rMedium.IsDownloadDone_Impl() )
+ return ERRCODE_IO_PENDING;
+
+//DV !!!! don't close InStream when using the new Medium
+//rMedium.CloseInStream();
+
+ rMedium.IsStorage();
+ nErr = GetFilter4Content( rMedium, &pFilter, nMust, nDont );
+ CHECKERROR();
+ if( nErr && (nErr != ERRCODE_ABORT && nErr != ERRCODE_SFX_FORCEQUIET ) )
+ return nErr;
+
+ if( nErr == ERRCODE_ABORT && pFilter )
+ bConsultUser = sal_True;
+ }
+
+ if ( pFilter &&
+ ( pFilter == SfxExecutableFilterContainer::GetChooserFilter() && pFilter != pOldFilter ||
+ pFilter->GetFilterName().EqualsAscii(SFX_FILTER_DOWNLOAD) && !rMedium.IsRemote() ) )
+ pFilter = NULL;
+
+ *ppFilter = pFilter;
+
+ if ( ( ( pOldFilter && pOldFilter!=pFilter &&
+ ( !pOldFilter->IsOwnTemplateFormat() || !pFilter->IsOwnFormat() ) ) ) &&
+ nErr != ERRCODE_SFX_FORCEQUIET || bConsultUser )
+ return ERRCODE_SFX_CONSULTUSER;
+/*
+ if( rMedium.SupportsMIME_Impl() && bProvidesData &&
+ pFilter && !pFilter->UsesStorage() )
+ rMedium.GetInStream(); // Bei MIME Typen keinen Storage anfordern
+*/
+ if( !pOldFilter )
+ pOldFilter = pFilter;
+
+ // Checken, ob Daten vorliegen. Dies verhindert Fehler, die in
+ // GetFilter4Content auftreten und die Auswahlbox hochbringen.
+ ErrCode nMediumError = rMedium.GetErrorCode();
+ if( nMediumError )
+ return nMediumError;
+
+ *ppFilter = pFilter;
+ if ( ( nErr ||
+ ( pOldFilter && pOldFilter!=pFilter
+ && ( !pOldFilter->IsOwnTemplateFormat() ||
+ !pFilter->IsOwnFormat() ) ))
+ && nErr != ERRCODE_SFX_FORCEQUIET )
+ nErr = ERRCODE_SFX_CONSULTUSER;
+
+ if( nErr == ERRCODE_SFX_FORCEQUIET )
+ nErr = 0;
+ return nErr;
+};
+
+//----------------------------------------------------------------
+sal_Bool SfxFilterMatcher::IsFilterInstalled( const SfxFilter* pFilter )
+{
+ Window *pWindow = SFX_APP()->GetTopWindow();
+ if ( pFilter->GetFilterFlags() & SFX_FILTER_MUSTINSTALL )
+ {
+ // Hier k"onnte noch eine Nachinstallation angeboten werden
+ String aText( SfxResId( STR_FILTER_NOT_INSTALLED ) );
+ aText.SearchAndReplaceAscii( "$(FILTER)", pFilter->GetUIName() );
+ QueryBox aQuery( pWindow, WB_YES_NO | WB_DEF_YES, aText );
+ short nRet = aQuery.Execute();
+ if ( nRet == RET_YES )
+ {
+#ifdef DBG_UTIL
+ // Setup starten
+ InfoBox( pWindow, DEFINE_CONST_UNICODE("Hier soll jetzt das Setup starten!") ).Execute();
+#endif
+ // Installation mu\s hier noch mitteilen, ob es geklappt hat, dann kann das
+ // Filterflag gel"oscht werden
+ }
+
+ return ( !(pFilter->GetFilterFlags() & SFX_FILTER_MUSTINSTALL) );
+ }
+ else if ( pFilter->GetFilterFlags() & SFX_FILTER_CONSULTSERVICE )
+ {
+ String aText( SfxResId( STR_FILTER_CONSULT_SERVICE ) );
+ aText.SearchAndReplaceAscii( "$(FILTER)", pFilter->GetUIName() );
+ InfoBox ( pWindow, aText ).Execute();
+ return sal_False;
+ }
+ else
+ return sal_True;
+}
+
+
+sal_uInt32 SfxFilterMatcher::DetectFilter( SfxMedium& rMedium, const SfxFilter**ppFilter, sal_Bool bPlugIn, sal_Bool bAPI ) const
+/* [Beschreibung]
+
+ Hier wird noch die Filterauswahlbox hochgezogen. Sonst GuessFilter
+ */
+
+{
+ const SfxFilter* pOldFilter = rMedium.GetFilter();
+ if ( pOldFilter )
+ {
+ if( !IsFilterInstalled( pOldFilter ) )
+ pOldFilter = 0;
+ else
+ {
+ SFX_ITEMSET_ARG( rMedium.GetItemSet(), pSalvageItem, SfxStringItem, SID_DOC_SALVAGE, sal_False);
+ if ( ( pOldFilter->GetFilterFlags() & SFX_FILTER_PACKED ) && pSalvageItem )
+ // Salvage is always done without packing
+ pOldFilter = 0;
+ }
+ }
+
+ const SfxFilter* pFilter = pOldFilter;
+
+ sal_Bool bPreview = rMedium.IsPreview_Impl(), bInsert = sal_False;
+ SFX_ITEMSET_ARG(rMedium.GetItemSet(), pReferer, SfxStringItem, SID_REFERER, FALSE);
+ if ( bPreview && rMedium.IsRemote() && ( !pReferer || pReferer->GetValue().CompareToAscii("private:searchfolder:",21 ) != COMPARE_EQUAL ) )
+ return ERRCODE_ABORT;
+
+ ErrCode nErr = GuessFilter( rMedium, &pFilter );
+ if ( nErr == ERRCODE_ABORT )
+ return nErr;
+
+ if ( nErr == ERRCODE_IO_PENDING )
+ {
+ *ppFilter = pFilter;
+ return nErr;
+ }
+
+ if ( !pFilter )
+ {
+ const SfxFilter* pInstallFilter = NULL;
+
+ // Jetzt auch Filter testen, die nicht installiert sind ( ErrCode ist irrelevant )
+ GuessFilter( rMedium, &pInstallFilter, SFX_FILTER_IMPORT, SFX_FILTER_CONSULTSERVICE );
+ if ( pInstallFilter )
+ {
+ if ( IsFilterInstalled( pInstallFilter ) )
+ // Eventuell wurde der Filter nachinstalliert
+ pFilter = pInstallFilter;
+ }
+ else
+ {
+ // Jetzt auch Filter testen, die erst von Star bezogen werden m"ussen ( ErrCode ist irrelevant )
+ GuessFilter( rMedium, &pInstallFilter, SFX_FILTER_IMPORT, 0 );
+ if ( pInstallFilter )
+ IsFilterInstalled( pInstallFilter );
+ }
+ }
+
+ sal_Bool bHidden = bPreview;
+ SFX_ITEMSET_ARG( rMedium.GetItemSet(), pFlags, SfxStringItem, SID_OPTIONS, sal_False);
+ if ( !bHidden && pFlags )
+ {
+ String aFlags( pFlags->GetValue() );
+ aFlags.ToUpperAscii();
+ if( STRING_NOTFOUND != aFlags.Search( 'H' ) )
+ bHidden = sal_True;
+ }
+
+ if ( ( !pFilter || nErr == ERRCODE_SFX_CONSULTUSER ) && !bAPI && !bHidden )
+ {
+ if ( !pFilter && rMedium.IsRemote() )
+ pFilter = SfxExecutableFilterContainer::GetDownloadFilter();
+ else if ( !pFilter )
+ pFilter = pOldFilter;
+
+ String aTmpName;
+ if ( pFilter )
+ aTmpName = pFilter->GetUIName();
+
+ SfxFilterMatcher *pMatcher;
+ if( bPlugIn && pFilter )
+ pMatcher = new SfxFilterMatcher( (SfxFilterContainer *) pFilter->GetFilterContainer() );
+ else
+ pMatcher = (SfxFilterMatcher*) this;
+
+ SfxFilterDialog *pDlg = new SfxFilterDialog( 0, &rMedium, *pMatcher, pFilter ? &aTmpName: 0, 0 );
+ const sal_Bool bOk = RET_OK == pDlg->Execute();
+ if (bOk)
+ pFilter = pMatcher->GetFilter4UIName( pDlg->GetSelectEntry());
+
+ if( bPlugIn && pFilter )
+ delete pMatcher;
+ delete pDlg;
+
+ if ( !bOk)
+ nErr = ERRCODE_ABORT;
+ else
+ nErr = ERRCODE_NONE;
+
+ pFilter = ResolveRedirection( pFilter, rMedium );
+ }
+
+ *ppFilter = pFilter;
+
+ if ( bHidden || bAPI && nErr == ERRCODE_SFX_CONSULTUSER )
+ nErr = pFilter ? ERRCODE_NONE : ERRCODE_ABORT;
+ return nErr;
+}
+
+//----------------------------------------------------------------
+
+const SfxFilter* SfxFilterMatcher::GetDefaultFilter() const
+/* [Beschreibung]
+
+ Returned den ersten Filter, der nicht internal ist und im Filedialog
+ auftaucht
+ */
+{
+ SfxFilterMatcherIter aIter(
+ this, 0, SFX_FILTER_INTERNAL | SFX_FILTER_NOTINFILEDLG );
+ return aIter.First();
+}
+
+//----------------------------------------------------------------
+
+sal_uInt32 SfxFilterMatcher::GetFilter4Content(
+ SfxMedium& rMedium, const SfxFilter** ppFilter, SfxFilterFlags nMust, SfxFilterFlags nDont, sal_Bool bOnlyGoodOnes ) const
+{
+ sal_uInt32 nErr = ERRCODE_NONE;
+ SfxFContainerList_Impl& rList = pImpl->aList;
+ sal_uInt16 nCount = (sal_uInt16)rList.Count();
+ for( sal_uInt16 n = 0; n<nCount; n++ )
+ {
+ const SfxFilter* pFilter = 0;
+ nErr = rList.GetObject( n )->GetFilter4Content(
+ rMedium, &pFilter, nMust, nDont );
+ CHECKERROR();
+ if( nErr == ERRCODE_ABORT && bOnlyGoodOnes ) pFilter = 0;
+ if( pFilter )
+ {
+ *ppFilter = pFilter;
+ return nErr;
+ }
+ }
+ return 0;
+}
+
+//----------------------------------------------------------------
+
+#define IMPL_LOOP( Type, ArgType ) \
+const SfxFilter* SfxFilterMatcher::Type( \
+ ArgType rStr, SfxFilterFlags nMust, SfxFilterFlags nDont ) const \
+{ \
+ SfxApplication* pApp = SFX_APP(); \
+ if( this == &pApp->GetFilterMatcher() ) \
+ pApp->ForcePendingInitFactories(); \
+ SfxFContainerList_Impl& rList = pImpl->aList; \
+ sal_uInt16 nCount = (sal_uInt16)rList.Count(); \
+ for( sal_uInt16 n = 0; n<nCount; n++ ) \
+ { \
+ const SfxFilter* pFilter = \
+ rList.GetObject( n )->Type(rStr, nMust, nDont ); \
+ if( pFilter ) \
+ return pFilter; \
+ } \
+ return 0; \
+}
+
+IMPL_LOOP( GetFilter4Mime, const String& )
+IMPL_LOOP( GetFilter4EA, const String& )
+IMPL_LOOP( GetFilter4Extension, const String& )
+IMPL_LOOP( GetFilter4Protocol, SfxMedium& )
+IMPL_LOOP( GetFilter4ClipBoardId, sal_uInt32 )
+IMPL_LOOP( GetFilter, const String& )
+IMPL_LOOP( GetFilter4FilterName, const String& )
+IMPL_LOOP( GetFilter4UIName, const String& )
+
+//----------------------------------------------------------------
+
+sal_uInt32 SfxFilterMatcher::AppDetectFilter(
+ SfxMedium& rMedium, const SfxFilter** ppFilter, SfxFilterFlags nMust, SfxFilterFlags nDont )
+{
+ SfxFilterFlags nClass = nMust & SFX_FILTER_TEMPLATE ?
+ SFX_FILTER_TEMPLATE : USHRT_MAX;
+ return SFX_APP()->DetectFilter( rMedium, ppFilter, (sal_uInt16)nMust );
+}
+
+//----------------------------------------------------------------
+
+const SfxFilter* SfxFilterMatcher::ResolveRedirection( const SfxFilter* pFilter, SfxMedium& rMedium ) const
+{
+ return ResolveRedirection( pFilter, rMedium.GetURLObject().GetURLPath() );
+}
+
+const SfxFilter* SfxFilterMatcher::ResolveRedirection( const SfxFilter* pFilter, const String& rURLPath ) const
+{
+ while( sal_True )
+ {
+ if( !pFilter || !(pFilter->GetFilterFlags() & SFX_FILTER_REDIRECT))
+ return pFilter;
+ {
+ if( !(pFilter->GetFilterFlags() & SFX_FILTER_ALIEN ) )
+ // Es ist der Officefilter
+ {
+ sal_Bool bFound = sal_False;
+ String aName = ToUpper_Impl( rURLPath );
+
+ // jetzt auch die Nicht-Own-Filter f"ur das MsgDoc
+ SfxFilterMatcherIter aIter( this, SFX_FILTER_IMPORT );
+ for( const SfxFilter* pAppFilter = aIter.First(); pAppFilter;
+ pAppFilter = aIter.Next() )
+ {
+ SfxFilterFlags nFlags = pAppFilter->GetFilterFlags();
+ // aber nicht den OfficeFilter
+ WildCard aCard( ToUpper_Impl( pAppFilter->GetWildcard()() ), ';' );
+ if ( aCard() == DEFINE_CONST_UNICODE("*.*") || aCard() == '*' )
+ continue;
+
+ if( aCard.Matches( aName ) && pAppFilter != pFilter )
+ {
+ pFilter = pAppFilter;
+ bFound = sal_True;
+ break;
+ }
+ }
+
+ if (!bFound)
+ {
+ DBG_ERROR( "AppFilter nicht gefunden" );
+ return 0;
+ }
+ }
+ else
+ {
+ String aData = pFilter->GetUserData();
+ if( aData.GetTokenCount( '|' )!=2 )
+ {
+ DBG_ERROR( "Schlechtes Redirectionsformat" );
+ return 0;
+ }
+ else
+ {
+ String aContainer = aData.GetToken( 0, '|' );
+ String aFilter = aData.GetToken( 1, '|' );
+ SfxFilterContainer* pCont = GetContainer( aContainer );
+ if( pCont )
+ pFilter = pCont->GetFilter4FilterName( aFilter );
+ else
+ return 0;
+ }
+ }
+ }
+ }
+}
+
+//----------------------------------------------------------------
+
+IMPL_STATIC_LINK( SfxFilterMatcher, MaybeFileHdl_Impl, String*, pString )
+{
+ const SfxFilter* pFilter =
+ pThis->GetFilter4Extension( *pString, SFX_FILTER_IMPORT );
+ if( pFilter && !pFilter->GetWildcard().Matches( String() ) &&
+ pFilter->GetWildcard() != DEFINE_CONST_UNICODE("*.*") && pFilter->GetWildcard() != '*' )
+ return sal_True;
+ return sal_False;
+}
+
+//----------------------------------------------------------------
+
+SfxFilterMatcherIter::SfxFilterMatcherIter(
+ const SfxFilterMatcher* pMatchP,
+ SfxFilterFlags nOrMaskP, SfxFilterFlags nAndMaskP )
+ : pMatch( pMatchP->pImpl),
+ nOrMask( nOrMaskP ), nAndMask( nAndMaskP )
+{
+ // Iterator auf AppFilterMatcher -> DoInitFactory
+ SfxApplication* pApp = SFX_APP();
+ if( pMatchP == &pApp->GetFilterMatcher() )
+ pApp->ForcePendingInitFactories();
+ if( nOrMask == 0xffff ) //Wg. Fehlbuild auf s
+ nOrMask = 0;
+}
+
+//----------------------------------------------------------------
+
+const SfxFilter *SfxFilterMatcherIter::Forward_Impl()
+{
+ sal_uInt16 nCount = (sal_uInt16 )pMatch->aList.Count();
+ for( ++nAktContainer; nAktContainer < nCount ; nAktContainer++ )
+ {
+ pCont = pMatch->aList.GetObject( nAktContainer );
+ sal_uInt16 nCnt = pCont->GetFilterCount();
+ if( nCnt )
+ {
+ nBorder=nCnt;
+ nAktFilter = 0;
+ return pCont->GetFilter( 0 );
+ }
+ }
+ return 0;
+}
+
+//----------------------------------------------------------------
+
+const SfxFilter* SfxFilterMatcherIter::First_Impl()
+{
+ nAktFilter = -1;
+ nAktContainer = -1;
+ nBorder = 0;
+
+ return Forward_Impl();
+}
+
+//----------------------------------------------------------------
+
+const SfxFilter* SfxFilterMatcherIter::Next_Impl()
+{
+ if( ++nAktFilter < nBorder )
+ return pCont->GetFilter( nAktFilter );
+ return Forward_Impl();
+}
+
+//----------------------------------------------------------------
+
+const SfxFilter* SfxFilterMatcherIter::First()
+{
+ const SfxFilter* pFilter;
+ for( pFilter = First_Impl(); pFilter; pFilter = Next_Impl())
+ {
+ SfxFilterFlags nFlags = pFilter->GetFilterFlags();
+ if( ((nFlags & nOrMask) == nOrMask ) && !(nFlags & nAndMask ) )
+ break;
+ }
+ return pFilter;
+}
+
+//----------------------------------------------------------------
+
+const SfxFilter* SfxFilterMatcherIter::Next()
+{
+ const SfxFilter* pFilter;
+ for( pFilter = Next_Impl(); pFilter; pFilter = Next_Impl())
+ {
+ SfxFilterFlags nFlags = pFilter->GetFilterFlags();
+ if( ((nFlags & nOrMask) == nOrMask ) && !(nFlags & nAndMask ) )
+ break;
+ }
+ return pFilter;
+}
+
+//----------------------------------------------------------------
+
+SfxFrameWindowFactory::SfxFrameWindowFactory(
+ FactoryFunc pFuncP, String aNameP ) :
+ pFunc( pFuncP ), aName( aNameP.ToUpperAscii() )
+{
+}
+
+SfxPluginFilterContainer::SfxPluginFilterContainer()
+ : SfxFilterContainer( DEFINE_CONST_UNICODE("plugin") )
+ , bInitialized( Application::IsRemoteServer() )
+{
+ SFX_APP()->InsertLateInitHdl( LINK( this, SfxPluginFilterContainer, LoadHdl_Impl ) );
+}
+
+sal_uInt32 SfxPluginFilterContainer::Execute( SfxMedium& rMedium, SfxFrame*& pFrame) const
+{
+/*
+ rMedium.Close();
+ ::rtl::OUString aTargetURL = rMedium.GetURLObject().GetMainURL();
+ rMedium.GetItemSet()->Put( SfxStringItem( SID_CONTENTTYPE, rMedium.GetFilter()->GetMimeType() ) );
+ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > aArgs;
+ TransformItems( SID_OPENDOC, *rMedium.GetItemSet(), aArgs );
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrameLoader > xLoader( (::cppu::OWeakObject*)new PluginLoader(::utl::getProcessServiceFactory()), ::com::sun::star::uno::UNO_QUERY );
+ rMedium.GetItemSet()->Put( SfxStringItem( SID_FILTER_NAME, rMedium.GetFilter()->GetName() ) );
+ USHORT nRet = pFrame->LoadComponent_Impl( aTargetURL, aArgs, xLoader, rMedium.GetItemSet() );
+
+ if ( nRet == RET_NEWTASK )
+ rMedium.GetItemSet()->Put( SfxStringItem( SID_TARGETNAME, DEFINE_CONST_UNICODE("_blank") ) );
+
+ if ( nRet == RET_OK || nRet == RET_CANCEL )
+ return ERRCODE_ABORT;
+ else if ( nRet == RET_NEWTASK )
+ return ERRCODE_SFX_RESTART;
+ else // nRet == RET_PENDING !
+ return ERRCODE_IO_PENDING;
+ */
+ return ERRCODE_IO_NOTSUPPORTED;
+}
+
+sal_uInt16 SfxPluginFilterContainer::GetFilterCount() const
+{
+ if ( !bInitialized )
+ SAL_CONST_CAST(SfxPluginFilterContainer*, this)->LoadHdl_Impl( 0 );
+ return SfxFilterContainer::GetFilterCount();
+}
+
+IMPL_LINK( SfxPluginFilterContainer, LoadHdl_Impl, void*, pVoid )
+{
+ if ( bInitialized )
+ return 0;
+
+ bInitialized = sal_True;
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xMan = ::utl::getProcessServiceFactory();
+ ::com::sun::star::uno::Reference< ::com::sun::star::plugin::XPluginManager > xPlugMgr( xMan->createInstance( DEFINE_CONST_UNICODE("com.sun.star.plugin.PluginManager") ), ::com::sun::star::uno::UNO_QUERY );
+ if( xPlugMgr.is() )
+ {
+ // Alle MIME-Types, f"ur die Plugins registriert sind, werden als
+ // Filter registriert
+ ::com::sun::star::uno::Sequence< ::com::sun::star::plugin::PluginDescription > aDescr = xPlugMgr->getPluginDescriptions();
+ const ::com::sun::star::plugin::PluginDescription *pArr = aDescr.getConstArray();
+ for ( sal_uInt16 n=0; n<aDescr.getLength(); n++ )
+ {
+ ::rtl::OUString aExt = pArr[n].Extension;
+ if ( aExt.compareToAscii("*") != 0 )
+ {
+ // Den default-Filter wollen wir nicht, da die Filter dazu
+ // dienen sollen, registrierte PlugIns beim Laden als Dokument
+ // zu erkennen
+
+ String aExtension( aExt );
+
+ // Fix fuer 3.0 PlugIns mit mehreren FileExt.
+ sal_uInt16 nPos = 0;
+ while( (nPos = aExtension.SearchAndReplace(',', ';', nPos)) != STRING_NOTFOUND )
+ ;
+// aExtension.Insert("*.", nPos+1);
+// aExtension.Insert( "*.", 0 );
+ String aPlug = pArr[n].Description;
+ aPlug += DEFINE_CONST_UNICODE(" (PlugIn)");
+ String aEmpty;
+ SfxFilter *pFilter = new SfxFilter( aPlug, aExtension,
+ SFX_FILTER_PLUGIN|SFX_FILTER_IMPORT|SFX_FILTER_EXECUTABLE,
+ 0, String(), aPlug, 0, pArr[n].Mimetype, this, String() );
+ AddFilter( pFilter, GetFilterCount() );
+ }
+ }
+ }
+ else
+ new SfxAsyncServiceErrorHandler_Impl( DEFINE_CONST_UNICODE("PluginManager") );
+
+ return 0;
+}
+
+const SfxFilter* SfxPluginFilterContainer::GetFilter4Protocol( SfxMedium& rMed, SfxFilterFlags nMust, SfxFilterFlags nDont ) const
+{
+ if ( !bInitialized )
+ SAL_CONST_CAST(SfxPluginFilterContainer*, this)->LoadHdl_Impl( 0 );
+ return SfxFilterContainer::GetFilter4Protocol( rMed, nMust, nDont );
+}
+
+
diff --git a/sfx2/source/bastyp/fltfnc.src b/sfx2/source/bastyp/fltfnc.src
new file mode 100644
index 000000000000..453b62e85c65
--- /dev/null
+++ b/sfx2/source/bastyp/fltfnc.src
@@ -0,0 +1,186 @@
+/*************************************************************************
+ *
+ * $RCSfile: fltfnc.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:28 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+ // include ---------------------------------------------------------------
+#include "sfx.hrc"
+#include "bastyp.hrc"
+#include "helpid.hrc"
+String STR_FILTER_CHANNELON_OFFLINE
+{
+ Text = "Dieses Abonnement soll gem Einstellung im Offline Modus gelesen werden.\n\nDas StarOffice befindet sich aber im Online Modus. Mchten Sie StarOffice jetzt in den Offline Modus umschalten?" ;
+ Text [ english_us ] = "This subscription is set to be read in the offline mode.\n\nStarOffice is presently in the online mode. Switch to offline mode now?" ;
+ Text [ portuguese_brazilian ] = "Dieses Abonnement soll gem Einstellung im Offline Modus gelesen werden.\n\nDas StarOffice befindet sich aber im Online Modus. Mchten Sie StarOffice jetzt in den Offline Modus umschalten?" ;
+ Text [ swedish ] = "Denna prenumeration skall enligt instllningarna lsas i offlinelget.\n\nMen StarOffice r i onlinelge. Vill Du vxla till offlinelget nu?" ;
+ Text [ danish ] = "Dette abonnement skal iflge indstillingerne lses i offlinetilstand.\n\nDit StarOffice befinder sig for tiden i onlinetilstand. Vil du skifte til offlinetilstand nu?" ;
+ Text [ italian ] = "Questa sottoscrizione deve essere letta nel modo offline conformemente all'impostazione. \n\nStarOffice attualmente si trova nel modo online. Volete passare al modo offline?" ;
+ Text [ spanish ] = "Esta suscripcin se debe poder leer en modo desconectado (Offline).\n\nStarOffice se encuentra sin embargo en modo en lnea. Desea cambiar StarOffice al modo desconectado?" ;
+ Text [ french ] = "Cet abonnement ne peut tre lu que hors connexion.\n\nStarOffice est cependant en ligne. Souhaitez-vous dconnecter StarOffice maintenant?" ;
+ Text [ dutch ] = "Dit abonnement moet in offline modus worden gelezen.\n\nStarOffice bevindt zich echter in de online-modus. Wilt u omschakelen naar offline-modus?" ;
+ Text [ portuguese ] = "Esta subscrio foi definida para ser lida em offline.\n\nDe momento o StarOffice encontra-se no modo online. Deseja passar ao modo offline? " ;
+ Text[ chinese_simplified ] = "趨ûʹѻĶģʽ\n\nStarOffice ڴ״̬Ҫ StarOffice תѻģʽ";
+ Text[ russian ] = " , , Offline.\n\nStarOffice Online. StarOffice Offline?";
+ Text[ polish ] = "Wedug ustawie ta subskrypcja ma zosta odczytana w trybie offline.\n\n StarOffice znajduje si w trybie online. Czy przeczy na tryb offline?";
+ Text[ japanese ] = "̍wǂ͵ײ Ӱނł̐ݒɏ]ēǂݎ܂B\n\nStarOffice ݵײ ӰނɂȂĂ܂BStarOffice ײ Ӱނɐ؂芷܂?";
+ Text[ chinese_traditional ] = "ӳ]wϥΪ̨ϥγsu\\ŪҦC\n\nStarOffice {bBuWACzn StarOffice suҦH";
+ Text[ arabic ] = " ߡ ʡ .\n\nStarOffice . StarOffice ";
+ Text[ greek ] = " .\n\n StarOffice ' . ;";
+ Text[ korean ] = "˸û 忡 б ˴ϴ.\n\nStarOffice ¶θԴϴ. ȯϽðڽϱ?";
+ Text[ turkish ] = "Bu yelik, evrimd kipte okunmak zere ayarlanmtr.\n\nStarOffice u an evrimii kipinde. StarOffice, evrimd kipe gesin mi?";
+ Text[ language_user1 ] = " ";
+};
+String STR_FILTER_EXTERNAL
+{
+ Text = "Andere Anwendung" ;
+ Text [ english ] = "Other application" ;
+ Text [ english_us ] = "Other application" ;
+ Text [ portuguese ] = "Outra aplicao" ;
+ Text [ portuguese_brazilian ] = "Andere Anwendung" ;
+ Text [ swedish ] = "Annan tillmpning" ;
+ Text [ danish ] = "Anden applikation" ;
+ Text [ italian ] = "Altra applicazione" ;
+ Text [ spanish ] = "Otra aplicacin" ;
+ Text [ french ] = "Autres applications" ;
+ Text [ dutch ] = "Andere toepassing" ;
+ Text[ chinese_simplified ] = "Ӧó";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Inna aplikacja";
+ Text[ japanese ] = "ق̱ع";
+ Text[ chinese_traditional ] = "䥦ε{";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = "Ÿ α׷";
+ Text[ turkish ] = "Dier uygulama";
+ Text[ language_user1 ] = " ";
+};
+
+String STR_FILTER_COMPONENT
+{
+ Text = "StarOffice Komponente" ;
+ Text [ english ] = "StarOffice Component" ;
+ Text [ english_us ] = "StarOffice Component" ;
+ Text[ portuguese ] = "Componentes StarOffice";
+ Text[ russian ] = "StarOffice - ";
+ Text[ greek ] = "StarOffice - ";
+ Text[ dutch ] = "StarOffice component";
+ Text[ french ] = "Composants de StarOffice";
+ Text[ spanish ] = "StarOffice Componentes";
+ Text[ italian ] = "Componenti StarOffice";
+ Text[ danish ] = "StarOffice komponent";
+ Text[ swedish ] = "StarOffice-komponent";
+ Text[ polish ] = "Skadnik StarOffice ";
+ Text[ portuguese_brazilian ] = "StarOffice Component";
+ Text[ japanese ] = "StarOffice ߰";
+ Text[ korean ] = "StarOffice Ʈ";
+ Text[ chinese_simplified ] = "StarOffice ";
+ Text[ chinese_traditional ] = "StarOffice ";
+ Text[ arabic ] = " StarOffice";
+ Text[ turkish ] = "StarOffice bileeni";
+};
+
+String STR_FILTER_NOT_INSTALLED
+{
+ Text = "Der ausgewhlte Filter $(FILTER) ist nicht installiert.\nMchten Sie das nachholen ?";
+ Text [ English ] = " The selected filter $(FILTER) has not been installed.\nWould you like to do this now ?";
+ Text[ english_us ] = "The selected filter $(FILTER) has not been installed.\nWould you like to do this now ?";
+ Text[ portuguese ] = "O filtro seleccionado $(FILTER) no est instalado.\nInstalar agora?";
+ Text[ russian ] = " $(FILTER) .\n ?";
+ Text[ dutch ] = "De gekozen filter $(FILTER) is niet genstalleerd.\nWilt u dat nu doen ?";
+ Text[ french ] = "Le filtre $(FILTER) que vous avez slectionn n'est pas install\nSouhaitez-vous l'installer ?";
+ Text[ spanish ] = "El filtro seleccionado $(FILTER) no ha sido instalado.\nDesea instalarlo?";
+ Text[ italian ] = "Il filtro selezionato $(FILTER) non stato instalalto.\nVolete installarlo adesso?";
+ Text[ danish ] = "Det udvalgte filter $(FILTER) er ikke installeret.\nVil du installere det nu?";
+ Text[ swedish ] = "Det utvalda filtret $(FILTER) r inte installerat.\nVill Du gra det nu?";
+ Text[ polish ] = "Wybrany filtr $(FILTER) nie jest zainstalowany.\nCzy to teraz zrobi ?";
+ Text[ portuguese_brazilian ] = "The selected filter $(FILTER) has not been installed.\nWould you like to do this now ?";
+ Text[ japanese ] = "Iꂽ̨$(FILTER)ͲݽİقĂ܂B\nݽİقꂽł?";
+ Text[ chinese_simplified ] = "ѡĹ $(FILTER)ûбװá\nҪװ";
+ Text[ chinese_traditional ] = "zܪLo $(FILTER)٨Sw˦nC\n{bnwˡH";
+ Text[ arabic ] = " $(FILTER) .\n ";
+ Text[ greek ] = " $(FILTER) .\n ;";
+ Text[ korean ] = "õ $(FILTER) ġǾ ʽϴ.\n ġ Ͻðڽϱ ?";
+ Text[ turkish ] = "Seilen $(FILTER) filtresi kurulu deil.\nimdi kurmak ister misiniz ?";
+ Text[ language_user1 ] = " ";
+};
+
+String STR_FILTER_CONSULT_SERVICE
+{
+ Text = "Der ausgewhlte Filter $(FILTER) ist in Ihrer Edition nicht enthalten.\nInformationen zu Bestellmglichkeiten finden Sie auf unserer Homepage.";
+ Text [ English ] = "The selected filter $(FILTER) is not included in your edition.\nOrdering informations can be found on our website.";
+ Text[ english_us ] = "The selected filter $(FILTER) is not included in your edition.\nYou can find information about orders on our homepage.";
+ Text[ portuguese ] = "O filtro seleccionado $(FILTER) no est includo na sua verso.\nEncontrar as informaes necessrias para uma possvel encomenda na nossa pgina principal.";
+ Text[ russian ] = " $(FILTER) .\n .";
+ Text[ dutch ] = "De geselecteerde filter $(FILTER) komt in uw versie niet voor.\nVoor informatie over bestelmogelijkheden zie onze homepage.";
+ Text[ french ] = "Le filtre $(FILTER) que vous avez slectionn n'est pas inclus dans votre version.\nVous trouverez les renseignements ncessaires une ventuelle commande sur notre page d'accueil.";
+ Text[ spanish ] = "El filtro seleccionado $(FILTER) no est incluido en su edicin.\nEn nuestra pgina de Internet encontrar las informaciones para poder pedirlos.";
+ Text[ italian ] = "Il filtro selezionato $(FILTER) non incluso nella vostra versione.\nTroverete informazioni su eventuali ordini sulla nostra home page.";
+ Text[ danish ] = "De udvalgte filter $(FILTER) er ikke indeholdt i din version.\nDu kan finde informationer omkring ordremuligheder p vores hjemmeside.";
+ Text[ swedish ] = "Det utvalda filtret $(FILTER) r inte inkluderat i Din version.\nDu hittar information om bestllningsmjligheter p vr hemsida.";
+ Text[ polish ] = "Wybrany filtr $(FILTER) nie jest zawarty w twoim edytorze. \nInformacje dotyczce zamwienia znajdziesz na naszej stronie macierzystej.";
+ Text[ portuguese_brazilian ] = "The selected filter $(FILTER) is not included in your version.\nPlease contact our sales department.";
+ Text[ japanese ] = "Iꂽ̨$(FILTER)հް̎gpłɊ܂܂Ă܂B\n”\\ȏ͂킪Ђΰ߰Ŏɓ܂B";
+ Text[ chinese_simplified ] = "汾ûṩѡĹ $(FILTER)\nǹ˾ҳṩϢ";
+ Text[ chinese_traditional ] = "oӪ٨SѱzҿܪLo $(FILTER)C\nаѾ\\ڭ̪Ѫwʳn骺TC";
+ Text[ arabic ] = " $(FILTER) .\n .";
+ Text[ greek ] = " $(FILTER) .\n .";
+ Text[ korean ] = " $(FILTER) ʽϴ.\nֹ û ɼ Ȩ ʽÿ.";
+ Text[ turkish ] = "Seilen $(FILTER) filtresi srmnzde bulunmuyor.\nSipari etmek iin gereken bilgileri web sitemizde bulabilirsiniz.";
+ Text[ language_user1 ] = " ";
+};
diff --git a/sfx2/source/bastyp/frmhtml.cxx b/sfx2/source/bastyp/frmhtml.cxx
new file mode 100644
index 000000000000..8ce52764ec2a
--- /dev/null
+++ b/sfx2/source/bastyp/frmhtml.cxx
@@ -0,0 +1,880 @@
+/*************************************************************************
+ *
+ * $RCSfile: frmhtml.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:28 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include <tools/list.hxx>
+#include <tools/table.hxx>
+
+#ifndef _SFXINIMGR_HXX //autogen
+#include <svtools/iniman.hxx>
+#endif
+#ifndef _HTMLTOKN_H
+#include <svtools/htmltokn.h>
+#endif
+#pragma hdrstop
+
+#include "docinf.hxx"
+
+#define _SVSTDARR_USHORTS
+#define _SVSTDARR_ULONGS
+#include <svtools/svstdarr.hxx>
+
+#include "sfx.hrc"
+
+#include "app.hxx"
+#include "frmhtml.hxx"
+#include "fsetobsh.hxx"
+#include "docfile.hxx"
+#include "viewfrm.hxx"
+#include "evntconf.hxx"
+#include "request.hxx"
+#include "fcontnr.hxx"
+#include "sfxtypes.hxx"
+#include "inimgr.hxx"
+
+#define SFX_HTMLFRMSIZE_REL 0x0001
+#define SFX_HTMLFRMSIZE_PERCENT 0x0002
+
+static sal_Char __READONLY_DATA sHTML_SC_yes[] = "YES";
+static sal_Char __READONLY_DATA sHTML_SC_no[] = "NO";
+static sal_Char __READONLY_DATA sHTML_SC_auto[] = "AUTO";
+
+#define HTML_O_READONLY "READONLY"
+#define HTML_O_EDIT "EDIT"
+
+static HTMLOptionEnum __READONLY_DATA aScollingTable[] =
+{
+ { sHTML_SC_yes, ScrollingYes },
+ { sHTML_SC_no, ScrollingNo },
+ { sHTML_SC_auto, ScrollingAuto },
+ { 0, 0 }
+};
+
+SV_IMPL_PTRARR( _SfxFrameHTMLContexts, _SfxFrameHTMLContext* )
+
+long SfxParserDelete_Impl( void* pObj, void* pArg )
+{
+ ((SfxFrameHTMLParser*)pArg )->ReleaseRef();
+ delete (AsynchronLink*)pObj;
+ return 0;
+}
+
+/* */
+
+_SfxFrameHTMLContext::_SfxFrameHTMLContext( const SfxFrameHTMLParser *pParser ) :
+ nFrame( pParser->nFrame ),
+ pFrameSet( pParser->pFrameSet )
+{}
+
+_SfxFrameHTMLContext::~_SfxFrameHTMLContext()
+{}
+
+/* */
+
+void SfxFrameHTMLParser::SaveContext()
+{
+ _SfxFrameHTMLContext *pContext = new _SfxFrameHTMLContext( this );
+ aContextStack.C40_INSERT( _SfxFrameHTMLContext, pContext,
+ aContextStack.Count() );
+}
+
+void SfxFrameHTMLParser::InitContext( SfxFrameSetDescriptor *pFSet )
+{
+ nFrame = 0;
+ pFrameSet = pFSet;
+}
+
+void SfxFrameHTMLParser::RestoreContext()
+{
+ DBG_ASSERT( aContextStack.Count(), "keine Kontexte mehr vorhanden!" )
+ if( !aContextStack.Count() )
+ return;
+
+ _SfxFrameHTMLContext *pContext =
+ aContextStack[ aContextStack.Count()-1 ];
+ aContextStack.Remove( aContextStack.Count()-1, 1 );
+
+ nFrame = pContext->nFrame;
+ pFrameSet = pContext->pFrameSet;
+
+ delete pContext;
+}
+
+/* */
+
+SfxFrameDescriptor *SfxFrameHTMLParser::GetCurrentFrame() const
+{
+ if( !pFrameSet || nFrame >= pFrameSet->GetFrameCount() )
+ return 0;
+ return pFrameSet->GetFrame( nFrame );
+}
+
+void SfxFrameHTMLParser::IncFramePos()
+{
+ if( !pFrameSet || nFrame >= pFrameSet->GetFrameCount() )
+ return;
+ nFrame++;
+}
+
+/* */
+
+void SfxFrameHTMLParser::ParseSizeSpec( const String& rSpec,
+ SvULongs& rSizes,
+ SvUShorts& rAttrs ) const
+{
+ if( !rSpec.Len() )
+ return;
+
+ xub_StrLen nPos = 0, nEnd = 0;
+ while( STRING_NOTFOUND != nEnd )
+ {
+ sal_Unicode c;
+ while ( ( c = rSpec.GetChar(nPos) ) == ' ' || c == '\t' ||
+ c == '\n' || c == '\r' )
+ {
+ nPos++;
+ }
+
+ nEnd = rSpec.Search( ',', nPos );
+
+ String aTmp( rSpec.Copy( nPos, STRING_NOTFOUND==nEnd ? STRING_LEN
+ : nEnd-nPos ) );
+ sal_Int32 nSz = aTmp.ToInt32();
+ if ( nSz == 0L && aTmp.Search('0') == STRING_NOTFOUND )
+ nSz = 1L;
+
+ rSizes.Insert( nSz, rSizes.Count() );
+ USHORT nAttrs = 0;
+ if( STRING_NOTFOUND != aTmp.Search( '*' ) )
+ nAttrs |= SFX_HTMLFRMSIZE_REL;
+ else if( STRING_NOTFOUND != aTmp.Search( '%' ) )
+ nAttrs |= SFX_HTMLFRMSIZE_PERCENT;
+
+ rAttrs.Insert( nAttrs, rAttrs.Count() );
+
+ nPos = nEnd;
+ nPos++;
+ }
+}
+
+void SfxFrameHTMLParser::Continue( int nToken )
+{
+ String sTmpBaseURL( INetURLObject::GetBaseURL() );
+ INetURLObject::SetBaseURL( aBaseURL );
+
+ HTMLParser::Continue( nToken );
+
+ INetURLObject::SetBaseURL( sTmpBaseURL );
+}
+
+/* */
+
+void SfxFrameHTMLParser::NextToken( int nToken )
+{
+ if( bInNoFrames )
+ {
+ switch ( nToken )
+ {
+ case HTML_META:
+ return;
+ break;
+ case HTML_NOFRAMES_OFF:
+ bInNoFrames = FALSE;
+ break;
+ default:
+ break;
+ }
+ }
+
+ switch( nToken )
+ {
+ case HTML_BODY_ON:
+ // Without JavaScript, the cann be ignored.
+ break;
+
+ case HTML_META:
+ if( pDoc )
+ {
+ ParseMetaOptions( GetDocInfo(), pDoc->GetHeaderAttributes() );
+ }
+ break;
+
+ case HTML_TITLE_ON:
+ InsertTitle();
+ break;
+
+ case HTML_BASE:
+ {
+ const HTMLOptions *pOptions = GetOptions();
+ USHORT nArrLen = pOptions->Count();
+
+ for( USHORT i = pOptions->Count(); i; )
+ {
+ const HTMLOption *pOption = (*pOptions)[ --i ];
+ switch( pOption->GetToken() )
+ {
+ case HTML_O_HREF:
+ aBaseURL = pOption->GetString();
+// INetURLObject::SetBaseURL( aBaseURL );
+ break;
+ }
+ }
+ }
+ break;
+
+ case HTML_FRAMESET_ON:
+ if( pDocFrameSet )
+ NewFrameSet();
+ else
+ {
+ // es ist ein Frames Dokument
+ bIsFrameDoc = TRUE;
+ eState = SVPAR_ACCEPTED;
+ }
+ break;
+ case HTML_FRAMESET_OFF:
+ if( pDocFrameSet )
+ EndFrameSet();
+ break;
+
+ case HTML_FRAME_ON:
+ if( pDocFrameSet )
+ InsertFrame();
+ break;
+
+ case HTML_NOFRAMES_ON:
+ bInNoFrames = TRUE;
+ break;
+
+ case HTML_APPLET_ON:
+ case HTML_IFRAME_ON:
+ case HTML_LINEBREAK:
+ case HTML_HORZRULE:
+ case HTML_IMAGE:
+ case HTML_EMBED:
+ case HTML_INPUT:
+ case HTML_SELECT_ON:
+ case HTML_TEXTAREA_ON:
+ if( !pDocFrameSet )
+ {
+ // es ist kein Frames Dokument (natuerlich gibt es noch mehr Tags,
+ // aber dies duerften die haeufigsten am Dok-Anfang sein
+ bIsFrameDoc = FALSE;
+ eState = SVPAR_ACCEPTED;
+ }
+ break;
+
+ case HTML_TEXTTOKEN:
+ if( !pDocFrameSet && aToken.Len() &&
+ (aToken.Len() > 1 || ' ' != aToken.GetChar(0)) )
+ {
+ // es ist kein Frames Dokument
+ bIsFrameDoc = FALSE;
+ eState = SVPAR_ACCEPTED;
+ }
+ break;
+ case HTML_SCRIPT_ON:
+ NewScript();
+ break;
+
+ case HTML_SCRIPT_OFF:
+ EndScript();
+ break;
+
+ case HTML_RAWDATA:
+ if( IsReadScript() && !bIgnoreRawData )
+ {
+ if( aScriptSource.Len() )
+ aScriptSource += '\n';
+ aScriptSource += aToken;
+ }
+ break;
+
+// case HTML_UNKNOWNCONTROL_ON:
+// if( IsInHeader() && !aUnknownToken.Len() &&
+// sSaveToken.Len() && '!' != sSaveToken.GetChar(0) )
+// aUnknownToken = sSaveToken;
+// break;
+ }
+}
+
+void SfxFrameHTMLParser::NewScript()
+{
+ BOOL bFinishDownload = FALSE;
+ String aScriptURL;
+ String aScriptType;
+ String aLib, aModule;
+ ParseScriptOptions( aScriptType, eScriptType, aScriptURL,
+ aLib, aModule );
+
+ if( aScriptURL.Len() && HTML_SL_JAVASCRIPT == eScriptType )
+ {
+ // Den Inhalt des Script-Tags ignorieren
+ bIgnoreRawData = TRUE;
+ }
+}
+
+void SfxFrameHTMLParser::EndScript()
+{
+ bIgnoreRawData = FALSE;
+
+ // MIB: 3/3/2000: Scripts a ignored currently?
+ aScriptSource.Erase();
+}
+
+/* */
+
+void SfxFrameHTMLParser::InsertTitle()
+{
+ String aTitle;
+ int nToken;
+ while( HTML_TEXTTOKEN == (nToken = GetNextToken()) && IsParserWorking() )
+ {
+ aTitle += aToken;
+ }
+
+ if( SVPAR_PENDING == GetStatus() )
+ return;
+
+ // Wir sollten jetzt eigentlich auf einem </TITLE> stehen, das wir
+ // aber ignorieren
+ if( HTML_TITLE_OFF != nToken )
+ SkipToken( -1 );
+
+ SfxDocumentInfo *pDocInfo = GetDocInfo();
+ if( aTitle.Len() && pDocInfo && !pDocInfo->GetTitle().Len() )
+ {
+ pDocInfo->SetTitle( aTitle );
+ }
+}
+
+void SfxFrameHTMLParser::NewFrameSet()
+{
+ String aRowSpec, aColSpec;
+ Wallpaper aWallpaper;
+ BOOL bBorder = TRUE;
+ BOOL bBorderSet = FALSE;
+ BOOL bSpacingSet = FALSE;
+ BOOL bBrushSet = FALSE;
+ long nSpacing = 0L;
+
+ // die Optionen holen
+ ScriptType eScriptType = STARBASIC;
+ USHORT nEvent;
+
+ const HTMLOptions *pOptions = GetOptions();
+ USHORT nArrLen = pOptions->Count();
+ for ( USHORT i=0; i<nArrLen; i++ )
+ {
+ BOOL bSetEvent = FALSE;
+ const HTMLOption *pOption = (*pOptions)[i];
+ switch( pOption->GetToken() )
+ {
+ case HTML_O_BORDERCOLOR:
+ {
+ Color aColor;
+ pOption->GetColor( aColor );
+ aWallpaper.SetColor( aColor );
+ bBrushSet = TRUE;
+ break;
+ }
+ case HTML_O_ROWS:
+ aRowSpec = pOption->GetString();
+ break;
+ case HTML_O_COLS:
+ aColSpec = pOption->GetString();
+ break;
+ case HTML_O_FRAMEBORDER:
+ {
+ bBorderSet = TRUE;
+ String aStr = pOption->GetString();
+ bBorder = TRUE;
+ if ( aStr.EqualsIgnoreCaseAscii("NO") ||
+ aStr.EqualsIgnoreCaseAscii("0") )
+ bBorder = FALSE;
+ break;
+ }
+ case HTML_O_FRAMESPACING:
+ case HTML_O_BORDER:
+ bSpacingSet = TRUE;
+ nSpacing = pOption->GetNumber();
+ break;
+ case HTML_O_ONLOAD:
+ eScriptType = JAVASCRIPT;
+ case HTML_O_SDONLOAD:
+ nEvent = SFX_EVENT_OPENDOC;
+ bSetEvent = TRUE;
+ break;
+
+ case HTML_O_ONUNLOAD:
+ eScriptType = JAVASCRIPT;
+ case HTML_O_SDONUNLOAD:
+ nEvent = SFX_EVENT_PREPARECLOSEDOC;
+ bSetEvent = TRUE;
+ break;
+
+ case HTML_O_ONFOCUS:
+ eScriptType = JAVASCRIPT;
+ case HTML_O_SDONFOCUS:
+ nEvent = SFX_EVENT_ACTIVATEDOC;
+ bSetEvent = TRUE;
+ break;
+
+ case HTML_O_ONBLUR:
+ eScriptType = JAVASCRIPT;
+ case HTML_O_SDONBLUR:
+ nEvent = SFX_EVENT_DEACTIVATEDOC;
+ bSetEvent = TRUE;
+ break;
+
+ case HTML_O_ONERROR:
+// if( bAnyStarBasic )
+// InsertBasicDocEvent( SFX_EVENT_ACTIVATEDOC,
+// pOption->GetString() );
+ break;
+ }
+
+ if ( bSetEvent )
+ {
+ DBG_ASSERT( pDoc, "Macros im Parser, aber kein Dokument!" );
+ String sEmpty;
+ SFX_APP()->GetEventConfig()->ConfigureEvent( nEvent,
+ SvxMacro( pOption->GetString(), sEmpty, eScriptType ),
+ pDoc );
+ }
+
+ }
+
+ if ( !aRowSpec.Len() && !aColSpec.Len() )
+ {
+ // Netscape l"a\st es zu, da\s keine Gr"o\senangabe erfolgt
+ aRowSpec.AssignAscii( "100%" );
+ }
+
+ // die ROW/COL-Optionen parsen
+ SvULongs aRowSizes;
+ SvUShorts aRowAttrs;
+ ParseSizeSpec( aRowSpec, aRowSizes, aRowAttrs );
+ USHORT nRows = aRowSizes.Count();
+
+ SvULongs aColSizes;
+ SvUShorts aColAttrs;
+ ParseSizeSpec( aColSpec, aColSizes, aColAttrs );
+ USHORT nCols = aColSizes.Count();
+
+ // einen FrameSet anlegen (wenn pFrameSet nicht gesetzt ist, ist dies
+ // das erste <FRAMESET> und wir muessen den Doc-Frameset benutzen)
+ SfxFrameDescriptor *pFrame = GetCurrentFrame();
+ if ( pFrameSet )
+ {
+ while ( !pFrame && aContextStack.Count() )
+ {
+ EndFrameSet();
+ pFrame = GetCurrentFrame();
+ }
+
+ if ( !pFrame )
+ return;
+ }
+
+ SfxFrameSetDescriptor *pNewFrameSet =
+ pFrameSet ? new SfxFrameSetDescriptor( pFrame )
+ : pDocFrameSet;
+
+ // und mit Leben fuellen
+ if( nRows && nCols )
+ {
+ SfxFrameSetDescriptor *pFirst = NULL;
+ for( USHORT i=0; i<nRows; i++ )
+ {
+ pNewFrameSet->SetColSet( FALSE );
+ SfxFrameDescriptor *pNewFrame =
+ new SfxFrameDescriptor( pNewFrameSet );
+ SfxFrameSetDescriptor *pFrameSet =
+ new SfxFrameSetDescriptor( pNewFrame );
+ if ( !pFirst )
+ pFirst = pFrameSet;
+ pFrameSet->SetColSet( TRUE );
+
+ if( (aRowAttrs[i] & SFX_HTMLFRMSIZE_REL) != 0 )
+ pNewFrame->SetWidthRel( aRowSizes[i] );
+ else if( (aRowAttrs[i] & SFX_HTMLFRMSIZE_PERCENT) != 0 )
+ pNewFrame->SetWidthPercent( aRowSizes[i] );
+ else
+ pNewFrame->SetWidthAbs( aRowSizes[i] );
+
+ for( USHORT j=0; j<nCols; j++ )
+ {
+ SfxFrameDescriptor *pFrame =
+ new SfxFrameDescriptor( pFrameSet );
+ if( (aColAttrs[j] & SFX_HTMLFRMSIZE_REL) != 0 )
+ pFrame->SetWidthRel( aColSizes[j] );
+ else if( (aColAttrs[j] & SFX_HTMLFRMSIZE_PERCENT) != 0 )
+ pFrame->SetWidthPercent( aColSizes[j] );
+ else
+ pFrame->SetWidthAbs( aColSizes[j] );
+ }
+ }
+
+ // den aktuellen FrameSet-Kontext retten und einen neuen einstellen
+ if( pNewFrameSet != pDocFrameSet )
+ SaveContext();
+ InitContext( pNewFrameSet );
+ SaveContext();
+ InitContext( pFirst );
+ }
+ else if( nRows || nCols )
+ {
+ USHORT nCount = nRows ? nRows : nCols;
+ pNewFrameSet->SetColSet( nCols != 0 );
+
+ for( USHORT i=0; i<nCount; i++ )
+ {
+ SfxFrameDescriptor *pFrame =
+ new SfxFrameDescriptor( pNewFrameSet );
+ USHORT nAttrs = (nRows ? aRowAttrs[i] : aColAttrs[i] );
+ ULONG nSize = (nRows ? aRowSizes[i] : aColSizes[i] );
+ if( (nAttrs & SFX_HTMLFRMSIZE_REL) != 0 )
+ pFrame->SetWidthRel( nSize );
+ else if( (nAttrs & SFX_HTMLFRMSIZE_PERCENT) != 0 )
+ pFrame->SetWidthPercent( nSize );
+ else
+ pFrame->SetWidthAbs( nSize );
+ }
+
+ // den aktuellen FrameSet-Kontext retten und einen neuen einstellen
+ if( pNewFrameSet != pDocFrameSet )
+ SaveContext();
+ InitContext( pNewFrameSet );
+ }
+
+ if ( bBorderSet )
+ pNewFrameSet->SetFrameBorder( bBorder );
+ if ( bSpacingSet )
+ pNewFrameSet->SetFrameSpacing( nSpacing );
+ if ( bBrushSet )
+ pNewFrameSet->SetWallpaper( aWallpaper );
+}
+
+void SfxFrameHTMLParser::EndFrameSet()
+{
+ if( aContextStack.Count() )
+ {
+ // den vorherigen FrameSet-Kontext wieder herstellen
+ RestoreContext();
+
+ // und zum naechsten Frame gehen
+ IncFramePos();
+ SfxFrameDescriptor *pFrame = GetCurrentFrame();
+ if ( pFrame && pFrame->GetFrameSet() )
+ {
+ SaveContext();
+ InitContext( pFrame->GetFrameSet() );
+ }
+ }
+ else
+ {
+ // der Root-Frameset wird beendet
+ if( pFrameSet )
+ {
+ // "Cursor" aus dem Frameset herausbewegen, damit nichsts
+ // mehr eingefuegt wird.
+ nFrame = pFrameSet->GetFrameCount();
+ }
+ }
+}
+
+void SfxFrameHTMLParser::InsertFrame()
+{
+ // den aktuellen Frame holen (ist nicht da, falls es noch kein
+ // <FRAMESET> gab oder das aktuelle FrameSet schon voll ist
+ SfxFrameDescriptor *pFrame = GetCurrentFrame();
+ while ( !pFrame && aContextStack.Count() )
+ {
+ EndFrameSet();
+ pFrame = GetCurrentFrame();
+ }
+
+ if ( !pFrame )
+ return;
+
+ const HTMLOptions *pOptions = GetOptions();
+ ParseFrameOptions( pFrame, pOptions );
+
+ // und zum naechsten Frame gehen
+ IncFramePos();
+}
+
+void SfxFrameHTMLParser::ParseFrameOptions( SfxFrameDescriptor *pFrame,
+ const HTMLOptions *pOptions )
+{
+ // die Optionen holen und setzen
+ Size aMargin( pFrame->GetMargin() );
+
+ // MIB 15.7.97: Netscape scheint marginwidth auf 0 zu setzen, sobald
+ // marginheight gesetzt wird und umgekehrt. Machen wir jetzt wegen
+ // bug #41665# auch so.
+ // Netscape l"a\st aber ein direktes Setzen auf 0 nicht zu, IE4.0 schon.
+ // Den Bug machen wir nicht mit!
+ BOOL bMarginWidth = FALSE, bMarginHeight = FALSE;
+
+ USHORT nArrLen = pOptions->Count();
+ for ( USHORT i=0; i<nArrLen; i++ )
+ {
+ const HTMLOption *pOption = (*pOptions)[i];
+ switch( pOption->GetToken() )
+ {
+ case HTML_O_BORDERCOLOR:
+ {
+ Color aColor;
+ pOption->GetColor( aColor );
+ pFrame->SetWallpaper( Wallpaper( aColor ) );
+ break;
+ }
+ case HTML_O_SRC:
+ pFrame->SetURL( INetURLObject::RelToAbs(pOption->GetString()) );
+ break;
+ case HTML_O_NAME:
+ pFrame->SetName( pOption->GetString() );
+ break;
+ case HTML_O_MARGINWIDTH:
+ aMargin.Width() = pOption->GetNumber();
+
+// if( aMargin.Width() < 1 )
+// aMargin.Width() = 1;
+ if( !bMarginHeight )
+ aMargin.Height() = 0;
+ bMarginWidth = TRUE;
+ break;
+ case HTML_O_MARGINHEIGHT:
+ aMargin.Height() = pOption->GetNumber();
+
+// if( aMargin.Height() < 1 )
+// aMargin.Height() = 1;
+ if( !bMarginWidth )
+ aMargin.Width() = 0;
+ bMarginHeight = TRUE;
+ break;
+ case HTML_O_SCROLLING:
+ pFrame->SetScrollingMode(
+ (ScrollingMode)pOption->GetEnum( aScollingTable,
+ ScrollingAuto ) );
+ break;
+ case HTML_O_FRAMEBORDER:
+ {
+ String aStr = pOption->GetString();
+ BOOL bBorder = TRUE;
+ if ( aStr.EqualsIgnoreCaseAscii("NO") ||
+ aStr.EqualsIgnoreCaseAscii("0") )
+ bBorder = FALSE;
+ pFrame->SetFrameBorder( bBorder );
+ break;
+ }
+ case HTML_O_NORESIZE:
+ pFrame->SetResizable( FALSE );
+ break;
+ default:
+ if ( pOption->GetTokenString().EqualsIgnoreCaseAscii(
+ HTML_O_READONLY ) )
+ {
+ String aStr = pOption->GetString();
+ BOOL bReadonly = TRUE;
+ if ( aStr.EqualsIgnoreCaseAscii("FALSE") )
+ bReadonly = FALSE;
+ pFrame->SetReadOnly( bReadonly );
+ }
+ else if ( pOption->GetTokenString().EqualsIgnoreCaseAscii(
+ HTML_O_EDIT ) )
+ {
+ String aStr = pOption->GetString();
+ BOOL bEdit = TRUE;
+ if ( aStr.EqualsIgnoreCaseAscii("FALSE") )
+ bEdit = FALSE;
+ pFrame->SetEditable( bEdit );
+ }
+
+ break;
+ }
+ }
+
+ pFrame->SetMargin( aMargin );
+}
+
+
+SfxFrameHTMLParser::SfxFrameHTMLParser( SfxMedium& rMedium,
+ SfxFrameSetObjectShell* _pDoc )
+ : SfxHTMLParser( *rMedium.GetInStream(), TRUE, &rMedium ),
+ nLine( 0 ),
+ nFrame( 0 ),
+ pFrameSet( 0 ),
+ pDoc( _pDoc ),
+ pDocFrameSet( 0 ),
+ bIsFrameDoc( FALSE ),
+ bInNoFrames( FALSE ),
+ bIgnoreRawData( FALSE ),
+ eScriptType ( HTML_SL_JAVASCRIPT ),
+ pDeleteLink(0),
+ aBaseURL( pDoc ? pDoc->GetBaseURL() : INetURLObject::GetBaseURL() )
+{
+ SvKeyValueIterator *pHeaderAttrs = pDoc->GetHeaderAttributes();
+ if( pHeaderAttrs )
+ SetEncodingByHTTPHeader( pHeaderAttrs );
+
+ if ( pDoc )
+ {
+ SfxItemSet* pSet = rMedium.GetItemSet();
+ SFX_ITEMSET_ARG(
+ pSet, pLoadRef, SfxRefItem, SID_LOADENVIRONMENT, FALSE);
+ if( pLoadRef )
+ {
+ ((SfxLoadEnvironment*)&pLoadRef->GetValue())->
+ DocumentDetected( _pDoc, ERRCODE_NONE );
+ }
+ pDocFrameSet = pDoc->pDescriptor;
+ }
+}
+
+SfxFrameHTMLParser::SfxFrameHTMLParser( SvStream& rStream,
+ SfxFrameSetObjectShell* _pDoc )
+ : SfxHTMLParser( rStream, TRUE ),
+ nLine( 0 ),
+ nFrame( 0 ),
+ pFrameSet( 0 ),
+ pDoc( _pDoc ),
+ pDocFrameSet( 0 ),
+ bIsFrameDoc( FALSE ),
+ bInNoFrames( FALSE ),
+ eScriptType ( HTML_SL_JAVASCRIPT ),
+ pDeleteLink(0),
+ aBaseURL( pDoc ? pDoc->GetBaseURL() : INetURLObject::GetBaseURL() )
+{
+ // Ohne Medium kann es auch keinen HTTP-Header und damit auch
+ // keine Zeichsatz-Informationen geben!
+ if ( pDoc )
+ {
+ pDocFrameSet = pDoc->pDescriptor;
+ }
+}
+
+SfxFrameHTMLParser::~SfxFrameHTMLParser()
+{
+ if ( pDoc && GetMedium() )
+ {
+ SfxItemSet* pSet = GetMedium()->GetItemSet();
+ const SfxPoolItem *pItem;
+ SfxItemState eItemState = pSet->GetItemState( SID_LOADENVIRONMENT, FALSE, &pItem );
+ SfxLoadEnvironment* pEnv = (SfxLoadEnvironment*)
+ &((const SfxRefItem*)pItem)->GetValue();
+ pEnv->SetDataAvailableLink( Link() );
+ pEnv->DocumentDetected( pDoc, 0 );
+ pSet->ClearItem( SID_LOADENVIRONMENT );
+ pDoc->SetTitle( pDoc->GetDocInfo().GetTitle() );
+ pDoc->ReleaseRef();
+ // FinishedLoading ruft die ViewShell!
+ }
+}
+
+SvParserState SfxFrameHTMLParser::CallParser()
+{
+ // die Base-URL kann durch <BASE> umgeschossen werden
+// String aBaseURL( INetURLObject::GetBaseURL() );
+ if ( pDoc && GetMedium() )
+ {
+ pDoc->AddRef();
+ SfxItemSet* pSet = GetMedium()->GetItemSet();
+ const SfxPoolItem *pItem;
+ SfxItemState eItemState = pSet->GetItemState( SID_LOADENVIRONMENT, FALSE, &pItem );
+ SfxLoadEnvironment* pEnv = (SfxLoadEnvironment*)
+ &((const SfxRefItem*)pItem)->GetValue();
+ pEnv->SetDataAvailableLink( GetAsynchCallLink() );
+ }
+
+ SvParserState eState = HTMLParser::CallParser();
+
+ if ( eState == SVPAR_ACCEPTED && pDoc && GetMedium() )
+ {
+ // DataAvailableLink zur"ucksetzen, damit den keiner mehr aufruft
+ SfxItemSet* pSet = GetMedium()->GetItemSet();
+ const SfxPoolItem *pItem;
+ SfxItemState eItemState = pSet->GetItemState( SID_LOADENVIRONMENT, FALSE, &pItem );
+ SfxLoadEnvironment* pEnv = (SfxLoadEnvironment*)
+ &((const SfxRefItem*)pItem)->GetValue();
+ pEnv->SetDataAvailableLink( Link() );
+ }
+
+// INetURLObject::SetBaseURL( aBaseURL );
+
+ return eState;
+}
+
+SfxDocumentInfo* SfxFrameHTMLParser::GetDocInfo()
+{
+ return pDoc ? &pDoc->GetDocInfo() : NULL;
+}
+
+void SfxFrameHTMLParser::EndParser()
+{
+ AddRef();
+ AsynchronLink* pLink = new AsynchronLink;
+ *pLink = Link( pLink, SfxParserDelete_Impl );
+ pLink->Call( this );
+}
+
+
diff --git a/sfx2/source/bastyp/frmhtmlw.cxx b/sfx2/source/bastyp/frmhtmlw.cxx
new file mode 100644
index 000000000000..f6dec7efed17
--- /dev/null
+++ b/sfx2/source/bastyp/frmhtmlw.cxx
@@ -0,0 +1,582 @@
+/*************************************************************************
+ *
+ * $RCSfile: frmhtmlw.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:28 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include <so3/iface.hxx>
+#ifndef _INETDEF_HXX
+#include <svtools/inetdef.hxx>
+#endif
+//!(dv) #include <chaos2/cntapi.hxx>
+#pragma hdrstop
+#ifndef _RTL_TENCINFO_H
+#include <rtl/tencinfo.h>
+#endif
+
+#include "docinf.hxx"
+#include "frmhtmlw.hxx"
+#include "fsetobsh.hxx"
+#include "evntconf.hxx"
+#include "frame.hxx"
+#include "app.hxx"
+#include "viewfrm.hxx"
+#include "fsetvwsh.hxx"
+#include "docfile.hxx"
+
+#include "sfx.hrc"
+
+// -----------------------------------------------------------------------
+
+extern sal_Char __FAR_DATA sHTML_META_classification[];
+
+static sal_Char __READONLY_DATA sHTML_SC_yes[] = "YES";
+static sal_Char __READONLY_DATA sHTML_SC_no[] = "NO";
+static sal_Char __READONLY_DATA sHTML_SC_auto[] = "AUTO";
+static sal_Char __READONLY_DATA sHTML_MIME_text_html[] = "text/html; charset=";
+
+static HTMLOutEvent __FAR_DATA aFrameSetEventTable[] =
+{
+ { sHTML_O_SDonload, sHTML_O_onload, SFX_EVENT_OPENDOC },
+ { sHTML_O_SDonunload, sHTML_O_onunload, SFX_EVENT_PREPARECLOSEDOC },
+ { sHTML_O_SDonfocus, sHTML_O_onfocus, SFX_EVENT_ACTIVATEDOC },
+ { sHTML_O_SDonblur, sHTML_O_onblur, SFX_EVENT_DEACTIVATEDOC },
+ { 0, 0, 0 }
+};
+
+#if defined(MAC)
+const sal_Char SfxFrameHTMLWriter::sNewLine[] = "\015";
+#elif defined(UNX)
+const sal_Char SfxFrameHTMLWriter::sNewLine[] = "\012";
+#else
+const sal_Char __FAR_DATA SfxFrameHTMLWriter::sNewLine[] = "\015\012";
+#endif
+
+/* */
+
+SfxFrameHTMLWriter::SfxFrameHTMLWriter() :
+ pStrm( 0 ),
+ nNestCnt( 0 )
+{
+ aFill.Fill( 20, '\t' );
+}
+
+
+SfxFrameHTMLWriter::~SfxFrameHTMLWriter()
+{
+ DBG_ASSERT( !pStrm, "Stream ist noch da!" );
+}
+
+/* */
+
+void SfxFrameHTMLWriter::OutMeta( SvStream& rStrm,
+ const sal_Char *pIndent,
+ const String& rName,
+ const String& rContent, BOOL bHTTPEquiv,
+ rtl_TextEncoding eDestEnc )
+{
+ rStrm << sNewLine;
+ if( pIndent )
+ rStrm << pIndent;
+
+ ByteString sOut( '<' );
+ (((sOut += sHTML_meta) += ' ')
+ += (bHTTPEquiv ? sHTML_O_httpequiv : sHTML_O_name)) += "=\"";
+ rStrm << sOut.GetBuffer();
+
+ HTMLOutFuncs::Out_String( rStrm, rName, eDestEnc );
+
+ ((sOut = "\" ") += sHTML_O_content) += "=\"";
+ rStrm << sOut.GetBuffer();
+
+ HTMLOutFuncs::Out_String( rStrm, rContent, eDestEnc ) << "\">";
+}
+
+void SfxFrameHTMLWriter::Out_DocInfo( SvStream& rStrm,
+ const SfxDocumentInfo* pInfo,
+ const sal_Char *pIndent,
+ rtl_TextEncoding eDestEnc )
+{
+ const sal_Char *pCharSet =
+ rtl_getBestMimeCharsetFromTextEncoding( eDestEnc );
+
+ if( pCharSet )
+ {
+ String aContentType = String::CreateFromAscii( sHTML_MIME_text_html );
+ aContentType.AppendAscii( pCharSet );
+ OutMeta( rStrm, pIndent, sHTML_META_content_type, aContentType, TRUE,
+ eDestEnc );
+ }
+
+ // Titel (auch wenn er leer ist)
+ rStrm << sNewLine;
+ if( pIndent )
+ rStrm << pIndent;
+ HTMLOutFuncs::Out_AsciiTag( rStrm, sHTML_title );
+ if( pInfo )
+ {
+ const String& rTitle = pInfo->GetTitle();
+ if( rTitle.Len() )
+ HTMLOutFuncs::Out_String( rStrm, rTitle, eDestEnc );
+ }
+ HTMLOutFuncs::Out_AsciiTag( rStrm, sHTML_title, FALSE );
+
+ // Target-Frame
+ if( pInfo )
+ {
+ const String& rTarget = pInfo->GetDefaultTarget();
+ if( rTarget.Len() )
+ {
+ rStrm << sNewLine;
+ if( pIndent )
+ rStrm << pIndent;
+
+ ByteString sOut( '<' );
+ (((sOut += sHTML_base) += ' ') += sHTML_O_target) += "=\"";
+ rStrm << sOut.GetBuffer();
+ HTMLOutFuncs::Out_String( rStrm, rTarget, eDestEnc )
+ << "\">";
+ }
+ }
+
+ // Who we are
+ String sGenerator = String::CreateFromAscii( INET_PRODUCTNAME );
+ OutMeta( rStrm, pIndent, sHTML_META_generator, sGenerator, FALSE,
+ eDestEnc );
+
+ if( pInfo )
+ {
+ // Reload
+ if( pInfo->IsReloadEnabled() )
+ {
+ String sContent = String::CreateFromInt32(
+ (sal_Int32)pInfo->GetReloadDelay() );
+
+ const String &rReloadURL = pInfo->GetReloadURL();
+ if( rReloadURL.Len() )
+ {
+ sContent.AppendAscii( ";URL=" );
+ sContent += INetURLObject::AbsToRel(rReloadURL);
+ }
+
+ OutMeta( rStrm, pIndent, sHTML_META_refresh, sContent, TRUE,
+ eDestEnc );
+ }
+
+ // Author
+ const SfxStamp& rCreated = pInfo->GetCreated();
+ const String& rAuthor = rCreated.GetName();
+ if( rAuthor.Len() )
+ OutMeta( rStrm, pIndent, sHTML_META_author, rAuthor, FALSE,
+ eDestEnc );
+
+ // created
+ const DateTime& rCreatedDT = rCreated.GetTime();
+ String sOut(
+ String::CreateFromInt32( (sal_Int32)rCreatedDT.GetDate() ) );
+ (sOut += ';') +=
+ String::CreateFromInt32( (sal_Int32)rCreatedDT.GetTime() );
+ OutMeta( rStrm, pIndent, sHTML_META_created, sOut, FALSE, eDestEnc );
+
+ // changedby
+ const SfxStamp& rChanged = pInfo->GetChanged();
+ const String& rChangedBy = rChanged.GetName();
+ if( rChangedBy.Len() )
+ OutMeta( rStrm, pIndent, sHTML_META_changedby, rChangedBy, FALSE,
+ eDestEnc );
+
+ // changed
+ const DateTime& rChangedDT = rChanged.GetTime();
+ sOut = String::CreateFromInt32( (sal_Int32)rChangedDT.GetDate() );
+ (sOut += ';') +=
+ String::CreateFromInt32( (sal_Int32)rChangedDT.GetTime() );
+ OutMeta( rStrm, pIndent, sHTML_META_changed, sOut, FALSE, eDestEnc );
+
+ // Thema
+ const String& rTheme = pInfo->GetTheme();
+ if( rTheme.Len() )
+ OutMeta( rStrm, pIndent, sHTML_META_classification, rTheme, FALSE,
+ eDestEnc );
+
+ // Beschreibung
+ const String& rComment = pInfo->GetComment();
+ if( rComment.Len() )
+ OutMeta( rStrm, pIndent, sHTML_META_description, rComment, FALSE,
+ eDestEnc);
+
+ // Keywords
+ const String& rKeywords = pInfo->GetKeywords();
+ if( rKeywords.Len() )
+ OutMeta( rStrm, pIndent, sHTML_META_keywords, rKeywords, FALSE,
+ eDestEnc);
+
+ // die Benutzer-Eintraege
+ USHORT nKeys = pInfo->GetUserKeyCount();
+
+ // Leere Eintraege am Ende werden nicht ausgegeben
+ while( nKeys && !pInfo->GetUserKey(nKeys-1).GetWord().Len() )
+ nKeys--;
+
+ for( USHORT i=0; i< nKeys; i++ )
+ {
+ const SfxDocUserKey& rUserKey = pInfo->GetUserKey(i);
+ String aWord( rUserKey.GetWord() );
+ aWord.EraseTrailingChars();
+ if( rUserKey.GetTitle().Len() )
+ OutMeta( rStrm, pIndent, rUserKey.GetTitle(), aWord, FALSE,
+ eDestEnc );
+ }
+ }
+}
+
+
+/* */
+
+ULONG SfxFrameHTMLWriter::Write(
+ SfxFrameSetObjectShell *pDocShell, SvStream& rOut,
+ const SfxFrameSetDescriptor* pSet, BOOL bFlatten, SfxFrame* pTopFrame )
+{
+ if( !pSet ) pSet = pDocShell->GetFrameSetDescriptor();
+
+ // Initalisierung
+ pDoc = pDocShell;
+ pStrm = &rOut;
+ nNestCnt = 0;
+
+ // get text encoding
+ const sal_Char *pCharSet =
+ rtl_getBestMimeCharsetFromTextEncoding( gsl_getSystemTextEncoding() );
+ rtl_TextEncoding eDestEnc = rtl_getTextEncodingFromMimeCharset( pCharSet );
+
+ // Header ausgeben
+ OutHeader( eDestEnc );
+
+ // Frameset augeben
+ Out_FrameSetDescriptor( pSet, bFlatten, pTopFrame, eDestEnc );
+
+ // Footer ausgeben
+ OutFooter();
+
+ // Deinitialisierung
+ pStrm = 0;
+
+ return 0;
+}
+
+/* */
+
+void SfxFrameHTMLWriter::OutHeader( rtl_TextEncoding eDestEnc )
+{
+ // <HTML>
+ // <HEAD>
+ // <TITLE>Titel</TITLE>
+ // </HEAD>
+ HTMLOutFuncs::Out_AsciiTag( Strm(), sHTML_html ) << sNewLine;
+ HTMLOutFuncs::Out_AsciiTag( Strm(), sHTML_head );
+
+ Out_DocInfo( Strm(), &pDoc->GetDocInfo(), "\t", eDestEnc );
+ Strm() << sNewLine;
+ HTMLOutFuncs::Out_AsciiTag( Strm(), sHTML_head, FALSE ) << sNewLine;
+
+//! OutScript(); // Hier fehlen noch die Scripten im Header
+}
+
+/* */
+
+void SfxFrameHTMLWriter::Out_FrameSetDescriptor(
+ const SfxFrameSetDescriptor *pFSet, BOOL bFlatten, SfxFrame* pTopFrame,
+ rtl_TextEncoding eDestEnc )
+{
+ USHORT i, j;
+
+ ByteString aRows, aCols; // die Rows/Cols-Spezifikationen
+
+ // aus der ersten Line eine ROWS/COLS-Spezifikation erstellen
+ ByteString aSpec;
+ USHORT nFrames = pFSet->GetFrameCount();
+ for( i=0; i<nFrames; i++ )
+ {
+ const SfxFrameDescriptor* pFrame = pFSet->GetFrame( i );
+
+ if( i>0 )
+ aSpec += ',';
+
+ if ( pFrame->GetWidth() != 1 || pFrame->GetSizeSelector() != SIZE_REL )
+ aSpec +=
+ ByteString::CreateFromInt32( (sal_Int32)pFrame->GetWidth() );
+ switch( pFrame->GetSizeSelector() )
+ {
+ case SIZE_PERCENT: aSpec += '%'; break;
+ case SIZE_REL: aSpec += '*'; break;
+ }
+ }
+ if( pFSet->IsColSet() )
+ aCols = aSpec;
+ else
+ aRows = aSpec;
+
+ // <FRAMESET> ausgeben
+ ByteString sOut( '<' );
+ sOut += sHTML_frameset;
+
+ // ROWS/COLS, wie zuvor gesetzt
+ if( aRows.Len() )
+ ((((sOut += ' ') += sHTML_O_rows) += "=\"") += aRows) += '\"';
+ if( aCols.Len() )
+ ((((sOut += ' ') += sHTML_O_cols) += "=\"") += aCols) += '\"';
+
+ // frame border (MS+Netscape-Erweiterung)
+ if ( pFSet->IsFrameBorderSet() )
+ {
+ const sal_Char * pStr =
+ pFSet->IsFrameBorderOn() ? sHTML_SC_yes : sHTML_SC_no;
+ if( pStr )
+ (((sOut += ' ') += sHTML_O_frameborder) += '=') += pStr;
+ }
+
+ // frame spacing (MS-Erweiterung), nur wenn es gesetzt ist
+ // MBA: jetzt in Netscape-Syntax!
+ if ( pFSet->IsFrameSpacingSet() )
+ {
+ long nFrameSpacing = pFSet->GetFrameSpacing();
+ (((sOut += ' ') += sHTML_O_border) += '=')
+ += ByteString::CreateFromInt32( nFrameSpacing );
+ }
+
+ OutNestSpace();
+
+ // frame color (Netscape-Erweiterung)
+ if ( pFSet->GetWallpaper() )
+ {
+ ((sOut += ' ') += sHTML_O_bordercolor) += '=';
+ Strm() << sOut.GetBuffer();
+ HTMLOutFuncs::Out_Color( Strm(), pFSet->GetWallpaper()->GetColor(), eDestEnc );
+ }
+ else
+ Strm() << sOut.GetBuffer();
+
+ if ( pFSet->IsRootFrameSet() )
+ {
+ SfxEventConfiguration* pECfg = SFX_APP()->GetEventConfig();
+ SvxMacroTableDtor *pMacTable =
+ pECfg ? pECfg->GetDocEventTable( pDoc ) : 0;
+
+ if( pMacTable && pMacTable->Count() )
+ HTMLOutFuncs::Out_Events( Strm(), *pMacTable, aFrameSetEventTable,
+ FALSE, eDestEnc ); // BOOL - BASIC schreiben oder nicht
+ }
+
+ Strm() << '>' << sNewLine;
+
+ nNestCnt++; // jetzt sind wir eine Ebene tiefer
+
+ nFrames = pFSet->GetFrameCount();
+ for( j=0; j<nFrames; j++ )
+ {
+ // wenn der Frame in Wirklichkeit ein Frameset ist, geben wir das
+ // Frameset aus und sind fertig
+ SfxFrameDescriptor* pDesc = pFSet->GetFrame(j);
+ SfxFrameSetDescriptor* pSet = pDesc->GetFrameSet();
+ if( pSet && !pSet->IsRootFrameSet() )
+ {
+ Out_FrameSetDescriptor( pSet, bFlatten, pTopFrame, eDestEnc );
+ }
+ else
+ {
+ OutNestSpace();
+ ByteString sOut( '<' );
+ sOut += sHTML_frame;
+ Strm() << sOut.GetBuffer();
+ Out_FrameDescriptor( Strm(), pDesc, bFlatten, pTopFrame, eDestEnc );
+ Strm() << '>' << sNewLine;
+ }
+ }
+
+ nNestCnt--; // und wieder eine Ebene hoeher
+
+ OutNestSpace();
+ HTMLOutFuncs::Out_AsciiTag( Strm(), sHTML_frameset, FALSE ) << sNewLine;
+}
+
+String SfxFrameHTMLWriter::CreateDataURL(
+ SfxFrameSetObjectShell *pDoc, const SfxFrameSetDescriptor* pSet,
+ SfxFrame* pTopFrame )
+{
+ SvMemoryStream aStream;
+ SfxFrameHTMLWriter().Write(
+ pDoc, aStream, pSet, TRUE, pTopFrame );
+ // TODO: MAX_STRLEN or USHRT_MAX?
+ ByteString aData( (sal_Char*)aStream.GetData(), (USHORT) Min(
+ (ULONG)USHRT_MAX, aStream.Tell()) );
+ String sEncoded(
+ INetURLObject::encode( aData, INetURLObject::PART_URIC, '%',
+ INetURLObject::ENCODE_ALL ) );
+ String aURL( String::CreateFromAscii("data:text/html,") );
+ aURL += sEncoded;
+ return aURL;
+}
+
+
+String SfxFrameHTMLWriter::CreateURL( SfxFrame* pFrame )
+{
+ String aRet;
+ SfxObjectShell* pShell = pFrame->GetCurrentDocument();
+ SfxViewShell* pView = pFrame->GetCurrentViewFrame()->GetViewShell();
+ if( pView && !pView->IsImplementedAsFrameset_Impl() )
+ {
+ SfxFrameSetViewShell* pFShell = PTR_CAST( SfxFrameSetViewShell, pView );
+ if( pFShell && pFShell->GetDescriptor()->CheckContent() )
+ {
+ SfxFrameSetObjectShell *pFObjShell = PTR_CAST( SfxFrameSetObjectShell, pShell );
+ aRet = CreateDataURL( pFObjShell, pFShell->GetDescriptor(), pFrame );
+ }
+ }
+
+ if( !aRet.Len() && pShell )
+ {
+ aRet = pShell->GetMedium()->GetName();
+//!(dv) CntAnchor::ToPresentationURL( aRet );
+ }
+
+ return aRet;
+}
+
+void SfxFrameHTMLWriter::Out_FrameDescriptor(
+ SvStream& rOut, const SfxFrameDescriptor *pFrame, BOOL bFlatten,
+ SfxFrame* pTopFrame, rtl_TextEncoding eDestEnc )
+{
+ SfxFrameSetDescriptor *pFSet = pFrame->GetFrameSet();
+
+ ByteString sOut;
+
+ String aURL;
+ if( pFSet && pFSet->IsRootFrameSet() && pFSet->CheckContent() && bFlatten)
+ {
+ SfxFrame* pSubFrame = pTopFrame->SearchFrame_Impl(
+ pFrame->GetItemId(), TRUE );
+ SfxFrameSetObjectShell* pSh =
+ (SfxFrameSetObjectShell*)
+ ( pSubFrame ? pSubFrame->GetCurrentDocument() : 0 );
+ if( pSh )
+ aURL = CreateDataURL( pSh, pFSet, pTopFrame );
+ }
+ if( !aURL.Len() ) aURL = bFlatten ? pFrame->GetActualURL().GetMainURL() :
+ pFrame->GetURL().GetMainURL();
+ if( aURL.Len() )
+ {
+ if( !bFlatten ) aURL = INetURLObject::AbsToRel( aURL );
+ ((sOut += ' ') += sHTML_O_src) += "=\"";
+ rOut << sOut.GetBuffer();
+ HTMLOutFuncs::Out_String( rOut, aURL, eDestEnc );
+ sOut = '\"';
+ }
+
+ // der Name (nur wenn der String nicht leer ist)
+ const String& rName = pFrame->GetName();
+ if( rName.Len() )
+ {
+ ((sOut += ' ') += sHTML_O_name) += "=\"";
+ rOut << sOut.GetBuffer();
+ HTMLOutFuncs::Out_String( rOut, rName, eDestEnc );
+ sOut = '\"';
+ }
+
+ // margin width und height; -1 ist der Default-Margin
+ const Size& rMargin = pFrame->GetMargin();
+ if( rMargin.Width() >= 0 )
+ (((sOut += ' ') += sHTML_O_marginwidth) += '=')
+ += ByteString::CreateFromInt32( (sal_Int32)rMargin.Width() );
+ if( rMargin.Height() >= 0 )
+ (((sOut += ' ') += sHTML_O_marginheight) += '=')
+ += ByteString::CreateFromInt32( (sal_Int32)rMargin.Height() );
+
+ // scroll mode
+ const sal_Char *pStr = 0;
+ switch( pFrame->GetScrollingMode() )
+ {
+ case ScrollingYes: pStr = sHTML_SC_yes; break;
+ case ScrollingNo: pStr = sHTML_SC_no; break;
+// case ScrollingAuto: pStr = sHTML_SC_auto; break; // Default !!
+ }
+
+ if( pStr )
+ (((sOut += ' ') += sHTML_O_scrolling) += '=') += pStr;
+
+ // resize
+ if( !pFrame->IsResizable() )
+ (sOut += ' ') += sHTML_O_noresize;
+
+ // frame border (MS+Netscape-Erweiterung)
+ if ( pFrame->IsFrameBorderSet() )
+ {
+ pStr = pFrame->IsFrameBorderOn() ? sHTML_SC_yes : sHTML_SC_no;
+ if( pStr )
+ (((sOut += ' ') += sHTML_O_frameborder) += '=') += pStr;
+ }
+
+ if ( pFrame->GetWallpaper() )
+ {
+ ((sOut += ' ') += sHTML_O_bordercolor) += '=';
+ rOut << sOut.GetBuffer();
+ HTMLOutFuncs::Out_Color( rOut, pFrame->GetWallpaper()->GetColor(), eDestEnc );
+ }
+ else
+ rOut << sOut.GetBuffer();
+}
+
+
diff --git a/sfx2/source/bastyp/helper.cxx b/sfx2/source/bastyp/helper.cxx
new file mode 100644
index 000000000000..cd1b4d5e9fde
--- /dev/null
+++ b/sfx2/source/bastyp/helper.cxx
@@ -0,0 +1,673 @@
+/*************************************************************************
+ *
+ * $RCSfile: helper.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:28 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include "helper.hxx"
+
+#ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDBC_XRESULTSET_HPP_
+#include <com/sun/star/sdbc/XResultSet.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDBC_XROW_HPP_
+#include <com/sun/star/sdbc/XRow.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UCB_COMMANDABORTEDEXCEPTION_HPP_
+#include <com/sun/star/ucb/CommandAbortedException.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UCB_ILLEGALIDENTIFIEREXCEPTION_HPP_
+#include <com/sun/star/ucb/IllegalIdentifierException.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UCB_NAMECLASH_HPP_
+#include <com/sun/star/ucb/NameClash.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UCB_NUMBEREDSORTINGINFO_HPP_
+#include <com/sun/star/ucb/NumberedSortingInfo.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UCB_TRANSFERINFO_HPP_
+#include <com/sun/star/ucb/TransferInfo.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UCB_XANYCOMPAREFACTORY_HPP_
+#include <com/sun/star/ucb/XAnyCompareFactory.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UCB_XCOMMANDINFO_HPP_
+#include <com/sun/star/ucb/XCommandInfo.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UCB_XCONTENTACCESS_HPP_
+#include <com/sun/star/ucb/XContentAccess.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UCB_XDYNAMICRESULTSET_HPP_
+#include <com/sun/star/ucb/XDynamicResultSet.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UCB_XSORTEDDYNAMICRESULTSETFACTORY_HPP_
+#include <com/sun/star/ucb/XSortedDynamicResultSetFactory.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UTIL_DATETIME_HPP_
+#include <com/sun/star/util/DateTime.hpp>
+#endif
+
+#include <tools/ref.hxx>
+#include <tools/debug.hxx>
+#include <tools/urlobj.hxx>
+#include <tools/datetime.hxx>
+#include <vcl/svapp.hxx>
+#include <ucbhelper/content.hxx>
+#include <unotools/processfactory.hxx>
+#include <osl/file.hxx>
+
+using namespace ::ucb;
+using namespace com::sun::star::lang;
+using namespace com::sun::star::sdbc;
+using namespace com::sun::star::uno;
+using namespace com::sun::star::ucb;
+using namespace rtl;
+using namespace utl;
+using namespace osl;
+
+DECLARE_LIST( StringList_Impl, OUString* );
+
+#define CONVERT_DATETIME( aUnoDT, aToolsDT ) \
+ aToolsDT = DateTime( Date( aUnoDT.Day, aUnoDT.Month, aUnoDT.Year ), \
+ Time( aUnoDT.Hours, aUnoDT.Minutes, aUnoDT.Seconds, aUnoDT.HundredthSeconds ) );
+
+void AppendDateTime_Impl( const ::com::sun::star::util::DateTime rDT, String& rRow )
+{
+ DateTime aDT;
+ CONVERT_DATETIME( rDT, aDT );
+ const International& rInter = Application::GetAppInternational();
+ String aDateStr = rInter.GetDate( aDT );
+ aDateStr += String::CreateFromAscii( ", " );
+ aDateStr += rInter.GetTime( aDT );
+ rRow += aDateStr;
+}
+
+// SfxContentHelper ------------------------------------------------------
+
+sal_Bool SfxContentHelper::Transfer_Impl( const String& rSource, const String& rDest, sal_Bool bMoveData, sal_Int32 nNameClash )
+{
+ sal_Bool bRet = sal_True, bKillSource = sal_False;
+ INetURLObject aSourceObj( rSource, INET_PROT_FILE );
+ INetURLObject aDestObj( rDest, INET_PROT_FILE );
+ if ( bMoveData && aSourceObj.GetProtocol() != aDestObj.GetProtocol() )
+ {
+ bMoveData = sal_False;
+ bKillSource = sal_True;
+ }
+ String aName = aDestObj.getName();
+ aDestObj.removeSegment();
+ aDestObj.setFinalSlash();
+
+ try
+ {
+ Content aDestPath( aDestObj.GetMainURL(), Reference< ::com::sun::star::ucb::XCommandEnvironment > () );
+ Reference< ::com::sun::star::ucb::XCommandInfo > xInfo = aDestPath.getCommands();
+ OUString aTransferName = OUString::createFromAscii( "transfer" );
+ if ( xInfo->hasCommandByName( aTransferName ) )
+ {
+ aDestPath.executeCommand( aTransferName, makeAny(
+ ::com::sun::star::ucb::TransferInfo( bMoveData, aSourceObj.GetMainURL(), aName, nNameClash ) ) );
+ }
+ else
+ {
+ DBG_ERRORFILE( "transfer command not available" );
+ }
+ }
+ catch( ::com::sun::star::ucb::CommandAbortedException& )
+ {
+ bRet = sal_False;
+ }
+ catch( ... )
+ {
+ DBG_ERRORFILE( "Any other exception" );
+ bRet = sal_False;
+ }
+
+ if ( bKillSource )
+ SfxContentHelper::Kill( rSource );
+
+ return bRet;
+}
+
+// -----------------------------------------------------------------------
+
+sal_Bool SfxContentHelper::IsDocument( const String& rContent )
+{
+ sal_Bool bRet = sal_False;
+ INetURLObject aObj( rContent, INET_PROT_FILE );
+ try
+ {
+ Content aCnt( aObj.GetMainURL(), Reference< ::com::sun::star::ucb::XCommandEnvironment > () );
+ bRet = aCnt.isDocument();
+ }
+ catch( ::com::sun::star::ucb::CommandAbortedException& )
+ {
+ DBG_ERRORFILE( "CommandAbortedException" );
+ }
+ catch( ::com::sun::star::ucb::IllegalIdentifierException& )
+ {
+ DBG_WARNING( "IllegalIdentifierException" );
+ }
+ catch( ContentCreationException& )
+ {
+ DBG_WARNING( "IllegalIdentifierException" );
+ }
+ catch( ... )
+ {
+ DBG_ERRORFILE( "Any other exception" );
+ }
+
+ return bRet;
+}
+
+// -----------------------------------------------------------------------
+
+sal_Bool SfxContentHelper::IsFolder( const String& rContent )
+{
+ sal_Bool bRet = sal_False;
+ INetURLObject aObj( rContent, INET_PROT_FILE );
+ try
+ {
+ Content aCnt( aObj.GetMainURL(), Reference< ::com::sun::star::ucb::XCommandEnvironment > () );
+ bRet = aCnt.isFolder();
+ }
+ catch( ::com::sun::star::ucb::CommandAbortedException& )
+ {
+ DBG_ERRORFILE( "CommandAbortedException" );
+ }
+ catch( ::com::sun::star::ucb::IllegalIdentifierException& )
+ {
+ DBG_WARNING( "IllegalIdentifierException" );
+ }
+ catch( ContentCreationException& )
+ {
+ DBG_WARNING( "IllegalIdentifierException" );
+ }
+ catch( ... )
+ {
+ DBG_ERRORFILE( "Any other exception" );
+ }
+
+ return bRet;
+}
+
+// -----------------------------------------------------------------------
+
+sal_Bool SfxContentHelper::GetTitle( const String& rContent, String& rTitle )
+{
+ sal_Bool bRet = sal_False;
+ INetURLObject aObj( rContent, INET_PROT_FILE );
+ try
+ {
+ Content aCnt( aObj.GetMainURL(), Reference< ::com::sun::star::ucb::XCommandEnvironment > () );
+ OUString aTemp;
+ aCnt.getPropertyValue( OUString::createFromAscii( "Title" ) ) >>= aTemp;
+ rTitle = String( aTemp );
+ bRet = sal_True;
+ }
+ catch( ::com::sun::star::ucb::CommandAbortedException& )
+ {
+ DBG_ERRORFILE( "CommandAbortedException" );
+ }
+ catch( ... )
+ {
+ DBG_ERRORFILE( "Any other exception" );
+ }
+ return bRet;
+}
+
+// -----------------------------------------------------------------------
+
+sal_Bool SfxContentHelper::Kill( const String& rContent )
+{
+ sal_Bool bRet = sal_True;
+ INetURLObject aDeleteObj( rContent, INET_PROT_FILE );
+ try
+ {
+ Content aCnt( aDeleteObj.GetMainURL(), Reference< ::com::sun::star::ucb::XCommandEnvironment > () );
+ aCnt.executeCommand( OUString::createFromAscii( "delete" ), makeAny( sal_Bool( sal_True ) ) );
+ }
+ catch( ::com::sun::star::ucb::CommandAbortedException& )
+ {
+ DBG_ERRORFILE( "CommandAbortedException" );
+ bRet = sal_False;
+ }
+ catch( ... )
+ {
+ DBG_ERRORFILE( "Any other exception" );
+ bRet = sal_False;
+ }
+
+ return bRet;
+}
+
+// -----------------------------------------------------------------------
+
+Sequence < OUString > SfxContentHelper::GetFolderContents( const String& rFolder, sal_Bool bFolder )
+{
+ StringList_Impl* pFiles = NULL;
+ INetURLObject aFolderObj( rFolder, INET_PROT_FILE );
+ try
+ {
+ Content aCnt( aFolderObj.GetMainURL(), Reference< ::com::sun::star::ucb::XCommandEnvironment > () );
+ Reference< XResultSet > xResultSet;
+ Sequence< OUString > aProps(1);
+ OUString* pProps = aProps.getArray();
+ pProps[0] == OUString::createFromAscii( "Url" );
+
+ try
+ {
+ ResultSetInclude eInclude = bFolder ? INCLUDE_FOLDERS_AND_DOCUMENTS : INCLUDE_DOCUMENTS_ONLY;
+ xResultSet = aCnt.createCursor( aProps, eInclude );
+ }
+ catch( ::com::sun::star::ucb::CommandAbortedException& )
+ {
+ DBG_ERRORFILE( "createCursor: CommandAbortedException" );
+ }
+ catch( ... )
+ {
+ DBG_ERRORFILE( "createCursor: Any other exception" );
+ }
+
+ if ( xResultSet.is() )
+ {
+ pFiles = new StringList_Impl;
+ Reference< com::sun::star::ucb::XContentAccess > xContentAccess( xResultSet, UNO_QUERY );
+ try
+ {
+ while ( xResultSet->next() )
+ {
+ OUString aId = xContentAccess->queryContentIdentfierString();
+ OUString* pFile = new OUString( aId );
+ pFiles->Insert( pFile, LIST_APPEND );
+ }
+ }
+ catch( ::com::sun::star::ucb::CommandAbortedException& )
+ {
+ DBG_ERRORFILE( "XContentAccess::next(): CommandAbortedException" );
+ }
+ catch( ... )
+ {
+ DBG_ERRORFILE( "XContentAccess::next(): Any other exception" );
+ }
+ }
+ }
+ catch( ... )
+ {
+ DBG_ERRORFILE( "GetFolderContents: Any other exception" );
+ }
+
+ if ( pFiles )
+ {
+ USHORT nCount = pFiles->Count();
+ Sequence < OUString > aRet( nCount );
+ OUString* pRet = aRet.getArray();
+ for ( USHORT i = 0; i < nCount; ++i )
+ {
+ OUString* pFile = pFiles->GetObject(i);
+ pRet[i] = *( pFile );
+ delete pFile;
+ }
+ delete pFiles;
+ return aRet;
+ }
+ else
+ return Sequence < OUString > ();
+}
+
+// -----------------------------------------------------------------------
+
+Sequence < OUString > SfxContentHelper::GetFolderContentProperties( const String& rFolder, sal_Bool bFolder )
+{
+ StringList_Impl* pProperties = NULL;
+ INetURLObject aFolderObj( rFolder, INET_PROT_FILE );
+ try
+ {
+ Content aCnt( aFolderObj.GetMainURL(), Reference< ::com::sun::star::ucb::XCommandEnvironment >() );
+ Reference< XResultSet > xResultSet;
+ Reference< com::sun::star::ucb::XDynamicResultSet > xDynResultSet;
+ Sequence< OUString > aProps(5);
+ OUString* pProps = aProps.getArray();
+ pProps[0] = OUString::createFromAscii( "Title" );
+ pProps[1] = OUString::createFromAscii( "ContentType" );
+ pProps[2] = OUString::createFromAscii( "Size" );
+ pProps[3] = OUString::createFromAscii( "DateModified" );
+ pProps[4] = OUString::createFromAscii( "IsFolder" );
+
+ try
+ {
+ ResultSetInclude eInclude = bFolder ? INCLUDE_FOLDERS_AND_DOCUMENTS : INCLUDE_DOCUMENTS_ONLY;
+ xDynResultSet = aCnt.createDynamicCursor( aProps, eInclude );
+
+ Reference < com::sun::star::ucb::XAnyCompareFactory > xFactory;
+ Reference < XMultiServiceFactory > xMgr = getProcessServiceFactory();
+ Reference < com::sun::star::ucb::XSortedDynamicResultSetFactory > xSRSFac(
+ xMgr->createInstance( ::rtl::OUString::createFromAscii("com.sun.star.ucb.SortedDynamicResultSetFactory") ), UNO_QUERY );
+
+ Sequence< com::sun::star::ucb::NumberedSortingInfo > aSortInfo( 2 );
+ com::sun::star::ucb::NumberedSortingInfo* pInfo = aSortInfo.getArray();
+ pInfo[ 0 ].ColumnIndex = 5;
+ pInfo[ 0 ].Ascending = sal_False;
+ pInfo[ 1 ].ColumnIndex = 1;
+ pInfo[ 1 ].Ascending = sal_True;
+
+ Reference< com::sun::star::ucb::XDynamicResultSet > xDynamicResultSet;
+ xDynamicResultSet =
+ xSRSFac->createSortedDynamicResultSet( xDynResultSet, aSortInfo, xFactory );
+ if ( xDynamicResultSet.is() )
+ {
+ sal_Int16 nCaps = xDynamicResultSet->getCapabilities();
+ xResultSet = xDynamicResultSet->getStaticResultSet();
+ }
+
+// if ( xDynResultSet.is() )
+// xResultSet = xDynResultSet->getStaticResultSet();
+ }
+ catch( ::com::sun::star::ucb::CommandAbortedException& )
+ {
+ DBG_ERRORFILE( "createCursor: CommandAbortedException" );
+ }
+ catch( ... )
+ {
+ DBG_ERRORFILE( "createCursor: Any other exception" );
+ }
+
+ if ( xResultSet.is() )
+ {
+ pProperties = new StringList_Impl;
+ Reference< com::sun::star::sdbc::XRow > xRow( xResultSet, UNO_QUERY );
+ Reference< com::sun::star::ucb::XContentAccess > xContentAccess( xResultSet, UNO_QUERY );
+ ULONG nFolderPos = LIST_APPEND;
+
+ try
+ {
+ while ( xResultSet->next() )
+ {
+ String aTitle( xRow->getString(1) );
+ String aType( xRow->getString(2) );
+ sal_Int64 nSize = xRow->getLong(3);
+ ::com::sun::star::util::DateTime aDT = xRow->getTimestamp(4);
+ sal_Bool bFolder = xRow->getBoolean(5);
+
+ String aRow = aTitle;
+ aRow += '\t';
+//! aRow += aType;
+//! aRow += '\t';
+ aRow += String::CreateFromInt64( nSize );
+ aRow += '\t';
+ AppendDateTime_Impl( aDT, aRow );
+ aRow += '\t';
+ aRow += String( xContentAccess->queryContentIdentfierString() );
+ aRow += '\t';
+ aRow += bFolder ? '1' : '0';
+ OUString* pRow = new OUString( aRow );
+ ULONG nPos = LIST_APPEND;
+ if ( bFolder )
+ {
+ if ( LIST_APPEND == nFolderPos )
+ nFolderPos = 0;
+ else
+ nFolderPos++;
+ nPos = nFolderPos;
+ }
+ pProperties->Insert( pRow, nPos );
+ }
+ }
+ catch( ::com::sun::star::ucb::CommandAbortedException& )
+ {
+ DBG_ERRORFILE( "XContentAccess::next(): CommandAbortedException" );
+ }
+ catch( ... )
+ {
+ DBG_ERRORFILE( "XContentAccess::next(): Any other exception" );
+ }
+ }
+ }
+ catch( ... )
+ {
+ DBG_ERRORFILE( "GetFolderContents: Any other exception" );
+ }
+
+ if ( pProperties )
+ {
+ USHORT nCount = pProperties->Count();
+ Sequence < OUString > aRet( nCount );
+ OUString* pRet = aRet.getArray();
+ for ( USHORT i = 0; i < nCount; ++i )
+ {
+ OUString* pProperty = pProperties->GetObject(i);
+ pRet[i] = *( pProperty );
+ delete pProperty;
+ }
+ delete pProperties;
+ return aRet;
+ }
+ else
+ return Sequence < OUString > ();
+}
+
+// -----------------------------------------------------------------------
+
+sal_Bool SfxContentHelper::CopyTo( const String& rSource, const String& rDest )
+{
+ return Transfer_Impl( rSource, rDest, sal_False, NameClash::ERROR );
+}
+
+// -----------------------------------------------------------------------
+
+sal_Bool SfxContentHelper::MoveTo( const String& rSource, const String& rDest, sal_Int32 nNameClash )
+{
+ return Transfer_Impl( rSource, rDest, sal_True, nNameClash );
+}
+
+// -----------------------------------------------------------------------
+
+sal_Bool SfxContentHelper::MakeFolder( const String& rFolder )
+{
+ INetURLObject aURL( rFolder, INET_PROT_FILE );
+ String aNewFolderURL = aURL.GetMainURL();
+ String aTitle = aURL.getName();
+ aURL.removeSegment();
+ Sequence<OUString> aNames(2);
+ OUString* pNames = aNames.getArray();
+ pNames[0] = OUString( RTL_CONSTASCII_USTRINGPARAM( "Title" ) );
+ pNames[1] = OUString( RTL_CONSTASCII_USTRINGPARAM( "IsFolder" ) );
+ Sequence<Any> aValues(2);
+ Any* pValues = aValues.getArray();
+ pValues[0] = makeAny( OUString( aTitle ) );
+ pValues[1] = makeAny( sal_Bool( sal_True ) );
+ Reference< ::com::sun::star::ucb::XCommandEnvironment > aCmdEnv;
+ sal_Bool bRet = sal_False;
+ try
+ {
+ Content aCnt( aURL.GetMainURL(), aCmdEnv );
+ Content aNewFolder( aNewFolderURL, aCmdEnv );
+ OUString aType( RTL_CONSTASCII_USTRINGPARAM( "FSysFolder" ) );
+ bRet = aCnt.insertNewContent( aType, aNames, aValues, aNewFolder );
+ }
+ catch( ::com::sun::star::ucb::CommandAbortedException& )
+ {
+ DBG_ERRORFILE( "CommandAbortedException" );
+ }
+ catch( ... )
+ {
+ DBG_ERRORFILE( "Any other exception" );
+ }
+
+ return bRet;
+}
+
+// -----------------------------------------------------------------------
+
+ErrCode SfxContentHelper::QueryDiskSpace( const String& rPath, sal_Int64& rFreeBytes )
+{
+ ErrCode nErr = 0;
+ rFreeBytes = 0;
+ INetURLObject aObj( rPath, INET_PROT_FILE );
+ try
+ {
+ Content aCnt( aObj.GetMainURL(), Reference< ::com::sun::star::ucb::XCommandEnvironment > () );
+ aCnt.getPropertyValue( OUString::createFromAscii( "FreeSpace" ) ) >>= rFreeBytes;
+ }
+ catch( ::com::sun::star::ucb::CommandAbortedException& )
+ {
+ DBG_ERRORFILE( "CommandAbortedException" );
+ nErr = ERRCODE_IO_GENERAL;
+ }
+ catch( ... )
+ {
+ DBG_ERRORFILE( "Any other exception" );
+ nErr = ERRCODE_IO_GENERAL;
+ }
+ return nErr;
+}
+
+// -----------------------------------------------------------------------
+
+ULONG SfxContentHelper::GetSize( const String& rContent )
+{
+ ULONG nSize = 0;
+ sal_Int64 nTemp = 0;
+ INetURLObject aObj( rContent, INET_PROT_FILE );
+ try
+ {
+ Content aCnt( aObj.GetMainURL(), Reference< ::com::sun::star::ucb::XCommandEnvironment > () );
+ aCnt.getPropertyValue( OUString::createFromAscii( "Size" ) ) >>= nTemp;
+ }
+ catch( ::com::sun::star::ucb::CommandAbortedException& )
+ {
+ DBG_ERRORFILE( "CommandAbortedException" );
+ }
+ catch( ... )
+ {
+ DBG_ERRORFILE( "Any other exception" );
+ }
+ nSize = (UINT32)nTemp;
+ return nSize;
+}
+
+// -----------------------------------------------------------------------
+
+sal_Bool SfxContentHelper::IsYounger( const String& rIsYoung, const String& rIsOlder )
+{
+ DateTime aYoungDate, aOlderDate;
+ INetURLObject aYoungObj( rIsYoung, INET_PROT_FILE );
+ INetURLObject aOlderObj( rIsOlder, INET_PROT_FILE );
+ try
+ {
+ Reference< ::com::sun::star::ucb::XCommandEnvironment > aCmdEnv;
+ Content aYoung( aYoungObj.GetMainURL(), aCmdEnv );
+ ::com::sun::star::util::DateTime aTempYoungDate;
+ aYoung.getPropertyValue( OUString::createFromAscii( "DateModified" ) ) >>= aTempYoungDate;
+ CONVERT_DATETIME( aTempYoungDate, aYoungDate );
+ Content aOlder( aOlderObj.GetMainURL(), aCmdEnv );
+ ::com::sun::star::util::DateTime aTempOlderDate;
+ aOlder.getPropertyValue( OUString::createFromAscii( "DateModified" ) ) >>= aTempOlderDate;
+ CONVERT_DATETIME( aTempOlderDate, aOlderDate );
+ }
+ catch( ::com::sun::star::ucb::CommandAbortedException& )
+ {
+ DBG_ERRORFILE( "CommandAbortedException" );
+ }
+ catch( ... )
+ {
+ DBG_ERRORFILE( "Any other exception" );
+ }
+
+ return ( aYoungDate > aOlderDate );
+}
+
+// -----------------------------------------------------------------------
+// please don't use it (only used in appbas.cxx and appcfg.cxx)
+sal_Bool SfxContentHelper::Exists( const String& rContent )
+{
+ INetURLObject aObj( rContent, INET_PROT_FILE );
+ rtl::OUString aTmp( aObj.GetMainURL() );
+ rtl::OUString aResult;
+ if ( FileBase::getNormalizedPathFromFileURL( aTmp, aResult ) == FileBase::E_None )
+ {
+ FileBase::RC err = Directory::create( aResult );
+ if ( err == FileBase::E_EXIST )
+ return sal_True;
+ else
+ Directory::remove( aResult );
+ }
+
+ return sal_False;
+}
+
+// -----------------------------------------------------------------------
+
+sal_Bool SfxContentHelper::Find( const String& rFolder, const String& rName, String& rFile )
+{
+ sal_Bool bRet = sal_False;
+ rtl::OUString aFile;
+ if ( FileBase::searchNormalizedPath( rName, rFolder, aFile ) == FileBase::E_None )
+ {
+ rtl::OUString aResult;
+ FileBase::getFileURLFromNormalizedPath( aFile, aResult );
+ rFile = aResult;
+ bRet = sal_True;
+ }
+
+ return bRet;
+}
+
+
diff --git a/sfx2/source/bastyp/makefile.mk b/sfx2/source/bastyp/makefile.mk
new file mode 100644
index 000000000000..e6fcee81c370
--- /dev/null
+++ b/sfx2/source/bastyp/makefile.mk
@@ -0,0 +1,117 @@
+#*************************************************************************
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.1.1.1 $
+#
+# last change: $Author: hr $ $Date: 2000-09-18 16:52:28 $
+#
+# The Contents of this file are made available subject to the terms of
+# either of the following licenses
+#
+# - GNU Lesser General Public License Version 2.1
+# - Sun Industry Standards Source License Version 1.1
+#
+# Sun Microsystems Inc., October, 2000
+#
+# GNU Lesser General Public License Version 2.1
+# =============================================
+# Copyright 2000 by Sun Microsystems, Inc.
+# 901 San Antonio Road, Palo Alto, CA 94303, USA
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License version 2.1, as published by the Free Software Foundation.
+#
+# This library 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 for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+#
+# Sun Industry Standards Source License Version 1.1
+# =================================================
+# The contents of this file are subject to the Sun Industry Standards
+# Source License Version 1.1 (the "License"); You may not use this file
+# except in compliance with the License. You may obtain a copy of the
+# License at http://www.openoffice.org/license.html.
+#
+# Software provided under this License is provided on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+# See the License for the specific provisions governing your rights and
+# obligations concerning the Software.
+#
+# The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+#
+# Copyright: 2000 by Sun Microsystems, Inc.
+#
+# All Rights Reserved.
+#
+# Contributor(s): _______________________________________
+#
+#
+#
+#*************************************************************************
+
+PRJ=..$/..
+
+PRJNAME=sfx2
+TARGET=bastyp
+ENABLE_EXCEPTIONS=TRUE
+.INCLUDE : $(PRJ)$/util$/makefile.pmk
+AUTOSEG=true
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : svpre.mk
+.INCLUDE : settings.mk
+.INCLUDE : sv.mk
+
+# --- Files --------------------------------------------------------
+
+SLOFILES =\
+ $(SLO)$/streams.obj \
+ $(SLO)$/downimpl.obj \
+ $(SLO)$/plugwin.obj \
+ $(SLO)$/downloadcontroller.obj \
+ $(SLO)$/propset.obj \
+ $(SLO)$/itmfac.obj \
+ $(SLO)$/sfxhtml.obj \
+ $(SLO)$/frmhtml.obj \
+ $(SLO)$/frmhtmlw.obj \
+ $(SLO)$/misc.obj \
+ $(SLO)$/idpool.obj \
+ $(SLO)$/progress.obj \
+ $(SLO)$/sfxresid.obj \
+ $(SLO)$/newhdl.obj \
+ $(SLO)$/bitset.obj \
+ $(SLO)$/minarray.obj \
+ $(SLO)$/fltfnc.obj \
+ $(SLO)$/eacopier.obj \
+ $(SLO)$/mieclip.obj \
+ $(SLO)$/fltdlg.obj \
+ $(SLO)$/helper.obj
+
+SRCFILES =\
+ fltdlg.src \
+ fltfnc.src \
+ bastyp.src \
+ newhdl.src
+
+EXCEPTIONSFILES =\
+ $(SLO)$/propset.obj \
+ $(SLO)$/streams.obj \
+ $(SLO)$/downimpl.obj \
+ $(SLO)$/helper.obj
+
+# --- Targets -------------------------------------------------------
+
+.INCLUDE : target.mk
+
diff --git a/sfx2/source/bastyp/mieclip.cxx b/sfx2/source/bastyp/mieclip.cxx
new file mode 100644
index 000000000000..1b5b6dccf222
--- /dev/null
+++ b/sfx2/source/bastyp/mieclip.cxx
@@ -0,0 +1,190 @@
+/*************************************************************************
+ *
+ * $RCSfile: mieclip.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:28 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _STREAM_HXX //autogen
+#include <tools/stream.hxx>
+#endif
+#ifndef _CACHESTR_HXX //autogen
+#include <tools/cachestr.hxx>
+#endif
+
+#ifndef _SV_EXCHANGE_HXX //autogen
+#include <vcl/exchange.hxx>
+#endif
+
+#ifndef _SVSTOR_HXX //autogen
+#include <so3/svstor.hxx>
+#endif
+#ifndef _DTRANS_HXX //autogen
+#include <so3/dtrans.hxx>
+#endif
+#ifndef _SOT_FORMATS_HXX //autogen
+#include <sot/formats.hxx>
+#endif
+
+#include <mieclip.hxx>
+#include "sfxuno.hxx"
+
+MSE40HTMLClipFormatObj::~MSE40HTMLClipFormatObj()
+{
+ delete pStrm;
+}
+
+BOOL MSE40HTMLClipFormatObj::GetData( SotDataObject& rObj )
+{
+ SvData aData( SOT_FORMATSTR_ID_HTML_SIMPLE );
+ if( rObj.GetData( &aData ) )
+ return GetData( aData );
+ return FALSE;
+}
+
+BOOL MSE40HTMLClipFormatObj::GetData( SvData& rData )
+{
+ BOOL bRet = FALSE;
+ SvStorageStreamRef xStrm;
+ rData.GetData( (SvStorageStreamRef&)xStrm );
+ if( xStrm.Is() )
+ {
+ ByteString sLine, sVersion;
+ ULONG nStt = 0, nEnd = 0;
+ USHORT nIndex = 0;
+
+ xStrm->Seek(STREAM_SEEK_TO_BEGIN);
+ xStrm->ResetError();
+
+ if( xStrm->ReadLine( sLine ) &&
+ sLine.GetToken( 0, ':', nIndex ) == "Version" )
+ {
+ sVersion = sLine.Copy( nIndex );
+ while( xStrm->ReadLine( sLine ) )
+ {
+ nIndex = 0;
+ ByteString sTmp( sLine.GetToken( 0, ':', nIndex ) );
+ if( sTmp == "StartHTML" )
+ nStt = (ULONG)(sLine.Erase( 0, nIndex ).ToInt32());
+ else if( sTmp == "EndHTML" )
+ nEnd = (ULONG)(sLine.Erase( 0, nIndex ).ToInt32());
+ else if( sTmp == "SourceURL" )
+ sBaseURL = String(S2U(sLine.Erase( 0, nIndex )));
+
+ if( nEnd && nStt &&
+ ( sBaseURL.Len() || xStrm->Tell() >= nStt ))
+ {
+ bRet = TRUE;
+ break;
+ }
+ }
+ }
+
+ if( bRet )
+ {
+ xStrm->Seek( nStt );
+
+ pStrm = new SvCacheStream( ( nEnd - nStt < 0x10000l
+ ? nEnd - nStt + 32
+ : 0 ));
+ *pStrm << *xStrm;
+ pStrm->SetStreamSize( nEnd - nStt );
+ pStrm->Seek( STREAM_SEEK_TO_BEGIN );
+
+ bRet = TRUE;
+ }
+ }
+ return bRet;
+}
+
+
+////////////////////////////////////////////////////////////////////////////////
+//
+/* $Log: not supported by cvs2svn $
+/* Revision 1.9 2000/09/17 16:47:18 willem.vandorp
+/* OpenOffice header added.
+/*
+/* Revision 1.8 2000/09/06 14:49:46 willem.vandorp
+/* Header and footer replaced.
+/*
+/* Revision 1.7 2000/05/02 09:16:06 as
+/* unicode changes
+/*
+/* Revision 1.6 2000/03/02 19:08:47 jp
+/* Bug #73756#: GetData - Base URL may not be exist
+/*
+/* Revision 1.5 1999/12/16 19:33:27 er
+/* #60614# add: GetData with SvData
+/*
+/* Revision 1.4 1999/01/18 13:36:12 JP
+/* Task #59398#: unnoetiges RegisterClipb... gegen IDS ausgetauscht
+/*
+
+ Rev 1.3 18 Jan 1999 14:36:12 JP
+ Task #59398#: unnoetiges RegisterClipb... gegen IDS ausgetauscht
+
+ Rev 1.2 23 Nov 1998 12:14:26 MBA
+ Fix #56371#: Umstellung TF_ONE51
+
+ Rev 1.1 22 Jun 1998 21:20:44 JP
+ SvDataObject gegen SorDataObject ausgetauscht
+
+ Rev 1.0 18 Feb 1998 17:28:08 OK
+ NEW: MSE40HTMLClipFormatObj
+
+*/
+
diff --git a/sfx2/source/bastyp/minarray.cxx b/sfx2/source/bastyp/minarray.cxx
new file mode 100644
index 000000000000..9bd98fe1fe40
--- /dev/null
+++ b/sfx2/source/bastyp/minarray.cxx
@@ -0,0 +1,766 @@
+/*************************************************************************
+ *
+ * $RCSfile: minarray.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:28 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#pragma hdrstop
+
+#include "minarray.hxx"
+
+// -----------------------------------------------------------------------
+
+SfxPtrArr::SfxPtrArr( BYTE nInitSize, BYTE nGrowSize ):
+ nUsed( 0 ),
+ nGrow( nGrowSize ? nGrowSize : 1 ),
+ nUnused( nInitSize )
+{
+ DBG_MEMTEST();
+ USHORT nMSCBug = nInitSize;
+
+ if ( nMSCBug > 0 )
+ pData = new void*[nMSCBug];
+ else
+ pData = 0;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPtrArr::SfxPtrArr( const SfxPtrArr& rOrig )
+{
+ DBG_MEMTEST();
+ nUsed = rOrig.nUsed;
+ nGrow = rOrig.nGrow;
+ nUnused = rOrig.nUnused;
+
+ if ( rOrig.pData != 0 )
+ {
+ pData = new void*[nUsed+nUnused];
+ memcpy( pData, rOrig.pData, nUsed*sizeof(void*) );
+ }
+ else
+ pData = 0;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPtrArr::~SfxPtrArr()
+{
+ DBG_MEMTEST();
+ __DELETE (DEL_ARRAY (nUsed+nUnused)) pData;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPtrArr& SfxPtrArr::operator=( const SfxPtrArr& rOrig )
+{
+ DBG_MEMTEST();
+
+ __DELETE (DEL_ARRAY (nUsed+nUnused)) pData;
+
+ nUsed = rOrig.nUsed;
+ nGrow = rOrig.nGrow;
+ nUnused = rOrig.nUnused;
+
+ if ( rOrig.pData != 0 )
+ {
+ pData = new void*[nUsed+nUnused];
+ memcpy( pData, rOrig.pData, nUsed*sizeof(void*) );
+ }
+ else
+ pData = 0;
+ return *this;
+}
+
+// -----------------------------------------------------------------------
+
+void SfxPtrArr::Append( void* aElem )
+{
+ DBG_MEMTEST();
+ DBG_ASSERT( (nUsed+1) < ( USHRT_MAX / sizeof(void*) ), "array too large" );
+ // musz das Array umkopiert werden?
+ if ( nUnused == 0 )
+ {
+ USHORT nNewSize = (nUsed == 1) ? (nGrow==1 ? 2 : nGrow) : nUsed+nGrow;
+ void** pNewData = new void*[nNewSize];
+ if ( pData )
+ {
+ DBG_ASSERT( nUsed <= nNewSize, "" );
+ memmove( pNewData, pData, sizeof(void*)*nUsed );
+ __DELETE (DEL_ARRAY (nUsed)) pData;
+ }
+ nUnused = nNewSize-nUsed;
+ pData = pNewData;
+ }
+
+ // jetzt hinten in den freien Raum schreiben
+ pData[nUsed] = aElem;
+ ++nUsed;
+ --nUnused;
+}
+
+// -----------------------------------------------------------------------
+
+USHORT SfxPtrArr::Remove( USHORT nPos, USHORT nLen )
+{
+ DBG_MEMTEST();
+ // nLen adjustieren, damit nicht ueber das Ende hinaus geloescht wird
+ nLen = Min( (USHORT)(nUsed-nPos), nLen );
+
+ // einfache Aufgaben erfordern einfache Loesungen!
+ if ( nLen == 0 )
+ return 0;
+
+ // bleibt vielleicht keiner uebrig
+ if ( (nUsed-nLen) == 0 )
+ {
+ __DELETE (DEL_ARRAY (nUsed+nUnused)) pData;
+ pData = 0;
+ nUsed = 0;
+ nUnused = 0;
+ return nLen;
+ }
+
+ // feststellen, ob das Array dadurch physikalisch schrumpft...
+ if ( (nUnused+nLen) >= nGrow )
+ {
+ // auf die naechste Grow-Grenze aufgerundet verkleinern
+ USHORT nNewUsed = nUsed-nLen;
+ USHORT nNewSize = (nNewUsed+nGrow-1)/nGrow; nNewSize *= nGrow;
+ DBG_ASSERT( nNewUsed <= nNewSize && nNewUsed+nGrow > nNewSize,
+ "shrink size computation failed" );
+ void** pNewData = new void*[nNewSize];
+ if ( nPos > 0 )
+ {
+ DBG_ASSERT( nPos <= nNewSize, "" );
+ memmove( pNewData, pData, sizeof(void*)*nPos );
+ }
+ if ( nNewUsed != nPos )
+ memmove( pNewData+nPos, pData+nPos+nLen,
+ sizeof(void*)*(nNewUsed-nPos) );
+ __DELETE (DEL_ARRAY (nUsed+nUnused)) pData;
+ pData = pNewData;
+ nUsed = nNewUsed;
+ nUnused = nNewSize - nNewUsed;
+ return nLen;
+ }
+
+ // in allen anderen Faellen nur zusammenschieben
+ if ( nUsed-nPos-nLen > 0 )
+ memmove( pData+nPos, pData+nPos+nLen, (nUsed-nPos-nLen)*sizeof(void*) );
+ nUsed -= nLen;
+ nUnused += nLen;
+ return nLen;
+}
+
+// -----------------------------------------------------------------------
+
+BOOL SfxPtrArr::Remove( void* aElem )
+{
+ DBG_MEMTEST();
+ // einfache Aufgaben ...
+ if ( nUsed == 0 )
+ return FALSE;
+
+ // rueckwaerts, da meist der letzte zuerst wieder entfernt wird
+ void* *pIter = pData + nUsed - 1;
+ for ( USHORT n = 0; n < nUsed; ++n, --pIter )
+ if ( *pIter == aElem )
+ {
+ Remove(nUsed-n-1, 1);
+ return TRUE;
+ }
+ return FALSE;
+}
+
+// -----------------------------------------------------------------------
+
+BOOL SfxPtrArr::Replace( void* aOldElem, void* aNewElem )
+{
+ DBG_MEMTEST();
+ // einfache Aufgaben ...
+ if ( nUsed == 0 )
+ return FALSE;
+
+ // rueckwaerts, da meist der letzte zuerst wieder entfernt wird
+ void* *pIter = pData + nUsed - 1;
+ for ( USHORT n = 0; n < nUsed; ++n, --pIter )
+ if ( *pIter == aOldElem )
+ {
+ pData[nUsed-n-1] = aNewElem;
+ return TRUE;
+ }
+ return FALSE;
+}
+
+// -----------------------------------------------------------------------
+
+BOOL SfxPtrArr::Contains( const void* rItem ) const
+{
+ DBG_MEMTEST();
+ if ( !nUsed )
+ return FALSE;
+
+ for ( USHORT n = 0; n < nUsed; ++n )
+ {
+ void* p = GetObject(n);
+ if ( p == rItem )
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+// -----------------------------------------------------------------------
+
+void SfxPtrArr::Insert( USHORT nPos, void* rElem )
+{
+ DBG_MEMTEST();
+ DBG_ASSERT( (nUsed+1) < ( USHRT_MAX / sizeof(void*) ), "array too large" );
+ // musz das Array umkopiert werden?
+ if ( nUnused == 0 )
+ {
+ // auf die naechste Grow-Grenze aufgerundet vergroeszern
+ USHORT nNewSize = nUsed+nGrow;
+ void** pNewData = new void*[nNewSize];
+
+ if ( pData )
+ {
+ DBG_ASSERT( nUsed < nNewSize, "" );
+ memmove( pNewData, pData, sizeof(void*)*nUsed );
+ __DELETE (DEL_ARRAY (nUsed)) pData;
+ }
+ nUnused = nNewSize-nUsed;
+ pData = pNewData;
+ }
+
+ // jetzt den hinteren Teil verschieben
+ if ( nPos < nUsed )
+ memmove( pData+nPos+1, pData+nPos, (nUsed-nPos)*sizeof(void*) );
+
+ // jetzt in den freien Raum schreiben
+ memmove( pData+nPos, &rElem, sizeof(void*) );
+ nUsed += 1;
+ nUnused -= 1;
+}
+
+// class ByteArr ---------------------------------------------------------
+
+ByteArr::ByteArr( BYTE nInitSize, BYTE nGrowSize ):
+ nUsed( 0 ),
+ nGrow( nGrowSize ? nGrowSize : 1 ),
+ nUnused( nInitSize )
+{
+ DBG_MEMTEST();
+ USHORT nMSCBug = nInitSize;
+
+ if ( nInitSize > 0 )
+ pData = new char[nMSCBug];
+ else
+ pData = 0;
+}
+
+// -----------------------------------------------------------------------
+
+ByteArr::ByteArr( const ByteArr& rOrig )
+{
+ DBG_MEMTEST();
+ nUsed = rOrig.nUsed;
+ nGrow = rOrig.nGrow;
+ nUnused = rOrig.nUnused;
+
+ if ( rOrig.pData != 0 )
+ {
+ pData = new char[nUsed+nUnused];
+ memcpy( pData, rOrig.pData, nUsed*sizeof(char) );
+ }
+ else
+ pData = 0;
+}
+
+// -----------------------------------------------------------------------
+
+ByteArr::~ByteArr()
+{
+ DBG_MEMTEST();
+ __DELETE (DEL_ARRAY (nUsed+nUnused)) pData;
+}
+
+// -----------------------------------------------------------------------
+
+ByteArr& ByteArr::operator=( const ByteArr& rOrig )
+{
+ DBG_MEMTEST();
+
+ __DELETE (DEL_ARRAY (nUsed+nUnused)) pData;
+
+ nUsed = rOrig.nUsed;
+ nGrow = rOrig.nGrow;
+ nUnused = rOrig.nUnused;
+
+ if ( rOrig.pData != 0 )
+ {
+ pData = new char[nUsed+nUnused];
+ memcpy( pData, rOrig.pData, nUsed*sizeof(char) );
+ }
+ else
+ pData = 0;
+ return *this;
+}
+
+// -----------------------------------------------------------------------
+
+void ByteArr::Append( char aElem )
+{
+ DBG_MEMTEST();
+ // musz das Array umkopiert werden?
+ if ( nUnused == 0 )
+ {
+ USHORT nNewSize = (nUsed == 1) ? (nGrow==1 ? 2 : nGrow) : nUsed+nGrow;
+ char* pNewData = new char[nNewSize];
+ if ( pData )
+ {
+ DBG_ASSERT( nUsed <= nNewSize, "" );
+ memmove( pNewData, pData, sizeof(char)*nUsed );
+ __DELETE (DEL_ARRAY (nUsed+nUnused)) pData;
+ }
+ nUnused = nNewSize-nUsed;
+ pData = pNewData;
+ }
+
+ // jetzt hinten in den freien Raum schreiben
+ pData[nUsed] = aElem;
+ ++nUsed;
+ --nUnused;
+}
+
+// -----------------------------------------------------------------------
+
+USHORT ByteArr::Remove( USHORT nPos, USHORT nLen )
+{
+ DBG_MEMTEST();
+ // nLen adjustieren, damit nicht ueber das Ende hinaus geloescht wird
+ nLen = Min( (USHORT)(nUsed-nPos), nLen );
+
+ // einfache Aufgaben erfordern einfache Loesungen!
+ if ( nLen == 0 )
+ return 0;
+
+ // bleibt vielleicht keiner uebrig
+ if ( (nUsed-nLen) == 0 )
+ {
+ __DELETE (DEL_ARRAY (nUsed+nUnused)) pData;
+ pData = 0;
+ nUsed = 0;
+ nUnused = 0;
+ return nLen;
+ }
+
+ // feststellen, ob das Array dadurch physikalisch schrumpft...
+ if ( (nUnused+nLen) >= nGrow )
+ {
+ // auf die naechste Grow-Grenze aufgerundet verkleinern
+ USHORT nNewUsed = nUsed-nLen;
+ USHORT nNewSize = (nNewUsed+nGrow-1)/nGrow; nNewSize *= nGrow;
+ DBG_ASSERT( nNewUsed <= nNewSize && nNewUsed+nGrow > nNewSize,
+ "shrink size computation failed" );
+ char* pNewData = new char[nNewSize];
+ if ( nPos > 0 )
+ {
+ DBG_ASSERT( nPos <= nNewSize, "" );
+ memmove( pNewData, pData, sizeof(char)*nPos );
+ }
+ if ( nNewUsed != nPos )
+ memmove( pNewData+nPos, pData+nPos+nLen,
+ sizeof(char)*(nNewUsed-nPos) );
+ __DELETE (DEL_ARRAY (nUsed+nUnused)) pData;
+ pData = pNewData;
+ nUsed = nNewUsed;
+ nUnused = nNewSize - nNewUsed;
+ return nLen;
+ }
+
+ // in allen anderen Faellen nur zusammenschieben
+ if ( nUsed-nPos-nLen > 0 )
+ memmove( pData+nPos, pData+nPos+nLen, (nUsed-nPos-nLen)*sizeof(char) );
+ nUsed -= nLen;
+ nUnused += nLen;
+ return nLen;
+}
+
+// -----------------------------------------------------------------------
+
+BOOL ByteArr::Remove( char aElem )
+{
+ DBG_MEMTEST();
+ // einfache Aufgaben ...
+ if ( nUsed == 0 )
+ return FALSE;
+
+ // rueckwaerts, da meist der letzte zuerst wieder entfernt wird
+ char *pIter = pData + nUsed - 1;
+ for ( USHORT n = 0; n < nUsed; ++n, --pIter )
+ if ( *pIter == aElem )
+ {
+ Remove(nUsed-n-1, 1);
+ return TRUE;
+ }
+ return FALSE;
+}
+
+// -----------------------------------------------------------------------
+
+BOOL ByteArr::Contains( const char rItem ) const
+{
+ DBG_MEMTEST();
+ if ( !nUsed )
+ return FALSE;
+
+ for ( USHORT n = 0; n < nUsed; ++n )
+ {
+ char p = GetObject(n);
+ if ( p == rItem )
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+// -----------------------------------------------------------------------
+
+void ByteArr::Insert( USHORT nPos, char rElem )
+{
+ DBG_MEMTEST();
+ // musz das Array umkopiert werden?
+ if ( nUnused == 0 )
+ {
+ // auf die naechste Grow-Grenze aufgerundet vergroeszern
+ USHORT nNewSize = nUsed+nGrow;
+ char* pNewData = new char[nNewSize];
+
+ if ( pData )
+ {
+ DBG_ASSERT( nUsed < nNewSize, "" );
+ memmove( pNewData, pData, sizeof(char)*nUsed );
+ __DELETE (DEL_ARRAY (nUsed)) pData;
+ }
+ nUnused = nNewSize-nUsed;
+ pData = pNewData;
+ }
+
+ // jetzt den hinteren Teil verschieben
+ if ( nPos < nUsed )
+ memmove( pData+nPos+1, pData+nPos, (nUsed-nPos)*sizeof(char) );
+
+ // jetzt in den freien Raum schreiben
+ memmove( pData+nPos, &rElem, sizeof(char) );
+ nUsed += 1;
+ nUnused -= 1;
+}
+
+// -----------------------------------------------------------------------
+
+char ByteArr::operator[]( USHORT nPos ) const
+{
+ DBG_MEMTEST();
+ DBG_ASSERT( nPos < nUsed, "" );
+ return *(pData+nPos);
+}
+
+// -----------------------------------------------------------------------
+
+char& ByteArr::operator [] (USHORT nPos)
+{
+ DBG_MEMTEST();
+ DBG_ASSERT( nPos < nUsed, "" );
+ return *(pData+nPos);
+}
+
+// class WordArr ---------------------------------------------------------
+
+WordArr::WordArr( BYTE nInitSize, BYTE nGrowSize ):
+ nUsed( 0 ),
+ nGrow( nGrowSize ? nGrowSize : 1 ),
+ nUnused( nInitSize )
+{
+ DBG_MEMTEST();
+ USHORT nMSCBug = nInitSize;
+
+ if ( nInitSize > 0 )
+ pData = new short[nMSCBug];
+ else
+ pData = 0;
+}
+
+// -----------------------------------------------------------------------
+
+WordArr::WordArr( const WordArr& rOrig )
+{
+ DBG_MEMTEST();
+ nUsed = rOrig.nUsed;
+ nGrow = rOrig.nGrow;
+ nUnused = rOrig.nUnused;
+
+ if ( rOrig.pData != 0 )
+ {
+ pData = new short[nUsed+nUnused];
+ memcpy( pData, rOrig.pData, nUsed*sizeof(short) );
+ }
+ else
+ pData = 0;
+}
+
+// -----------------------------------------------------------------------
+
+WordArr::~WordArr()
+{
+ DBG_MEMTEST();
+ __DELETE (DEL_ARRAY (nUsed+nUnused)) pData;
+}
+
+// -----------------------------------------------------------------------
+
+WordArr& WordArr::operator=( const WordArr& rOrig )
+{
+ DBG_MEMTEST();
+
+ __DELETE (DEL_ARRAY (nUsed+nUnused)) pData;
+
+ nUsed = rOrig.nUsed;
+ nGrow = rOrig.nGrow;
+ nUnused = rOrig.nUnused;
+
+ if ( rOrig.pData != 0 )
+ {
+ pData = new short[nUsed+nUnused];
+ memcpy( pData, rOrig.pData, nUsed*sizeof(short) );
+ }
+ else
+ pData = 0;
+ return *this;
+}
+
+// -----------------------------------------------------------------------
+
+void WordArr::Append( short aElem )
+{
+ DBG_MEMTEST();
+ // musz das Array umkopiert werden?
+ if ( nUnused == 0 )
+ {
+ USHORT nNewSize = (nUsed == 1) ? (nGrow==1 ? 2 : nGrow) : nUsed+nGrow;
+ short* pNewData = new short[nNewSize];
+ if ( pData )
+ {
+ DBG_ASSERT( nUsed <= nNewSize, " " );
+ memmove( pNewData, pData, sizeof(short)*nUsed );
+ __DELETE (DEL_ARRAY (nUsed)) pData;
+ }
+ nUnused = nNewSize-nUsed;
+ pData = pNewData;
+ }
+
+ // jetzt hinten in den freien Raum schreiben
+ pData[nUsed] = aElem;
+ ++nUsed;
+ --nUnused;
+}
+
+// -----------------------------------------------------------------------
+
+USHORT WordArr::Remove( USHORT nPos, USHORT nLen )
+{
+ DBG_MEMTEST();
+ // nLen adjustieren, damit nicht ueber das Ende hinaus geloescht wird
+ nLen = Min( (USHORT)(nUsed-nPos), nLen );
+
+ // einfache Aufgaben erfordern einfache Loesungen!
+ if ( nLen == 0 )
+ return 0;
+
+ // bleibt vielleicht keiner uebrig
+ if ( (nUsed-nLen) == 0 )
+ {
+ __DELETE (DEL_ARRAY (nUsed+nUnused)) pData;
+ pData = 0;
+ nUsed = 0;
+ nUnused = 0;
+ return nLen;
+ }
+
+ // feststellen, ob das Array dadurch physikalisch schrumpft...
+ if ( (nUnused+nLen) >= nGrow )
+ {
+ // auf die naechste Grow-Grenze aufgerundet verkleinern
+ USHORT nNewUsed = nUsed-nLen;
+ USHORT nNewSize = (nNewUsed+nGrow-1)/nGrow; nNewSize *= nGrow;
+ DBG_ASSERT( nNewUsed <= nNewSize && nNewUsed+nGrow > nNewSize,
+ "shrink size computation failed" );
+ short* pNewData = new short[nNewSize];
+ if ( nPos > 0 )
+ {
+ DBG_ASSERT( nPos <= nNewSize, "" );
+ memmove( pNewData, pData, sizeof(short)*nPos );
+ }
+ if ( nNewUsed != nPos )
+ memmove( pNewData+nPos, pData+nPos+nLen,
+ sizeof(short)*(nNewUsed-nPos) );
+ __DELETE (DEL_ARRAY (nUsed+nUnused)) pData;
+ pData = pNewData;
+ nUsed = nNewUsed;
+ nUnused = nNewSize - nNewUsed;
+ return nLen;
+ }
+
+ // in allen anderen Faellen nur zusammenschieben
+ if ( nUsed-nPos-nLen > 0 )
+ memmove( pData+nPos, pData+nPos+nLen, (nUsed-nPos-nLen)*sizeof(short) );
+ nUsed -= nLen;
+ nUnused += nLen;
+ return nLen;
+}
+
+// -----------------------------------------------------------------------
+
+BOOL WordArr::Remove( short aElem )
+{
+ DBG_MEMTEST();
+ // einfache Aufgaben ...
+ if ( nUsed == 0 )
+ return FALSE;
+
+ // rueckwaerts, da meist der letzte zuerst wieder entfernt wird
+ short *pIter = pData + nUsed - 1;
+ for ( USHORT n = 0; n < nUsed; ++n, --pIter )
+ if ( *pIter == aElem )
+ {
+ Remove(nUsed-n-1, 1);
+ return TRUE;
+ }
+ return FALSE;
+}
+
+// -----------------------------------------------------------------------
+
+BOOL WordArr::Contains( const short rItem ) const
+{
+ DBG_MEMTEST();
+ if ( !nUsed )
+ return FALSE;
+
+ for ( USHORT n = 0; n < nUsed; ++n )
+ {
+ short p = GetObject(n);
+ if ( p == rItem )
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+// -----------------------------------------------------------------------
+
+void WordArr::Insert( USHORT nPos, short rElem )
+{
+ DBG_MEMTEST();
+ // musz das Array umkopiert werden?
+ if ( nUnused == 0 )
+ {
+ // auf die naechste Grow-Grenze aufgerundet vergroeszern
+ USHORT nNewSize = nUsed+nGrow;
+ short* pNewData = new short[nNewSize];
+
+ if ( pData )
+ {
+ DBG_ASSERT( nUsed < nNewSize, "" );
+ memmove( pNewData, pData, sizeof(short)*nUsed );
+ __DELETE (DEL_ARRAY (nUsed)) pData;
+ }
+ nUnused = nNewSize-nUsed;
+ pData = pNewData;
+ }
+
+ // jetzt den hinteren Teil verschieben
+ if ( nPos < nUsed )
+ memmove( pData+nPos+1, pData+nPos, (nUsed-nPos)*sizeof(short) );
+
+ // jetzt in den freien Raum schreiben
+ memmove( pData+nPos, &rElem, sizeof(short) );
+ nUsed += 1;
+ nUnused -= 1;
+}
+
+// -----------------------------------------------------------------------
+
+short WordArr::operator[]( USHORT nPos ) const
+{
+ DBG_MEMTEST();
+ DBG_ASSERT( nPos < nUsed, "" );
+ return *(pData+nPos);
+}
+
+// -----------------------------------------------------------------------
+
+short& WordArr::operator [] (USHORT nPos)
+{
+ DBG_MEMTEST();
+ DBG_ASSERT( nPos < nUsed, "" );
+ return *(pData+nPos);
+}
+
+
diff --git a/sfx2/source/bastyp/misc.cxx b/sfx2/source/bastyp/misc.cxx
new file mode 100644
index 000000000000..47d9b462bd16
--- /dev/null
+++ b/sfx2/source/bastyp/misc.cxx
@@ -0,0 +1,141 @@
+/*************************************************************************
+ *
+ * $RCSfile: misc.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:28 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#pragma hdrstop
+
+#include "sfxtypes.hxx"
+
+//--------------------------------------------------------------------
+
+#if defined(DBG_UTIL) && ( defined(WNT) || defined(OS2) )
+unsigned SfxStack::nLevel = 0;
+#endif
+
+//--------------------------------------------------------------------
+
+String SearchAndReplace( const String &rSource,
+ const String &rToReplace,
+ const String &rReplacement )
+{
+ String aTarget( rSource );
+ USHORT nPos = rSource.Search( rToReplace );
+ if ( nPos != STRING_NOTFOUND )
+ {
+ aTarget.Erase( nPos, rToReplace.Len() );
+ return aTarget.Insert( rReplacement, nPos );
+ }
+ return rSource;
+}
+
+//--------------------------------------------------------------------
+
+String SfxStringEncode( const String &rSource, const char *pKey )
+{
+ String aRet;
+ String aCoded(rSource);
+/*ASMUSS
+ // codieren
+ USHORT nCode = 0;
+ for ( USHORT n1 = 0; n1 < aCoded.Len(); ++n1 )
+ {
+ aCoded[n1] ^= pKey[nCode];
+ if ( !pKey[++nCode] )
+ nCode = 0;
+ }
+
+ // als reine Buchstabenfolge darstellen
+ for ( USHORT n2 = 0; n2 < aCoded.Len(); ++n2 )
+ {
+ aRet += (char) ( 'a' + ((aCoded[n2] & 0xF0) >> 4) );
+ aRet += (char) ( 'a' + (aCoded[n2] & 0xF) );
+ }
+*/
+ return aRet;
+}
+
+//--------------------------------------------------------------------
+
+String SfxStringDecode( const String &rSource, const char *pKey )
+{
+ // Output-Buffer aufbereiten
+ String aRet;/*ASMUSS
+ aRet.AllocStrBuf( rSource.Len() / 2 );
+
+ // Buchstabenfolge in normale Zeichen wandeln
+ USHORT nTo = 0;
+ for ( USHORT n1 = 0; n1 < rSource.Len(); n1 += 2)
+ aRet[nTo++] = (unsigned char)
+ ( ( ( rSource[n1] - 'a' ) << 4 ) +
+ ( ( rSource[ USHORT(n1+1) ] - 'a' ) ) );
+
+ // decodieren
+ USHORT nCode = 0;
+ for ( USHORT n2 = 0; n2 < aRet.Len(); ++n2 )
+ {
+ aRet[n2] ^= pKey[nCode];
+ if ( !pKey[++nCode] )
+ nCode = 0;
+ }
+*/
+ return aRet;
+}
+
+
diff --git a/sfx2/source/bastyp/progress.cxx b/sfx2/source/bastyp/progress.cxx
new file mode 100644
index 000000000000..fa63434a23a3
--- /dev/null
+++ b/sfx2/source/bastyp/progress.cxx
@@ -0,0 +1,849 @@
+/*************************************************************************
+ *
+ * $RCSfile: progress.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:28 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#include "appdata.hxx"
+
+#ifndef _SBX_HXX //autogen
+#include <svtools/sbx.hxx>
+#endif
+#pragma hdrstop
+
+#include "progress.hxx"
+#include "viewfrm.hxx"
+#include "ipfrm.hxx"
+#include "viewsh.hxx"
+#include "objsh.hxx"
+#include "app.hxx"
+#include "stbmgr.hxx"
+#include "dispatch.hxx"
+#include "sfxtypes.hxx"
+#include "docfile.hxx"
+#include <workwin.hxx>
+
+#include <time.h>
+
+struct SfxProgress_Impl :
+ public SfxCancellable
+{
+ String aText, aStateText;
+ ULONG nMax;
+ clock_t nCreate;
+ clock_t nNextReschedule;
+ BOOL bLocked, bAllDocs;
+ BOOL bWaitMode;
+ BOOL bAllowRescheduling;
+ BOOL bRunning;
+ BOOL bIsStatusText;
+
+ SfxProgress* pActiveProgress;
+ SfxObjectShellRef xObjSh;
+ SfxStatusBarManager* pMgr;
+ SfxApplication* pApp;
+ SfxWorkWindow* pWorkWin;
+
+ SfxProgress_Impl( const String& );
+
+};
+
+//========================================================================
+
+#define TIMEOUT_PROGRESS 5L /* 10th s */
+#define MAXPERCENT_PROGRESS 33
+
+#define TIMEOUT_RESCHEDULE 10L /* 10th s */
+#define MAXPERCENT_RESCHEDULE 50
+
+#define Progress
+#include "sfxslots.hxx"
+
+#define aTypeLibInfo aProgressTypeLibImpl
+
+//========================================================================
+
+inline ULONG Get10ThSec()
+{
+#if defined (MSC) && defined (WIN)
+ ULONG n10Ticks = 10 * (ULONG)GetTickCount();
+#else
+ ULONG n10Ticks = 10 * (ULONG)clock();
+#endif
+
+ return n10Ticks / CLOCKS_PER_SEC;
+}
+
+// -----------------------------------------------------------------------
+
+void Enable_Impl(SfxObjectShell *pDoc, BOOL bEnable)
+{
+ SfxViewFrame *pFrame= SfxViewFrame::GetFirst(pDoc);
+ while ( pFrame )
+ {
+ pFrame->Enable(bEnable);
+ if ( pDoc )
+ pFrame->GetDispatcher()->Lock( !bEnable );
+ pFrame = SfxViewFrame::GetNext(*pFrame, pDoc);
+ }
+
+ if ( pDoc )
+ {
+ SfxFrame* pFrm = pDoc->GetMedium()->GetLoadTargetFrame();
+ pFrame = pFrm ? pFrm->GetCurrentViewFrame() : NULL;
+ if ( pFrame )
+ {
+ pFrame->Enable( bEnable );
+ pFrame->GetDispatcher()->Lock( !bEnable );
+ }
+ }
+ else
+ SFX_APP()->LockDispatcher( !bEnable );
+}
+
+// -----------------------------------------------------------------------
+
+SfxProgress_Impl::SfxProgress_Impl( const String &rTitle )
+ : SfxCancellable( ( pApp = SFX_APP(), pApp->GetCancelManager() ), rTitle ),
+ pActiveProgress( 0 )
+
+{
+}
+
+// -----------------------------------------------------------------------
+
+SfxProgress::SfxProgress
+(
+ SfxObjectShell* pObjSh, /* SfxObjectShell, an der die Aktion ausgef"uhrt
+ wird. Kann NULL sein, dann wird die Applikation
+ verwendet */
+
+ const String& rText, /* Text, der in der Statuszeile vor den Statusmonitor
+ erscheint */
+
+ ULONG nRange, /* Maximalwert des Bereiches */
+
+ BOOL bAll /* alle Dokumente oder nur das Dokument des ViewFrames
+ disablen (FALSE) */
+ ,BOOL bWait /* initial den Wait-Pointer aktivieren (TRUE) */
+)
+
+/* [Beschreibung]
+
+ Der Konstruktor der Klasse SfxProgress schaltet den als Parameter
+ "ubergebenen SfxObjectShell und SfxViewFrames, welche dieses Dokument
+ anzeigen in einen Progress-Mode. D.h. solange eine dieser SfxViewFrame
+ Instanzen aktiv ist, ist der dazugeh"orige SfxDispatcher und das
+ dazugeh"orige Window disabled. In der Statuszeile wird ein Balken zur
+ Fortschritts-Anzeige angezeigt.
+*/
+
+: nVal(0),
+ bSuspended(TRUE),
+ pImp( new SfxProgress_Impl( rText ) )
+{
+ pImp->bRunning = TRUE;
+ pImp->bAllowRescheduling = Application::IsInExecute();;
+
+ pImp->xObjSh = pObjSh;
+ pImp->aText = rText;
+ pImp->nMax = nRange;
+ pImp->bLocked = FALSE;
+ pImp->bWaitMode = bWait;
+ pImp->bIsStatusText = FALSE;
+ pImp->nCreate = Get10ThSec();
+ pImp->nNextReschedule = pImp->nCreate;
+ DBG( DbgOutf( "SfxProgress: created for '%s' at %luds",
+ rText.GetBuffer(), pImp->nCreate ) );
+ pImp->bAllDocs = bAll;
+ //pImp->pApp = SFX_APP();
+ pImp->pMgr = 0;
+ pImp->pWorkWin = 0;
+
+ pImp->pActiveProgress = GetActiveProgress( pObjSh );
+ if ( pObjSh )
+ pObjSh->SetProgress_Impl(this);
+ else if( !pImp->pActiveProgress )
+ pImp->pApp->SetProgress_Impl(this);
+ Resume();
+}
+
+// -----------------------------------------------------------------------
+
+SfxProgress::~SfxProgress()
+
+/* [Beschreibung]
+
+ Der Destruktor der Klasse SfxProgress restauriert den alten Zustand;
+ die Dokumente werden wieder freigeschaltet und die Statuszeile zeigt
+ wieder Items an.
+*/
+
+{
+ Stop();
+ if( pImp->bIsStatusText == TRUE )
+ GetpApp()->HideStatusText( );
+ delete pImp;
+}
+
+// -----------------------------------------------------------------------
+
+void SfxProgress::Stop()
+
+/* [Beschreibung]
+
+ Vorzeitiges Beenden des <SfxProgress>.
+*/
+
+{
+ if( pImp->pActiveProgress ) return;
+ if ( !pImp->bRunning )
+ return;
+ pImp->bRunning = FALSE;
+ DBG( DbgOutf( "SfxProgress: destroyed at %luds", Get10ThSec() ) );
+
+ Suspend();
+ if ( pImp->xObjSh.Is() )
+ pImp->xObjSh->SetProgress_Impl(0);
+ else
+ pImp->pApp->SetProgress_Impl(0);
+ if ( pImp->bLocked )
+ {
+ if ( pImp->xObjSh.Is() && !pImp->bAllDocs )
+ {
+ Enable_Impl(pImp->xObjSh, TRUE);
+ }
+ else
+ {
+ Enable_Impl(0, TRUE);
+ }
+ }
+}
+
+// -----------------------------------------------------------------------
+
+void SfxProgress::SetText
+(
+ const String& rText /* neuer Text */
+)
+
+/* [Beschreibung]
+
+ "Andert den Text, der links neben dem Fortschritts-Balken
+ angezeigt wird.
+*/
+
+{
+ if( pImp->pActiveProgress ) return;
+ if ( pImp->pMgr && pImp->pMgr->IsProgressMode() )
+ {
+ pImp->pMgr->EndProgressMode();
+ pImp->aText = rText;
+ pImp->pMgr->StartProgressMode( pImp->aText, pImp->nMax );
+ }
+}
+
+// -----------------------------------------------------------------------
+
+const String& SfxProgress::GetStateText_Impl() const
+{
+ return pImp->aStateText;
+}
+
+// -----------------------------------------------------------------------
+/*
+IMPL_STATIC_LINK( SfxProgress, SetStateHdl, PlugInLoadStatus*, pStatus )
+{
+ INetRequest* pReq = 0;
+ const INetHint *pHint = PTR_CAST( INetHint, pStatus->pHint );
+ pReq = PTR_CAST( INetRequest, pStatus->pBC );
+
+ String aString;
+ if( pReq )
+ aString = SfxMedium::GetStatusString( pHint->GetId(), pReq, pHint );
+ if( aString.Len() )
+ {
+ GetpApp()->ShowStatusText( aString );
+ if( pThis )
+ pThis->pImp->bIsStatusText = TRUE;
+ }
+ return 0;
+}
+*/
+
+// -----------------------------------------------------------------------
+
+// muss in AppDaten
+static ULONG nLastTime = 0;
+
+long TimeOut_Impl( void* pThis, void* pArgV )
+{
+ Timer *pArg = (Timer*)pArgV;
+ if( Time::GetSystemTicks() - nLastTime > 3000 )
+ {
+ GetpApp()->HideStatusText();
+ nLastTime = 0;
+ delete pArg;
+ }
+ else pArg->Start();
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_STATIC_LINK( SfxProgress, DefaultBindingProgress, SvProgressArg*, pArg )
+{
+ if( !nLastTime )
+ {
+ Timer *pTimer = new Timer();
+ pTimer->SetTimeout( 3000 );
+ pTimer->SetTimeoutHdl( Link( 0, TimeOut_Impl ) );
+ pTimer->Start();
+ }
+ if( Time::GetSystemTicks( ) - nLastTime > 100 )
+ {
+ nLastTime = Time::GetSystemTicks();
+ String aString = SfxMedium::GetStatusString( pArg );
+ if( aString.Len() )
+ GetpApp()->ShowStatusText( aString );
+ }
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+BOOL SfxProgress::SetStateText
+(
+ ULONG nNewVal, /* neuer Wert f"ur die Fortschritts-Anzeige */
+ const String& rNewVal, /* Status als Text */
+ ULONG nNewRange /* neuer Maximalwert, 0 f"ur Beibehaltung des alten */
+)
+
+{
+ pImp->aStateText = rNewVal;
+ return SetState( nNewVal, nNewRange );
+}
+
+// -----------------------------------------------------------------------
+
+BOOL SfxProgress::SetState
+(
+ ULONG nNewVal, /* neuer Wert f"ur die Fortschritts-Anzeige */
+
+ ULONG nNewRange /* neuer Maximalwert, 0 f"ur Beibehaltung des alten */
+)
+/* [Beschreibung]
+
+ Setzen des aktuellen Status; nach einem zeitlichen Versatz
+ wird Reschedule aufgerufen.
+
+
+ [R"uckgabewert]
+
+ BOOL TRUE
+ Fortfahren mit der Aktion
+
+ FALSE
+ Abbrechen der Aktion
+*/
+
+{
+ // wurde via Stop-Button angehalten?
+ if ( pImp->IsCancelled() )
+ return FALSE;
+
+ if( pImp->pActiveProgress ) return TRUE;
+
+ // neuen Wert "ubernehmen
+ BOOL bOver=FALSE;
+ nVal = nNewVal;
+
+ // neuer Range?
+ if ( nNewRange && nNewRange != pImp->nMax )
+ {
+ DBG( DbgOutf( "SfxProgress: range changed from %lu to %lu",
+ pImp->nMax, nNewRange ) );
+ pImp->nMax = nNewRange;
+ bOver = TRUE;
+ }
+
+ // noch kein StbManager eingestellt?
+ if ( !pImp->pMgr )
+ {
+ ULONG nTime = Get10ThSec();
+ ULONG nTimeDiff = nTime - pImp->nCreate;
+ ULONG nPercent = pImp->nMax ? nNewVal * 100 / pImp->nMax : 0;
+ DBG( DbgOutf( "SfxProgress: SetState invisible at %luds (%luds/%luds), %ld%%/%d%%",
+ nTime, nTimeDiff, TIMEOUT_PROGRESS,
+ nPercent, MAXPERCENT_PROGRESS ) );
+ if ( nTimeDiff > TIMEOUT_PROGRESS && nPercent <= MAXPERCENT_PROGRESS )
+ {
+ pImp->pWorkWin = pImp->pApp->GetWorkWindow_Impl( SfxViewFrame::Current() );
+ if( pImp->pWorkWin )
+ {
+ pImp->pWorkWin->SetTempStatusBar_Impl( TRUE );
+ pImp->pMgr = pImp->pWorkWin->GetStatusBarManager_Impl();
+ }
+ DBG( DbgOutf( "SfxProgress: visible" ) );
+ }
+ }
+
+ // schon ein StbManager?
+ if ( pImp->pMgr )
+ {
+// if ( ( !pImp->xObjSh.Is() || &pImp->xObjSh == SfxObjectShell::Current() ) )
+ {
+ // Rescheduling noch nicht aktiv?
+ if ( !pImp->bLocked && pImp->bAllowRescheduling )
+ {
+ ULONG nTime = Get10ThSec();
+ ULONG nTimeDiff = nTime - pImp->nCreate;
+ ULONG nPercent = pImp->nMax ? nNewVal * 100 / pImp->nMax : 0;
+ DBG( DbgOutf( "SfxProgress: SetState unlocked at %luds (%luds/%luds), %ld%%/%d%%",
+ nTime, nTimeDiff, TIMEOUT_RESCHEDULE,
+ nPercent, MAXPERCENT_RESCHEDULE ) );
+ // Zeitpunkt zum verz"ogerten Rescheduling erreicht?
+ if ( nTimeDiff > TIMEOUT_RESCHEDULE && nPercent <= MAXPERCENT_RESCHEDULE )
+ Lock();
+ }
+
+ if ( !bSuspended )
+ {
+ // reiner Text-Progress?
+ if ( !pImp->nMax )
+ GetpApp()->ShowStatusText( pImp->aStateText );
+ else
+ {
+ // Progress-Fortschritt anzeigen
+ if ( bOver )
+ pImp->pMgr->SetProgressMaxValue( pImp->nMax );
+ if ( !pImp->pMgr->IsProgressMode() )
+ pImp->pMgr->StartProgressMode( pImp->aText, pImp->nMax );
+ pImp->pMgr->SetProgressState(nNewVal);
+ }
+ }
+ }
+
+ Reschedule();
+ }
+
+ return TRUE;
+}
+
+// -----------------------------------------------------------------------
+
+void SfxProgress::Resume()
+
+/* [Beschreibung]
+
+ Nimmt die Anzeige des Status nach einer Unterbrechung wieder auf.
+
+ [Querverweise]
+ <SfxProgress::Suspend()>
+*/
+
+{
+ if( pImp->pActiveProgress ) return;
+ if ( bSuspended )
+ {
+ DBG( DbgOutf( "SfxProgress: resumed" ) );
+ if ( pImp->pMgr && pImp->nMax )
+ {
+ pImp->pMgr->StartProgressMode( pImp->aText, pImp->nMax );
+ pImp->pMgr->SetProgressState( nVal );
+ }
+ if ( pImp->bWaitMode )
+ {
+ if ( pImp->xObjSh.Is() && !pImp->bAllDocs )
+ {
+ for ( SfxViewFrame *pFrame = SfxViewFrame::GetFirst(pImp->xObjSh);
+ pFrame;
+ pFrame = SfxViewFrame::GetNext( *pFrame, pImp->xObjSh ) )
+ pFrame->GetWindow().EnterWait();
+ SfxFrame* pFrm = pImp->xObjSh->GetMedium()->GetLoadTargetFrame();
+ if ( pFrm )
+ pFrm->GetWindow().EnterWait();
+ }
+//(mba)/task
+/*
+ else if ( Application::GetAppWindow() )
+ Application::GetAppWindow()->EnterWait();
+ */
+ }
+
+ SfxBindings *pBindings = 0;
+ if ( pImp->xObjSh )
+ {
+ SfxViewFrame *pFrame = SfxViewFrame::GetFirst(pImp->xObjSh);
+ if ( pFrame )
+ pFrame->GetBindings().ENTERREGISTRATIONS();
+ }
+
+ bSuspended = FALSE;
+ }
+}
+
+// -----------------------------------------------------------------------
+
+void SfxProgress::Suspend()
+
+/* [Beschreibung]
+
+ Unterbricht die Anzeige des Status
+
+ [Querverweise]
+ <SfxProgress::Resume()>
+*/
+
+{
+ if( pImp->pActiveProgress ) return;
+ if ( !bSuspended )
+ {
+ DBG( DbgOutf( "SfxProgress: suspended" ) );
+ bSuspended = TRUE;
+ if ( pImp->pMgr )
+ {
+ if ( pImp->pMgr->IsProgressMode() )
+ pImp->pMgr->EndProgressMode();
+ pImp->pMgr->ShowItems();
+ pImp->pWorkWin->SetTempStatusBar_Impl( FALSE );
+ }
+
+ if ( pImp->xObjSh.Is() && !pImp->bAllDocs )
+ {
+ for ( SfxViewFrame *pFrame =
+ SfxViewFrame::GetFirst(pImp->xObjSh);
+ pFrame;
+ pFrame = SfxViewFrame::GetNext( *pFrame, pImp->xObjSh ) )
+ pFrame->GetWindow().LeaveWait();
+ SfxFrame* pFrm = pImp->xObjSh->GetMedium()->GetLoadTargetFrame();
+ if ( pFrm )
+ pFrm->GetWindow().LeaveWait();
+ }
+//(mba)/task
+/*
+ else if ( Application::GetAppWindow() )
+ Application::GetAppWindow()->LeaveWait();
+*/
+ SfxBindings *pBindings = 0;
+ if ( pImp->xObjSh.Is() )
+ {
+ SfxViewFrame *pFrame = SfxViewFrame::GetFirst(pImp->xObjSh);
+ if ( pFrame )
+ pFrame->GetBindings().LEAVEREGISTRATIONS();
+ }
+ }
+}
+
+// -----------------------------------------------------------------------
+
+void SfxProgress::Lock()
+{
+ if( pImp->pActiveProgress ) return;
+ // kein Reschedule bei Embedded-Objekten,
+ // da wir gegen das OLE Protokoll wehrlos sind
+ if ( !pImp->xObjSh.Is() )
+ {
+ for ( SfxObjectShell *pDocSh = SfxObjectShell::GetFirst();
+ pDocSh;
+ pDocSh = SfxObjectShell::GetNext(*pDocSh) )
+ {
+ SfxObjectCreateMode eMode = pDocSh->GetCreateMode();
+ if ( ( eMode == SFX_CREATE_MODE_EMBEDDED ) ||
+ ( eMode == SFX_CREATE_MODE_PREVIEW ) )
+ {
+ DBG( DbgOutf( "SfxProgress: not locked because EMBEDDED/PREVIEW found" ) );
+ pImp->bAllowRescheduling = FALSE;
+ }
+ }
+ }
+ else
+ {
+ SfxObjectCreateMode eMode = pImp->xObjSh->GetCreateMode();
+ if ( ( eMode == SFX_CREATE_MODE_EMBEDDED ) ||
+ ( eMode == SFX_CREATE_MODE_PREVIEW ) )
+ {
+ DBG( DbgOutf( "SfxProgress: not locked because ObjectShell is EMBEDDED/PREVIEW" ) );
+ pImp->bAllowRescheduling = FALSE;
+ }
+ }
+
+ if ( pImp->xObjSh.Is() && !pImp->bAllDocs )
+ {
+ Enable_Impl(pImp->xObjSh, FALSE);
+ }
+ else
+ {
+ Enable_Impl(0, FALSE);
+ }
+
+ DBG( DbgOutf( "SfxProgress: locked" ) );
+ pImp->bLocked = TRUE;
+}
+
+// -----------------------------------------------------------------------
+
+void SfxProgress::UnLock()
+{
+ if( pImp->pActiveProgress ) return;
+ if ( !pImp->bLocked )
+ return;
+
+ DBG( DbgOutf( "SfxProgress: unlocked" ) );
+ pImp->bLocked = FALSE;
+ if ( pImp->xObjSh.Is() && !pImp->bAllDocs )
+ {
+ Enable_Impl(pImp->xObjSh, TRUE);
+ }
+ else
+ {
+ Enable_Impl(0, TRUE);
+ }
+}
+
+// -----------------------------------------------------------------------
+
+void SfxProgress::Reschedule()
+
+/* [Beschreibung]
+
+ Reschedule von au"sen rufbar
+
+*/
+
+{
+ SFX_STACK(SfxProgress::Reschedule);
+
+ if( pImp->pActiveProgress ) return;
+ if ( pImp->bLocked && 0 == pImp->pApp->Get_Impl()->nRescheduleLocks )
+ {
+ DBG_ASSERTWARNING( pImp->pApp->IsInAsynchronCall_Impl(),
+ "Reschedule in synchron-call-stack" );
+
+ SfxAppData_Impl *pAppData = pImp->pApp->Get_Impl();
+ ++pAppData->nInReschedule;
+ Application::Reschedule();
+ --pAppData->nInReschedule;
+ }
+}
+
+// -----------------------------------------------------------------------
+
+void SfxProgress::SetWaitMode
+(
+ BOOL bWait /* TRUE
+ Wartecursor wird verwendet
+
+ FALSE
+ Es wird kein Wartecursor verwendet */
+)
+
+/* [Beschreibung]
+
+ Wartecursor-Modus umschalten.
+
+*/
+
+{
+ if( pImp->pActiveProgress ) return;
+ if ( !bSuspended && pImp->bWaitMode != bWait )
+ {
+ if ( bWait )
+ {
+ if ( pImp->xObjSh.Is() && !pImp->bAllDocs )
+ {
+ for ( SfxViewFrame *pFrame =
+ SfxViewFrame::GetFirst(pImp->xObjSh);
+ pFrame;
+ pFrame = SfxViewFrame::GetNext( *pFrame, pImp->xObjSh ) )
+ pFrame->GetWindow().EnterWait();
+ SfxFrame* pFrm = pImp->xObjSh->GetMedium()->GetLoadTargetFrame();
+ if ( pFrm )
+ pFrm->GetWindow().EnterWait();
+ }
+//(mba)/task
+/*
+ else if ( Application::GetAppWindow() )
+ Application::GetAppWindow()->EnterWait();
+ */
+ }
+ else
+ {
+ if ( pImp->xObjSh.Is() && !pImp->bAllDocs )
+ {
+ for ( SfxViewFrame *pFrame =
+ SfxViewFrame::GetFirst(pImp->xObjSh);
+ pFrame;
+ pFrame = SfxViewFrame::GetNext( *pFrame, pImp->xObjSh ) )
+ pFrame->GetWindow().LeaveWait();
+ SfxFrame* pFrm = pImp->xObjSh->GetMedium()->GetLoadTargetFrame();
+ if ( pFrm )
+ pFrm->GetWindow().LeaveWait();
+ }
+//(mba)/task
+ /*
+
+ else if ( Application::GetAppWindow() )
+ Application::GetAppWindow()->LeaveWait();
+ */
+ }
+ }
+
+ pImp->bWaitMode = bWait;
+}
+
+// -----------------------------------------------------------------------
+
+BOOL SfxProgress::GetWaitMode() const
+
+/* [Beschreibung]
+
+ Wartecursor-Modus abfragen.
+
+*/
+
+{
+ return pImp->bWaitMode;
+}
+
+// -----------------------------------------------------------------------
+
+SfxProgress* SfxProgress::GetActiveProgress
+(
+ SfxObjectShell* pDocSh /* <SfxObjectShell>, die nach einem laufenden
+ <SfxProgress> gefragt werden soll, oder
+ 0, wenn ein f"ur die gesamte Applikation
+ laufender SfxProgress erfragt werden soll.
+ Der Pointer braucht nur zum Zeitpunkt des
+ Aufrufs g"ultig zu sein. */
+)
+
+/* [Beschreibung]
+
+ Mit dieser Methode kann erfragt werden, ob und welcher <SfxProgress>-
+ f"ur eine bestimmte Instanz von SfxObjectShell oder gar die gesamte
+ Applikation zur Zeit aktiv ist. Dies kann z.B. zum Abfangen von
+ Time-Out-Events etc. verwendet werden.
+
+ Anstelle eines Pointer auf den SfxProgress der SfxObjectShell wird
+ ggf. der auf den SfxProgress der Applikation geliefert, mit der
+ Abfrage 'SfxProgress::GetActiveProgress(pMyDocSh)' wird also
+ insofern vorhanden der SfxProgress von 'pMyDocSh' geliefert,
+ sonst der SfxProgress der Applikation bzw. ein 0-Pointer.
+
+
+ [Anmerkung]
+
+ "auft kein SfxProgress an der Applikation und ebenfalls keiner an
+ der angegebenen SfxObjectShell, dann wird immer 0 zur"uckgeliefert,
+ auch wenn an einer anderen SfxObjectShell ein SfxProgress l"uft.
+
+
+ [Querverweise]
+
+ <SfxApplication::GetProgress()const>
+ <SfxObjectShell::GetProgress()const>
+*/
+
+{
+ SfxProgress *pProgress = 0;
+ if ( pDocSh )
+ pProgress = pDocSh->GetProgress();
+ if ( !pProgress )
+ pProgress = SFX_APP()->GetProgress();
+ return pProgress;
+}
+
+// -----------------------------------------------------------------------
+
+void SfxProgress::EnterLock()
+{
+ SFX_APP()->Get_Impl()->nRescheduleLocks++;
+}
+
+// -----------------------------------------------------------------------
+
+void SfxProgress::LeaveLock()
+{
+ SfxAppData_Impl *pImp = SFX_APP()->Get_Impl();
+ DBG_ASSERT( 0 != pImp->nRescheduleLocks, "SFxProgress::LeaveLock but no locks" )
+ pImp->nRescheduleLocks--;
+}
+
+// -----------------------------------------------------------------------
+
+FASTBOOL SfxProgress::StatusBarManagerGone_Impl
+(
+ SfxStatusBarManager *pStb // dieser <SfxStatusBarManager> wird zerst"ort
+)
+
+/* [Beschreibung]
+
+ Interne Methode zum Benachrichtigen des SfxProgress, da\s der angegebene
+ SfxStatusBarManger zerst"ort wird. Damit der Progress ihn loslassen
+ kann.
+*/
+
+{
+ if ( pImp->pMgr != pStb )
+ return FALSE;
+
+ DBG( DbgOutf( "SfxProgress: StatusBarManager gone" ) );
+ pImp->pMgr = 0;
+ return TRUE;
+}
+
diff --git a/sfx2/source/bastyp/sfxhtml.cxx b/sfx2/source/bastyp/sfxhtml.cxx
new file mode 100644
index 000000000000..46ab6382de14
--- /dev/null
+++ b/sfx2/source/bastyp/sfxhtml.cxx
@@ -0,0 +1,762 @@
+/*************************************************************************
+ *
+ * $RCSfile: sfxhtml.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:28 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#pragma hdrstop
+
+#include <tools/urlobj.hxx>
+
+#include "objsh.hxx"
+#include "docinf.hxx"
+#include "docfile.hxx"
+#include "openflag.hxx"
+
+#ifndef _SFXAPP_HXX //autogen
+#include <app.hxx>
+#endif
+
+#ifndef _HTMLKYWD_HXX
+#include <svtools/htmlkywd.hxx>
+#endif
+#ifndef _HTMLTOKN_H
+#include <svtools/htmltokn.h>
+#endif
+#ifndef _IMAP_HXX
+#include <svtools/imap.hxx>
+#endif
+#ifndef _GOODIES_IMAPCIRC_HXX
+#include <svtools/imapcirc.hxx>
+#endif
+#ifndef _GOODIES_IMAPOBJ_HXX
+#include <svtools/imapobj.hxx>
+#endif
+#ifndef _GOODIES_IMAPPOLY_HXX
+#include <svtools/imappoly.hxx>
+#endif
+#ifndef _GOODIES_IMAPRECT_HXX
+#include <svtools/imaprect.hxx>
+#endif
+#ifndef _SFXINIMGR_HXX
+#include <svtools/iniman.hxx>
+#endif
+#ifndef _SVSTDARR_ULONGS_DECL
+#define _SVSTDARR_ULONGS
+#include <svtools/svstdarr.hxx>
+#endif
+#ifndef _ZFORLIST_HXX
+#include <svtools/zforlist.hxx>
+#endif
+#ifndef _INETTYPE_HXX
+#include <svtools/inettype.hxx>
+#endif
+
+#ifndef _INETBND_HXX
+#include <so3/inetbnd.hxx>
+#endif
+
+#ifndef _RTL_TENCINFO_H
+#include <rtl/tencinfo.h>
+#endif
+
+#include "sfxhtml.hxx"
+#include "inimgr.hxx"
+
+sal_Char __FAR_DATA sHTML_MIME_text[] = "text/";
+sal_Char __FAR_DATA sHTML_MIME_application[] = "application/";
+sal_Char __FAR_DATA sHTML_MIME_experimental[] = "x-";
+
+#define HTML_META_NONE 0
+#define HTML_META_AUTHOR 1
+#define HTML_META_DESCRIPTION 2
+#define HTML_META_KEYWORDS 3
+#define HTML_META_REFRESH 4
+#define HTML_META_CLASSIFICATION 5
+#define HTML_META_CREATED 6
+#define HTML_META_CHANGEDBY 7
+#define HTML_META_CHANGED 8
+#define HTML_META_GENERATOR 9
+#define HTML_META_SDFOOTNOTE 10
+#define HTML_META_SDENDNOTE 11
+#define HTML_META_CONTENT_TYPE 12
+
+// <INPUT TYPE=xxx>
+static HTMLOptionEnum __READONLY_DATA aAreaShapeOptEnums[] =
+{
+ { sHTML_SH_rect, IMAP_OBJ_RECTANGLE },
+ { sHTML_SH_rectangle, IMAP_OBJ_RECTANGLE },
+ { sHTML_SH_circ, IMAP_OBJ_CIRCLE },
+ { sHTML_SH_circle, IMAP_OBJ_CIRCLE },
+ { sHTML_SH_poly, IMAP_OBJ_POLYGON },
+ { sHTML_SH_polygon, IMAP_OBJ_POLYGON },
+ { 0, 0 }
+};
+
+// <META NAME=xxx>
+static HTMLOptionEnum __READONLY_DATA aHTMLMetaNameTable[] =
+{
+ { sHTML_META_author, HTML_META_AUTHOR },
+ { sHTML_META_changed, HTML_META_CHANGED },
+ { sHTML_META_changedby, HTML_META_CHANGEDBY },
+ { sHTML_META_classification,HTML_META_CLASSIFICATION},
+ { sHTML_META_content_type, HTML_META_CONTENT_TYPE },
+ { sHTML_META_created, HTML_META_CREATED },
+ { sHTML_META_description, HTML_META_DESCRIPTION },
+ { sHTML_META_keywords, HTML_META_KEYWORDS },
+ { sHTML_META_generator, HTML_META_GENERATOR },
+ { sHTML_META_refresh, HTML_META_REFRESH },
+ { sHTML_META_sdendnote, HTML_META_SDENDNOTE },
+ { sHTML_META_sdfootnote, HTML_META_SDFOOTNOTE },
+ { 0, 0 }
+};
+
+SfxHTMLParser::SfxHTMLParser( SvStream& rStream, BOOL bNewDoc,
+ SfxMedium *pMed ) :
+ HTMLParser( rStream, bNewDoc ),
+ pMedium( pMed ), pDLMedium( 0 ),
+ nMetaTags( 0 )
+{
+ DBG_ASSERT( RTL_TEXTENCODING_DONTKNOW == GetSrcEncoding( ),
+ "SfxHTMLParser::SfxHTMLParser: Wo kommt der ZS her?" );
+ DBG_ASSERT( !IsSwitchToUCS2(),
+ "SfxHTMLParser::SfxHTMLParser: Switch to UCS2?" );
+
+ // If the system encoding is ANSI, this encoding is used as default
+ // source encoding. Otherwise ISO-8859-1 will be used, because this
+ // is the real default encoding.
+ SetSrcEncoding( RTL_TEXTENCODING_MS_1252 == gsl_getSystemTextEncoding()
+ ? RTL_TEXTENCODING_MS_1252
+ : RTL_TEXTENCODING_ISO_8859_1 );
+
+ // If the file starts with a BOM, switch to UCS2.
+ SetSwitchToUCS2( TRUE );
+}
+
+__EXPORT SfxHTMLParser::~SfxHTMLParser()
+{
+ DBG_ASSERT( !pDLMedium, "Da ist ein File-Download stehengeblieben" );
+ delete pDLMedium;
+}
+
+BOOL SfxHTMLParser::ParseMapOptions(ImageMap * pImageMap,
+ const HTMLOptions * pOptions)
+{
+ DBG_ASSERT( pImageMap, "ParseMapOptions: keine Image-Map" );
+ DBG_ASSERT( pOptions, "ParseMapOptions: keine Optionen" );
+
+ String aName;
+
+ for( USHORT i=pOptions->Count(); i; )
+ {
+ const HTMLOption *pOption = (*pOptions)[--i];
+ switch( pOption->GetToken() )
+ {
+ case HTML_O_NAME:
+ aName = pOption->GetString();
+ break;
+ }
+ }
+
+ if( aName.Len() )
+ pImageMap->SetName( aName );
+
+ return aName.Len() > 0;
+}
+
+BOOL SfxHTMLParser::ParseAreaOptions(ImageMap * pImageMap,
+ const HTMLOptions * pOptions,
+ USHORT nEventMouseOver,
+ USHORT nEventMouseOut )
+{
+ DBG_ASSERT( pImageMap, "ParseAreaOptions: keine Image-Map" );
+ DBG_ASSERT( pOptions, "ParseAreaOptions: keine Optionen" );
+
+ USHORT nShape = IMAP_OBJ_RECTANGLE;
+ SvULongs aCoords;
+ String aName, aHRef, aAlt, aTarget, sEmpty;
+ BOOL bNoHRef = FALSE;
+ SvxMacroTableDtor aMacroTbl;
+
+ for( USHORT i=pOptions->Count(); i; )
+ {
+ USHORT nEvent = 0;
+ ScriptType eScrpType = STARBASIC;
+ const HTMLOption *pOption = (*pOptions)[--i];
+ switch( pOption->GetToken() )
+ {
+ case HTML_O_NAME:
+ aName = pOption->GetString();
+ break;
+ case HTML_O_SHAPE:
+ pOption->GetEnum( nShape, aAreaShapeOptEnums );
+ break;
+ case HTML_O_COORDS:
+ pOption->GetNumbers( aCoords, TRUE );
+ break;
+ case HTML_O_HREF:
+ aHRef = INetURLObject::RelToAbs( pOption->GetString() );
+ break;
+ case HTML_O_NOHREF:
+ bNoHRef = TRUE;
+ break;
+ case HTML_O_ALT:
+ aAlt = pOption->GetString();
+ break;
+ case HTML_O_TARGET:
+ aTarget = pOption->GetString();
+ break;
+
+ case HTML_O_ONMOUSEOVER:
+ eScrpType = JAVASCRIPT;
+ case HTML_O_SDONMOUSEOVER:
+ nEvent = nEventMouseOver;
+ goto IMAPOBJ_SETEVENT;
+
+ case HTML_O_ONMOUSEOUT:
+ eScrpType = JAVASCRIPT;
+ case HTML_O_SDONMOUSEOUT:
+ nEvent = nEventMouseOut;
+ goto IMAPOBJ_SETEVENT;
+IMAPOBJ_SETEVENT:
+ if( nEvent )
+ {
+ String sTmp( pOption->GetString() );
+ if( sTmp.Len() )
+ {
+ sTmp.ConvertLineEnd();
+ aMacroTbl.Insert( nEvent,
+ new SvxMacro( sTmp, sEmpty, eScrpType ));
+ }
+ }
+ break;
+ }
+ }
+
+ if( bNoHRef )
+ aHRef.Erase();
+
+ BOOL bNewArea = TRUE;
+ switch( nShape )
+ {
+ case IMAP_OBJ_RECTANGLE:
+ if( aCoords.Count() >=4 )
+ {
+ Rectangle aRec( aCoords[0], aCoords[1],
+ aCoords[2], aCoords[3] );
+ IMapRectangleObject aMapRObj( aRec, aHRef, aAlt, aTarget, aName,
+ !bNoHRef );
+ if( aMacroTbl.Count() )
+ aMapRObj.SetMacroTable( aMacroTbl );
+ pImageMap->InsertIMapObject( aMapRObj );
+ }
+ break;
+ case IMAP_OBJ_CIRCLE:
+ if( aCoords.Count() >=3 )
+ {
+ Point aPoint( aCoords[0], aCoords[1] );
+ IMapCircleObject aMapCObj( aPoint, aCoords[2],aHRef, aAlt,
+ aTarget, aName, !bNoHRef );
+ if( aMacroTbl.Count() )
+ aMapCObj.SetMacroTable( aMacroTbl );
+ pImageMap->InsertIMapObject( aMapCObj );
+ }
+ break;
+ case IMAP_OBJ_POLYGON:
+ if( aCoords.Count() >=6 )
+ {
+ USHORT nCount = aCoords.Count() / 2;
+ Polygon aPoly( nCount );
+ for( USHORT i=0; i<nCount; i++ )
+ aPoly[i] = Point( aCoords[2*i], aCoords[2*i+1] );
+ IMapPolygonObject aMapPObj( aPoly, aHRef, aAlt, aTarget, aName,
+ !bNoHRef );
+ if( aMacroTbl.Count() )
+ aMapPObj.SetMacroTable( aMacroTbl );
+ pImageMap->InsertIMapObject( aMapPObj );
+ }
+ break;
+ default:
+ bNewArea = FALSE;
+ }
+
+ return bNewArea;
+}
+
+BOOL SfxHTMLParser::ParseMetaOptions( SfxDocumentInfo *pInfo,
+ SvKeyValueIterator *pHTTPHeader,
+ const HTMLOptions *pOptions,
+ USHORT &rMetaCount,
+ rtl_TextEncoding& rEnc )
+{
+ String aName, aContent;
+ USHORT nAction = HTML_META_NONE;
+ BOOL bHTTPEquiv = FALSE, bChanged = FALSE;
+
+ for( USHORT i = pOptions->Count(); i; )
+ {
+ const HTMLOption *pOption = (*pOptions)[ --i ];
+ switch( pOption->GetToken() )
+ {
+ case HTML_O_NAME:
+ aName = pOption->GetString();
+ if( HTML_META_NONE==nAction )
+ pOption->GetEnum( nAction, aHTMLMetaNameTable );
+ break;
+ case HTML_O_HTTPEQUIV:
+ aName = pOption->GetString();
+ pOption->GetEnum( nAction, aHTMLMetaNameTable );
+ bHTTPEquiv = TRUE;
+ break;
+ case HTML_O_CONTENT:
+ aContent = pOption->GetString();
+ break;
+ }
+ }
+
+ if( bHTTPEquiv || HTML_META_DESCRIPTION!=nAction )
+ {
+ // wenn's keine Description ist CRs und LFs aus dem CONTENT entfernen
+ aContent.EraseAllChars( _CR );
+ aContent.EraseAllChars( _LF );
+ }
+ else
+ {
+ // fuer die Beschreibung die Zeilen-Umbrueche entsprechen wandeln
+ aContent.ConvertLineEnd();
+ }
+
+
+ if( bHTTPEquiv && pHTTPHeader )
+ {
+ // #57232#: Netscape scheint ein abschliessendes " einfach zu
+ // ignorieren, also tun wir das auch.
+ if( aContent.Len() && '"' == aContent.GetChar( aContent.Len()-1 ) )
+ aContent.Erase( aContent.Len() - 1 );
+ SvKeyValue aKeyValue( aName, aContent );
+ pHTTPHeader->Append( aKeyValue );
+ }
+
+ switch( nAction )
+ {
+ case HTML_META_AUTHOR:
+ {
+ SfxStamp aStamp;
+ aStamp = pInfo->GetCreated();
+ aStamp.SetName( aContent );
+ pInfo->SetCreated( aStamp );
+ bChanged = TRUE;
+ }
+ break;
+ case HTML_META_DESCRIPTION:
+ pInfo->SetComment( aContent );
+ bChanged = TRUE;
+ break;
+ case HTML_META_KEYWORDS:
+ pInfo->SetKeywords( aContent );
+ bChanged = TRUE;
+ break;
+ case HTML_META_CLASSIFICATION:
+ pInfo->SetTheme( aContent );
+ bChanged = TRUE;
+ break;
+
+ case HTML_META_CHANGEDBY:
+ {
+ SfxStamp aStamp;
+ aStamp = pInfo->GetChanged();
+ aStamp.SetName( aContent );
+ pInfo->SetChanged( aStamp );
+ bChanged = TRUE;
+ }
+ break;
+
+ case HTML_META_CREATED:
+ case HTML_META_CHANGED:
+ if( aContent.Len() && aContent.GetTokenCount()==2 )
+ {
+ SfxStamp aStamp;
+ aStamp = ( HTML_META_CREATED==nAction
+ ? pInfo->GetCreated()
+ : pInfo->GetChanged() );
+ Date aDate( (ULONG)aContent.GetToken(0).ToInt32() );
+ Time aTime( (ULONG)aContent.GetToken(1).ToInt32() );
+ DateTime aDateTime( aDate, aTime );
+ aStamp.SetTime( aDateTime );
+ if( HTML_META_CREATED==nAction )
+ pInfo->SetCreated( aStamp );
+ else
+ pInfo->SetChanged( aStamp );
+ bChanged = TRUE;
+ }
+ break;
+
+ case HTML_META_REFRESH:
+ DBG_ASSERT( !bHTTPEquiv || pHTTPHeader,
+ "Reload-URL aufgrund unterlsassener MUSS-Aenderung verlorengegangen" );
+ break;
+
+ case HTML_META_CONTENT_TYPE:
+ if( aContent.Len() )
+ rEnc = GetEncodingByMIME( aContent );
+ break;
+
+ case HTML_META_NONE:
+ if( !bHTTPEquiv )
+ {
+ USHORT nKeys = pInfo->GetUserKeyCount();
+ if( rMetaCount==USHRT_MAX )
+ {
+ rMetaCount = 0;
+ while( rMetaCount<nKeys &&
+ pInfo->GetUserKey(rMetaCount).GetWord().Len() )
+ {
+ rMetaCount++;
+ }
+ }
+ if( rMetaCount < nKeys )
+ {
+ const SfxDocUserKey& rUserKey = pInfo->GetUserKey(rMetaCount);
+ if( !rUserKey.GetWord().Len() )
+ {
+ SfxDocUserKey aUserKey( aName, aContent );
+ pInfo->SetUserKey( aUserKey, rMetaCount );
+ rMetaCount++;
+ bChanged = TRUE;
+ break;
+ }
+ }
+ }
+ break;
+ }
+
+ return bChanged;
+}
+
+BOOL SfxHTMLParser::ParseMetaOptions( SfxDocumentInfo *pInfo,
+ SvKeyValueIterator *pHeader )
+{
+ USHORT nContentOption = HTML_O_CONTENT;
+ rtl_TextEncoding eEnc = RTL_TEXTENCODING_DONTKNOW;
+
+ BOOL bRet = ParseMetaOptions( pInfo, pHeader,
+ GetOptions(&nContentOption),
+ nMetaTags, eEnc );
+
+ // If the encoding is set by a META tag, it may only overwrite the
+ // current encoding if both, the current and the new encoding, are 1-BYTE
+ // encodings. Everything else cannot lead to reasonable results.
+ if( RTL_TEXTENCODING_DONTKNOW != eEnc &&
+ eEnc < RTL_TEXTENCODING_STD_COUNT &&
+ GetSrcEncoding() < RTL_TEXTENCODING_STD_COUNT )
+ SetSrcEncoding( eEnc );
+
+ return bRet;
+}
+
+
+void SfxHTMLParser::StartFileDownload( const String& rURL, int nToken,
+ SfxObjectShell *pSh )
+{
+ DBG_ASSERT( !pDLMedium, "StartFileDwonload bei aktivem Download" );
+ if( pDLMedium )
+ return;
+
+ pDLMedium = new SfxMedium( rURL, SFX_STREAM_READONLY, FALSE );
+ pDLMedium->SetTransferPriority( SFX_TFPRIO_DOC );
+
+ if( pSh )
+ {
+ // Medium registrieren, damit abgebrochen werden kann
+ pSh->RegisterTransfer( *pDLMedium );
+
+ // Target-Frame uebertragen, damit auch javascript:-URLs
+ // "geladen" werden koennen.
+ const SfxMedium *pShMedium = pSh->GetMedium();
+ if( pShMedium )
+ pDLMedium->SetLoadTargetFrame( pShMedium->GetLoadTargetFrame() );
+ }
+
+ // Downloading-Flag auf TRUE setzen. Es werden dann auch
+ // Data-Available-Links, wenn wir in den Pending-Staus gelangen.
+ SetDownloadingFile( TRUE );
+
+ // Download anstossen (Achtung: Kann auch synchron sein).
+ pDLMedium->DownLoad( STATIC_LINK( this, SfxHTMLParser, FileDownloadDone ) );
+
+ // Wenn das Dowsnloading-Flag noch gesetzt ist erfolgt der Download
+ // asynchron. Wir gehen dann in den Pedning-Staus und warten dort.
+ // Solange sind alle Aufrufe des Data-Avaialble-Link gesperrt.
+ if( IsDownloadingFile() )
+ {
+ // Den aktuellen Zustand einfrieren und in den Pending-Status gehen.
+ // Wenn der Download beendet oder abgebrochen wurde, wird ueber
+ // NewDataRead ein Continue mit dem uebergeben Token angesteossen.
+ SaveState( nToken );
+ eState = SVPAR_PENDING;
+ }
+}
+
+BOOL SfxHTMLParser::GetFileDownloadMIME( String& rMIME )
+{
+ return pDLMedium && pDLMedium->GetErrorCode()==0 &&
+ pDLMedium->GetMIMEAndRedirect(rMIME)==0;
+}
+
+BOOL SfxHTMLParser::FinishFileDownload( String& rStr )
+{
+ String aStr;
+
+ BOOL bOK = pDLMedium && pDLMedium->GetErrorCode()==0;
+ if( bOK )
+ {
+ SvStream* pStream = pDLMedium->GetInStream();
+ DBG_ASSERT( pStream, "Kein In-Stream vom Medium erhalten" );
+
+ SvMemoryStream aStream;
+ if( pStream ) // HACK wegen #65563#
+ aStream << *pStream;
+
+ aStream.Seek( STREAM_SEEK_TO_END );
+ DBG_ASSERT( aStream.Tell() < STRING_MAXLEN,
+ "File zu lang fuer einen String, Ende abgeschnitten" );
+ xub_StrLen nLen = aStream.Tell() < STRING_MAXLEN
+ ? (xub_StrLen)aStream.Tell()
+ : STRING_MAXLEN;
+
+ // TODO: untested!!!
+ rtl_TextEncoding eEnc =
+ RTL_TEXTENCODING_MS_1252 == gsl_getSystemTextEncoding()
+ ? RTL_TEXTENCODING_MS_1252
+ : RTL_TEXTENCODING_ISO_8859_1;
+ String sMime;
+ if( pDLMedium->GetMIMEAndRedirect( sMime ) == 0 )
+ {
+ rtl_TextEncoding eMimeEnc = GetEncodingByMIME( sMime );
+ if( RTL_TEXTENCODING_DONTKNOW != eMimeEnc )
+ eEnc = eMimeEnc;
+ }
+
+ ByteString sBuffer;
+ sal_Char* pBuffer = sBuffer.AllocBuffer(nLen);
+ aStream.Read((void*)pBuffer, nLen);
+ rStr = String( S2U(pBuffer) );
+ }
+
+ delete pDLMedium;
+ pDLMedium = 0;
+
+ return bOK;
+}
+
+IMPL_STATIC_LINK( SfxHTMLParser, FileDownloadDone, void*, EMPTYARG )
+{
+ // Der Download ist jetzt abgeschlossen. Ausserdem muss/darf der
+ // Data-Available-Link wieder durchgelassen werden.
+ pThis->SetDownloadingFile( FALSE );
+
+ // ... und einmal aufrufen, damit weitergelesen wird.
+ pThis->CallAsyncCallLink();
+
+ return 0;
+}
+
+rtl_TextEncoding SfxHTMLParser::GetEncodingByMIME( const String& rMime )
+{
+ ByteString sType;
+ ByteString sSubType;
+ INetContentTypeParameterList aParameters;
+ ByteString sMime( rMime, RTL_TEXTENCODING_ASCII_US );
+ if (INetContentTypes::parse(sMime, sType, sSubType, &aParameters))
+ {
+ const INetContentTypeParameter * pCharset
+ = aParameters.find("charset");
+ if (pCharset != 0)
+ {
+ ByteString sValue( pCharset->m_sValue, RTL_TEXTENCODING_ASCII_US );
+ return rtl_getTextEncodingFromMimeCharset( sValue.GetBuffer() );
+ }
+ }
+ return RTL_TEXTENCODING_DONTKNOW;
+}
+
+BOOL SfxHTMLParser::SetEncodingByHTTPHeader(
+ SvKeyValueIterator *pHTTPHeader )
+{
+ BOOL bRet = FALSE;
+ if( pHTTPHeader )
+ {
+ SvKeyValue aKV;
+ for( BOOL bCont = pHTTPHeader->GetFirst( aKV ); bCont;
+ bCont = pHTTPHeader->GetNext( aKV ) )
+ {
+ if( aKV.GetKey().EqualsIgnoreCaseAscii( sHTML_META_content_type ) )
+ {
+ if( aKV.GetValue().Len() )
+ {
+ rtl_TextEncoding eEnc =
+ GetEncodingByMIME( aKV.GetValue() );
+ if( RTL_TEXTENCODING_DONTKNOW != eEnc )
+ {
+ SetSrcEncoding( eEnc );
+ bRet = TRUE;
+ }
+ }
+// break;
+ }
+ }
+ }
+
+ return bRet;
+}
+
+void SfxHTMLParser::GetScriptType_Impl( SvKeyValueIterator *pHTTPHeader )
+{
+ aScriptType = DEFINE_CONST_UNICODE(SVX_MACRO_LANGUAGE_JAVASCRIPT);
+ eScriptType = JAVASCRIPT;
+ if( pHTTPHeader )
+ {
+ SvKeyValue aKV;
+ for( BOOL bCont = pHTTPHeader->GetFirst( aKV ); bCont;
+ bCont = pHTTPHeader->GetNext( aKV ) )
+ {
+ if( aKV.GetKey().EqualsIgnoreCaseAscii(
+ sHTML_META_content_script_type ) )
+ {
+ if( aKV.GetValue().Len() )
+ {
+ String aTmp( aKV.GetValue() );
+ if( aTmp.EqualsIgnoreCaseAscii( sHTML_MIME_text, 0, 5 ) )
+ aTmp.Erase( 0, 5 );
+ else if( aTmp.EqualsIgnoreCaseAscii( sHTML_MIME_application,
+ 0, 12 ) )
+ aTmp.Erase( 0, 12 );
+ else
+ break;
+
+ if( aTmp.EqualsIgnoreCaseAscii( sHTML_MIME_experimental, 0,
+ 2 ) )
+ {
+ aTmp.Erase( 0, 2 );
+ }
+
+ if( aTmp.EqualsIgnoreCaseAscii( sHTML_LG_starbasic ) )
+ {
+ eScriptType = STARBASIC;
+ aScriptType = DEFINE_CONST_UNICODE(SVX_MACRO_LANGUAGE_STARBASIC);
+ }
+ if( !aTmp.EqualsIgnoreCaseAscii( sHTML_LG_javascript ) )
+ {
+ eScriptType = EXTENDED_STYPE;
+ aScriptType = aTmp;
+ }
+ }
+ break;
+ }
+ }
+ }
+}
+
+ScriptType SfxHTMLParser::GetScriptType( SvKeyValueIterator *pHTTPHeader ) const
+{
+ if( !aScriptType.Len() )
+ ((SfxHTMLParser *)this)->GetScriptType_Impl( pHTTPHeader );
+
+ return eScriptType;
+}
+
+const String& SfxHTMLParser::GetScriptTypeString(
+ SvKeyValueIterator *pHTTPHeader ) const
+{
+ if( !aScriptType.Len() )
+ ((SfxHTMLParser *)this)->GetScriptType_Impl( pHTTPHeader );
+
+ return aScriptType;
+}
+
+double SfxHTMLParser::GetTableDataOptionsValNum( ULONG& nNumForm,
+ LanguageType& eNumLang, const String& aValStr, const String& aNumStr,
+ SvNumberFormatter& rFormatter )
+{
+ LanguageType eParseLang = (LanguageType )aNumStr.ToInt32();
+ ULONG nParseForm =
+ rFormatter.GetFormatForLanguageIfBuiltIn( 0, eParseLang );
+ double fVal;
+ rFormatter.IsNumberFormat( aValStr, nParseForm, fVal );
+ if ( aNumStr.GetTokenCount( ';' ) > 2 )
+ {
+ eNumLang = (LanguageType)aNumStr.GetToken( 1, ';' ).ToInt32();
+ xub_StrLen nPos = aNumStr.Search( ';' );
+ nPos = aNumStr.Search( ';', nPos + 1 );
+ String aFormat( aNumStr.Copy( nPos + 1 ) );
+ xub_StrLen nCheckPos;
+ short nType;
+ if ( eNumLang != LANGUAGE_SYSTEM )
+ rFormatter.PutEntry( aFormat, nCheckPos, nType, nNumForm, eNumLang );
+ else
+ rFormatter.PutandConvertEntry( aFormat, nCheckPos, nType, nNumForm,
+ eParseLang, eNumLang );
+ }
+ else
+ {
+ eNumLang = LANGUAGE_SYSTEM;
+ nNumForm = rFormatter.GetFormatForLanguageIfBuiltIn( 0, eNumLang );
+ }
+ return fVal;
+}
+
diff --git a/sfx2/source/bastyp/sfxresid.cxx b/sfx2/source/bastyp/sfxresid.cxx
new file mode 100644
index 000000000000..b118288a44ef
--- /dev/null
+++ b/sfx2/source/bastyp/sfxresid.cxx
@@ -0,0 +1,90 @@
+/*************************************************************************
+ *
+ * $RCSfile: sfxresid.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:28 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#pragma hdrstop
+
+#ifndef _TOOLS_SIMPLERESMGR_HXX_
+#include <tools/simplerm.hxx>
+#endif
+
+#include "sfxresid.hxx"
+#include "app.hxx"
+
+// -----------------------------------------------------------------------
+
+SfxResId::SfxResId( USHORT nId ) :
+
+ ResId( nId, SFX_APP()->GetSfxResManager() )
+{
+}
+
+//============================================================================
+//
+// SfxSimpleResId Implementation.
+//
+//============================================================================
+
+SfxSimpleResId::SfxSimpleResId(USHORT nID):
+ m_sText( SFX_APP()->GetSimpleResManager()->ReadString(nID) )
+{}
+
+
+
diff --git a/sfx2/source/config/config.hrc b/sfx2/source/config/config.hrc
new file mode 100644
index 000000000000..77832dfccd49
--- /dev/null
+++ b/sfx2/source/config/config.hrc
@@ -0,0 +1,124 @@
+/*************************************************************************
+ *
+ * $RCSfile: config.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:29 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _SFX_CONFIG_HRC
+#define _SFX_CONFIG_HRC
+
+#include "sfx.hrc"
+
+// #defines *****************************************************************
+
+#define STR_WARNING_ITEM RID_SFX_CONFIG_START+1
+
+#define CONFIG_PATH_START (RID_SFX_CONFIG_START+2)
+#define STR_KEY_SUB_INI (CONFIG_PATH_START)
+#define STR_KEY_CONFIG_DIR (CONFIG_PATH_START+1)
+#define STR_KEY_WORK_PATH (CONFIG_PATH_START+2)
+#define STR_KEY_GRAPHICS_PATH (CONFIG_PATH_START+3)
+#define STR_KEY_BITMAP_PATH (CONFIG_PATH_START+4)
+#define STR_KEY_BASIC_PATH (CONFIG_PATH_START+5)
+#define STR_KEY_DATABASE_PATH (CONFIG_PATH_START+6)
+#define STR_KEY_PALETTE_PATH (CONFIG_PATH_START+7)
+#define STR_KEY_BACKUP_PATH (CONFIG_PATH_START+8)
+#define STR_KEY_MODULES_PATH (CONFIG_PATH_START+9)
+#define STR_KEY_TEMPLATE_PATH (CONFIG_PATH_START+10)
+#define STR_KEY_GLOSSARY_PATH (CONFIG_PATH_START+11)
+#define STR_KEY_DICTIONARY_PATH (CONFIG_PATH_START+12)
+#define STR_KEY_DOCMANAGER_INI (CONFIG_PATH_START+13)
+#define STR_KEY_DESKTOP_DIR (CONFIG_PATH_START+14)
+#define STR_KEY_CACHE_DIR (CONFIG_PATH_START+15)
+#define STR_KEY_HELP_DIR (CONFIG_PATH_START+16)
+#define STR_KEY_BOOKMARK_DIR (CONFIG_PATH_START+17)
+#define CONFIG_PATH_END STR_KEY_BOOKMARK_DIR
+
+#define CONFIG_OSPATH_START (CONFIG_PATH_END+1)
+#define STR_OSKEY_SUB_INI (CONFIG_OSPATH_START+0)
+#define STR_OSKEY_CONFIG_DIR (CONFIG_OSPATH_START+1)
+#define STR_OSKEY_WORK_PATH (CONFIG_OSPATH_START+2)
+#define STR_OSKEY_GRAPHICS_PATH (CONFIG_OSPATH_START+3)
+#define STR_OSKEY_BITMAP_PATH (CONFIG_OSPATH_START+4)
+#define STR_OSKEY_BASIC_PATH (CONFIG_OSPATH_START+5)
+#define STR_OSKEY_DATABASE_PATH (CONFIG_OSPATH_START+6)
+#define STR_OSKEY_PALETTE_PATH (CONFIG_OSPATH_START+7)
+#define STR_OSKEY_BACKUP_PATH (CONFIG_OSPATH_START+8)
+#define STR_OSKEY_MODULES_PATH (CONFIG_OSPATH_START+9)
+#define STR_OSKEY_TEMPLATE_PATH (CONFIG_OSPATH_START+10)
+#define STR_OSKEY_GLOSSARY_PATH (CONFIG_OSPATH_START+11)
+#define STR_OSKEY_DICTIONARY_PATH (CONFIG_OSPATH_START+12)
+#define STR_OSKEY_DOCMANAGER_INI (CONFIG_OSPATH_START+13)
+#define STR_OSKEY_DESKTOP_DIR (CONFIG_OSPATH_START+14)
+#define STR_OSKEY_CACHE_DIR (CONFIG_OSPATH_START+15)
+#define STR_OSKEY_HELP_DIR (CONFIG_OSPATH_START+16)
+#define STR_OSKEY_BOOKMARK_DIR (CONFIG_OSPATH_START+17)
+#define CONFIG_OSPATH_END STR_OSKEY_BOOKMARK_DIR
+
+#define STR_EVENTCONFIG (CONFIG_OSPATH_END+1)
+#define DLG_MACROQUERY (CONFIG_OSPATH_END+2)
+#define RID_STR_NAME_MISCCFG (CONFIG_OSPATH_END+3)
+
+#define CB_WARNING 1
+#define BTN_OK 2
+#define BTN_CANCEL 3
+#define FT_MESSAGE 4
+#define ICN_MESSAGE 5
+
+#endif
+
diff --git a/sfx2/source/config/config.src b/sfx2/source/config/config.src
new file mode 100644
index 000000000000..92789dd27302
--- /dev/null
+++ b/sfx2/source/config/config.src
@@ -0,0 +1,291 @@
+/*************************************************************************
+ *
+ * $RCSfile: config.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:29 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include "config.hrc"
+
+String RID_STR_NAME_MISCCFG
+{
+ Text = "Sonstiges" ;
+ Text [ English ] = "Miscellaneous" ;
+ Text [ english_us ] = "Other" ;
+ Text [ swedish ] = "vrigt" ;
+ Text [ danish ] = "Andet" ;
+ Text [ italian ] = "Altro" ;
+ Text [ spanish ] = "Otros" ;
+ Text [ french ] = "Autres" ;
+ Text [ dutch ] = "Overige" ;
+ Text [ portuguese ] = "Outros" ;
+ Text [ portuguese_brazilian ] = "Sonstiges" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "Inne";
+ Text[ japanese ] = "̑";
+ Text[ chinese_traditional ] = "L";
+ Text[ arabic ] = " ";
+ Text[ dutch ] = "Overige";
+ Text[ chinese_simplified ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "Ÿ";
+ Text[ turkish ] = "Dier";
+ Text[ language_user1 ] = " ";
+};
+String STR_EVENTCONFIG
+{
+ Text = "Ereigniszuordnung" ;
+ Text [ ENGLISH ] = "Event assignments" ;
+ Text [ english_us ] = "Assign events" ;
+ Text [ italian ] = "Correlazione eventi" ;
+ Text [ spanish ] = "Asignar acontecimientos" ;
+ Text [ french ] = "Attribution vnement" ;
+ Text [ dutch ] = "Gebeurtenis toewijzen" ;
+ Text [ swedish ] = "Hndelsetilldelning" ;
+ Text [ danish ] = "Tildel begivenheder" ;
+ Text [ portuguese ] = "Atribuir eventos" ;
+ Text [ portuguese_brazilian ] = "Ereigniszuordnung" ;
+ Text[ chinese_simplified ] = "ָ¼";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Przyporzdkowanie wydarze";
+ Text[ japanese ] = "s_@̔zu";
+ Text[ chinese_traditional ] = "]wʧ@";
+ Text[ arabic ] = " ";
+ Text[ dutch ] = "Gebeurtenis toewijzen";
+ Text[ chinese_simplified ] = "ָ¼";
+ Text[ greek ] = " ";
+ Text[ korean ] = "̺Ʈ ";
+ Text[ turkish ] = "Olay ata";
+ Text[ language_user1 ] = " ";
+};
+String STR_FILTERNAME_CFG
+{
+ Text = "Konfiguration" ;
+ Text [ ENGLISH ] = "Configuration" ;
+ Text [ english_us ] = "Configuration" ;
+ Text [ italian ] = "Configurazione" ;
+ Text [ spanish ] = "Configuracin" ;
+ Text [ french ] = "Configuration" ;
+ Text [ dutch ] = "Configuratie" ;
+ Text [ swedish ] = "Konfiguration" ;
+ Text [ danish ] = "Konfiguration" ;
+ Text [ portuguese ] = "Configurao" ;
+ Text [ portuguese_brazilian ] = "Konfiguration" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "Konfiguracja";
+ Text[ japanese ] = "ݒ";
+ Text[ chinese_traditional ] = "tm";
+ Text[ arabic ] = "";
+ Text[ dutch ] = "Configuratie";
+ Text[ chinese_simplified ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "Konfigrasyon";
+ Text[ language_user1 ] = " ";
+};
+ModalDialog DLG_MACROQUERY
+{
+ OutputSize = TRUE ;
+ SVLook = TRUE ;
+ Moveable = TRUE ;
+ Size = MAP_APPFONT ( 163 , 94 ) ;
+ Text = "Makro ausfhren" ;
+ Text [ english ] = "Execute Macro" ;
+ Text [ english_us ] = "Execute Macro" ;
+ Text [ french ] = "Excuter la macro" ;
+ TEXT[ italian ] = "Esegui macro";
+ TEXT[ portuguese_brazilian ] = "Makro ausfhren";
+ TEXT[ portuguese ] = "Executar macro";
+ TEXT[ danish ] = "Udfr makro";
+ TEXT[ swedish ] = "Utfr makro";
+ TEXT[ dutch ] = "Macro uitvoeren";
+ TEXT[ spanish ] = "Ejecutar macro";
+ TEXT[ chinese_simplified ] = "ִк";
+ TEXT[ russian ] = " ";
+ TEXT[ polish ] = "Wykonaj makro";
+ TEXT[ japanese ] = "ϸۂ̎s";
+ TEXT[ chinese_traditional ] = "楨";
+ TEXT[ arabic ] = " ";
+ FixedImage ICN_MESSAGE
+ {
+ Pos = MAP_APPFONT ( 6 , 6 ) ;
+ Size = MAP_APPFONT ( 30 , 30 ) ;
+ };
+ FixedText FT_MESSAGE
+ {
+ WordBreak = TRUE ;
+ Pos = MAP_APPFONT ( 42 , 6 ) ;
+ Size = MAP_APPFONT ( 115 , 46 ) ;
+ Text = "Es wurde ein Ereignis ausgelst, auf das ein Makro konfiguriert wurde. Mchten Sie dieses Makro ausfhren?" ;
+ Text [ English ] = "Es wurde ein Ereignis ausgelst, auf das ein Makro konfiguriert wurde. Mchten Sie dieses Makro ausfhren?" ;
+ Text [ english_us ] = "An event to which a macro is configured has been started. Do you want to execute the macro?" ;
+ Text [ portuguese_brazilian ] = "Es wurde ein Ereignis ausgelst, auf das ein Makro konfiguriert wurde. Mchten Sie dieses Makro ausfhren?" ;
+ Text [ swedish ] = "En hndelse utlstes fr vilket ett makro konfigurerades. Skall detta makro utfras?" ;
+ Text [ danish ] = "Der blev udlst en handling, som en makro er konfigureret til. Vil du udfre denne makro?" ;
+ Text [ italian ] = " stato attivato un evento che stato configurato su una macro. Esguire la macro?" ;
+ Text [ spanish ] = "Se ha iniciado un acontecimiento en el cual se ha configurado una macro. Desea que se ejecute esta macro?" ;
+ Text [ french ] = "Un vnement s'est produit pour lequel une macro a t configure. Dsirez-vous l'excuter?" ;
+ Text [ dutch ] = "Er werd een gebeurtenis veroorzaakt, waarop een macro werd geconfigureerd. Wilt u dit macro uitvoeren?" ;
+ Text [ portuguese ] = "Foi produzido um acontecimento para o qual foi configurada uma macro. Deseja execut-la?" ;
+ Text[ chinese_simplified ] = "ֱһ꣬Ҫִꣿ";
+ Text[ russian ] = " , . ?";
+ Text[ polish ] = "Zostao uruchomione wydarzenie, do ktrego zostao skonfigurowane makro. Czy chcesz wykona to makro?";
+ Text[ japanese ] = "ϸۂŐݒ肵s_@Jn܂Bϸۂs܂?";
+ Text[ chinese_traditional ] = "ާ@OӦۤ@ӥMznoӥH";
+ Text[ arabic ] = " . ";
+ Text[ dutch ] = "Er werd een gebeurtenis veroorzaakt, waarop een macro werd geconfigureerd. Wilt u dit macro uitvoeren?";
+ Text[ chinese_simplified ] = "ֱһ꣬Ҫִꣿ";
+ Text[ greek ] = " , . ;";
+ Text[ korean ] = "ũΰ ̺Ʈ Ǿϴ. ũθ Ͻðڽϱ?";
+ Text[ turkish ] = "Balatlan olay ile ilgili bir yaplandrlm bir makro mevcut. Bu makroyu altrmak istiyor musunuz?";
+ Text[ language_user1 ] = " ";
+ };
+ CheckBox CB_WARNING
+ {
+ Pos = MAP_APPFONT ( 6 , 58 ) ;
+ Size = MAP_APPFONT ( 151 , 10 ) ;
+ Text = " Fr dieses Dokument nicht mehr warnen" ;
+ Text [ ENGLISH ] = " Fr dieses Dokument nicht mehr warnen" ;
+ Text [ portuguese ] = "No avisar mais para este documento" ;
+ Text [ english_us ] = "Do not warn again for this document" ;
+ Text [ portuguese_brazilian ] = "Fr dieses Dokument nicht mehr warnen" ;
+ Text [ swedish ] = "Varna inte mer fr det hr dokumentet" ;
+ Text [ danish ] = "Advar ikke igen for dette dokument" ;
+ Text [ italian ] = "Non avvertire pi per il documento corrente" ;
+ Text [ spanish ] = "Desactivar las advertencias para este documento" ;
+ Text [ french ] = "Ne plus afficher d'avertissement pour ce document" ;
+ Text [ dutch ] = "Voor dit document niet meer waarschuwen" ;
+ Text[ chinese_simplified ] = "ҪٴΪĵ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Nie pokazuj wicej ostrzeenia dla tego dokumentu";
+ Text[ japanese ] = "޷Ă̂߂ɂx͂Ȃʼn";
+ Text[ chinese_traditional ] = "nAoӤ󴣥Xĵi";
+ Text[ arabic ] = " ";
+ Text[ dutch ] = "Voor dit document niet meer waarschuwen";
+ Text[ chinese_simplified ] = "ҪٴΪĵ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ̻ ";
+ Text[ turkish ] = "Bu belge iin bir daha uyar grntleme";
+ Text[ language_user1 ] = " ";
+ };
+ OKButton BTN_OK
+ {
+ Pos = MAP_APPFONT ( 44 , 74 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ Text = "Ausfhren" ;
+ Text [ ENGLISH ] = "Execute" ;
+ Text [ portuguese ] = "Executar" ;
+ Text [ english_us ] = "Execute" ;
+ Text [ portuguese_brazilian ] = "Ausfhren" ;
+ Text [ swedish ] = "Utfr" ;
+ Text [ danish ] = "Udfr" ;
+ Text [ italian ] = "Esegui" ;
+ Text [ spanish ] = "Ejecutar" ;
+ Text [ french ] = "Excuter" ;
+ Text [ dutch ] = "Uitvoeren" ;
+ Text[ chinese_simplified ] = "ִ";
+ Text[ russian ] = "";
+ Text[ polish ] = "Wykonaj";
+ Text[ japanese ] = "s";
+ Text[ chinese_traditional ] = "";
+ Text[ arabic ] = "";
+ Text[ dutch ] = "Uitvoeren";
+ Text[ chinese_simplified ] = "ִ";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "altr";
+ Text[ language_user1 ] = " ";
+ };
+ CancelButton BTN_CANCEL
+ {
+ Pos = MAP_APPFONT ( 97 , 74 ) ;
+ Size = MAP_APPFONT ( 60 , 14 ) ;
+ Text = "Nicht Ausfhren" ;
+ Text [ ENGLISH ] = "Don't execute" ;
+ Text [ english_us ] = "Don't execute" ;
+ Text [ portuguese_brazilian ] = "Nicht Ausfhren" ;
+ Text [ swedish ] = "Utfr inte" ;
+ Text [ danish ] = "Udfr ikke" ;
+ Text [ italian ] = "Non eseguire" ;
+ Text [ spanish ] = "No ejecutar" ;
+ Text [ french ] = "Ne pas lancer" ;
+ Text [ dutch ] = "Niet uitvoeren" ;
+ Text [ portuguese ] = "No executar" ;
+ Text[ chinese_simplified ] = "ִ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Nie wykonuj";
+ Text[ japanese ] = "sȂ";
+ Text[ chinese_traditional ] = "n";
+ Text[ arabic ] = " ";
+ Text[ dutch ] = "Niet uitvoeren";
+ Text[ chinese_simplified ] = "ִ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ";
+ Text[ turkish ] = "altrma";
+ Text[ language_user1 ] = " ";
+ };
+ TEXT[ dutch ] = "Macro uitvoeren";
+ TEXT[ chinese_simplified ] = "ִк";
+ TEXT[ greek ] = " ";
+ TEXT[ korean ] = "ũ ";
+ TEXT[ turkish ] = "Makroyu altr";
+ TEXT[ language_user1 ] = " ";
+};
+
+
diff --git a/sfx2/source/config/evntconf.cxx b/sfx2/source/config/evntconf.cxx
new file mode 100644
index 000000000000..0c08a8e60215
--- /dev/null
+++ b/sfx2/source/config/evntconf.cxx
@@ -0,0 +1,714 @@
+/*************************************************************************
+ *
+ * $RCSfile: evntconf.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:29 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _SV_MSGBOX_HXX //autogen
+#include <vcl/msgbox.hxx>
+#endif
+#ifndef _FIXED_HXX //autogen
+#include <vcl/fixed.hxx>
+#endif
+#ifndef _SFXLSTNER_HXX //autogen
+#include <svtools/lstner.hxx>
+#endif
+#ifndef _SVSTOR_HXX //autogen
+#include <so3/svstor.hxx>
+#endif
+#ifndef _BASMGR_HXX //autogen
+#include <basic/basmgr.hxx>
+#endif
+#ifndef _SB_SBMOD_HXX //autogen
+#include <basic/sbmod.hxx>
+#endif
+#ifndef _URLOBJ_HXX //autogen
+#include <tools/urlobj.hxx>
+#endif
+#ifndef _SBXCLASS_HXX //autogen
+#include <svtools/sbx.hxx>
+#endif
+#pragma hdrstop
+
+#include "evntconf.hxx"
+
+#include "macrconf.hxx"
+#include "docfile.hxx"
+#include "app.hxx"
+#include "objsh.hxx"
+#include "dispatch.hxx"
+#include "config.hrc"
+#include "sfxresid.hxx"
+#include "cfgmgr.hxx"
+#include "macropg.hxx"
+#include "docinf.hxx"
+
+// -----------------------------------------------------------------------
+
+static const USHORT nCompatVersion = 3;
+static const USHORT nOldVersion = 4;
+static const USHORT nVersion = 5;
+
+TYPEINIT1(SfxEventHint, SfxHint);
+
+// class SfxMacroQueryDlg_Impl -------------------------------------------
+
+class SfxMacroQueryDlg_Impl : public ModalDialog
+{
+ FixedImage aIcon;
+ FixedText aFTMessage;
+ CheckBox aCBWarning;
+ OKButton aOKButton;
+ CancelButton aCancelButton;
+
+public:
+ SfxMacroQueryDlg_Impl( const ResId& rResId );
+ void SetWarningState( BOOL bOn )
+ { aCBWarning.Check( !bOn ); }
+ BOOL GetWarningState() const
+ { return !aCBWarning.IsChecked(); }
+ void HideCheckBox()
+ { aCBWarning.Hide(); }
+};
+
+// -----------------------------------------------------------------------
+
+SfxMacroQueryDlg_Impl::SfxMacroQueryDlg_Impl( const ResId& rResId ) :
+ ModalDialog( NULL, rResId ),
+ aIcon( this, ResId( ICN_MESSAGE ) ),
+ aFTMessage( this, ResId( FT_MESSAGE ) ),
+ aCBWarning( this, ResId( CB_WARNING ) ),
+ aOKButton( this, ResId( BTN_OK ) ),
+ aCancelButton( this, ResId( BTN_CANCEL ) )
+{
+ FreeResource();
+ aCBWarning.Show(FALSE);
+ long nY = aCBWarning.GetPosPixel().Y();
+ aOKButton.SetPosPixel( Point( aOKButton.GetPosPixel().X(), nY ) );
+ aCancelButton.SetPosPixel( Point( aCancelButton.GetPosPixel().X(), nY ) );
+ SetOutputSizePixel( Size( GetOutputSizePixel().Width(),
+ nY + aOKButton.GetSizePixel().Height() + 3 ) );
+ aIcon.SetImage( QueryBox::GetStandardImage() );
+}
+
+// class SfxAsyncEvent_Impl ----------------------------------------------
+
+class SfxAsyncEvent_Impl : public SfxListener
+{
+ String aArgs;
+ SfxObjectShell* pSh;
+ const SvxMacro* pMacro;
+ Timer *pTimer;
+
+public:
+
+ virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
+ SfxAsyncEvent_Impl( SfxObjectShell *pDoc, const SvxMacro *pMacro, const String& rArgs );
+ ~SfxAsyncEvent_Impl();
+ DECL_LINK( TimerHdl, Timer*);
+};
+
+// -----------------------------------------------------------------------
+
+void SfxAsyncEvent_Impl::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
+{
+ SfxSimpleHint* pHint = PTR_CAST( SfxSimpleHint, &rHint );
+ if( pHint && pHint->GetId() == SFX_HINT_DYING && pTimer->IsActive() )
+ {
+ pTimer->Stop();
+ delete this;
+ }
+}
+
+// -----------------------------------------------------------------------
+
+SfxAsyncEvent_Impl::SfxAsyncEvent_Impl( SfxObjectShell *pDoc, const SvxMacro *pMac, const String& rArgs )
+ : aArgs( rArgs )
+ , pSh( pDoc )
+ , pMacro( pMac )
+{
+ if( pSh ) StartListening( *pSh );
+ pTimer = new Timer;
+ pTimer->SetTimeoutHdl( LINK(this, SfxAsyncEvent_Impl, TimerHdl) );
+ pTimer->SetTimeout( 0 );
+ pTimer->Start();
+}
+
+// -----------------------------------------------------------------------
+
+SfxAsyncEvent_Impl::~SfxAsyncEvent_Impl()
+{
+ delete pTimer;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK(SfxAsyncEvent_Impl, TimerHdl, Timer*, pTimer)
+{
+ pTimer->Stop();
+ ScriptType eSType = pMacro->GetScriptType();
+ BOOL bIsBasic = ( eSType == STARBASIC );
+ if ( bIsBasic && StarBASIC::IsRunning() )
+ // Neues eventgebundenes Macro erst ausf"uhren, wenn gerade kein anderes Macro mehr l"auft
+ pTimer->Start();
+ else
+ {
+ SFX_APP()->GetMacroConfig()->ExecuteMacro( pSh, pMacro, aArgs );
+ delete this;
+ }
+
+ return 0L;
+}
+
+//==========================================================================
+
+SfxEventConfiguration::SfxEventConfiguration()
+ : pDocEventConfig( NULL )
+{
+ // Array zum Ermitteln der Bindungen
+ pEventArr = new SfxEventArr_Impl;
+
+ // Einen default entry eingf"ugen
+ const SfxEvent_Impl *pEvent = new SfxEvent_Impl(String(), 0);
+ pEventArr->Insert(pEvent, 0);
+
+ // Die EventConfig f"ur globale Bindungen
+ pAppEventConfig =
+ new SfxEventConfigItem_Impl( SFX_ITEMTYPE_APPEVENTCONFIG, this );
+}
+
+//==========================================================================
+
+SfxEventConfiguration::~SfxEventConfiguration()
+{
+ for (USHORT n=0; n<pEventArr->Count(); n++)
+ delete (*pEventArr)[n];
+ delete pEventArr;
+ delete pAppEventConfig;
+}
+
+//==========================================================================
+
+void SfxEventConfiguration::RegisterEvent(USHORT nId, const String& rName)
+{
+ USHORT nCount = pEventArr->Count();
+ const SfxEvent_Impl *pEvent = new SfxEvent_Impl(rName, nId);
+ pEventArr->Insert(pEvent, nCount);
+}
+
+//==========================================================================
+
+const String& SfxEventConfiguration::GetEventName(USHORT nId) const
+{
+ DBG_ASSERT(pEventArr,"Keine Events angemeldet!");
+ USHORT nCount = pEventArr->Count();
+ for (USHORT n=1; n<nCount; n++)
+ {
+ if ((*pEventArr)[n]->nEventId == nId)
+ {
+ return (*pEventArr)[n]->aEventName;
+ }
+ }
+
+ DBG_ERROR("Event nicht gefunden!");
+ return (*pEventArr)[0]->aEventName;
+}
+
+//==========================================================================
+
+USHORT SfxEventConfiguration::GetEventId(const String& rName) const
+{
+ DBG_ASSERT(pEventArr,"Keine Events angemeldet!");
+ USHORT nCount = pEventArr->Count();
+ for (USHORT n=1; n<nCount; n++)
+ {
+ if ((*pEventArr)[n]->aEventName == rName)
+ {
+ return (*pEventArr)[n]->nEventId;
+ }
+ }
+
+ DBG_ERROR("Event nicht gefunden!");
+ return SFX_NO_EVENT;
+}
+
+void SfxEventConfiguration::ConfigureEvent( USHORT nId, const String& rMacro, SfxObjectShell *pObjSh )
+{
+ String aLibrary, aModule, aFunction;
+ if ( STRING_NOTFOUND == rMacro.Search( '(' ) )
+ {
+ // interne Syntax: Library.Module.Function
+ aFunction = rMacro.GetToken( 2, '.' );
+ aModule = rMacro.GetToken( 1, '.' );
+ aLibrary = rMacro.GetToken( 0, '.' );
+ }
+ else
+ {
+ // UI-Syntax: Function(Library.Module)
+ aFunction = rMacro.GetToken( 0, '(' );
+ String aModLib( rMacro.GetToken( 1, '(' ) );
+ aLibrary = aModLib.GetToken( 0, '.' );
+ aModule = aModLib.GetToken( 1, '.' ).GetToken( 0, ')' );
+ }
+
+ //Ist ein DocBasic-Macro oder nicht ?
+ BOOL bDocBasic = FALSE;
+ if ( pObjSh )
+ {
+ BasicManager *pMgr = pObjSh->GetBasicManager();
+ StarBASIC* pLib = pMgr->GetLib( aLibrary );
+ if ( pLib )
+ {
+ SbModule* pMod =
+ pLib->FindModule( aModule );
+ if ( pMod && pMod->GetMethods()->Find( aFunction, SbxCLASS_METHOD ) )
+ bDocBasic = TRUE;
+ }
+ }
+
+ // Event konfigurieren
+ String aCode( aLibrary );
+ if ( aCode.Len() )
+ {
+ aCode += '.';
+ aCode += aModule;
+ aCode += '.';
+ aCode += aFunction;
+ }
+
+ String aBasic;
+ if( bDocBasic )
+ aBasic = pObjSh->GetTitle();
+ else
+ aBasic = SFX_APP()->GetName();
+ SvxMacro aMacro( aCode, aBasic, STARBASIC );
+ ConfigureEvent( nId, aMacro, pObjSh );
+}
+
+void SfxEventConfiguration::ConfigureEvent( USHORT nId, const SvxMacro& rMacro, SfxObjectShell *pDoc )
+{
+ SvxMacro *pMacro = NULL;
+ if ( rMacro.GetMacName().Len() )
+ pMacro = new SvxMacro( rMacro.GetMacName(), rMacro.GetLibName(), rMacro.GetScriptType() );
+ if ( pDoc )
+ {
+ pDocEventConfig = pDoc->GetEventConfig_Impl( TRUE );
+ pDocEventConfig->ConfigureEvent( nId, pMacro );
+ }
+ else
+ {
+ // globale Bindung
+ pAppEventConfig->ConfigureEvent( nId, pMacro );
+ }
+}
+
+//==========================================================================
+
+void SfxEventConfiguration::ExecuteEvent(
+ USHORT nId, SfxObjectShell *pDoc, FASTBOOL bSynchron, const String& rArgs )
+{
+ pDocEventConfig = pDoc ? pDoc->GetEventConfig_Impl() : NULL;
+ const SvxMacro* pMacro=NULL;
+ BOOL bDocMacro = TRUE;
+ if ( pDocEventConfig )
+ pMacro = pDocEventConfig->aMacroTable.Seek( nId );
+ if ( !pMacro )
+ {
+ pMacro = pAppEventConfig->aMacroTable.Seek( nId );
+ bDocMacro = FALSE;
+ }
+ else
+ {
+ bDocMacro = ( pMacro->GetLibName() != SFX_APP()->GetName()
+ && ! pMacro->GetLibName().EqualsAscii("StarDesktop") );
+ }
+
+ if ( pMacro )
+ {
+ SfxApplication *pApp = SFX_APP();
+ SfxMacroConfig *pCfg = pApp->GetMacroConfig();
+
+ if ( bDocMacro )
+ {
+ if ( pCfg->CheckMacro( pDoc, pMacro ) )
+ {
+ BOOL bRet = !Warn_Impl( pDoc, pMacro );
+
+ // Und gleich abspeichern, wenn die Config in einer Vorlage
+ // sitzt und es das Event "CreateDoc" war
+ SfxDocumentInfo rDocInfo = pDoc->GetDocInfo();
+ if ( nId == SFX_EVENT_CREATEDOC && pDoc->GetConfigManager()->IsModified() &&
+ rDocInfo.HasTemplateConfig() )
+ {
+ const String aTemplName( rDocInfo.GetTemplateName() );
+ if ( aTemplName.Len() )
+ {
+ const String aTemplFileName( rDocInfo.GetTemplateFileName() );
+ SvStorageRef aStor = new SvStorage( aTemplFileName );
+ if ( SVSTREAM_OK == aStor->GetError() )
+ pDoc->GetConfigManager()->SaveConfig( aStor );
+ }
+ }
+
+ if ( bRet )
+ return;
+ }
+ }
+
+ if ( bSynchron )
+ pCfg->ExecuteMacro( pDoc, pMacro, rArgs );
+ else
+ new SfxAsyncEvent_Impl( pDoc, pMacro, rArgs );
+ }
+}
+
+//==========================================================================
+
+const SvxMacro* SfxEventConfiguration::GetMacroForEventId
+(
+ USHORT nId,
+ SfxObjectShell* pDoc
+)
+{
+ pDocEventConfig = pDoc ? pDoc->GetEventConfig_Impl() : NULL;
+ const SvxMacro* pMacro=NULL;
+ if ( pDocEventConfig )
+ pMacro = pDocEventConfig->aMacroTable.Seek( nId );
+ if ( !pMacro )
+ pMacro = pAppEventConfig->aMacroTable.Seek( nId );
+ return pMacro;
+}
+
+const SfxMacroInfo* SfxEventConfiguration::GetMacroInfo
+(
+ USHORT nId,
+ SfxObjectShell* pDoc
+) const
+{
+ DBG_ASSERT(pEventArr,"Keine Events angemeldet!");
+
+ SfxEventConfigItem_Impl *pDocEventConfig = pDoc ? pDoc->GetEventConfig_Impl() : NULL;
+ const SvxMacro* pMacro=NULL;
+ if ( pDocEventConfig )
+ pMacro = pDocEventConfig->aMacroTable.Seek( nId );
+ if ( !pMacro )
+ pMacro = pAppEventConfig->aMacroTable.Seek( nId );
+
+ return SFX_APP()->GetMacroConfig()->GetMacroInfo_Impl( pMacro );
+}
+
+//==========================================================================
+
+SfxEventConfigItem_Impl::SfxEventConfigItem_Impl( USHORT nConfigId,
+ SfxEventConfiguration *pCfg )
+ : SfxConfigItem( nConfigId )
+ , aMacroTable( 2, 2 )
+ , pEvConfig( pCfg )
+{
+ SetInternal(TRUE);
+ SetIndividual(TRUE);
+}
+
+void SfxEventConfigItem_Impl::Init( SfxConfigManager *pMgr )
+{
+ if ( GetConfigManager() == pMgr )
+ Initialize();
+ else
+ ReInitialize( pMgr );
+}
+
+//==========================================================================
+
+int SfxEventConfigItem_Impl::Load(SvStream& rStream)
+{
+ USHORT nFileVersion, nCount;
+ rStream >> nFileVersion;
+ if ( nFileVersion < nCompatVersion || nFileVersion > nVersion )
+ return SfxConfigItem::WARNING_VERSION;
+
+ if ( nFileVersion <= nOldVersion )
+ {
+ SvUShorts aSlotArray;
+ if (!aSlotArray.Count())
+ {
+ USHORT nCount = pEvConfig->GetEventCount();
+ for (USHORT n=0; n<nCount; n++)
+ aSlotArray.Insert((USHORT)0 ,n);
+ }
+ else
+ {
+ for (USHORT n=0; n<aSlotArray.Count(); n++)
+ {
+ if (aSlotArray[n])
+ SFX_APP()->GetMacroConfig()->ReleaseSlotId(aSlotArray[n]);
+ aSlotArray[n] = 0;
+ }
+ }
+
+ if ( nFileVersion > nCompatVersion )
+ {
+ USHORT nWarn;
+ rStream >> nWarn;
+ bWarning = ( nWarn & 0x01 ) != 0;
+ bAlwaysWarning = ( nWarn & 0x02 ) != 0;
+ }
+ else
+ bWarning = bAlwaysWarning = FALSE;
+
+ rStream >> nCount;
+ USHORT nId;
+ USHORT i;
+ for (i=0; i<nCount; i++)
+ {
+ SfxMacroInfo aInfo( GetConfigManager_Impl()->GetObjectShell() );
+ rStream >> nId >> aInfo;
+
+ USHORT nCount = aSlotArray.Count();
+ for (USHORT n=0; n<nCount; n++)
+ {
+ if ((*pEvConfig->pEventArr)[n+1]->nEventId == nId)
+ {
+ aSlotArray[n] = aInfo.GetSlotId();
+ break;
+ }
+ }
+ }
+
+ aMacroTable.DelDtor();
+ SfxMacroConfig *pMC = SFX_APP()->GetMacroConfig();
+ for (i=0; i<aSlotArray.Count(); i++)
+ {
+ if (aSlotArray[i])
+ {
+ const SfxMacroInfoPtr pInfo = pMC->GetMacroInfo(aSlotArray[i]);
+ SvxMacro *pMacro = new SvxMacro( pInfo->GetQualifiedName(),
+ pInfo->GetBasicName(), STARBASIC );
+ aMacroTable.Insert( (*pEvConfig->pEventArr)[i+1]->nEventId, pMacro );
+ }
+ }
+ }
+ else
+ {
+ USHORT nWarn;
+ rStream >> nWarn;
+ bWarning = ( nWarn & 0x01 ) != 0;
+ bAlwaysWarning = ( nWarn & 0x02 ) != 0;
+ aMacroTable.Read( rStream );
+ }
+
+ return SfxConfigItem::ERR_OK;
+}
+
+//==========================================================================
+
+BOOL SfxEventConfigItem_Impl::Store(SvStream& rStream)
+{
+ USHORT nWarn=0;
+ if ( bWarning )
+ nWarn |= 0x01;
+ if ( bAlwaysWarning )
+ nWarn |= 0x02;
+ rStream << nVersion << nWarn;
+ aMacroTable.Write( rStream );
+ return TRUE;
+}
+
+//==========================================================================
+
+BOOL SfxEventConfigItem_Impl::Reconfigure(SvStream& rStream, BOOL bDefault)
+{
+ return SfxConfigItem::Reconfigure(rStream, bDefault);
+}
+
+//==========================================================================
+
+String SfxEventConfigItem_Impl::GetName() const
+{
+ return String(SfxResId(STR_EVENTCONFIG));
+}
+
+//==========================================================================
+
+void SfxEventConfigItem_Impl::UseDefault()
+{
+ bWarning = TRUE;
+ bAlwaysWarning = FALSE;
+
+ aMacroTable.DelDtor();
+ SfxConfigItem::UseDefault();
+}
+
+//==========================================================================
+
+SfxEventConfigItem_Impl::~SfxEventConfigItem_Impl()
+{
+}
+
+//==========================================================================
+
+void SfxEventConfigItem_Impl::ConfigureEvent( USHORT nId, SvxMacro *pMacro )
+{
+ if ( aMacroTable.Seek( nId ) )
+ {
+ if ( pMacro )
+ aMacroTable.Replace( nId, pMacro );
+ else
+ aMacroTable.Remove( nId );
+ }
+ else if ( pMacro )
+ aMacroTable.Insert( nId, pMacro );
+ SetDefault(FALSE);
+}
+
+BOOL SfxEventConfiguration::IsWarningEnabled() const
+{
+ return pAppEventConfig->bWarning;
+}
+
+BOOL SfxEventConfiguration::IsWarningForced() const
+{
+ return pAppEventConfig->bAlwaysWarning;
+}
+
+void SfxEventConfiguration::SetWarningEnabled( BOOL bOn )
+{
+ if ( pAppEventConfig->bWarning != bOn )
+ {
+ pAppEventConfig->bWarning = bOn;
+ pAppEventConfig->SetDefault( FALSE );
+ }
+}
+
+void SfxEventConfiguration::SetWarningForced( BOOL bOn )
+{
+ if ( pAppEventConfig->bAlwaysWarning != bOn )
+ {
+ pAppEventConfig->bAlwaysWarning = bOn;
+ pAppEventConfig->SetDefault( FALSE );
+ }
+}
+
+
+BOOL SfxEventConfiguration::Warn_Impl( SfxObjectShell *pDoc, const SvxMacro* pMacro )
+{
+ BOOL bWarn = FALSE;
+ if ( pDoc )
+ {
+ pDocEventConfig = pDoc ? pDoc->GetEventConfig_Impl() : NULL;
+ if ( !pDocEventConfig )
+ return TRUE; // IsSecure ???
+
+ // Wenn das Macro sowieso nicht ausgef"uhrt wird, mu\s auch nicht gefragt werden
+ if ( pMacro->GetScriptType() == STARBASIC && !pDoc->IsSecure() )
+ return FALSE;
+
+ // Bei dokumentgebundenen Macros WarningStatus checken
+ // Wenn "Immer warnen" angeschaltet ist, Warnung ausgeben
+ bWarn = pAppEventConfig->bAlwaysWarning;
+ if ( bWarn )
+ {
+ SfxMacroQueryDlg_Impl aBox ( SfxResId( DLG_MACROQUERY ) );
+ if ( aBox.Execute() )
+ bWarn = FALSE;
+ }
+ }
+
+ return !bWarn;
+}
+
+void SfxEventConfiguration::AddEvents( SfxMacroTabPage* pPage ) const
+{
+ DBG_ASSERT(pEventArr,"Keine Events angemeldet!");
+ USHORT nCount = pEventArr->Count();
+ for (USHORT n=1; n<nCount; n++)
+ pPage->AddEvent( (*pEventArr)[n]->aEventName, (*pEventArr)[n]->nEventId );
+}
+
+SvxMacroTableDtor* SfxEventConfiguration::GetAppEventTable()
+{
+ return &pAppEventConfig->aMacroTable;
+}
+
+SvxMacroTableDtor* SfxEventConfiguration::GetDocEventTable( SfxObjectShell*pDoc )
+{
+ pDocEventConfig = pDoc ? pDoc->GetEventConfig_Impl() : NULL;
+ if ( pDocEventConfig )
+ return &pDocEventConfig->aMacroTable;
+ return NULL;
+}
+
+void SfxEventConfiguration::SetAppEventTable( const SvxMacroTableDtor& rTable )
+{
+ pAppEventConfig->aMacroTable = rTable;
+ pAppEventConfig->SetDefault(FALSE);
+}
+
+void SfxEventConfiguration::SetDocEventTable( SfxObjectShell *pDoc,
+ const SvxMacroTableDtor& rTable )
+{
+ if ( pDoc )
+ {
+ pDocEventConfig = pDoc->GetEventConfig_Impl( TRUE );
+ pDocEventConfig->aMacroTable = rTable;
+ pDocEventConfig->SetDefault(FALSE);
+ }
+ else
+ DBG_ERROR( "Kein Dokument!" );
+}
+
+
diff --git a/sfx2/source/config/makefile.mk b/sfx2/source/config/makefile.mk
new file mode 100644
index 000000000000..acc016f966a1
--- /dev/null
+++ b/sfx2/source/config/makefile.mk
@@ -0,0 +1,115 @@
+#*************************************************************************
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.1.1.1 $
+#
+# last change: $Author: hr $ $Date: 2000-09-18 16:52:29 $
+#
+# The Contents of this file are made available subject to the terms of
+# either of the following licenses
+#
+# - GNU Lesser General Public License Version 2.1
+# - Sun Industry Standards Source License Version 1.1
+#
+# Sun Microsystems Inc., October, 2000
+#
+# GNU Lesser General Public License Version 2.1
+# =============================================
+# Copyright 2000 by Sun Microsystems, Inc.
+# 901 San Antonio Road, Palo Alto, CA 94303, USA
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License version 2.1, as published by the Free Software Foundation.
+#
+# This library 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 for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+#
+# Sun Industry Standards Source License Version 1.1
+# =================================================
+# The contents of this file are subject to the Sun Industry Standards
+# Source License Version 1.1 (the "License"); You may not use this file
+# except in compliance with the License. You may obtain a copy of the
+# License at http://www.openoffice.org/license.html.
+#
+# Software provided under this License is provided on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+# See the License for the specific provisions governing your rights and
+# obligations concerning the Software.
+#
+# The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+#
+# Copyright: 2000 by Sun Microsystems, Inc.
+#
+# All Rights Reserved.
+#
+# Contributor(s): _______________________________________
+#
+#
+#
+#*************************************************************************
+
+PRJ=..$/..
+
+PRJNAME=sfx2
+TARGET=config
+ENABLE_EXCEPTIONS=TRUE
+.INCLUDE : $(PRJ)$/util$/makefile.pmk
+AUTOSEG=true
+
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : svpre.mk
+.INCLUDE : settings.mk
+.INCLUDE : sv.mk
+
+# --- Files --------------------------------------------------------
+
+# defaults for cppumaker
+# UNOUCRBASE=UCR
+# UNOUCRRDB=$(SOLARUCRDIR)$/uce.rdb
+# UNOUCROUT=$(OUT)$/inc
+
+UNOUCRDEP=$(SOLARBINDIR)$/applicat.rdb
+UNOUCRRDB=$(SOLARBINDIR)$/applicat.rdb
+# Every source directory generates headers in a own output directory to
+# enable parallel building of the source directories within a project!
+UNOUCROUT=$(OUT)$/inc$/$(PRJNAME)$/$(TARGET)
+INCPRE+=$(UNOUCROUT)
+
+UNOTYPES=\
+ com.sun.star.lang.XMultiServiceFactory \
+ com.sun.star.beans.XPropertyChangeListener \
+ com.sun.star.uno.TypeClass \
+ com.sun.star.uno.XWeak \
+ com.sun.star.uno.XAggregation \
+ com.sun.star.lang.XTypeProvider \
+ com.sun.star.frame.XConfigManager \
+ com.sun.star.registry.XSimpleRegistry
+
+SRCFILES = \
+ config.src
+
+SLOFILES = \
+ $(SLO)$/saveopt.obj \
+ $(SLO)$/cfgmgr.obj \
+ $(SLO)$/cfgitem.obj \
+ $(SLO)$/misccfg.obj \
+ $(SLO)$/evntconf.obj
+
+# --- Tagets -------------------------------------------------------
+
+.INCLUDE : target.mk
+
diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx
new file mode 100644
index 000000000000..ea5e1a3f7c67
--- /dev/null
+++ b/sfx2/source/control/bindings.cxx
@@ -0,0 +1,3022 @@
+/*************************************************************************
+ *
+ * $RCSfile: bindings.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:29 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _SFXITEMPOOL_HXX //autogen
+#include <svtools/itempool.hxx>
+#endif
+#ifndef _SFXITEMITER_HXX //autogen
+#include <svtools/itemiter.hxx>
+#endif
+#ifndef _SFXENUMITEM_HXX //autogen
+#include <svtools/eitem.hxx>
+#endif
+#ifndef _AEITEM_HXX //autogen
+#include <svtools/aeitem.hxx>
+#endif
+#include <svtools/intitem.hxx>
+#include <svtools/stritem.hxx>
+
+#ifndef _COM_SUN_STAR_UTIL_XURLTRANSFORMER_HPP_
+#include <com/sun/star/util/XURLTransformer.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XDISPATCHPROVIDERINTERCEPTOR_HPP_
+#include <com/sun/star/frame/XDispatchProviderInterceptor.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XDISPATCH_HPP_
+#include <com/sun/star/frame/XDispatch.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XDISPATCHPROVIDER_HPP_
+#include <com/sun/star/frame/XDispatchProvider.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XSTATUSLISTENER_HPP_
+#include <com/sun/star/frame/XStatusListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_FRAMESEARCHFLAG_HPP_
+#include <com/sun/star/frame/FrameSearchFlag.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XDISPATCHPROVIDERINTERCEPTION_HPP_
+#include <com/sun/star/frame/XDispatchProviderInterception.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_FEATURESTATEEVENT_HPP_
+#include <com/sun/star/frame/FeatureStateEvent.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_DISPATCHDESCRIPTOR_HPP_
+#include <com/sun/star/frame/DispatchDescriptor.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XCONTROLLER_HPP_
+#include <com/sun/star/frame/XController.hpp>
+#endif
+#include <unotools/processfactory.hxx>
+
+#pragma hdrstop
+
+#include "ipfrm.hxx"
+#include "ipenv.hxx"
+#include "interno.hxx"
+#include "bindings.hxx"
+#include "msg.hxx"
+#include "statcach.hxx"
+#include "ctrlitem.hxx"
+#include "app.hxx"
+#include "appdata.hxx"
+#include "dispatch.hxx"
+#include "request.hxx"
+#include "objface.hxx"
+#include "sfxtypes.hxx"
+#include "workwin.hxx"
+#include "macrconf.hxx"
+#include "unoctitm.hxx"
+#include "sfx.hrc"
+#include "sfxuno.hxx"
+#include "topfrm.hxx"
+
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::util;
+
+DBG_NAME(SfxBindingsMsgPos);
+DBG_NAME(SfxBindingsUpdateServers);
+DBG_NAME(SfxBindingsCreateSet);
+DBG_NAME(SfxBindingsUpdateCtrl1);
+DBG_NAME(SfxBindingsUpdateCtrl2);
+DBG_NAME(SfxBindingsNextJob_Impl0);
+DBG_NAME(SfxBindingsNextJob_Impl);
+DBG_NAME(SfxBindingsUpdate_Impl);
+DBG_NAME(SfxBindingsInvalidateAll);
+
+//====================================================================
+
+#define TIMEOUT_FIRST 20
+#define TIMEOUT_UPDATING 0
+#define TIMEOUT_IDLE 2500
+
+static sal_uInt32 nCache1 = 0;
+static sal_uInt32 nCache2 = 0;
+
+//====================================================================
+//TYPEINIT1(SfxSlotInterceptorItem, SfxPoolItem);
+
+DECL_PTRARRAY(SfxStateCacheArr_Impl, SfxStateCache*, 32, 16);
+DECL_PTRARRAY(SfxInterceptorArr_Impl, SfxSlotInterceptor*, 2, 2);
+
+//====================================================================
+
+struct SfxSlotInterceptor_Impl
+{
+ SfxBindings* _pBindings;
+ sal_Bool _bIsActive;
+};
+
+//====================================================================
+
+class SfxBindings_Impl
+
+/* [Beschreibung]
+
+ Diese Implementations-Struktur der Klasse SfxBindings dient
+ der Entkopplung von "Anderungen vom exportierten Interface sowie
+ der Verringerung von extern sichtbaren Symbolen.
+
+ Eine Instanz exisitiert pro SfxBindings-Instanz f"ur deren Laufzeit.
+*/
+
+{
+public:
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > xProv;
+ SfxUnoControllerArr_Impl*
+ pUnoCtrlArr;
+ SfxWorkWindow* pWorkWin;
+ SfxBindings* pSubBindings;
+ SfxBindings* pSuperBindings;
+ SfxInterceptorArr_Impl* pInterceptors; // Slots vor dem Dispatcher abfangen
+ SfxStateCacheArr_Impl* pCaches; // je ein cache fuer jede gebundene
+ sal_uInt16 nCachedFunc1; // index der zuletzt gerufenen
+ sal_uInt16 nCachedFunc2; // index der vorletzt gerufenen
+ sal_uInt16 nMsgPos; // Message-Position, ab der zu aktualisieren ist
+ SfxPopupAction ePopupAction; // in DeleteFloatinWindow() abgefragt
+ sal_Bool bMsgDirty; // wurde ein MessageServer invalidiert?
+ sal_Bool bAllMsgDirty; // wurden die MessageServer invalidiert?
+ sal_Bool bAllDirty; // nach InvalidateAll
+ sal_Bool bCtrlReleased; // waehrend EnterRegistrations
+ AutoTimer aTimer; // fuer volatile Slots
+ sal_Bool bInUpdate; // fuer Assertions
+ sal_Bool bInNextJob; // fuer Assertions
+ sal_Bool bFirstRound; // Erste Runde im Update
+ sal_uInt16 nFirstShell; // Shell, die in erster Runde bevorzugt wird
+// sal_Bool bInExecute; // zum Test auf synchrone Executes
+ sal_uInt16 nOwnRegLevel; // z"ahlt die echten Locks, ohne die der SuperBindings
+
+ void InsertSlotInterceptor( SfxSlotInterceptor* );
+ void RemoveSlotInterceptor( SfxSlotInterceptor* );
+};
+
+void SfxBindings_Impl::InsertSlotInterceptor( SfxSlotInterceptor* pInter )
+{
+ // ggf. Interceptor-Liste on-demand erzeugen
+ if ( !pInterceptors )
+ pInterceptors = new SfxInterceptorArr_Impl;
+ pInterceptors->Insert( 0, pInter );
+
+ if ( pSubBindings )
+ pSubBindings->pImp->InsertSlotInterceptor( pInter );
+}
+
+void SfxBindings_Impl::RemoveSlotInterceptor( SfxSlotInterceptor* pInter )
+{
+ // bei den Bindings austragen
+ pInterceptors->Remove( pInter );
+
+ // gar kein SfxSlotInterceptor mehr => auf 0 setzen (f"ur Schnellabfrage)
+ if ( !pInterceptors->Count() )
+ DELETEZ( pInterceptors );
+
+ if ( pSubBindings )
+ pSubBindings->pImp->RemoveSlotInterceptor( pInter );
+}
+
+//--------------------------------------------------------------------
+
+struct SfxFoundCache_Impl
+
+/* [Beschreibung]
+
+ In Instanzen dieser Struktur werden in <SfxBindings::CreateSet_Impl()>
+ weitere Informationen zu den gemeinsam von einem <Slot-Server> zu
+ erfragenden Status gesammelt, deren Ids dort in die Ranges eines
+ <SfxItemSet>s aufgenommen werden.
+
+ Diese Informationen werden w"ahrend der Suche nach den zusammen
+ upzudatenden Ids sowieso als Zwischenergebnis ermittelt und nachher
+ wieder ben"otigt, daher macht es Sinn, sie f"ur diesen kurzen Zeitraum
+ gleich aufzubewahren.
+*/
+
+{
+ sal_uInt16 nSlotId; // die Slot-Id
+ sal_uInt16 nWhichId; // falls verf"ugbar die Which-Id, sonst nSlotId
+ const SfxSlot* pSlot; // Pointer auf den <Master-Slot>
+ SfxStateCache* pCache; // Pointer auf den StatusCache, ggf. 0
+
+ SfxFoundCache_Impl():
+ nSlotId(0),
+ nWhichId(0),
+ pSlot(0),
+ pCache(0)
+ {}
+
+ SfxFoundCache_Impl(SfxFoundCache_Impl&r):
+ nSlotId(r.nSlotId),
+ nWhichId(r.nWhichId),
+ pSlot(r.pSlot),
+ pCache(r.pCache)
+ {}
+
+ SfxFoundCache_Impl(sal_uInt16 nS, sal_uInt16 nW, const SfxSlot *pS, SfxStateCache *pC ):
+ nSlotId(nS),
+ nWhichId(nW),
+ pSlot(pS),
+ pCache(pC)
+ {}
+
+ int operator<( const SfxFoundCache_Impl &r ) const
+ { return nWhichId < r.nWhichId; } const
+
+ int operator==( const SfxFoundCache_Impl &r )
+ { return nWhichId== r.nWhichId; }
+};
+
+//--------------------------------------------------------------------------
+
+SV_DECL_PTRARR_SORT_DEL(SfxFoundCacheArr_Impl, SfxFoundCache_Impl*, 16, 16 );
+SV_IMPL_OP_PTRARR_SORT(SfxFoundCacheArr_Impl, SfxFoundCache_Impl*);
+
+//==========================================================================
+
+SfxBindings::SfxBindings()
+
+/* [Beschreibung]
+
+ Konstruktor der Klasse SfxBindings. Genau eine Instanz wird automatisch
+ von der <SfxApplication> vor <SfxApplication::Init()> angelegt. Wird
+ eine Instanz ben"otigt, z.B. zum Invalidieren von Slots, sollte diese
+ "uber den zugeh"origen <SfxViewFrame> besorgt werden. Bestimmte
+ SfxViewFrame Subklassen (z.B. <SfxInPlaceFrame>) legen ihre eigene
+ Instanz der SfxBindings an.
+
+ <SfxControllerItem> Instanzen k"onnen erst angelegt werden, wenn
+ die zugeh"orige SfxBindings Instanz existiert.
+*/
+
+: pImp(new SfxBindings_Impl),
+ pDispatcher(0),
+ nRegLevel(1) // geht erst auf 0, wenn Dispatcher gesetzt
+{
+ pImp->nMsgPos = 0;
+ pImp->bAllMsgDirty = sal_True;
+ pImp->bMsgDirty = sal_True;
+ pImp->bAllDirty = sal_True;
+ pImp->ePopupAction = SFX_POPUP_DELETE;
+ pImp->nCachedFunc1 = 0;
+ pImp->nCachedFunc2 = 0;
+ pImp->bCtrlReleased = sal_False;
+ pImp->bFirstRound = sal_False;
+ pImp->bInNextJob = sal_False;
+ pImp->bInUpdate = sal_False;
+// pImp->bInExecute = sal_False;
+ pImp->pSubBindings = NULL;
+ pImp->pSuperBindings = NULL;
+ pImp->pWorkWin = NULL;
+ pImp->pUnoCtrlArr = NULL;
+ pImp->nOwnRegLevel = nRegLevel;
+
+ // all caches are valid (no pending invalidate-job)
+ // create the list of caches
+ pImp->pCaches = new SfxStateCacheArr_Impl;
+ pImp->aTimer.SetTimeoutHdl( LINK(this, SfxBindings, NextJob_Impl) );
+ pImp->pInterceptors = 0;
+}
+
+//====================================================================
+
+SfxBindings::~SfxBindings()
+
+/* [Beschreibung]
+
+ Destruktor der Klasse SfxBindings. Die eine, f"ur jede <SfxApplication>
+ existierende Instanz wird von der <SfxApplication> nach Ausf"urhung
+ von <SfxApplication::Exit()> automatisch zerst"ort.
+
+ Noch existierende <SfxControllerItem> Instanzen, die bei dieser
+ SfxBindings Instanz angemeldet sind, werden im Destruktor
+ automatisch zerst"ort. Dies sind i.d.R. Floating-Toolboxen, Value-Sets
+ etc. Arrays von SfxControllerItems d"urfen zu diesem Zeitpunkt nicht
+ mehr exisitieren.
+*/
+
+{
+ // Die SubBindings sollen ja nicht gelocked werden !
+ pImp->pSubBindings = NULL;
+
+ ENTERREGISTRATIONS();
+
+ pImp->aTimer.Stop();
+ DeleteControllers_Impl();
+
+ // Caches selbst l"oschen
+ sal_uInt16 nCount = pImp->pCaches->Count();
+ for ( sal_uInt16 nCache = 0; nCache < nCount; ++nCache )
+ delete pImp->pCaches->GetObject(nCache);
+
+ delete pImp->pCaches;
+ delete pImp;
+}
+
+//--------------------------------------------------------------------
+
+void SfxBindings::DeleteControllers_Impl()
+
+/* [Beschreibung]
+
+ Interne Methode zum l"oschen noch existierender <SfxControllerItem>
+ Instanzen, die bei dieser SfxBindings Instanz angemeldet sind.
+
+ Dies sind i.d.R. <SfxPopupWindow>s. Nich sich selbst geh"orende
+ SfxControllerItems d"urfen bei Aufruf nur noch existieren, wenn sie
+ einem der restlichen SfxPopupWindows geh"oren.
+
+
+ [Anmerkung]
+
+ Wird beim Beenden der Applikation gerufen, bevor das Applikations-
+ Fenster gel"oscht wird.
+*/
+
+{
+ // in der ersten Runde den SfxPopupWindows l"oschen
+ sal_uInt16 nCount = pImp->pCaches->Count();
+ sal_uInt16 nCache;
+ for ( nCache = 0; nCache < nCount; ++nCache )
+ {
+ // merken wo man ist
+ SfxStateCache *pCache = pImp->pCaches->GetObject(nCache);
+ sal_uInt16 nSlotId = pCache->GetId();
+
+ // SfxPopupWindow l"oschen lassen
+ pCache->DeleteFloatingWindows();
+
+ // da der Cache verkleinert worden sein kann, wiederaufsetzen
+ sal_uInt16 nNewCount = pImp->pCaches->Count();
+ if ( nNewCount < nCount )
+ {
+ nCache = GetSlotPos(nSlotId);
+ if ( nCache >= nNewCount ||
+ nSlotId != pImp->pCaches->GetObject(nCache)->GetId() )
+ --nCache;
+ nCount = nNewCount;
+ }
+ }
+
+ // alle Caches l"oschen
+ for ( nCache = pImp->pCaches->Count(); nCache > 0; --nCache )
+ {
+ // Cache via ::com::sun::star::sdbcx::Index besorgen
+ SfxStateCache *pCache = pImp->pCaches->GetObject(nCache-1);
+
+ // alle Controller in dem Cache unbinden
+ SfxControllerItem *pNext;
+ for ( SfxControllerItem *pCtrl = pCache->GetItemLink();
+ pCtrl; pCtrl = pNext )
+ {
+ pNext = pCtrl->GetItemLink();
+ pCtrl->UnBind();
+ }
+
+ // Cache l"oschen
+ if( nCache-1 < pImp->pCaches->Count() )
+ delete (*pImp->pCaches)[nCache-1];
+ pImp->pCaches->Remove(nCache-1, 1);
+ }
+
+ if( pImp->pUnoCtrlArr )
+ {
+ sal_uInt16 nCount = pImp->pUnoCtrlArr->Count();
+ for ( sal_uInt16 n=nCount; n>0; n-- )
+ {
+ SfxUnoControllerItem *pCtrl = (*pImp->pUnoCtrlArr)[n-1];
+ pCtrl->ReleaseBindings();
+ }
+
+ DBG_ASSERT( !pImp->pUnoCtrlArr->Count(), "UnoControllerItems nicht entfernt!" );
+ DELETEZ( pImp->pUnoCtrlArr );
+ }
+}
+
+//--------------------------------------------------------------------
+
+SfxPopupAction SfxBindings::GetPopupAction_Impl() const
+{
+ return pImp->ePopupAction;
+}
+
+
+//--------------------------------------------------------------------
+
+void SfxBindings::HidePopups( FASTBOOL bHide )
+
+/* [Beschreibung]
+
+ Dieser Methode versteckt und zeigt die <SfxPopupWindows>, die aus
+ <SfxToolboxControl>s dieser SfxBindings-Instanz abgerissen wurden bzw.
+ floating <SfxChildWindow>-Instanzen dieser SfxBindings-Instanz.
+
+
+ [Anmerkung]
+
+ Es k"onnten noch weitere Floating-Windows exisitieren, die durch
+ diese Methode nicht erfa\st werden.
+*/
+
+{
+ // SfxPopupWindows hiden
+ HidePopupCtrls_Impl( bHide );
+ SfxBindings *pSub = pImp->pSubBindings;
+ while ( pSub )
+ {
+ pImp->pSubBindings->HidePopupCtrls_Impl( bHide );
+ pSub = pSub->pImp->pSubBindings;
+ }
+
+ // SfxChildWindows hiden
+ DBG_ASSERT( pDispatcher, "HidePopups not allowed without dispatcher" );
+ if ( pImp->pWorkWin )
+ pImp->pWorkWin->HidePopups_Impl( bHide, sal_True );
+}
+
+void SfxBindings::HidePopupCtrls_Impl( FASTBOOL bHide )
+{
+ if ( bHide )
+ {
+ // SfxPopupWindows hiden
+ pImp->ePopupAction = SFX_POPUP_HIDE;
+ }
+ else
+ {
+ // SfxPopupWindows showen
+ pImp->ePopupAction = SFX_POPUP_SHOW;
+ }
+
+ for ( sal_uInt16 nCache = 0; nCache < pImp->pCaches->Count(); ++nCache )
+ pImp->pCaches->GetObject(nCache)->DeleteFloatingWindows();
+ pImp->ePopupAction = SFX_POPUP_DELETE;
+}
+
+//--------------------------------------------------------------------
+
+void SfxBindings::Update_Impl
+(
+ SfxStateCache* pCache // der upzudatende SfxStatusCache
+)
+
+/* [Beschreibung]
+
+ Interne Methode zum Updaten eines Caches und den von derselben
+ Status-Methode in derselben Shell bedienten und dirty Slots.
+*/
+
+{
+ if( pCache->GetDispatch().is() && pCache->GetItemLink() )
+ {
+ pCache->SetCachedState();
+ return;
+ }
+
+ if ( !pDispatcher )
+ return;
+ DBG_PROFSTART(SfxBindingsUpdate_Impl);
+
+ // alle mit derselben Statusmethode zusammensammeln, die dirty sind
+ SfxDispatcher &rDispat = *pDispatcher;
+ const SfxSlot *pRealSlot = 0;
+ const SfxSlotServer* pMsgServer = 0;
+ SfxFoundCacheArr_Impl aFound;
+ SfxItemSet *pSet = CreateSet_Impl( pCache, pRealSlot, &pMsgServer, aFound );
+ sal_Bool bUpdated = sal_False;
+ if ( pSet )
+ {
+ // Status erfragen
+ if ( rDispat._FillState( *pMsgServer, *pSet, pRealSlot ) )
+ {
+ // Status posten
+ const SfxInterface *pInterface =
+ rDispat.GetShell(pMsgServer->GetShellLevel())->GetInterface();
+ for ( sal_uInt16 nPos = 0; nPos < aFound.Count(); ++nPos )
+ {
+ const SfxFoundCache_Impl *pFound = aFound[nPos];
+ sal_uInt16 nWhich = pFound->nWhichId;
+ const SfxPoolItem *pItem = 0;
+ SfxItemState eState = pSet->GetItemState(nWhich, sal_True, &pItem);
+ if ( eState == SFX_ITEM_DEFAULT && SfxItemPool::IsWhich(nWhich) )
+ pItem = &pSet->Get(nWhich);
+ UpdateControllers_Impl( pInterface, aFound[nPos], pItem, eState );
+ }
+ bUpdated = sal_True;
+ }
+
+ delete pSet;
+ }
+
+ if ( !bUpdated && pCache )
+ {
+ // Wenn pCache == NULL und kein SlotServer ( z.B. weil Dispatcher gelockt! ),
+ // darf nat"urlich kein Update versucht werden
+ SfxFoundCache_Impl aFound( pCache->GetId(), 0,
+ pRealSlot, pCache );
+ UpdateControllers_Impl( 0, &aFound, 0, SFX_ITEM_DISABLED);
+ }
+
+ DBG_PROFSTOP(SfxBindingsUpdate_Impl);
+}
+
+//--------------------------------------------------------------------
+
+void SfxBindings::Update
+(
+ sal_uInt16 nId // die gebundene und upzudatende Slot-Id
+)
+
+/* [Beschreibung]
+
+ Diese Methode sorgt f"ur synchrones Updaten der auf die Slot-Id nId
+ gebundenen <SfxContollerItem> Instanzen, die an dieser SfxBindings
+ Instanz angemeldet sind. Vergleichbar zu Window::Update()
+ (StarView) erfolgt ein Update nur, wenn entweder ein auf diese
+ Slot-Id gebundenes SfxContollerItem dirty ist, oder die Slot-Id
+ selbst dirty ist. Dies kann durch einen vorhergehendes Aufruf von
+ <SfxBindings::Invalidate(sal_uInt16)> erzwungen werden.
+
+
+ [Anmerkung]
+
+ Es ist g"unstiger, zun"achst alle zu invalidierenden Slot-Ids per
+ <SfxBindings::Invalidate(sal_uInt16)> zu invalidieren und dann
+ Update() aufzurufen, als einzelne abwechselnde Invalidate/Update,
+ da von derselben Status-Methode bediente Status-Anfragen von
+ den SfxBindings automatisch zusammengefa"st werden.
+
+
+ [Querverweise]
+
+ <SfxShell::Invalidate(sal_uInt16)>
+ <SfxBindings::Invalidate(sal_uInt16)>
+ <SfxBindings::InvalidateAll(sal_Bool)>
+ <SfxBindings::Update()>
+*/
+
+{
+ DBG_MEMTEST();
+ DBG_ASSERT( pImp->pCaches != 0, "SfxBindings not initialized" );
+
+//!!TLX: Fuehrte zu Vorlagenkatalogstillstand
+// if ( nRegLevel )
+// return;
+
+ if ( pDispatcher )
+ pDispatcher->Flush();
+
+ if ( pImp->pSubBindings )
+ pImp->pSubBindings->Update( nId );
+
+ SfxStateCache* pCache = GetStateCache( nId );
+ if ( pCache )
+ {
+ pImp->bInUpdate = sal_True;
+ if ( pImp->bMsgDirty )
+ {
+ UpdateSlotServer_Impl();
+ pCache = GetStateCache( nId );
+ }
+
+ if (pCache)
+ {
+ if( pCache->GetDispatch().is() && pCache->GetItemLink() )
+ {
+ pCache->SetCachedState();
+ }
+ else
+ {
+ // Status erfragen
+ const SfxSlotServer* pMsgServer =
+ pCache->GetSlotServer(*pDispatcher, pImp->xProv);
+ if ( !pCache->IsControllerDirty() &&
+ ( !pMsgServer ||
+ !pMsgServer->GetSlot()->IsMode(SFX_SLOT_VOLATILE) ) )
+ {
+ pImp->bInUpdate = sal_False;
+ return;
+ }
+ if (!pMsgServer)
+ {
+ pCache->SetState(SFX_ITEM_DISABLED, 0);
+ pImp->bInUpdate = sal_False;
+ return;
+ }
+
+ Update_Impl(pCache);
+ }
+
+ pImp->bAllDirty = sal_False;
+ }
+
+ pImp->bInUpdate = sal_False;
+ }
+}
+
+//--------------------------------------------------------------------
+
+void SfxBindings::Update()
+
+/* [Beschreibung]
+
+ Diese Methode sorgt f"ur synchrones Updaten aller <SfxContollerItem>
+ Instanzen, die an dieser SfxBindings Instanz angemeldet sind. Vergleichbar
+ zu Window::Update() (StarView) erfolgt ein Update nur, wenn entweder ein
+ SfxContollerItem dirty ist, in einem Status-Cache der Zeiger auf den
+ <Slot-Server> dirty ist. Ersteres kann durch einen Aufruf von
+ <SfxBindings::Invalidate(sal_uInt16)> erzwungen werden, letzters durch
+ <SfxBindings::InvalidateAll(sal_Bool)>.
+
+
+ [Querverweise]
+
+ <SfxShell::Invalidate(sal_uInt16)>
+ <SfxBindings::Invalidate(sal_uInt16)>
+ <SfxBindings::InvalidateAll(sal_Bool)>
+ <SfxBindings::Update(sal_uInt16)>
+*/
+
+{
+ DBG_MEMTEST();
+ DBG_ASSERT( pImp->pCaches != 0, "SfxBindings not initialized" );
+
+ if ( pImp->pSubBindings )
+ pImp->pSubBindings->Update();
+
+ if ( pDispatcher )
+ {
+ if ( nRegLevel )
+ return;
+
+ pImp->bInUpdate = sal_True;
+ pDispatcher->Flush();
+ pDispatcher->Update_Impl();
+ while ( !NextJob_Impl(0) )
+ ; // loop
+ pImp->bInUpdate = sal_False;
+ }
+}
+
+//--------------------------------------------------------------------
+
+void SfxBindings::SetState
+(
+ const SfxItemSet& rSet // zu setzende Status-Werte
+)
+
+/* [Beschreibung]
+
+ Diese Methode erlaubt das direkte Setzen neuer Status-Werte, ohne
+ den Umweg "uber <SfxBindings::Invalidate()> und das dann im Update
+ erfolgende Rufen der Status-Methoden an den <SfxShell>s.
+
+
+ [Querverweise]
+
+ <SfxBindings::SetState(const SfxPoolItem&)>
+*/
+
+{
+ // wenn gelockt, dann nur invalidieren
+ if ( nRegLevel )
+ {
+ SfxItemIter aIter(rSet);
+ for ( const SfxPoolItem *pItem = aIter.FirstItem();
+ pItem;
+ pItem = aIter.NextItem() )
+ Invalidate( pItem->Which() );
+ }
+ else
+ {
+ // Status d"urfen nur angenommen werden, wenn alle Slot-Pointer gesetzt sind
+ if ( pImp->bMsgDirty )
+ UpdateSlotServer_Impl();
+
+ // "uber das ItemSet iterieren, falls Slot gebunden, updaten
+ //! Bug: WhichIter verwenden und ggf. VoidItems hochschicken
+ SfxItemIter aIter(rSet);
+ for ( const SfxPoolItem *pItem = aIter.FirstItem();
+ pItem;
+ pItem = aIter.NextItem() )
+ {
+ SfxStateCache* pCache =
+ GetStateCache( rSet.GetPool()->GetSlotId(pItem->Which()) );
+ if ( pCache )
+ {
+ // Status updaten
+ if ( !pCache->IsControllerDirty() )
+ pCache->Invalidate(sal_False);
+ pCache->SetState( SFX_ITEM_AVAILABLE, pItem );
+
+ //! nicht implementiert: Updates von EnumSlots via MasterSlots
+ }
+ }
+ }
+}
+
+//--------------------------------------------------------------------
+
+void SfxBindings::SetState
+(
+ const SfxPoolItem& rItem // zu setzender Status-Wert
+)
+
+/* [Beschreibung]
+
+ Diese Methode erlaubt das direkte Setzen eines neuen Status-Wertes,
+ ohne den Umweg "uber <SfxBindings::Invalidate()> und das dann im Update
+ erfolgende Rufen der Status-Methoden an den <SfxShell>s.
+
+ Mit dieser Methode k"onnen nur <SfxPoolItem>s mit Slot, nicht
+ aber mit Which-Id gesetzt werden, da kein <SfxItemPool> bekannt ist,
+ "uber den gemappt werden k"onnte.
+
+
+ [Querverweise]
+
+ <SfxBindings::SetState(const SfxItemSet&)>
+*/
+
+{
+ if ( nRegLevel )
+ {
+ Invalidate( rItem.Which() );
+ }
+ else
+ {
+ // Status d"urfen nur angenommen werden, wenn alle Slot-Pointer gesetzt sind
+ if ( pImp->bMsgDirty )
+ UpdateSlotServer_Impl();
+
+ // falls der Slot gebunden ist, updaten
+ DBG_ASSERT( SfxItemPool::IsSlot( rItem.Which() ),
+ "cannot set items with which-id" );
+ SfxStateCache* pCache = GetStateCache( rItem.Which() );
+ if ( pCache )
+ {
+ // Status updaten
+ if ( !pCache->IsControllerDirty() )
+ pCache->Invalidate(sal_False);
+ pCache->SetState( SFX_ITEM_AVAILABLE, &rItem );
+
+ //! nicht implementiert: Updates von EnumSlots via MasterSlots
+ }
+ }
+}
+
+
+//--------------------------------------------------------------------
+
+SfxStateCache* SfxBindings::GetAnyStateCache_Impl( sal_uInt16 nId )
+{
+ SfxStateCache* pCache = GetStateCache( nId );
+ if ( !pCache && pImp->pSubBindings )
+ return pImp->pSubBindings->GetAnyStateCache_Impl( nId );
+ return pCache;
+}
+
+SfxStateCache* SfxBindings::GetStateCache
+(
+ sal_uInt16 nId /* Slot-Id, deren SfxStatusCache gefunden
+ werden soll */,
+ sal_uInt16* pPos /* 0 bzw. Position, ab der die Bindings
+ bin"ar durchsucht werden sollen. Liefert
+ die Position zur"uck, an der nId gefunden
+ wurde, bzw. an der es einfef"ugt werden
+ w"urde. */
+)
+
+/* [Beschreibung]
+
+ Diese Methode sucht die zu einer Slot-Id geh"orige <SfxStatusCache>
+ Instanz. Falls die Slot-Id in keinem Controller gebunden ist, wird
+ ein 0-Pointer zur"uckgegeben.
+
+ Falls pPos != 0, wird erst ab der Position mit der Suche angefangen.
+ Dieses ist eine Optimierung, f"ur den Fall, da"s die kleineren
+ Ids bereits abgearbeitet wurden.
+
+ In *pPos wird der ::com::sun::star::sdbcx::Index innerhalb der SfxBindings zur"uckgegeben,
+ unter dem dieser Cache z.Zt. abgelegt ist. Dieser ::com::sun::star::sdbcx::Index ist bis zum
+ n"achsten Aufruf von <SfxBindings::EnterRegistrations()> g"ultig.
+ W"ahrend der Umkonfiguration (<SfxBindings::IsInRegistrations()> == sal_True)
+ kann ist der ::com::sun::star::sdbcx::Index und der R"uckgabewert nur sehr kurzfristig
+ g"ultig.
+*/
+
+{
+ DBG_MEMTEST();
+ DBG_ASSERT( pImp->pCaches != 0, "SfxBindings not initialized" );
+ // is the specified function bound?
+ const sal_uInt16 nStart = ( pPos ? *pPos : 0 );
+ const sal_uInt16 nPos = GetSlotPos( nId, nStart );
+
+ if ( nPos < pImp->pCaches->Count() &&
+ (*pImp->pCaches)[nPos]->GetId() == nId )
+ {
+ if ( pPos )
+ *pPos = nPos;
+ return (*pImp->pCaches)[nPos];
+ }
+ return 0;
+}
+
+//--------------------------------------------------------------------
+
+void SfxBindings::InvalidateAll
+(
+ sal_Bool bWithMsg /* sal_True
+ Slot-Server als ung"ultig markieren
+
+ sal_False
+ Slot-Server bleiben g"ultig */
+)
+
+/* [Beschreibung]
+
+ Invalidiert alle <SfxControllerItem> Instanzen, die an dieser
+ SfxBindings Instanz angemeldet sind, und bei bWithMsg == sal_True
+ ebenfalls die <Slot-Server>-Caches.
+
+ Es wird daraufhin ein Timer gestartet, bei dessen Ablauf das Updaten
+ beginnt. Somit k"onnen mehrere Invalidierungen vorgenommen werden,
+ bevor "uberhaupt etwas passiert.
+
+
+ [Querverweise]
+
+ <SfxShell::Invalidate(sal_uInt16)>
+ <SfxBindings::Invalidate(sal_uInt16)>
+ <SfxBindings::Invalidate(sal_uInt16*)>
+ <SfxBindings::Update()>
+ <SfxBindings::Update(sal_uInt16)>
+*/
+
+{
+ DBG_PROFSTART(SfxBindingsInvalidateAll);
+ DBG_ASSERT( !pImp->bInUpdate, "SfxBindings::Invalidate while in update" );
+
+ DBG_MEMTEST();
+
+ if ( pImp->pSubBindings )
+ pImp->pSubBindings->InvalidateAll( bWithMsg );
+
+ // ist schon alles dirty gesetzt oder downing => nicht zu tun
+ if ( !pDispatcher ||
+ ( pImp->bAllDirty && ( !bWithMsg || pImp->bAllMsgDirty ) ) ||
+ SFX_APP()->IsDowning() )
+ {
+ DBG_PROFSTOP(SfxBindingsInvalidateAll);
+ return;
+ }
+
+ pImp->bAllMsgDirty = pImp->bAllMsgDirty || bWithMsg;
+ pImp->bMsgDirty = pImp->bMsgDirty || pImp->bAllMsgDirty || bWithMsg;
+ pImp->bAllDirty = sal_True;
+
+ for ( sal_uInt16 n = 0; n < pImp->pCaches->Count(); ++n )
+ pImp->pCaches->GetObject(n)->Invalidate(bWithMsg);
+ pImp->nMsgPos = 0;
+ if ( !nRegLevel )
+ {
+ pImp->aTimer.SetTimeout(TIMEOUT_FIRST);
+ pImp->aTimer.Start();
+// pImp->bFirstRound = sal_True;
+// pImp->nFirstShell = 0;
+ }
+
+ DBG_PROFSTOP(SfxBindingsInvalidateAll);
+}
+
+//--------------------------------------------------------------------
+
+void SfxBindings::Invalidate
+(
+ const sal_uInt16* pIds /* numerisch sortiertes 0-terminiertes Array
+ von Slot-Ids (einzel, nicht als Paare!) */
+)
+
+/* [Beschreibung]
+
+ Invalidiert die <SfxControllerItem> Instanzen der Slot-Ids in 'pIds',
+ die an dieser SfxBindings Instanz angemeldet sind.
+
+ Es wird daraufhin ein Timer gestartet, bei dessen Ablauf das Updaten
+ beginnt. Somit k"onnen mehrere Invalidierungen vorgenommen werden,
+ bevor "uberhaupt etwas passiert.
+
+
+ [Querverweise]
+
+ <SfxShell::Invalidate(sal_uInt16)>
+ <SfxBindings::Invalidate(sal_uInt16)>
+ <SfxBindings::InvalidateAll(sal_uInt16)>
+ <SfxBindings::Update()>
+ <SfxBindings::Update(sal_uInt16)>
+*/
+
+{
+ DBG_PROFSTART(SfxBindingsInvalidateAll);
+ DBG_ASSERT( !pImp->bInUpdate, "SfxBindings::Invalidate while in update" );
+
+ DBG_MEMTEST();
+
+ if ( pImp->pSubBindings )
+ pImp->pSubBindings->Invalidate( pIds );
+
+ // ist schon alles dirty gesetzt oder downing => nicht zu tun
+ if ( !pDispatcher || pImp->bAllDirty || SFX_APP()->IsDowning() )
+ return;
+
+ // in immer kleiner werdenden Berichen bin"ar suchen
+ for ( sal_uInt16 n = GetSlotPos(*pIds);
+ *pIds && n < pImp->pCaches->Count();
+ n = GetSlotPos(*pIds, n) )
+ {
+ // falls SID "uberhaupt gebunden ist, den Cache invalidieren
+ SfxStateCache *pCache = pImp->pCaches->GetObject(n);
+ if ( pCache->GetId() == *pIds )
+ pCache->Invalidate(sal_False);
+
+ // n"achste SID
+ if ( !*++pIds )
+ break;
+ DBG_ASSERT( *pIds > *(pIds-1), "pIds unsorted" );
+ }
+
+ // falls nicht gelockt, Update-Timer starten
+ pImp->nMsgPos = 0;
+ if ( !nRegLevel )
+ {
+ pImp->aTimer.SetTimeout(TIMEOUT_FIRST);
+ pImp->aTimer.Start();
+// pImp->bFirstRound = sal_True;
+// pImp->nFirstShell = 0;
+ }
+
+ DBG_PROFSTOP(SfxBindingsInvalidateAll);
+}
+
+//--------------------------------------------------------------------
+
+void SfxBindings::InvalidateShell
+(
+ const SfxShell& rSh /* Die <SfxShell>, deren Slot-Ids
+ invalidiert werden sollen. */,
+
+ sal_Bool bDeep /* sal_True
+ auch die, von der SfxShell
+ ererbten Slot-Ids werden invalidert
+
+ sal_False
+ die ererbten und nicht "uberladenen
+ Slot-Ids werden invalidiert */
+ //! MI: z. Zt. immer bDeep
+)
+
+/* [Beschreibung]
+
+ Invalidiert alle <SfxControllerItem> Instanzen, die zur Zeit von
+ der angegebenen SfxShell Instanz bedient werden und an dieser
+ SfxBindings Instanz angemeldet sind
+
+ Es wird daraufhin ein Timer gestartet, bei dessen Ablauf das Updaten
+ beginnt. Somit k"onnen mehrere Invalidierungen vorgenommen werden,
+ bevor "uberhaupt etwas passiert.
+
+
+ [Querverweise]
+
+ <SfxShell::Invalidate(sal_uInt16)>
+ <SfxBindings::Invalidate(sal_uInt16)>
+ <SfxBindings::Update()>
+ <SfxBindings::Update(sal_uInt16)>
+*/
+
+{
+ DBG_ASSERT( !pImp->bInUpdate, "SfxBindings::Invalidate while in update" );
+
+ if ( pImp->pSubBindings )
+ pImp->pSubBindings->InvalidateShell( rSh, bDeep );
+
+ if ( !pDispatcher || pImp->bAllDirty || SFX_APP()->IsDowning() )
+ return;
+
+ DBG_PROFSTART(SfxBindingsInvalidateAll);
+ DBG_MEMTEST();
+
+ // Jetzt schon flushen, wird in GetShellLevel(rSh) sowieso gemacht; wichtig,
+ // damit pImp->bAll(Msg)Dirty korrekt gesetzt ist
+ pDispatcher->Flush();
+
+ if ( !pDispatcher ||
+ ( pImp->bAllDirty && pImp->bAllMsgDirty ) ||
+ SFX_APP()->IsDowning() )
+ {
+ // Wenn sowieso demn"achst alle Server geholt werden
+ return;
+ }
+
+ // Level finden
+ sal_uInt16 nLevel = pDispatcher->GetShellLevel(rSh);
+ if ( nLevel != USHRT_MAX )
+ {
+ for ( sal_uInt16 n = 0; n < pImp->pCaches->Count(); ++n )
+ {
+ SfxStateCache *pCache = pImp->pCaches->GetObject(n);
+ const SfxSlotServer *pMsgServer =
+ pCache->GetSlotServer(*pDispatcher, pImp->xProv);
+ if ( pMsgServer && pMsgServer->GetShellLevel() == nLevel )
+ pCache->Invalidate(sal_False);
+ }
+ pImp->nMsgPos = 0;
+ if ( !nRegLevel )
+ {
+ pImp->aTimer.SetTimeout(TIMEOUT_FIRST);
+ pImp->aTimer.Start();
+ pImp->bFirstRound = sal_True;
+ pImp->nFirstShell = nLevel;
+ }
+ }
+
+ DBG_PROFSTOP(SfxBindingsInvalidateAll);
+}
+
+//--------------------------------------------------------------------
+
+void SfxBindings::Invalidate
+(
+ sal_uInt16 nId // zu invalidierende Slot-Id
+)
+
+/* [Beschreibung]
+
+ Invalidiert alle <SfxControllerItem> Instanzen, die auf die Slot-Id
+ nId gebunden sind und an dieser SfxBindings Instanz angemeldet sind.
+
+ Es wird daraufhin ein Timer gestartet, bei dessen Ablauf das Updaten
+ beginnt. Somit k"onnen mehrere Invalidierungen vorgenommen werden,
+ bevor "uberhaupt etwas passiert.
+
+
+ [Querverweise]
+ <SfxBindings::Invalidate(sal_uInt16*)>
+ <SfxBindings::InvalidateAll(sal_Bool)>
+ <SfxBindings::Update()>
+ <SfxBindings::Update(sal_uInt16)>
+*/
+
+{
+ DBG_MEMTEST();
+ DBG_ASSERT( !pImp->bInUpdate, "SfxBindings::Invalidate while in update" );
+
+ if ( pImp->pSubBindings )
+ pImp->pSubBindings->Invalidate( nId );
+
+ if ( !pDispatcher || pImp->bAllDirty || SFX_APP()->IsDowning() )
+ return;
+
+ SfxStateCache* pCache = GetStateCache(nId);
+ if ( pCache )
+ {
+ pCache->Invalidate(sal_False);
+ pImp->nMsgPos = Min(GetSlotPos(nId), pImp->nMsgPos);
+ if ( !nRegLevel )
+ {
+ pImp->aTimer.SetTimeout(TIMEOUT_FIRST);
+ pImp->aTimer.Start();
+ }
+ }
+}
+
+//--------------------------------------------------------------------
+
+void SfxBindings::Invalidate
+(
+ sal_uInt16 nId, // zu invalidierende Slot-Id
+ sal_Bool bWithItem, // StateCache clearen ?
+ sal_Bool bWithMsg // SlotServer neu holen ?
+)
+
+/* [Beschreibung]
+
+ Invalidiert alle <SfxControllerItem> Instanzen, die auf die Slot-Id
+ nId gebunden sind und an dieser SfxBindings Instanz angemeldet sind,
+ und bei bWithMsg == sal_True ebenfalls den <Slot-Server>-Cache.
+
+ Es wird daraufhin ein Timer gestartet, bei dessen Ablauf das Updaten
+ beginnt. Somit k"onnen mehrere Invalidierungen vorgenommen werden,
+ bevor "uberhaupt etwas passiert.
+
+ [Querverweise]
+ <SfxBindings::Invalidate(sal_uInt16*)>
+ <SfxBindings::InvalidateAll(sal_Bool)>
+ <SfxBindings::Update()>
+ <SfxBindings::Update(sal_uInt16)>
+*/
+
+{
+ DBG_MEMTEST();
+ DBG_ASSERT( !pImp->bInUpdate, "SfxBindings::Invalidate while in update" );
+
+ if ( pImp->pSubBindings )
+ pImp->pSubBindings->Invalidate( nId, bWithItem, bWithMsg );
+
+ if ( SFX_APP()->IsDowning() )
+ return;
+
+ SfxStateCache* pCache = GetStateCache(nId);
+ if ( pCache )
+ {
+ if ( bWithItem )
+ pCache->ClearCache();
+ pCache->Invalidate(bWithMsg);
+
+ if ( !pDispatcher || pImp->bAllDirty )
+ return;
+
+ pImp->nMsgPos = Min(GetSlotPos(nId), pImp->nMsgPos);
+ if ( !nRegLevel )
+ {
+ pImp->aTimer.SetTimeout(TIMEOUT_FIRST);
+ pImp->aTimer.Start();
+ }
+ }
+}
+
+void SfxBindings::Invalidate
+(
+ sal_uInt16 nId, // zu invalidierende Slot-Id
+ sal_Bool bWithMsg // SlotServer neu holen ?
+)
+
+/* [Beschreibung]
+
+ Invalidiert alle <SfxControllerItem> Instanzen, die auf die Slot-Id
+ nId gebunden sind und an dieser SfxBindings Instanz angemeldet sind,
+ und bei bWithMsg == sal_True ebenfalls den <Slot-Server>-Cache.
+
+ Es wird daraufhin ein Timer gestartet, bei dessen Ablauf das Updaten
+ beginnt. Somit k"onnen mehrere Invalidierungen vorgenommen werden,
+ bevor "uberhaupt etwas passiert.
+
+ [Querverweise]
+ <SfxBindings::Invalidate(sal_uInt16*)>
+ <SfxBindings::InvalidateAll(sal_Bool)>
+ <SfxBindings::Update()>
+ <SfxBindings::Update(sal_uInt16)>
+*/
+
+{
+ DBG_ERROR( "Methode veraltet!" );
+/*
+ DBG_MEMTEST();
+ DBG_ASSERT( !pImp->bInUpdate, "SfxBindings::Invalidate while in update" );
+ DBG_ASSERT( sal_False, "alte Methode aus Kompatibilitaetsgruenden gerettet (MH)");
+
+ if ( pImp->pSubBindings )
+ pImp->pSubBindings->Invalidate( nId, bWithMsg );
+
+ if ( !pDispatcher || pImp->bAllDirty || SFX_APP()->IsDowning() )
+ return;
+
+ SfxStateCache* pCache = GetStateCache(nId);
+ if ( pCache )
+ {
+ pCache->Invalidate(bWithMsg);
+ pImp->nMsgPos = Min(GetSlotPos(nId), pImp->nMsgPos);
+ if ( !nRegLevel )
+ {
+ pImp->aTimer.SetTimeout(TIMEOUT_FIRST);
+ pImp->aTimer.Start();
+ }
+ }
+*/
+}
+
+//--------------------------------------------------------------------
+
+sal_Bool SfxBindings::IsBound( sal_uInt16 nSlotId, sal_uInt16 nStartSearchAt )
+
+/* [Beschreibung]
+
+ Stellt fest, ob die angegebene Slot-Id in einem <SfxControllerItem>
+ gebunden ist, der an dieser SfxBindings Instanz angemeldet ist.
+
+
+ [R"uckgabewert]
+
+ sal_Bool sal_True
+ Die angegeben Slot-Id ist gebunden.
+
+ sal_False
+ Die angegeben Slot-Id ist nicht gebunden.
+*/
+
+{
+ DBG_MEMTEST();
+ DBG_ASSERT( pImp->pCaches != 0, "SfxBindings not initialized" );
+ return GetStateCache(nSlotId, &nStartSearchAt ) != 0;
+}
+
+//--------------------------------------------------------------------
+
+sal_uInt16 SfxBindings::GetSlotPos( sal_uInt16 nId, sal_uInt16 nStartSearchAt )
+
+/* [Beschreibung]
+
+ Ermittelt den ::com::sun::star::sdbcx::Index der angegebenen Slot-Id in den SfxBindings.
+ Falls die Slot-Id nicht gebunden ist, wird der ::com::sun::star::sdbcx::Index zur"uckgegeben,
+ an dem sie eingef"ugt w"urde.
+*/
+
+{
+ DBG_MEMTEST();
+ DBG_ASSERT( pImp->pCaches != 0, "SfxBindings not initialized" );
+ DBG_PROFSTART(SfxBindingsMsgPos);
+
+ // answer immediately if a function-seek comes repeated
+ if ( pImp->nCachedFunc1 < pImp->pCaches->Count() &&
+ (*pImp->pCaches)[pImp->nCachedFunc1]->GetId() == nId )
+ {
+ ++nCache1;
+ DBG_PROFSTOP(SfxBindingsMsgPos);
+ return pImp->nCachedFunc1;
+ }
+ if ( pImp->nCachedFunc2 < pImp->pCaches->Count() &&
+ (*pImp->pCaches)[pImp->nCachedFunc2]->GetId() == nId )
+ {
+ ++nCache2;
+
+ // swap the caches
+ sal_uInt16 nTemp = pImp->nCachedFunc1;
+ pImp->nCachedFunc1 = pImp->nCachedFunc2;
+ pImp->nCachedFunc2 = nTemp;
+ DBG_PROFSTOP(SfxBindingsMsgPos);
+ return pImp->nCachedFunc1;
+ }
+
+ // binary search, if not found, seek to target-position
+ if ( pImp->pCaches->Count() <= nStartSearchAt )
+ {
+ DBG_PROFSTOP(SfxBindingsMsgPos);
+ return 0;
+ }
+ if ( pImp->pCaches->Count() == (nStartSearchAt+1) )
+ {
+ DBG_PROFSTOP(SfxBindingsMsgPos);
+ return (*pImp->pCaches)[nStartSearchAt]->GetId() >= nId ? 0 : 1;
+ }
+ size_t nLow = nStartSearchAt, nMid, nHigh = 0;
+ sal_Bool bFound = sal_False;
+ nHigh = pImp->pCaches->Count() - 1;
+ while ( !bFound && nLow <= nHigh )
+ {
+ nMid = (nLow + nHigh) >> 1;
+ DBG_ASSERT( nMid < pImp->pCaches->Count(), "bsearch ist buggy" );
+ int nDiff = (int) nId - (int) ( ((*pImp->pCaches)[nMid])->GetId() );
+ if ( nDiff < 0)
+ { if ( nMid == 0 )
+ break;
+ nHigh = nMid - 1;
+ }
+ else if ( nDiff > 0 )
+ { nLow = nMid + 1;
+ if ( nLow == 0 )
+ break;
+ }
+ else
+ bFound = sal_True;
+ }
+ sal_uInt16 nPos = bFound ? nMid : nLow;
+ DBG_ASSERT( nPos <= pImp->pCaches->Count(), "" );
+ DBG_ASSERT( nPos == pImp->pCaches->Count() ||
+ nId <= (*pImp->pCaches)[nPos]->GetId(), "" );
+ DBG_ASSERT( nPos == nStartSearchAt ||
+ nId > (*pImp->pCaches)[nPos-1]->GetId(), "" );
+ DBG_ASSERT( ( (nPos+1) >= pImp->pCaches->Count() ) ||
+ nId < (*pImp->pCaches)[nPos+1]->GetId(), "" );
+ pImp->nCachedFunc2 = pImp->nCachedFunc1;
+ pImp->nCachedFunc1 = nPos;
+ DBG_PROFSTOP(SfxBindingsMsgPos);
+ return nPos;
+}
+//--------------------------------------------------------------------
+
+void SfxBindings::Register( SfxControllerItem& rItem )
+
+/* [Beschreibung]
+
+ Mit dieser Methode melden sich Instanzen der Klasse <SfxControllerItem>
+ an der betreffenden SfxBindings Instanz an, wenn sie eine Slot-Id binden.
+
+
+ [Querverweise]
+ <SfxBindings::Release(SfxControllerItem&)>
+ <SfxBindings::EnterRegistrations()>
+ <SfxBindings::LeaveRegistrations()>
+*/
+
+{
+ DBG_MEMTEST();
+ DBG_ASSERT( nRegLevel > 0, "registration without EnterRegistrations" );
+ DBG_ASSERT( !pImp->bInNextJob, "SfxBindings::Register while status-updating" );
+ //! EnterRegistrations();
+
+ // if not exist, insert a new cache
+ sal_uInt16 nId = rItem.GetId();
+ sal_uInt16 nPos = GetSlotPos(nId);
+ if ( nPos >= pImp->pCaches->Count() ||
+ (*pImp->pCaches)[nPos]->GetId() != nId )
+ {
+ SfxStateCache* pCache = new SfxStateCache(nId);
+ pImp->pCaches->Insert( nPos, pCache );
+ DBG_ASSERT( nPos == 0 ||
+ (*pImp->pCaches)[nPos]->GetId() >
+ (*pImp->pCaches)[nPos-1]->GetId(), "" );
+ DBG_ASSERT( (nPos == pImp->pCaches->Count()-1) ||
+ (*pImp->pCaches)[nPos]->GetId() <
+ (*pImp->pCaches)[nPos+1]->GetId(), "" );
+ pImp->bMsgDirty = sal_True;
+ }
+
+ // enqueue the new binding
+ SfxControllerItem *pOldItem = (*pImp->pCaches)[nPos]->ChangeItemLink(&rItem);
+ rItem.ChangeItemLink(pOldItem);
+
+ //! LeaveRegistrations();
+}
+//--------------------------------------------------------------------
+
+void SfxBindings::Release( SfxControllerItem& rItem )
+
+/* [Beschreibung]
+
+ Mit dieser Methode melden sich Instanzen der Klasse <SfxControllerItem>
+ an den SfxBindings ab.
+
+
+ [Querverweise]
+ <SfxBindings::Register(SfxControllerItem&)>
+ <SfxBindings::Release(SfxControllerItem&)>
+ <SfxBindings::EnterRegistrations()>
+ <SfxBindings::LeaveRegistrations()>
+*/
+
+{
+ DBG_MEMTEST();
+ DBG_ASSERT( pImp->pCaches != 0, "SfxBindings not initialized" );
+ //! DBG_ASSERT( nRegLevel > 0, "release without EnterRegistrations" );
+ DBG_ASSERT( !pImp->bInNextJob, "SfxBindings::Release while status-updating" );
+ ENTERREGISTRATIONS();
+
+ // find the bound function
+ sal_uInt16 nId = rItem.GetId();
+ sal_uInt16 nPos = GetSlotPos(nId);
+ SfxStateCache* pCache = (*pImp->pCaches)[nPos];
+ if ( pCache->GetId() == nId )
+ {
+ // is this the first binding in the list?
+ SfxControllerItem* pItem = pCache->GetItemLink();
+ if ( pItem == &rItem )
+ pCache->ChangeItemLink( rItem.GetItemLink() );
+ else
+ {
+ // search the binding in the list
+ while ( pItem && pItem->GetItemLink() != &rItem )
+ pItem = pItem->GetItemLink();
+
+ // unlink it if it was found
+ if ( pItem )
+ pItem->ChangeItemLink( rItem.GetItemLink() );
+ }
+ // was this the last controller?
+ if ( pCache->GetItemLink() == 0 )
+ {
+#ifdef slow
+ // remove the BoundFunc
+ delete (*pImp->pCaches)[nPos];
+ pImp->pCaches->Remove(nPos, 1);
+#endif
+ if ( SfxMacroConfig::IsMacroSlot( nId ) )
+ {
+ delete (*pImp->pCaches)[nPos];
+ pImp->pCaches->Remove(nPos, 1);
+ }
+ else
+ pImp->bCtrlReleased = sal_True;
+ }
+ }
+
+ LEAVEREGISTRATIONS();
+}
+
+//--------------------------------------------------------------------
+#if SUPD<582
+sal_Bool SfxBindings::Execute( sal_uInt16 nId, const SfxPoolItem** ppItems, sal_uInt16 nModi )
+{
+ return Execute( nId, SFX_CALLMODE_SLOT, ppItems, nModi );
+}
+
+sal_Bool SfxBindings::Execute( sal_uInt16 nId, SfxCallMode nCallMode, const SfxPoolItem** ppItems, sal_uInt16 nModi, const SfxPoolItem **ppInternalArgs )
+#else
+sal_Bool SfxBindings::Execute( sal_uInt16 nId, const SfxPoolItem** ppItems, sal_uInt16 nModi, SfxCallMode nCallMode, const SfxPoolItem **ppInternalArgs )
+#endif
+/* [Beschreibung]
+
+ F"uhrt den Slot mit der Slot-Id nId "uber den <Slot-Server> Cache
+ aus. Dies ist nur bei in dieser SfxBindings INstanz gebundenen
+ Slot-Ids m"oglich.
+
+
+ [R"uckgabewert]
+
+ sal_Bool sal_True
+ Das Execute wurde ausgef"uhrt.
+
+ sal_False
+ Das Execute konnte nicht ausgef"uhrt werden,
+ weil der Slot entweder nicht zur Verf"ugung steht
+ (in keiner aktiven <SfxShell> vorhanden oder
+ disabled) ist oder der Anwender die Ausf"uhrung
+ abgebrochen hat (Cancel in einem Dialog).
+
+
+ [Querverweise]
+ <SfxDispatcher>
+*/
+{
+ DBG_MEMTEST();
+ DBG_ASSERT( pImp->pCaches != 0, "SfxBindings not initialized" );
+
+ if( !nId || !pDispatcher )
+ return sal_False;
+
+ SfxStateCache *pCache = GetStateCache( nId );
+ if ( !pCache )
+ {
+ SfxBindings *pBind = pImp->pSubBindings;
+ while ( pBind )
+ {
+ if ( pBind->GetStateCache( nId ) )
+#if SUPD<582
+ return pBind->Execute( nId, nCallMode, ppItems, nModi, ppInternalArgs );
+#else
+ return pBind->Execute( nId, ppItems, nModi, nCallMode, ppInternalArgs );
+#endif
+ pBind = pBind->pImp->pSubBindings;
+ };
+ }
+
+ // synchronisieren
+ SfxDispatcher &rDispatcher = *pDispatcher;
+ rDispatcher.Flush();
+// pImp->bInExecute = sal_True;
+ SfxViewFrame *pFrame = rDispatcher.GetFrame();
+
+ // vom cache den Server (Slot+ShellLevel) und die Shell etc. abholen
+ sal_Bool bDeleteCache = sal_False;
+ if ( !pCache && pImp->xProv.is() )
+ {
+ pCache = new SfxStateCache( nId );
+ pCache->GetSlotServer( rDispatcher, pImp->xProv );
+ bDeleteCache = sal_True;
+ }
+
+ if ( pCache && pCache->GetDispatch().is() )
+ {
+ pCache->Dispatch( nCallMode == SFX_CALLMODE_SYNCHRON );
+ if ( bDeleteCache )
+ DELETEZ( pCache );
+ return sal_True;
+ }
+
+ // abgefangen?
+ if ( pImp->pInterceptors )
+ {
+ for ( sal_uInt16 n = 0; n < pImp->pInterceptors->Count(); ++n )
+ {
+ SfxSlotInterceptor *pInterceptor = pImp->pInterceptors->GetObject(n);
+ SfxPoolItem *pState = 0;
+ if ( SFX_ITEM_DISABLED != pInterceptor->QueryState(nId, pState) &&
+ pInterceptor->Execute(nId, (SfxPoolItem**) ppItems) )
+ {
+ delete pState;
+// pImp->bInExecute = sal_False;
+ return sal_True;
+ }
+ }
+ }
+
+ // Zur Sicherheit!
+ if ( pImp->bMsgDirty )
+ UpdateSlotServer_Impl();
+
+ // Neuerdings k"onnen wir auch nicht gecachete Slots executen
+ // ( wg. Acceleratoren, deren Controller aus Performance-Gr"unden nicht mehr
+ // gebunden werden ).
+ SfxShell *pShell=0;
+ const SfxSlot *pSlot=0;
+
+ const SfxSlotServer* pServer = pCache ? pCache->GetSlotServer( rDispatcher, pImp->xProv ) : 0;
+ if ( !pServer )
+ {
+ SfxSlotServer aServer;
+// if ( !rDispatcher._TryIntercept_Impl( nId, aServer, sal_False ) )
+ {
+ if ( !rDispatcher._FindServer( nId, aServer, sal_False ) )
+ {
+// pImp->bInExecute = sal_False;
+ if ( bDeleteCache )
+ delete pCache;
+ return sal_False;
+ }
+ }
+
+ pShell = rDispatcher.GetShell( aServer.GetShellLevel() );
+ pSlot = aServer.GetSlot();
+ }
+ else
+ {
+ pShell = rDispatcher.GetShell( pServer->GetShellLevel() );
+ pSlot = pServer->GetSlot();
+ }
+
+ SfxItemPool &rPool = pShell->GetPool();
+ SfxRequest aReq( nId, nCallMode, rPool );
+ aReq.SetModifier( nModi );
+ if( ppItems )
+ while( *ppItems )
+ aReq.AppendItem( **ppItems++ );
+ if ( ppInternalArgs )
+ {
+ SfxAllItemSet aSet( rPool );
+ for ( const SfxPoolItem **pArg = ppInternalArgs; *pArg; ++pArg )
+ aSet.Put( **pArg );
+ aReq.SetInternalArgs_Impl( aSet );
+ }
+
+/*
+ if ( pFrame && pFrame->IsVisible() )
+ {
+ // Bugfix #48745
+ // damit der Benutzer nicht verwirrt wird, wird bei Executes vom
+ // UI aus, die "Anderungen am Dokument vornehmen, der Focus auf das
+ // EditWindow gezogen, sofern der Frame sichtbar ist und der Focus
+ // nicht schon im Frame liegt
+ SfxViewFrame *pTop = pFrame->GetTopViewFrame();
+ SfxViewFrame *pAct = SfxViewFrame::Current()->GetTopViewFrame();
+ if ( !pSlot->IsMode( SFX_SLOT_READONLYDOC ) && pTop == pAct && !pFrame->GetWindow().HasChildPathFocus( sal_True ) )
+ pFrame->GetFrame()->GrabFocusOnComponent_Impl();
+ }
+*/
+ if ( SFX_KIND_ENUM == pSlot->GetKind() )
+ {
+ // bei Enum-Slots muss der Master mit dem Wert des Enums executet werden
+ const SfxSlot *pRealSlot = pShell->GetInterface()->GetRealSlot(pSlot);
+ const sal_uInt16 nSlotId = pRealSlot->GetSlotId();
+ aReq.SetSlot( nSlotId );
+ aReq.AppendItem( SfxAllEnumItem( rPool.GetWhich(nSlotId),
+ pSlot->GetValue() ) );
+ rDispatcher._Execute( *pShell, *pRealSlot, aReq, nCallMode | SFX_CALLMODE_RECORD );
+ }
+ else if ( SFX_KIND_ATTR == pSlot->GetKind() )
+ {
+ // bei Attr-Slots mu der Which-Wert gemapped werden
+ const sal_uInt16 nSlotId = pSlot->GetSlotId();
+ aReq.SetSlot( nSlotId );
+ if ( pSlot->IsMode(SFX_SLOT_TOGGLE) )
+ {
+ // an togglebare-Attribs (Bools) wird der Wert angeheangt
+ sal_uInt16 nWhich = pSlot->GetWhich(rPool);
+ SfxItemSet aSet(rPool, nWhich, nWhich, 0);
+ SfxStateFunc aFunc = pSlot->GetStateFnc();
+ pShell->CallState( aFunc, aSet );
+ const SfxPoolItem *pOldItem;
+ SfxItemState eState = aSet.GetItemState(nWhich, sal_True, &pOldItem);
+ if ( SFX_ITEM_SET == eState ||
+ ( SFX_ITEM_AVAILABLE == eState &&
+ SfxItemPool::IsWhich(nWhich) &&
+ ( pOldItem = &aSet.Get(nWhich) ) ) )
+ {
+ if ( pOldItem->ISA(SfxBoolItem) )
+ {
+ // wir koennen Bools toggeln
+ sal_Bool bOldValue = ((const SfxBoolItem *)pOldItem)->GetValue();
+ SfxBoolItem *pNewItem = (SfxBoolItem*) (pOldItem->Clone());
+ pNewItem->SetValue( !bOldValue );
+ aReq.AppendItem( *pNewItem );
+ delete pNewItem;
+ }
+ else if ( pOldItem->ISA(SfxEnumItemInterface) &&
+ ((SfxEnumItemInterface *)pOldItem)->HasBoolValue())
+ {
+ // und Enums mit Bool-Interface
+ SfxEnumItemInterface *pNewItem =
+ (SfxEnumItemInterface*) (pOldItem->Clone());
+ pNewItem->SetBoolValue(!((SfxEnumItemInterface *)pOldItem)->GetBoolValue());
+ aReq.AppendItem( *pNewItem );
+ delete pNewItem;
+ }
+ else
+ DBG_ERROR( "Toggle only for Enums and Bools allowed" );
+ }
+ else if ( SFX_ITEM_DONTCARE == eState )
+ {
+ // ein Status-Item per Factory erzeugen
+ SfxPoolItem *pNewItem = pSlot->GetType()->CreateItem();
+ DBG_ASSERT( pNewItem, "Toggle an Slot ohne ItemFactory" );
+ pNewItem->SetWhich( nWhich );
+
+ if ( pNewItem->ISA(SfxBoolItem) )
+ {
+ // wir koennen Bools toggeln
+ ((SfxBoolItem*)pNewItem)->SetValue( sal_True );
+ aReq.AppendItem( *pNewItem );
+ }
+ else if ( pNewItem->ISA(SfxEnumItemInterface) &&
+ ((SfxEnumItemInterface *)pNewItem)->HasBoolValue())
+ {
+ // und Enums mit Bool-Interface
+ ((SfxEnumItemInterface*)pNewItem)->SetBoolValue(sal_True);
+ aReq.AppendItem( *pNewItem );
+ }
+ else
+ DBG_ERROR( "Toggle only for Enums and Bools allowed" );
+ delete pNewItem;
+ }
+ else
+ DBG_ERROR( "suspicious Toggle-Slot" );
+ }
+ rDispatcher._Execute( *pShell, *pSlot, aReq, nCallMode | SFX_CALLMODE_RECORD );
+ }
+ else
+ rDispatcher._Execute( *pShell, *pSlot, aReq, nCallMode | SFX_CALLMODE_RECORD );
+
+// pImp->bInExecute = sal_False;
+ if ( bDeleteCache )
+ delete pCache;
+ return sal_True;
+}
+
+//--------------------------------------------------------------------
+
+void SfxBindings::UpdateSlotServer_Impl()
+
+/* [Beschreibung]
+
+ Interne Methode zum Updaten der Pointer auf die SlotServer
+ nach <SfxBindings::InvalidateAll(sal_Bool)>.
+*/
+
+{
+ DBG_PROFSTART(SfxBindingsUpdateServers);
+ DBG_MEMTEST();
+ DBG_ASSERT( pImp->pCaches != 0, "SfxBindings not initialized" );
+
+ // synchronisieren
+ pDispatcher->Flush();
+// pDispatcher->Update_Impl();
+
+ const sal_uInt16 nCount = pImp->pCaches->Count();
+ for(sal_uInt16 i = 0; i < nCount; ++i)
+ {
+ SfxStateCache *pCache = pImp->pCaches->GetObject(i);
+ pCache->GetSlotServer(*pDispatcher, pImp->xProv);
+ }
+ pImp->bMsgDirty = pImp->bAllMsgDirty = sal_False;
+
+ Broadcast( SfxSimpleHint(SFX_HINT_DOCCHANGED) );
+
+ DBG_PROFSTOP(SfxBindingsUpdateServers);
+}
+
+//--------------------------------------------------------------------
+
+#ifdef WNT
+int __cdecl CmpUS_Impl(const void *p1, const void *p2)
+#else
+int CmpUS_Impl(const void *p1, const void *p2)
+#endif
+
+/* [Beschreibung]
+
+ Interne Vergleichsfunktion fuer qsort.
+*/
+
+{
+ return *(sal_uInt16 *)p1 - *(sal_uInt16 *)p2;
+}
+
+//--------------------------------------------------------------------
+
+SfxItemSet* SfxBindings::CreateSet_Impl
+(
+ SfxStateCache*& pCache, // in: Status-Cache von nId
+ const SfxSlot*& pRealSlot, // out: RealSlot zu nId
+ const SfxSlotServer** pMsgServer, // out: Slot-Server zu nId
+ SfxFoundCacheArr_Impl& rFound // out: Liste der Caches der Siblings
+)
+
+/* [Beschreibung]
+
+ Diese interne Methode sucht zu pCache die Slot-Ids, die von derselben
+ Status-Methode bedient werden und ebenfalls gebunden und dirty sind.
+ Es wird ein SfxItemSet zusammengestellt, das die Slot-Ids (oder falls
+ vorhanden die mit dem Pool der Shell gemappten Which-Ids) enth"alt.
+ Die Caches dieser Slots werden in pFoundCaches zur"uckgeliefert.
+*/
+
+{
+ DBG_MEMTEST();
+ DBG_ASSERT( pImp->pCaches != 0, "SfxBindings not initialized" );
+
+ DBG_ASSERT( !pImp->bMsgDirty, "CreateSet_Impl mit dirty MessageServer" );
+
+ const SfxSlotServer* pMsgSvr = pCache->GetSlotServer(*pDispatcher, pImp->xProv);
+ if(!pMsgSvr || !pDispatcher)
+ return 0;
+
+ DBG_PROFSTART(SfxBindingsCreateSet);
+ pRealSlot = 0;
+ *pMsgServer = pMsgSvr;
+
+ sal_uInt16 nShellLevel = pMsgSvr->GetShellLevel();
+ SfxShell *pShell = pDispatcher->GetShell( nShellLevel );
+ if ( !pShell ) // seltener GPF beim Browsen durch Update aus Inet-Notify
+ return 0;
+
+ SfxItemPool &rPool = pShell->GetPool();
+
+ // hole die Status-Methode, von der pCache bedient wird
+ SfxStateFunc pFnc = 0;
+ const SfxInterface *pInterface = pShell->GetInterface();
+ if ( SFX_KIND_ENUM == pMsgSvr->GetSlot()->GetKind() )
+ {
+ pRealSlot = pInterface->GetRealSlot(pMsgSvr->GetSlot());
+ pCache = GetStateCache( pRealSlot->GetSlotId() );
+// DBG_ASSERT( pCache, "Kein Slotcache fuer den Masterslot gefunden!" );
+ }
+ else
+ pRealSlot = pMsgSvr->GetSlot();
+
+ //
+ // Achtung: pCache darf auch NULL sein !!!
+ //
+
+ pFnc = pRealSlot->GetStateFnc();
+
+ // der RealSlot ist immer drin
+ const SfxFoundCache_Impl *pFound = new SfxFoundCache_Impl(
+ pRealSlot->GetSlotId(), pRealSlot->GetWhich(rPool), pRealSlot, pCache );
+ rFound.Insert( pFound );
+
+ if ( !SfxMacroConfig::IsMacroSlot( pRealSlot->GetSlotId() ) )
+ {
+ pInterface->GetRealInterfaceForSlot( pRealSlot );
+ DBG_ASSERT (pInterface,"Slot in angegebener Shell nicht gefunden!");
+ }
+
+ // Durchsuche die Bindings nach den von derselben Funktion bedienten Slots.
+ // Daf"ur kommen nur Slots in Frage, die es im gefundenen Interface gibt.
+
+ // Die Position des Statecaches im StateCache-Array
+ sal_uInt16 nCachePos = pImp->nMsgPos;
+ const SfxSlot *pSibling = pRealSlot->GetNextSlot();
+
+ // Die Slots eines Interfaces sind im Kreis verkettet
+ while ( pSibling > pRealSlot )
+ {
+ SfxStateFunc pSiblingFnc=0;
+ SfxStateCache *pSiblingCache =
+ GetStateCache( pSibling->GetSlotId(), &nCachePos );
+
+ // Ist der Slot "uberhaupt gecached ?
+ if ( pSiblingCache )
+ {
+ const SfxSlotServer *pServ = pSiblingCache->GetSlotServer(*pDispatcher, pImp->xProv);
+ if ( pServ && pServ->GetShellLevel() == nShellLevel )
+ pSiblingFnc = pServ->GetSlot()->GetStateFnc();
+ }
+
+ // Mu\s der Slot "uberhaupt upgedatet werden ?
+ FASTBOOL bInsert = pSiblingCache && pSiblingCache->IsControllerDirty();
+
+ // Bugfix #26161#: Es reicht nicht, nach der selben Shell zu fragen !!
+ FASTBOOL bSameMethod = pSiblingCache && pFnc == pSiblingFnc;
+
+ // Wenn der Slot ein nicht-dirty MasterSlot ist, dann ist vielleicht
+ // einer seiner Slaves dirty ? Dann wird der Masterslot doch eingef"ugt.
+ if ( !bInsert && bSameMethod && pSibling->GetLinkedSlot() )
+ {
+ // auch Slave-Slots auf Binding pru"fen
+ const SfxSlot* pFirstSlave = pSibling->GetLinkedSlot();
+ for ( const SfxSlot *pSlaveSlot = pFirstSlave;
+ !bInsert;
+ pSlaveSlot = pSlaveSlot->GetNextSlot())
+ {
+ // Die Slaves zeigen auf ihren Master
+ DBG_ASSERT(pSlaveSlot->GetLinkedSlot() == pSibling,
+ "Falsche Master/Slave-Beziehung!");
+
+ sal_uInt16 nCurMsgPos = pImp->nMsgPos;
+ const SfxStateCache *pSlaveCache =
+ GetStateCache( pSlaveSlot->GetSlotId(), &nCurMsgPos );
+
+ // Ist der Slave-Slot gecached und dirty ?
+ bInsert = pSlaveCache && pSlaveCache->IsControllerDirty();
+
+ // Slaves sind untereinander im Kreis verkettet
+ if (pSlaveSlot->GetNextSlot() == pFirstSlave)
+ break;
+ }
+ }
+
+ if ( bInsert && bSameMethod )
+ {
+ const SfxFoundCache_Impl *pFound = new SfxFoundCache_Impl(
+ pSibling->GetSlotId(), pSibling->GetWhich(rPool),
+ pSibling, pSiblingCache );
+
+ rFound.Insert( pFound );
+ }
+
+ pSibling = pSibling->GetNextSlot();
+ }
+
+ // aus den Ranges ein Set erzeugen
+ sal_uInt16 *pRanges = new sal_uInt16[rFound.Count() * 2 + 1];
+ int j = 0;
+ int i = 0;
+ while ( i < rFound.Count() )
+ {
+ pRanges[j++] = rFound[i]->nWhichId;
+ // aufeinanderfolgende Zahlen
+ for ( ; i < rFound.Count()-1; ++i )
+ if ( rFound[i]->nWhichId+1 != rFound[i+1]->nWhichId )
+ break;
+ pRanges[j++] = rFound[i++]->nWhichId;
+ }
+ pRanges[j] = 0; // terminierende NULL
+ SfxItemSet *pSet = new SfxItemSet(rPool, pRanges);
+ delete pRanges;
+ DBG_PROFSTOP(SfxBindingsCreateSet);
+ return pSet;
+}
+
+//--------------------------------------------------------------------
+
+void SfxBindings::UpdateControllers_Impl
+(
+ const SfxInterface* pIF, // das diese Id momentan bedienende Interface
+ const SfxFoundCache_Impl* pFound, // Cache, Slot, Which etc.
+ const SfxPoolItem* pItem, // item to send to controller
+ SfxItemState eState // state of item
+)
+
+/* [Beschreibung]
+
+ Dieses ist eine Hilfsmethode f"ur NextJob_Impl mit der die SfxController,
+ welche auf nSlotId gebunden sind, upgedated werden. Dabei wird der
+ Wert aus dem SfxPoolItem unter dem Which-Wert nWhich aus dem Set rSet
+ genommen.
+
+ Falls zu rSlot Enum-Werte in der Slotmap eingetragen sind, und diese
+ gebunden sind, werden sie ebenfalls upgedated.
+*/
+
+{
+ DBG_ASSERT( !pFound->pSlot || SFX_KIND_ENUM != pFound->pSlot->GetKind(),
+ "direct update of enum slot isn't allowed" );
+ DBG_PROFSTART(SfxBindingsUpdateCtrl1);
+
+ SfxStateCache* pCache = pFound->pCache;
+ const SfxSlot* pSlot = pFound->pSlot;
+ DBG_ASSERT( !pCache || !pSlot || pCache->GetId() == pSlot->GetSlotId(), "SID mismatch" );
+
+ // insofern gebunden, die Controller f"uer den Slot selbst updaten
+ if ( pCache && pCache->IsControllerDirty() )
+ {
+ // Slot abgefangen?
+ sal_Bool bIntercepted = sal_False;
+ if ( pImp->pInterceptors )
+ {
+ for ( sal_uInt16 n = 0; n < pImp->pInterceptors->Count(); ++n )
+ {
+ SfxSlotInterceptor *pInterceptor = pImp->pInterceptors->GetObject(n);
+ SfxPoolItem *pState = 0;
+ sal_uInt16 nSID = pCache->GetId();
+ SfxItemState eState = pInterceptor->QueryState( nSID, pState );
+ if ( SFX_ITEM_UNKNOWN != eState )
+ {
+ bIntercepted = sal_True;
+ if ( eState == SFX_ITEM_AVAILABLE )
+ {
+ // Default
+ SfxVoidItem aVoid(nSID);
+ pCache->SetState( eState, &aVoid );
+ }
+ else
+ {
+ // Gesetzt
+ pCache->SetState(
+ eState == SFX_ITEM_SET ? SFX_ITEM_AVAILABLE : eState, pState );
+ delete pState;
+ }
+
+ return;
+ }
+ }
+ }
+
+ if ( !bIntercepted )
+ {
+ if ( SFX_ITEM_DONTCARE == eState )
+ {
+ // uneindeuting
+ pCache->SetState( SFX_ITEM_DONTCARE, (SfxPoolItem *)-1 );
+ }
+ else if ( SFX_ITEM_DEFAULT == eState &&
+ pFound->nWhichId > SFX_WHICH_MAX )
+ {
+ // kein Status oder Default aber ohne Pool
+ SfxVoidItem aVoid(0);
+ pCache->SetState( SFX_ITEM_UNKNOWN, &aVoid );
+ }
+ else if ( SFX_ITEM_DISABLED == eState )
+ pCache->SetState(SFX_ITEM_DISABLED, 0);
+ else
+ pCache->SetState(SFX_ITEM_AVAILABLE, pItem);
+ }
+ }
+
+ DBG_PROFSTOP(SfxBindingsUpdateCtrl1);
+
+ // insofern vorhanden und gebunden, die Controller f"uer Slave-Slots
+ // (Enum-Werte) des Slots updaten
+ DBG_PROFSTART(SfxBindingsUpdateCtrl2);
+ DBG_ASSERT( !pSlot || 0 == pSlot->GetLinkedSlot() || !pItem ||
+ pItem->ISA(SfxEnumItemInterface),
+ "master slot with non-enum-type found" );
+ const SfxSlot *pFirstSlave = pSlot ? pSlot->GetLinkedSlot() : 0;
+ if ( pIF && pFirstSlave)
+ {
+ // Items auf EnumItem casten
+ const SfxEnumItemInterface *pEnumItem =
+ PTR_CAST(SfxEnumItemInterface,pItem);
+ if ( eState == SFX_ITEM_AVAILABLE && !pEnumItem )
+ eState = SFX_ITEM_DONTCARE;
+ else
+ eState = SfxControllerItem::GetItemState( pEnumItem );
+
+ // "uber alle Slaves-Slots iterieren
+ for ( const SfxSlot *pSlave = pFirstSlave; pSlave;
+ pSlave = pSlave->GetNextSlot() )
+ {
+ DBG_ASSERT(pSlave, "Falsche SlaveSlot-Verkettung!");
+ DBG_ASSERT(SFX_KIND_ENUM == pSlave->GetKind(),"non enum slaves aren't allowed");
+ DBG_ASSERT(pSlave->GetMasterSlotId() == pSlot->GetSlotId(),"falscher MasterSlot!");
+
+ // ist die Funktion gebunden?
+ SfxStateCache *pEnumCache = GetStateCache( pSlave->GetSlotId() );
+ if ( pEnumCache )
+ {
+ pEnumCache->Invalidate(sal_False);
+
+ HACK(CONTROL/SELECT Kram)
+ if ( eState == SFX_ITEM_DONTCARE && pFound->nWhichId == 10144 )
+ {
+ SfxVoidItem aVoid(0);
+ pEnumCache->SetState( SFX_ITEM_UNKNOWN, &aVoid );
+
+ if (pSlave->GetNextSlot() == pFirstSlave)
+ break;
+
+ continue;
+ }
+
+ if ( SFX_ITEM_DISABLED == eState
+#ifdef OV_hat_das_SvxChooseControlItem_angepasst
+ || USHRT_MAX == pEnumItem->GetPosByValue(pEnumCache->GetValue())
+#endif
+ )
+ {
+ // disabled
+ pEnumCache->SetState(SFX_ITEM_DISABLED, 0);
+ }
+ else if ( SFX_ITEM_AVAILABLE == eState )
+ {
+ // enum-Wert ermitteln
+ sal_uInt16 nValue = pEnumItem->GetEnumValue();
+ SfxBoolItem aBool( pFound->nWhichId, pSlave->GetValue() == nValue );
+ pEnumCache->SetState(SFX_ITEM_AVAILABLE, &aBool);
+ }
+ else
+ {
+ // uneindeuting
+ pEnumCache->SetState( SFX_ITEM_DONTCARE, (SfxPoolItem *)-1 );
+ }
+ }
+
+ if (pSlave->GetNextSlot() == pFirstSlave)
+ break;
+ }
+ }
+
+ DBG_PROFSTOP(SfxBindingsUpdateCtrl2);
+}
+
+
+//--------------------------------------------------------------------
+
+IMPL_LINK( SfxBindings, NextJob_Impl, Timer *, pTimer )
+
+/* [Beschreibung]
+
+ Die SfxController werden "uber einen Timer updated. Dieses ist der
+ dazugeh"orige interne TimeOut-Handler.
+ */
+
+{
+ DBG_MEMTEST();
+ DBG_ASSERT( pImp->pCaches != 0, "SfxBindings not initialized" );
+
+ DBG_PROFSTART(SfxBindingsNextJob_Impl0);
+ SfxApplication *pSfxApp = SFX_APP();
+
+ if( pDispatcher )
+ pDispatcher->Update_Impl();
+
+ // modifying the SfxObjectInterface-stack without SfxBindings => nothing to do
+ SfxViewFrame* pFrame = pDispatcher->GetFrame();
+ if ( pFrame && pFrame->GetObjectShell()->IsInModalMode() || pSfxApp->IsDowning() || !pImp->pCaches->Count() )
+ {
+ DBG_PROFSTOP(SfxBindingsNextJob_Impl0);
+ return sal_True;
+ }
+ if ( !pDispatcher || !pDispatcher->IsFlushed() )
+ {
+ DBG_PROFSTOP(SfxBindingsNextJob_Impl0);
+ return sal_True;
+ }
+
+ // gfs. alle Server aktualisieren / geschieht in eigener Zeitscheibe
+ if ( pImp->bMsgDirty )
+ {
+ UpdateSlotServer_Impl();
+ DBG_PROFSTOP(SfxBindingsNextJob_Impl0);
+ return sal_False;
+ }
+
+ DBG_PROFSTOP(SfxBindingsNextJob_Impl0);
+ DBG_PROFSTART(SfxBindingsNextJob_Impl);
+ pImp->bAllDirty = sal_False;
+ pImp->aTimer.SetTimeout(TIMEOUT_UPDATING);
+
+ // at least 10 loops and further if more jobs are available but no input
+ FASTBOOL bPreEmptive = pTimer && !pSfxApp->Get_Impl()->nInReschedule;
+ sal_uInt16 nLoops = 10;
+ pImp->bInNextJob = sal_True;
+ const sal_uInt16 nCount = pImp->pCaches->Count();
+ while ( pImp->nMsgPos < nCount )
+ {
+ // iterate through the bound functions
+ sal_Bool bJobDone = sal_False;
+ while ( !bJobDone )
+ {
+ SfxStateCache* pCache = (*pImp->pCaches)[pImp->nMsgPos];
+ DBG_ASSERT( pCache, "invalid SfxStateCache-position in job queue" );
+ sal_Bool bWasDirty = pCache->IsControllerDirty();
+ if ( bWasDirty )
+ {
+/*
+ sal_Bool bSkip = sal_False;
+ if ( pImp->bFirstRound )
+ {
+ // Falls beim Update eine Shell vorgezogen werden soll,
+ // kommt in einer ersten Update-Runde nur diese dran
+ const SfxSlotServer *pMsgServer =
+ pCache->GetSlotServer(*pDispatcher, pImp->xProv);
+ if ( pMsgServer &&
+ pMsgServer->GetShellLevel() != pImp->nFirstShell )
+ bSkip = sal_True;
+ }
+
+ if ( !bSkip )
+ {
+*/
+ Update_Impl( pCache );
+ DBG_ASSERT( nCount == pImp->pCaches->Count(),
+ "Reschedule in StateChanged => buff" );
+// }
+ }
+
+ // skip to next function binding
+ ++pImp->nMsgPos;
+
+ // keep job if it is not completed, but any input is available
+ bJobDone = pImp->nMsgPos >= nCount;
+ if ( bJobDone && pImp->bFirstRound )
+ {
+ // Update der bevorzugten Shell ist gelaufen, nun d"urfen
+ // auch die anderen
+ bJobDone = sal_False;
+ pImp->bFirstRound = sal_False;
+ pImp->nMsgPos = 0;
+ }
+
+ if ( bWasDirty && !bJobDone && bPreEmptive && (--nLoops == 0) )
+ {
+ DBG_PROFSTOP(SfxBindingsNextJob_Impl);
+ pImp->bInNextJob = sal_False;
+ return sal_False;
+ }
+ }
+ }
+
+ // volatiles wieder von vorne starten
+ pImp->nMsgPos = 0;
+ pImp->aTimer.SetTimeout(TIMEOUT_IDLE);
+ for ( sal_uInt16 n = 0; n < nCount; ++n )
+ {
+ SfxStateCache* pCache = (*pImp->pCaches)[n];
+ const SfxSlotServer *pSlotServer = pCache->GetSlotServer(*pDispatcher, pImp->xProv);
+ if ( pSlotServer &&
+ pSlotServer->GetSlot()->IsMode(SFX_SLOT_VOLATILE) )
+ pCache->Invalidate(sal_False);
+ }
+
+ // Update-Runde ist beendet
+ pImp->bInNextJob = sal_False;
+ Broadcast(SfxSimpleHint(SFX_HINT_UPDATEDONE));
+ DBG_PROFSTOP(SfxBindingsNextJob_Impl);
+ return sal_True;
+}
+
+//--------------------------------------------------------------------
+
+sal_uInt16 SfxBindings::EnterRegistrations(char *pFile, int nLine)
+
+/* [Beschreibung]
+
+ Die An- oder Abmeldung von <SfxControllerItem> Instanzen mu"s in
+ EnterRegistrations() und LeaveRegistrations() geklammert werden.
+ W"ahrend dieser Zeit erfolgen keine Udates der <SfxContollerItem>
+ Instanzen (weder der alten noch der neu angemeldeten).
+
+ [Parameter]
+
+ pFile, nLine Dateiname und Zeilennummer der rufenden
+ Methode (nur Debug)
+
+ [R"uckgabewert]
+
+ sal_uInt16 Level der Registrierung. Dieser kann in
+ <SfxBindings::LeaveRegistrations(sal_uInt16)> als
+ Parameter angegeben werden, um die Paarigkeit
+ der EnterRegistrations() und LeaveRegistrations()
+ zu pr"ufen.
+
+
+ [Querverweise]
+ <SfxBindings::IsInRegistrations()>
+ <SfxBindings::Register(SfxControllerItem&)>
+ <SfxBindings::Release(SfxControllerItem&)>
+ <SfxBindings::LeaveRegistrations()>
+*/
+
+{
+ DBG_MEMTEST();
+#ifdef DBG_UTIL
+ ByteString aMsg;
+ aMsg.Fill( Min(nRegLevel, sal_uInt16(8) ) );
+ aMsg += "this = ";
+ aMsg += ByteString::CreateFromInt32((long)this);
+ aMsg += " Level = ";
+ aMsg += ByteString::CreateFromInt32(nRegLevel);
+ aMsg += " SfxBindings::EnterRegistrations ";
+ if(pFile) {
+ aMsg += "File: ";
+ aMsg += pFile;
+ aMsg += " Line: ";
+ aMsg += ByteString::CreateFromInt32(nLine);
+ }
+ DbgTrace( aMsg.GetBuffer() );
+#endif
+
+ // Wenn Bindings gelockt werden, auch SubBindings locken
+ if ( pImp->pSubBindings )
+ {
+ pImp->pSubBindings->ENTERREGISTRATIONS();
+
+ // Dieses EnterRegistrations ist f"ur die SubBindings kein "echtes"
+ pImp->pSubBindings->pImp->nOwnRegLevel--;
+
+ // Bindings synchronisieren
+ pImp->pSubBindings->nRegLevel = nRegLevel + pImp->pSubBindings->pImp->nOwnRegLevel + 1;
+ }
+
+ pImp->nOwnRegLevel++;
+
+ // check if this is the outer most level
+ if ( ++nRegLevel == 1 )
+ {
+ // stop background-processing
+ pImp->aTimer.Stop();
+
+ // flush the cache
+ pImp->nCachedFunc1 = 0;
+ pImp->nCachedFunc2 = 0;
+
+ // merken, ob ganze Caches verschwunden sind
+ pImp->bCtrlReleased = sal_False;
+ }
+
+ return nRegLevel;
+}
+//--------------------------------------------------------------------
+
+void SfxBindings::LeaveRegistrations( sal_uInt16 nLevel, char *pFile, int nLine )
+
+/* [Beschreibung]
+
+ Die An- oder Abmeldung von <SfxControllerItem> Instanzen mu"s in
+ EnterRegistrations() und LeaveRegistrations() geklammert werden.
+ W"ahrend dieser Zeit erfolgen keine Udates der <SfxContollerItem>
+ Instanzen (weder der alten noch der neu angemeldeten).
+
+
+ [Parameter]
+
+ sal_uInt16 nLevel == USRT_MAX
+ keine Paarigkeits-Pr"ufung f"ur diese Klammerung
+
+
+ pFile, nLine Dateiname und Zeilennummer der rufenden
+ Methode (nur Debug)
+
+ < USHRT_MAX
+ R"uckgabewert des zugeh"origen EnterRegistrations()
+ zum pr"ufen der Paarigkeit.
+
+
+ [Querverweise]
+ <SfxBindings::IsInRegistrations()>
+ <SfxBindings::Register(SfxControllerItem&)>
+ <SfxBindings::Release(SfxControllerItem&)>
+ <SfxBindings::EnterRegistrations()>
+*/
+
+{
+ DBG_MEMTEST();
+ DBG_ASSERT( nRegLevel, "Leave without Enter" );
+ DBG_ASSERT( nLevel == USHRT_MAX || nLevel == nRegLevel, "wrong Leave" );
+
+ // Nur wenn die SubBindings noch von den SuperBindings gelockt sind, diesen Lock entfernen
+ // ( d.h. wenn es mehr Locks als "echte" Locks dort gibt )
+ if ( pImp->pSubBindings && pImp->pSubBindings->nRegLevel > pImp->pSubBindings->pImp->nOwnRegLevel )
+ {
+ // Bindings synchronisieren
+ pImp->pSubBindings->nRegLevel = nRegLevel + pImp->pSubBindings->pImp->nOwnRegLevel;
+
+ // Dieses LeaveRegistrations ist f"ur die SubBindings kein "echtes"
+ pImp->pSubBindings->pImp->nOwnRegLevel++;
+ pImp->pSubBindings->LEAVEREGISTRATIONS();
+ }
+
+ pImp->nOwnRegLevel--;
+
+ // check if this is the outer most level
+ if ( --nRegLevel == 0 && !SFX_APP()->IsDowning() )
+ {
+#ifndef slow
+ SfxViewFrame* pFrame = pDispatcher->GetFrame();
+
+ // ggf unbenutzte Caches entfernen bzw. PlugInInfo aufbereiten
+ if ( pImp->bCtrlReleased )
+ {
+ for ( sal_uInt16 nCache = pImp->pCaches->Count(); nCache > 0; --nCache )
+ {
+ // Cache via ::com::sun::star::sdbcx::Index besorgen
+ SfxStateCache *pCache = pImp->pCaches->GetObject(nCache-1);
+
+ // kein Controller mehr interessiert
+ if ( pCache->GetItemLink() == 0 )
+ {
+ // Cache entfernen
+ delete (*pImp->pCaches)[nCache-1];
+ pImp->pCaches->Remove(nCache-1, 1);
+ }
+ else
+ {
+ // neue Controller mit den alten Items benachrichtigen
+ //!pCache->SetCachedState();
+ }
+ }
+ }
+#endif
+ // restart background-processing
+ pImp->nMsgPos = 0;
+ if ( !pFrame || !pFrame->GetObjectShell() )
+ return;
+ if ( pImp->pCaches && pImp->pCaches->Count() )
+ {
+ pImp->aTimer.SetTimeout(TIMEOUT_FIRST);
+ pImp->aTimer.Start();
+// pImp->bFirstRound = sal_True;
+ }
+ }
+
+#ifdef DBG_UTIL
+ ByteString aMsg;
+ aMsg.Fill( Min(nRegLevel, sal_uInt16(8)) );
+ aMsg += "this = ";
+ aMsg += ByteString::CreateFromInt32((long)this);
+ aMsg += " Level = ";
+ aMsg += ByteString::CreateFromInt32(nRegLevel);
+ aMsg += " SfxBindings::LeaveRegistrations ";
+ if(pFile) {
+ aMsg += "File: ";
+ aMsg += pFile;
+ aMsg += " Line: ";
+ aMsg += ByteString::CreateFromInt32(nLine);
+ }
+ DbgTrace( aMsg.GetBuffer() );
+#endif
+}
+
+//--------------------------------------------------------------------
+
+const SfxSlot* SfxBindings::GetSlot(sal_uInt16 nSlotId)
+
+/* [Beschreibung]
+
+ Diese Methode liefert einen Pointer auf den zur Zeit gecacheten
+ SfxSlot f"ur die angegebene Slot-Id.
+
+
+ [R"uckgabewert]
+
+ const <SfxSlot>* 0
+ Falls die Slot-Id nicht gebunden ist oder
+ ein solcher Slot momentan in keiner aktiven
+ <SfxShell> vorhanden ist.
+
+ != 0
+ Falls die Slot-Id gebunden ist und ein solcher
+ Slot momentan in einer aktiven <SfxShell>
+ vorhanden ist.
+*/
+
+{
+ DBG_MEMTEST();
+ DBG_ASSERT( pImp->pCaches != 0, "SfxBindings not initialized" );
+
+ // syncronisieren
+ pDispatcher->Flush();
+ if ( pImp->bMsgDirty )
+ UpdateSlotServer_Impl();
+
+ // get the cache for the specified function; return if not bound
+ SfxStateCache* pCache = GetStateCache(nSlotId);
+ return pCache && pCache->GetSlotServer(*pDispatcher, pImp->xProv)?
+ pCache->GetSlotServer(*pDispatcher, pImp->xProv)->GetSlot(): 0;
+}
+
+//--------------------------------------------------------------------
+
+void SfxBindings::SetDispatcher( SfxDispatcher *pDisp )
+
+/* [Beschreibung]
+
+ Setzt den zur Zeit von dieser SfxBindings Instanz zu verwendenden
+ Dispatcher um.
+
+ Falls sich der Dispatcher dadurch "andert, wird intern
+ <SFxBindings::InvalidateAll(sal_Bool)> mit sal_True gerufen, also jegliche
+ gecachete Information der Bindings weggeworfen.
+*/
+
+{
+ SfxDispatcher *pOldDispat = pDispatcher;
+ if ( pDisp != pDispatcher )
+ {
+ if ( pOldDispat )
+ {
+ SfxBindings* pBind = pOldDispat->GetBindings();
+ while ( pBind )
+ {
+ if ( pBind->pImp->pSubBindings == this && pBind->pDispatcher != pDisp )
+ pBind->SetSubBindings_Impl( NULL );
+ pBind = pBind->pImp->pSubBindings;
+ }
+ }
+
+ pDispatcher = pDisp;
+ InvalidateAll( sal_True );
+ InvalidateUnoControllers_Impl();
+ if ( pDispatcher && !pOldDispat )
+ {
+ if ( pImp->pSubBindings && pImp->pSubBindings->pDispatcher != pOldDispat )
+ {
+ DBG_ERROR( "SubBindings vor Aktivieren schon gesetzt!" );
+ pImp->pSubBindings->ENTERREGISTRATIONS();
+ }
+ LEAVEREGISTRATIONS();
+ }
+ else if( !pDispatcher )
+ {
+ ENTERREGISTRATIONS();
+ if ( pImp->pSubBindings && pImp->pSubBindings->pDispatcher != pOldDispat )
+ {
+ DBG_ERROR( "SubBindings im Deaktivieren immer noch gesetzt!" );
+ pImp->pSubBindings->LEAVEREGISTRATIONS();
+ }
+ }
+
+ Broadcast( SfxSimpleHint( SFX_HINT_DATACHANGED ) );
+
+ if ( pDisp )
+ {
+ SfxBindings* pBind = pDisp->GetBindings();
+ while ( pBind && pBind != this )
+ {
+ if ( !pBind->pImp->pSubBindings )
+ {
+ pBind->SetSubBindings_Impl( this );
+ break;
+ }
+
+ pBind = pBind->pImp->pSubBindings;
+ }
+ }
+ }
+}
+
+//--------------------------------------------------------------------
+
+void SfxBindings::ClearCache_Impl( sal_uInt16 nSlotId )
+
+// interne Methode zum forwarden dieses Methodenaufrufs
+
+{
+ GetStateCache(nSlotId)->ClearCache();
+}
+
+//--------------------------------------------------------------------
+
+// interne Methode zum Ansto\sen des Statusupdates
+
+void SfxBindings::StartUpdate_Impl( sal_Bool bComplete )
+{
+ if ( pImp->pSubBindings )
+ pImp->pSubBindings->StartUpdate_Impl( bComplete );
+
+ if ( !bComplete )
+ // Update darf unterbrochen werden
+ NextJob_Impl(&pImp->aTimer);
+ else
+ // alle Slots am St"uck updaten
+ NextJob_Impl(0);
+}
+
+//--------------------------------------------------------------------
+
+#if SUPD<359
+SfxSlotInterceptor::SfxSlotInterceptor( SfxBindings *pBindings )
+: _pImp( new SfxSlotInterceptor_Impl )
+{
+ DBG_ASSERT( pBindings, "SfxBindings: 0-Pointer not allowed" );
+ _pImp->_pBindings = pBindings;
+ _pImp->_bIsActive = sal_False;
+
+ // ggf. Interceptor-Liste on-demand erzeugen
+ if ( !_pImp->_pBindings->pImp->pInterceptors )
+ _pImp->_pBindings->pImp->pInterceptors = new SfxInterceptorArr_Impl;
+
+ Activate(sal_True);
+}
+#endif
+
+SfxSlotInterceptor::SfxSlotInterceptor( SfxBindings *pBindings, sal_Bool bActivate )
+
+/* [Bindings]
+
+ Registriert diese Instanz an den angegebenen <SfxBindings>.
+ Ab jetzt wird vor jedem Ausf"uhren eines Slots "uber diese
+ Bindings die virtuelle Methode <SfxSlotInterceptor::Execute()>
+ gerufen und vor jedem Erfragen eines Status die virtuelle
+ Methode <SfxSlotInterceptor::QueryState()>.
+*/
+
+: _pImp( new SfxSlotInterceptor_Impl )
+{
+ _pImp->_pBindings = pBindings;
+ _pImp->_bIsActive = sal_False;
+
+ Activate( bActivate );
+}
+
+//--------------------------------------------------------------------
+
+SfxSlotInterceptor::~SfxSlotInterceptor()
+
+/* [Bindings]
+
+ Beendet das Abfangen der Execute- und Status-Aufrufe an den
+ im Ctor angegebenen Bindings.
+*/
+
+{
+ Activate(sal_False);
+ delete _pImp;
+}
+
+void SfxSlotInterceptor::SetBindings( SfxBindings* pBindings )
+{
+ DBG_ASSERT( !_pImp->_pBindings, "SetBindings bei gesetzten Bindings" );
+ _pImp->_pBindings = pBindings;
+}
+
+SfxBindings* SfxSlotInterceptor::GetBindings() const
+{
+ return _pImp->_pBindings;
+}
+
+
+//--------------------------------------------------------------------
+
+void SfxSlotInterceptor::Activate( sal_Bool bActivate )
+{
+
+ if ( _pImp->_bIsActive == bActivate )
+ return;
+
+ if ( bActivate)
+ _pImp->_pBindings->pImp->InsertSlotInterceptor( this );
+ else
+ _pImp->_pBindings->pImp->RemoveSlotInterceptor( this );
+
+ _pImp->_bIsActive = bActivate;
+ _pImp->_pBindings->InvalidateAll( sal_False );
+}
+
+//-------------------------------------------------------------------------
+
+sal_Bool SfxSlotInterceptor::IsActive() const
+{
+ return _pImp->_bIsActive;
+}
+
+//-------------------------------------------------------------------------
+
+#if SUPD < 355
+sal_Bool SfxSlotInterceptor::Execute( sal_uInt16 nSID )
+#else
+sal_Bool SfxSlotInterceptor::Execute( sal_uInt16 nSID, SfxPoolItem **ppArgs )
+#endif
+
+
+/* [Beschreibung]
+
+ Diese pur-virtuelle Methode mu\s von Subklassen "uberladen werden.
+ Sie wird gerufen, um 'nSID' auszuf"uhren.
+
+ Wurde die SID nicht bearbeitet und soll an den Dispatcher weitergeleitet
+ werden, so mu\s sal_False zur"uckgegeben werden.
+
+ [Beispiel]
+
+ sal_Bool X::Execute( sal_uInt16 nSID )
+ {
+ switch ( nSID )
+ {
+ case SID_A:
+ ...
+ return sal_True;
+
+ case SID_B:
+ ...
+ return sal_True;
+
+ case SID_C:
+ ...
+ return sal_True;
+ }
+
+ return sal_False;
+ }
+*/
+
+{
+ return sal_False;
+}
+
+//-------------------------------------------------------------------------
+
+SfxItemState SfxSlotInterceptor::QueryState
+(
+ sal_uInt16 nSID, // IN: Slot-Id, deren Status erfragt wird
+ SfxPoolItem*& rpState // OUT: Status-Wert (Eigent"umer"ubergang)
+)
+
+/* [Beschreibung]
+
+ Diese pur-virtuelle Methode mu\s von Subklassen "uberladen werden.
+ Sie wird gerufen, um den Status f"ur 'nSID' zu erfragen. 'rpState'
+ darf nur dann ein mit 'new' anzulegendes <SfxPoolItem> zugewiesen
+ werden, wenn <SFX_ITEM_SET> zur"uckgeliefert wird.
+
+ Wurde die SID nicht bearbeitet und soll an den Dispatcher weitergeleitet
+ werden, so mu\s <SFX_ITEM_UNKNOWN> zur"uckgegeben werden (Basisklasse
+ rufen!).
+
+ [Beispiel]
+
+ SfxItemState X::QueryState( sal_uInt16 nSID, SfxPoolItem*& rpState )
+ {
+ switch ( nSID )
+ {
+ case SID_A:
+ // Status-Item verschicken => enabled
+ rpState = new SfxStringItem( nSID, ... );
+ return SFX_ITEM_SET;
+
+ case SID_B:
+ // kein Status aber trotzdem enabled
+ return SFX_ITEM_AVAILABLE;
+
+ case SID_C:
+ // disabled
+ return SFX_ITEM_DISABLED;
+
+ case SID_D:
+ // mehrdeutig, enabled
+ return SFX_ITEM_DONTCARE;
+ }
+
+ return SfxSlotInterceptor::QueryState( nSID, rpState );
+ }
+*/
+
+{
+ return SFX_ITEM_UNKNOWN;
+}
+
+//-------------------------------------------------------------------------
+
+SfxItemState SfxBindings::QueryState( sal_uInt16 nSlot, SfxPoolItem* &rpState )
+/* [Beschreibung]
+
+ Wird gerufen, um den Status f"ur 'nSlot' zu erfragen. Wenn der return
+ value SFX_ITEM_SET ist, wird ein SfxPoolItem zur"uckgegeben, indem der
+ rpState entsprechend gesetzt wird. Es findet dabei ein Eigent"umer"ubergang
+ statt, d.h. die aufrufende Methode mu\s das Item l"oschen.
+
+ Anmerkung: diese Methode ist sehr teuer und sollte nur gerufen werden,
+ wenn kein Controller f"ur das Erfragen des Status angelegt werden kann oder
+ der Status unbedingt sofort geliefert werden mu\s.
+*/
+
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > xDisp;
+ SfxStateCache *pCache = GetStateCache( nSlot );
+ if ( pCache )
+ xDisp = pCache->GetDispatch();
+ if ( xDisp.is() || !pCache && pImp->xProv.is() )
+ {
+//(mba)/compview
+ const SfxSlot* pSlot = 0;//SfxComponentViewShell::GetUnoSlot( nSlot );
+ ::com::sun::star::util::URL aURL;
+ if ( pSlot )
+ {
+ String aCmd( DEFINE_CONST_UNICODE(".uno:"));
+ aCmd += String::CreateFromAscii(pSlot->GetUnoName());
+ aURL.Complete = aCmd;
+ }
+ else
+ {
+ String aCmd( DEFINE_CONST_UNICODE("slot:") );
+ aCmd += String::CreateFromInt32(nSlot);
+ aURL.Complete = aCmd;
+ }
+
+ Reference < XURLTransformer > xTrans( ::utl::getProcessServiceFactory()->createInstance( rtl::OUString::createFromAscii("com.sun.star.util.URLTransformer" )), UNO_QUERY );
+ xTrans->parseStrict( aURL );
+ if ( !xDisp.is() )
+ xDisp = pImp->xProv->queryDispatch( aURL, ::rtl::OUString(), 0 );
+
+ if ( xDisp.is() )
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XUnoTunnel > xTunnel( xDisp, ::com::sun::star::uno::UNO_QUERY );
+ SfxOfficeDispatch* pDisp = NULL;
+ if ( xTunnel.is() )
+ {
+ sal_Int64 nImplementation = xTunnel->getSomething(SfxOfficeDispatch::impl_getStaticIdentifier());
+ pDisp = (SfxOfficeDispatch*)(nImplementation);
+ }
+
+ if ( !pDisp || pDisp->IsInterceptDispatch() )
+ {
+ SfxItemState eState = SFX_ITEM_SET;
+ SfxPoolItem *pItem=NULL;
+ BindDispatch_Impl *pBind = new BindDispatch_Impl( xDisp, aURL, NULL );
+ pBind->acquire();
+ xDisp->addStatusListener( pBind, aURL );
+ if ( !pBind->GetStatus().IsEnabled )
+ eState = SFX_ITEM_DISABLED;
+ else
+ {
+ ::com::sun::star::uno::Any aAny = pBind->GetStatus().State;
+ ::com::sun::star::uno::Type pType = aAny.getValueType();
+
+ if ( pType == ::getBooleanCppuType() )
+ {
+ sal_Bool bTemp ;
+ aAny >>= bTemp ;
+ pItem = new SfxBoolItem( nSlot, bTemp );
+ }
+ else if ( pType == ::getCppuType((const sal_uInt16*)0) )
+ {
+ sal_uInt16 nTemp ;
+ aAny >>= nTemp ;
+ pItem = new SfxUInt16Item( nSlot, nTemp );
+ }
+ else if ( pType == ::getCppuType((const sal_uInt32*)0) )
+ {
+ sal_uInt32 nTemp ;
+ aAny >>= nTemp ;
+ pItem = new SfxUInt32Item( nSlot, nTemp );
+ }
+ else if ( pType == ::getCppuType((const ::rtl::OUString*)0) )
+ {
+ ::rtl::OUString sTemp ;
+ aAny >>= sTemp ;
+ pItem = new SfxStringItem( nSlot, sTemp );
+ }
+ else
+ pItem = new SfxVoidItem( nSlot );
+ }
+
+ pBind->Release();
+ rpState = pItem;
+ return eState;
+ }
+ }
+ }
+
+ SfxSlotServer aServer;
+/*
+ if ( pDispatcher->_TryIntercept_Impl( nSlot, aServer, sal_False ) )
+ {
+ SfxShell* pShell = pDispatcher->GetShell( aServer.GetShellLevel() );
+ const SfxPoolItem *pItem = pShell->GetSlotState(nSlot);
+ if ( !pItem )
+ return SFX_ITEM_DISABLED;
+ else
+ {
+ rpState = pItem->Clone();
+ return SFX_ITEM_SET;
+ }
+ }
+*/
+ if ( pImp->pInterceptors )
+ {
+ // Zuerst die Interceptoren testen
+ for ( sal_uInt16 n = 0; n < pImp->pInterceptors->Count(); ++n )
+ {
+ SfxSlotInterceptor *pInterceptor = pImp->pInterceptors->GetObject(n);
+ SfxItemState eState = pInterceptor->QueryState( nSlot, rpState );
+ if ( SFX_ITEM_UNKNOWN != eState )
+ return eState;
+ }
+ }
+
+ // Dann am Dispatcher testen; da die von dort zur"uckgegebenen Items immer
+ // DELETE_ON_IDLE sind, mu\s eine Kopie davon gezogen werden, um einen
+ // Eigent"umer"ubergang zu erm"oglichen
+ const SfxPoolItem *pItem = NULL;
+ SfxItemState eState = pDispatcher->QueryState( nSlot, pItem );
+ if ( eState == SFX_ITEM_SET )
+ {
+ DBG_ASSERT( pItem, "SFX_ITEM_SET aber kein Item!" );
+ if ( pItem )
+ rpState = pItem->Clone();
+ }
+ else if ( eState == SFX_ITEM_AVAILABLE && pItem )
+ {
+ rpState = pItem->Clone();
+ }
+
+ return eState;
+}
+
+#if 0
+sal_Bool SfxBindings::IsInExecute_Impl() const
+{
+ return pImp->bInExecute;
+}
+#endif
+
+void SfxBindings::SetSubBindings_Impl( SfxBindings *pSub )
+{
+ if ( pImp->pSubBindings )
+ {
+ if ( pImp->pInterceptors )
+ {
+ for ( sal_uInt16 n = 0; n < pImp->pInterceptors->Count(); ++n )
+ {
+ SfxSlotInterceptor *pInter = pImp->pInterceptors->GetObject(n);
+ pImp->pSubBindings->pImp->RemoveSlotInterceptor( pInter );
+ }
+ }
+
+ pImp->pSubBindings->SetDispatchProvider_Impl( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > () );
+ pImp->pSubBindings->pImp->pSuperBindings = NULL;
+ }
+
+ pImp->pSubBindings = pSub;
+
+ if ( pSub )
+ {
+ pImp->pSubBindings->SetDispatchProvider_Impl( pImp->xProv );
+ pSub->pImp->pSuperBindings = this;
+
+ if ( pImp->pInterceptors )
+ {
+ for ( sal_uInt16 n = 0; n < pImp->pInterceptors->Count(); ++n )
+ {
+ SfxSlotInterceptor *pInter = pImp->pInterceptors->GetObject(n);
+ pImp->pSubBindings->pImp->InsertSlotInterceptor( pInter );
+ }
+ }
+ }
+}
+
+SfxBindings* SfxBindings::GetSubBindings_Impl( sal_Bool bTop ) const
+{
+ SfxBindings *pRet = pImp->pSubBindings;
+ if ( bTop )
+ {
+ while ( pRet->pImp->pSubBindings )
+ pRet = pRet->pImp->pSubBindings;
+ }
+
+ return pRet;
+}
+
+void SfxBindings::SetWorkWindow_Impl( SfxWorkWindow* pWork )
+{
+ pImp->pWorkWin = pWork;
+}
+
+SfxWorkWindow* SfxBindings::GetWorkWindow_Impl() const
+{
+ return pImp->pWorkWin;
+}
+
+void SfxBindings::RegisterUnoController_Impl( SfxUnoControllerItem* pControl )
+{
+ if ( !pImp->pUnoCtrlArr )
+ pImp->pUnoCtrlArr = new SfxUnoControllerArr_Impl;
+ pImp->pUnoCtrlArr->Insert( pControl, pImp->pUnoCtrlArr->Count() );
+}
+
+void SfxBindings::ReleaseUnoController_Impl( SfxUnoControllerItem* pControl )
+{
+ if ( pImp->pUnoCtrlArr )
+ {
+ sal_uInt16 nPos = pImp->pUnoCtrlArr->GetPos( pControl );
+ if ( nPos != 0xFFFF )
+ {
+ pImp->pUnoCtrlArr->Remove( nPos );
+ return;
+ }
+ }
+
+ if ( pImp->pSubBindings )
+ pImp->pSubBindings->ReleaseUnoController_Impl( pControl );
+}
+
+void SfxBindings::InvalidateUnoControllers_Impl()
+{
+ if ( pImp->pUnoCtrlArr )
+ {
+ sal_uInt16 nCount = pImp->pUnoCtrlArr->Count();
+ for ( sal_uInt16 n=nCount; n>0; n-- )
+ {
+ SfxUnoControllerItem *pCtrl = (*pImp->pUnoCtrlArr)[n-1];
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener > xRef( (::cppu::OWeakObject*)pCtrl, ::com::sun::star::uno::UNO_QUERY );
+ pCtrl->ReleaseDispatch();
+ pCtrl->GetNewDispatch();
+ }
+ }
+
+ if ( pImp->pSubBindings )
+ pImp->pSubBindings->InvalidateUnoControllers_Impl();
+}
+
+sal_Bool SfxBindings::IsInUpdate() const
+{
+ sal_Bool bInUpdate = pImp->bInUpdate;
+ if ( !bInUpdate && pImp->pSubBindings )
+ bInUpdate = pImp->pSubBindings->IsInUpdate();
+ return bInUpdate;
+}
+
+void SfxBindings::SetActiveFrame( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > & rFrame )
+{
+ if ( rFrame.is() )
+ SetDispatchProvider_Impl( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > ( rFrame, ::com::sun::star::uno::UNO_QUERY ) );
+ else if ( pDispatcher && pDispatcher->GetFrame() )
+ {
+ SfxFrame *pFrame = pDispatcher->GetFrame()->GetFrame();
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > xProv( pFrame->GetInterceptor_Impl(), ::com::sun::star::uno::UNO_QUERY );
+ SetDispatchProvider_Impl( xProv );
+ }
+ else
+ SetDispatchProvider_Impl( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > () );
+}
+
+void SfxBindings::SetDispatchProvider_Impl( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > & rProv )
+{
+ sal_Bool bInvalidate = ( rProv != pImp->xProv );
+ if ( bInvalidate )
+ {
+ pImp->xProv = rProv;
+ InvalidateAll( sal_True );
+ InvalidateUnoControllers_Impl();
+ }
+
+ if ( pImp->pSubBindings )
+ pImp->pSubBindings->SetDispatchProvider_Impl( pImp->xProv );
+}
+
+const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > & SfxBindings::GetDispatchProvider_Impl() const
+{
+ return pImp->xProv;
+}
+
+SystemWindow* SfxBindings::GetSystemWindow() const
+{
+ SfxViewFrame *pFrame = pDispatcher->GetFrame();
+ while ( pFrame->GetParentViewFrame_Impl() )
+ pFrame = pFrame->GetParentViewFrame_Impl();
+ SfxTopViewFrame* pTop = PTR_CAST( SfxTopViewFrame, pFrame->GetTopViewFrame() );
+ return pTop->GetTopFrame_Impl()->GetTopWindow_Impl();
+}
diff --git a/sfx2/source/control/ctrlitem.cxx b/sfx2/source/control/ctrlitem.cxx
new file mode 100644
index 000000000000..2d832fd0ef80
--- /dev/null
+++ b/sfx2/source/control/ctrlitem.cxx
@@ -0,0 +1,480 @@
+/*************************************************************************
+ *
+ * $RCSfile: ctrlitem.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:29 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _SFXITEMPOOL_HXX //autogen
+#include <svtools/itempool.hxx>
+#endif
+#pragma hdrstop
+
+#include "ctrlitem.hxx"
+#include "bindings.hxx"
+#include "dispatch.hxx"
+#include "msgpool.hxx"
+#include "statcach.hxx"
+
+//====================================================================
+
+DBG_NAME(SfxControllerItem);
+
+//--------------------------------------------------------------------
+#ifdef DBG_UTIL
+
+void SfxControllerItem::CheckConfigure_Impl( ULONG nType )
+{
+ // echter Slot? (also kein Separator etc.)
+ if ( !nId )
+ return;
+
+ // ist die Id "uberhaupt in 'nType' konfigurierbar?
+ const SfxSlot *pSlot = SFX_SLOTPOOL().GetSlot(nId);
+ DBG_ASSERTWARNING( pSlot, "SfxControllerItem: binding not existing slot" );
+ if ( pSlot && !pSlot->IsMode(nType) )
+ {
+ DBG_WARNING( "SfxControllerItem: slot without ...Config-flag" );
+ DbgOutf( "SfxControllerItem: Config-flag missing at SID %5d",
+ pSlot->GetSlotId() );
+ }
+}
+
+#endif
+
+//--------------------------------------------------------------------
+
+// returns the next registered SfxControllerItem with the same id
+
+SfxControllerItem* SfxControllerItem::GetItemLink()
+{
+ DBG_MEMTEST();
+ DBG_CHKTHIS(SfxControllerItem, 0);
+ return pNext == this ? 0 : pNext;
+}
+
+//--------------------------------------------------------------------
+
+// returns TRUE if this binding is really bound to a function
+
+BOOL SfxControllerItem::IsBound() const
+{
+ DBG_MEMTEST();
+ DBG_CHKTHIS(SfxControllerItem, 0);
+ return pNext != this;
+}
+
+//--------------------------------------------------------------------
+
+// returns the associated function-id or 0 if none
+
+// USHORT SfxControllerItem::GetId() const;
+
+//====================================================================
+
+// registeres with the id at the bindings
+
+void SfxControllerItem::Bind( USHORT nNewId, SfxBindings *pBindinx )
+{
+ DBG_MEMTEST();
+ DBG_CHKTHIS(SfxControllerItem, 0);
+ DBG_ASSERT(pBindings || pBindinx, "Keine Bindings");
+
+ if ( IsBound() ) {
+ DBG_ASSERT(pBindings, "Keine Bindings");
+ pBindings->Release(*this);
+ }
+
+ nId = nNewId;
+ pNext = 0;
+
+ if (pBindinx)
+ pBindings = pBindinx;
+ pBindings->Register(*this);
+}
+
+
+//====================================================================
+
+void SfxControllerItem::UnBind()
+
+/* [Beschreibung]
+
+ "ost die Verbindung dieses SfxControllerItems mit der SfxBindings-Instanz,
+ an der es zur Zeit gebunden ist. Ab diesem Zeitpunkt erh"alt es keine
+ Statusbenachrichtigungen (<SfxControllerItem::StateChented()>) mehr.
+
+
+ [Querverweise]
+
+ <SfxControllerItem::ReBind()>
+ <SfxControllerItem::ClearCache()>
+*/
+{
+ DBG_MEMTEST();
+ DBG_CHKTHIS(SfxControllerItem, 0);
+ DBG_ASSERT(pBindings, "Keine Bindings");
+ DBG_ASSERT( IsBound(), "unbindings unbound SfxControllerItem" );
+
+ pBindings->Release(*this);
+ pNext = this;
+}
+
+//====================================================================
+
+void SfxControllerItem::ReBind()
+
+/* [Beschreibung]
+
+ Binded dieses SfxControllerItem wieder an die SfxBindings-Instanz,
+ an der es zuletzt gebunden war. Ab diesem Zeitpunkt erh"alt es wieder
+ Statusbenachrichtigungen (<SfxControllerItem::StateChented()>).
+
+
+ [Querverweise]
+
+ <SfxControllerItem::UnBind()>
+ <SfxControllerItem::ClearCache()>
+*/
+
+{
+ DBG_MEMTEST();
+ DBG_CHKTHIS(SfxControllerItem, 0);
+ DBG_ASSERT(pBindings, "Keine Bindings");
+ DBG_ASSERT( !IsBound(), "bindings rebound SfxControllerItem" );
+
+ pBindings->Register(*this);
+}
+
+//====================================================================
+
+void SfxControllerItem::UpdateSlot()
+
+/* [Beschreibung]
+
+ Holt den Status 'hart' neu.
+
+ [Querverweise]
+
+ <SfxControllerItem::ClearCache()>
+*/
+
+{
+ DBG_MEMTEST();
+ DBG_CHKTHIS(SfxControllerItem, 0);
+ DBG_ASSERT(pBindings, "Keine Bindings");
+
+ pBindings->Update( GetId() );
+}
+
+//--------------------------------------------------------------------
+
+void SfxControllerItem::ClearCache()
+
+/* [Beschreibung]
+
+ "oscht den Status-Cache f"ur dieses SfxControllerItem. D.h. beim
+ n"achsten Status-Update wird das <SfxPoolItem> auf jeden Fall geschickt,
+ auch wenn zuvor dasselbe geschickt wurde. Dies wird ben"otigt, wenn
+ ein Controller umgeschaltet werden kann und sich diesen Status
+ selbst merkt.
+
+
+ [Beispiel]
+
+ Der Kombi-Controller f"ur das Einstellen des Fl"achentyps und der
+ konkreten Auspr"agung (Farbe blau oder Schraffur X) kann im Typ
+ umgestellt werden, wird jedoch dann bei der n"achsten Selektion
+ wieder benachrichtigt, auch wenn es dieselben Daten sind.
+
+
+ [Querverweise]
+
+ <SfxControllerItem::UnBind()>
+ <SfxControllerItem::ReBind()>
+*/
+
+
+{
+ DBG_MEMTEST();
+ DBG_CHKTHIS(SfxControllerItem, 0);
+ DBG_ASSERT(pBindings, "Keine Bindings");
+
+ pBindings->ClearCache_Impl( GetId() );
+}
+
+//--------------------------------------------------------------------
+
+// replaces the successor in the list of bindings of the same id
+
+SfxControllerItem* SfxControllerItem::ChangeItemLink( SfxControllerItem* pNewLink )
+{
+ DBG_MEMTEST();
+ DBG_CHKTHIS(SfxControllerItem, 0);
+ SfxControllerItem* pOldLink = pNext;
+ pNext = pNewLink;
+ return pOldLink == this ? 0 : pOldLink;
+}
+
+//--------------------------------------------------------------------
+
+// changes the id of unbound functions (e.g. for sub-menu-ids)
+
+void SfxControllerItem::SetId( USHORT nItemId )
+{
+ DBG_MEMTEST();
+ DBG_CHKTHIS(SfxControllerItem, 0);
+ DBG_ASSERT( !IsBound(), "changing id of bound binding" );
+ nId = nItemId;
+}
+
+//--------------------------------------------------------------------
+
+SvStream& operator<<( SvStream& rStream, const SfxControllerItem& rFunc )
+{
+ DBG_MEMTEST();
+ SFX_SLOTPOOL().StoreId( rStream, rFunc.nId );
+ return rStream;
+}
+
+//--------------------------------------------------------------------
+
+SvStream& operator>>( SvStream& rStream, SfxControllerItem& rFunc )
+{
+ DBG_MEMTEST();
+ USHORT nId;
+ SFX_SLOTPOOL().LoadId( rStream, nId );
+ rFunc.Bind(nId);
+ return rStream;
+}
+
+//--------------------------------------------------------------------
+
+// creates a atomic item for a controller without registration
+
+SfxControllerItem::SfxControllerItem():
+ nId(0),
+ pNext(this),
+ pBindings(0)
+{
+ DBG_MEMTEST();
+ DBG_CTOR(SfxControllerItem, 0);
+}
+
+//--------------------------------------------------------------------
+
+// creates a representation of the function nId and registeres it
+
+SfxControllerItem::SfxControllerItem( USHORT nId, SfxBindings &rBindings ):
+ nId(nId),
+ pNext(this),
+ pBindings(&rBindings)
+{
+ DBG_MEMTEST();
+ DBG_CTOR(SfxControllerItem, 0);
+ Bind(nId, &rBindings);
+}
+
+//--------------------------------------------------------------------
+
+// unregisteres the item in the bindings
+
+SfxControllerItem::~SfxControllerItem()
+{
+ DBG_MEMTEST();
+ if ( IsBound() )
+ pBindings->Release(*this);
+ DBG_DTOR(SfxControllerItem, 0);
+}
+
+//--------------------------------------------------------------------
+
+void SfxControllerItem::StateChanged
+(
+ USHORT nSID, // <SID> des ausl"osenden Slot
+ SfxItemState eState, // <SfxItemState> von 'pState'
+ const SfxPoolItem* pState // Slot-Status, ggf. 0 oder IsInvalidItem()
+)
+
+/* [Beschreibung]
+
+ Diese virtuelle Methode wird vom SFx gerufen, um <SfxControllerItem>s
+ dar"uber zu benachrichtigen, da\s sich der Status des Slots 'nSID'
+ ge"andert hat. Der neue Wert sowie der von diesem Wert ermittelte
+ Status wird als 'pState' bzw. 'eState' mitgegeben.
+
+ Der Status eines Slots kann sich "andern, wenn z.B. das MDI-Fenster
+ gewechselt wird oder der Slot explizit mit <SfxBindings::Invalidate()>
+ invalidiert wurde.
+
+ Achtung! Die Methode wird nicht gerufen, wenn der Slot ung"ultig wurde,
+ danach jedoch wieder denselben Wert angenommen hat.
+
+ Diese Basisklasse braucht nicht gerufen zu werden, weitere Zwischenstufen
+ jedoch (z.B. <SfxToolboxControl>) sollten gerufen werden.
+*/
+
+{
+ DBG_MEMTEST();
+ DBG_CHKTHIS(SfxControllerItem, 0);
+}
+
+//--------------------------------------------------------------------
+
+void SfxControllerItem::DeleteFloatingWindow()
+{
+ DBG_MEMTEST();
+ DBG_CHKTHIS(SfxControllerItem, 0);
+}
+
+//--------------------------------------------------------------------
+
+void SfxStatusForwarder::StateChanged
+(
+ USHORT nSID, // <SID> des ausl"osenden Slot
+ SfxItemState eState, // <SfxItemState> von 'pState'
+ const SfxPoolItem* pState // Slot-Status, ggf. 0 oder IsInvalidItem()
+)
+
+{
+ pMaster->StateChanged( nSID, eState, pState );
+}
+
+//--------------------------------------------------------------------
+
+SfxStatusForwarder::SfxStatusForwarder(
+ USHORT nSlotId,
+ SfxControllerItem& rMaster ):
+ SfxControllerItem( nSlotId, rMaster.GetBindings() ),
+ pMaster( &rMaster )
+{
+}
+
+//--------------------------------------------------------------------
+
+SfxItemState SfxControllerItem::GetItemState
+(
+ const SfxPoolItem* pState /* Pointer auf das <SfxPoolItem>, dessen
+ Status erfragt werden soll. */
+)
+
+/* [Beschreibung]
+
+ Statische Methode zum Ermitteln des Status des SfxPoolItem-Pointers,
+ in der Methode <SfxControllerItem::StateChanged(const SfxPoolItem*)>
+ zu verwenden.
+
+ [R"uckgabewert]
+
+ SfxItemState SFX_ITEM_UNKNOWN
+ Enabled, aber keine weitere Statusinformation
+ verf"ugbar. Typisch f"ur <Slot>s, die allenfalls
+ zeitweise disabled sind, aber ihre Darstellung sonst
+ nicht "andern.
+
+ SFX_ITEM_DISABLED
+ Disabled und keine weiter Statusinformation
+ verf"ugbar. Alle anderen ggf. angezeigten Werte sollten
+ auf den Default zur"uckgesetzt werden.
+
+ SFX_ITEM_DONTCARE
+ Enabled aber es waren nur uneindeutige Werte
+ verf"ugbar (also keine, die abgefragt werden k"onnen).
+
+ SFX_ITEM_AVAILABLE
+ Enabled und mit verf"ugbarem Wert, der von 'pState'
+ erfragbar ist. Der Typ ist dabei im gesamten
+ Programm eindeutig und durch den Slot festgelegt.
+*/
+
+{
+ return !pState
+ ? SFX_ITEM_DISABLED
+ : IsInvalidItem(pState)
+ ? SFX_ITEM_DONTCARE
+ : pState->ISA(SfxVoidItem) && !pState->Which()
+ ? SFX_ITEM_UNKNOWN
+ : SFX_ITEM_AVAILABLE;
+}
+
+//--------------------------------------------------------------------
+
+SfxMapUnit SfxControllerItem::GetCoreMetric() const
+
+/* [Beschreibung]
+
+ Holt vom zust"andigen Pool die Ma\seinheit ab, in der das Status-Item
+ vorliegt.
+*/
+
+{
+ SfxStateCache *pCache = pBindings->GetStateCache( nId );
+ SfxDispatcher *pDispat = pBindings->GetDispatcher_Impl();
+ const SfxSlotServer *pServer = pCache->GetSlotServer( *pDispat );
+ SfxShell *pSh = pDispat->GetShell( pServer->GetShellLevel() );
+ SfxItemPool &rPool = pSh->GetPool();
+ USHORT nWhich = rPool.GetWhich( nId );
+ return rPool.GetMetric( nWhich );
+}
+
+//------------------------------------------------------------------------
+
+#ifdef WNT
+#pragma optimize("g",off)
+#endif
+
+
diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx
new file mode 100644
index 000000000000..57c5c7f6e630
--- /dev/null
+++ b/sfx2/source/control/dispatch.cxx
@@ -0,0 +1,3493 @@
+/*************************************************************************
+ *
+ * $RCSfile: dispatch.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:29 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _SFXITEMPOOL_HXX //autogen
+#include <svtools/itempool.hxx>
+#endif
+#ifndef _SFXITEMITER_HXX //autogen
+#include <svtools/itemiter.hxx>
+#endif
+#ifndef _SFX_WHITER_HXX //autogen
+#include <svtools/whiter.hxx>
+#endif
+#ifndef _SFXINTITEM_HXX //autogen
+#include <svtools/intitem.hxx>
+#endif
+#ifndef _SFXEITEM_HXX //autogen
+#include <svtools/eitem.hxx>
+#endif
+#ifndef _UNDO_HXX //autogen
+#include <svtools/undo.hxx>
+#endif
+#ifndef _WRKWIN_HXX //autogen
+#include <vcl/wrkwin.hxx>
+#endif
+#ifndef _SVTOOLS_TTPROPS_HXX
+#include <svtools/ttprops.hxx>
+#endif
+#include <stdio.h>
+#include <stdarg.h>
+#include <stdlib.h> // wg. bsearch
+
+#define _SVSTDARR_ULONGS
+#include <svtools/svstdarr.hxx>
+
+#pragma hdrstop
+
+#include "sfxhelp.hxx"
+#include "appdata.hxx"
+#include "dispatch.hxx"
+#include "minstack.hxx"
+#include "msg.hxx"
+#include "objface.hxx"
+#include "bindings.hxx"
+#include "request.hxx"
+#include "app.hxx"
+#include "hintpost.hxx"
+#include "slotserv.hxx"
+#include "ipfrm.hxx"
+#include "interno.hxx"
+#include "sfxtypes.hxx"
+#include "macrconf.hxx"
+#include "virtmenu.hxx"
+#include "viewfrm.hxx"
+#include "viewsh.hxx"
+#include "mnumgr.hxx"
+#include "childwin.hxx"
+#include "docfac.hxx"
+#include "saveopt.hxx"
+#include "ipenv.hxx"
+#include "msgpool.hxx"
+#include "module.hxx"
+#include "tbxconf.hxx"
+#include "topfrm.hxx"
+#include "sfxuno.hxx"
+
+//==================================================================
+DBG_NAME(SfxDispatcherFlush);
+DBG_NAME(SfxDispatcherFillState);
+
+//==================================================================
+SV_IMPL_PTRARR( SfxItemPtrArray, SfxPoolItemPtr );
+
+DECL_PTRSTACK(SfxShellStack_Impl, SfxShell*, 8, 4 );
+//==================================================================
+
+struct SfxToDo_Impl
+{
+ SfxShell* pCluster;
+ sal_Bool bPush;
+ sal_Bool bDelete;
+ sal_Bool bUntil;
+
+ SfxToDo_Impl():
+ bPush(sal_False), bDelete(sal_False), bUntil(sal_False), pCluster(0) {}
+ SfxToDo_Impl( sal_Bool bOpPush, sal_Bool bOpDelete, sal_Bool bOpUntil, SfxShell& rCluster ):
+ bPush(bOpPush), bDelete(bOpDelete), bUntil(bOpUntil), pCluster(&rCluster) {}
+ ~SfxToDo_Impl(){}
+
+ sal_Bool operator==( const SfxToDo_Impl& rWith ) const
+ { return pCluster==rWith.pCluster && bPush==rWith.bPush; }
+};
+
+DECL_OBJSTACK(SfxToDoStack_Impl, SfxToDo_Impl, 8, 4);
+IMPL_OBJSTACK(SfxToDoStack_Impl, SfxToDo_Impl);
+
+struct SfxObjectBars_Impl
+{
+ ResId aResId; // Resource - und ConfigId der Toolbox
+ sal_uInt16 nMode; // spezielle Sichtbarkeitsflags
+ String aName;
+ SfxInterface* pIFace;
+
+ SfxObjectBars_Impl() :
+ aResId( 0,0 )
+ {}
+};
+
+//------------------------------------------------------------------
+
+struct SfxDispatcher_Impl
+{
+ const SfxSlotServer* pCachedServ1; // zuletzt gerufene Message
+ const SfxSlotServer* pCachedServ2; // vorletzt gerufene Message
+ SfxShellStack_Impl aStack; // aktive Funktionalitaet
+ Timer aTimer; // fuers flushen
+ SfxToDoStack_Impl aToDoStack; // nicht abgearb. Push/Pop
+ SfxViewFrame* pFrame; // 0 oder zugeh"or. Frame
+ SfxDispatcher* pParent; // z.B. AppDispatcher, ggf. 0
+ SfxHintPosterRef xPoster; // asynchrones Execute
+ sal_Bool bFlushing; // sal_True waehrend Flush //?
+ sal_Bool bFlushed; // aToDoStack.Count() == 0
+ sal_Bool bUpdated; // Update_Impl gelaufen
+ sal_Bool bLocked; // kein Execute
+ sal_Bool bInvalidateOnUnlock;// da fragte jemand
+ sal_Bool bActive; // nicht verwechseln mit gesetzt!
+ sal_Bool* pInCallAliveFlag; // dem Stack den Dtor anzeigen
+ SfxObjectBars_Impl aObjBars[SFX_OBJECTBAR_MAX];
+ SfxObjectBars_Impl aFixedObjBars[SFX_OBJECTBAR_MAX];
+ SvULongs aChildWins;
+ sal_uInt16 nActionLevel; // in EnterAction
+ sal_uInt32 nEventId; // EventId UserEvent
+ sal_Bool bUILocked; // Update abgeklemmt (!zappeln)
+ sal_Bool bNoUI; // UI nur vom Parent Dispatcher
+ sal_Bool bReadOnly; // Dokument ist ReadOnly
+ sal_Bool bQuiet; // nur parent dispatcher verwenden
+ sal_Bool bModal; // nur Slots vom Parent-Dispatcher
+
+ sal_Bool bFilterEnabling; // sal_True=filter enabled slots, 2==ReadOnlyDoc uebersteuert
+ sal_uInt16 nFilterCount; // Anzahl der SIDs in pFilterSIDs
+ const sal_uInt16* pFilterSIDs; // sortiertes Array von SIDs
+ sal_uInt16 nStandardMode; // ExecuteMode f. PlugInDispatcher
+ SvUShorts* pDisableList;
+ sal_uInt32 nDisableFlags;
+};
+
+#define NO_OBJECTBAR 0
+#define OWN_OBJECTBAR 1
+#define OTHER_OBJECTBAR 2
+
+//------------------------------------------------------------------
+
+#define SFX_FLUSH_TIMEOUT 50
+
+//====================================================================
+sal_Bool SfxDispatcher::IsLocked( sal_uInt16 nSID ) const
+
+/* [Beschreibung]
+
+ Mit dieser Methode kann festgestellt werden, ob der SfxDispatcher
+ gesperrt oder freigegeben ist. Ein gesperrter SfxDispatcher
+ f"uhrt keine <SfxRequest>s mehr aus und liefert keine
+ Status-Informationen mehr. Er verh"alt sich so als w"aren alle
+ Slots disabled.
+
+ Der Dispatcher gilt auch als gesperrt, wenn alle Dispatcher
+ gelockt sind (<SfxApplication::LockDispatcher()>) oder der zugeh"orige
+ Top-Frame im modal-mode ist und der angegebene Slot Frame-spezifisch
+ (also nicht von der Application) bedient wird.
+*/
+
+{
+ return nSID != SID_BROWSE_STOP && nSID != SID_HELP_PI &&
+ ( pImp->bLocked || SFX_APP()->IsDispatcherLocked() );
+}
+
+//--------------------------------------------------------------------
+sal_Bool SfxDispatcher::IsAppDispatcher() const
+
+/* [Beschreibung]
+
+ Mit dieser Methode l"a\st sich festellen, ob der SfxDispacher der
+ Applikations-Dispatcher ist.
+
+
+ [R"uckgabewert]
+
+ sal_Bool sal_True
+ Es ist der Applikations-Dispatcher.
+
+ sal_False
+ Es ist ein Dispatcher eines SfxViewFrame.
+*/
+
+{
+ return !pImp->pFrame;
+}
+
+//--------------------------------------------------------------------
+int SfxDispatcher::Call_Impl( SfxShell& rShell, const SfxSlot &rSlot, SfxRequest &rReq, sal_Bool bRecord )
+
+/* [Beschreibung]
+
+ Hilfsfunktion zum pr"ufen, ob ein Slot executed werden darf und
+ der Execution selbst.
+*/
+
+{
+ SFX_STACK(SfxDispatcher::Call_Impl);
+
+ // darf der Slot gerufen werden (i.S.v. enabled)
+ SfxApplication *pSfxApp = SFX_APP();
+ if ( rSlot.IsMode(SFX_SLOT_FASTCALL) || rShell.CanExecuteSlot_Impl(rSlot) )
+ {
+ // ggf. die Bindings locken (MI: warum?)
+ SfxBindings *pBindings = GetBindings();
+#if modal_mode_sinnlos
+ sal_Bool bLockBindings = rSlot.GetSlotId() != SID_OPENDOC && rSlot.GetSlotId() != SID_OPENURL;
+ if ( bLockBindings && pBindings )
+ pBindings->DENTERREGISTRATIONS();
+#endif
+
+ // Alles holen, was gebraucht wird, da der Slot den Execute evtl. nicht
+ // "uberlebt, falls es ein 'Pseudoslot' f"ur Macros oder Verben ist
+ sal_Bool bAutoUpdate = rSlot.IsMode(SFX_SLOT_AUTOUPDATE);
+ SFX_REQUEST_ARG(rReq, pOrigItem, SfxExecuteItem, SID_SUBREQUEST, sal_False);
+ SfxExecuteItem *pExecuteItem = pOrigItem
+ ? (SfxExecuteItem*)pOrigItem->Clone()
+ : 0;
+
+ // ggf. TabPage-ID setzen und SID merken
+ SfxAppData_Impl *pAppData = pSfxApp->Get_Impl();
+ SFX_REQUEST_ARG(rReq, pTabPageItem, SfxUInt16Item, SID_TABPAGE, sal_False);
+ if ( pTabPageItem )
+ {
+ pAppData->nAutoTabPageId = pTabPageItem->GetValue();
+ rReq.RemoveItem( SID_TABPAGE ); // sonst ArgCount > 0 => Seiteneff.
+ }
+ pAppData->nExecutingSID = rReq.GetSlot();
+
+ // API-Call-Klammerung und Document-Lock w"ahrend des Calls
+ {
+ // 'this' mu\s im Dtor bescheid sagen
+ sal_Bool bThisDispatcherAlive = sal_True;
+ sal_Bool *pOldInCallAliveFlag = pImp->pInCallAliveFlag;
+ pImp->pInCallAliveFlag = &bThisDispatcherAlive;
+
+ // eigentlichen Call durchf"uhren
+ sal_Bool bDone = sal_False;
+/*
+ SfxViewFrame *pViewFrame = GetFrame();
+ if ( pViewFrame )
+ {
+ SFX_REQUEST_ARG(rReq, pInterceptorItem, SfxBoolItem, SID_INTERCEPTOR, sal_False);
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProviderInterceptor > xProv( pViewFrame->GetFrame()->GetInterceptor_Impl() );
+ sal_Bool bDirect = ( pInterceptorItem != 0 );
+ if ( bDirect )
+ {
+ bDirect = !pInterceptorItem->GetValue();
+ rReq.RemoveItem( SID_INTERCEPTOR );
+ }
+
+ if ( xProv.is() && !bDirect )
+ {
+ bDone = sal_True;
+ ::com::sun::star::util::URL aURL;
+ String aName( rSlot.GetUnoName() );
+ String aCmd;
+ if ( aName.getLength() )
+ {
+ aCmd = ".uno:";
+ aCmd += aName;
+ }
+ else
+ {
+ aCmd = "slot:";
+ aCmd += rSlot.GetSlotId();
+ }
+
+ aURL.Complete = S2U( aCmd );
+ SfxURLTransformer aTrans;
+ aTrans.parseStrict( aURL );
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > xDisp = xProv->queryDispatch( aURL, "", 0 );
+ if ( xDisp.is() )
+ {
+// automatisch auskommentiert - [getImplementation] - Wird von OWeakObject nicht weiter untersttzt!
+// void* pDisp = xDisp->getImplementation( ::getCppuType((const SfxOfficeDispatch*)0) );
+
+ if ( pDisp)
+ bDone = sal_False;
+ else
+ {
+ ::com::sun::star::uno::Sequence <PropertyValue> aSequ;
+ if ( rReq.GetArgs() )
+ TransformItems( rSlot.GetSlotId(), *rReq.GetArgs(), aSequ, &rSlot );
+ xDisp->dispatch( aURL, aSequ );
+ }
+ }
+ }
+ }
+*/
+ if ( !bDone )
+ {
+ // Bei neuen/komplizierten Funktionen den HelpAgent feuern...
+ Help* pHelp = Application::GetHelp();
+ if ( pHelp )
+ ((SfxHelp_Impl*)pHelp)->SlotExecutedOrFocusChanged( rReq.GetSlot(), sal_True, pSfxApp->GetOptions().IsAutoHelpAgent() );
+
+ SfxExecFunc pFunc = rSlot.GetExecFnc();
+ rShell.CallExec( pFunc, rReq );
+ }
+
+ // falls 'this' noch lebt
+ if ( bThisDispatcherAlive )
+ pImp->pInCallAliveFlag = pOldInCallAliveFlag;
+ else if ( pOldInCallAliveFlag )
+ // auch verschachtelte Stack-Frames sch"utzen
+ *pOldInCallAliveFlag = sal_False;
+ }
+
+ // TabPage-ID und Executing-SID zurueck setzen
+ if ( pTabPageItem )
+ pAppData->nAutoTabPageId = 0;
+ pAppData->nExecutingSID = 0;
+
+#if modal_mode_sinnlos
+ // ggf. Lock wieder freigeben
+ if ( bLockBindings )
+ pBindings->DLEAVEREGISTRATIONS();
+#endif
+
+ if( pExecuteItem )
+ {
+ Execute( *pExecuteItem );
+ delete pExecuteItem;
+ }
+
+ if ( rReq.IsDone() )
+ {
+ // bei AutoUpdate sofort updaten; "Pseudoslots" d"urfen nicht
+ // Autoupdate sein!
+ if ( bAutoUpdate )
+ {
+ const SfxSlot* pSlave = rSlot.GetLinkedSlot();
+ if (pSlave)
+ {
+ // bei Enum-Slots irgendeinen gebundenen Slave-Slot nehmen
+ while (!pBindings->IsBound(pSlave->GetSlotId()) && pSlave != &rSlot )
+ pSlave = pSlave->GetLinkedSlot();
+ pBindings->Invalidate(pSlave->GetSlotId());
+ pBindings->Update(pSlave->GetSlotId());
+ }
+ else
+ {
+ pBindings->Invalidate(rSlot.GetSlotId());
+ pBindings->Update(rSlot.GetSlotId());
+ }
+ }
+ return sal_True;
+ }
+ }
+
+ return sal_False;
+}
+
+//====================================================================
+void SfxDispatcher::Construct_Impl( SfxDispatcher* pParent )
+{
+ pImp = new SfxDispatcher_Impl;
+ bFlushed = sal_True;
+ SfxApplication *pSfxApp = SFX_APP();
+
+ pImp->pCachedServ1 = 0;
+ pImp->pCachedServ2 = 0;
+ pImp->bFlushing = sal_False;
+ pImp->bUpdated = sal_False;
+ pImp->bLocked = sal_False;
+ pImp->bActive = sal_False;
+ pImp->pParent = NULL;
+ pImp->bUILocked = sal_False;
+ pImp->bNoUI = sal_False;
+ pImp->bReadOnly = sal_False;
+ pImp->bQuiet = sal_False;
+ pImp->bModal = sal_False;
+ pImp->pInCallAliveFlag = 0;
+ pImp->bFilterEnabling = sal_False;
+ pImp->nFilterCount = 0;
+ pImp->pFilterSIDs = 0;
+ pImp->nStandardMode = 0;
+ pImp->pDisableList = pSfxApp->GetDisabledSlotList_Impl();
+ pImp->nDisableFlags = 0;
+
+ pImp->pParent = pParent;
+
+ pImp->bInvalidateOnUnlock = sal_False;
+ pImp->nActionLevel = 0;
+
+ for (sal_uInt16 n=0; n<SFX_OBJECTBAR_MAX; n++)
+ pImp->aObjBars[n].aResId = ResId( 0,0 );
+
+ GenLink aGenLink( LINK(this, SfxDispatcher, PostMsgHandler) );
+
+ pImp->xPoster = new SfxHintPoster(aGenLink);
+
+ pImp->aTimer.SetTimeout(SFX_FLUSH_TIMEOUT);
+ pImp->aTimer.SetTimeoutHdl( LINK(this, SfxDispatcher, EventHdl_Impl ) );
+}
+
+SfxDispatcher::SfxDispatcher( SfxDispatcher* pParent )
+{
+ Construct_Impl( pParent );
+ pImp->pFrame = 0;
+}
+
+SfxDispatcher::SfxDispatcher( SfxViewFrame *pViewFrame )
+
+/* [Beschreibung]
+
+ Der Konstruktor der Klasse SfxDispatcher legt einen leeren Stack
+ von <SfxShell>-Pointern an. Er ist initial nicht gelockt und gilt als
+ geflusht.
+*/
+
+{
+ if ( pViewFrame )
+ {
+ SfxViewFrame *pFrame = pViewFrame->GetParentViewFrame();
+ if ( pFrame )
+ Construct_Impl( pFrame->GetDispatcher() );
+ else
+ Construct_Impl( 0 );
+ }
+ else
+ Construct_Impl( 0 );
+ pImp->pFrame = pViewFrame;
+}
+
+//====================================================================
+SfxDispatcher::~SfxDispatcher()
+
+/* [Beschreibung]
+
+ Der Destruktor der Klasse SfxDispatcher darf nicht gerufen werden,
+ wenn die SfxDispatcher-Instanz aktiv ist. Es d"urfen sich allerdings
+ noch <SfxShell>-Pointer auf dem Stack befinden.
+*/
+
+{
+#ifdef DBG_UTIL
+ ByteString sTemp( "Delete Dispatcher " );
+ sTemp += ByteString::CreateFromInt32( (sal_uInt32)this );
+ DBG_TRACE( sTemp.GetBuffer() );
+ DBG_ASSERT( !pImp->bActive, "deleting active Dispatcher" );
+#endif
+
+ // Damit in LeaveRegistrations kein Timer per Reschedule in PlugComm
+ // zuschlaegt
+ pImp->aTimer.Stop();
+ pImp->xPoster->SetEventHdl( Link() );
+
+ // die Stack-Varialblem in Call_Impl benachrichtigen
+ if ( pImp->pInCallAliveFlag )
+ *pImp->pInCallAliveFlag = sal_False;
+
+ // Bindings und App besorgen
+ SfxApplication *pSfxApp = SFX_APP();
+ SfxBindings* pBindings = GetBindings();
+
+// if (pImp->nEventId)
+// pSfxApp->RemoveEventHdl(pImp->nEventId);
+
+ // wenn noch nicht flushed, die Bindings wiederbeleben
+ if ( pBindings && !pSfxApp->IsDowning() && !bFlushed )
+ pBindings->DLEAVEREGISTRATIONS();
+
+ // ggf. bei den Bindings abmelden
+ while ( pBindings )
+ {
+ if ( pBindings->GetDispatcher_Impl() == this)
+ pBindings->SetDispatcher(0);
+ pBindings = pBindings->GetSubBindings_Impl();
+ }
+
+ delete pImp;
+}
+
+//====================================================================
+void SfxDispatcher::Pop
+(
+ SfxShell& rShell, /* Die vom Stack zu nehmende SfxShell-Instanz. */
+
+ sal_uInt16 nMode /* SFX_SHELL_POP_UNTIL
+ Es werden auch alle "uber 'rShell' liegenenden
+ SfxShell's vom Stack genommen.
+
+ SFX_SHELL_POP_DELETE
+ Alle tats"achlich vom Stack genommenen
+ SfxShells werden gel"oscht.
+
+ SFX_SHELL_PUSH (InPlace use only)
+ Die Shell wird gepusht. */
+)
+/* [Beschreibung]
+
+ Mit dieser Methode wird eine oder mehrere <SfxShell> vom SfxDispatcher
+ gepoppt. Die SfxShell wird zun"achst zum poppen vermerkt und
+ es wird ein Timer aufgesetzt. Erst bei Ablauf des Timers wird
+ tats"achlich gepoppt (<SfxDispatcher::Flush()>) und die <SfxBindings>
+ werden invalidiert. W"ahrend der Timer l"auft gleichen sich
+ entgegengesetzte Push und Pop Befehle mit derselben SfxShell aus.
+*/
+
+{
+ DBG_MEMTEST();
+ DBG_ASSERT( rShell.GetInterface(),
+ "pushing SfxShell without previous RegisterInterface()" );
+ DBG_ASSERT( pImp->nActionLevel == 0, "Push or Pop within Action" );
+// DBG_ASSERT( SFX_APP()->IsInAsynchronCall_Impl(),
+// "Dispatcher Push/Pop in synchron-call-stack" );
+
+ FASTBOOL bDelete = (nMode & SFX_SHELL_POP_DELETE) == SFX_SHELL_POP_DELETE;
+ FASTBOOL bUntil = (nMode & SFX_SHELL_POP_UNTIL) == SFX_SHELL_POP_UNTIL;
+ FASTBOOL bPush = (nMode & SFX_SHELL_PUSH) == SFX_SHELL_PUSH;
+
+ SfxApplication *pSfxApp = SFX_APP();
+
+#ifdef DBG_UTIL
+ ByteString aMsg( "SfxDispatcher(" );
+ aMsg += ByteString::CreateFromInt32( (long) this );
+ aMsg += bPush ? ")::Push(" : ")::Pop(";
+ if ( rShell.GetInterface() )
+ aMsg += rShell.GetInterface()->GetClassName();
+ else
+ aMsg += ByteString::CreateFromInt32( (long) &rShell );
+ aMsg += bDelete ? ") with delete" : ")";
+ DbgTrace( aMsg.GetBuffer() );
+#endif
+
+ // gleiche Shell wie on-Top des ToDo-Stacks?
+ if ( pImp->aToDoStack.Count() && pImp->aToDoStack.Top().pCluster == &rShell )
+ {
+ // inverse Actions heben sich auf
+ if ( pImp->aToDoStack.Top().bPush != bPush )
+ pImp->aToDoStack.Pop();
+ else
+ {
+ DBG_ASSERT( bPush, "SfxInterface pushed more than once" );
+ DBG_ASSERT( !bPush, "SfxInterface popped more than once" );
+ }
+ }
+ else
+ {
+ // ::com::sun::star::chaos::Action merken
+ pImp->aToDoStack.Push( SfxToDo_Impl(bPush, bDelete, bUntil, rShell) );
+ if ( bFlushed )
+ {
+ bFlushed = sal_False;
+ pImp->bUpdated = sal_False;
+
+ // Bindings schlafen legen
+ SfxBindings* pBindings = GetBindings();
+ if ( pBindings )
+ pBindings->DENTERREGISTRATIONS();
+ }
+ }
+
+ if ( !pSfxApp->IsDowning() && pImp->aToDoStack.Count() )
+ {
+ //! if (SFX_APP()->AnyInput(INPUT_KEYBOARD | INPUT_MOUSE) )
+ //! AnyInput haut nicht hin; hier muss noch ein Kriterium gefunden
+ //! werden. Solange wieder immer mit Timer.
+
+ if (sal_True)
+ {
+ // Kein sofortiges Update gewuenscht
+ pImp->aTimer.SetTimeout(SFX_FLUSH_TIMEOUT);
+ pImp->aTimer.SetTimeoutHdl( LINK(this, SfxDispatcher, EventHdl_Impl ) );
+ pImp->aTimer.Start();
+ }
+ else
+ {
+ // Schnellstmoegliches Update (sollte Normalfall sein)
+ pImp->aTimer.Stop();
+ GetpApp()->PostUserEvent(pImp->nEventId, (void*)0);
+ }
+ }
+ else
+ {
+ // doch nichts zu tun
+ pImp->aTimer.Stop();
+
+ // ggf. Bindings wieder aufwecken
+ if ( !pImp->aToDoStack.Count() )
+ {
+ SfxBindings* pBindings = GetBindings();
+ if ( pBindings )
+ pBindings->DLEAVEREGISTRATIONS();
+ }
+ }
+}
+
+//--------------------------------------------------------------------
+
+IMPL_LINK_INLINE_START( SfxDispatcher, EventHdl_Impl, void *, pvoid )
+
+/* [Beschreibung]
+
+ Dieser Handler wird nach <SfxDispatcher::Invalidate()> oder Bewegungen
+ auf dem Stack (<SfxDispatcher::Push()> und <SfxDispatcher::Pop()) gerufen.
+
+ Er flusht den Stack, falls er dirty ist, f"uhrt also die ausstehenden
+ Push und Pop Befehle tats"achlich aus.
+*/
+
+{
+ DBG_MEMTEST();
+
+ Flush();
+ Update_Impl();
+ SfxBindings* pBindings = GetBindings();
+ if ( pBindings )
+ pBindings->StartUpdate_Impl(sal_False);
+ return 0;
+}
+IMPL_LINK_INLINE_END( SfxDispatcher, EventHdl_Impl, void *, pvoid )
+
+//--------------------------------------------------------------------
+sal_Bool SfxDispatcher::CheckVirtualStack( const SfxShell& rShell, sal_Bool bDeep )
+
+/* [Beschreibung]
+
+ Mit dieser Methode kann gepr"uft werden, ob sich die <SfxShell> rShell
+ auf dem Stack befindet, wenn er geflusht w"are. Dabei wird der
+ SfxDispatcher jedoch nicht tats"achlich geflusht.
+
+ Diese Methode ist u.a. dazu gedacht, Assertions zu erm"oglichen, ohne
+ als Seiteneffekt den SfxDispathcer flushen zu m"ussen.
+*/
+
+{
+ DBG_MEMTEST();
+ SFX_STACK(SfxDispatcher::CheckVirtualStack);
+
+ SfxShellStack_Impl aStack( pImp->aStack );
+ for ( short nToDo = pImp->aToDoStack.Count()-1; nToDo >= 0; --nToDo )
+ {
+ SfxToDo_Impl aToDo( pImp->aToDoStack.Top(nToDo) );
+ if ( aToDo.bPush )
+ aStack.Push( (SfxShell*) aToDo.pCluster );
+ else
+ {
+ SfxShell* pPopped = 0;
+ do
+ {
+ DBG_ASSERT( aStack.Count(), "popping from empty stack" );
+ pPopped = aStack.Pop();
+ }
+ while ( aToDo.bUntil && pPopped != aToDo.pCluster );
+ DBG_ASSERT( pPopped == aToDo.pCluster, "popping unpushed SfxInterface" );
+ }
+ }
+
+ sal_Bool bReturn;
+ if ( bDeep )
+ bReturn = aStack.Contains(&rShell);
+ else
+ bReturn = aStack.Top() == &rShell;
+ return bReturn;
+}
+
+//--------------------------------------------------------------------
+sal_uInt16 SfxDispatcher::GetShellLevel( const SfxShell& rShell )
+
+/* [Beschreibung]
+
+ Ermittelt die Position einer SfxShell im Stack des Dispatchers.
+ Dazu wird dieser ggf. zuvor geflusht.
+
+
+ [Rckgabewert]
+
+ sal_uInt16 == USRT_MAX
+ Die SfxShell befindet sich nicht auf
+ diesem SfxDispatcher.
+
+ < USHRT_MAX
+ Position der SfxShell auf dem Dispatcher
+ von oben mit 0 beginnend gez"ahlt.
+*/
+
+{
+ DBG_MEMTEST();
+ SFX_STACK(SfxDispatcher::GetShellLevel);
+ Flush();
+
+ for ( sal_uInt16 n = 0; n < pImp->aStack.Count(); ++n )
+ if ( pImp->aStack.Top( n ) == &rShell )
+ return n;
+ if ( pImp->pParent )
+ {
+ sal_uInt16 nRet = pImp->pParent->GetShellLevel(rShell);
+ if ( nRet == USHRT_MAX )
+ return nRet;
+ return nRet + pImp->aStack.Count();
+ }
+
+ return USHRT_MAX;
+}
+
+//--------------------------------------------------------------------
+SfxShell *SfxDispatcher::GetShell(sal_uInt16 nIdx) const
+
+/* [Beschreibung]
+
+ Liefert einen Pointer auf die <SfxShell>, welche sich an der Position
+ nIdx (von oben, letzt-gepushte liegt bei 0) auf dem Stack befindet.
+
+ Dabei wird der SfxDispatcher nicht geflusht.
+
+ Ist der Stack nicht tief genug, wird ein 0-Pointer zur"uckgegeben.
+*/
+
+{
+ DBG_MEMTEST();
+
+ sal_uInt16 nShellCount = pImp->aStack.Count();
+ if ( nIdx < nShellCount )
+ return pImp->aStack.Top(nIdx);
+ else if ( pImp->pParent )
+ return pImp->pParent->GetShell( nIdx - nShellCount );
+ return 0;
+}
+
+//--------------------------------------------------------------------
+SfxBindings* SfxDispatcher::GetBindings() const
+
+/* [Beschreibung]
+
+ Diese Methode liefert einen Pointer auf die <SfxBindings> Instanz
+ zur"uck, an die der SfxDispatcher gerade gebunden ist. Ein SfxDispatcher
+ ist nur dann an SfxBindings gebunden, wenn er <UI-aktiv> ist. Ist
+ er nicht UI-aktiv, wird ein 0-Pointer zur"uckgegeben.
+
+ Der zur"uckgegebene Pointer ist nur im <unmittelbaren Kontext> des
+ Methodenaufrufs g"ultig.
+*/
+
+{
+ if ( pImp->pFrame )
+ return &pImp->pFrame->GetBindings();
+ else
+ return NULL;
+}
+
+//--------------------------------------------------------------------
+SfxViewFrame* SfxDispatcher::GetFrame() const
+
+/* [Beschreibung]
+
+ Liefert einen Pointer auf die <SfxViewFrame> Instanz, der dieser
+ SfxDispatcher geh"ort. Falls es sich um den Applikations-Dispatcher
+ handelt, wird ein 0-Pointer zur"uckgegeben.
+*/
+
+{
+ DBG_MEMTEST();
+ return pImp->pFrame;
+}
+
+//--------------------------------------------------------------------
+void SfxDispatcher::DoActivate_Impl( sal_Bool bMDI )
+
+/* [Beschreibung]
+
+ Diese Methode steuert das Aktivieren eines Dispatchers.
+
+ Da der Applikations-Dispatcher immer aktiv ist, entweder als
+ Unterdispatcher des <SfxViewFrame>-Dispatchers oder selbst, wird
+ er nie als ganzes Aktiviert, sondern nur seine einzelnen <SfxShell>s
+ bei <SfxDispatcher::Push(SfxShell&)>.
+
+ Beim Aktivieren eines SfxDispatchers wird an allen auf seinem
+ Stack befindlichen SfxShells, beginnend mit der untersten, der Handler
+ <SfxShell::Activate(sal_Bool)> gerufen.
+*/
+
+{
+ DBG_MEMTEST();
+ SFX_STACK(SfxDispatcher::DoActivate);
+ if ( bMDI )
+ {
+ #ifdef DBG_UTIL
+ ByteString sTemp("Activate Dispatcher ");
+ sTemp += ByteString::CreateFromInt32( (sal_uInt32) this );
+ DBG_TRACE(sTemp.GetBuffer());
+ DBG_ASSERT( !pImp->bActive, "Activate-Fehler" );
+ #endif
+ pImp->bActive = sal_True;
+ pImp->bUpdated = sal_False;
+ SfxBindings* pBindings = GetBindings();
+ if ( pBindings )
+ {
+ pBindings->SetDispatcher(this);
+ pBindings->SetActiveFrame( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > () );
+ }
+ }
+ else
+ {
+ #ifdef DBG_UTIL
+ ByteString sTemp("Non-MDI-Activate Dispatcher");
+ sTemp += ByteString::CreateFromInt32( (sal_uInt32) this );
+ DBG_TRACE( sTemp.GetBuffer() );
+ #endif
+ }
+
+ if ( IsAppDispatcher() )
+ return;
+
+ for ( int i = int(pImp->aStack.Count()) - 1; i >= 0; --i )
+ pImp->aStack.Top( (sal_uInt16) i )->DoActivate(pImp->pFrame, bMDI);
+
+ if ( pImp->aToDoStack.Count() )
+ {
+ if (sal_True)
+ {
+ // Kein sofortiges Update gewuenscht
+ pImp->aTimer.SetTimeout(SFX_FLUSH_TIMEOUT);
+ pImp->aTimer.SetTimeoutHdl( LINK(this, SfxDispatcher, EventHdl_Impl ) );
+ pImp->aTimer.Start();
+ }
+ else
+ {
+ // Schnellstmoegliches Update (sollte Normalfall sein)
+ pImp->aTimer.Stop();
+ GetpApp()->PostUserEvent(pImp->nEventId, (void*)0);
+ }
+ }
+}
+
+void SfxDispatcher::DoParentActivate_Impl()
+{
+ for ( int i = int(pImp->aStack.Count()) - 1; i >= 0; --i )
+ pImp->aStack.Top( (sal_uInt16) i )->ParentActivate();
+}
+
+//--------------------------------------------------------------------
+void SfxDispatcher::DoDeactivate_Impl( sal_Bool bMDI )
+
+/* [Beschreibung]
+
+ Diese Methode steuert das Deaktivieren eines Dispatchers.
+
+ Da der Applikations-Dispatcher immer aktiv ist, entweder als
+ Unterdispatcher des <SfxViewFrame>-Dispatchers oder selbst, wird
+ er nie als ganzes Deaktiviert, sondern nur seine einzelnen <SfxShell>s
+ bei <SfxDispatcher::Pop(SfxShell&)>.
+
+ Beim Deaktivieren eines SfxDispatchers wird an allen auf seinem
+ Stack befindlichen SfxShells, beginnend mit der obersten, der Handler
+ <SfxShell::Deactivate(sal_Bool)> gerufen.
+*/
+
+{
+ DBG_MEMTEST();
+ SFX_STACK(SfxDispatcher::DoDeactivate);
+
+ SfxApplication *pSfxApp = SFX_APP();
+
+ if ( bMDI )
+ {
+ DBG_TRACE(ByteString("Deactivate Dispatcher ").Append(ByteString::CreateFromInt32( (sal_uInt32) this )).GetBuffer());
+ DBG_ASSERT( pImp->bActive, "Deactivate-Fehler" );
+ pImp->bActive = sal_False;
+
+ if ( pImp->pFrame && !pImp->pFrame->IsA(TYPE(SfxInPlaceFrame)) )
+ {
+ SfxWorkWindow *pWorkWin = pSfxApp->GetWorkWindow_Impl(pImp->pFrame);
+ for (sal_uInt16 n=0; n<pImp->aChildWins.Count();)
+ {
+ SfxChildWindow *pWin =
+ pWorkWin->GetChildWindow_Impl(
+ (sal_uInt16) ( pImp->aChildWins[n] & 0xFFFF ) );
+ if (!pWin || pWin && pWin->GetAlignment() == SFX_ALIGN_NOALIGNMENT)
+ pImp->aChildWins.Remove(n);
+ else
+ n++;
+ }
+ }
+ }
+ else
+ DBG_TRACE( ByteString ("Non-MDI-DeActivate Dispatcher").Append(ByteString::CreateFromInt32( (sal_uInt32) this )).GetBuffer() );
+
+ if ( IsAppDispatcher() && !pSfxApp->IsDowning() )
+ return;
+
+ for ( sal_uInt16 i = 0; i < pImp->aStack.Count(); ++i )
+ pImp->aStack.Top(i)->DoDeactivate(pImp->pFrame, bMDI);
+
+ Flush();
+}
+
+void SfxDispatcher::DoParentDeactivate_Impl()
+{
+ for ( int i = int(pImp->aStack.Count()) - 1; i >= 0; --i )
+ pImp->aStack.Top( (sal_uInt16) i )->ParentDeactivate();
+}
+
+//--------------------------------------------------------------------
+int SfxDispatcher::GetShellAndSlot_Impl
+(
+ sal_uInt16 nSlot, // die zu suchende Slot-Id
+ SfxShell** ppShell, // die SfxShell, welche nSlot z.Zt. bedient
+ const SfxSlot** ppSlot, // der SfxSlot, welcher nSlot z.Zt. bedient
+ sal_Bool bOwnShellsOnly,
+ sal_Bool bModal // trotz ModalMode
+)
+
+/* [Beschreibung]
+
+ Diese Methode sucht im SfxDispatcher nach der <SfxShell>, von der
+ die Slot-Id nSlot zur Zeit bedient wird. Dazu wird der Dispatcher
+ zuvor geflusht.
+
+
+ [R"uckgabewert]
+
+ int sal_True
+ Die SfxShell wurde gefunden, ppShell und ppSlot
+ sind g"ultig.
+
+ sal_True
+ Die SfxShell wurde nicht gefunden, ppShell und ppSlot
+ sind ung"ultig.
+*/
+
+{
+ SFX_STACK(SfxDispatcher::GetShellAndSlot_Impl);
+
+ Flush();
+ SfxSlotServer aSvr;
+ if ( _FindServer(nSlot, aSvr, bModal) )
+ {
+ if ( bOwnShellsOnly && aSvr.GetShellLevel() >= pImp->aStack.Count() )
+ return sal_False;
+
+ *ppShell = GetShell(aSvr.GetShellLevel());
+ *ppSlot = aSvr.GetSlot();
+ if ( 0 == (*ppSlot)->GetExecFnc() )
+ *ppSlot = (*ppShell)->GetInterface()->GetRealSlot(*ppSlot);
+
+#ifdef DBG_UTILx
+ ByteString aMsg( nSlot );
+ aMsg += " found in ";
+ aMsg += (*ppShell)->GetInterface()->GetClassName();
+ DbgTrace( aMsg.GetBuffer() );
+#endif
+
+ return sal_True;
+ }
+
+#ifdef DBG_UTILx
+ ByteString aMsg( nSlot );
+ aMsg += " not found";
+ DbgTrace( aMsg.GetBuffer() );
+#endif
+
+ return sal_False;
+}
+
+/*
+struct Executer : public SfxHint
+{
+ SfxRequest *pRequest;
+ const SfxSlot* pSlot;
+ sal_uInt16 nLevel;
+
+ Executer( SfxRequest* pReq, const SfxSlot* p, sal_uInt16 n )
+ : pRequest( pReq )
+ , pSlot(p)
+ , nLevel(n)
+ {}
+ ~Executer()
+ {delete pRequest;}
+};
+*/
+
+//--------------------------------------------------------------------
+void SfxDispatcher::_Execute
+(
+ SfxShell& rShell, // zu rufende <SfxShell>
+ const SfxSlot& rSlot, // zu rufender <SfxSlot>
+ SfxRequest& rReq, // auszuf"uhrende Funktion (Id und optional Parameter)
+ SfxCallMode eCallMode // synchron, asynchron oder wie beim Slot angegeben
+)
+
+/* [Beschreibung]
+
+ Diese Methode f"uhrt einen Request "uber einen gecachten <Slot-Server>
+ aus.
+*/
+
+{
+ DBG_MEMTEST();
+ DBG_ASSERT( !pImp->bFlushing, "recursive call to dispatcher" );
+ DBG_ASSERT( !pImp->aToDoStack.Count(), "unprepared InPlace _Execute" );
+
+ if ( IsLocked( rSlot.GetSlotId() ) )
+ return;
+
+ sal_uInt16 nSlot = rSlot.GetSlotId();
+ if ( SfxMacroConfig::IsMacroSlot( nSlot ) )
+ SFX_APP()->GetMacroConfig()->RegisterSlotId( nSlot );
+
+ if ( (eCallMode & SFX_CALLMODE_ASYNCHRON) ||
+ ( !(eCallMode & SFX_CALLMODE_SYNCHRON) &&
+ rSlot.IsMode(SFX_SLOT_ASYNCHRON) ) )
+ {
+ SfxDispatcher *pDispat = this;
+ while ( pDispat )
+ {
+ sal_uInt16 nShellCount = pDispat->pImp->aStack.Count();
+ for ( sal_uInt16 n=0; n<nShellCount; n++ )
+ {
+ if ( &rShell == pDispat->pImp->aStack.Top(n) )
+ {
+ pDispat->pImp->xPoster->Post(new SfxRequest(rReq));
+// pDispat->pImp->xPoster->Post(new Executer(new SfxRequest(rReq), &rSlot, n ));
+ return;
+ }
+ }
+
+ pDispat = pDispat->pImp->pParent;
+ }
+ }
+ else
+ Call_Impl( rShell, rSlot, rReq, SFX_CALLMODE_RECORD==(eCallMode&SFX_CALLMODE_RECORD) );
+}
+
+//--------------------------------------------------------------------
+void MappedPut_Impl( SfxAllItemSet &rSet, const SfxPoolItem &rItem )
+
+/* [Beschreibung]
+
+ Hilfsfunktion zum putten von rItem unter der im Pool des Item-Sets
+ rSet geltenden Which-Id.
+*/
+
+{
+ // mit ggf. gemappter Which-Id putten
+ const SfxItemPool *pPool = rSet.GetPool();
+ sal_uInt16 nWhich = rItem.Which();
+#ifdef TF_POOLABLE
+ if ( pPool->IsSlot(nWhich) )
+#else
+ if ( pPool->HasMap() && pPool->IsSlot(nWhich) )
+#endif
+ nWhich = pPool->GetWhich(nWhich);
+ rSet.Put( rItem, nWhich );
+}
+
+//--------------------------------------------------------------------
+
+#ifndef SFX_USE_BINDINGS
+#define SFX_USE_BINDINGS 0x8000
+#endif
+
+sal_uInt16 SfxDispatcher::ExecuteFunction( sal_uInt16 nSlot, SfxPoolItem **pArgs,
+ sal_uInt16 nMode )
+{
+ if ( !nMode )
+ nMode = pImp->nStandardMode;
+
+ // via Bindings/Interceptor? (dann ist der Returnwert nicht exakt)
+ sal_Bool bViaBindings = SFX_USE_BINDINGS == ( nMode & SFX_USE_BINDINGS );
+ nMode &= ~sal_uInt16(SFX_USE_BINDINGS);
+ if ( bViaBindings && GetBindings() )
+ return GetBindings()->Execute( nSlot, (const SfxPoolItem **) pArgs, nMode )
+ ? EXECUTE_POSSIBLE
+ : EXECUTE_NO;
+
+ // sonst via Dispatcher
+ if ( IsLocked(nSlot) )
+ return 0;
+ SfxShell *pShell = 0;
+ SfxCallMode eCall = SFX_CALLMODE_SYNCHRON;
+ sal_uInt16 nRet = EXECUTE_NO;
+ const SfxSlot *pSlot = 0;
+ if ( GetShellAndSlot_Impl( nSlot, &pShell, &pSlot, sal_False, sal_False ) )
+ {
+ // Ausf"uhrbarkeit vorher testen
+ if ( pSlot->IsMode( SFX_SLOT_FASTCALL ) ||
+ pShell->CanExecuteSlot_Impl( *pSlot ) )
+ nRet = EXECUTE_POSSIBLE;
+
+ if ( nMode == EXECUTEMODE_ASYNCHRON )
+ eCall = SFX_CALLMODE_ASYNCHRON;
+ else if ( nMode == EXECUTEMODE_DIALOGASYNCHRON && pSlot->IsMode( SFX_SLOT_HASDIALOG ) )
+ eCall = SFX_CALLMODE_ASYNCHRON;
+ else if ( pSlot->GetMode() & SFX_SLOT_ASYNCHRON )
+ eCall = SFX_CALLMODE_ASYNCHRON;
+ sal_Bool bDone = sal_False;
+ if ( pArgs && *pArgs )
+ {
+ SfxAllItemSet aSet( pShell->GetPool() );
+ for ( SfxPoolItem **pArg = pArgs; *pArg; ++pArg )
+ MappedPut_Impl( aSet, **pArg );
+ SfxRequest aReq( nSlot, eCall, aSet );
+ _Execute( *pShell, *pSlot, aReq, eCall );
+ bDone = aReq.IsDone();
+ }
+ else
+ {
+ SfxRequest aReq( nSlot, eCall, pShell->GetPool() );
+ _Execute( *pShell, *pSlot, aReq, eCall );
+ bDone = aReq.IsDone();
+ }
+ }
+
+ return nRet;
+}
+
+sal_uInt16 SfxDispatcher::GetSlotId( const String& rCommand )
+{
+ // Anzahl der Shells auf den verkettenten Dispatchern z"ahlen
+ Flush();
+ sal_uInt16 nTotCount = pImp->aStack.Count();
+ if ( pImp->pParent )
+ {
+ SfxDispatcher *pParent = pImp->pParent;
+ while ( pParent )
+ {
+ nTotCount += pParent->pImp->aStack.Count();
+ pParent = pParent->pImp->pParent;
+ }
+ }
+
+ const SfxSlot *pSlot=NULL;
+ sal_uInt16 nFirstShell = 0;
+ for ( sal_uInt16 i = nFirstShell; i < nTotCount; ++i )
+ {
+ SfxShell *pObjShell = GetShell(i);
+ SfxInterface *pIFace = pObjShell->GetInterface();
+ pSlot = pIFace->GetSlot( rCommand );
+ if ( pSlot )
+ return pSlot->GetSlotId();
+ }
+
+ return 0;
+}
+
+//--------------------------------------------------------------------
+int SfxExecuteItem::operator==( const SfxPoolItem& rItem ) const
+{
+ SfxExecuteItem& rArg = (SfxExecuteItem& )rItem;
+ sal_uInt16 nCount = Count();
+ if( nCount != rArg.Count() )
+ return sal_False;
+ while( nCount -- )
+ if( *GetObject( nCount ) != *rArg.GetObject( nCount ) )
+ return sal_False;
+ return eCall == rArg.eCall;
+}
+
+//--------------------------------------------------------------------
+SfxPoolItem* SfxExecuteItem::Clone( SfxItemPool* pPool ) const
+{
+ return new SfxExecuteItem( *this );
+}
+
+//--------------------------------------------------------------------
+SfxExecuteItem::SfxExecuteItem( const SfxExecuteItem& rArg )
+ : SfxPoolItem( rArg ), nModifier( 0 )
+{
+ eCall = rArg.eCall;
+ nSlot = rArg.nSlot;
+ sal_uInt16 nCount = rArg.Count();
+ for( sal_uInt16 nPos = 0; nPos < nCount; nPos++ )
+ Insert( rArg[ nPos ]->Clone(), nPos );
+}
+
+//--------------------------------------------------------------------
+SfxExecuteItem::SfxExecuteItem(
+ sal_uInt16 nWhich, sal_uInt16 nSlotP, SfxCallMode eModeP,
+ const SfxPoolItem* pArg1, ... ) :
+ SfxPoolItem( nWhich ), eCall( eModeP ), nSlot( nSlotP ), nModifier( 0 )
+{
+ va_list pVarArgs;
+ va_start( pVarArgs, pArg1 );
+ for ( const SfxPoolItem *pArg = pArg1; pArg;
+ pArg = va_arg( pVarArgs, const SfxPoolItem* ) )
+ Insert( pArg->Clone(), Count() );
+ va_end(pVarArgs);
+}
+
+//--------------------------------------------------------------------
+SfxExecuteItem::SfxExecuteItem(
+ sal_uInt16 nWhich, sal_uInt16 nSlotP, SfxCallMode eModeP )
+ : SfxPoolItem( nWhich ), nSlot( nSlotP ), eCall( eModeP ), nModifier( 0 )
+{
+}
+
+//--------------------------------------------------------------------
+const SfxPoolItem* SfxDispatcher::Execute( const SfxExecuteItem& rItem )
+{
+ const SfxPoolItem** pPtr = new const SfxPoolItem*[ rItem.Count() + 1 ];
+ for( sal_uInt16 nPos = rItem.Count(); nPos--; )
+ pPtr[ nPos ] = rItem.GetObject( nPos );
+ pPtr[ rItem.Count() ] = 0;
+ const SfxPoolItem* pRet = Execute(
+ rItem.GetSlot(), rItem.GetCallMode(), pPtr, rItem.GetModifier() );
+
+ __DELETE(rItem.Count() + 1) (SfxPoolItem**)pPtr;
+
+ return pRet;
+}
+
+//--------------------------------------------------------------------
+const SfxPoolItem* SfxDispatcher::Execute
+(
+ sal_uInt16 nSlot, // die Id der auszufuehrenden Funktion
+ SfxCallMode eCall, // SFX_CALLMODE_SYNCRHON, ..._ASYNCHRON oder ..._SLOT
+ const SfxPoolItem **pArgs, // 0-terminiertes C-Array von Parametern
+ sal_uInt16 nModi,
+ const SfxPoolItem **pInternalArgs // 0-terminiertes C-Array von Parametern
+)
+
+/* [Beschreibung]
+
+ Methode zum Ausf"uhren eines <SfxSlot>s "uber die Slot-Id.
+
+
+ [R"uckgabewert]
+
+ const SfxPoolItem* Pointer auf ein bis zum n"achsten Durchlauf
+ der Message-Loop g"ultiges SfxPoolItem,
+ welches den R"uckgabewert enth"alt.
+
+ Oder ein 0-Pointer, wenn die Funktion nicht
+ ausgef"uhrt wurde (z.B. Abbruch durch den
+ Benutzer).
+*/
+
+{
+ if ( IsLocked(nSlot) )
+ return 0;
+
+ SfxShell *pShell = 0;
+ const SfxSlot *pSlot = 0;
+ if ( GetShellAndSlot_Impl( nSlot, &pShell, &pSlot, sal_False,
+ SFX_CALLMODE_MODAL==(eCall&SFX_CALLMODE_MODAL) ) )
+ {
+ SfxRequest* pReq;
+ if ( pArgs && *pArgs )
+ {
+ SfxAllItemSet aSet( pShell->GetPool() );
+ for ( const SfxPoolItem **pArg = pArgs; *pArg; ++pArg )
+ MappedPut_Impl( aSet, **pArg );
+ pReq = new SfxRequest( nSlot, eCall, aSet );
+ }
+ else
+ pReq = new SfxRequest( nSlot, eCall, pShell->GetPool() );
+ pReq->SetModifier( nModi );
+ if( pInternalArgs && *pInternalArgs)
+ {
+ SfxAllItemSet aSet( SFX_APP()->GetPool() );
+ for ( const SfxPoolItem **pArg = pInternalArgs; *pArg; ++pArg )
+ aSet.Put( **pArg );
+ pReq->SetInternalArgs_Impl( aSet );
+ }
+ _Execute( *pShell, *pSlot, *pReq, eCall );
+ const SfxPoolItem* pRet = pReq->GetReturnValue();
+ delete pReq; return pRet;
+ }
+ return 0;
+}
+
+//--------------------------------------------------------------------
+const SfxPoolItem* SfxDispatcher::Execute
+(
+ sal_uInt16 nSlot, // die Id der auszufuehrenden Funktion
+ SfxCallMode eCall, // SFX_CALLMODE_SYNCRHON, ..._ASYNCHRON oder ..._SLOT
+ const SfxItemSet &rArgs // <SfxItemSet> mit Parametern
+)
+
+/* [Beschreibung]
+
+ Methode zum Ausf"uhren eines <SfxSlot>s "uber die Slot-Id.
+
+
+ [R"uckgabewert]
+
+ const SfxPoolItem* Pointer auf ein bis zum n"achsten Durchlauf
+ der Message-Loop g"ultiges SfxPoolItem,
+ welches den R"uckgabewert enth"alt.
+
+ Oder ein 0-Pointer, wenn die Funktion nicht
+ ausgef"uhrt wurde (z.B. Abbruch durch den
+ Benutzer).
+*/
+
+{
+ if ( IsLocked(nSlot) )
+ return 0;
+
+ SfxShell *pShell = 0;
+ const SfxSlot *pSlot = 0;
+ if ( GetShellAndSlot_Impl( nSlot, &pShell, &pSlot, sal_False,
+ SFX_CALLMODE_MODAL==(eCall&SFX_CALLMODE_MODAL) ) )
+ {
+ SfxAllItemSet aSet( pShell->GetPool() );
+ SfxItemIter aIter(rArgs);
+ for ( const SfxPoolItem *pArg = aIter.FirstItem();
+ pArg;
+ pArg = aIter.NextItem() )
+ MappedPut_Impl( aSet, *pArg );
+ SfxRequest aReq( nSlot, eCall, aSet );
+ _Execute( *pShell, *pSlot, aReq, eCall );
+ return aReq.GetReturnValue();
+ }
+ return 0;
+}
+
+//--------------------------------------------------------------------
+const SfxPoolItem* SfxDispatcher::_Execute
+(
+ sal_uInt16 nSlot, // die Id der auszufuehrenden Funktion
+ SfxCallMode eCall, // SFX_CALLMODE_SYNCRHON, ..._ASYNCHRON oder ..._SLOT
+ va_list pVarArgs, // Parameterliste ab 2. Parameter
+ const SfxPoolItem* pArg1 // erster Parameter
+)
+
+/* [Beschreibung]
+
+ Methode zum Ausf"uhren eines <SfxSlot>s "uber die Slot-Id.
+
+
+ [R"uckgabewert]
+
+ const SfxPoolItem* Pointer auf ein bis zum n"achsten Durchlauf
+ der Message-Loop g"ultiges SfxPoolItem,
+ welches den R"uckgabewert enth"alt.
+
+ Oder ein 0-Pointer, wenn die Funktion nicht
+ ausgef"uhrt wurde (z.B. Abbruch durch den
+ Benutzer).
+*/
+
+{
+ if ( IsLocked(nSlot) )
+ return 0;
+
+ SfxShell *pShell = 0;
+ const SfxSlot *pSlot = 0;
+ if ( GetShellAndSlot_Impl( nSlot, &pShell, &pSlot, sal_False,
+ SFX_CALLMODE_MODAL==(eCall&SFX_CALLMODE_MODAL) ) )
+ {
+ SfxAllItemSet aSet( pShell->GetPool() );
+
+ for ( const SfxPoolItem *pArg = pArg1;
+ pArg;
+ pArg = va_arg( pVarArgs, const SfxPoolItem* ) )
+ MappedPut_Impl( aSet, *pArg );
+
+ SfxRequest aReq( nSlot, eCall, aSet );
+ _Execute( *pShell, *pSlot, aReq, eCall );
+ return aReq.GetReturnValue();
+ }
+ return 0;
+}
+
+//--------------------------------------------------------------------
+const SfxPoolItem* SfxDispatcher::Execute
+(
+ sal_uInt16 nSlot, // die Id der auszufuehrenden Funktion
+ SfxCallMode eCall, // SFX_CALLMODE_SYNCRHON, ..._ASYNCHRON oder ..._SLOT
+ const SfxPoolItem* pArg1, // erster Parameter
+ ... // 0-terminiertes Liste Parametern
+)
+
+/* [Beschreibung]
+
+ Methode zum Ausf"uhren eines <SfxSlot>s "uber die Slot-Id.
+
+
+ [Anmerkung]
+
+ Die Parameter werden kopiert, k"onnen daher als Adresse von
+ Stack-Objekten "ubergeben werden.
+
+
+ [R"uckgabewert]
+
+ const SfxPoolItem* Pointer auf ein bis zum n"achsten Durchlauf
+ der Message-Loop g"ultiges SfxPoolItem,
+ welches den R"uckgabewert enth"alt.
+
+ Oder ein 0-Pointer, wenn die Funktion nicht
+ ausgef"uhrt wurde (z.B. Abbruch durch den
+ Benutzer).
+
+
+ [Beispiel]
+
+ pDispatcher->Execute( SID_OPENDOCUMENT, SFX_CALLMODE_SYNCHRON,
+ &SfxStringItem( SID_FILE_NAME, "\\tmp\\temp.sdd" ),
+ &SfxStringItem( SID_FILTER_NAME, "StarDraw Presentation" ),
+ &SfxBoolItem( SID_DOC_READONLY, sal_False ),
+ 0L );
+*/
+
+{
+ if ( IsLocked(nSlot) )
+ return 0;
+
+ SfxShell *pShell = 0;
+ const SfxSlot *pSlot = 0;
+ if ( GetShellAndSlot_Impl( nSlot, &pShell, &pSlot, sal_False,
+ SFX_CALLMODE_MODAL==(eCall&SFX_CALLMODE_MODAL) ) )
+ {
+ SfxAllItemSet aSet( pShell->GetPool() );
+
+ va_list pVarArgs;
+ va_start( pVarArgs, pArg1 );
+ for ( const SfxPoolItem *pArg = pArg1;
+ pArg;
+ pArg = va_arg( pVarArgs, const SfxPoolItem* ) )
+ MappedPut_Impl( aSet, *pArg );
+ va_end(pVarArgs);
+
+ SfxRequest aReq( nSlot, eCall, aSet );
+ _Execute( *pShell, *pSlot, aReq, eCall );
+ return aReq.GetReturnValue();
+ }
+ return 0;
+}
+
+//--------------------------------------------------------------------
+
+IMPL_LINK( SfxDispatcher, PostMsgHandler, SfxRequest*, pReq )
+
+/* [Beschreibung]
+
+ Hilfsmethode zum Empfangen der asynchron auszuf"uhrenden <SfxRequest>s.
+*/
+
+{
+ DBG_MEMTEST();
+ DBG_ASSERT( !pImp->bFlushing, "recursive call to dispatcher" );
+ SFX_STACK(SfxDispatcher::PostMsgHandler);
+
+ // ist auch der Pool noch nicht gestorben?
+// SfxRequest* pReq = pExec->pRequest;
+ if ( !pReq->IsCancelled() )
+ {
+ if ( !IsLocked(pReq->GetSlot()) )
+ {
+ Flush();
+ SfxSlotServer aSvr;
+ if ( _FindServer(pReq->GetSlot(), aSvr, HACK(x) sal_True ) )
+// SfxShell *pShell = GetShell(pExec->nLevel);
+// if ( pShell && pShell->GetInterface()->GetSlot( pExec->pSlot->GetSlotId() ) )
+ {
+ const SfxSlot *pSlot = aSvr.GetSlot();
+ SfxShell *pSh = GetShell(aSvr.GetShellLevel());
+
+ DBG( SfxApplication *pSfxApp = SFX_APP() );
+ DBG( pSfxApp->EnterAsynchronCall_Impl() );
+
+ // Wenn pSlot ein "Pseudoslot" f"ur Macros oder Verben ist, kann
+ // er im Call_Impl zerst"ort werden, also nicht mehr benutzen!
+ pReq->SetSynchronCall( sal_False );
+ Call_Impl( *pSh, *pSlot, *pReq, sal_True ); //! woher bRecord?
+// Call_Impl( *pShell, *pExec->pSlot, *pReq, sal_True ); //! woher bRecord?
+ DBG( pSfxApp->LeaveAsynchronCall_Impl() );
+ }
+
+// delete pExec;
+ }
+ else
+ {
+// pImp->xPoster->Post(pExec);
+ pImp->xPoster->Post(new SfxRequest(*pReq));
+ }
+ }
+// else
+// delete pExec;
+
+ delete pReq;
+ return 0;
+}
+//--------------------------------------------------------------------
+void SfxDispatcher::EnterAction( const String& rName )
+
+// marks the beginning of a block of actions
+
+{
+ DBG_MEMTEST();
+ Flush();
+ DBG_ASSERT( pImp->aStack.Count() > 0, "EnterAction on empty dispatcher stack" );
+ if ( ++pImp->nActionLevel == 1 )
+ {
+ SfxUndoManager *pUndoMgr = GetShell(0)->GetUndoManager();
+ if ( pUndoMgr )
+ pUndoMgr->EnterListAction( rName, rName HACK(RepeatComment), 0 HACK(ID) );
+ }
+}
+//--------------------------------------------------------------------
+void SfxDispatcher::LeaveAction()
+
+// marks the end of a block of actions
+
+{
+ DBG_MEMTEST();
+ DBG_ASSERT( pImp->nActionLevel > 0, "EnterAction without LeaveAction" );
+ if ( --pImp->nActionLevel == 0 )
+ {
+ SfxUndoManager *pUndoMgr = GetShell(0)->GetUndoManager();
+ if ( pUndoMgr )
+ pUndoMgr->LeaveListAction();
+ }
+}
+//--------------------------------------------------------------------
+void SfxDispatcher::SetMenu_Impl()
+{
+ SfxApplication *pSfxApp = SFX_APP();
+ if ( pImp->pFrame )
+ {
+ if ( !pImp->pFrame->GetViewShell() )
+ return;
+
+ SfxTopViewFrame* pTop= PTR_CAST( SfxTopViewFrame, pImp->pFrame->GetTopViewFrame() );
+ if ( pTop && pTop->GetBindings().GetDispatcher() == this )
+ {
+ SfxTopFrame* pFrm = pTop->GetTopFrame_Impl();
+ SfxMenuBarManager* pMenuBar = pImp->pFrame->GetViewShell()->GetMenuBar_Impl();
+ if ( pMenuBar )
+ {
+ MenuBar* pMenu = (MenuBar*) pMenuBar->GetMenu()->GetSVMenu();
+ pFrm->LockResize_Impl( TRUE );
+ pFrm->SetMenuBar_Impl( pMenu );
+ pFrm->LockResize_Impl( FALSE );
+ }
+ else if ( pImp->pParent )
+ {
+ pImp->pParent->SetMenu_Impl();
+ }
+ }
+ }
+}
+
+long SfxDispatcher::Update_Impl( sal_Bool bForce )
+
+/* [Beschreibung]
+
+ Hilfsmethode zum Updaten der <Object-Bars> und <Object-Menus>,
+ nach Bewegungen auf dem Stack.
+*/
+
+{
+ SFX_STACK(SfxDispatcher::Update_Impl);
+
+ Flush();
+
+ if ( !pImp->pFrame )
+ return 0;
+
+ if ( pImp->bUILocked )
+ return 0;
+
+ SfxApplication *pSfxApp = SFX_APP();
+ SfxDispatcher *pDisp = this;
+ sal_Bool bUpdate = bForce;
+ while ( pDisp && pDisp->pImp->pFrame )
+ {
+ SfxWorkWindow *pWork = pSfxApp->GetWorkWindow_Impl( pDisp->pImp->pFrame );
+ SfxDispatcher *pAct = pWork->GetBindings().GetDispatcher_Impl();
+ if ( pAct == pDisp || pAct == this )
+ {
+ if ( !bUpdate )
+ bUpdate = !pDisp->pImp->bUpdated;
+ pDisp->pImp->bUpdated = sal_True;
+ }
+ else
+ break;
+
+ pDisp = pDisp->pImp->pParent;
+ }
+
+ if ( !bUpdate )
+ return 0;
+
+ SfxTopViewFrame* pTop = pImp->pFrame ? PTR_CAST( SfxTopViewFrame, pImp->pFrame->GetTopViewFrame() ) : NULL;
+ sal_Bool bUIActive = pTop && pTop->GetBindings().GetDispatcher() == this;
+ SfxMenuBarManager* pAppMenu = NULL;
+
+ if ( !bUIActive && pTop && GetBindings() == &pTop->GetBindings() )
+ // Eigene Tools nur intern festhalten und da"fur sorgen, da\s der
+ // aktive Dispatcher sie abholt
+ GetBindings()->GetDispatcher()->pImp->bUpdated = sal_False;
+
+ // Bindings schlafen legen
+ SfxBindings* pBindings = GetBindings();
+ if ( pBindings )
+ pBindings->DENTERREGISTRATIONS();
+
+ // Test auf InPlaceFrame und speziell internes InPlace
+ SfxInPlaceFrame *pIPFrame = PTR_CAST ( SfxInPlaceFrame, pImp->pFrame);
+ sal_Bool bIsIPOwner = (pIPFrame && pIPFrame->GetObjectShell()->GetInPlaceObject()->GetIPClient()->Owner());
+ SvInPlaceClient *pClient = pImp->pFrame ? pImp->pFrame->GetViewShell()->GetIPClient() : NULL;
+ if ( bUIActive && !pIPFrame && ( !pClient || !pClient->GetProtocol().IsUIActive() ) )
+ {
+ SetMenu_Impl();
+ pAppMenu = pImp->pFrame->GetViewShell()->GetMenuBar_Impl();
+ pAppMenu->ResetObjectMenus();
+ }
+
+ // Environment
+ SfxWorkWindow *pWorkWin = pSfxApp->GetWorkWindow_Impl(pImp->pFrame);
+
+ // der SfxInternalFrame oder SfxTopViewFrame, zu dem ich geh"ore
+ SfxViewFrame *pAct =
+ bIsIPOwner ?
+ pImp->pFrame->GetParentViewFrame_Impl() :
+ pImp->pFrame;
+
+ // Ich kontrolliere die StatusBar einer Task auch wenn ich nicht aktiv bin, aber
+ // zu einem internem InPlaceFrame oder einem anderen ViewFrame innerhalb der Task geh"ore
+ SfxFrame *pTask = pAct ? pAct->GetFrame()->GetTopFrame() : NULL;
+
+ SfxWorkWindow *pTaskWin = NULL;
+ sal_Bool bSet = sal_True;
+ if ( pImp->pFrame && pImp->pFrame->GetViewShell() )
+ {
+ SvInPlaceClient *pClient = pImp->pFrame->GetViewShell()->GetIPClient();
+ if ( pClient && pClient->GetProtocol().IsUIActive() )
+ bSet = sal_False;
+ }
+
+ if ( pTask && bSet )
+ {
+ pTaskWin = pTask->GetWorkWindow_Impl();
+ pTaskWin->ResetStatusBar_Impl();
+ }
+
+ SfxDispatcher *pDispat = this;
+ while ( pDispat )
+ {
+ SfxWorkWindow *pWork = pSfxApp->GetWorkWindow_Impl(pDispat->pImp->pFrame);
+ SfxDispatcher *pAct = pWork->GetBindings().GetDispatcher_Impl();
+ if ( pAct == pDispat || pAct == this )
+ {
+ pWork->ResetObjectBars_Impl();
+ pWork->ResetChildWindows_Impl();
+ }
+
+ pDispat = pDispat->pImp->pParent;
+ }
+
+ sal_Bool bIsActive = sal_False;
+ SfxDispatcher *pActDispat = pWorkWin->GetBindings().GetDispatcher_Impl();
+ pDispat = this;
+ while ( pActDispat && !bIsActive )
+ {
+ if ( pDispat == pActDispat )
+ bIsActive = sal_True;
+ pActDispat = pActDispat->pImp->pParent;
+ }
+
+ if ( !pIPFrame && !IsAppDispatcher() && bIsActive )
+ CollectTools_Impl( pWorkWin );
+
+ // Jetzt rekursiv die Dispatcher abklappern
+ sal_uInt32 nHelpId = _Update_Impl( bUIActive, !pIPFrame, bIsIPOwner, pAppMenu, bSet ? pTaskWin : NULL );
+ if ( bUIActive || bIsActive )
+ {
+ pWorkWin->UpdateObjectBars_Impl();
+
+ if ( pAppMenu )
+ pAppMenu->UpdateObjectMenus();
+
+ if ( bUIActive )
+ {
+ // ggf. Hilfe-PI antriggern
+ SfxHelpPI* pHelpPI = pSfxApp->GetHelpPI();
+ if (pHelpPI && nHelpId)
+ pHelpPI->LoadTopic( nHelpId );
+ }
+ }
+
+ if ( pTaskWin )
+ pTaskWin->UpdateStatusBar_Impl();
+
+ if ( pBindings )
+ pBindings->DLEAVEREGISTRATIONS();
+ return 1;
+}
+
+
+void SfxDispatcher::CollectTools_Impl( SfxWorkWindow* pWorkWin )
+{
+ // Innerhalb eines ToolSpace werden auch die Tools von nicht aktiven Frames
+ // angezeigt, damit es beim Wechsel der Frames nicht zappelt
+ SfxApplication *pSfxApp = SFX_APP();
+ SfxToolBoxConfig *pTbxCfg = SfxToolBoxConfig::GetOrCreate();
+
+ // Die Objectbars aller ViewFrames der aktuellen Task einsammeln
+ for ( SfxViewFrame* pViewFrame = SfxViewFrame::GetFirst();
+ pViewFrame;
+ pViewFrame = SfxViewFrame::GetNext(*pViewFrame) )
+ {
+ // Frames mit anderem WorkWindow interessieren hier nicht
+ if ( pViewFrame->GetFrame()->GetWorkWindow_Impl() != pWorkWin )
+ continue;
+
+ // Nur weitermachen, wenn es nicht sowieso einer meiner parents ist
+ SfxDispatcher *pDispat = pViewFrame->GetDispatcher();
+ SfxDispatcher *pParent = this;
+ while ( pParent )
+ {
+ if ( pParent == pDispat )
+ break;
+ pParent = pParent->pImp->pParent;
+ }
+
+ if ( pParent )
+ continue;
+
+ // Alle objectbars des ViewFrames vormerken
+ sal_uInt16 n;
+ for (n=0; n<SFX_OBJECTBAR_MAX; n++)
+ {
+ SfxObjectBars_Impl& rBar = pDispat->pImp->aObjBars[n];
+ sal_uInt16 nId = rBar.aResId.GetId();
+ if ( nId && pTbxCfg->GetAlignment(n) != SFX_ALIGN_NOALIGNMENT )
+ pWorkWin->SetObjectBar_Impl( rBar.nMode,
+ rBar.aResId, rBar.pIFace, &rBar.aName );
+ }
+
+ SfxShell *pShell = pDispat->GetShell(0);
+ SfxModule *pMod = pShell->GetInterface()->GetModule();
+ SfxSlotPool& rSlotPool = pMod ? *pMod->GetSlotPool() : pShell->GetSlotPool_Impl();
+
+ // ChildWindows auch "bunkern"
+ for (n=0; n<pDispat->pImp->aChildWins.Count(); n++)
+ {
+ sal_uInt32 nId = pDispat->pImp->aChildWins[n];
+ const SfxSlot *pSlot = rSlotPool.GetSlot( (sal_uInt16) nId );
+ sal_uInt16 nMode = SFX_VISIBILITY_STANDARD;
+ if( pSlot )
+ {
+ if ( pSlot->IsMode(SFX_SLOT_CONTAINER) )
+ {
+ if ( !pWorkWin->IsVisible_Impl( SFX_VISIBILITY_CLIENT ) )
+ continue;
+ nMode |= SFX_VISIBILITY_CLIENT;
+ }
+ else
+ {
+ if ( !pWorkWin->IsVisible_Impl( SFX_VISIBILITY_SERVER ) )
+ continue;
+ nMode |= SFX_VISIBILITY_SERVER;
+ }
+ }
+
+ pWorkWin->SetChildWindowVisible_Impl( nId, sal_False, nMode );
+ }
+ }
+}
+
+
+sal_uInt32 SfxDispatcher::_Update_Impl( sal_Bool bUIActive, sal_Bool bIsMDIApp,
+ sal_Bool bIsIPOwner, SfxMenuBarManager *pAppMenu, SfxWorkWindow *pTaskWin )
+{
+ sal_uInt32 nHelpId = 0L;
+ SfxApplication *pSfxApp = SFX_APP();
+ SfxWorkWindow *pWorkWin = pSfxApp->GetWorkWindow_Impl( pImp->pFrame );
+ sal_Bool bIsActive = sal_False;
+ sal_Bool bIsTaskActive = sal_False;
+ SfxDispatcher *pActDispat = pWorkWin->GetBindings().GetDispatcher_Impl();
+ SfxDispatcher *pDispat = this;
+ while ( pActDispat && !bIsActive )
+ {
+ if ( pDispat == pActDispat )
+ bIsActive = sal_True;
+ pActDispat = pActDispat->pImp->pParent;
+ }
+
+ if ( pImp->pParent && !pImp->bQuiet /* && bUIActive */ )
+ // Das Men"u kommt immer vom obersten Dispatcher, also pAppMenu nicht weiterreichen
+ nHelpId = pImp->pParent->_Update_Impl( bUIActive, bIsMDIApp, bIsIPOwner, NULL, pTaskWin );
+
+ // Internen Zwischenspeicher ObjectBars und ChildWindows zur"ucksetzen
+ for (sal_uInt16 n=0; n<SFX_OBJECTBAR_MAX; n++)
+ pImp->aObjBars[n].aResId = ResId( 0,0 );
+ pImp->aChildWins.Remove(0, pImp->aChildWins.Count());
+
+ // bQuiet : eigene Shells weder f"ur UI noch f"ur SlotServer ber"ucksichtigen
+ // bNoUI: eigene Shells f"ur das UI nicht ber"ucksichtigen
+ if ( pImp->bQuiet || pImp->bNoUI || pImp->pFrame && pImp->pFrame->GetObjectShell()->IsPreview() )
+ return nHelpId;
+
+ sal_uInt16 nStatBarId=0;
+ SfxShell *pStatusBarShell = NULL;
+
+ sal_uInt16 nTotCount = pImp->aStack.Count();
+ for ( sal_uInt16 nShell = nTotCount; nShell > 0; --nShell )
+ {
+ SfxShell *pShell = GetShell( nShell-1 );
+ SfxInterface *pIFace = pShell->GetInterface();
+ if (pShell->GetHelpId())
+ nHelpId = pShell->GetHelpId();
+
+ // Shells von Dispatcher mit Attribut "Hidden" oder "Quiet" auslassen
+ sal_Bool bReadOnlyShell = IsReadOnlyShell_Impl( nShell-1 );
+ SfxSlotPool& rSlotPool = pIFace->GetModule() ?
+ *pIFace->GetModule()->GetSlotPool() : pShell->GetSlotPool_Impl();
+
+ sal_uInt16 nNo;
+ for ( nNo = 0; pIFace && nNo<pIFace->GetObjectBarCount(); ++nNo )
+ {
+ sal_uInt16 nPos = pIFace->GetObjectBarPos(nNo);
+ if ( bReadOnlyShell && !( nPos & SFX_VISIBILITY_READONLYDOC ) )
+ continue;
+
+ // Soll die ObjectBar nur angezeigt werden, wenn die Shell
+ // einen bestimmten UI-Modus hat?
+ sal_uInt32 nFeature = pIFace->GetObjectBarFeature(nNo);
+ if ( nFeature && !pShell->HasUIFeature( nFeature ) )
+ continue;
+
+ // Auf jeden Fall eintragen, auch wenn unsichtbar. Dann kann
+ // WorkWindow anbieten, wieder anzuschalten
+ sal_Bool bVisible = pIFace->IsObjectBarVisible(nNo);
+ if ( !bVisible )
+ nPos &= SFX_POSITION_MASK;
+
+ SfxObjectBars_Impl& rBar = pImp->aObjBars[nPos & SFX_POSITION_MASK];
+ rBar.nMode = nPos;
+ rBar.aResId = pIFace->GetObjectBarResId(nNo);
+ const String *pName = pIFace->GetObjectBarName(nNo);
+ if ( pName )
+ rBar.aName = *pName;
+ else
+ rBar.aName.Erase();
+ rBar.pIFace = pIFace;
+
+ if ( bUIActive || bIsActive )
+ {
+ pWorkWin->SetObjectBar_Impl(
+ nPos, rBar.aResId, rBar.pIFace, &rBar.aName );
+ }
+
+ if ( !bVisible )
+ rBar.aResId = ResId( 0,0 );
+ }
+
+ for ( nNo=0; pIFace && nNo<pIFace->GetChildWindowCount(); nNo++ )
+ {
+ sal_uInt32 nId = pIFace->GetChildWindowId(nNo);
+ const SfxSlot *pSlot = rSlotPool.GetSlot( (sal_uInt16) nId );
+ DBG_ASSERT( pSlot, "Da fehlt ein Childwindow-Slot!");
+ if ( bReadOnlyShell )
+ {
+ // Bei read only documents nur solche ChildWindows anzeigen,
+ // die daf"ur freigegeben sind
+ if ( pSlot && !pSlot->IsMode( SFX_SLOT_READONLYDOC ) )
+ continue;
+ }
+
+ sal_uInt32 nFeature = pIFace->GetChildWindowFeature(nNo);
+ if ( nFeature && !pShell->HasUIFeature( nFeature ) )
+ continue;
+
+ // Bei den anderen auf CONTAINER/SERVER-Slots abfragen
+ sal_uInt16 nMode = SFX_VISIBILITY_STANDARD;
+ if( pSlot )
+ {
+ if ( pSlot->IsMode(SFX_SLOT_CONTAINER) )
+ {
+ if ( !pWorkWin->IsVisible_Impl( SFX_VISIBILITY_CLIENT ) )
+ continue;
+ nMode |= SFX_VISIBILITY_CLIENT;
+ }
+ else
+ {
+ if ( !pWorkWin->IsVisible_Impl( SFX_VISIBILITY_SERVER ) )
+ continue;
+ nMode |= SFX_VISIBILITY_SERVER;
+ }
+ }
+
+ if ( bUIActive || bIsActive )
+ pWorkWin->SetChildWindowVisible_Impl( nId, sal_True, nMode );
+ if ( bUIActive || bIsActive || !pWorkWin->IsFloating( (sal_uInt16) ( nId & 0xFFFF ) ) )
+ pImp->aChildWins.Insert( nId, pImp->aChildWins.Count());
+ }
+
+ if ( pAppMenu )
+ {
+ // update Object-Menus
+ for ( nNo = 0; pIFace && nNo<pIFace->GetObjectMenuCount(); ++nNo )
+ pAppMenu->SetObjectMenu( pIFace->GetObjectMenuPos(nNo),
+ pIFace->GetObjectMenuResId(nNo));
+ }
+
+ if ( bIsMDIApp || bIsIPOwner )
+ {
+ // Bei MDIEnvironment oder internem InPlace Statuszeile setzen
+ sal_uInt16 nId = pIFace->GetStatusBarResId().GetId();
+ if ( nId )
+ {
+ nStatBarId = nId;
+ pStatusBarShell = pShell;
+ }
+ }
+ }
+
+ for ( sal_uInt16 nPos=0; nPos<SFX_OBJECTBAR_MAX; nPos++ )
+ {
+ SfxObjectBars_Impl& rFixed = pImp->aFixedObjBars[nPos];
+ if ( rFixed.aResId.GetId() )
+ {
+ SfxObjectBars_Impl& rBar = pImp->aObjBars[nPos];
+ rBar = rFixed;
+ pWorkWin->SetObjectBar_Impl( rFixed.nMode,
+ rFixed.aResId, rFixed.pIFace, &rFixed.aName );
+ }
+ }
+
+ if ( pTaskWin && ( bIsMDIApp || bIsIPOwner ) )
+ {
+ SfxDispatcher *pActDispat = pTaskWin->GetBindings().GetDispatcher_Impl();
+ SfxDispatcher *pDispat = this;
+ if ( bIsIPOwner && pImp->pFrame )
+ pDispat = pImp->pFrame->GetParentViewFrame_Impl()->GetDispatcher();
+
+ while ( pActDispat && !bIsTaskActive )
+ {
+ if ( pDispat == pActDispat )
+ bIsTaskActive = sal_True;
+ pActDispat = pActDispat->pImp->pParent;
+ }
+
+ if ( bIsTaskActive && nStatBarId && pImp->pFrame )
+ {
+ // Ich kontrolliere die StatusBar einer Task auch wenn ich nicht aktiv bin, aber
+ // zu einem internem InPlaceFrame oder einem anderen ViewFrame innerhalb der Task geh"ore
+ SfxBindings& rBindings = pImp->pFrame->GetBindings();
+ pTaskWin->SetStatusBar_Impl( nStatBarId, pStatusBarShell, rBindings );
+ }
+ }
+
+ return nHelpId;
+}
+
+//--------------------------------------------------------------------
+long SfxDispatcher::UpdateObjectMenus_Impl( SfxMenuBarManager *pMenuMgr )
+
+/* [Beschreibung]
+
+ Hilfsmethode zum Updaten der <Object-Menus>.
+*/
+
+{
+ SFX_STACK(SfxDispatcher::UpdateObjecteMenus_Impl);
+
+ Flush();
+
+ if (!pImp->pFrame && !IsAppDispatcher())
+ {
+ DBG_ERROR( "Dispatcher ohne Frame aber mit Parent?!?" );
+ return 0;
+ }
+
+ // Bindings und App besorgen
+ SfxApplication *pSfxApp = SFX_APP();
+ SfxBindings* pBindings = GetBindings();
+ if ( pBindings )
+ pBindings->DENTERREGISTRATIONS();
+ pMenuMgr->ResetObjectMenus();
+
+ sal_uInt16 nTotCount = pImp->aStack.Count();
+ sal_uInt16 nMinCount = pImp->bQuiet || pImp->bNoUI ? nTotCount : 0;
+
+ if ( pImp->pParent ) // && !(pImp->pFrame->GetFrameType() & SFXFRAME_PLUGIN ) )
+ {
+ // Parents nur bei PlugIns nicht ber"ucksichtigen
+ // (AppDispatcher oder parent frame)
+ SfxDispatcher *pParent = pImp->pParent;
+ while ( pParent )
+ {
+ nTotCount += pParent->pImp->aStack.Count();
+ if ( pParent->pImp->bQuiet || pParent->pImp->bNoUI )
+ nMinCount = nTotCount;
+ pParent = pParent->pImp->pParent;
+ }
+ }
+
+ for ( sal_uInt16 nShell = nTotCount; nShell > nMinCount; --nShell )
+ {
+ SfxShell *pShell = GetShell( nShell-1 );
+ const SfxInterface *pIFace = pShell->GetInterface();
+
+ // update Object-Menus
+ for ( sal_uInt16 nNo = 0; pIFace && nNo<pIFace->GetObjectMenuCount(); ++nNo )
+ pMenuMgr->SetObjectMenu( pIFace->GetObjectMenuPos(nNo),
+ pIFace->GetObjectMenuResId(nNo));
+ }
+
+ pMenuMgr->UpdateObjectMenus();
+ if ( pBindings )
+ pBindings->DLEAVEREGISTRATIONS();
+ return 0;
+}
+
+//--------------------------------------------------------------------
+void SfxDispatcher::FlushImpl()
+
+/* [Beschreibung]
+
+ Hilfsmethode zum Ausf"uhren der ausstehenden Push- und Pop-Befehle.
+*/
+
+{
+ DBG_PROFSTART(SfxDispatcherFlush);
+ DBG_MEMTEST();
+ SFX_STACK(SfxDispatcher::FlushImpl);
+
+
+#ifdef DBG_UTIL
+ ByteString aMsg( "SfxDispatcher(" );
+ aMsg += ByteString::CreateFromInt32( (long) this );
+ aMsg += ")::Flush()";
+#endif
+
+ pImp->aTimer.Stop();
+
+ if ( pImp->pParent )
+ pImp->pParent->Flush();
+
+// if ( pImp->bQuiet )
+// return;
+
+ pImp->bFlushing = !pImp->bFlushing;
+ if ( !pImp->bFlushing )
+ {
+ pImp->bFlushing = sal_True;
+ DBG_PROFSTOP(SfxDispatcherFlush);
+//!
+#ifdef DBG_UTIL_MESSEHACK_AUSKOMMENT
+ DBG_ERROR( "reentering SfxDispatcher::Flush()" );
+ aMsg += " reentering, aborted";
+ DbgTrace( aMsg.GetBuffer() );
+#endif
+ return;
+ }
+
+ SfxApplication *pSfxApp = SFX_APP();
+
+ // in der 1. Runde den echten Stack 'um'bauen
+ SfxToDoStack_Impl aToDoCopy;
+ sal_Bool bModify = sal_False;
+ short nToDo;
+ for ( nToDo = pImp->aToDoStack.Count()-1; nToDo >= 0; --nToDo )
+ {
+ bModify = sal_True;
+
+ SfxToDo_Impl aToDo( pImp->aToDoStack.Top(nToDo) );
+ if ( aToDo.bPush )
+ {
+ // tats"aechlich pushen
+ DBG_ASSERT( !pImp->aStack.Contains( aToDo.pCluster ),
+ "pushed SfxShell already on stack" );
+ pImp->aStack.Push( aToDo.pCluster );
+ aToDo.pCluster->SetDisableFlags( pImp->nDisableFlags );
+
+ // die bewegte Shell merken
+ aToDoCopy.Push( aToDo );
+ }
+ else
+ {
+ // tats"aechlich poppen
+ SfxShell* pPopped = 0;
+ FASTBOOL bFound = sal_False;
+ do
+ {
+ DBG_ASSERT( pImp->aStack.Count(), "popping from empty stack" );
+ pPopped = pImp->aStack.Pop();
+ pPopped->SetDisableFlags( 0 );
+ bFound = pPopped == aToDo.pCluster;
+
+ // die bewegte Shell merken
+ aToDoCopy.Push( SfxToDo_Impl( sal_False, aToDo.bDelete, sal_False, *pPopped) );
+ }
+ while ( aToDo.bUntil && !bFound );
+ DBG_ASSERT( bFound, "wrong SfxShell popped" );
+ }
+
+ if ( nToDo == 0 )
+ pImp->aToDoStack.Clear();
+ }
+
+ // ggf. Bindings invalidieren
+ if ( !pSfxApp->IsDowning() )
+ {
+ if ( bModify )
+ {
+ pImp->pCachedServ1 = 0;
+ pImp->pCachedServ2 = 0;
+ }
+
+ InvalidateBindings_Impl( bModify );
+ }
+
+ pImp->bFlushing = sal_False;
+ pImp->bUpdated = sal_False; // nicht nur bei bModify, falls Doc/Template-Config
+ bFlushed = sal_True;
+
+ // in der 2. Runde die Shells aktivieren und ggf. l"oschen
+ for ( nToDo = aToDoCopy.Count()-1; nToDo >= 0; --nToDo )
+ {
+ SfxToDo_Impl aToDo( aToDoCopy.Top(nToDo) );
+ if ( aToDo.bPush )
+ {
+ if ( pImp->bActive )
+ aToDo.pCluster->DoActivate(pImp->pFrame, sal_True);
+ }
+ else
+ if ( pImp->bActive )
+ aToDo.pCluster->DoDeactivate(pImp->pFrame, sal_True);
+ }
+ for ( nToDo = aToDoCopy.Count()-1; nToDo >= 0; --nToDo )
+ {
+ SfxToDo_Impl aToDo( aToDoCopy.Top(nToDo) );
+ if ( aToDo.bDelete ) delete aToDo.pCluster;
+ }
+ sal_Bool bAwakeBindings = aToDoCopy.Count() != 0;
+ if( bAwakeBindings )
+ aToDoCopy.Clear();
+
+ // Wenn bei Activate/Deactivate/Delete weitere Stackbewegungen erfolgt sind :
+ if (!bFlushed)
+ // falls jemand Push/Pop gerufen hat, wurde auch EnterReg gerufen!
+ FlushImpl();
+
+ if( bAwakeBindings && GetBindings() )
+ GetBindings()->DLEAVEREGISTRATIONS();
+ DBG_PROFSTOP(SfxDispatcherFlush);
+
+ for (sal_uInt16 n=0; n<SFX_OBJECTBAR_MAX; n++)
+ pImp->aFixedObjBars[n].aResId = ResId( 0,0 );
+
+#ifdef DBG_UTIL
+ aMsg += " done";
+ DbgTrace( aMsg.GetBuffer() );
+#endif
+}
+
+//--------------------------------------------------------------------
+void SfxDispatcher::SetSlotFilter
+(
+ HACK(hier muss mal ein enum rein)
+ sal_Bool bEnable, /* sal_True:
+ nur angegebene Slots enablen,
+ alle anderen disablen
+
+ sal_False:
+ die angegebenen Slots disablen,
+ alle anderen zun"achst enablen
+ */
+ sal_uInt16 nCount, // Anzahl der SIDs im folgenden Array
+ const sal_uInt16* pSIDs // sortiertes Array von 'nCount' SIDs
+)
+
+/* [Beschreibung]
+
+ Mit dieser Methode wird ein Filter gesetzt, mit dem gezielt Slots
+ enabled bzw. disabled werden k"onnen. Das "ubergebene Array mu\s
+ bis zum Dtor bzw. n"achsten <SetSlotFilter()> erhalten bleiben, es
+ wird nicht vom Dispatcher gel"oscht, es kann daher static sein.
+
+ In ReadOnly-Dokumenten kann man mit 'bEnable==2' quasi das ReadOnlyDoc
+ Flag von Slots "ubersteuern, dieser werden also wieder gefunden. Auf
+ andere Slots hat das dann keine Auswirkung.
+
+
+ [Beispiel]
+
+ gezieltes disablen der Slots 1, 2 und 3:
+
+ static sal_uInt16 __READONLY_DATA pSIDs[] = { 1, 2, 3 };
+ pDisp->SetSlotFilter( sal_False, sizeof(pSIDs)/sizeof(sal_uInt16), pSIDs );
+
+ nur die Slots 5, 6 und 7 zulassen:
+
+ static sal_uInt16 __READONLY_DATA pSIDs[] = { 5, 6, 7 };
+ pDisp->SetSlotFilter( sal_True, sizeof(pSIDs)/sizeof(sal_uInt16), pSIDs );
+
+ Filter ausschalten:
+
+ pDisp->SetSlotFilter();
+*/
+
+{
+#ifdef DBG_UTIL
+ // Array "uberpr"ufen
+ for ( sal_uInt16 n = 1; n < nCount; ++n )
+ DBG_ASSERT( pSIDs[n] > pSIDs[n-1], "SetSlotFilter: SIDs not sortet" );
+#endif
+
+ if ( pImp->pFilterSIDs )
+ pImp->pFilterSIDs = 0;
+
+ pImp->bFilterEnabling = bEnable;
+ pImp->nFilterCount = nCount;
+ pImp->pFilterSIDs = pSIDs;
+
+ GetBindings()->InvalidateAll(sal_True);
+}
+
+//--------------------------------------------------------------------
+EXTERN_C
+#if defined( PM2 ) && (!defined( CSET ) && !defined ( MTW ) && !defined( WTC ))
+int _stdcall
+#else
+#ifdef WNT
+int _cdecl
+#else
+int
+#endif
+#endif
+
+SfxCompareSIDs_Impl( const void* pSmaller, const void* pBigger )
+{
+ DBG_MEMTEST();
+ return ( (long) *((sal_uInt16*)pSmaller) ) - ( (long) *((sal_uInt16*)pBigger) );
+}
+
+//--------------------------------------------------------------------
+sal_Bool SfxDispatcher::IsSlotEnabledByFilter_Impl( sal_uInt16 nSID ) const
+
+/* [Beschreibung]
+
+ Sucht 'nSID' in dem mit <SetSlotFilter()> gesetzten Filter und
+ liefert sal_True, falls die SID erlaubt ist, bzw. sal_False, falls sie
+ durch den Filter disabled ist.
+
+ [R"uckgabewert]
+ sal_Bool 0 => disabled
+ 1 => enabled
+ 2 => enabled even if ReadOnlyDoc
+*/
+
+{
+ // kein Filter?
+ if ( 0 == pImp->nFilterCount )
+ // => alle SIDs erlaubt
+ return sal_True;
+
+ // suchen
+ sal_Bool bFound = 0 != bsearch( &nSID, pImp->pFilterSIDs, pImp->nFilterCount,
+ sizeof(sal_uInt16), SfxCompareSIDs_Impl );
+
+ // even if ReadOnlyDoc
+ if ( 2 == pImp->bFilterEnabling )
+ return bFound ? 2 : 1;
+ // sonst je nach Negativ/Positiv Filter
+ return pImp->bFilterEnabling ? bFound : !bFound;
+}
+
+//--------------------------------------------------------------------
+sal_Bool SfxDispatcher::_TryIntercept_Impl
+(
+ sal_uInt16 nSlot, // zu suchende Slot-Id
+ SfxSlotServer& rServer, // zu f"uellende <SfxSlotServer>-Instanz
+ sal_Bool bSelf
+)
+{
+ // Eventuell geh"ort der parent auch zu einer Komponente
+ SfxDispatcher *pParent = pImp->pParent;
+ sal_uInt16 nLevels = pImp->aStack.Count();
+ while ( pParent && pParent->pImp->pFrame )
+ {
+ if ( pParent->pImp->pFrame->GetFrame()->HasComponent() )
+ {
+ // Components d"urfen intercepten
+ if ( pParent->_TryIntercept_Impl( nSlot, rServer, sal_True ) )
+ {
+ // Die eigenen Shells zum Shelllevel hinzuz"ahlen
+ rServer.SetShellLevel( rServer.GetShellLevel() + nLevels );
+ return sal_True;
+ }
+ else
+ // Keine weitere Interception
+ break;
+ }
+ else
+ nLevels += pParent->pImp->aStack.Count();
+
+ pParent = pParent->pImp->pParent;
+ }
+
+ if ( bSelf )
+ {
+ // Die ComponentViewShell befragen
+ Flush();
+ SfxShell *pObjShell = GetShell(0);
+ SfxInterface *pIFace = pObjShell->GetInterface();
+ const SfxSlot *pSlot = pIFace->GetSlot(nSlot);
+
+ if ( pSlot )
+ {
+ rServer.SetSlot(pSlot);
+ rServer.SetShellLevel(0);
+#ifdef DBG_UTILx
+ String aMsg( nSlot );
+ aMsg += " intercepted";
+ DbgTrace( aMsg.GetBuffer() );
+#endif
+ return sal_True;
+ }
+ }
+
+ return sal_False;
+}
+
+sal_Bool SfxDispatcher::_FindServer
+(
+ sal_uInt16 nSlot, // zu suchende Slot-Id
+ SfxSlotServer& rServer, // zu f"uellnde <SfxSlotServer>-Instanz
+ sal_Bool bModal // trotz ModalMode
+)
+
+/* [Beschreibung]
+
+ Diese Hilfsmethode sucht den <Slot-Server>, der nSlot zur Zeit bedient.
+ Als Ergebnis wird rServer entsprechend gef"ullt.
+
+ Falls bekannt, kann das SfxInterface mitgegeben werden, von welchem
+ nSlot momentan bedient wird.
+
+ Vor der Suche nach nSlot wird der SfxDispatcher geflusht.
+
+
+ [R"uckgabewert]
+
+ sal_Bool sal_True
+ Der Slot wurde gefunden, rServer ist g"ultig.
+
+ sal_False
+ Der Slot wird momentan nicht bedient, rServer
+ ist ung"ultig.
+*/
+
+{
+ SFX_STACK(SfxDispatcher::_FindServer);
+
+ // Dispatcher gelockt? (SID_BROWSE_STOP und SID_HELP_PI trotzdem durchlassen)
+ SfxApplication *pSfxApp = SFX_APP();
+ sal_Bool bAllLocked = pSfxApp->IsDispatcherLocked();
+ if ( IsLocked(nSlot) )
+ {
+ if ( bAllLocked )
+ pSfxApp->Get_Impl()->bInvalidateOnUnlock = sal_True;
+ pImp->bInvalidateOnUnlock = sal_True;
+ return sal_False;
+ }
+
+ // Anzahl der Shells auf den verkettenten Dispatchern z"ahlen
+ Flush();
+ sal_uInt16 nTotCount = pImp->aStack.Count();
+ if ( pImp->pParent )
+ {
+ SfxDispatcher *pParent = pImp->pParent;
+ while ( pParent )
+ {
+ nTotCount += pParent->pImp->aStack.Count();
+ pParent = pParent->pImp->pParent;
+ }
+ }
+
+ // Makro-Slot?
+ if ( SfxMacroConfig::IsMacroSlot( nSlot ) )
+ {
+ rServer.SetShellLevel(nTotCount-1);
+ rServer.SetSlot(pSfxApp->GetMacroConfig()->GetMacroInfo(nSlot)->GetSlot());
+ return sal_True;
+ }
+ // Verb-Slot?
+ else if (nSlot >= SID_VERB_START && nSlot <= SID_VERB_END)
+ {
+ SfxShell *pSh = 0;
+ for ( sal_uInt16 nShell = 0; pSh = GetShell(nShell); ++nShell )
+ {
+ if ( pSh->ISA(SfxViewShell) )
+ {
+ rServer.SetShellLevel(nShell);
+ rServer.SetSlot(pSh->GetVerbSlot_Impl(nSlot));
+ return sal_True;
+ }
+ }
+
+ return sal_False;
+ }
+
+ // SID gegen gesetzten Filter pr"ufen
+ sal_uInt16 nSlotEnableMode=0;
+ if ( pImp->pFrame )
+ {
+ nSlotEnableMode = IsSlotEnabledByFilter_Impl( nSlot );
+ if ( 0 == nSlotEnableMode )
+ return sal_False;
+ }
+
+ // im Quiet-Mode nur Parent-Dispatcher
+ if ( pImp->bQuiet )
+ {
+ if ( pImp->pParent )
+ {
+ sal_Bool bRet = pImp->pParent->_FindServer( nSlot, rServer, bModal );
+ rServer.SetShellLevel
+ ( rServer.GetShellLevel() + pImp->aStack.Count() );
+ return bRet;
+ }
+ else
+ return sal_False;
+ }
+
+ sal_Bool bReadOnly = ( 2 != nSlotEnableMode && pImp->bReadOnly ) ||
+ ( pImp->pFrame && pImp->pFrame->GetObjectShell() &&
+ pImp->pFrame->GetObjectShell()->IsLoading() );
+
+ // durch alle Shells der verketteten Dispatchern von oben nach unten suchen
+#ifdef DBG_UTILx
+ String aStack( "Stack:" );
+#endif
+ sal_uInt16 nFirstShell = pImp->bModal && !bModal ? pImp->aStack.Count() : 0;
+ for ( sal_uInt16 i = nFirstShell; i < nTotCount; ++i )
+ {
+ SfxShell *pObjShell = GetShell(i);
+ SfxInterface *pIFace = pObjShell->GetInterface();
+ const SfxSlot *pSlot = pIFace->GetSlot(nSlot);
+
+ if ( pSlot && pSlot->nDisableFlags && ( pSlot->nDisableFlags & pObjShell->GetDisableFlags() ) != 0 )
+ return sal_False;
+
+ if ( pSlot && !( pSlot->nFlags & SFX_SLOT_READONLYDOC ) && bReadOnly )
+ return sal_False;
+
+ if ( pSlot )
+ {
+ // Slot geh"ort zum Container?
+ FASTBOOL bIsContainerSlot = pSlot->IsMode(SFX_SLOT_CONTAINER);
+ FASTBOOL bIsInPlace = pImp->pFrame && pImp->pFrame->ISA( SfxInPlaceFrame );
+
+ // Shell geh"ort zum Server?
+ // AppDispatcher oder IPFrame-Dispatcher
+ FASTBOOL bIsServerShell = !pImp->pFrame || bIsInPlace;
+
+ // Nat"urlich sind ServerShell-Slots auch ausf"uhrbar, wenn sie auf
+ // einem Container-Dispatcher ohne IPClient ausgef"uhrt werden sollen.
+ if ( !bIsServerShell )
+ {
+ SfxViewShell *pViewSh = pImp->pFrame->GetViewShell();
+ bIsServerShell = !pViewSh || !pViewSh->GetIPClient();
+ }
+
+ // Shell geh"ort zum Container?
+ // AppDispatcher oder kein IPFrameDispatcher
+ FASTBOOL bIsContainerShell = !pImp->pFrame || !bIsInPlace;
+#ifdef MBA
+ if ( !bIsContainerShell )
+ {
+ // Bei internem InPlace auch den AppDispatcher zug"angig machen
+ if ( pImp->pFrame && pImp->pFrame->GetParentViewFrame_Impl() )
+ {
+ if ( i == nTotCount - 1 )
+ bIsContainerShell = sal_True;
+ }
+ }
+#endif
+ // Shell und Slot passen zusammen
+ if ( !( ( bIsContainerSlot && bIsContainerShell ) ||
+ ( !bIsContainerSlot && bIsServerShell ) ) )
+ pSlot = 0;
+ }
+
+#ifdef DBG_UTILx
+ if ( pSlot )
+ {
+ String aMsg( nSlot );
+ aMsg += " found in ";
+ aMsg += pObjShell->GetInterface()->GetClassName();
+ DbgTrace( aMsg.GetBuffer() );
+ }
+ else
+ {
+ aStack += " ";
+ aStack += pObjShell->GetInterface()->GetClassName();
+ }
+#endif
+ if ( pSlot && !IsAllowed( nSlot ) )
+ {
+ pSlot = NULL;
+ }
+
+ if ( pSlot )
+ {
+ rServer.SetSlot(pSlot);
+ rServer.SetShellLevel(i);
+ return sal_True;
+ }
+ }
+
+#ifdef DBG_UTILx
+ String aMsg( nSlot );
+ aMsg += " not found in ";
+ aMsg += aStack;
+ DbgTrace( aMsg.GetBuffer() );
+#endif
+ return sal_False;
+}
+//--------------------------------------------------------------------
+sal_Bool SfxDispatcher::_FillState
+(
+ const SfxSlotServer& rSvr, // abzufragende <Slot-Server>
+ SfxItemSet& rState, // zu f"ullendes <SfxItemSet>
+ const SfxSlot* pRealSlot // ggf. der tats"achliche Slot
+)
+
+/* [Beschreibung]
+
+ Hilfsmethode zum Abfragen des Status des <Slot-Server>s rSvr.
+ In rState m"ussen die gew"unschten Slots-Ids (teilweise in Which-Ids
+ des betreffenden Pools umgewandelt) vorhanden sein.
+
+ Der SfxDispatcher wird vor der Abfrage geflusht.
+*/
+
+{
+ SFX_STACK(SfxDispatcher::_FillState);
+
+ DBG_PROFSTART(SfxDispatcherFillState);
+
+ const SfxSlot *pSlot = rSvr.GetSlot();
+ SfxApplication *pSfxApp = SFX_APP();
+ sal_Bool bAllLocked = pSfxApp->IsDispatcherLocked();
+ if ( pSlot && IsLocked( pSlot->GetSlotId() ) )
+ {
+ if ( bAllLocked )
+ pSfxApp->Get_Impl()->bInvalidateOnUnlock = sal_True;
+ pImp->bInvalidateOnUnlock = sal_True;
+ DBG_PROFSTOP(SfxDispatcherFillState);
+ return sal_False;
+ }
+
+ if ( pSlot )
+ {
+ Flush();
+
+ // Objekt ermitteln und Message an diesem Objekt aufrufen
+ SfxShell *pSh = GetShell(rSvr.GetShellLevel());
+ DBG_ASSERT(pSh, "ObjektShell nicht gefunden");
+
+ SfxStateFunc pFunc;
+
+ if (pRealSlot)
+ pFunc = pRealSlot->GetStateFnc();
+ else
+ pFunc = pSlot->GetStateFnc();
+
+ pSh->CallState( pFunc, rState );
+#ifdef DBG_UTIL
+ // pr"ufen, ob IDL (SlotMap) und aktuelle Items "ubereinstimmen
+ if ( DbgIsAssertWarning() && rState.Count() )
+ {
+ SfxInterface *pIF = pSh->GetInterface();
+ SfxItemIter aIter( rState );
+ for ( const SfxPoolItem *pItem = aIter.FirstItem();
+ pItem;
+ pItem = aIter.NextItem() )
+ if ( !IsInvalidItem(pItem) && !pItem->ISA(SfxVoidItem) )
+ {
+ sal_uInt16 nSlotId = rState.GetPool()->GetSlotId(pItem->Which());
+ if ( !pItem->IsA(pIF->GetSlot(nSlotId)->GetType()->Type()) )
+ {
+ ByteString aMsg( "item-type unequal to IDL (=> no BASIC)" );
+ aMsg += "\nwith SID: ";
+ aMsg += ByteString::CreateFromInt32( nSlotId );
+ aMsg += "\nin ";
+ aMsg += pIF->GetClassName();
+ DbgOut( aMsg.GetBuffer(), DBG_OUT_ERROR, __FILE__, __LINE__);
+ }
+ }
+ }
+#endif
+
+ DBG_PROFSTOP(SfxDispatcherFillState);
+ return sal_True;
+ }
+
+ DBG_PROFSTOP(SfxDispatcherFillState);
+ return sal_False;
+}
+
+//--------------------------------------------------------------------
+const SfxPoolItem* SfxDispatcher::_Execute( const SfxSlotServer &rSvr )
+
+/* [Beschreibung]
+
+ Diese Methode f"uhrt einen Request "uber einen gecachten <Slot-Server>
+ aus.
+*/
+
+{
+ const SfxSlot *pSlot = rSvr.GetSlot();
+ if ( IsLocked( pSlot->GetSlotId() ) )
+ return 0;
+
+ if ( pSlot )
+ {
+ Flush();
+
+ sal_uInt16 nSlot = pSlot->GetSlotId();
+ if ( SfxMacroConfig::IsMacroSlot( nSlot ) )
+ SFX_APP()->GetMacroConfig()->RegisterSlotId( nSlot );
+
+ if ( pSlot->IsMode(SFX_SLOT_ASYNCHRON) )
+ //! ignoriert rSvr
+ {
+ SfxShell *pShell = GetShell( rSvr.GetShellLevel() );
+ SfxDispatcher *pDispat = this;
+ while ( pDispat )
+ {
+ sal_uInt16 nShellCount = pDispat->pImp->aStack.Count();
+ for ( sal_uInt16 n=0; n<nShellCount; n++ )
+ if ( pShell == pDispat->pImp->aStack.Top(n) )
+ {
+ pDispat->pImp->xPoster->Post(
+ new SfxRequest( pSlot->GetSlotId(),
+ SFX_CALLMODE_RECORD, pShell->GetPool() ) );
+// pDispat->pImp->xPoster->Post(new Executer(
+// new SfxRequest( pSlot->GetSlotId(),
+// SFX_CALLMODE_RECORD, pShell->GetPool() ),
+// pSlot, n ));
+ return 0;
+ }
+ }
+ }
+ else
+ {
+ // Objekt ermitteln und Message an diesem Objekt aufrufen
+ SfxShell *pSh = GetShell(rSvr.GetShellLevel());
+ SfxRequest aReq( pSlot->GetSlotId(), SFX_CALLMODE_RECORD, pSh->GetPool() );
+ if ( Call_Impl( *pSh, *pSlot, aReq, sal_True ) ) // von Bindings immer recorden
+ return aReq.GetReturnValue();
+ }
+ }
+ return 0;
+}
+
+//----------------------------------------------------------------------
+void SfxDispatcher::ExecutePopup( sal_uInt16 nConfigId,
+ Window *pWin, const Point *pPos,
+ const SfxPoolItem *pArg1, ... )
+
+/* [Beschreibung]
+
+ Diese Methode f"uhrt das unter der Id nConfigId registrierte PopupMenu
+ aus. Die Regisitrierung wird i.d.R. in <SFX_IMPL_INTERFACE> vorgenommen.
+
+ Bei nConfigId == 0 werden die auf dem Stack des Dispatchers befindlichen
+ <SfxShell>s von oben nach unten nach dem ersten registrieren PopupMenu
+ durchsucht.
+*/
+
+{
+ SfxDispatcher &rDisp = *SFX_APP()->GetDispatcher_Impl();
+ sal_uInt16 nShLevel = 0;
+
+ const SvVerbList *pVerbList = 0;
+
+ // Nur die eigenen Shells nehmen !!
+ sal_uInt16 nMaxShellLevel = rDisp.pImp->aStack.Count();
+
+ SfxShell *pSh;
+ for ( pSh = rDisp.GetShell(nShLevel);
+ pSh && nShLevel < nMaxShellLevel ;
+ ++nShLevel, pSh = rDisp.GetShell(nShLevel) )
+ {
+
+ if (pSh->GetVerbs())
+ {
+ pVerbList = pSh->GetVerbs();
+ break;
+ }
+ }
+
+ nShLevel=0;
+
+ if ( rDisp.pImp->bQuiet )
+ {
+ nConfigId = 0;
+ nShLevel = rDisp.pImp->aStack.Count();
+ }
+
+ Window *pWindow = pWin ? pWin :
+ SFX_APP()->GetWorkWindow_Impl( rDisp.pImp->pFrame )->GetWindow();
+
+ for ( pSh = rDisp.GetShell(nShLevel);
+ pSh;
+ ++nShLevel, pSh = rDisp.GetShell(nShLevel) )
+ {
+ const ResId& rResId = pSh->GetInterface()->GetPopupMenuResId();
+ if ( ( nConfigId == 0 && rResId.GetId() ) ||
+ ( nConfigId != 0 && rResId.GetId() == nConfigId ) )
+ {
+ SfxPopupMenuManager aPop(rResId.GetId(), *rDisp.GetBindings() );
+ aPop.SetResMgr(rResId.GetResMgr());
+ aPop.AddClipboardFunctions();
+ aPop.Initialize();
+
+ if (pVerbList && pVerbList->Count())
+ aPop.InsertVerbs(pVerbList);
+
+ aPop.RemoveDisabledEntries();
+ sal_uInt16 nRetId = aPop.Execute(
+ pPos ? *pPos : pWindow->GetPointerPosPixel(), pWindow );
+ return;
+ }
+ }
+}
+
+//----------------------------------------------------------------------
+void SfxDispatcher::ExecutePopup( sal_uInt16 nConfigId
+ , Window *pWin, const Point *pPos
+ )
+
+/* [Beschreibung]
+
+ Diese Methode f"uhrt das unter der Id nConfigId registrierte PopupMenu
+ aus. Die Regisitrierung wird i.d.R. in <SFX_IMPL_INTERFACE> vorgenommen.
+
+ Bei nConfigId == 0 werden die auf dem Stack des Dispatchers befindlichen
+ <SfxShell>s von oben nach unten nach dem ersten registrieren PopupMenu
+ durchsucht.
+*/
+
+{
+ SfxDispatcher &rDisp = *SFX_APP()->GetDispatcher_Impl();
+ sal_uInt16 nShLevel = 0;
+ const SvVerbList *pVerbList = 0;
+
+ // Nur die eigenen Shells nehmen !!
+ sal_uInt16 nMaxShellLevel = rDisp.pImp->aStack.Count();
+
+ SfxShell *pSh;
+ for ( pSh = rDisp.GetShell(nShLevel);
+ pSh && nShLevel < nMaxShellLevel ;
+ ++nShLevel, pSh = rDisp.GetShell(nShLevel) )
+ {
+
+ if (pSh->GetVerbs())
+ {
+ pVerbList = pSh->GetVerbs();
+ break;
+ }
+ }
+
+ nShLevel=0;
+
+ if ( rDisp.pImp->bQuiet )
+ {
+ nConfigId = 0;
+ nShLevel = rDisp.pImp->aStack.Count();
+ }
+
+ Window *pWindow = pWin ? pWin :
+ SFX_APP()->GetWorkWindow_Impl( rDisp.pImp->pFrame )->GetWindow();
+
+ for ( pSh = rDisp.GetShell(nShLevel);
+ pSh;
+ ++nShLevel, pSh = rDisp.GetShell(nShLevel) )
+ {
+
+ const ResId& rResId = pSh->GetInterface()->GetPopupMenuResId();
+ if ( ( nConfigId == 0 && rResId.GetId() ) ||
+ ( nConfigId != 0 && rResId.GetId() == nConfigId ) )
+ {
+ SfxPopupMenuManager aPop(rResId.GetId(), *rDisp.GetBindings() );
+ aPop.SetResMgr(rResId.GetResMgr());
+ aPop.AddClipboardFunctions();
+ aPop.Initialize();
+ if (pVerbList && pVerbList->Count())
+ aPop.InsertVerbs(pVerbList);
+
+ aPop.RemoveDisabledEntries();
+ sal_uInt16 nRetId = aPop.Execute(
+ pPos ? *pPos : pWindow->GetPointerPosPixel(), pWindow );
+ return;
+ }
+ }
+}
+
+//----------------------------------------------------------------------
+void SfxDispatcher::ExecutePopup( const ResId &rId
+ , Window *pWin, const Point *pPos
+ )
+
+/* [Beschreibung]
+
+ Diese Methode l"adt ein PopupMenu aus der angegebenen Resource und
+ f"uhrt es aus. Die Selektion wird "uber diesen SfxDispatcher ausgef"uhrt.
+*/
+
+{
+ Window *pWindow = pWin ? pWin :
+ SFX_APP()->GetWorkWindow_Impl( pImp->pFrame )->GetWindow();
+
+ SfxPopupMenuManager aPop( rId, *GetBindings() );
+ aPop.AddClipboardFunctions();
+ aPop.Initialize();
+ aPop.RemoveDisabledEntries();
+ sal_uInt16 nRetId = aPop.Execute( pPos ? *pPos : pWindow->GetPointerPosPixel(),
+ pWindow );
+}
+
+//--------------------------------------------------------------------
+void SfxDispatcher::Lock( sal_Bool bLock )
+
+/* [Beschreibung]
+
+ Mit dieser Methode kann der SfxDispatcher gesperrt und freigegeben
+ werden. Ein gesperrter SfxDispatcher f"uhrt keine <SfxRequest>s mehr
+ aus und liefert keine Status-Informationen mehr. Er verh"alt sich
+ so als w"aren alle Slots disabled.
+*/
+
+{
+ SfxBindings* pBindings = GetBindings();
+ if ( !bLock && pImp->bLocked && pImp->bInvalidateOnUnlock )
+ {
+ if ( pBindings )
+ pBindings->InvalidateAll(sal_True);
+ pImp->bInvalidateOnUnlock = sal_False;
+ }
+ else if ( pBindings )
+ pBindings->InvalidateAll(sal_False);
+ pImp->bLocked = bLock;
+}
+
+//--------------------------------------------------------------------
+void SfxDispatcher::ShowObjectBar(sal_uInt16 nId, SfxShell *pShell) const
+
+/* [Beschreibung]
+
+ Mit dieser Methode kann auf einer Objektleistenposition gezielt eine
+ bestimmte Objektleiste eingeblendet werden.
+*/
+
+{
+ ResId aResId(nId);
+ sal_uInt16 nPos = USHRT_MAX;
+ sal_uInt16 nNo;
+ SfxInterface *pIFace;
+
+ if ( pShell )
+ {
+ // Nur in der Shell suchen
+ pIFace = pShell->GetInterface();
+ for ( nNo=0; nNo<pIFace->GetObjectBarCount(); nNo++ )
+ {
+ if (pIFace->GetObjectBarResId(nNo).GetId() == nId)
+ {
+ nPos = pIFace->GetObjectBarPos(nNo);
+ break;
+ }
+ }
+ }
+ else
+ {
+ // Alle Shells absuchen
+ for ( sal_uInt16 nIdx=0; (pShell=GetShell(nIdx)); nIdx++ )
+ {
+ pIFace = pShell->GetInterface();
+ for ( nNo=0; nNo<pIFace->GetObjectBarCount(); nNo++ )
+ {
+ if (pIFace->GetObjectBarResId(nNo).GetId() == nId)
+ {
+ nPos = pIFace->GetObjectBarPos(nNo);
+ break;
+ }
+ }
+
+ if ( nPos != USHRT_MAX )
+ break;
+ }
+ }
+
+ if ( nPos != USHRT_MAX )
+ {
+ // Auf jeden Fall eintragen, auch wenn unsichtbar. Dann kann
+ // WorkWindow anbieten, wieder anzuschalten
+ SfxObjectBars_Impl& rBar = pImp->aObjBars[nPos & SFX_POSITION_MASK];
+ SfxObjectBars_Impl& rFixed = pImp->aFixedObjBars[nPos & SFX_POSITION_MASK];
+
+ sal_uInt16 nOldId = rBar.aResId.GetId();
+
+ if ( pImp->bReadOnly && !( nPos & SFX_VISIBILITY_READONLYDOC ) )
+ return;
+
+ sal_uInt32 nFeature = pIFace->GetObjectBarFeature(nNo);
+ if ( nFeature && !pShell->HasUIFeature( nFeature ) )
+ return;
+
+ sal_Bool bVisible = pIFace->IsObjectBarVisible(nNo);
+ if ( !bVisible )
+ // Alle Sichtbarkeitsflags ausschalten
+ nPos &= SFX_POSITION_MASK;
+
+ aResId.SetResMgr( pIFace->GetObjectBarResId(nNo).GetResMgr() );
+ rBar.aResId = aResId;
+ rBar.nMode = nPos;
+ const String *pName = pIFace->GetObjectBarName(nNo);
+ if ( pName )
+ rBar.aName = *pName;
+ else
+ rBar.aName.Erase();
+ rBar.pIFace = pIFace;
+
+ rFixed = rBar;
+
+ if ( nOldId != aResId.GetId() && pImp->bUpdated )
+ {
+ SfxWorkWindow *pWorkWin = SFX_APP()->GetWorkWindow_Impl(pImp->pFrame);
+ pWorkWin->SetObjectBar_Impl( nPos, aResId, pIFace, pName );
+ pWorkWin->UpdateObjectBars_Impl();
+ }
+
+ if ( !bVisible )
+ {
+ rBar.aResId = ResId( 0,0 );
+ rFixed.aResId = ResId( 0,0 );
+ }
+
+ return;
+ }
+
+// DBG_ERROR("Objektleiste nicht bekannt!");
+}
+
+sal_uInt16 SfxDispatcher::GetObjectBarId( sal_uInt16 nPos ) const
+{
+ return pImp->aObjBars[nPos].aResId.GetId();
+}
+
+//--------------------------------------------------------------------
+void SfxDispatcher::ResetObjectBars_Impl()
+
+/* [Beschreibung]
+
+ Mit dieser Methode werden alle Objectbar-Anforderungen, die dieser
+ Dispatcher an das AppWindow hat, beseitigt.
+*/
+{
+ for (sal_uInt16 n=0; n<SFX_OBJECTBAR_MAX; n++)
+ pImp->aObjBars[n].aResId = ResId( 0,0 );
+ pImp->aChildWins.Remove(0, pImp->aChildWins.Count());
+}
+
+
+//--------------------------------------------------------------------
+void SfxDispatcher::DebugOutput_Impl() const
+{
+#ifdef DBG_UTIL
+
+ sal_uInt16 nOld = (sal_uInt16) DbgGetData()->nTraceOut;
+ DbgGetData()->nTraceOut = DBG_OUT_FILE;
+
+ if (pImp->bFlushed)
+ DBG_TRACE("Flushed");
+ if (pImp->bUpdated)
+ DBG_TRACE("Updated");
+
+ for ( sal_uInt16 nShell = pImp->aStack.Count(); nShell > 0; --nShell )
+ {
+ SfxShell *pShell = GetShell(nShell-1);
+ const SfxInterface *pIFace = pShell->GetInterface();
+ DBG_TRACE (pIFace->GetClassName());
+ }
+
+ DbgGetData()->nTraceOut = nOld;
+
+#endif
+}
+
+void SfxDispatcher::LockUI_Impl( sal_Bool bLock )
+{
+ sal_Bool bWasLocked = pImp->bUILocked;
+ pImp->bUILocked = bLock;
+ if ( !bLock && bWasLocked )
+ Update_Impl( sal_True );
+}
+
+//-------------------------------------------------------------------------
+void SfxDispatcher::HideUI( sal_Bool bHide )
+{
+// if ( !bHide && pImp->bReadOnly )
+// bHide = sal_True;
+ sal_Bool bWasHidden = pImp->bNoUI;
+ pImp->bNoUI = bHide;
+ if ( bHide != bWasHidden )
+ Update_Impl( sal_True );
+}
+
+void SfxDispatcher::SetReadOnly_Impl( sal_Bool bOn )
+{
+ pImp->bReadOnly = bOn;
+// pImp->bNoUI = bOn;
+}
+
+sal_Bool SfxDispatcher::GetReadOnly_Impl() const
+{
+ return pImp->bReadOnly;
+}
+
+//-------------------------------------------------------------------------
+void SfxDispatcher::SetQuietMode_Impl( sal_Bool bOn )
+
+/* [Beschreibung]
+
+ Bei 'bOn' stellt sich dieser Dispatcher quasi tot und leitet alles
+ an den Parent-Dispatcher weiter.
+*/
+
+{
+ pImp->bQuiet = bOn;
+ SfxBindings* pBindings = GetBindings();
+ if ( pBindings )
+ pBindings->InvalidateAll(sal_True);
+}
+
+//-------------------------------------------------------------------------
+void SfxDispatcher::SetModalMode_Impl( sal_Bool bOn )
+
+/* [Beschreibung]
+
+ Bei 'bOn' werden nur noch Slots des Parent-Dispatchers gefunden.
+*/
+
+{
+ pImp->bModal = bOn;
+ SfxBindings* pBindings = GetBindings();
+ if ( pBindings )
+ pBindings->InvalidateAll(sal_True);
+}
+
+void SfxDispatcher::SetExecuteMode( sal_uInt16 nMode )
+{
+ pImp->nStandardMode = nMode;
+}
+
+SfxItemState SfxDispatcher::QueryState( sal_uInt16 nSlot, const SfxPoolItem* &rpState )
+{
+ SfxShell *pShell = 0;
+ const SfxSlot *pSlot = 0;
+ if ( GetShellAndSlot_Impl( nSlot, &pShell, &pSlot, sal_False, sal_False ) )
+ {
+ rpState = pShell->GetSlotState(nSlot);
+ if ( !rpState )
+ return SFX_ITEM_DISABLED;
+ else
+ return SFX_ITEM_AVAILABLE;
+ }
+
+ return SFX_ITEM_DISABLED;
+}
+
+sal_Bool SfxDispatcher::IsReadOnlyShell_Impl( sal_uInt16 nShell ) const
+{
+ sal_uInt16 nShellCount = pImp->aStack.Count();
+ if ( nShell < nShellCount )
+ {
+ if( nShell == nShellCount - 1 )
+ return pImp->aStack.Bottom()->ISA( SfxModule ) ?
+ sal_False : pImp->bReadOnly;
+ else return pImp->bReadOnly;
+ }
+ else if ( pImp->pParent )
+ return pImp->pParent->IsReadOnlyShell_Impl( nShell - nShellCount );
+ return sal_True;
+}
+
+// Ein dirty trick, um an die Methoden der private base class von
+// SfxShellStack_Impl heranzukommen
+class StackAccess_Impl : public SfxShellStack_Implarr_
+{};
+
+void SfxDispatcher::InsertShell_Impl( SfxShell& rShell, sal_uInt16 nPos )
+{
+ Flush();
+
+ // Der cast geht, weil SfxShellStack_Impl keine eigenen member hat
+ ((StackAccess_Impl*) (&pImp->aStack))->Insert( nPos, &rShell );
+ rShell.SetDisableFlags( pImp->nDisableFlags );
+ rShell.DoActivate(pImp->pFrame, sal_True);
+
+ if ( !SFX_APP()->IsDowning() )
+ {
+ pImp->bUpdated = sal_False;
+ pImp->pCachedServ1 = 0;
+ pImp->pCachedServ2 = 0;
+ InvalidateBindings_Impl(sal_True);
+ }
+}
+
+void SfxDispatcher::RemoveShell_Impl( SfxShell& rShell )
+{
+ Flush();
+
+ // Der cast geht, weil SfxShellStack_Impl keine eigenen member hat
+ StackAccess_Impl& rStack = *((StackAccess_Impl*) (&pImp->aStack));
+ sal_uInt16 nCount = rStack.Count();
+ for ( sal_uInt16 n=0; n<nCount; ++n )
+ {
+ if ( rStack[n] == &rShell )
+ {
+ rStack.Remove( n );
+ rShell.SetDisableFlags( 0 );
+ rShell.DoDeactivate(pImp->pFrame, sal_True);
+ break;
+ }
+ }
+
+ if ( !SFX_APP()->IsDowning() )
+ {
+ pImp->bUpdated = sal_False;
+ pImp->pCachedServ1 = 0;
+ pImp->pCachedServ2 = 0;
+ InvalidateBindings_Impl(sal_True);
+ }
+}
+
+sal_Bool SfxDispatcher::IsAllowed
+(
+ sal_uInt16 nSlot
+) const
+/*
+ [Beschreibung]
+ Die Methode prueft, ob der Zugriff auf diese Schnittstelle erlaubt ist.
+ */
+{
+ if ( !pImp->pDisableList )
+ {
+ return sal_True;
+ }
+
+ // BinSearch in der DisableListe
+ SvUShorts& rList = *pImp->pDisableList;
+ sal_uInt16 nCount = rList.Count();
+ sal_uInt16 nLow = 0, nMid, nHigh;
+ sal_Bool bFound = sal_False;
+ nHigh = nCount - 1;
+
+ while ( !bFound && nLow <= nHigh )
+ {
+ nMid = (nLow + nHigh) >> 1;
+ DBG_ASSERT( nMid < nCount, "bsearch ist buggy" );
+
+ int nDiff = (int) nSlot - (int) rList[nMid];
+ if ( nDiff < 0)
+ {
+ if ( nMid == 0 )
+ break;
+ nHigh = nMid - 1;
+ }
+ else if ( nDiff > 0 )
+ {
+ nLow = nMid + 1;
+ if ( nLow == 0 )
+ break;
+ }
+ else
+ bFound = sal_True;
+ }
+
+ // Slot in der Liste gefunden ?
+ sal_uInt16 nPos = bFound ? nMid : nLow;
+
+ DBG_ASSERT( nPos <= nCount, "" );
+ DBG_ASSERT( nPos == nCount || nSlot <= rList[nPos], "" );
+ DBG_ASSERT( nPos == 0 || nSlot > rList[nPos-1], "" );
+ DBG_ASSERT( ( (nPos+1) >= nCount ) || nSlot < rList[nPos+1], "" );
+
+ return !bFound;
+}
+
+void SfxDispatcher::InvalidateBindings_Impl( sal_Bool bModify )
+{
+ // App-Dispatcher?
+ if ( IsAppDispatcher() )
+ {
+ for ( SfxViewFrame *pFrame = SfxViewFrame::GetFirst();
+ pFrame;
+ pFrame = SfxViewFrame::GetNext( *pFrame ) )
+ pFrame->GetBindings().InvalidateAll(bModify);
+/*
+ // alle Bindings sind betroffen
+ for ( SfxInPlaceFrame *pIPFrame = (SfxInPlaceFrame*)
+ SfxViewFrame::GetFirst(0, TYPE(SfxInPlaceFrame));
+ pIPFrame;
+ pIPFrame = (SfxInPlaceFrame*)
+ SfxViewFrame::GetNext(*pIPFrame, 0, TYPE(SfxInPlaceFrame)) )
+ pIPFrame->GetBindings().InvalidateAll(bModify);
+
+ for ( SfxPlugInFrame *pPIFrame = (SfxPlugInFrame*)
+ SfxViewFrame::GetFirst(0, TYPE(SfxPlugInFrame));
+ pPIFrame;
+ pPIFrame = (SfxPlugInFrame*)
+ SfxViewFrame::GetNext(*pPIFrame, 0, TYPE(SfxPlugInFrame)) )
+ pPIFrame->GetBindings().InvalidateAll(bModify);
+
+ for ( SfxTask* pTask = SfxTask::GetFirst(); pTask;
+ pTask = SfxTask::GetNext( *pTask ) )
+ if ( !pTask->IsExternal() )
+ pTask->GetBindings()->InvalidateAll(bModify);
+*/
+ }
+ else
+ {
+ SfxDispatcher *pDisp = GetBindings()->GetDispatcher_Impl();
+ while ( pDisp )
+ {
+ if ( pDisp == this )
+ {
+ GetBindings()->InvalidateAll( bModify );
+ break;
+ }
+
+ pDisp = pDisp->pImp->pParent;
+ }
+ }
+}
+
+sal_uInt16 SfxDispatcher::GetNextToolBox_Impl( sal_uInt16 nPos, sal_uInt16 nType, String *pStr )
+{
+ SfxShell *pShell;
+ sal_Bool bReadOnly = sal_False;
+ SfxViewFrame *pFrame = pImp->pFrame;
+ if ( pFrame )
+ {
+ SfxObjectShell *pObj = pFrame->GetObjectShell();
+ bReadOnly = !pObj || pObj->IsReadOnly();
+ }
+
+ sal_Bool bFound = sal_False;
+ SfxWorkWindow *pWorkWin = GetBindings()->GetWorkWindow_Impl();
+
+ // Wenn die aktuelle Toolbox die letzte ist, mu\s die erste zur"uckgegeben
+ // werden
+ sal_uInt16 nNext = 0;
+
+ if ( nPos != 0xFFFF )
+ {
+ SfxDispatcher *pDispat = this;
+ while ( pDispat )
+ {
+ SfxBindings* pBindings = pDispat->GetBindings();
+ if ( !pBindings || pBindings->GetWorkWindow_Impl() != pWorkWin )
+ break;
+
+ sal_uInt16 nCount = pDispat->pImp->aStack.Count();
+ // Alle interfaces auf dem Dispatcher-Stack durchsuchen
+ for ( sal_uInt16 nIdx=0; nIdx<nCount; nIdx++ )
+ {
+ pShell = pDispat->pImp->aStack.Top(nIdx);
+ const SfxInterface *pInterFace = pShell->GetInterface();
+ for ( sal_uInt16 nNo = 0; pInterFace && nNo<pInterFace->GetObjectBarCount(); ++nNo )
+ {
+ // Ist die Objectbar an der richtigen Position und sichtbar ?
+ sal_uInt16 nP = pInterFace->GetObjectBarPos(nNo);
+
+ if ( (nP & SFX_POSITION_MASK) == (nPos & SFX_POSITION_MASK) &&
+ pInterFace->IsObjectBarVisible(nNo) &&
+ ( !bReadOnly || ( nP & SFX_VISIBILITY_READONLYDOC ) ) )
+ {
+ sal_uInt16 nId = pInterFace->GetObjectBarResId(nNo).GetId();
+ if ( nId != nType )
+ {
+ // Es ist eine andere Toolbox
+ // Ist sie aktivierbar ?
+ sal_uInt32 nFeature = pInterFace->GetObjectBarFeature( nNo );
+ if ( nFeature && !pShell->HasUIFeature( nFeature ) )
+ continue;
+
+ // Kommt sie nach der aktuellen ?
+ if ( bFound )
+ {
+ // Ja, also ist sie die n"achste
+ if ( pStr )
+ *pStr = *pInterFace->GetObjectBarName( nNo );
+ return nId;
+ }
+ else if ( !nNext )
+ {
+ // Nein, aber vielleicht ist es die erste ?
+ nNext = nId;
+ if ( pStr )
+ *pStr = *pInterFace->GetObjectBarName( nNo );
+ }
+ }
+ else
+ // das ist die aktuelle!
+ bFound = sal_True;
+ }
+ }
+ }
+
+ pDispat = pDispat->pImp->pParent;
+ }
+ }
+
+ return nNext;
+}
+
+sal_Bool SfxDispatcher::IsUpdated_Impl() const
+{
+ return pImp->bUpdated;
+}
+
+void SfxDispatcher::SetDisableFlags( sal_uInt32 nFlags )
+{
+ pImp->nDisableFlags = nFlags;
+ for ( int i = int(pImp->aStack.Count()) - 1; i >= 0; --i )
+ pImp->aStack.Top( (sal_uInt16) i )->SetDisableFlags( nFlags );
+}
+
+sal_uInt32 SfxDispatcher::GetDisableFlags() const
+{
+ return pImp->nDisableFlags;
+}
+
+sal_Bool SfxDispatcher::HasSlot_Impl( sal_uInt16 nSlot )
+{
+ Flush();
+ sal_uInt16 nTotCount = pImp->aStack.Count();
+
+ if ( pImp->pParent && !pImp->pParent->pImp->pFrame )
+ {
+ // the last frame also uses the AppDispatcher
+ nTotCount += pImp->aStack.Count();
+ }
+
+ if ( SfxMacroConfig::IsMacroSlot( nSlot ) )
+ // Makro-Slot?
+ return sal_True;
+ else if (nSlot >= SID_VERB_START && nSlot <= SID_VERB_END)
+ {
+ // Verb-Slot?
+ SfxShell *pSh = 0;
+ for ( sal_uInt16 nShell = 0; pSh = GetShell(nShell); ++nShell )
+ {
+ if ( pSh->ISA(SfxViewShell) )
+ return sal_True;
+ }
+
+ return sal_False;
+ }
+
+ // SID gegen gesetzten Filter pr"ufen
+ sal_uInt16 nSlotEnableMode=0;
+ if ( pImp->pFrame )
+ {
+ nSlotEnableMode = IsSlotEnabledByFilter_Impl( nSlot );
+ if ( 0 == nSlotEnableMode )
+ return sal_False;
+ }
+
+ // im Quiet-Mode nur Parent-Dispatcher
+ if ( pImp->bQuiet )
+ return sal_False;
+
+ sal_Bool bReadOnly = ( 2 != nSlotEnableMode && pImp->bReadOnly ) ||
+ ( pImp->pFrame && pImp->pFrame->GetObjectShell() &&
+ pImp->pFrame->GetObjectShell()->IsLoading() );
+
+ for ( sal_uInt16 i=0 ; i < nTotCount; ++i )
+ {
+ SfxShell *pObjShell = GetShell(i);
+ SfxInterface *pIFace = pObjShell->GetInterface();
+ const SfxSlot *pSlot = pIFace->GetSlot(nSlot);
+ if ( pSlot && pSlot->nDisableFlags && ( pSlot->nDisableFlags & pObjShell->GetDisableFlags() ) != 0 )
+ return sal_False;
+
+ if ( pSlot && !( pSlot->nFlags & SFX_SLOT_READONLYDOC ) && bReadOnly )
+ return sal_False;
+
+ if ( pSlot )
+ {
+ // Slot geh"ort zum Container?
+ FASTBOOL bIsContainerSlot = pSlot->IsMode(SFX_SLOT_CONTAINER);
+ FASTBOOL bIsInPlace = pImp->pFrame && pImp->pFrame->ISA( SfxInPlaceFrame );
+
+ // Shell geh"ort zum Server?
+ // AppDispatcher oder IPFrame-Dispatcher
+ FASTBOOL bIsServerShell = !pImp->pFrame || bIsInPlace;
+
+ // Nat"urlich sind ServerShell-Slots auch ausf"uhrbar, wenn sie auf
+ // einem Container-Dispatcher ohne IPClient ausgef"uhrt werden sollen.
+ if ( !bIsServerShell )
+ {
+ SfxViewShell *pViewSh = pImp->pFrame->GetViewShell();
+ bIsServerShell = !pViewSh || !pViewSh->GetIPClient();
+ }
+
+ // Shell geh"ort zum Container?
+ // AppDispatcher oder kein IPFrameDispatcher
+ FASTBOOL bIsContainerShell = !pImp->pFrame || !bIsInPlace;
+
+ // Shell und Slot passen zusammen
+ if ( !( ( bIsContainerSlot && bIsContainerShell ) ||
+ ( !bIsContainerSlot && bIsServerShell ) ) )
+ pSlot = 0;
+ }
+
+ if ( pSlot && !IsAllowed( nSlot ) )
+ pSlot = NULL;
+
+ if ( pSlot )
+ return sal_True;
+ }
+
+ return sal_False;
+}
+
+
diff --git a/sfx2/source/control/macrconf.cxx b/sfx2/source/control/macrconf.cxx
new file mode 100644
index 000000000000..2e9625af311f
--- /dev/null
+++ b/sfx2/source/control/macrconf.cxx
@@ -0,0 +1,947 @@
+/*************************************************************************
+ *
+ * $RCSfile: macrconf.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:29 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#if SUPD<582
+#ifndef _SFXSFXJS_HXX //autogen
+#include <sfxjs.hxx>
+#endif
+#ifndef _SJIMPL2_HXX //autogen
+#include <sj2/sjimpl2.hxx>
+#endif
+#endif
+#ifndef _SB_SBSTAR_HXX //autogen
+#include <basic/sbstar.hxx>
+#endif
+#ifndef _BASMGR_HXX //autogen
+#include <basic/basmgr.hxx>
+#endif
+#ifndef _SBX_HXX //autogen
+#include <svtools/sbx.hxx>
+#endif
+#ifndef _SB_SBMETH_HXX //autogen
+#include <basic/sbmeth.hxx>
+#endif
+#ifndef _SB_SBMOD_HXX //autogen
+#include <basic/sbmod.hxx>
+#endif
+#ifndef _INTN_HXX //autogen
+#include <tools/intn.hxx>
+#endif
+#ifndef _BASIC_SBUNO_HXX
+#include <basic/sbuno.hxx>
+#endif
+
+#include <osl/mutex.hxx>
+
+#include <com/sun/star/script/XEngine.hpp>
+
+#pragma hdrstop
+
+#include "msgpool.hxx"
+#include "macrconf.hxx"
+#include "sfxbasic.hxx"
+#include "sfx.hrc"
+#include "app.hxx"
+#include "objsh.hxx"
+#include "dispatch.hxx"
+#include "minfitem.hxx"
+#include "imgmgr.hxx"
+#include "evntconf.hxx"
+#include "docfile.hxx"
+#include "genlink.hxx"
+#include <viewfrm.hxx>
+#include <appdata.hxx>
+
+static const sal_uInt16 nCompatVersion = 2;
+static const sal_uInt16 nVersion = 3;
+
+// Static member
+SfxMacroConfig* SfxMacroConfig::pMacroConfig = NULL;
+
+SfxMacroConfig* SfxMacroConfig::GetOrCreate()
+{
+ ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
+ if ( !pMacroConfig )
+ pMacroConfig = new SfxMacroConfig;
+ return pMacroConfig;
+}
+
+void SfxMacroConfig::Release_Impl()
+{
+ ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
+ DELETEZ( pMacroConfig );
+}
+
+//==========================================================================
+
+struct SfxMacroConfig_Impl
+{
+ SfxMacroInfoArr_Impl aArr;
+ sal_uInt32 nEventId;
+ sal_Bool bWaitingForCallback;
+
+ SfxMacroConfig_Impl()
+ : nEventId( 0 )
+ , bWaitingForCallback( sal_False )
+ {}
+};
+
+//==========================================================================
+
+SbMethod* SfxQueryMacro_Impl( BasicManager* pMgr , const String& rMacro,
+ const String &rLibName, const String& rModule )
+{
+ const International &rInter = Application::GetAppInternational();
+
+ sal_uInt16 nLibCount = pMgr->GetLibCount();
+ for ( sal_uInt16 nLib = 0; nLib < nLibCount; ++nLib )
+ {
+ if ( COMPARE_EQUAL == rInter.Compare( pMgr->GetLibName( nLib ), rLibName, INTN_COMPARE_IGNORECASE ) )
+ {
+ StarBASIC* pLib = pMgr->GetLib( nLib );
+ if( !pLib )
+ {
+ pMgr->LoadLib( nLib );
+ pLib = pMgr->GetLib( nLib );
+ }
+
+ if( pLib )
+ {
+ sal_uInt16 nModCount = pLib->GetModules()->Count();
+ for( sal_uInt16 nMod = 0; nMod < nModCount; ++nMod )
+ {
+ SbModule* pMod = (SbModule*)pLib->GetModules()->Get( nMod );
+ if ( pMod &&
+ COMPARE_EQUAL == rInter.Compare( pMod->GetName(), rModule, INTN_COMPARE_IGNORECASE ) )
+ {
+ SbMethod* pMethod =
+ (SbMethod*)pMod->Find( rMacro, SbxCLASS_METHOD );
+ if( pMethod )
+ return pMethod;
+ }
+ }
+ }
+ }
+ }
+ return 0;
+}
+
+SbMethod* SfxQueryMacro( BasicManager* pMgr , const String& rMacro )
+{
+ sal_uInt16 nLast = 0;
+ String aMacro = rMacro;
+ String aLibName = aMacro.GetToken( 0, '.', nLast );
+ String aModule = aMacro.GetToken( 0, '.', nLast );
+ aMacro.Erase( 0, nLast );
+
+ return SfxQueryMacro_Impl( pMgr, aMacro, aLibName, aModule );
+}
+
+ErrCode SfxCallMacro( BasicManager* pMgr, const String& rCode,
+ SbxArray *pArgs, SbxValue *pRet )
+{
+ ErrCode nErr;
+ SfxApplication *pApp = SFX_APP();
+ pApp->EnterBasicCall();
+ SbMethod* pMethod = SfxQueryMacro( pMgr, rCode );
+ if ( pMethod )
+ {
+ if ( pArgs )
+ pMethod->SetParameters( pArgs );
+ nErr = pMethod->Call( pRet );
+ }
+ else
+ nErr = ERRCODE_BASIC_PROC_UNDEFINED;
+
+ pApp->LeaveBasicCall();
+ return nErr;
+}
+
+//==========================================================================
+
+SfxMacroInfo::SfxMacroInfo( SfxObjectShell *pDoc ) :
+ bAppBasic(pDoc == NULL),
+ nSlotId(0),
+ nRefCnt(0),
+ pSlot(0),
+ pHelpText(0)
+{}
+
+//==========================================================================
+
+SfxMacroInfo::SfxMacroInfo(SfxObjectShell *pDoc, const String& rLibName,
+ const String& rModuleName, const String& rMethodName) :
+ aLibName(rLibName),
+ aModuleName(rModuleName),
+ aMethodName(rMethodName),
+ nSlotId(0),
+ nRefCnt(0),
+ pSlot(0),
+ pHelpText(0)
+{
+ bAppBasic = (pDoc == 0);
+}
+
+//==========================================================================
+
+SfxMacroInfo::SfxMacroInfo(SfxObjectShell *pDoc, const String& rQualifiedName )
+: nSlotId(0),
+ nRefCnt(0),
+ pSlot(0),
+ pHelpText(0)
+{
+ sal_uInt16 nCount = rQualifiedName.GetTokenCount('.');
+ aMethodName = rQualifiedName.GetToken( nCount-1, '.' );
+ if ( nCount > 1 )
+ aModuleName = rQualifiedName.GetToken( nCount-2, '.' );
+ if ( nCount > 2 )
+ aLibName = rQualifiedName.GetToken( 0, '.' );
+ bAppBasic = (pDoc == 0);
+}
+
+//==========================================================================
+
+SfxMacroInfo::SfxMacroInfo(SfxMacroInfo& rOther) :
+ bAppBasic(rOther.bAppBasic),
+ aLibName(rOther.aLibName),
+ aModuleName(rOther.aModuleName),
+ aMethodName(rOther.aMethodName),
+ nSlotId(rOther.nSlotId),
+ pSlot(0),
+ nRefCnt(0),
+ pHelpText(0)
+{}
+
+//==========================================================================
+
+SfxMacroInfo::~SfxMacroInfo()
+{
+ delete pSlot;
+ delete pHelpText;
+}
+
+//==========================================================================
+
+sal_Bool SfxMacroInfo::operator==(const SfxMacroInfo& rOther) const
+{
+ if ( GetQualifiedName() == rOther.GetQualifiedName() &&
+ bAppBasic == rOther.bAppBasic )
+ return sal_True;
+ else
+ return sal_False;
+}
+
+//==========================================================================
+
+String SfxMacroInfo::GetMacroName() const
+{
+ String aMacroName = aMethodName;
+ aMacroName += '(';
+ aMacroName += aLibName;
+ aMacroName += '.';
+ aMacroName += aModuleName;
+ aMacroName += ')';
+ return aMacroName;
+}
+
+//==========================================================================
+
+String SfxMacroInfo::GetQualifiedName() const
+{
+ String aMacroName;
+ if( aMacroName.Len() || aLibName.Len() )
+ {
+ // Altes Format
+ aMacroName = aLibName;
+ aMacroName += '.';
+ aMacroName += aModuleName;
+ aMacroName += '.';
+ }
+
+ // Wg. ::com::sun::star::script::JavaScript kein Zerlegen des Strings mehr
+ aMacroName += aMethodName;
+ return aMacroName;
+}
+
+String SfxMacroInfo::GetFullQualifiedName() const
+{
+ // Liefert nur Unsinn, wenn f"ur ein ::com::sun::star::script::JavaScript aufgerufen !
+ String aRet;
+ if ( bAppBasic )
+ aRet = SFX_APP()->GetName();
+ aRet += '.';
+ aRet += GetQualifiedName();
+ return aRet;
+}
+
+//==========================================================================
+
+BasicManager* SfxMacroInfo::GetBasicManager() const
+{
+ if (bAppBasic)
+ {
+ return SFX_APP()->GetBasicManager();
+ }
+ else
+ {
+ SfxObjectShell *pDocShell = SfxObjectShell::Current();
+ return pDocShell ? pDocShell->GetBasicManager() :
+ SFX_APP()->GetBasicManager();
+ }
+}
+
+//==========================================================================
+
+String SfxMacroInfo::GetBasicName() const
+{
+ if (bAppBasic)
+ {
+ return SFX_APP()->GetName();
+ }
+ else
+ {
+ SfxObjectShell *pDocShell = SfxObjectShell::Current();
+ if ( pDocShell )
+ return pDocShell->GetTitle();
+ else
+ return SFX_APP()->GetName();
+ }
+}
+
+String SfxMacroInfo::GetHelpText() const
+{
+ if ( pHelpText )
+ return *pHelpText;
+ return String();
+}
+
+String SfxMacroConfig::RequestHelp( sal_uInt16 nId )
+{
+ SfxMacroInfo *pInfo = SFX_APP()->GetMacroConfig()->GetMacroInfo( nId );
+ if ( !pInfo )
+ return String();
+
+ if ( !pInfo->pHelpText )
+ {
+ SbMethod *pMethod =
+ SfxQueryMacro_Impl( pInfo->GetBasicManager(), pInfo->aMethodName,
+ pInfo->aLibName, pInfo->aModuleName );
+ if ( pMethod && pMethod->GetInfo() )
+ pInfo->pHelpText = new String( pMethod->GetInfo()->GetComment() );
+ }
+
+ return pInfo->GetHelpText();
+}
+
+void SfxMacroInfo::SetHelpText( const String& rName )
+{
+ if ( !pHelpText )
+ pHelpText = new String;
+ *pHelpText = rName;
+}
+
+//==========================================================================
+
+SvStream& operator >> (SvStream& rStream, SfxMacroInfo& rInfo)
+{
+ sal_uInt16 nAppBasic, nFileVersion;
+ String aDocName;
+
+ rStream >> nFileVersion;
+ if ( nVersion < nCompatVersion )
+ {
+ // In der 1.Version ohne Versionskennung
+ nAppBasic = nVersion;
+ nFileVersion = 1;
+ rStream.ReadByteString(aDocName,RTL_TEXTENCODING_UTF8);
+ rStream.ReadByteString(rInfo.aLibName,RTL_TEXTENCODING_UTF8);
+ rStream.ReadByteString(rInfo.aModuleName,RTL_TEXTENCODING_UTF8);
+ rStream.ReadByteString(rInfo.aMethodName,RTL_TEXTENCODING_UTF8);
+ }
+ else
+ {
+ String aInput;
+ rStream >> nAppBasic;
+ rStream.ReadByteString(aDocName,RTL_TEXTENCODING_UTF8); // Vorsicht: kann bei AppName Unsinn sein!
+ rStream.ReadByteString(rInfo.aLibName,RTL_TEXTENCODING_UTF8);
+ rStream.ReadByteString(rInfo.aModuleName,RTL_TEXTENCODING_UTF8);
+ rStream.ReadByteString(aInput,RTL_TEXTENCODING_UTF8);
+
+ if ( nFileVersion == nCompatVersion )
+ rInfo.aMethodName = aInput;
+ else
+ {
+ sal_uInt16 nCount = aInput.GetTokenCount('.');
+ rInfo.aMethodName = aInput.GetToken( nCount-1, '.' );
+ if ( nCount > 1 )
+ rInfo.aModuleName = aInput.GetToken( nCount-2, '.' );
+ if ( nCount > 2 )
+ rInfo.aLibName = aInput.GetToken( 0, '.' );
+ }
+ }
+
+ rInfo.bAppBasic = (sal_Bool) nAppBasic;
+ rInfo.nSlotId = SFX_APP()->GetMacroConfig()->GetSlotId(&rInfo);
+ return rStream;
+}
+
+//==========================================================================
+
+SvStream& operator << (SvStream& rStream, const SfxMacroInfo& rInfo)
+{
+ if ( rInfo.bAppBasic )
+ {
+ rStream << nVersion
+ << (sal_uInt16) rInfo.bAppBasic;
+ rStream.WriteByteString(rInfo.GetBasicName(),RTL_TEXTENCODING_UTF8);
+ rStream.WriteByteString(rInfo.aLibName,RTL_TEXTENCODING_UTF8);
+ rStream.WriteByteString(rInfo.aModuleName,RTL_TEXTENCODING_UTF8);
+ rStream.WriteByteString(rInfo.aMethodName,RTL_TEXTENCODING_UTF8);
+ }
+ else
+ {
+ rStream << nVersion
+ << (sal_uInt16) rInfo.bAppBasic;
+ rStream.WriteByteString(SFX_APP()->GetName(),RTL_TEXTENCODING_UTF8);
+ rStream.WriteByteString(rInfo.aLibName,RTL_TEXTENCODING_UTF8);
+ rStream.WriteByteString(rInfo.aModuleName,RTL_TEXTENCODING_UTF8);
+ rStream.WriteByteString(rInfo.aMethodName,RTL_TEXTENCODING_UTF8);
+ }
+
+ return rStream;
+}
+
+sal_Bool SfxMacroInfo::Compare( const SvxMacro& rMacro ) const
+{
+ String aName = rMacro.GetLibName();
+ aName += '.';
+ aName += rMacro.GetMacName();
+ if ( GetFullQualifiedName() == aName )
+ return sal_True;
+ return sal_False;
+}
+
+//==========================================================================
+
+SfxMacroConfig::SfxMacroConfig()
+{
+ pImp = new SfxMacroConfig_Impl;
+}
+
+//==========================================================================
+
+SfxMacroConfig::~SfxMacroConfig()
+{
+ if ( pImp->nEventId )
+ Application::RemoveUserEvent( pImp->nEventId );
+ delete pImp;
+}
+
+//==========================================================================
+
+SFX_STATE_STUB( SfxApplication, MacroState_Impl )
+SFX_EXEC_STUB( SfxApplication, MacroExec_Impl )
+
+sal_uInt16 SfxMacroConfig::GetSlotId(SfxMacroInfoPtr pInfo)
+{
+ sal_uInt16 nCount = pImp->aArr.Count(); // Macro suchen
+ sal_uInt16 i;
+ for (i=0; i<nCount; i++)
+ if ((*(pImp->aArr)[i]) == (*pInfo))
+ break;
+
+ if (i == nCount)
+ { // Macro noch unbekannt
+ nCount = aIdArray.Count();
+ sal_uInt16 n;
+ for (n=0; n<nCount; n++) // freie SlotId suchen
+ if (aIdArray[n] > SID_MACRO_START + n)
+ break;
+
+ sal_uInt16 nNewSlotId = SID_MACRO_START + n;
+ if ( nNewSlotId > SID_MACRO_END )
+ return 0;
+ aIdArray.Insert( SID_MACRO_START + n, n );
+
+ SfxSlot *pNewSlot = new SfxSlot;
+ pNewSlot->nSlotId = SID_MACRO_START + n;
+ pNewSlot->nGroupId = 0;
+ pNewSlot->nFlags = SFX_SLOT_ASYNCHRON;
+ pNewSlot->nMasterSlotId = 0;
+ pNewSlot->nValue = 0;
+ pNewSlot->fnExec = SFX_STUB_PTR(SfxApplication,MacroExec_Impl);
+ pNewSlot->fnState = SFX_STUB_PTR(SfxApplication,MacroState_Impl);
+ pNewSlot->pType = 0; HACK(SFX_TYPE(SfxVoidItem))
+ pNewSlot->pName = pNewSlot->pMethodName = U2S(pInfo->aMethodName).getStr();
+ pNewSlot->pLinkedSlot = 0;
+ pNewSlot->nArgDefCount = 0;
+ pNewSlot->pFirstArgDef = 0;
+ pNewSlot->pUnoName = 0;
+
+ if (nCount)
+ {
+ SfxSlot *pSlot = (pImp->aArr)[0]->pSlot;
+ pNewSlot->pNextSlot = pSlot->pNextSlot;
+ pSlot->pNextSlot = pNewSlot;
+ }
+ else
+ pNewSlot->pNextSlot = pNewSlot;
+
+ // Macro uebernehmen
+ SfxMacroInfoPtr pNewInfo = new SfxMacroInfo(*pInfo);
+ pNewInfo->nSlotId = SID_MACRO_START + n;
+ pImp->aArr.Insert(pNewInfo,n);
+ pNewInfo->pSlot = pNewSlot;
+ pInfo->nSlotId = pNewInfo->nSlotId;
+ pNewInfo->nRefCnt++;
+ }
+ else
+ {
+ pInfo->nSlotId = (pImp->aArr)[i]->nSlotId;
+ (pImp->aArr)[i]->nRefCnt++;
+ }
+
+ return pInfo->nSlotId;
+}
+
+//==========================================================================
+
+void SfxMacroConfig::ReleaseSlotId(sal_uInt16 nId)
+{
+ DBG_ASSERT( IsMacroSlot( nId ), "SlotId ist kein Macro!");
+
+ sal_uInt16 nCount = pImp->aArr.Count();
+ for (sal_uInt16 i=0; i<nCount; i++)
+ {
+ SfxMacroInfo *pInfo = (pImp->aArr)[i];
+ if (pInfo->nSlotId == nId)
+ {
+ pInfo->nRefCnt--;
+ if (pInfo->nRefCnt == 0)
+ {
+ // Slot wird nicht mehr referenziert, also holen
+ SfxSlot *pSlot = pInfo->pSlot;
+
+ // Slot aus der Verkettung rausnehmen
+ while (pSlot->pNextSlot != pInfo->pSlot)
+ pSlot = (SfxSlot*) pSlot->pNextSlot;
+ pSlot->pNextSlot = pInfo->pSlot->pNextSlot;
+
+ // Slot selbst kurz schlie\sen
+ pSlot = pInfo->pSlot;
+ pSlot->pNextSlot = pSlot;
+
+ // MacroInfo aus Array entfernen, damit sie kein Unheil
+ // anrichten kann
+ pImp->aArr.Remove(i);
+
+ // SlotId wieder freigeben
+ sal_uInt16 nCount = aIdArray.Count();
+ for (sal_uInt16 n=0; n<nCount; n++)
+ {
+ if (aIdArray[n] == nId)
+ {
+ aIdArray.Remove(n);
+ break;
+ }
+ }
+
+ // Falls ein Image belegt wwurde, kann das jetzt wieder frei
+ // gegeben werden (wenn nicht aus dtor gerufen, da ist der
+ // ImageManager schon weg)
+ SfxImageManager *pImgMgr = SFX_IMAGEMANAGER();
+ if (pImgMgr)
+ pImgMgr->ReplaceImage(nId, 0);
+
+ // Sofern nicht die Applikation heruntergefahren wird, mu\s
+ // der Slot asynchron gel"oscht werden, falls er in seinem
+ // eigenen Execute abgeschossen wird!
+ if ( !SFX_APP()->IsDowning() )
+ pImp->nEventId = Application::PostUserEvent( LINK(this, SfxMacroConfig, EventHdl_Impl), pInfo );
+ else
+ EventHdl_Impl( pInfo );
+ }
+ return;
+ }
+ }
+
+ DBG_ERROR("Macro-SlotId nicht gefunden!");
+}
+
+//==========================================================================
+
+void SfxMacroConfig::RegisterSlotId(sal_uInt16 nId)
+{
+ DBG_ASSERT( IsMacroSlot( nId ), "SlotId ist kein Macro!");
+
+ sal_uInt16 nCount = pImp->aArr.Count();
+ for (sal_uInt16 i=0; i<nCount; i++)
+ {
+ if ((pImp->aArr)[i]->nSlotId == nId)
+ {
+ (pImp->aArr)[i]->nRefCnt++;
+ return;
+ }
+ }
+
+ DBG_ERROR("Macro-SlotId nicht gefunden!");
+}
+
+//==========================================================================
+
+const SfxMacroInfoPtr SfxMacroConfig::GetMacroInfo(sal_uInt16 nId) const
+{
+ sal_uInt16 nCount = pImp->aArr.Count();
+ for (sal_uInt16 i=0; i<nCount; i++)
+ if ((pImp->aArr)[i]->nSlotId == nId)
+ return (pImp->aArr)[i];
+
+ return 0;
+}
+
+//==========================================================================
+
+const SfxMacroInfoPtr SfxMacroConfig::GetMacroInfo_Impl( const SvxMacro *pMacro ) const
+{
+ sal_uInt16 nCount = pImp->aArr.Count();
+ for (sal_uInt16 i=0; i<nCount; i++)
+ if ((pImp->aArr)[i]->Compare(*pMacro) )
+ return (pImp->aArr)[i];
+ return 0;
+}
+
+//==========================================================================
+
+sal_Bool SfxMacroConfig::ExecuteMacro( sal_uInt16 nId, const String& rArgs ) const
+{
+ const SfxMacroInfoPtr pInfo = GetMacroInfo( nId );
+ if ( !pInfo )
+ return sal_False;
+
+ SfxObjectShell* pSh = SfxObjectShell::Current();
+
+ SvxMacro aMacro( pInfo->GetQualifiedName(), pInfo->GetBasicName(), STARBASIC );
+ sal_Bool bRet = ExecuteMacro( pSh, &aMacro, rArgs );
+
+ // Release, da im Dispatcher-Execute ein Register gemacht wurde
+ ((SfxMacroConfig*)this)->ReleaseSlotId( nId );
+ return bRet;
+}
+
+sal_Bool SfxMacroConfig::ExecuteMacro( SfxObjectShell *pSh, const SvxMacro* pMacro, const String& rArgs ) const
+{
+ SfxApplication *pApp = SFX_APP();
+
+ // Name des Macros oder Scripts bzw. ScriptCode
+ String aCode( pMacro->GetMacName() );
+ ErrCode nErr = ERRCODE_NONE;
+
+ // Ist es ein Basic-Macro ?
+ ScriptType eSType = pMacro->GetScriptType();
+ sal_Bool bIsBasic = eSType == STARBASIC;
+ sal_Bool bIsStarScript = ( eSType == EXTENDED_STYPE && pMacro->GetLibName().SearchAscii( "StarScript" ) != STRING_NOTFOUND );
+ sal_Bool bIsBasicLibBased = bIsBasic || bIsStarScript || !pSh;
+
+#if SUPD<582
+ if ( !bIsBasicLibBased && pSh && pApp->GetIniManager()->IsJavaScriptEnabled() )
+ {
+ // AB: #49303# hier muss Window als this gesetzt werden
+ SfxJS* pJS = pSh->GetMedium()->GetJavaScript();
+ SjJScriptWindowObject* pWindow = pJS ? pJS->GetWindowObject() : NULL;
+
+ Link aLink = LINK( this, SfxMacroConfig, CallbackHdl_Impl );
+ pImp->bWaitingForCallback = sal_True;
+ nErr = pSh->CallJavaScript( *pMacro, pWindow, &aLink );
+ sal_uInt32 nTicks = Time::GetSystemTicks();
+ nTicks += 5000;
+ while ( pImp->bWaitingForCallback && nTicks > Time::GetSystemTicks() )
+ Application::Yield();
+ pImp->bWaitingForCallback = sal_False;
+ return nErr != ERRCODE_NONE;
+ }
+ else
+#endif
+
+ if ( bIsBasicLibBased )
+ {
+ pApp->EnterBasicCall();
+ BasicManager *pAppMgr = SFX_APP()->GetBasicManager();
+ if( bIsBasic )
+ {
+ // BasicManager von Document?
+ BasicManager *pMgr = pSh ? pSh->GetBasicManager() : NULL;
+
+ // Da leider der Name zwischendurch h"aufig gewechselt hat ...
+ if( SFX_APP()->GetName() == pMacro->GetLibName() ||
+ pMacro->GetLibName().EqualsAscii("StarDesktop") )
+ pMgr = pAppMgr;
+ else if ( pMgr == pAppMgr )
+ pMgr = NULL;
+
+ if ( pSh && pMgr && pMgr == pAppMgr )
+ {
+/*
+ SfxViewFrame *pFrame = SfxViewFrame::GetFirst( pSh, 0, sal_False );
+ SbxVariable *pDocVar = pAppMgr->GetLib(0)->Find( "ThisDocument", SbxCLASS_PROPERTY );
+ if ( pDocVar )
+ pDocVar->PutObject( pSh->GetSbxObject() );
+
+ SbxVariable *pWinVar = pAppMgr->GetLib(0)->Find( "ThisWindow", SbxCLASS_PROPERTY );
+ if ( pWinVar )
+ pWinVar->PutObject( pFrame->GetSbxObject() );
+*/
+ SFX_APP()->Get_Impl()->pThisDocument = pSh;
+ SbxVariable *pCompVar = pAppMgr->GetLib(0)->Find( DEFINE_CONST_UNICODE("ThisComponent"), SbxCLASS_PROPERTY );
+ if ( pCompVar )
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xInterface ( pSh->GetModel() , ::com::sun::star::uno::UNO_QUERY );
+ ::com::sun::star::uno::Any aAny;
+ aAny <<= xInterface;
+ pCompVar->PutObject( GetSbUnoObject( DEFINE_CONST_UNICODE("ThisComponent"), aAny ) );
+ }
+
+ nErr = Call( 0, aCode, pMgr );
+
+ SFX_APP()->Get_Impl()->pThisDocument = NULL;
+/*
+ if ( pDocVar )
+ pDocVar->PutObject( NULL );
+ if ( pWinVar )
+ pWinVar->PutObject( NULL );
+ */
+ if ( pCompVar )
+ pCompVar->PutObject( NULL );
+ }
+ else if ( pMgr )
+ nErr = Call( 0, aCode, pMgr );
+ else
+ nErr = SbxERR_NO_METHOD;
+
+ }
+#if SUPD<582
+ else if( bIsStarScript )
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xSource;
+
+ // Haben wir eine Shell?
+ if( pSh )
+ {
+ // dann dort callen
+ nErr = pSh->CallScript( pMacro->GetLibName(), aCode, xSource, NULL, NULL );
+ }
+ else
+ {
+ // ::com::sun::star::script::Engine von der Standard-Bibliothek anfordern
+ StarBASIC* pStdLib = pAppMgr->GetStdLib();
+ ::com::sun::star::uno::Reference< ::com::sun::star::script::XEngine > xEngine= pStdLib->getEngine( pAppMgr );
+ SfxMacroConfig::CallStarScript( xEngine, aCode, xSource, NULL, NULL );
+ }
+ }
+#endif
+ pApp->LeaveBasicCall();
+ }
+ else
+ {
+ nErr = SbxERR_NO_METHOD;
+ }
+
+ return ( nErr == ERRCODE_NONE );
+}
+
+sal_Bool SfxMacroConfig::CheckMacro( SfxObjectShell *pSh, const SvxMacro* pMacro ) const
+{
+ SfxApplication *pApp = SFX_APP();
+
+ // Name des Macros oder Scripts bzw. ScriptCode
+ String aCode( pMacro->GetMacName() );
+ ErrCode nErr = ERRCODE_NONE;
+
+#if SUPD<582
+ // Ist es ein Basic-Macro ?
+ sal_Bool bIsBasic = pMacro->GetScriptType() == STARBASIC;
+ if ( !bIsBasic )
+ return pSh != NULL;
+#endif
+
+ // BasicManager von Document oder Application
+ pApp->EnterBasicCall();
+ BasicManager *pAppMgr = SFX_APP()->GetBasicManager();
+ BasicManager *pMgr = pSh ? pSh->GetBasicManager() : NULL;
+
+ // Da leider der Name zwischendurch h"aufig gewechselt hat ...
+ if( SFX_APP()->GetName() == pMacro->GetLibName() ||
+ pMacro->GetLibName().EqualsAscii("StarDesktop") )
+ pMgr = pAppMgr;
+ else if ( pMgr == pAppMgr )
+ pMgr = NULL;
+
+ if ( !pMgr || !SfxQueryMacro( pMgr, aCode ) )
+ nErr = SbxERR_NO_METHOD;
+ pApp->LeaveBasicCall();
+ return ( nErr == ERRCODE_NONE );
+}
+
+//==========================================================================
+
+sal_Bool SfxMacroConfig::CheckMacro( sal_uInt16 nId ) const
+{
+ const SfxMacroInfoPtr pInfo = GetMacroInfo( nId );
+ if ( !pInfo )
+ return sal_False;
+
+ // Basic nur initialisieren, wenn default nicht ::com::sun::star::script::JavaScript; dann mu\s
+ // in IsBasic() sowieso das Basic angelegt werden
+ SfxObjectShell* pSh = SfxObjectShell::Current();
+
+ SfxApplication *pApp = SFX_APP();
+ pApp->EnterBasicCall();
+
+ // BasicManager von Document oder Application
+ BasicManager *pAppMgr = SFX_APP()->GetBasicManager();
+ BasicManager *pMgr = pSh ? pSh->GetBasicManager() : NULL;
+
+ if( SFX_APP()->GetName() == pInfo->GetBasicName() )
+ pMgr = SFX_APP()->GetBasicManager();
+ else if ( pMgr == pAppMgr )
+ pMgr = NULL;
+
+ String aFull( pInfo->GetQualifiedName() );
+ sal_Bool bIsBasic = pMgr ? IsBasic( 0, aFull, pMgr ) : sal_False;
+ pApp->LeaveBasicCall();
+ return bIsBasic;
+}
+
+//==========================================================================
+
+IMPL_LINK( SfxMacroConfig, CallbackHdl_Impl, SfxMacroConfig*, pConfig )
+{
+ pImp->bWaitingForCallback = sal_False;
+ return 0;
+}
+
+IMPL_LINK( SfxMacroConfig, EventHdl_Impl, SfxMacroInfo*, pInfo )
+{
+ delete pInfo;
+ pImp->nEventId = 0;
+ return 0;
+}
+
+sal_Bool SfxMacroConfig::IsBasic( SbxObject* pVCtrl, const String& rCode, BasicManager* pMgr )
+{
+ sal_Bool bFound;
+ SFX_APP()->EnterBasicCall();
+ bFound = SfxQueryMacro( pMgr, rCode ) != 0;
+ SFX_APP()->LeaveBasicCall();
+ return bFound;
+}
+
+ErrCode SfxMacroConfig::Call( SbxObject* pVCtrl,
+ const String& rCode, BasicManager* pMgr, SbxArray *pArgs, SbxValue *pRet )
+{
+ SfxApplication *pApp = SFX_APP();
+ pApp->EnterBasicCall();
+ SbMethod* pMethod = SfxQueryMacro( pMgr, rCode );
+ ErrCode nErr = 0;
+ if( pMethod )
+ {
+ if ( pArgs )
+ pMethod->SetParameters( pArgs );
+ nErr = pMethod->Call( pRet );
+ }
+ else
+ nErr = ERRCODE_BASIC_PROC_UNDEFINED;
+
+ pApp->LeaveBasicCall();
+ return nErr;
+}
+
+#if SUPD<582
+void SfxMacroConfig::CallStarScript( const ::com::sun::star::uno::Reference< ::com::sun::star::script::XEngine > & rxEngine, const String & rCode,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & rSource, void *pArgs, void *pRet )
+{
+ static String aCallPrefix( "();" );
+
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > aArgs;
+ if( pArgs )
+ aArgs = *(::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > *)pArgs;
+
+ // HACK!!! TODO: Klaeren, wie das wirklich laufen soll
+ String aCode = rCode;
+ aCode += aCallPrefix;
+
+ ::rtl::OUString aUCode = StringToOUString( aCode, RTL_TEXTENCODING_UTF8 );
+ if ( pRet )
+ {
+ *((::com::sun::star::uno::Any*)pRet) = rxEngine->run( aUCode, rSource, aArgs );
+ }
+ else
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::script::XEngineListener > xCB;
+ rxEngine->runAsync( aUCode, rSource, aArgs, xCB );
+ }
+}
+#endif
+
+sal_Bool SfxMacroConfig::IsMacroSlot( sal_uInt16 nId )
+{
+ return ( nId >= SID_MACRO_START && nId <= SID_MACRO_END );
+}
+
+
diff --git a/sfx2/source/control/macro.cxx b/sfx2/source/control/macro.cxx
new file mode 100644
index 000000000000..8affc5acfa37
--- /dev/null
+++ b/sfx2/source/control/macro.cxx
@@ -0,0 +1,858 @@
+/*************************************************************************
+ *
+ * $RCSfile: macro.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:29 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _ARGS_HXX //autogen
+#include <svtools/args.hxx>
+#endif
+
+#ifndef _SBXVAR_HXX //autogen
+#include <svtools/sbxvar.hxx>
+#endif
+#pragma hdrstop
+
+#include <app.hxx>
+#include <module.hxx>
+#include <shell.hxx>
+#include <request.hxx>
+#include <objsh.hxx>
+#include <viewsh.hxx>
+#include <viewfrm.hxx>
+#include <msg.hxx>
+#include <macro.hxx>
+#include <sfxtypes.hxx>
+
+//====================================================================
+
+SV_DECL_PTRARR_DEL( SfxStatements_Impl, SfxMacroStatement*, 16, 8 );
+SV_IMPL_PTRARR( SfxStatements_Impl, SfxMacroStatement* );
+TYPEINIT1(SfxMacroItem,SfxPoolItem);
+
+//--------------------------------------------------------------------
+
+struct SfxMacro_Impl
+
+/* [Beschreibung]
+
+ Implementations-Struktur der Klasse <SfxMacro>.
+*/
+
+{
+ SfxMacroMode eMode; /* Zweck der <SfxMacro>-Instanz,
+ Bedeutung siehe enum <SfxMacroMode> */
+ SfxStatements_Impl aList; /* Liste von aufgezeichneten Statements */
+ USHORT nObjNo; // Durchnumerierung der SbxObjects
+};
+
+//====================================================================
+
+SfxMacroStatement::SfxMacroStatement
+(
+ const SfxShell& rShell, // <SfxShell>, die den Request ausf"uhrte
+ const String& rTarget, // Name des Zielobjektes vor der Ausf"urhung
+ BOOL bAbsolute, // obsolet
+ const SfxSlot& rSlot, // der <SfxSlot>, der das Statement abspielen kann
+ BOOL bRequestDone, // wurde der Request tats"achlich ausgef"uhrt
+ SfxArguments* pArguments // aktuelle Parameter (werden "ubernommen)
+)
+
+/* [Beschreibung]
+
+ Dieser Konstruktor der Klasse SfxMacroStatement erzeugt ein Statement,
+ bei dem ein Objekt angesprochen wird, welches durch 'rShell' angegeben
+ ist. Dabei erfolgt die Addressierung je nach 'bAbsolute' absolut,
+ also z.B. als '[mydoc.sdc]' oder relativ, also z.B. 'ActiveDocument'.
+
+ Je nach Art der Subklasse von 'rShell' ergeben sich folgende
+ Ausdr"ucke:
+
+ |absolut relativ
+ -----------------------------------------------------------------------
+ SfxApplication' | 'StarCalc' 'Application'
+ SfxViewFrame' |'[mydoc.sdc:1]' 'ActiveWindow'
+ SfxViewShell' | '[mydoc.sdc:1]' 'AvtiveWindow'
+ SfxObjectShell' | '[mydoc.sdc]' 'ActiveDocument'
+ sonstige (Sub-Shells) | '[mydoc.sdc:1]' 'ActiveWindow'
+
+ Dabei sind 'StarCalc' stellvertretend fr den Namen der Applikation
+ (Application::GetAppName()const). In der absoluten Fassung k"onnte
+ die Selektion auch deskriptiv z.B. als 'CellSelection("A5-D8")')
+ angesprochen werden, dazu mu\ jedoch vom Anwendungsprogrammierer der
+ Konstruktor <SfxMacroStatement::SfxMacroStatement(const String&,
+ const SfxSlot&,BOOL,SfxArguments*)> verwendet werden.
+
+ F"ur das so bezeichnete Objekt wird dann je nach Typ des Slots
+ eine Zuweisung an eines seiner Properties oder der Aufruf einer seiner
+ Methoden ausgedr"uckt.
+
+
+ [Beispiele]
+
+ absolut:
+ SCalc3.OpenDocument( "\docs\mydoc.sdd", "StarDraw Presentation", 0, 0 )
+ [mydoc.sdd].Activate()
+ [mydoc.sdd:1].SwitchToView( 2 )
+ [mydoc.sdc:1:1].CellSelection( "A5-D8" ).LineColor = 192357
+
+ relativ:
+ ActiveWindow.LineColor = 192357
+
+
+ [Querverweise]
+
+ <SfxMacroStatement::SfxMacroStatement(const String&,const SfxSlot&,BOOL,SfxArguments*)>
+ <SfxMacroStatement::SfxMacroStatement(const String&)>
+*/
+
+: nSlotId( rSlot.GetSlotId() ),
+ pArgs( pArguments ),
+ bDone( bRequestDone ),
+ pDummy( 0 )
+{
+ // Workaround Recording nicht exportierter Slots (#25386#)
+ if ( !rSlot.pName )
+ return;
+
+ // Objekt-Typ bestimmen
+ FASTBOOL bIsApp = rShell.ISA(SfxApplication);
+ FASTBOOL bIsDoc = rShell.ISA(SfxObjectShell);
+ FASTBOOL bIsWin = !bIsApp && !bIsDoc &&
+ ( rShell.ISA(SfxViewShell) || rShell.ISA(SfxViewFrame) );
+ FASTBOOL bIsSel = !bIsApp && !bIsDoc && !bIsWin;
+
+ // Objekt nicht schon im Slot-Namen enthalten?
+ if ( bIsSel || rSlot.pName[0] == '.' )
+ {
+ // absolutes Aufzeichnen?
+ if ( rSlot.IsMode( SFX_SLOT_RECORDABSOLUTE ) )
+ {
+ // an der Applikation oder am Modul
+ if ( rShell.ISA(SfxApplication) || rShell.ISA(SfxModule) )
+ aStatement = rTarget;
+
+ // am Dokument?
+ // '[' = 5Bh
+ // ']' = 5Dh
+ else if ( rShell.ISA(SfxObjectShell) )
+ {
+ aStatement = 0x005B;
+ aStatement += rTarget;
+ aStatement += 0x005D;
+ }
+
+ else if ( rShell.ISA(SfxViewFrame) )
+ {
+ aStatement = 0x005B;
+ aStatement += rShell.GetSbxObject()->GetName();
+ aStatement += 0x005D;
+ }
+
+ else
+ {
+ // an der View oder Sub-Shell
+ SfxViewShell *pViewShell = rShell.GetViewShell();
+ aStatement = 0x005B;
+ aStatement += pViewShell->GetViewFrame()->GetSbxObject()->GetName();
+ aStatement += 0x005D;
+ if ( !rShell.ISA(SfxViewFrame) )
+ // an einer Sub-Shell zus"atlich .Selection anh"angen
+ aStatement += DEFINE_CONST_UNICODE(".Selection");
+ }
+ }
+ else // relatives Aufzeichnen
+ {
+ // an der Application?
+ if ( rShell.ISA(SfxApplication) )
+ aStatement = DEFINE_CONST_UNICODE("Application");
+
+ // am Modul?
+ else if ( rShell.ISA(SfxModule) )
+ aStatement = DEFINE_CONST_UNICODE("ActiveModule");
+
+ // am Dokument
+ else if ( rShell.ISA(SfxObjectShell) )
+ aStatement = DEFINE_CONST_UNICODE("ActiveDocument");
+
+ // am Window
+ else if ( rShell.ISA(SfxViewShell) || rShell.ISA(SfxViewFrame) )
+ aStatement = DEFINE_CONST_UNICODE("ActiveWindow");
+
+ else
+ // an einer Sub-Shell
+ aStatement = DEFINE_CONST_UNICODE("Selection");
+ }
+ }
+/*
+ if ( bIsSel )
+ {
+ // bei Selection ggf. noch den Namen der SubShell anh"angen
+ const SfxShellObject *pShObj =
+ (const SfxShellObject*) rShell.GetSbxObject();
+ if ( pShObj )
+ {
+ const SfxShellObject *pParentObj =
+ (const SfxShellObject*) pShObj->GetParent();
+ SfxShell *pParentSh = pParentObj->GetShell();
+ DBG_ASSERT( pParentSh->ISA(SfxViewFrame),
+ "parent of SubShell must be a Frame" );
+ if ( rSlot.pName[0] == '.' )
+ {
+ aStatement += '.';
+ aStatement += rShell.GetSbxObject()->GetName();
+ }
+ }
+ else
+ DBG_ASSERT( rSlot.pName[0] != '0', "recording unnamed object" );
+ }
+*/
+ // an diesen Objekt-Ausdruck den Methoden-/Property-Namen und Parameter
+ GenerateNameAndArgs_Impl( SfxRequest::GetRecordingMacro(),
+ rSlot, bRequestDone, pArgs);
+}
+
+//--------------------------------------------------------------------
+
+SfxMacroStatement::SfxMacroStatement
+(
+ const String& rTarget, // Objekt, was beim Playing angesprochen wird
+ const SfxSlot& rSlot, // der <SfxSlot>, der das Statement abspielen kann
+ BOOL bRequestDone, // wurde der Request tats"achlich ausgef"uhrt
+ SfxArguments* pArguments // aktuelle Parameter (werden "ubernommen)
+)
+
+/* [Beschreibung]
+
+
+ [Querverweise]
+
+ <SfxMacroStatement::SfxMacroStatement(const String&)>
+ <SfxMacroStatement::SfxMacroStatement(const SfxShell&,BOOL,const SfxSlot&,BOOL,SfxArguments*)>
+*/
+
+: nSlotId( rSlot.GetSlotId() ),
+ pArgs( pArguments ),
+ bDone( bRequestDone ),
+ pDummy( 0 )
+{
+ aStatement = rTarget;
+ aStatement += 0x002E; // '.' = 2Eh
+ GenerateNameAndArgs_Impl( SfxRequest::GetRecordingMacro(),
+ rSlot, bRequestDone, pArgs);
+}
+
+//--------------------------------------------------------------------
+
+SfxMacroStatement::SfxMacroStatement
+(
+ const String& rStatement // manuell erzeugte(s) Statement(s)
+)
+
+/* [Beschreibung]
+
+ Dieser Konstruktor erzeugt eine SfxMacroStatement-Instanz, deren
+ Aufbau vollst"andig vom Applikationsentwickler bestimmt wird. Da der
+ angegebene String auch mehrere mit CR/LF getrennte Statements
+ enthalten darf, ist damit ein weitgehender Eingriff in das Aufzeichnen
+ von BASIC-Makros m"oglich, um Spezialf"alle zu behandeln.
+
+
+ [Querverweise]
+
+ <SfxMacroStatement::SfxMacroStatement(const String&,const SfxSlot&,BOOL,SfxArguments*)>
+ <SfxMacroStatement::SfxMacroStatement(const SfxShell&,BOOL,const SfxSlot&,BOOL,SfxArguments*)>
+*/
+
+: aStatement( rStatement ),
+ nSlotId( 0 ),
+ pArgs( 0 ),
+ bDone( TRUE ),
+ pDummy( 0 )
+{
+}
+
+//--------------------------------------------------------------------
+
+SfxMacroStatement::SfxMacroStatement
+(
+ const SfxMacroStatement& rOrig // Original, von dem kopiert wird
+)
+
+/* [Beschreibung]
+
+ Copy-Konstruktor der SfxMacroStatement-Klasse.
+*/
+
+: aStatement( rOrig.aStatement ),
+ nSlotId( rOrig.nSlotId ),
+ pArgs( 0 ),
+ bDone( rOrig.bDone ),
+ pDummy( 0 )
+{
+ if ( rOrig.pArgs )
+ pArgs = new SfxArguments( *rOrig.pArgs );
+}
+
+//--------------------------------------------------------------------
+
+SfxMacroStatement::~SfxMacroStatement()
+
+/* [Beschreibung]
+
+ Destruktor der Klasse SfxMacroStatement. Gibt die Liste der
+ aktuellen Parameter frei.
+*/
+
+{
+ delete pArgs;
+}
+
+//--------------------------------------------------------------------
+
+void SfxMacroStatement::GenerateNameAndArgs_Impl
+(
+ SfxMacro* pMacro, // darin wird aufgezeichnet
+ const SfxSlot& rSlot, // der Slot, der das Statement abspielen kann
+ BOOL bRequestDone, // TRUE=wurde ausgef"uhrt, FALSE=abgebrochen
+ SfxArguments* pArgs // die aktuellen Parameter
+)
+
+/* [Beschreibung]
+
+ Interne Hilfsmethode zum generieren des Funktions-/Property-Names
+ sowie der Parameter. Diese Methode wird nur verwendet, wenn der
+ Anwendungsprogrammierer keinen eigenen Source an den <SfxRequest>
+ geh"angt hat.
+*/
+
+{
+ // . zwsischen Object und Prop/Meth-Name
+ // '.' = 2Eh
+ if ( aStatement.Len() && aStatement.GetChar( aStatement.Len() - 1 ) != 0x002E &&
+ rSlot.pName[0] != 0x002E )
+ aStatement += 0x002E;
+
+ // der Name des Slots ist der Name der Methode / des Properties
+ aStatement += String::CreateFromAscii(rSlot.pName);
+ if ( rSlot.IsMode(SFX_SLOT_METHOD) )
+ aStatement += DEFINE_CONST_UNICODE("( ");
+ else
+ aStatement += DEFINE_CONST_UNICODE(" = ");
+
+ // alle zusammengesuchten Parameter rausschreiben
+ if ( pArgs && pArgs->Count() ) // Abfrage doppelt wegen BLC-Bug
+ for ( USHORT nArg = 0; nArg < pArgs->Count(); ++nArg )
+ {
+ // den Parameter textuell darstellen
+ String aArg;
+ const SbxVariable& rVar = pArgs->Get(nArg);
+ switch ( rVar.GetType() & (2*SbxUSERn+1) )
+ {
+ case SbxEMPTY:
+ case SbxNULL:
+ // kein Argument
+ break;
+
+ case SbxSTRING:
+ {
+ // Anf"uhrungszeichen werden verdoppelt
+ XubString aRecordable( rVar.GetString() );
+ USHORT nPos = 0;
+ while ( TRUE )
+ {
+ nPos = aRecordable.SearchAndReplace( DEFINE_CONST_UNICODE('"'), DEFINE_CONST_UNICODE("\"\""), nPos );
+ if ( STRING_NOTFOUND == nPos )
+ break;
+ nPos += 2;
+ }
+
+ // nicht druckbare Zeichen werden als chr$(...) geschrieben
+ FASTBOOL bPrevReplaced = FALSE;
+ for ( USHORT n = 0; n < aRecordable.Len(); ++n )
+ {
+ sal_Unicode cChar = aRecordable.GetChar(n);
+ if ( !( cChar>=32 && cChar!=127 ) ) // ALS ERSATZ FUER String::IsPrintable()!
+ {
+ XubString aReplacement( DEFINE_CONST_UNICODE("+chr$(") );
+ aReplacement += cChar;
+
+ if ( bPrevReplaced )
+ {
+ aRecordable.Insert( aReplacement, n - 2 );
+ n += aReplacement.Len();
+ aRecordable.SetChar((unsigned short) (n-2), 0x0029);// ')' = 29h
+ aRecordable.Replace( n-1, 2, DEFINE_CONST_UNICODE("+\"") );
+ // ++n;
+ }
+ else
+ {
+ aReplacement += DEFINE_CONST_UNICODE(")+\"");
+ aRecordable.SetChar(n, 0x0022 );// '"' = 22h
+ aRecordable.Insert( aReplacement, n + 1 );
+ n += aReplacement.Len();
+ }
+ bPrevReplaced = TRUE;
+ }
+ else
+ bPrevReplaced = FALSE;
+ }
+
+ // Argument in Anf"uhrungszeichen
+ aArg = 0x0022; // '"' = 22h
+ aArg += aRecordable;
+ aArg += 0x0022;
+ break;
+ }
+
+ case SbxBOOL:
+ {
+ // symbolisch als TRUE und FALSE
+ aArg = rVar.GetBool() ? DEFINE_CONST_UNICODE("TRUE") : DEFINE_CONST_UNICODE("FALSE");
+ break;
+ }
+
+ case SbxBYTE:
+ {
+ // als Zahl darstellen
+ aArg = (USHORT) rVar.GetByte();
+ break;
+ }
+
+ case SbxOBJECT:
+ {
+ HACK(only an experimental implementation)
+ SbxObjectRef xObj = (SbxObject*) rVar.GetObject();
+
+ // einen Objektnamen generieren
+ String aObjectName( 'a' );
+ aObjectName += xObj->GetClassName();
+ aObjectName += pMacro->NextObjectNo();
+
+ // das Objekt mit Daten belegen
+ String aObjectDef( DEFINE_CONST_UNICODE("\nDIM ") );
+ aObjectDef += aObjectName;
+ aObjectDef += DEFINE_CONST_UNICODE(" AS NEW ");
+ aObjectDef += xObj->GetClassName();
+ aObjectDef += DEFINE_CONST_UNICODE("\nWITH ");
+ aObjectDef += aObjectName;
+ aObjectDef += DEFINE_CONST_UNICODE("\n");
+ aObjectDef += xObj->GenerateSource( DEFINE_CONST_UNICODE("\t"), 0 );
+ aObjectDef += DEFINE_CONST_UNICODE("\nEND WITH\n");
+ aStatement.Insert( aObjectDef, 0 );
+ aObjectDef += DEFINE_CONST_UNICODE("\n\n");
+
+ // Objektname als Parameter anh"angen
+ aArg = aObjectName;
+ break;
+ }
+
+ default:
+ // alles andere als String ohne Anf"uhrungszeichen
+ aArg = rVar.GetString();
+ }
+
+ // den Parameter anh"angen
+ aStatement += aArg;
+ aStatement += DEFINE_CONST_UNICODE(", ");
+ }
+
+ // Statement beeden
+ if ( pArgs && pArgs->Count() )
+ aStatement.Erase( aStatement.Len() - 2, 1 );
+ else
+ aStatement.Erase( aStatement.Len() - 1, 1 );
+ if ( rSlot.IsMode(SFX_SLOT_METHOD) )
+ aStatement += 0x0029; // ')' = 29h
+
+ if ( !bRequestDone )
+ // nicht als "Done()" gekennzeichnete Statements auskommentieren
+ aStatement.InsertAscii( "rem ", 0 );
+}
+
+//--------------------------------------------------------------------
+
+SfxMacro::SfxMacro
+(
+ SfxMacroMode eMode // Zweck der Instanz, siehe <SfxMacroMode>
+)
+
+/* [Beschreibung]
+
+ Konstruktor der Klasse SfxMacro. Instanzen dieser Klasse werden im
+ SFx zu zwei Zwecken ben"otigt:
+
+ 1. zum Aufzeichnen von Makros
+ In diesem Fall wird der Konstruktor mit SFX_MACRO_RECORDINGABSOLUTE
+ oder SFX_MACRO_RECORDINGRELATIVE aufgerufen. Es sollte sich um eine
+ Instanz einer abgeleiteten Klasse handeln, um in der Ableitung
+ die Information dar"uber unterzubringen, wo das Makro gespeichert
+ werden soll. Ein solches Makro solle sich dann in seinem Destruktor
+ an der vom Benutzer gew"ahlten Stelle speichern.
+
+ 2. zum Zuordnen von exisitierenden Makros
+ In diesem Fall wird der Konstruktor mit SFX_MACRO_EXISTING aufgerufen.
+ Eine solche Instanz wird z.B. ben"otigt, wenn Makros auf Events
+ oder <SfxControllerItem>s konfiguriert werden sollen.
+*/
+
+: pImp( new SfxMacro_Impl )
+
+{
+ pImp->eMode = eMode;
+ pImp->nObjNo = 0;
+}
+
+//--------------------------------------------------------------------
+
+SfxMacro::~SfxMacro()
+
+/* [Beschreibung]
+
+ Virtueller Destruktor der Klasse SfxMacro. Dieser sollte in den
+ abgeleiteten Klassen "uberladen werden, um in den Modi
+ SFX_MACRO_RECORDINGABSOLUTE und SFX_MACRO_RECORDINGRELATIVE den
+ aufgezeichneten Source abzuspeichern.
+
+
+ [Querverweise]
+
+ <SfxMacro::GenerateSource()const>
+*/
+
+{
+#ifdef DBG_UTIL
+#ifdef MAC
+ SvFileStream aStream( DEFINE_CONST_UNICODE("record.bas"), STREAM_STD_WRITE );
+#else
+ SvFileStream aStream( DEFINE_CONST_UNICODE("/tmp/record.bas"), STREAM_STD_WRITE );
+#endif
+ aStream.WriteLine( ByteString(U2S(GenerateSource())) );
+#endif
+ delete pImp;
+}
+
+//--------------------------------------------------------------------
+
+SfxMacroMode SfxMacro::GetMode() const
+
+/* [Beschreibung]
+
+ Liefert den Modus, der besagt zu welchem Zweck das SfxMacro konstruiert
+ wurde.
+
+
+ [Querverweise]
+
+ enum <SfxMacroMode>
+*/
+
+{
+ return pImp->eMode;
+}
+
+//--------------------------------------------------------------------
+
+USHORT SfxMacro::NextObjectNo()
+
+/* [Beschreibung]
+
+ Liefert eine Nummer, die als Namens-Erweiterung f"ur SbxObjects,
+ die per DIM angelegt werden m"ussen, verwendet werden kann. Bei jedem
+ Abfragen kommt eine um 1 erh"ohte Nummer zur"uck, die in diesem Makro
+ einmalig ist.
+*/
+
+{
+ return ++pImp->nObjNo;
+}
+
+//--------------------------------------------------------------------
+
+void SfxMacro::Record
+(
+ SfxMacroStatement* pStatement // aufzuzeichnendes <SfxMacroStatement>
+)
+
+/* [Beschreibung]
+
+ Diese Methode zeichnet das als Parameter "ubergeben Statement auf.
+ Die Instanz auf die der "ubergebe Pointer zeigt, geht in das Eigentum
+ des SfxMacro "uber.
+
+ Der Aufruf ist nur g"ultig, wenn es sich um ein SfxMacro handelt,
+ welches mit SFX_MACRO_RECORDINGABSOLUTE oder SFX_MACRO_RECORDINGRELATIVE
+ konstruiert wirde.
+
+
+ [Querverweise]
+
+ <SfxMacro::Replace(SfxMacroStatement*)>
+ <SfxMacro::Remove()>
+ <SfxMacro::GetLastStatement()const>
+*/
+
+{
+ DBG_ASSERT( pImp->eMode != SFX_MACRO_EXISTING,
+ "invalid call to non-recording SfxMacro" );
+ pImp->aList.C40_INSERT( SfxMacroStatement, pStatement, pImp->aList.Count() );
+}
+
+//--------------------------------------------------------------------
+
+void SfxMacro::Replace
+(
+ SfxMacroStatement* pStatement // aufzuzeichnendes <SfxMacroStatement>
+)
+
+/* [Beschreibung]
+
+ Diese Methode zeichnet das als Parameter "ubergeben Statement auf.
+ Dabei wird das jeweils zuletzt aufgezeichnete Statement "uberschrieben.
+ Die Instanz auf die der "ubergebe Pointer zeigt, geht in das Eigentum
+ des SfxMacro "uber.
+
+ Mit dieser Methode ist es m"oglich, Statements zusammenzufassen. Z.B.
+ anstelle f"unfmal hintereinander 'CursorLeft()' aufzurufen, k"onnte
+ das zu 'CursorLeft(5)' zusammengefa\st werden. Oder anstelle ein Wort
+ Buchstabe f"ur Buchstabe aufzubauen, k"onnte dies durch ein einziges
+ Statement 'InsertString("Hallo")' ersetzt werden.
+
+ Der Aufruf ist nur g"ultig, wenn es sich um ein SfxMacro handelt,
+ welches mit SFX_MACRO_RECORDINGABSOLUTE oder SFX_MACRO_RECORDINGRELATIVE
+ konstruiert wurde und bereits ein aufgezeichnetes Statement vorhanden
+ ist.
+
+
+ [Anmerkung]
+
+ Diese Methode wird typischerweise aus den Execute-Methoden der
+ <SfxSlot>s von den Applikationsentwicklern gerufen.
+
+
+ [Querverweise]
+
+ <SfxMacro::Record(SfxMacroStatement*)>
+ <SfxMacro::Remove()>
+ <SfxMacro::GetLastStatement()const>
+*/
+
+{
+ DBG_ASSERT( pImp->eMode != SFX_MACRO_EXISTING,
+ "invalid call to non-recording SfxMacro" );
+ DBG_ASSERT( pImp->aList.Count(), "no replaceable statement available" )
+ pImp->aList.Remove( pImp->aList.Count() - 1 );
+ pImp->aList.C40_INSERT( SfxMacroStatement,pStatement, pImp->aList.Count() );
+}
+
+//--------------------------------------------------------------------
+
+void SfxMacro::Remove()
+
+/* [Beschreibung]
+
+ Diese Methode l"oscht das zuletzt aufgezeichnete <SfxMacroStatement>
+ und entfernt es aus dem Macro.
+
+ Mit dieser Methode ist es m"oglich, Statements zusammenzufassen. Z.B.
+ anstelle f"unfmal hintereinander 'CursorLeft()' aufzurufen, k"onnte
+ das zu 'CursorLeft(5)' zusammengefa\st werden. Oder anstelle ein Wort
+ Buchstabe f"ur Buchstabe aufzubauen, k"onnte dies durch ein einziges
+ Statement 'InsertString("Hallo")' ersetzt werden.
+
+ Der Aufruf ist nur g"ultig, wenn es sich um ein SfxMacro handelt,
+ welches mit SFX_MACRO_RECORDINGABSOLUTE oder SFX_MACRO_RECORDINGRELATIVE
+ konstruiert wurde und bereits ein aufgezeichnetes Statement vorhanden
+ ist.
+
+
+ [Anmerkung]
+
+ Diese Methode wird typischerweise aus den Execute-Methoden der
+ <SfxSlot>s von den Applikationsentwicklern gerufen.
+
+
+ [Querverweise]
+
+ <SfxMacro::Replace(SfxMacroStatement*)>
+ <SfxMacro::Record(SfxMacroStatement*)>
+ <SfxMacro::GetLastStatement()const>
+*/
+
+{
+ DBG_ASSERT( pImp->eMode != SFX_MACRO_EXISTING,
+ "invalid call to non-recording SfxMacro" );
+ DBG_ASSERT( pImp->aList.Count(), "no replaceable statement available" )
+ pImp->aList.Remove( pImp->aList.Count() - 1 );
+}
+
+//--------------------------------------------------------------------
+
+const SfxMacroStatement* SfxMacro::GetLastStatement() const
+
+/* [Beschreibung]
+
+ Mit dieser Methode kann auf das jeweils zuletzt aufgezeichnete Statement
+ lesend zugegriffen werden. Zusammen mit der Methode
+ <SfxMacro::Replace(SfxMacroStatement*)> ergibt sich dadurch die
+ M"oglichkeit, Statements zusammenzufassen.
+
+ Der Aufruf ist nur g"ultig, wenn es sich um ein SfxMacro handelt,
+ welches mit SFX_MACRO_RECORDINGABSOLUTE oder SFX_MACRO_RECORDINGRELATIVE
+ konstruiert wurde.
+
+
+ [Querverweise]
+
+ <SfxMacro::Record(SfxMacroStatement*)>
+ <SfxMacro::Replace(SfxMacroStatement*)>
+*/
+
+{
+ DBG_ASSERT( pImp->eMode != SFX_MACRO_EXISTING,
+ "invalid call to non-recording SfxMacro" );
+ if ( pImp->aList.Count() )
+ return pImp->aList.GetObject( pImp->aList.Count() - 1 );
+ return 0;
+}
+
+//--------------------------------------------------------------------
+
+String SfxMacro::GenerateSource() const
+
+/* [Beschreibung]
+
+ Diese Funktion generiert aus den, seit dem Konstruieren der Instanz
+ bis zum Zeitpunkt des Aufrufs dieser Methode aufgezeichneten
+ <SfxMacroStatement>s einen BASIC-Sourcecode, der die Statements,
+ jedoch nicht den Header ('Sub X') und den Footer ('End Sub') enth"alt.
+
+
+ [Querverweise]
+
+ <SfxMacro::Record(SfxMacroStatement*)>
+ <SfxMacro::Repeat(SfxMacroStatement*)>
+*/
+
+{
+ DBG_ASSERT( pImp->eMode != SFX_MACRO_EXISTING,
+ "invalid call to non-recording SfxMacro" );
+ String aSource;
+ for ( USHORT n = 0; n < pImp->aList.Count(); ++n )
+ {
+ aSource += pImp->aList.GetObject(n)->GetStatement();
+ if ( (n+1) < pImp->aList.Count() )
+ aSource += DEFINE_CONST_UNICODE("\n");
+ }
+
+ return aSource;
+}
+
+//--------------------------------------------------------------------
+
+SbxError SfxMacro::Call
+(
+ SbxArray* pArgs // aktuelle Parameter f"ur den Aufruf
+)
+
+/* [Beschreibung]
+
+ Diese Methode sollte von Suklassen "uberladen werden, damit der
+ SFx das in der Ableitung beschriebene BASIC-Programm rufen kann,
+ wenn es an ein Event oder in einem Controller gebunden ist.
+
+ Der Aufruf ist nur g"ultig, wenn es sich um ein SfxMacro handelt,
+ welches mit SFX_MACRO_RECORDINGABSOLUTE oder SFX_MACRO_RECORDINGRELATIVE
+ konstruiert wurde.
+
+ Die Basisimplementierung liefert immer SbxERR_NOTIMP zur"uck.
+
+
+ [Anmerkung]
+
+ I.d.R. ist pArgs == 0, der Parameter ist f"ur Zuk"unftige Erweiterungen
+ gedacht.
+*/
+
+{
+ return SbxERR_NOTIMP;
+}
+
+//--------------------------------------------------------------------
+
+SfxMacroItem::SfxMacroItem( USHORT nWhich, SfxMacro *pTheMacro )
+: SfxPoolItem( nWhich ),
+ pMacro( pTheMacro )
+{
+}
+
+//--------------------------------------------------------------------
+
+SfxPoolItem* SfxMacroItem::Clone( SfxItemPool *pPool ) const
+{
+ return new SfxMacroItem( Which(), pMacro );
+}
+
+//--------------------------------------------------------------------
+
+int SfxMacroItem::operator==( const SfxPoolItem &rOther ) const
+{
+ return pMacro == ((const SfxMacroItem&)rOther).pMacro;
+}
+
+
diff --git a/sfx2/source/control/makefile.mk b/sfx2/source/control/makefile.mk
new file mode 100644
index 000000000000..53723b82cebf
--- /dev/null
+++ b/sfx2/source/control/makefile.mk
@@ -0,0 +1,120 @@
+#*************************************************************************
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.1.1.1 $
+#
+# last change: $Author: hr $ $Date: 2000-09-18 16:52:29 $
+#
+# The Contents of this file are made available subject to the terms of
+# either of the following licenses
+#
+# - GNU Lesser General Public License Version 2.1
+# - Sun Industry Standards Source License Version 1.1
+#
+# Sun Microsystems Inc., October, 2000
+#
+# GNU Lesser General Public License Version 2.1
+# =============================================
+# Copyright 2000 by Sun Microsystems, Inc.
+# 901 San Antonio Road, Palo Alto, CA 94303, USA
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License version 2.1, as published by the Free Software Foundation.
+#
+# This library 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 for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+#
+# Sun Industry Standards Source License Version 1.1
+# =================================================
+# The contents of this file are subject to the Sun Industry Standards
+# Source License Version 1.1 (the "License"); You may not use this file
+# except in compliance with the License. You may obtain a copy of the
+# License at http://www.openoffice.org/license.html.
+#
+# Software provided under this License is provided on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+# See the License for the specific provisions governing your rights and
+# obligations concerning the Software.
+#
+# The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+#
+# Copyright: 2000 by Sun Microsystems, Inc.
+#
+# All Rights Reserved.
+#
+# Contributor(s): _______________________________________
+#
+#
+#
+#*************************************************************************
+
+PRJ=..$/..
+
+PRJNAME=sfx2
+TARGET=control
+ENABLE_EXCEPTIONS=TRUE
+.INCLUDE : $(PRJ)$/util$/makefile.pmk
+AUTOSEG=true
+
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : svpre.mk
+.INCLUDE : settings.mk
+.INCLUDE : sv.mk
+
+# w.g. compilerbugs
+.IF "$(GUI)"=="WNT"
+CFLAGS+=-Od
+.ENDIF
+
+# --- Files --------------------------------------------------------
+
+CXXFILES = \
+ unoctitm.cxx \
+ macro.cxx \
+ request.cxx \
+ dispatch.cxx \
+ ctrlitem.cxx \
+ statcach.cxx \
+ msgpool.cxx \
+ shell.cxx \
+ objface.cxx \
+ msg.cxx \
+ bindings.cxx \
+ macrconf.cxx \
+ minfitem.cxx \
+ srchitem.cxx \
+ $(PROJECTPCHSOURCE).cxx
+
+SLOFILES = \
+ $(SLO)$/unoctitm.obj \
+ $(SLO)$/request.obj \
+ $(SLO)$/dispatch.obj \
+ $(SLO)$/msgpool.obj \
+ $(SLO)$/objface.obj \
+ $(SLO)$/ctrlitem.obj \
+ $(SLO)$/statcach.obj \
+ $(SLO)$/shell.obj \
+ $(SLO)$/msg.obj \
+ $(SLO)$/bindings.obj \
+ $(SLO)$/minfitem.obj \
+ $(SLO)$/srchitem.obj \
+ $(SLO)$/macrconf.obj
+
+# --- Targets -------------------------------------------------------
+
+.INCLUDE : target.mk
+
diff --git a/sfx2/source/control/minfitem.cxx b/sfx2/source/control/minfitem.cxx
new file mode 100644
index 000000000000..9a6735d7a9c8
--- /dev/null
+++ b/sfx2/source/control/minfitem.cxx
@@ -0,0 +1,136 @@
+/*************************************************************************
+ *
+ * $RCSfile: minfitem.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:29 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+// INCLUDE ---------------------------------------------------------------
+
+#pragma hdrstop
+
+#include "minfitem.hxx"
+
+// STATIC DATA -----------------------------------------------------------
+
+TYPEINIT1(SfxMacroInfoItem, SfxPoolItem);
+
+// -----------------------------------------------------------------------
+
+SfxMacroInfoItem::SfxMacroInfoItem(USHORT nWhich, // Slot-ID
+ const BasicManager* pMgr,
+ const String &rLibName,
+ const String &rModuleName,
+ const String &rMethodName,
+ const String &rComment) :
+ SfxPoolItem(nWhich),
+ pBasicManager(pMgr),
+ aLibName(rLibName),
+ aModuleName(rModuleName),
+ aMethodName(rMethodName),
+ aCommentText(rComment)
+{
+}
+
+// -----------------------------------------------------------------------
+
+// copy ctor
+
+SfxMacroInfoItem::SfxMacroInfoItem(const SfxMacroInfoItem& rCopy):
+ SfxPoolItem(rCopy),
+ pBasicManager(rCopy.pBasicManager),
+ aLibName(rCopy.aLibName),
+ aModuleName(rCopy.aModuleName),
+ aMethodName(rCopy.aMethodName),
+ aCommentText(rCopy.aCommentText)
+{
+}
+
+// -----------------------------------------------------------------------
+
+// op ==
+
+int SfxMacroInfoItem::operator==( const SfxPoolItem& rCmp) const
+{
+ return SfxPoolItem::operator==(rCmp) &&
+ pBasicManager == ((const SfxMacroInfoItem&)rCmp).pBasicManager &&
+ aLibName == ((const SfxMacroInfoItem&)rCmp).aLibName &&
+ aModuleName == ((const SfxMacroInfoItem&)rCmp).aModuleName &&
+ aMethodName == ((const SfxMacroInfoItem&)rCmp).aMethodName &&
+ aCommentText == ((const SfxMacroInfoItem&)rCmp).aCommentText;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem *SfxMacroInfoItem::Clone( SfxItemPool *) const
+{
+ return new SfxMacroInfoItem(*this);
+}
+
+// -----------------------------------------------------------------------
+
+String SfxMacroInfoItem::GetQualifiedName() const
+{
+ String aMacroName = aLibName;
+ aMacroName += '.';
+ aMacroName += aModuleName;
+ aMacroName += '.';
+ aMacroName += aMethodName;
+ return aMacroName;
+}
+
+
diff --git a/sfx2/source/control/msg.cxx b/sfx2/source/control/msg.cxx
new file mode 100644
index 000000000000..028f05b17a5d
--- /dev/null
+++ b/sfx2/source/control/msg.cxx
@@ -0,0 +1,101 @@
+/*************************************************************************
+ *
+ * $RCSfile: msg.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:29 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _SFXITEMPOOL_HXX //autogen
+#include <svtools/itempool.hxx>
+#endif
+#ifndef _SFXENUMITEM_HXX //autogen
+#include <svtools/eitem.hxx>
+#endif
+#pragma hdrstop
+
+#include "msg.hxx"
+
+//====================================================================
+
+SfxSlotKind SfxSlot::GetKind() const
+{
+ if( !nMasterSlotId && !nValue)
+ return (SfxSlotKind) SFX_KIND_STANDARD;
+ if ( nMasterSlotId && fnExec==0 && fnState==0 )
+ {
+ if ( pType->Type() == TYPE(SfxBoolItem) )
+ return (SfxSlotKind) SFX_KIND_ENUM;
+ else
+ {
+ DBG_ERROR( "invalid slot kind detected" );
+ return SFX_KIND_ENUM;
+ }
+ }
+ else
+ return (SfxSlotKind) SFX_KIND_ATTR;
+}
+
+//--------------------------------------------------------------------
+
+USHORT SfxSlot::GetWhich( const SfxItemPool &rPool ) const
+{
+ if ( !nMasterSlotId || nMasterSlotId == USHRT_MAX )
+ ((SfxSlot*) this) -> nMasterSlotId = rPool.GetWhich(nSlotId);
+ return nMasterSlotId;
+}
+
+
diff --git a/sfx2/source/control/msgpool.cxx b/sfx2/source/control/msgpool.cxx
new file mode 100644
index 000000000000..6e98f8e9e074
--- /dev/null
+++ b/sfx2/source/control/msgpool.cxx
@@ -0,0 +1,627 @@
+/*************************************************************************
+ *
+ * $RCSfile: msgpool.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:29 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _STREAM_HXX //autogen
+#include <tools/stream.hxx>
+#endif
+#ifndef _RSCSFX_HXX //autogen
+#include <rsc/rscsfx.hxx>
+#endif
+#pragma hdrstop
+
+#include "msgpool.hxx"
+#include "minarray.hxx"
+#include "msg.hxx"
+#include "app.hxx"
+#include "objface.hxx"
+#include "idpool.hxx"
+#include "sfxtypes.hxx"
+#include "slotinfo.hxx"
+#include "macrconf.hxx"
+#include "sfxresid.hxx"
+#include "arrdecl.hxx"
+
+#include "sfx.hrc"
+
+//====================================================================
+
+struct SfxSIDRegistration_Impl
+{
+ String _aGroup;
+ String _aName;
+ USHORT _nSID;
+};
+
+struct SfxSlotType_Impl
+{
+ USHORT nId;
+ TypeId nType;
+
+ SfxSlotType_Impl( USHORT nTheId, TypeId nTheType ):
+ nId(nTheId), nType(nTheType)
+ {}
+};
+
+DECL_2BYTEARRAY(SfxSlotGroupArr_Impl, USHORT, 6, 4);
+DECL_PTRARRAY(SfxInterfaceArr_Impl, SfxInterface*, 6, 3);
+DECL_PTRARRAY(SfxSlotTypeArr_Impl, SfxSlotType_Impl*, 8, 8);
+
+
+//====================================================================
+
+SfxSlotPool::SfxSlotPool( SfxSlotPool *pParent, ResMgr* pResManager )
+ : _pParentPool( pParent )
+ , _pIdPool(0)
+ , _pTypes(0)
+ , _pGroups(0)
+ , _nCurGroup(0)
+ , _pInterfaces(0)
+ , _nCurInterface(0)
+ , _nCurMsg(0)
+ , _pResMgr( pResManager )
+ , _pUnoSlots( 0 )
+{
+ if ( !_pResMgr )
+ _pResMgr = Resource::GetResManager();
+}
+
+//====================================================================
+
+SfxSlotPool::~SfxSlotPool()
+{
+ _pParentPool = 0;
+ for ( SfxInterface *pIF = FirstInterface(); pIF; pIF = FirstInterface() )
+ delete pIF;
+ delete _pInterfaces;
+ delete _pGroups;
+ delete _pUnoSlots;
+ if ( _pTypes )
+ {
+ for ( USHORT n =_pTypes->Count(); n--; )
+ delete _pTypes->GetObject(n);
+ delete _pTypes;
+ }
+ delete _pIdPool;
+}
+
+//====================================================================
+
+// registers the availability of the Interface of functions
+
+void SfxSlotPool::RegisterInterface( SfxInterface& rInterface )
+{
+ DBG_MEMTEST();
+
+ // add to the list of SfxObjectInterface instances
+ if ( _pInterfaces == 0 )
+ _pInterfaces = new SfxInterfaceArr_Impl;
+ _pInterfaces->Append(&rInterface);
+
+ // bei einem (einzelnen) Null-Slot abbrechen (aus syntaktischen Gr"unden
+ // enthalten interfaces immer mindestens einen Slot)
+ if ( rInterface.Count() == 1 && !rInterface[0]->nSlotId )
+ return;
+
+ // possibly add Interface-id and group-ids of funcs to the list of groups
+ if ( !_pGroups )
+ {
+ _pGroups = new SfxSlotGroupArr_Impl;
+
+ if ( _pParentPool )
+ {
+ // Die Groups im parent Slotpool sind auch hier bekannt
+ SfxSlotGroupArr_Impl& rGroups = *_pParentPool->_pGroups;
+ for ( USHORT n=0; n<rGroups.Count(); n++ )
+ _pGroups->Append( rGroups[n] );
+ }
+ }
+
+ if ( !_pTypes )
+ _pTypes = new SfxSlotTypeArr_Impl;
+ for ( USHORT nFunc = 0; nFunc < rInterface.Count(); ++nFunc )
+ {
+ SfxSlot *pDef = rInterface[nFunc];
+ if ( pDef->GetUnoName() )
+ {
+ if ( !_pUnoSlots )
+ _pUnoSlots = new SfxSlotArr_Impl;
+ _pUnoSlots->Insert( pDef, _pUnoSlots->Count() );
+ }
+
+ if ( pDef->GetGroupId() && /* pDef->GetGroupId() != GID_INTERN && */
+ !_pGroups->Contains(pDef->GetGroupId()) )
+ {
+ if (pDef->GetGroupId() == GID_INTERN)
+ _pGroups->Insert(0, pDef->GetGroupId());
+ else
+ _pGroups->Append(pDef->GetGroupId());
+ }
+
+ const TypeId &rTypeId = pDef->GetType()->Type();
+ if ( rTypeId != TYPE(SfxVoidItem) && rTypeId != 0 )
+ {
+ USHORT nPos;
+ for ( nPos = 0; nPos < _pTypes->Count(); ++nPos )
+ {
+ if ( _pTypes->GetObject(nPos)->nId == pDef->GetSlotId() )
+ {
+ DBG_ASSERT( rTypeId == _pTypes->GetObject(nPos)->nType,
+ "same slot id with unequal item types" );
+ }
+ else if ( _pTypes->GetObject(nPos)->nId > pDef->GetSlotId() )
+ break;
+ }
+ if ( nPos >= _pTypes->Count() ||
+ _pTypes->GetObject(nPos)->nId > pDef->GetSlotId() )
+ _pTypes->Append( new SfxSlotType_Impl( pDef->GetSlotId(), rTypeId ) );
+ }
+ }
+}
+
+//====================================================================
+
+TypeId SfxSlotPool::GetSlotType( USHORT nId ) const
+{
+ for ( USHORT nPos = 0; nPos < _pTypes->Count(); ++nPos )
+ {
+ if ( _pTypes->GetObject(nPos)->nId == nId )
+ return _pTypes->GetObject(nPos)->nType;
+ }
+ return _pParentPool ? _pParentPool->GetSlotType( nId ) : 0;
+}
+
+//====================================================================
+
+// unregisters the availability of the Interface of functions
+
+void SfxSlotPool::ReleaseInterface( SfxInterface& rInterface )
+{
+ DBG_MEMTEST();
+ DBG_ASSERT( _pInterfaces, "releasing SfxInterface, but there are none" );
+ // remove from the list of SfxInterface instances
+ _pInterfaces->Remove(&rInterface);
+}
+
+//--------------------------------------------------------------------
+
+// get the first SfxMessage for a special Id (e.g. for getting check-mode)
+
+const SfxSlot* SfxSlotPool::GetSlot( USHORT nId )
+{
+ DBG_MEMTEST();
+ DBG_ASSERT( _pInterfaces != 0, "no Interfaces registered" );
+
+ // Zun"achst die eigenen Interfaces absuchen
+ for ( USHORT nInterf = 0; nInterf < _pInterfaces->Count(); ++nInterf )
+ {
+ const SfxSlot *pDef =
+ _pInterfaces->GetObject(nInterf)->GetSlot(nId);
+ if ( pDef )
+ return pDef;
+ }
+
+ // Dann beim eventuell vorhandenen parent versuchen
+ return _pParentPool ? _pParentPool->GetSlot( nId ) : 0;
+}
+
+//--------------------------------------------------------------------
+
+// returns the pool of unused ids for macros, menus etc.
+
+IdPool& SfxSlotPool::GetIdPool()
+{
+ DBG_MEMTEST();
+ DBG_ASSERT( _pInterfaces != 0 && _pInterfaces->Count(),
+ "no Interfaces registered" );
+
+ if ( !_pIdPool )
+ {
+ _pIdPool = new IdPool();
+
+ // create a set of all registered function-ids
+ BitSet aRegIds;
+ for ( USHORT nInterface = 0; nInterface < _pInterfaces->Count(); ++nInterface )
+ {
+ SfxInterface* pInterface = (*_pInterfaces)[nInterface];
+ for ( USHORT nFunc = 0; nFunc < pInterface->Count(); ++nFunc )
+ aRegIds |= (*pInterface)[nFunc]->GetGroupId();
+ }
+
+ //lock all registered ids
+ _pIdPool->Lock(aRegIds);
+ }
+
+ return *_pIdPool;
+}
+
+
+//--------------------------------------------------------------------
+
+// stores the id persistent to a stream (expand macros-names)
+
+void SfxSlotPool::StoreId( SvStream& rStream, USHORT nId )
+{
+ DBG_MEMTEST();
+ DBG_ASSERT( _pInterfaces != 0, "no Interfaces registered" );
+
+ rStream << nId;
+ //! later: write 0 and macro-lib/name
+}
+
+
+//--------------------------------------------------------------------
+
+// load a persistent id from a stream (assign id if a macro)
+
+void SfxSlotPool::LoadId( SvStream& rStream, USHORT &rId )
+{
+ DBG_MEMTEST();
+ DBG_ASSERT( _pInterfaces != 0, "no Interfaces registered" );
+
+ rStream >> (unsigned short&) rId;
+}
+
+
+//--------------------------------------------------------------------
+
+// skips to the next group
+
+String SfxSlotPool::SeekGroup( USHORT nNo )
+{
+ DBG_MEMTEST();
+ DBG_ASSERT( _pInterfaces != 0, "no Interfaces registered" );
+
+ // if the group exists, use it
+ if ( _pGroups && nNo < _pGroups->Count() )
+ {
+ _nCurGroup = nNo;
+ if ( _pParentPool )
+ {
+ // Meistens stimmt die Reihenfolge der Ids "uberein
+ USHORT nParentCount = _pParentPool->_pGroups->Count();
+ if ( nNo < nParentCount && (*_pGroups)[nNo] == (*_pParentPool->_pGroups)[nNo] )
+ _pParentPool->_nCurGroup = nNo;
+ else
+ {
+ // Ansonsten mu\s gesucht werden
+ // Wenn die Gruppe im parent pool nicht gefunden wird, wird
+ // _nCurGroup au\serhalb des g"ultigen Bereiches gesetzt
+ USHORT i;
+ for ( i=1; i<nParentCount; i++ )
+ if ( (*_pGroups)[nNo] == (*_pParentPool->_pGroups)[i] )
+ break;
+ _pParentPool->_nCurGroup = i;
+ }
+ }
+
+ SfxResId aResId( (*_pGroups)[_nCurGroup] );
+ aResId.SetRT(RSC_STRING);
+ if ( !aResId.GetResMgr()->IsAvailable(aResId) )
+ {
+ DBG_ERROR( "GroupId-Name nicht im SFX definiert!" );
+ return String();
+ }
+
+ return String( aResId );
+ }
+
+ return String();
+}
+
+
+//--------------------------------------------------------------------
+
+USHORT SfxSlotPool::GetGroupCount()
+{
+ return _pGroups->Count();
+}
+
+
+//--------------------------------------------------------------------
+
+// internal search loop
+
+const SfxSlot* SfxSlotPool::SeekSlot( USHORT nStartInterface )
+{
+ DBG_MEMTEST();
+ DBG_ASSERT( _pInterfaces != 0, "no Interfaces registered" );
+
+ // Die Numerierung der interfaces startet beim parent pool
+ USHORT nFirstInterface = _pParentPool ? _pParentPool->_pInterfaces->Count() : 0;
+
+ // sind wir am Ende des Parent-Pools angekommen?
+ if ( nStartInterface < nFirstInterface &&
+ _pParentPool->_nCurGroup >= _pParentPool->_pGroups->Count() )
+ nStartInterface = nFirstInterface;
+
+ // liegt das Interface noch im Parent-Pool?
+ if ( nStartInterface < nFirstInterface )
+ {
+ DBG_ASSERT( _pParentPool, "Kein parent pool!" );
+ _nCurInterface = nStartInterface;
+ return _pParentPool->SeekSlot( nStartInterface );
+ }
+
+ // find the first func-def with the current group id
+ USHORT nCount = _pInterfaces->Count() + nFirstInterface;
+ for ( _nCurInterface = nStartInterface;
+ _nCurInterface < nCount;
+ ++_nCurInterface )
+ {
+ SfxInterface* pInterface = (*_pInterfaces)[_nCurInterface-nFirstInterface];
+ for ( _nCurMsg = 0;
+ _nCurMsg < pInterface->Count();
+ ++_nCurMsg )
+ {
+ const SfxSlot* pMsg = (*pInterface)[_nCurMsg];
+ if ( pMsg->GetGroupId() == _pGroups->GetObject(_nCurGroup) )
+ return pMsg;
+ }
+ }
+
+ return 0;
+}
+
+//--------------------------------------------------------------------
+
+// skips to the next func in the current group
+
+const SfxSlot* SfxSlotPool::NextSlot()
+{
+ DBG_MEMTEST();
+ DBG_ASSERT( _pInterfaces != 0, "no Interfaces registered" );
+
+ // Die Numerierung der interfaces startet beim parent pool
+ USHORT nFirstInterface = _pParentPool ? _pParentPool->_pInterfaces->Count() : 0;
+
+ if ( _nCurInterface < nFirstInterface && _nCurGroup >= _pParentPool->_pGroups->Count() )
+ _nCurInterface = nFirstInterface;
+
+ if ( _nCurInterface < nFirstInterface )
+ {
+ DBG_ASSERT( _pParentPool, "Kein parent pool!" );
+ const SfxSlot *pSlot = _pParentPool->NextSlot();
+ _nCurInterface = _pParentPool->_nCurInterface;
+ if ( pSlot )
+ return pSlot;
+ if ( _nCurInterface == nFirstInterface )
+ // parent pool ist fertig
+ return SeekSlot( nFirstInterface );
+ }
+
+ USHORT nInterface = _nCurInterface - nFirstInterface;
+ // possibly we are already at the end
+ if ( nInterface >= _pInterfaces->Count() )
+ return 0;
+
+ // look for further matching func-defs within the same Interface
+ SfxInterface* pInterface = (*_pInterfaces)[nInterface];
+ while ( ++_nCurMsg < pInterface->Count() )
+ {
+ SfxSlot* pMsg = (*pInterface)[_nCurMsg];
+ if ( pMsg->GetGroupId() == _pGroups->GetObject(_nCurGroup) )
+ return pMsg;
+ }
+
+ return SeekSlot(++_nCurInterface );
+}
+
+
+//--------------------------------------------------------------------
+
+// SlotName erfragen, gfs. mit HilfeText
+
+String SfxSlotPool::GetSlotName_Impl(USHORT nId, String *pHelpText) const
+{
+ // ist es eine Makro-SlotId?
+ if ( SfxMacroConfig::IsMacroSlot( nId ) )
+ {
+ const SfxMacroInfo *pMacro = SFX_APP()->GetMacroConfig()->GetMacroInfo(nId);
+ if ( pMacro )
+ return pMacro->GetMacroName();
+ else
+ return String();
+ }
+
+ // Zun"achst den eigenen ResManager testen, dann evtl. den des parent pools
+ ResId aResId( nId, _pResMgr );
+ aResId.SetRT( RSC_SFX_SLOT_INFO );
+ if( !Resource::GetResManager()->IsAvailable( aResId ) && _pParentPool )
+ aResId.SetResMgr( _pParentPool->_pResMgr );
+ if( Resource::GetResManager()->IsAvailable( aResId ) )
+ {
+ SfxSlotInfo aInfo(aResId);
+ if(pHelpText)
+ *pHelpText = aInfo.GetHelpText();
+ return aInfo.GetName();
+ }
+
+#ifdef DBG_UTIL
+ String aError(DEFINE_CONST_UNICODE("Slot ohne ConfigName: "));
+ aError += String::CreateFromInt32( nId );
+// DBG_ERROR( aError );
+ return aError;
+#endif
+ return String();
+}
+
+
+//--------------------------------------------------------------------
+
+// SlotName erfragen, gfs. mit HilfeText
+
+String SfxSlotPool::GetSlotHelpText_Impl(USHORT nId) const
+{
+ String aHelpText;
+ GetSlotName_Impl( nId, &aHelpText );
+ return aHelpText;
+}
+
+//--------------------------------------------------------------------
+#ifdef STARBASIC
+
+
+// assignes a request-id for a specific macro
+
+USHORT SfxSlotPool::RegisterMacro( sbToken aToken )
+{
+ DBG_MEMTEST();
+ DBG_ASSERT( pInterfaces != 0, "no Interfaces registered" );
+ DBG_ASSERT( TRUE, "not implemented - call MI" );
+ return 0;
+}
+
+
+//--------------------------------------------------------------------
+
+// frees the request-id of a specific macro
+
+void SfxSlotPool::ReleaseMacro( sbToken aToken )
+{
+ DBG_MEMTEST();
+ DBG_ASSERT( pInterfaces != 0, "no Interfaces registered" );
+ DBG_ASSERT( TRUE, "not implemented - call MI" );
+}
+
+#endif
+
+//--------------------------------------------------------------------
+
+SfxInterface* SfxSlotPool::FirstInterface()
+{
+ _nCurInterface = 0;
+ if ( !_pInterfaces || !_pInterfaces->Count() )
+ return 0;
+ return _pParentPool ? _pParentPool->FirstInterface() : (*_pInterfaces)[0];
+}
+
+
+//--------------------------------------------------------------------
+
+SfxInterface* SfxSlotPool::NextInterface()
+{
+ _nCurInterface++;
+ USHORT nFirstInterface = _pParentPool ? _pParentPool->_pInterfaces->Count() : 0;
+ if ( _nCurInterface < nFirstInterface )
+ return (*_pParentPool->_pInterfaces)[_nCurInterface];
+ USHORT nInterface = _nCurInterface - nFirstInterface;
+ return nInterface < _pInterfaces->Count() ? (*_pInterfaces)[nInterface] : 0;
+}
+
+//--------------------------------------------------------------------
+
+USHORT SfxSlotPool::RegisterSID( const String &rGroup, const String &rName )
+{
+ return 0;
+}
+
+//--------------------------------------------------------------------
+
+void SfxSlotPool::ReleaseSID( const String &rGroup, const String &rName )
+{
+}
+
+const SfxSlot* SfxSlotPool::GetUnoSlot( USHORT nId )
+{
+ const SfxSlot *pSlot = NULL;
+ if ( _pParentPool )
+ pSlot = _pParentPool->GetUnoSlot( nId );
+
+ if ( !pSlot && _pUnoSlots )
+ {
+ USHORT nCount = _pUnoSlots->Count();
+ for ( USHORT n=0; n<nCount; n++ )
+ {
+ if ( (*_pUnoSlots)[n]->GetSlotId() == nId )
+ {
+ pSlot = (*_pUnoSlots)[n];
+ break;
+ }
+ }
+ }
+
+ return pSlot;
+}
+
+const SfxSlot* SfxSlotPool::GetUnoSlot( const String& rName )
+{
+ const SfxSlot *pSlot = NULL;
+ if ( _pParentPool )
+ pSlot = _pParentPool->GetUnoSlot( rName );
+
+ if ( !pSlot && _pUnoSlots )
+ {
+ USHORT nCount = _pUnoSlots->Count();
+ for ( USHORT n=0; n<nCount; n++ )
+ {
+ if ( rName.EqualsAscii((*_pUnoSlots)[n]->GetUnoName()) )
+ {
+ pSlot = (*_pUnoSlots)[n];
+ break;
+ }
+ }
+ }
+
+ return pSlot;
+}
+
+
+
diff --git a/sfx2/source/control/objface.cxx b/sfx2/source/control/objface.cxx
new file mode 100644
index 000000000000..15b8d55a2753
--- /dev/null
+++ b/sfx2/source/control/objface.cxx
@@ -0,0 +1,1427 @@
+/*************************************************************************
+ *
+ * $RCSfile: objface.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:29 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include <stdlib.h>
+
+#ifndef _TOOLS_RCID_H
+#include <tools/rcid.h>
+#endif
+#pragma hdrstop
+
+#ifndef _STREAM_HXX //autogen
+#include <tools/stream.hxx>
+#endif
+
+#include "module.hxx"
+#include "objface.hxx"
+#include "msg.hxx"
+#include "msgpool.hxx"
+#include "cfgitem.hxx"
+#include "sfxresid.hxx"
+#include "minarray.hxx"
+#include "cfgmgr.hxx"
+#include "tbxmgr.hxx"
+#ifdef _PROXYSHELL_VERWENDEN
+#include "bindings.hxx" // fuer ProxyInterface
+#include "dispatch.hxx" // fuer ProxyInterface
+#endif
+
+DBG_NAME(SfxInterface);
+
+static const USHORT nVersion = 5;
+
+//====================================================================
+
+EXTERN_C
+#if defined( PM2 ) && (!defined( CSET ) && !defined ( MTW ) && !defined( WTC ))
+int _stdcall
+#else
+#ifdef WNT
+int _cdecl
+#else
+int
+#endif
+#endif
+
+SfxCompareSlots_Impl( const void* pSmaller, const void* pBigger )
+{
+ DBG_MEMTEST();
+ return ( (int) ((SfxSlot*)pSmaller)->GetSlotId() ) -
+ ( (int) ((SfxSlot*)pBigger)->GetSlotId() );
+}
+
+//=========================================================================
+
+struct SfxObjectUI_Impl
+{
+ USHORT nPos;
+ USHORT nInterfaceId;
+ ResId aResId;
+ BOOL bVisible;
+ BOOL bContext;
+ String* pName;
+ ULONG nFeature;
+
+ SfxObjectUI_Impl(USHORT n, const ResId& rResId, BOOL bVis, ULONG nFeat,
+ USHORT nClassId=0xFFFF) :
+ nPos(n),
+ aResId(rResId.GetId(), rResId.GetResMgr()),
+ nInterfaceId(nClassId),
+ bVisible(bVis),
+ pName(0),
+ bContext(FALSE),
+ nFeature(nFeat)
+ {
+ aResId.SetRT(rResId.GetRT());
+ }
+
+ ~SfxObjectUI_Impl()
+ {
+ delete pName;
+ }
+};
+
+DECL_PTRARRAY(SfxObjectUIArr_Impl, SfxObjectUI_Impl*, 2, 2);
+
+struct SfxInterface_Impl
+{
+ SfxObjectUIArr_Impl* pObjectBars; // registered ObjectBars
+ SfxObjectUIArr_Impl* pObjectMenues; // registered ObjectMenues
+ SfxObjectUIArr_Impl* pChildWindows; // registered ChildWindows
+ ResId aPopupRes; // registered PopupMenu
+ ResId aStatBarRes; // registered StatusBar
+ SfxModule* pModule;
+
+ SfxInterface_Impl() :
+ aPopupRes((USHORT)0),
+ aStatBarRes((USHORT)0)
+ {
+ pObjectBars = new SfxObjectUIArr_Impl;
+ pObjectMenues = new SfxObjectUIArr_Impl;
+ pChildWindows = new SfxObjectUIArr_Impl;
+ }
+
+ ~SfxInterface_Impl()
+ {
+ USHORT n;
+ for (n=0; n<pObjectBars->Count(); n++)
+ delete (*pObjectBars)[n];
+ delete pObjectBars;
+
+ for (n=0; n<pObjectMenues->Count(); n++)
+ delete (*pObjectMenues)[n];
+ delete pObjectMenues;
+
+ for (n=0; n<pChildWindows->Count(); n++)
+ delete (*pChildWindows)[n];
+ delete pChildWindows;
+ }
+};
+
+//====================================================================
+
+class SfxIFConfig_Impl : public SfxConfigItem
+{
+friend class SfxInterface;
+ USHORT nCount;
+ SfxInterface* pIFace;
+ SfxObjectUIArr_Impl* pObjectBars;
+
+public:
+ SfxIFConfig_Impl(USHORT nClassId, SfxInterface *pIF);
+ virtual ~SfxIFConfig_Impl();
+ virtual int Load(SvStream&);
+ virtual BOOL Store(SvStream&);
+ virtual String GetName() const
+ { if (pIFace->HasName()) return pIFace->GetName();
+ else return String(); }
+ virtual void UseDefault();
+ void SaveDefaults(USHORT);
+};
+
+//-------------------------------------------------------------------------
+
+SfxIFConfig_Impl::SfxIFConfig_Impl(USHORT nClassId, SfxInterface *pIF) :
+ SfxConfigItem(SFX_ITEMTYPE_INTERFACE_START + nClassId),
+ nCount(0),
+ pObjectBars(0),
+ pIFace(pIF)
+{
+ SetInternal(TRUE);
+}
+
+//-------------------------------------------------------------------------
+
+void SfxIFConfig_Impl::SaveDefaults(USHORT nClassId)
+{
+ if ( pObjectBars )
+ return;
+
+ pObjectBars = new SfxObjectUIArr_Impl;
+
+ for (nCount=0; nCount < pIFace->pImpData->pObjectBars->Count(); nCount++)
+ {
+ SfxObjectUI_Impl* pUI = new SfxObjectUI_Impl(
+ pIFace->GetObjectBarPos(nCount),
+ pIFace->GetObjectBarResId(nCount),
+ pIFace->IsObjectBarVisible(nCount),
+ pIFace->GetObjectBarFeature(nCount),
+ nClassId);
+
+ pObjectBars->Append(pUI);
+ pUI->pName = new String(*pIFace->GetObjectBarName(nCount));
+ }
+}
+
+//-------------------------------------------------------------------------
+
+SfxIFConfig_Impl::~SfxIFConfig_Impl()
+{
+ if( pObjectBars )
+ {
+ for (USHORT n=0; n<pObjectBars->Count(); n++)
+ delete (*pObjectBars)[n];
+ delete pObjectBars;
+ }
+}
+
+//-------------------------------------------------------------------------
+
+int SfxIFConfig_Impl::Load(SvStream& rStream)
+{
+ for ( ;pIFace->pImpData->pObjectBars->Count(); )
+ pIFace->ReleaseObjectBar(pIFace->GetObjectBarResId(0).GetId());
+
+ USHORT n;
+ rStream >> n;
+
+ if ( n != nVersion)
+ return SfxConfigItem::WARNING_VERSION;
+
+ rStream >> n;
+ for (USHORT i=0; i<n; i++)
+ {
+ pIFace->LoadObjectBar(i, rStream);
+ }
+
+ return SfxConfigItem::ERR_OK;
+}
+
+//-------------------------------------------------------------------------
+
+BOOL SfxIFConfig_Impl::Store(SvStream& rStream)
+{
+ rStream << nVersion;
+
+ rStream << pIFace->pImpData->pObjectBars->Count();
+ USHORT nIFaceId = GetType() - SFX_ITEMTYPE_INTERFACE_START;
+
+ for (USHORT i=0; i<pIFace->pImpData->pObjectBars->Count(); i++)
+ {
+ pIFace->StoreObjectBar(i, rStream);
+ }
+
+ return TRUE;
+}
+
+//-------------------------------------------------------------------------
+
+void SfxIFConfig_Impl::UseDefault()
+{
+ pIFace->UseDefault();
+}
+
+//====================================================================
+// ctor, registeres a new unit
+
+SfxInterface::SfxInterface( SfxModule *pMod,
+ const char *pClassName,
+ const ResId& rNameResId,
+ USHORT nId,
+ const SfxInterface* pParent,
+ const SfxTypeLibImpl* pLibInfo ):
+ pName(pClassName),
+ nClassId(nId),
+ aNameResId(rNameResId.GetId()),
+ pGenoType(pParent),
+ pTypeLibInfo(pLibInfo),
+ pConfig(NULL),
+ pImpData(0),
+ nCount(0)
+{
+ aNameResId.SetResMgr(rNameResId.GetResMgr());
+ Init( );
+ pImpData->pModule = pMod;
+}
+
+SfxInterface::SfxInterface( SfxModule *pMod,
+ const char *pClassName,
+ const ResId& rNameResId,
+ USHORT nId,
+ const SfxInterface* pParent,
+ const SfxTypeLibImpl* pLibInfo,
+ SfxSlot &rSlotMap, USHORT nSlotCount ):
+ pName(pClassName),
+ nClassId(nId),
+ aNameResId(rNameResId.GetId()),
+ pGenoType(pParent),
+ pTypeLibInfo(pLibInfo),
+ pConfig(NULL),
+ pImpData(0)
+{
+ aNameResId.SetResMgr(rNameResId.GetResMgr());
+ Init();
+ pImpData->pModule = pMod;
+ SetSlotMap( rSlotMap, nSlotCount );
+ // register the functions at the SfxMessagePool
+ if ( pMod )
+ pMod->GetSlotPool()->RegisterInterface(*this);
+ else
+ SFX_APP()->GetAppSlotPool_Impl().RegisterInterface(*this);
+}
+
+void SfxInterface::Init()
+{
+ DBG_MEMTEST();
+ DBG_CTOR(SfxInterface, 0);
+// DBG_ASSERT(nCount, "Anzahl der Slot == NULL");
+
+ if ( nClassId )
+ pConfig = new SfxIFConfig_Impl(nClassId, this);
+ pImpData = new SfxInterface_Impl;
+}
+
+
+void SfxInterface::SetSlotMap( SfxSlot& rSlotMap, USHORT nSlotCount )
+{
+ pSlots = &rSlotMap;
+ nCount = nSlotCount;
+ SfxSlot* pIter = pSlots;
+ if ( 1 == nCount && !pIter->pNextSlot )
+ pIter->pNextSlot = pIter;
+
+ if ( !pIter->pNextSlot )
+ {
+ // sort the SfxSlots by id
+ qsort( pSlots, nCount, sizeof(SfxSlot), SfxCompareSlots_Impl );
+
+ // link masters and slaves
+ USHORT nIter = 1;
+ for ( pIter = pSlots; nIter <= nCount; ++pIter, ++nIter )
+ {
+ //! hier bitte sinnvoll pruefen
+ //! DBG_ASSERT(!(pIter->IsMode(SFX_SLOT_CACHABLE) &&
+ //! pIter->IsMode(SFX_SLOT_VOLATILE)),
+ //! "invalid Flags" );
+ DBG_ASSERT( nIter == nCount ||
+ pIter->GetSlotId() != (pIter+1)->GetSlotId(),
+ "doppelte SID" );
+
+ // jeder Master verweist auf seinen ersten Slave (ENUM), alle
+ // Slaves auf ihren Master.
+ // Slaves verweisen im Ring auf die anderen mit gleichem Master
+ if ( pIter->GetKind() == SFX_KIND_ENUM )
+ {
+ pIter->pLinkedSlot = GetSlot( pIter->nMasterSlotId );
+ DBG_ASSERT( pIter->pLinkedSlot, "slave without master" );
+ if ( !pIter->pLinkedSlot->pLinkedSlot )
+ ( (SfxSlot*) pIter->pLinkedSlot)->pLinkedSlot = pIter;
+
+ if ( 0 == pIter->GetNextSlot() )
+ {
+ SfxSlot *pLastSlot = pIter;
+ for ( USHORT n = nIter; n < Count(); ++n )
+ {
+ SfxSlot *pCurSlot = (pSlots+n);
+ if ( pCurSlot->nMasterSlotId == pIter->nMasterSlotId )
+ {
+ pLastSlot->pNextSlot = pCurSlot;
+ pLastSlot = pCurSlot;
+ }
+ }
+ pLastSlot->pNextSlot = pIter;
+ }
+ }
+ else if ( 0 == pIter->GetNextSlot() )
+ {
+ // Slots verweisen im Ring auf den n"achten mit derselben Statusmethode
+ SfxSlot *pLastSlot = pIter;
+ for ( USHORT n = nIter; n < Count(); ++n )
+ {
+ SfxSlot *pCurSlot = (pSlots+n);
+ if ( pCurSlot->GetStateFnc() == pIter->GetStateFnc() )
+ {
+ pLastSlot->pNextSlot = pCurSlot;
+ pLastSlot = pCurSlot;
+ }
+ }
+ pLastSlot->pNextSlot = pIter;
+ }
+ }
+ }
+#ifdef DBG_UTIL
+ else
+ {
+ USHORT nIter = 1;
+ for ( SfxSlot *pNext = pIter+1; nIter < nCount; ++pNext, ++nIter )
+ {
+
+ if ( pNext->GetSlotId() <= pIter->GetSlotId() )
+ DBG_ERROR ("Falsche Reihenfolge!");
+
+ if ( pIter->GetKind() == SFX_KIND_ENUM )
+ {
+ const SfxSlot *pMasterSlot = GetSlot(pIter->nMasterSlotId);
+ const SfxSlot *pFirstSlave = pMasterSlot->pLinkedSlot;
+ const SfxSlot *pSlave = pFirstSlave;
+ do
+ {
+ if ( pSlave->pLinkedSlot != pMasterSlot )
+ {
+ ByteString aStr("Falsche Master/Slave-Verkettung : ");
+ aStr += ByteString::CreateFromInt32(pMasterSlot->GetSlotId());
+ aStr += " , ";
+ aStr += ByteString::CreateFromInt32(pSlave->GetSlotId());
+ DBG_ERROR(aStr.GetBuffer());
+ }
+
+ if ( pSlave->nMasterSlotId != pMasterSlot->GetSlotId() )
+ {
+ ByteString aStr("Falsche Master/Slave-Ids : ");
+ aStr += ByteString::CreateFromInt32(pMasterSlot->GetSlotId());
+ aStr += " , ";
+ aStr += ByteString::CreateFromInt32(pSlave->GetSlotId());
+ DBG_ERROR(aStr.GetBuffer());
+ }
+
+ pSlave = pSlave->pNextSlot;
+ }
+ while ( pSlave != pFirstSlave );
+ }
+ else
+ {
+ if ( pIter->pLinkedSlot )
+ {
+ if ( pIter->pLinkedSlot->GetKind() != SFX_KIND_ENUM )
+ {
+ ByteString aStr("Slave ist kein enum : ");
+ aStr += ByteString::CreateFromInt32(pIter->GetSlotId());
+ aStr += " , ";
+ aStr += ByteString::CreateFromInt32(pIter->pLinkedSlot->GetSlotId());
+ DBG_ERROR(aStr.GetBuffer());
+ }
+ }
+
+ const SfxSlot *pLastSlot = pIter;
+ const SfxSlot *pCurSlot = pIter;
+ do
+ {
+ pCurSlot = pCurSlot->pNextSlot;
+ if ( pCurSlot->GetStateFnc() != pIter->GetStateFnc() )
+ {
+ ByteString aStr("Verkettete Slots mit verschiedenen StateMethods : ");
+ aStr += ByteString::CreateFromInt32(pCurSlot->GetSlotId());
+ aStr += " , ";
+ aStr += ByteString::CreateFromInt32(pIter->GetSlotId());
+ DBG_ERROR(aStr.GetBuffer());
+ }
+ }
+ while ( pCurSlot != pIter );
+ }
+
+ pIter = pNext;
+ }
+ }
+#endif
+}
+
+
+//--------------------------------------------------------------------
+
+
+
+SfxInterface::~SfxInterface()
+{
+ if (pConfig)
+ delete pConfig;
+
+ SfxModule *pMod = pImpData->pModule;
+ delete pImpData;
+ if ( nClassId )
+ {
+ if ( pMod )
+ pMod->GetSlotPool()->ReleaseInterface(*this);
+ else
+ SFX_APP()->GetAppSlotPool_Impl().ReleaseInterface(*this);
+ }
+}
+
+//--------------------------------------------------------------------
+
+// searches for the specified func
+
+
+const SfxSlot* SfxInterface::GetSlot( USHORT nFuncId ) const
+{
+ DBG_MEMTEST();
+ DBG_CHKTHIS(SfxInterface, 0);
+ DBG_ASSERT( this && pSlots && nCount, "" );
+
+ // find the id using binary search
+ void* p = bsearch( &nFuncId, pSlots, nCount, sizeof(SfxSlot),
+ SfxCompareSlots_Impl );
+ if ( !p && pGenoType )
+ return pGenoType->GetSlot( nFuncId );
+
+ return p ? (const SfxSlot*)p : 0;
+}
+
+const SfxSlot* SfxInterface::GetSlot( const String& rCommand ) const
+{
+ SfxSlotPool& rPool = SFX_SLOTPOOL();
+ for ( USHORT n=0; n<nCount; n++ )
+ {
+ USHORT nId = (pSlots+n)->GetSlotId();
+ if ( rCommand.CompareIgnoreCaseToAscii( rPool.GetSlotName_Impl( nId ) ) == COMPARE_EQUAL )
+ return pSlots+n;
+ }
+
+ return pGenoType ? pGenoType->GetSlot( rCommand ) : NULL;
+}
+
+//--------------------------------------------------------------------
+
+
+const SfxSlot* SfxInterface::GetRealSlot( const SfxSlot *pSlot ) const
+{
+ DBG_MEMTEST();
+ DBG_CHKTHIS(SfxInterface, 0);
+ DBG_ASSERT( this && pSlots && nCount, "" );
+
+ if ( !ContainsSlot_Impl(pSlot) )
+ {
+ if(pGenoType)
+ return pGenoType->GetRealSlot(pSlot);
+ DBG_ERROR("fremder Slot");
+ return 0;
+ }
+
+ return pSlot->pLinkedSlot;
+}
+
+//--------------------------------------------------------------------
+
+
+const SfxSlot* SfxInterface::GetRealSlot( USHORT nSlotId ) const
+{
+ DBG_MEMTEST();
+ DBG_CHKTHIS(SfxInterface, 0);
+ DBG_ASSERT( this && pSlots && nCount, "" );
+
+ const SfxSlot *pSlot = GetSlot(nSlotId);
+ if ( !pSlot )
+ {
+ if(pGenoType)
+ return pGenoType->GetRealSlot(nSlotId);
+ DBG_ERROR("fremder Slot");
+ return 0;
+ }
+
+ return pSlot->pLinkedSlot;
+}
+
+//--------------------------------------------------------------------
+
+
+void SfxInterface::RegisterPopupMenu( const ResId& rResId )
+{
+ DBG_CHKTHIS(SfxInterface, 0);
+ pImpData->aPopupRes = rResId;
+}
+
+//--------------------------------------------------------------------
+
+
+void SfxInterface::LoadConfig()
+{
+ if ( pConfig )
+ {
+ pConfig->SaveDefaults(nClassId);
+
+ // Wenn die Application schon l"auft, wurde das Interface nachtr"aglich
+ // erzeugt und mu\s daher explizit initialisiert werden.
+ if ( Application::IsInExecute() )
+ pConfig->Initialize();
+ }
+}
+
+
+BOOL SfxInterface::IsDefault()
+{
+ if (pConfig)
+ return pConfig->IsDefault();
+ else
+ return TRUE;
+}
+
+
+void SfxInterface::UseDefault()
+{
+ if ( !pConfig )
+ {
+ for (USHORT n=0; n<pImpData->pObjectBars->Count(); n++)
+ delete (*pImpData->pObjectBars)[n];
+ pImpData->pObjectBars->Remove(0, pImpData->pObjectBars->Count());
+ return;
+ }
+ else if ( !pConfig->IsDefault() )
+ {
+ USHORT n;
+ for (n=0; n<pImpData->pObjectBars->Count(); n++)
+ delete (*pImpData->pObjectBars)[n];
+ pImpData->pObjectBars->Remove(0, pImpData->pObjectBars->Count());
+
+ for (n=0; n<pConfig->nCount; n++)
+ {
+ SfxObjectUI_Impl* pUI = new SfxObjectUI_Impl(
+ (*pConfig->pObjectBars)[n]->nPos,
+ (*pConfig->pObjectBars)[n]->aResId,
+ (*pConfig->pObjectBars)[n]->bVisible,
+ (*pConfig->pObjectBars)[n]->nFeature,
+ nClassId);
+
+ pImpData->pObjectBars->Append(pUI);
+ pUI->pName = new String(*((*pConfig->pObjectBars)[n]->pName));
+ }
+ }
+}
+
+//--------------------------------------------------------------------
+
+
+void SfxInterface::SetObjectBarName(const String& rName, USHORT nId)
+{
+ // Objectbar im eigenen Array suchen
+ USHORT nCount = pImpData->pObjectBars->Count();
+ USHORT n;
+ for ( n=0; n<nCount; n++ )
+ if ((*pImpData->pObjectBars)[n]->aResId.GetId() == nId) break;
+
+ if ( n >= nCount )
+ {
+ // Nicht gefunden, in der Superklasse versuchen
+ BOOL bGenoType = ( pGenoType != 0 && !pGenoType->HasName() );
+ if (bGenoType)
+ ((SfxInterface*)pGenoType)->SetObjectBarName ( rName, nId );
+ else
+ DBG_ERROR("Objectbar ist unbekannt!");
+ }
+ else
+ {
+ SfxObjectUI_Impl *pUI = (*pImpData->pObjectBars)[n];
+ delete pUI->pName;
+ pUI->pName = new String( rName );
+ if ( pConfig )
+ pConfig->SetDefault(FALSE);
+ }
+}
+
+
+void SfxInterface::SetObjectBarPos(USHORT nPos, USHORT nId)
+{
+ // Objectbar im eigenen Array suchen
+ USHORT nCount = pImpData->pObjectBars->Count();
+ USHORT n;
+ for ( n=0; n<nCount; n++ )
+ if ((*pImpData->pObjectBars)[n]->aResId.GetId() == nId) break;
+
+ if ( n >= nCount )
+ {
+ // Nicht gefunden, in der Superklasse versuchen
+ BOOL bGenoType = ( pGenoType != 0 && !pGenoType->HasName() );
+ if (bGenoType)
+ ((SfxInterface*)pGenoType)->SetObjectBarPos ( nPos, nId );
+ else
+ DBG_ERROR("Objectbar ist unbekannt!");
+ }
+ else
+ {
+ (*pImpData->pObjectBars)[n]->nPos = nPos;
+ if (pConfig)
+ pConfig->SetDefault(FALSE);
+ }
+}
+
+//-------------------------------------------------------------------------
+
+void SfxInterface::RegisterObjectBar( USHORT nPos, const ResId& rResId,
+ const String *pStr )
+{
+ RegisterObjectBar( nPos, rResId, 0UL, pStr );
+}
+
+
+void SfxInterface::RegisterObjectBar( USHORT nPos, const ResId& rResId,
+ ULONG nFeature, const String *pStr )
+{
+ if ((nPos & SFX_VISIBILITY_MASK) == 0)
+ {
+ if ((nPos & SFX_POSITION_MASK) == 0 )
+ nPos |= SFX_VISIBILITY_CLIENT | SFX_VISIBILITY_STANDARD;
+ else
+ nPos |= (SFX_VISIBILITY_STANDARD | SFX_VISIBILITY_SERVER);
+ }
+
+ // App-Leiste?
+ if ( SFX_OBJECTBAR_APPLICATION == ( nPos & SFX_POSITION_MASK ) )
+ // je nach Desktop oder Einzelapp nur die richtige registrieren
+ if ( !( SFX_VISIBILITY_DESKTOP == ( nPos & SFX_VISIBILITY_DESKTOP ) ) )
+ return;
+ nPos &= ~(USHORT)SFX_VISIBILITY_DESKTOP;
+
+ if( nPos & SFX_VISIBILITY_SERVER )
+ nPos |= SFX_VISIBILITY_PLUGSERVER;
+ if( nPos & SFX_VISIBILITY_CLIENT )
+ nPos |= SFX_VISIBILITY_PLUGCLIENT;
+
+ SfxObjectUI_Impl* pUI = new SfxObjectUI_Impl(nPos, rResId, TRUE, nFeature, nClassId);
+
+ pImpData->pObjectBars->Append(pUI);
+
+ if (pStr == 0)
+ {
+ ResId aResId(rResId);
+ aResId.SetRT(RSC_STRING);
+ aResId.SetResMgr(rResId.GetResMgr());
+ if ( !Resource::GetResManager()->IsAvailable(aResId) )
+ {
+ DBG_ERROR("Der Objectbar-Name fehlt in der Resource!");
+ pUI->pName = new String (DEFINE_CONST_UNICODE("NoName"));
+ }
+ else
+ pUI->pName = new String(aResId);
+ }
+ else
+ pUI->pName = new String(*pStr);
+}
+
+
+void SfxInterface::TransferObjectBar( USHORT nPos, USHORT nId, SfxInterface *pIFace,
+ const String *pStr)
+{
+ if ( !pIFace )
+ {
+ RegisterObjectBar( nPos, nId, pStr );
+ if (pConfig)
+ pConfig->SetDefault(FALSE);
+ return;
+ }
+
+ // Suche den ObjectBar im Quellen-Interface ( GenoType ?? )
+ USHORT n;
+ for (n=0; n<pIFace->pImpData->pObjectBars->Count(); n++)
+ if ((*pIFace->pImpData->pObjectBars)[n]->aResId.GetId() == nId) break;
+
+ DBG_ASSERT(n<pIFace->pImpData->pObjectBars->Count(),"Objectbar ist unbekannt!");
+
+ // Uebernimm ResId und Interface-Id
+ SfxObjectUI_Impl* pUI = new SfxObjectUI_Impl(nPos,
+ (*pIFace->pImpData->pObjectBars)[n]->aResId,
+ (*pIFace->pImpData->pObjectBars)[n]->bVisible,
+ (*pIFace->pImpData->pObjectBars)[n]->nFeature,
+ (*pIFace->pImpData->pObjectBars)[n]->nInterfaceId);
+ pImpData->pObjectBars->Append(pUI);
+
+ if (pStr == 0)
+ {
+ pUI->pName = new String( *(pIFace->GetObjectBarName(n)));
+ }
+ else
+ pUI->pName = new String(*pStr);
+
+ if (pConfig)
+ pConfig->SetDefault(FALSE);
+
+ pIFace->ReleaseObjectBar(nId);
+}
+
+
+
+void SfxInterface::ReleaseObjectBar( USHORT nId )
+{
+ // Objectbar im eigenen Array suchen
+ USHORT nCount = pImpData->pObjectBars->Count();
+ USHORT n;
+ for ( n=0; n<nCount; n++ )
+ if ((*pImpData->pObjectBars)[n]->aResId.GetId() == nId) break;
+
+ if ( n >= nCount )
+ {
+ // Nicht gefunden, in der Superklasse versuchen
+ BOOL bGenoType = ( pGenoType != 0 && !pGenoType->HasName() );
+ if (bGenoType)
+ ((SfxInterface*)pGenoType)->ReleaseObjectBar( nId );
+ else
+ DBG_ERROR("Objectbar ist unbekannt!");
+ }
+ else
+ {
+ delete (*pImpData->pObjectBars)[n];
+ pImpData->pObjectBars->Remove(n);
+ if (pConfig)
+ pConfig->SetDefault(FALSE);
+ }
+}
+
+//--------------------------------------------------------------------
+
+
+const ResId& SfxInterface::GetObjectBarResId( USHORT nNo ) const
+{
+ BOOL bGenoType = (pGenoType != 0 && !pGenoType->HasName());
+ if ( bGenoType )
+ {
+ // Gibt es Toolbars in der Superklasse ?
+ USHORT nBaseCount = pGenoType->GetObjectBarCount();
+ if ( nNo < nBaseCount )
+ // Die der Superklasse kommen zuerst
+ return pGenoType->GetObjectBarResId( nNo );
+ else
+ nNo -= nBaseCount;
+ }
+
+ USHORT nCount = pImpData->pObjectBars->Count();
+ DBG_ASSERT( nNo<nCount,"Objectbar ist unbekannt!" );
+ return (*pImpData->pObjectBars)[nNo]->aResId;
+}
+
+//--------------------------------------------------------------------
+
+
+USHORT SfxInterface::GetObjectBarPos( USHORT nNo ) const
+{
+ BOOL bGenoType = (pGenoType != 0 && !pGenoType->HasName());
+ if ( bGenoType )
+ {
+ // Gibt es Toolbars in der Superklasse ?
+ USHORT nBaseCount = pGenoType->GetObjectBarCount();
+ if ( nNo < nBaseCount )
+ // Die der Superklasse kommen zuerst
+ return pGenoType->GetObjectBarPos( nNo );
+ else
+ nNo -= nBaseCount;
+ }
+
+ USHORT nCount = pImpData->pObjectBars->Count();
+ DBG_ASSERT( nNo<nCount,"Objectbar ist unbekannt!" );
+ return (*pImpData->pObjectBars)[nNo]->nPos;
+}
+
+//--------------------------------------------------------------------
+
+
+USHORT SfxInterface::GetObjectBarCount() const
+{
+ if (pGenoType && ! pGenoType->HasName())
+ return pImpData->pObjectBars->Count() + pGenoType->GetObjectBarCount();
+ else
+ return pImpData->pObjectBars->Count();
+}
+
+//--------------------------------------------------------------------
+
+
+const ResId& SfxInterface::GetObjectMenuResId( USHORT nNo ) const
+{
+ DBG_ASSERT(nNo<pImpData->pObjectMenues->Count(),"ObjectMenue ist unbekannt!");
+ return (*pImpData->pObjectMenues)[nNo]->aResId;
+}
+
+//--------------------------------------------------------------------
+
+
+USHORT SfxInterface::GetObjectMenuPos( USHORT nNo ) const
+{
+ DBG_ASSERT(nNo<pImpData->pObjectMenues->Count(),"ObjectMenue ist unbekannt!");
+ return (*pImpData->pObjectMenues)[nNo]->nPos;
+}
+
+//--------------------------------------------------------------------
+
+
+USHORT SfxInterface::GetObjectMenuCount() const
+{
+ return pImpData->pObjectMenues->Count();
+}
+
+void SfxInterface::ClearObjectMenus()
+{
+ for (USHORT n = pImpData->pObjectMenues->Count(); n; )
+ {
+ delete pImpData->pObjectMenues->GetObject( --n );
+ pImpData->pObjectMenues->Remove( n );
+ }
+}
+
+void SfxInterface::RemoveObjectMenu( USHORT nPos )
+{
+ for (USHORT n = pImpData->pObjectMenues->Count(); n; )
+ if( pImpData->pObjectMenues->GetObject(--n)->nPos == nPos )
+ {
+ delete pImpData->pObjectMenues->GetObject( n );
+ pImpData->pObjectMenues->Remove( n );
+ }
+}
+//--------------------------------------------------------------------
+
+
+void SfxInterface::RegisterObjectMenu( USHORT nPos, const ResId& rResId )
+{
+ SfxObjectUI_Impl* pUI = new SfxObjectUI_Impl(nPos, rResId, TRUE, 0, nClassId);
+ pImpData->pObjectMenues->Append(pUI);
+}
+
+//--------------------------------------------------------------------
+
+
+BOOL SfxInterface::StoreObjectBar(USHORT n, SvStream& rStream)
+{
+ rStream << ((*pImpData->pObjectBars)[n]->nPos)
+ << (*pImpData->pObjectBars)[n]->aResId.GetId()
+ << (*pImpData->pObjectBars)[n]->nInterfaceId
+ << (USHORT) (*pImpData->pObjectBars)[n]->bVisible;
+ rStream.WriteByteString(*(*pImpData->pObjectBars)[n]->pName);
+ rStream << (*pImpData->pObjectBars)[n]->nFeature;
+ return TRUE;
+}
+
+//--------------------------------------------------------------------
+
+
+int SfxInterface::LoadObjectBar(USHORT n, SvStream& rStream)
+{
+ DBG_ASSERT( pConfig, "LoadObjectBar ohne Config!" );
+
+ USHORT nId, nPos, nIFaceId, nVisible;
+ ULONG nFeature;
+ String aName;
+
+ rStream >> nPos >> nId >> nIFaceId >> nVisible;
+ rStream.ReadByteString(aName);
+
+ if ( nVersion > 4 )
+ rStream >> nFeature;
+
+ ResId aResId(nId);
+ RegisterObjectBar(nPos, aResId, nFeature, &aName );
+ (*pImpData->pObjectBars)[n]->nInterfaceId = nIFaceId;
+ (*pImpData->pObjectBars)[n]->bVisible = (BOOL) nVisible;
+
+ SfxIFConfig_Impl *pCfg = pConfig;
+
+ if (nIFaceId != nClassId) // pConfig von anderem Interface holen
+ {
+ SfxInterface *pIFace =
+ SFX_APP()->GetInterfaceByIdImpl(SfxInterfaceId(nIFaceId));
+ if (pIFace)
+ pCfg = pIFace->pConfig;
+ }
+
+ ResMgr *pResMgr=0; // falls selbstdefiniert!
+ if (pCfg->pObjectBars->Count())
+ pResMgr = (*pCfg->pObjectBars)[0]->aResId.GetResMgr();
+
+ (*pImpData->pObjectBars)[n]->aResId.SetResMgr(pResMgr);
+
+ return SfxConfigItem::ERR_OK;
+}
+
+
+void SfxInterface::RegisterChildWindow(USHORT nId, BOOL bContext, const String* pName)
+{
+ RegisterChildWindow( nId, bContext, 0UL, pName );
+}
+
+void SfxInterface::RegisterChildWindow(USHORT nId, BOOL bContext, ULONG nFeature, const String*)
+{
+ SfxObjectUI_Impl* pUI = new SfxObjectUI_Impl(0, nId, TRUE, nFeature, 0);
+ pUI->bContext = bContext;
+ pImpData->pChildWindows->Append(pUI);
+}
+
+void SfxInterface::ReleaseChildWindow( USHORT nId )
+{
+ USHORT nCount = pImpData->pChildWindows->Count();
+ USHORT n;
+ for ( n=0; n<nCount; n++ )
+ if ((*pImpData->pChildWindows)[n]->aResId.GetId() == nId) break;
+
+ if ( n >= nCount )
+ {
+ // Nicht gefunden, in der Superklasse versuchen
+ BOOL bGenoType = ( pGenoType != 0 && !pGenoType->HasName() );
+ if (bGenoType)
+ ((SfxInterface*)pGenoType)->ReleaseChildWindow( nId );
+ else
+ DBG_ERROR("ChildWindow ist unbekannt!");
+ }
+ else
+ {
+ delete (*pImpData->pChildWindows)[n];
+ pImpData->pChildWindows->Remove(n);
+ if (pConfig)
+ pConfig->SetDefault(FALSE);
+ }
+}
+
+void SfxInterface::RegisterStatusBar(const ResId& rResId)
+{
+ pImpData->aStatBarRes = rResId;
+}
+
+
+ULONG SfxInterface::GetChildWindowId (USHORT nNo) const
+{
+ if ( pGenoType )
+ {
+ // Gibt es ChildWindows in der Superklasse ?
+ USHORT nBaseCount = pGenoType->GetChildWindowCount();
+ if ( nNo < nBaseCount )
+ // Die der Superklasse kommen zuerst
+ return pGenoType->GetChildWindowId( nNo );
+ else
+ nNo -= nBaseCount;
+ }
+
+ USHORT nCount = pImpData->pChildWindows->Count();
+ DBG_ASSERT( nNo<nCount,"ChildWindow ist unbekannt!" );
+ ULONG nRet = (ULONG) (*pImpData->pChildWindows)[nNo]->aResId.GetId();
+ if ( (*pImpData->pChildWindows)[nNo]->bContext )
+ nRet += ( (ULONG) nClassId ) << 16;
+ return nRet;
+}
+
+ULONG SfxInterface::GetChildWindowFeature (USHORT nNo) const
+{
+ if ( pGenoType )
+ {
+ // Gibt es ChildWindows in der Superklasse ?
+ USHORT nBaseCount = pGenoType->GetChildWindowCount();
+ if ( nNo < nBaseCount )
+ // Die der Superklasse kommen zuerst
+ return pGenoType->GetChildWindowFeature( nNo );
+ else
+ nNo -= nBaseCount;
+ }
+
+ USHORT nCount = pImpData->pChildWindows->Count();
+ DBG_ASSERT( nNo<nCount,"ChildWindow ist unbekannt!" );
+ ULONG nRet = (ULONG) (*pImpData->pChildWindows)[nNo]->nFeature;
+ return nRet;
+}
+
+//--------------------------------------------------------------------
+
+
+USHORT SfxInterface::GetChildWindowCount() const
+{
+ if (pGenoType)
+ return pImpData->pChildWindows->Count() + pGenoType->GetChildWindowCount();
+ else
+ return pImpData->pChildWindows->Count();
+}
+
+
+const ResId& SfxInterface::GetPopupMenuResId() const
+{
+ return pImpData->aPopupRes;
+}
+
+
+const ResId& SfxInterface::GetStatusBarResId() const
+{
+ if (pImpData->aStatBarRes.GetId() == 0 && pGenoType)
+ return pGenoType->GetStatusBarResId();
+ else
+ return pImpData->aStatBarRes;
+}
+
+
+
+const String* SfxInterface::GetObjectBarName ( USHORT nNo ) const
+{
+ BOOL bGenoType = (pGenoType != 0 && !pGenoType->HasName());
+ if ( bGenoType )
+ {
+ // Gibt es Toolbars in der Superklasse ?
+ USHORT nBaseCount = pGenoType->GetObjectBarCount();
+ if ( nNo < nBaseCount )
+ // Die der Superklasse kommen zuerst
+ return pGenoType->GetObjectBarName( nNo );
+ else
+ nNo -= nBaseCount;
+ }
+
+ USHORT nCount = pImpData->pObjectBars->Count();
+ DBG_ASSERT( nNo<nCount,"Objectbar ist unbekannt!" );
+ return (*pImpData->pObjectBars)[nNo]->pName;
+}
+
+ULONG SfxInterface::GetObjectBarFeature ( USHORT nNo ) const
+{
+ BOOL bGenoType = (pGenoType != 0 && !pGenoType->HasName());
+ if ( bGenoType )
+ {
+ // Gibt es Toolbars in der Superklasse ?
+ USHORT nBaseCount = pGenoType->GetObjectBarCount();
+ if ( nNo < nBaseCount )
+ // Die der Superklasse kommen zuerst
+ return pGenoType->GetObjectBarFeature( nNo );
+ else
+ nNo -= nBaseCount;
+ }
+
+ USHORT nCount = pImpData->pObjectBars->Count();
+ DBG_ASSERT( nNo<nCount,"Objectbar ist unbekannt!" );
+ return (*pImpData->pObjectBars)[nNo]->nFeature;
+}
+
+
+BOOL SfxInterface::IsObjectBarVisible(USHORT nNo) const
+{
+ BOOL bGenoType = (pGenoType != 0 && !pGenoType->HasName());
+ if ( bGenoType )
+ {
+ // Gibt es Toolbars in der Superklasse ?
+ USHORT nBaseCount = pGenoType->GetObjectBarCount();
+ if ( nNo < nBaseCount )
+ // Die der Superklasse kommen zuerst
+ return pGenoType->IsObjectBarVisible( nNo );
+ else
+ nNo -= nBaseCount;
+ }
+
+ USHORT nCount = pImpData->pObjectBars->Count();
+ DBG_ASSERT( nNo<nCount,"Objectbar ist unbekannt!" );
+ return (*pImpData->pObjectBars)[nNo]->bVisible;
+}
+
+
+void SfxInterface::SetObjectBarVisible(BOOL bVis, USHORT nId)
+{
+ // Objectbar im eigenen Array suchen
+ USHORT nCount = pImpData->pObjectBars->Count();
+ USHORT n;
+ for ( n=0; n<nCount; n++ )
+ if ( (*pImpData->pObjectBars)[n]->aResId.GetId() == nId ) break;
+
+ if ( n >= nCount )
+ {
+ // Nicht gefunden, in der Superklasse versuchen
+ BOOL bGenoType = (pGenoType != 0 && !pGenoType->HasName());
+ if (bGenoType)
+ ((SfxInterface*)pGenoType)->SetObjectBarVisible(bVis,nId);
+ else
+ DBG_ERROR("Objectbar ist unbekannt!");
+ }
+ else
+ {
+ (*pImpData->pObjectBars)[n]->bVisible = bVis;
+ if (pConfig)
+ pConfig->SetDefault(FALSE);
+ }
+}
+
+
+void SfxInterface::ReInitialize(SfxConfigManager *pCfgMgr)
+{
+ DBG_ASSERT( pConfig, "ReInitialize ohne Config!" );
+
+ SfxConfigManager *pOld = pConfig->GetConfigManager_Impl();
+ if (pCfgMgr == pOld)
+ return;
+ pConfig->ReInitialize(pCfgMgr);
+
+ pCfgMgr->RemoveConfigItem(pConfig);
+ pOld->AddConfigItem(pConfig);
+
+ pConfig->SetDefault(FALSE);
+
+ for (USHORT n=0; n<pImpData->pObjectBars->Count(); n++)
+ {
+ USHORT nId = (*pImpData->pObjectBars)[n]->aResId.GetId();
+ if ( SfxToolBoxManager::IsUserDefToolBox_Impl(nId))
+ {
+ if (!pOld->HasConfigItem(nId))
+ pOld->InsertConfigItem(nId);
+ }
+ }
+}
+
+
+void SfxInterface::SaveConfig()
+{
+ if ( pConfig )
+ pConfig->StoreConfig();
+}
+
+
+USHORT SfxInterface::GetConfigId() const
+{
+ return SFX_ITEMTYPE_INTERFACE_START + nClassId;
+}
+
+
+SfxObjectUIArr_Impl* SfxInterface::GetObjectBarArr_Impl() const
+{
+ return pImpData->pObjectBars;
+}
+
+
+USHORT SfxInterface::RegisterUserDefToolBox(USHORT nId, const String *pName,
+ SfxConfigManager *pCfgMgr)
+{
+ // Zuerst "uber den Namen die ToolBox suchen
+ SfxInterface *pIFace;
+ for (pIFace = SFX_SLOTPOOL().FirstInterface(); pIFace != 0;
+ pIFace = SFX_SLOTPOOL().NextInterface())
+ {
+ // Nur Interfaces mit Namen d"urfen welche bekommen
+ if (pIFace->HasName())
+ {
+ // Zugriff auf ObjectBars
+ SfxObjectUIArr_Impl *pArr = pIFace->GetObjectBarArr_Impl();
+ for (USHORT nNo=0; nNo<pArr->Count(); nNo++)
+ {
+ if ( *pName == *(*pArr)[nNo]->pName)
+ return (*pArr)[nNo]->aResId.GetId();
+ }
+ }
+ }
+
+ // Ansonsten n"achste freie Id besorgen
+ USHORT nFreeId = SfxToolBoxManager::GetUserDefToolBoxId_Impl();
+ BOOL bFound = FALSE;
+
+ // Alle Interfaces durchprobieren, ob sie noch eine UserDefToolBox
+ // aufnehmen k"onnen
+ USHORT nPos;
+ for (pIFace = SFX_SLOTPOOL().FirstInterface(); pIFace != 0;
+ pIFace = SFX_SLOTPOOL().NextInterface())
+ {
+ BOOL bFound = FALSE;
+
+ // Nur Interfaces mit Namen d"urfen welche bekommen
+ if (pIFace->HasName())
+ {
+ // Zugriff auf ObjectBars
+ SfxObjectUIArr_Impl *pArr = pIFace->GetObjectBarArr_Impl();
+
+ for ( nPos=SFX_OBJECTBAR_USERDEF1; nPos<=SFX_OBJECTBAR_USERDEF3; nPos++ )
+ {
+ // Nach freier Position suchen
+ bFound = TRUE;
+ for (USHORT nNo=0; nNo<pArr->Count(); nNo++)
+ {
+ if ( nPos == (*pArr)[nNo]->nPos)
+ {
+ // Diese Position ist schon besetzt, n"achste versuchen
+ bFound = FALSE;
+ break;
+ }
+ }
+
+ // Wurde eine noch freie Position gefunden ?
+ if ( bFound )
+ break;
+ }
+ }
+
+ // Wurde am Interface etwas gefunden ?
+ if ( bFound )
+ break;
+ }
+
+ if ( pIFace )
+ {
+ // Am gefundenen Interface mu\s die Konfiguration ver"andert werden
+ SfxConfigItem *pCfgItem = pIFace->GetConfig_Impl();
+ SfxConfigManager *pOldCfgMgr = pCfgItem->GetConfigManager_Impl();
+
+ if ( pOldCfgMgr != pCfgMgr )
+ {
+ // Wenn das Interface bisher von einem anderen ConfigManager
+ // bedient wird, wird dessen Config gesichert
+ pCfgItem->StoreConfig();
+
+ // Der Ziel-Configmanager mu\s die Konfiguration aufnehmen k"onnen
+ if ( !pCfgMgr->HasConfigItem(pIFace->GetConfigId()) )
+ pCfgMgr->InsertConfigItem(pIFace->GetConfigId());
+
+ // Verbindung mit dem ConfigItem herstellen und Config "ubernehmen
+ pCfgMgr->AddConfigItem(pCfgItem);
+ pCfgItem->Initialize();
+ }
+
+ // Jetzt wird das Interface umkonfiguriert
+ pIFace->RegisterObjectBar(nPos, nFreeId, pName);
+ pIFace->SetObjectBarVisible(TRUE, nFreeId);
+
+ // Konfiguration sichern und aktuellen Stand der Config restaurieren
+ if ( pCfgMgr != pOldCfgMgr && pCfgMgr != SFX_CFGMANAGER() )
+ {
+ pCfgItem->StoreConfig();
+ pCfgMgr->RemoveConfigItem(pCfgItem);
+ pCfgItem->Connect(pOldCfgMgr);
+ pCfgItem->Initialize();
+ }
+ }
+
+ return nFreeId;
+}
+
+
+void SfxInterface::ReleaseUserDefToolBox(USHORT nId, SfxConfigManager *pCfgMgr)
+
+{
+ BOOL bDone = FALSE;
+
+ // Alle Interfaces durchprobieren, ob sie diese UserDefToolBox haben
+ for (SfxInterface *pIFace = SFX_SLOTPOOL().FirstInterface(); pIFace != 0;
+ pIFace = SFX_SLOTPOOL().NextInterface())
+ {
+ // Nur Interfaces mit Namen k"onnen welche haben
+ if (pIFace->HasName())
+ {
+ // Die Konfiguration vom "ubergebenen Manager interessiert
+ SfxConfigItem *pCfgItem = pIFace->GetConfig_Impl();
+ SfxConfigManager *pOldCfgMgr = pCfgItem->GetConfigManager_Impl();
+
+ if ( pOldCfgMgr != pCfgMgr )
+ {
+ // Wenn das Interface bisher von einem anderen ConfigManager
+ // bedient wird, wird dessen Config gesichert
+ pCfgItem->StoreConfig();
+
+ // Verbindung mit dem ConfigItem herstellen und Config "ubernehmen
+ pCfgMgr->AddConfigItem(pCfgItem);
+ pCfgItem->Initialize();
+ }
+
+ if ( pIFace->HasObjectBar(nId) )
+ {
+ pIFace->ReleaseObjectBar(nId);
+ BOOL bDone = TRUE;
+ }
+
+ // Konfiguration sichern und aktuellen Stand der Config restaurieren
+ if ( pCfgMgr != pOldCfgMgr )
+ {
+ pCfgItem->StoreConfig();
+ pCfgMgr->RemoveConfigItem(pCfgItem);
+ pCfgItem->Connect(pOldCfgMgr);
+ pCfgItem->Initialize();
+ }
+ }
+
+ if ( bDone )
+ {
+ break;
+ }
+ }
+}
+
+
+BOOL SfxInterface::HasObjectBar( USHORT nId ) const
+{
+ for (USHORT n=0; n<pImpData->pObjectBars->Count(); n++)
+ if ((*pImpData->pObjectBars)[n]->aResId.GetId() == nId) return TRUE;
+ return FALSE;
+}
+
+SfxModule* SfxInterface::GetModule() const
+{
+ return pImpData->pModule;
+}
+
+const SfxInterface* SfxInterface::GetRealInterfaceForSlot( const SfxSlot *pRealSlot ) const
+{
+ const SfxInterface* pInterface = this;
+
+ // Der Slot k"onnte auch aus dem Interface einer Shell-Basisklasse stammen
+ do
+ {
+ const SfxSlot *pLastSlot = (*pInterface)[pInterface->Count()-1];
+ const SfxSlot *pFirstSlot = (*pInterface)[0];
+
+ // Ist pInterface der Owner von pRealSlot ?
+ if ( pFirstSlot <= pRealSlot && pRealSlot <= pLastSlot )
+ break;
+
+ // Sonst Interface der Superklasse probieren
+ pInterface = pInterface->pGenoType;
+ }
+ while ( pInterface );
+
+ return pInterface;
+}
+
+
diff --git a/sfx2/source/control/request.cxx b/sfx2/source/control/request.cxx
new file mode 100644
index 000000000000..f03edd48cc6d
--- /dev/null
+++ b/sfx2/source/control/request.cxx
@@ -0,0 +1,576 @@
+/*************************************************************************
+ *
+ * $RCSfile: request.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:29 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _SFXITEMITER_HXX //autogen
+#include <svtools/itemiter.hxx>
+#endif
+
+#ifndef _ARGS_HXX //autogen
+#include <svtools/args.hxx>
+#endif
+
+#ifndef _SVTOOLS_ITEMDEL_HXX
+#include <svtools/itemdel.hxx>
+#endif
+
+#include <svtools/itempool.hxx>
+
+#pragma hdrstop
+
+#include "request.hxx"
+#include "dispatch.hxx"
+#include "sfxtypes.hxx"
+#include "msg.hxx"
+#include "objsh.hxx"
+#include "saveopt.hxx"
+#include "viewfrm.hxx"
+#include "viewsh.hxx"
+#include "app.hxx"
+#include "objface.hxx"
+
+//===================================================================
+
+struct SfxRequest_Impl: public SfxListener
+
+/* [Beschreibung]
+
+ Implementations-Struktur der Klasse <SfxRequest>.
+*/
+
+{
+ SfxRequest* pAnti; // Owner wegen sterbendem Pool
+ SfxItemPool* pPool; // ItemSet mit diesem Pool bauen
+ SfxPoolItem* pRetVal; // R"uckgabewert geh"ort sich selbst
+ const SfxShell* pShell; // ausgef"uhrt an dieser Shell
+ const SfxSlot* pSlot; // ausgef"uhrter Slot
+ USHORT nModifier; // welche Modifier waren gedrueckt?
+ BOOL bDone; // "uberhaupt ausgef"uhrt
+ BOOL bIgnored; // vom User abgebrochen
+ BOOL bCancelled; // nicht mehr zustellen
+ USHORT nCallMode; // Synch/Asynch/API/Record
+ SfxAllItemSet* pInternalArgs;
+
+ SfxRequest_Impl( SfxRequest *pOwner )
+ : pAnti( pOwner), bCancelled(FALSE),
+ nCallMode( SFX_CALLMODE_SYNCHRON ), nModifier(0),
+ pPool(0), pInternalArgs( 0 )
+ {}
+ ~SfxRequest_Impl() { delete pInternalArgs; }
+
+
+ void SetPool( SfxItemPool *pNewPool );
+ virtual void Notify( SfxBroadcaster &rBC, const SfxHint &rHint );
+};
+
+
+//====================================================================
+
+void SfxRequest_Impl::Notify( SfxBroadcaster &rBC, const SfxHint &rHint )
+{
+ SfxSimpleHint *pSimpleHint = PTR_CAST(SfxSimpleHint, &rHint);
+ if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
+ pAnti->Cancel();
+}
+
+//====================================================================
+
+void SfxRequest_Impl::SetPool( SfxItemPool *pNewPool )
+{
+ if ( pNewPool != pPool )
+ {
+ if ( pPool )
+ EndListening( pPool->BC() );
+ pPool = pNewPool;
+ if ( pNewPool )
+ StartListening( pNewPool->BC() );
+ }
+}
+
+//====================================================================
+
+
+SfxRequest::~SfxRequest()
+{
+ DBG_MEMTEST();
+ // nicht mit Done() marktierte Requests mit 'rem' rausschreiben
+
+ // Objekt abr"aumen
+ delete pArgs;
+ if ( pImp->pRetVal )
+ DeleteItemOnIdle(pImp->pRetVal);
+ delete pImp;
+}
+//--------------------------------------------------------------------
+
+
+SfxRequest::SfxRequest
+(
+ const SfxRequest& rOrig
+)
+: nSlot(rOrig.nSlot),
+ pArgs(rOrig.pArgs? new SfxAllItemSet(*rOrig.pArgs): 0),
+ pImp( new SfxRequest_Impl(this) )
+{
+ DBG_MEMTEST();
+
+ pImp->bDone = FALSE;
+ pImp->bIgnored = FALSE;
+ pImp->pRetVal = 0;
+ pImp->pShell = 0;
+ pImp->pSlot = 0;
+ pImp->nCallMode = rOrig.pImp->nCallMode;
+ pImp->nModifier = rOrig.pImp->nModifier;
+
+ if ( pArgs )
+ pImp->SetPool( pArgs->GetPool() );
+ else
+ pImp->SetPool( rOrig.pImp->pPool );
+}
+
+SfxRequest::SfxRequest
+(
+ USHORT nSlotId, // auszuf"uhrende <Slot-Id>
+ SfxCallMode nMode, // Synch/API/...
+ SfxItemPool& rPool // ggf. f"ur das SfxItemSet f"ur Parameter
+)
+
+// creates a SfxRequest without arguments
+
+: nSlot(nSlotId),
+ pArgs(0),
+ pImp( new SfxRequest_Impl(this) )
+{
+ DBG_MEMTEST();
+
+ pImp->bDone = FALSE;
+ pImp->bIgnored = FALSE;
+ pImp->SetPool( &rPool );
+ pImp->pRetVal = 0;
+ pImp->pShell = 0;
+ pImp->pSlot = 0;
+ pImp->nCallMode = nMode;
+}
+
+//-----------------------------------------------------------------------
+
+SfxRequest::SfxRequest
+(
+ USHORT nSlotId,
+ USHORT nMode,
+ const SfxAllItemSet& rSfxArgs
+)
+
+// creates a SfxRequest with arguments
+
+: nSlot(nSlotId),
+ pArgs(new SfxAllItemSet(rSfxArgs)),
+ pImp( new SfxRequest_Impl(this) )
+{
+ DBG_MEMTEST();
+
+ pImp->bDone = FALSE;
+ pImp->bIgnored = FALSE;
+ pImp->SetPool( rSfxArgs.GetPool() );
+ pImp->pRetVal = 0;
+ pImp->pShell = 0;
+ pImp->pSlot = 0;
+ pImp->nCallMode = nMode;
+}
+//--------------------------------------------------------------------
+
+USHORT SfxRequest::GetCallMode() const
+{
+ return pImp->nCallMode;
+}
+
+//--------------------------------------------------------------------
+
+BOOL SfxRequest::IsSynchronCall() const
+{
+ return SFX_CALLMODE_SYNCHRON == ( SFX_CALLMODE_SYNCHRON & pImp->nCallMode );
+}
+
+//--------------------------------------------------------------------
+
+void SfxRequest::SetSynchronCall( BOOL bSynchron )
+{
+ if ( bSynchron )
+ pImp->nCallMode |= SFX_CALLMODE_SYNCHRON;
+ else
+ pImp->nCallMode &= ~(USHORT) SFX_CALLMODE_SYNCHRON;
+}
+
+void SfxRequest::SetInternalArgs_Impl( const SfxAllItemSet& rArgs )
+{
+ delete pImp->pInternalArgs;
+ pImp->pInternalArgs = new SfxAllItemSet( rArgs );
+}
+
+const SfxItemSet* SfxRequest::GetInternalArgs_Impl() const
+{
+ return pImp->pInternalArgs;
+}
+
+//--------------------------------------------------------------------
+
+void SfxRequest::SetArgs( const SfxAllItemSet& rArgs )
+{
+ delete pArgs;
+ pArgs = new SfxAllItemSet(rArgs);
+ pImp->SetPool( pArgs->GetPool() );
+}
+
+//--------------------------------------------------------------------
+
+void SfxRequest::AppendItem(const SfxPoolItem &rItem)
+{
+ if(!pArgs)
+ pArgs = new SfxAllItemSet(*pImp->pPool);
+ pArgs->Put(rItem, rItem.Which());
+}
+
+//--------------------------------------------------------------------
+
+void SfxRequest::RemoveItem( USHORT nID )
+{
+ if (pArgs)
+ {
+ pArgs->ClearItem(nID);
+ if ( !pArgs->Count() )
+ DELETEZ(pArgs);
+ }
+}
+
+//--------------------------------------------------------------------
+
+const SfxPoolItem* SfxRequest::GetArg
+(
+ USHORT nSlotId, // Slot-Id oder Which-Id des Parameters
+ FASTBOOL bDeep, // FALSE: nicht in Parent-ItemSets suchen
+ TypeId aType // != 0: RTTI Pruefung mit Assertion
+) const
+{
+ return GetItem( pArgs, nSlotId, bDeep, aType );
+}
+
+
+//--------------------------------------------------------------------
+const SfxPoolItem* SfxRequest::GetItem
+(
+ const SfxItemSet* pArgs,
+ USHORT nSlotId, // Slot-Id oder Which-Id des Parameters
+ FASTBOOL bDeep, // FALSE: nicht in Parent-ItemSets suchen
+ TypeId aType // != 0: RTTI Pruefung mit Assertion
+)
+
+/* [Beschreibung]
+
+ Mit dieser Methode wird der Zugriff auf einzelne Parameter im
+ SfxRequest wesentlich vereinfacht. Insbesondere wird die Typpr"ufung
+ (per Assertion) durchgef"uhrt, wodurch die Applikations-Sourcen
+ wesentlich "ubersichtlicher werden. In der PRODUCT-Version wird
+ eine 0 zur"uckgegeben, wenn das gefundene Item nicht von der
+ angegebenen Klasse ist.
+
+
+ [Beispiel]
+
+ void MyShell::Execute( SfxRequest &rReq )
+ {
+ switch ( rReq.GetSlot() )
+ {
+ case SID_MY:
+ {
+ ...
+ // ein Beispiel ohne Verwendung des Makros
+ const SfxInt32Item *pPosItem = (const SfxUInt32Item*)
+ rReq.GetArg( SID_POS, FALSE, TYPE(SfxInt32Item) );
+ USHORT nPos = pPosItem ? pPosItem->GetValue() : 0;
+
+ // ein Beispiel mit Verwendung des Makros
+ SFX_REQUEST_ARG(rReq, pSizeItem, SfxInt32Item, SID_SIZE, FALSE);
+ USHORT nSize = pSizeItem ? pPosItem->GetValue() : 0;
+
+ ...
+ }
+
+ ...
+ }
+ }
+*/
+
+{
+ if ( pArgs )
+ {
+ // ggf. in Which-Id umrechnen
+ USHORT nWhich = pArgs->GetPool()->GetWhich(nSlotId);
+
+ // ist das Item gesetzt oder bei bDeep==TRUE verf"ugbar?
+ const SfxPoolItem *pItem = 0;
+ if ( ( bDeep ? SFX_ITEM_AVAILABLE : SFX_ITEM_SET )
+ <= pArgs->GetItemState( nWhich, bDeep, &pItem ) )
+ {
+ // stimmt der Typ "uberein?
+ if ( !pItem || pItem->IsA(aType) )
+ return pItem;
+
+ // Item da aber falsch => Programmierfehler
+ DBG_ERROR( "invalid argument type" );
+ }
+ }
+
+ // keine Parameter, nicht gefunden oder falschen Typ gefunden
+ return 0;
+}
+
+//--------------------------------------------------------------------
+
+void SfxRequest::SetReturnValue(const SfxPoolItem &rItem)
+{
+ DBG_ASSERT(!pImp->pRetVal, "Returnwert mehrfach setzen?");
+ if(pImp->pRetVal)
+ delete pImp->pRetVal;
+ pImp->pRetVal = rItem.Clone();
+}
+
+//--------------------------------------------------------------------
+
+const SfxPoolItem* SfxRequest::GetReturnValue() const
+{
+ return pImp->pRetVal;
+}
+
+//--------------------------------------------------------------------
+
+void SfxRequest::Done
+(
+ const SfxItemSet& rSet, /* von der Applikation mitgeteilte Parameter,
+ die z.B. in einem Dialog vom Benuter
+ erfragt wurden, ggf. 0 falls keine
+ Parameter gesetzt wurden */
+
+ FASTBOOL bKeep /* TRUE (default)
+ 'rSet' wird gepeichert und ist "uber
+ GetArgs() abfragbar
+
+ FALSE
+ 'rSet' wird nicht kopiert (schneller) */
+)
+
+/* [Beschreibung]
+
+ Diese Methode mu\s in der <Execute-Methode> des <SfxSlot>s gerufen
+ werden, der den SfxRequest ausgef"uhrt hat, wenn die Ausf"uhrung
+ tats"achlich stattgefunden hat. Wird 'Done()' nicht gerufen, gilt
+ der SfxRequest als abgebrochen.
+
+ Etwaige Returnwerte werden nur durchgereicht, wenn 'Done()' gerufen
+ wurde. Ebenso werden beim Aufzeichnen von Makros nur echte
+ Statements erzeugt, wenn 'Done()' gerufen wurde; f"ur SfxRequests,
+ die nicht derart gekennzeichnet wurden, wird anstelle dessen eine
+ auf die abgebrochene Funktion hinweisende Bemerkung ('rem') eingf"ugt.
+
+
+ [Anmerkung]
+
+ 'Done()' wird z.B. nicht gerufen, wenn ein durch die Funktion gestarteter
+ Dialog vom Benutzer abgebrochen wurde oder das Ausf"uhren aufgrund
+ eines falschen Kontextes (ohne Verwendung separater <SfxShell>s)
+ nicht durchgef"uhrt werden konnte. 'Done()' mu\s sehr wohl gerufen
+ werden, wenn das Ausf"uhren der Funktion zu einem regul"aren Fehler
+ f"uhrte (z.B. Datei konnte nicht ge"offnet werden).
+*/
+
+{
+ pImp->bDone = TRUE;
+
+ // ggf. Items merken, damit StarDraw sie abfragen kann
+ if ( bKeep )
+ {
+ if ( !pArgs )
+ {
+ pArgs = new SfxAllItemSet( rSet );
+ pImp->SetPool( pArgs->GetPool() );
+ }
+ else
+ {
+ SfxItemIter aIter(rSet);
+ const SfxPoolItem* pItem = aIter.FirstItem();
+ while(pItem)
+ {
+ if(!IsInvalidItem(pItem))
+ pArgs->Put(*pItem,pItem->Which());
+ pItem = aIter.NextItem();
+ }
+ }
+ }
+}
+
+//--------------------------------------------------------------------
+
+
+void SfxRequest::Done( BOOL bRelease )
+// [<SfxRequest::Done(SfxItemSet&)>]
+{
+ pImp->bDone = TRUE;
+ if( bRelease )
+ DELETEZ( pArgs );
+}
+
+//--------------------------------------------------------------------
+
+BOOL SfxRequest::IsCancelled() const
+{
+ return pImp->bCancelled;
+}
+
+//--------------------------------------------------------------------
+
+void SfxRequest::Cancel()
+
+/* [Beschreibung]
+
+ Markiert diesen Request als nicht mehr auszufuehren. Wird z.B. gerufen,
+ wenn das Ziel (genauer dessen Pool) stirbt.
+*/
+
+{
+ pImp->bCancelled = TRUE;
+ pImp->SetPool( 0 );
+ DELETEZ( pArgs );
+}
+
+//--------------------------------------------------------------------
+
+
+void SfxRequest::Ignore()
+
+/* [Beschreibung]
+
+ Wird diese Methode anstelle von <SfxRequest::Done()> gerufen, dann
+ wird dieser Request nicht recorded.
+
+
+ [Bespiel]
+
+ Das Selektieren von Tools im StarDraw soll nicht aufgezeichnet werden,
+ dieselben Slots sollen aber zum erzeugen der von den Tools zu
+ erzeugenden Objekte verwendet werde. Also kann nicht NoRecord
+ angegeben werden, dennoch soll u.U. nicht aufgezeichnet werden.
+*/
+
+{
+ // als tats"achlich ausgef"uhrt markieren
+ pImp->bIgnored = TRUE;
+}
+
+//--------------------------------------------------------------------
+
+BOOL SfxRequest::IsDone() const
+
+/* [Beschreibung]
+
+ Mit dieser Methode kann abgefragt werden, ob der SfxRequest tats"achlich
+ ausgef"uhrt wurde oder nicht. Wurde ein SfxRequest nicht ausgef"uhrt,
+ liegt dies z.B. daran, da\s der Benutzer abgebrochen hat oder
+ der Kontext f"ur diesen Request falsch war, dieses aber nicht "uber
+ eine separate <SfxShell> realisiert wurde.
+
+ SfxRequest-Instanzen, die hier FALSE liefern, werden nicht recorded.
+
+
+ [Querverweise]
+
+ <SfxRequest::Done(const SfxItemSet&)>
+ <SfxRequest::Done()>
+*/
+
+{
+ return pImp->bDone;
+}
+
+//--------------------------------------------------------------------
+
+BOOL SfxRequest::IsAPI() const
+
+/* [Beschreibung]
+
+ Liefert TRUE, wenn dieser SfxRequest von einer API (z.B. BASIC)
+ erzeugt wurde, sonst FALSE.
+*/
+
+{
+ return SFX_CALLMODE_API == ( SFX_CALLMODE_API & pImp->nCallMode );
+}
+
+//--------------------------------------------------------------------
+void SfxRequest::SetModifier( USHORT nModi )
+{
+ pImp->nModifier = nModi;
+}
+
+//--------------------------------------------------------------------
+USHORT SfxRequest::GetModifier() const
+{
+ return pImp->nModifier;
+}
+
+
diff --git a/sfx2/source/control/shell.cxx b/sfx2/source/control/shell.cxx
new file mode 100644
index 000000000000..b73b804f5a45
--- /dev/null
+++ b/sfx2/source/control/shell.cxx
@@ -0,0 +1,1524 @@
+/*************************************************************************
+ *
+ * $RCSfile: shell.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:29 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _SB_SBSTAR_HXX //autogen
+#include <basic/sbstar.hxx>
+#endif
+#ifndef _PSEUDO_HXX //autogen
+#include <so3/pseudo.hxx>
+#endif
+#ifndef _SFXITEMPOOL_HXX //autogen
+#include <svtools/itempool.hxx>
+#endif
+#ifndef _UNDO_HXX //autogen
+#include <svtools/undo.hxx>
+#endif
+#ifndef _SVTOOLS_ITEMDEL_HXX
+#include <svtools/itemdel.hxx>
+#endif
+
+#ifndef _SBXCLASS_HXX //autogen
+#include <svtools/sbx.hxx>
+#endif
+
+#pragma hdrstop
+
+#include "shell.hxx"
+#include "bindings.hxx"
+#include "dispatch.hxx"
+#include "viewfrm.hxx"
+#include "sfxbasic.hxx"
+#include "objface.hxx"
+#include "objsh.hxx"
+#include "viewsh.hxx"
+#include "dispatch.hxx"
+#include "sfxtypes.hxx"
+#include "request.hxx"
+#include "mnumgr.hxx"
+#include "saveopt.hxx"
+#include "statcach.hxx"
+
+//====================================================================
+
+DBG_NAME(SfxShell);
+
+//====================================================================
+
+TYPEINIT0(SfxShell);
+
+//====================================================================
+typedef SfxSlot* SfxSlotPtr;
+SV_DECL_PTRARR_DEL( SfxVerbSlotArr_Impl, SfxSlotPtr, 4, 4);
+SV_IMPL_PTRARR( SfxVerbSlotArr_Impl, SfxSlotPtr);
+
+struct SfxVerbList
+{
+ SfxVerbSlotArr_Impl aSlotArr;
+ SvVerbList aVerbList;
+};
+
+struct SfxShell_Impl: public SfxBroadcaster
+{
+ String aObjectName;// Name des Sbx-Objects
+ SfxItemArray_Impl aItems; // Datenaustausch auf Item-Basis
+ SfxViewShell* pViewSh; // SfxViewShell falls Shell ViewFrame/ViewShell/SubShell ist
+ SfxViewFrame* pFrame; // Frame, falls <UI-aktiv>
+ SfxVerbList* pVerbs;
+ SfxRepeatTarget* pRepeatTarget;
+// SbxObjectRef xParent;
+ BOOL bInAppBASIC;
+ BOOL bActive;
+ ULONG nDisableFlags;
+ ULONG nHelpId;
+ AsynchronLink* pExecuter;
+ AsynchronLink* pUpdater;
+ SfxShell_Impl() : pExecuter( 0 ), pUpdater( 0 ) {}
+ ~SfxShell_Impl() { delete pExecuter; delete pUpdater;}
+};
+
+//====================================================================
+#ifdef DBG_UTIL
+
+String SfxShellIdent_Impl( const SfxShell *pSh )
+
+/* [Beschreibung]
+
+ Interne Hilfesfunktion. Liefert einen die SfxShell 'pSh' beschreibenden
+ String zur"uck. Z.B.: SfxApplication[StarWriter]
+*/
+
+{
+ String aIdent( pSh->ISA(SfxApplication) ? DEFINE_CONST_UNICODE("SfxApplication") :
+ pSh->ISA(SfxViewFrame) ? DEFINE_CONST_UNICODE("SfxViewFrame") :
+ pSh->ISA(SfxViewShell) ? DEFINE_CONST_UNICODE("SfxViewShell") :
+ pSh->ISA(SfxObjectShell) ? DEFINE_CONST_UNICODE("SfxObjectShell") : DEFINE_CONST_UNICODE("SfxShell") );
+ aIdent += 0x005B; // '[' = 5Bh
+ aIdent += pSh->GetName();
+ aIdent += 0x005D; // ']' = 5Dh
+ return aIdent;
+}
+
+#endif
+//====================================================================
+
+void __EXPORT SfxShell::EmptyExecStub(SfxShell *, SfxRequest &)
+{
+}
+
+void __EXPORT SfxShell::EmptyStateStub(SfxShell *, SfxItemSet &)
+{
+}
+
+SfxShell::SfxShell()
+
+/* [Beschreibung]
+
+ Der Konstruktor der Klasse SfxShell initialisierung nur einfache
+ Typen, das dazugeh"orige SbxObject wird erst on-demand erzeugt.
+ Daher ist das Anlegen einer SfxShell Instanz sehr billig.
+*/
+
+: pPool(0),
+ pUndoMgr(0),
+ pImp(0)
+{
+ DBG_CTOR(SfxShell, 0);
+ pImp = new SfxShell_Impl;
+ pImp->pViewSh = 0;
+ pImp->pFrame = 0;
+ pImp->pVerbs = 0;
+ pImp->pRepeatTarget = 0;
+ pImp->bInAppBASIC = FALSE;
+ pImp->nHelpId = 0L;
+ pImp->bActive = FALSE;
+ pImp->nDisableFlags = 0;
+}
+
+//-------------------------------------------------------------------------
+
+SfxShell::SfxShell( SfxViewShell *pViewSh )
+
+/* [Beschreibung]
+
+ Der Konstruktor der Klasse SfxShell initialisierung nur einfache
+ Typen, das dazugeh"orige SbxObject wird erst on-demand erzeugt.
+ Daher ist das Anlegen einer SfxShell Instanz sehr billig.
+*/
+
+: pPool(0),
+ pUndoMgr(0),
+ pImp(0)
+{
+ DBG_CTOR(SfxShell, 0);
+ pImp = new SfxShell_Impl;
+ pImp->pViewSh = pViewSh;
+ pImp->pFrame = 0;
+ pImp->pVerbs = 0;
+ pImp->pRepeatTarget = 0;
+ pImp->bInAppBASIC = FALSE;
+ pImp->nHelpId = 0L;
+ pImp->bActive = FALSE;
+}
+
+//--------------------------------------------------------------------
+
+SfxShell::~SfxShell()
+
+/* [Beschreibung]
+
+ Die Verbindungs zu einem ggf. zugeh"origen SbxObject wird gel"ost.
+ Das SbxObject existiert ggf. weiter, kann aber keine Funktionen
+ mehr ausf"uhren und keine Properties mehr bereitstellen.
+*/
+
+{
+ DBG_DTOR(SfxShell, 0);
+ delete pImp->pVerbs;
+ delete pImp;
+}
+
+//--------------------------------------------------------------------
+
+void SfxShell::SetName( const String &rName )
+
+/* [Beschreibung]
+
+ Setzt den Namen des Shell-Objekts. Mit diesem Namen kann die
+ SfxShell-Instanz vom BASIC aus angesprochen werden.
+*/
+
+{
+ pImp->aObjectName = rName;
+}
+
+//--------------------------------------------------------------------
+
+const String& SfxShell::GetName() const
+
+/* [Beschreibung]
+
+ Liefert den Namen des Shell-Objekts. Mit diesem Namen kann die
+ SfxShell-Instanz vom BASIC aus angesprochen werden.
+*/
+
+{
+ return pImp->aObjectName;
+}
+
+//--------------------------------------------------------------------
+
+SvGlobalName SfxShell::GetGlobalName() const
+
+/* [Beschreibung]
+
+ Liefert den Global Unique Identifier des Shell-Objekts. Mit diesem
+ Namen kann die SfxShell-Instanz z.B. via OLE Automation angesprochen
+ werden, bzw. in der Registration-Database gefunden werden.
+*/
+
+{
+ return SvGlobalName();
+}
+
+//--------------------------------------------------------------------
+
+SfxDispatcher* SfxShell::GetDispatcher() const
+
+/* [Beschreibung]
+
+ Diese Methode liefert einen Pointer auf den <SfxDispatcher>, in
+ dem die SfxShell gerade <UI-aktiv> ist bzw. einen 0-Pointer, wenn
+ sie gerade nicht UI-aktiv ist.
+
+ Der zur"uckgegebene Pointer ist nur im unmittelbaren Kontext des
+ Methodenaufrufs g"ultig.
+*/
+
+{
+ return pImp->pFrame ? pImp->pFrame->GetDispatcher() : 0;
+}
+
+//--------------------------------------------------------------------
+
+SfxViewShell* SfxShell::GetViewShell() const
+
+/* [Beschreibung]
+
+ Liefert bei SubShells die SfxViewShell, in der sie liegen. Sonst und
+ falls nicht vom App-Entwickler angegeben liefert diese Methode 0.
+*/
+
+{
+ return pImp->pViewSh;
+}
+
+//--------------------------------------------------------------------
+
+SfxViewFrame* SfxShell::GetFrame() const
+
+/* [Beschreibung]
+
+ Diese Methode liefert einen Pointer auf den <SfxViewFrame>, dem diese
+ SfxShell-Instanz zugeordnet ist oder in dem sie zur Zeit <UI-aktiv> ist.
+ Ein 0-Pointer wird geliefert, wenn diese SfxShell-OInstanz gerade nicht
+ UI-aktiv ist und auch keinem SfxViewFrame fest zugeordnet ist.
+
+ Der zur"uckgegebene Pointer ist nur im unmittelbaren Kontext des
+ Methodenaufrufs g"ultig.
+
+
+ [Anmerkung]
+
+ Nur Instanzen von Subklasse von SfxApplication und SfxObjectShell sollten
+ hier einen 0-Pointer liefern. Ansonsten liegt ein Fehler im Anwendungs-
+ programm vor (falscher Ctor von SfxShell gerufen).
+
+
+ [Querverweise]
+
+ <SfxViewShell::GetViewFrame()const>
+*/
+
+{
+ if ( pImp->pFrame )
+ return pImp->pFrame;
+ if ( pImp->pViewSh )
+ return pImp->pViewSh->GetViewFrame();
+ return 0;
+}
+
+//--------------------------------------------------------------------
+
+const SfxPoolItem* SfxShell::GetItem
+(
+ USHORT nSlotId // Slot-Id des zu erfragenden <SfxPoolItem>s
+) const
+
+/* [Beschreibung]
+
+ Mit dieser Methode kann auf beliebige Objekte von Subklassen von
+ <SfxPoolItem> zugegriffen werden. Diese Austauschtechnik wird ben"otigt,
+ wenn z.B. spezielle <SfxToolBoxControl> Subklassen Zugriff auf
+ bestimmte Daten z.B. der <SfxObjectShell> ben"otigen.
+
+ Die zur"uckgelieferte Instanz geh"ort der jeweilige SfxShell und
+ darf nur im unmittelbaren Kontext des Methodenaufrufs verwendet werden.
+
+
+ [Querverweise]
+
+ <SfxShell::PutItem(const SfxPoolItem&)>
+ <SfxShell::RemoveItem(USHORT)>
+*/
+
+{
+ for ( USHORT nPos = 0; nPos < pImp->aItems.Count(); ++nPos )
+ if ( pImp->aItems.GetObject(nPos)->Which() == nSlotId )
+ return pImp->aItems.GetObject(nPos);
+ return 0;
+}
+
+//--------------------------------------------------------------------
+
+void SfxShell::RemoveItem
+(
+ USHORT nSlotId // Slot-Id des zu l"oschenden <SfxPoolItem>s
+)
+
+/* [Beschreibung]
+
+ Mit dieser Methode k"onnen die allgemein zur Verf"ugung gestellten
+ Instanzen von Subklassen von <SfxPoolItem> aus der SfxShell entfernt
+ werden.
+
+ Die gespeicherte Instanz wird gel"oscht.
+
+
+ [Querverweise]
+
+ <SfxShell::PutItem(const SfxPoolItem&)>
+ <SfxShell::GetItem(USHORT)>
+*/
+
+{
+ for ( USHORT nPos = 0; nPos < pImp->aItems.Count(); ++nPos )
+ if ( pImp->aItems.GetObject(nPos)->Which() == nSlotId )
+ {
+ // Item entfernen und l"oschen
+ SfxPoolItem *pItem = pImp->aItems.GetObject(nPos);
+ delete pItem;
+ pImp->aItems.Remove(nPos);
+
+ // falls aktiv Bindings benachrichtigen
+ SfxDispatcher *pDispat = GetDispatcher();
+ if ( pDispat )
+ {
+ SfxVoidItem aVoid( nSlotId );
+ pDispat->GetBindings()->Broadcast( SfxPoolItemHint( &aVoid ) );
+ }
+ }
+}
+
+//--------------------------------------------------------------------
+
+void SfxShell::PutItem
+(
+ const SfxPoolItem& rItem /* Instanz, von der eine Kopie erstellt wird,
+ die in der SfxShell in einer Liste
+ gespeichert wird. */
+)
+
+/* [Beschreibung]
+
+ Mit dieser Methode k"onnen beliebige Objekte von Subklassen von
+ <SfxPoolItem> zur Verf"ugung gestellt werden. Diese Austauschtechnik
+ wird ben"otigt, wenn z.B. spezielle <SfxToolBoxControl> Subklassen
+ Zugriff auf bestimmte Daten z.B. der <SfxObjectShell> ben"otigen.
+
+ Falls ein SfxPoolItem mit derselben Slot-Id exisitert, wird dieses
+ automatisch gel"oscht.
+
+
+ [Querverweise]
+
+ <SfxShell::RemoveItem(USHORT)>
+ <SfxShell::GetItem(USHORT)>
+*/
+
+{
+ DBG_ASSERT( !rItem.ISA(SfxSetItem), "SetItems aren't allowed here" );
+ DBG_ASSERT( SfxItemPool::IsSlot( rItem.Which() ),
+ "items with Which-Ids aren't allowed here" );
+
+ // MSC auf WNT/W95 machte hier Mist, Vorsicht bei Umstellungen
+ const SfxPoolItem *pItem = rItem.Clone();
+ SfxPoolItemHint aItemHint( (SfxPoolItem*) pItem );
+ const USHORT nWhich = rItem.Which();
+ SfxPoolItem **ppLoopItem = (SfxPoolItem**) pImp->aItems.GetData();
+ USHORT nPos;
+ for ( nPos = 0; nPos < pImp->aItems.Count(); ++nPos, ++ppLoopItem )
+ {
+ if ( (*ppLoopItem)->Which() == nWhich )
+ {
+ // Item austauschen
+ delete *ppLoopItem;
+ pImp->aItems.Remove(nPos);
+ pImp->aItems.Insert( (SfxPoolItemPtr) pItem, nPos );
+
+ // falls aktiv Bindings benachrichtigen
+ SfxDispatcher *pDispat = GetDispatcher();
+ if ( pDispat )
+ pDispat->GetBindings()->Broadcast( aItemHint );
+ return;
+ }
+ }
+
+ Broadcast( aItemHint );
+ pImp->aItems.Insert((SfxPoolItemPtr)pItem, nPos );
+}
+
+//--------------------------------------------------------------------
+
+SfxInterface* SfxShell::GetInterface() const
+
+/* [Beschreibung]
+
+ Mit dieser virtuellen Methode, die durch das Makro <SFX_DECL_INTERFACE>
+ von jeder Subclass mit eigenen Slots automatisch "uberladen wird, kann
+ auf die zu der Subklasse geh"orende <SfxInterface>-Instanz zugegriffen
+ werden.
+
+ Die Klasse SfxShell selbst hat noch kein eigenes SfxInterface
+ (keine Slots), daher wird ein 0-Pointer zur"uckgeliefert.
+*/
+
+{
+ return 0;
+}
+
+//--------------------------------------------------------------------
+
+SfxBroadcaster* SfxShell::GetBroadcaster()
+
+/* [Beschreibung]
+
+ Liefert einen SfxBroadcaster f"ur diese SfxShell-Instanz bis die
+ Klasse SfxShell von SfxBroadcaster abgeleitet ist.
+*/
+
+{
+ return pImp;
+}
+
+//--------------------------------------------------------------------
+
+SfxUndoManager* SfxShell::GetUndoManager()
+
+/* [Beschreibung]
+
+ Jede Subclass von SfxShell kann "uber einen <SfxUndoManager> verf"ugen.
+ Dieser kann in den abgeleiteten Klasse mit <SfxShell:SetUndoManager()>
+ gesetzt werden.
+
+ Die Klasse SfxShell selbst hat noch keinen SfxUndoManager, es wird
+ daher ein 0-Pointer zur"uckgeliefert.
+*/
+
+{
+ return pUndoMgr;
+}
+
+//--------------------------------------------------------------------
+
+void SfxShell::SetUndoManager( SfxUndoManager *pNewUndoMgr )
+
+/* [Beschreibung]
+
+ Setzt einen <SfxUndoManager> f"ur diese <SfxShell> Instanz. F"ur das
+ Undo wird immer nur der Undo-Manager an der jeweils oben auf dem
+ Stack des <SfxDispatcher> liegenden SfxShell verwendet.
+
+ Am "ubergebenen <SfxUndoManager> wird automatisch die aktuelle
+ Max-Undo-Action-Count Einstellung aus den Optionen gesetzt.
+
+ 'pNewUndoMgr' mu\s bis zum Dtor dieser SfxShell-Instanz oder bis
+ zum n"achsten 'SetUndoManager()' existieren.
+*/
+
+{
+ pUndoMgr = pNewUndoMgr;
+ if ( pUndoMgr )
+ pUndoMgr->SetMaxUndoActionCount( SFX_APP()->GetOptions().GetUndoCount() );
+}
+
+//--------------------------------------------------------------------
+
+SfxRepeatTarget* SfxShell::GetRepeatTarget() const
+
+/* [Beschreibung]
+
+ Liefert einen Pointer auf die <SfxRepeatTarget>-Instanz, die
+ als RepeatTarget bei SID_REPEAT verwendet wird, wenn der
+ von dieser SfxShell gelieferte <SfxUndoManager> angesprochen wird.
+ Der R"uckgabewert kann 0 sein.
+
+
+ [Anmerkung]
+
+ Eine Ableitung von <SfxShell> oder einer ihrer Subklassen von
+ <SfxRepeatTarget> ist nicht zu empfehlen, da Compiler-Fehler
+ provoziert werden (wegen Call-to-Pointer-to-Member-Function to
+ subclass).
+*/
+
+{
+ return pImp->pRepeatTarget;
+}
+
+//--------------------------------------------------------------------
+
+void SfxShell::SetRepeatTarget( SfxRepeatTarget *pTarget )
+
+/* [Beschreibung]
+
+ Setzt den die <SfxRepeatTarget>-Instanz, die bei SID_REPEAT als
+ RepeatTarget verwendet wird, wenn der von dieser SfxShell gelieferte
+ <SfxUndoManager> angesprochen wird. Durch 'pTarget==0' wird SID_REPEAT
+ f"ur diese SfxShell disabled. Die Instanz '*pTarget' mu\s so lange
+ leben, wie sie angemeldet ist.
+
+
+ [Anmerkung]
+
+ Eine Ableitung von <SfxShell> oder einer ihrer Subklassen von
+ <SfxRepeatTarget> ist nicht zu empfehlen, da Compiler-Fehler
+ provoziert werden (wegen Call-to-Pointer-to-Member-Function to
+ subclass).
+*/
+
+{
+ pImp->pRepeatTarget = pTarget;
+}
+
+//--------------------------------------------------------------------
+
+void SfxShell::Invalidate
+(
+ USHORT nId /* Zu invalidierende Slot-Id oder Which-Id.
+ Falls diese 0 ist (default), werden
+ alle z.Zt. von dieser Shell bedienten
+ Slot-Ids invalidiert. */
+)
+
+/* [Beschreibung]
+
+ Mit dieser Methode k"onnen Slots der Subclasses "uber die Slot-Id
+ oder alternativ "uber die Which-Id invalidiert werden. Slot-Ids,
+ die von der Subclass ererbt sind, werden ebenfalls invalidert.
+
+ [Querverweise]
+ <SfxBindings::Invalidate(USHORT)>
+ <SfxBindings::InvalidateAll(BOOL)>
+*/
+
+{
+ if ( !GetViewShell() )
+ {
+#if SUPD>603
+ DBG_ERROR( "wrong Invalidate method called!" );
+#endif
+ return;
+ }
+
+ Invalidate_Impl( GetViewShell()->GetViewFrame()->GetBindings(), nId );
+}
+
+void SfxShell::Invalidate_Impl( SfxBindings& rBindings, USHORT nId )
+{
+ if ( nId == 0 )
+ {
+ rBindings.InvalidateShell( *this, FALSE );
+ }
+ else
+ {
+ const SfxInterface *pIF = GetInterface();
+ do
+ {
+ const SfxSlot *pSlot = pIF->GetSlot(nId);
+ if ( pSlot )
+ {
+ // bei Enum-Slots ist der Master-Slot zu invalidieren
+ if ( SFX_KIND_ENUM == pSlot->GetKind() )
+ pSlot = pSlot->GetLinkedSlot();
+
+ // den Slot selbst und ggf. auch alle Slave-Slots invalidieren
+ rBindings.Invalidate( pSlot->GetSlotId() );
+ for ( const SfxSlot *pSlave = pSlot->GetLinkedSlot();
+ pSlave && pIF->ContainsSlot_Impl( pSlave ) &&
+ pSlave->GetLinkedSlot() == pSlot;
+ ++pSlave )
+ rBindings.Invalidate( pSlave->GetSlotId() );
+
+ return;
+ }
+
+ pIF = pIF->GetGenoType();
+ }
+
+ while ( pIF );
+
+ DBG_WARNING( "W3: invalidating slot-id unknown in shell" );
+ }
+}
+
+//--------------------------------------------------------------------
+
+void SfxShell::DoActivate( SfxViewFrame *pFrame, BOOL bMDI )
+
+/* [Beschreibung]
+
+ Diese Methode steuert die Aktivierung der SfxShell-Instanz. Zun"achst
+ wird durch Aufruf der virtuellen Methode <SfxShell::Activate(BOOL)>
+ der Subclass die M"oglichkeit gegeben, auf das Event zu reagieren.
+
+ Bei bMDI == TRUE wird das zugeh"orige SbxObject 'scharfgeschaltet',
+ so da\s Methoden des Objekts unqualifiziert (ohne den Namen des Objekts)
+ vom BASIC gefunden werden.
+*/
+
+{
+#ifndef PRODUCT
+ const SfxInterface *p_IF = GetInterface();
+ if ( !p_IF )
+ return;
+#endif
+#ifdef DBG_UTIL_VB
+ String aMsg("SfxShell::DoActivate() ");
+ aMsg += (long)this;
+ aMsg += " ";
+ aMsg += GetInterface()->GetName();
+ aMsg += " bMDI ";
+ if ( bMDI ) aMsg += "MDI";
+ DbgTrace( aMsg.GetBuffer() );
+#endif
+
+ if ( bMDI )
+ {
+ // Frame merken, in dem aktiviert wird
+ pImp->pFrame = pFrame;
+ pImp->bActive = TRUE;
+ }
+
+ // Subklasse benachrichtigen
+ Activate(bMDI);
+}
+
+//--------------------------------------------------------------------
+
+void SfxShell::DoDeactivate( SfxViewFrame *pFrame, BOOL bMDI )
+
+/* [Beschreibung]
+
+ Diese Methode steuert die Deaktivierung der SfxShell-Instanz. Bei
+ bMDI == TRUE wird zun"achst das SbxObject in einen Status versetzt,
+ so da\s Methoden vom BASIC aus nur noch qualifiziert gerufen werden
+ k"onnen.
+
+ Dann erh"alt in jedem Fall die Subclass durch Aufruf der virtuellen
+ Methode <SfxShell::Deactivate(BOOL)> die M"oglichkeit auf das Event
+ zu reagieren.
+*/
+
+{
+#ifndef PRODUCT
+ const SfxInterface *p_IF = GetInterface();
+ if ( !p_IF )
+ return;
+#endif
+#ifdef DBG_UTIL_VB
+ String aMsg("SfxShell::DoDeactivate()");
+ aMsg += (long)this;
+ aMsg += " ";
+ aMsg += GetInterface()->GetName();
+ aMsg += " bMDI ";
+ if ( bMDI ) aMsg += "MDI";
+ DbgTrace( aMsg.GetBuffer() );
+#endif
+
+ // nur wenn er vom Frame kommt (nicht z.B. pop der BASIC-IDE vom AppDisp)
+ if ( bMDI && pImp->pFrame == pFrame )
+ {
+ // austragen
+ pImp->pFrame = 0;
+ pImp->bActive = FALSE;
+ }
+
+ // Subklasse benachrichtigen
+ Deactivate(bMDI);
+}
+
+//--------------------------------------------------------------------
+
+BOOL SfxShell::IsActive() const
+{
+ return pImp->bActive;
+}
+
+//--------------------------------------------------------------------
+
+void SfxShell::Activate
+(
+ BOOL bMDI /* TRUE
+ der <SfxDispatcher>, auf dem die SfxShell sich
+ befindet, ist aktiv geworden oder die SfxShell
+ Instanz wurde auf einen aktiven SfxDispatcher
+ gepusht. (vergl. SystemWindow::IsMDIActivate())
+
+ FALSE
+ das zum <SfxViewFrame>, auf dessen SfxDispatcher
+ sich die SfxShell Instanz befindet, wurde
+ aktiviert.
+ (z.B. durch einen geschlossenen Dialog) */
+)
+
+/* [Beschreibung]
+
+ Virtuelle Methode, die beim Aktivieren der SfxShell Instanz gerufen
+ wird, um den Subclasses die Gelegenheit zu geben, auf das Aktivieren
+ zu reagieren.
+
+ Die Basisimplementation ist leer und braucht nicht gerufen zu werden.
+
+
+ [Querverweise]
+ StarView SystemWindow::Activate(BOOL)
+*/
+
+{
+}
+
+//--------------------------------------------------------------------
+
+void SfxShell::Deactivate
+(
+ BOOL bMDI /* TRUE
+ der <SfxDispatcher>, auf dem die SfxShell sich
+ befindet, ist inaktiv geworden oder die SfxShell
+ Instanz wurde auf einen aktiven SfxDispatcher
+ gepoppt. (vergl. SystemWindow::IsMDIActivate())
+
+ FALSE
+ das zum <SfxViewFrame>, auf dessen SfxDispatcher
+ sich die SfxShell Instanz befindet, wurde
+ deaktiviert. (z.B. durch einen Dialog) */
+
+)
+
+/* [Beschreibung]
+
+ Virtuelle Methode, die beim Deaktivieren der SfxShell Instanz gerufen
+ wird, um den Subclasses die Gelegenheit zu geben, auf das Deaktivieren
+ zu reagieren.
+
+ Die Basisimplementation ist leer und braucht nicht gerufen zu werden.
+
+
+ [Querverweise]
+ StarView SystemWindow::Dectivate(BOOL)
+*/
+
+{
+}
+
+void SfxShell::ParentActivate
+(
+)
+
+/* [Beschreibung]
+
+ Ein Parent des <SfxDispatcher>, auf dem die SfxShell sich befindet,
+ ist aktiv geworden, oder die SfxShell Instanz wurde auf einen
+ <SfxDispatcher> gepusht, dessen parent aktiv ist.
+
+ Die Basisimplementation ist leer und braucht nicht gerufen zu werden.
+
+ [Querverweise]
+ SfxShell::Activate()
+*/
+{
+}
+
+//--------------------------------------------------------------------
+
+void SfxShell::ParentDeactivate
+(
+)
+
+/* [Beschreibung]
+
+ Der aktive Parent des <SfxDispatcher>, auf dem die SfxShell sich befindet,
+ ist deaktiviert worden.
+
+ Die Basisimplementation ist leer und braucht nicht gerufen zu werden.
+
+ [Querverweise]
+ SfxShell::Deactivate()
+*/
+{
+}
+
+//--------------------------------------------------------------------
+#if 0
+// falls noch mal "pure virtual function called" auf dem MAC:
+// Bitte MAC nicht mehr unterstuetzen
+// der MPW-Linker will die immer haben, obwohl pure virtual
+
+#ifdef MAC
+extern "C"
+{
+ void debugstr( char *pMsg );
+}
+#endif
+
+SfxItemPool& SfxShell::GetPool()
+{
+ debugstr( "pure virtual function called: SfxShell::GetPool()" );
+ SfxItemPool aPool(0,0);
+ return aPool;
+}
+
+#endif
+
+//--------------------------------------------------------------------
+
+void SfxShell::FillStatusBar( StatusBar& )
+
+/* [Beschreibung]
+
+ Mit dieser Factory-Methode kann der Applikationsprogrammierer einer
+ SfxShell-Subklasse eine eigene Statusbar zuweisen. Der SFx bevorzugt
+ jeweils die Statusbar einer weiter oben auf den <SfxDispatcher>-Stack
+ liegenden SfxShell.
+
+ Die Basisimplementation ist leer und braucht nicht gerufen zu werden.
+
+*/
+
+{
+}
+
+//--------------------------------------------------------------------
+
+ResMgr* SfxShell::GetResMgr() const
+
+/* [Beschreibung]
+
+ Diese Methode liefert den ResMgr der <Resource-DLL>, die von der
+ SfxShell-Instanz verwendet wird. Ist dies ein 0-Pointer, so
+ ist der aktuelle Resource-Manager zu verwenden.
+*/
+
+{
+ return GetInterface()->GetResMgr();
+}
+
+//--------------------------------------------------------------------
+
+FASTBOOL SfxShell::CanExecuteSlot_Impl( const SfxSlot &rSlot )
+
+/* [Beschreibung]
+
+ Diese Methode stellt durch Aufruf der Statusfunktion fest,
+ ob 'rSlot' aktuell ausgef"uhrt werden kann.
+*/
+{
+ // Slot-Status holen
+ SfxItemPool &rPool = GetPool();
+ const USHORT nId = rSlot.GetWhich( rPool );
+ SfxItemSet aSet(rPool, nId, nId);
+ SfxStateFunc pFunc = rSlot.GetStateFnc();
+ CallState( pFunc, aSet );
+ return aSet.GetItemState(nId) != SFX_ITEM_DISABLED;
+}
+
+//--------------------------------------------------------------------
+#if 0
+ULONG SfxShell::ExecuteSlot
+(
+ USHORT nSlot, // In: auszuf"uhrender Slot
+ USHORT nMemberId, // In: MemberId f"ur strukturierte Items
+ SbxVariable& rRet, // Out: Returnwert
+ SbxBase* pArgs // In: 0, einzelner Parameter/Parameterliste
+)
+
+/* [Beschreibung]
+
+ Methode zum Ausf"uhren eines <SfxSlot>s von einem SfxShellObject
+ (BASIC oder andere API).
+
+ Aufrufe von APIs werden nicht recorded (ist ja auch kein <SfxDispatcher>).
+
+
+ [R"uckgabewert]
+
+ ULONG ErrorCode
+*/
+
+{
+ // Slot suchen
+ const SfxSlot *pSlot = GetInterface()->GetSlot(nSlot);
+ if ( !pSlot )
+ return SbxERR_PROC_UNDEFINED;
+
+ // ggf. disabled
+ if ( !pSlot->IsMode(SFX_SLOT_FASTCALL) && !CanExecuteSlot_Impl(*pSlot) )
+ return SbERR_METHOD_FAILED;
+
+ // "ofters ben"otigte Werte
+ SfxItemPool &rPool = GetPool();
+ SfxMapUnit eUserMetric = SFX_APP()->GetOptions().GetUserMetric();
+
+ // Returnwert zum sp"ateren Aufbereiten als SbxVariable merken
+ BOOL bDone = FALSE; // Return nur auswerten, wenn nicht abgebrochen wurde
+ const SfxPoolItem *pRetItem = 0;
+ SbxObject *pOwnObject = GetSbxObject(); // Hack fuer #22783
+
+ // aktuelle Parameter oder Property (impliziter Parameter)?
+ if ( pArgs || pSlot->IsMode(SFX_SLOT_PROPSET) )
+ {
+ // aktuelle Parameter in diesem ItemSet sammeln
+ SfxAllItemSet aSet( rPool );
+
+ // mehrere Parameter?
+ if ( pSlot->IsMode(SFX_SLOT_METHOD) )
+ {
+ // das kann nur ein Methoden-Slot sein
+ DBG_ASSERT( !pArgs || pArgs->ISA(SbxArray), "not an SbxArray as arguments" );
+
+ // "uber die formalen Parameter iterieren
+ USHORT nFormalArgs = pSlot->GetFormalArgumentCount();
+ USHORT nActualArgs = pArgs ? ((SbxArray*)pArgs)->Count() - 1 : 0;
+ USHORT nBasicArg = 0;
+ for ( USHORT nArg = 0;
+ nArg < nFormalArgs && nBasicArg < nActualArgs;
+ ++nArg )
+ {
+ // formale Paramterbeschreibung besorgen
+ const SfxFormalArgument &rArg = pSlot->GetFormalArgument(nArg);
+
+ // Item per Factory erzeugen
+ SfxPoolItem *pItem = rArg.CreateItem();
+ DBG_ASSERT( pItem, "item without factory" );
+ pItem->SetWhich( rPool.GetWhich(rArg.nSlotId) );
+
+ // Konvertieren / ggf. strukturierte Items zusammensetzen
+ ULONG eErr = 0;
+ USHORT nSubCount = rArg.pType->nAttribs;
+ if ( !nSubCount )
+ {
+ // einfaches Item
+ SbxVariable *pSubArg = ((SbxArray*)pArgs)->Get(++nBasicArg);
+ eErr = rPool.SetVariable( *pItem, *pSubArg, eUserMetric );
+ }
+ else
+ {
+ // strukturiertes Item
+ for ( USHORT n = 1; n <= nSubCount && !eErr; ++n )
+ {
+ SbxVariable *pSubArg = ((SbxArray*)pArgs)->Get(++nBasicArg);
+ pSubArg->SetUserData(
+ long(rArg.pType->aAttrib[n-1].nAID) << 20 );
+ eErr = rPool.SetVariable( *pItem, *pSubArg, eUserMetric );
+ }
+ }
+
+ // falls Item erzeugt werden konnte, an Request anh"angen
+ if ( 0 == eErr )
+ aSet.Put( *pItem,pItem->Which() );
+ delete pItem; //! Optimieren (Put mit direkter Uebernahme)
+ if ( 0 != eErr )
+ return eErr;
+ }
+
+ // nicht alle Parameter abger"aumt (zuviele)?
+ if ( nBasicArg < nActualArgs )
+ return SbxERR_WRONG_ARGS;
+ }
+ else
+ {
+ // Instanz von SfxPoolItem-Subklasse besorgen/erzeugen
+ SfxPoolItem *pItem = 0;
+
+ // Teil eines strukturiertes Items?
+ if ( nMemberId )
+ {
+ // => Status-Item besorgen
+ const SfxPoolItem *pState = GetSlotState(nSlot);
+ if ( pState && !pState->ISA(SfxVoidItem) )
+ pItem = pState->Clone();
+ }
+
+ // kein StatusItem oder einfaches/komplexes Item
+ if ( !pItem )
+ {
+ // per Factory erzeugen
+ pItem = pSlot->GetType()->CreateItem();
+ DBG_ASSERT( pItem, "item without factory" );
+ pItem->SetWhich( rPool.GetWhich(nSlot) );
+ }
+
+ // Daten aus Variable in das Item "ubertragen
+ ULONG eErr = rPool.SetVariable( *pItem, rRet, eUserMetric );
+ if ( 0 == eErr )
+ aSet.Put( *pItem,pItem->Which() );
+ delete pItem; //! Optimieren (Put mit direkter Uebernahme)
+ if ( 0 != eErr )
+ return eErr;
+ }
+
+ // via Request mit 'normaler' Execute-Methode ausf"uhren
+ SfxRequest aReq( nSlot, SFX_CALLMODE_API, aSet );
+ aSet.ClearItem(); // pPool k"onnte in _Execute sterben
+ SfxExecFunc pFunc = pSlot->GetExecFnc();
+ CallExec( pFunc, aReq );
+ bDone = aReq.IsDone();
+ pRetItem = aReq.GetReturnValue();
+ }
+ else
+ {
+ // ohne Parameter direkt ausf"uhren
+ SfxRequest aReq( nSlot, SFX_CALLMODE_API, GetPool() );
+// SfxRequest aReq( nSlot, GetPool(), TRUE );
+ SfxExecFunc pFunc = pSlot->GetExecFnc();
+ CallExec( pFunc, aReq );
+ bDone = aReq.IsDone();
+ pRetItem = aReq.GetReturnValue();
+ }
+
+ // in IDL ein Return-Wert angegeben?
+ if ( pSlot->IsMode(SFX_SLOT_METHOD) && rRet.GetType() != SbxVOID )
+ {
+ // ist aber kein Returnwert gesetzt worden?
+ if ( !pRetItem || pRetItem->ISA(SfxVoidItem) )
+ {
+ // Ignore ohne Parameter ist erlaubt und auch normal
+ if ( !bDone )
+ return 0;
+
+ // sonst mu\s einer gesetzt worden sein
+ DBG_ERROR( "IDL hat Return-Wert, Execute-Methode setzt aber keinen!" );
+ return SbxERR_CONVERSION;
+ }
+
+ // Returnwert in SbxVariable packen
+ HACK( #22783 - lebt *this noch? )
+ if ( ((SfxShellObject*)pOwnObject)->GetShell() )
+ GetPool().FillVariable( *pRetItem, rRet, eUserMetric );
+ else
+ pRetItem->FillVariable( rRet, eUserMetric, eUserMetric );
+ }
+
+ return 0;
+}
+#endif
+
+long ShellCall_Impl( void* pObj, void* pArg )
+{
+ ((SfxShell* )pObj)->ExecuteSlot( *(SfxRequest*)pArg, (SfxInterface*)0L );
+ return 0;
+}
+
+/* [Beschreibung]
+ Asynchrones ExecuteSlot fuer das RELOAD
+ */
+
+//--------------------------------------------------------------------
+const SfxPoolItem* SfxShell::ExecuteSlot( SfxRequest& rReq, BOOL bAsync )
+{
+ if( !bAsync )
+ return ExecuteSlot( rReq, (SfxInterface*)0L );
+ else
+ {
+ if( !pImp->pExecuter )
+ pImp->pExecuter = new AsynchronLink(
+ Link( this, ShellCall_Impl ) );
+ pImp->pExecuter->Call( new SfxRequest( rReq ) );
+ return 0;
+ }
+}
+
+const SfxPoolItem* SfxShell::ExecuteSlot
+(
+ SfxRequest &rReq, // der weiterzuleitende <SfxRequest>
+ const SfxInterface* pIF // default = 0 bedeutet virtuell besorgen
+)
+
+/* [Beschreibung]
+
+ Diese Methode erm"oglicht das Weiterleiten eines <SfxRequest> an
+ die angegebene Basis-<SfxShell>.
+
+
+ [Beispiel]
+
+ In einer von SfxViewShell abgeleiteten Klasse soll SID_PRINTDOCDIRECT
+ abgefangen werden. Unter bestimmten Umst"anden soll vor dem Drucken
+ eine Abfrage erscheinen, und der Request soll ggf. abgebrochen werden.
+
+ Dazu ist in der IDL dieser Subklasse der o.g. Slot einzutragen. Die
+ Execute-Methode enth"alt dann skizziert:
+
+ void SubViewShell::Exec( SfxRequest &rReq )
+ {
+ if ( rReq.GetSlot() == SID_PRINTDOCDIRECT )
+ {
+ 'dialog'
+ if ( 'condition' )
+ ExecuteSlot( rReq, SfxViewShell::GetInterface() );
+ }
+ }
+
+ Es braucht i.d.R. kein rReq.Done() gerufen zu werden, da das bereits
+ die Implementierung der SfxViewShell erledigt bzw. abgebrochen wurde.
+
+
+ [Querverweise]
+
+ <SfxShell::GetSlotState(USHORT,const SfxInterface*,SfxItemSet*)>
+*/
+
+{
+ if ( !pIF )
+ pIF = GetInterface();
+ const SfxSlot *pSlot = pIF->GetSlot(rReq.GetSlot());
+ DBG_ASSERT( pSlot, "slot not supported" );
+
+ SfxExecFunc pFunc = pSlot->GetExecFnc();
+ CallExec( pFunc, rReq );
+
+ return rReq.GetReturnValue();
+}
+
+//--------------------------------------------------------------------
+
+const SfxPoolItem* SfxShell::GetSlotState
+(
+ USHORT nSlotId, // Slot-Id des zu befragenden Slots
+ const SfxInterface* pIF, // default = 0 bedeutet virtuell besorgen
+ SfxItemSet* pStateSet // SfxItemSet der Slot-State-Methode
+)
+
+/* [Beschreibung]
+
+ Diese Methode liefert den Status des Slots mit der angegebenen Slot-Id
+ "uber das angegebene Interface.
+
+ Ist der Slot disabled oder in dieser SfxShell (und deren Parent-Shells)
+ nicht bekannt, wird ein 0-Pointer zur"uckgeliefert.
+
+ Hat der Slot keinen Status, wird ein SfxVoidItem zur"uckgeliefert.
+
+ Der Status wird bei pStateSet != 0 gleich in diesem Set gesetzt, so
+ da\s <SfxShell>-Subklassen Slots-"uberladen und auch bei der
+ Status-Methode die Basis-Implementierung rufen k"onnen.
+
+
+ [Beispiel]
+
+ In einer von SfxViewShell abgeleiteten Klasse soll SID_PRINTDOCDIRECT
+ abgefangen werden. Unter bestimmten Umst"anden soll vor dem Drucken
+ eine Abfrage erscheinen, und der Request soll ggf. abgebrochen werden.
+
+ Dazu ist in der IDL dieser Subklasse der o.g. Slot einzutragen. Die
+ Status-Methode enth"alt dann skizziert:
+
+ void SubViewShell::PrintState( SfxItemSet &rState )
+ {
+ if ( rState.GetItemState( SID_PRINTDOCDIRECT ) != SFX_ITEM_UNKNOWN )
+ GetSlotState( SID_PRINTDOCDIRECT, SfxViewShell::GetInterface(),
+ &rState );
+ ...
+ }
+
+
+ [Querverweise]
+
+ <SfxShell::ExecuteSlot(SfxRequest&)>
+*/
+
+{
+ // Slot am angegebenen Interface besorgen
+ if ( !pIF )
+ pIF = GetInterface();
+ SfxItemState eState;
+ SfxItemPool &rPool = GetPool();
+ const SfxSlot *pSlot = pIF->GetSlot(nSlotId);
+ if ( pSlot )
+ // ggf. auf Which-Id mappen
+ nSlotId = pSlot->GetWhich( rPool );
+
+ // Item und Item-Status besorgen
+ const SfxPoolItem *pItem;
+ SfxItemSet aSet( rPool, nSlotId, nSlotId ); // pItem stirbt sonst zu fr"uh
+ if ( pSlot )
+ {
+ // Status-Methode rufen
+ SfxStateFunc pFunc = pSlot->GetStateFnc();
+ CallState( pFunc, aSet );
+ eState = aSet.GetItemState( nSlotId, TRUE, &pItem );
+
+ // ggf. Default-Item besorgen
+ if ( eState == SFX_ITEM_DEFAULT )
+ {
+ if ( SfxItemPool::IsWhich(nSlotId) )
+ pItem = &rPool.GetDefaultItem(nSlotId);
+ else
+ eState = SFX_ITEM_DONTCARE;
+ }
+ }
+ else
+ eState = SFX_ITEM_UNKNOWN;
+
+ // Item und Item-Status auswerten und ggf. in pStateSet mitpflegen
+ SfxPoolItem *pRetItem = 0;
+ if ( eState <= SFX_ITEM_DISABLED )
+ {
+ if ( pStateSet )
+ pStateSet->DisableItem(nSlotId);
+ return 0;
+ }
+ else if ( eState == SFX_ITEM_DONTCARE )
+ {
+ if ( pStateSet )
+ pStateSet->ClearItem(nSlotId);
+ pRetItem = new SfxVoidItem(0);
+ }
+ else
+ {
+ if ( pStateSet && pStateSet->Put( *pItem ) )
+ return &pStateSet->Get( pItem->Which() );
+ pRetItem = pItem->Clone();
+ }
+ DeleteItemOnIdle(pRetItem);
+
+ return pRetItem;
+}
+
+//--------------------------------------------------------------------
+
+SFX_EXEC_STUB(SfxShell, VerbExec)
+SFX_STATE_STUB(SfxShell, VerbState)
+
+
+void SfxShell::SetVerbs(const SvVerbList* pVerbs)
+{
+ SfxViewShell *pViewSh = PTR_CAST ( SfxViewShell, this);
+
+ DBG_ASSERT(pViewSh, "SetVerbs nur an der ViewShell aufrufen!");
+
+ if (pImp->pVerbs)
+ {
+ // Zun"achst alle Statecaches dirty machen, damit keiner mehr versucht,
+ // die Slots zu benutzen
+
+ SfxBindings *pBindings =
+ pViewSh->GetViewFrame()->GetDispatcher()->GetBindings();
+ USHORT nCount = pImp->pVerbs->aSlotArr.Count();
+ for (USHORT n=0; n<nCount ; n++)
+ {
+ USHORT nId = SID_VERB_START + n;
+ pBindings->Invalidate(nId, FALSE, TRUE);
+ }
+
+ DELETEZ (pImp->pVerbs);
+ }
+
+ if (pVerbs)
+ pImp->pVerbs = new SfxVerbList();
+
+ if (pVerbs)
+ {
+ USHORT nr=0;
+ for (USHORT n=0; n<pVerbs->Count(); n++)
+ {
+ SfxSlot *pNewSlot = new SfxSlot;
+ USHORT nSlotId = SID_VERB_START + nr++;
+ DBG_ASSERT(nSlotId <= SID_VERB_END, "Zuviele Verben!");
+ if (nSlotId > SID_VERB_END)
+ break;
+
+ pNewSlot->nSlotId = nSlotId;
+ pNewSlot->nGroupId = 0;
+
+ // Verb-Slots m"ussen asynchron ausgef"uhrt werden, da sie w"ahrend
+ // des Ausf"uhrens zerst"ort werden k"onnten
+ pNewSlot->nFlags = SFX_SLOT_ASYNCHRON;
+ pNewSlot->nMasterSlotId = 0;
+ pNewSlot->nValue = 0;
+ pNewSlot->fnExec = SFX_STUB_PTR(SfxShell,VerbExec);
+ pNewSlot->fnState = SFX_STUB_PTR(SfxShell,VerbState);
+ pNewSlot->pType = 0; HACK(SFX_TYPE(SfxVoidItem))
+ pNewSlot->pName = U2S((*pVerbs)[n].GetName()).getStr();
+ pNewSlot->pLinkedSlot = 0;
+ pNewSlot->nArgDefCount = 0;
+ pNewSlot->pFirstArgDef = 0;
+ pNewSlot->pUnoName = 0;
+
+ if (pImp->pVerbs->aSlotArr.Count())
+ {
+ SfxSlot *pSlot = (pImp->pVerbs->aSlotArr)[0];
+ pNewSlot->pNextSlot = pSlot->pNextSlot;
+ pSlot->pNextSlot = pNewSlot;
+ }
+ else
+ pNewSlot->pNextSlot = pNewSlot;
+
+ pImp->pVerbs->aSlotArr.Insert(pNewSlot, n);
+ pImp->pVerbs->aVerbList.Insert((*pVerbs)[n], n);
+ }
+ }
+
+ if (pViewSh)
+ {
+ // Der Status von SID_OBJECT wird im Controller direkt an der Shell
+ // abgeholt, es reicht also, ein neues StatusUpdate anzuregen
+ SfxBindings *pBindings = pViewSh->GetViewFrame()->GetDispatcher()->
+ GetBindings();
+ pBindings->Invalidate( SID_OBJECT, TRUE, TRUE );
+ }
+}
+
+//--------------------------------------------------------------------
+
+const SvVerbList* SfxShell::GetVerbs() const
+{
+ return pImp->pVerbs ? &pImp->pVerbs->aVerbList : 0;
+}
+
+//--------------------------------------------------------------------
+
+void SfxShell::VerbExec(SfxRequest& rReq)
+{
+ USHORT nId = rReq.GetSlot();
+ SfxViewShell *pViewShell = SfxViewShell::Current();
+ const SvVerbList* pList = pViewShell->GetVerbs();
+
+ for (USHORT n=0; n<pList->Count(); n++)
+ {
+ if (nId == SID_VERB_START + n)
+ {
+ pViewShell->DoVerb((*pList)[n].GetId());
+ rReq.Done();
+ return;
+ }
+ }
+}
+
+//--------------------------------------------------------------------
+
+void SfxShell::VerbState(SfxItemSet &rSet)
+{
+}
+
+//--------------------------------------------------------------------
+
+const SfxSlot* SfxShell::GetVerbSlot_Impl(USHORT nId) const
+{
+// DBG_ASSERT(pImp->pVerbs, "Keine Verben bekannt!");
+ if (!pImp->pVerbs)
+ return 0;
+
+ const SvVerbList& rList = pImp->pVerbs->aVerbList;
+
+ DBG_ASSERT(nId >= SID_VERB_START && nId <= SID_VERB_END,"Falsche VerbId!");
+ USHORT nIndex = nId - SID_VERB_START;
+ DBG_ASSERT(nIndex < rList.Count(),"Falsche VerbId!");
+
+ if (nIndex < rList.Count())
+ return pImp->pVerbs->aSlotArr[nIndex];
+ else
+ return 0;
+}
+
+//--------------------------------------------------------------------
+
+void SfxShell::SetHelpId(ULONG nId)
+{
+ pImp->nHelpId = nId;
+}
+
+//--------------------------------------------------------------------
+
+ULONG SfxShell::GetHelpId() const
+{
+ return pImp->nHelpId;
+}
+
+//--------------------------------------------------------------------
+
+SfxObjectShell* SfxShell::GetObjectShell()
+{
+ if ( GetViewShell() )
+ return GetViewShell()->GetViewFrame()->GetObjectShell();
+ else
+ return NULL;
+}
+
+//--------------------------------------------------------------------
+
+SfxSlotPool& SfxShell::GetSlotPool_Impl() const
+{
+ return SFX_APP()->GetSlotPool( GetFrame() );
+}
+
+BOOL SfxShell::HasUIFeature( ULONG )
+{
+ return FALSE;
+}
+
+long DispatcherUpdate_Impl( void* pObj, void* pArg )
+{
+ ((SfxDispatcher*) pArg)->Update_Impl( TRUE );
+ return 0;
+}
+
+void SfxShell::UIFeatureChanged()
+{
+ SfxViewFrame *pFrame = GetFrame();
+ if ( pFrame && pFrame->IsVisible() )
+ {
+ // Auch dann Update erzwingen, wenn Dispatcher schon geupdated ist,
+ // sonst bleibt evtl. irgendwas in den gebunkerten Tools stecken.
+ // Asynchron aufrufen, um Rekursionen zu vermeiden
+ if ( !pImp->pUpdater )
+ pImp->pUpdater = new AsynchronLink( Link( this, DispatcherUpdate_Impl ) );
+
+ // Mehrfachaufrufe gestattet
+ pImp->pUpdater->Call( pFrame->GetDispatcher(), TRUE );
+ }
+}
+
+void SfxShell::SetDisableFlags( ULONG nFlags )
+{
+ pImp->nDisableFlags = nFlags;
+}
+
+ULONG SfxShell::GetDisableFlags() const
+{
+ return pImp->nDisableFlags;
+}
+
+SfxItemSet* SfxShell::CreateItemSet( USHORT nId )
+{
+ return NULL;
+}
+
+void SfxShell::ApplyItemSet( USHORT nId, const SfxItemSet& rSet )
+{
+}
+
+void SfxShell::SetViewShell_Impl( SfxViewShell* pView )
+{
+ pImp->pViewSh = pView;
+}
+
+
+
diff --git a/sfx2/source/control/srchitem.cxx b/sfx2/source/control/srchitem.cxx
new file mode 100644
index 000000000000..b9ce85cd593a
--- /dev/null
+++ b/sfx2/source/control/srchitem.cxx
@@ -0,0 +1,306 @@
+/*************************************************************************
+ *
+ * $RCSfile: srchitem.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:29 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+// include ---------------------------------------------------------------
+
+#ifndef __SBX_SBXVARIABLE_HXX
+#include <svtools/sbxvar.hxx>
+#endif
+
+#ifndef _COM_SUN_STAR_UTIL_XREPLACEABLE_HPP_
+#include <com/sun/star/util/XReplaceable.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UTIL_XSEARCHABLE_HPP_
+#include <com/sun/star/util/XSearchable.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UTIL_XSEARCHDESCRIPTOR_HPP_
+#include <com/sun/star/util/XSearchDescriptor.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UTIL_XPROPERTYREPLACE_HPP_
+#include <com/sun/star/util/XPropertyReplace.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UTIL_XREPLACEDESCRIPTOR_HPP_
+#include <com/sun/star/util/XReplaceDescriptor.hpp>
+#endif
+#include <svtools/memberid.hrc>
+//ASDBG #include <usr/uno.hxx>
+
+#pragma hdrstop
+
+#define _SVX_SRCHITEM_CXX
+
+#include "sfxsids.hrc"
+#define ITEMID_SEARCH SID_SEARCH_ITEM
+#include "srchitem.hxx"
+
+#include <sfxuno.hxx>
+
+// STATIC DATA -----------------------------------------------------------
+
+TYPEINIT1_AUTOFACTORY(SvxSearchItem, SfxPoolItem);
+
+// -----------------------------------------------------------------------
+
+SvxSearchItem::SvxSearchItem( const sal_uInt16 nId ) :
+
+ SfxPoolItem( nId ),
+
+ nCommand ( 0 ),
+ aSearchString () ,
+ aReplaceString (),
+ bWordOnly ( sal_False ),
+ bExact ( sal_False ),
+ bBackward ( sal_False ),
+ bSelection ( sal_False ),
+ bRegExp ( sal_False ),
+ bPattern ( sal_False ),
+ bContent ( sal_False ),
+ eFamily ( SFX_STYLE_FAMILY_PARA ),
+ bRowDirection ( sal_True ),
+ bAllTables ( sal_False ),
+ nCellType ( SVX_SEARCHIN_FORMULA ),
+ nAppFlag ( SVX_SEARCHAPP_WRITER ),
+ bLevenshtein ( sal_False ),
+ bLEVRelaxed ( sal_True ),
+ nLEVOther ( 2 ),
+ nLEVShorter ( 2 ),
+ nLEVLonger ( 2 )
+{
+}
+
+// -----------------------------------------------------------------------
+
+SvxSearchItem::SvxSearchItem( const SvxSearchItem& rItem ) :
+
+ SfxPoolItem ( rItem ),
+
+ nCommand ( rItem.nCommand ),
+ aSearchString ( rItem.aSearchString ),
+ aReplaceString ( rItem.aReplaceString ),
+ bWordOnly ( rItem.bWordOnly ),
+ bExact ( rItem.bExact ),
+ bBackward ( rItem.bBackward ),
+ bSelection ( rItem.bSelection ),
+ bRegExp ( rItem.bRegExp ),
+ bPattern ( rItem.bPattern ),
+ bContent ( rItem.bContent ),
+ eFamily ( rItem.eFamily ),
+ bRowDirection ( rItem.bRowDirection ),
+ bAllTables ( rItem.bAllTables ),
+ nCellType ( rItem.nCellType ),
+ nAppFlag ( rItem.nAppFlag ),
+ bLevenshtein ( rItem.bLevenshtein ),
+ bLEVRelaxed ( rItem.bLEVRelaxed ),
+ nLEVOther ( rItem.nLEVOther ),
+ nLEVShorter ( rItem.nLEVShorter ),
+ nLEVLonger ( rItem.nLEVLonger )
+{
+}
+
+// -----------------------------------------------------------------------
+
+int SvxSearchItem::operator==( const SfxPoolItem& rItem ) const
+{
+ DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal which or type" );
+
+ return ( nCommand == ( (SvxSearchItem&)rItem ).nCommand ) &&
+ ( aSearchString == ( (SvxSearchItem&)rItem ).aSearchString ) &&
+ ( aReplaceString == ( (SvxSearchItem&)rItem ).aReplaceString ) &&
+ ( bWordOnly == ( (SvxSearchItem&)rItem ).bWordOnly ) &&
+ ( bExact == ( (SvxSearchItem&)rItem ).bExact ) &&
+ ( bBackward == ( (SvxSearchItem&)rItem ).bBackward ) &&
+ ( bSelection == ( (SvxSearchItem&)rItem ).bSelection ) &&
+ ( bRegExp == ( (SvxSearchItem&)rItem ).bRegExp ) &&
+ ( bPattern == ( (SvxSearchItem&)rItem ).bPattern ) &&
+ ( bContent == ( (SvxSearchItem&)rItem ).bContent ) &&
+ ( eFamily == ( (SvxSearchItem&)rItem ).eFamily ) &&
+ ( bRowDirection == ( (SvxSearchItem&)rItem ).bRowDirection ) &&
+ ( bAllTables == ( (SvxSearchItem&)rItem ).bAllTables ) &&
+ ( nCellType == ( (SvxSearchItem&)rItem ).nCellType ) &&
+ ( nAppFlag == ( (SvxSearchItem&)rItem ).nAppFlag ) &&
+ ( bLevenshtein == ( (SvxSearchItem&)rItem ).bLevenshtein ) &&
+ ( bLEVRelaxed == ( (SvxSearchItem&)rItem ).bLEVRelaxed ) &&
+ ( nLEVOther == ( (SvxSearchItem&)rItem ).nLEVOther ) &&
+ ( nLEVShorter == ( (SvxSearchItem&)rItem ).nLEVShorter ) &&
+ ( nLEVLonger == ( (SvxSearchItem&)rItem ).nLEVLonger );
+}
+
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation SvxSearchItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText,
+ const International *
+) const
+{
+/*
+ switch ( ePres )
+ {
+ case SFX_ITEM_PRESENTATION_NONE:
+ rText.Erase();
+ return SFX_ITEM_PRESENTATION_NONE;
+ case SFX_ITEM_PRESENTATION_NAMELESS:
+ case SFX_ITEM_PRESENTATION_COMPLETE:
+ {
+ rText = SVX_RESSTR(RID_SVXITEMS_SEARCHCMD_BEGIN + nCommand);
+ rText += cpDelim;
+ rText += aSearchString;
+ rText += cpDelim;
+ rText += aReplaceString;
+ rText += cpDelim;
+ rText += ::GetBoolString( bWordOnly );
+ rText += cpDelim;
+ rText += ::GetBoolString( bExact );
+ rText += cpDelim;
+ rText += ::GetBoolString( bBackward );
+ rText += cpDelim;
+ rText += ::GetBoolString( bSelection );
+ rText += cpDelim;
+ rText += ::GetBoolString( bRegExp );
+ rText += cpDelim;
+ rText += ::GetBoolString( bPattern );
+ rText += cpDelim;
+ rText += ::GetBoolString( bContent );
+ rText += cpDelim;
+ rText += SVX_RESSTR(RID_SVXITEMS_SEARCHSTYLE_BEGIN + (sal_uInt16)eFamily );
+ rText += cpDelim;
+ rText += ::GetBoolString( bRowDirection );
+ rText += cpDelim;
+ rText += ::GetBoolString( bAllTables );
+ rText += cpDelim;
+ rText += SVX_RESSTR(RID_SVXITEMS_SEARCHIN_BEGIN + nCellType);
+ rText += cpDelim;
+ rText += SVX_RESSTR(RID_SVXITEMS_SEARCHAPP_BEGIN + nAppFlag);
+ return ePres;
+ }
+ }
+ */
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+void SvxSearchItem::GetFromDescriptor( const ::com::sun::star::uno::Reference< ::com::sun::star::util::XSearchDescriptor >& rDescr )
+{
+ SetSearchString( rDescr->getSearchString() );
+ ::com::sun::star::uno::Any aAny = rDescr->getPropertyValue( DEFINE_CONST_UNICODE("SearchWords") );
+ sal_Bool bTemp ;
+ aAny >>= bTemp ;
+ SetWordOnly( bTemp );
+ aAny = rDescr->getPropertyValue( DEFINE_CONST_UNICODE("SearchCaseSensitive") );
+ aAny >>= bTemp ;
+ SetExact( bTemp );
+ aAny = rDescr->getPropertyValue( DEFINE_CONST_UNICODE("SearchBackwards") );
+ aAny >>= bTemp ;
+ SetBackward( bTemp );
+ aAny = rDescr->getPropertyValue( DEFINE_CONST_UNICODE("SearchInSelection") );
+ aAny >>= bTemp ;
+ SetSelection( bTemp );
+ aAny = rDescr->getPropertyValue( DEFINE_CONST_UNICODE("SearchRegularExpression") );
+ aAny >>= bTemp ;
+ SetRegExp( bTemp );
+ aAny = rDescr->getPropertyValue( DEFINE_CONST_UNICODE("SearchSimilarity") );
+ aAny >>= bTemp ;
+ SetLevenshtein( bTemp );
+ aAny = rDescr->getPropertyValue( DEFINE_CONST_UNICODE("SearchSimilarityRelax") );
+ aAny >>= bTemp ;
+ SetLEVRelaxed( bTemp );
+ aAny = rDescr->getPropertyValue( DEFINE_CONST_UNICODE("SearchSimilarityExchange") );
+ sal_Int16 nTemp ;
+ aAny >>= nTemp ;
+ SetLEVOther( nTemp );
+ aAny = rDescr->getPropertyValue( DEFINE_CONST_UNICODE("SearchSimilarityRemove") );
+ aAny >>= nTemp ;
+ SetLEVShorter( nTemp );
+ aAny = rDescr->getPropertyValue( DEFINE_CONST_UNICODE("SearchSimilarityAdd") );
+ aAny >>= nTemp ;
+ SetLEVLonger( nTemp );
+}
+
+void SvxSearchItem::SetToDescriptor( ::com::sun::star::uno::Reference< ::com::sun::star::util::XSearchDescriptor > & rDescr )
+{
+ rDescr->setSearchString( GetSearchString() );
+ ::com::sun::star::uno::Any aAny;
+ aAny <<= GetWordOnly() ;
+ rDescr->setPropertyValue( DEFINE_CONST_UNICODE("SearchWords"), aAny );
+ aAny <<= GetExact() ;
+ rDescr->setPropertyValue( DEFINE_CONST_UNICODE("SearchCaseSensitive"), aAny );
+ aAny <<= GetBackward() ;
+ rDescr->setPropertyValue( DEFINE_CONST_UNICODE("SearchBackwards"), aAny );
+ aAny <<= GetSelection() ;
+ rDescr->setPropertyValue( DEFINE_CONST_UNICODE("SearchInSelection"), aAny );
+ aAny <<= GetRegExp() ;
+ rDescr->setPropertyValue( DEFINE_CONST_UNICODE("SearchRegularExpression"), aAny );
+ aAny <<= IsLevenshtein() ;
+ rDescr->setPropertyValue( DEFINE_CONST_UNICODE("SearchSimilarity"), aAny );
+ aAny <<= IsLEVRelaxed() ;
+ rDescr->setPropertyValue( DEFINE_CONST_UNICODE("SearchSimilarityRelax"), aAny );
+ aAny <<= GetLEVOther() ;
+ rDescr->setPropertyValue( DEFINE_CONST_UNICODE("SearchSimilarityExchange"), aAny );
+ aAny <<= GetLEVShorter() ;
+ rDescr->setPropertyValue( DEFINE_CONST_UNICODE("SearchSimilarityRemove"), aAny );
+ aAny <<= GetLEVLonger() ;
+ rDescr->setPropertyValue( DEFINE_CONST_UNICODE("SearchSimilarityAdd"), aAny );
+}
+
+
diff --git a/sfx2/source/control/statcach.cxx b/sfx2/source/control/statcach.cxx
new file mode 100644
index 000000000000..d563da2d0005
--- /dev/null
+++ b/sfx2/source/control/statcach.cxx
@@ -0,0 +1,577 @@
+/*************************************************************************
+ *
+ * $RCSfile: statcach.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:29 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include <string> // HACK: prevent conflict between STLPORT and Workshop headers
+
+#ifndef _COM_SUN_STAR_UTIL_XURLTRANSFORMER_HPP_
+#include <com/sun/star/util/XURLTransformer.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XCONTROLLER_HPP_
+#include <com/sun/star/frame/XController.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XFRAMEACTIONLISTENER_HPP_
+#include <com/sun/star/frame/XFrameActionListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XCOMPONENTLOADER_HPP_
+#include <com/sun/star/frame/XComponentLoader.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XFRAME_HPP_
+#include <com/sun/star/frame/XFrame.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_FRAMEACTIONEVENT_HPP_
+#include <com/sun/star/frame/FrameActionEvent.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_FRAMEACTION_HPP_
+#include <com/sun/star/frame/FrameAction.hpp>
+#endif
+#ifndef _CPPUHELPER_WEAK_HXX_
+#include <cppuhelper/weak.hxx>
+#endif
+#include <svtools/eitem.hxx>
+#include <svtools/intitem.hxx>
+#include <svtools/stritem.hxx>
+#include <unotools/processfactory.hxx>
+
+#pragma hdrstop
+
+#include "statcach.hxx"
+#include "msg.hxx"
+#include "ctrlitem.hxx"
+#include "dispatch.hxx"
+#include "sfxtypes.hxx"
+#include "sfxuno.hxx"
+#include "unoctitm.hxx"
+
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::util;
+
+//====================================================================
+
+DBG_NAME(SfxStateCache);
+DBG_NAME(SfxStateCacheSetState);
+
+SFX_IMPL_XINTERFACE_2( BindDispatch_Impl, OWeakObject, ::com::sun::star::frame::XStatusListener, ::com::sun::star::lang::XEventListener )
+SFX_IMPL_XTYPEPROVIDER_2( BindDispatch_Impl, ::com::sun::star::frame::XStatusListener, ::com::sun::star::lang::XEventListener )
+
+//-----------------------------------------------------------------------------
+BindDispatch_Impl::BindDispatch_Impl( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > & rDisp, const ::com::sun::star::util::URL& rURL, SfxStateCache *pStateCache )
+ : xDisp( rDisp )
+ , aURL( rURL )
+ , pCache( pStateCache )
+{
+ aStatus.IsEnabled = sal_True;
+}
+
+void SAL_CALL BindDispatch_Impl::disposing( const ::com::sun::star::lang::EventObject& rEvent ) throw( ::com::sun::star::uno::RuntimeException )
+{
+ if ( xDisp.is() )
+ {
+ xDisp->removeStatusListener( (::com::sun::star::frame::XStatusListener*) this, ::com::sun::star::util::URL() );
+ xDisp = ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > ();
+ }
+}
+
+void SAL_CALL BindDispatch_Impl::statusChanged( const ::com::sun::star::frame::FeatureStateEvent& rEvent ) throw( ::com::sun::star::uno::RuntimeException )
+{
+ aStatus = rEvent;
+ if ( !pCache )
+ return;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener > xRef( (::cppu::OWeakObject*)this, ::com::sun::star::uno::UNO_QUERY );
+ if ( aStatus.Requery )
+ pCache->Invalidate( sal_True );
+ else
+ {
+ pCache->Invalidate( sal_False );
+ if ( !aStatus.IsEnabled )
+ pCache->SetState_Impl( SFX_ITEM_DISABLED, NULL );
+ else
+ {
+ sal_uInt16 nId = pCache->GetId();
+ SfxItemState eState = SFX_ITEM_AVAILABLE;
+ SfxPoolItem *pItem=NULL;
+ ::com::sun::star::uno::Any aAny = aStatus.State;
+ ::com::sun::star::uno::Type pType = aAny.getValueType();
+
+ if ( pType == ::getBooleanCppuType() )
+ {
+ sal_Bool bTemp ;
+ aAny >>= bTemp ;
+ pItem = new SfxBoolItem( nId, bTemp );
+ }
+ else if ( pType == ::getCppuType((const sal_uInt16*)0) )
+ {
+ sal_uInt16 nTemp ;
+ aAny >>= nTemp ;
+ pItem = new SfxUInt16Item( nId, nTemp );
+ }
+ else if ( pType == ::getCppuType((const sal_uInt32*)0) )
+ {
+ sal_uInt32 nTemp ;
+ aAny >>= nTemp ;
+ pItem = new SfxUInt32Item( nId, nTemp );
+ }
+ else if ( pType == ::getCppuType((const ::rtl::OUString*)0) )
+ {
+ ::rtl::OUString sTemp ;
+ aAny >>= sTemp ;
+ pItem = new SfxStringItem( nId, sTemp );
+ }
+ else
+ pItem = new SfxVoidItem( nId );
+ pCache->SetState_Impl( eState, pItem );
+ delete pItem;
+ }
+ }
+}
+
+void BindDispatch_Impl::Release()
+{
+ if ( xDisp.is() )
+ {
+ xDisp->removeStatusListener( (::com::sun::star::frame::XStatusListener*) this, ::com::sun::star::util::URL() );
+ xDisp = ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > ();
+ }
+
+ pCache = NULL;
+ release();
+}
+
+const ::com::sun::star::frame::FeatureStateEvent& BindDispatch_Impl::GetStatus() const
+{
+ return aStatus;
+}
+
+void BindDispatch_Impl::Dispatch( sal_Bool bForceSynchron )
+{
+ if ( xDisp.is() && aStatus.IsEnabled )
+ if ( bForceSynchron )
+ {
+ ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue > aProps(1);
+ aProps.getArray()[0].Name = DEFINE_CONST_UNICODE("SynchronMode");
+ aProps.getArray()[0].Value <<= sal_True ;
+ xDisp->dispatch( aURL, aProps );
+ }
+ else
+ xDisp->dispatch( aURL, ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >() );
+}
+
+//--------------------------------------------------------------------
+
+/* Dieser Konstruktor fuer einen ungueltigen Cache, der sich also
+ bei der ersten Anfrage zun"achst updated.
+ */
+
+SfxStateCache::SfxStateCache( sal_uInt16 nFuncId ):
+ nId(nFuncId),
+ pController(0),
+ pLastItem( 0 ),
+ eLastState( 0 ),
+ pDispatch( 0 )
+{
+ DBG_MEMTEST();
+ DBG_CTOR(SfxStateCache, 0);
+ bCtrlDirty = sal_True;
+ bSlotDirty = sal_True;
+ bItemDirty = sal_True;
+}
+
+//--------------------------------------------------------------------
+
+/* Der Destruktor pr"uft per Assertion, ob noch Controller angemeldet
+ sind.
+ */
+
+SfxStateCache::~SfxStateCache()
+{
+ DBG_MEMTEST();
+ DBG_DTOR(SfxStateCache, 0);
+ DBG_ASSERT( pController == 0, "es sind noch Controller angemeldet" );
+ if ( !IsInvalidItem(pLastItem) )
+ delete pLastItem;
+ if ( pDispatch )
+ {
+ pDispatch->Release();
+ pDispatch = NULL;
+ }
+}
+
+//--------------------------------------------------------------------
+// invalidates the cache (next request will force update)
+void SfxStateCache::Invalidate( sal_Bool bWithMsg )
+{
+ bCtrlDirty = sal_True;
+ if ( bWithMsg )
+ {
+ bSlotDirty = sal_True;
+ aSlotServ.SetSlot( 0 );
+ if ( pDispatch )
+ {
+ pDispatch->Release();
+ pDispatch = NULL;
+ }
+ }
+}
+
+//--------------------------------------------------------------------
+
+// gets the corresponding function from the dispatcher or the cache
+
+const SfxSlotServer* SfxStateCache::GetSlotServer( SfxDispatcher &rDispat , const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > & xProv )
+{
+ DBG_MEMTEST();
+ DBG_CHKTHIS(SfxStateCache, 0);
+
+ if ( bSlotDirty )
+ {
+ if ( xProv.is() )
+ {
+ DBG_ASSERT( !pDispatch, "Altes Dispatch nicht entfernt!" );
+
+//(mba)/compview
+ const SfxSlot* pSlot = 0;//SfxComponentViewShell::GetUnoSlot( nId );
+ ::com::sun::star::util::URL aURL;
+ String aName( pSlot ? String::CreateFromAscii(pSlot->GetUnoName()) : String() );
+ String aCmd;
+ if ( aName.Len() )
+ {
+ aCmd = DEFINE_CONST_UNICODE(".uno:");
+ aCmd += aName;
+ }
+ else
+ {
+ aCmd = DEFINE_CONST_UNICODE("slot:");
+ aCmd += String::CreateFromInt32( nId );
+ }
+
+ aURL.Complete = aCmd;
+ Reference < XURLTransformer > xTrans( ::utl::getProcessServiceFactory()->createInstance( rtl::OUString::createFromAscii("com.sun.star.util.URLTransformer" )), UNO_QUERY );
+ xTrans->parseStrict( aURL );
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > xDisp = xProv->queryDispatch( aURL, ::rtl::OUString(), 0 );
+ if ( xDisp.is() )
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XUnoTunnel > xTunnel( xDisp, ::com::sun::star::uno::UNO_QUERY );
+ SfxOfficeDispatch* pDisp = NULL;
+ if ( xTunnel.is() )
+ {
+ sal_Int64 nImplementation = xTunnel->getSomething(SfxOfficeDispatch::impl_getStaticIdentifier());
+ pDisp = (SfxOfficeDispatch*)(nImplementation);
+ }
+
+ if ( pDisp )
+ {
+ // The intercepting object is a SFX component
+ // Get the shell that is the slotserver of this component
+ SfxDispatcher *pDispatcher = pDisp->GetDispatcher_Impl();
+ pDispatcher->_FindServer( nId, aSlotServ, sal_False );
+ SfxShell* pShell = pDispatcher->GetShell( aSlotServ.GetShellLevel() );
+
+ // Check if this shell is active on the active dispatcher
+ sal_uInt16 nLevel = rDispat.GetShellLevel( *pShell );
+ if ( nLevel != USHRT_MAX )
+ {
+ // so we can use this shell direct without StarONE connection
+ aSlotServ.SetShellLevel( nLevel );
+ bSlotDirty = sal_False;
+ bCtrlDirty = sal_True;
+
+ //MI: wozu das? bItemDirty = sal_True;
+ return aSlotServ.GetSlot()? &aSlotServ: 0;
+ }
+ else
+ {
+ pDispatch = new BindDispatch_Impl( xDisp, aURL, this );
+ pDispatch->acquire();
+
+ // flags must be set before adding StatusListener because the dispatch object will set the state
+ bSlotDirty = sal_False;
+ bCtrlDirty = sal_True;
+ xDisp->addStatusListener( pDispatch, aURL );
+ aSlotServ.SetSlot(0);
+ return NULL;
+ }
+ }
+ else
+ {
+ pDispatch = new BindDispatch_Impl( xDisp, aURL, this );
+ pDispatch->acquire();
+
+ // flags must be set before adding StatusListener because the dispatch object will set the state
+ bSlotDirty = sal_False;
+ bCtrlDirty = sal_True;
+ xDisp->addStatusListener( pDispatch, aURL );
+ aSlotServ.SetSlot(0);
+ return NULL;
+ }
+ }
+ }
+
+// if ( !rDispat._TryIntercept_Impl( nId, aSlotServ, sal_False ) )
+ rDispat._FindServer(nId, aSlotServ, sal_False);
+ bSlotDirty = sal_False;
+ bCtrlDirty = sal_True;
+ //MI: wozu das? bItemDirty = sal_True;
+ }
+
+ return aSlotServ.GetSlot()? &aSlotServ: 0;
+}
+
+
+//--------------------------------------------------------------------
+
+// Status setzen in allen Controllern
+
+void SfxStateCache::SetState
+(
+ SfxItemState eState, // <SfxItemState> von 'pState'
+ const SfxPoolItem* pState // Status des Slots, ggf. 0 oder -1
+)
+
+/* [Beschreibung]
+
+ Diese Methode verteilt die Status auf alle an dieser SID gebundenen
+ <SfxControllerItem>s. Ist der Wert derselbe wie zuvor und wurde in-
+ zwischen weder ein Controller angemeldet, noch ein Controller invalidiert,
+ dann wird kein Wert weitergeleitet. Dadurch wird z.B. Flackern in
+ ListBoxen vermieden.
+*/
+
+{
+ if ( pDispatch )
+ return;
+ SetState_Impl( eState, pState );
+}
+
+
+void SfxStateCache::SetState_Impl
+(
+ SfxItemState eState, // <SfxItemState> von 'pState'
+ const SfxPoolItem* pState // Status des Slots, ggf. 0 oder -1
+)
+{
+ DBG_MEMTEST();
+ DBG_CHKTHIS(SfxStateCache, 0);
+
+ // wenn zwischen Enter- und LeaveRegistrations ein hartes Update kommt
+ // k"onnen zwischenzeitlich auch Cached ohne Controller exisitieren
+ if ( !pController )
+ return;
+
+ DBG_ASSERT( pController->GetId()==nId, "Cache mit falschem ControllerItem" );
+ DBG_ASSERT( !bSlotDirty, "setting state of dirty message" );
+ DBG_ASSERT( bCtrlDirty ||
+ ( aSlotServ.GetSlot() && aSlotServ.GetSlot()->IsMode(SFX_SLOT_VOLATILE) ),
+ "setting state of non dirty controller" );
+ DBG_ASSERT( SfxControllerItem::GetItemState(pState) == eState,
+ "invalid SfxItemState" );
+ DBG_PROFSTART(SfxStateCacheSetState);
+
+ // m"ussen die Controller "uberhaupt benachrichtigt werden?
+ FASTBOOL bNotify = bItemDirty;
+ if ( !bItemDirty )
+ {
+ FASTBOOL bBothAvailable = pLastItem && pState &&
+ !IsInvalidItem(pState) && !IsInvalidItem(pLastItem);
+ DBG_ASSERT( !bBothAvailable || pState != pLastItem, "setting state with own item" );
+ if ( bBothAvailable )
+ bNotify = pState->Type() != pLastItem->Type() ||
+ *pState != *pLastItem;
+ else
+ bNotify = ( pState != pLastItem ) || ( eState != eLastState );
+ }
+
+ if ( bNotify )
+ {
+ // Controller updaten
+ for ( SfxControllerItem *pCtrl = pController;
+ pCtrl;
+ pCtrl = pCtrl->GetItemLink() )
+ pCtrl->StateChanged( nId, eState, pState );
+
+ // neuen Wert merken
+ if ( !IsInvalidItem(pLastItem) )
+ DELETEZ(pLastItem);
+ if ( pState && !IsInvalidItem(pState) )
+ pLastItem = pState->Clone();
+ else
+ pLastItem = 0;
+ eLastState = eState;
+ bItemDirty = sal_False;
+ }
+
+ bCtrlDirty = sal_False;
+ DBG_PROFSTOP(SfxStateCacheSetState);
+}
+
+
+//--------------------------------------------------------------------
+
+// alten Status in allen Controllern nochmal setzen
+
+void SfxStateCache::SetCachedState()
+{
+ DBG_MEMTEST();
+ DBG_CHKTHIS(SfxStateCache, 0);
+ DBG_ASSERT( pController, "Cache ohne ControllerItem" );
+ DBG_ASSERT( pController->GetId()==nId, "Cache mit falschem ControllerItem" );
+ DBG_PROFSTART(SfxStateCacheSetState);
+
+ // nur updaten wenn cached item vorhanden und auch verarbeitbar
+ // (Wenn der State gesendet wird, mu\s sichergestellt sein, da\s ein
+ // Slotserver vorhanden ist, s. SfxControllerItem::GetCoreMetric() )
+ if ( !bItemDirty && !bSlotDirty )
+ {
+ // Controller updaten
+ for ( SfxControllerItem *pCtrl = pController;
+ pCtrl;
+ pCtrl = pCtrl->GetItemLink() )
+ pCtrl->StateChanged( nId, eLastState, pLastItem );
+
+ // Controller sind jetzt ok
+ bCtrlDirty = sal_True;
+ }
+
+ DBG_PROFSTOP(SfxStateCacheSetState);
+}
+
+
+//--------------------------------------------------------------------
+
+// FloatingWindows in allen Controls mit dieser Id zerstoeren
+
+void SfxStateCache::DeleteFloatingWindows()
+{
+ DBG_MEMTEST();
+ DBG_CHKTHIS(SfxStateCache, 0);
+
+ SfxControllerItem *pNextCtrl=0;
+ for ( SfxControllerItem *pCtrl=pController; pCtrl; pCtrl=pNextCtrl )
+ {
+ DBG_TRACE((ByteString("pCtrl: ").Append(ByteString::CreateFromInt32((sal_uInt32)pCtrl))).GetBuffer());
+ pNextCtrl = pCtrl->GetItemLink();
+ pCtrl->DeleteFloatingWindow();
+ }
+}
+
+sal_Bool SfxStateCache::UpdateDispatch( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > & xProv )
+{
+ if ( bSlotDirty && xProv.is() )
+ {
+ DBG_ASSERT( !pDispatch, "Altes Dispatch nicht entfernt!" );
+
+//(mba)/compview
+ const SfxSlot* pSlot = 0;//SfxComponentViewShell::GetUnoSlot( nId );
+ ::com::sun::star::util::URL aURL;
+ String aName( pSlot ? String::CreateFromAscii(pSlot->GetUnoName()) : String() );
+ String aCmd;
+ if ( aName.Len() )
+ {
+ aCmd = DEFINE_CONST_UNICODE(".uno:");
+ aCmd += aName;
+ }
+ else
+ {
+ aCmd = DEFINE_CONST_UNICODE("slot:");
+ aCmd += String::CreateFromInt32( nId );
+ }
+
+ aURL.Complete = aCmd;
+ Reference < XURLTransformer > xTrans( ::utl::getProcessServiceFactory()->createInstance( rtl::OUString::createFromAscii("com.sun.star.util.URLTransformer" )), UNO_QUERY );
+ xTrans->parseStrict( aURL );
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > xDisp = xProv->queryDispatch( aURL, ::rtl::OUString(), 0 );
+ if ( xDisp.is() )
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XUnoTunnel > xTunnel( xDisp, ::com::sun::star::uno::UNO_QUERY );
+ SfxOfficeDispatch* pDisp = NULL;
+ if ( xTunnel.is() )
+ {
+ sal_Int64 nImplementation = xTunnel->getSomething(SfxOfficeDispatch::impl_getStaticIdentifier());
+ pDisp = (SfxOfficeDispatch*)(nImplementation);
+ }
+
+ if ( pDisp && !pDisp->IsInterceptDispatch() )
+ return sal_False;
+ pDispatch = new BindDispatch_Impl( xDisp, aURL, this );
+ pDispatch->acquire();
+ bSlotDirty = sal_False;
+ bCtrlDirty = sal_True;
+ xDisp->addStatusListener( pDispatch, aURL );
+ aSlotServ.SetSlot(0);
+ }
+ }
+
+ return ( pDispatch != NULL );
+}
+
+::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > SfxStateCache::GetDispatch() const
+{
+ if ( pDispatch )
+ return pDispatch->xDisp;
+ return ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > ();
+}
+
+void SfxStateCache::Dispatch( sal_Bool bForceSynchron )
+{
+ if ( pDispatch )
+ pDispatch->Dispatch( bForceSynchron );
+}
+
+
diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
new file mode 100644
index 000000000000..ff821be8732f
--- /dev/null
+++ b/sfx2/source/control/unoctitm.cxx
@@ -0,0 +1,560 @@
+/*************************************************************************
+ *
+ * $RCSfile: unoctitm.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:29 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include <tools/debug.hxx>
+
+#ifndef _SFXENUMITEM_HXX //autogen
+#include <svtools/eitem.hxx>
+#endif
+#ifndef _SFXSTRITEM_HXX //autogen
+#include <svtools/stritem.hxx>
+#endif
+#include <svtools/intitem.hxx>
+#include <svtools/itemset.hxx>
+
+#ifndef _COM_SUN_STAR_UTIL_XURLTRANSFORMER_HPP_
+#include <com/sun/star/util/XURLTransformer.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XCONTROLLER_HPP_
+#include <com/sun/star/frame/XController.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XFRAMEACTIONLISTENER_HPP_
+#include <com/sun/star/frame/XFrameActionListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XCOMPONENTLOADER_HPP_
+#include <com/sun/star/frame/XComponentLoader.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XFRAME_HPP_
+#include <com/sun/star/frame/XFrame.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_FRAMEACTIONEVENT_HPP_
+#include <com/sun/star/frame/FrameActionEvent.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_FRAMEACTION_HPP_
+#include <com/sun/star/frame/FrameAction.hpp>
+#endif
+#include <unotools/processfactory.hxx>
+
+#include "unoctitm.hxx"
+#include "viewfrm.hxx"
+#include "frame.hxx"
+#include "ctrlitem.hxx"
+#include "sfxuno.hxx"
+#include "bindings.hxx"
+#include "dispatch.hxx"
+#include "sfxsids.hrc"
+
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::util;
+//long nOfficeDispatchCount = 0;
+
+SFX_IMPL_XINTERFACE_2( SfxUnoControllerItem, OWeakObject, ::com::sun::star::frame::XStatusListener, ::com::sun::star::lang::XEventListener )
+SFX_IMPL_XTYPEPROVIDER_2( SfxUnoControllerItem, ::com::sun::star::frame::XStatusListener, ::com::sun::star::lang::XEventListener )
+
+SfxUnoControllerItem::SfxUnoControllerItem( SfxControllerItem *pItem, SfxBindings& rBind, const String& rCmd )
+ : pCtrlItem( pItem )
+ , pBindings( &rBind )
+{
+ DBG_ASSERT( !pCtrlItem || !pCtrlItem->IsBound(), "ControllerItem fehlerhaft!" );
+
+ aCommand.Complete = rCmd;
+ Reference < XURLTransformer > xTrans( ::utl::getProcessServiceFactory()->createInstance( rtl::OUString::createFromAscii("com.sun.star.util.URLTransformer" )), UNO_QUERY );
+ xTrans->parseStrict( aCommand );
+ pBindings->RegisterUnoController_Impl( this );
+}
+
+SfxUnoControllerItem::~SfxUnoControllerItem()
+{
+ // tell bindings to forget this controller ( if still connected )
+ if ( pBindings )
+ pBindings->ReleaseUnoController_Impl( this );
+}
+
+void SfxUnoControllerItem::UnBind()
+{
+ // connection to SfxControllerItem is lost
+ pCtrlItem = NULL;
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener > aRef( (::cppu::OWeakObject*)this, ::com::sun::star::uno::UNO_QUERY );
+ ReleaseDispatch();
+}
+
+void SAL_CALL SfxUnoControllerItem::statusChanged(const ::com::sun::star::frame::FeatureStateEvent& rEvent) throw ( ::com::sun::star::uno::RuntimeException )
+{
+ DBG_ASSERT( pCtrlItem, "Dispatch hat den StatusListener nicht entfern!" );
+
+ if ( rEvent.Requery )
+ {
+ // Fehler kann nur passieren, wenn das alte Dispatch fehlerhaft implementiert
+ // ist, also removeStatusListener nicht gefunzt hat. Aber sowas soll
+ // ja vorkommen ...
+ // Also besser vor ReleaseDispatch gegen Abflug sch"utzen!
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener > aRef( (::cppu::OWeakObject*)this, ::com::sun::star::uno::UNO_QUERY );
+ ReleaseDispatch();
+ if ( pCtrlItem )
+ GetNewDispatch(); // asynchron ??
+ }
+ else if ( pCtrlItem )
+ {
+ // pass new status to the SfxControllerItem
+ SfxItemState eState = SFX_ITEM_DISABLED;
+ SfxPoolItem* pItem = NULL;
+ if ( rEvent.IsEnabled )
+ {
+ eState = SFX_ITEM_AVAILABLE;
+ ::com::sun::star::uno::Type pType = rEvent.State.getValueType();
+
+ if ( pType == ::getBooleanCppuType() )
+ {
+ sal_Bool bTemp ;
+ rEvent.State >>= bTemp ;
+ pItem = new SfxBoolItem( pCtrlItem->GetId(), bTemp );
+ }
+ else if ( pType == ::getCppuType((const sal_uInt16*)0) )
+ {
+ sal_uInt16 nTemp ;
+ rEvent.State >>= nTemp ;
+ pItem = new SfxUInt16Item( pCtrlItem->GetId(), nTemp );
+ }
+ else if ( pType == ::getCppuType((const sal_uInt32*)0) )
+ {
+ sal_uInt32 nTemp ;
+ rEvent.State >>= nTemp ;
+ pItem = new SfxUInt32Item( pCtrlItem->GetId(), nTemp );
+ }
+ else if ( pType == ::getCppuType((const ::rtl::OUString*)0) )
+ {
+ ::rtl::OUString sTemp ;
+ rEvent.State >>= sTemp ;
+ pItem = new SfxStringItem( pCtrlItem->GetId(), sTemp );
+ }
+ else
+ pItem = new SfxVoidItem( pCtrlItem->GetId() );
+ }
+
+ pCtrlItem->StateChanged( pCtrlItem->GetId(), eState, pItem );
+ delete pItem;
+ }
+}
+
+void SAL_CALL SfxUnoControllerItem::disposing( const ::com::sun::star::lang::EventObject& rEvent ) throw ( ::com::sun::star::uno::RuntimeException )
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener > aRef( (::cppu::OWeakObject*)this, ::com::sun::star::uno::UNO_QUERY );
+ ReleaseDispatch();
+}
+
+void SfxUnoControllerItem::ReleaseDispatch()
+{
+ if ( xDispatch.is() )
+ {
+ xDispatch->removeStatusListener( (::com::sun::star::frame::XStatusListener*) this, aCommand );
+ xDispatch = ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > ();
+ }
+}
+
+void SfxUnoControllerItem::GetNewDispatch()
+{
+ if ( !pBindings )
+ {
+ // Bindings released
+ DBG_ERROR( "Tried to get dispatch, but no Bindings!" );
+ return;
+ }
+
+ // forget old dispatch
+ xDispatch = ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > ();
+
+ // no arms, no cookies !
+ if ( !pBindings->GetDispatcher_Impl() || !pBindings->GetDispatcher_Impl()->GetFrame() )
+ return;
+
+ SfxFrame *pFrame = pBindings->GetDispatcher_Impl()->GetFrame()->GetFrame();
+ SfxFrame *pParent = pFrame->GetParentFrame();
+ if ( pParent )
+ // parent may intercept
+ xDispatch = TryGetDispatch( pParent );
+
+ if ( !xDispatch.is() )
+ {
+ // no interception
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > xFrame = pFrame->GetFrameInterface();
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > xProv( xFrame, ::com::sun::star::uno::UNO_QUERY );
+ if ( xProv.is() )
+ xDispatch = xProv->queryDispatch( aCommand, ::rtl::OUString(), 0 );
+ }
+
+ if ( xDispatch.is() )
+ xDispatch->addStatusListener( (::com::sun::star::frame::XStatusListener*) this, aCommand );
+ else if ( pCtrlItem )
+ pCtrlItem->StateChanged( pCtrlItem->GetId(), SFX_ITEM_DISABLED, NULL );
+}
+
+::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > SfxUnoControllerItem::TryGetDispatch( SfxFrame *pFrame )
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > xDisp;
+ SfxFrame *pParent = pFrame->GetParentFrame();
+ if ( pParent )
+ // parent may intercept
+ xDisp = TryGetDispatch( pParent );
+
+ // only components may intercept
+ if ( !xDisp.is() && pFrame->HasComponent() )
+ {
+ // no interception
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > xFrame = pFrame->GetFrameInterface();
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > xProv( xFrame, ::com::sun::star::uno::UNO_QUERY );
+ if ( xProv.is() )
+ xDisp = xProv->queryDispatch( aCommand, ::rtl::OUString(), 0 );
+ }
+
+ return xDisp;
+}
+
+void SfxUnoControllerItem::Execute()
+{
+ // dispatch the resource
+ if ( xDispatch.is() )
+ xDispatch->dispatch( aCommand, ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >() );
+}
+
+void SfxUnoControllerItem::ReleaseBindings()
+{
+ // connection to binding is lost; so forget the binding and the dispatch
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener > aRef( (::cppu::OWeakObject*)this, ::com::sun::star::uno::UNO_QUERY );
+ ReleaseDispatch();
+ if ( pBindings )
+ pBindings->ReleaseUnoController_Impl( this );
+ pBindings = NULL;
+}
+
+void SfxStatusDispatcher::ReleaseAll()
+{
+ ::com::sun::star::lang::EventObject aObject;
+ aObject.Source = (::cppu::OWeakObject*) this;
+ aListeners.disposeAndClear( aObject );
+}
+
+void SAL_CALL SfxStatusDispatcher::dispatch( const ::com::sun::star::util::URL&, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& ) throw ( ::com::sun::star::uno::RuntimeException )
+{
+}
+
+SFX_IMPL_XINTERFACE_1( SfxStatusDispatcher, OWeakObject, ::com::sun::star::frame::XDispatch )
+SFX_IMPL_XTYPEPROVIDER_1( SfxStatusDispatcher, ::com::sun::star::frame::XDispatch )
+//IMPLNAME "com.sun.star.comp.sfx2.StatusDispatcher",
+
+SfxStatusDispatcher::SfxStatusDispatcher()
+ : aListeners( aMutex )
+{
+}
+
+void SAL_CALL SfxStatusDispatcher::addStatusListener(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener > & aListener, const ::com::sun::star::util::URL& aURL) throw ( ::com::sun::star::uno::RuntimeException )
+{
+ aListeners.addInterface( aURL.Complete, aListener );
+ if ( aURL.Complete.compareToAscii(".uno:LifeTime")==0 )
+ {
+ ::com::sun::star::frame::FeatureStateEvent aEvent;
+ aEvent.FeatureURL = aURL;
+ aEvent.Source = (::com::sun::star::frame::XDispatch*) this;
+ aEvent.IsEnabled = sal_True;
+ aEvent.Requery = sal_False;
+ aListener->statusChanged( aEvent );
+ }
+}
+
+void SAL_CALL SfxStatusDispatcher::removeStatusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener > & aListener, const ::com::sun::star::util::URL& aURL ) throw ( ::com::sun::star::uno::RuntimeException )
+{
+ aListeners.removeInterface( aURL.Complete, aListener );
+}
+
+SFX_IMPL_XINTERFACE_1( SfxOfficeDispatch, SfxStatusDispatcher, ::com::sun::star::lang::XUnoTunnel )
+SFX_IMPL_XTYPEPROVIDER_2( SfxOfficeDispatch, ::com::sun::star::frame::XDispatch, ::com::sun::star::lang::XUnoTunnel )
+
+
+//-------------------------------------------------------------------------
+// XUnoTunnel
+sal_Int64 SAL_CALL SfxOfficeDispatch::getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException)
+{
+ if ( aIdentifier == impl_getStaticIdentifier() )
+ return (sal_Int64)this;
+ else
+ return 0;
+}
+
+/* ASDBG
+void* SfxOfficeDispatch::getImplementation(Reflection *p)
+{
+ if( p == ::getCppuType((const SfxOfficeDispatch*)0) )
+ return this;
+ else
+ return ::cppu::OWeakObject::getImplementation(p);
+
+}
+
+Reflection* ::getCppuType((const SfxOfficeDispatch*)0)
+{
+ static StandardClassReflection aRefl(
+ 0,
+ createStandardClass(
+ "SfxOfficeDispatch", ::cppu::OWeakObject::get::cppu::OWeakObjectIdlClass(),
+ 1,
+ ::getCppuType((const ::com::sun::star::frame::XDispatch*)0) ) );
+ return &aRefl;
+}
+*/
+
+SfxOfficeDispatch::SfxOfficeDispatch( SfxBindings& rBindings, SfxDispatcher* pDispat, sal_uInt16 nSlotId, const ::com::sun::star::util::URL& rURL, sal_Bool bInter )
+ : bIntercept( bInter )
+{
+// nOfficeDispatchCount++;
+
+ // this object is an adapter that shows a ::com::sun::star::frame::XDispatch-Interface to the outside and uses a SfxControllerItem to monitor a state
+ pControllerItem = new SfxDispatchController_Impl( this, rBindings, pDispat, nSlotId, rURL, bInter );
+}
+
+SfxOfficeDispatch::~SfxOfficeDispatch()
+{
+// --nOfficeDispatchCount;
+
+ if ( pControllerItem )
+ {
+ // when dispatch object is released, destroy its connection to this object and destroy it
+ pControllerItem->UnBindController();
+ delete pControllerItem;
+ }
+}
+
+void SAL_CALL SfxOfficeDispatch::dispatch( const ::com::sun::star::util::URL& aURL, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArgs ) throw ( ::com::sun::star::uno::RuntimeException )
+{
+ // ControllerItem is the Impl class
+ if ( pControllerItem )
+ pControllerItem->dispatch( aURL, aArgs );
+}
+
+void SAL_CALL SfxOfficeDispatch::addStatusListener(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener > & aListener, const ::com::sun::star::util::URL& aURL) throw ( ::com::sun::star::uno::RuntimeException )
+{
+ GetListeners().addInterface( aURL.Complete, aListener );
+ if ( pControllerItem )
+ {
+ // ControllerItem is the Impl class
+ pControllerItem->addStatusListener( aListener, aURL );
+ }
+}
+
+SfxDispatcher* SfxOfficeDispatch::GetDispatcher_Impl()
+{
+ return pControllerItem->GetDispatcher();
+}
+
+SfxDispatchController_Impl::SfxDispatchController_Impl( SfxOfficeDispatch* pDisp, SfxBindings& rBindings, SfxDispatcher* pDispat, sal_uInt16 nSlotId, const ::com::sun::star::util::URL& rURL, sal_Bool bInter )
+ : pDispatch( pDisp )
+ , aDispatchURL( rURL )
+ , pBindings( &rBindings )
+ , pDispatcher( pDispat )
+ , pLastState( 0 )
+ , nSlot( nSlotId )
+{
+}
+
+SfxDispatchController_Impl::~SfxDispatchController_Impl()
+{
+ if ( pLastState && !IsInvalidItem( pLastState ) )
+ delete pLastState;
+
+ if ( pDispatch )
+ {
+ // disconnect
+ pDispatch->pControllerItem = NULL;
+
+ // force all listeners to release the dispatch object
+ ::com::sun::star::lang::EventObject aObject;
+ aObject.Source = (::cppu::OWeakObject*) pDispatch;
+ pDispatch->GetListeners().disposeAndClear( aObject );
+ }
+}
+
+void SfxDispatchController_Impl::UnBindController()
+{
+ pDispatch = NULL;
+ if ( IsBound() )
+ {
+ GetBindings().ENTERREGISTRATIONS();
+ SfxControllerItem::UnBind();
+ GetBindings().LEAVEREGISTRATIONS();
+ }
+}
+
+void SAL_CALL SfxDispatchController_Impl::dispatch( const ::com::sun::star::util::URL& aURL, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArgs ) throw ( ::com::sun::star::uno::RuntimeException )
+{
+ if ( pDispatch && aURL == aDispatchURL )
+ {
+ if ( !GetId() )
+ {
+ pBindings->ENTERREGISTRATIONS();
+ Bind( nSlot, pBindings );
+ pBindings->LEAVEREGISTRATIONS();
+ }
+
+ SfxAllItemSet aSet( SFX_APP()->GetPool() );
+ TransformParameters( GetId(), aArgs, aSet );
+ aSet.Put( SfxBoolItem( SID_INTERCEPTOR, sal_False ) );
+ if ( !pDispatcher )
+ pDispatcher = GetBindings().GetDispatcher_Impl();
+
+ SfxCallMode nCall = SFX_CALLMODE_SLOT;
+ sal_uInt16 nCount = aArgs.getLength();
+ const ::com::sun::star::beans::PropertyValue* pPropsVal = aArgs.getConstArray();
+ for ( sal_uInt16 n=0; n<nCount; n++ )
+ {
+ const ::com::sun::star::beans::PropertyValue& rProp = pPropsVal[n];
+ String aName = rProp.Name;
+ sal_Bool bTemp ;
+ if ( aName.EqualsAscii("SynchronMode") && (rProp.Value >>= bTemp) )
+ {
+ nCall = SFX_CALLMODE_SYNCHRON;
+ break;
+ }
+ }
+ pDispatcher->Execute( GetId(), nCall, aSet );
+ }
+}
+
+SfxDispatcher* SfxDispatchController_Impl::GetDispatcher()
+{
+ if ( !pDispatcher )
+ pDispatcher = GetBindings().GetDispatcher_Impl();
+ return pDispatcher;
+}
+
+void SAL_CALL SfxDispatchController_Impl::addStatusListener(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener > & aListener, const ::com::sun::star::util::URL& aURL) throw ( ::com::sun::star::uno::RuntimeException )
+{
+ if ( !pDispatch )
+ return;
+
+ if ( !GetId() )
+ {
+ pBindings->ENTERREGISTRATIONS();
+ Bind( nSlot, pBindings );
+ pBindings->LEAVEREGISTRATIONS();
+ }
+
+ const SfxPoolItem *pItem = 0;
+ if ( !pDispatcher )
+ pDispatcher = GetBindings().GetDispatcher_Impl();
+ SfxItemState eState = pDispatcher->QueryState( GetId(), pItem );
+ ::com::sun::star::uno::Any aState;
+ if ( pItem )
+ pItem->QueryValue( aState );
+
+ ::com::sun::star::frame::FeatureStateEvent aEvent;
+ aEvent.FeatureURL = aURL;
+ aEvent.Source = (::com::sun::star::frame::XDispatch*) pDispatch;
+ aEvent.IsEnabled = eState != SFX_ITEM_DISABLED;
+ aEvent.Requery = sal_False;
+ aEvent.State = aState;
+
+ aListener->statusChanged( aEvent );
+}
+
+void SfxDispatchController_Impl::StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState )
+{
+ if ( !pDispatch )
+ return;
+
+ if ( pDispatch->IsInterceptDispatch() )
+ {
+ // If this Controller is made for an interception, the state can't be set from outside
+ // because this would be the state of the interceptor itself!
+ if ( !pDispatcher )
+ pDispatcher = GetBindings().GetDispatcher_Impl();
+ eState = pDispatcher->QueryState( GetId(), pState );
+ }
+
+ // Bindings instance notifies controller about a state change, listeners must be notified also
+ sal_Bool bNotify = sal_True;
+ sal_Bool bBothAvailable = pLastState && pState && !IsInvalidItem(pLastState) && !IsInvalidItem(pState);
+ if ( bBothAvailable )
+ bNotify = pState->Type() != pLastState->Type() || *pState != *pLastState;
+ else
+ bNotify = ( pLastState != pState );
+ if ( pLastState && !IsInvalidItem( pLastState ) )
+ delete pLastState;
+ pLastState = ( pState && !IsInvalidItem(pState) ) ? pState->Clone() : pState;
+
+ ::cppu::OInterfaceContainerHelper* pContnr = pDispatch->GetListeners().getContainer ( aDispatchURL.Complete );
+ if ( bNotify && pContnr )
+ {
+ ::com::sun::star::uno::Any aState;
+ if ( pState )
+ pState->QueryValue( aState );
+
+ ::com::sun::star::frame::FeatureStateEvent aEvent;
+ aEvent.FeatureURL = aDispatchURL;
+ aEvent.Source = (::com::sun::star::frame::XDispatch*) pDispatch;
+ aEvent.IsEnabled = eState != SFX_ITEM_DISABLED;
+ aEvent.Requery = sal_False;
+ aEvent.State = aState;
+
+ ::cppu::OInterfaceIteratorHelper aIt( *pContnr );
+ while( aIt.hasMoreElements() )
+ ((::com::sun::star::frame::XStatusListener *)aIt.next())->statusChanged( aEvent );
+ }
+}
+
+
diff --git a/sfx2/source/dialog/about.cxx b/sfx2/source/dialog/about.cxx
new file mode 100644
index 000000000000..2758566f914b
--- /dev/null
+++ b/sfx2/source/dialog/about.cxx
@@ -0,0 +1,421 @@
+/*************************************************************************
+ *
+ * $RCSfile: about.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:30 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+// include ---------------------------------------------------------------
+
+#ifndef _SV_APP_HXX
+#include <vcl/svapp.hxx>
+#endif
+#ifndef _MSGBOX_HXX //autogen
+#include <vcl/msgbox.hxx>
+#endif
+#ifndef _LIBCALL_HXX //autogen
+#include <svtools/libcall.hxx>
+#endif
+#ifndef _SVTDEMO_HXX //autogen
+#include <svtools/svtdemo.hxx>
+#endif
+#ifndef _PVER_HXX //autogen
+#include <svtools/pver.hxx>
+#endif
+#pragma hdrstop
+
+#include "about.hxx"
+#include "sfxresid.hxx"
+#include "sfxdefs.hxx"
+#include "app.hxx"
+#include "inimgr.hxx"
+
+#include "dialog.hrc"
+
+// defines ---------------------------------------------------------------
+
+#define SCROLL_OFFSET ((long)2)
+#define SPACE_OFFSET ((long)5)
+
+typedef unsigned short (*fncUshort)();
+typedef const char* (*fncChar)();
+
+// functions -------------------------------------------------------------
+
+long CalcTextRows_Impl( const FixedText& rCtrl, long nTextWidth )
+{
+ long nRows = 0;
+ String aText = rCtrl.GetText();
+ while ( aText.Len() > 0 )
+ {
+ USHORT nBreakPos = rCtrl.GetTextBreak( aText, nTextWidth );
+ USHORT nNewLinePos = aText.Search( '\n' );
+ if ( nNewLinePos < nBreakPos )
+ {
+ USHORT nCutLen = nNewLinePos + 1;
+ nRows++;
+ if ( aText.GetChar( nNewLinePos + 1 ) == '\n' )
+ {
+ nCutLen++;
+ nRows++;
+ }
+ aText = aText.Erase( 0, nCutLen );
+ }
+ else
+ {
+ nRows++;
+ if ( nBreakPos != STRING_NOTFOUND )
+ {
+ // search for word break
+ while ( aText.GetChar( nBreakPos ) != ' ' && nBreakPos > 0 )
+ nBreakPos--;
+ aText = aText.Erase( 0, nBreakPos + 1 );
+ }
+ else
+ break;
+ }
+ }
+
+ return nRows;
+}
+
+// class AboutDialog -----------------------------------------------------
+
+AboutDialog::AboutDialog( Window* pParent, const ResId& rId, const String& rVerStr ) :
+
+ SfxModalDialog ( pParent, rId ),
+
+ aOKButton ( this, ResId( ABOUT_BTN_OK ) ),
+ aAppLogo ( ResId( ABOUT_BMP_LOGO ) ),
+ aVersionText ( this, ResId( ABOUT_FTXT_VERSION ) ),
+ aCopyrightText ( this, ResId( ABOUT_FTXT_COPYRIGHT ) ),
+ aDeveloperAry ( ResId( ABOUT_STR_DEVELOPER_ARY ) ),
+ aDevVersionStr ( rVerStr ),
+ aAccelStr ( ResId( ABOUT_STR_ACCEL ) ),
+
+ aTimer (),
+ nOff ( 0 ),
+ nEnd ( 0 ),
+ bNormal ( TRUE )
+
+{
+ SfxIniManager* pIniMgr = SFX_INIMANAGER();
+
+ // Transparenter Font
+ Font aFont = GetFont();
+ aFont.SetTransparent( TRUE );
+ SetFont( aFont );
+
+ // ggf. Spezial Version
+ String aStr = aVersionText.GetText();
+ String aMinor;
+ USHORT nDemo = SvDemo::GetDemoKind( Application::GetAppName() );
+ USHORT nProductVersion = ProductVersion::GetVersion().ToInt32();
+ String aVersion( String::CreateFromInt32( nProductVersion / 10 ) );
+ aVersion += 0x002E ; // 2Eh ^= '.'
+ aVersion += ( String::CreateFromInt32( nProductVersion % 10 ) );
+ String aOfficeVer = aVersion;
+ aStr.SearchAndReplaceAscii( "$(VER)", aOfficeVer );
+ aVersionText.SetText( aStr );
+
+ // Initialisierung fuer Aufruf Entwickler
+ if ( aAccelStr.Len() && ByteString(U2S(aAccelStr)).IsAlphaAscii() )
+ {
+ Accelerator *pAccel = 0, *pPrevAccel = 0, *pFirstAccel = 0;
+ aAccelStr.ToUpperAscii();
+
+ for ( USHORT i = 0; i < aAccelStr.Len(); ++i )
+ {
+ pPrevAccel = pAccel;
+ pAccel = new Accelerator;
+ aAccelList.Insert( pAccel, LIST_APPEND );
+ USHORT nKey = aAccelStr.GetChar(i) - 'A' + KEY_A;
+ pAccel->InsertItem( 1, KeyCode( nKey, KEY_MOD1 ) );
+ if ( i > 0 )
+ pPrevAccel->SetAccel( 1, pAccel );
+ if ( i == 0 )
+ pFirstAccel = pAccel;
+ }
+ pAccel->SetSelectHdl( LINK( this, AboutDialog, AccelSelectHdl ) );
+ GetpApp()->InsertAccel( pFirstAccel );
+ }
+
+ // Hintergrund-Farbe Weiss
+ Color aWhiteCol( COL_WHITE );
+ Wallpaper aWall( aWhiteCol );
+ SetBackground( aWall );
+ Font aNewFont( aCopyrightText.GetFont() );
+ aNewFont.SetTransparent( TRUE );
+
+ aVersionText.SetFont( aNewFont );
+ aCopyrightText.SetFont( aNewFont );
+
+ aVersionText.SetBackground( aWall );
+ aCopyrightText.SetBackground( aWall );
+
+ Color aTextColor( COL_BLACK );
+ aVersionText.SetControlForeground( aTextColor );
+ aCopyrightText.SetControlForeground( aTextColor );
+
+ // Gr"ossen und Positionen berechnen
+ Size aAppLogoSiz = aAppLogo.GetSizePixel();
+ Size aOutSiz = GetOutputSizePixel();
+ Size aTextSize = Size( GetTextWidth( DEFINE_CONST_UNICODE( "StarOfficeAbout" ) ), GetTextHeight() );
+
+ // Fenstergr"osse
+ aOutSiz.Width() = aAppLogoSiz.Width();
+
+ // Texte (Gr"osse und Position )
+ Size a6Size = aVersionText.LogicToPixel( Size( 6, 6 ), MAP_APPFONT );
+ long nRowH = GetTextHeight();
+ long nSpace = SPACE_OFFSET * 2;
+ long nY = 0;
+ Point aTextPos = aVersionText.GetPosPixel();
+ aTextPos.X() = a6Size.Width() * 2;
+ aTextPos.Y() = aAppLogoSiz.Height() + ( a6Size.Height() * 2 );
+ nY = aTextPos.Y();
+ aVersionText.SetPosPixel( aTextPos );
+ Size aTxtSiz = aVersionText.GetSizePixel();
+ aTxtSiz.Width() = aAppLogoSiz.Width() - ( a6Size.Width() * 4 );
+ long nTextWidth = aTxtSiz.Width();
+ long nSub = GetTextWidth( DEFINE_CONST_UNICODE( "x" ) );
+ long nRows = CalcTextRows_Impl( aVersionText, nTextWidth - nSub );
+ aTxtSiz.Height() = nRows * nRowH + nSpace;
+ aVersionText.SetSizePixel( aTxtSiz );
+ nY += aTxtSiz.Height() + ( a6Size.Height() / 3 );
+
+ aTextPos = aCopyrightText.GetPosPixel();
+ aTextPos.X() = a6Size.Width() * 2;
+ aTextPos.Y() = nY;
+ aCopyrightText.SetPosPixel( aTextPos );
+ aTxtSiz = aCopyrightText.GetSizePixel();
+ aTxtSiz.Width() = nTextWidth;
+ nRows = CalcTextRows_Impl( aCopyrightText, nTextWidth - nSub );
+ aTxtSiz.Height() = nRows * nRowH + nSpace;
+ aCopyrightText.SetSizePixel( aTxtSiz );
+ nY += aTxtSiz.Height() + ( a6Size.Height() / 2 );
+
+ // OK-Button-Position (at the bottom and centered)
+ Size aOKSiz = aOKButton.GetSizePixel();
+ Point aOKPnt = aOKButton.GetPosPixel();
+ aOKPnt.X() = ( aOutSiz.Width() - aOKSiz.Width() ) / 2;
+ aOKPnt.Y() = nY + 8;
+ aOKButton.SetPosPixel( aOKPnt );
+ nY = aOKPnt.Y() + aOKSiz.Height() + a6Size.Height();
+ aOutSiz.Height() = nY;
+ SetOutputSizePixel( aOutSiz );
+
+ FreeResource();
+
+ // explizite Help-Id
+ SetHelpId( SID_ABOUT );
+}
+
+// -----------------------------------------------------------------------
+
+AboutDialog::~AboutDialog()
+{
+ // L"oschen des Entwickleraufrufs
+ if ( aAccelList.Count() )
+ {
+ GetpApp()->RemoveAccel( aAccelList.First() );
+ Accelerator* pAccel = aAccelList.Last();
+
+ while ( pAccel )
+ {
+ delete pAccel;
+ pAccel = aAccelList.Prev();
+ }
+ }
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( AboutDialog, TimerHdl, Timer *, pTimer )
+{
+ // Text scrollen
+ nOff -= SCROLL_OFFSET;
+ MapMode aMapMode( MAP_PIXEL, Point( 0, nOff ), Fraction( 1, 1 ), Fraction( 1, 1 ) );
+ SetMapMode( aMapMode );
+ Scroll( 0, -SCROLL_OFFSET );
+
+ // Wenn der Text zuende gescrollt wurde, Dialogbox beenden
+ if ( ( nOff * -1 ) > nEnd )
+ {
+ bNormal = TRUE;
+ Close();
+ }
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( AboutDialog, AccelSelectHdl, Accelerator *, pAccelerator )
+{
+ // init Timer
+ aTimer.SetTimeoutHdl( LINK( this, AboutDialog, TimerHdl ) );
+
+ // init scroll mode
+ nOff = GetOutputSizePixel().Height();
+ MapMode aMapMode( MAP_PIXEL, Point( 0, nOff ), Fraction( 1, 1 ), Fraction( 1, 1 ) );
+ SetMapMode( aMapMode );
+ bNormal = FALSE;
+
+ // text always black on white
+ Font aFont = GetFont();
+ aFont.SetTransparent( TRUE );
+ Color aBlackCol( COL_BLACK );
+ aFont.SetColor( aBlackCol );
+ SetFont( aFont );
+
+ // start scroll Timer
+ aTimer.SetTimeout( 60 );
+ aTimer.Start();
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+BOOL AboutDialog::Close()
+{
+ // stop Timer and finish the dialog
+ aTimer.Stop();
+ EndDialog( RET_OK );
+ return( FALSE );
+}
+
+// -----------------------------------------------------------------------
+
+void AboutDialog::Paint( const Rectangle& rRect )
+{
+ if ( bNormal )
+ {
+ // not in scroll mode
+ DrawImage( Point(), aAppLogo );
+ return;
+ }
+
+ long nPos = 0;
+ long nW = GetOutputSizePixel().Width() / 2 - 5;
+ Size aSize = Size( GetTextWidth( aDevVersionStr ), GetTextHeight() );
+ USHORT nStartPos = 0;
+ USHORT nEndPos = 0;
+ Point aPnt( nW - ( aSize.Width() / 2 ), nPos );
+ long nPos1 = aPnt.Y(), nPos2 = nPos1 + aSize.Height(), nTop = rRect.Top();
+
+ if ( nPos1 <= nTop && nTop < nPos2 )
+ DrawText( aPnt, aDevVersionStr );
+
+ nPos += aSize.Height() + 3;
+ USHORT nDevCnt = aDeveloperAry.Count();
+
+ if ( nDevCnt )
+ {
+ for ( USHORT i = 0; i < nDevCnt; ++i )
+ {
+ String aStr = aDeveloperAry.GetString(i);
+ long nVal = aDeveloperAry.GetValue(i);
+
+ if ( nVal )
+ {
+ // Versionsnummern gibt es nur in den fetten Zeilen
+ USHORT nProductVersion = ProductVersion::GetVersion().ToInt32();
+ String aVersion = String::CreateFromInt32( nProductVersion / 10 );
+ aVersion += '.';
+ aVersion += String::CreateFromInt32( nProductVersion % 10 );
+ USHORT nSPos = aStr.SearchAndReplaceAscii( "$(VER)", aVersion );
+ while ( STRING_NOTFOUND != nSPos )
+ nSPos = aStr.SearchAndReplaceAscii( "$(VER)", aVersion, nSPos );
+ }
+ aSize = Size( GetTextWidth( aStr ), GetTextHeight() );
+ aPnt = Point( nW - ( aSize.Width() / 2 ), nPos );
+ nPos1 = aPnt.Y();
+ nPos2 = nPos1 + aSize.Height();
+
+ if ( nPos1 <= nTop && nTop < nPos2 )
+ {
+ if ( nVal )
+ {
+ // eine "Uberschrift hervorheben
+ Font aFont = GetFont();
+ FontWeight eOldWeight = aFont.GetWeight();
+ Color aOldCol = aFont.GetColor();
+ aFont.SetWeight( (FontWeight)nVal );
+ if ( aStr.GetChar(1) != ' ' )
+ {
+ Color aGrayCol( COL_GRAY );
+ aFont.SetColor( aGrayCol );
+ }
+ SetFont( aFont );
+ long nOldW = aSize.Width();
+ aSize = Size(GetTextWidth( aStr ),GetTextHeight());
+ aPnt.X() -= ( aSize.Width() - nOldW ) / 2;
+ DrawText( aPnt, aStr );
+ aFont.SetWeight( eOldWeight );
+ aFont.SetColor( aOldCol );
+ SetFont( aFont );
+ }
+ else
+ DrawText( aPnt, aStr );
+ }
+ nPos += aSize.Height() + 3;
+ }
+ }
+ nEnd = nPos - 4;
+}
+
+
diff --git a/sfx2/source/dialog/acccfg.cxx b/sfx2/source/dialog/acccfg.cxx
new file mode 100644
index 000000000000..d0e276cb66e4
--- /dev/null
+++ b/sfx2/source/dialog/acccfg.cxx
@@ -0,0 +1,854 @@
+/*************************************************************************
+ *
+ * $RCSfile: acccfg.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:30 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _HELP_HXX //autogen
+#include <vcl/help.hxx>
+#endif
+#ifndef VCL
+#ifndef _FILDLG_HXX //autogen
+#include <vcl/fildlg.hxx>
+#endif
+#else
+#ifndef _SV_FILEDLG_HXX //autogen
+#include <svtools/filedlg.hxx>
+#endif
+#ifndef _SFXINIMGR_HXX //autogen
+#include <svtools/iniman.hxx>
+#endif
+#endif
+#pragma hdrstop
+
+#include "cfg.hxx"
+
+#include "dialog.hrc"
+#include "cfg.hrc"
+
+#ifdef MAC
+#ifndef _EXTATTR_HXX //autogen
+#include <svtools/extattr.hxx>
+#endif
+#endif
+
+#include "app.hxx"
+#include "msg.hxx"
+#include "msgpool.hxx"
+#include "accmgr.hxx"
+#include "sfxresid.hxx"
+#include "macrconf.hxx"
+#include "cfgmgr.hxx"
+#include "sfxresid.hxx"
+#include "objsh.hxx"
+#include "dispatch.hxx"
+#include "sfxtypes.hxx"
+
+#ifdef VCL
+#include "iodlg.hxx"
+#endif
+
+//static const char __FAR_DATA pUnknownStr[] = "???";
+static USHORT __FAR_DATA aCodeArr[] =
+{
+ KEY_F2 ,
+ KEY_F3 ,
+ KEY_F4 ,
+ KEY_F5 ,
+ KEY_F6 ,
+ KEY_F7 ,
+ KEY_F8 ,
+ KEY_F9 ,
+ KEY_F10 ,
+ KEY_F11 ,
+ KEY_F12 ,
+
+ KEY_DOWN ,
+ KEY_UP ,
+ KEY_LEFT ,
+ KEY_RIGHT ,
+ KEY_HOME ,
+ KEY_END ,
+ KEY_PAGEUP ,
+ KEY_PAGEDOWN ,
+ KEY_RETURN ,
+ KEY_ESCAPE ,
+ KEY_BACKSPACE,
+ KEY_INSERT ,
+ KEY_DELETE ,
+
+ KEY_F2 | KEY_SHIFT,
+ KEY_F3 | KEY_SHIFT,
+ KEY_F4 | KEY_SHIFT,
+ KEY_F5 | KEY_SHIFT,
+ KEY_F6 | KEY_SHIFT,
+ KEY_F7 | KEY_SHIFT,
+ KEY_F8 | KEY_SHIFT,
+ KEY_F9 | KEY_SHIFT,
+ KEY_F10 | KEY_SHIFT,
+ KEY_F11 | KEY_SHIFT,
+ KEY_F12 | KEY_SHIFT,
+
+ KEY_DOWN | KEY_SHIFT,
+ KEY_UP | KEY_SHIFT,
+ KEY_LEFT | KEY_SHIFT,
+ KEY_RIGHT | KEY_SHIFT,
+ KEY_HOME | KEY_SHIFT,
+ KEY_END | KEY_SHIFT,
+ KEY_PAGEUP | KEY_SHIFT,
+ KEY_PAGEDOWN | KEY_SHIFT,
+ KEY_RETURN | KEY_SHIFT,
+ KEY_SPACE | KEY_SHIFT,
+ KEY_ESCAPE | KEY_SHIFT,
+ KEY_BACKSPACE | KEY_SHIFT,
+ KEY_INSERT | KEY_SHIFT,
+ KEY_DELETE | KEY_SHIFT,
+
+ KEY_0 | KEY_MOD1 ,
+ KEY_1 | KEY_MOD1 ,
+ KEY_2 | KEY_MOD1 ,
+ KEY_3 | KEY_MOD1 ,
+ KEY_4 | KEY_MOD1 ,
+ KEY_5 | KEY_MOD1 ,
+ KEY_6 | KEY_MOD1 ,
+ KEY_7 | KEY_MOD1 ,
+ KEY_8 | KEY_MOD1 ,
+ KEY_9 | KEY_MOD1 ,
+ KEY_A | KEY_MOD1 ,
+ KEY_B | KEY_MOD1 ,
+ KEY_C | KEY_MOD1 ,
+ KEY_D | KEY_MOD1 ,
+ KEY_E | KEY_MOD1 ,
+ KEY_F | KEY_MOD1 ,
+ KEY_G | KEY_MOD1 ,
+ KEY_H | KEY_MOD1 ,
+ KEY_I | KEY_MOD1 ,
+ KEY_J | KEY_MOD1 ,
+ KEY_K | KEY_MOD1 ,
+ KEY_L | KEY_MOD1 ,
+ KEY_M | KEY_MOD1 ,
+ KEY_N | KEY_MOD1 ,
+ KEY_O | KEY_MOD1 ,
+ KEY_P | KEY_MOD1 ,
+ KEY_Q | KEY_MOD1 ,
+ KEY_R | KEY_MOD1 ,
+ KEY_S | KEY_MOD1 ,
+ KEY_T | KEY_MOD1 ,
+ KEY_U | KEY_MOD1 ,
+ KEY_V | KEY_MOD1 ,
+ KEY_W | KEY_MOD1 ,
+ KEY_X | KEY_MOD1 ,
+ KEY_Y | KEY_MOD1 ,
+ KEY_Z | KEY_MOD1 ,
+
+ KEY_F2 | KEY_MOD1 ,
+ KEY_F3 | KEY_MOD1 ,
+ KEY_F4 | KEY_MOD1 ,
+ KEY_F5 | KEY_MOD1 ,
+ KEY_F6 | KEY_MOD1 ,
+ KEY_F7 | KEY_MOD1 ,
+ KEY_F8 | KEY_MOD1 ,
+ KEY_F9 | KEY_MOD1 ,
+ KEY_F10 | KEY_MOD1 ,
+ KEY_F11 | KEY_MOD1 ,
+ KEY_F12 | KEY_MOD1 ,
+
+ KEY_DOWN | KEY_MOD1 ,
+ KEY_UP | KEY_MOD1 ,
+ KEY_LEFT | KEY_MOD1 ,
+ KEY_RIGHT | KEY_MOD1 ,
+ KEY_HOME | KEY_MOD1 ,
+ KEY_END | KEY_MOD1 ,
+ KEY_PAGEUP | KEY_MOD1 ,
+ KEY_PAGEDOWN | KEY_MOD1 ,
+ KEY_RETURN | KEY_MOD1 ,
+ KEY_SPACE | KEY_MOD1 ,
+ KEY_BACKSPACE | KEY_MOD1 ,
+ KEY_INSERT | KEY_MOD1 ,
+ KEY_DELETE | KEY_MOD1 ,
+
+ KEY_ADD | KEY_MOD1 ,
+ KEY_SUBTRACT | KEY_MOD1 ,
+ KEY_MULTIPLY | KEY_MOD1 ,
+ KEY_DIVIDE | KEY_MOD1 ,
+
+ KEY_0 | KEY_SHIFT | KEY_MOD1,
+ KEY_1 | KEY_SHIFT | KEY_MOD1,
+ KEY_2 | KEY_SHIFT | KEY_MOD1,
+ KEY_3 | KEY_SHIFT | KEY_MOD1,
+ KEY_4 | KEY_SHIFT | KEY_MOD1,
+ KEY_5 | KEY_SHIFT | KEY_MOD1,
+ KEY_6 | KEY_SHIFT | KEY_MOD1,
+ KEY_7 | KEY_SHIFT | KEY_MOD1,
+ KEY_8 | KEY_SHIFT | KEY_MOD1,
+ KEY_9 | KEY_SHIFT | KEY_MOD1,
+ KEY_A | KEY_SHIFT | KEY_MOD1,
+ KEY_B | KEY_SHIFT | KEY_MOD1,
+ KEY_C | KEY_SHIFT | KEY_MOD1,
+ KEY_D | KEY_SHIFT | KEY_MOD1,
+ KEY_E | KEY_SHIFT | KEY_MOD1,
+ KEY_F | KEY_SHIFT | KEY_MOD1,
+ KEY_G | KEY_SHIFT | KEY_MOD1,
+ KEY_H | KEY_SHIFT | KEY_MOD1,
+ KEY_I | KEY_SHIFT | KEY_MOD1,
+ KEY_J | KEY_SHIFT | KEY_MOD1,
+ KEY_K | KEY_SHIFT | KEY_MOD1,
+ KEY_L | KEY_SHIFT | KEY_MOD1,
+ KEY_M | KEY_SHIFT | KEY_MOD1,
+ KEY_N | KEY_SHIFT | KEY_MOD1,
+ KEY_O | KEY_SHIFT | KEY_MOD1,
+ KEY_P | KEY_SHIFT | KEY_MOD1,
+ KEY_Q | KEY_SHIFT | KEY_MOD1,
+ KEY_R | KEY_SHIFT | KEY_MOD1,
+ KEY_S | KEY_SHIFT | KEY_MOD1,
+ KEY_T | KEY_SHIFT | KEY_MOD1,
+ KEY_U | KEY_SHIFT | KEY_MOD1,
+ KEY_V | KEY_SHIFT | KEY_MOD1,
+ KEY_W | KEY_SHIFT | KEY_MOD1,
+ KEY_X | KEY_SHIFT | KEY_MOD1,
+ KEY_Y | KEY_SHIFT | KEY_MOD1,
+ KEY_Z | KEY_SHIFT | KEY_MOD1,
+
+ KEY_F2 | KEY_SHIFT | KEY_MOD1,
+ KEY_F3 | KEY_SHIFT | KEY_MOD1,
+ KEY_F4 | KEY_SHIFT | KEY_MOD1,
+ KEY_F5 | KEY_SHIFT | KEY_MOD1,
+ KEY_F6 | KEY_SHIFT | KEY_MOD1,
+ KEY_F7 | KEY_SHIFT | KEY_MOD1,
+ KEY_F8 | KEY_SHIFT | KEY_MOD1,
+ KEY_F9 | KEY_SHIFT | KEY_MOD1,
+ KEY_F10 | KEY_SHIFT | KEY_MOD1,
+ KEY_F11 | KEY_SHIFT | KEY_MOD1,
+ KEY_F12 | KEY_SHIFT | KEY_MOD1,
+
+ KEY_DOWN | KEY_SHIFT | KEY_MOD1,
+ KEY_UP | KEY_SHIFT | KEY_MOD1,
+ KEY_LEFT | KEY_SHIFT | KEY_MOD1,
+ KEY_RIGHT | KEY_SHIFT | KEY_MOD1,
+ KEY_HOME | KEY_SHIFT | KEY_MOD1,
+ KEY_END | KEY_SHIFT | KEY_MOD1,
+ KEY_PAGEUP | KEY_SHIFT | KEY_MOD1,
+ KEY_PAGEDOWN | KEY_SHIFT | KEY_MOD1,
+
+ KEY_RETURN | KEY_SHIFT | KEY_MOD1,
+ KEY_SPACE | KEY_SHIFT | KEY_MOD1,
+ KEY_BACKSPACE | KEY_SHIFT | KEY_MOD1,
+ KEY_INSERT | KEY_SHIFT | KEY_MOD1,
+ KEY_DELETE | KEY_SHIFT | KEY_MOD1
+};
+
+static long nAccCfgTabs[] =
+{
+ 2, // Number of Tabs
+ 0,
+ 120 // Function
+};
+
+#define ACC_CODEARRSIZE ( sizeof( aCodeArr ) / sizeof( aCodeArr[ 0 ] ) )
+#ifdef VCL
+#define ACC_FUNCTIONCOUNT 0
+#else
+#define ACC_FUNCTIONCOUNT 18
+#endif
+
+#ifdef MSC
+#pragma warning (disable:4355)
+#endif
+
+/* SfxAcceleratorConfigListBox::KeyInput() *******************************************
+
+Springt den Eintrag an, der der gedrueckten Tastenkombination entspricht.
+Ausgenommen davon sind die fuer die Dialogsteuerung ueblichen
+Tastenkombinationen.
+
+****************************************************************************/
+
+void SfxAccCfgTabListBox_Impl::KeyInput( const KeyEvent &rKEvt )
+{
+ KeyCode aCode1 = rKEvt.GetKeyCode();
+ USHORT nCode = aCode1.GetCode();
+
+ if ( nCode != KEY_DOWN && nCode != KEY_UP &&
+ nCode != KEY_LEFT && nCode != KEY_RIGHT &&
+ nCode != KEY_PAGEUP && nCode != KEY_PAGEDOWN )
+ {
+ for ( USHORT i = 0; i < ACC_CODEARRSIZE; i++ )
+ {
+ KeyCode aCode2( aCodeArr[ i ] );
+
+ if ( aCode1.GetCode () == aCode2.GetCode () &&
+ aCode1.GetModifier() == aCode2.GetModifier() )
+ {
+ SvLBoxEntry *pEntry = GetEntry( 0, i + ACC_FUNCTIONCOUNT );
+ Select( pEntry );
+ MakeVisible( pEntry );
+ return;
+ }
+ }
+ }
+
+ SfxMenuCfgTabListBox_Impl::KeyInput( rKEvt );
+}
+
+SfxAcceleratorConfigPage::~SfxAcceleratorConfigPage()
+{
+}
+
+// SfxAcceleratorConfigPage::Ctor() ************************************************
+
+SfxAcceleratorConfigPage::SfxAcceleratorConfigPage( Window *pParent, const SfxItemSet& rSet ) :
+
+ SfxTabPage( pParent, SfxResId( TP_CONFIG_ACCEL ), rSet ),
+
+ aChangeButton ( this, ResId( BTN_ACC_CHANGE ) ),
+ aRemoveButton ( this, ResId( BTN_ACC_REMOVE ) ),
+ aEntriesBox ( this, ResId( BOX_ACC_ENTRIES ) ),
+ aKeyboardGroup ( this, ResId( GRP_ACC_KEYBOARD ) ),
+ aGroupText ( this, ResId( TXT_ACC_GROUP ) ),
+ aGroupBox ( this, ResId( BOX_ACC_GROUP ), SFX_SLOT_ACCELCONFIG ),
+ aFunctionText ( this, ResId( TXT_ACC_FUNCTION ) ),
+ aFunctionBox ( this, ResId( BOX_ACC_FUNCTION ) ),
+ aKeyText ( this, ResId( TXT_ACC_KEY ) ),
+ aKeyBox ( this, ResId( BOX_ACC_KEY ) ),
+ aFunctionsGroup ( this, ResId( GRP_ACC_FUNCTIONS ) ),
+ aLoadButton ( this, ResId( BTN_LOAD ) ),
+ aSaveButton ( this, ResId( BTN_SAVE ) ),
+ aResetButton ( this, ResId( BTN_RESET ) ),
+ pMgr( SFX_APP()->GetAcceleratorManager() ),
+ bModified(FALSE),
+ bDefault( pMgr->IsDefault() )
+{
+ FreeResource();
+
+ // Handler installieren
+ aChangeButton.SetClickHdl ( LINK( this, SfxAcceleratorConfigPage,
+ ChangeHdl ) );
+ aRemoveButton.SetClickHdl ( LINK( this, SfxAcceleratorConfigPage,
+ RemoveHdl ) );
+ aEntriesBox .SetSelectHdl( LINK( this, SfxAcceleratorConfigPage,
+ SelectHdl ) );
+ aGroupBox .SetSelectHdl( LINK( this, SfxAcceleratorConfigPage,
+ SelectHdl ) );
+ aFunctionBox .SetSelectHdl( LINK( this, SfxAcceleratorConfigPage,
+ SelectHdl ) );
+ aKeyBox .SetSelectHdl( LINK( this, SfxAcceleratorConfigPage,
+ SelectHdl ) );
+ aLoadButton .SetClickHdl ( LINK( this, SfxAcceleratorConfigPage,
+ Load ) );
+ aSaveButton .SetClickHdl ( LINK( this, SfxAcceleratorConfigPage,
+ Save ) );
+ aResetButton .SetClickHdl ( LINK( this, SfxAcceleratorConfigPage,
+ Default ) );
+
+ // aAccelArr dimensionieren
+ for ( USHORT i = 0; i < ACC_FUNCTIONCOUNT + ACC_CODEARRSIZE; i++ )
+ aAccelArr.Append( 0 );
+
+ // Entriesbox initialisieren
+//(mba)/task SfxWaitCursor aWait;
+ aEntriesBox.SetWindowBits( WB_HSCROLL|WB_CLIPCHILDREN );
+ aEntriesBox.SetSelectionMode( SINGLE_SELECTION );
+ aEntriesBox.SetTabs( &nAccCfgTabs[0], MAP_APPFONT );
+ aEntriesBox.Resize(); // OS: Hack fuer richtige Selektion
+// aEntriesBox.SetFont( SFX_APP()->GetAppFont() );
+ aEntriesBox.SetSpaceBetweenEntries( 0 );
+ aEntriesBox.SetDragDropMode(0);
+ Init();
+
+ aGroupBox.SetFunctionListBox( &aFunctionBox );
+ aGroupBox.Init();
+ aEntriesBox.Select( aEntriesBox.GetEntry( 0, 0 ) );
+ aGroupBox.Select( aGroupBox.GetEntry( 0, 0 ) );
+}
+
+void SfxAcceleratorConfigPage::Init()
+{
+ // aEntriesBox initialisieren
+ USHORT i;
+ for ( i=0; i<ACC_FUNCTIONCOUNT; i++ )
+ {
+ // F"ur alle "physikalischen" Acceleratoren einen Eintrag anlegen
+ String aEntry = GetFunctionName( ( KeyFuncType ) ( i + 1 ) );
+ SfxMenuConfigEntry *pEntry = new SfxMenuConfigEntry( 0, aEntry, String(), FALSE );
+ SvLBoxEntry *pLBEntry = aEntriesBox.InsertEntry( aEntry, 0L, LIST_APPEND, 0xFFFF );
+ aEntriesBox.EntryInserted( pLBEntry );
+ pLBEntry->SetUserData( pEntry );
+ }
+
+ for ( i=0; i<ACC_CODEARRSIZE; i++ )
+ {
+ // F"ur alle "logischen" Acceleratoren einen Eintrag anlegen
+ String aEntry = PosToKeyCode( i + ACC_FUNCTIONCOUNT ).GetName();
+ SfxMenuConfigEntry *pEntry = new SfxMenuConfigEntry( 0, aEntry, String(), FALSE );
+ SvLBoxEntry *pLBEntry = aEntriesBox.InsertEntry( aEntry, 0L, LIST_APPEND, 0xFFFF );
+ aEntriesBox.EntryInserted( pLBEntry );
+ pLBEntry->SetUserData( pEntry );
+ }
+
+#ifdef MBA_PUT_ITEMS
+ SvFileStream aFile( "c:\\accel.log", STREAM_STD_WRITE );
+#endif
+
+ BOOL bItem = pMgr->FirstItem();
+ while ( bItem )
+ {
+ // F"ur alle Eintr"age, die in der Konfiguration enthalten sind, den Funktionsnamen und Hilfetext holen
+ USHORT nPos = KeyCodeToPos( pMgr->GetKeyCode() );
+ if ( nPos != LISTBOX_ENTRY_NOTFOUND )
+ {
+ USHORT nCol = aEntriesBox.TabCount() - 1;
+ String aText ('[');
+ aText += SFX_SLOTPOOL().GetSlotName_Impl( pMgr->GetId() );
+ aText += ']';
+ aEntriesBox.SetEntryText( aText, nPos, nCol );
+ aAccelArr[ nPos ] = pMgr->GetId();
+ SfxMenuConfigEntry *pEntry = (SfxMenuConfigEntry*) aEntriesBox.GetEntry( 0, nPos )->GetUserData();
+ pEntry->SetId( pMgr->GetId() );
+
+#ifdef MBA_PUT_ITEMS
+ KeyCode aCode = pMgr->GetKeyCode();
+ String aName;
+ if ( !aCode.IsFunction() )
+ aName = aCode.GetName();
+ else
+ aName = GetFunctionName( aCode.GetFunction() );
+ aFile << aText.GetStr() << '\t' << aName.GetStr() << '\n';
+#endif
+ }
+
+ bItem = pMgr->NextItem();
+ }
+
+// for ( i=0; i<ACC_FUNCTIONCOUNT; i++ )
+// aEntriesBox.GetModel()->Remove( aEntriesBox.FirstChild( 0 ) );
+}
+
+void SfxAcceleratorConfigPage::ResetConfig()
+{
+ aEntriesBox.Clear();
+ for ( USHORT i = 0; i < ACC_FUNCTIONCOUNT + ACC_CODEARRSIZE; i++ )
+ aAccelArr[i] = 0;
+}
+
+void SfxAcceleratorConfigPage::Apply()
+{
+ if (!bModified)
+ return;
+
+ if ( bDefault )
+ {
+ pMgr->UseDefault();
+ pMgr->SetDefault(TRUE);
+ bModified = FALSE;
+ return;
+ }
+
+ bModified = FALSE;
+
+//(mba)/task SfxWaitCursor aWait;
+ SvUShorts aListOfIds;
+
+ // zaehlen
+ USHORT nCount = 0;
+ USHORT i;
+ for ( i = ACC_FUNCTIONCOUNT + ACC_CODEARRSIZE; i > 0; --i )
+ {
+ if ( aAccelArr[i-1] )
+ ++nCount;
+ }
+
+ BOOL bItem = pMgr->FirstItem();
+ while ( bItem )
+ {
+ // Macro-Eintraege referenzieren, da sie sonst beim Clear eventuell
+ // entfernt werden koennten !
+
+ if ( SfxMacroConfig::IsMacroSlot( pMgr->GetId() ) )
+ aListOfIds.Insert(pMgr->GetId(), aListOfIds.Count());
+ bItem = pMgr->NextItem();
+ }
+
+ pMgr->Reset(nCount);
+
+ // Liste von hinten durchgehen, damit logische Acceleratoren Vorrang
+ // vor physikalischen haben.
+ for ( i = ACC_FUNCTIONCOUNT + ACC_CODEARRSIZE; i > 0; --i )
+ {
+ if ( aAccelArr[i-1] )
+ {
+ if ( SfxMacroConfig::IsMacroSlot( aAccelArr[i-1] ) )
+ {
+ USHORT nPos;
+ for (nPos=0; nPos<aListOfIds.Count(); nPos++)
+ if (aListOfIds[nPos] == aAccelArr[i-1])
+ break;
+ if (nPos < aListOfIds.Count())
+ aListOfIds.Remove(nPos);
+ else
+ SFX_APP()->GetMacroConfig()->RegisterSlotId(aAccelArr[i-1]);
+ }
+
+ pMgr->AppendItem( aAccelArr[i-1], PosToKeyCode( i-1 ) );
+ }
+ }
+
+ for (i=0; i<aListOfIds.Count(); i++)
+ SFX_APP()->GetMacroConfig()->ReleaseSlotId(aListOfIds[i]);
+
+ pMgr->Reconfigure();
+}
+
+IMPL_LINK( SfxAcceleratorConfigPage, Load, Button *, pButton )
+{
+ String aCfgName = SfxConfigDialog::FileDialog_Impl( this,
+ WB_OPEN | WB_STDMODAL | WB_3DLOOK, String( SfxResId( STR_LOADACCELCONFIG) ) );
+ if ( aCfgName.Len() )
+ {
+//(mba)/task SfxWaitCursor aWait;
+
+ BOOL bCreated = FALSE;
+ SfxConfigManager *pCfgMgr =
+ SfxConfigDialog::MakeCfgMgr_Impl( aCfgName, bCreated );
+ SfxConfigManager *pOldCfgMgr = pMgr->GetConfigManager_Impl();
+ if (pOldCfgMgr != pCfgMgr)
+ {
+ if (pCfgMgr->HasConfigItem(pMgr->GetType()))
+ {
+ pMgr->ReInitialize(pCfgMgr);
+ aEntriesBox.SetUpdateMode(FALSE);
+ ResetConfig();
+ Init();
+ aEntriesBox.SetUpdateMode(TRUE);
+ aEntriesBox.Invalidate();
+ aEntriesBox.Select( aEntriesBox.GetEntry( 0, 0 ) );
+ pMgr->ReInitialize(pOldCfgMgr);
+ bDefault = FALSE;
+ bModified = TRUE;
+ }
+ }
+
+ if ( bCreated )
+ delete pCfgMgr;
+ }
+
+ return 0;
+}
+
+IMPL_LINK( SfxAcceleratorConfigPage, Save, Button *, pButton )
+{
+ String aCfgName = SfxConfigDialog::FileDialog_Impl( this,
+ WB_SAVEAS | WB_STDMODAL | WB_3DLOOK, String( SfxResId( STR_SAVEACCELCONFIG) ) );
+ if ( aCfgName.Len() )
+ {
+//(mba)/task SfxWaitCursor aWait;
+
+ BOOL bCreated = FALSE;
+ SfxConfigManager *pCfgMgr =
+ SfxConfigDialog::MakeCfgMgr_Impl( aCfgName, bCreated );
+
+ if ( pCfgMgr == SfxObjectShell::Current()->GetConfigManager() )
+ {
+ pCfgMgr->Activate(SFX_CFGMANAGER());
+ pMgr->Connect(pCfgMgr);
+ pCfgMgr->AddConfigItem(pMgr);
+ }
+
+ SfxConfigManager *pOldCfgMgr = pMgr->GetConfigManager_Impl();
+ if (pOldCfgMgr != pCfgMgr)
+ {
+ pMgr->StoreConfig();
+ pMgr->Connect(pCfgMgr);
+ pCfgMgr->AddConfigItem(pMgr);
+ BOOL bMod = bModified;
+ BOOL bItemModified = pMgr->IsModified();
+ Apply();
+ pMgr->SetModified( TRUE );
+ pCfgMgr->StoreConfig();
+ pMgr->ReInitialize(pOldCfgMgr);
+ pMgr->SetModified( bItemModified );
+ bModified = bMod;
+
+ if (bCreated)
+ {
+ pCfgMgr->SetModified( TRUE );
+ pCfgMgr->SaveConfig();
+#ifdef MAC
+ SvEaMgr aEaMgr(aCfgName);
+ aEaMgr.SetFileType("Pref");
+#endif
+ }
+
+ }
+ else
+ {
+ Apply();
+ pMgr->SetModified( TRUE );
+ pCfgMgr->StoreConfig();
+ }
+
+ if (bCreated)
+ delete pCfgMgr;
+ }
+
+ return 0;
+}
+
+IMPL_LINK( SfxAcceleratorConfigPage, Default, PushButton *, pPushButton )
+{
+ SfxConfigManager *pOldCfgMgr = pMgr->GetConfigManager_Impl();
+ bDefault = TRUE;
+ bModified = !pMgr->IsDefault();
+ pMgr->StoreConfig();
+ pMgr->ReleaseConfigManager();
+ pMgr->UseDefault();
+ aEntriesBox.SetUpdateMode(FALSE);
+ ResetConfig();
+ Init();
+ aEntriesBox.SetUpdateMode(TRUE);
+ aEntriesBox.Invalidate();
+ aEntriesBox.Select( aEntriesBox.GetEntry( 0, 0 ) );
+ pMgr->ReInitialize(pOldCfgMgr);
+ return 0;
+}
+
+IMPL_LINK( SfxAcceleratorConfigPage, ChangeHdl, Button *, pButton )
+{
+ bDefault = FALSE;
+ bModified = TRUE;
+
+ // Selektierter Eintrag und selektierte Funktion
+ USHORT nPos = (USHORT) aEntriesBox.GetModel()->GetRelPos( aEntriesBox.FirstSelected() );
+ USHORT nId = aFunctionBox.GetCurId();
+
+ String aStr;
+ if ( SfxMacroConfig::IsMacroSlot( nId ) )
+ {
+ // Es ist ein Macro selektiert, f"ur das schon eine SlotId reserviert wurde
+ aStr = SFX_APP()->GetMacroConfig()->GetMacroInfo(nId)->GetMacroName();
+ }
+ else
+ {
+ // Eine normale Funktion ist selektiert
+ aStr = SFX_SLOTPOOL().GetSlotName_Impl( nId );
+ }
+
+ // Hilfetext setzen
+ SfxMenuConfigEntry *pEntry = (SfxMenuConfigEntry*) aEntriesBox.GetEntry( 0, nPos )->GetUserData();
+
+ // Funktions/Macronamen im Eintrag updaten
+ String aText ('[');
+ aText += aStr;
+ aText += ']';
+ USHORT nCol = aEntriesBox.TabCount() - 1;
+ aEntriesBox.SetEntryText( aText, nPos, nCol );
+ aAccelArr[ nPos ] = nId;
+ pEntry->SetId( nId );
+ pEntry->SetHelpText( String() );
+ ((Link &) aFunctionBox.GetSelectHdl()).Call( &aFunctionBox );
+ return 0;
+}
+
+IMPL_LINK( SfxAcceleratorConfigPage, RemoveHdl, Button *, pButton )
+{
+ bDefault = FALSE;
+ bModified = TRUE;
+
+ // Selektierter Eintrag
+ USHORT nPos = (USHORT) aEntriesBox.GetModel()->GetRelPos( aEntriesBox.FirstSelected() );
+ SfxMenuConfigEntry *pEntry = (SfxMenuConfigEntry*) aEntriesBox.GetEntry( 0, nPos )->GetUserData();
+ pEntry->SetHelpText( String() );
+
+ // Funktionsnamen aus dem Eintrag l"oschen
+ USHORT nCol = aEntriesBox.TabCount() - 1;
+ aEntriesBox.SetEntryText( pEntry->GetName(), nPos ); // Nur letzte Spalte auf "" setzen funzt nicht - Bug ??
+ aAccelArr[ nPos ] = 0;
+ pEntry->SetId( 0 );
+ ((Link &) aFunctionBox.GetSelectHdl()).Call( &aFunctionBox );
+ return 0;
+}
+
+IMPL_LINK( SfxAcceleratorConfigPage, SelectHdl, Control*, pListBox )
+{
+ // Alle Hilfetexte abschalten
+ Help::ShowBalloon( this, Point(), String() );
+
+ if ( pListBox == &aEntriesBox )
+ {
+ // Eintrag ausgewaehlt: Buttons enablen/disablen
+ USHORT nPos = (USHORT) aEntriesBox.GetModel()->GetRelPos( aEntriesBox.FirstSelected() );
+ aChangeButton.Enable( nPos >= ACC_FUNCTIONCOUNT && aAccelArr[ nPos ] != aFunctionBox.GetCurId() );
+ aRemoveButton.Enable( nPos >= ACC_FUNCTIONCOUNT && aAccelArr[ nPos ] > 0 );
+ }
+ else if ( pListBox == &aGroupBox )
+ {
+ aGroupBox.GroupSelected();
+ if ( !aFunctionBox.FirstSelected() )
+ aChangeButton.Enable( FALSE );
+ }
+ else if ( pListBox == &aFunctionBox )
+ {
+ aFunctionBox.FunctionSelected();
+
+ // Zuerst "uberpr"ufen, ob durch den Wechsel der Selektion der Zustand des ChangeButtons wechselt
+ USHORT nEntryPos = (USHORT) aEntriesBox.GetModel()->GetRelPos( aEntriesBox.FirstSelected() );
+ USHORT nId = aFunctionBox.GetCurId();
+ aChangeButton.Enable( nEntryPos >= ACC_FUNCTIONCOUNT && aAccelArr[ nEntryPos ] != nId );
+ aRemoveButton.Enable( nEntryPos >= ACC_FUNCTIONCOUNT && aAccelArr[ nEntryPos ] > 0 );
+
+ aKeyBox.Clear();
+ aKeyArr.Clear();
+
+ for ( USHORT i = 0; i < ACC_FUNCTIONCOUNT + ACC_CODEARRSIZE; i++ )
+ {
+ if ( aAccelArr[ i ] == nId )
+ {
+ KeyCode aCode = PosToKeyCode( i );
+ if ( !aCode.IsFunction() )
+ aKeyBox.InsertEntry( aCode.GetName() );
+ else
+ aKeyBox.InsertEntry( GetFunctionName( aCode.GetFunction() ) );
+
+ aKeyArr.Append( i );
+ }
+ }
+ }
+ else
+ {
+ // Taste ausgewaehlt: Eintrag anspringen
+ USHORT n = aKeyBox.GetSelectEntryPos();
+ USHORT nPos = aKeyArr[ n ] /* - ACC_FUNCTIONCOUNT */;
+ SvLBoxEntry *pEntry = aEntriesBox.GetEntry( 0, nPos );
+ aEntriesBox.Select( pEntry );
+ aEntriesBox.MakeVisible( pEntry );
+ }
+ return 0;
+}
+
+KeyCode SfxAcceleratorConfigPage::PosToKeyCode( USHORT nPos ) const
+{
+ DBG_ASSERT( nPos < ACC_CODEARRSIZE + ACC_FUNCTIONCOUNT, "Invalid position!" );
+
+ if ( nPos < ACC_FUNCTIONCOUNT )
+ {
+ KeyCode aTmpCode( ( KeyFuncType ) ( nPos + 1 ) );
+ return aTmpCode;
+ }
+ else
+ {
+ KeyCode aTmpCode( aCodeArr[ nPos - ACC_FUNCTIONCOUNT] & 0xFFF,
+ aCodeArr[ nPos - ACC_FUNCTIONCOUNT] & ( KEY_SHIFT | KEY_MOD1 ) );
+ return aTmpCode;
+ }
+}
+
+USHORT SfxAcceleratorConfigPage::KeyCodeToPos( const KeyCode &rCode ) const
+{
+ if ( rCode.IsFunction() )
+ return ( USHORT ) rCode.GetFunction() - 1;
+ else
+ {
+ USHORT nCode = rCode.GetCode() + rCode.GetModifier();
+
+ for ( USHORT i = 0; i < ACC_CODEARRSIZE; i++ )
+ {
+ if ( aCodeArr[ i ] == nCode )
+ return i + ACC_FUNCTIONCOUNT;
+ }
+
+ return LISTBOX_ENTRY_NOTFOUND;
+ }
+}
+
+String SfxAcceleratorConfigPage::GetFunctionName( KeyFuncType eType ) const
+{
+ String aStr;
+
+ switch ( eType )
+ {
+ case KEYFUNC_NEW : aStr = String( SfxResId( STR_NEW ) ); break;
+ case KEYFUNC_OPEN : aStr = String( SfxResId( STR_OPEN ) ); break;
+ case KEYFUNC_SAVE : aStr = String( SfxResId( STR_SAVE ) ); break;
+ case KEYFUNC_SAVEAS : aStr = String( SfxResId( STR_SAVEAS ) ); break;
+ case KEYFUNC_PRINT : aStr = String( SfxResId( STR_PRINT ) ); break;
+ case KEYFUNC_CLOSE : aStr = String( SfxResId( STR_CLOSE ) ); break;
+ case KEYFUNC_QUIT : aStr = String( SfxResId( STR_QUIT ) ); break;
+ case KEYFUNC_CUT : aStr = String( SfxResId( STR_CUT ) ); break;
+ case KEYFUNC_COPY : aStr = String( SfxResId( STR_COPY ) ); break;
+ case KEYFUNC_PASTE : aStr = String( SfxResId( STR_PASTE ) ); break;
+ case KEYFUNC_UNDO : aStr = String( SfxResId( STR_UNDO ) ); break;
+ case KEYFUNC_REDO : aStr = String( SfxResId( STR_REDO ) ); break;
+ case KEYFUNC_DELETE : aStr = String( SfxResId( STR_DELETE ) ); break;
+ case KEYFUNC_REPEAT : aStr = String( SfxResId( STR_REPEAT ) ); break;
+ case KEYFUNC_FIND : aStr = String( SfxResId( STR_FIND ) ); break;
+ case KEYFUNC_FINDBACKWARD: aStr = String( SfxResId( STR_FINDBACKWARD ) ); break;
+ case KEYFUNC_PROPERTIES : aStr = String( SfxResId( STR_PROPERTIES ) ); break;
+ case KEYFUNC_FRONT : aStr = String( SfxResId( STR_FRONT ) ); break;
+
+ default: DBG_ERROR( "Invalid KeyFuncType!" );
+ }
+
+ aStr = String('\"').Append(aStr).Append('\"');
+ return aStr;
+}
+
+void SfxAcceleratorConfigPage::SelectMacro(const SfxMacroInfoItem *pItem)
+{
+ aGroupBox.SelectMacro( pItem );
+}
+
+
diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx
new file mode 100644
index 000000000000..55c719b28882
--- /dev/null
+++ b/sfx2/source/dialog/basedlgs.cxx
@@ -0,0 +1,1041 @@
+/*************************************************************************
+ *
+ * $RCSfile: basedlgs.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:29 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+// include ---------------------------------------------------------------
+
+#include <stdlib.h>
+
+#ifndef _GROUP_HXX //autogen
+#include <vcl/group.hxx>
+#endif
+#ifndef _MSGBOX_HXX //autogen
+#include <vcl/msgbox.hxx>
+#endif
+#ifndef _SFXENUMITEM_HXX //autogen
+#include <svtools/eitem.hxx>
+#endif
+#ifndef _SFXINIMGR_HXX //autogen
+#include <svtools/iniman.hxx>
+#endif
+
+#pragma hdrstop
+
+#include "basedlgs.hxx"
+#include "viewfrm.hxx"
+#include "tabdlg.hxx"
+#include "app.hxx"
+#include "inimgr.hxx"
+#include "bindings.hxx"
+#include "dispatch.hxx"
+#include "sfxhelp.hxx"
+#include "accmgr.hxx"
+
+static String aEmptyString;
+
+// class SfxModalDefParentHelper -----------------------------------------
+
+SfxModalDefParentHelper::SfxModalDefParentHelper( Window *pWindow)
+{
+ pOld = Application::GetDefDialogParent();
+ Application::SetDefDialogParent( pWindow );
+}
+
+// -----------------------------------------------------------------------
+
+SfxModalDefParentHelper::~SfxModalDefParentHelper()
+{
+ Application::SetDefDialogParent( pOld );
+}
+
+// -----------------------------------------------------------------------
+
+void SetDialogData_Impl(SfxViewFrame *pFrame, Window *pDlg,
+ sal_uInt16 nId, const String &rExtraData = aEmptyString)
+{
+ // Konfiguration in Ini-Manager abspeichern
+ SfxIniManager *pIniMgr =
+ pFrame ? pFrame->GetIniManager() : SFX_APP()->GetAppIniManager();
+ String aDlgData( pIniMgr->GetString( pDlg->GetPosPixel(), Size() ) );
+ if( rExtraData.Len() )
+ {
+ aDlgData += pIniMgr->GetToken();
+ aDlgData += rExtraData;
+ }
+ pIniMgr->Set( aDlgData, SFX_KEY_DIALOG, nId );
+}
+
+// -----------------------------------------------------------------------
+
+String GetDialogData_Impl( SfxViewFrame *pFrame, Window *pDlg, sal_uInt16 nId)
+
+/* [Beschreibung]
+
+ Hilfsfunktion; liest die Dialogposition aus der Ini-Datei
+ und setzt diese am "ubergebenen Window.
+*/
+
+{
+ String aRetString;
+ // Konfiguration vorhanden?
+ SfxIniManager *pIniMgr =
+ pFrame ? pFrame->GetIniManager() : SFX_APP()->GetAppIniManager();
+ String aDlgData( pIniMgr->Get( SFX_KEY_DIALOG, nId ) );
+ if ( aDlgData.Len() > 0 )
+ {
+ // Konfiguration verwenden
+ Point aPos;
+ Size aDummySize;
+ if ( pIniMgr->GetPosSize(
+ aDlgData.GetToken(
+ 0, pIniMgr->GetToken()), aPos, aDummySize ) )
+ {
+ pDlg->SetPosPixel(aPos);
+ sal_uInt16 nPos = aDlgData.Search( pIniMgr->GetToken() );
+ if( nPos != STRING_NOTFOUND )
+ {
+ aRetString = aDlgData.Copy( nPos + 1 );
+ aDlgData.Erase(nPos+1);
+ }
+ }
+ }
+ return aRetString;
+}
+
+// -----------------------------------------------------------------------
+
+SfxModalDialog::SfxModalDialog(Window* pParent, const ResId &rResId)
+
+/* [Beschreibung]
+
+ Konstruktor der allgemeinen Basisklasse f"ur modale Dialoge;
+ ResId wird als ID im ini-file verwendet.
+ Die dort gespeicherte Position wird gesetzt.
+*/
+
+: ModalDialog(pParent, rResId),
+ nUniqId(rResId.GetId())
+{
+ DBG_WARNING( "bitte den Ctor mit ViewFrame verwenden" );
+
+ aExtraData = GetDialogData_Impl(0, this, nUniqId);
+ aTimer.SetTimeout( 100 );
+ aTimer.SetTimeoutHdl( LINK( this, SfxModalDialog, TimerHdl_Impl ) );
+ aTimer.Start();
+}
+
+// -----------------------------------------------------------------------
+
+SfxModalDialog::SfxModalDialog(Window* pParent,
+ sal_uInt16 nUniqueId,
+ WinBits nWinStyle) :
+/* [Beschreibung]
+
+ Konstruktor der allgemeinen Basisklasse f"ur modale Dialoge;
+ ID f"ur das ini-file wird explizit "ubergeben.
+ Die dort gespeicherte Position wird gesetzt.
+*/
+
+ ModalDialog(pParent, nWinStyle),
+ nUniqId(nUniqueId)
+{
+ DBG_WARNING( "bitte den Ctor mit ViewFrame verwenden" );
+ aExtraData = GetDialogData_Impl(0, this, nUniqId);
+ aTimer.SetTimeout( 100 );
+ aTimer.SetTimeoutHdl( LINK( this, SfxModalDialog, TimerHdl_Impl ) );
+ aTimer.Start();
+}
+
+// -----------------------------------------------------------------------
+
+SfxModalDialog::SfxModalDialog
+(
+ SfxViewFrame* pViewFrame,
+ Window* pParent,
+ const ResId& rResId
+)
+
+/* [Beschreibung]
+
+ Konstruktor der allgemeinen Basisklasse f"ur modale Dialoge;
+ ResId wird als ID im ini-file verwendet.
+ Die dort gespeicherte Position wird gesetzt.
+*/
+
+: ModalDialog(pParent, rResId),
+ nUniqId(rResId.GetId())
+{
+ aExtraData = GetDialogData_Impl(pViewFrame, this, nUniqId);
+ aTimer.SetTimeout( 100 );
+ aTimer.SetTimeoutHdl( LINK( this, SfxModalDialog, TimerHdl_Impl ) );
+ aTimer.Start();
+}
+
+// -----------------------------------------------------------------------
+
+SfxModalDialog::SfxModalDialog
+(
+ SfxViewFrame* pViewFrame,
+ Window* pParent,
+ sal_uInt16 nUniqueId,
+ WinBits nWinStyle
+)
+
+/* [Beschreibung]
+
+ Konstruktor der allgemeinen Basisklasse f"ur modale Dialoge;
+ ID f"ur das ini-file wird explizit "ubergeben.
+ Die dort gespeicherte Position wird gesetzt.
+*/
+
+: ModalDialog(pParent, nWinStyle),
+ nUniqId(nUniqueId)
+{
+ aExtraData = GetDialogData_Impl(pViewFrame, this, nUniqId);
+ aTimer.SetTimeout( 100 );
+ aTimer.SetTimeoutHdl( LINK( this, SfxModalDialog, TimerHdl_Impl ) );
+ aTimer.Start();
+}
+
+// -----------------------------------------------------------------------
+
+SfxModalDialog::~SfxModalDialog()
+
+/* [Beschreibung]
+
+ Dtor; schreibt Dialogposition in das ini-file
+*/
+
+{
+ SfxHelpPI *pHelpPI = SFX_APP()->GetHelpPI();
+ if ( pHelpPI )
+ pHelpPI->ResetTopic();
+
+ SetDialogData_Impl(0, this, nUniqId, aExtraData);
+ aTimer.Stop();
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SfxModalDialog, TimerHdl_Impl, Timer*, EMPTYARG )
+{
+ SfxHelpPI *pHelpPI = SFX_APP()->GetHelpPI();
+ if ( pHelpPI )
+ pHelpPI->LoadTopic( GetHelpId() );
+ return 0L;
+}
+
+//-------------------------------------------------------------------------
+
+void SfxModelessDialog::Initialize(SfxChildWinInfo *pInfo)
+
+/* [Beschreibung]
+
+ Initialisierung der Klasse SfxModelessDialog "uber ein SfxChildWinInfo.
+ Die Initialisierung erfolgt erst in einem 2.Schritt
+ nach dem ctor und sollte vom ctor der abgeleiteten Klasse
+ oder von dem des SfxChildWindows aufgerufen werden.
+*/
+
+{
+ Point aPos;
+ if ( pInfo->aSize.Width() != 0 && pInfo->aSize.Height() != 0 )
+ {
+ aPos = pInfo->aPos;
+ if ( GetStyle() & WB_SIZEABLE )
+ SetSizePixel( pInfo->aSize );
+
+ // Initiale Gr"o\se aus pInfo merken
+ aSize = GetSizePixel();
+
+ // Soll das FloatingWindow eingezoomt werden ?
+ if ( pInfo->nFlags & SFX_CHILDWIN_ZOOMIN )
+ RollUp();
+ }
+ else
+ {
+ // Initiale Gr"o\se aus Resource oder ctor merken
+ aSize = GetSizePixel();
+
+ Size aParentSize = GetParent()->GetOutputSizePixel();
+ Size aSize = GetSizePixel();
+ aPos.X() += ( aParentSize.Width() - aSize.Width() ) / 2;
+ aPos.Y() += ( aParentSize.Height() - aSize.Height() ) / 2;
+ }
+
+ Point aPoint;
+ Rectangle aRect = GetDesktopRectPixel();
+ Size aSize( GetSizePixel() );
+ aPoint.X() = aRect.Right() - aSize.Width();
+ aPoint.Y() = aRect.Bottom() - aSize.Height();
+
+ aPoint = OutputToScreenPixel( aPoint );
+
+ if ( aPos.X() > aPoint.X() )
+ aPos.X() = aPoint.X() ;
+ if ( aPos.Y() > aPoint.Y() )
+ aPos.Y() = aPoint.Y();
+
+ if ( aPos.X() < 0 ) aPos.X() = 0;
+ if ( aPos.Y() < 0 ) aPos.Y() = 0;
+
+ SetPosPixel( aPos );
+}
+
+void SfxModelessDialog::Resize()
+
+/* [Beschreibung]
+
+ Diese virtuelle Methode der Klasse FloatingWindow merkt sich ggf. eine
+ ver"anderte Gr"o\se.
+ Wird diese Methode von einer abgeleiteten Klasse "uberschrieben, mu\s
+ auch SfxFloatingWindow::Resize() gerufen werden.
+*/
+
+{
+ ModelessDialog::Resize();
+ if ( !IsRollUp() )
+ aSize = GetSizePixel();
+}
+
+// -----------------------------------------------------------------------
+
+SfxModelessDialog::SfxModelessDialog( SfxBindings *pBindinx,
+ SfxChildWindow *pCW,
+ Window* pParent, WinBits nWinBits ) :
+ ModelessDialog (pParent, nWinBits),
+ pBindings(pBindinx),
+ pMgr(pCW)
+
+/* [Beschreibung]
+
+ Konstruktor der allgemeinen Basisklasse f"ur nicht-modale Dialoge.
+*/
+
+{
+ sal_uInt32 nId = GetHelpId();
+ SetHelpId(0);
+ SetUniqueId( nId );
+}
+
+// -----------------------------------------------------------------------
+
+SfxModelessDialog::SfxModelessDialog( SfxBindings *pBindinx,
+ SfxChildWindow *pCW, Window *pParent,
+ const ResId& rResId ) :
+ ModelessDialog(pParent, rResId),
+ pBindings(pBindinx),
+ pMgr(pCW)
+
+/* [Beschreibung]
+
+ Konstruktor der allgemeinen Basisklasse f"ur nicht-modale Dialoge.
+*/
+
+{
+ sal_uInt32 nId = GetHelpId();
+ SetHelpId(0);
+ SetUniqueId( nId );
+}
+
+// -----------------------------------------------------------------------
+
+long SfxModelessDialog::Notify( NotifyEvent& rEvt )
+
+/* [Beschreibung]
+
+ Wenn ein ModelessDialog aktiviert wird, wird sein ViewFrame aktiviert.
+ Notwendig ist das bei PlugInFrames.
+*/
+
+{
+ if ( rEvt.GetType() == EVENT_GETFOCUS )
+ {
+/*
+ SfxViewFrame *pFrame = pBindings->GetDispatcher_Impl()->GetFrame();
+ if ( pFrame )
+ pFrame->MakeActive_Impl();
+
+ if ( rEvt.GetType() == EVENT_MOUSEBUTTONDOWN )
+ ModelessDialog::ParentNotify( rEvt );
+ return sal_True;
+ */
+ pBindings->SetActiveFrame( pMgr->GetFrame() );
+ pMgr->Activate_Impl();
+ }
+ else if ( rEvt.GetType() == EVENT_LOSEFOCUS && !HasChildPathFocus() )
+ {
+ pBindings->SetActiveFrame( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > () );
+ pMgr->Deactivate_Impl();
+ }
+ else if( rEvt.GetType() == EVENT_KEYINPUT )
+ {
+ // KeyInput zuerst f"ur Dialogfunktionen zulassen ( TAB etc. )
+ if ( !ModelessDialog::Notify( rEvt ) )
+ // dann auch global g"ultige Acceleratoren verwenden
+ return SfxViewShell::Current()->GlobalKeyInput_Impl( *rEvt.GetKeyEvent() );
+ return sal_True;
+ }
+
+ return ModelessDialog::Notify( rEvt );
+}
+
+// -----------------------------------------------------------------------
+
+SfxModelessDialog::~SfxModelessDialog()
+
+/* [Beschreibung]
+
+ Dtor
+*/
+
+{
+}
+
+//-------------------------------------------------------------------------
+
+sal_Bool SfxModelessDialog::Close()
+
+/* [Beschreibung]
+
+ Das Fenster wird geschlossen, indem das ChildWindow durch Ausf"uhren des
+ ChildWindow-Slots zerst"ort wird.
+ Wird diese Methode von einer abgeleiteten Klasse "uberschrieben, mu\s
+ danach SfxModelessDialogWindow::Close() gerufen werden, wenn nicht das
+ Close() mit "return sal_False" abgebrochen wird.
+
+*/
+
+{
+ // Execute mit Parametern, da Toggle von einigen ChildWindows ignoriert
+ // werden kann
+ SfxBoolItem aValue( pMgr->GetType(), sal_False);
+ pBindings->GetDispatcher_Impl()->Execute(
+ pMgr->GetType(),
+ SFX_CALLMODE_RECORD|SFX_CALLMODE_SYNCHRON, &aValue, 0L );
+ return sal_True;
+}
+
+//-------------------------------------------------------------------------
+
+void SfxModelessDialog::FillInfo(SfxChildWinInfo& rInfo) const
+
+/* [Beschreibung]
+
+ F"ullt ein SfxChildWinInfo mit f"ur SfxModelessDialof spezifischen Daten,
+ damit sie in die INI-Datei geschrieben werden koennen.
+ Es wird angenommen, da\s rInfo alle anderen evt. relevanten Daten in
+ der ChildWindow-Klasse erh"alt.
+ ModelessDialogs haben keine spezifischen Informationen, so da die
+ Basisimplementierung nichts tut und daher nicht gerufen werden mu\s.
+*/
+
+{
+ rInfo.aSize = aSize;
+ if ( IsRollUp() )
+ rInfo.nFlags |= SFX_CHILDWIN_ZOOMIN;
+}
+
+// -----------------------------------------------------------------------
+
+long SfxFloatingWindow::Notify( NotifyEvent& rEvt )
+
+/* [Beschreibung]
+
+ Wenn ein ModelessDialog aktiviert wird, wird sein ViewFrame aktiviert.
+ Notwendig ist das bei PlugInFrames.
+*/
+
+{
+/*
+ if ( rEvt.GetType() == EVENT_GETFOCUS || rEvt.GetType() == EVENT_MOUSEBUTTONDOWN )
+ {
+ SfxViewFrame *pFrame = pBindings->GetDispatcher_Impl()->GetFrame();
+ if ( pFrame )
+ pFrame->MakeActive_Impl();
+
+ if ( rEvt.GetType() == EVENT_MOUSEBUTTONDOWN )
+ FloatingWindow::ParentNotify( rEvt );
+ return sal_True;
+ }
+*/
+ if ( rEvt.GetType() == EVENT_GETFOCUS )
+ {
+ pBindings->SetActiveFrame( pMgr->GetFrame() );
+ pMgr->Activate_Impl();
+ }
+ else if ( rEvt.GetType() == EVENT_LOSEFOCUS )
+ {
+ if ( !HasChildPathFocus() )
+ pMgr->Deactivate_Impl();
+ }
+ else if( rEvt.GetType() == EVENT_KEYINPUT )
+ {
+ // KeyInput zuerst f"ur Dialogfunktionen zulassen
+ if ( !FloatingWindow::Notify( rEvt ) )
+ // dann auch global g"ultige Acceleratoren verwenden
+ return SfxViewShell::Current()->GlobalKeyInput_Impl( *rEvt.GetKeyEvent() );
+ return sal_True;
+ }
+
+ return FloatingWindow::Notify( rEvt );
+}
+
+// -----------------------------------------------------------------------
+
+SfxFloatingWindow::SfxFloatingWindow( SfxBindings *pBindinx,
+ SfxChildWindow *pCW,
+ Window* pParent, WinBits nWinBits) :
+ FloatingWindow (pParent, nWinBits),
+ pBindings(pBindinx),
+ pMgr(pCW)
+
+/* [Beschreibung]
+
+ Konstruktor der allgemeinen Basisklasse f"ur FloatingWindows;
+*/
+
+{
+ sal_uInt32 nId = GetHelpId();
+ SetHelpId(0);
+ SetUniqueId( nId );
+}
+
+// -----------------------------------------------------------------------
+
+SfxFloatingWindow::SfxFloatingWindow( SfxBindings *pBindinx,
+ SfxChildWindow *pCW,
+ Window* pParent,
+ const ResId& rResId) :
+ FloatingWindow(pParent, rResId),
+ pBindings(pBindinx),
+ pMgr(pCW)
+
+/* [Beschreibung]
+
+ Konstruktor der allgemeinen Basisklasse f"ur FloatingWindows;
+*/
+
+{
+ sal_uInt32 nId = GetHelpId();
+ SetHelpId(0);
+ SetUniqueId( nId );
+}
+
+//-------------------------------------------------------------------------
+
+sal_Bool SfxFloatingWindow::Close()
+
+/* [Beschreibung]
+
+ Das Fenster wird geschlossen, indem das ChildWindow durch Ausf"uhren des
+ ChildWindow-Slots zerst"ort wird.
+ Wird diese Methode von einer abgeleiteten Klasse "uberschrieben, mu\s
+ danach SfxFloatingWindow::Close() gerufen werden, wenn nicht das Close()
+ mit "return sal_False" abgebrochen wird.
+
+*/
+
+{
+ // Execute mit Parametern, da Toggle von einigen ChildWindows ignoriert
+ // werden kann
+ SfxBoolItem aValue( pMgr->GetType(), sal_False);
+ pBindings->GetDispatcher_Impl()->Execute(
+ pMgr->GetType(),
+ SFX_CALLMODE_RECORD|SFX_CALLMODE_SYNCHRON, &aValue, 0L );
+ return sal_True;
+}
+
+// -----------------------------------------------------------------------
+
+SfxFloatingWindow::~SfxFloatingWindow()
+
+/* [Beschreibung]
+
+ Dtor
+*/
+
+{
+}
+
+//-------------------------------------------------------------------------
+
+void SfxFloatingWindow::Resize()
+
+/* [Beschreibung]
+
+ Diese virtuelle Methode der Klasse FloatingWindow merkt sich ggf. eine
+ ver"anderte Gr"o\se.
+ Wird diese Methode von einer abgeleiteten Klasse "uberschrieben, mu\s
+ auch SfxFloatingWindow::Resize() gerufen werden.
+*/
+
+{
+ FloatingWindow::Resize();
+ if ( !IsRollUp() )
+ aSize = GetSizePixel();
+}
+
+//-------------------------------------------------------------------------
+
+void SfxFloatingWindow::Initialize(SfxChildWinInfo *pInfo)
+
+/* [Beschreibung]
+
+ Initialisierung der Klasse SfxFloatingWindow "uber ein SfxChildWinInfo.
+ Die Initialisierung erfolgt erst in einem 2.Schritt
+ nach dem ctor und sollte vom ctor der abgeleiteten Klasse
+ oder von dem des SfxChildWindows aufgerufen werden.
+*/
+
+{
+ Point aPos;
+ if ( pInfo->aSize.Width() != 0 && pInfo->aSize.Height() != 0 )
+ {
+ aPos = pInfo->aPos;
+ if ( GetStyle() & WB_SIZEABLE )
+ {
+ Size aMinSize( GetMinOutputSizePixel() );
+ if ( pInfo->aSize.Width() < aMinSize.Width() )
+ pInfo->aSize.Width() = aMinSize.Width();
+ if ( pInfo->aSize.Height() < aMinSize.Height() )
+ pInfo->aSize.Height() = aMinSize.Height();
+ SetSizePixel( pInfo->aSize );
+ }
+
+ // Initiale Gr"o\se aus pInfo merken
+ aSize = GetSizePixel();
+
+ // Soll das FloatingWindow eingezoomt werden ?
+ if ( pInfo->nFlags & SFX_CHILDWIN_ZOOMIN )
+ RollUp();
+ }
+ else
+ {
+ // Initiale Gr"o\se aus Resource oder ctor merken
+ aSize = GetSizePixel();
+ Size aParentSize = GetParent()->GetOutputSizePixel();
+ aPos.X() += (aParentSize.Width() - aSize.Width()) / 2;
+ aPos.Y() += (aParentSize.Height() - aSize.Height()) / 2;
+ }
+
+ Point aPoint;
+ Rectangle aRect = GetDesktopRectPixel();
+ Size aSize( GetSizePixel() );
+ aPoint.X() = aRect.Right() - aSize.Width();
+ aPoint.Y() = aRect.Bottom() - aSize.Height();
+
+ aPoint = OutputToScreenPixel( aPoint );
+
+ if ( aPos.X() > aPoint.X() )
+ aPos.X() = aPoint.X() ;
+ if ( aPos.Y() > aPoint.Y() )
+ aPos.Y() = aPoint.Y();
+
+ if ( aPos.X() < 0 ) aPos.X() = 0;
+ if ( aPos.Y() < 0 ) aPos.Y() = 0;
+
+ SetPosPixel( aPos );
+}
+
+//-------------------------------------------------------------------------
+
+void SfxFloatingWindow::FillInfo(SfxChildWinInfo& rInfo) const
+
+/* [Beschreibung]
+
+ F"ullt ein SfxChildWinInfo mit f"ur SfxFloatingWindow spezifischen Daten,
+ damit sie in die INI-Datei geschrieben werden koennen.
+ Es wird angenommen, da\s rInfo alle anderen evt. relevanten Daten in
+ der ChildWindow-Klasse erh"alt.
+ Eingetragen werden hier gemerkte Gr"o\se und das ZoomIn-Flag.
+ Wird diese Methode "uberschrieben, mu\s zuerst die Basisimplementierung
+ gerufen werden.
+*/
+
+{
+ rInfo.aSize = aSize;
+ if ( IsRollUp() )
+ rInfo.nFlags |= SFX_CHILDWIN_ZOOMIN;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SfxSingleTabDialog, OKHdl_Impl, Button *, pButton )
+
+/* [Beschreibung]
+
+ Ok_Handler; f"ur die gesetzte Page wird FillItemSet() gerufen.
+*/
+
+{
+ if ( !pOutSet )
+ {
+ pOutSet = new SfxItemSet( *pOptions );
+ pOutSet->ClearItem();
+ }
+ sal_Bool bModified = sal_False;
+
+ if ( pPage->HasExchangeSupport() )
+ {
+ int nRet = pPage->DeactivatePage( pOutSet );
+
+ if ( nRet != SfxTabPage::LEAVE_PAGE )
+ return 0;
+ else
+ bModified = ( pOutSet->Count() > 0 );
+ }
+ else
+ bModified = pPage->FillItemSet( *pOutSet );
+
+ if ( bModified )
+ {
+ // auch noch schnell User-Daten im IniManager abspeichern
+ SfxIniManager* pIniMgr = SFX_APP()->GetAppIniManager();
+ pPage->FillUserData();
+ String sData( pPage->GetUserData() );
+
+ if ( sData.Len() )
+ pIniMgr->Set( sData, SFX_KEY_PAGE, GetUniqId() );
+ EndDialog( RET_OK );
+ }
+ else
+ EndDialog( RET_CANCEL );
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+SfxSingleTabDialog::SfxSingleTabDialog
+(
+ Window *pParent,
+ const SfxItemSet& rSet,
+ sal_uInt16 nUniqueId,
+ sal_Bool bGroupBox
+) :
+
+/* [Beschreibung]
+
+ Konstruktor der allgemeinen Basisklasse f"ur SingleTab-Dialoge;
+ ID f"ur das ini-file wird "ubergeben.
+*/
+
+ SfxModalDialog( pParent, nUniqueId, WinBits( WB_STDMODAL | WB_3DLOOK ) ),
+
+ pOKBtn ( 0 ),
+ pCancelBtn ( 0 ),
+ pHelpBtn ( 0 ),
+ pGroupBox ( 0 ),
+
+ pPage ( 0 ),
+ pOptions ( &rSet ),
+ pOutSet ( 0 ),
+ bGrpBox ( bGroupBox )
+
+{
+ DBG_WARNING( "bitte den Ctor mit ViewFrame verwenden" );
+}
+
+// -----------------------------------------------------------------------
+
+SfxSingleTabDialog::SfxSingleTabDialog
+(
+ SfxViewFrame* pViewFrame,
+ Window* pParent,
+ const SfxItemSet& rSet,
+ sal_uInt16 nUniqueId,
+ sal_Bool bGroupBox
+) :
+
+/* [Beschreibung]
+
+ Konstruktor der allgemeinen Basisklasse f"ur SingleTab-Dialoge;
+ ID f"ur das ini-file wird "ubergeben.
+*/
+
+ SfxModalDialog( pParent, nUniqueId, WinBits( WB_STDMODAL | WB_3DLOOK ) ),
+
+ pOKBtn ( 0 ),
+ pCancelBtn ( 0 ),
+ pHelpBtn ( 0 ),
+ pGroupBox ( 0 ),
+
+ pPage ( 0 ),
+ pOptions ( &rSet ),
+ pOutSet ( 0 ),
+ bGrpBox ( bGroupBox )
+
+{
+}
+
+// -----------------------------------------------------------------------
+
+SfxSingleTabDialog::SfxSingleTabDialog
+(
+ Window* pParent,
+ sal_uInt16 nUniqueId,
+ const SfxItemSet* pInSet,
+ sal_Bool bGroupBox
+)
+
+/* [Beschreibung]
+
+ Konstruktor der allgemeinen Basisklasse f"ur SingleTab-Dialoge;
+ ID f"ur das ini-file wird "ubergeben.
+ Sollte nicht mehr benutzt werden.
+ */
+
+: SfxModalDialog( pParent, nUniqueId, WinBits( WB_STDMODAL | WB_3DLOOK ) ),
+
+ pOKBtn ( 0 ),
+ pCancelBtn ( 0 ),
+ pHelpBtn ( 0 ),
+ pGroupBox ( 0 ),
+
+ pPage ( 0 ),
+ pOptions ( pInSet ),
+ pOutSet ( 0 ),
+ bGrpBox ( bGroupBox )
+
+{
+ DBG_WARNING( "bitte den Ctor mit ViewFrame verwenden" );
+}
+
+// -----------------------------------------------------------------------
+
+SfxSingleTabDialog::SfxSingleTabDialog
+(
+ SfxViewFrame* pViewFrame,
+ Window* pParent,
+ sal_uInt16 nUniqueId,
+ const SfxItemSet* pInSet,
+ sal_Bool bGroupBox
+)
+
+/* [Beschreibung]
+
+ Konstruktor der allgemeinen Basisklasse f"ur SingleTab-Dialoge;
+ ID f"ur das ini-file wird "ubergeben.
+*/
+
+: SfxModalDialog( pParent, nUniqueId, WinBits( WB_STDMODAL | WB_3DLOOK ) ),
+
+ pOKBtn ( 0 ),
+ pCancelBtn ( 0 ),
+ pHelpBtn ( 0 ),
+ pGroupBox ( 0 ),
+
+ pPage ( 0 ),
+ pOptions ( pInSet ),
+ pOutSet ( 0 ),
+ bGrpBox ( bGroupBox )
+
+{
+}
+
+// -----------------------------------------------------------------------
+
+SfxSingleTabDialog::~SfxSingleTabDialog()
+
+/* [Beschreibung]
+
+ Dtor; l"oscht ggf. die TabPage.
+ */
+
+{
+ delete pOKBtn;
+ delete pCancelBtn;
+ delete pHelpBtn;
+ delete pGroupBox;
+ delete pPage;
+}
+
+// -----------------------------------------------------------------------
+
+void SfxSingleTabDialog::SetTabPage( SfxTabPage* pTabPage,
+ GetTabPageRanges pRangesFunc )
+/* [Beschreibung]
+
+ Setzen einer (neuen) TabPage; eine bereits vorhandene Page
+ wird gel"oscht.
+ Die "ubergebene Page wird durch Aufruf von Reset() mit dem
+ initial "ubergebenen Itemset initialisiert.
+*/
+
+{
+ DBG_ASSERT( !bGrpBox, "GroupBox no more supported" );
+ bGrpBox = sal_False;
+
+ if ( !pOKBtn )
+ {
+ pOKBtn = new OKButton( this, WB_DEFBUTTON );
+ pOKBtn->SetClickHdl( LINK( this, SfxSingleTabDialog, OKHdl_Impl ) );
+ }
+ if ( !pCancelBtn )
+ pCancelBtn = new CancelButton( this );
+ if ( !pHelpBtn )
+ pHelpBtn = new HelpButton( this );
+ if ( !pGroupBox )
+ pGroupBox = new GroupBox( this );
+
+ if ( pPage )
+ delete pPage;
+ pPage = pTabPage;
+ fnGetRanges = pRangesFunc;
+
+ if ( pPage )
+ {
+ // erstmal die User-Daten besorgen, dann erst Reset()
+ SfxIniManager* pIniMgr = SFX_APP()->GetAppIniManager();
+ pPage->SetUserData( pIniMgr->Get( SFX_KEY_PAGE, GetUniqId() ) );
+ pPage->Reset( *pOptions );
+ pPage->Show();
+
+ // Gr"ossen und Positionen anpassen
+ pPage->SetPosPixel( Point() );
+ Size aOutSz( pPage->GetSizePixel() );
+ Size aBtnSiz = LogicToPixel( Size( 50, 14 ), MAP_APPFONT );
+ Point aPnt( aOutSz.Width(),
+ LogicToPixel( Point( 0, 6 ), MAP_APPFONT ).Y() );
+ aOutSz.Width() += aBtnSiz.Width() +
+ LogicToPixel( Size( 6, 0 ), MAP_APPFONT ).Width();
+ SetOutputSizePixel( aOutSz );
+ pOKBtn->SetPosSizePixel( aPnt, aBtnSiz );
+ pOKBtn->Show();
+ aPnt.Y() = LogicToPixel( Point( 0, 23 ), MAP_APPFONT ).Y();
+ pCancelBtn->SetPosSizePixel( aPnt, aBtnSiz );
+ pCancelBtn->Show();
+ aPnt.Y() = LogicToPixel( Point( 0, 43 ), MAP_APPFONT ).Y();
+ pHelpBtn->SetPosSizePixel( aPnt, aBtnSiz );
+
+ if ( Help::IsContextHelpEnabled() )
+ pHelpBtn->Show();
+
+ // Text der TabPage in den Dialog setzen
+ SetText( pPage->GetText() );
+
+ // Dialog bekommt HelpId der TabPage
+ SetHelpId( pPage->GetHelpId() );
+ SetUniqueId( pPage->GetUniqueId() );
+ }
+}
+
+//--------------------------------------------------------------------
+// Vergleichsfunktion fuer qsort
+
+#ifdef WNT
+int __cdecl BaseDlgsCmpUS_Impl( const void* p1, const void* p2 )
+#else
+#if defined(OS2) && defined(ICC)
+int _Optlink BaseDlgsCmpUS_Impl( const void* p1, const void* p2 )
+#else
+int BaseDlgsCmpUS_Impl( const void* p1, const void* p2 )
+#endif
+#endif
+{
+ return *(sal_uInt16*)p1 - *(sal_uInt16*)p2;
+}
+
+// -----------------------------------------------------------------------
+
+/*
+ Bildet das Set "uber die Ranges der Page. Die Page muss die statische
+ Methode f"ur das Erfragen ihrer Ranges bei SetTabPage angegeben haben,
+ liefert also ihr Set onDemand.
+ */
+const sal_uInt16* SfxSingleTabDialog::GetInputRanges( const SfxItemPool& rPool )
+{
+ if ( pOptions )
+ {
+ DBG_ERROR( "Set bereits vorhanden!" );
+ return pOptions->GetRanges();
+ }
+
+ if ( pRanges )
+ return pRanges;
+ SvUShorts aUS(16, 16);
+
+ if ( fnGetRanges)
+ {
+ const sal_uInt16 *pTmpRanges = (fnGetRanges)();
+ const sal_uInt16 *pIter = pTmpRanges;
+ sal_uInt16 nLen;
+ for ( nLen = 0; *pIter; ++nLen, ++pIter )
+ ;
+ aUS.Insert( pTmpRanges, nLen, aUS.Count() );
+ }
+
+ //! Doppelte Ids entfernen?
+ sal_uInt16 nCount = aUS.Count();
+
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
+ aUS[i] = rPool.GetWhich( aUS[i]) ;
+
+ // sortieren
+ if ( aUS.Count() > 1 )
+ qsort( (void*)aUS.GetData(), aUS.Count(), sizeof(sal_uInt16), BaseDlgsCmpUS_Impl );
+
+ pRanges = new sal_uInt16[aUS.Count() + 1];
+ memcpy( pRanges, aUS.GetData(), sizeof(sal_uInt16) * aUS.Count() );
+ pRanges[aUS.Count()] = 0;
+ return pRanges;
+}
+
+
diff --git a/sfx2/source/dialog/cfg.cxx b/sfx2/source/dialog/cfg.cxx
new file mode 100644
index 000000000000..538e2bf1acc5
--- /dev/null
+++ b/sfx2/source/dialog/cfg.cxx
@@ -0,0 +1,1376 @@
+/*************************************************************************
+ *
+ * $RCSfile: cfg.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:30 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _SV_HELP_HXX //autogen
+#include <vcl/help.hxx>
+#endif
+#ifndef _SBXCLASS_HXX //autogen
+#include <svtools/sbx.hxx>
+#endif
+#ifndef _SB_SBSTAR_HXX //autogen
+#include <basic/sbstar.hxx>
+#endif
+#ifndef __SBX_SBXMETHOD_HXX //autogen
+#include <svtools/sbxmeth.hxx>
+#endif
+#ifndef _SB_SBMOD_HXX //autogen
+#include <basic/sbmod.hxx>
+#endif
+#ifndef _BASMGR_HXX //autogen
+#include <basic/basmgr.hxx>
+#endif
+#ifndef _SFXINIMGR_HXX //autogen
+#include <svtools/iniman.hxx>
+#endif
+#ifndef _SV_WRKWIN_HXX //autogen
+#include <vcl/wrkwin.hxx>
+#endif
+#include <tools/urlobj.hxx>
+#pragma hdrstop
+
+#include "cfg.hxx"
+
+#include "dialog.hrc"
+#include "cfg.hrc"
+
+#ifdef MAC
+#ifndef _EXTATTR_HXX //autogen
+#include <svtools/extattr.hxx>
+#endif
+#endif
+
+#include "app.hxx"
+#include "appdata.hxx"
+#include "msg.hxx"
+#include "msgpool.hxx"
+#include "stbmgr.hxx"
+#include "sfxresid.hxx"
+#include "macrconf.hxx"
+#include "minfitem.hxx"
+#include "cfgmgr.hxx"
+#include "sfxresid.hxx"
+#include "objsh.hxx"
+#include "dispatch.hxx"
+#include "sfxtypes.hxx"
+#include "eventdlg.hxx"
+#include "tbxopdlg.hxx"
+#include "minfitem.hxx"
+#include "iodlg.hxx"
+#include "inimgr.hxx"
+#include "viewfrm.hxx"
+
+#define _SVSTDARR_STRINGSDTOR
+#include <svtools/svstdarr.hxx>
+
+struct SfxStatBarInfo_Impl
+{
+ USHORT nId;
+ String aHelpText;
+
+ SfxStatBarInfo_Impl(USHORT nID, String aString) :
+ nId(nID),
+ aHelpText(aString)
+ {}
+};
+
+DECL_PTRARRAY(SfxStbInfoArr_Impl, SfxStatBarInfo_Impl*, 20, 4);
+SV_IMPL_PTRARR(SfxGroupInfoArr_Impl, SfxGroupInfoPtr);
+
+SfxMenuConfigEntry::SfxMenuConfigEntry( USHORT nInitId, const String& rInitStr,
+ const String& rHelpText, BOOL bPopup )
+ : nId( nInitId )
+ , bPopUp(bPopup)
+ , aHelpText(rHelpText)
+ , aStr(rInitStr)
+{
+ if ( SfxMacroConfig::IsMacroSlot( nId ) )
+ SFX_APP()->GetMacroConfig()->RegisterSlotId( nId );
+}
+
+void SfxMenuConfigEntry::SetId( USHORT nNew )
+{
+ if ( SfxMacroConfig::IsMacroSlot( nId ) )
+ SFX_APP()->GetMacroConfig()->ReleaseSlotId( nId );
+ nId = nNew;
+ if ( SfxMacroConfig::IsMacroSlot( nId ) )
+ SFX_APP()->GetMacroConfig()->RegisterSlotId( nId );
+}
+
+SfxMenuConfigEntry::~SfxMenuConfigEntry()
+{
+ if ( SfxMacroConfig::IsMacroSlot( nId ) )
+ SFX_APP()->GetMacroConfig()->ReleaseSlotId( nId );
+}
+
+SfxConfigFunctionListBox_Impl::SfxConfigFunctionListBox_Impl( Window* pParent, const ResId& rResId)
+/* Beschreibung
+ Diese Listbox arbeiteitet mit der Grouplistbox zusammen und zeigt die zur Konfigurierung verf"ugbaren
+ Funktionen bzw. Macros an, die zur selektierten Gruppe bzw. zum selektierten Modul in der Grouplistbox
+ geh"oren.
+*/
+ : SvTreeListBox( pParent, rResId )
+ , pCurEntry( 0 )
+{
+ SetWindowBits( GetStyle() | WB_CLIPCHILDREN | WB_HSCROLL | WB_SORT );
+ GetModel()->SetSortMode( SortAscending );
+
+ // Timer f"ur die BallonHelp
+ aTimer.SetTimeout( 200 );
+ aTimer.SetTimeoutHdl(
+ LINK( this, SfxConfigFunctionListBox_Impl, TimerHdl ) );
+}
+
+SfxConfigFunctionListBox_Impl::~SfxConfigFunctionListBox_Impl()
+{
+ ClearAll();
+}
+
+void SfxConfigFunctionListBox_Impl::MouseMove( const MouseEvent& rMEvt )
+/* Beschreibung
+ Virtuelle Methode, die gerufen wird, wenn der Mauszeiger "uber der TreeListBox bewegt wurde.
+ Wenn die Position des Mauszeigers "uber dem aktuell selektierten Entry liegt, wird ein Timer
+ aufgesetzt, um ggf. einen Hilfetext einzublenden.
+*/
+{
+ Point aMousePos = rMEvt.GetPosPixel();
+ pCurEntry = GetCurEntry();
+
+ if ( pCurEntry && GetEntry( aMousePos ) == pCurEntry )
+ aTimer.Start();
+ else
+ {
+ Help::ShowBalloon( this, aMousePos, String() );
+ aTimer.Stop();
+ }
+}
+
+
+IMPL_LINK( SfxConfigFunctionListBox_Impl, TimerHdl, Timer*, pTimer)
+/* Beschreibung
+ Timer-Handler f"ur die Einblendung eines Hilfetextes. Wenn nach Ablauf des Timers
+ der Mauszeiger immer noch auf dem aktuell selektierten Eintrag steht, wird der
+ Helptext des Entries als Balloon-Help eingeblendet.
+*/
+{
+ aTimer.Stop();
+ Point aMousePos = GetPointerPosPixel();
+ SvLBoxEntry *pEntry = GetCurEntry();
+ if ( pEntry && GetEntry( aMousePos ) == pEntry && pCurEntry == pEntry )
+ Help::ShowBalloon( this, OutputToScreenPixel( aMousePos ), GetHelpText( pEntry ) );
+ return 0L;
+}
+
+void SfxConfigFunctionListBox_Impl::ClearAll()
+/* Beschreibung
+ L"oscht alle Eintr"age in der FunctionListBox, alle UserDaten und alle evtl.
+ vorhandenen MacroInfos.
+*/
+{
+ USHORT nCount = aArr.Count();
+ for ( USHORT i=0; i<nCount; i++ )
+ {
+ SfxGroupInfo_Impl *pData = aArr[i];
+ if ( pData->nKind == SFX_CFGFUNCTION_MACRO )
+ {
+ SfxMacroInfo *pInfo = (SfxMacroInfo*) pData->pObject;
+ SFX_APP()->GetMacroConfig()->ReleaseSlotId( pInfo->GetSlotId() );
+ delete pInfo;
+ }
+ delete pData;
+ }
+
+ aArr.Remove( 0, nCount );
+ Clear();
+}
+
+SvLBoxEntry* SfxConfigFunctionListBox_Impl::GetEntry_Impl( const String& rName )
+/* Beschreibung
+ Ermittelt den SvLBoxEntry zu einem "ubergebenen String. Das setzt voraus, da\s
+ die Namen eindeutig sind.
+*/
+{
+ SvLBoxEntry *pEntry = First();
+ while ( pEntry )
+ {
+ if ( GetEntryText( pEntry ) == rName )
+ return pEntry;
+ pEntry = Next( pEntry );
+ }
+
+ return NULL;
+}
+
+SvLBoxEntry* SfxConfigFunctionListBox_Impl::GetEntry_Impl( USHORT nId )
+/* Beschreibung
+ Ermittelt den SvLBoxEntry zu einer "ubergebenen Id.
+*/
+{
+ SvLBoxEntry *pEntry = First();
+ while ( pEntry )
+ {
+ SfxGroupInfo_Impl *pData = (SfxGroupInfo_Impl*) pEntry->GetUserData();
+ if ( pData && pData->nOrd == nId )
+ return pEntry;
+ pEntry = Next( pEntry );
+ }
+
+ return NULL;
+}
+
+SfxMacroInfo* SfxConfigFunctionListBox_Impl::GetMacroInfo()
+/* Beschreibung
+ Gibt die MacroInfo des selektierten Entry zur"uck ( sofern vorhanden ).
+*/
+{
+ SvLBoxEntry *pEntry = FirstSelected();
+ if ( pEntry )
+ {
+ SfxGroupInfo_Impl *pData = (SfxGroupInfo_Impl*) pEntry->GetUserData();
+ if ( pData && pData->nKind == SFX_CFGFUNCTION_MACRO )
+ return (SfxMacroInfo*) pData->pObject;
+ }
+
+ return 0;
+}
+
+USHORT SfxConfigFunctionListBox_Impl::GetId( SvLBoxEntry *pEntry )
+/* Beschreibung
+ Gibt die Ordnungsnummer ( SlotId oder Macro-Nummer ) des Eintrags zur"uck.
+*/
+{
+ SfxGroupInfo_Impl *pData = pEntry ?
+ (SfxGroupInfo_Impl*) pEntry->GetUserData() : 0;
+ if ( pData )
+ return pData->nOrd;
+ return 0;
+}
+
+String SfxConfigFunctionListBox_Impl::GetHelpText( SvLBoxEntry *pEntry )
+/* Beschreibung
+ Gibt den Helptext des selektierten Entry zur"uck.
+*/
+{
+ // Information zum selektierten Entry aus den Userdaten holen
+ SfxGroupInfo_Impl *pInfo = pEntry ? (SfxGroupInfo_Impl*) pEntry->GetUserData(): 0;
+ if ( pInfo )
+ {
+ if ( pInfo->nKind == SFX_CFGFUNCTION_SLOT )
+ {
+ // Eintrag ist eine Funktion, Hilfe aus der Office-Hilfe
+ USHORT nId = pInfo->nOrd;
+ String aText = Application::GetHelp()->GetHelpText( nId );
+ if ( !aText.Len() )
+ aText = SFX_SLOTPOOL().GetSlotHelpText_Impl( nId );
+ return aText;
+ }
+ else
+ {
+ // Eintrag ist ein Macro, Hilfe aus der MacroInfo
+ SfxMacroInfo *pMacInfo = (SfxMacroInfo*) pInfo->pObject;
+ return pMacInfo->GetHelpText();
+ }
+ }
+
+ return String();
+}
+
+void SfxConfigFunctionListBox_Impl::FunctionSelected()
+/* Beschreibung
+ Setzt die Balloonhelp zur"uck, da diese immer den Helptext des selektierten
+ Entry anzeigen soll.
+*/
+{
+ Help::ShowBalloon( this, Point(), String() );
+}
+
+SfxConfigGroupListBox_Impl::SfxConfigGroupListBox_Impl(
+ Window* pParent, const ResId& rResId, ULONG nConfigMode )
+ : SvTreeListBox( pParent, rResId )
+ , aScriptType( DEFINE_CONST_UNICODE("StarBasic") )
+ , nMode( nConfigMode )
+/* Beschreibung
+ Diese Listbox zeigt alle Funktionsgruppen und Basics an, die zur Konfiguration
+ zur Verf"ugung stehen. Basics werden noch in Bibliotheken und Module untergliedert.
+*/
+{
+ SetWindowBits( GetStyle() | WB_CLIPCHILDREN | WB_HSCROLL | WB_HASBUTTONS | WB_HASLINES | WB_HASLINESATROOT | WB_HASBUTTONSATROOT );
+ SetNodeBitmaps( Image( BMP_COLLAPSED ), Image( BMP_EXPANDED ) );
+}
+
+
+SfxConfigGroupListBox_Impl::~SfxConfigGroupListBox_Impl()
+{
+}
+
+void SfxConfigGroupListBox_Impl::SetScriptType( const String& rScriptType )
+{
+ aScriptType = rScriptType;
+ ULONG nPos=0;
+ SvLBoxEntry *pEntry = (SvLBoxEntry*) GetModel()->GetEntryAtAbsPos( nPos++ );
+ while ( pEntry )
+ {
+ SfxGroupInfo_Impl *pInfo = (SfxGroupInfo_Impl*) pEntry->GetUserData();
+ if ( pInfo->nKind == SFX_CFGGROUP_BASICLIB && ( IsExpanded( pEntry ) || pInfo->bWasOpened ) )
+ {
+ Collapse( pEntry );
+ SvLBoxEntry *pChild = FirstChild( pEntry );
+ while (pChild)
+ {
+ GetModel()->Remove( pChild );
+ pChild = FirstChild( pEntry );
+ }
+
+ Expand( pEntry );
+ }
+
+ pEntry = (SvLBoxEntry*) GetModel()->GetEntryAtAbsPos( nPos++ );
+ }
+}
+
+String SfxConfigGroupListBox_Impl::GetGroup()
+/* Beschreibung
+ Gibt den Namen der selektierten Funktionsgruppe bzw. des selektierten
+ Basics zur"uck.
+*/
+{
+ SvLBoxEntry *pEntry = FirstSelected();
+ while ( pEntry )
+ {
+ SfxGroupInfo_Impl *pInfo = (SfxGroupInfo_Impl*) pEntry->GetUserData();
+ if ( pInfo->nKind == SFX_CFGGROUP_FUNCTION )
+ {
+ return GetEntryText( pEntry );
+ break;
+ }
+
+ if ( pInfo->nKind == SFX_CFGGROUP_BASICMGR )
+ {
+ BasicManager *pMgr = (BasicManager*) pInfo->pObject;
+ return pMgr->GetName();
+ break;
+ }
+
+ if ( pInfo->nKind == SFX_CFGGROUP_DOCBASICMGR )
+ {
+ SfxObjectShell *pDoc = (SfxObjectShell*) pInfo->pObject;
+ return pDoc->GetTitle();
+ break;
+ }
+
+ pEntry = GetParent( pEntry );
+ }
+
+ return String();
+}
+
+void SfxConfigGroupListBox_Impl::Init( SvStringsDtor *pArr )
+/* Beschreibung
+ Die Groupbox wird mit allen Funktionsgruppen und allen Basics gef"ullt
+*/
+{
+ SetUpdateMode(FALSE);
+ SfxApplication *pSfxApp = SFX_APP();
+
+ // Verwendet wird der aktuelle Slotpool
+ if ( nMode )
+ {
+ for ( USHORT i=1; i<SFX_SLOTPOOL().GetGroupCount(); i++ )
+ {
+ // Gruppe anw"ahlen ( Gruppe 0 ist intern )
+ String aName = pSfxApp->GetSlotPool().SeekGroup( i );
+ const SfxSlot *pSfxSlot = SFX_SLOTPOOL().FirstSlot();
+ if ( pSfxSlot )
+ {
+ // Wenn Gruppe nicht leer
+ SvLBoxEntry *pEntry = InsertEntry( aName, NULL );
+ SfxGroupInfo_Impl *pInfo = new SfxGroupInfo_Impl( SFX_CFGGROUP_FUNCTION, i );
+ aArr.Insert( pInfo, aArr.Count() );
+ pEntry->SetUserData( pInfo );
+ }
+ }
+ }
+
+ // Basics einsammeln
+ pSfxApp->EnterBasicCall();
+ String aMacroName(' ');
+ aMacroName += String(SfxResId(STR_BASICMACROS));
+
+ // Zuerst AppBasic
+ BasicManager *pAppBasicMgr = pSfxApp->GetBasicManager();
+ BOOL bInsert = TRUE;
+ if ( pArr )
+ {
+ bInsert = FALSE;
+ for ( USHORT n=0; n<pArr->Count(); n++ )
+ {
+ if ( *(*pArr)[n] == pSfxApp->GetName() )
+ {
+ bInsert = TRUE;
+ break;
+ }
+ }
+ }
+
+ if ( bInsert )
+ {
+ pAppBasicMgr->SetName( pSfxApp->GetName() );
+ if ( pAppBasicMgr->GetLibCount() )
+ {
+ // Nur einf"ugen, wenn Bibliotheken vorhanden
+ String aAppBasTitle( SfxResId( STR_HUMAN_APPNAME ) );
+ aAppBasTitle += aMacroName;
+ SvLBoxEntry *pEntry = InsertEntry( aAppBasTitle, 0 );
+ SfxGroupInfo_Impl *pInfo = new SfxGroupInfo_Impl( SFX_CFGGROUP_BASICMGR, 0, pAppBasicMgr );
+ aArr.Insert( pInfo, aArr.Count() );
+ pEntry->SetUserData( pInfo );
+ pEntry->EnableChildsOnDemand( TRUE );
+// Expand( pEntry );
+ }
+ }
+
+ SfxObjectShell *pDoc = SfxObjectShell::GetFirst();
+ while ( pDoc )
+ {
+ BOOL bInsert = TRUE;
+ if ( pArr )
+ {
+ bInsert = FALSE;
+ for ( USHORT n=0; n<pArr->Count(); n++ )
+ {
+ if ( *(*pArr)[n] == pDoc->GetTitle() )
+ {
+ bInsert = TRUE;
+ break;
+ }
+ }
+ }
+
+ if ( bInsert )
+ {
+ BasicManager *pBasicMgr = pDoc->GetBasicManager();
+ if ( pBasicMgr != pAppBasicMgr && pBasicMgr->GetLibCount() )
+ {
+ pBasicMgr->SetName( pDoc->GetTitle() );
+
+ // Nur einf"ugen, wenn eigenes Basic mit Bibliotheken
+ SvLBoxEntry *pEntry = InsertEntry( pDoc->GetTitle().Append(aMacroName), NULL );
+ SfxGroupInfo_Impl *pInfo =
+ new SfxGroupInfo_Impl( SFX_CFGGROUP_DOCBASICMGR, 0, pDoc );
+ aArr.Insert( pInfo, aArr.Count() );
+ pEntry->SetUserData( pInfo );
+ pEntry->EnableChildsOnDemand( TRUE );
+// Expand( pEntry );
+ }
+ }
+
+ pDoc = SfxObjectShell::GetNext(*pDoc);
+ }
+
+ pSfxApp->LeaveBasicCall();
+ MakeVisible( GetEntry( 0,0 ) );
+ SetUpdateMode( TRUE );
+}
+
+void SfxConfigGroupListBox_Impl::GroupSelected()
+/* Beschreibung
+ Eine Funktionsgruppe oder eine Basicmodul wurde selektiert. Alle Funktionen bzw.
+ Macros werden in der Functionlistbox anzeigt.
+*/
+{
+ SvLBoxEntry *pEntry = FirstSelected();
+ SfxGroupInfo_Impl *pInfo = (SfxGroupInfo_Impl*) pEntry->GetUserData();
+ pFunctionListBox->SetUpdateMode(FALSE);
+ pFunctionListBox->ClearAll();
+ if ( pInfo->nKind != SFX_CFGGROUP_FUNCTION &&
+ pInfo->nKind != SFX_CFGGROUP_BASICMOD )
+ {
+ pFunctionListBox->SetUpdateMode(TRUE);
+ return;
+ }
+
+ switch ( pInfo->nKind )
+ {
+ case SFX_CFGGROUP_FUNCTION :
+ {
+ USHORT nGroup = pInfo->nOrd;
+ String aSelectedGroup = SFX_SLOTPOOL().SeekGroup( nGroup );
+ if ( aSelectedGroup != String() )
+ {
+ const SfxSlot *pSfxSlot = SFX_SLOTPOOL().FirstSlot();
+ while ( pSfxSlot )
+ {
+ USHORT nId = pSfxSlot->GetSlotId();
+#ifdef UNX
+ if ( nId != SID_DESKTOPMODE && ( pSfxSlot->GetMode() & nMode ) )
+#else
+ if ( pSfxSlot->GetMode() & nMode )
+#endif
+ {
+ String aName = SFX_SLOTPOOL().GetSlotName_Impl( *pSfxSlot );
+ if ( aName.Len() && !pFunctionListBox->GetEntry_Impl( nId ) )
+ {
+#ifdef DBG_UTIL
+ if ( pFunctionListBox->GetEntry_Impl( aName ) )
+ DBG_WARNINGFILE( "function name already exits" );
+#endif
+ // Wenn die Namen unterschiedlich sind, dann auch die Funktion, denn zu
+ // einer Id liefert der Slotpool immer den gleichen Namen!
+ SvLBoxEntry* pFuncEntry = pFunctionListBox->InsertEntry( aName, NULL );
+ SfxGroupInfo_Impl *pInfo = new SfxGroupInfo_Impl( SFX_CFGFUNCTION_SLOT, nId );
+ pFunctionListBox->aArr.Insert( pInfo, pFunctionListBox->aArr.Count() );
+ pFuncEntry->SetUserData( pInfo );
+ }
+ }
+
+ pSfxSlot = SFX_SLOTPOOL().NextSlot();
+ }
+ }
+
+ break;
+ }
+
+ case SFX_CFGGROUP_BASICMOD :
+ {
+ SvLBoxEntry *pLibEntry = GetParent( pEntry );
+ SfxGroupInfo_Impl *pLibInfo =
+ (SfxGroupInfo_Impl*) pLibEntry->GetUserData();
+ SvLBoxEntry *pBasEntry = GetParent( pLibEntry );
+ SfxGroupInfo_Impl *pBasInfo =
+ (SfxGroupInfo_Impl*) pBasEntry->GetUserData();
+
+ StarBASIC *pLib = (StarBASIC*) pLibInfo->pObject;
+ SfxObjectShell *pDoc = NULL;
+ if ( pBasInfo->nKind == SFX_CFGGROUP_DOCBASICMGR )
+ pDoc = (SfxObjectShell*) pBasInfo->pObject;
+
+ SbModule *pMod = (SbModule*) pInfo->pObject;
+ for ( USHORT nMeth=0; nMeth < pMod->GetMethods()->Count(); nMeth++ )
+ {
+ SbxMethod *pMeth = (SbxMethod*)pMod->GetMethods()->Get(nMeth);
+ SfxMacroInfoPtr pInf = new SfxMacroInfo( pDoc,
+ pLib->GetName(),
+ pMod->GetName(),
+ pMeth->GetName());
+ if ( pMeth->GetInfo() )
+ pInf->SetHelpText( pMeth->GetInfo()->GetComment() );
+ USHORT nId = SFX_APP()->GetMacroConfig()->GetSlotId( pInf );
+ if ( !nId )
+ break; // Kein Slot mehr frei
+
+ SvLBoxEntry* pFuncEntry =
+ pFunctionListBox->InsertEntry( pMeth->GetName(), NULL );
+ SfxGroupInfo_Impl *pInfo =
+ new SfxGroupInfo_Impl( SFX_CFGFUNCTION_MACRO, nId, pInf );
+ pFunctionListBox->aArr.Insert( pInfo, pFunctionListBox->aArr.Count() );
+ pFuncEntry->SetUserData( pInfo );
+ }
+
+ break;
+ }
+
+ default:
+ {
+ return;
+ break;
+ }
+ }
+
+ if ( pFunctionListBox->GetEntryCount() )
+ pFunctionListBox->Select( pFunctionListBox->GetEntry( 0, 0 ) );
+
+ pFunctionListBox->SetUpdateMode(TRUE);
+}
+
+BOOL SfxConfigGroupListBox_Impl::Expand( SvLBoxEntry* pParent )
+{
+ BOOL bRet = SvTreeListBox::Expand( pParent );
+ if ( bRet )
+ {
+ // Wieviele Entries k"onnen angezeigt werden ?
+ ULONG nEntries = GetOutputSizePixel().Height() / GetEntryHeight();
+
+ // Wieviele Kinder sollen angezeigt werden ?
+ ULONG nChildCount = GetVisibleChildCount( pParent );
+
+ // Passen alle Kinder und der parent gleichzeitig in die View ?
+ if ( nChildCount+1 > nEntries )
+ {
+ // Wenn nicht, wenigstens parent ganz nach oben schieben
+ MakeVisible( pParent, TRUE );
+ }
+ else
+ {
+ // An welcher relativen ViewPosition steht der aufzuklappende parent
+ SvLBoxEntry *pEntry = GetFirstEntryInView();
+ ULONG nParentPos = 0;
+ while ( pEntry && pEntry != pParent )
+ {
+ nParentPos++;
+ pEntry = GetNextEntryInView( pEntry );
+ }
+
+ // Ist unter dem parent noch genug Platz f"ur alle Kinder ?
+ if ( nParentPos + nChildCount + 1 > nEntries )
+ ScrollOutputArea( (short)( nEntries - ( nParentPos + nChildCount + 1 ) ) );
+ }
+ }
+
+ return bRet;
+}
+
+void SfxConfigGroupListBox_Impl::RequestingChilds( SvLBoxEntry *pEntry )
+/* Beschreibung
+ Ein Basic oder eine Bibliothek werden ge"offnet
+*/
+{
+ SfxGroupInfo_Impl *pInfo = (SfxGroupInfo_Impl*) pEntry->GetUserData();
+ pInfo->bWasOpened = TRUE;
+ switch ( pInfo->nKind )
+ {
+ case SFX_CFGGROUP_BASICMGR :
+ case SFX_CFGGROUP_DOCBASICMGR :
+ {
+ if ( !GetChildCount( pEntry ) )
+ {
+ // Erstmaliges "Offnen
+ BasicManager *pMgr;
+ if ( pInfo->nKind == SFX_CFGGROUP_DOCBASICMGR )
+ pMgr = ((SfxObjectShell*)pInfo->pObject)->GetBasicManager();
+ else
+ pMgr = (BasicManager*) pInfo->pObject;
+
+ SvLBoxEntry *pLibEntry = 0;
+ for ( USHORT nLib=0; nLib<pMgr->GetLibCount(); nLib++)
+ {
+ StarBASIC* pLib = pMgr->GetLib( nLib );
+ pLibEntry = InsertEntry( pMgr->GetLibName( nLib ), pEntry );
+ SfxGroupInfo_Impl *pInfo = new SfxGroupInfo_Impl( SFX_CFGGROUP_BASICLIB, nLib, pLib );
+ aArr.Insert( pInfo, aArr.Count() );
+ pLibEntry->SetUserData( pInfo );
+ pLibEntry->EnableChildsOnDemand( TRUE );
+ }
+ }
+
+ break;
+ }
+
+ case SFX_CFGGROUP_BASICLIB :
+ {
+ if ( !GetChildCount( pEntry ) )
+ {
+ // Erstmaliges "Offnen
+ StarBASIC *pLib = (StarBASIC*) pInfo->pObject;
+ if ( !pLib )
+ {
+ // Lib mu\s nachgeladen werden
+ SvLBoxEntry *pParent = GetParent( pEntry );
+ SfxGroupInfo_Impl *pInf =
+ (SfxGroupInfo_Impl*) pParent->GetUserData();
+ BasicManager *pMgr;
+ if ( pInf->nKind == SFX_CFGGROUP_DOCBASICMGR )
+ pMgr = ((SfxObjectShell*)pInf->pObject)->GetBasicManager();
+ else
+ pMgr = (BasicManager*) pInf->pObject;
+
+ if ( pMgr->LoadLib( pInfo->nOrd ) )
+ pInfo->pObject = pLib = pMgr->GetLib( pInfo->nOrd );
+ else
+ break;
+ }
+
+ SvLBoxEntry *pModEntry = 0;
+ for ( USHORT nMod=0; nMod<pLib->GetModules()->Count(); nMod++ )
+ {
+ SbModule* pMod = (SbModule*)pLib->GetModules()->Get( nMod );
+
+ BOOL bIsStarScript = FALSE; //pMod->ISA( SbJScriptModule );
+ BOOL bWantsStarScript = aScriptType.EqualsAscii("StarScript");
+ if ( bIsStarScript != bWantsStarScript )
+ continue;
+ pModEntry = InsertEntry( pMod->GetName(), pEntry );
+ SfxGroupInfo_Impl *pInfo = new SfxGroupInfo_Impl( SFX_CFGGROUP_BASICMOD, 0, pMod );
+ aArr.Insert( pInfo, aArr.Count() );
+ pModEntry->SetUserData( pInfo );
+ }
+ }
+
+ break;
+ }
+
+ default:
+ DBG_ERROR( "Falscher Gruppentyp!" );
+ break;
+ }
+}
+
+void SfxConfigGroupListBox_Impl::SelectMacro( const SfxMacroInfoItem *pItem )
+{
+ SelectMacro( pItem->GetBasicManager()->GetName(),
+ pItem->GetQualifiedName() );
+}
+
+void SfxConfigGroupListBox_Impl::SelectMacro( const String& rBasic,
+ const String& rMacro )
+{
+ String aBasicName(' ');
+ aBasicName += rBasic;
+ aBasicName += String(SfxResId(STR_BASICMACROS));
+ String aLib, aModule, aMethod;
+ USHORT nCount = rMacro.GetTokenCount('.');
+ aMethod = rMacro.GetToken( nCount-1, '.' );
+ if ( nCount > 2 )
+ {
+ aLib = rMacro.GetToken( 0, '.' );
+ aModule = rMacro.GetToken( nCount-2, '.' );
+ }
+
+ SvLBoxEntry *pEntry = FirstChild(0);
+ while ( pEntry )
+ {
+ String aEntryBas = GetEntryText( pEntry );
+ if ( aEntryBas == aBasicName )
+ {
+ Expand( pEntry );
+ SvLBoxEntry *pLib = FirstChild( pEntry );
+ while ( pLib )
+ {
+ String aEntryLib = GetEntryText( pLib );
+ if ( aEntryLib == aLib )
+ {
+ Expand( pLib );
+ SvLBoxEntry *pMod = FirstChild( pLib );
+ while ( pMod )
+ {
+ String aEntryMod = GetEntryText( pMod );
+ if ( aEntryMod == aModule )
+ {
+ Expand( pMod );
+ MakeVisible( pMod );
+ Select( pMod );
+ SvLBoxEntry *pMethod = pFunctionListBox->First();
+ while ( pMethod )
+ {
+ String aEntryMethod = GetEntryText( pMethod );
+ if ( aEntryMethod == aMethod )
+ {
+ pFunctionListBox->Select( pMethod );
+ pFunctionListBox->MakeVisible( pMethod );
+ return;
+ }
+ pMethod = pFunctionListBox->Next( pMethod );
+ }
+ }
+ pMod = NextSibling( pMod );
+ }
+ }
+ pLib = NextSibling( pLib );
+ }
+ }
+ pEntry = NextSibling( pEntry );
+ }
+}
+
+void SfxConfigDialog::ActivateToolBoxConfig( USHORT nId )
+{
+ SetCurPageId( TP_CONFIG_OBJECTBAR );
+ nObjectBar = nId;
+}
+
+void SfxConfigDialog::PageCreated( USHORT nId, SfxTabPage& rPage )
+{
+ switch ( nId )
+ {
+ case TP_CONFIG_OBJECTBAR :
+ if ( nObjectBar )
+ ((SfxObjectBarConfigPage&)rPage).SetObjectBarId( nObjectBar );
+ break;
+ case TP_CONFIG_ACCEL:
+ if ( pMacroInfo )
+ ((SfxAcceleratorConfigPage&)rPage).SelectMacro( pMacroInfo );
+ break;
+ default:
+ break;
+ }
+}
+
+void SfxConfigDialog::ActivateMacroConfig(const SfxMacroInfoItem *pInfo)
+{
+ // Bei Aufruf "uber die Basic-IDE soll defaultm"a\sig die Tastaturkonfiguration
+ // angeboten werden
+ SetCurPageId( TP_CONFIG_ACCEL );
+ pMacroInfo = pInfo;
+}
+
+SfxTabPage *CreateMenuConfigPage( Window *pParent, const SfxItemSet& rSet )
+{
+ return new SfxMenuConfigPage( pParent, rSet );
+}
+
+SfxTabPage *CreateAccelConfigPage( Window *pParent, const SfxItemSet& rSet )
+{
+ return new SfxAcceleratorConfigPage( pParent, rSet );
+}
+
+SfxTabPage *CreateStatusBarConfigPage( Window *pParent, const SfxItemSet& rSet )
+{
+ return new SfxStatusBarConfigPage( pParent, rSet );
+}
+
+SfxTabPage *CreateObjectBarConfigPage( Window *pParent, const SfxItemSet& rSet )
+{
+ return new SfxObjectBarConfigPage( pParent, rSet );
+}
+
+SfxTabPage *CreateEventConfigPage( Window *pParent, const SfxItemSet& rSet )
+{
+ return new SfxEventConfigPage( pParent, rSet );
+}
+
+SfxConfigDialog::SfxConfigDialog( Window * pParent, const SfxItemSet* pSet )
+ : SfxTabDialog( pParent, SfxResId( DLG_CONFIG ), pSet )
+ , pMacroInfo( 0 )
+ , nObjectBar( 0 )
+{
+ FreeResource();
+
+ AddTabPage( TP_CONFIG_MENU, CreateMenuConfigPage, NULL );
+ AddTabPage( TP_CONFIG_ACCEL, CreateAccelConfigPage, NULL );
+ AddTabPage( TP_CONFIG_STATBAR, CreateStatusBarConfigPage, NULL );
+ AddTabPage( TP_CONFIG_OBJECTBAR, CreateObjectBarConfigPage, NULL );
+ AddTabPage( TP_CONFIG_EVENT, CreateEventConfigPage, NULL );
+}
+
+SfxConfigDialog::~SfxConfigDialog()
+{
+}
+
+short SfxConfigDialog::Ok()
+{
+ return SfxTabDialog::Ok();
+}
+
+// SfxStatusBarConfigPage::Ctor() **********************************************
+
+SfxStatusBarConfigPage::SfxStatusBarConfigPage( Window *pParent, const SfxItemSet& rSet ) :
+
+ SfxTabPage( pParent, SfxResId( TP_CONFIG_STATBAR ), rSet ),
+
+ aEntriesBox ( this, ResId( BOX_STATBAR_ENTRIES ) ),
+ aStatusBarGroup ( this, ResId( GRP_STATBAR ) ),
+ aLoadButton ( this, ResId( BTN_LOAD ) ),
+ aSaveButton ( this, ResId( BTN_SAVE ) ),
+ aResetButton ( this, ResId( BTN_RESET ) ),
+ pMgr( SFX_APP()->GetStatusBarManager() )
+{
+ FreeResource();
+
+ if ( !pMgr )
+ pMgr = new SfxStatusBarManager( NULL, SfxViewFrame::Current()->GetBindings(), SFX_APP() );
+
+ aLoadButton .SetClickHdl ( LINK( this, SfxStatusBarConfigPage,
+ Load ) );
+ aSaveButton .SetClickHdl ( LINK( this, SfxStatusBarConfigPage,
+ Save ) );
+ aResetButton .SetClickHdl ( LINK( this, SfxStatusBarConfigPage,
+ Default ) );
+
+ // aEntriesBox initialisieren
+ aEntriesBox.bDefault = pMgr->IsDefault();
+//(mba)/task SfxWaitCursor aWait;
+
+ aEntriesBox.SetSelectHdl( LINK(this,SfxStatusBarConfigPage, SelectHdl));
+ USHORT nGroup = 0;
+ String aGroupName = SFX_SLOTPOOL().SeekGroup(nGroup);
+
+ while (aGroupName.Len() != 0)
+ {
+ USHORT n=0;
+ for (const SfxSlot *pSlot = SFX_SLOTPOOL().FirstSlot(); pSlot;
+ pSlot = SFX_SLOTPOOL().NextSlot())
+ {
+ if ( !pSlot->GetType() ||
+ pSlot->GetType()->Type() == TYPE(SfxVoidItem) ||
+ !(pSlot->GetMode() & SFX_SLOT_STATUSBARCONFIG) )
+ continue;
+
+ USHORT nId = pSlot->GetSlotId();
+ USHORT i;
+ for (i=0; i<aListOfIds.Count(); i++)
+ if (aListOfIds[i] >= nId) break;
+
+ if (i<aListOfIds.Count() && aListOfIds[i] == nId)
+ continue;
+ else
+ aListOfIds.Insert(nId, i);
+ }
+
+ aGroupName = SFX_SLOTPOOL().SeekGroup(++nGroup);
+ }
+
+ aEntriesBox.bDefault = pMgr->IsDefault();
+ Init();
+}
+
+void SfxStatusBarConfigPage::Init()
+{
+ SvLBoxEntry *pEntry;
+ USHORT nUsed=0;
+ SvUShorts aListOfPos;
+ pArr = new SfxStbInfoArr_Impl;
+
+ for (USHORT i=0; i<aListOfIds.Count(); i++)
+ {
+ USHORT nId = aListOfIds[i];
+ String aName = SFX_SLOTPOOL().GetSlotName_Impl( nId );
+ if ( !aName.Len() )
+ continue;
+
+ SfxStatBarInfo_Impl* pInfo = new SfxStatBarInfo_Impl (nId, String());
+ pArr->Append(pInfo);
+ USHORT nPos = pMgr->GetItemPos(nId);
+ if (nPos != STATUSBAR_ITEM_NOTFOUND)
+ {
+ USHORT np;
+ for (np=0; np<aListOfPos.Count(); np++)
+ if (aListOfPos[np] > nPos) break;
+ aListOfPos.Insert(nPos,np);
+ pEntry = aEntriesBox.InsertEntry(aName, (SvLBoxEntry*)0L, FALSE, (ULONG) np);
+ aEntriesBox.SetCheckButtonState(pEntry, SV_BUTTON_CHECKED);
+ nUsed++;
+ }
+ else
+ {
+ pEntry = aEntriesBox.InsertEntry(aName, (SvLBoxEntry*)0L);
+ }
+
+ pEntry->SetUserData(pInfo);
+ }
+}
+
+void SfxStatusBarConfigPage::ResetConfig()
+{
+ aEntriesBox.Clear();
+ for (USHORT n=0; n<pArr->Count(); n++)
+ delete (*pArr)[n];
+ delete pArr;
+}
+
+SfxStatusBarConfigPage::~SfxStatusBarConfigPage()
+{
+ ResetConfig();
+}
+
+IMPL_LINK( SfxStatusBarConfigPage, SelectHdl, SvTreeListBox *, pBox )
+{
+ return 0;
+}
+
+
+void SfxStatusBarConfigPage::Apply()
+{
+ if (!aEntriesBox.bModified)
+ return;
+
+ if ( aEntriesBox.bDefault )
+ {
+ pMgr->UseDefault();
+ pMgr->SetDefault(TRUE);
+ return;
+ }
+
+//(mba)/task SfxWaitCursor aWait;
+ pMgr->Clear();
+ long nWidth = 100;
+
+ for (SvLBoxEntry *pEntry = aEntriesBox.First(); pEntry; pEntry = aEntriesBox.Next(pEntry))
+ {
+ if (aEntriesBox.GetCheckButtonState(pEntry) == SV_BUTTON_CHECKED)
+ {
+ USHORT nId =
+ ((SfxStatBarInfo_Impl*) pEntry->GetUserData())->nId;
+ pMgr->AddItem(nId, nWidth);
+ }
+ }
+}
+
+IMPL_LINK( SfxStatusBarConfigPage, Default, PushButton *, pPushButton )
+{
+ SfxConfigManager *pOldCfgMgr = pMgr->GetConfigManager_Impl();
+ aEntriesBox.bDefault = TRUE;
+ aEntriesBox.bModified = !pMgr->IsDefault();
+ pMgr->StoreConfig();
+ pMgr->ReleaseConfigManager();
+ pMgr->UseDefault();
+ aEntriesBox.SetUpdateMode(FALSE);
+ ResetConfig();
+ Init();
+ aEntriesBox.SetUpdateMode(TRUE);
+ aEntriesBox.Invalidate();
+ pMgr->ReInitialize(pOldCfgMgr);
+ return 0;
+}
+
+IMPL_LINK( SfxStatusBarConfigPage, Load, Button *, pButton )
+{
+ String aCfgName = SfxConfigDialog::FileDialog_Impl( this,
+ WB_OPEN | WB_STDMODAL | WB_3DLOOK, String( SfxResId( STR_LOADSTATBARCONFIG) ) );
+ if ( aCfgName.Len() )
+ {
+//(mba)/task SfxWaitCursor aWait;
+
+ BOOL bCreated = FALSE;
+ SfxConfigManager *pCfgMgr =
+ SfxConfigDialog::MakeCfgMgr_Impl( aCfgName, bCreated );
+ SfxConfigManager *pOldCfgMgr = pMgr->GetConfigManager_Impl();
+ if ( pOldCfgMgr != pCfgMgr )
+ {
+ if ( pCfgMgr->HasConfigItem( pMgr->GetType() ) )
+ {
+ pMgr->ReInitialize( pCfgMgr );
+ aEntriesBox.SetUpdateMode( FALSE );
+ ResetConfig();
+ Init();
+ aEntriesBox.SetUpdateMode( TRUE );
+ aEntriesBox.Invalidate();
+ pMgr->ReInitialize( pOldCfgMgr );
+ aEntriesBox.bDefault = FALSE;
+ aEntriesBox.bModified = TRUE;
+ }
+ }
+
+ if ( bCreated )
+ delete pCfgMgr;
+ }
+
+ return 0;
+}
+
+IMPL_LINK( SfxStatusBarConfigPage, Save, Button *, pButton )
+{
+ String aCfgName = SfxConfigDialog::FileDialog_Impl( this,
+ WB_SAVEAS | WB_STDMODAL | WB_3DLOOK, String( SfxResId( STR_SAVESTATBARCONFIG) ) );
+ if ( aCfgName.Len() )
+ {
+//(mba)/task SfxWaitCursor aWait;
+
+ BOOL bCreated = FALSE;
+ SfxConfigManager *pCfgMgr =
+ SfxConfigDialog::MakeCfgMgr_Impl( aCfgName, bCreated );
+
+ if ( pCfgMgr == SfxObjectShell::Current()->GetConfigManager() )
+ {
+ pCfgMgr->Activate(SFX_CFGMANAGER());
+ pMgr->Connect(pCfgMgr);
+ pCfgMgr->AddConfigItem(pMgr);
+ }
+
+ SfxConfigManager *pOldCfgMgr = pMgr->GetConfigManager_Impl();
+ if (pOldCfgMgr != pCfgMgr)
+ {
+ pMgr->StoreConfig();
+ pMgr->Connect( pCfgMgr );
+ pCfgMgr->AddConfigItem( pMgr );
+ BOOL bMod = aEntriesBox.bModified;
+ pMgr->GetStatusBar()->SetUpdateMode( FALSE );
+ BOOL bItemModified = pMgr->IsModified();
+ Apply();
+ pMgr->SetModified( TRUE );
+ pCfgMgr->StoreConfig();
+ pMgr->ReInitialize( pOldCfgMgr );
+ pMgr->SetModified( bItemModified );
+ pMgr->GetStatusBar()->SetUpdateMode( TRUE );
+ aEntriesBox.bModified = bMod;
+
+ if ( bCreated )
+ {
+ pCfgMgr->SetModified( TRUE );
+ pCfgMgr->SaveConfig();
+#ifdef MAC
+ SvEaMgr aEaMgr( aCfgName );
+ aEaMgr.SetFileType( "Pref" );
+#endif
+ }
+ }
+ else
+ {
+ Apply();
+ pMgr->SetModified( TRUE );
+ pCfgMgr->StoreConfig();
+ }
+
+ if ( bCreated )
+ delete pCfgMgr;
+ }
+ return 0;
+}
+
+
+SfxStatusBarConfigListBox::SfxStatusBarConfigListBox( Window* pParent, const ResId& rResId)
+ : SvTreeListBox(pParent, rResId)
+ , bModified(FALSE)
+ , pCurEntry(0)
+ , bDefault(TRUE)
+{
+ pButton = new SvLBoxButtonData();
+ pButton->aBmps[SV_BMP_UNCHECKED] = Bitmap(SfxResId(CHKBTN_UNCHECKED));
+ pButton->aBmps[SV_BMP_CHECKED] = Bitmap(SfxResId(CHKBTN_CHECKED));
+ pButton->aBmps[SV_BMP_HICHECKED] = Bitmap(SfxResId(CHKBTN_HICHECKED));
+ pButton->aBmps[SV_BMP_HIUNCHECKED] = Bitmap(SfxResId(CHKBTN_HIUNCHECKED));
+ pButton->aBmps[SV_BMP_TRISTATE] = Bitmap(SfxResId(CHKBTN_TRISTATE));
+ pButton->aBmps[SV_BMP_HITRISTATE] = Bitmap(SfxResId(CHKBTN_HITRISTATE));
+
+ EnableCheckButton(pButton);
+
+ DragDropMode aDDMode = SV_DRAGDROP_CTRL_MOVE;
+ SetDragDropMode( aDDMode );
+ SetHighlightRange(); // OV Selektion ueber gesamte Zeilenbreite
+
+ // Timer f"ur die BallonHelp
+ aTimer.SetTimeout( 200 );
+ aTimer.SetTimeoutHdl(
+ LINK( this, SfxStatusBarConfigListBox, TimerHdl ) );
+}
+
+void SfxStatusBarConfigListBox::KeyInput( const KeyEvent& rKEvt )
+{
+ USHORT aCode = rKEvt.GetKeyCode().GetCode();
+ if( aCode == KEY_SPACE )
+ {
+ SvLBoxEntry* pEntry = (SvLBoxEntry*) FirstSelected();
+ if( pEntry && (GetCheckButtonState( pEntry ) == SV_BUTTON_UNCHECKED) )
+ SetCheckButtonState(pEntry, SV_BUTTON_CHECKED);
+ else
+ SetCheckButtonState(pEntry, SV_BUTTON_UNCHECKED);
+ GetCheckButtonHdl().Call(this);
+ }
+ else
+ SvTreeListBox::KeyInput( rKEvt );
+}
+
+BOOL SfxStatusBarConfigListBox::NotifyQueryDrop( SvLBoxEntry* pEntry )
+{
+ return SvTreeListBox::NotifyQueryDrop(pEntry);
+}
+
+BOOL SfxStatusBarConfigListBox::NotifyMoving(SvLBoxEntry* pTarget, SvLBoxEntry* pEntry,
+ SvLBoxEntry*& rpNewParent, ULONG& rNewChildPos)
+{
+ BOOL bRet =
+ SvTreeListBox::NotifyMoving(pTarget, pEntry, rpNewParent, rNewChildPos);
+ if (bRet)
+ {
+ bModified = TRUE;
+ bDefault = FALSE;
+ }
+ return bRet;
+}
+
+void SfxStatusBarConfigListBox::CheckButtonHdl()
+{
+ bDefault = FALSE;
+ bModified = TRUE;
+}
+
+void SfxStatusBarConfigListBox::MouseMove( const MouseEvent& rMEvt )
+/* Beschreibung
+ Virtuelle Methode, die gerufen wird, wenn der Mauszeiger "uber der TreeListBox bewegt wurde.
+ Wenn die Position des Mauszeigers "uber dem aktuell selektierten Entry liegt, wird ein Timer
+ aufgesetzt, um ggf. einen Hilfetext einzublenden.
+*/
+{
+ Point aMousePos = rMEvt.GetPosPixel();
+ SvLBoxEntry *pEntry = GetCurEntry();
+ pCurEntry = pEntry;
+
+ if ( pEntry && GetEntry( aMousePos ) == pEntry )
+ aTimer.Start();
+ else
+ {
+ Help::ShowBalloon( this, aMousePos, String() );
+ aTimer.Stop();
+ }
+}
+
+IMPL_LINK( SfxStatusBarConfigListBox, TimerHdl, Timer*, pTimer)
+/* Beschreibung
+ Timer-Handler f"ur die Einblendung eines Hilfetextes. Wenn nach Ablauf des Timers
+ der Mauszeiger immer noch auf dem aktuell selektierten Eintrag steht, wird der
+ Helptext des Entries als Balloon-Help eingeblendet.
+*/
+{
+ if ( pTimer )
+ pTimer->Stop();
+
+ Point aMousePos = GetPointerPosPixel();
+ SvLBoxEntry *pEntry = GetCurEntry();
+ if ( pEntry && GetEntry( aMousePos ) == pEntry && pEntry == pCurEntry )
+ {
+ SfxStatBarInfo_Impl* pInfo = (SfxStatBarInfo_Impl*) pEntry->GetUserData();
+ if ( !pInfo->aHelpText.Len() )
+ pInfo->aHelpText = Application::GetHelp()->GetHelpText( pInfo->nId );
+ Help::ShowBalloon( this, OutputToScreenPixel( aMousePos ), pInfo->aHelpText );
+ }
+
+ return 0L;
+}
+
+
+
+BOOL SfxStatusBarConfigPage::FillItemSet( SfxItemSet& )
+{
+ if ( aEntriesBox.bModified )
+ {
+ Apply();
+ aEntriesBox.bModified = FALSE;
+ return TRUE;
+ }
+ return FALSE;
+}
+
+void SfxStatusBarConfigPage::Reset( const SfxItemSet& )
+{
+}
+
+BOOL SfxMenuConfigPage::FillItemSet( SfxItemSet& )
+{
+ if ( bModified )
+ {
+ Apply();
+ bModified = FALSE;
+ return TRUE;
+ }
+ return FALSE;
+}
+
+void SfxMenuConfigPage::Reset( const SfxItemSet& )
+{
+}
+
+BOOL SfxAcceleratorConfigPage::FillItemSet( SfxItemSet& )
+{
+ if ( bModified )
+ {
+ Apply();
+ bModified = FALSE;
+ return TRUE;
+ }
+ return FALSE;
+}
+
+void SfxAcceleratorConfigPage::Reset( const SfxItemSet& )
+{
+}
+
+String SfxConfigDialog::FileDialog_Impl( Window *pParent, WinBits nBits, const String& rTitle )
+{
+ SfxSimpleFileDialog aFileDlg( pParent, nBits );
+ aFileDlg.SetText( rTitle );
+#ifdef MAC
+ aFileDlg.AddFilter( String(SfxResId(STR_FILTERNAME_CFG)),DEFINE_CONST_UNICODE("Pref.cfg") );
+#else
+ aFileDlg.AddFilter( String(SfxResId(STR_FILTERNAME_CFG)),DEFINE_CONST_UNICODE("*.cfg") );
+#endif
+ aFileDlg.AddFilter( String(SfxResId(STR_FILTERNAME_ALL) ), DEFINE_CONST_UNICODE(FILEDIALOG_FILTER_ALL) );
+ INetURLObject aFilePath( SFX_INIMANAGER()->Get( SFX_KEY_USERCONFIG_PATH ), INET_PROT_FILE );
+ aFilePath.setFinalSlash();
+ String aCfgName = aFilePath.PathToFileName();
+#ifndef MAC
+ aCfgName += DEFINE_CONST_UNICODE( "*.cfg" );
+ aFileDlg.SetDefaultExt( DEFINE_CONST_UNICODE( "cfg" ) );
+#endif
+
+ aFileDlg.SetPath( aCfgName );
+ if ( aFileDlg.Execute() )
+ return aFileDlg.GetPath();
+ else
+ return String();
+}
+
+SfxConfigManager* SfxConfigDialog::MakeCfgMgr_Impl( const String& rName, BOOL& bCreated )
+{
+ // Zuerst feststellen, ob der Storage schon in Benutzung ist
+ bCreated = FALSE;
+ SfxObjectShell *pDoc = SFX_APP()->DocAlreadyLoaded( rName, TRUE, TRUE );
+ SfxConfigManager *pCfgMgr = 0;
+ if ( !pDoc )
+ {
+ if ( rName != SfxConfigManager::GetDefaultName() )
+ {
+ pCfgMgr = new SfxConfigManager( rName );
+ bCreated = TRUE;
+ }
+ else
+ pCfgMgr = SFX_APP()->GetAppConfigManager_Impl();
+ }
+ else
+ {
+ pCfgMgr = pDoc->GetConfigManager();
+ if ( !pCfgMgr )
+ {
+ pCfgMgr = new SfxConfigManager( 0, SFX_CFGMANAGER() );
+ pDoc->SetConfigManager( pCfgMgr );
+ }
+ }
+
+ return pCfgMgr;
+}
+
+
diff --git a/sfx2/source/dialog/cfg.hrc b/sfx2/source/dialog/cfg.hrc
new file mode 100644
index 000000000000..145740f2b0ee
--- /dev/null
+++ b/sfx2/source/dialog/cfg.hrc
@@ -0,0 +1,110 @@
+/*************************************************************************
+ *
+ * $RCSfile: cfg.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:30 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#define BTN_MN_OK 1
+#define BTN_MN_CANCEL 2
+#define BTN_MN_NEWPOPUP 6
+#define BTN_MN_NEW 7
+#define BTN_MN_CHANGE 8
+#define BTN_MN_REMOVE 9
+#define BOX_MN_ENTRIES 10
+#define TXT_MN_FUNCTIONTEXT 13
+#define TXT_MN_FUNCTIONINFO 14
+#define TXT_MN_DESCRIPTIONTEXT 15
+#define TXT_MN_DESCRIPTIONINFO 16
+#define GRP_MN_MENU 17
+#define TXT_MN_GROUP 18
+#define BOX_MN_GROUP 19
+#define TXT_MN_FUNCTION 20
+#define BOX_MN_FUNCTION 21
+#define GRP_FUNCTIONS 22
+#define BTN_ACC_OK 1
+#define BTN_ACC_CANCEL 2
+#define BTN_ACC_CHANGE 3
+#define BTN_ACC_REMOVE 4
+#define BOX_ACC_ENTRIES 5
+#define TXT_ACC_DESCRIPTIONTEXT 6
+#define TXT_ACC_DESCRIPTIONINFO 7
+#define GRP_ACC_KEYBOARD 8
+#define TXT_ACC_GROUP 9
+#define BOX_ACC_GROUP 10
+#define TXT_ACC_FUNCTION 11
+#define BOX_ACC_FUNCTION 12
+#define TXT_ACC_KEY 13
+#define BOX_ACC_KEY 14
+#define GRP_ACC_FUNCTIONS 15
+#define TAB_CONTROL 12
+#define BOX_STATBAR_ENTRIES 5
+#define TXT_STATBAR_DESCRIPTIONTEXT 6
+#define TXT_STATBAR_DESCRIPTIONINFO 7
+#define GRP_STATBAR 8
+#define BTN_RESET 20
+#define BTN_LOAD 40
+#define BTN_SAVE 41
+#define BTN_MN_UP 42
+#define BTN_MN_DOWN 43
+
+#define CHKBTN_UNCHECKED 30001
+#define CHKBTN_CHECKED 30002
+#define CHKBTN_HICHECKED 30003
+#define CHKBTN_HIUNCHECKED 30004
+#define CHKBTN_TRISTATE 30005
+#define CHKBTN_HITRISTATE 30006
diff --git a/sfx2/source/dialog/cfg.src b/sfx2/source/dialog/cfg.src
new file mode 100644
index 000000000000..e7e05ab79760
--- /dev/null
+++ b/sfx2/source/dialog/cfg.src
@@ -0,0 +1,1918 @@
+/*************************************************************************
+ *
+ * $RCSfile: cfg.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:30 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+ // include ---------------------------------------------------------------
+#include "helpid.hrc"
+#include "dialog.hrc"
+#include "cfg.hrc"
+ // pragma ----------------------------------------------------------------
+
+#define PUSHBUTTON_TEXT_SAVE \
+ Text = "~Speichern..." ; \
+ Text [ ENGLISH ] = "~Save" ; \
+ Text [ dutch ] = "O~pslaan..." ; \
+ Text [ english_us ] = "~Save..." ; \
+ Text [ italian ] = "~Salva..." ; \
+ Text [ spanish ] = "~Guardar..." ; \
+ Text [ french ] = "~Enregistrer..." ; \
+ Text [ swedish ] = "Spara..." ; \
+ Text [ danish ] = "~Gem..." ; \
+ Text [ portuguese_brazilian ] = "~Speichern..." ; \
+ Text [ portuguese ] = "~Guardar..." ; \
+ Text[ chinese_simplified ] = "(~S)..."; \
+ Text[ russian ] = "..."; \
+ Text[ polish ] = "Zapisz..."; \
+ Text[ japanese ] = "ۑ(~S)..."; \
+ Text[ chinese_traditional ] = "xs(~S)..."; \
+ Text[ arabic ] = "..."; \
+ Text[ greek ] = "~..."; \
+ Text[ korean ] = "(~S)..."; \
+ Text[ turkish ] = "~Kaydet..."; \
+ Text[ language_user1 ] = " ";
+
+#define PUSHBUTTON_TEXT_RESET \
+ Text = "Zur~cksetzen" ; \
+ Text [ ENGLISH ] = "R~eset" ; \
+ Text [ dutch ] = "~Terugzetten" ; \
+ Text [ english_us ] = "R~eset" ; \
+ Text [ italian ] = "Ripris~tina" ; \
+ Text [ spanish ] = "~Restablecer" ; \
+ Text [ french ] = "Re~staurer" ; \
+ Text [ swedish ] = "~terstll" ; \
+ Text [ danish ] = "Nulstil" ; \
+ Text [ portuguese_brazilian ] = "~Zurcksetzen" ; \
+ Text [ portuguese ] = "~Restaurar" ; \
+ Text[ chinese_simplified ] = "(~E)"; \
+ Text[ russian ] = ""; \
+ Text[ polish ] = "Zresetuj"; \
+ Text[ japanese ] = "ؾ(~E)"; \
+ Text[ chinese_traditional ] = "](~E)"; \
+ Text[ arabic ] = " "; \
+ Text[ greek ] = "~"; \
+ Text[ korean ] = "(~E)"; \
+ Text[ turkish ] = "Baa al"; \
+ Text[ language_user1 ] = " ";
+
+#define PUSHBUTTON_TEXT_LOAD \
+/* ### ACHTUNG: Neuer Text in Resource? La~den... : ~Laden... */\
+ Text = "La~den..." ; \
+ Text [ ENGLISH ] = "~Load..." ; \
+ Text [ english_us ] = "~Load..." ; \
+ Text [ italian ] = "Ca~rica..." ; \
+ Text [ spanish ] = "~Cargar..." ; \
+ Text [ french ] = "~Charger..." ; \
+ Text [ dutch ] = "~Laden..." ; \
+ Text [ swedish ] = "La~dda..." ; \
+ Text [ danish ] = "Indls..." ; \
+ Text [ portuguese_brazilian ] = "~Laden..." ; \
+ Text [ portuguese ] = "~Carregar..." ; \
+ Text[ chinese_simplified ] = "װ(~L)..."; \
+ Text[ russian ] = "..."; \
+ Text[ polish ] = "aduj..."; \
+ Text[ japanese ] = "ǂݍ(~L)..."; \
+ Text[ chinese_traditional ] = "˸(~L)..."; \
+ Text[ arabic ] = "..."; \
+ Text[ greek ] = "~..."; \
+ Text[ korean ] = "ε(~L)..."; \
+ Text[ turkish ] = "Ykle..."; \
+ Text[ language_user1 ] = " ";
+
+#define PUSHBUTTON_TEXT_REMOVE \
+/* ### ACHTUNG: Neuer Text in Resource? ~Lschen : ~Lschen */\
+ Text = "~Lschen" ; \
+ Text [ ENGLISH ] = "~Remove" ; \
+ Text [ norwegian ] = "~Fjern" ; \
+ Text [ italian ] = "~Elimina" ; \
+ Text [ portuguese_brazilian ] = "~Remover" ; \
+ Text [ portuguese ] = "E~liminar" ; \
+ Text [ finnish ] = "~Poista" ; \
+ Text [ danish ] = "Slet" ; \
+ Text [ french ] = "~Supprimer" ; \
+ Text [ swedish ] = "~Radera" ; \
+ Text [ dutch ] = "~Wissen" ; \
+ Text [ spanish ] = "~Eliminar" ; \
+ Text [ english_us ] = "~Delete" ; \
+ Text[ chinese_simplified ] = "ɾ(~D)"; \
+ Text[ russian ] = ""; \
+ Text[ polish ] = "Usu"; \
+ Text[ japanese ] = "폜(~D)"; \
+ Text[ chinese_traditional ] = "R(~D)"; \
+ Text[ arabic ] = ""; \
+ Text[ greek ] = "~"; \
+ Text[ korean ] = "(~D)"; \
+ Text[ turkish ] = "Sil"; \
+ Text[ language_user1 ] = " ";
+
+#define PUSHBUTTON_TEXT_CHANGE \
+/* ### ACHTUNG: Neuer Text in Resource? ~ndern : ~ndern */\
+ Text = "~ndern" ; \
+ Text [ ENGLISH ] = "~Change" ; \
+ Text [ norwegian ] = "~Endre" ; \
+ Text [ italian ] = "~Cambia" ; \
+ Text [ portuguese_brazilian ] = "~Mudar" ; \
+ Text [ portuguese ] = "~Modificar" ; \
+ Text [ finnish ] = "~Muuta" ; \
+ Text [ danish ] = "Modificer" ; \
+ Text [ french ] = "~Modifier" ; \
+ Text [ swedish ] = "~ndra" ; \
+ Text [ dutch ] = "Wij~zigen" ; \
+ Text [ spanish ] = "~Modificar" ; \
+ Text [ english_us ] = "~Modify" ; \
+ Text[ chinese_simplified ] = "(~M)"; \
+ Text[ russian ] = ""; \
+ Text[ polish ] = "Mo~dyfikuj"; \
+ Text[ japanese ] = "ύX(~M)"; \
+ Text[ chinese_traditional ] = "ܧ(~M)"; \
+ Text[ arabic ] = ""; \
+ Text[ greek ] = "~"; \
+ Text[ korean ] = "(~M)"; \
+ Text[ turkish ] = "Deitir"; \
+ Text[ language_user1 ] = " ";
+
+#define PUSHBUTTON_TEXT_NEW \
+ Text = "~Neu" ; \
+ Text [ ENGLISH ] = "~New" ; \
+ Text [ norwegian ] = "~New" ; \
+ Text [ italian ] = "~Nuovo" ; \
+ Text [ portuguese_brazilian ] = "~Novo" ; \
+ Text [ portuguese ] = "~Novo" ; \
+ Text [ finnish ] = "~Uusi" ; \
+ Text [ danish ] = "~Ny(t)" ; \
+ Text [ french ] = "Nou~veau" ; \
+ Text [ swedish ] = "~Nytt" ; \
+ Text [ dutch ] = "~Nieuw" ; \
+ Text [ spanish ] = "~Nuevo" ; \
+ Text [ english_us ] = "~New" ; \
+ Text[ chinese_simplified ] = "½(~N)"; \
+ Text[ russian ] = "~"; \
+ Text[ polish ] = "Nowy"; \
+ Text[ japanese ] = "VK쐬(~N)"; \
+ Text[ chinese_traditional ] = "}ҷs(~N)"; \
+ Text[ arabic ] = ""; \
+ Text[ greek ] = "~"; \
+ Text[ korean ] = "(~N)"; \
+ Text[ turkish ] = "~Yeni"; \
+ Text[ language_user1 ] = " ";
+
+#define FIXEDTEXT_TEXT_GROUP \
+ Text = "~Bereich" ; \
+ Text [ ENGLISH ] = "~Group" ; \
+ Text [ norwegian ] = "~Gruppe" ; \
+ Text [ italian ] = "Area" ; \
+ Text [ portuguese_brazilian ] = "~Agrupar" ; \
+ Text [ portuguese ] = "~Categoria" ; \
+ Text [ finnish ] = "~Ryhmit" ; \
+ Text [ danish ] = "Omrde" ; \
+ Text [ french ] = "~Catgorie" ; \
+ Text [ swedish ] = "~Kategori" ; \
+ Text [ dutch ] = "~Bereik" ; \
+ Text [ spanish ] = "~rea" ; \
+ Text [ english_us ] = "~Category" ; \
+ Text[ chinese_simplified ] = "Χ(~C)"; \
+ Text[ russian ] = ""; \
+ Text[ polish ] = "Obszar"; \
+ Text[ japanese ] = "͈(~C)"; \
+ Text[ chinese_traditional ] = "S(~C)"; \
+ Text[ arabic ] = ""; \
+ Text[ greek ] = "~"; \
+ Text[ korean ] = "(~C)"; \
+ Text[ turkish ] = "Ka~tegori"; \
+ Text[ language_user1 ] = " ";
+
+#define FIXEDTEXT_TEXT_FUNCTION \
+ Text = "~Funktion" ; \
+ Text [ ENGLISH ] = "~Function" ; \
+ Text [ norwegian ] = "~Function" ; \
+ Text [ italian ] = "~Funzione" ; \
+ Text [ portuguese_brazilian ] = "~Funo" ; \
+ Text [ portuguese ] = "~Funo" ; \
+ Text [ finnish ] = "~Funktio" ; \
+ Text [ danish ] = "Funktion" ; \
+ Text [ french ] = "~Fonction" ; \
+ Text [ swedish ] = "~Funktion" ; \
+ Text [ dutch ] = "~Functie" ; \
+ Text [ spanish ] = "~Funcin" ; \
+ Text [ english_us ] = "Function" ; \
+ Text[ chinese_simplified ] = "(~F)"; \
+ Text[ russian ] = ""; \
+ Text[ polish ] = "Funkcja"; \
+ Text[ japanese ] = "@\\"; \
+ Text[ chinese_traditional ] = "\\(~F)"; \
+ Text[ arabic ] = ""; \
+ Text[ greek ] = "~"; \
+ Text[ korean ] = ""; \
+ Text[ turkish ] = "lev"; \
+ Text[ language_user1 ] = " ";
+
+#define GROUPBOX_TEXT_FUNCTIONS \
+ Text = "Funktionen" ; \
+ Text [ ENGLISH ] = "Functions" ; \
+ Text [ norwegian ] = "Funksjoner" ; \
+ Text [ italian ] = "Funzioni" ; \
+ Text [ portuguese_brazilian ] = "Funes" ; \
+ Text [ portuguese ] = "Funes" ; \
+ Text [ finnish ] = "Toiminnot" ; \
+ Text [ danish ] = "Funktioner" ; \
+ Text [ french ] = "Fonctions" ; \
+ Text [ swedish ] = "Funktioner" ; \
+ Text [ dutch ] = "Functies" ; \
+ Text [ spanish ] = "Funciones" ; \
+ Text [ english_us ] = "Functions" ; \
+ Text[ chinese_simplified ] = ""; \
+ Text[ russian ] = ""; \
+ Text[ polish ] = "Funkcje"; \
+ Text[ japanese ] = "@\\"; \
+ Text[ chinese_traditional ] = "\\"; \
+ Text[ arabic ] = ""; \
+ Text[ greek ] = ""; \
+ Text[ korean ] = "ɵ"; \
+ Text[ turkish ] = "Fonksiyon"; \
+ Text[ language_user1 ] = " ";
+
+ // TP_CONFIG_MENU --------------------------------------------------------
+TabPage TP_CONFIG_MENU
+{
+ HelpId = HID_CONFIG_MENU ;
+ Hide = TRUE ;
+ Size = MAP_APPFONT ( 282 , 205 ) ;
+ PushButton BTN_MN_NEW
+ {
+ Pos = MAP_APPFONT ( 226 , 6 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TabStop = TRUE ;
+ PUSHBUTTON_TEXT_NEW
+ Text [ english_us ] = "~New" ;
+ Text [ portuguese_brazilian ] = "~Novo" ;
+ Text = "~Neu" ;
+ Text [ swedish ] = "~Nytt" ;
+ Text [ danish ] = "Ny" ;
+ Text [ italian ] = "~Nuovo" ;
+ Text [ spanish ] = "~Nuevo" ;
+ Text [ french ] = "~Nouveau" ;
+ Text [ dutch ] = "~Nieuw" ;
+ Text [ portuguese ] = "~Novo" ;
+ Text[ chinese_simplified ] = "½(~N)";
+ Text[ russian ] = "~";
+ Text[ polish ] = "Nowy";
+ Text[ japanese ] = "VK쐬(~N)";
+ Text[ chinese_traditional ] = "}ҷs(~N)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "(~N)";
+ Text[ turkish ] = "~Yeni";
+ Text[ language_user1 ] = " ";
+ };
+ PushButton BTN_MN_NEWPOPUP
+ {
+ Pos = MAP_APPFONT ( 226 , 23 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? Neues ~Men : Neues ~Men */
+ /* ### ACHTUNG: Neuer Text in Resource? Neues ~Men : Neues ~Men */
+ Text = "Neues ~Men" ;
+ Text [ ENGLISH ] = "New ~menu" ;
+ Text [ english_us ] = "New Men~u" ;
+ Text [ swedish ] = "Ny ~meny" ;
+ Text [ danish ] = "Ny menu" ;
+ Text [ italian ] = "Nuovo ~Menu" ;
+ Text [ spanish ] = "Nue~vo men" ;
+ Text [ french ] = "Nouveau ~menu" ;
+ Text [ dutch ] = "Nieuw ~menu" ;
+ Text [ portuguese_brazilian ] = "Neues ~Men" ;
+ Text [ portuguese ] = "Novo ~menu" ;
+ Text[ chinese_simplified ] = "²˵(~U)";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Nowe menu";
+ Text[ japanese ] = "Vƭ(~U)";
+ Text[ chinese_traditional ] = "s\\(~U)";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ~";
+ Text[ korean ] = " ޴(~U)";
+ Text[ turkish ] = "Yeni mn";
+ Text[ language_user1 ] = " ";
+ };
+ PushButton BTN_MN_CHANGE
+ {
+ Pos = MAP_APPFONT ( 226 , 40 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TabStop = TRUE ;
+ PUSHBUTTON_TEXT_CHANGE
+ Text [ english_us ] = "~Modify" ;
+ Text [ portuguese_brazilian ] = "~Mudar" ;
+ /* ### ACHTUNG: Neuer Text in Resource? ~ndern : ~ndern */
+ /* ### ACHTUNG: Neuer Text in Resource? ~ndern : ~ndern */
+ Text = "~ndern" ;
+ Text [ swedish ] = "~ndra" ;
+ Text [ danish ] = "Modificer" ;
+ Text [ italian ] = "Modifica" ;
+ Text [ spanish ] = "~Personalizar" ;
+ Text [ french ] = "~Personnaliser" ;
+ Text [ dutch ] = "Wij~zigen" ;
+ Text [ portuguese ] = "~Modificar" ;
+ Text[ chinese_simplified ] = "(~M)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Modyfikuj";
+ Text[ japanese ] = "ύX(~M)";
+ Text[ chinese_traditional ] = "ܧ(~M)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "(~M)";
+ Text[ turkish ] = "Deitir";
+ Text[ language_user1 ] = " ";
+ };
+ PushButton BTN_MN_REMOVE
+ {
+ Pos = MAP_APPFONT ( 226 , 57 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TabStop = TRUE ;
+ Group = TRUE ;
+ PUSHBUTTON_TEXT_REMOVE
+ Text [ english_us ] = "~Delete" ;
+ Text [ portuguese_brazilian ] = "~Remover" ;
+ /* ### ACHTUNG: Neuer Text in Resource? ~Lschen : ~Lschen */
+ /* ### ACHTUNG: Neuer Text in Resource? ~Lschen : ~Lschen */
+ Text = "~Lschen" ;
+ Text [ swedish ] = "~Radera" ;
+ Text [ danish ] = "Slet" ;
+ Text [ italian ] = "Elimina" ;
+ Text [ spanish ] = "~Eliminar" ;
+ Text [ french ] = "~Supprimer" ;
+ Text [ dutch ] = "~Wissen" ;
+ Text [ portuguese ] = "E~liminar" ;
+ Text[ chinese_simplified ] = "ɾ(~D)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Usu";
+ Text[ japanese ] = "폜(~D)";
+ Text[ chinese_traditional ] = "R(~D)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "~";
+ Text[ korean ] = "(~D)";
+ Text[ turkish ] = "Sil";
+ Text[ language_user1 ] = " ";
+ };
+ ImageButton BTN_MN_UP
+ {
+ Pos = MAP_APPFONT ( 244 , 77 ) ;
+ Size = MAP_APPFONT ( 14 , 14 ) ;
+ TabStop = TRUE ;
+ Symbol = IMAGEBUTTON_ARROW_UP ;
+ };
+ ImageButton BTN_MN_DOWN
+ {
+ Pos = MAP_APPFONT ( 244 , 94 ) ;
+ Size = MAP_APPFONT ( 14 , 14 ) ;
+ TabStop = TRUE ;
+ Symbol = IMAGEBUTTON_ARROW_DOWN ;
+ };
+ PushButton BTN_RESET
+ {
+ Pos = MAP_APPFONT ( 226 , 189 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TabStop = TRUE ;
+ Group = TRUE ;
+ PUSHBUTTON_TEXT_RESET
+ Text [ english_us ] = "R~eset" ;
+ Text [ portuguese_brazilian ] = "~Zurcksetzen" ;
+ /* ### ACHTUNG: Neuer Text in Resource? Zur~cksetzen : ~Zurcksetzen */
+ /* ### ACHTUNG: Neuer Text in Resource? Zur~cksetzen : Zur~cksetzen */
+ /* ### ACHTUNG: Neuer Text in Resource? Zur~cksetzen : Zur~cksetzen */
+ Text = "Zur~cksetzen" ;
+ Text [ swedish ] = "~terstll" ;
+ Text [ danish ] = "Nulstil" ;
+ Text [ italian ] = "Ri~pristina" ;
+ Text [ spanish ] = "Res~tablecer" ;
+ Text [ french ] = "Re~staurer" ;
+ Text [ dutch ] = "~Terugzetten" ;
+ Text [ portuguese ] = "~Restaurar" ;
+ Text[ chinese_simplified ] = "(~E)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Zr~esetuj";
+ Text[ japanese ] = "ؾ(~E)";
+ Text[ chinese_traditional ] = "](~E)";
+ Text[ arabic ] = " ";
+ Text[ greek ] = "~";
+ Text[ korean ] = "(~E)";
+ Text[ turkish ] = "Baa al";
+ Text[ language_user1 ] = " ";
+ };
+ PushButton BTN_LOAD
+ {
+ Pos = MAP_APPFONT ( 226 , 155 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TabStop = TRUE ;
+ Group = TRUE ;
+ PUSHBUTTON_TEXT_LOAD
+ Text [ english_us ] = "~Load" ;
+ Text [ portuguese_brazilian ] = "~Laden..." ;
+ /* ### ACHTUNG: Neuer Text in Resource? L~aden... : ~Laden... */
+ Text = "L~aden..." ;
+ Text [ swedish ] = "L~adda..." ;
+ Text [ danish ] = "Indls..." ;
+ Text [ italian ] = "~Carica..." ;
+ Text [ spanish ] = "C~argar..." ;
+ Text [ french ] = "~Charger..." ;
+ Text [ dutch ] = "~Laden..." ;
+ Text [ portuguese ] = "~Carregar..." ;
+ Text[ chinese_simplified ] = "װ(~L)...";
+ Text[ russian ] = "...";
+ Text[ polish ] = "aduj...";
+ Text[ japanese ] = "ǂݍ(~L)...";
+ Text[ chinese_traditional ] = "˸(~L)...";
+ Text[ arabic ] = "...";
+ Text[ greek ] = "...";
+ Text[ korean ] = "ε(~L)";
+ Text[ turkish ] = "Ykle...";
+ Text[ language_user1 ] = " ";
+ };
+ PushButton BTN_SAVE
+ {
+ TabStop = TRUE ;
+ Group = TRUE ;
+ Pos = MAP_APPFONT ( 226 , 172 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ PUSHBUTTON_TEXT_SAVE
+ Text [ english_us ] = "~Save..." ;
+ Text [ portuguese_brazilian ] = "~Speichern..." ;
+ Text = "~Speichern..." ;
+ Text [ swedish ] = "~Spara..." ;
+ Text [ danish ] = "Gem..." ;
+ Text [ italian ] = "Salva..." ;
+ Text [ spanish ] = "~Guardar..." ;
+ Text [ french ] = "En~registrer..." ;
+ Text [ dutch ] = "O~pslaan..." ;
+ Text [ portuguese ] = "~Guardar..." ;
+ Text[ chinese_simplified ] = "(~S)...";
+ Text[ russian ] = "...";
+ Text[ polish ] = "Zapi~sz...";
+ Text[ japanese ] = "ۑ(~S)...";
+ Text[ chinese_traditional ] = "xs(~S)...";
+ Text[ arabic ] = "...";
+ Text[ greek ] = "~...";
+ Text[ korean ] = "(~S)...";
+ Text[ turkish ] = "Kaydet...";
+ Text[ language_user1 ] = " ";
+ };
+ Control BOX_MN_ENTRIES
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 12 , 14 ) ;
+ Size = MAP_APPFONT ( 202 , 90 ) ;
+ TabStop = TRUE ;
+ HelpId = HID_MENUCONFIG_LISTBOX ;
+ };
+ GroupBox GRP_MN_MENU
+ {
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 214 , 107 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? Men : Men */
+ /* ### ACHTUNG: Neuer Text in Resource? Men : Men */
+ Text = "Men" ;
+ Text [ ENGLISH ] = "Menu" ;
+ Text [ norwegian ] = "Meny" ;
+ Text [ italian ] = "Menu" ;
+ Text [ portuguese_brazilian ] = "Menu" ;
+ Text [ portuguese ] = "Menu" ;
+ Text [ finnish ] = "Valikko" ;
+ Text [ danish ] = "Menu" ;
+ Text [ french ] = "Menu" ;
+ Text [ swedish ] = "Meny" ;
+ Text [ dutch ] = "Menu" ;
+ Text [ spanish ] = "Men" ;
+ Text [ english_us ] = "Menu" ;
+ Group = TRUE ;
+ Text[ chinese_simplified ] = "˵";
+ Text[ russian ] = "";
+ Text[ polish ] = "Menu";
+ Text[ japanese ] = "ƭ";
+ Text[ chinese_traditional ] = "\\";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "޴";
+ Text[ turkish ] = "Mn";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText TXT_MN_GROUP
+ {
+ Pos = MAP_APPFONT ( 12 , 124 ) ;
+ Size = MAP_APPFONT ( 93 , 8 ) ;
+ Group = TRUE ;
+ Left = TRUE ;
+ FIXEDTEXT_TEXT_GROUP
+ Text [ english_us ] = "C~ategory" ;
+ Text [ portuguese_brazilian ] = "~Agrupar" ;
+ Text = "~Bereich" ;
+ Text [ swedish ] = "~Kategori" ;
+ Text [ danish ] = "Omrde" ;
+ Text [ italian ] = "Area" ;
+ Text [ spanish ] = "~rea" ;
+ Text [ french ] = "~Catgorie" ;
+ Text [ dutch ] = "~Bereik" ;
+ Text [ portuguese ] = "~Categoria" ;
+ Text[ chinese_simplified ] = "(~A)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Obszar";
+ Text[ japanese ] = "͈(~A)";
+ Text[ chinese_traditional ] = "ϰ(~A)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "(~A)";
+ Text[ turkish ] = "Ka~tegori";
+ Text[ language_user1 ] = " ";
+ };
+ Control BOX_MN_GROUP
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 12 , 135 ) ;
+ Size = MAP_APPFONT ( 93 , 60 ) ;
+ TabStop = TRUE ;
+ HelpId = HID_CONFIGGROUP_LISTBOX ;
+ };
+ FixedText TXT_MN_FUNCTION
+ {
+ Pos = MAP_APPFONT ( 111 , 124 ) ;
+ Size = MAP_APPFONT ( 103 , 8 ) ;
+ Left = TRUE ;
+ FIXEDTEXT_TEXT_FUNCTION
+ Text [ portuguese ] = "~Funo" ;
+ Text [ english_us ] = "~Function" ;
+ Text [ portuguese_brazilian ] = "~Funo" ;
+ Text = "~Funktion" ;
+ Text [ swedish ] = "~Funktion" ;
+ Text [ danish ] = "Funktion" ;
+ Text [ italian ] = "~Funzione" ;
+ Text [ spanish ] = "~Funcin" ;
+ Text [ french ] = "~Fonction" ;
+ Text [ dutch ] = "~Functie" ;
+ Text[ chinese_simplified ] = "(~C)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Funkcja";
+ Text[ japanese ] = "@\\(~C)";
+ Text[ chinese_traditional ] = "\\(~C)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "(~C)";
+ Text[ turkish ] = "lev";
+ Text[ language_user1 ] = " ";
+ };
+ Control BOX_MN_FUNCTION
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 111 , 135 ) ;
+ Size = MAP_APPFONT ( 103 , 60 ) ;
+ TabStop = TRUE ;
+ HelpId = HID_CONFIGFUNCTION_LISTBOX ;
+ };
+ GroupBox GRP_FUNCTIONS
+ {
+ Pos = MAP_APPFONT ( 6 , 115 ) ;
+ Size = MAP_APPFONT ( 214 , 87 ) ;
+ Group = TRUE ;
+ GROUPBOX_TEXT_FUNCTIONS
+ Text [ portuguese ] = "Funes" ;
+ Text [ english_us ] = "Functions" ;
+ Text [ portuguese_brazilian ] = "Funes" ;
+ Text = "Funktionen" ;
+ Text [ swedish ] = "Funktioner" ;
+ Text [ danish ] = "Funktioner" ;
+ Text [ italian ] = "Funzioni" ;
+ Text [ spanish ] = "Funciones" ;
+ Text [ french ] = "Ensemble de fonctions" ;
+ Text [ dutch ] = "Functies" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "Funkcja";
+ Text[ japanese ] = "@\\";
+ Text[ chinese_traditional ] = "\\";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "ɵ";
+ Text[ turkish ] = "levler";
+ Text[ language_user1 ] = " ";
+ };
+};
+ // TP_CONFIG_ACCEL -------------------------------------------------------
+TabPage TP_CONFIG_ACCEL
+{
+ HelpId = HID_CONFIG_ACCEL ;
+ Hide = TRUE ;
+ Size = MAP_APPFONT ( 282 , 205 ) ;
+ PushButton BTN_ACC_CHANGE
+ {
+ Pos = MAP_APPFONT ( 226 , 6 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TabStop = TRUE ;
+ PUSHBUTTON_TEXT_CHANGE
+ Text [ portuguese ] = "~Modificar" ;
+ Text [ english_us ] = "Modify" ;
+ Text [ portuguese_brazilian ] = "~Mudar" ;
+ /* ### ACHTUNG: Neuer Text in Resource? ~ndern : ~ndern */
+ /* ### ACHTUNG: Neuer Text in Resource? ~ndern : ~ndern */
+ Text = "~ndern" ;
+ Text [ swedish ] = "~ndra" ;
+ Text [ danish ] = "Modificer" ;
+ Text [ italian ] = "~Cambia" ;
+ Text [ spanish ] = "~Modificar" ;
+ Text [ french ] = "~Modifier" ;
+ Text [ dutch ] = "Wij~zigen" ;
+ Text[ chinese_simplified ] = "(~A)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Modyfikuj";
+ Text[ japanese ] = "ύX(~A)";
+ Text[ chinese_traditional ] = "ܧ(~A)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "~";
+ Text[ korean ] = "(~A)";
+ Text[ turkish ] = "Deitir";
+ Text[ language_user1 ] = " ";
+ };
+ PushButton BTN_ACC_REMOVE
+ {
+ Pos = MAP_APPFONT ( 226 , 23 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TabStop = TRUE ;
+ Group = TRUE ;
+ PUSHBUTTON_TEXT_REMOVE
+ Text [ english_us ] = "~Delete" ;
+ Text [ portuguese_brazilian ] = "~Remover" ;
+ /* ### ACHTUNG: Neuer Text in Resource? ~Lschen : ~Lschen */
+ /* ### ACHTUNG: Neuer Text in Resource? ~Lschen : ~Lschen */
+ Text = "~Lschen" ;
+ Text [ swedish ] = "~Radera" ;
+ Text [ danish ] = "Slet" ;
+ Text [ italian ] = "Elimina" ;
+ Text [ spanish ] = "~Eliminar" ;
+ Text [ french ] = "~Supprimer" ;
+ Text [ dutch ] = "~Wissen" ;
+ Text [ portuguese ] = "E~liminar" ;
+ Text[ chinese_simplified ] = "ɾ(~D)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Usu";
+ Text[ japanese ] = "폜(~D)";
+ Text[ chinese_traditional ] = "R(~D)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "(~D)";
+ Text[ turkish ] = "Sil";
+ Text[ language_user1 ] = " ";
+ };
+ Control BOX_ACC_ENTRIES
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 12 , 14 ) ;
+ Size = MAP_APPFONT ( 202 , 90 ) ;
+ TabStop = TRUE ;
+ Group = TRUE ;
+ HelpId = HID_ACCELCONFIG_LISTBOX ;
+ };
+ GroupBox GRP_ACC_KEYBOARD
+ {
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 214 , 107 ) ;
+ Text = "Tastatur" ;
+ Text [ ENGLISH ] = "Keyboard" ;
+ Text [ norwegian ] = "Tastatur" ;
+ Text [ italian ] = "Tastiera" ;
+ Text [ portuguese_brazilian ] = "Teclado" ;
+ Text [ portuguese ] = "Teclado" ;
+ Text [ finnish ] = "Nppimist" ;
+ Text [ danish ] = "Tastatur" ;
+ Text [ french ] = "Clavier" ;
+ Text [ swedish ] = "Tangentbord" ;
+ Text [ dutch ] = "Toetsenbord" ;
+ Text [ spanish ] = "Teclado" ;
+ Text [ english_us ] = "Keyboard" ;
+ Group = TRUE ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "Klawiatura";
+ Text[ japanese ] = "ް";
+ Text[ chinese_traditional ] = "";
+ Text[ arabic ] = " ";
+ Text[ greek ] = "";
+ Text[ korean ] = "Ű";
+ Text[ turkish ] = "Klavye";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText TXT_ACC_GROUP
+ {
+ Pos = MAP_APPFONT ( 12 , 124 ) ;
+ Size = MAP_APPFONT ( 65 , 8 ) ;
+ Group = TRUE ;
+ Left = TRUE ;
+ FIXEDTEXT_TEXT_GROUP
+ Text [ english_us ] = "~Category" ;
+ Text [ portuguese_brazilian ] = "~Agrupar" ;
+ Text = "~Bereich" ;
+ Text [ swedish ] = "~Kategori" ;
+ Text [ danish ] = "Omrde" ;
+ Text [ italian ] = "Area" ;
+ Text [ spanish ] = "~rea" ;
+ Text [ french ] = "~Catgorie" ;
+ Text [ dutch ] = "~Bereik" ;
+ Text [ portuguese ] = "~Categoria" ;
+ Text[ chinese_simplified ] = "Χ(~C)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Obszar";
+ Text[ japanese ] = "͈(~C)";
+ Text[ chinese_traditional ] = "S(~C)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "(~C)";
+ Text[ turkish ] = "Ka~tegori";
+ Text[ language_user1 ] = " ";
+ };
+ Control BOX_ACC_GROUP
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 12 , 135 ) ;
+ Size = MAP_APPFONT ( 65 , 60 ) ;
+ TabStop = TRUE ;
+ HelpId = HID_CONFIGGROUP_ACC_LISTBOX ;
+ };
+ FixedText TXT_ACC_FUNCTION
+ {
+ Pos = MAP_APPFONT ( 83 , 124 ) ;
+ Size = MAP_APPFONT ( 75 , 8 ) ;
+ Left = TRUE ;
+ FIXEDTEXT_TEXT_FUNCTION
+ Text [ portuguese ] = "~Funo" ;
+ Text [ english_us ] = "~Function" ;
+ Text [ portuguese_brazilian ] = "~Funo" ;
+ Text = "~Funktion" ;
+ Text [ swedish ] = "~Funktion" ;
+ Text [ danish ] = "Funktion" ;
+ Text [ italian ] = "~Funzione" ;
+ Text [ spanish ] = "~Funcin" ;
+ Text [ french ] = "~Fonction" ;
+ Text [ dutch ] = "~Functie" ;
+ Text[ chinese_simplified ] = "(~O)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Funkcja";
+ Text[ japanese ] = "@\\(~O)";
+ Text[ chinese_traditional ] = "\\(~O)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "(~O)";
+ Text[ turkish ] = "lev";
+ Text[ language_user1 ] = " ";
+ };
+ Control BOX_ACC_FUNCTION
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 83 , 135 ) ;
+ Size = MAP_APPFONT ( 75 , 60 ) ;
+ TabStop = TRUE ;
+ HelpId = HID_CONFIGFUNCTION_ACC_LISTBOX ;
+ };
+ FixedText TXT_ACC_KEY
+ {
+ Pos = MAP_APPFONT ( 164 , 124 ) ;
+ Size = MAP_APPFONT ( 50 , 8 ) ;
+ Text = "~Tasten" ;
+ Text [ ENGLISH ] = "~Keys" ;
+ Text [ norwegian ] = "~Taster" ;
+ Text [ italian ] = "~Tasti" ;
+ Text [ portuguese_brazilian ] = "~Teclas" ;
+ Text [ portuguese ] = "~Teclas" ;
+ Text [ finnish ] = "~Nppimet" ;
+ Text [ danish ] = "Taster" ;
+ Text [ french ] = "~Clavier" ;
+ Text [ swedish ] = "~Tangenter" ;
+ Text [ dutch ] = "T~oetsen" ;
+ Text [ spanish ] = "~Teclas" ;
+ Text [ english_us ] = "~Keys" ;
+ Left = TRUE ;
+ Text[ chinese_simplified ] = "(~K)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Klawisze";
+ Text[ japanese ] = "(~K)";
+ Text[ chinese_traditional ] = "(~K)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "~";
+ Text[ korean ] = "Ű(~K)";
+ Text[ turkish ] = "T~ular";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox BOX_ACC_KEY
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 164 , 135 ) ;
+ Size = MAP_APPFONT ( 50 , 60 ) ;
+ TabStop = TRUE ;
+ };
+ GroupBox GRP_ACC_FUNCTIONS
+ {
+ Pos = MAP_APPFONT ( 6 , 115 ) ;
+ Size = MAP_APPFONT ( 214 , 87 ) ;
+ Group = TRUE ;
+ GROUPBOX_TEXT_FUNCTIONS
+ Text [ english_us ] = "Functions" ;
+ Text [ portuguese_brazilian ] = "Funes" ;
+ Text = "Funktionen" ;
+ Text [ swedish ] = "Funktioner" ;
+ Text [ danish ] = "Funktioner" ;
+ Text [ italian ] = "Funzioni" ;
+ Text [ spanish ] = "Funciones" ;
+ Text [ french ] = "Ensemble de fonctions" ;
+ Text [ dutch ] = "Functies" ;
+ Text [ portuguese ] = "Funes" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "Funkcje";
+ Text[ japanese ] = "@\\";
+ Text[ chinese_traditional ] = "\\";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "ɵ";
+ Text[ turkish ] = "levler";
+ Text[ language_user1 ] = " ";
+ };
+ PushButton BTN_RESET
+ {
+ Pos = MAP_APPFONT ( 226 , 189 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TabStop = TRUE ;
+ Group = TRUE ;
+ PUSHBUTTON_TEXT_RESET
+ Text [ english_us ] = "R~eset" ;
+ Text [ portuguese_brazilian ] = "~Zurcksetzen" ;
+ /* ### ACHTUNG: Neuer Text in Resource? Zur~cksetzen : ~Zurcksetzen */
+ /* ### ACHTUNG: Neuer Text in Resource? Zur~cksetzen : Zur~cksetzen */
+ /* ### ACHTUNG: Neuer Text in Resource? Zur~cksetzen : Zur~cksetzen */
+ Text = "Zur~cksetzen" ;
+ Text [ swedish ] = "~terstll" ;
+ Text [ danish ] = "Nulstil" ;
+ Text [ italian ] = "Ri~pristina" ;
+ Text [ spanish ] = "~Restablecer" ;
+ Text [ french ] = "Re~staurer" ;
+ Text [ dutch ] = "~Terugzetten" ;
+ Text [ portuguese ] = "~Restaurar" ;
+ Text[ chinese_simplified ] = "(~E)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Zresetuj";
+ Text[ japanese ] = "ؾ(~E)";
+ Text[ chinese_traditional ] = "](~E)";
+ Text[ arabic ] = " ";
+ Text[ greek ] = "~";
+ Text[ korean ] = "(~E)";
+ Text[ turkish ] = "Baa al";
+ Text[ language_user1 ] = " ";
+ };
+ PushButton BTN_LOAD
+ {
+ Pos = MAP_APPFONT ( 226 , 155 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TabStop = TRUE ;
+ Group = TRUE ;
+ PUSHBUTTON_TEXT_LOAD
+ Text [ english_us ] = "~Load..." ;
+ Text [ portuguese_brazilian ] = "~Laden..." ;
+ /* ### ACHTUNG: Neuer Text in Resource? L~aden... : ~Laden... */
+ Text = "L~aden..." ;
+ Text [ swedish ] = "L~adda..." ;
+ Text [ danish ] = "Indls..." ;
+ Text [ italian ] = "~Carica..." ;
+ Text [ spanish ] = "C~argar..." ;
+ Text [ french ] = "~Charger..." ;
+ Text [ dutch ] = "~Laden..." ;
+ Text [ portuguese ] = "~Carregar..." ;
+ Text[ chinese_simplified ] = "װ(~L)...";
+ Text[ russian ] = "...";
+ Text[ polish ] = "aduj...";
+ Text[ japanese ] = "ǂݍ(~L)...";
+ Text[ chinese_traditional ] = "˸(~L)...";
+ Text[ arabic ] = "...";
+ Text[ greek ] = "...";
+ Text[ korean ] = "ε(~L)...";
+ Text[ turkish ] = "Ykle...";
+ Text[ language_user1 ] = " ";
+ };
+ PushButton BTN_SAVE
+ {
+ Pos = MAP_APPFONT ( 226 , 172 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TabStop = TRUE ;
+ Group = TRUE ;
+ PUSHBUTTON_TEXT_SAVE
+ Text [ english_us ] = "~Save..." ;
+ Text [ portuguese_brazilian ] = "~Speichern..." ;
+ Text = "~Speichern..." ;
+ Text [ swedish ] = "~Spara..." ;
+ Text [ danish ] = "Gem..." ;
+ Text [ italian ] = "Salva..." ;
+ Text [ spanish ] = "~Guardar..." ;
+ Text [ french ] = "~Enregistrer..." ;
+ Text [ dutch ] = "O~pslaan..." ;
+ Text [ portuguese ] = "~Guardar..." ;
+ Text[ chinese_simplified ] = "(~S)...";
+ Text[ russian ] = "...";
+ Text[ polish ] = "Zapi~sz...";
+ Text[ japanese ] = "ۑ(~S)...";
+ Text[ chinese_traditional ] = "xs(~S)...";
+ Text[ arabic ] = "...";
+ Text[ greek ] = "~...";
+ Text[ korean ] = "(~S)...";
+ Text[ turkish ] = "Kaydet...";
+ Text[ language_user1 ] = " ";
+ };
+};
+ // TP_CONFIG_STATBAR -----------------------------------------------------
+TabPage TP_CONFIG_STATBAR
+{
+ HelpId = HID_CONFIG_STATBAR ;
+ Hide = TRUE ;
+ Size = MAP_APPFONT ( 282 , 205 ) ;
+ Control BOX_STATBAR_ENTRIES
+ {
+ Border = TRUE ;
+ ClipChildren = TRUE ;
+ Pos = MAP_APPFONT ( 12 , 14 ) ;
+ Size = MAP_APPFONT ( 202 , 185 ) ;
+ TabStop = TRUE ;
+ HelpId = HID_STATUSBARCONFIG_LISTBOX ;
+ };
+ GroupBox GRP_STATBAR
+ {
+ Group = TRUE ;
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 214 , 199 ) ;
+ Text = "Statusleiste " ;
+ Text [ ENGLISH ] = "Statusbar " ;
+ Text [ norwegian ] = "Statuslinje" ;
+ Text [ italian ] = "Barra di stato " ;
+ Text [ portuguese_brazilian ] = "Barra de Status " ;
+ Text [ portuguese ] = "Barra de estado " ;
+ Text [ finnish ] = "Tilarivi" ;
+ Text [ danish ] = "Statuslinje " ;
+ Text [ french ] = "Barre d'tat " ;
+ Text [ swedish ] = "Statuslist " ;
+ Text [ dutch ] = "Statusbalk " ;
+ Text [ spanish ] = "Barra de estado " ;
+ Text [ english_us ] = "Status bar " ;
+ Text[ chinese_simplified ] = "״̬ ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Pasek stanu ";
+ Text[ japanese ] = "ð ް ";
+ Text[ chinese_traditional ] = "AC ";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ";
+ Text[ turkish ] = "Durum ubuu ";
+ Text[ language_user1 ] = " ";
+ };
+ PushButton BTN_RESET
+ {
+ Pos = MAP_APPFONT ( 226 , 189 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TabStop = TRUE ;
+ Group = TRUE ;
+ PUSHBUTTON_TEXT_RESET
+ Text [ english_us ] = "R~eset" ;
+ Text [ portuguese_brazilian ] = "~Zurcksetzen" ;
+ /* ### ACHTUNG: Neuer Text in Resource? Zur~cksetzen : ~Zurcksetzen */
+ /* ### ACHTUNG: Neuer Text in Resource? Zur~cksetzen : Zur~cksetzen */
+ /* ### ACHTUNG: Neuer Text in Resource? Zur~cksetzen : Zur~cksetzen */
+ Text = "Zur~cksetzen" ;
+ Text [ swedish ] = "~terstll" ;
+ Text [ danish ] = "Nulstil" ;
+ Text [ italian ] = "Ri~pristina" ;
+ Text [ spanish ] = "~Restablecer" ;
+ Text [ french ] = "Re~staurer" ;
+ Text [ dutch ] = "~Terugzetten" ;
+ Text [ portuguese ] = "~Restaurar" ;
+ Text[ chinese_simplified ] = "(~E)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Zresetuj";
+ Text[ japanese ] = "ؾ(~E)";
+ Text[ chinese_traditional ] = "](~E)";
+ Text[ arabic ] = " ";
+ Text[ greek ] = "~";
+ Text[ korean ] = "(~E)";
+ Text[ turkish ] = "Baa al";
+ Text[ language_user1 ] = " ";
+ };
+ PushButton BTN_LOAD
+ {
+ Pos = MAP_APPFONT ( 226 , 155 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TabStop = TRUE ;
+ Group = TRUE ;
+ PUSHBUTTON_TEXT_LOAD
+ Text [ english_us ] = "~Load..." ;
+ Text [ portuguese_brazilian ] = "~Laden..." ;
+ /* ### ACHTUNG: Neuer Text in Resource? L~aden... : ~Laden... */
+ Text = "L~aden..." ;
+ Text [ swedish ] = "L~adda..." ;
+ Text [ danish ] = "Indls..." ;
+ Text [ italian ] = "~Carica..." ;
+ Text [ spanish ] = "C~argar..." ;
+ Text [ french ] = "~Charger..." ;
+ Text [ dutch ] = "~Laden..." ;
+ Text [ portuguese ] = "~Carregar..." ;
+ Text[ chinese_simplified ] = "װ(~L)...";
+ Text[ russian ] = "...";
+ Text[ polish ] = "aduj...";
+ Text[ japanese ] = "ǂݍ(~L)...";
+ Text[ chinese_traditional ] = "˸(~L)...";
+ Text[ arabic ] = "...";
+ Text[ greek ] = "...";
+ Text[ korean ] = "ε(~L)...";
+ Text[ turkish ] = "Ykle...";
+ Text[ language_user1 ] = " ";
+ };
+ PushButton BTN_SAVE
+ {
+ Pos = MAP_APPFONT ( 226 , 172 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TabStop = TRUE ;
+ Group = TRUE ;
+ PUSHBUTTON_TEXT_SAVE
+ Text [ english_us ] = "~Save..." ;
+ Text [ portuguese_brazilian ] = "~Speichern..." ;
+ Text = "~Speichern..." ;
+ Text [ swedish ] = "~Spara..." ;
+ Text [ danish ] = "Gem..." ;
+ Text [ italian ] = "Salva..." ;
+ Text [ spanish ] = "~Guardar..." ;
+ Text [ french ] = "~Enregistrer..." ;
+ Text [ dutch ] = "O~pslaan..." ;
+ Text [ portuguese ] = "~Guardar..." ;
+ Text[ chinese_simplified ] = "(~S)...";
+ Text[ russian ] = "...";
+ Text[ polish ] = "Zapi~sz...";
+ Text[ japanese ] = "ۑ(~S)...";
+ Text[ chinese_traditional ] = "xs(~S)...";
+ Text[ arabic ] = "...";
+ Text[ greek ] = "~...";
+ Text[ korean ] = "(~S)...";
+ Text[ turkish ] = "Kaydet...";
+ Text[ language_user1 ] = " ";
+ };
+ Bitmap CHKBTN_UNCHECKED { File = "chkun.bmp" ; };
+ Bitmap CHKBTN_CHECKED { File = "chkch.bmp" ; };
+ Bitmap CHKBTN_HICHECKED { File = "chkchhi.bmp" ; };
+ Bitmap CHKBTN_HIUNCHECKED { File = "chkunhi.bmp" ; };
+ Bitmap CHKBTN_TRISTATE { File = "chktri.bmp" ; };
+ Bitmap CHKBTN_HITRISTATE { File = "chktrihi.bmp" ; };
+};
+ // DLG_CONFIG ------------------------------------------------------------
+TabDialog DLG_CONFIG
+{
+ OutputSize = TRUE ;
+ Text = "Anpassen" ;
+ Text [ English ] = "Configuration" ;
+ Text [ norwegian ] = "Konfigurasjon" ;
+ Text [ italian ] = "Configura" ;
+ Text [ portuguese_brazilian ] = "Configurao" ;
+ Text [ portuguese ] = "Configurao" ;
+ Text [ finnish ] = "Asetukset" ;
+ Text [ danish ] = "Tilpas" ;
+ Text [ french ] = "Adaptation" ;
+ Text [ swedish ] = "Anpassa" ;
+ Text [ dutch ] = "Configureren" ;
+ Text [ spanish ] = "Configurar" ;
+ Text [ english_us ] = "Configuration" ;
+ Moveable = TRUE ;
+ SvLook = TRUE ;
+ TabControl 1
+ {
+ OutputSize = TRUE ;
+ PageList =
+ {
+ PageItem
+ {
+ Identifier = TP_CONFIG_MENU ;
+ /* ### ACHTUNG: Neuer Text in Resource? Men : Men */
+ /* ### ACHTUNG: Neuer Text in Resource? Men : Men */
+ Text = "Men" ;
+ Text [ English ] = "Menu" ;
+ PageResID = 300 ;
+ Text [ dutch ] = "Menu" ;
+ Text [ english_us ] = "Menu" ;
+ Text [ italian ] = "Menu" ;
+ Text [ spanish ] = "Men" ;
+ Text [ french ] = "Menu" ;
+ Text [ swedish ] = "Meny" ;
+ Text [ danish ] = "Menu" ;
+ Text [ portuguese_brazilian ] = "Men" ;
+ Text [ portuguese ] = "Menu" ;
+ Text[ chinese_simplified ] = "˵";
+ Text[ russian ] = "";
+ Text[ polish ] = "Menu";
+ Text[ japanese ] = "ƭ";
+ Text[ chinese_traditional ] = "\\";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "޴";
+ Text[ turkish ] = "Mn";
+ Text[ language_user1 ] = " ";
+ };
+ PageItem
+ {
+ Identifier = TP_CONFIG_ACCEL ;
+ Text = "Tastatur" ;
+ Text [ English ] = "Keyboard" ;
+ Text [ norwegian ] = "Tastatur" ;
+ Text [ italian ] = "Tastiera" ;
+ Text [ portuguese_brazilian ] = "Teclado" ;
+ Text [ portuguese ] = "Teclado" ;
+ Text [ finnish ] = "Nppimist" ;
+ Text [ danish ] = "Tastatur" ;
+ Text [ french ] = "Clavier" ;
+ Text [ swedish ] = "Tangentbord" ;
+ Text [ dutch ] = "Toetsenbord" ;
+ Text [ spanish ] = "Teclado" ;
+ Text [ english_us ] = "Keyboard" ;
+ PageResID = 301 ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "Klawiatura";
+ Text[ japanese ] = "ް";
+ Text[ chinese_traditional ] = "";
+ Text[ arabic ] = " ";
+ Text[ greek ] = "";
+ Text[ korean ] = "Ű";
+ Text[ turkish ] = "Klavye";
+ Text[ language_user1 ] = " ";
+ };
+ PageItem
+ {
+ Identifier = TP_CONFIG_STATBAR ;
+ Text = "Statusleiste" ;
+ Text [ English ] = "Statusbar" ;
+ Text [ norwegian ] = "Statuslinje" ;
+ Text [ italian ] = "Barra di stato" ;
+ Text [ portuguese_brazilian ] = "Barra de Status" ;
+ Text [ portuguese ] = "Barra de estado" ;
+ Text [ finnish ] = "Tilarivi" ;
+ Text [ danish ] = "Statuslinje" ;
+ Text [ french ] = "Barre d'tat" ;
+ Text [ swedish ] = "Statuslist" ;
+ Text [ dutch ] = "Statusbalk" ;
+ Text [ spanish ] = "Barra de estado" ;
+ Text [ english_us ] = "Status Bar" ;
+ PageResID = 302 ;
+ Text[ chinese_simplified ] = "״̬";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Pasek stanu";
+ Text[ japanese ] = "ðް";
+ Text[ chinese_traditional ] = "AC";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = "¸";
+ Text[ turkish ] = "Durum ubuu";
+ Text[ language_user1 ] = " ";
+ };
+ PageItem
+ {
+ Identifier = TP_CONFIG_OBJECTBAR ;
+ Text = "Symbolleisten" ;
+ Text [ ENGLISH ] = "Toolbox Options" ;
+ Text [ norwegian ] = "Verktyalternativer" ;
+ Text [ italian ] = "Barre dei simboli" ;
+ Text [ portuguese_brazilian ] = "Opes do Quadro de Ferramentas" ;
+ Text [ portuguese ] = "Barras de ferramentas" ;
+ Text [ finnish ] = "Tykalurivin mritykset" ;
+ Text [ danish ] = "Ikonlinjer" ;
+ Text [ french ] = "Barres d'outils" ;
+ Text [ swedish ] = "Symbollister" ;
+ Text [ dutch ] = "Werkbalken" ;
+ Text [ spanish ] = "Barras de smbolos" ;
+ Text [ english_us ] = "Toolbars" ;
+ PageResID = 303 ;
+ Text[ chinese_simplified ] = "ͼ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Paski symboli";
+ Text[ japanese ] = "°ް";
+ Text[ chinese_traditional ] = "ϥܦC";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = "";
+ Text[ turkish ] = "Ara ubuklar";
+ Text[ language_user1 ] = " ";
+ };
+ PageItem
+ {
+ Identifier = TP_CONFIG_EVENT ;
+ Text = "Ereignisse" ;
+ Text [ ENGLISH ] = "Events" ;
+ Text [ norwegian ] = "+++Events" ;
+ Text [ italian ] = "Eventi" ;
+ Text [ portuguese_brazilian ] = "Eventos" ;
+ Text [ portuguese ] = "Eventos" ;
+ Text [ finnish ] = "Tapahtumat" ;
+ Text [ danish ] = "Begivenheder" ;
+ Text [ french ] = "vnements" ;
+ Text [ swedish ] = "Hndelser" ;
+ Text [ dutch ] = "Gebeurtenissen" ;
+ Text [ spanish ] = "Acontecimientos" ;
+ Text [ english_us ] = "Events" ;
+ PageResID = 304 ;
+ Text[ chinese_simplified ] = "¼";
+ Text[ russian ] = "";
+ Text[ polish ] = "Wydarzenia";
+ Text[ japanese ] = "s_@";
+ Text[ chinese_traditional ] = "ʧ@";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "̺Ʈ";
+ Text[ turkish ] = "lemler";
+ Text[ language_user1 ] = " ";
+ };
+ };
+ };
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "Konfiguracja";
+ Text[ japanese ] = "ݒ";
+ Text[ chinese_traditional ] = "tm";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "zelletir";
+ Text[ language_user1 ] = " ";
+};
+ // Strings ---------------------------------------------------------------
+String STR_NEW
+{
+ Text = "Neu" ;
+ Text [ ENGLISH ] = "New" ;
+ Text [ norwegian ] = "Ny" ;
+ Text [ italian ] = "Nuovo" ;
+ Text [ portuguese_brazilian ] = "Novo" ;
+ Text [ portuguese ] = "Novo" ;
+ Text [ finnish ] = "Uusi" ;
+ Text [ danish ] = "Ny" ;
+ Text [ french ] = "Nouveau" ;
+ Text [ swedish ] = "Nytt" ;
+ Text [ dutch ] = "Nieuw" ;
+ Text [ spanish ] = "Nuevo" ;
+ Text [ english_us ] = "New" ;
+ Text[ chinese_simplified ] = "½";
+ Text[ russian ] = "";
+ Text[ polish ] = "Nowy";
+ Text[ japanese ] = "VK쐬";
+ Text[ chinese_traditional ] = "}ҷs";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "Yeni";
+ Text[ language_user1 ] = " ";
+};
+String STR_OPEN
+{
+ /* ### ACHTUNG: Neuer Text in Resource? ffnen : ffnen */
+ /* ### ACHTUNG: Neuer Text in Resource? ffnen : ffnen */
+ Text = "ffnen" ;
+ Text [ ENGLISH ] = "Open" ;
+ Text [ norwegian ] = "pne" ;
+ Text [ italian ] = "Apri" ;
+ Text [ portuguese_brazilian ] = "Abrir" ;
+ Text [ portuguese ] = "Abrir" ;
+ Text [ finnish ] = "Avaa" ;
+ Text [ danish ] = "bn" ;
+ Text [ french ] = "Ouvrir" ;
+ Text [ swedish ] = "ppna" ;
+ Text [ dutch ] = "Openen" ;
+ Text [ spanish ] = "Abrir" ;
+ Text [ english_us ] = "Open" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "Otwrz";
+ Text[ japanese ] = "J";
+ Text[ chinese_traditional ] = "}";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "A";
+ Text[ language_user1 ] = " ";
+};
+String STR_SAVE
+{
+ Text = "Speichern" ;
+ Text [ ENGLISH ] = "Save" ;
+ Text [ norwegian ] = "Save" ;
+ Text [ italian ] = "Salva" ;
+ Text [ portuguese_brazilian ] = "Gravar" ;
+ Text [ portuguese ] = "Guardar" ;
+ Text [ finnish ] = "Tallennus" ;
+ Text [ danish ] = "Gem" ;
+ Text [ french ] = "Enregistrer" ;
+ Text [ swedish ] = "Spara" ;
+ Text [ dutch ] = "Opslaan" ;
+ Text [ spanish ] = "Guardar" ;
+ Text [ english_us ] = "Save" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "Zapisz";
+ Text[ japanese ] = "ۑ";
+ Text[ chinese_traditional ] = "xs";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "Kaydet";
+ Text[ language_user1 ] = " ";
+};
+String STR_SAVEAS
+{
+ Text = "Speichern als" ;
+ Text [ ENGLISH ] = "Save as" ;
+ Text [ norwegian ] = "Lagre som" ;
+ Text [ italian ] = "Salva con nome" ;
+ Text [ portuguese_brazilian ] = "Gravar como" ;
+ Text [ portuguese ] = "Guardar como" ;
+ Text [ finnish ] = "Tallenna nimell" ;
+ Text [ danish ] = "Gem som" ;
+ Text [ french ] = "Enregistrer sous" ;
+ Text [ swedish ] = "Spara som" ;
+ Text [ dutch ] = "Opslaan als" ;
+ Text [ spanish ] = "Guardar como" ;
+ Text [ english_us ] = "Save As" ;
+ Text[ chinese_simplified ] = "Ϊ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Zapisz jako";
+ Text[ japanese ] = "Otĕۑ";
+ Text[ chinese_traditional ] = "tss";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = "ٸ ̸ ";
+ Text[ turkish ] = "Farkl kaydet";
+ Text[ language_user1 ] = " ";
+};
+String STR_PRINT
+{
+ Text = "Drucken" ;
+ Text [ ENGLISH ] = "Print" ;
+ Text [ norwegian ] = "Skriv ut" ;
+ Text [ italian ] = "Stampa" ;
+ Text [ portuguese_brazilian ] = "Imprimir" ;
+ Text [ portuguese ] = "Imprimir" ;
+ Text [ finnish ] = "Tulosta" ;
+ Text [ danish ] = "Udskriv" ;
+ Text [ french ] = "Imprimer" ;
+ Text [ swedish ] = "Skriv ut" ;
+ Text [ dutch ] = "Afdrukken" ;
+ Text [ spanish ] = "Imprimir" ;
+ Text [ english_us ] = "Print" ;
+ Text[ chinese_simplified ] = "ӡ";
+ Text[ russian ] = "";
+ Text[ polish ] = "Drukuj";
+ Text[ japanese ] = "";
+ Text[ chinese_traditional ] = "CL";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "μ";
+ Text[ turkish ] = "Yazdr";
+ Text[ language_user1 ] = " ";
+};
+String STR_QUIT
+{
+ Text = "Beenden" ;
+ Text [ ENGLISH ] = "Quit" ;
+ Text [ norwegian ] = "Avslutt" ;
+ Text [ italian ] = "Esci" ;
+ Text [ portuguese_brazilian ] = "Sair" ;
+ Text [ portuguese ] = "Sair" ;
+ Text [ finnish ] = "Lopeta" ;
+ Text [ danish ] = "Afslut" ;
+ Text [ french ] = "Quitter" ;
+ Text [ swedish ] = "Avsluta" ;
+ Text [ dutch ] = "Sluiten" ;
+ Text [ spanish ] = "Terminar" ;
+ Text [ english_us ] = "Exit" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "Zakocz";
+ Text[ japanese ] = "I";
+ Text[ chinese_traditional ] = "";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "Kapat";
+ Text[ language_user1 ] = " ";
+};
+String STR_CUT
+{
+ Text = "Ausschneiden" ;
+ Text [ ENGLISH ] = "Cut" ;
+ Text [ norwegian ] = "Cut" ;
+ Text [ italian ] = "Taglia" ;
+ Text [ portuguese_brazilian ] = "Recortar" ;
+ Text [ portuguese ] = "Cortar" ;
+ Text [ finnish ] = "Leikkaa" ;
+ Text [ danish ] = "Klip" ;
+ Text [ french ] = "Couper" ;
+ Text [ swedish ] = "Klipp ut" ;
+ Text [ dutch ] = "Knippen" ;
+ Text [ spanish ] = "Cortar" ;
+ Text [ english_us ] = "Cut" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "Wytnij";
+ Text[ japanese ] = "؂";
+ Text[ chinese_traditional ] = "ŤU";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "߶󳻱";
+ Text[ turkish ] = "Kes";
+ Text[ language_user1 ] = " ";
+};
+String STR_COPY
+{
+ Text = "Kopieren" ;
+ Text [ ENGLISH ] = "Copy" ;
+ Text [ norwegian ] = "Kopi" ;
+ Text [ italian ] = "Copia" ;
+ Text [ portuguese_brazilian ] = "Copiar" ;
+ Text [ portuguese ] = "Copiar" ;
+ Text [ finnish ] = "Kopioi" ;
+ Text [ danish ] = "Kopier" ;
+ Text [ french ] = "Copier" ;
+ Text [ swedish ] = "Kopiera" ;
+ Text [ dutch ] = "Kopiren" ;
+ Text [ spanish ] = "Copiar" ;
+ Text [ english_us ] = "Copy" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "Kopiuj";
+ Text[ japanese ] = "߰";
+ Text[ chinese_traditional ] = "ƻs";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "Kopyala";
+ Text[ language_user1 ] = " ";
+};
+String STR_PASTE
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Einfgen : Einfgen */
+ /* ### ACHTUNG: Neuer Text in Resource? Einfgen : Einfgen */
+ Text = "Einfgen" ;
+ Text [ ENGLISH ] = "Paste" ;
+ Text [ norwegian ] = "Paste" ;
+ Text [ italian ] = "Incolla" ;
+ Text [ portuguese_brazilian ] = "Colar" ;
+ Text [ portuguese ] = "Colar" ;
+ Text [ finnish ] = "Liit" ;
+ Text [ danish ] = "Indst" ;
+ Text [ french ] = "Coller" ;
+ Text [ swedish ] = "Klistra in" ;
+ Text [ dutch ] = "Invoegen" ;
+ Text [ spanish ] = "Pegar" ;
+ Text [ english_us ] = "Paste" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "Wklej";
+ Text[ japanese ] = "\\t";
+ Text[ chinese_traditional ] = "J";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "ٿ ֱ";
+ Text[ turkish ] = "Yaptr";
+ Text[ language_user1 ] = " ";
+};
+String STR_DELETE
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Lschen : Lschen */
+ /* ### ACHTUNG: Neuer Text in Resource? Lschen : Lschen */
+ Text = "Lschen" ;
+ Text [ ENGLISH ] = "Delete" ;
+ Text [ norwegian ] = "Slett" ;
+ Text [ italian ] = "Elimina" ;
+ Text [ portuguese_brazilian ] = "Apagar" ;
+ Text [ portuguese ] = "Eliminar" ;
+ Text [ finnish ] = "Poista" ;
+ Text [ danish ] = "Slet" ;
+ Text [ french ] = "Supprimer" ;
+ Text [ swedish ] = "Radera" ;
+ Text [ dutch ] = "Wissen" ;
+ Text [ spanish ] = "Eliminar" ;
+ Text [ english_us ] = "Delete" ;
+ Text[ chinese_simplified ] = "ɾ";
+ Text[ russian ] = "";
+ Text[ polish ] = "Usu";
+ Text[ japanese ] = "폜";
+ Text[ chinese_traditional ] = "R";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "Sil";
+ Text[ language_user1 ] = " ";
+};
+String STR_FIND
+{
+ Text = "Suchen" ;
+ Text [ ENGLISH ] = "Find" ;
+ Text [ norwegian ] = "Ske" ;
+ Text [ italian ] = "Cerca" ;
+ Text [ portuguese_brazilian ] = "Procurar" ;
+ Text [ portuguese ] = "Localizar" ;
+ Text [ finnish ] = "Etsi" ;
+ Text [ danish ] = "Sg" ;
+ Text [ french ] = "Rechercher" ;
+ Text [ swedish ] = "Sk" ;
+ Text [ dutch ] = "Zoeken" ;
+ Text [ spanish ] = "Buscar" ;
+ Text [ english_us ] = "Search" ;
+ Text[ chinese_simplified ] = "Ѱ";
+ Text[ russian ] = "";
+ Text[ polish ] = "Szukaj";
+ Text[ japanese ] = "";
+ Text[ chinese_traditional ] = "M";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "ã";
+ Text[ turkish ] = "Ara";
+ Text[ language_user1 ] = " ";
+};
+String STR_FINDBACKWARD
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Rckwrts suchen : Rckwrts suchen */
+ /* ### ACHTUNG: Neuer Text in Resource? Rckwrts suchen : Rckwrts suchen */
+ Text = "Rckwrts suchen" ;
+ Text [ ENGLISH ] = "Find backward" ;
+ Text [ norwegian ] = "Sk bakover" ;
+ Text [ italian ] = "Cerca all'indietro" ;
+ Text [ portuguese_brazilian ] = "Procurar Para Trs" ;
+ Text [ portuguese ] = "Localizar para trs" ;
+ Text [ finnish ] = "Etsi taaksepin" ;
+ Text [ danish ] = "Sg baglns" ;
+ Text [ french ] = "Recherche vers le haut" ;
+ Text [ swedish ] = "Sk bakt" ;
+ Text [ dutch ] = "Achterwaarts zoeken" ;
+ Text [ spanish ] = "Buscar hacia atrs" ;
+ Text [ english_us ] = "Search backward" ;
+ Text[ chinese_simplified ] = "Ѱ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Szukaj wstecz";
+ Text[ japanese ] = " ߂";
+ Text[ chinese_traditional ] = "VM";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = "ڷ ã";
+ Text[ turkish ] = "Geriye doru ara";
+ Text[ language_user1 ] = " ";
+};
+String STR_PROPERTIES
+{
+ Text = "Eigenschaften" ;
+ Text [ ENGLISH ] = "Properties" ;
+ Text [ norwegian ] = "Egenskaper" ;
+ Text [ italian ] = "Propriet" ;
+ Text [ portuguese_brazilian ] = "Propriedades" ;
+ Text [ portuguese ] = "Propriedades" ;
+ Text [ finnish ] = "Ominaisuudet" ;
+ Text [ danish ] = "Egenskaber" ;
+ Text [ french ] = "Proprits" ;
+ Text [ swedish ] = "Egenskaper" ;
+ Text [ dutch ] = "Eigenschappen" ;
+ Text [ spanish ] = "Propiedades" ;
+ Text [ english_us ] = "Properties" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "Waciwoci";
+ Text[ japanese ] = "è";
+ Text[ chinese_traditional ] = "ݩ";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "zellikler";
+ Text[ language_user1 ] = " ";
+};
+String STR_FRONT
+{
+ Text = "Nach vorn" ;
+ Text [ ENGLISH ] = "Front" ;
+ Text [ norwegian ] = "Foran" ;
+ Text [ italian ] = "In avanti" ;
+ Text [ portuguese_brazilian ] = "Primeiro plano" ;
+ Text [ portuguese ] = "Para a frente" ;
+ Text [ finnish ] = "Edustalle" ;
+ Text [ danish ] = "Fremad" ;
+ Text [ french ] = "Premier plan" ;
+ Text [ swedish ] = "Framt" ;
+ Text [ dutch ] = "Naar voren" ;
+ Text [ spanish ] = "Primer plano" ;
+ Text [ english_us ] = "To front" ;
+ Text[ chinese_simplified ] = "ǰ";
+ Text[ russian ] = "";
+ Text[ polish ] = "Do przodu";
+ Text[ japanese ] = "O";
+ Text[ chinese_traditional ] = "Ve";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = "";
+ Text[ turkish ] = "leri";
+ Text[ language_user1 ] = " ";
+};
+ // MessageBoxes ----------------------------------------------------------
+QueryBox QBX_MNUCFG_UNDEFINED_FUNCTIONS
+{
+ Buttons = WB_YES_NO ;
+ DefButton = WB_DEF_NO ;
+ /* ### ACHTUNG: Neuer Text in Resource? Es existieren noch undefinierte Funktionen (???).\n\nWollen Sie diese Konfiguration trotzdem bernehmen? : Es existieren noch undefinierte Funktionen (???).\n\nWollen Sie diese Konfiguration trotzdem bernehmen? */
+ /* ### ACHTUNG: Neuer Text in Resource? Es existieren noch undefinierte Funktionen (???).\n\nWollen Sie diese Konfiguration trotzdem bernehmen? : Es existieren noch undefinierte Funktionen (???).\n\nWollen Sie diese Konfiguration trotzdem bernehmen? */
+ Message = "Es existieren noch undefinierte Funktionen (???).\n\nWollen Sie diese Konfiguration trotzdem bernehmen?" ;
+ Message [ ENGLISH ] = "There are still undefined functions (???).\n\nContinue anyway?" ;
+ Message [ norwegian ] = "Det er fremdeles udefinerte funksjoner are still undefined functions (???).\n\nFortsett likevel?" ;
+ Message [ italian ] = "Vi sono ancora funzioni non definite (???).\n\nContinuare lo stesso?" ;
+ Message [ portuguese_brazilian ] = "Ainda existem Funes indefinidas (???).\n\nContinuar de qualquer forma?" ;
+ Message [ portuguese ] = "Ainda existem funes indefinidas (???).\n\nDeseja continuar?" ;
+ Message [ finnish ] = "Mrittmttmi toimintoja on vielkin (???).\n\nJatketaanko silti?" ;
+ Message [ danish ] = "Der eksisterer stadig udefinerede funktioner (???).\n\nVil du overtage denne konfiguration alligevel?" ;
+ Message [ french ] = "Certaines fonctions n'ont pas t dfinies (???).\n\nPoursuivre malgr tout ?" ;
+ Message [ swedish ] = "Det finns fortfarande odefinierade funktioner (???). \n\nVill Du nd verta den hr konfigurationen?" ;
+ Message [ dutch ] = "Er zijn nog ongedefinieerde functies (???).\n\nWilt u deze configuratie toch overnemen?" ;
+ Message [ spanish ] = "Todava hay funciones no definidas (???).\n\nDesea de todas formas aceptar esta configuracin?" ;
+ Message [ english_us ] = "There are still undefined functions (???).\n\nDo you want to accept the configuration anyway?" ;
+ Message[ chinese_simplified ] = "δĹܡ\n\nҪ";
+ Message[ russian ] = " , (???).\n\n ?";
+ Message[ polish ] = "Istniej jeszcze nie zdefiniowane funkcje (???).\n\nCzy akceptujesz mimo to t konfiguracj?";
+ Message[ japanese ] = "܂`ĂȂ@\\܂(???)\n\n̐ݒKĂłH";
+ Message[ chinese_traditional ] = "٦sbwq\\C\n\n٬OnoӰtmH";
+ Message[ arabic ] = " (???).\n\n ߿";
+ Message[ greek ] = " (???).\n\n ;";
+ Message[ korean ] = "ǵ ɵ ֽϴ. (???).\n\n׷ Ͻðڽϱ?";
+ Message[ turkish ] = "Hala tanmlanmam ilevler mevcut (???).\n\nBu konfigrasyonu yine de kabul etmek istiyor musunuz?";
+ Message[ language_user1 ] = " ";
+};
+QueryBox QBX_MNUCFG_POPUP_FUNCTIONS
+{
+ Buttons = WB_YES_NO ;
+ DefButton = WB_DEF_NO ;
+ /* ### ACHTUNG: Neuer Text in Resource? Es existieren noch Eintrge mit Funktionen, die nur Popups zugewiesen werden knnen.\n\nWollen Sie diese Konfiguration trotzdem bernehmen? : Es existieren noch Eintrge mit Funktionen, die nur Popups zugewiesen werden knnen.\n\nWollen Sie diese Konfiguration trotzdem bernehmen? */
+ /* ### ACHTUNG: Neuer Text in Resource? Es existieren noch Eintrge mit Funktionen, die nur Popups zugewiesen werden knnen.\n\nWollen Sie diese Konfiguration trotzdem bernehmen? : Es existieren noch Eintrge mit Funktionen, die nur Popups zugewiesen werden knnen.\n\nWollen Sie diese Konfiguration trotzdem bernehmen? */
+ Message = "Es existieren noch Eintrge mit Funktionen, die nur Popups zugewiesen werden knnen.\n\nWollen Sie diese Konfiguration trotzdem bernehmen?" ;
+ Message [ ENGLISH ] = "There are still entries with functions that can only be assigned to popups.\n\nContinue anyway?" ;
+ Message [ norwegian ] = "Det er fremdeles oppfringer med funksjoner som bare kan tilordnes tilleggsmenyenps.\n\nFortsett likevel?" ;
+ Message [ italian ] = "Vi sono ancora voci con funzioni che possono essere assegnate solo a menu di scelta rapida.\n\nContinuare lo stesso?" ;
+ Message [ portuguese_brazilian ] = "Existem entradas com Funes que s podem ser atribuidas a popupps.\n\nContinuar de qualquer forma?" ;
+ Message [ portuguese ] = "Existem ainda entradas com funes que s podem ser atribudas a janelas instantneas.\n\nContinuar?" ;
+ Message [ finnish ] = "Luettelossa on vielkin toimintoja, jotka voidaan liitt vain kohovalikoihin..\n\nJatketaanko silti?" ;
+ Message [ danish ] = "Der findes stadig elementer med funktioner, som kun kan tildeles popups.\n\nVil du overtage denne konfiguration alligevel?" ;
+ Message [ french ] = "Certaines entres sont encore associes des fonctions rserves des menus droulants\n\nPoursuivre malgr tout ?" ;
+ Message [ swedish ] = "Det finns fortfarande poster med funktioner som bara kan tilldelas popups.\n\nVill Du nd verta den hr konfigurationen?" ;
+ Message [ dutch ] = "Er zijn nog items met functies die alleen aan popups kunnen worden toegewezen.\n\nWilt u deze configuratie toch overnemen?" ;
+ Message [ spanish ] = "Todava hay entradas con funciones que solo pueden ser asignadas a emergentes.\n\nDesea continuar de todos modos?" ;
+ Message [ english_us ] = "There are still entries with functions that can only be assigned to pop-ups.\n\nContinue anyway?" ;
+ Message[ chinese_simplified ] = "һЩָֻʽ˵ִеľijֹܵĿ\nҪ";
+ Message[ russian ] = " , .\n\n ?";
+ Message[ polish ] = "Istniej jeszcze wpisy, ktre mog zosta przypisane tylko oknom typu popup. n\nCzy chcesz mimo to zastosowa t konfiguracj?";
+ Message[ japanese ] = "܂߯߱߂݂̂Ɋ蓖Ă@\\̍ڂ܂B\n\n̐ݒKpĂł?";
+ Message[ chinese_traditional ] = "٦sb@ǥuwֳt\\檺㦳Yإ\\઺ءC\nz٬OnoӰtmH";
+ Message[ arabic ] = " .\n\n ߿";
+ Message[ greek ] = " .\n\n ;";
+ Message[ korean ] = "˾ ִ ɵ ׸ ֽϴ. \n\n׷ Ͻðڽϱ?";
+ Message[ turkish ] = "Yalnzca alan mnlere atanabilen ilevleri olan giriler mevcut.\n\nBu konfigrasyon ile devam etmek istiyor musunuz?";
+ Message[ language_user1 ] = " ";
+};
+InfoBox IBX_MNUCFG_ALREADY_INCLUDED
+{
+ Message = "Die Funktion ist bereits in diesem Popup enthalten." ;
+ Message [ ENGLISH ] = "Function is already included in this popup." ;
+ Message [ norwegian ] = "Funksjon er allerede inkludert i denne tilleggsmenyen." ;
+ Message [ italian ] = "Funzione gi inclusa in questo elenco." ;
+ Message [ portuguese_brazilian ] = "A funo j est includa neste popup." ;
+ Message [ portuguese ] = "A funo j est includa neste menu instantneo." ;
+ Message [ finnish ] = "Toiminto on jo listty thn kohovalikkoon." ;
+ Message [ danish ] = "Funktionen er allerede indeholdt i denne popup." ;
+ Message [ french ] = "Cette fonction est dj incluse dans la liste Menu." ;
+ Message [ swedish ] = "Funktionen ingr redan i denna snabbmeny." ;
+ Message [ dutch ] = "Deze functie komt al voor in dit menu." ;
+ Message [ spanish ] = "La funcin ya est incluida en este emergente." ;
+ Message [ english_us ] = "Function is already included in this popup." ;
+ Message[ chinese_simplified ] = "ʽ˵Ѿܡ";
+ Message[ russian ] = " .";
+ Message[ polish ] = "Ta funkcja jest ju zawarta w menu podrcznym.";
+ Message[ japanese ] = "@\\͂łɂ߯߱߂Ɋ܂܂Ă܂B";
+ Message[ chinese_traditional ] = "oӧֳt\\wg]tFoӥ\\C";
+ Message[ arabic ] = " .";
+ Message[ greek ] = " .";
+ Message[ korean ] = " ̹ ˾ ԵǾ ֽϴ.";
+ Message[ turkish ] = "lev zaten bu alan mnde mevcut.";
+ Message[ language_user1 ] = " ";
+};
+String STR_LOADMENUCONFIG
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Menkonfiguration laden : Menkonfiguration laden */
+ /* ### ACHTUNG: Neuer Text in Resource? Menkonfiguration laden : Menkonfiguration laden */
+ Text = "Menkonfiguration laden" ;
+ Text [ ENGLISH ] = "Load Menu Configuration" ;
+ Text [ english_us ] = "Load Menu Configuration" ;
+ Text [ italian ] = "Carica configurazione menu" ;
+ Text [ spanish ] = "Cargar configuracin del men" ;
+ Text [ french ] = "Charger config. du menu" ;
+ Text [ dutch ] = "Menuconfiguratie laden" ;
+ Text [ swedish ] = "Ladda menykonfiguration" ;
+ Text [ danish ] = "Indls menukonfiguration" ;
+ Text [ portuguese_brazilian ] = "Menkonfiguration laden" ;
+ Text [ portuguese ] = "Carregar configurao do menu" ;
+ Text[ chinese_simplified ] = "װز˵";
+ Text[ russian ] = " ";
+ Text[ polish ] = "aduj konfiguracj menu";
+ Text[ japanese ] = "ƭݒ̓ǂݍ";
+ Text[ chinese_traditional ] = "˸\\tm";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = "޴ ε";
+ Text[ turkish ] = "Mn konfigrasyonunu ykle";
+ Text[ language_user1 ] = " ";
+};
+String STR_SAVEMENUCONFIG
+{
+ Text = "Menkonfiguration speichern" ;
+ Text [ ENGLISH ] = "Save Menu Configuration" ;
+ Text [ english_us ] = "Save Menu Configuration" ;
+ Text [ italian ] = "Salva configurazione menu" ;
+ Text [ spanish ] = "Guardar configuracin del men" ;
+ Text [ french ] = "Enregistrer la configuration du menu" ;
+ Text [ dutch ] = "Menuconfiguratie opslaan" ;
+ Text [ swedish ] = "Spara menykonfiguration" ;
+ Text [ danish ] = "Gem menukonfiguration" ;
+ Text [ portuguese_brazilian ] = "Menkonfiguration speichern" ;
+ Text [ portuguese ] = "Guardar configurao do menu" ;
+ Text[ chinese_simplified ] = "̲˵";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Zapisz konfiguracj menu";
+ Text[ japanese ] = "ƭݒ̏㏑ۑ";
+ Text[ chinese_traditional ] = "xstm";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = "޴ ";
+ Text[ turkish ] = "Mn konfigrasyonunu kaydet";
+};
+String STR_LOADACCELCONFIG
+{
+ Text = "Tastaturkonfiguration laden" ;
+ Text [ ENGLISH ] = "Load Keyboard Configuration" ;
+ Text [ dutch ] = "Tastatuurconfiguratie laden" ;
+ Text [ english_us ] = "Load Keyboard Configuration" ;
+ Text [ italian ] = "Carica configurazione tastiera" ;
+ Text [ spanish ] = "Cargar configuracin del teclado" ;
+ Text [ french ] = "Charger configuration du clavier" ;
+ Text [ swedish ] = "Ladda tangentbordskonfiguration" ;
+ Text [ danish ] = "Indls tastaturkonfiguration" ;
+ Text [ portuguese_brazilian ] = "Tastaturkonfiguration laden" ;
+ Text [ portuguese ] = "Carregar configurao do teclado" ;
+ Text[ chinese_simplified ] = "װؼ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "aduj konfiguracj klawiatury";
+ Text[ japanese ] = "ްސݒ̓ǂݍ";
+ Text[ chinese_traditional ] = "˸Ltm";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = "Ű ε";
+ Text[ turkish ] = "Klavye konfigrasyonunu ykle";
+ Text[ language_user1 ] = " ";
+};
+String STR_SAVEACCELCONFIG
+{
+ Text = "Tastaturkonfiguration speichern" ;
+ Text [ ENGLISH ] = "Save Keyboard Configuration" ;
+ Text [ english_us ] = "Save Keyboard Configuration" ;
+ Text [ italian ] = "Salva configurazione tastiera" ;
+ Text [ spanish ] = "Guardar configuracin del teclado" ;
+ Text [ french ] = "Enregistrer la configuration du clavier" ;
+ Text [ dutch ] = "Toetsenbordconfiguratie opslaan" ;
+ Text [ swedish ] = "Spara tangentbordskonfiguration" ;
+ Text [ danish ] = "Gem tastaturkonfiguration" ;
+ Text [ portuguese_brazilian ] = "Tastaturkonfiguration speichern" ;
+ Text [ portuguese ] = "Guardar configurao do teclado" ;
+ Text[ chinese_simplified ] = "̼";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Zapisz konfiguracj klawiatury";
+ Text[ japanese ] = "ްސݒ̏㏑ۑ";
+ Text[ chinese_traditional ] = "xsLtm";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = "Ű屸 ";
+ Text[ turkish ] = "Klavye konfigrasyonunu kaydet";
+};
+String STR_LOADSTATBARCONFIG
+{
+ Text = "Statusleistenkonfiguration laden" ;
+ Text [ ENGLISH ] = "Load Statusbar Configuration" ;
+ Text [ dutch ] = "Statusballk-configuratie laden" ;
+ Text [ english_us ] = "Load Status Bar Configuration" ;
+ Text [ italian ] = "Carica configurazione barra di stato" ;
+ Text [ spanish ] = "Cargar configuracin de la barra de estado" ;
+ Text [ french ] = "Chargement de la configuration de la barre d'tat" ;
+ Text [ swedish ] = "Ladda statuslistkonfiguration" ;
+ Text [ danish ] = "Indls statuslinjekonfiguration" ;
+ Text [ portuguese_brazilian ] = "Statusleistenkonfiguration laden" ;
+ Text [ portuguese ] = "Carregar configurao da barra de estado" ;
+ Text[ chinese_simplified ] = "װ״̬";
+ Text[ russian ] = " ";
+ Text[ polish ] = "aduj konfiguracj paska stanu";
+ Text[ japanese ] = "ð ްݒ̓ǂݍ";
+ Text[ chinese_traditional ] = "˸ACtm";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = "¸ ε";
+ Text[ turkish ] = "Durum ubuu konfigrasyonunu ykle";
+ Text[ language_user1 ] = " ";
+};
+String STR_SAVESTATBARCONFIG
+{
+ Text = "Statusleistenkonfiguration speichern" ;
+ Text [ ENGLISH ] = "Save Statusbar Configuration" ;
+ Text [ english_us ] = "Save Status Bar Configuration" ;
+ Text [ italian ] = "Salva configurazione barra di stato" ;
+ Text [ spanish ] = "Guardar configuracin de la barra de estado" ;
+ Text [ french ] = "Enregistrer la configuration de la barre d'tat" ;
+ Text [ dutch ] = "Statusbalkconfiguratie opslaan" ;
+ Text [ swedish ] = "Spara statuslistkonfiguration" ;
+ Text [ danish ] = "Gem statuslinjekonfiguration" ;
+ Text [ portuguese_brazilian ] = "Statusleistenkonfiguration speichern" ;
+ Text [ portuguese ] = "Guardar configurao da barra de estado" ;
+ Text[ chinese_simplified ] = "״̬";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Zapisz konfiguracj paska stanu";
+ Text[ japanese ] = "ð ްݒ̏㏑ۑ";
+ Text[ chinese_traditional ] = "xsAtm";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = "¸ ";
+ Text[ turkish ] = "Durum ubuu konfigrasyonunu kaydet";
+};
+String STR_MENU
+{
+ Text = "Men" ;
+ Text [ ENGLISH ] = "Menu" ;
+ Text [ english_us ] = "Menu" ;
+ Text [ swedish ] = "Meny" ;
+ Text [ danish ] = "Menu" ;
+ Text [ italian ] = "Menu" ;
+ Text [ spanish ] = "Men" ;
+ Text [ french ] = "Menu" ;
+ Text [ dutch ] = "Menu" ;
+ Text [ portuguese_brazilian ] = "Men" ;
+ Text [ portuguese ] = "Menu" ;
+ Text[ chinese_simplified ] = "˵";
+ Text[ russian ] = "";
+ Text[ polish ] = "Menu";
+ Text[ japanese ] = "ƭ";
+ Text[ chinese_traditional ] = "\\";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "޴";
+ Text[ turkish ] = "Mn";
+ Text[ language_user1 ] = " ";
+};
+ // ********************************************************************** EOF
diff --git a/sfx2/source/dialog/dialog.hrc b/sfx2/source/dialog/dialog.hrc
new file mode 100644
index 000000000000..7d68879db823
--- /dev/null
+++ b/sfx2/source/dialog/dialog.hrc
@@ -0,0 +1,184 @@
+/*************************************************************************
+ *
+ * $RCSfile: dialog.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:30 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SFX_DIALOG_HRC
+#define _SFX_DIALOG_HRC
+
+#include "sfx.hrc"
+
+// defines ---------------------------------------------------------------
+
+#define ID_NEW 1
+#define ID_EDIT 2
+#define ID_DELETE 3
+
+#define RC_DIALOG_BEGIN RID_SFX_DIALOG_START
+
+#define STR_RESET ( RC_DIALOG_BEGIN + 0)
+#define STR_BASEFMT ( RC_DIALOG_BEGIN + 1)
+
+#define CB_USE_PASSWD ( RC_DIALOG_BEGIN + 2)
+#define CB_READ_ONLY ( RC_DIALOG_BEGIN + 3)
+#define BTN_MANAGER ( RC_DIALOG_BEGIN + 4)
+#define BTN_STANDARD ( RC_DIALOG_BEGIN + 5)
+#define STR_PATH_NOT_FOUND1 ( RC_DIALOG_BEGIN + 6)
+#define STR_PATH_NOT_FOUND2 ( RC_DIALOG_BEGIN + 7)
+#define DLG_PASSWD ( RC_DIALOG_BEGIN + 8)
+#define STR_FILEDLG_INSERT ( RC_DIALOG_BEGIN + 10)
+#define STR_TABPAGE_MANAGESTYLES ( RC_DIALOG_BEGIN + 12)
+#define MSG_TABPAGE_INVALIDNAME ( RC_DIALOG_BEGIN + 13)
+#define MSG_TABPAGE_INVALIDSTYLE ( RC_DIALOG_BEGIN + 14)
+#define DLG_NEW_STYLE_BY_EXAMPLE ( RC_DIALOG_BEGIN + 15)
+#define MSG_POOL_STYLE_NAME ( RC_DIALOG_BEGIN + 16)
+#define MSG_OVERWRITE_STYLE ( RC_DIALOG_BEGIN + 17)
+#define MSG_TABPAGE_INVALIDPARENT ( RC_DIALOG_BEGIN + 18)
+
+#define STR_DELETE_STYLE ( RC_DIALOG_BEGIN + 18)
+#define STR_DELETE_STYLE_USED ( RC_DIALOG_BEGIN + 20)
+
+#define BMP_COLLAPSED ( RC_DIALOG_BEGIN + 18)
+#define BMP_EXPANDED ( RC_DIALOG_BEGIN + 19)
+
+#define TP_CONFIG_ACCEL ( RC_DIALOG_BEGIN + 20)
+#define TP_CONFIG_MENU ( RC_DIALOG_BEGIN + 21)
+#define TP_CONFIG_STATBAR ( RC_DIALOG_BEGIN + 22)
+#define TP_CONFIG_OBJECTBAR ( RC_DIALOG_BEGIN + 31)
+#define TP_CONFIG_EVENT ( RC_DIALOG_BEGIN + 32)
+#define DLG_CONFIG ( RC_DIALOG_BEGIN + 23)
+
+#define IBX_MNUCFG_ALREADY_INCLUDED ( RC_DIALOG_BEGIN + 24)
+#define QBX_MNUCFG_UNDEFINED_FUNCTIONS ( RC_DIALOG_BEGIN + 25)
+#define QBX_MNUCFG_POPUP_FUNCTIONS ( RC_DIALOG_BEGIN + 26)
+
+#define STR_NEW ( RC_DIALOG_BEGIN + 27)
+#define STR_OPEN ( RC_DIALOG_BEGIN + 28)
+#define STR_SAVE ( RC_DIALOG_BEGIN + 29)
+#define STR_SAVEAS ( RC_DIALOG_BEGIN + 30)
+#define STR_PRINT ( RC_DIALOG_BEGIN + 32)
+#define STR_QUIT ( RC_DIALOG_BEGIN + 33)
+#define STR_CUT ( RC_DIALOG_BEGIN + 34)
+#define STR_COPY ( RC_DIALOG_BEGIN + 35)
+#define STR_PASTE ( RC_DIALOG_BEGIN + 36)
+#define STR_DELETE ( RC_DIALOG_BEGIN + 39)
+#define STR_FIND ( RC_DIALOG_BEGIN + 41)
+#define STR_FINDBACKWARD ( RC_DIALOG_BEGIN + 42)
+#define STR_PROPERTIES ( RC_DIALOG_BEGIN + 43)
+#define STR_FRONT ( RC_DIALOG_BEGIN + 44)
+#define STR_BASICMACROS ( RC_DIALOG_BEGIN + 45)
+#define STR_MENU ( RC_DIALOG_BEGIN + 46)
+
+#define LOGO_IMAGELIST ( RC_DIALOG_BEGIN + 45)
+#define MN_CONTEXT_TEMPLDLG ( RC_DIALOG_BEGIN + 46)
+
+#define MSG_LAYOUT_NOT_LOADING ( RC_DIALOG_BEGIN + 49)
+#define ACC_LAYOUT_NOT_LOADING ( RC_DIALOG_BEGIN + 50)
+
+#define STR_LOADMENUCONFIG ( RC_DIALOG_BEGIN + 53)
+#define STR_SAVEMENUCONFIG ( RC_DIALOG_BEGIN + 54)
+
+#define STR_LOADACCELCONFIG ( RC_DIALOG_BEGIN + 55)
+#define STR_SAVEACCELCONFIG ( RC_DIALOG_BEGIN + 56)
+
+#define STR_LOADSTATBARCONFIG ( RC_DIALOG_BEGIN + 57)
+#define STR_SAVESTATBARCONFIG ( RC_DIALOG_BEGIN + 58)
+
+#define MSG_ERR_CANT_EDIT_OLD_FORMAT ( RC_DIALOG_BEGIN + 60 )
+#define MSG_ERR_CANT_EDIT_OPEN_DOCS ( RC_DIALOG_BEGIN + 61 )
+
+#define RID_URLOPEN ( RC_DIALOG_BEGIN + 62 )
+#define RID_URLOPEN_OK 1
+#define RID_URLOPEN_CANCEL 2
+#define RID_URLOPEN_URL 3
+
+#define CB_FILE ( RC_DIALOG_BEGIN + 63 )
+#define CB_URL ( RC_DIALOG_BEGIN + 64 )
+
+#define STR_INTERNET ( RC_DIALOG_BEGIN + 65 )
+#define RID_AUTOHIDE ( RC_DIALOG_BEGIN + 66 )
+
+#define RID_SFX_TP_MACROASSIGN ( RC_DIALOG_BEGIN + 67 )
+
+#define DLG_ONLINE_REGISTER ( RC_DIALOG_BEGIN + 68 )
+#define DLG_VERSIONS ( RC_DIALOG_BEGIN + 69 )
+#define DLG_COMMENTS ( RC_DIALOG_BEGIN + 70 )
+
+#define RID_SFX_SMALLTP_MACROASSIGN ( RC_DIALOG_BEGIN + 71 )
+#define DLG_RUN ( RC_DIALOG_BEGIN + 72 )
+#define RID_REGISTER_DLG ( RC_DIALOG_BEGIN + 73 )
+#define DLG_PHONE_CONFIGURATION ( RC_DIALOG_BEGIN + 74 )
+#define DLG_RECOGNIZER_ENGINEMODE ( RC_DIALOG_BEGIN + 75 )
+#define MSG_ERROR_WRONG_CONFIRM ( RC_DIALOG_BEGIN + 76 )
+#define DLG_RECOGNIZER_SPEAKER ( RC_DIALOG_BEGIN + 77 )
+
+// mail
+#define RID_MAIL_WINDOW ( RC_DIALOG_BEGIN + 78 )
+#define RID_ERRBOX_NO_SMTPSERVER ( RC_DIALOG_BEGIN + 79 )
+#define RID_INFBOX_SEND_SUCCESS ( RC_DIALOG_BEGIN + 80 )
+#define RID_ERRBOX_SEND_FAILED ( RC_DIALOG_BEGIN + 81 )
+#define RID_STR_CLOSE_TITLE ( RC_DIALOG_BEGIN + 82 )
+#define RID_STR_CLOSE_MESSAGE ( RC_DIALOG_BEGIN + 83 )
+#define RID_STR_CLOSE_BTN_SEND ( RC_DIALOG_BEGIN + 84 )
+#define RID_STR_CLOSE_BTN_REJECT ( RC_DIALOG_BEGIN + 85 )
+#define RID_STR_CLOSE_BTN_BACKTOMSG ( RC_DIALOG_BEGIN + 86 )
+
+#endif // #ifndef _SFX_DIALOG_HRC
+
+// eof ------------------------------------------------------------------------
+
diff --git a/sfx2/source/dialog/dialog.src b/sfx2/source/dialog/dialog.src
new file mode 100644
index 000000000000..a81af3881db9
--- /dev/null
+++ b/sfx2/source/dialog/dialog.src
@@ -0,0 +1,1028 @@
+/*************************************************************************
+ *
+ * $RCSfile: dialog.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:30 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+ // include ---------------------------------------------------------------
+#include "sfx.hrc"
+#include "dialog.hrc"
+#include "helpid.hrc"
+#include "sfxlocal.hrc"
+
+ // Imageliste fuer die AboutBox
+ImageList LOGO_IMAGELIST
+{
+ ImageBitmap = Bitmap { File = "ani_logo.bmp" ; };
+ MaskColor = Color
+ {
+ Red = 0xC000 ;
+ Green = 0xC000 ;
+ Blue = 0xC000 ;
+ };
+ IdList =
+ {
+ 1 ;
+ 2 ;
+ 3 ;
+ 4 ;
+ 5 ;
+ 6 ;
+ };
+ IdCount =
+ {
+ 6 ;
+ };
+};
+String STR_RESET
+{
+ TEXT = "~Zurck" ;
+ TEXT [ ENGLISH ] = "~Reset" ;
+ TEXT [ norwegian ] = "~Still inn p nytt" ;
+ TEXT [ italian ] = "~Ripristina" ;
+ TEXT [ portuguese_brazilian ] = "~Redefinir" ;
+ TEXT [ portuguese ] = "~Repor" ;
+ TEXT [ finnish ] = "~Palauta" ;
+ TEXT [ danish ] = "Tilbage" ;
+ TEXT [ french ] = "~Rinitialisation" ;
+ TEXT [ swedish ] = "terst~ll" ;
+ TEXT [ dutch ] = "~Vorige" ;
+ TEXT [ spanish ] = "~Restablecer" ;
+ TEXT [ english_us ] = "~Reset" ;
+ TEXT[ chinese_simplified ] = "(~R)";
+ TEXT[ russian ] = "~";
+ TEXT[ polish ] = "Zresetuj";
+ TEXT[ japanese ] = "ɖ߂(~R)";
+ TEXT[ chinese_traditional ] = "^(~R)";
+ TEXT[ arabic ] = " ";
+ TEXT[ greek ] = "";
+ TEXT[ korean ] = "(~R)";
+ TEXT[ turkish ] = "~Geri";
+ TEXT[ language_user1 ] = " ";
+};
+String STR_INTERNET
+{
+ TEXT = " (Internet)" ;
+ TEXT [ ENGLISH ] = " (Internet)" ;
+ Text [ english_us ] = "(Internet)" ;
+ Text [ italian ] = "(Internet)" ;
+ Text [ spanish ] = "(Internet)" ;
+ Text [ french ] = "(Internet)" ;
+ Text [ dutch ] = "(Internet)" ;
+ Text [ swedish ] = "(Internet)" ;
+ Text [ danish ] = "(Internet)" ;
+ Text [ portuguese ] = "(Internet)" ;
+ Text [ portuguese_brazilian ] = "(Internet)" ;
+ Text[ chinese_simplified ] = "(ʻ)";
+ Text[ russian ] = "()";
+ Text[ polish ] = "(Internet)";
+ Text[ japanese ] = "(ȯ)";
+ Text[ chinese_traditional ] = "(Internet)";
+ Text[ arabic ] = "()";
+ Text[ greek ] = "(Internet)";
+ Text[ korean ] = "(ͳ)";
+ Text[ turkish ] = "(Internet)";
+ Text[ language_user1 ] = " ";
+};
+String STR_BASEFMT
+{
+ Text = "~Basisformat" ;
+ Text [ ENGLISH ] = "Base format" ;
+ Text [ norwegian ] = "Basis format" ;
+ Text [ italian ] = "Formato di base" ;
+ Text [ portuguese_brazilian ] = "Formato Bsico" ;
+ Text [ portuguese ] = "Formato ~bsico" ;
+ Text [ finnish ] = "Perusmuoto" ;
+ Text [ danish ] = "Basisformat" ;
+ Text [ french ] = "Format de ~base" ;
+ Text [ swedish ] = "Grundformat" ;
+ Text [ dutch ] = "~Basisopmaak" ;
+ Text [ spanish ] = "Formato ~base" ;
+ Text [ english_us ] = "Base format" ;
+ Text[ chinese_simplified ] = "ʽ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Format bazy";
+ Text[ japanese ] = "ް";
+ Text[ chinese_traditional ] = "򥻮榡";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = "⺻";
+ Text[ turkish ] = "Temel format";
+ Text[ language_user1 ] = " ";
+};
+CheckBox CB_USE_PASSWD
+{
+ HelpId = HID_FILEDLG_USE_PASSWD ;
+ Text = "~Passwort" ;
+ Text [ ENGLISH ] = "~Password" ;
+ Text [ norwegian ] = "~Passord" ;
+ Text [ italian ] = "~Password" ;
+ Text [ portuguese_brazilian ] = "~Senha" ;
+ Text [ portuguese ] = "~Senha" ;
+ Text [ finnish ] = "~Salasana" ;
+ Text [ danish ] = "Adangskode" ;
+ Text [ french ] = "~Mot de passe" ;
+ Text [ swedish ] = "Lsenord" ;
+ Text [ dutch ] = "~Wachtwoord" ;
+ Text [ spanish ] = "~Contrasea" ;
+ Text [ english_us ] = "~Password" ;
+ Text[ chinese_simplified ] = "(~P)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Haso";
+ Text[ japanese ] = "߽ܰ(~P)";
+ Text[ chinese_traditional ] = "KX(~P)";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = "н(~P)";
+ Text[ turkish ] = "~ifre";
+ Text[ language_user1 ] = " ";
+};
+CheckBox CB_READ_ONLY
+{
+ HelpId = HID_FILEDLG_READ_ONLY ;
+ Text = "Nu~r lesen" ;
+ Text [ ENGLISH ] = "~Read only" ;
+ Text [ norwegian ] = "~Skrivebeskyttet" ;
+ Text [ italian ] = "~Sola lettura" ;
+ Text [ portuguese_brazilian ] = "~S leitura" ;
+ Text [ portuguese ] = "~S leitura" ;
+ Text [ finnish ] = "~Vain luku" ;
+ Text [ danish ] = "Skrivebeskyttet" ;
+ Text [ french ] = "En ~lecture seule" ;
+ Text [ swedish ] = "Sk~rivskyddad" ;
+ Text [ dutch ] = "~Alleen lezen" ;
+ Text [ spanish ] = "~Solo lectura" ;
+ Text [ english_us ] = "~Read only" ;
+ Text[ chinese_simplified ] = "ֻ(~R)";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Tylko do odczytu";
+ Text[ japanese ] = "ǂݎp(~R)";
+ Text[ chinese_traditional ] = "Ū(~R)";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = "б⸸(~R)";
+ Text[ turkish ] = "Salt okunur";
+ Text[ language_user1 ] = " ";
+};
+PushButton CB_FILE
+{
+ HelpId = HID_FILEDLG_FILE ;
+ Text = "~Dateisystem" ;
+ Text [ ENGLISH ] = "~Filesystem" ;
+ Text [ english_us ] = "~File System" ;
+ Text [ italian ] = "File system" ;
+ Text [ spanish ] = "Sistema de ~archivos" ;
+ Text [ french ] = "Systme ~de fichiers" ;
+ Text [ dutch ] = "~Bestandsysteem" ;
+ Text [ swedish ] = "Fils~ystem" ;
+ Text [ danish ] = "Filsystem" ;
+ Text [ portuguese ] = "~Sistema de ficheiro" ;
+ Text [ portuguese_brazilian ] = "~Dateisystem" ;
+ Text[ chinese_simplified ] = "ļϵͳ(~F)";
+ Text[ russian ] = " ";
+ Text[ polish ] = "System plikw";
+ Text[ japanese ] = "̧ټ(~F)";
+ Text[ chinese_traditional ] = "ɮרt(~F)";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ý(~F)";
+ Text[ turkish ] = "Dosya sistemi";
+ Text[ language_user1 ] = " ";
+};
+PushButton CB_URL
+{
+ HelpId = HID_FILEDLG_URL ;
+ Text = "~Internet" ;
+ Text [ ENGLISH ] = "~Internet" ;
+ Text [ english_us ] = "Int~ernet" ;
+ Text [ italian ] = "~Internet" ;
+ Text [ spanish ] = "~Internet" ;
+ Text [ french ] = "~Internet" ;
+ Text [ dutch ] = "~Internet" ;
+ Text [ swedish ] = "~Internet" ;
+ Text [ danish ] = "~Internet" ;
+ Text [ portuguese ] = "~Internet" ;
+ Text [ portuguese_brazilian ] = "~Internet" ;
+ Text[ chinese_simplified ] = "ʻ(~E)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Internet";
+ Text[ japanese ] = "ȯ(~E)";
+ Text[ chinese_traditional ] = "Int~ernet";
+ Text[ arabic ] = "";
+ Text[ greek ] = "Internet";
+ Text[ korean ] = "ͳ(~E)";
+ Text[ turkish ] = "Internet";
+ Text[ language_user1 ] = " ";
+};
+PushButton BTN_MANAGER
+{
+ HelpId = HID_FILEDLG_MANAGER ;
+ Text = "~Manager..." ;
+ Text [ English ] = "~Manager..." ;
+ Text [ norwegian ] = "~Styrer..." ;
+ Text [ italian ] = "~Manager..." ;
+ Text [ portuguese_brazilian ] = "~Gerenciador..." ;
+ Text [ portuguese ] = "~Gestor..." ;
+ Text [ finnish ] = "~Hallinta..." ;
+ Text [ danish ] = "Manager..." ;
+ Text [ french ] = "~Gestionnaire..." ;
+ Text [ swedish ] = "Manager..." ;
+ Text [ dutch ] = "~Beheer..." ;
+ Text [ spanish ] = "~Administrador..." ;
+ Text [ english_us ] = "~Manager..." ;
+ Text[ chinese_simplified ] = "(~M)...";
+ Text[ russian ] = "...";
+ Text[ polish ] = "Meneder...";
+ Text[ japanese ] = "Ȱެ(~M)...";
+ Text[ chinese_traditional ] = "޲z(~M)...";
+ Text[ arabic ] = "...";
+ Text[ greek ] = "...";
+ Text[ korean ] = "(~M)...";
+ Text[ turkish ] = "~Ynetici...";
+ Text[ language_user1 ] = " ";
+};
+PushButton BTN_STANDARD
+{
+ HelpId = HID_FILEDLG_STANDARD ;
+ Text = "Stan~dard" ;
+ Text [ English ] = "~Home" ;
+ Text [ norwegian ] = "~Home" ;
+ Text [ italian ] = "~Standard" ;
+ Text [ portuguese_brazilian ] = "~Casa" ;
+ Text [ portuguese ] = "~Padro" ;
+ Text [ finnish ] = "~Vakio" ;
+ Text [ danish ] = "Standa~rd" ;
+ Text [ french ] = "~Par dfaut" ;
+ Text [ swedish ] = "Stan~dard" ;
+ Text [ dutch ] = "~Standaard" ;
+ Text [ spanish ] = "~Predeterminado" ;
+ Text [ english_us ] = "~Home" ;
+ Text[ chinese_simplified ] = "׼(~H)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Standard";
+ Text[ japanese ] = "W";
+ Text[ chinese_traditional ] = "з(~H)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "(~H)";
+ Text[ turkish ] = "Standart";
+ Text[ language_user1 ] = " ";
+};
+String STR_PATH_NOT_FOUND1
+{
+ Text = "Das Verzeichnis '" ;
+ Text [ English ] = "The directory '" ;
+ Text [ norwegian ] = "The directory '" ;
+ Text [ italian ] = "La cartella" ;
+ Text [ portuguese_brazilian ] = "O diretrio" ;
+ Text [ portuguese ] = "O directrio '" ;
+ Text [ finnish ] = "Hakemistoa '" ;
+ Text [ danish ] = "Biblioteket '" ;
+ Text [ french ] = "Le rpertoire '" ;
+ Text [ swedish ] = "Mappen '" ;
+ Text [ dutch ] = "Directory '" ;
+ Text [ spanish ] = "El directorio '" ;
+ Text [ english_us ] = "The directory '" ;
+ Text[ chinese_simplified ] = "Ŀ¼ '";
+ Text[ russian ] = " '";
+ Text[ polish ] = "Katalog '";
+ Text[ japanese ] = "ިڸ '";
+ Text[ chinese_traditional ] = "ؿ '";
+ Text[ arabic ] = " '";
+ Text[ greek ] = " '";
+ Text[ korean ] = "丮'";
+ Text[ turkish ] = "Dizin '";
+ Text[ language_user1 ] = " ";
+};
+String STR_PATH_NOT_FOUND2
+{
+ Text = "' existiert nicht." ;
+ Text [ English ] = "' does not exist." ;
+ Text [ norwegian ] = "' does not exist." ;
+ Text [ italian ] = "' non esiste." ;
+ Text [ portuguese_brazilian ] = "' no existe." ;
+ Text [ portuguese ] = "' no existe." ;
+ Text [ finnish ] = "' ei ole." ;
+ Text [ danish ] = "' eksisterer ikke." ;
+ Text [ french ] = "' n'existe pas." ;
+ Text [ swedish ] = "' finns inte." ;
+ Text [ dutch ] = "' bestaat niet." ;
+ Text [ spanish ] = "' no existe." ;
+ Text [ english_us ] = "' does not exist." ;
+ Text[ chinese_simplified ] = "' ڡ";
+ Text[ russian ] = "' .";
+ Text[ polish ] = "nie istnieje.";
+ Text[ japanese ] = "' ͂܂B";
+ Text[ chinese_traditional ] = "' sbC";
+ Text[ arabic ] = "' .";
+ Text[ greek ] = "' .";
+ Text[ korean ] = "' ϴ.";
+ Text[ turkish ] = "' mevcut deil.";
+ Text[ language_user1 ] = " ";
+};
+InfoBox MSG_ERROR_PASSWD
+{
+ BUTTONS = WB_OK ;
+ DEFBUTTON = WB_DEF_OK ;
+ MESSAGE = "Fehlerhaftes Passwort." ;
+ MESSAGE [ English ] = "Password doesn't match." ;
+ MESSAGE [ norwegian ] = "Passord passer ikke." ;
+ MESSAGE [ italian ] = "La password non corrisponde." ;
+ MESSAGE [ portuguese_brazilian ] = "A senha no combina." ;
+ MESSAGE [ portuguese ] = "A senha no vlida." ;
+ MESSAGE [ finnish ] = "Salasana ei kelpaa." ;
+ MESSAGE [ danish ] = "Ugyldig adgangskode" ;
+ MESSAGE [ french ] = "Mot de passe incorrect." ;
+ MESSAGE [ swedish ] = "Felaktigt lsenord." ;
+ MESSAGE [ dutch ] = "Wachtwoord niet juist" ;
+ MESSAGE [ spanish ] = "Contrasea no vlida." ;
+ MESSAGE [ english_us ] = "Invalid password." ;
+ MESSAGE[ chinese_simplified ] = "Ŀ";
+ MESSAGE[ russian ] = " .";
+ MESSAGE[ polish ] = "Nieprawidowe haso.";
+ MESSAGE[ japanese ] = "Ȃ߽ܰޡ";
+ MESSAGE[ chinese_traditional ] = "KXLġC";
+ MESSAGE[ arabic ] = " .";
+ MESSAGE[ greek ] = " .";
+ MESSAGE[ korean ] = "н尡 Ʋϴ.";
+ MESSAGE[ turkish ] = "Yanl ifre";
+ MESSAGE[ language_user1 ] = " ";
+};
+String STR_FILEDLG_INSERT
+{
+ Text = "Datei einfgen" ;
+ Text [ ENGLISH ] = "Insert File" ;
+ Text [ norwegian ] = "Sett inn" ;
+ Text [ italian ] = "Inserisci file" ;
+ Text [ portuguese_brazilian ] = "Inserir" ;
+ Text [ portuguese ] = "Inserir ficheiro" ;
+ Text [ finnish ] = "Lis" ;
+ Text [ danish ] = "Indst fil" ;
+ Text [ french ] = "Insrer un fichier" ;
+ Text [ swedish ] = "Infoga fil" ;
+ Text [ dutch ] = "Bestand invoegen" ;
+ Text [ spanish ] = "Insertar archivo" ;
+ Text [ english_us ] = "Insert File" ;
+ Text[ chinese_simplified ] = "ļ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Wstaw plik";
+ Text[ japanese ] = "̧ق̑}";
+ Text[ chinese_traditional ] = "Jɮ";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ";
+ Text[ turkish ] = "Dosya ekle";
+ Text[ language_user1 ] = " ";
+};
+String STR_TABPAGE_MANAGESTYLES
+{
+ Text = "Verwalten" ;
+ Text [ ENGLISH ] = "Manage" ;
+ Text [ norwegian ] = "Styre" ;
+ Text [ italian ] = "Gestione" ;
+ Text [ portuguese_brazilian ] = "Gerenciar" ;
+ Text [ portuguese ] = "Gerir" ;
+ Text [ finnish ] = "Ksittele" ;
+ Text [ danish ] = "Administrer" ;
+ Text [ french ] = "Grer" ;
+ Text [ swedish ] = "Organisera" ;
+ Text [ dutch ] = "Beheren" ;
+ Text [ spanish ] = "Administrar" ;
+ Text [ english_us ] = "Organizer" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "Zarzdzaj";
+ Text[ japanese ] = "Ǘ";
+ Text[ chinese_traditional ] = "޲z";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "Ynet";
+ Text[ language_user1 ] = " ";
+};
+InfoBox MSG_TABPAGE_INVALIDNAME
+{
+ BUTTONS = WB_OK ;
+ DEFBUTTON = WB_DEF_OK ;
+ Message = "Der Name wird bereits fr eine Vorlage verwendet." ;
+ Message [ ENGLISH ] = "This name is already in use." ;
+ Message [ norwegian ] = "Dette navnet er allerede i bruk." ;
+ Message [ italian ] = "Questo nome gi utilizzato per un modello." ;
+ Message [ portuguese_brazilian ] = "Este nome j est sendo usado." ;
+ Message [ portuguese ] = "Este nome j est a ser usado para um modelo." ;
+ Message [ finnish ] = "Tm nimi on jo kytss." ;
+ Message [ danish ] = "Navnet er allerede i brug som navn p en typografi." ;
+ Message [ french ] = "Ce nom a dj t attribu." ;
+ Message [ swedish ] = "Namnet anvnds redan fr en mall." ;
+ Message [ dutch ] = "Er bestaat reeds een sjabloon/opmaakprofiel met deze naam." ;
+ Message [ spanish ] = "Este nombre ya es usado para una plantilla." ;
+ Message [ english_us ] = "This name is already in use." ;
+ Message[ chinese_simplified ] = "һʽѾʹơ";
+ Message[ russian ] = " .";
+ Message[ polish ] = "Ta nazwa zostaa ju uyta dla stylu.";
+ Message[ japanese ] = "̖O͂łɁAقɎgĂ܂B";
+ Message[ chinese_traditional ] = "@Ӽ˦wgϥγoӦW١C";
+ Message[ arabic ] = " .";
+ Message[ greek ] = " .";
+ Message[ korean ] = " ̸ ̹ Ͽ Դϴ.";
+ Message[ turkish ] = "Bu ad bir ablon ad olarak kullanlyor.";
+ Message[ language_user1 ] = " ";
+};
+InfoBox MSG_TABPAGE_INVALIDSTYLE
+{
+ BUTTONS = WB_OK ;
+ DEFBUTTON = WB_DEF_OK ;
+ Message = "Diese Vorlage existiert nicht." ;
+ Message [ ENGLISH ] = "Style doesn't exist." ;
+ Message [ norwegian ] = "Mal finnes ikke." ;
+ Message [ italian ] = "Il modello non esiste." ;
+ Message [ portuguese_brazilian ] = "O estilo no existe." ;
+ Message [ portuguese ] = "Este modelo no existe." ;
+ Message [ finnish ] = "Tyyli ei ole." ;
+ Message [ danish ] = "Denne typografi eksisterer ikke." ;
+ Message [ french ] = "Style inexistant." ;
+ Message [ swedish ] = "Den hr mallen finns inte." ;
+ Message [ dutch ] = "Dit opmaakprofiel bestaat niet." ;
+ Message [ spanish ] = "Este estilo no existe." ;
+ Message [ english_us ] = "This Style does not exist." ;
+ Message[ chinese_simplified ] = "ʽڡ";
+ Message[ russian ] = " .";
+ Message[ polish ] = "Szablon nie istnieje.";
+ Message[ japanese ] = "̽ق݂͑Ă܂B";
+ Message[ chinese_traditional ] = "oӼ˦sbC";
+ Message[ arabic ] = " .";
+ Message[ greek ] = " .";
+ Message[ korean ] = " ϴ.";
+ Message[ turkish ] = "Bu ablon mevcut deil.";
+ Message[ language_user1 ] = "All \"Vorlagen\" /Styles are written with a capital S.10.5.00EM";
+};
+InfoBox MSG_TABPAGE_INVALIDPARENT
+{
+ BUTTONS = WB_OK ;
+ DEFBUTTON = WB_DEF_OK ;
+ Message = "Diese Vorlage kann nicht als Basisvorlage verwendet werden,\nda eine Rekursion entstehen wrde." ;
+ Message [ ENGLISH ] = "Style cannot be used as a parent; it would cause a circular connection." ;
+ Message [ norwegian ] = "Mal kan ikke brukes som forelder+++ be used as a parent; den vil forrsake en sirkulr forbindelse." ;
+ Message [ italian ] = "Impossibile usare lo stile come principale;\ncauserebbe una connessione circolare." ;
+ Message [ portuguese_brazilian ] = "O estilo no pode ser usado como superior;\nisto provocaria uma conex o circular." ;
+ Message [ portuguese ] = "Este modelo no pode ser usado como modelo-base,\numa vez que provocaria uma referncia recursiva." ;
+ Message [ finnish ] = "Style cannot be used as a parent; it would cause a circular connection." ;
+ Message [ danish ] = "Denne skabelon kan ikke bruges som basisskabelon, \nda dette ville forrsage en rekursion." ;
+ Message [ french ] = "Ce style ne peut pas tre utilis comme style de base\ncar il entranerait une rfrence rcursive." ;
+ Message [ swedish ] = "Denna mall kan inte anvndas som basmall, d\nen rekursion skulle uppst." ;
+ Message [ dutch ] = "Deze sjabloon kan niet als basissjabloon worden gebruikt;\nhierdoor zou een kringverbinding ontstaan." ;
+ Message [ spanish ] = "Esta plantilla no se puede utilizar como plantilla base,\nya que podra provocar una referencia recursiva." ;
+ Message [ english_us ] = "Template cannot be used as a base template;\nrecursive reference would result." ;
+ Message[ chinese_simplified ] = "ʽ޷ʽļ\nݹá";
+ Message[ russian ] = " ,\n.. .";
+ Message[ polish ] = "Tego szablonu nie moesz uy jako szablonu podstawowego,\nponiewa moga by powsta rekurencja.";
+ Message[ japanese ] = "̽قް قƂĎgpł܂\nװ܂B";
+ Message[ chinese_traditional ] = "oӼ˦LkQ@˦M\n_h|ް_kޥΡC";
+ Message[ arabic ] = " \n ().";
+ Message[ greek ] = " ;\n .";
+ Message[ korean ] = " ⺻Ϸ ϴ. \nݺ ߱ ֱ Դϴ.";
+ Message[ turkish ] = "Bu ablon (zyineleme nedeniyle)\n temel ablon olarak kullanlamaz.";
+ Message[ language_user1 ] = " ";
+};
+InfoBox MSG_POOL_STYLE_NAME
+{
+ MESSAGE = "Der Name ist bereits Name einer Standardvorlage.\nBitte einen anderen Namen vergeben." ;
+ MESSAGE [ English ] = "Name is alreafy used by a default style.\nPlease choose another Name." ;
+ MESSAGE [ norwegian ] = "Navnet er allerede I bruk av en standardstil.\nVelg et annet navn." ;
+ MESSAGE [ italian ] = "Il nome gi usato da uno stile predefinito.\nScegliere un altro nome." ;
+ MESSAGE [ portuguese_brazilian ] = "O nome j est sendo usado por um estilo padr o.\nEscolha outro Nome." ;
+ MESSAGE [ portuguese ] = "O nome j est a ser usado por um estilo padro.\nEscolha outro nome por favor." ;
+ MESSAGE [ finnish ] = "Nime kytetn jo oletustyyliss.\nKirjoita toinen nimi." ;
+ MESSAGE [ danish ] = "Navnet er allerede i brug som navn p en standardtypografi.\nVlg venligst et andet navn." ;
+ MESSAGE [ french ] = "Ce nom a dj attribu un style par dfaut.\nVeuillez en choisir un autre." ;
+ MESSAGE [ swedish ] = "Namnet anvnds redan fr en standardmall.\nVlj ett annat namn." ;
+ MESSAGE [ dutch ] = "Naam wordt al voor een standaardopmaakprofiel gebruikt.\nKies een andere naam." ;
+ MESSAGE [ spanish ] = "El nombre ya est usado por un estilo predeterminado.\nElija otro nombre por favor." ;
+ MESSAGE [ english_us ] = "Name already exists as a default Style.\nPlease choose another name." ;
+ MESSAGE[ chinese_simplified ] = "һ׼ʽơ\nʹһơ";
+ MESSAGE[ russian ] = " .\n, , .";
+ MESSAGE[ polish ] = "Ta nazwa jest ju nazw stylu domylnego .\nProsz wybierz inn nazw.";
+ MESSAGE[ japanese ] = "̖O͂łɕWق̖OƂĎgĂ܂B\n̖OɂĉB";
+ MESSAGE[ chinese_traditional ] = "oӦW٬O@ӼзǼ˦W١C\nбzĥΨL@ӦW١C";
+ MESSAGE[ arabic ] = " .\n .";
+ MESSAGE[ greek ] = " .\n .";
+ MESSAGE[ korean ] = " ̸ ̹ ⺻ ̸Դϴ.\nٸ ̸ Ͻʽÿ.";
+ MESSAGE[ turkish ] = "Bu ad bir standart ablon ad olarak kullanlyor.\nBaka bir ad sein.";
+ MESSAGE[ language_user1 ] = "All \"Vorlagen\" /Styles are written with a capital S.10.5.00EM";
+};
+QueryBox MSG_OVERWRITE_STYLE
+{
+ Buttons = WB_YES_NO ;
+ DefButton = WB_DEF_NO ;
+ Message = "Vorlage existiert bereits. berschreiben?" ;
+ Message [ ENGLISH ] = "Style already exists. Overwrite?" ;
+ Message [ norwegian ] = "Mal finnes allerede. Skriv over?" ;
+ Message [ italian ] = "Il modello esiste gi. Sovrascrivere?" ;
+ Message [ portuguese_brazilian ] = "O estilo j existe. Sobregravar?" ;
+ Message [ portuguese ] = "O modelo j existe. Sobregravar?" ;
+ Message [ finnish ] = "Tyyli on jo mritetty. Korvataanko se?" ;
+ Message [ danish ] = "Typografi eksisterer allerede. Skal den overskrives?" ;
+ Message [ french ] = "Ce style existe dj. Voulez-vous le remplacer ?" ;
+ Message [ swedish ] = "Mall finns redan. Skriva ver?" ;
+ Message [ dutch ] = "Deze sjabloon bestaat reeds. Overschrijven?" ;
+ Message [ spanish ] = "El estilo ya existe. Desea sobrescribirlo?" ;
+ Message [ english_us ] = "Style already exists. Overwrite?" ;
+ Message[ chinese_simplified ] = "ʽѾڡҪд";
+ Message[ russian ] = " . ?";
+ Message[ polish ] = "Szablon ju istnieje. Czy go zastpi?";
+ Message[ japanese ] = "̽ق͂łɑ݂Ă܂B㏑܂H";
+ Message[ chinese_traditional ] = "˦wgsbCznмgS";
+ Message[ arabic ] = " . ";
+ Message[ greek ] = " . ;";
+ Message[ korean ] = " ̹ ֽϴ. ?";
+ Message[ turkish ] = "ablon mevcut durumda. zerine yazlsn m?";
+ Message[ language_user1 ] = " ";
+};
+String STR_DELETE_STYLE
+{
+ Text = "Wollen Sie die Vorlage $1 wirklich lschen?" ;
+ Text [ English ] = "Do you really want to delete the style $1?" ;
+ Text [ portuguese ] = "Eliminar realmente o estilo $1?" ;
+ Text [ english_us ] = "Do you really want to delete Style $1?" ;
+ Text [ portuguese_brazilian ] = "Wollen Sie die Vorlage $1 wirklich lschen?" ;
+ Text [ swedish ] = "Vill Du verkligen radera mallen $1?" ;
+ Text [ danish ] = "Er du sikker p, at du vil slette typografi $1?" ;
+ Text [ italian ] = "Eliminare veramente il modello $1 ?" ;
+ Text [ spanish ] = "Desea realmente eliminar el estilo $1?" ;
+ Text [ french ] = "Voulez-vous vraiment supprimer le modle $1 ?" ;
+ Text [ dutch ] = "Wilt u het opmaakprofiel $1 werkelijk wissen?" ;
+ Text[ chinese_simplified ] = "Ҫɾʽ $1 ";
+ Text[ russian ] = " $1?";
+ Text[ polish ] = "Czy chcesz na pewno usun styl $1?";
+ Text[ japanese ] = " $1 폜Ă낵łH";
+ Text[ chinese_traditional ] = "zunR˦ $1 S";
+ Text[ arabic ] = " $1";
+ Text[ greek ] = " $1?";
+ Text[ korean ] = "$1 Ͻðڽϱ?";
+ Text[ turkish ] = "$1 ablonlarn gerekten silmek istiyor musunuz?";
+ Text[ language_user1 ] = "All \"Vorlagen\" /Styles are written with a capital S.10.5.00EM";
+};
+String STR_DELETE_STYLE_USED
+{
+ Text = "Sie lschen eine benutzte Vorlage!\n" ;
+ Text [ English ] = "You are deleting a used style!\n" ;
+ Text [ dutch ] = "U wist een gebruikt opmaakprofiel!\n" ;
+ Text [ english_us ] = "You are deleting an applied Style!\n" ;
+ Text [ italian ] = "Si sta cancellando un modello in uso!\n" ;
+ Text [ spanish ] = "Usted est borrando un estilo que ha sido aplicado!\n" ;
+ Text [ french ] = "Vous supprimez un style utilis !\n" ;
+ Text [ swedish ] = "Du raderar en anvnd formatmall!\n" ;
+ Text [ danish ] = "Du sletter en anvendt typografi!\n" ;
+ Text [ portuguese ] = "Est a eliminar um estilo usado!\n" ;
+ Text [ portuguese_brazilian ] = "Sie lschen eine benutzte Vorlage!\n" ;
+ Text[ chinese_simplified ] = "Ҫɾһʹõʽ\n";
+ Text[ russian ] = " !\n";
+ Text[ polish ] = "Usuwasz zastosowany styl!\n";
+ Text[ japanese ] = "gpق폜悤ƂĂ܂!\n";
+ Text[ chinese_traditional ] = "znRO@ӨϥΪ˦T\n";
+ Text[ arabic ] = " !\n";
+ Text[ greek ] = " !\n";
+ Text[ korean ] = " ϰ ֽϴ!\n";
+ Text[ turkish ] = "Kullanlan bir ablonu siliyorsunuz!\n";
+ Text[ language_user1 ] = "All \"Vorlagen\" /Styles are written with a capital S.10.5.00EM";
+};
+Image BMP_COLLAPSED
+{
+ ImageBitmap = Bitmap
+ {
+ File = "plus.bmp" ;
+ };
+ // MaskColor = Color { Predefine = COL_GREEN ; };
+};
+Image BMP_EXPANDED
+{
+ ImageBitmap = Bitmap
+ {
+ File = "minus.bmp" ;
+ };
+ // MaskColor = Color { Predefine = COL_GREEN ; };
+};
+Menu MN_CONTEXT_TEMPLDLG
+{
+ ItemList =
+ {
+ MenuItem
+ {
+ Identifier = ID_NEW ;
+ Text = "Neu..." ;
+ Text [ English ] = "New..." ;
+ Text [ norwegian ] = "Ny..." ;
+ Text [ italian ] = "Nuovo..." ;
+ Text [ portuguese_brazilian ] = "Novo..." ;
+ Text [ portuguese ] = "Novo..." ;
+ Text [ finnish ] = "Uusi..." ;
+ Text [ danish ] = "Ny..." ;
+ Text [ french ] = "Nouveau..." ;
+ Text [ swedish ] = "Nytt..." ;
+ Text [ dutch ] = "Nieuw..." ;
+ Text [ spanish ] = "Nuevo..." ;
+ Text [ english_us ] = "New..." ;
+ HelpId = HID_STYLIST_NEW ;
+ Text[ chinese_simplified ] = "½...";
+ Text[ russian ] = "...";
+ Text[ polish ] = "Nowy...";
+ Text[ japanese ] = "VK쐬...";
+ Text[ chinese_traditional ] = "}ҷs...";
+ Text[ arabic ] = "...";
+ Text[ greek ] = "...";
+ Text[ korean ] = "...";
+ Text[ turkish ] = "Yeni...";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Identifier = ID_EDIT ;
+ Text = "ndern..." ;
+ Text [ English ] = "Edit..." ;
+ Text [ norwegian ] = "Rediger..." ;
+ Text [ italian ] = "Modifica..." ;
+ Text [ portuguese_brazilian ] = "Editar..." ;
+ Text [ portuguese ] = "Modificar..." ;
+ Text [ finnish ] = "Muokkaa..." ;
+ Text [ danish ] = "Modificer..." ;
+ Text [ french ] = "Modifier..." ;
+ Text [ swedish ] = "ndra..." ;
+ Text [ dutch ] = "Wijzigen..." ;
+ Text [ spanish ] = "Modificar..." ;
+ Text [ english_us ] = "Modify..." ;
+ HelpId = HID_STYLIST_EDIT ;
+ Text[ chinese_simplified ] = "...";
+ Text[ russian ] = "...";
+ Text[ polish ] = "Modyfikuj...";
+ Text[ japanese ] = "ύX...";
+ Text[ chinese_traditional ] = "ܧ...";
+ Text[ arabic ] = "...";
+ Text[ greek ] = "...";
+ Text[ korean ] = "...";
+ Text[ turkish ] = "Deitir...";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Identifier = ID_DELETE ;
+ Text = "Lschen..." ;
+ Text [ English ] = "Delete..." ;
+ Text [ norwegian ] = "Slett..." ;
+ Text [ italian ] = "Annulla..." ;
+ Text [ portuguese_brazilian ] = "Apagar..." ;
+ Text [ portuguese ] = "Eliminar..." ;
+ Text [ finnish ] = "Poista..." ;
+ Text [ danish ] = "Slet..." ;
+ Text [ french ] = "Supprimer..." ;
+ Text [ swedish ] = "Radera..." ;
+ Text [ dutch ] = "Wissen..." ;
+ Text [ spanish ] = "Eliminar..." ;
+ Text [ english_us ] = "Delete..." ;
+ HelpId = HID_STYLIST_DELETE ;
+ Text[ chinese_simplified ] = "ɾ...";
+ Text[ russian ] = "...";
+ Text[ polish ] = "Usu...";
+ Text[ japanese ] = "폜...";
+ Text[ chinese_traditional ] = "R...";
+ Text[ arabic ] = "...";
+ Text[ greek ] = "...";
+ Text[ korean ] = "...";
+ Text[ turkish ] = "Sil...";
+ Text[ language_user1 ] = " ";
+ };
+ };
+};
+String STR_BASICMACROS
+{
+ TEXT = "BASIC-Makros" ;
+ TEXT [ ENGLISH ] = "BASIC Macros" ;
+ TEXT [ norwegian ] = "Basis Makroer" ;
+ TEXT [ italian ] = "Macro di BASIC" ;
+ TEXT [ portuguese_brazilian ] = "Macros Bsico" ;
+ TEXT [ portuguese ] = "Macros BASIC" ;
+ TEXT [ finnish ] = "Basic Macros" ;
+ TEXT [ danish ] = "BASIC-makroer" ;
+ TEXT [ french ] = "Macros BASIC" ;
+ TEXT [ swedish ] = "BASIC-makron" ;
+ TEXT [ dutch ] = "BASIC- macros" ;
+ TEXT [ spanish ] = "Macros BASIC" ;
+ TEXT [ english_us ] = "BASIC Macros" ;
+ TEXT[ chinese_simplified ] = "BASIC-";
+ TEXT[ russian ] = " BASIC";
+ TEXT[ polish ] = "Makra BASIC";
+ TEXT[ japanese ] = "BASIC ϸ";
+ TEXT[ chinese_traditional ] = "BASIC-";
+ TEXT[ arabic ] = " BASIC";
+ TEXT[ greek ] = " BASIC";
+ TEXT[ korean ] = "BASIC ũ";
+ TEXT[ turkish ] = "BASIC makrolar";
+ TEXT[ language_user1 ] = " ";
+};
+InfoBox MSG_LAYOUT_NOT_LOADING
+{
+ BUTTONS = WB_OK ;
+ DEFBUTTON = WB_DEF_OK ;
+ MESSAGE = "Dokument wird ohne Layout geladen." ;
+ MESSAGE [ English ] = "Loading Documents without Layout." ;
+ MESSAGE [ norwegian ] = "Last inn Dokumenter uten Layout." ;
+ MESSAGE [ italian ] = "Il documento viene caricato senza layout" ;
+ MESSAGE [ portuguese_brazilian ] = "Carregando Documentos sem Layout." ;
+ MESSAGE [ portuguese ] = "A carregar documento sem configurao." ;
+ MESSAGE [ finnish ] = "Luetaan asiakirjat ilman asetttelua." ;
+ MESSAGE [ danish ] = "Indlser dokument uden layout." ;
+ MESSAGE [ french ] = "Chargement d'un document sans mise en page." ;
+ MESSAGE [ swedish ] = "Dokument laddas utan layout." ;
+ MESSAGE [ dutch ] = "Document wordt zonder lay-out geladen." ;
+ MESSAGE [ spanish ] = "Cargando el documento sin diseo." ;
+ MESSAGE [ english_us ] = "Loading document without layout." ;
+ MESSAGE[ chinese_simplified ] = "ʽװļ";
+ MESSAGE[ russian ] = " .";
+ MESSAGE[ polish ] = "Dokument jest adowany bez ukadu.";
+ MESSAGE[ japanese ] = "޷ĂڲĂȂœǂݍ܂܂B";
+ MESSAGE[ chinese_traditional ] = "˸AaC";
+ MESSAGE[ arabic ] = " .";
+ MESSAGE[ greek ] = " .";
+ MESSAGE[ korean ] = " ̾ƿ ε Դϴ.";
+ MESSAGE[ turkish ] = "Belge sayfa dzeni olmadan ykleniyor.";
+ MESSAGE[ language_user1 ] = " ";
+};
+Accelerator ACC_LAYOUT_NOT_LOADING
+{
+ ItemList =
+ {
+ AcceleratorItem
+ {
+ Key = KeyCode
+ {
+ Code = KEY_L ;
+ Shift = FALSE ; Modifier1 = TRUE ; Modifier2 = TRUE ;
+ };
+ Identifier = 1 ;
+ };
+ };
+};
+ //------------------------------------------------------------------------
+ErrorBox MSG_ERR_CANT_EDIT_OLD_FORMAT
+{
+ Message = "Die Dokument-Info von Dokumenten in diesem\nDateiformat kann nicht bearbeitet werden." ;
+ Message [ ENGLISH ] = "Can't edit document-info of documents\nof this file format." ;
+ Message [ dutch ] = "De documentinformatie van documenten in dit\nbestandformaat kan niet worden bewerkt." ;
+ Message [ english_us ] = "Cannot edit document info for documents\n in this file format." ;
+ Message [ italian ] = "La modifica dell'informazione sul documento per\nun documento nel formato dato non possibile." ;
+ Message [ spanish ] = "La informacin de documentos no se puede editar en este\nformato de archivo." ;
+ Message [ french ] = "Impossible d'diter les informations pour\nce type de fichier" ;
+ Message [ swedish ] = "Dokumentinformation frn dokument i det hr\nfilformatet kan inte redigeras." ;
+ Message [ danish ] = "Dokumenters dokumentinformation med dette \nfilformat kan ikke redigeres." ;
+ Message [ portuguese ] = "Impossvel editar a informao sobre documentos\n neste formato de ficheiro." ;
+ Message [ portuguese_brazilian ] = "Die Dokument-Info von Dokumenten in diesem\nDateiformat kann nicht bearbeitet werden." ;
+ Message[ chinese_simplified ] = "޷༭ļʽĵϢ";
+ Message[ russian ] = " \n .";
+ Message[ polish ] = "Informacje o dokumencie dla dokumentw nie mog \nby edytowane w tym formacie pliku.";
+ Message[ japanese ] = "ُ̧޷Ă޷ď\nҏWł܂B";
+ Message[ chinese_traditional ] = "LksoӤ榡TC";
+ Message[ arabic ] = " \n .";
+ Message[ greek ] = " \n .";
+ Message[ korean ] = " \nϼ ϴ.";
+ Message[ turkish ] = "Bu dosya formatndaki belgelerin belge bilgileri ilenemez";
+ Message[ language_user1 ] = " ";
+};
+ //------------------------------------------------------------------------
+ErrorBox MSG_ERR_CANT_EDIT_OPEN_DOCS
+{
+ Message = "Die Dokument-Info von in Bearbeitung befindlichen\nDokumenten kann nicht vom Dokumentmanager bearbeitet werden." ;
+ Message [ ENGLISH ] = "Can't edit document-info of documents\nin work from within the document manager." ;
+ Message [ english_us ] = "Document info of documents\n being currently edited cannot be modified from within the document manager." ;
+ Message [ italian ] = "L'informazione sul documento relativa a documenti\nin fase di modifica non modificabile con la gestione manager." ;
+ Message [ spanish ] = "La informacin acerca de los documentos que se estn editando\nno puede ser editada por el administrador de documentos." ;
+ Message [ french ] = "Impossible de modifier les proprits du document actuel \npar le gestionnaire de document." ;
+ Message [ dutch ] = "De documentinformatie van de in bewerking zijnde\ndocumenten kan niet door de documentmanager worden bewerkt." ;
+ Message [ swedish ] = "Dokumentinformationen frn i redigering befintliga\ndokument kan inte redigeras av dokumentmanagern." ;
+ Message [ danish ] = "Dokumentinformationen til dokumenter som aktuelt redigeres\nkan ikke redigeres af dokumentmanageren." ;
+ Message [ portuguese_brazilian ] = "Die Dokument-Info von in Bearbeitung befindlichen\nDokumenten kann nicht vom Dokumentmanager bearbeitet werden." ;
+ Message [ portuguese ] = "A Informao sobre Documentos dos documentos que\n esto a ser editados no poder ser modificada pelo gestor de documentos." ;
+ Message[ chinese_simplified ] = "ĵѾڱ༭״̬\nĵ޷Щĵ";
+ Message[ russian ] = " \n , \n";
+ Message[ polish ] = "Informacja o dokumencie dla edytowanych dokumentw\nnie moe by edytowana przez menedera dokumentw.";
+ Message[ japanese ] = "ҏW޷Ă޷ď\n޷ ȰެҏWł܂B";
+ Message[ chinese_traditional ] = "wgBs説AM\n޲zLkBzoǤC";
+ Message[ arabic ] = " \n .";
+ Message[ greek ] = " \n .";
+ Message[ korean ] = " \n ڿ ϴ.";
+ Message[ turkish ] = "u an kullanlan belgelerin belge bilgileri belge yneticisi tarafndan ilenemez.";
+ Message[ language_user1 ] = " ";
+};
+ModalDialog RID_URLOPEN
+{
+ OutputSize = TRUE ;
+ SVLook = TRUE ;
+ Size = MAP_APPFONT ( 204 , 44 ) ;
+ Text = "URL eingeben" ;
+ Text [ ENGLISH ] = "Enter URL" ;
+ Moveable = TRUE ;
+ Text [ english_us ] = "Enter URL" ;
+ Text [ italian ] = "Digitare l'URL" ;
+ Text [ spanish ] = "Entrar URL" ;
+ Text [ french ] = "Saisie d'URL" ;
+ Text [ dutch ] = "URL invoeren" ;
+ Text [ swedish ] = "Mata in URL" ;
+ Text [ danish ] = "Indtast URL" ;
+ Text [ portuguese_brazilian ] = "URL eingeben" ;
+ Text [ portuguese ] = "Entrar URL" ;
+ Text[ chinese_simplified ] = " URL";
+ Text[ russian ] = " URL";
+ Text[ polish ] = "Wprowad URL";
+ Text[ japanese ] = "URL";
+ Text[ chinese_traditional ] = "J URL";
+ Text[ arabic ] = " URL";
+ Text[ greek ] = " URL";
+ Text[ korean ] = "URL Է";
+ Moveable = TRUE ;
+ OKButton RID_URLOPEN_OK
+ {
+ Pos = MAP_APPFONT ( 148 , 6 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TabStop = TRUE ;
+ DefButton = TRUE ;
+ };
+ CancelButton RID_URLOPEN_CANCEL
+ {
+ Pos = MAP_APPFONT ( 148 , 24 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TabStop = TRUE ;
+ };
+ Edit RID_URLOPEN_URL
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 6 , 16 ) ;
+ Size = MAP_APPFONT ( 138 , 12 ) ;
+ TabStop = TRUE ;
+ Left = TRUE ;
+ };
+ Text[ turkish ] = "URL gir";
+ Text[ language_user1 ] = " ";
+};
+Menu RID_AUTOHIDE
+{
+ ItemList =
+ {
+ MenuItem
+ {
+ Identifier = SID_AUTOHIDE ;
+ HelpID = SID_AUTOHIDE ;
+ Text = "Verstecken" ;
+ Text [ English ] = "Hide" ;
+ Text [ portuguese ] = "Ocultar" ;
+ Text [ english_us ] = "Hide" ;
+ Text [ portuguese_brazilian ] = "Verstecken" ;
+ Text [ swedish ] = "Dlj" ;
+ Text [ danish ] = "Skjul" ;
+ Text [ italian ] = "Nascondi" ;
+ Text [ spanish ] = "Ocultar" ;
+ Text [ french ] = "Masquer" ;
+ Text [ dutch ] = "Verbergen" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "Ukryj";
+ Text[ japanese ] = "B";
+ Text[ chinese_traditional ] = "J";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "Gizle";
+ Text[ language_user1 ] = " ";
+ };
+ };
+};
+String RID_AUTOHIDE
+{
+ Text = "Nicht verstecken" ;
+ Text [ English ] = "Show" ;
+ Text [ portuguese ] = "No ocultar" ;
+ Text [ english_us ] = "Don't Hide" ;
+ Text [ portuguese_brazilian ] = "Nicht verstecken" ;
+ Text [ swedish ] = "Dlj inte" ;
+ Text [ danish ] = "Skjul ikke" ;
+ Text [ italian ] = "non nascondere" ;
+ Text [ spanish ] = "No ocultar" ;
+ Text [ french ] = "Ne pas masquer" ;
+ Text [ dutch ] = "Niet verbergen" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Nie ukrywaj";
+ Text[ japanese ] = "\\ɂȂ";
+ Text[ chinese_traditional ] = "J";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ʱ";
+ Text[ turkish ] = "Gizleme";
+ Text[ language_user1 ] = " ";
+};
+String SID_NAVIGATOR
+{
+ Text = "Navigator" ;
+ Text [ English ] = "Navigator" ;
+ Text[ english_us ] = "Navigator";
+ Text[ portuguese ] = "Navegador";
+ Text[ russian ] = "";
+ Text[ dutch ] = "Navigator";
+ Text[ french ] = "Navigateur";
+ Text[ spanish ] = "Navegador";
+ Text[ italian ] = "Navigatore";
+ Text[ danish ] = "Navigator";
+ Text[ swedish ] = "Navigator";
+ Text[ polish ] = "Nawigator";
+ Text[ portuguese_brazilian ] = "Navigator";
+ Text[ japanese ] = "޹ް";
+ Text[ chinese_simplified ] = "";
+ Text[ chinese_traditional ] = "U";
+ Text[ arabic ] = "";
+ Text[ greek ] = "Navigator";
+ Text[ korean ] = "׺";
+ Text[ turkish ] = "Navigatr";
+ Text[ language_user1 ] = " ";
+};
+
+ErrorBox MSG_ERROR_WRONG_CONFIRM
+{
+ BUTTONS = WB_OK ;
+ DEFBUTTON = WB_DEF_OK ;
+ MESSAGE = "Fehlerhafte Besttigung des Passwortes" ;
+ MESSAGE [ English ] = "Wrong confirmation of the password" ;
+ MESSAGE[ english_us ] = "Faulty password confirmation";
+ MESSAGE[ portuguese ] = "Confirmao errada da senha";
+ MESSAGE[ russian ] = " ";
+ MESSAGE[ greek ] = " ";
+ MESSAGE[ dutch ] = "Foutieve bevestiging van wachtwoord";
+ MESSAGE[ french ] = "Confirmation du mot de passe errone !";
+ MESSAGE[ spanish ] = "Confirmacin errnea de la contrasea";
+ MESSAGE[ italian ] = "Conferma errata della password";
+ MESSAGE[ danish ] = "Forkert bekrftelse af adgangskoden";
+ MESSAGE[ swedish ] = "Felaktig bekrftelse av lsenordet";
+ MESSAGE[ polish ] = "Nieprawidowe potwierdzenie hasa";
+ MESSAGE[ portuguese_brazilian ] = "Wrong confirmation of the password";
+ MESSAGE[ japanese ] = "߽ܰނ̊mFłĂ܂";
+ MESSAGE[ korean ] = "н Ȯ ߸Ǿϴ.";
+ MESSAGE[ chinese_simplified ] = "ȷϿʱ";
+ MESSAGE[ chinese_traditional ] = "KXL";
+ MESSAGE[ arabic ] = " ";
+ MESSAGE[ turkish ] = "ifre onay hatal";
+ MESSAGE[ language_user1 ] = " ";
+};
+
+// ******************************************************************* EOF
+
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
new file mode 100644
index 000000000000..85d4e372b88c
--- /dev/null
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -0,0 +1,962 @@
+/*************************************************************************
+ *
+ * $RCSfile: dinfdlg.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:30 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _URLOBJ_HXX //autogen wg. INetURLObject
+#include <tools/urlobj.hxx>
+#endif
+#ifndef _SV_MSGBOX_HXX //autogen wg. RET_OK
+#include <vcl/msgbox.hxx>
+#endif
+#ifndef _SFXENUMITEM_HXX //autogen
+#include <svtools/eitem.hxx>
+#endif
+
+#include <svtools/urihelper.hxx>
+
+#pragma hdrstop
+
+#include "dinfdlg.hxx"
+#include "sfxresid.hxx"
+#include "dinfedt.hxx"
+#include "frame.hxx"
+#include "viewfrm.hxx"
+#include "request.hxx"
+#include "expfile.hxx"
+#include "inimgr.hxx"
+#include "exptypes.hxx"
+#include "helper.hxx"
+
+#include "sfx.hrc"
+#include "dinfdlg.hrc"
+#include "sfxlocal.hrc"
+
+// STATIC DATA -----------------------------------------------------------
+
+TYPEINIT1_AUTOFACTORY(SfxDocumentInfoItem, SfxStringItem);
+
+//------------------------------------------------------------------------
+
+String ConvertDateTime_Impl( const SfxStamp& rStamp )
+{
+ const String pDelim ( DEFINE_CONST_UNICODE( ", "));
+ const International& rInter = Application::GetAppInternational();
+ String aStr( rInter.GetDate( rStamp.GetTime() ) );
+ aStr += pDelim;
+ aStr += rInter.GetTime( rStamp.GetTime(), TRUE, FALSE );
+ String aAuthor = rStamp.GetName();
+ aAuthor.EraseLeadingChars();
+ if ( aAuthor.Len() )
+ {
+ aStr += pDelim;
+ aStr += aAuthor;
+ }
+ return aStr;
+}
+
+//------------------------------------------------------------------------
+
+SfxDocumentInfoItem::SfxDocumentInfoItem() :
+
+ SfxStringItem()
+
+{
+ bOwnFormat = FALSE;
+ bHasTemplate = TRUE;
+}
+
+//------------------------------------------------------------------------
+
+SfxDocumentInfoItem::SfxDocumentInfoItem( const String& rFile, const SfxDocumentInfo& rInfo ) :
+
+ SfxStringItem( SID_DOCINFO, rFile ),
+
+ aDocInfo( rInfo )
+
+{
+ bOwnFormat = FALSE;
+ bHasTemplate = TRUE;
+}
+
+//------------------------------------------------------------------------
+
+SfxDocumentInfoItem::SfxDocumentInfoItem( const String& rFile,
+ const SfxDocumentInfo& rInfo, BOOL bOwn ) :
+
+ SfxStringItem( SID_DOCINFO, rFile ),
+
+ aDocInfo( rInfo )
+
+{
+ bOwnFormat = bOwn;
+ bHasTemplate = TRUE;
+}
+
+//------------------------------------------------------------------------
+
+SfxDocumentInfoItem::SfxDocumentInfoItem( const SfxDocumentInfoItem& rItem ) :
+
+ SfxStringItem( rItem ),
+
+ aDocInfo( rItem.aDocInfo )
+
+{
+ bOwnFormat = rItem.bOwnFormat;
+ bHasTemplate = rItem.bHasTemplate;
+}
+
+//------------------------------------------------------------------------
+
+SfxDocumentInfoItem::~SfxDocumentInfoItem()
+{
+}
+
+//------------------------------------------------------------------------
+
+SfxPoolItem* SfxDocumentInfoItem::Clone( SfxItemPool * ) const
+{
+ return new SfxDocumentInfoItem( *this );
+}
+
+//------------------------------------------------------------------------
+
+int SfxDocumentInfoItem::operator==( const SfxPoolItem& rItem) const
+{
+ return rItem.Type() == Type() &&
+ SfxStringItem::operator==(rItem) &&
+ aDocInfo == ((const SfxDocumentInfoItem &)rItem).aDocInfo;
+}
+
+
+//------------------------------------------------------------------------
+
+BOOL SfxDocumentInfoItem::IsOwnFormat() const
+{
+ return bOwnFormat;
+}
+
+//------------------------------------------------------------------------
+
+SfxDocumentDescPage::SfxDocumentDescPage( Window * pParent, const SfxItemSet &rItemSet)
+ : SfxTabPage( pParent, SfxResId(TP_DOCINFODESC), rItemSet),
+ aTitleFt( this, ResId( FT_TITLE ) ),
+ aThemaFt( this, ResId( FT_THEMA ) ),
+ aKeywordsFt( this, ResId( FT_KEYWORDS ) ),
+ aCommentFt( this, ResId( FT_COMMENT ) ),
+ aTitleEd( this, ResId( ED_TITLE ) ),
+ aThemaEd( this, ResId( ED_THEMA ) ),
+ aKeywordsEd( this, ResId( ED_KEYWORDS ) ),
+ aCommentEd( this, ResId( ED_COMMENT ) ),
+ pInfoItem(0)
+{
+ FreeResource();
+}
+
+//------------------------------------------------------------------------
+
+SfxTabPage *SfxDocumentDescPage::Create(Window *pParent, const SfxItemSet &rItemSet)
+{
+ return new SfxDocumentDescPage(pParent, rItemSet);
+}
+
+//------------------------------------------------------------------------
+
+BOOL SfxDocumentDescPage::FillItemSet(SfxItemSet &rSet)
+{
+ // Pruefung, ob eine Aenderung vorliegt
+ const BOOL bTitleMod = aTitleEd.IsModified();
+ const BOOL bThemeMod = aThemaEd.IsModified();
+ const BOOL bKeywordsMod = aKeywordsEd.IsModified();
+ const BOOL bCommentMod = aCommentEd.IsModified();
+ if( !( bTitleMod || bThemeMod || bKeywordsMod || bCommentMod ) )
+ {
+ return FALSE;
+ }
+
+ // Erzeugung der Ausgabedaten
+ const SfxPoolItem *pItem;
+ SfxDocumentInfoItem *pInfo;
+ SfxTabDialog* pDlg = GetTabDialog();
+ const SfxItemSet* pExSet = NULL;
+
+ if ( pDlg )
+ pExSet = pDlg->GetExampleSet();
+
+ if ( pExSet &&
+ SFX_ITEM_SET != pExSet->GetItemState( SID_DOCINFO, TRUE, &pItem ) )
+ {
+ pInfo = pInfoItem;
+ }
+ else
+ {
+ pInfo = new SfxDocumentInfoItem(
+ *( const SfxDocumentInfoItem *) pItem );
+ }
+ SfxDocumentInfo aInfo( (*pInfo)() );
+ if( bTitleMod )
+ {
+ aInfo.SetTitle( aTitleEd.GetText() );
+ }
+ if( bThemeMod )
+ {
+ aInfo.SetTheme( aThemaEd.GetText() );
+ }
+ if( bKeywordsMod )
+ {
+ aInfo.SetKeywords( aKeywordsEd.GetText() );
+ }
+ if( bCommentMod )
+ {
+ aInfo.SetComment( aCommentEd.GetText() );
+ }
+ rSet.Put( SfxDocumentInfoItem( pInfo->GetValue(), aInfo ) );
+ if( pInfo != pInfoItem )
+ {
+ delete pInfo;
+ }
+
+ return TRUE;
+}
+
+//------------------------------------------------------------------------
+
+void SfxDocumentDescPage::Reset(const SfxItemSet &rSet)
+{
+ pInfoItem = &(SfxDocumentInfoItem &)rSet.Get(SID_DOCINFO);
+ const SfxDocumentInfo& rInfo = ( *pInfoItem )();
+
+ aTitleEd.SetText( rInfo.GetTitle() );
+ aThemaEd.SetText( rInfo.GetTheme() );
+ aKeywordsEd.SetText( rInfo.GetKeywords() );
+ aCommentEd.SetText( rInfo.GetComment() );
+
+ if ( rInfo.IsReadOnly() )
+ {
+ aTitleEd.SetReadOnly( TRUE );
+ aThemaEd.SetReadOnly( TRUE );
+ aKeywordsEd.SetReadOnly( TRUE );
+ aCommentEd.SetReadOnly( TRUE );
+ }
+}
+
+//------------------------------------------------------------------------
+
+SfxDocumentPage::SfxDocumentPage( Window* pParent, const SfxItemSet& rItemSet ) :
+
+ SfxTabPage( pParent, SfxResId( TP_DOCINFODOC ), rItemSet ),
+
+ aBmp1 ( this, ResId( BMP_FILE_1 ) ),
+ aNameED ( this, ResId( ED_FILE_NAME ) ),
+
+ aLine1FL ( this, ResId( FL_FILE_1 ) ),
+ aTypeFT ( this, ResId( FT_FILE_TYP ) ),
+ aShowTypeFT ( this, ResId( FT_FILE_SHOW_TYP ) ),
+ aReadOnlyCB ( this, ResId( CB_FILE_READONLY ) ),
+ aFileFt ( this, ResId( FT_FILE ) ),
+ aFileValFt ( this, ResId( FT_FILE_VAL ) ),
+ aSizeFT ( this, ResId( FT_FILE_SIZE ) ),
+ aShowSizeFT ( this, ResId( FT_FILE_SHOW_SIZE ) ),
+
+ aLine2FL ( this, ResId( FL_FILE_2 ) ),
+ aCreateFt ( this, ResId( FT_CREATE ) ),
+ aCreateValFt ( this, ResId( FT_CREATE_VAL ) ),
+ aTimeLogFt ( this, ResId( FT_TIMELOG ) ),
+ aTimeLogValFt ( this, ResId( FT_TIMELOG_VAL ) ),
+ aChangeFt ( this, ResId( FT_CHANGE ) ),
+ aChangeValFt ( this, ResId( FT_CHANGE_VAL ) ),
+ aDocNoFt ( this, ResId( FT_DOCNO ) ),
+ aDocNoValFt ( this, ResId( FT_DOCNO_VAL ) ),
+ aPrintValFt ( this, ResId( FT_PRINT_VAL ) ),
+ aPrintFt ( this, ResId( FT_PRINT ) ),
+ aDeleteBtn ( this, ResId( BTN_DELETE ) ),
+ aUseUserDataCB ( this, ResId( CB_USE_USERDATA ) ),
+
+ aLine3FL ( this, ResId( FL_FILE_3 ) ),
+ aTemplFt ( this, ResId( FT_TEMPL ) ),
+ aTemplValFt ( this, ResId( FT_TEMPL_VAL ) ),
+
+ aUnknownSize ( ResId( STR_UNKNOWNSIZE ) ),
+
+ bEnableUseUserData ( FALSE ),
+ bHandleDelete ( FALSE )
+
+{
+ FreeResource();
+ aDeleteBtn.SetClickHdl( LINK( this, SfxDocumentPage, DeleteHdl ) );
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SfxDocumentPage, DeleteHdl, PushButton*, EMPTYARG )
+{
+ SfxStamp aCreated;
+ if ( bEnableUseUserData && aUseUserDataCB.IsChecked() )
+ aCreated.SetName( SFX_INIMANAGER()->GetUserFullName() );
+ aCreateValFt.SetText( ConvertDateTime_Impl( aCreated ) );
+ XubString aEmpty;
+ aChangeValFt.SetText( aEmpty );
+ aPrintValFt.SetText( aEmpty );
+ const Time aTime( 0 );
+ const International& rInter = Application::GetAppInternational();
+ aTimeLogValFt.SetText( rInter.GetDuration( aTime ) );
+ aDocNoValFt.SetText( '1' );
+ bHandleDelete = TRUE;
+ return 0;
+}
+
+//------------------------------------------------------------------------
+
+SfxTabPage* SfxDocumentPage::Create( Window* pParent, const SfxItemSet& rItemSet )
+{
+ return new SfxDocumentPage( pParent, rItemSet );
+}
+
+//------------------------------------------------------------------------
+
+void SfxDocumentPage::EnableUseUserData()
+{
+ bEnableUseUserData = TRUE;
+ aUseUserDataCB.Show();
+ aDeleteBtn.Show();
+}
+
+//------------------------------------------------------------------------
+
+BOOL SfxDocumentPage::FillItemSet( SfxItemSet& rSet )
+{
+ BOOL bRet = FALSE;
+
+ if ( !bHandleDelete && bEnableUseUserData &&
+ aUseUserDataCB.GetState() != aUseUserDataCB.GetSavedValue() &&
+ GetTabDialog() && GetTabDialog()->GetExampleSet() )
+ {
+ const SfxItemSet* pExpSet = GetTabDialog()->GetExampleSet();
+ const SfxPoolItem* pItem;
+
+ if ( pExpSet && SFX_ITEM_SET ==
+ pExpSet->GetItemState( SID_DOCINFO, TRUE, &pItem ) )
+ {
+ SfxDocumentInfoItem* pInfoItem = (SfxDocumentInfoItem*)pItem;
+ SfxDocumentInfo aInfo( (*pInfoItem)() );
+ BOOL bUseData = ( STATE_CHECK == aUseUserDataCB.GetState() );
+ aInfo.SetUseUserData( bUseData );
+/*
+ if ( !bUseData )
+ {
+ // "Benutzerdaten verwenden" ausgeschaltet ->
+ // den Benutzer aus den Stamps l"oschen
+ String aEmptyUser;
+ aInfo.SetCreated(
+ SfxStamp( aEmptyUser, aInfo.GetCreated().GetTime() ) );
+ aInfo.SetChanged(
+ SfxStamp( aEmptyUser, aInfo.GetChanged().GetTime() ) );
+ aInfo.SetPrinted(
+ SfxStamp( aEmptyUser, aInfo.GetPrinted().GetTime() ) );
+ }
+*/
+ rSet.Put( SfxDocumentInfoItem( pInfoItem->GetValue(), aInfo ) );
+ bRet = TRUE;
+ }
+ }
+
+ if ( bHandleDelete )
+ {
+ const SfxItemSet* pExpSet = GetTabDialog()->GetExampleSet();
+ const SfxPoolItem* pItem;
+
+ if ( pExpSet &&
+ SFX_ITEM_SET == pExpSet->GetItemState( SID_DOCINFO, TRUE, &pItem ) )
+ {
+ SfxDocumentInfoItem* pInfoItem = (SfxDocumentInfoItem*)pItem;
+ SfxDocumentInfo aInfo( pInfoItem->GetDocInfo() );
+ SfxStamp aCreated;
+ if ( bEnableUseUserData && aUseUserDataCB.IsChecked() )
+ aCreated.SetName( SFX_INIMANAGER()->GetUserFullName() );
+ aInfo.SetCreated( aCreated );
+ SfxStamp aInvalid( TIMESTAMP_INVALID_DATETIME );
+ aInfo.SetChanged( aInvalid );
+ aInfo.SetPrinted( aInvalid );
+ aInfo.SetTime( 0L );
+ aInfo.SetDocumentNumber( 1 );
+ aInfo.SetUseUserData( STATE_CHECK == aUseUserDataCB.GetState() );
+ rSet.Put( SfxDocumentInfoItem( pInfoItem->GetValue(), aInfo ) );
+ bRet = TRUE;
+ }
+ }
+
+ if ( aNameED.IsModified() && aNameED.GetText().Len() )
+ {
+ rSet.Put( SfxStringItem( ID_FILETP_TITLE, aNameED.GetText() ) );
+ bRet = TRUE;
+ }
+
+ if ( /* aReadOnlyCB.IsModified() */ TRUE )
+ {
+ rSet.Put( SfxBoolItem( ID_FILETP_READONLY, aReadOnlyCB.IsChecked() ) );
+ bRet = TRUE;
+ }
+
+ return bRet;
+}
+
+//------------------------------------------------------------------------
+
+void SfxDocumentPage::Reset( const SfxItemSet& rSet )
+{
+ // Bestimmung der Dokumentinformationen
+ const SfxDocumentInfoItem *pInfoItem =
+ &(const SfxDocumentInfoItem &)rSet.Get(SID_DOCINFO);
+ const SfxDocumentInfo& rInfo = ( *pInfoItem )();
+
+ // Vorlagendaten
+ if ( pInfoItem->HasTemplate() )
+ {
+ aTemplValFt.SetText( rInfo.GetTemplateName() );
+ }
+ else
+ {
+ aTemplFt.Hide();
+ aTemplValFt.Hide();
+ }
+
+ // Bestimmung des Dateinamens
+ String aFile( pInfoItem->GetValue() );
+ String aFactory( aFile );
+ if ( aFile.Len() > 2 && aFile.GetChar(0) == '[' )
+ {
+ USHORT nPos = aFile.Search( ']' );
+ aFactory = aFile.Copy( 1, nPos-1 );
+ aFile = aFile.Copy( nPos+1 );
+ }
+
+ // Bestimmung des Namens
+ String aName;
+ const SfxPoolItem* pItem = 0;
+ if ( SFX_ITEM_SET != rSet.GetItemState( ID_FILETP_TITLE, FALSE, &pItem ) )
+ {
+ INetURLObject aURL(aFile);
+ aName = aURL.GetName( INetURLObject::DECODE_WITH_CHARSET );
+ if ( !aName.Len() || aURL.GetProtocol() == INET_PROT_PRIVATE )
+ aName = String( SfxResId( STR_NONAME ) );
+ aNameED.SetReadOnly( TRUE );
+ }
+ else
+ {
+ DBG_ASSERT( pItem->IsA( TYPE( SfxStringItem ) ), "SfxDocumentPage:<SfxStringItem> erwartet" );
+ aName = ( ( SfxStringItem* ) pItem )->GetValue();
+ }
+ aNameED.SetText( aName );
+ aNameED.ClearModifyFlag();
+
+ // Bestimmung des R/O-Flags
+ if ( SFX_ITEM_UNKNOWN == rSet.GetItemState( ID_FILETP_READONLY, FALSE, &pItem ) )
+ aReadOnlyCB.Hide();
+ else
+ aReadOnlyCB.Check( ( (SfxBoolItem*)pItem )->GetValue() );
+
+ // Bestimmung des Kontextsymbols
+ INetURLObject aURL;
+ aURL.SetSmartProtocol( INET_PROT_FILE );
+ aURL.SetSmartURL( aFactory);
+ const String& rMainURL = aURL.GetMainURL();
+ aBmp1.SetImage( SfxExplorerFile::GetImage( aURL, TRUE ) );
+
+ // Bestimmung von Groesse und Typ
+ String aSizeText( aUnknownSize );
+ if ( aURL.GetProtocol() == INET_PROT_FILE )
+ aSizeText = CreateSizeText( SfxContentHelper::GetSize( aURL.PathToFileName() ) );
+ aShowSizeFT.SetText( aSizeText );
+ String aDescription( SfxResId( STR_SFX_NEWOFFICEDOC ) );
+ if ( aURL.GetLastName().Len() )
+ aDescription = SfxExplorerFile::GetDescription( rMainURL );
+ aShowTypeFT.SetText( aDescription );
+
+ // Bestimmung des Ortes
+ aURL.SetSmartURL( aFile);
+ if ( aURL.GetProtocol() == INET_PROT_FILE )
+ {
+ INetURLObject aPath( aURL );
+ aPath.setFinalSlash();
+ aPath.removeSegment();
+ String aText( aPath.PathToFileName() ); //! (pb) MaxLen?
+ aFileValFt.SetText( aText );
+ }
+ else if ( aURL.GetProtocol() != INET_PROT_PRIVATE )
+ aFileValFt.SetText( aURL.GetPartBeforeLastName() );
+
+ // Zugriffsdaten
+ const SfxStamp& rCreated = rInfo.GetCreated();
+ aCreateValFt.SetText( ConvertDateTime_Impl( rCreated ) );
+ const SfxStamp& rChanged = rInfo.GetChanged();
+ if ( rCreated != rChanged && rChanged.IsValid() )
+ aChangeValFt.SetText( ConvertDateTime_Impl( rChanged ) );
+ const SfxStamp& rPrinted = rInfo.GetPrinted();
+ if ( rPrinted != rCreated && rPrinted.IsValid())
+ aPrintValFt.SetText( ConvertDateTime_Impl( rPrinted ) );
+ const long nTime = rInfo.GetTime();
+ if( 1 || nTime ) //!!!
+ {
+ const Time aTime( nTime );
+ const International& rInter = Application::GetAppInternational();
+ aTimeLogValFt.SetText( rInter.GetDuration( aTime ) );
+ }
+ aDocNoValFt.SetText( String::CreateFromInt32( rInfo.GetDocumentNumber() ) );
+
+ TriState eState = (TriState)rInfo.IsUseUserData();
+
+ if ( STATE_DONTKNOW == eState )
+ aUseUserDataCB.EnableTriState( TRUE );
+
+ aUseUserDataCB.SetState( eState );
+ aUseUserDataCB.SaveValue();
+ aUseUserDataCB.Enable( bEnableUseUserData );
+ bHandleDelete = FALSE;
+ aDeleteBtn.Enable( bEnableUseUserData );
+}
+
+//------------------------------------------------------------------------
+
+SfxInternetPage::SfxInternetPage( Window* pParent, const SfxItemSet& rItemSet ) :
+
+ SfxTabPage( pParent, SfxResId( TP_DOCINFORELOAD ), rItemSet ),
+
+ aReloadEnabled ( this, ResId( CB_AUTORELOAD ) ),
+ aFTSeconds ( this, ResId( FT_SECONDS ) ),
+ aReloadDelay ( this, ResId( ED_SECONDS ) ),
+ aFTURL ( this, ResId( FT_URL ) ),
+ aReloadURL ( this, ResId( ED_URL ) ),
+ aFTTarget ( this, ResId( FT_DEFAULT ) ),
+ aTargets ( this, ResId( LB_DEFAULT ) ),
+
+ pInfoItem( NULL )
+
+{
+ FreeResource();
+ pInfoItem = &(SfxDocumentInfoItem &)rItemSet.Get(SID_DOCINFO);
+ SfxDocumentInfo& rInfo = (*pInfoItem)();
+ TargetList aList;
+ SfxViewFrame* pFrame = SfxViewFrame::Current();
+ if( pFrame && ( pFrame = pFrame->GetTopViewFrame() ))
+ {
+ pFrame->GetTargetList( aList );
+
+ for( USHORT nPos = (USHORT)aList.Count(); nPos; )
+ {
+ String* pObj = aList.GetObject( --nPos );
+ aTargets.InsertEntry( *pObj );
+ delete pObj;
+ }
+ }
+ aTargets.SetText( rInfo.GetDefaultTarget() );
+ aReloadEnabled.SetClickHdl(LINK(this, SfxInternetPage, ClickHdl));
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SfxInternetPage, ClickHdl, Control*, pCtrl )
+{
+ if ( pCtrl == &aReloadEnabled )
+ {
+ aFTSeconds.Enable( aReloadEnabled.IsChecked() );
+ aReloadDelay.Enable( aReloadEnabled.IsChecked() );
+ }
+ return 0;
+}
+
+//------------------------------------------------------------------------
+
+BOOL SfxInternetPage::FillItemSet( SfxItemSet& rSet )
+{
+ // Pruefung, ob sich etwas geaendert hat
+ const BOOL bReloadEnabled = aReloadEnabled.IsChecked();
+ const BOOL bReloadModified = aReloadEnabled.GetSavedValue() !=
+ bReloadEnabled;
+ const BOOL bReloadURLModified = aReloadURL.IsModified();
+ String aTargetFrame( aTargets.GetText() );
+ const BOOL bTargetModified = aOldTarget != aTargetFrame;
+ const BOOL bReloadDelayModified = aReloadDelay.IsModified();
+ if( !( bReloadDelayModified || bTargetModified || bReloadURLModified ||
+ bReloadModified ) )
+ {
+ return FALSE;
+ }
+
+ // Speicherung der Aenderungen
+ const SfxPoolItem *pItem;
+ SfxDocumentInfoItem *pInfo;
+ SfxTabDialog* pDlg = GetTabDialog();
+ const SfxItemSet* pExSet = NULL;
+
+ if ( pDlg )
+ pExSet = pDlg->GetExampleSet();
+
+ if ( pExSet &&
+ SFX_ITEM_SET != pExSet->GetItemState(SID_DOCINFO, TRUE, &pItem) )
+ pInfo = pInfoItem;
+ else
+ pInfo = new SfxDocumentInfoItem(*(const SfxDocumentInfoItem *)pItem);
+
+ SfxDocumentInfo& rInfo = (*pInfo)();
+ if( bReloadModified )
+ {
+ rInfo.EnableReload( bReloadEnabled );
+ }
+ if( bReloadDelayModified )
+ {
+ rInfo.SetReloadDelay( aReloadDelay.GetValue() );
+ }
+ if( bReloadURLModified )
+ {
+ String a2ReloadURL( aReloadURL.GetText() );
+ if ( a2ReloadURL.Len() )
+ {
+ a2ReloadURL = URIHelper::SmartRelToAbs( a2ReloadURL );
+ }
+ rInfo.SetReloadURL( a2ReloadURL );
+ }
+ if( bTargetModified )
+ {
+ rInfo.SetDefaultTarget( aTargetFrame );
+ }
+ rSet.Put( *pInfo );
+ if( pInfo != pInfoItem )
+ delete pInfo;
+ return TRUE;
+}
+
+//------------------------------------------------------------------------
+
+SfxTabPage *SfxInternetPage::Create( Window* pParent, const SfxItemSet& rItemSet )
+{
+ return new SfxInternetPage(pParent, rItemSet);
+}
+
+//------------------------------------------------------------------------
+
+void SfxInternetPage::Reset( const SfxItemSet& rSet )
+{
+ pInfoItem = &(SfxDocumentInfoItem &)rSet.Get(SID_DOCINFO);
+ SfxDocumentInfo& rInfo = (*pInfoItem)();
+
+ aReloadEnabled.Check( rInfo.IsReloadEnabled() );
+ aReloadEnabled.SaveValue();
+ aReloadDelay.SetValue( rInfo.GetReloadDelay() );
+ aReloadURL.SetText( rInfo.GetReloadURL() );
+ aTargets.SetText( rInfo.GetDefaultTarget() );
+ ClickHdl( &aReloadEnabled );
+
+ if ( rInfo.IsReadOnly() )
+ {
+ aReloadEnabled.Disable();
+ aReloadDelay.Disable();
+ aReloadURL.SetReadOnly( TRUE );
+ aTargets.SetReadOnly( TRUE );
+ }
+}
+
+//------------------------------------------------------------------------
+
+SfxDocumentUserPage::SfxDocumentUserPage( Window* pParent,
+ const SfxItemSet& rItemSet ) :
+
+ SfxTabPage( pParent, SfxResId( TP_DOCINFOUSER ), rItemSet ),
+
+ aInfo1Ft ( this, ResId( FT_INFO1 ) ),
+ aInfo2Ft ( this, ResId( FT_INFO2 ) ),
+ aInfo3Ft ( this, ResId( FT_INFO3 ) ),
+ aInfo4Ft ( this, ResId( FT_INFO4 ) ),
+ aInfo1Ed ( this, ResId( ED_INFO1 ) ),
+ aInfo2Ed ( this, ResId( ED_INFO2 ) ),
+ aInfo3Ed ( this, ResId( ED_INFO3 ) ),
+ aInfo4Ed ( this, ResId( ED_INFO4 ) ),
+ aEditLabelBtn ( this, ResId( BTN_EDITLABEL ) ),
+
+ bLabelModified ( FALSE ),
+ pInfoItem ( NULL )
+
+{
+ FreeResource();
+ aEditLabelBtn.SetClickHdl( LINK( this, SfxDocumentUserPage, EditLabelHdl ) );
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SfxDocumentUserPage, EditLabelHdl, PushButton *, pPushButton )
+{
+ SfxDocInfoEditDlg* pDlg = new SfxDocInfoEditDlg( this );
+ pDlg->SetText1( aInfo1Ft.GetText().EraseAllChars( '~' ) );
+ pDlg->SetText2( aInfo2Ft.GetText().EraseAllChars( '~' ) );
+ pDlg->SetText3( aInfo3Ft.GetText().EraseAllChars( '~' ) );
+ pDlg->SetText4( aInfo4Ft.GetText().EraseAllChars( '~' ) );
+
+ if ( RET_OK == pDlg->Execute() )
+ {
+ aShortcuts.Erase();
+ aInfo1Ft.SetText( CreateShortcutTitle( pDlg->GetText1() ) );
+ aInfo2Ft.SetText( CreateShortcutTitle( pDlg->GetText2() ) );
+ aInfo3Ft.SetText( CreateShortcutTitle( pDlg->GetText3() ) );
+ aInfo4Ft.SetText( CreateShortcutTitle( pDlg->GetText4() ) );
+ bLabelModified = TRUE;
+ }
+ delete pDlg;
+ return 0;
+}
+
+//------------------------------------------------------------------------
+
+XubString SfxDocumentUserPage::CreateShortcutTitle( const XubString& rTitle )
+{
+ USHORT nPos;
+
+ if ( !aShortcuts.Len() )
+ {
+ XubString aText = aEditLabelBtn.GetText().ToLowerAscii();
+ nPos = aText.Search( '~' );
+ if ( nPos != STRING_NOTFOUND && nPos != aText.Len() - 1 )
+ aShortcuts = aText.GetChar( nPos + 1 );
+ }
+ XubString aTitle = rTitle;
+ aTitle.ToLowerAscii();
+ const char* pcTitle = U2S(aTitle).getStr();
+ FASTBOOL bFound = FALSE;
+ nPos = 0;
+
+ while ( *pcTitle && !bFound )
+ {
+ char cChar = *pcTitle;
+ if ( ByteString( cChar ).IsAlphaNumericAscii() &&
+ aShortcuts.Search( cChar ) == STRING_NOTFOUND )
+ {
+ bFound = TRUE;
+ aShortcuts += cChar;
+ }
+ else
+ {
+ pcTitle++;
+ nPos++;
+ }
+ }
+
+ if ( !bFound )
+ nPos = 0;
+
+ XubString aShortcutTitle = rTitle;
+ aShortcutTitle.Insert( '~', nPos );
+ return aShortcutTitle;
+}
+
+//------------------------------------------------------------------------
+
+SfxTabPage* SfxDocumentUserPage::Create( Window* pParent, const SfxItemSet& rItemSet )
+{
+ return new SfxDocumentUserPage(pParent, rItemSet);
+}
+
+//------------------------------------------------------------------------
+
+BOOL SfxDocumentUserPage::FillItemSet( SfxItemSet& rSet )
+{
+ const BOOL bMod = bLabelModified ||
+ aInfo1Ed.IsModified() || aInfo2Ed.IsModified() ||
+ aInfo3Ed.IsModified() || aInfo4Ed.IsModified();
+ if ( !bMod )
+ return FALSE;
+
+ const SfxPoolItem* pItem = 0;
+ SfxDocumentInfoItem* pInfo = 0;
+ SfxTabDialog* pDlg = GetTabDialog();
+ const SfxItemSet* pExSet = NULL;
+
+ if ( pDlg )
+ pExSet = pDlg->GetExampleSet();
+
+ if ( pExSet &&
+ SFX_ITEM_SET != pExSet->GetItemState(SID_DOCINFO, TRUE, &pItem) )
+ pInfo = pInfoItem;
+ else
+ pInfo = new SfxDocumentInfoItem( *(const SfxDocumentInfoItem*)pItem );
+ SfxDocumentInfo& rInfo = pInfo->GetDocInfo();
+
+ if ( bLabelModified || aInfo1Ed.IsModified() )
+ {
+ XubString aTitle = aInfo1Ft.GetText().EraseAllChars( '~' );
+ rInfo.SetUserKey( SfxDocUserKey( aTitle, aInfo1Ed.GetText() ), 0 );
+ }
+ if ( bLabelModified || aInfo2Ed.IsModified() )
+ {
+ XubString aTitle = aInfo2Ft.GetText().EraseAllChars( '~' );
+ rInfo.SetUserKey( SfxDocUserKey( aTitle, aInfo2Ed.GetText() ), 1 );
+ }
+ if ( bLabelModified || aInfo3Ed.IsModified() )
+ {
+ XubString aTitle = aInfo3Ft.GetText().EraseAllChars( '~' );
+ rInfo.SetUserKey( SfxDocUserKey( aTitle, aInfo3Ed.GetText() ), 2 );
+ }
+ if ( bLabelModified || aInfo4Ed.IsModified() )
+ {
+ XubString aTitle = aInfo4Ft.GetText().EraseAllChars( '~' );
+ rInfo.SetUserKey( SfxDocUserKey( aTitle, aInfo4Ed.GetText() ), 3 );
+ }
+ rSet.Put( *pInfo );
+ if ( pInfo != pInfoItem )
+ delete pInfo;
+ return bMod;
+}
+
+//------------------------------------------------------------------------
+
+void SfxDocumentUserPage::Reset(const SfxItemSet &rSet)
+{
+ pInfoItem = &(SfxDocumentInfoItem&)rSet.Get( SID_DOCINFO );
+ const SfxDocumentInfo& rInfo = pInfoItem->GetDocInfo();
+ aShortcuts.Erase();
+ aInfo1Ft.SetText( CreateShortcutTitle( rInfo.GetUserKey(0).GetTitle() ) );
+ aInfo1Ed.SetText( rInfo.GetUserKey(0).GetWord() );
+ aInfo2Ft.SetText( CreateShortcutTitle( rInfo.GetUserKey(1).GetTitle() ) );
+ aInfo2Ed.SetText( rInfo.GetUserKey(1).GetWord() );
+ aInfo3Ft.SetText( CreateShortcutTitle( rInfo.GetUserKey(2).GetTitle() ) );
+ aInfo3Ed.SetText( rInfo.GetUserKey(2).GetWord() );
+ aInfo4Ft.SetText( CreateShortcutTitle( rInfo.GetUserKey(3).GetTitle() ) );
+ aInfo4Ed.SetText( rInfo.GetUserKey(3).GetWord() );
+ bLabelModified = FALSE;
+
+ if ( rInfo.IsReadOnly() )
+ {
+ aInfo1Ed.SetReadOnly( TRUE );
+ aInfo2Ed.SetReadOnly( TRUE );
+ aInfo3Ed.SetReadOnly( TRUE );
+ aInfo4Ed.SetReadOnly( TRUE );
+ aEditLabelBtn.Disable();
+ }
+}
+
+//------------------------------------------------------------------------
+
+SfxDocumentInfoDialog::SfxDocumentInfoDialog( Window* pParent,
+ const SfxItemSet& rItemSet ) :
+
+ SfxTabDialog( 0, pParent, SfxResId( SID_DOCINFO ), &rItemSet )
+
+{
+ FreeResource();
+
+ const SfxDocumentInfoItem* pInfoItem =
+ &(const SfxDocumentInfoItem &)rItemSet.Get( SID_DOCINFO );
+
+ // Bestimmung des Titels
+ const SfxPoolItem* pItem = 0;
+ String aTitle( GetText() );
+ if ( SFX_ITEM_SET !=
+ rItemSet.GetItemState( SID_EXPLORER_PROPS_START, FALSE, &pItem ) )
+ {
+ // Dateiname
+ String aFile( pInfoItem->GetValue() );
+#ifdef WIN
+ if ( aFile.Len() <= 8 )
+ {
+ String sTmp( SfxResId( STR_NONAME ) );
+ USHORT nLen = Min( (USHORT)8, sTmp.Len() );
+
+ if ( sTmp.Copy( 0, nLen ).Lower() ==
+ aFile.Copy( 0, nLen ).Lower() )
+ {
+ aFile = pInfoItem->GetValue();
+ }
+ }
+#endif
+
+ INetURLObject aURL;
+ aURL.SetSmartProtocol( INET_PROT_FILE );
+ aURL.SetSmartURL( aFile);
+ if ( INET_PROT_PRIV_SOFFICE != aURL.GetProtocol() )
+ {
+ String aLastName( aURL.GetLastName() );
+ if ( aLastName.Len() )
+ aTitle += aLastName;
+ else
+ aTitle += aFile;
+ }
+ else
+ aTitle += String( SfxResId( STR_NONAME ) );
+ }
+ else
+ {
+ DBG_ASSERT( pItem->IsA( TYPE( SfxStringItem ) ),
+ "SfxDocumentInfoDialog:<SfxStringItem> erwartet" );
+ aTitle += ( ( SfxStringItem* ) pItem )->GetValue();
+ }
+ SetText( aTitle );
+
+ // Eigenschaftenseiten
+ AddTabPage(TP_DOCINFODESC, SfxDocumentDescPage::Create, 0);
+ AddTabPage(TP_DOCINFODOC, SfxDocumentPage::Create, 0);
+ AddTabPage(TP_DOCINFOUSER, SfxDocumentUserPage::Create, 0);
+ AddTabPage(TP_DOCINFORELOAD, SfxInternetPage::Create, 0);
+}
+
+// -----------------------------------------------------------------------
+
+void SfxDocumentInfoDialog::PageCreated( USHORT nId, SfxTabPage &rPage )
+{
+ if ( TP_DOCINFODOC == nId )
+ ( (SfxDocumentPage&)rPage ).EnableUseUserData();
+}
+
+
diff --git a/sfx2/source/dialog/dinfdlg.hrc b/sfx2/source/dialog/dinfdlg.hrc
new file mode 100644
index 000000000000..8c25566b4f6b
--- /dev/null
+++ b/sfx2/source/dialog/dinfdlg.hrc
@@ -0,0 +1,121 @@
+/*************************************************************************
+ *
+ * $RCSfile: dinfdlg.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:30 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _DINFDLG_HRC
+#define _DINFDLG_HRC
+
+// defines ---------------------------------------------------------------
+
+#define FT_FILE 1
+#define FT_FILE_VAL 2
+#define FT_CHANGE 3
+#define FT_CHANGE_VAL 4
+#define FT_CREATE 7
+#define FT_CREATE_VAL 8
+#define FT_TITLE 9
+#define ED_TITLE 10
+#define FT_THEMA 11
+#define ED_THEMA 12
+#define FT_KEYWORDS 13
+#define ED_KEYWORDS 14
+#define FT_INFO1 15
+#define ED_INFO1 16
+#define FT_INFO2 17
+#define ED_INFO2 18
+#define FT_INFO3 19
+#define ED_INFO3 20
+#define FT_INFO4 21
+#define ED_INFO4 22
+#define FT_COMMENT 23
+#define ED_COMMENT 24
+#define GB_INFO 30
+#define FT_TEMPL 32
+#define FT_TEMPL_VAL 33
+#define BTN_EDITLABEL 34
+#define FT_TIMELOG 35
+#define FT_TIMELOG_VAL 36
+#define FT_DOCNO 37
+#define FT_DOCNO_VAL 38
+#define CB_AUTORELOAD 39
+#define ED_SECONDS 41
+#define FT_SECONDS 42
+#define FT_URL 43
+#define ED_URL 44
+#define LB_DEFAULT 46
+#define FT_DEFAULT 47
+#define CB_FILE_READONLY 48
+#define CB_USE_USERDATA 49
+#define BMP_FILE_1 50
+#define ED_FILE_NAME 51
+#define FL_FILE_1 52
+#define FT_FILE_TYP 53
+#define FT_FILE_SHOW_TYP 54
+#define FT_FILE_SIZE 55
+#define FT_FILE_SHOW_SIZE 56
+#define FL_FILE_2 57
+#define FT_PRINT 58
+#define FT_PRINT_VAL 59
+#define STR_UNKNOWNSIZE 60
+#define FL_FILE_3 61
+#define BTN_DELETE 62
+
+
+#endif
+
diff --git a/sfx2/source/dialog/dinfdlg.src b/sfx2/source/dialog/dinfdlg.src
new file mode 100644
index 000000000000..a25251139ccf
--- /dev/null
+++ b/sfx2/source/dialog/dinfdlg.src
@@ -0,0 +1,1026 @@
+/*************************************************************************
+ *
+ * $RCSfile: dinfdlg.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:30 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+ // include ---------------------------------------------------------------
+
+#include "sfx.hrc"
+#include "helpid.hrc"
+#include "dinfdlg.hrc"
+
+ // TP_DOCINFODESC --------------------------------------------------------
+
+TabPage TP_DOCINFODESC
+{
+ HelpId = HID_DOCINFODESC ;
+ Hide = TRUE ;
+ Size = MAP_APPFONT ( 260 , 135 ) ;
+ FixedText FT_TITLE
+ {
+ Pos = MAP_APPFONT ( 6 , 7 ) ;
+ Size = MAP_APPFONT ( 60 , 10 ) ;
+ Left = TRUE ;
+ Text = "~Titel" ;
+ Text [ ENGLISH ] = "~Title" ;
+ Text [ norwegian ] = "~Tittel" ;
+ Text [ italian ] = "~Titolo" ;
+ Text [ portuguese_brazilian ] = "~Ttulo" ;
+ Text [ portuguese ] = "~Ttulo" ;
+ Text [ finnish ] = "~Arvo" ;
+ Text [ danish ] = "Titel" ;
+ Text [ french ] = "~Titre" ;
+ Text [ swedish ] = "~Rubrik" ;
+ Text [ dutch ] = "~Titel" ;
+ Text [ spanish ] = "~Ttulo" ;
+ Text [ english_us ] = "~Title" ;
+ Text[ chinese_simplified ] = "(~T)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Tytu";
+ Text[ japanese ] = "(~T)";
+ Text[ chinese_traditional ] = "D(~T)";
+ Text[ greek ] = "~";
+ Text[ korean ] = "(~T)";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "~Balk";
+ Text[ language_user1 ] = " ";
+ };
+ Edit ED_TITLE
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 70 , 6 ) ;
+ Size = MAP_APPFONT ( 184 , 12 ) ;
+ TabStop = TRUE ;
+ Left = TRUE ;
+ MaxTextLength = 63 ;
+ };
+ FixedText FT_THEMA
+ {
+ Pos = MAP_APPFONT ( 6 , 22 ) ;
+ Size = MAP_APPFONT ( 60 , 10 ) ;
+ Left = TRUE ;
+ Text = "Th~ema" ;
+ Text [ ENGLISH ] = "~Subject" ;
+ Text [ norwegian ] = "~Emne" ;
+ Text [ italian ] = "Oggetto" ;
+ Text [ portuguese_brazilian ] = "~Assunto" ;
+ Text [ portuguese ] = "~Assunto" ;
+ Text [ finnish ] = "~Aihe" ;
+ Text [ danish ] = "Emne" ;
+ Text [ french ] = "~Sujet" ;
+ Text [ swedish ] = "T~ema" ;
+ Text [ dutch ] = "~Onderwerp" ;
+ Text [ spanish ] = "~Tema" ;
+ Text [ english_us ] = "~Subject" ;
+ Text[ chinese_simplified ] = "(~S)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Temat";
+ Text[ japanese ] = "ð(~S)";
+ Text[ chinese_traditional ] = "DD(~S)";
+ Text[ greek ] = "";
+ Text[ korean ] = "(~S)";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "K~onu";
+ Text[ language_user1 ] = " ";
+ };
+ Edit ED_THEMA
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 70 , 21 ) ;
+ Size = MAP_APPFONT ( 184 , 12 ) ;
+ TabStop = TRUE ;
+ Left = TRUE ;
+ MaxTextLength = 63 ;
+ };
+ FixedText FT_KEYWORDS
+ {
+ Pos = MAP_APPFONT ( 6 , 37 ) ;
+ Size = MAP_APPFONT ( 60 , 10 ) ;
+ Left = TRUE ;
+ Text = "~Schlsselwrter" ;
+ Text [ ENGLISH ] = "~Keywords" ;
+ Text [ norwegian ] = "~Nkkelord" ;
+ Text [ italian ] = "~Parole chiave" ;
+ Text [ portuguese_brazilian ] = "~Palavras-chave" ;
+ Text [ portuguese ] = "~Palavras-chave" ;
+ Text [ finnish ] = "A~vainsanat" ;
+ Text [ danish ] = "Ngleord" ;
+ Text [ french ] = "~Mots-cls" ;
+ Text [ swedish ] = "~Nyckelord" ;
+ Text [ dutch ] = "~Sleutelwoorden" ;
+ Text [ spanish ] = "~Palabras clave" ;
+ Text [ english_us ] = "~Keywords" ;
+ Text[ chinese_simplified ] = "ؼ(~K)";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Sowa kluczowe";
+ Text[ japanese ] = "ܰ(~K)";
+ Text[ chinese_traditional ] = "r(~K)";
+ Text[ greek ] = "-";
+ Text[ korean ] = "Ű(~K)";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "~Anahtar szckler";
+ Text[ language_user1 ] = " ";
+ };
+ Edit ED_KEYWORDS
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 70 , 36 ) ;
+ Size = MAP_APPFONT ( 184 , 12 ) ;
+ TabStop = TRUE ;
+ Left = TRUE ;
+ MaxTextLength = 127 ;
+ };
+ FixedText FT_COMMENT
+ {
+ Pos = MAP_APPFONT ( 6 , 52 ) ;
+ Size = MAP_APPFONT ( 60 , 10 ) ;
+ Left = TRUE ;
+ Text = "~Beschreibung" ;
+ Text [ ENGLISH ] = "~Description" ;
+ Text [ norwegian ] = "~Description" ;
+ Text [ italian ] = "~Descrizione" ;
+ Text [ portuguese_brazilian ] = "~Descrio" ;
+ Text [ portuguese ] = "~Descrio" ;
+ Text [ finnish ] = "~Kuvaus" ;
+ Text [ danish ] = "Beskrivelse" ;
+ Text [ french ] = "~Description" ;
+ Text [ swedish ] = "~Beskrivning" ;
+ Text [ dutch ] = "~Beschrijving" ;
+ Text [ spanish ] = "~Descripcin" ;
+ Text [ english_us ] = "~Comment" ;
+ Text[ chinese_simplified ] = "˵(~C)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Opis";
+ Text[ japanese ] = "(~C)";
+ Text[ chinese_traditional ] = "yz(~C)";
+ Text[ greek ] = "";
+ Text[ korean ] = "(~C)";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "~Tanm";
+ Text[ language_user1 ] = " ";
+ };
+ MultiLineEdit ED_COMMENT
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 70 , 51 ) ;
+ Size = MAP_APPFONT ( 184 , 78 ) ;
+ IgnoreTab = TRUE ;
+ Left = TRUE ;
+ MaxTextLength = 255 ;
+ VScroll = TRUE ;
+ };
+};
+
+ // TP_DOCINFODOC ---------------------------------------------------------
+
+TabPage TP_DOCINFODOC
+{
+ HelpId = HID_DOCINFODOC ;
+ Hide = TRUE ;
+ Size = MAP_APPFONT ( 260 , 135 ) ;
+ FixedImage BMP_FILE_1
+ {
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 20 , 20 ) ;
+ };
+ Edit ED_FILE_NAME
+ {
+ Pos = MAP_APPFONT ( 54 , 8 ) ;
+ Size = MAP_APPFONT ( 200 , 12 ) ;
+ Border = TRUE ;
+ };
+ FixedLine FL_FILE_1
+ {
+ Pos = MAP_APPFONT ( 6 , 25 ) ;
+ Size = MAP_APPFONT ( 248 , 1 ) ;
+ };
+ FixedText FT_FILE_TYP
+ {
+ Pos = MAP_APPFONT ( 6 , 29 ) ;
+ Size = MAP_APPFONT ( 45 , 10 ) ;
+ Text = "Typ:" ;
+ Text [ ENGLISH ] = "Type:" ;
+ Text [ english_us ] = "Type:" ;
+ Text [ italian ] = "Tipo:" ;
+ Text [ spanish ] = "Tipo:" ;
+ Text [ french ] = "Type :" ;
+ Text [ dutch ] = "Type:" ;
+ Text [ swedish ] = "Typ:" ;
+ Text [ danish ] = "Type:" ;
+ Text [ portuguese_brazilian ] = "Typ:" ;
+ Text [ portuguese ] = "Tipo:" ;
+ Text[ chinese_simplified ] = "ͣ";
+ Text[ russian ] = ":";
+ Text[ polish ] = "Typ:";
+ Text[ japanese ] = ":";
+ Text[ chinese_traditional ] = "G";
+ Text[ greek ] = ":";
+ Text[ korean ] = ":";
+ Text[ arabic ] = ":";
+ Text[ turkish ] = "Tip:";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_FILE_SHOW_TYP
+ {
+ Pos = MAP_APPFONT ( 54 , 29 ) ;
+ Size = MAP_APPFONT ( 106 , 10 ) ;
+ };
+ CheckBox CB_FILE_READONLY
+ {
+ Pos = MAP_APPFONT ( 163 , 29 ) ;
+ Size = MAP_APPFONT ( 91 , 10 ) ;
+ Text = "~Schreibgeschtzt" ;
+ Text [ ENGLISH ] = "~Readonly" ;
+ Text [ english_us ] = "~Read-only" ;
+ Text [ portuguese_brazilian ] = "~Schreibgeschtzt" ;
+ Text [ swedish ] = "~Skrivskyddad" ;
+ Text [ danish ] = "Skrivebeskyttet" ;
+ Text [ italian ] = "~Sola lettura" ;
+ Text [ spanish ] = "~Solo lectura" ;
+ Text [ french ] = "~En lecture-seule" ;
+ Text [ dutch ] = "~Schrijfbeveiligd" ;
+ Text [ portuguese ] = "~S leitura" ;
+ Text[ chinese_simplified ] = "д(~R)";
+ Text[ russian ] = "~ ";
+ Text[ polish ] = "Tylko do odczytu";
+ Text[ japanese ] = "ǂݎp(~R)";
+ Text[ chinese_traditional ] = "Ū(~R)";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ȣ(~R)";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "S~alt okunur";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_FILE
+ {
+ Pos = MAP_APPFONT ( 6 , 41 ) ;
+ Size = MAP_APPFONT ( 45 , 10 ) ;
+ Text = "Ort:" ;
+ Text [ ENGLISH ] = "Location:" ;
+ Text [ english_us ] = "Location:" ;
+ Text [ italian ] = "Posizione file:" ;
+ Text [ spanish ] = "Ubicacin:" ;
+ Text [ french ] = "Emplacement :" ;
+ Text [ dutch ] = "Plaats:" ;
+ Text [ swedish ] = "Plats:" ;
+ Text [ danish ] = "Placering:" ;
+ Text [ portuguese_brazilian ] = "Ort:" ;
+ Text [ portuguese ] = "Local:" ;
+ Text[ chinese_simplified ] = "λã";
+ Text[ russian ] = ":";
+ Text[ polish ] = "Lokalizacja:";
+ Text[ japanese ] = "ꏊ:";
+ Text[ chinese_traditional ] = "mG";
+ Text[ greek ] = ":";
+ Text[ korean ] = "ġ:";
+ Text[ arabic ] = ":";
+ Text[ turkish ] = "Yer:";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_FILE_VAL
+ {
+ Pos = MAP_APPFONT ( 54 , 41 ) ;
+ Size = MAP_APPFONT ( 200 , 10 ) ;
+ };
+ FixedText FT_FILE_SIZE
+ {
+ Pos = MAP_APPFONT ( 6 , 53 ) ;
+ Size = MAP_APPFONT ( 45 , 10 ) ;
+ Text = "Gre:" ;
+ Text [ ENGLISH ] = "Size:" ;
+ Text [ english_us ] = "Size:" ;
+ Text [ italian ] = "Dimensione:" ;
+ Text [ spanish ] = "Tamao:" ;
+ Text [ french ] = "Taille :" ;
+ Text [ dutch ] = "Grootte:" ;
+ Text [ swedish ] = "Storlek:" ;
+ Text [ danish ] = "Strrelse:" ;
+ Text [ portuguese_brazilian ] = "Gre:" ;
+ Text [ portuguese ] = "Tamanho:" ;
+ Text[ chinese_simplified ] = "С";
+ Text[ russian ] = ":";
+ Text[ polish ] = "Rozmiar:";
+ Text[ japanese ] = ":";
+ Text[ chinese_traditional ] = "jpG";
+ Text[ greek ] = ":";
+ Text[ korean ] = "ũ:";
+ Text[ arabic ] = ":";
+ Text[ turkish ] = "Byklk:";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_FILE_SHOW_SIZE
+ {
+ Pos = MAP_APPFONT ( 54 , 53 ) ;
+ Size = MAP_APPFONT ( 200 , 10 ) ;
+ };
+ FixedLine FL_FILE_2
+ {
+ Pos = MAP_APPFONT ( 6 , 66 ) ;
+ Size = MAP_APPFONT ( 248 , 1 ) ;
+ };
+ FixedText FT_CREATE
+ {
+ Pos = MAP_APPFONT ( 6 , 70 ) ;
+ Size = MAP_APPFONT ( 45 , 10 ) ;
+ Text = "Erstellt am:" ;
+ Text [ ENGLISH ] = "Created:" ;
+ Text [ english_us ] = "Created:" ;
+ Text [ italian ] = "Creato il:" ;
+ Text [ spanish ] = "Creado el:" ;
+ Text [ french ] = "Cr le :" ;
+ Text [ dutch ] = "Gemaakt op:" ;
+ Text [ swedish ] = "Skapat:" ;
+ Text [ danish ] = "Oprettet den:" ;
+ Text [ portuguese_brazilian ] = "Erstellt am:" ;
+ Text [ portuguese ] = "Criado em:" ;
+ Text[ chinese_simplified ] = "ڣ";
+ Text[ russian ] = ":";
+ Text[ polish ] = "Utworzony:";
+ Text[ japanese ] = "쐬:";
+ Text[ chinese_traditional ] = "s@G";
+ Text[ greek ] = " :";
+ Text[ korean ] = "ۼ:";
+ Text[ arabic ] = " :";
+ Text[ turkish ] = "Oluturma tarihi:";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_CREATE_VAL
+ {
+ Pos = MAP_APPFONT ( 54 , 70 ) ;
+ Size = MAP_APPFONT ( 126 , 10 ) ;
+ };
+ FixedText FT_TIMELOG
+ {
+ Pos = MAP_APPFONT ( 183 , 70 ) ;
+ Size = MAP_APPFONT ( 38 , 10 ) ;
+ Text = "Bearbeitet:" ;
+ Text [ ENGLISH ] = "Edit time:" ;
+ Text [ norwegian ] = "Edit time:" ;
+ Text [ italian ] = "Modificato:" ;
+ Text [ portuguese_brazilian ] = "Edit time:" ;
+ Text [ portuguese ] = "Editado:" ;
+ Text [ french ] = "Dure d'ouverture :" ;
+ Text [ dutch ] = "Bewerkt:" ;
+ Text [ spanish ] = "Abierto desde :" ;
+ Text [ danish ] = "Redigeret:" ;
+ Text [ swedish ] = "Redigeringstid:" ;
+ Text [ finnish ] = "Edit time:" ;
+ Text [ english_us ] = "Accessed:" ;
+ Text[ chinese_simplified ] = "༭ʱ䣺";
+ Text[ russian ] = ":";
+ Text[ polish ] = "Edytowany:";
+ Text[ japanese ] = "ҏW:";
+ Text[ chinese_traditional ] = "sG";
+ Text[ greek ] = ":";
+ Text[ korean ] = ":";
+ Text[ arabic ] = ":";
+ Text[ turkish ] = "Dnzleme:";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_TIMELOG_VAL
+ {
+ Pos = MAP_APPFONT ( 224 , 70 ) ;
+ Size = MAP_APPFONT ( 30 , 10 ) ;
+ };
+ FixedText FT_CHANGE
+ {
+ Pos = MAP_APPFONT ( 6 , 82 ) ;
+ Size = MAP_APPFONT ( 45 , 10 ) ;
+ Text = "Gendert am:" ;
+ Text [ ENGLISH ] = "Changed:" ;
+ Text [ english_us ] = "Modified:" ;
+ Text [ italian ] = "Cambiato" ;
+ Text [ spanish ] = "Modificado el:" ;
+ Text [ french ] = "Modifi le :" ;
+ Text [ dutch ] = "Gewijzigd op:" ;
+ Text [ swedish ] = "ndrat:" ;
+ Text [ danish ] = "ndret den:" ;
+ Text [ portuguese_brazilian ] = "Gendert am:" ;
+ Text [ portuguese ] = "Alterado em:" ;
+ Text[ chinese_simplified ] = "ĵڣ";
+ Text[ russian ] = ":";
+ Text[ polish ] = "Zmodyfikowany:";
+ Text[ japanese ] = "ύX:";
+ Text[ chinese_traditional ] = "ܧ󪺤G";
+ Text[ greek ] = " :";
+ Text[ korean ] = ":";
+ Text[ arabic ] = " :";
+ Text[ turkish ] = "Deitirme tarihi:";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_CHANGE_VAL
+ {
+ Pos = MAP_APPFONT ( 54 , 82 ) ;
+ Size = MAP_APPFONT ( 126 , 10 ) ;
+ };
+ FixedText FT_DOCNO
+ {
+ Pos = MAP_APPFONT ( 183 , 82 ) ;
+ Size = MAP_APPFONT ( 38 , 10 ) ;
+ Text = "Version:" ;
+ Text [ ENGLISH ] = "Version:" ;
+ Text [ english_us ] = "Version:" ;
+ Text [ portuguese_brazilian ] = "Nmero do documento:" ;
+ Text [ swedish ] = "Version:" ;
+ Text [ danish ] = "Version:" ;
+ Text [ italian ] = "Versione:" ;
+ Text [ spanish ] = "Versin:" ;
+ Text [ french ] = "Version :" ;
+ Text [ dutch ] = "Versie:" ;
+ Text [ portuguese ] = "Verso:" ;
+ Text[ chinese_simplified ] = "汾";
+ Text[ russian ] = ":";
+ Text[ polish ] = "Wersja:";
+ Text[ japanese ] = "ްޮ:";
+ Text[ chinese_traditional ] = "G";
+ Text[ greek ] = ":";
+ Text[ korean ] = ":";
+ Text[ arabic ] = ":";
+ Text[ turkish ] = "Srm:";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_DOCNO_VAL
+ {
+ Pos = MAP_APPFONT ( 224 , 82 ) ;
+ Size = MAP_APPFONT ( 30 , 10 ) ;
+ };
+ FixedText FT_PRINT
+ {
+ Pos = MAP_APPFONT ( 6 , 94 ) ;
+ Size = MAP_APPFONT ( 45 , 10 ) ;
+ Text = "Gedruckt am:" ;
+ Text [ ENGLISH ] = "Last printed:" ;
+ Text [ english_us ] = "Printed:" ;
+ Text [ italian ] = "Stampato il:" ;
+ Text [ spanish ] = "Impreso el:" ;
+ Text [ french ] = "Imprim le :" ;
+ Text [ dutch ] = "Afgedrukt op:" ;
+ Text [ swedish ] = "Utskrivet den:" ;
+ Text [ danish ] = "Udskrevet den:" ;
+ Text [ portuguese_brazilian ] = "Gedruckt am:" ;
+ Text [ portuguese ] = "Impresso em:" ;
+ Text[ chinese_simplified ] = "ӡڣ";
+ Text[ russian ] = ":";
+ Text[ polish ] = "Wydrukowany:";
+ Text[ japanese ] = "ꂽ:";
+ Text[ chinese_traditional ] = "CLG";
+ Text[ greek ] = " :";
+ Text[ korean ] = "μ:";
+ Text[ arabic ] = " :";
+ Text[ turkish ] = "Yazdrma tarihi:";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_PRINT_VAL
+ {
+ Pos = MAP_APPFONT ( 54 , 94 ) ;
+ Size = MAP_APPFONT ( 126 , 10 ) ;
+ };
+ PushButton BTN_DELETE
+ {
+ Pos = MAP_APPFONT ( 204 , 102 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ Hide = TRUE;
+ Text = "~Lschen";
+ Text[English] = "~Delete";
+ Text[ english_us ] = "~Delete";
+ Text[ portuguese ] = "E~liminar";
+ Text[ russian ] = "~";
+ Text[ greek ] = "";
+ Text[ dutch ] = "~Wissen";
+ Text[ french ] = "~Supprimer";
+ Text[ spanish ] = "~Eliminar";
+ Text[ italian ] = "~Elimina";
+ Text[ danish ] = "Slet";
+ Text[ swedish ] = "~Radera";
+ Text[ polish ] = "~Usu";
+ Text[ portuguese_brazilian ] = "~Delete";
+ Text[ japanese ] = "폜(~D)";
+ Text[ korean ] = "(~D)";
+ Text[ chinese_simplified ] = "ɾ(~D)";
+ Text[ chinese_traditional ] = "R(~D)";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "~Sil";
+ };
+ CheckBox CB_USE_USERDATA
+ {
+ Pos = MAP_APPFONT ( 6 , 106 ) ;
+ Size = MAP_APPFONT ( 174 , 10 ) ;
+ Hide = TRUE;
+ Text = "~Benutzerdaten verwenden" ;
+ Text[English] = "~Using user data";
+ Text[french] = "~Utiliser les donnes d'identit";
+ Text [ italian ] = "Usa i dati utente" ;
+ Text [ dutch ] = "~Gebruikersgegevens toepassen" ;
+ Text [ spanish ] = "Utilice los ~datos del usuario" ;
+ Text [ swedish ] = "Anvnd ~anvndardata" ;
+ Text [ portuguese ] = "Usar dados do ~utilizador";
+ Text[ portuguese_brazilian ] = "~Benutzerdaten verwenden";
+ Text[ danish ] = "Anvend brugerdata";
+ Text[ english_us ] = "~Apply user data";
+ Text[ chinese_simplified ] = "ʹ(~A)";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Zast~osuj dane uytkownika";
+ Text[ japanese ] = "հް ްgp";
+ Text[ chinese_traditional ] = "ĥΨϥΪ̸(~A)";
+ Text[ greek ] = " ~ ";
+ Text[ korean ] = " ̿(~A)";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "~Kullanc verilerini kullan";
+ Text[ language_user1 ] = " ";
+ };
+ FixedLine FL_FILE_3
+ {
+ Pos = MAP_APPFONT ( 6 , 119 ) ;
+ Size = MAP_APPFONT ( 248 , 1 ) ;
+ };
+ FixedText FT_TEMPL
+ {
+ Pos = MAP_APPFONT ( 6 , 123 ) ;
+ Size = MAP_APPFONT ( 45 , 10 ) ;
+ Text = "Vorlage:" ;
+ Text [ ENGLISH ] = "Template:" ;
+ Text [ norwegian ] = "Mal:" ;
+ Text [ italian ] = "Modello:" ;
+ Text [ portuguese_brazilian ] = "Modelo:" ;
+ Text [ portuguese ] = "Modelo:" ;
+ Text [ finnish ] = "Mallipohja:" ;
+ Text [ danish ] = "Skabelon:" ;
+ Text [ french ] = "Modle :" ;
+ Text [ swedish ] = "Mall:" ;
+ Text [ dutch ] = "Sjabloon:" ;
+ Text [ spanish ] = "Plantilla:" ;
+ Text [ english_us ] = "Template:" ;
+ Text[ chinese_simplified ] = "ʽ";
+ Text[ russian ] = ":";
+ Text[ polish ] = "Szablon:";
+ Text[ japanese ] = "ڰ:";
+ Text[ chinese_traditional ] = "˦G";
+ Text[ language_user1 ] = " ";
+ Text[ greek ] = ":";
+ Text[ korean ] = ":";
+ Text[ arabic ] = ":";
+ Text[ turkish ] = "ablon:";
+ };
+ FixedText FT_TEMPL_VAL
+ {
+ Pos = MAP_APPFONT ( 54 , 123 ) ;
+ Size = MAP_APPFONT ( 200 , 10 ) ;
+ };
+ String STR_UNKNOWNSIZE
+ {
+ Text = "unbekannt" ;
+ Text [ English ] = "unknown" ;
+ Text [ english_us ] = "unknown" ;
+ Text [ portuguese_brazilian ] = "unbekannt" ;
+ Text [ swedish ] = "oknd" ;
+ Text [ danish ] = "ukendt" ;
+ Text [ italian ] = "sconosciuto" ;
+ Text [ spanish ] = "desconocido" ;
+ Text [ french ] = "inconnu" ;
+ Text [ dutch ] = "onbekend" ;
+ Text [ portuguese ] = "desconhecido" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "nieznany";
+ Text[ japanese ] = "s";
+ Text[ chinese_traditional ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "˷ ";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "bilinmiyor";
+ Text[ language_user1 ] = " ";
+ };
+};
+
+ // TP_DOCINFOUSER --------------------------------------------------------
+
+TabPage TP_DOCINFOUSER
+{
+ HelpId = HID_DOCINFOUSER ;
+ Hide = TRUE ;
+ Size = MAP_APPFONT ( 260 , 135 ) ;
+ FixedText FT_INFO1
+ {
+ Pos = MAP_APPFONT ( 6 , 7 ) ;
+ Size = MAP_APPFONT ( 63 , 10 ) ;
+ Text = "Info ~0" ;
+ Left = TRUE ;
+ };
+ Edit ED_INFO1
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 72 , 6 ) ;
+ Size = MAP_APPFONT ( 182 , 12 ) ;
+ Left = TRUE ;
+ MaxTextLength = 19 ;
+ };
+ FixedText FT_INFO2
+ {
+ Pos = MAP_APPFONT ( 6 , 22 ) ;
+ Size = MAP_APPFONT ( 63 , 10 ) ;
+ Text = "Info ~1" ;
+ Left = TRUE ;
+ };
+ Edit ED_INFO2
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 72 , 21 ) ;
+ Size = MAP_APPFONT ( 182 , 12 ) ;
+ Left = TRUE ;
+ MaxTextLength = 19 ;
+ };
+ FixedText FT_INFO3
+ {
+ Pos = MAP_APPFONT ( 6 , 37 ) ;
+ Size = MAP_APPFONT ( 63 , 10 ) ;
+ Text = "Info ~2" ;
+ Left = TRUE ;
+ };
+ Edit ED_INFO3
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 72 , 36 ) ;
+ Size = MAP_APPFONT ( 182 , 12 ) ;
+ Left = TRUE ;
+ MaxTextLength = 19 ;
+ };
+ FixedText FT_INFO4
+ {
+ Pos = MAP_APPFONT ( 6 , 52 ) ;
+ Size = MAP_APPFONT ( 63 , 10 ) ;
+ Text = "Info ~3" ;
+ Left = TRUE ;
+ };
+ Edit ED_INFO4
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 72 , 51 ) ;
+ Size = MAP_APPFONT ( 182 , 12 ) ;
+ Left = TRUE ;
+ MaxTextLength = 19 ;
+ };
+ PushButton BTN_EDITLABEL
+ {
+ Pos = MAP_APPFONT ( 194 , 115 ) ;
+ Size = MAP_APPFONT ( 60 , 14 ) ;
+ Text = "~Infofelder..." ;
+ Text [ English ] = "~Info fields..." ;
+ Text [ norwegian ] = "Informajonsfelter..." ;
+ Text [ italian ] = "Campi info..." ;
+ Text [ portuguese_brazilian ] = "Camos de Info..." ;
+ Text [ portuguese ] = "~Campos de informao" ;
+ Text [ finnish ] = "Tietokentt..." ;
+ Text [ danish ] = "Infofelter..." ;
+ Text [ french ] = "~Champs d'information..." ;
+ Text [ swedish ] = "~Infoflt..." ;
+ Text [ dutch ] = "~Infovelden..." ;
+ Text [ spanish ] = "Ca~mpo informacin..." ;
+ Text [ english_us ] = "~Info fields..." ;
+ TabStop = TRUE ;
+ Text[ chinese_simplified ] = "Ϣֶ(~I)...";
+ Text[ russian ] = " ...";
+ Text[ polish ] = "Pola infor~macyjne...";
+ Text[ japanese ] = "̨(~I)...";
+ Text[ chinese_traditional ] = "T(~I)...";
+ Text[ greek ] = " ...";
+ Text[ korean ] = " ʵ(~I)...";
+ Text[ arabic ] = " ...";
+ Text[ turkish ] = "~Bilgi alanlar...";
+ Text[ language_user1 ] = " ";
+ };
+};
+
+ // TP_DOCINFOUSER --------------------------------------------------------
+
+TabPage TP_DOCINFORELOAD
+{
+ HelpId = HID_DOCINFORELOAD ;
+ Hide = TRUE ;
+ Size = MAP_APPFONT ( 260 , 135 ) ;
+ CheckBox CB_AUTORELOAD
+ {
+ Pos = MAP_APPFONT ( 72 , 7 ) ;
+ Size = MAP_APPFONT ( 80 , 10 ) ;
+ Text = "~Autoreload alle" ;
+ Text [ English ] = "~Autoreload every" ;
+ Text [ english_us ] = "~Auto reload every" ;
+ Text [ italian ] = "~Autoricarica" ;
+ Text [ spanish ] = "~Autorecargar cada" ;
+ Text [ french ] = "~Page suivante au bout de" ;
+ Text [ dutch ] = "~Autoreload alle" ;
+ Text [ swedish ] = "~Ladda automatiskt efter" ;
+ Text [ danish ] = "Autogenindls efter" ;
+ Text [ portuguese_brazilian ] = "~Autoreload alle" ;
+ Text [ portuguese ] = "~Autocarregar cada" ;
+ Text[ chinese_simplified ] = "ȫԶװ(~A)";
+ Text[ russian ] = "~ ";
+ Text[ polish ] = "Przea~duj automatycznie co";
+ Text[ japanese ] = "IɍXV(~A)";
+ Text[ chinese_traditional ] = "s۰ʸ˸(~A)";
+ Text[ greek ] = "~ ";
+ Text[ korean ] = " ڵ ٽ ε(~A)";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "~Otm. yeniden ykleme";
+ Text[ language_user1 ] = " ";
+ };
+ NumericField ED_SECONDS
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 155 , 6 ) ;
+ Size = MAP_APPFONT ( 30 , 12 ) ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = 1 ;
+/* Maximum = 300 ; */
+ First = 1 ;
+ Last = 60 ;
+ SpinSize = 1 ;
+ };
+ FixedText FT_SECONDS
+ {
+ Pos = MAP_APPFONT ( 188 , 7 ) ;
+ Size = MAP_APPFONT ( 66 , 10 ) ;
+ Text = "~Sekunden" ;
+ Text [ English ] = "~Seconds" ;
+ Text [ english_us ] = "~seconds" ;
+ Text [ italian ] = "~Secondi" ;
+ Text [ spanish ] = "~Segundos" ;
+ Text [ french ] = "~secondes" ;
+ Text [ dutch ] = "~seconden" ;
+ Text [ swedish ] = "~sekund(er)" ;
+ Text [ danish ] = "Sekunder" ;
+ Text [ portuguese_brazilian ] = "~Sekunden" ;
+ Text [ portuguese ] = "~segundos" ;
+ Text[ chinese_simplified ] = "(~S)";
+ Text[ russian ] = "()";
+ Text[ polish ] = "Sekundy";
+ Text[ japanese ] = "b(~S)";
+ Text[ chinese_traditional ] = "(~S)";
+ Text[ greek ] = "";
+ Text[ korean ] = "(~S)";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "~saniyede bir";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_URL
+ {
+ Pos = MAP_APPFONT ( 6 , 22 ) ;
+ Size = MAP_APPFONT ( 63 , 10 ) ;
+ Text = "~URL" ;
+ Text [ English ] = "~URL" ;
+ Text [ english_us ] = "~URL" ;
+ Text [ italian ] = "~URL" ;
+ Text [ spanish ] = "~URL" ;
+ Text [ french ] = "~URL" ;
+ Text [ dutch ] = "~URL" ;
+ Text [ swedish ] = "~URL" ;
+ Text [ danish ] = "URL" ;
+ Text [ portuguese_brazilian ] = "~URL" ;
+ Text [ portuguese ] = "~URL" ;
+ Text[ chinese_simplified ] = "~URL";
+ Text[ russian ] = "~URL";
+ Text[ polish ] = "URL";
+ Text[ japanese ] = "URL(~U)";
+ Text[ chinese_traditional ] = "~URL";
+ Text[ greek ] = "~URL";
+ Text[ korean ] = "URL(~U)";
+ Text[ arabic ] = "URL~";
+ Text[ turkish ] = "~URL";
+ Text[ language_user1 ] = " ";
+ };
+ Edit ED_URL
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 72 , 21 ) ;
+ Size = MAP_APPFONT ( 182 , 12 ) ;
+ };
+ FixedText FT_DEFAULT
+ {
+ Pos = MAP_APPFONT ( 6 , 37 ) ;
+ Size = MAP_APPFONT ( 63 , 10 ) ;
+ Text = "~Frame" ;
+ Text [ English ] = "~Frame" ;
+ Text [ english_us ] = "Frame" ;
+ Text [ italian ] = "~Frame" ;
+ Text [ spanish ] = "Frame" ;
+ Text [ french ] = "~Frame" ;
+ Text [ dutch ] = "~Frame" ;
+ Text [ swedish ] = "~Ram" ;
+ Text [ danish ] = "Frame" ;
+ Text [ portuguese_brazilian ] = "~Frame" ;
+ Text [ portuguese ] = "~Frame" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "~";
+ Text[ polish ] = "Ramka";
+ Text[ japanese ] = "ڰ";
+ Text[ chinese_traditional ] = "T";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ arabic ] = "~Frame";
+ Text[ turkish ] = "~Frame";
+ Text[ language_user1 ] = " ";
+ };
+ ComboBox LB_DEFAULT
+ {
+ Pos = MAP_APPFONT ( 72 , 36 ) ;
+ Size = MAP_APPFONT ( 182 , 60 ) ;
+ DropDown = TRUE ;
+ };
+};
+
+ // SID_DOCINFO -----------------------------------------------------------
+
+TabDialog SID_DOCINFO
+{
+ OutputSize = TRUE ;
+ SVLook = TRUE ;
+ Moveable = TRUE ;
+ Text = "Eigenschaften von " ;
+ Text [ English ] = "Properties of " ;
+ Text [ english_us ] = "Properties of " ;
+ Text [ italian ] = "Propriet di " ;
+ Text [ spanish ] = "Propiedades de " ;
+ Text [ french ] = "Proprits de " ;
+ Text [ dutch ] = "Eigenschappen van " ;
+ Text [ swedish ] = "Egenskaper fr " ;
+ Text [ danish ] = "Egenskaber af " ;
+ Text [ portuguese_brazilian ] = "Eigenschaften von " ;
+ Text [ portuguese ] = "Propriedades de " ;
+ Text[ chinese_simplified ] = "ԣ ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Waciwoci ";
+ Text[ japanese ] = "è ";
+ Text[ chinese_traditional ] = "ݩʡG ";
+ TabControl 1
+ {
+ SVLook = TRUE ;
+ PageList =
+ {
+ PageItem
+ {
+ Identifier = TP_DOCINFODOC ;
+ Text = "Allgemein" ;
+ Text [ English ] = "Common" ;
+ Text [ english_us ] = "General" ;
+ Text [ italian ] = "Generale" ;
+ Text [ spanish ] = "General" ;
+ Text [ french ] = "Gnral" ;
+ Text [ dutch ] = "Algemeen" ;
+ Text [ swedish ] = "Allmnt" ;
+ Text [ danish ] = "Generelt" ;
+ Text [ portuguese_brazilian ] = "Allgemein" ;
+ Text [ portuguese ] = "Geral" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "Oglne";
+ Text[ japanese ] = "S";
+ Text[ chinese_traditional ] = "@";
+ Text[ greek ] = "";
+ Text[ korean ] = "Ϲ";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "Genel";
+ Text[ language_user1 ] = " ";
+ };
+ PageItem
+ {
+ Identifier = TP_DOCINFODESC ;
+ Text = "Beschreibung" ;
+ Text [ English ] = "Description" ;
+ Text [ english_us ] = "Description" ;
+ Text [ italian ] = "Descrizione" ;
+ Text [ spanish ] = "Descripcin" ;
+ Text [ french ] = "Description" ;
+ Text [ dutch ] = "Beschrijving" ;
+ Text [ swedish ] = "Beskrivning" ;
+ Text [ danish ] = "Beskrivelse" ;
+ Text [ portuguese_brazilian ] = "Beschreibung" ;
+ Text [ portuguese ] = "Descrio" ;
+ Text[ chinese_simplified ] = "˵";
+ Text[ russian ] = "";
+ Text[ polish ] = "Opis";
+ Text[ japanese ] = "Tv";
+ Text[ chinese_traditional ] = "yz";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "Tanm";
+ Text[ language_user1 ] = " ";
+ };
+ PageItem
+ {
+ Identifier = TP_DOCINFOUSER ;
+ Text = "Benutzer" ;
+ Text [ English ] = "User" ;
+ Text [ norwegian ] = "User" ;
+ Text [ italian ] = "Utente" ;
+ Text [ portuguese_brazilian ] = "Usurio" ;
+ Text [ portuguese ] = "Utilizador" ;
+ Text [ finnish ] = "Kyttj" ;
+ Text [ danish ] = "Bruger" ;
+ Text [ french ] = "Utilisateur" ;
+ Text [ swedish ] = "Anvndare" ;
+ Text [ dutch ] = "Gebruiker" ;
+ Text [ spanish ] = "Usuario" ;
+ Text [ english_us ] = "User Defined" ;
+ Text[ chinese_simplified ] = "ʹ";
+ Text[ russian ] = "";
+ Text[ polish ] = "Uytkownik";
+ Text[ japanese ] = "հް";
+ Text[ chinese_traditional ] = "ϥΪ";
+ Text[ greek ] = "";
+ Text[ korean ] = " ";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "Kullanc";
+ Text[ language_user1 ] = " ";
+ };
+ PageItem
+ {
+ Identifier = TP_DOCINFORELOAD ;
+ Text = "Internet" ;
+ Text [ English ] = "Internet" ;
+ Text [ dutch ] = "Internet" ;
+ Text [ english_us ] = "Internet" ;
+ Text [ italian ] = "Internet" ;
+ Text [ spanish ] = "Internet" ;
+ Text [ french ] = "Internet" ;
+ Text [ swedish ] = "Internet" ;
+ Text [ danish ] = "Internet" ;
+ Text [ portuguese_brazilian ] = "Internet" ;
+ Text [ portuguese ] = "Internet" ;
+ Text[ chinese_simplified ] = "ʻ";
+ Text[ russian ] = "";
+ Text[ polish ] = "Internet";
+ Text[ japanese ] = "ȯ";
+ Text[ chinese_traditional ] = "Internet";
+ Text[ greek ] = "Internet";
+ Text[ korean ] = "ͳ";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "Internet";
+ Text[ language_user1 ] = " ";
+ };
+ };
+ };
+ Text[ greek ] = " ";
+ Text[ korean ] = " ";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "zellikler ";
+ Text[ language_user1 ] = " ";
+};
+
+ // ********************************************************************** EOF
diff --git a/sfx2/source/dialog/dinfedt.cxx b/sfx2/source/dialog/dinfedt.cxx
new file mode 100644
index 000000000000..9e7643864fb6
--- /dev/null
+++ b/sfx2/source/dialog/dinfedt.cxx
@@ -0,0 +1,99 @@
+/*************************************************************************
+ *
+ * $RCSfile: dinfedt.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:30 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#pragma hdrstop
+
+#include "dinfedt.hxx"
+#include "sfxresid.hxx"
+
+#include "sfx.hrc"
+#include "dinfedt.hrc"
+
+// class InfoEdit_Impl ---------------------------------------------------
+
+void InfoEdit_Impl::KeyInput( const KeyEvent& rKEvent )
+{
+ if ( rKEvent.GetCharCode() != '~' )
+ Edit::KeyInput( rKEvent );
+}
+
+/*--------------------------------------------------------------------
+ Beschreibung: Init-Liste
+ --------------------------------------------------------------------*/
+
+SfxDocInfoEditDlg::SfxDocInfoEditDlg( Window* pParent ) :
+
+ ModalDialog( pParent, SfxResId( DLG_DOCINFO_EDT ) ),
+
+ aInfo1ED ( this, ResId( ED_INFO1 ) ),
+ aInfo2ED ( this, ResId( ED_INFO2 ) ),
+ aInfo3ED ( this, ResId( ED_INFO3 ) ),
+ aInfo4ED ( this, ResId( ED_INFO4 ) ),
+ aOkBT ( this, ResId( BT_OK ) ),
+ aCancelBT ( this, ResId( BT_CANCEL ) ),
+ aHelpBtn ( this, ResId( BTN_HELP ) ),
+ aInfoGB ( this, ResId( GB_INFO ) )
+
+{
+ FreeResource();
+}
+
+
diff --git a/sfx2/source/dialog/dinfedt.hrc b/sfx2/source/dialog/dinfedt.hrc
new file mode 100644
index 000000000000..0b1aee0d0065
--- /dev/null
+++ b/sfx2/source/dialog/dinfedt.hrc
@@ -0,0 +1,72 @@
+/*************************************************************************
+ *
+ * $RCSfile: dinfedt.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:30 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define BT_OK 1
+#define BT_CANCEL 2
+#define BTN_HELP 3
+#define FT_INFO1 4
+#define ED_INFO1 5
+#define FT_INFO2 6
+#define ED_INFO2 7
+#define FT_INFO3 8
+#define ED_INFO3 9
+#define FT_INFO4 10
+#define ED_INFO4 11
+#define GB_INFO 12
diff --git a/sfx2/source/dialog/dinfedt.src b/sfx2/source/dialog/dinfedt.src
new file mode 100644
index 000000000000..87ad39e69a50
--- /dev/null
+++ b/sfx2/source/dialog/dinfedt.src
@@ -0,0 +1,174 @@
+/*************************************************************************
+ *
+ * $RCSfile: dinfedt.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:30 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+ // include ---------------------------------------------------------------
+#include "sfx.hrc"
+#include "helpid.hrc"
+#include "dinfedt.hrc"
+ // pragma ----------------------------------------------------------------
+
+ // DLG_DOCINFO_EDT -------------------------------------------------------
+ModalDialog DLG_DOCINFO_EDT
+{
+ HelpId = HID_DOCINFO_EDT ;
+ OutputSize = TRUE ;
+ SVLook = TRUE ;
+ Size = MAP_APPFONT ( 166 , 83 ) ;
+ Text = "Infonamen bearbeiten" ;
+ Text [ ENGLISH ] = "Edit info names" ;
+ Text [ norwegian ] = "Rediger informasjonnavn" ;
+ Text [ italian ] = "Modifica informazioni nomi" ;
+ Text [ portuguese_brazilian ] = "Editar nomes de info" ;
+ Text [ portuguese ] = "Editar nomes das informaes" ;
+ Text [ finnish ] = "Muokkaa tietonimi" ;
+ Text [ danish ] = "Rediger infonavne" ;
+ Text [ french ] = "dition des noms de champs" ;
+ Text [ swedish ] = "Redigera informationsnamn" ;
+ Text [ dutch ] = "Labels bewerken" ;
+ Text [ spanish ] = "Editar nombres informaciones" ;
+ Text [ english_us ] = "Edit Labels" ;
+ Moveable = TRUE ;
+ Edit ED_INFO1
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 12 , 14 ) ;
+ Size = MAP_APPFONT ( 86 , 12 ) ;
+ MaxTextLength = 19 ;
+ };
+ Edit ED_INFO2
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 12 , 29 ) ;
+ Size = MAP_APPFONT ( 86 , 12 ) ;
+ MaxTextLength = 19 ;
+ };
+ Edit ED_INFO3
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 12 , 44 ) ;
+ Size = MAP_APPFONT ( 86 , 12 ) ;
+ MaxTextLength = 19 ;
+ };
+ Edit ED_INFO4
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 12 , 59 ) ;
+ Size = MAP_APPFONT ( 86 , 12 ) ;
+ MaxTextLength = 19 ;
+ };
+ GroupBox GB_INFO
+ {
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 98 , 74 ) ;
+ Text = "Namen" ;
+ Text [ English ] = "Names" ;
+ Text [ norwegian ] = "Names" ;
+ Text [ italian ] = "Nomi" ;
+ Text [ portuguese_brazilian ] = "Nomes" ;
+ Text [ portuguese ] = "Nomes" ;
+ Text [ finnish ] = "~Nimet" ;
+ Text [ danish ] = "Navne" ;
+ Text [ french ] = "Noms" ;
+ Text [ swedish ] = "Namn" ;
+ Text [ dutch ] = "Namen" ;
+ Text [ spanish ] = "Nombres" ;
+ Text [ english_us ] = "Names" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "Nazwy";
+ Text[ japanese ] = "O";
+ Text[ chinese_traditional ] = "W";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "̸";
+ Text[ turkish ] = "Ad";
+ Text[ language_user1 ] = " ";
+ };
+ OKButton BT_OK
+ {
+ Pos = MAP_APPFONT ( 110 , 6 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TabStop = TRUE ;
+ DefButton = TRUE ;
+ };
+ CancelButton BT_CANCEL
+ {
+ Pos = MAP_APPFONT ( 110 , 23 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TabStop = TRUE ;
+ };
+ HelpButton BTN_HELP
+ {
+ Pos = MAP_APPFONT ( 110 , 43 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TabStop = TRUE ;
+ };
+ Text[ chinese_simplified ] = "༭";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Edytuj nazwy informacji";
+ Text[ japanese ] = "񖼂ҏW";
+ Text[ chinese_traditional ] = "sD";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = "̸ ";
+ Text[ turkish ] = "Etiketleri dzenle";
+ Text[ language_user1 ] = " ";
+};
+ // ********************************************************************** EOF
diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx
new file mode 100644
index 000000000000..585d1eb71c26
--- /dev/null
+++ b/sfx2/source/dialog/dockwin.cxx
@@ -0,0 +1,1542 @@
+/*************************************************************************
+ *
+ * $RCSfile: dockwin.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:30 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _SFXENUMITEM_HXX //autogen
+#include <svtools/eitem.hxx>
+#endif
+#ifndef _SFXINIMGR_HXX //autogen
+#include <svtools/iniman.hxx>
+#endif
+#ifdef VCL
+#ifndef _SV_DECOVIEW_HXX
+#include <vcl/decoview.hxx>
+#endif
+#endif
+#pragma hdrstop
+
+#include "dockwin.hxx"
+#include "bindings.hxx"
+#include "viewfrm.hxx"
+#include "dispatch.hxx"
+#include "workwin.hxx"
+#include "splitwin.hxx"
+#include "viewsh.hxx"
+#include "accmgr.hxx"
+
+#define MAX_TOGGLEAREA_WIDTH 100 // max. 100 Pixel
+#define MAX_TOGGLEAREA_HEIGHT 100 // max. 100 Pixel
+
+class SfxDockingWindow_Impl
+{
+friend class SfxDockingWindow;
+
+ SfxChildAlignment eLastAlignment;
+ SfxChildAlignment eDockAlignment;
+ BOOL bConstructed;
+ Size aMinSize;
+ SfxSplitWindow* pSplitWin;
+ BOOL bSplitable;
+// BOOL bAutoHide;
+
+ // Folgende members sind nur in der Zeit von StartDocking bis EndDocking
+ // g"ultig:
+ BOOL bEndDocked;
+ Size aSplitSize;
+ USHORT nLine;
+ USHORT nPos;
+ USHORT nDockLine;
+ USHORT nDockPos;
+ BOOL bNewLine;
+
+ SfxChildAlignment GetLastAlignment() const
+ { return eLastAlignment; }
+ void SetLastAlignment(SfxChildAlignment eAlign)
+ { eLastAlignment = eAlign; }
+ SfxChildAlignment GetDockAlignment() const
+ { return eDockAlignment; }
+ void SetDockAlignment(SfxChildAlignment eAlign)
+ { eDockAlignment = eAlign; }
+};
+
+//-------------------------------------------------------------------------
+
+void SfxDockingWindow::Resize()
+
+/* [Beschreibung]
+
+ Diese virtuelle Methode der Klasse DockingWindow merkt sich ggf. eine
+ ver"anderte FloatingSize.
+ Wird diese Methode von einer abgeleiteten Klasse "uberschrieben, mu\s
+ auch SfxDockingWindow::Resize() gerufen werden.
+*/
+{
+ DockingWindow::Resize();
+
+ SfxSplitWindow *pSplit = pImp->pSplitWin;
+ if ( pSplit )
+ {
+ // Die ItemSize des DockingWindows ist immer prozentual, kann sich
+ // also nur "andern, wenn gesplittet wird (->SfxSplitWindow::Split())
+/*
+ long nWinSize = pSplit->GetItemSize( GetType() );
+ if ( pSplit->IsHorizontal() )
+ pImp->aSplitSize.Width() = nWinSize;
+ else
+ pImp->aSplitSize.Height() = nWinSize;
+*/
+/*
+ // Die ItemSize des ItemSets ist immer absolut in Pixeln
+ if ( pSplit->IsHorizontal() )
+ pImp->aSplitSize.Height() = GetOutputSizePixel().Height();
+ else
+ pImp->aSplitSize.Width() = GetOutputSizePixel().Width();
+*/
+ }
+ else
+ {
+ Invalidate();
+ if ( IsFloatingMode() && !GetFloatingWindow()->IsRollUp() )
+ SetFloatingSize(GetOutputSizePixel());
+ }
+}
+
+//-------------------------------------------------------------------------
+
+BOOL SfxDockingWindow::PrepareToggleFloatingMode()
+
+/* [Beschreibung]
+
+ Diese virtuelle Methode der Klasse DockingWindow erm"oglicht ein Eingreifen
+ in das Umschalten des floating mode.
+ Wird diese Methode von einer abgeleiteten Klasse "uberschrieben, mu\s
+ danach SfxDockingWindow::PrepareToggleFloatingMode() gerufen werden,
+ wenn nicht FALSE zur"uckgegeben wird.
+*/
+
+{
+ if (!pImp->bConstructed)
+ return TRUE;
+
+ if ( Application::IsInModalMode() && IsFloatingMode() || !pMgr )
+ return FALSE;
+
+ if (!IsFloatingMode())
+ {
+ // Testen, ob FloatingMode erlaubt ist
+ if (CheckAlignment(GetAlignment(),SFX_ALIGN_NOALIGNMENT) !=
+ SFX_ALIGN_NOALIGNMENT)
+ return FALSE;
+
+ if ( pImp->pSplitWin )
+ {
+ // Das DockingWindow sitzt in einem SplitWindow und wird abgerissen
+ pImp->pSplitWin->RemoveWindow(this, FALSE);
+ pImp->pSplitWin = 0;
+ }
+ }
+ else if ( pMgr )
+ {
+ // Testen, ob es erlaubt ist, anzudocken
+ if (CheckAlignment(GetAlignment(),pImp->GetLastAlignment()) ==
+ SFX_ALIGN_NOALIGNMENT)
+ return FALSE;
+
+ // Testen, ob das Workwindow gerade ein Andocken erlaubt
+ SfxWorkWindow *pWorkWin = pBindings->GetWorkWindow_Impl();
+ if ( !pWorkWin->IsDockingAllowed() )
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+//-------------------------------------------------------------------------
+
+void SfxDockingWindow::ToggleFloatingMode()
+
+/* [Beschreibung]
+
+ Diese virtuelle Methode der Klasse DockingWindow setzt die internen
+ Daten des SfxDockingWindow und sorgt f"ur korrektes Alignment am
+ parent window.
+ Durch PrepareToggleFloatMode und Initialize ist sichergestellt, da\s
+ pImp->GetLastAlignment() immer eine erlaubtes Alignment liefert.
+ Wird diese Methode von einer abgeleiteten Klasse "uberschrieben, mu\s
+ zuerst SfxDockingWindow::ToggleFloatingMode() gerufen werden.
+*/
+{
+ if ( !pImp->bConstructed || !pMgr )
+ return; // Kein Handler-Aufruf
+
+ // Altes Alignment merken und dann umschalten.
+ // Sv hat jetzt schon umgeschaltet, aber Alignment am SfxDockingWindow
+ // ist noch das alte!
+ // Was war ich bisher ?
+ SfxChildAlignment eLastAlign = GetAlignment();
+
+ SfxWorkWindow *pWorkWin = pBindings->GetWorkWindow_Impl();
+ SfxChildIdentifier eIdent = SFX_CHILDWIN_DOCKINGWINDOW;
+ if ( pImp->bSplitable )
+ eIdent = SFX_CHILDWIN_SPLITWINDOW;
+
+ if (IsFloatingMode())
+ {
+ SetAlignment(SFX_ALIGN_NOALIGNMENT);
+ SetOutputSizePixel( GetFloatingSize() );
+ if ( pImp->bSplitable && !pImp->bEndDocked )
+ // Wenn das Fenster vorher in einem SplitWindow lag, kommt von
+ // Sv kein Show
+ Show();
+ }
+ else
+ {
+ if (pImp->GetDockAlignment() == eLastAlign)
+ {
+ // Wenn ToggleFloatingMode aufgerufen wurde, das DockAlignment
+ // aber noch unver"andert ist, mu\s das ein Toggeln durch DClick
+ // gewesen sein, also LastAlignment verwenden
+ SetAlignment (pImp->GetLastAlignment());
+ if ( pImp->bSplitable )
+ {
+// if ( GetFloatingSize().Height() < pImp->aSplitSize.Height() )
+// pImp->aSplitSize.Height() = GetFloatingSize().Height();
+// if ( GetFloatingSize().Width() < pImp->aSplitSize.Width() )
+// pImp->aSplitSize.Width() = GetFloatingSize().Width();
+ }
+ else
+ SetSizePixel( CalcDockingSize(GetAlignment()) );
+ }
+ else
+ {
+ // Toggeln wurde durch Draggen ausgel"ost
+ pImp->nLine = pImp->nDockLine;
+ pImp->nPos = pImp->nDockPos;
+ SetAlignment (pImp->GetDockAlignment());
+ }
+
+ if ( pImp->bSplitable )
+ {
+ // Das DockingWindow kommt jetzt in ein SplitWindow
+ pImp->pSplitWin = pWorkWin->GetSplitWindow_Impl(GetAlignment());
+
+ // Das LastAlignment ist jetzt immer noch das zuletzt angedockte
+ SfxSplitWindow *pSplit =
+ pWorkWin->GetSplitWindow_Impl(pImp->GetLastAlignment());
+ DBG_ASSERT(pSplit, "LastAlignment kann nicht stimmen!");
+ if ( pSplit && pSplit != pImp->pSplitWin )
+ pSplit->ReleaseWindow_Impl(this);
+ if ( pImp->GetDockAlignment() == eLastAlign )
+ pImp->pSplitWin->InsertWindow(this, pImp->aSplitSize);
+ else
+ pImp->pSplitWin->InsertWindow(this, pImp->aSplitSize,
+ pImp->nLine,pImp->nPos,pImp->bNewLine);
+ if ( !pImp->pSplitWin->IsFadeIn() )
+ pImp->pSplitWin->FadeIn();
+ }
+ }
+
+ // altes Alignment festhalten f"ur n"achstes Togglen; erst jetzt setzen
+ // wg. Abmelden beim SplitWindow!
+ pImp->SetLastAlignment(eLastAlign);
+
+ // DockAlignment zur"ucksetzen, falls noch EndDocking gerufen wird
+ pImp->SetDockAlignment(GetAlignment());
+
+ // SfxChildWindow korrekt andocken bzw. entdocken
+ if ( pMgr )
+ pWorkWin->ConfigChild_Impl( eIdent, SFX_TOGGLEFLOATMODE, pMgr->GetType() );
+}
+
+//-------------------------------------------------------------------------
+
+void SfxDockingWindow::StartDocking()
+
+/* [Beschreibung]
+
+ Diese virtuelle Methode der Klasse DockingWindow holt vom parent window
+ das innere und "au\sere docking rectangle.
+ Wird diese Methode von einer abgeleiteten Klasse "uberschrieben, mu\s
+ am Ende SfxDockingWindow::StartDocking() gerufen werden.
+*/
+{
+ if ( !pImp->bConstructed || !pMgr )
+ return;
+ SfxChildIdentifier eIdent = SFX_CHILDWIN_DOCKINGWINDOW;
+ if ( pImp->bSplitable )
+ eIdent = SFX_CHILDWIN_SPLITWINDOW;
+ SfxWorkWindow *pWorkWin = pBindings->GetWorkWindow_Impl();
+ pWorkWin->ConfigChild_Impl( eIdent, SFX_SETDOCKINGRECTS, pMgr->GetType() );
+ pImp->SetDockAlignment(GetAlignment());
+
+ if ( pImp->pSplitWin )
+ {
+ // Die aktuellen Docking-Daten besorgen
+ pImp->pSplitWin->GetWindowPos(this, pImp->nLine, pImp->nPos);
+ pImp->nDockLine = pImp->nLine;
+ pImp->nDockPos = pImp->nPos;
+ pImp->bNewLine = FALSE;
+ }
+}
+
+//-------------------------------------------------------------------------
+
+BOOL SfxDockingWindow::Docking( const Point& rPos, Rectangle& rRect )
+
+/* [Beschreibung]
+
+ Diese virtuelle Methode der Klasse DockingWindow berechnet das aktuelle
+ tracking rectangle. Dazu benutzt sie die Methode CalcAlignment(rPos,rRect),
+ deren Verhalten von abgeleiteten Klassen beeinflu\st werden kann (s.u.).
+ Diese Methode sollte nach M"oglichkeit nicht "uberschrieben werden.
+*/
+{
+ if ( Application::IsInModalMode() )
+ return TRUE;
+
+ if ( !pImp->bConstructed || !pMgr )
+ {
+ rRect.SetSize( Size() );
+ return IsFloatingMode();
+ }
+
+ BOOL bFloatMode = FALSE;
+ if ( GetOuterRect().IsInside( rPos ) && !IsDockingPrevented() )
+ {
+ // Maus innerhalb OuterRect : Alignment und Rectangle berechnen
+ SfxChildAlignment eAlign = CalcAlignment(rPos, rRect);
+ if (eAlign == SFX_ALIGN_NOALIGNMENT)
+ bFloatMode = TRUE;
+ pImp->SetDockAlignment(eAlign);
+ }
+ else
+ {
+ // Maus nicht innerhalb OuterRect : muss FloatingWindow sein
+ // Ist das erlaubt ?
+ if (CheckAlignment(pImp->GetDockAlignment(),SFX_ALIGN_NOALIGNMENT) !=
+ SFX_ALIGN_NOALIGNMENT)
+ return FALSE;
+ bFloatMode = TRUE;
+ if ( SFX_ALIGN_NOALIGNMENT != pImp->GetDockAlignment() )
+ {
+ // wg. SV-Bug darf rRect nur ver"andert werden, wenn sich das
+ // Alignment "andert !
+ pImp->SetDockAlignment(SFX_ALIGN_NOALIGNMENT);
+ rRect.SetSize(CalcDockingSize(SFX_ALIGN_NOALIGNMENT));
+ }
+ }
+
+ if ( SFX_ALIGN_NOALIGNMENT == pImp->GetDockAlignment() ||
+ (pImp->bSplitable) )
+ {
+ // Falls durch ein ver"andertes tracking rectangle die Mausposition
+ // nicht mehr darin liegt, mu\s die Position des rectangles noch
+ // angepa\st werden
+
+ Point aMouseOffset;
+ aMouseOffset.X() = rRect.Left() - rPos.X();
+ aMouseOffset.Y() = rRect.Top() - rPos.Y();
+
+ if ( (rPos.X() < rRect.Left()) || (rPos.X() > rRect.Right()) )
+ {
+ rRect.SetPos( rPos );
+ rRect.Move( -5, aMouseOffset.Y() );
+ }
+
+ if ( (rPos.Y() < rRect.Top()) || (rPos.Y() > rRect.Bottom()) )
+ {
+ rRect.SetPos( rPos );
+ rRect.Move( aMouseOffset.X(), -5 );
+ }
+ }
+ else if ( !pImp->bSplitable )
+ {
+ // Bei individuell angedocktem Window wird die Position durch das
+ // Alignment und die docking rects festgelegt.
+ Size aSize = rRect.GetSize();
+ Point aPos;
+
+ switch ( pImp->GetDockAlignment() )
+ {
+ case SFX_ALIGN_LEFT:
+ case SFX_ALIGN_FIRSTLEFT:
+ case SFX_ALIGN_LASTLEFT:
+ aPos = aInnerRect.TopLeft();
+ if ( pImp->GetDockAlignment() == GetAlignment() )
+ aPos.X() -= aSize.Width();
+ break;
+
+ case SFX_ALIGN_TOP:
+ case SFX_ALIGN_LOWESTTOP:
+ case SFX_ALIGN_HIGHESTTOP:
+ aPos = Point(aOuterRect.Left(), aInnerRect.Top());
+ if ( pImp->GetDockAlignment() == GetAlignment() )
+ aPos.Y() -= aSize.Height();
+ break;
+
+ case SFX_ALIGN_RIGHT:
+ case SFX_ALIGN_FIRSTRIGHT:
+ case SFX_ALIGN_LASTRIGHT:
+ aPos = Point(aInnerRect.Right() - rRect.GetSize().Width(),
+ aInnerRect.Top());
+ if ( pImp->GetDockAlignment() == GetAlignment() )
+ aPos.X() += aSize.Width();
+ break;
+
+ case SFX_ALIGN_BOTTOM:
+ case SFX_ALIGN_HIGHESTBOTTOM:
+ case SFX_ALIGN_LOWESTBOTTOM:
+ aPos = Point(aOuterRect.Left(),
+ aInnerRect.Bottom() - rRect.GetSize().Height());
+ if ( pImp->GetDockAlignment() == GetAlignment() )
+ aPos.Y() += aSize.Height();
+ break;
+ }
+
+ rRect.SetPos(aPos);
+ }
+
+ return bFloatMode;
+}
+
+//-------------------------------------------------------------------------
+
+void SfxDockingWindow::EndDocking( const Rectangle& rRect, BOOL bFloatMode )
+
+/* [Beschreibung]
+
+ Diese virtuelle Methode der Klasse DockingWindow sorgt f"ur das korrekte
+ Alignment am parent window.
+ Wird diese Methode von einer abgeleiteten Klasse "uberschrieben, mu\s
+ zuerst SfxDockingWindow::EndDocking() gerufen werden.
+*/
+{
+ if ( !pImp->bConstructed || IsDockingCanceled() || !pMgr )
+ return;
+
+ SfxWorkWindow *pWorkWin = pBindings->GetWorkWindow_Impl();
+ BOOL bReArrange = FALSE;
+ SfxChildIdentifier eIdent = SFX_CHILDWIN_DOCKINGWINDOW;
+ if ( pImp->bSplitable )
+ {
+ eIdent = SFX_CHILDWIN_SPLITWINDOW;
+
+ // Wenn sich das Alignment "andert und das Fenster befindet sich
+ // im angedockten Zustand in einem SplitWindow, mu\s umgemeldet werden
+ // Wenn neu angedockt wird, machen PrepareToggleFloatingMode()
+ // und ToggleFloatingMode() das Ummelden.
+ if ( !bFloatMode )
+ bReArrange = TRUE;
+ }
+
+ if ( bReArrange )
+ {
+ if ( GetAlignment() != pImp->GetDockAlignment() )
+ {
+ // Vor dem Show() mu\s das Ummelden passiert sein, daher kann nicht
+ // die Basisklasse gerufen werden
+ if ( IsFloatingMode() || !pImp->bSplitable )
+ Show( FALSE, SHOW_NOFOCUSCHANGE );
+
+ // Die Gr"o\se f"urs Toggeln setzen
+ pImp->aSplitSize = rRect.GetSize();
+ if ( IsFloatingMode() )
+ {
+ SetFloatingMode( bFloatMode );
+ if ( IsFloatingMode() || !pImp->bSplitable )
+ Show( TRUE, SHOW_NOFOCUSCHANGE );
+ }
+ else
+ {
+ pImp->pSplitWin->RemoveWindow(this,FALSE);
+ pImp->nLine = pImp->nDockLine;
+ pImp->nPos = pImp->nDockPos;
+ pImp->pSplitWin->ReleaseWindow_Impl(this);
+ pImp->pSplitWin = pWorkWin->GetSplitWindow_Impl(pImp->GetDockAlignment());
+ pImp->pSplitWin->InsertWindow(this, pImp->aSplitSize,
+ pImp->nDockLine, pImp->nDockPos,
+ pImp->bNewLine);
+ if ( !pImp->pSplitWin->IsFadeIn() )
+ pImp->pSplitWin->FadeIn();
+ }
+ }
+ else if ( pImp->nLine != pImp->nDockLine ||
+ pImp->nPos != pImp->nDockPos || pImp->bNewLine )
+ {
+ // Ich wurde innerhalb meines Splitwindows verschoben.
+ if ( pImp->nLine != pImp->nDockLine )
+ pImp->aSplitSize = rRect.GetSize();
+ pImp->pSplitWin->MoveWindow( this, pImp->aSplitSize,
+ pImp->nDockLine, pImp->nDockPos, pImp->bNewLine );
+ }
+ }
+ else
+ {
+ pImp->bEndDocked = TRUE;
+ DockingWindow::EndDocking(rRect, bFloatMode);
+ pImp->bEndDocked = FALSE;
+ }
+
+ SetAlignment(pImp->GetDockAlignment());
+ pWorkWin->ConfigChild_Impl( eIdent, SFX_ALIGNDOCKINGWINDOW, pMgr->GetType() );
+}
+
+//-------------------------------------------------------------------------
+
+void SfxDockingWindow::Resizing( Size& rSize )
+
+/* [Beschreibung]
+
+ Virtuelle Methode der Klasse DockingWindow.
+ Hier kann das interaktive Umgr"o\sern im FloatingMode beeinflu\t werden,
+ z.B. indem nur diskrete Werte f"ur Breite und/oder H"ohe zugelassen werden.
+ Die Basisimplementation verhindert, da\s die OutputSize kleiner wird als
+ eine mit SetMinOutputSizePixel() gesetzte Gr"o\se.
+*/
+
+{
+ if(rSize.Width() < pImp->aMinSize.Width())
+ rSize.Width() = pImp->aMinSize.Width();
+ if(rSize.Height() < pImp->aMinSize.Height())
+ rSize.Height() = pImp->aMinSize.Height();
+}
+
+//-------------------------------------------------------------------------
+
+SfxDockingWindow::SfxDockingWindow( SfxBindings *pBindinx, SfxChildWindow *pCW,
+ Window* pParent, WinBits nWinBits) :
+ pBindings(pBindinx),
+ pMgr(pCW),
+ DockingWindow (pParent, nWinBits)
+
+/* [Beschreibung]
+
+ ctor der Klasse SfxDockingWindow. Es wird ein SfxChildWindow ben"otigt,
+ da das Andocken im Sfx "uber SfxChildWindows realisiert wird.
+*/
+
+{
+ ULONG nId = GetHelpId();
+ SetHelpId(0);
+ SetUniqueId( nId );
+
+ pImp = new SfxDockingWindow_Impl;
+ pImp->bConstructed = FALSE;
+ pImp->pSplitWin = 0;
+ pImp->bEndDocked = FALSE;
+
+ pImp->bSplitable = TRUE;
+// pImp->bAutoHide = FALSE;
+
+ // Zun"achst auf Defaults setzen; das Alignment wird in der Subklasse gesetzt
+ pImp->nLine = pImp->nDockLine = 0;
+ pImp->nPos = pImp->nDockPos = 0;
+ pImp->bNewLine = FALSE;
+ pImp->SetLastAlignment(SFX_ALIGN_NOALIGNMENT);
+
+// DBG_ASSERT(pMgr,"DockingWindow erfordert ein SfxChildWindow!");
+}
+
+//-------------------------------------------------------------------------
+
+SfxDockingWindow::SfxDockingWindow( SfxBindings *pBindinx, SfxChildWindow *pCW,
+ Window* pParent, const ResId& rResId) :
+ pBindings(pBindinx),
+ pMgr(pCW),
+ DockingWindow(pParent, rResId)
+
+/* [Beschreibung]
+
+ ctor der Klasse SfxDockingWindow. Es wird ein SfxChildWindow ben"otigt,
+ da das Andocken im Sfx "uber SfxChildWindows realisiert wird.
+*/
+
+{
+ ULONG nId = GetHelpId();
+ SetHelpId(0);
+ SetUniqueId( nId );
+
+ pImp = new SfxDockingWindow_Impl;
+ pImp->bConstructed = FALSE;
+ pImp->pSplitWin = 0;
+ pImp->bEndDocked = FALSE;
+
+ pImp->bSplitable = TRUE;
+// pImp->bAutoHide = FALSE;
+
+ // Zun"achst auf Defaults setzen; das Alignment wird in der Subklasse gesetzt
+ pImp->nLine = pImp->nDockLine = 0;
+ pImp->nPos = pImp->nDockPos = 0;
+ pImp->bNewLine = FALSE;
+ pImp->SetLastAlignment(SFX_ALIGN_NOALIGNMENT);
+
+// DBG_ASSERT(pMgr,"DockingWindow erfordert ein SfxChildWindow!");
+}
+
+//-------------------------------------------------------------------------
+
+void SfxDockingWindow::Initialize(SfxChildWinInfo *pInfo)
+
+/* [Beschreibung]
+
+ Initialisierung der Klasse SfxDockingWindow "uber ein SfxChildWinInfo.
+ Die Initialisierung erfolgt erst in einem 2.Schritt nach dem ctor und sollte
+ vom ctor der abgeleiteten Klasse oder vom ctor des SfxChildWindows
+ aufgerufen werden.
+*/
+
+{
+ if ( !pMgr )
+ {
+ // Bugfix #39771
+ pImp->SetDockAlignment( SFX_ALIGN_NOALIGNMENT );
+ pImp->bConstructed = TRUE;
+ return;
+ }
+
+ BOOL bFloatMode = IsFloatingMode();
+ Point aPos;
+ if ( pInfo->aSize.Width() != 0 && pInfo->aSize.Height() != 0 )
+ {
+ // Uebergebene Size und Pos ist immer FloatingSize und FloatingPos.
+ // Bei FloatingWindow ist das auch die aktuelle Size;
+ Size aMinSize( GetMinOutputSizePixel() );
+ if ( pInfo->aSize.Width() < aMinSize.Width() )
+ pInfo->aSize.Width() = aMinSize.Width();
+ if ( pInfo->aSize.Height() < aMinSize.Height() )
+ pInfo->aSize.Height() = aMinSize.Height();
+
+ if ( GetFloatStyle() & WB_SIZEABLE )
+ SetFloatingSize( pInfo->aSize );
+ else
+ SetFloatingSize( GetSizePixel() );
+ pImp->aSplitSize = GetFloatingSize();
+
+ // Falls von FloatingWindow auf DockingWindow umgestellt wurde, gibt
+ // es keinen ExtraString ( Abw"artskompatibel ) und das Alignment
+ // ist SFX_ALIGN_NOALIGNMENT (im ctor zu setzen).
+ if ( pInfo->aExtraString.Len() )
+ {
+ String aStr;
+ USHORT nPos = pInfo->aExtraString.SearchAscii("AL:");
+
+ // Versuche, den Alignment-String "ALIGN:(...)" einzulesen; wenn
+ // er nicht vorhanden ist, liegt eine "altere Version vor
+ if ( nPos != STRING_NOTFOUND )
+ {
+ USHORT n1 = pInfo->aExtraString.Search('(', nPos);
+ if ( n1 != STRING_NOTFOUND )
+ {
+ USHORT n2 = pInfo->aExtraString.Search(')', n1);
+ if ( n2 != STRING_NOTFOUND )
+ {
+ // Alignment-String herausschneiden
+ aStr = pInfo->aExtraString.Copy(nPos, n2 - nPos + 1);
+ pInfo->aExtraString.Erase(nPos, n2 - nPos + 1);
+ aStr.Erase(nPos, n1-nPos+1);
+ }
+ }
+ }
+
+ if ( aStr.Len() )
+ {
+ // Zuerst das Alignment extrahieren
+ SetAlignment( (SfxChildAlignment) (USHORT) aStr.ToInt32() );
+
+ // Um Fehler bei Manipulationen an der INI-Datei zu vermeiden,
+ // wird das Alignment validiert
+ SfxChildAlignment eAlign =
+ CheckAlignment(GetAlignment(),GetAlignment());
+ if ( eAlign != GetAlignment() )
+ {
+ DBG_ERROR("Unsinniges Alignment!");
+ SetAlignment( eAlign );
+ aStr = String();
+ }
+
+ // Dann das LastAlignment
+ nPos = aStr.Search(',');
+ if ( nPos != STRING_NOTFOUND )
+ {
+ aStr.Erase(0, nPos+1);
+ pImp->SetLastAlignment( (SfxChildAlignment) (USHORT) aStr.ToInt32() );
+ }
+
+ // Dann die Splitting-Informationen
+ nPos = aStr.Search(',');
+ if ( nPos != STRING_NOTFOUND )
+ {
+ aStr.Erase(0, nPos+1);
+ SfxIniManager *pAppIniMgr = SFX_APP()->GetAppIniManager();
+ if ( pAppIniMgr->GetPosSize( aStr, aPos, pImp->aSplitSize ) )
+ {
+ pImp->nLine = pImp->nDockLine = (USHORT) aPos.X();
+ pImp->nPos = pImp->nDockPos = (USHORT) aPos.Y();
+ }
+ }
+ }
+ }
+
+ aPos = pInfo->aPos;
+ }
+ else
+ {
+ Size aFloatSize = GetFloatingSize();
+ if ( !aFloatSize.Width() || !aFloatSize.Height())
+ {
+ // Wenn FloatingSize nicht explizit gesetzt ist, wird die aktuelle
+ // Fenstergr"o\se genommen !
+ SetFloatingSize(GetOutputSizePixel());
+ aFloatSize = GetFloatingSize();
+ }
+
+ // Der default f"ur die SplitSize ist die FloatingSize
+ pImp->aSplitSize = aFloatSize;
+ Size aSize = GetParent()->GetOutputSizePixel();
+ aPos = GetFloatingPos();
+ if ( !aPos.X() && !aPos.Y() )
+ {
+ // Wenn nichts gesetzt, FloatingWindow zentrieren
+#ifndef VCL
+ aPos = GetParent()->GetPosPixel();
+#endif
+ aPos.X() += (aSize.Width() - aFloatSize.Width()) / 2;
+ aPos.Y() += (aSize.Height() - aFloatSize.Height()) / 2;
+ }
+ }
+
+#ifdef VCL
+ Point aPoint;
+ Rectangle aRect = GetDesktopRectPixel();
+ Size aSize( GetFloatingSize() );
+
+ aPoint.X() = aRect.Right() - aSize.Width();
+ aPoint.Y() = aRect.Bottom() - aSize.Height();
+
+ aPoint = OutputToScreenPixel( aPoint );
+
+ if ( aPos.X() > aPoint.X() )
+ aPos.X() = aPoint.X() ;
+ if ( aPos.Y() > aPoint.Y() )
+ aPos.Y() = aPoint.Y();
+
+ if ( aPos.X() < 0 ) aPos.X() = 0;
+ if ( aPos.Y() < 0 ) aPos.Y() = 0;
+
+#endif
+
+ SetFloatingPos( aPos );
+
+ SfxWorkWindow *pWorkWin = pBindings->GetWorkWindow_Impl();
+ if ( GetAlignment() != SFX_ALIGN_NOALIGNMENT )
+ {
+ // Testen, ob das Workwindow gerade ein Andocken erlaubt
+ if ( !pWorkWin->IsDockingAllowed() || ( GetFloatStyle() & WB_STANDALONE )
+ && Application::IsInModalMode() )
+ SetAlignment( SFX_ALIGN_NOALIGNMENT );
+ }
+
+ // ggf. FloatingMode korrekt setzen (ohne Aufruf der Handler, da
+ // pImp->bConstructed noch nicht TRUE ist!)
+ if ( bFloatMode != (GetAlignment() == SFX_ALIGN_NOALIGNMENT) )
+ SetFloatingMode(!bFloatMode);
+
+ if ( pInfo->nFlags & SFX_CHILDWIN_FORCEDOCK )
+ {
+ SetFloatingMode( FALSE );
+ }
+
+
+ if (IsFloatingMode())
+ {
+ GetFloatingWindow()->SetPosPixel(GetFloatingPos());
+ GetFloatingWindow()->SetOutputSizePixel(GetFloatingSize());
+
+ // Leider gibt es von SV kein Resize, also selber machen
+ Resize();
+
+ // Soll das FloatingWindow eingezoomt werden ?
+ if (pInfo && (pInfo->nFlags & SFX_CHILDWIN_ZOOMIN))
+ GetFloatingWindow()->RollUp();
+
+ // LastAlignment "uberpr"ufen
+ SfxChildAlignment eLastAlign = pImp->GetLastAlignment();
+
+ if ( eLastAlign == SFX_ALIGN_NOALIGNMENT)
+ eLastAlign = CheckAlignment(eLastAlign, SFX_ALIGN_LEFT);
+ if ( eLastAlign == SFX_ALIGN_NOALIGNMENT)
+ eLastAlign = CheckAlignment(eLastAlign, SFX_ALIGN_RIGHT);
+ if ( eLastAlign == SFX_ALIGN_NOALIGNMENT)
+ eLastAlign = CheckAlignment(eLastAlign, SFX_ALIGN_TOP);
+ if ( eLastAlign == SFX_ALIGN_NOALIGNMENT)
+ eLastAlign = CheckAlignment(eLastAlign, SFX_ALIGN_BOTTOM);
+ pImp->SetLastAlignment(eLastAlign);
+ }
+ else
+ {
+ pImp->SetLastAlignment(SFX_ALIGN_NOALIGNMENT);
+
+ // Angedockte Fenster werden, sofern sie resizable sind, in ein
+ // SplitWindow eingesetzt
+ if ( pImp->bSplitable && !(pInfo->nFlags & SFX_CHILDWIN_FORCEDOCK) )
+ {
+// pImp->bAutoHide = ( pInfo->nFlags & SFX_CHILDWIN_AUTOHIDE) != 0;
+ SfxViewFrame *pFrame = pBindings->GetDispatcher_Impl()->GetFrame();
+ pImp->pSplitWin = pWorkWin->GetSplitWindow_Impl(GetAlignment());
+ pImp->pSplitWin->InsertWindow(this, pImp->aSplitSize);
+ }
+ else
+ {
+ // Fenster ist individuell angedockt; Gr"o\se berechnen.
+ // Dazu mu\s sie mit der FloatingSize initialisiert werden, falls
+ // irgendwer sich darauf verl"a\st, da\s eine vern"unftige Gr"o\se
+ // gesetz ist
+ SetSizePixel(GetFloatingSize());
+ SetSizePixel(CalcDockingSize(GetAlignment()));
+ }
+ }
+
+ // Ab jetzt d"urfen die DockingHandler aufgerufen werden
+ pImp->SetDockAlignment( GetAlignment() );
+ pImp->bConstructed = TRUE;
+}
+
+//-------------------------------------------------------------------------
+
+void SfxDockingWindow::FillInfo(SfxChildWinInfo& rInfo) const
+
+/* [Beschreibung]
+
+ F"ullt ein SfxChildWinInfo mit f"ur SfxDockingWindow spezifischen Daten,
+ damit sie in die INI-Datei geschrieben werden koennen.
+ Es wird angenommen, da\s rInfo alle anderen evt. relevanten Daten in
+ der ChildWindow-Klasse erh"alt.
+ Eingetragen werden hier gemerkten Gr"o\sen, das ZoomIn-Flag und die
+ f"ur das Docking relevanten Informationen.
+ Wird diese Methode "uberschrieben, mu\s zuerst die Basisimplementierung
+ gerufen werden.
+*/
+
+{
+ if ( !pMgr )
+ return;
+
+ rInfo.aPos = GetFloatingPos();
+ rInfo.aSize = GetFloatingSize();
+ rInfo.aExtraString += DEFINE_CONST_UNICODE("AL:(");
+ rInfo.aExtraString += String::CreateFromInt32((USHORT) GetAlignment());
+ rInfo.aExtraString += ',';
+ rInfo.aExtraString += String::CreateFromInt32 ((USHORT) pImp->GetLastAlignment());
+ if ( pImp->bSplitable )
+ {
+ rInfo.aExtraString += ',';
+ SfxIniManager *pIniMgr = SFX_INIMANAGER();
+ Point aPos(pImp->nLine, pImp->nPos);
+ rInfo.aExtraString += pIniMgr->GetString( aPos, pImp->aSplitSize );
+ }
+
+ rInfo.aExtraString += ')';
+ if (IsFloatingMode() )
+ {
+ if ( GetFloatingWindow()->IsRollUp() )
+ rInfo.nFlags |= SFX_CHILDWIN_ZOOMIN;
+ }
+}
+
+//-------------------------------------------------------------------------
+
+SfxDockingWindow::~SfxDockingWindow()
+{
+ if ( pMgr && pImp->pSplitWin && pImp->pSplitWin->IsItemValid( GetType() ) )
+ pImp->pSplitWin->RemoveWindow(this);
+ delete pImp;
+}
+
+//-------------------------------------------------------------------------
+
+SfxChildAlignment SfxDockingWindow::CalcAlignment(const Point& rPos, Rectangle& rRect)
+
+/* [Beschreibung]
+
+ Diese Methode berechnet f"ur gegebene Mausposition und tracking rectangle,
+ welches Alignment sich daraus ergeben w"urde. Beim Wechsel des Alignments
+ kann sich auch das tracking rectangle "andern, so dass ein ver"andertes
+ rectangle zur"uckgegeben wird.
+
+ Der Klassenbenutzer kann das Verhalten dieser Methode und damit das Verhalten
+ seiner DockinWindow-Klasse beim Docken beeinflussen, indem er die hier
+ aufgerufene virtuelle Methode
+
+ SfxDockingWindow::CalcDockingSize(SfxChildAlignment eAlign)
+
+ "uberschreibt (s.u.).
+*/
+
+{
+ // Hypothetische Gr"o\sen ausrechnen
+ Size aFloatingSize(CalcDockingSize(SFX_ALIGN_NOALIGNMENT));
+ Size aVerticalSize(CalcDockingSize(SFX_ALIGN_LEFT));
+ Size aHorizontalSize(CalcDockingSize(SFX_ALIGN_TOP));
+
+ // Testen, ob das Workwindow gerade ein Andocken erlaubt
+ SfxWorkWindow *pWorkWin = pBindings->GetWorkWindow_Impl();
+ if ( !pWorkWin->IsDockingAllowed() )
+ {
+// rRect.SetSize( aFloatingSize );
+ return pImp->GetDockAlignment();
+ }
+
+ long nLeft, nRight, nTop, nBottom;
+ if ( pImp->bSplitable )
+ {
+ Size aSize = pImp->aSplitSize;
+ if ( GetFloatingSize().Height() < aSize.Height() )
+ aSize.Height() = GetFloatingSize().Height();
+ if ( GetFloatingSize().Width() < aSize.Width() )
+ aSize.Width() = GetFloatingSize().Width();
+
+ // die Gr"o\se des Umschaltbereiches sollte begrenzt sein
+ if ( aSize.Width() > MAX_TOGGLEAREA_WIDTH )
+ aSize.Width() = MAX_TOGGLEAREA_WIDTH;
+ if ( aSize.Height() > MAX_TOGGLEAREA_WIDTH )
+ aSize.Height() = MAX_TOGGLEAREA_WIDTH;
+
+ nLeft = nRight = aSize.Width();
+ nTop = nBottom = aSize.Height();
+ }
+ else
+ {
+ nLeft = nRight = aVerticalSize.Width();
+ nTop = nBottom = aHorizontalSize.Height();
+ }
+
+ Rectangle aInRect = GetInnerRect();
+
+ // Inneres Rechteck etwas verkleinern, wenn m"oglich, au\ser wenn das
+ // Fenster an der Kante steht, wo es angedockt ist
+ if ( aInRect.GetWidth() > nLeft )
+ aInRect.Left() += nLeft/2;
+ if ( aInRect.GetWidth() > nRight )
+ aInRect.Right() -= nRight/2;
+ if ( aInRect.GetHeight() > nTop )
+ aInRect.Top() += nTop/2;
+ if ( aInRect.GetHeight() > nBottom )
+ aInRect.Bottom() -= nBottom/2;
+
+ if ( !pImp->pSplitWin ||
+ pImp->nLine == pImp->pSplitWin->GetLineCount()-1 &&
+ pImp->pSplitWin->GetWindowCount(pImp->nLine) == 1)
+ {
+ // Beim Docken mit SplitWindows darf auch au\serhalb angedockt werden,
+ // um eine neue Zeile aufzumachen, es sei denn, das aktuelle Fenster
+ // ist das einzige in der letzten Zeile
+ switch ( GetAlignment() )
+ {
+ case SFX_ALIGN_LEFT:
+ case SFX_ALIGN_FIRSTLEFT:
+ case SFX_ALIGN_LASTLEFT:
+ aInRect.Left() -= nLeft/2;
+ break;
+ case SFX_ALIGN_TOP:
+ case SFX_ALIGN_LOWESTTOP:
+ case SFX_ALIGN_HIGHESTTOP:
+ aInRect.Top() -= nTop/2;
+ break;
+ case SFX_ALIGN_RIGHT:
+ case SFX_ALIGN_FIRSTRIGHT:
+ case SFX_ALIGN_LASTRIGHT:
+ aInRect.Right() += nRight/2;
+ break;
+ case SFX_ALIGN_BOTTOM:
+ case SFX_ALIGN_LOWESTBOTTOM:
+ case SFX_ALIGN_HIGHESTBOTTOM:
+ aInRect.Bottom() += nBottom/2;
+ break;
+ }
+ }
+
+ // Nun das neue Alignment berechnen
+ SfxChildAlignment eDockAlign = pImp->GetDockAlignment();
+
+ if ( aInRect.IsInside( rPos ) )
+ {
+ // Maus im inneren Rechteck: wird/bleibt FloatingMode
+ eDockAlign = CheckAlignment(pImp->GetDockAlignment(),SFX_ALIGN_NOALIGNMENT);
+ }
+ else
+ {
+ // Wir befinden uns im Dock-Bereich. Jetzt m"u\sen wir feststellen,
+ // an welcher Kante angedockt werden soll
+
+ Point aInPos( rPos.X()-aInRect.Left(), rPos.Y()-aInRect.Top() );
+ Size aInSize = aInRect.GetSize();
+ BOOL bNoChange = FALSE;
+
+ // Zuerst feststellen, ob das Alignment unver"andert bleiben kann
+ switch ( GetAlignment() )
+ {
+ case SFX_ALIGN_LEFT:
+ case SFX_ALIGN_FIRSTLEFT:
+ case SFX_ALIGN_LASTLEFT:
+ if (aInPos.X() <= 0)
+ {
+ eDockAlign = GetAlignment();
+ bNoChange = TRUE;
+ }
+ break;
+ case SFX_ALIGN_TOP:
+ case SFX_ALIGN_LOWESTTOP:
+ case SFX_ALIGN_HIGHESTTOP:
+ if ( aInPos.Y() <= 0)
+ {
+ eDockAlign = GetAlignment();
+ bNoChange = TRUE;
+ }
+ break;
+ case SFX_ALIGN_RIGHT:
+ case SFX_ALIGN_FIRSTRIGHT:
+ case SFX_ALIGN_LASTRIGHT:
+ if ( aInPos.X() >= aInSize.Width())
+ {
+ eDockAlign = GetAlignment();
+ bNoChange = TRUE;
+ }
+ break;
+ case SFX_ALIGN_BOTTOM:
+ case SFX_ALIGN_LOWESTBOTTOM:
+ case SFX_ALIGN_HIGHESTBOTTOM:
+ if ( aInPos.Y() >= aInSize.Height())
+ {
+ eDockAlign = GetAlignment();
+ bNoChange = TRUE;
+ }
+ break;
+ default:
+ break;
+ }
+
+ if ( !bNoChange )
+ {
+ // Wenn dem nicht so ist, links/oben/rechts/unten in dieser Reihenfolge
+ // testen
+ BOOL bForbidden = TRUE;
+ if ( aInPos.X() <= 0)
+ {
+ eDockAlign = CheckAlignment(pImp->GetDockAlignment(),SFX_ALIGN_LEFT);
+ bForbidden = ( eDockAlign != SFX_ALIGN_LEFT &&
+ eDockAlign != SFX_ALIGN_FIRSTLEFT &&
+ eDockAlign != SFX_ALIGN_LASTLEFT );
+ }
+
+ if ( bForbidden && aInPos.Y() <= 0)
+ {
+ eDockAlign = CheckAlignment(pImp->GetDockAlignment(),SFX_ALIGN_TOP);
+ bForbidden = ( eDockAlign != SFX_ALIGN_TOP &&
+ eDockAlign != SFX_ALIGN_HIGHESTTOP &&
+ eDockAlign != SFX_ALIGN_LOWESTTOP );
+ }
+
+ if ( bForbidden && aInPos.X() >= aInSize.Width())
+ {
+ eDockAlign = CheckAlignment(pImp->GetDockAlignment(),SFX_ALIGN_RIGHT);
+ bForbidden = ( eDockAlign != SFX_ALIGN_RIGHT &&
+ eDockAlign != SFX_ALIGN_FIRSTRIGHT &&
+ eDockAlign != SFX_ALIGN_LASTRIGHT );
+ }
+
+ if ( bForbidden && aInPos.Y() >= aInSize.Height())
+ {
+ eDockAlign = CheckAlignment(pImp->GetDockAlignment(),SFX_ALIGN_BOTTOM);
+ bForbidden = ( eDockAlign != SFX_ALIGN_BOTTOM &&
+ eDockAlign != SFX_ALIGN_HIGHESTBOTTOM &&
+ eDockAlign != SFX_ALIGN_LOWESTBOTTOM );
+ }
+
+ // Wenn wir zwar im Dockbereich sind, da\s einzig m"ogliche Alignment
+ // aber verboten ist, mu\s in den FloatingMode geschaltet werden
+ if ( bForbidden )
+ {
+ eDockAlign = CheckAlignment(pImp->GetDockAlignment(),SFX_ALIGN_NOALIGNMENT);
+ }
+ }
+ }
+
+ if ( eDockAlign == SFX_ALIGN_NOALIGNMENT )
+ {
+ //Im FloatingMode erh"alt das tracking rectangle die floating size
+ // wg. SV-Bug darf rRect nur ver"andert werden, wenn sich das
+ // Alignment "andert !
+ if ( eDockAlign != pImp->GetDockAlignment() )
+ rRect.SetSize( aFloatingSize );
+ }
+ else if ( pImp->bSplitable )
+ {
+ // Bei DockingWindows in SplitWindows sind Position und Gr"o\se zu
+ // berechnen, auch wenn sich das Alignment nicht ge"andert hat, da
+ // sich die Zeile ge"andert haben k"onnte.
+ CalcSplitPosition(rPos, rRect, eDockAlign);
+ }
+ else
+ {
+ // Bei individuell angedockten Fenstern mu\s das tracking rectangle
+ // nur ge"andert werden, wenn sich das Dock-Alignment ge"andert hat.
+ if ( eDockAlign != pImp->GetDockAlignment() )
+ {
+ switch ( eDockAlign )
+ {
+ case SFX_ALIGN_LEFT:
+ case SFX_ALIGN_RIGHT:
+ case SFX_ALIGN_FIRSTLEFT:
+ case SFX_ALIGN_LASTLEFT:
+ case SFX_ALIGN_FIRSTRIGHT:
+ case SFX_ALIGN_LASTRIGHT:
+ rRect.SetSize( aVerticalSize );
+ break;
+
+ case SFX_ALIGN_TOP:
+ case SFX_ALIGN_BOTTOM:
+ case SFX_ALIGN_LOWESTTOP:
+ case SFX_ALIGN_HIGHESTTOP:
+ case SFX_ALIGN_LOWESTBOTTOM:
+ case SFX_ALIGN_HIGHESTBOTTOM:
+ rRect.SetSize( aHorizontalSize );
+ break;
+ }
+ }
+ }
+
+ return eDockAlign;
+}
+
+//-------------------------------------------------------------------------
+
+Size SfxDockingWindow::CalcDockingSize(SfxChildAlignment eAlign)
+
+/* [Beschreibung]
+
+ Virtuelle Methode der Klasse SfxDockingWindow.
+ Hier wird festgelegt, wie sich die Gr"o\se des DockingWindows abh"angig vom
+ Alignment "andert.
+ Die Basisimplementation setzt im Floating Mode die Gr"o\se auf die gemerkte
+ Floating Size.
+ Bei horizontalem Alignment wird die Breite auf die Breite des "au\seren
+ DockingRects, bei vertikalem Alignment die H"ohe auf die H"ohe des inneren
+ DockingRects (ergibt sich aus der Reihenfolge, in der im SFX ChildWindows
+ ausgegeben werden). Die jeweils andere Gr"o\se wird auf die aktuelle
+ Floating Size gesetzt, hier k"onnte eine abgeleitete Klasse "andernd
+ eingreifen.
+ Die DockingSize mu\s f"ur Left/Right und Top/Bottom jeweils gleich sein.
+*/
+
+{
+ // Achtung: falls das Resizing auch im angedockten Zustand geht, mu\s dabei
+ // auch die Floating Size angepa\st werden !?
+
+ Size aSize = GetFloatingSize();
+ switch (eAlign)
+ {
+ case SFX_ALIGN_TOP:
+ case SFX_ALIGN_BOTTOM:
+ case SFX_ALIGN_LOWESTTOP:
+ case SFX_ALIGN_HIGHESTTOP:
+ case SFX_ALIGN_LOWESTBOTTOM:
+ case SFX_ALIGN_HIGHESTBOTTOM:
+ aSize.Width() = aOuterRect.Right() - aOuterRect.Left();
+ break;
+ case SFX_ALIGN_LEFT:
+ case SFX_ALIGN_RIGHT:
+ case SFX_ALIGN_FIRSTLEFT:
+ case SFX_ALIGN_LASTLEFT:
+ case SFX_ALIGN_FIRSTRIGHT:
+ case SFX_ALIGN_LASTRIGHT:
+ aSize.Height() = aInnerRect.Bottom() - aInnerRect.Top();
+ break;
+ case SFX_ALIGN_NOALIGNMENT:
+ break;
+ }
+
+ return aSize;
+}
+
+//-------------------------------------------------------------------------
+
+SfxChildAlignment SfxDockingWindow::CheckAlignment(SfxChildAlignment,
+ SfxChildAlignment eAlign)
+
+/* [Beschreibung]
+
+ Virtuelle Methode der Klasse SfxDockingWindow.
+ Hier kann eine abgeleitete Klasse bestimmte Alignments verbieten.
+ Die Basisimplementation verbietet kein Alignment.
+*/
+
+{
+ return eAlign;
+}
+
+//-------------------------------------------------------------------------
+
+BOOL SfxDockingWindow::Close()
+
+/* [Beschreibung]
+
+ Das Fenster wird geschlossen, indem das ChildWindow durch Ausf"uhren des
+ ChildWindow-Slots zerst"ort wird.
+ Wird diese Methode von einer abgeleiteten Klasse "uberschrieben, mu\s
+ danach SfxDockingWindow::Close() gerufen werden, wenn nicht das Close()
+ mit "return FALSE" abgebrochen wird.
+
+*/
+{
+ // Execute mit Parametern, da Toggle von einigen ChildWindows ignoriert
+ // werden kann
+ if ( !pMgr )
+ return TRUE;
+
+ SfxBoolItem aValue( pMgr->GetType(), FALSE);
+ pBindings->GetDispatcher_Impl()->Execute(
+ pMgr->GetType(), SFX_CALLMODE_RECORD | SFX_CALLMODE_ASYNCHRON, &aValue, 0L );
+ return TRUE;
+}
+
+//-------------------------------------------------------------------------
+
+void SfxDockingWindow::Paint(const Rectangle& rRect)
+
+/* [Beschreibung]
+
+ Es wird im angedockten Zustand eine Begrenzungslinie an der angedockten
+ Kante und ein Rahmen ausgegeben. Dabei wird SVLOOK ber"ucksichtigt.
+*/
+
+{
+ if ( pImp->bSplitable || IsFloatingMode() )
+ return;
+
+ Rectangle aRect = Rectangle(Point(0, 0),
+ GetOutputSizePixel());
+ switch (GetAlignment())
+ {
+ case SFX_ALIGN_TOP:
+ {
+ DrawLine(aRect.BottomLeft(), aRect.BottomRight());
+ aRect.Bottom()--;
+ break;
+ }
+
+ case SFX_ALIGN_BOTTOM:
+ {
+ DrawLine(aRect.TopLeft(), aRect.TopRight());
+ aRect.Top()++;
+ break;
+ }
+
+ case SFX_ALIGN_LEFT:
+ {
+ DrawLine(aRect.TopRight(), aRect.BottomRight());
+ aRect.Right()--;
+ break;
+ }
+
+ case SFX_ALIGN_RIGHT:
+ {
+ DrawLine(aRect.TopLeft(), aRect.BottomLeft());
+ aRect.Left()++;
+ break;
+ }
+ }
+
+ DecorationView aView( this );
+ aView.DrawFrame( aRect, FRAME_DRAW_OUT );
+}
+
+//-------------------------------------------------------------------------
+
+void SfxDockingWindow::SetMinOutputSizePixel( const Size& rSize )
+
+/* [Beschreibung]
+
+ Mit dieser Methode kann eine minimale OutpuSize gesetzt werden, die
+ im Resizing()-Handler abgefragt wird.
+*/
+
+{
+ pImp->aMinSize = rSize;
+}
+
+//-------------------------------------------------------------------------
+
+Size SfxDockingWindow::GetMinOutputSizePixel() const
+
+/* [Beschreibung]
+
+ Die gesetzte minimale Gr"o\se wird zur"uckgegeben.
+*/
+
+{
+ return pImp->aMinSize;
+}
+
+//-------------------------------------------------------------------------
+
+void SfxDockingWindow::CalcSplitPosition(const Point rPos, Rectangle& rRect,
+ SfxChildAlignment eAlign)
+
+/* [Beschreibung]
+
+ Diese Methode berechnet f"ur gegebene Mausposition und aktuelles tracking
+ rectangle, welches tats"achliche tracking rectangle sich bei einem im
+ SplitWindow angedockten Fenster ergibt (unter Ber"ucksichtigung von Zeile
+ und Spalte des SplitWindows, an der sich die Maus befindet).
+*/
+
+{
+ SfxWorkWindow *pWorkWin = pBindings->GetWorkWindow_Impl();
+ SfxSplitWindow *pSplitWin = pWorkWin->GetSplitWindow_Impl(eAlign);
+ USHORT nLine, nPos;
+
+ // Mausposition in Koordinaten des Splitwindows
+ Point aPos(pSplitWin->ScreenToOutputPixel(rPos));
+ if ( pSplitWin->GetWindowPos(aPos, nLine, nPos ) )
+ {
+ // Maus innerhalb des Splitwindows
+ pImp->nDockLine = nLine;
+ pImp->nDockPos = nPos;
+ }
+ else
+ {
+ // Maus au\serhalb, aber au\serhalb des InnerRects (sonst w"are diese
+ // Methode gar nicht gerufen worden ), also soll eine neue Zeile
+ // aufgemacht werden
+ pImp->nDockLine = pSplitWin->GetLineCount();
+ pImp->nDockPos = 0;
+ }
+
+ // Neue Zeile aufmachen ?
+ pImp->bNewLine = (pImp->nDockLine >= pSplitWin->GetLineCount());
+
+ // Tracking rectangle auf gemerkte Splitsize setzen
+ Size aSize = pImp->aSplitSize;
+
+ // Gr"o\se der noch freien client area
+ Size aInnerSize = GetInnerRect().GetSize();
+
+ // Wenn neue Zeile, je nach Alignment Breite oder H"ohe auf die der
+ // freien client area setzen, sonst auf die LineSize der Zeile im
+ // Splitwindow, "uber der die Maus steht
+ if ( eAlign == SFX_ALIGN_TOP || eAlign == SFX_ALIGN_BOTTOM )
+ {
+ if ( pImp->bNewLine )
+ {
+ aSize.Width() = aInnerSize.Width();
+ if ( aSize.Height() > aInnerSize.Height() / 2 &&
+ GetFloatingSize().Height() < aSize.Height() )
+ aSize.Height() = GetFloatingSize().Height();
+ }
+ else
+ {
+ aSize.Height() = pSplitWin->GetLineSize(nLine);
+ if ( aSize.Width() > aInnerSize.Width() / 2 &&
+ GetFloatingSize().Width() < aSize.Width() )
+ aSize.Width() = GetFloatingSize().Width();
+ }
+ }
+ else
+ {
+ if ( pImp->bNewLine )
+ {
+ aSize.Height() = aInnerSize.Height();
+ if ( aSize.Width() > aInnerSize.Width() / 2 &&
+ GetFloatingSize().Width() < aSize.Width() )
+ aSize.Width() = GetFloatingSize().Width();
+ }
+ else
+ {
+ aSize.Width() = pSplitWin->GetLineSize(nLine);
+ if ( aSize.Height() > aInnerSize.Height() / 2 &&
+ GetFloatingSize().Height() < aSize.Height() )
+ aSize.Height() = GetFloatingSize().Height();
+ }
+ }
+
+ rRect.SetSize(aSize);
+}
+
+//-------------------------------------------------------------------------
+
+void SfxDockingWindow::EnableSplitting(BOOL bEnable)
+{
+ pImp->bSplitable = bEnable;
+}
+
+// -----------------------------------------------------------------------
+
+long SfxDockingWindow::Notify( NotifyEvent& rEvt )
+{
+ if ( rEvt.GetType() == EVENT_GETFOCUS || rEvt.GetType() == EVENT_MOUSEBUTTONDOWN )
+ {
+ pBindings->SetActiveFrame( pMgr->GetFrame() );
+
+ if ( pImp->pSplitWin )
+ pImp->pSplitWin->SetActiveWindow_Impl( this );
+ else
+ pMgr->Activate_Impl();
+/*
+ // Nur wg. PlugIn
+ SfxViewFrame *pFrame = pBindings->GetDispatcher_Impl()->GetFrame();
+ if ( pFrame )
+ pFrame->MakeActive_Impl();
+*/
+ // In VCL geht Notify zun"achst an das Fenster selbst,
+ // also base class rufen, sonst erf"ahrt der parent nichts
+ if ( rEvt.GetType() == EVENT_MOUSEBUTTONDOWN || rEvt.GetWindow() == this )
+ DockingWindow::Notify( rEvt );
+ return TRUE;
+ }
+ else if( rEvt.GetType() == EVENT_KEYINPUT )
+ {
+ // KeyInput zuerst f"ur Dialogfunktionen zulassen
+ if ( !DockingWindow::Notify( rEvt ) )
+ // dann auch global g"ultige Acceleratoren verwenden
+ return SfxViewShell::Current()->GlobalKeyInput_Impl( *rEvt.GetKeyEvent() );
+ return TRUE;
+ }
+ else if ( rEvt.GetType() == EVENT_LOSEFOCUS && !HasChildPathFocus() )
+ {
+// pBindings->SetActiveFrame( XFrameRef() );
+ pMgr->Deactivate_Impl();
+ }
+
+ return DockingWindow::Notify( rEvt );
+}
+
+
+USHORT SfxDockingWindow::GetWinBits_Impl() const
+{
+ USHORT nBits = 0;
+// if ( pImp->bAutoHide )
+// nBits |= SWIB_AUTOHIDE;
+ return nBits;
+}
+
+//-------------------------------------------------------------------------
+
+void SfxDockingWindow::SetItemSize_Impl( const Size& rSize )
+{
+ pImp->aSplitSize = rSize;
+}
+
+void SfxDockingWindow::Disappear_Impl()
+{
+ if ( pImp->pSplitWin && pImp->pSplitWin->IsItemValid( GetType() ) )
+ pImp->pSplitWin->RemoveWindow(this);
+}
+
+void SfxDockingWindow::Reappear_Impl()
+{
+ if ( pImp->pSplitWin && !pImp->pSplitWin->IsItemValid( GetType() ) )
+ {
+ pImp->pSplitWin->InsertWindow( this, pImp->aSplitSize );
+ }
+}
+
+BOOL SfxDockingWindow::IsAutoHide_Impl() const
+{
+ if ( pImp->pSplitWin )
+ return !pImp->pSplitWin->IsFadeIn();
+ else
+ return FALSE;
+}
+
+BOOL SfxDockingWindow::IsPinned_Impl() const
+{
+ if ( pImp->pSplitWin )
+ return pImp->pSplitWin->IsPinned();
+ else
+ return TRUE;
+}
+
+void SfxDockingWindow::AutoShow_Impl( BOOL bShow )
+{
+ if ( pImp->pSplitWin )
+ {
+ if ( bShow )
+ pImp->pSplitWin->FadeIn();
+ else
+ pImp->pSplitWin->FadeOut();
+ }
+}
+
+void SfxDockingWindow::Pin_Impl( BOOL bPinned )
+{
+ if ( pImp->pSplitWin )
+ pImp->pSplitWin->Pin_Impl( bPinned );
+}
+
+SfxSplitWindow* SfxDockingWindow::GetSplitWindow_Impl() const
+{
+ return pImp->pSplitWin;
+}
+
+void SfxDockingWindow::FadeIn( BOOL bFadeIn )
+{
+}
+
+
diff --git a/sfx2/source/dialog/intro.cxx b/sfx2/source/dialog/intro.cxx
new file mode 100644
index 000000000000..88dbbb0a566a
--- /dev/null
+++ b/sfx2/source/dialog/intro.cxx
@@ -0,0 +1,119 @@
+/*************************************************************************
+ *
+ * $RCSfile: intro.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:30 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#pragma hdrstop
+
+#include "intro.hxx"
+
+// -----------------------------------------------------------------------
+
+void IntroWindow_Impl::Init()
+{
+ Size aSize = aIntroBmp.GetSizePixel();
+ SetOutputSizePixel( aSize );
+ Size aScreenSize( GetDesktopRectPixel().GetSize() );
+ Size aWinSize( GetSizePixel() );
+ Point aWinPos( ( aScreenSize.Width() - aWinSize.Width() ) / 2,
+ ( aScreenSize.Height() - aWinSize.Height() ) / 2 );
+ SetPosPixel( aWinPos );
+
+ if ( GetColorCount() >= 16 )
+ {
+ Show();
+ Update();
+ }
+}
+
+// -----------------------------------------------------------------------
+
+IntroWindow_Impl::IntroWindow_Impl( const Bitmap& rBmp ) :
+
+ WorkWindow( NULL, (WinBits)0 ),
+
+ aIntroBmp( rBmp )
+
+{
+ Hide();
+ Init();
+}
+
+// -----------------------------------------------------------------------
+
+IntroWindow_Impl::~IntroWindow_Impl()
+{
+ Hide();
+}
+
+// -----------------------------------------------------------------------
+
+void IntroWindow_Impl::Paint( const Rectangle& )
+{
+ DrawBitmap( Point(), aIntroBmp );
+ Flush();
+}
+
+// -----------------------------------------------------------------------
+
+void IntroWindow_Impl::Slide()
+{
+}
+
+
diff --git a/sfx2/source/dialog/macropg.cxx b/sfx2/source/dialog/macropg.cxx
new file mode 100644
index 000000000000..5ca4c53548bf
--- /dev/null
+++ b/sfx2/source/dialog/macropg.cxx
@@ -0,0 +1,698 @@
+/*************************************************************************
+ *
+ * $RCSfile: macropg.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:30 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _RCID_H
+#include <vcl/rcid.h>
+#endif
+#ifndef _BASMGR_HXX //autogen
+#include <basic/basmgr.hxx>
+#endif
+#pragma hdrstop
+
+#define ITEMID_MACRO 0
+#include "macropg.hxx"
+#undef ITEMID_MACRO
+
+#define _SVSTDARR_STRINGSDTOR
+#include <svtools/svstdarr.hxx>
+
+#ifdef VCL
+#ifndef _SV_MEDIT_HXX
+#include <svtools/svmedit.hxx>
+#endif
+#endif
+
+#include "cfg.hxx"
+#include "app.hxx"
+#include "objsh.hxx"
+#include "macropg.hrc"
+#include "sfxresid.hxx"
+#include "dialog.hrc"
+#include "macrconf.hxx"
+#include "sfxdefs.hxx"
+
+#if SUPD>399
+SvStringsDtor* _ImpGetRangeHdl( _SfxMacroTabPage*, const String& rLanguage );
+SvStringsDtor* _ImpGetMacrosOfRangeHdl( _SfxMacroTabPage*, const String& rLanguage,
+ const String& rRange );
+#else
+SvStringsDtor* _ImpGetRangeHdl( _SfxMacroTabPage*, ScriptType eType );
+SvStringsDtor* _ImpGetMacrosOfRangeHdl( _SfxMacroTabPage*, ScriptType eType,
+ const String& rRange );
+#endif
+static USHORT __FAR_DATA aPageRg[] = {
+ SID_ATTR_MACROITEM, SID_ATTR_MACROITEM,
+ 0
+};
+
+// Achtung im Code wird dieses Array direkt (0, 1, ...) indiziert
+static long nTabs[] =
+ {
+ 2, // Number of Tabs
+ 0, 90
+ };
+
+#define LB_EVENTS_ITEMPOS 1
+#define LB_MACROS_ITEMPOS 2
+
+String ConvertToUIName_Impl( SvxMacro *pMacro, const String& rLanguage )
+{
+ String aName( pMacro->GetMacName() );
+ String aEntry;
+ if ( ! pMacro->GetLanguage().EqualsAscii("JavaScript") )
+ {
+ USHORT nCount = aName.GetTokenCount('.');
+ aEntry = aName.GetToken( nCount-1, '.' );
+ if ( nCount > 2 )
+ {
+ aEntry += '(';
+ aEntry += aName.GetToken( 0, '.' );
+ aEntry += '.';
+ aEntry += aName.GetToken( nCount-2, '.' );
+ aEntry += ')';
+ }
+ return aEntry;
+ }
+ else
+ return aName;
+}
+
+void _SfxMacroTabPage::EnableButtons( const String& rLangName )
+{
+ // Solange die Eventbox leer ist, nichts tun
+ const SvLBoxEntry* pE = pEventLB->FirstSelected();
+ if ( pE )
+ {
+ // Gebundenes Macro holen
+ const SvxMacro* pM = aTbl.Get( (USHORT)(ULONG) pE->GetUserData() );
+ pDeletePB->Enable( 0 != pM && !bReadOnly );
+
+ // Bei gleichem ScriptType Zuweisung nur, wenn Macro sich
+ // ge"andert hat; bei verschiedenem ScriptType, wenn Script nicht leer
+ String sEventMacro;
+ sEventMacro = ((SvLBoxString*)pE->GetItem( LB_MACROS_ITEMPOS ))->GetText();
+ if ( rLangName.EqualsAscii("JavaScript") )
+ {
+#if SUPD<582
+ String sScript = pJavaED->GetText();
+ if( pM && rLangName != pM->GetLanguage() )
+ pAssignPB->Enable( TRUE && !bReadOnly );
+ else
+ pAssignPB->Enable( !bReadOnly && sScript.Len() && ( !sEventMacro.Len() || sScript != sEventMacro ) );
+#endif
+ }
+ else
+ {
+ SfxMacroInfo *pInfo = pMacroLB->GetMacroInfo();
+ String sSelMacro;
+ if ( pInfo )
+ sSelMacro = pInfo->GetMacroName();
+ if( pM && rLangName != pM->GetLanguage() )
+ pAssignPB->Enable( pInfo != 0 && !bReadOnly );
+ else
+ pAssignPB->Enable( pInfo && !bReadOnly && !sSelMacro.EqualsIgnoreCaseAscii( sEventMacro ) );
+ }
+ }
+}
+
+_SfxMacroTabPage::_SfxMacroTabPage( Window* pParent, const ResId& rResId,
+ const SfxItemSet& rAttrSet )
+ : SfxTabPage( pParent, rResId, rAttrSet ),
+ pAssignPB( 0 ),
+ pDeletePB( 0 ),
+// pBasicRB( 0 ),
+// pJavaScriptRB( 0 ),
+ pScriptTypeLB( 0 ),
+ pEventLB( 0 ),
+ pGroupLB( 0 ),
+ pMacroLB( 0 ),
+ pEventGB( 0 ),
+ pMacroGB( 0 ),
+#if SUPD<582
+ pJavaStr( 0 ),
+ pJavaED( 0 ),
+#endif
+ pMacroStr( 0 ),
+ fnGetRange( &_ImpGetRangeHdl ),
+ fnGetMacroOfRange( &_ImpGetMacrosOfRangeHdl ),
+ bReadOnly( FALSE )
+{
+}
+
+_SfxMacroTabPage::~_SfxMacroTabPage()
+{
+ delete pAssignPB;
+ delete pDeletePB;
+// delete pBasicRB;
+// delete pJavaScriptRB;
+ delete pScriptTypeLB;
+ delete pEventLB;
+ delete pGroupLB;
+ delete pMacroLB;
+ delete pEventGB;
+ delete pMacroGB;
+#if SUPD<582
+ delete pJavaStr;
+ delete pJavaED;
+#endif
+ delete pMacroStr;
+}
+
+void _SfxMacroTabPage::AddEvent( const String & rEventName, USHORT nEventId )
+{
+ String sTmp( rEventName );
+ sTmp += '\t';
+
+ // falls die Tabelle schon gueltig ist
+ SvxMacro* pM = aTbl.Get( nEventId );
+ if( pM )
+ {
+ String sNew( ConvertToUIName_Impl( pM, pScriptTypeLB->GetSelectEntry() ) );
+ sTmp += sNew;
+ }
+
+ SvLBoxEntry* pE = pEventLB->InsertEntry( sTmp );
+ pE->SetUserData( (void*)nEventId );
+}
+
+void _SfxMacroTabPage::ScriptChanged( const String& aLangName )
+{
+ // neue Bereiche und deren Funktionen besorgen
+#if SUPD<582
+ if ( aLangName == "JavaScript" )
+ {
+ const SvLBoxEntry* pE = pEventLB->FirstSelected();
+ if( pE )
+ {
+ const SvxMacro* pM = aTbl.Get( (USHORT)(ULONG)pE->GetUserData() );
+ if ( pM && pM->GetMacName().Len() && aLangName == pM->GetLanguage() )
+ pJavaED->SetText( pM->GetMacName() );
+ }
+
+ pJavaED->Show();
+ pGroupLB->Hide();
+ pMacroLB->Hide();
+ pMacroGB->SetText( *pJavaStr );
+ }
+ else
+#endif
+ {
+#if SUPD<582
+ pJavaED->Hide();
+#endif
+ pGroupLB->SetScriptType( aLangName );
+ pGroupLB->Show();
+ pMacroLB->Show();
+ pMacroGB->SetText( *pMacroStr );
+ }
+
+ EnableButtons( aLangName );
+}
+
+BOOL _SfxMacroTabPage::FillItemSet( SfxItemSet& rSet )
+{
+ SvxMacroItem aItem( GetWhich( aPageRg[0] ) );
+ ((SvxMacroTableDtor&)aItem.GetMacroTable()) = aTbl;
+
+ const SfxPoolItem* pItem;
+ if( SFX_ITEM_SET != GetItemSet().GetItemState( aItem.Which(), TRUE, &pItem )
+ || aItem != *(SvxMacroItem*)pItem )
+ {
+ rSet.Put( aItem );
+ return TRUE;
+ }
+ return FALSE;
+}
+
+void _SfxMacroTabPage::Reset( const SfxItemSet& rSet )
+{
+ const SfxPoolItem* pItem;
+ if( SFX_ITEM_SET == rSet.GetItemState( GetWhich( aPageRg[0] ), TRUE, &pItem ))
+ aTbl = ((SvxMacroItem*)pItem)->GetMacroTable();
+
+ FillEvents();
+
+ SvLBoxEntry* pE = pEventLB->GetEntry( 0 );
+ if( pE )
+ pEventLB->SetCurEntry( pE );
+}
+
+IMPL_STATIC_LINK( _SfxMacroTabPage, SelectEvent_Impl, SvTabListBox*, EMPTYARG )
+{
+ SvLBoxEntry* pE = pThis->pEventLB->FirstSelected();
+ ULONG nPos;
+ if( !pE || LISTBOX_ENTRY_NOTFOUND ==
+ ( nPos = pThis->pEventLB->GetModel()->GetAbsPos( pE ) ) )
+ {
+ DBG_ASSERT( pE, "wo kommt der leere Eintrag her?" );
+ return 0;
+ }
+
+ USHORT nEventId = (USHORT)(ULONG)pE->GetUserData();
+ String aLanguage = pThis->pScriptTypeLB->GetSelectEntry();
+
+ const SvxMacro* pM = pThis->aTbl.Get( nEventId );
+ if( pM )
+ {
+ if( aLanguage != pM->GetLanguage() )
+ {
+ pThis->pScriptTypeLB->SelectEntry( pM->GetLanguage() );
+ pThis->ScriptChanged( pM->GetLanguage() );
+ }
+ else if ( aLanguage.EqualsAscii("JavaScript") )
+ {
+#if SUPD<582
+
+ const SvxMacro* pM = 0;
+ const SvLBoxEntry* pE = pThis->pEventLB->FirstSelected();
+ if( pE &&
+ ( pM = pThis->aTbl.Get( (USHORT)(ULONG)pE->GetUserData() ) ) != 0 &&
+ pM->GetMacName().Len() )
+ pThis->pJavaED->SetText( pM->GetMacName() );
+#endif
+ }
+ }
+
+ pThis->EnableButtons( aLanguage );
+ return 0;
+}
+
+IMPL_STATIC_LINK( _SfxMacroTabPage, SelectGroup_Impl, ListBox*, EMPTYARG )
+{
+ String sSel( pThis->pGroupLB->GetGroup() );
+ String aLanguage = pThis->pScriptTypeLB->GetSelectEntry();
+ if ( !aLanguage.EqualsAscii("JavaScript") )
+ {
+ pThis->pGroupLB->GroupSelected();
+ SfxMacroInfo *pMacro = pThis->pMacroLB->GetMacroInfo();
+ if ( !pMacro )
+ // Wenn dort ein Macro drin ist, wurde es selektiert und der
+ // AssignButton schon in SelectMacro richtig enabled
+ pThis->pAssignPB->Enable( FALSE );
+ }
+ return 0;
+}
+
+IMPL_STATIC_LINK( _SfxMacroTabPage, SelectMacro_Impl, ListBox*, EMPTYARG )
+{
+ pThis->pMacroLB->FunctionSelected();
+ pThis->EnableButtons( pThis->pScriptTypeLB->GetSelectEntry() );
+ return 0;
+}
+
+IMPL_STATIC_LINK( _SfxMacroTabPage, GetFocus_Impl, Edit*, EMPTYARG )
+{
+ pThis->EnableButtons( DEFINE_CONST_UNICODE("JavaScript") );
+ return 0;
+}
+
+IMPL_STATIC_LINK( _SfxMacroTabPage, AssignDeleteHdl_Impl, PushButton*, pBtn )
+{
+ SvLBoxEntry* pE = pThis->pEventLB->FirstSelected();
+ ULONG nPos;
+ if( !pE || LISTBOX_ENTRY_NOTFOUND ==
+ ( nPos = pThis->pEventLB->GetModel()->GetAbsPos( pE ) ) )
+ {
+ DBG_ASSERT( pE, "wo kommt der leere Eintrag her?" );
+ return 0;
+ }
+
+ const BOOL bAssEnabled = pBtn != pThis->pDeletePB &&
+ pThis->pAssignPB->IsEnabled();
+
+ // aus der Tabelle entfernen
+ USHORT nEvent = (USHORT)(ULONG)pE->GetUserData();
+ SvxMacro *pMacro = pThis->aTbl.Remove( nEvent );
+ delete pMacro;
+
+ String aLanguage = pThis->pScriptTypeLB->GetSelectEntry();
+ String sNew;
+ if( bAssEnabled )
+ {
+ String sGroup;
+ String sMacro;
+ String aEntryText( sNew );
+ if ( aLanguage.EqualsAscii("JavaScript") )
+ {
+#if SUPD<582
+ sNew = sMacro = pThis->pJavaED->GetText();
+#endif
+ }
+ else
+ {
+ SfxMacroInfo *pMacro = pThis->pMacroLB->GetMacroInfo();
+ sMacro = pMacro->GetQualifiedName();
+ sGroup = pThis->pGroupLB->GetGroup();
+ sNew = pMacro->GetMacroName();
+ }
+
+ if ( aLanguage.EqualsAscii("StarBasic") )
+ pThis->aTbl.Insert( nEvent, new SvxMacro( sMacro, sGroup, STARBASIC ) );
+ else
+ pThis->aTbl.Insert( nEvent, new SvxMacro( sMacro, aLanguage ) );
+ }
+
+ pThis->pEventLB->SetUpdateMode( FALSE );
+ pE->ReplaceItem( new SvLBoxString( pE, 0, sNew ), LB_MACROS_ITEMPOS );
+ pThis->pEventLB->GetModel()->InvalidateEntry( pE );
+ pThis->pEventLB->Select( pE );
+ pThis->pEventLB->MakeVisible( pE );
+ pThis->pEventLB->SetUpdateMode( TRUE );
+
+ pThis->EnableButtons( aLanguage );
+ return 0;
+}
+
+IMPL_STATIC_LINK( _SfxMacroTabPage, ChangeScriptHdl_Impl, RadioButton*, EMPTYARG )
+{
+ pThis->ScriptChanged( pThis->pScriptTypeLB->GetSelectEntry() );
+ return 0;
+}
+
+void _SfxMacroTabPage::InitAndSetHandler()
+{
+ // Handler installieren
+ Link aLnk(STATIC_LINK(this, _SfxMacroTabPage, AssignDeleteHdl_Impl ));
+ pMacroLB->SetDoubleClickHdl( aLnk );
+ pDeletePB->SetClickHdl( aLnk );
+ pAssignPB->SetClickHdl( aLnk );
+ pEventLB->SetDoubleClickHdl( aLnk );
+
+ pEventLB->SetSelectHdl( STATIC_LINK( this, _SfxMacroTabPage, SelectEvent_Impl ));
+ pGroupLB->SetSelectHdl( STATIC_LINK( this, _SfxMacroTabPage, SelectGroup_Impl ));
+ pMacroLB->SetSelectHdl( STATIC_LINK( this, _SfxMacroTabPage, SelectMacro_Impl ));
+
+ pScriptTypeLB->SetSelectHdl( STATIC_LINK( this, _SfxMacroTabPage, ChangeScriptHdl_Impl ));
+
+#if SUPD<582
+ pJavaED->SetGetFocusHdl( STATIC_LINK( this, _SfxMacroTabPage, GetFocus_Impl ));
+ pJavaED->SetModifyHdl( STATIC_LINK( this, _SfxMacroTabPage, GetFocus_Impl ));
+#endif
+
+ pEventLB->SetWindowBits( WB_HSCROLL|WB_CLIPCHILDREN );
+ pEventLB->SetSelectionMode( SINGLE_SELECTION );
+ pEventLB->SetTabs( &nTabs[0], MAP_APPFONT );
+ pEventLB->Resize(); // OS: Hack fuer richtige Selektion
+// pEventLB->SetFont( SFX_APP()->GetAppFont() );
+ pEventLB->SetSpaceBetweenEntries( 0 );
+
+ pEventLB->Show();
+
+ pEventLB->Enable( TRUE );
+ pGroupLB->Enable( TRUE );
+ pMacroLB->Enable( TRUE );
+
+ pScriptTypeLB->SetDropDownLineCount( 3 );
+ pScriptTypeLB->InsertEntry( DEFINE_CONST_UNICODE("StarBasic") );
+
+#if SUPD<582
+ pScriptTypeLB->InsertEntry( DEFINE_CONST_UNICODE("StarScript") );
+ pScriptTypeLB->InsertEntry( DEFINE_CONST_UNICODE("JavaScript") );
+#endif
+
+ pScriptTypeLB->SelectEntry( DEFINE_CONST_UNICODE("StarBasic") );
+
+ pGroupLB->SetFunctionListBox( pMacroLB );
+ FillMacroList();
+}
+
+void _SfxMacroTabPage::FillMacroList()
+{
+ String aLanguage = pScriptTypeLB->GetSelectEntry();
+ if( ! aLanguage.EqualsAscii("JavaScript") )
+ {
+ // 2 Listboxen
+ SvStringsDtor* pArr = (*fnGetRange)( this, DEFINE_CONST_UNICODE("StarBasic") );
+ if( pArr )
+ {
+ pGroupLB->Init( pArr );
+ delete pArr;
+ }
+ }
+}
+
+void _SfxMacroTabPage::FillEvents()
+{
+ String aLanguage = pScriptTypeLB->GetSelectEntry();
+
+ // Events aus der Tabelle holen und die EventListBox entsprechen fuellen
+ for( ULONG n = 0; n < pEventLB->GetEntryCount(); ++n )
+ {
+ SvLBoxEntry* pE = pEventLB->GetEntry( n );
+ if( pE )
+ {
+ SvLBoxString* pLItem = (SvLBoxString*)pE->GetItem( LB_MACROS_ITEMPOS );
+ DBG_ASSERT( pLItem && SV_ITEM_ID_LBOXSTRING == pLItem->IsA(), "kein LBoxString" );
+
+ String sOld( pLItem->GetText() ), sNew;
+ USHORT nEventId = (USHORT)(ULONG)pE->GetUserData();
+ if( aTbl.IsKeyValid( nEventId ) )
+ {
+ // Event vorhanden
+ sNew = ConvertToUIName_Impl( aTbl.Get( nEventId ), aLanguage );
+ }
+
+ if( sOld != sNew )
+ {
+ pE->ReplaceItem( new SvLBoxString( pE, 0, sNew ), LB_MACROS_ITEMPOS );
+ pEventLB->GetModel()->InvalidateEntry( pE );
+ }
+ }
+ }
+}
+
+void _SfxMacroTabPage::SelectEvent( const String & rEventName, USHORT nEventId )
+{
+/*
+ String sTmp( rEventName );
+ sTmp += '\t';
+
+ // falls die Tabelle schon gueltig ist
+ SvxMacro* pM = aTbl.Get( nEventId );
+ if( pM )
+ {
+ String sNew( ConvertToUIName_Impl( pM, pScriptTypeLB->GetSelectEntry() ) );
+ sTmp += sNew;
+ }
+*/
+ for( ULONG n = 0; n < pEventLB->GetEntryCount(); ++n )
+ {
+ SvLBoxEntry* pE = pEventLB->GetEntry( n );
+// if( pE && pE->GetEntryText() == sTmp )
+ if( pE && (USHORT) (ULONG) pE->GetUserData() == nEventId )
+ {
+ pEventLB->SetCurEntry( pE );
+ pEventLB->MakeVisible( pE );
+ break;
+ }
+ }
+}
+
+
+/* */
+
+SvStringsDtor* __EXPORT _ImpGetRangeHdl( _SfxMacroTabPage* pTbPg, const String& rLanguage )
+{
+ SvStringsDtor* pNew = new SvStringsDtor;
+ SfxApplication* pSfxApp = SFX_APP();
+
+ if ( !rLanguage.EqualsAscii("JavaScript") )
+ {
+ pSfxApp->EnterBasicCall();
+
+ // AppBasic einf"ugen
+ String* pNewEntry = new String( pSfxApp->GetName() );
+ pNew->Insert( pNewEntry, pNew->Count() );
+
+ // Aktuelles Dokument
+ SfxObjectShell* pDoc = SfxObjectShell::Current();
+ if ( pDoc )
+ {
+ String aTitle = pDoc->GetTitle();
+
+ // Hack f"ur Aufruf aus der Basic-IDE : das Basic ermitteln, das
+ // gerade bearbeitet wird
+
+ String aAppName(DEFINE_CONST_UNICODE("BASIC - "));
+ USHORT nLen = aAppName.Len();
+ if ( aTitle.CompareIgnoreCaseToAscii( aAppName, nLen ) == COMPARE_EQUAL )
+ {
+ // Basic-Namensprefix entfernen
+ aTitle.Erase( 0, nLen );
+ USHORT nIndex=0, nCount=aTitle.GetTokenCount('.');
+ if ( nCount > 1 )
+ {
+ // Namen der Library entfernen
+ aTitle.GetToken( nCount-2, '.', nIndex );
+ aTitle.Erase( nIndex-1 );
+ }
+
+ // Wenn das App-Basic gerade in der Basic-IDE bearbeitet wird, kein
+ // Dokument verwenden
+ pDoc = SfxObjectShell::GetFirst();
+ while( pDoc )
+ {
+ if ( aTitle == pDoc->GetTitle() )
+ break;
+ pDoc = SfxObjectShell::GetNext( *pDoc );
+ }
+ }
+
+ if ( pDoc && pDoc->GetBasicManager() != SFX_APP()->GetBasicManager() &&
+ pDoc->GetBasicManager()->GetLibCount() )
+ {
+ pNewEntry = new String( aTitle );
+ pNew->Insert( pNewEntry, pNew->Count() );
+ }
+ }
+
+ pSfxApp->LeaveBasicCall();
+ }
+
+ return pNew;
+}
+
+// besorgen der Funktionen eines Bereiches
+SvStringsDtor* __EXPORT _ImpGetMacrosOfRangeHdl( _SfxMacroTabPage* pTbPg,
+ const String& rLanguage, const String& rRange )
+{
+ SvStringsDtor* pNew = new SvStringsDtor;
+ return pNew;
+}
+
+/* */
+
+SfxMacroTabPage::SfxMacroTabPage( Window* pParent, const ResId& rResId,
+ const SfxItemSet& rSet )
+ : _SfxMacroTabPage( pParent, rResId, rSet )
+{
+ pEventGB = new GroupBox(this, SfxResId(GB_EVENT) );
+ pEventLB = new SvTabListBox(this, SfxResId(LB_EVENT) );
+ pAssignPB = new PushButton( this, SfxResId(PB_ASSIGN) );
+ pDeletePB = new PushButton( this, SfxResId(PB_DELETE) );
+ pScriptTypeLB = new ListBox(this, SfxResId(LB_SCRIPTTYPE) );
+ pMacroGB = new GroupBox( this, SfxResId(GB_MACRO) );
+ pGroupLB = new SfxConfigGroupListBox_Impl( this, SfxResId(LB_GROUP) );
+ pMacroLB = new SfxConfigFunctionListBox_Impl( this, SfxResId(LB_MACROS) );
+ pMacroStr = new String( SfxResId(STR_MACROS) );
+#if SUPD<582
+ pJavaStr = new String( SfxResId(STR_JAVASCRIPT) );
+ pJavaED = new MultiLineEdit( this, SfxResId(ED_JAVASCRIPT) );
+#endif
+
+ FreeResource();
+// SetExchangeSupport();
+
+ InitAndSetHandler();
+
+ ScriptChanged( DEFINE_CONST_UNICODE("StarBasic") );
+}
+
+SfxTabPage* SfxMacroTabPage::Create( Window* pParent, const SfxItemSet& rAttrSet )
+{
+ return new SfxMacroTabPage( pParent, SfxResId( RID_SFX_TP_MACROASSIGN), rAttrSet );
+}
+
+/* */
+
+SfxSmallMacroTabPage::SfxSmallMacroTabPage( Window* pParent, const ResId& rResId,
+ const SfxItemSet& rSet )
+ : _SfxMacroTabPage( pParent, rResId, rSet )
+{
+ pEventGB = new GroupBox(this, SfxResId(GB_EVENT) );
+ pEventLB = new SvTabListBox(this, SfxResId(LB_EVENT) );
+ pAssignPB = new PushButton( this, SfxResId(PB_ASSIGN) );
+ pDeletePB = new PushButton( this, SfxResId(PB_DELETE) );
+ pScriptTypeLB = new ListBox(this, SfxResId(LB_SCRIPTTYPE) );
+ pMacroGB = new GroupBox( this, SfxResId(GB_MACRO) );
+ pGroupLB = new SfxConfigGroupListBox_Impl( this, SfxResId(LB_GROUP) );
+ pMacroLB = new SfxConfigFunctionListBox_Impl( this, SfxResId(LB_MACROS) );
+ pMacroStr = new String( SfxResId(STR_MACROS) );
+#if SUPD<582
+ pJavaStr = new String( SfxResId(STR_JAVASCRIPT) );
+ pJavaED = new MultiLineEdit( this, SfxResId(ED_JAVASCRIPT) );
+#endif
+ FreeResource();
+// SetExchangeSupport();
+
+ InitAndSetHandler();
+
+ ScriptChanged( DEFINE_CONST_UNICODE("StarBasic") );
+}
+
+SfxTabPage* SfxSmallMacroTabPage::Create( Window* pParent, const SfxItemSet& rAttrSet )
+{
+ return new SfxMacroTabPage( pParent, SfxResId( RID_SFX_SMALLTP_MACROASSIGN), rAttrSet );
+}
+
+/* */
+
+SfxMacroAssignDlg::SfxMacroAssignDlg( Window* pParent, SfxItemSet& rSet )
+ : SfxSingleTabDialog( pParent, rSet, 0 )
+{
+ SetTabPage( SfxMacroTabPage::Create( this, rSet ) );
+}
+
+SfxMacroAssignDlg::~SfxMacroAssignDlg()
+{
+}
+
+
diff --git a/sfx2/source/dialog/macropg.hrc b/sfx2/source/dialog/macropg.hrc
new file mode 100644
index 000000000000..3bbf2ae305c8
--- /dev/null
+++ b/sfx2/source/dialog/macropg.hrc
@@ -0,0 +1,80 @@
+/*************************************************************************
+ *
+ * $RCSfile: macropg.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:30 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _MACROPG_HRC
+#define _MACROPG_HRC
+
+#define GB_EVENT 1
+#define LB_EVENT 2
+#define PB_ASSIGN 3
+#define PB_DELETE 4
+#define GB_MACRO 5
+#define LB_GROUP 6
+#define LB_MACROS 7
+#define LB_SCRIPTTYPE 8
+#define STR_JAVASCRIPT 10
+#define STR_MACROS 11
+#define ED_JAVASCRIPT 12
+
+
+
+#endif
+
diff --git a/sfx2/source/dialog/macropg.src b/sfx2/source/dialog/macropg.src
new file mode 100644
index 000000000000..021c7a2e3590
--- /dev/null
+++ b/sfx2/source/dialog/macropg.src
@@ -0,0 +1,502 @@
+/*************************************************************************
+ *
+ * $RCSfile: macropg.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:30 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include "macropg.hrc"
+#include "dialog.hrc"
+#include "helpid.hrc"
+TabPage RID_SFX_TP_MACROASSIGN
+{
+ // HelpID = HID_MACROASSIGN ;
+ Hide = TRUE ;
+ SVLook = TRUE ;
+ Size = MAP_APPFONT ( 260 , 176 ) ;
+ Text = "Makro zuweisen" ;
+ Text [ English ] = "Assign macro" ;
+ Text [ english_us ] = "Assign Macro" ;
+ Text [ italian ] = "Assegna macro" ;
+ Text [ spanish ] = "Asignar macro" ;
+ Text [ french ] = "Assignation de macro" ;
+ Text [ dutch ] = "Macro toewijzen" ;
+ Text [ swedish ] = "Tilldela makro" ;
+ Text [ danish ] = "Tildel makro" ;
+ Text [ portuguese_brazilian ] = "Makro zuweisen" ;
+ Text [ portuguese ] = "Atribuir macro" ;
+ GroupBox GB_EVENT
+ {
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 192 , 68 ) ;
+ Text = "Ereignis" ;
+ Text [ ENGLISH ] = "Event" ;
+ Group = TRUE ;
+ Text [ english_us ] = "Event" ;
+ Text [ italian ] = "Evento" ;
+ Text [ spanish ] = "Acontecimiento" ;
+ Text [ french ] = "vnement" ;
+ Text [ dutch ] = "Gebeurtenis" ;
+ Text [ swedish ] = "Hndelse" ;
+ Text [ danish ] = "Begivenhed" ;
+ Text [ portuguese_brazilian ] = "Ereignis" ;
+ Text [ portuguese ] = "Acontecimento" ;
+ Text[ chinese_simplified ] = "¼";
+ Text[ russian ] = "";
+ Text[ polish ] = "Wydarzenie";
+ Text[ japanese ] = "s";
+ Text[ chinese_traditional ] = "ʧ@";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "̺Ʈ";
+ Text[ turkish ] = "Olay";
+ };
+ Control LB_EVENT
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 12 , 14 ) ;
+ Size = MAP_APPFONT ( 180 , 51 ) ;
+ TabStop = TRUE ;
+ ClipChildren = TRUE ;
+ Disable = TRUE ;
+ HelpID = HID_MACRO_LB_EVENT ;
+ };
+ GroupBox GB_MACRO
+ {
+ Pos = MAP_APPFONT ( 6 , 77 ) ;
+ Size = MAP_APPFONT ( 248 , 93 ) ;
+ Group = TRUE ;
+ };
+ Control LB_GROUP
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 12 , 88 ) ;
+ Size = MAP_APPFONT ( 111 , 76 ) ;
+ TabStop = TRUE ;
+ Group = TRUE ;
+ HelpId = HID_MACRO_GROUP ;
+ };
+ Control LB_MACROS
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 129 , 88 ) ;
+ Size = MAP_APPFONT ( 119 , 76 ) ;
+ TabStop = TRUE ;
+ Group = TRUE ;
+ HelpId = HID_MACRO_MACROS ;
+ };
+ PushButton PB_ASSIGN
+ {
+ Pos = MAP_APPFONT ( 204 , 6 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ // ### ACHTUNG: Neuer Text in Resource? Z~uweisen : Zuweisen
+ Text = "Z~uweisen" ;
+ Text [ English ] = "Assign" ;
+ Disable = TRUE ;
+ TabStop = TRUE ;
+ Text [ english_us ] = "~Assign" ;
+ Text [ italian ] = "Assegna" ;
+ Text [ spanish ] = "~Asignar" ;
+ Text [ french ] = "~Assigner" ;
+ Text [ dutch ] = "T~oewijzen" ;
+ Text [ swedish ] = "Till~dela" ;
+ Text [ danish ] = "Tildel" ;
+ Text [ portuguese_brazilian ] = "Z~uweisen" ;
+ Text [ portuguese ] = "~Atribuir" ;
+ Text[ chinese_simplified ] = "ָ(~A)";
+ Text[ russian ] = "";
+ Text[ polish ] = "P~rzypisz";
+ Text[ japanese ] = "蓖(~A)";
+ Text[ chinese_traditional ] = "w(~A)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "(~A)";
+ Text[ turkish ] = "A~ta";
+ };
+ PushButton PB_DELETE
+ {
+ Pos = MAP_APPFONT ( 204 , 23 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ Text = "~Aufheben" ;
+ Text [ English ] = "~Dismiss" ;
+ Disable = TRUE ;
+ TabStop = TRUE ;
+ Text [ english_us ] = "~Remove" ;
+ Text [ italian ] = "Elimina" ;
+ Text [ spanish ] = "~Eliminar" ;
+ Text [ french ] = "~liminer" ;
+ Text [ dutch ] = "~Opheffen" ;
+ Text [ swedish ] = "~Upphv" ;
+ Text [ danish ] = "Oph~v" ;
+ Text [ portuguese_brazilian ] = "~Aufheben" ;
+ Text [ portuguese ] = "~Limpar" ;
+ Text[ chinese_simplified ] = "ȡ(~R)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Usu";
+ Text[ japanese ] = "(~R)";
+ Text[ chinese_traditional ] = "(~R)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "(~R)";
+ Text[ turkish ] = "~Kaldr";
+ };
+ ListBox LB_SCRIPTTYPE
+ {
+ Pos = MAP_APPFONT ( 204 , 43 ) ;
+ Size = MAP_APPFONT ( 50 , 30 ) ;
+ Text = "~Scriptsprache" ;
+ TabStop = TRUE ;
+ Disable = FALSE ;
+ DropDown = TRUE ;
+ };
+ String STR_MACROS
+ {
+ Text = "Makros" ;
+ Text [ ENGLISH ] = "Macros" ;
+ Text [ dutch ] = "Macros" ;
+ Text [ english_us ] = "Macros" ;
+ Text [ italian ] = "Macro" ;
+ Text [ spanish ] = "Macros" ;
+ Text [ french ] = "Macros" ;
+ Text [ swedish ] = "Makron" ;
+ Text [ danish ] = "Makroer" ;
+ Text [ portuguese_brazilian ] = "Makros" ;
+ Text [ portuguese ] = "Macros" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "Makra";
+ Text[ japanese ] = "ϸ";
+ Text[ chinese_traditional ] = "";
+ Text[ arabic ] = " ";
+ Text[ greek ] = "";
+ Text[ korean ] = "ũ";
+ Text[ turkish ] = "Makro";
+ };
+ Text[ russian ] = " ";
+ Text[ greek ] = " ";
+ Text[ polish ] = "Przypisz makro";
+ Text[ japanese ] = "ϸۂ̊蓖";
+ Text[ korean ] = "ũ ";
+ Text[ chinese_simplified ] = "ָ";
+ Text[ chinese_traditional ] = "w";
+ Text[ turkish ] = "Makro ata";
+ Text[ arabic ] = " ";
+#if SUPD<582
+ String STR_JAVASCRIPT
+ {
+ Text = "JavaScript" ;
+ Text [ ENGLISH ] = "JavaScript" ;
+ Text [ english_us ] = "JavaScript" ;
+ Text [ swedish ] = "JavaScript" ;
+ Text [ danish ] = "JavaScript" ;
+ Text [ italian ] = "JavaScript" ;
+ Text [ spanish ] = "JavaScript" ;
+ Text [ french ] = "JavaScript" ;
+ Text [ dutch ] = "JavaScript" ;
+ Text [ portuguese_brazilian ] = "JavaScript" ;
+ Text [ portuguese ] = "JavaScript" ;
+ Text[ chinese_simplified ] = "JavaScript";
+ Text[ russian ] = "JavaScript";
+ Text[ polish ] = "JavaScript";
+ Text[ japanese ] = "JavaScript";
+ Text[ chinese_traditional ] = "JavaScript";
+ Text[ arabic ] = "JavaScript";
+ Text[ greek ] = "JavaScript";
+ Text[ korean ] = "JavaScript";
+ Text[ turkish ] = "JavaScript";
+ };
+ MultiLineEdit ED_JAVASCRIPT
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 12 , 88 ) ;
+ Size = MAP_APPFONT ( 236 , 76 ) ;
+ TabStop = TRUE ;
+ Left = TRUE ;
+ VScroll = TRUE ;
+ HScroll = TRUE ;
+ Hide = TRUE ;
+ IgnoreTab = TRUE ;
+ };
+#endif
+ Text[ chinese_simplified ] = "ָ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Przypisz makro";
+ Text[ japanese ] = "ϸۂ̊蓖";
+ Text[ chinese_traditional ] = "w";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = "Assign Macro";
+};
+TabPage RID_SFX_SMALLTP_MACROASSIGN
+{
+ // HelpID = HID_MACROASSIGN ;
+ Hide = TRUE ;
+ SVLook = TRUE ;
+ Size = MAP_APPFONT ( 260 , 135 ) ;
+ Text = "Makro zuweisen" ;
+ Text [ English ] = "Assign macro" ;
+ Text [ english_us ] = "Assign Macro" ;
+ Text [ italian ] = "Assegna macro" ;
+ Text [ spanish ] = "Asignar macro" ;
+ Text [ french ] = "Assignation de macro" ;
+ Text [ dutch ] = "Macro toewijzen" ;
+ Text [ swedish ] = "Tilldela makro" ;
+ Text [ danish ] = "Tildel makro" ;
+ Text [ portuguese_brazilian ] = "Makro zuweisen" ;
+ Text [ portuguese ] = "Atribuir macro" ;
+ GroupBox GB_EVENT
+ {
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 192 , 57 ) ;
+ Text = "Ereignis" ;
+ Text [ ENGLISH ] = "Event" ;
+ Group = TRUE ;
+ Text [ english_us ] = "Event" ;
+ Text [ italian ] = "Evento" ;
+ Text [ spanish ] = "Acontecimiento" ;
+ Text [ french ] = "vnement" ;
+ Text [ dutch ] = "Gebeurtenis" ;
+ Text [ swedish ] = "Hndelse" ;
+ Text [ danish ] = "Begivenhed" ;
+ Text [ portuguese_brazilian ] = "Ereignis" ;
+ Text [ portuguese ] = "Acontecimento" ;
+ Text[ chinese_simplified ] = "¼";
+ Text[ russian ] = "";
+ Text[ polish ] = "Wydarzenie";
+ Text[ japanese ] = "s";
+ Text[ chinese_traditional ] = "ʧ@";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "̺Ʈ";
+ Text[ turkish ] = "Olay";
+ };
+ Control LB_EVENT
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 12 , 14 ) ;
+ Size = MAP_APPFONT ( 180 , 40 ) ;
+ TabStop = TRUE ;
+ ClipChildren = TRUE ;
+ Disable = TRUE ;
+ HelpID = HID_MACRO_LB_EVENT ;
+ };
+ PushButton PB_ASSIGN
+ {
+ Pos = MAP_APPFONT ( 204 , 6 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ // ### ACHTUNG: Neuer Text in Resource? Z~uweisen : Zuweisen
+ Text = "Z~uweisen" ;
+ Text [ English ] = "Assign" ;
+ Disable = TRUE ;
+ TabStop = TRUE ;
+ Text [ english_us ] = "~Assign" ;
+ Text [ italian ] = "A~ssegna" ;
+ Text [ spanish ] = "~Asignar" ;
+ Text [ french ] = "~Assigner" ;
+ Text [ dutch ] = "T~oewijzen" ;
+ Text [ swedish ] = "Till~dela" ;
+ Text [ danish ] = "Tildel" ;
+ Text [ portuguese_brazilian ] = "Z~uweisen" ;
+ Text [ portuguese ] = "~Atribuir" ;
+ Text[ chinese_simplified ] = "ָ(~A)";
+ Text[ russian ] = "";
+ Text[ polish ] = "P~rzypisz";
+ Text[ japanese ] = "蓖(~A)";
+ Text[ chinese_traditional ] = "w(~A)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "(~A)";
+ Text[ turkish ] = "A~ta";
+ };
+ PushButton PB_DELETE
+ {
+ Pos = MAP_APPFONT ( 204 , 23 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ Text = "~Aufheben" ;
+ Text [ English ] = "~Dismiss" ;
+ Disable = TRUE ;
+ TabStop = TRUE ;
+ Text [ english_us ] = "~Remove" ;
+ Text [ italian ] = "~Rimuovi" ;
+ Text [ spanish ] = "~Eliminar" ;
+ Text [ french ] = "~liminer" ;
+ Text [ dutch ] = "~Opheffen" ;
+ Text [ swedish ] = "~Upphv" ;
+ Text [ danish ] = "Oph~v" ;
+ Text [ portuguese_brazilian ] = "~Aufheben" ;
+ Text [ portuguese ] = "~Limpar" ;
+ Text[ chinese_simplified ] = "ȡ(~R)";
+ Text[ russian ] = "";
+ Text[ polish ] = "~Usu";
+ Text[ japanese ] = "(~R)";
+ Text[ chinese_traditional ] = "(~R)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "(~R)";
+ Text[ turkish ] = "~Kaldr";
+ };
+ ListBox LB_SCRIPTTYPE
+ {
+ Pos = MAP_APPFONT ( 204 , 43 ) ;
+ Size = MAP_APPFONT ( 50 , 30 ) ;
+ Text = "~Scriptsprache" ;
+ TabStop = TRUE ;
+ Disable = FALSE ;
+ DropDown = TRUE ;
+ };
+ GroupBox GB_MACRO
+ {
+ Pos = MAP_APPFONT ( 6 , 66 ) ;
+ Size = MAP_APPFONT ( 248 , 63 ) ;
+ Group = TRUE ;
+ };
+ Control LB_GROUP
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 12 , 77 ) ;
+ Size = MAP_APPFONT ( 111 , 44 ) ;
+ TabStop = TRUE ;
+ Group = TRUE ;
+ HelpId = HID_MACRO_GROUP ;
+ };
+ Control LB_MACROS
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 129 , 77 ) ;
+ Size = MAP_APPFONT ( 119 , 44 ) ;
+ TabStop = TRUE ;
+ Group = TRUE ;
+ HelpId = HID_MACRO_MACROS ;
+ };
+ String STR_MACROS
+ {
+ Text = "Makros" ;
+ Text [ ENGLISH ] = "Macros" ;
+ Text [ dutch ] = "Macro's" ;
+ Text [ english_us ] = "Macros" ;
+ Text [ italian ] = "Macro" ;
+ Text [ spanish ] = "Macros" ;
+ Text [ french ] = "Macros" ;
+ Text [ swedish ] = "Makron" ;
+ Text [ danish ] = "Makroer" ;
+ Text [ portuguese_brazilian ] = "Makros" ;
+ Text [ portuguese ] = "Macros" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "Makra";
+ Text[ japanese ] = "ϸ";
+ Text[ chinese_traditional ] = "";
+ Text[ arabic ] = " ";
+ Text[ greek ] = "";
+ Text[ korean ] = "ũ";
+ Text[ turkish ] = "Makro";
+ };
+ Text[ russian ] = " ";
+ Text[ greek ] = " ";
+ Text[ polish ] = "Przypisz makro";
+ Text[ japanese ] = "ϸۂ̊蓖";
+ Text[ korean ] = "ũ ";
+ Text[ chinese_simplified ] = "ָ";
+ Text[ chinese_traditional ] = "w";
+ Text[ turkish ] = "Makro ata";
+ Text[ arabic ] = " ";
+#if SUPD<582
+ String STR_JAVASCRIPT
+ {
+ Text = "JavaScript" ;
+ Text [ ENGLISH ] = "JavaScript" ;
+ Text [ english_us ] = "JavaScript" ;
+ Text [ swedish ] = "JavaScript" ;
+ Text [ danish ] = "JavaScript" ;
+ Text [ italian ] = "JavaScript" ;
+ Text [ spanish ] = "JavaScript" ;
+ Text [ french ] = "JavaScript" ;
+ Text [ dutch ] = "JavaScript" ;
+ Text [ portuguese_brazilian ] = "JavaScript" ;
+ Text [ portuguese ] = "JavaScript" ;
+ Text[ chinese_simplified ] = "JavaScript";
+ Text[ russian ] = "JavaScript";
+ Text[ polish ] = "JavaScript";
+ Text[ japanese ] = "JavaScript";
+ Text[ chinese_traditional ] = "JavaScript";
+ Text[ arabic ] = "JavaScript";
+ Text[ greek ] = "JavaScript";
+ Text[ korean ] = "JavaScript";
+ Text[ turkish ] = "JavaScript";
+ };
+ MultiLineEdit ED_JAVASCRIPT
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 12 , 77 ) ;
+ Size = MAP_APPFONT ( 236 , 44 ) ;
+ TabStop = TRUE ;
+ Left = TRUE ;
+ VScroll = TRUE ;
+ HScroll = TRUE ;
+ Hide = TRUE ;
+ IgnoreTab = TRUE ;
+ };
+#endif
+ Text[ chinese_simplified ] = "ָ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Przypisz makro";
+ Text[ japanese ] = "ϸۂ̊蓖";
+ Text[ chinese_traditional ] = "w";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = "Assign Macro";
+};
diff --git a/sfx2/source/dialog/mailmodel.cxx b/sfx2/source/dialog/mailmodel.cxx
new file mode 100644
index 000000000000..41c617213716
--- /dev/null
+++ b/sfx2/source/dialog/mailmodel.cxx
@@ -0,0 +1,364 @@
+/*************************************************************************
+ *
+ * $RCSfile: mailmodel.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:30 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+// includes --------------------------------------------------------------
+
+#ifndef _COM_SUN_STAR_CHAOS_XDATACONTAINER_HPP_
+#include <com/sun/star/chaos/XDataContainer.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UCB_COMMANDABORTEDEXCEPTION_HPP_
+#include <com/sun/star/ucb/CommandAbortedException.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UNO_REFERENCE_H_
+#include <com/sun/star/uno/Reference.h>
+#endif
+
+#include "mailmodel.hxx"
+#include "bindings.hxx"
+#include "dispatch.hxx"
+#include "viewfrm.hxx"
+#include "docfile.hxx"
+#include "docfilt.hxx"
+#include "docfac.hxx"
+#include "fcontnr.hxx"
+#include "objshimp.hxx"
+
+#include "sfxsids.hrc"
+
+#include <tools/tempfile.hxx>
+#include <svtools/stritem.hxx>
+#include <svtools/eitem.hxx>
+#include <unotools/processfactory.hxx>
+#include <ucbhelper/content.hxx>
+
+using namespace com::sun::star::chaos;
+using namespace com::sun::star::lang;
+using namespace com::sun::star::uno;
+
+// class AddressList_Impl ------------------------------------------------
+
+typedef String* AddressItemPtr_Impl;
+DECLARE_LIST( AddressList_Impl, AddressItemPtr_Impl );
+
+// class SfxMailModel_Impl -----------------------------------------------
+
+void SfxMailModel_Impl::ClearList( AddressList_Impl* pList )
+{
+ if ( pList )
+ {
+ ULONG i, nCount = pList->Count();
+ for ( i = 0; i < nCount; ++i )
+ delete pList->GetObject(i);
+ pList->Clear();
+ }
+}
+
+void SfxMailModel_Impl::MakeValueList( AddressList_Impl* pList, String& rValueList )
+{
+ rValueList.Erase();
+ if ( pList )
+ {
+ ULONG i, nCount = pList->Count();
+ for ( i = 0; i < nCount; ++i )
+ {
+ if ( rValueList.Len() > 0 )
+ rValueList += ',';
+ rValueList += *pList->GetObject(i);
+ }
+ }
+}
+
+sal_Bool SfxMailModel_Impl::SaveDocument( String& rFileName, String& rType )
+{
+ sal_Bool bRet = sal_False;
+ SfxViewFrame* pTopViewFrm = mpBindings->GetDispatcher_Impl()->GetFrame()->GetTopViewFrame();
+ SfxObjectShellRef xDocShell = pTopViewFrm->GetObjectShell();
+
+ // save the document
+ if ( xDocShell.Is() && xDocShell->GetMedium() )
+ {
+ // save old settings
+ BOOL bOldDidDangerousSave = xDocShell->Get_Impl()->bDidDangerousSave;
+ BOOL bModified = xDocShell->IsModified();
+ // prepare for mail export
+ SfxDispatcher* pDisp = pTopViewFrm->GetDispatcher();
+ pDisp->Execute( SID_MAIL_PREPAREEXPORT, SFX_CALLMODE_SYNCHRON );
+ // detect filter
+ const SfxFilter* pFilter = xDocShell->GetMedium()->GetFilter();
+ sal_Bool bHasFilter = pFilter ? sal_True : sal_False;
+ if ( !pFilter )
+ {
+ SfxFilterMatcher aFilterMatcher( xDocShell->GetFactory().GetFilterContainer() );
+ pFilter = aFilterMatcher.GetDefaultFilter();
+ }
+ // create temp file name with leading chars and extension
+ String aLeadingStr( DEFINE_CONST_UNICODE("smail") );
+ sal_Bool bHasName = xDocShell->HasName();
+ if ( !bHasName )
+ aLeadingStr = String( DEFINE_CONST_UNICODE("noname") );
+ String* pExt = NULL;
+ if ( pFilter )
+ {
+ pExt = new String( pFilter->GetWildcard()() );
+ // erase the '*' from the extension (e.g. "*.sdw")
+ pExt->Erase( 0, 1 );
+ }
+ TempFile aTempFile( aLeadingStr, pExt );
+ rFileName = aTempFile.GetName();
+ // save document to temp file
+ SfxStringItem aFileName( SID_FILE_NAME, rFileName );
+ SfxBoolItem aPicklist( SID_PICKLIST, FALSE );
+ SfxBoolItem aSaveTo( SID_SAVETO, TRUE );
+ SfxStringItem* pFilterName = NULL;
+ if ( bHasFilter && pFilter )
+ pFilterName = new SfxStringItem( SID_FILTER_NAME, pFilter->GetName() );
+ pDisp->Execute( SID_SAVEASDOC, SFX_CALLMODE_SYNCHRON | SFX_CALLMODE_API,
+ &aFileName, &aPicklist, &aSaveTo, pFilterName, 0L );
+ delete pFilterName;
+ if ( pFilter )
+ {
+ // detect content type and expand with the file name
+ rType = pFilter->GetMimeType();
+ rType += DEFINE_CONST_UNICODE("; name =\"");
+ INetURLObject aFileObj = bHasName ? xDocShell->GetMedium()->GetURLObject()
+ : INetURLObject( rFileName );
+ rType += aFileObj.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET );
+ rType += '\"';
+ }
+ // restore old settings
+ if ( !bModified && xDocShell->IsEnableSetModified() )
+ xDocShell->SetModified( FALSE );
+ if ( !bOldDidDangerousSave )
+ xDocShell->Get_Impl()->bDidDangerousSave = sal_False;
+ bRet = sal_True;
+ }
+ return bRet;
+}
+
+IMPL_LINK_INLINE_START( SfxMailModel_Impl, DoneHdl, void*, EMPTYARG )
+{
+ mbLoadDone = sal_True;
+ return 0;
+}
+IMPL_LINK_INLINE_END( SfxMailModel_Impl, DoneHdl, void*, EMPTYARG )
+
+SfxMailModel_Impl::SfxMailModel_Impl( SfxBindings* pBinds ) :
+
+ mpToList ( NULL ),
+ mpCcList ( NULL ),
+ mpBccList ( NULL ),
+ mpBindings ( pBinds ),
+ mePriority ( PRIO_NORMAL ),
+ mbLoadDone ( sal_True )
+
+{
+}
+
+SfxMailModel_Impl::~SfxMailModel_Impl()
+{
+ ClearList( mpToList );
+ delete mpToList;
+ ClearList( mpCcList );
+ delete mpCcList;
+ ClearList( mpBccList );
+ delete mpBccList;
+}
+
+void SfxMailModel_Impl::AddAddress( const String& rAddress, AddressRole eRole )
+{
+ // don't add a empty address
+ if ( rAddress.Len() > 0 )
+ {
+ AddressList_Impl* pList = NULL;
+ if ( ROLE_TO == eRole )
+ {
+ if ( !mpToList )
+ // create the list
+ mpToList = new AddressList_Impl;
+ pList = mpToList;
+ }
+ else if ( ROLE_CC == eRole )
+ {
+ if ( !mpCcList )
+ // create the list
+ mpCcList = new AddressList_Impl;
+ pList = mpCcList;
+ }
+ else if ( ROLE_BCC == eRole )
+ {
+ if ( !mpBccList )
+ // create the list
+ mpBccList = new AddressList_Impl;
+ pList = mpBccList;
+ }
+ else
+ {
+ DBG_ERRORFILE( "invalid address role" );
+ }
+
+ if ( pList )
+ {
+ // add address to list
+ AddressItemPtr_Impl pAddress = new String( rAddress );
+ pList->Insert( pAddress, LIST_APPEND );
+ }
+ }
+}
+
+sal_Bool SfxMailModel_Impl::Send()
+{
+ sal_Bool bSend = sal_False;
+ String aFileName, aContentType;
+ if ( SaveDocument( aFileName, aContentType ) )
+ {
+ Reference < XMultiServiceFactory > xMgr = ::utl::getProcessServiceFactory();
+ Reference < XDataContainer > xData(
+ xMgr->createInstance( ::rtl::OUString::createFromAscii("com.sun.star.chaos.DataContainer") ), UNO_QUERY );
+ if ( xData.is() )
+ {
+ xData->setContentType( aContentType );
+ xData->setDataURL( aFileName );
+
+ try
+ {
+ Reference< ::com::sun::star::ucb::XCommandEnvironment > aCmdEnv;
+ String aURL = ::rtl::OUString( DEFINE_CONST_UNICODE("vnd.sun.staroffice.out:///~") );
+ ::ucb::Content aOutbox( aURL, aCmdEnv );
+ ::ucb::Content aMessage( aURL, aCmdEnv );
+
+ sal_Int32 nIdx = 0, nCount = 4;
+ sal_Bool bCc = sal_False, bBcc = sal_False;
+ if ( mpCcList && mpCcList->Count() > 0 )
+ {
+ bCc = sal_True;
+ nCount++;
+ }
+ if ( mpBccList && mpBccList->Count() > 0 )
+ {
+ bBcc = sal_True;
+ nCount++;
+ }
+ Sequence < ::rtl::OUString > aNamesList(nCount);
+ ::rtl::OUString* pNames = aNamesList.getArray();
+ pNames[nIdx++] = ::rtl::OUString::createFromAscii( "Title" );
+ pNames[nIdx++] = ::rtl::OUString::createFromAscii( "MessageFrom" );
+ pNames[nIdx++] = ::rtl::OUString::createFromAscii( "MessageTo" );
+ pNames[nIdx++] = ::rtl::OUString::createFromAscii( "MessageBody" );
+ if ( bCc )
+ pNames[nIdx++] = ::rtl::OUString::createFromAscii( "MessageCC" );
+ if ( bBcc )
+ pNames[nIdx++] = ::rtl::OUString::createFromAscii( "MessageBCC" );
+
+ nIdx = 0;
+ Sequence < Any > aValuesList(nCount);
+ Any* pValues = aValuesList.getArray();
+ pValues[nIdx++] = makeAny( ::rtl::OUString( maSubject ) );
+ pValues[nIdx++] = makeAny( ::rtl::OUString( maFromAddress ) );
+ String aValueList;
+ MakeValueList( mpToList, aValueList );
+ pValues[nIdx++] = makeAny( ::rtl::OUString( aValueList ) );
+ pValues[nIdx++] = makeAny( xData );
+ if ( bCc )
+ {
+ MakeValueList( mpCcList, aValueList );
+ pValues[nIdx++] = makeAny( ::rtl::OUString( aValueList ) );
+ }
+ if ( bBcc )
+ {
+ MakeValueList( mpBccList, aValueList );
+ pValues[nIdx++] = makeAny( ::rtl::OUString( aValueList ) );
+ }
+
+ bSend = aOutbox.insertNewContent(
+ ::rtl::OUString( DEFINE_CONST_UNICODE("application/vnd.sun.staroffice.message") ),
+ aNamesList, aValuesList, aMessage );
+ }
+ catch( ::ucb::ContentCreationException& e )
+ {
+ switch ( e.getReason() )
+ {
+ case ::ucb::ContentCreationException::NO_CONTENT_BROKER :
+ DBG_ERRORFILE( "no content broker" );
+ break;
+
+ default:
+ DBG_ERRORFILE( "ContentCreationException" );
+ }
+ }
+ catch( ::com::sun::star::ucb::CommandAbortedException& e )
+ {
+ ByteString aError( UniString( e.Message ), RTL_TEXTENCODING_MS_1252 );
+ DBG_ERRORFILE( aError.GetBuffer() );
+ }
+ catch( ... )
+ {
+ DBG_ERRORFILE( "Any other exception" );
+ }
+ }
+ }
+
+ return bSend;
+}
+
+
diff --git a/sfx2/source/dialog/mailwindow.src b/sfx2/source/dialog/mailwindow.src
new file mode 100644
index 000000000000..3f404b95ae9a
--- /dev/null
+++ b/sfx2/source/dialog/mailwindow.src
@@ -0,0 +1,545 @@
+/*************************************************************************
+ *
+ * $RCSfile: mailwindow.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:31 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include "dialog.hrc"
+#include "mailwindow.hrc"
+
+Window RID_MAIL_WINDOW
+{
+ HelpId = SID_MAIL_CHILDWIN ;
+ Pos = MAP_APPFONT( 0, 0 );
+ Size = MAP_APPFONT( 323, 87 );
+ DialogControl = TRUE ;
+ PushButton PB_MAILWIN_SEND
+ {
+ Pos = MAP_APPFONT( 6, 6 );
+ Size = MAP_APPFONT( 50, 14 );
+ Text = "~Senden";
+ Text[English] = "Send";
+ TabStop = TRUE;
+ Text[ english_us ] = "Send";
+ Text[ portuguese ] = "Send";
+ Text[ russian ] = "Send";
+ Text[ greek ] = "Send";
+ Text[ dutch ] = "Send";
+ Text[ french ] = "En~voyer";
+ Text[ spanish ] = "Send";
+ Text[ italian ] = "Send";
+ Text[ danish ] = "Send";
+ Text[ swedish ] = "~Skicka";
+ Text[ polish ] = "Send";
+ Text[ portuguese_brazilian ] = "Send";
+ Text[ japanese ] = "M";
+ Text[ korean ] = "Send";
+ Text[ chinese_simplified ] = "Send";
+ Text[ chinese_traditional ] = "oe";
+ Text[ turkish ] = "Send";
+ Text[ arabic ] = "Send";
+ };
+ PushButton PB_MAILWIN_CLOSE
+ {
+ Pos = MAP_APPFONT( 6, 23 );
+ Size = MAP_APPFONT( 50, 14 );
+ Text = "S~chlieen";
+ Text[English] = "Close";
+ TabStop = TRUE;
+ Text[ english_us ] = "Close";
+ Text[ portuguese ] = "Close";
+ Text[ russian ] = "Close";
+ Text[ greek ] = "Close";
+ Text[ dutch ] = "Close";
+ Text[ french ] = "~Fermer";
+ Text[ spanish ] = "Close";
+ Text[ italian ] = "Close";
+ Text[ danish ] = "Luk";
+ Text[ swedish ] = "Close";
+ Text[ polish ] = "Close";
+ Text[ portuguese_brazilian ] = "Close";
+ Text[ japanese ] = "‚";
+ Text[ korean ] = "Close";
+ Text[ chinese_simplified ] = "Close";
+ Text[ chinese_traditional ] = "";
+ Text[ turkish ] = "Close";
+ Text[ arabic ] = "Close";
+ };
+ ListBox LB_MAILWIN_ROLE
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT( 62, 6 );
+ Size = MAP_APPFONT( 42, 30 );
+ DropDown = TRUE ;
+ StringList =
+ {
+ < "An" ; 1 ; > ;
+ < "Kopie" ; 2 ; > ;
+ < "Blindkopie" ; 3 ; > ;
+ };
+ StringList [ ENGLISH ] =
+ {
+ < "To" ; 1 ; > ;
+ < "Copy" ; 2 ; > ;
+ < "Blind copy" ; 3 ; > ;
+ };
+ StringList [ language_user1 ] =
+ {
+ < "An" ; 1 ; > ;
+ < "Kopie" ; 2 ; > ;
+ < "Blindkopie" ; 3 ; > ;
+ };
+ StringList [ english_us ] =
+ {
+ < "To" ; 3 ; > ;
+ < "Copy" ; 3 ; > ;
+ < "Blind Copy" ; 3 ; > ;
+ };
+ StringList [ portuguese ] =
+ {
+ < "An" ; 3 ; > ;
+ < "Kopie" ; 3 ; > ;
+ < "Blindkopie" ; 3 ; > ;
+ };
+ StringList [ russian ] =
+ {
+ < "An" ; 3 ; > ;
+ < "Kopie" ; 3 ; > ;
+ < "Blindkopie" ; 3 ; > ;
+ };
+ StringList [ greek ] =
+ {
+ < "An" ; 3 ; > ;
+ < "Kopie" ; 3 ; > ;
+ < "Blindkopie" ; 3 ; > ;
+ };
+ StringList [ dutch ] =
+ {
+ < "An" ; 3 ; > ;
+ < "Kopie" ; 3 ; > ;
+ < "Blindkopie" ; 3 ; > ;
+ };
+ StringList [ french ] =
+ {
+ < "" ; 3 ; > ;
+ < "Copie" ; 3 ; > ;
+ < "Copie cache" ; 3 ; > ;
+ };
+ StringList [ spanish ] =
+ {
+ < "An" ; 3 ; > ;
+ < "Kopie" ; 3 ; > ;
+ < "Blindkopie" ; 3 ; > ;
+ };
+ StringList [ italian ] =
+ {
+ < "An" ; 3 ; > ;
+ < "Kopie" ; 3 ; > ;
+ < "Blindkopie" ; 3 ; > ;
+ };
+ StringList [ danish ] =
+ {
+ < "Til" ; 3 ; > ;
+ < "Kopi" ; 3 ; > ;
+ < "Blindkopi" ; 3 ; > ;
+ };
+ StringList [ swedish ] =
+ {
+ < "Till" ; 3 ; > ;
+ < "Kopia" ; 3 ; > ;
+ < "Blindkopia" ; 3 ; > ;
+ };
+ StringList [ polish ] =
+ {
+ < "An" ; 3 ; > ;
+ < "Kopie" ; 3 ; > ;
+ < "Blindkopie" ; 3 ; > ;
+ };
+ StringList [ portuguese_brazilian ] =
+ {
+ < "An" ; 3 ; > ;
+ < "Kopie" ; 3 ; > ;
+ < "Blindkopie" ; 3 ; > ;
+ };
+ StringList [ japanese ] =
+ {
+ < "" ; 3 ; > ;
+ < "CC" ; 3 ; > ;
+ < "BCC" ; 3 ; > ;
+ };
+ StringList [ korean ] =
+ {
+ < "An" ; 3 ; > ;
+ < "Kopie" ; 3 ; > ;
+ < "Blindkopie" ; 3 ; > ;
+ };
+ StringList [ chinese_simplified ] =
+ {
+ < "An" ; 3 ; > ;
+ < "Kopie" ; 3 ; > ;
+ < "Blindkopie" ; 3 ; > ;
+ };
+ StringList [ chinese_traditional ] =
+ {
+ < "" ; 3 ; > ;
+ < "۰e" ; 3 ; > ;
+ < "K" ; 3 ; > ;
+ };
+ StringList [ turkish ] =
+ {
+ < "An" ; 3 ; > ;
+ < "Kopie" ; 3 ; > ;
+ < "Blindkopie" ; 3 ; > ;
+ };
+ StringList [ arabic ] =
+ {
+ < "An" ; 3 ; > ;
+ < "Kopie" ; 3 ; > ;
+ < "Blindkopie" ; 3 ; > ;
+ };
+ };
+ Edit ED_MAILWIN_ROLE
+ {
+ Border = TRUE;
+ Pos = MAP_APPFONT( 107, 6 );
+ Size = MAP_APPFONT( 210, 12 );
+ };
+ ListBox LB_MAILWIN_ADDRESS
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT( 107, 21 );
+ Size = MAP_APPFONT( 210, 30 );
+ AutoHScroll = TRUE ;
+ };
+ FixedText FT_MAILWIN_SUBJECT
+ {
+ Pos = MAP_APPFONT( 62, 55 );
+ Size = MAP_APPFONT( 42, 10 );
+ Text = "~Betreff:";
+ Text[English] = "Subject:";
+ Text[ english_us ] = "Subject:";
+ Text[ portuguese ] = "Subject:";
+ Text[ russian ] = "Subject:";
+ Text[ greek ] = "Subject:";
+ Text[ dutch ] = "Subject:";
+ Text[ french ] = "O~bjet :";
+ Text[ spanish ] = "Subject:";
+ Text[ italian ] = "Subject:";
+ Text[ danish ] = "Emne:";
+ Text[ swedish ] = "Subject:";
+ Text[ polish ] = "Subject:";
+ Text[ portuguese_brazilian ] = "Subject:";
+ Text[ japanese ] = ":";
+ Text[ korean ] = "Subject:";
+ Text[ chinese_simplified ] = "Subject:";
+ Text[ chinese_traditional ] = "DG";
+ Text[ turkish ] = "Subject:";
+ Text[ arabic ] = "Subject:";
+ };
+ Edit ED_MAILWIN_SUBJECT
+ {
+ Border = TRUE;
+ Pos = MAP_APPFONT( 107, 54 );
+ Size = MAP_APPFONT( 210, 12 );
+ };
+ FixedText FT_MAILWIN_FROM
+ {
+ Pos = MAP_APPFONT( 62, 70 );
+ Size = MAP_APPFONT( 42, 10 );
+ Text = "~Von:";
+ Text[English] = "From:";
+ Text[ english_us ] = "From:";
+ Text[ portuguese ] = "From:";
+ Text[ russian ] = "From:";
+ Text[ greek ] = "From:";
+ Text[ dutch ] = "From:";
+ Text[ french ] = "~De :";
+ Text[ spanish ] = "From:";
+ Text[ italian ] = "From:";
+ Text[ danish ] = "Fra:";
+ Text[ swedish ] = "From:";
+ Text[ polish ] = "From:";
+ Text[ portuguese_brazilian ] = "From:";
+ Text[ japanese ] = "ol:";
+ Text[ korean ] = "From:";
+ Text[ chinese_simplified ] = "From:";
+ Text[ chinese_traditional ] = "H̡G";
+ Text[ turkish ] = "From:";
+ Text[ arabic ] = "From:";
+ };
+ Edit ED_MAILWIN_FROM
+ {
+ Border = TRUE;
+ Pos = MAP_APPFONT( 107, 69 );
+ Size = MAP_APPFONT( 120, 12 );
+ };
+ FixedText FT_MAILWIN_PRIO
+ {
+ Pos = MAP_APPFONT( 230, 70 );
+ Size = MAP_APPFONT( 33, 10 );
+ Right = TRUE;
+ Text = "~Prioritt:";
+ Text[English] = "Priority:";
+ Text[ english_us ] = "Priority:";
+ Text[ portuguese ] = "Priority:";
+ Text[ russian ] = "Priority:";
+ Text[ greek ] = "Priority:";
+ Text[ dutch ] = "Priority:";
+ Text[ french ] = "~Priorit :";
+ Text[ spanish ] = "Priority:";
+ Text[ italian ] = "Priority:";
+ Text[ danish ] = "Prioritet:";
+ Text[ swedish ] = "~Prioritet:";
+ Text[ polish ] = "Priority:";
+ Text[ portuguese_brazilian ] = "Priority:";
+ Text[ japanese ] = "dvx:";
+ Text[ korean ] = "Priority:";
+ Text[ chinese_simplified ] = "Priority:";
+ Text[ chinese_traditional ] = "nʡG";
+ Text[ turkish ] = "Priority:";
+ Text[ arabic ] = "Priority:";
+ };
+ ListBox LB_MAILWIN_PRIO
+ {
+ Border = TRUE;
+ Pos = MAP_APPFONT( 266, 69 );
+ Size = MAP_APPFONT( 51, 48 );
+ DropDown = TRUE;
+ StringList =
+ {
+ < "Sehr hoch" ; 1 ; > ;
+ < "Hoch" ; 2 ; > ;
+ < "Normal" ; 3 ; > ;
+ < "Niedrig" ; 4 ; > ;
+ < "Sehr niedrig" ; 5 ; > ;
+ };
+ StringList [ ENGLISH ] =
+ {
+ < "Highest" ; 1 ; > ;
+ < "High" ; 2 ; > ;
+ < "Normal" ; 3 ; > ;
+ < "Low" ; 4 ; > ;
+ < "Lowest" ; 5 ; > ;
+ };
+ StringList [ language_user1 ] =
+ {
+ < "Sehr hoch" ; 1 ; > ;
+ < "Hoch" ; 2 ; > ;
+ < "Normal" ; 3 ; > ;
+ < "Niedrig" ; 4 ; > ;
+ < "Sehr niedrig" ; 5 ; > ;
+ };
+ StringList [ english_us ] =
+ {
+ < "Urgent" ; 5 ; > ;
+ < "Important" ; 5 ; > ;
+ < "Normal" ; 5 ; > ;
+ < "Low" ; 5 ; > ;
+ < "Lowest" ; 5 ; > ;
+ };
+ StringList [ portuguese ] =
+ {
+ < "Sehr hoch" ; 5 ; > ;
+ < "Hoch" ; 5 ; > ;
+ < "Normal" ; 5 ; > ;
+ < "Niedrig" ; 5 ; > ;
+ < "Sehr niedrig" ; 5 ; > ;
+ };
+ StringList [ russian ] =
+ {
+ < "Sehr hoch" ; 5 ; > ;
+ < "Hoch" ; 5 ; > ;
+ < "Normal" ; 5 ; > ;
+ < "Niedrig" ; 5 ; > ;
+ < "Sehr niedrig" ; 5 ; > ;
+ };
+ StringList [ greek ] =
+ {
+ < "Sehr hoch" ; 5 ; > ;
+ < "Hoch" ; 5 ; > ;
+ < "Normal" ; 5 ; > ;
+ < "Niedrig" ; 5 ; > ;
+ < "Sehr niedrig" ; 5 ; > ;
+ };
+ StringList [ dutch ] =
+ {
+ < "Sehr hoch" ; 5 ; > ;
+ < "Hoch" ; 5 ; > ;
+ < "Normal" ; 5 ; > ;
+ < "Niedrig" ; 5 ; > ;
+ < "Sehr niedrig" ; 5 ; > ;
+ };
+ StringList [ french ] =
+ {
+ < "Trs leve" ; 5 ; > ;
+ < "leve" ; 5 ; > ;
+ < "Normale" ; 5 ; > ;
+ < "Faible" ; 5 ; > ;
+ < "Trs faible" ; 5 ; > ;
+ };
+ StringList [ spanish ] =
+ {
+ < "Sehr hoch" ; 5 ; > ;
+ < "Hoch" ; 5 ; > ;
+ < "Normal" ; 5 ; > ;
+ < "Niedrig" ; 5 ; > ;
+ < "Sehr niedrig" ; 5 ; > ;
+ };
+ StringList [ italian ] =
+ {
+ < "Sehr hoch" ; 5 ; > ;
+ < "Hoch" ; 5 ; > ;
+ < "Normal" ; 5 ; > ;
+ < "Niedrig" ; 5 ; > ;
+ < "Sehr niedrig" ; 5 ; > ;
+ };
+ StringList [ danish ] =
+ {
+ < "Meget hj" ; 5 ; > ;
+ < "Hj" ; 5 ; > ;
+ < "Normal" ; 5 ; > ;
+ < "Lav" ; 5 ; > ;
+ < "Meget lav" ; 5 ; > ;
+ };
+ StringList [ swedish ] =
+ {
+ < "Sehr hoch" ; 5 ; > ;
+ < "Hoch" ; 5 ; > ;
+ < "Normal" ; 5 ; > ;
+ < "Niedrig" ; 5 ; > ;
+ < "Sehr niedrig" ; 5 ; > ;
+ };
+ StringList [ polish ] =
+ {
+ < "Sehr hoch" ; 5 ; > ;
+ < "Hoch" ; 5 ; > ;
+ < "Normal" ; 5 ; > ;
+ < "Niedrig" ; 5 ; > ;
+ < "Sehr niedrig" ; 5 ; > ;
+ };
+ StringList [ portuguese_brazilian ] =
+ {
+ < "Sehr hoch" ; 5 ; > ;
+ < "Hoch" ; 5 ; > ;
+ < "Normal" ; 5 ; > ;
+ < "Niedrig" ; 5 ; > ;
+ < "Sehr niedrig" ; 5 ; > ;
+ };
+ StringList [ japanese ] =
+ {
+ < "" ; 5 ; > ;
+ < "⍂" ; 5 ; > ;
+ < "W" ; 5 ; > ;
+ < "Ⴂ" ; 5 ; > ;
+ < "Ⴂ" ; 5 ; > ;
+ };
+ StringList [ korean ] =
+ {
+ < "Sehr hoch" ; 5 ; > ;
+ < "Hoch" ; 5 ; > ;
+ < "Normal" ; 5 ; > ;
+ < "Niedrig" ; 5 ; > ;
+ < "Sehr niedrig" ; 5 ; > ;
+ };
+ StringList [ chinese_simplified ] =
+ {
+ < "Sehr hoch" ; 5 ; > ;
+ < "Hoch" ; 5 ; > ;
+ < "Normal" ; 5 ; > ;
+ < "Niedrig" ; 5 ; > ;
+ < "Sehr niedrig" ; 5 ; > ;
+ };
+ StringList [ chinese_traditional ] =
+ {
+ < "ܰ" ; 5 ; > ;
+ < "" ; 5 ; > ;
+ < "@" ; 5 ; > ;
+ < "C" ; 5 ; > ;
+ < "ܧC" ; 5 ; > ;
+ };
+ StringList [ turkish ] =
+ {
+ < "Sehr hoch" ; 5 ; > ;
+ < "Hoch" ; 5 ; > ;
+ < "Normal" ; 5 ; > ;
+ < "Niedrig" ; 5 ; > ;
+ < "Sehr niedrig" ; 5 ; > ;
+ };
+ StringList [ arabic ] =
+ {
+ < "Sehr hoch" ; 5 ; > ;
+ < "Hoch" ; 5 ; > ;
+ < "Normal" ; 5 ; > ;
+ < "Niedrig" ; 5 ; > ;
+ < "Sehr niedrig" ; 5 ; > ;
+ };
+ };
+ Image IMG_MAILWIN_SEND
+ {
+ ImageBitmap = Bitmap { File = "sc05364.bmp" ; };
+ MaskColor = Color { Red = 0xC000; Green = 0xC000; Blue = 0xC000; };
+ };
+ Image IMG_MAILWIN_CLOSE
+ {
+ ImageBitmap = Bitmap { File = "sc05503.bmp" ; };
+ MaskColor = Color { Red = 0xC000; Green = 0xC000; Blue = 0xC000; };
+ };
+};
+
+// ------------------------------------------------------------------- EOF
+
diff --git a/sfx2/source/dialog/makefile.mk b/sfx2/source/dialog/makefile.mk
new file mode 100644
index 000000000000..de2146fdc613
--- /dev/null
+++ b/sfx2/source/dialog/makefile.mk
@@ -0,0 +1,140 @@
+#*************************************************************************
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.1.1.1 $
+#
+# last change: $Author: hr $ $Date: 2000-09-18 16:52:31 $
+#
+# The Contents of this file are made available subject to the terms of
+# either of the following licenses
+#
+# - GNU Lesser General Public License Version 2.1
+# - Sun Industry Standards Source License Version 1.1
+#
+# Sun Microsystems Inc., October, 2000
+#
+# GNU Lesser General Public License Version 2.1
+# =============================================
+# Copyright 2000 by Sun Microsystems, Inc.
+# 901 San Antonio Road, Palo Alto, CA 94303, USA
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License version 2.1, as published by the Free Software Foundation.
+#
+# This library 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 for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+#
+# Sun Industry Standards Source License Version 1.1
+# =================================================
+# The contents of this file are subject to the Sun Industry Standards
+# Source License Version 1.1 (the "License"); You may not use this file
+# except in compliance with the License. You may obtain a copy of the
+# License at http://www.openoffice.org/license.html.
+#
+# Software provided under this License is provided on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+# See the License for the specific provisions governing your rights and
+# obligations concerning the Software.
+#
+# The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+#
+# Copyright: 2000 by Sun Microsystems, Inc.
+#
+# All Rights Reserved.
+#
+# Contributor(s): _______________________________________
+#
+#
+#
+#*************************************************************************
+PRJ=..$/..
+
+PRJNAME=sfx2
+TARGET=dialog
+ENABLE_EXCEPTIONS=TRUE
+.INCLUDE : $(PRJ)$/util$/makefile.pmk
+AUTOSEG=true
+
+# --- Settings -----------------------------------------------------------
+
+.INCLUDE : svpre.mk
+.INCLUDE : settings.mk
+.INCLUDE : sv.mk
+
+# --- Files --------------------------------------------------------------
+
+IMGLST_SRS=$(SRS)$/dialog.srs
+BMP_IN=$(PRJ)$/win/res
+
+SLOFILES =\
+ $(SLO)$/about.obj \
+ $(SLO)$/acccfg.obj \
+ $(SLO)$/basedlgs.obj \
+ $(SLO)$/cfg.obj \
+ $(SLO)$/dinfdlg.obj \
+ $(SLO)$/dinfedt.obj \
+ $(SLO)$/dockwin.obj \
+ $(SLO)$/eventdlg.obj \
+ $(SLO)$/intro.obj \
+ $(SLO)$/macropg.obj \
+ $(SLO)$/mailchildwin.obj \
+ $(SLO)$/maillistener.obj \
+ $(SLO)$/mailmodel.obj \
+ $(SLO)$/mailwindow.obj \
+ $(SLO)$/menucfg.obj \
+ $(SLO)$/mgetempl.obj \
+ $(SLO)$/navigat.obj \
+ $(SLO)$/newstyle.obj \
+ $(SLO)$/oregdlg.obj \
+ $(SLO)$/passwd.obj \
+ $(SLO)$/register.obj \
+ $(SLO)$/sfxurl.obj \
+ $(SLO)$/slotinfo.obj \
+ $(SLO)$/splitwin.obj \
+ $(SLO)$/styfitem.obj \
+ $(SLO)$/styledlg.obj \
+ $(SLO)$/tabdlg.obj \
+ $(SLO)$/templdlg.obj \
+ $(SLO)$/tplcitem.obj \
+ $(SLO)$/tplpitem.obj \
+ $(SLO)$/versdlg.obj
+
+EXCEPTIONSFILES=\
+ $(SLO)$/maillistener.obj \
+ $(SLO)$/mailmodel.obj
+
+SRCFILES =\
+ about.src \
+ cfg.src \
+ dialog.src \
+ dinfdlg.src \
+ dinfedt.src \
+ dlgrun.src \
+ eventdlg.src \
+ macropg.src \
+ mail.src \
+ mailwindow.src \
+ mgetempl.src \
+ newstyle.src \
+ oregdlg.src \
+ passwd.src \
+ register.src \
+ templdlg.src \
+ versdlg.src
+
+# --- Targets -------------------------------------------------------
+
+.INCLUDE : target.mk
+
diff --git a/sfx2/source/dialog/mgetempl.cxx b/sfx2/source/dialog/mgetempl.cxx
new file mode 100644
index 000000000000..729aef9d6aa2
--- /dev/null
+++ b/sfx2/source/dialog/mgetempl.cxx
@@ -0,0 +1,709 @@
+/*************************************************************************
+ *
+ * $RCSfile: mgetempl.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:31 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+// include ---------------------------------------------------------------
+
+#ifndef _MSGBOX_HXX //autogen
+#include <vcl/msgbox.hxx>
+#endif
+#ifndef _SV_FIELD_HXX //autogen
+#include <vcl/field.hxx>
+#endif
+#ifndef _SFXENUMITEM_HXX //autogen
+#include <svtools/eitem.hxx>
+#endif
+#ifndef _SFXINTITEM_HXX //autogen
+#include <svtools/intitem.hxx>
+#endif
+#ifndef _SFXSTYLE_HXX //autogen
+#include <svtools/style.hxx>
+#endif
+#pragma hdrstop
+
+#include "styfitem.hxx"
+#include "styledlg.hxx"
+#include "app.hxx"
+#include "mgetempl.hxx"
+#include "objsh.hxx"
+#include "sfxtypes.hxx"
+#include "sfxresid.hxx"
+#include "module.hxx"
+#include "saveopt.hxx"
+
+#include "sfx.hrc"
+#include "dialog.hrc"
+#include "mgetempl.hrc"
+
+#ifndef _SFX_STYLE_HRC
+#include <svtools/style.hrc>
+#endif
+
+// SfxManageStyleSheetPage -----------------------------------------------
+
+SfxManageStyleSheetPage::SfxManageStyleSheetPage( Window* pParent, const SfxItemSet& rAttrSet ) :
+
+ SfxTabPage( pParent, SfxResId( TP_MANAGE_STYLES ), rAttrSet ),
+
+ aNameFt ( this, ResId( FT_NAME ) ),
+ aNameEd ( this, ResId( ED_NAME ) ),
+ aAutoCB ( this, ResId( CB_AUTO ) ),
+
+ aFollowFt ( this, ResId( FT_NEXT ) ),
+ aFollowLb ( this, ResId( LB_NEXT ) ),
+
+ aBaseFt ( this, ResId( FT_BASE ) ),
+ aBaseLb ( this, ResId( LB_BASE ) ),
+
+ aFilterFt ( this, ResId( FT_REGION ) ),
+ aFilterLb ( this, ResId( LB_REGION ) ),
+
+ aDescFt ( this, ResId( FT_DESC ) ),
+ aDescED ( this, ResId( ED_DESC ) ),
+ aDescGb ( this, ResId( GB_DESC ) ),
+
+ pStyle( &( (SfxStyleDialog*)pParent->GetParent() )->GetStyleSheet() ),
+
+ bModified ( FALSE ),
+ aName ( pStyle->GetName() ),
+ aFollow ( pStyle->GetFollow() ),
+ aParent ( pStyle->GetParent() ),
+ nFlags ( pStyle->GetMask() ),
+ pItem ( 0 )
+
+/* [Beschreibung]
+
+ Konstruktor; initialisiert die ListBoxen mit den Vorlagen
+
+*/
+
+{
+ FreeResource();
+
+ if ( IsBackground() )
+ aDescED.SetBackground( GetBackground() );
+ FixedInfo* pInfo = new FixedInfo( this );
+ aDescED.SetFont( pInfo->GetFont() );
+ delete pInfo;
+
+ aDescED.Hide();
+ aDescFt.Show();
+
+ // diese Page braucht ExchangeSupport
+ SetExchangeSupport();
+
+ ResMgr* pResMgr = SFX_APP()->GetISfxModule()->GetResMgr();
+ DBG_ASSERT( pResMgr, "kein ResMgr am Modul" );
+ pFamilies = new SfxStyleFamilies( ResId( DLG_STYLE_DESIGNER, pResMgr ) );
+
+ SfxStyleSheetBasePool* pPool = 0;
+ SfxObjectShell* pDocShell = SfxObjectShell::Current();
+
+ if ( pDocShell )
+ pPool = pDocShell->GetStyleSheetPool();
+ DBG_ASSERT( pPool, "kein Pool oder keine DocShell" );
+
+ if ( pPool )
+ {
+ pPool->SetSearchMask( pStyle->GetFamily() );
+ pPool->First(); // fuer SW - interne Liste updaten
+ }
+
+ if ( !pStyle->GetName().Len() && pPool )
+ {
+ // NullString als Name -> Name generieren
+ String aNoName( SfxResId( STR_NONAME ) );
+ USHORT nNo = 1;
+ String aNo( aNoName );
+ aNoName += String::CreateFromInt32( nNo );
+ while ( pPool->Find( aNoName ) )
+ {
+ ++nNo;
+ aNoName = aNo;
+ aNoName += String::CreateFromInt32( nNo );
+ }
+ pStyle->SetName( aNoName );
+ aName = aNoName;
+ aFollow = pStyle->GetFollow();
+ aParent = pStyle->GetParent();
+ }
+ aNameEd.SetText(pStyle->GetName());
+
+ if ( !pStyle->IsUserDefined() )
+ aNameEd.SetReadOnly();
+
+ if ( pStyle->HasFollowSupport() && pPool )
+ {
+ SfxStyleSheetBase* pPoolStyle = pPool->First();
+
+ while ( pPoolStyle )
+ {
+ aFollowLb.InsertEntry( pPoolStyle->GetName() );
+ pPoolStyle = pPool->Next();
+ }
+
+ // eine neue Vorlage ist noch nicht im Pool
+ if ( LISTBOX_ENTRY_NOTFOUND == aFollowLb.GetEntryPos( pStyle->GetName() ) )
+ aFollowLb.InsertEntry( pStyle->GetName() );
+ }
+ else
+ {
+ aFollowFt.Hide();
+ aFollowLb.Hide();
+
+ aFilterFt.SetPosPixel( aBaseFt.GetPosPixel() );
+ aFilterLb.SetPosPixel( aBaseLb.GetPosPixel() );
+
+ aBaseFt.SetPosPixel( aFollowFt.GetPosPixel() );
+ aBaseLb.SetPosPixel( aFollowLb.GetPosPixel() );
+ }
+
+ if ( pStyle->HasParentSupport() && pPool )
+ {
+ if ( pStyle->HasClearParentSupport() )
+ // die Basisvorlage darf auf NULL gesetzt werden
+ aBaseLb.InsertEntry( String( SfxResId( STR_NONE ) ) );
+
+ SfxStyleSheetBase* pPoolStyle = pPool->First();
+
+ while ( pPoolStyle )
+ {
+ const String aStr( pPoolStyle->GetName() );
+ // eigener Namen nicht als Basisvorlage
+ if ( aStr != aName )
+ aBaseLb.InsertEntry( aStr );
+ pPoolStyle = pPool->Next();
+ }
+ }
+ else
+ {
+ aBaseFt.Disable();
+ aBaseLb.Disable();
+ }
+ USHORT nCount = pFamilies->Count();
+
+ USHORT i;
+ for ( i = 0; i < nCount; ++i )
+ {
+ pItem = pFamilies->GetObject(i);
+
+ if ( pItem->GetFamily() == pStyle->GetFamily() )
+ break;
+ }
+
+ USHORT nStyleFilterIdx = 0xffff;
+
+ if ( i < nCount )
+ {
+ // Filterflags
+ const SfxStyleFilter& rList = pItem->GetFilterList();
+ nCount = (USHORT)rList.Count();
+ USHORT nIdx = 0;
+ USHORT nMask = pStyle->GetMask() & ~SFXSTYLEBIT_USERDEF;
+
+ if ( !nMask ) // Benutzervorlage?
+ nMask = pStyle->GetMask();
+
+ for ( i = 0; i < nCount; ++i )
+ {
+ SfxFilterTupel* pTupel = rList.GetObject(i);
+
+ if ( pTupel->nFlags != SFXSTYLEBIT_AUTO &&
+ pTupel->nFlags != SFXSTYLEBIT_USED &&
+// pTupel->nFlags != SFXSTYLEBIT_USERDEF &&
+ pTupel->nFlags != SFXSTYLEBIT_ALL )
+ {
+ aFilterLb.InsertEntry( pTupel->aName, nIdx );
+ aFilterLb.SetEntryData(nIdx, (void*)(long)i);
+
+ if ( ( pTupel->nFlags & nMask ) == nMask )
+ nStyleFilterIdx = nIdx;
+ ++nIdx;
+ }
+ }
+
+ if ( nStyleFilterIdx != 0xFFFF )
+ aFilterLb.SelectEntryPos( nStyleFilterIdx );
+ }
+
+ if ( !aFilterLb.GetEntryCount() || !pStyle->IsUserDefined() )
+ {
+ pItem = 0;
+ aFilterFt.Disable();
+ aFilterLb.Disable();
+ }
+ else
+ aFilterLb.SaveValue();
+ SetDescriptionText_Impl();
+
+ if ( aFollowLb.IsEnabled() || aBaseLb.IsEnabled() )
+ {
+ aNameEd.SetGetFocusHdl(
+ LINK( this, SfxManageStyleSheetPage, GetFocusHdl ) );
+ aNameEd.SetLoseFocusHdl(
+ LINK( this, SfxManageStyleSheetPage, LoseFocusHdl ) );
+ }
+ // ist es ein Style mit automatischem Update? (nur SW)
+ if(SFX_ITEM_SET == rAttrSet.GetItemState(SID_ATTR_AUTO_STYLE_UPDATE))
+ {
+ Size aSize = aNameEd.GetSizePixel();
+ aSize.Width() /= 2;
+ aNameEd.SetSizePixel(aSize);
+ aAutoCB.Show();
+ }
+}
+
+//-------------------------------------------------------------------------
+
+SfxManageStyleSheetPage::~SfxManageStyleSheetPage()
+
+/* [Beschreibung]
+
+ Destruktor; Freigabe der Daten
+
+*/
+
+{
+ delete pFamilies;
+ pItem = 0;
+ pStyle = 0;
+
+}
+
+//-------------------------------------------------------------------------
+
+void SfxManageStyleSheetPage::UpdateName_Impl( ListBox* pBox,
+ const String& rNew )
+
+/* [Beschreibung]
+
+ Nach der "Anderung eines Vorlagennamens die ListBox pBox
+ aktualisieren
+
+ [Parameter]
+
+ ListBox* pBox ListBox, deren Eintr"age aktualisiert
+ werden sollen
+ const String& rNew der neue Name
+
+*/
+
+{
+ if ( pBox->IsEnabled() )
+ {
+ // ist der aktuelle Eintrag, dessen Namen modifizieren wurde
+ const BOOL bSelect = pBox->GetSelectEntry() == aBuf;
+ pBox->RemoveEntry( aBuf );
+ pBox->InsertEntry( rNew );
+
+ if ( bSelect )
+ pBox->SelectEntry( rNew );
+ }
+}
+
+//-------------------------------------------------------------------------
+
+void SfxManageStyleSheetPage::SetDescriptionText_Impl()
+
+/* [Beschreibung]
+
+ Attributbeschreibung setzen. daf"ur die eingestellte Metrik besorgen.
+*/
+
+{
+ SfxApplication* pSfxApp = SFX_APP();
+ SfxMapUnit eUnit = SFX_MAPUNIT_CM;
+ FieldUnit eFieldUnit = pSfxApp->GetOptions().GetMetric();
+ SfxModule* pModule = pSfxApp->GetActiveModule();
+
+ if ( pModule )
+ {
+ const SfxPoolItem* pItem = pModule->GetItem( SID_ATTR_METRIC );
+
+ if ( pItem )
+ eFieldUnit = (FieldUnit)( (SfxUInt16Item*)pItem )->GetValue();
+ }
+
+ switch ( eFieldUnit )
+ {
+ case FUNIT_MM: eUnit = SFX_MAPUNIT_MM; break;
+
+ case FUNIT_CM:
+ case FUNIT_M:
+ case FUNIT_KM: eUnit = SFX_MAPUNIT_CM; break;
+
+ case FUNIT_POINT:
+ case FUNIT_PICA: eUnit = SFX_MAPUNIT_POINT; break;
+
+ case FUNIT_INCH:
+ case FUNIT_FOOT:
+ case FUNIT_MILE: eUnit = SFX_MAPUNIT_INCH; break;
+
+ default:
+ DBG_ERRORFILE( "not supported fieldunit" );
+ }
+ aDescFt.SetText( pStyle->GetDescription( eUnit ) );
+}
+
+//-------------------------------------------------------------------------
+
+IMPL_LINK_INLINE_START( SfxManageStyleSheetPage, GetFocusHdl, Edit *, pEdit )
+
+/* [Beschreibung]
+
+ StarView Handler; GetFocus-Handler des Edits mit dem Vorlagennamen.
+
+*/
+
+{
+ aBuf = pEdit->GetText();
+ return 0;
+}
+IMPL_LINK_INLINE_END( SfxManageStyleSheetPage, GetFocusHdl, Edit *, pEdit )
+
+//-------------------------------------------------------------------------
+
+IMPL_LINK_INLINE_START( SfxManageStyleSheetPage, LoseFocusHdl, Edit *, pEdit )
+
+/* [Beschreibung]
+
+ StarView Handler; LoseFocus-Handler des Edits mit dem Vorlagennamen.
+ Dieser aktualisiert ggf. die Listbox mit den Folgevorlagen.
+ In der Listbox mit den Basisvorlagen ist die aktuelle Vorlage
+ selbst nicht enthalten.
+
+*/
+
+{
+ const String aStr( pEdit->GetText() );
+ // ggf. Listbox der Basisvorlagen aktualisieren
+ if ( aStr != aBuf )
+ UpdateName_Impl( &aFollowLb, aStr );
+ return 0;
+}
+IMPL_LINK_INLINE_END( SfxManageStyleSheetPage, LoseFocusHdl, Edit *, pEdit )
+
+//-------------------------------------------------------------------------
+
+BOOL SfxManageStyleSheetPage::FillItemSet( SfxItemSet& rSet )
+
+/* [Beschreibung]
+
+
+ Handler f"ur das Setzen der (modifizierten) Daten. Wird aus
+ dem Ok des SfxTabDialog gerufen.
+
+ [Parameter]
+
+ SfxItemSet &rAttrSet das Set, das die Daten entgegennimmt.
+
+
+ [R"uckgabewert]
+
+ BOOL TRUE: es hat eine "Anderung der Daten
+ stattgefunden
+ FALSE: es hat keine "Anderung der Daten
+ stattgefunden
+
+ [Querverweise]
+
+ <class SfxTabDialog>
+
+*/
+
+{
+ const USHORT nFilterIdx = aFilterLb.GetSelectEntryPos();
+
+ // Filter setzen
+
+ if ( LISTBOX_ENTRY_NOTFOUND != nFilterIdx &&
+ nFilterIdx != aFilterLb.GetSavedValue() &&
+ aFilterLb.IsEnabled() )
+ {
+ bModified = TRUE;
+ DBG_ASSERT( pItem, "kein Item" );
+ // geht nur bei Benutzervorlagen
+#ifdef DEBUG
+ USHORT nIdx = (USHORT)(long)aFilterLb.GetEntryData( nFilterIdx );
+ SfxFilterTupel* p = pItem->GetFilterList().GetObject( nIdx );
+#endif
+ USHORT nMask = pItem->GetFilterList().GetObject(
+ (USHORT)(long)aFilterLb.GetEntryData( nFilterIdx ) )->nFlags |
+ SFXSTYLEBIT_USERDEF;
+ pStyle->SetMask( nMask );
+ }
+ if(aAutoCB.IsVisible() &&
+ aAutoCB.IsChecked() != aAutoCB.GetSavedValue())
+ {
+ rSet.Put(SfxBoolItem(SID_ATTR_AUTO_STYLE_UPDATE, aAutoCB.IsChecked()));
+ }
+
+ return bModified;
+}
+
+//-------------------------------------------------------------------------
+
+void SfxManageStyleSheetPage::Reset( const SfxItemSet& rAttrSet )
+
+/* [Beschreibung]
+
+
+ Handler f"ur das Initialisieren der Seite mit den initialen Daten.
+
+ [Parameter]
+
+ const SfxItemSet &rAttrSet das Set mit den Daten
+
+
+ [Querverweise]
+
+ <class SfxTabDialog>
+
+*/
+
+{
+ bModified = FALSE;
+ String sCmp( pStyle->GetName() );
+
+ if ( sCmp != aName )
+ pStyle->SetName( aName );
+ aNameEd.SetText( aName );
+
+ if ( aFollowLb.IsEnabled() )
+ {
+ sCmp = pStyle->GetFollow();
+
+ if ( sCmp != aFollow )
+ pStyle->SetFollow( aFollow );
+
+ if ( !aFollow.Len() )
+ aFollowLb.SelectEntry( aName );
+ else
+ aFollowLb.SelectEntry( aFollow );
+ }
+
+ if ( aBaseLb.IsEnabled() )
+ {
+ sCmp = pStyle->GetParent();
+
+ if ( sCmp != aParent )
+ pStyle->SetParent( aParent );
+
+ if ( !aParent.Len() )
+ aBaseLb.SelectEntry( String( SfxResId( STR_NONE ) ) );
+ else
+ aBaseLb.SelectEntry( aParent );
+
+ if ( String( SfxResId( STR_STANDARD ) ) == aName )
+ {
+ // die Standardvorlage kann nicht verkn"upft werden
+ aBaseFt.Disable();
+ aBaseLb.Disable();
+ }
+ }
+
+ if ( aFilterLb.IsEnabled() )
+ {
+ USHORT nCmp = pStyle->GetMask();
+
+ if ( nCmp != nFlags )
+ pStyle->SetMask( nFlags );
+ aFilterLb.SelectEntryPos( aFilterLb.GetSavedValue() );
+ }
+}
+
+//-------------------------------------------------------------------------
+
+SfxTabPage* SfxManageStyleSheetPage::Create( Window* pParent,
+ const SfxItemSet &rAttrSet )
+
+/* [Beschreibung]
+
+
+ Factory f"ur das Erzeugen der Seite
+
+ [Querverweise]
+
+ <class SfxTabDialog>
+
+*/
+
+{
+ return new SfxManageStyleSheetPage( pParent, rAttrSet );
+}
+
+//-------------------------------------------------------------------------
+
+void SfxManageStyleSheetPage::ActivatePage( const SfxItemSet& rSet)
+
+/* [Beschreibung]
+
+ ActivatePage- Handler des SfxTabDialog; wird f"ur die Aktualisierung
+ des beschreibenden Textes verwendet, da sich dieser durch "Anderungen
+ der Daten anderer Seiten ge"andert haben kann.
+
+ [Parameter]
+
+ const SfxItemSet& das Set f"ur den Datenaustausch; wird
+ hier nicht verwendet.
+
+ [Querverweise]
+
+ <SfxTabDialog::ActivatePage(const SfxItemSet &)>
+
+*/
+
+{
+ SetDescriptionText_Impl();
+
+ // ist es ein Style mit automatischem Update? (nur SW)
+ const SfxPoolItem* pItem;
+
+ if ( SFX_ITEM_SET ==
+ rSet.GetItemState( SID_ATTR_AUTO_STYLE_UPDATE, FALSE, &pItem ) )
+ aAutoCB.Check( ( (const SfxBoolItem*)pItem )->GetValue() );
+ aAutoCB.SaveValue();
+}
+
+//-------------------------------------------------------------------------
+
+int SfxManageStyleSheetPage::DeactivatePage( SfxItemSet* pSet )
+
+/* [Beschreibung]
+
+ DeactivatePage- Handler des SfxTabDialog; die Daten werden
+ an der Vorlage eingestellt, damit die richtige Vererbung
+ f"ur die anderen Seiten des Dialoges vorliegt.
+ Im Fehlerfall wird das Verlassen der Seite unterbunden.
+
+ [Parameter]
+
+ SfxItemSet* das Set f"ur den Datenaustausch; wird hier nicht verwendet.
+
+ [Querverweise]
+
+ <SfxTabDialog::DeactivatePage(SfxItemSet*)>
+
+*/
+
+{
+ int nRet = SfxTabPage::LEAVE_PAGE;
+
+ if ( aNameEd.IsModified() )
+ {
+ // bei <Enter> wird kein LoseFocus() durch StarView ausgel"ost
+ if ( aNameEd.HasFocus() )
+ LoseFocusHdl( &aNameEd );
+
+ if ( !pStyle->SetName( aNameEd.GetText().EraseLeadingChars() ) )
+ {
+ InfoBox aBox( this, SfxResId( MSG_TABPAGE_INVALIDNAME ) );
+ aBox.Execute();
+ aNameEd.GrabFocus();
+ aNameEd.SetSelection( Selection( SELECTION_MIN, SELECTION_MAX ) );
+ return SfxTabPage::KEEP_PAGE;
+ }
+ bModified = TRUE;
+ }
+
+ if ( pStyle->HasFollowSupport() && aFollowLb.IsEnabled() )
+ {
+ const String aFollow( aFollowLb.GetSelectEntry() );
+
+ if ( pStyle->GetFollow() != aFollow )
+ {
+ if ( !pStyle->SetFollow( aFollow ) )
+ {
+ InfoBox aBox( this, SfxResId( MSG_TABPAGE_INVALIDSTYLE ) );
+ aBox.Execute();
+ aFollowLb.GrabFocus();
+ return SfxTabPage::KEEP_PAGE;
+ }
+ bModified = TRUE;
+ }
+ }
+
+ if ( aBaseLb.IsEnabled() )
+ {
+ String aParent( aBaseLb.GetSelectEntry() );
+
+ if ( String( SfxResId( STR_NONE ) ) == aParent || aParent == pStyle->GetName() )
+ aParent.Erase();
+
+ if ( pStyle->GetParent() != aParent )
+ {
+ if ( !pStyle->SetParent( aParent ) )
+ {
+ InfoBox aBox( this, SfxResId( MSG_TABPAGE_INVALIDPARENT ) );
+ aBox.Execute();
+ aBaseLb.GrabFocus();
+ return SfxTabPage::KEEP_PAGE;
+ }
+ bModified = TRUE;
+ nRet |= (int)SfxTabPage::REFRESH_SET;
+ }
+ }
+
+ if ( pSet )
+ FillItemSet( *pSet );
+
+ return nRet;
+}
+
diff --git a/sfx2/source/dialog/mgetempl.hrc b/sfx2/source/dialog/mgetempl.hrc
new file mode 100644
index 000000000000..1bbaa7c09d5a
--- /dev/null
+++ b/sfx2/source/dialog/mgetempl.hrc
@@ -0,0 +1,72 @@
+/*************************************************************************
+ *
+ * $RCSfile: mgetempl.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:31 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define ED_NAME 2
+#define LB_NEXT 4
+#define FT_BASE 5
+#define LB_BASE 6
+#define LB_REGION 8
+#define FT_DESC 9
+#define GB_DESC 10
+#define FT_REGION 7
+#define FT_NEXT 3
+#define FT_NAME 1
+#define ED_DESC 11
+#define CB_AUTO 12
diff --git a/sfx2/source/dialog/mgetempl.src b/sfx2/source/dialog/mgetempl.src
new file mode 100644
index 000000000000..61c63406678d
--- /dev/null
+++ b/sfx2/source/dialog/mgetempl.src
@@ -0,0 +1,283 @@
+/*************************************************************************
+ *
+ * $RCSfile: mgetempl.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:31 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+ // include ---------------------------------------------------------------
+#include "sfx.hrc"
+#include "helpid.hrc"
+#include "mgetempl.hrc"
+ // pragma ----------------------------------------------------------------
+
+ // TP_MANAGE_STYLES ------------------------------------------------------
+TabPage TP_MANAGE_STYLES
+{
+ HelpId = HID_MANAGE_STYLES ;
+ Hide = TRUE ;
+ Size = MAP_APPFONT ( 260 , 135 ) ;
+ FixedText FT_NAME
+ {
+ Pos = MAP_APPFONT ( 6 , 8 ) ;
+ Size = MAP_APPFONT ( 61 , 10 ) ;
+ Text = "~Name" ;
+ Text [ English ] = "~Name" ;
+ Text [ english_us ] = "~Name" ;
+ Text [ italian ] = "~Nome" ;
+ Text [ spanish ] = "~Nombre" ;
+ Text [ french ] = "~Nom" ;
+ Text [ dutch ] = "~Naam" ;
+ Text [ swedish ] = "~Namn" ;
+ Text [ danish ] = "Navn" ;
+ Text [ portuguese ] = "~Nome" ;
+ Text [ portuguese_brazilian ] = "~Name" ;
+ Text[ chinese_simplified ] = "(~N)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Nazwa";
+ Text[ japanese ] = "O(~N)";
+ Text[ chinese_traditional ] = "W(~N)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "̸(~N)";
+ Text[ turkish ] = "~Ad";
+ Text[ language_user1 ] = " ";
+ };
+ Edit ED_NAME
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 70 , 6 ) ;
+ Size = MAP_APPFONT ( 182 , 12 ) ;
+ };
+ CheckBox CB_AUTO
+ {
+ Pos = MAP_APPFONT ( 164 , 8 ) ;
+ Size = MAP_APPFONT ( 88 , 10 ) ;
+ Hide = TRUE ;
+ Text = "~Autom. aktualisieren" ;
+ Text [ ENGLISH ] = "~Automatically update" ;
+ Text [ english_us ] = "~AutoUpdate" ;
+ Text [ portuguese_brazilian ] = "~Autom. aktualisieren" ;
+ Text [ swedish ] = "~Autom. uppdatering" ;
+ Text [ danish ] = "Opdater automatisk" ;
+ Text [ italian ] = "~Aggiorna automaticamente" ;
+ Text [ spanish ] = "~Actualizar automticamente" ;
+ Text [ french ] = "Actualisation ~automatique" ;
+ Text [ dutch ] = "~Autom. actualiseren" ;
+ Text [ portuguese ] = "Actualizar ~automaticamente" ;
+ Text[ chinese_simplified ] = "Զ(~A)";
+ Text[ russian ] = ". ";
+ Text[ polish ] = "~Aktualizuj automatycznie";
+ Text[ japanese ] = "IɍXV(~A)";
+ Text[ chinese_traditional ] = "۰ʧs(~A)";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = "ڵ Ʈ(~A)";
+ Text[ turkish ] = "~Otomatik gncelleme";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_NEXT
+ {
+ Pos = MAP_APPFONT ( 6 , 26 ) ;
+ Size = MAP_APPFONT ( 61 , 10 ) ;
+ Text = "~Folgevorlage" ;
+ Text [ ENGLISH ] = "~Next" ;
+ Text [ norwegian ] = "~Neste" ;
+ Text [ italian ] = "Modello ~successivo" ;
+ Text [ portuguese_brazilian ] = "~Prximo" ;
+ Text [ portuguese ] = "~Estilo seguinte" ;
+ Text [ finnish ] = "~Seuraava" ;
+ Text [ danish ] = "Nste typografi" ;
+ Text [ french ] = "~Style suivant" ;
+ Text [ swedish ] = "Nsta ~formatmall" ;
+ Text [ dutch ] = "~Volgend profiel" ;
+ Text [ spanish ] = "~Estilo siguiente" ;
+ Text [ english_us ] = "Ne~xt Style" ;
+ Text[ chinese_simplified ] = "һʽ(~X)";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Nastpny styl";
+ Text[ japanese ] = "ɑ(~X)";
+ Text[ chinese_traditional ] = "U@Ӽ˦(~X)";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " (~X)";
+ Text[ turkish ] = "Sonraki biim";
+ Text[ language_user1 ] = "\"Vorlagen\" Styles are always capitalized no matter where they show up. EM15.5.00";
+ };
+ ListBox LB_NEXT
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 70 , 24 ) ;
+ Size = MAP_APPFONT ( 182 , 65 ) ;
+ DropDown = TRUE ;
+ Sort = TRUE ;
+ };
+ FixedText FT_BASE
+ {
+ Pos = MAP_APPFONT ( 6 , 44 ) ;
+ Size = MAP_APPFONT ( 61 , 10 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? ~Verknpft mit : ~Verknpft mit */
+ /* ### ACHTUNG: Neuer Text in Resource? ~Verknpft mit : ~Verknpft mit */
+ Text = "~Verknpft mit" ;
+ Text [ ENGLISH ] = "~Based on" ;
+ Text [ norwegian ] = "~Basert p" ;
+ Text [ italian ] = "~Basato su" ;
+ Text [ portuguese_brazilian ] = "~Baseado em" ;
+ Text [ portuguese ] = "~Baseado em" ;
+ Text [ finnish ] = "~Perustuu" ;
+ Text [ danish ] = "Kdet med" ;
+ Text [ french ] = "~Li " ;
+ Text [ swedish ] = "~Lnkad med" ;
+ Text [ dutch ] = "~Gebaseerd op" ;
+ Text [ spanish ] = "~Vinculado con" ;
+ Text [ english_us ] = "~Based on" ;
+ Text[ chinese_simplified ] = "ӵ(~B)";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Poczony z";
+ Text[ japanese ] = "ݸ(~B)";
+ Text[ chinese_traditional ] = "s(~B)";
+ Text[ arabic ] = " ";
+ Text[ greek ] = "~ ";
+ Text[ korean ] = " (~B)";
+ Text[ turkish ] = "~Balanlan";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_BASE
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 70 , 42 ) ;
+ Size = MAP_APPFONT ( 182 , 65 ) ;
+ DropDown = TRUE ;
+ Sort = TRUE ;
+ };
+ FixedText FT_REGION
+ {
+ Pos = MAP_APPFONT ( 6 , 62 ) ;
+ Size = MAP_APPFONT ( 61 , 10 ) ;
+ Text = "~Bereich" ;
+ Text [ ENGLISH ] = "~Region" ;
+ Text [ norwegian ] = "~Omrde" ;
+ Text [ italian ] = "~Area" ;
+ Text [ portuguese_brazilian ] = "~Regio" ;
+ Text [ portuguese ] = "~Categoria" ;
+ Text [ finnish ] = "~Alue" ;
+ Text [ danish ] = "Omrde" ;
+ Text [ french ] = "~Catgorie" ;
+ Text [ swedish ] = "~Omrde" ;
+ Text [ dutch ] = "~Bereik" ;
+ Text [ spanish ] = "~rea" ;
+ Text [ english_us ] = "~Category" ;
+ Text[ chinese_simplified ] = "(~C)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Kategoria";
+ Text[ japanese ] = "͈(~C)";
+ Text[ chinese_traditional ] = "(~C)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "īװ(~C)";
+ Text[ turkish ] = "~Kategori";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_REGION
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 70 , 60 ) ;
+ Size = MAP_APPFONT ( 182 , 65 ) ;
+ DropDown = TRUE ;
+ };
+ FixedText FT_DESC
+ {
+ Pos = MAP_APPFONT ( 12 , 86 ) ;
+ Size = MAP_APPFONT ( 234 , 32 ) ;
+ WordBreak = TRUE ;
+ Hide = TRUE ;
+ };
+ MultiLineEdit ED_DESC
+ {
+ Pos = MAP_APPFONT ( 12 , 86 ) ;
+ Size = MAP_APPFONT ( 234 , 32 ) ;
+ ReadOnly = TRUE ;
+ };
+ GroupBox GB_DESC
+ {
+ Pos = MAP_APPFONT ( 6 , 74 ) ;
+ Size = MAP_APPFONT ( 246 , 52 ) ;
+ Text = "Enthlt" ;
+ Text [ ENGLISH ] = "Contains" ;
+ Text [ norwegian ] = "Inneholder" ;
+ Text [ italian ] = "Contiene" ;
+ Text [ portuguese_brazilian ] = "Contm" ;
+ Text [ portuguese ] = "Contm" ;
+ Text [ finnish ] = "Sislt" ;
+ Text [ danish ] = "Indeholder" ;
+ Text [ french ] = "Contient" ;
+ Text [ swedish ] = "Innehller" ;
+ Text [ dutch ] = "Bevat" ;
+ Text [ spanish ] = "Contiene" ;
+ Text [ english_us ] = "Contains" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "Zawiera";
+ Text[ japanese ] = "";
+ Text[ chinese_traditional ] = "t";
+ Text[ arabic ] = " ";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "erik";
+ Text[ language_user1 ] = " ";
+ };
+};
+ // ********************************************************************** EOF
diff --git a/sfx2/source/dialog/navigat.cxx b/sfx2/source/dialog/navigat.cxx
new file mode 100644
index 000000000000..51ddef881e4f
--- /dev/null
+++ b/sfx2/source/dialog/navigat.cxx
@@ -0,0 +1,134 @@
+/*************************************************************************
+ *
+ * $RCSfile: navigat.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:31 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+// includes *******************************************************************
+
+#pragma hdrstop
+
+#include "navigat.hxx"
+#include "sfx.hrc"
+#include "app.hxx"
+#include "sfxresid.hxx"
+#include "helpid.hrc"
+#include <segmentc.hxx>
+
+SEG_EOFGLOBALS();
+
+SFX_IMPL_DOCKINGWINDOW( SfxNavigatorWrapper , SID_NAVIGATOR );
+
+SfxNavigatorWrapper::SfxNavigatorWrapper( Window* pParent ,
+ USHORT nId ,
+ SfxBindings* pBindings ,
+ SfxChildWinInfo* pInfo )
+ : SfxChildWindow( pParent , nId )
+{
+ pWindow = new SfxNavigator( pBindings, this, pParent, WB_STDDOCKWIN | WB_CLIPCHILDREN | WB_SIZEABLE | WB_3DLOOK );
+ eChildAlignment = SFX_ALIGN_NOALIGNMENT;
+
+ pWindow->SetHelpId ( HID_NAVIGATOR_WINDOW );
+ ((SfxDockingWindow*)pWindow)->SetFloatingSize( Size( 240, 240 ) );
+ pWindow->SetSizePixel( Size( 240, 240 ) );
+
+ ( ( SfxDockingWindow* ) pWindow )->Initialize( pInfo );
+ SetHideNotDelete( TRUE );
+}
+
+SfxNavigator::SfxNavigator( SfxBindings* pBindings ,
+ SfxChildWindow* pChildWin ,
+ Window* pParent ,
+ WinBits nBits )
+ : SfxDockingWindow( pBindings ,
+ pChildWin ,
+ pParent ,
+ nBits )
+ , pWrapper( pChildWin )
+{
+ SetText( String( SfxResId( SID_NAVIGATOR ) ) );
+}
+
+void SfxNavigator::Resize()
+{
+ SfxDockingWindow::Resize();
+ if ( pWrapper->GetContextWindow() )
+ pWrapper->GetContextWindow()->SetSizePixel( GetOutputSizePixel() );
+}
+
+void SfxNavigator::Resizing( Size &rSize )
+{
+ SfxDockingWindow::Resizing( rSize );
+
+ SfxChildWindowContext *pCon = GetChildWindow_Impl()->GetContext_Impl();
+ DBG_ASSERT( pCon, "Kein Context!" );
+ if ( pCon )
+ pCon->Resizing( rSize );
+}
+
+BOOL SfxNavigator::Close()
+{
+ SfxChildWindowContext *pCon = GetChildWindow_Impl()->GetContext_Impl();
+ DBG_ASSERT( pCon, "Kein Context!" );
+ if ( !pCon || pCon->Close() )
+ return SfxDockingWindow::Close();
+ else
+ return FALSE;
+}
+
+
diff --git a/sfx2/source/dialog/newstyle.cxx b/sfx2/source/dialog/newstyle.cxx
new file mode 100644
index 000000000000..7f2afc8565b9
--- /dev/null
+++ b/sfx2/source/dialog/newstyle.cxx
@@ -0,0 +1,134 @@
+/*************************************************************************
+ *
+ * $RCSfile: newstyle.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:31 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+// INCLUDE ---------------------------------------------------------------
+
+#ifndef _SFXSTYLE_HXX //autogen
+#include <svtools/style.hxx>
+#endif
+#pragma hdrstop
+
+#include "newstyle.hxx"
+#include "dialog.hrc"
+#include "newstyle.hrc"
+#include "sfxresid.hxx"
+#include "segmentc.hxx"
+
+// PRIVATE METHODES ------------------------------------------------------
+
+IMPL_LINK( SfxNewStyleDlg, OKHdl, Control *, pControl )
+{
+ const String aName(aColBox.GetText());
+ SfxStyleSheetBase *pStyle = rPool.Find(aName, rPool.GetSearchFamily(), SFXSTYLEBIT_ALL);
+ if(pStyle) {
+ if(!pStyle->IsUserDefined()) {
+ InfoBox(this, SfxResId(MSG_POOL_STYLE_NAME)).Execute();
+ return 0;
+ }
+ if(RET_YES == aQueryOverwriteBox.Execute()) {
+ EndDialog(RET_OK);
+ }
+ }
+ else {
+ EndDialog(RET_OK);
+ }
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK_INLINE_START( SfxNewStyleDlg, ModifyHdl, ComboBox *, pBox )
+{
+ aOKBtn.Enable( pBox->GetText().EraseAllChars().Len() > 0 );
+ return 0;
+}
+IMPL_LINK_INLINE_END( SfxNewStyleDlg, ModifyHdl, ComboBox *, pBox )
+
+// CTOR / DTOR -----------------------------------------------------------
+
+SfxNewStyleDlg::SfxNewStyleDlg(Window *pParent, SfxStyleSheetBasePool &pool)
+ : ModalDialog(pParent, SfxResId(DLG_NEW_STYLE_BY_EXAMPLE)),
+ aColBox(this, ResId(LB_COL)),
+ aColGrp(this, ResId(GB_COL)),
+ aOKBtn(this, ResId(BT_OK)),
+ aCancelBtn(this, ResId(BT_CANCEL)),
+ aQueryOverwriteBox(this, ResId(MSG_OVERWRITE)),
+ rPool(pool)
+{
+ FreeResource();
+ aOKBtn.SetClickHdl(LINK(this, SfxNewStyleDlg, OKHdl));
+ aColBox.SetModifyHdl(LINK(this, SfxNewStyleDlg, ModifyHdl));
+ aColBox.SetDoubleClickHdl(LINK(this, SfxNewStyleDlg, OKHdl));
+
+ SfxStyleSheetBase *pStyle = rPool.First();
+ while(pStyle) {
+ aColBox.InsertEntry(pStyle->GetName());
+ pStyle = rPool.Next();
+ }
+}
+
+// -----------------------------------------------------------------------
+
+__EXPORT SfxNewStyleDlg::~SfxNewStyleDlg()
+{
+}
+
+
diff --git a/sfx2/source/dialog/newstyle.hrc b/sfx2/source/dialog/newstyle.hrc
new file mode 100644
index 000000000000..90e4c9608b48
--- /dev/null
+++ b/sfx2/source/dialog/newstyle.hrc
@@ -0,0 +1,65 @@
+/*************************************************************************
+ *
+ * $RCSfile: newstyle.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:31 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define BT_OK 100
+#define BT_CANCEL 101
+#define LB_COL 1
+#define GB_COL 2
+#define MSG_OVERWRITE 3
diff --git a/sfx2/source/dialog/newstyle.src b/sfx2/source/dialog/newstyle.src
new file mode 100644
index 000000000000..c952fa92ed87
--- /dev/null
+++ b/sfx2/source/dialog/newstyle.src
@@ -0,0 +1,177 @@
+/*************************************************************************
+ *
+ * $RCSfile: newstyle.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:31 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+ // include ---------------------------------------------------------------
+#include "sfx.hrc"
+#include "dialog.hrc"
+#include "newstyle.hrc"
+ // pragma ----------------------------------------------------------------
+
+ // DLG_NEW_STYLE_BY_EXAMPLE ----------------------------------------------
+ModalDialog DLG_NEW_STYLE_BY_EXAMPLE
+{
+ HelpId = SID_STYLE_NEW_BY_EXAMPLE ;
+ OutputSize = TRUE ;
+ SVLook = TRUE ;
+ Size = MAP_APPFONT ( 177 , 118 ) ;
+ Text = "Vorlage erzeugen" ;
+ Text [ ENGLISH ] = "Create template" ;
+ Text [ norwegian ] = "Lag mal" ;
+ Text [ italian ] = "Crea modello" ;
+ Text [ portuguese_brazilian ] = "Criar modelo" ;
+ Text [ portuguese ] = "Criar estilo" ;
+ Text [ finnish ] = "Luo malli" ;
+ Text [ danish ] = "Opret typografi" ;
+ Text [ french ] = "Cration d'un style" ;
+ Text [ swedish ] = "Skapa formatmall" ;
+ Text [ dutch ] = "Opmaakprofiel maken" ;
+ Text [ spanish ] = "Crear estilo" ;
+ Text [ english_us ] = "Create Style" ;
+ Moveable = TRUE ;
+ OKButton BT_OK
+ {
+ Disable = TRUE ;
+ Pos = MAP_APPFONT ( 121 , 6 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TabStop = TRUE ;
+ DefButton = TRUE ;
+ };
+ CancelButton BT_CANCEL
+ {
+ Pos = MAP_APPFONT ( 121 , 23 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TabStop = TRUE ;
+ };
+ ComboBox LB_COL
+ {
+ Pos = MAP_APPFONT ( 12 , 14 ) ;
+ Size = MAP_APPFONT ( 94 , 92 ) ;
+ TabStop = TRUE ;
+ };
+ GroupBox GB_COL
+ {
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 109 , 109 ) ;
+ Text = "Vorlagenname" ;
+ Text [ ENGLISH ] = "Template name" ;
+ Text [ norwegian ] = "Navn p mal" ;
+ Text [ italian ] = "Nome modello" ;
+ Text [ portuguese_brazilian ] = "Nome do modelo" ;
+ Text [ portuguese ] = "Nome do estilo" ;
+ Text [ finnish ] = "Mallin nimi" ;
+ Text [ danish ] = "Typografinavn" ;
+ Text [ french ] = "Nom du style" ;
+ Text [ swedish ] = "Formatmallens namn" ;
+ Text [ dutch ] = "Naam opmaakprofiel" ;
+ Text [ spanish ] = "Nombre del estilo" ;
+ Text [ english_us ] = "Style name" ;
+ Text[ chinese_simplified ] = "ʽ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Nazwa stylu";
+ Text[ japanese ] = "ٖ";
+ Text[ chinese_traditional ] = "˦W";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ̸";
+ Text[ turkish ] = "Biim ad";
+ Text[ language_user1 ] = " ";
+ };
+ QueryBox MSG_OVERWRITE
+ {
+ Buttons = WB_YES_NO ;
+ DefButton = WB_DEF_NO ;
+ /* ### ACHTUNG: Neuer Text in Resource? Vorlage existiert bereits. berschreiben? : Vorlage existiert bereits. berschreiben? */
+ /* ### ACHTUNG: Neuer Text in Resource? Vorlage existiert bereits. berschreiben? : Vorlage existiert bereits. berschreiben? */
+ Message = "Vorlage existiert bereits. berschreiben?" ;
+ Message [ ENGLISH ] = "Template already exists. Overwrite?" ;
+ Message [ norwegian ] = "Malen finnes allerede. Skriv over?" ;
+ Message [ italian ] = "Il modello esiste gi. Sovrascrivere?" ;
+ Message [ portuguese_brazilian ] = "O modelo j existe. Sobregravar?" ;
+ Message [ portuguese ] = "O modelo j existe. Deseja substitu-lo?" ;
+ Message [ finnish ] = "Malli on jo tehty. Korvataanko se?" ;
+ Message [ danish ] = "Typografien findes allerede. Skal den overskrives?" ;
+ Message [ french ] = "Ce style existe dj. Voulez-vous le remplacer ?" ;
+ Message [ swedish ] = "Formatmallen finns redan. Skriva ver?" ;
+ Message [ dutch ] = "Dit opmaakprofiel bestaat reeds. Overschrijven?" ;
+ Message [ spanish ] = "El estilo ya existe. Desea sobrescribirlo?" ;
+ Message [ english_us ] = "Style already exists. Overwrite?" ;
+ Message[ chinese_simplified ] = "ʽѾڡҪд";
+ Message[ russian ] = " . ?";
+ Message[ polish ] = "Styl ju istnieje. Zastpi innym?";
+ Message[ japanese ] = "ق͂łɂ܂B㏑܂?";
+ Message[ chinese_traditional ] = "˦wgsbCnмgH";
+ Message[ arabic ] = " . ";
+ Message[ greek ] = " . ;";
+ Message[ korean ] = " ̹ ֽϴ. ðڽϱ?";
+ Message[ turkish ] = "Biim mevcut durumda. zerine yazlsn m?";
+ Message[ language_user1 ] = " ";
+ };
+ Text[ chinese_simplified ] = "ʽ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Utwrz styl";
+ Text[ japanese ] = "ق̍쐬";
+ Text[ chinese_traditional ] = "ͦ˦";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ۼ";
+ Text[ turkish ] = "Biim olutur";
+ Text[ language_user1 ] = " ";
+};
+ // ********************************************************************** EOF
diff --git a/sfx2/source/dialog/partwnd.cxx b/sfx2/source/dialog/partwnd.cxx
new file mode 100644
index 000000000000..90c0795fb713
--- /dev/null
+++ b/sfx2/source/dialog/partwnd.cxx
@@ -0,0 +1,293 @@
+/*************************************************************************
+ *
+ * $RCSfile: partwnd.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:31 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+// includes ******************************************************************
+
+#ifndef _COM_SUN_STAR_AWT_XWINDOW_HPP_
+#include <com/sun/star/awt/XWindow.hpp>
+#endif
+#ifndef _COM_SUN_STAR_TASK_XSTATUSINDICATOR_HPP_
+#include <com/sun/star/task/XStatusIndicator.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UNO_REFERENCE_H_
+#include <com/sun/star/uno/Reference.h>
+#endif
+#ifndef _COM_SUN_STAR_UNO_SEQUENCE_HXX_
+#include <com/sun/star/uno/Sequence.hxx>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_
+#include <com/sun/star/beans/PropertyValue.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UTIL_URL_HPP_
+#include <com/sun/star/util/URL.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XFRAME_HPP_
+#include <com/sun/star/frame/XFrame.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XCONTROLLER_HPP_
+#include <com/sun/star/frame/XController.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_POSSIZE_HPP_
+#include <com/sun/star/awt/PosSize.hpp>
+#endif
+#include <toolkit/helper/vclunohelper.hxx>
+
+#include "partwnd.hxx"
+#include "unoframe.hxx"
+#include "progind.hxx"
+#include "sfxsids.hrc"
+#include "app.hxx"
+#include "bindings.hxx"
+
+// class SfxPartwinFrame_Impl ------------------------------------------
+
+class SfxPartwinFrame_Impl : public SfxUnoFrame
+{
+public:
+ SfxPopupStatusIndicator* pIndicator;
+ SfxPartDockWnd_Impl* pBeamer;
+
+ virtual void SAL_CALL initialize(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > & aPeer) throw ( ::com::sun::star::uno::RuntimeException );
+ virtual SfxFrame* CreateFrame( Window* pParent );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::task::XStatusIndicator > SAL_CALL getStatusIndicator(void) throw ( ::com::sun::star::uno::RuntimeException );
+ void dispatch_Impl( const ::com::sun::star::util::URL& aURL, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArgs );
+};
+
+// -----------------------------------------------------------------------
+::com::sun::star::uno::Reference< ::com::sun::star::task::XStatusIndicator > SAL_CALL SfxPartwinFrame_Impl::getStatusIndicator(void) throw ( ::com::sun::star::uno::RuntimeException )
+{
+ return pIndicator->GetInterface();
+}
+
+void SfxPartwinFrame_Impl::dispatch_Impl( const ::com::sun::star::util::URL& rURL, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rArgs )
+{
+ if ( !pBeamer )
+ return;
+
+ if ( rURL.Protocol.compareToAscii(".uno:") == 0 )
+ {
+ if ( rURL.Path.compareToAscii("Reload") == 0)
+ {
+ SfxUnoFrame::dispatch_Impl( rURL, rArgs );
+ if ( pBeamer->IsAutoHide_Impl() )
+ pBeamer->AutoShow_Impl( sal_True );
+ return;
+ }
+ }
+ else
+ SfxUnoFrame::dispatch_Impl( rURL, rArgs );
+
+ if ( rURL.Complete.len() )
+ {
+ if ( pBeamer->IsAutoHide_Impl() )
+ pBeamer->AutoShow_Impl( sal_True );
+ }
+ else
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > xTmp( this );
+ SfxApplication* pApp = SFX_APP();
+ pApp->SetChildWindow( SID_PARTWIN, sal_False );
+ pApp->GetBindings().Invalidate( SID_PARTWIN );
+ }
+}
+
+// -----------------------------------------------------------------------
+void SAL_CALL SfxPartwinFrame_Impl::initialize( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > & aWindow ) throw ( ::com::sun::star::uno::RuntimeException )
+{
+ setName( rtl::OUString::createFromAscii("_partwindow") );
+ SetContainerWindow_Impl( aWindow );
+}
+
+// -----------------------------------------------------------------------
+SfxFrame* SfxPartwinFrame_Impl::CreateFrame( Window* pParent )
+{
+ return NULL;
+}
+
+//****************************************************************************
+// SfxPartChildWnd_Impl
+//****************************************************************************
+
+SFX_IMPL_DOCKINGWINDOW( SfxPartChildWnd_Impl, SID_PARTWIN );
+
+SfxPartChildWnd_Impl::SfxPartChildWnd_Impl
+(
+ Window* pParent,
+ sal_uInt16 nId,
+ SfxBindings* pBindings,
+ SfxChildWinInfo* pInfo
+)
+ : SfxChildWindow( pParent, nId )
+{
+ // Window erzeugen
+ pWindow = new SfxPartDockWnd_Impl(
+ pBindings, this, pParent, WB_STDDOCKWIN | WB_CLIPCHILDREN | WB_SIZEABLE | WB_3DLOOK );
+ eChildAlignment = SFX_ALIGN_TOP;
+// pWindow->SetHelpId ( HID_NAVIGATOR_WINDOW );
+ ((SfxDockingWindow*)pWindow)->SetFloatingSize( Size( 240, 240 ) );
+ pWindow->SetSizePixel( Size( 240, 240 ) );
+
+ ( ( SfxDockingWindow* ) pWindow )->Initialize( pInfo );
+}
+
+sal_Bool SfxPartChildWnd_Impl::QueryClose()
+{
+ return ( (SfxPartDockWnd_Impl*)pWindow )->QueryClose();
+}
+
+//****************************************************************************
+// SfxPartDockWnd_Impl
+//****************************************************************************
+
+SfxPartDockWnd_Impl::SfxPartDockWnd_Impl
+(
+ SfxBindings* pBindings,
+ SfxChildWindow* pChildWin,
+ Window* pParent,
+ WinBits nBits
+) :
+
+ SfxDockingWindow( pBindings, pChildWin, pParent, nBits ),
+ _pFrame( new SfxPartwinFrame_Impl )
+
+{
+ _pFrame->acquire();
+ _pFrame->pBeamer = this;
+ _pFrame->initialize( VCLUnoHelper::GetInterface ( this ) );
+ _pFrame->pIndicator = new SfxPopupStatusIndicator( this );
+ pChildWin->SetFrame( _pFrame );
+}
+
+//****************************************************************************
+
+SfxPartDockWnd_Impl::~SfxPartDockWnd_Impl()
+{
+ _pFrame->SetContainerWindow_Impl( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > () );
+ DELETEZ( _pFrame->pIndicator );
+ _pFrame->pBeamer = NULL;
+ _pFrame->dispose();
+ _pFrame->release();
+}
+
+//****************************************************************************
+
+Rectangle impl_Rectangle_Struct2Object( const ::com::sun::star::awt::Rectangle& aRectangleStruct )
+{
+ return Rectangle(aRectangleStruct.X,aRectangleStruct.Y,aRectangleStruct.Width,aRectangleStruct.Height);
+}
+
+void SfxPartDockWnd_Impl::Resize()
+
+/* [Beschreibung]
+
+ Anpassung der Gr"osse der Controls an die neue Windowgr"osse
+*/
+
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > xWindow( _pFrame->getComponentWindow() );
+ if ( xWindow.is() )
+ {
+ Size aSize( GetOutputSizePixel() );
+ Rectangle aRect( impl_Rectangle_Struct2Object(xWindow->getPosSize()) );
+ Point aPos( aRect.TopLeft() );
+ Size aNewSize( aSize.Width() - 2 * aPos.X(), aSize.Height() - aPos.Y() );
+ if ( _pFrame->pIndicator->IsVisible() )
+ {
+ long nHeight = _pFrame->pIndicator->CalcWindowSizePixel().Height();
+ aNewSize.Height() -= nHeight;
+ _pFrame->pIndicator->SetPosSizePixel( 0, aPos.Y() + aNewSize.Height(), aNewSize.Width(), nHeight, WINDOW_POSSIZE_POSSIZE );
+ }
+
+ xWindow->setPosSize( aPos.X(), aPos.Y(), aNewSize.Width(), aNewSize.Height(), ::com::sun::star::awt::PosSize::SIZE );
+ }
+
+ SfxDockingWindow::Resize();
+}
+
+//****************************************************************************
+
+sal_Bool SfxPartDockWnd_Impl::QueryClose()
+{
+ sal_Bool bClose = sal_True;
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController > xCtrl = _pFrame->getController();
+
+ if ( xCtrl.is() )
+ bClose = xCtrl->suspend( sal_True );
+ return bClose;;
+}
+
+//****************************************************************************
+
+long SfxPartDockWnd_Impl::Notify( NotifyEvent& rEvt )
+{
+ if ( rEvt.GetType() == EVENT_GETFOCUS )
+ _pFrame->activate();
+
+ return SfxDockingWindow::Notify( rEvt );
+}
+
+void SfxPartDockWnd_Impl::FillInfo( SfxChildWinInfo& rInfo ) const
+{
+ SfxDockingWindow::FillInfo( rInfo );
+ rInfo.bVisible = sal_False;
+}
+
+
diff --git a/sfx2/source/dialog/passwd.cxx b/sfx2/source/dialog/passwd.cxx
new file mode 100644
index 000000000000..88856c49b209
--- /dev/null
+++ b/sfx2/source/dialog/passwd.cxx
@@ -0,0 +1,226 @@
+/*************************************************************************
+ *
+ * $RCSfile: passwd.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:31 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+// Include ---------------------------------------------------------------
+
+#ifndef _SV_MSGBOX_HXX
+#include <vcl/msgbox.hxx>
+#endif
+#pragma hdrstop
+
+#include "passwd.hxx"
+#include "sfxtypes.hxx"
+#include "sfxresid.hxx"
+
+#include "dialog.hrc"
+#include "passwd.hrc"
+
+#define MAX_PASSWORD_LEN ((USHORT)16)
+
+// -----------------------------------------------------------------------
+
+#if (SUPD < 555)
+void SfxPasswordDialog::SetConfirm()
+{
+ SetText( maConfirmStr );
+ maPasswordED.SetText( String() );
+ maPasswordED.GrabFocus();
+}
+#endif
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK_INLINE_START( SfxPasswordDialog, EditModifyHdl, Edit *, EMPTYARG )
+{
+ maOKBtn.Enable( maPasswordED.GetText().Len() >= mnMinLen );
+ return 0;
+}
+IMPL_LINK_INLINE_END( SfxPasswordDialog, EditModifyHdl, Edit *, EMPTYARG )
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SfxPasswordDialog, OKHdl, OKButton *, EMPTYARG )
+{
+ if ( ( ( mnExtras & SHOWEXTRAS_CONFIRM ) == SHOWEXTRAS_CONFIRM ) &&
+ ( GetConfirm() != GetPassword() ) )
+ {
+ ErrorBox aBox( this, SfxResId( MSG_ERROR_WRONG_CONFIRM ) );
+ aBox.Execute();
+ maConfirmED.SetText( String() );
+ maConfirmED.GrabFocus();
+ }
+ else
+ EndDialog( RET_OK );
+ return 0;
+}
+
+// CTOR / DTOR -----------------------------------------------------------
+
+SfxPasswordDialog::SfxPasswordDialog( Window* pParent, const String* pGroupText ) :
+
+ ModalDialog( pParent, SfxResId ( DLG_PASSWD ) ),
+
+ maUserFT ( this, ResId( FT_PASSWD_USER ) ),
+ maUserED ( this, ResId( ED_PASSWD_USER ) ),
+ maPasswordFT ( this, ResId( FT_PASSWD_PASSWORD ) ),
+ maPasswordED ( this, ResId( ED_PASSWD_PASSWORD ) ),
+ maConfirmFT ( this, ResId( FT_PASSWD_CONFIRM ) ),
+ maConfirmED ( this, ResId( ED_PASSWD_CONFIRM ) ),
+ maPasswordBox ( this, ResId( GB_PASSWD_PASSWORD ) ),
+ maOKBtn ( this, ResId( BTN_PASSWD_OK ) ),
+ maCancelBtn ( this, ResId( BTN_PASSWD_CANCEL ) ),
+ maHelpBtn ( this, ResId( BTN_PASSWD_HELP ) ),
+ maConfirmStr ( ResId( STR_PASSWD_CONFIRM ) ),
+
+ mnMinLen ( 5 ),
+ mnExtras ( 0 )
+
+{
+ FreeResource();
+
+ Link aLink = LINK( this, SfxPasswordDialog, EditModifyHdl );
+ maPasswordED.SetModifyHdl( aLink );
+ aLink = LINK( this, SfxPasswordDialog, OKHdl );
+ maOKBtn.SetClickHdl( aLink );
+
+ maPasswordED.SetMaxTextLen( MAX_PASSWORD_LEN );
+ maConfirmED.SetMaxTextLen( MAX_PASSWORD_LEN );
+
+ if ( pGroupText )
+ maPasswordBox.SetText( *pGroupText );
+}
+
+// -----------------------------------------------------------------------
+
+void SfxPasswordDialog::SetMinLen( USHORT nLen )
+{
+ mnMinLen = Min( nLen, MAX_PASSWORD_LEN );
+ EditModifyHdl( NULL );
+}
+
+// -----------------------------------------------------------------------
+
+short SfxPasswordDialog::Execute()
+{
+ if ( mnExtras < SHOWEXTRAS_ALL )
+ {
+ Size a3Size = LogicToPixel( Size( 3, 3 ), MAP_APPFONT );
+ Size a6Size = LogicToPixel( Size( 6, 6 ), MAP_APPFONT );
+ long nMinHeight = maHelpBtn.GetPosPixel().Y() +
+ maHelpBtn.GetSizePixel().Height() + a6Size.Height();
+ USHORT nRowHided = 1;
+
+ if ( SHOWEXTRAS_NONE == mnExtras )
+ {
+ maUserFT.Hide();
+ maUserED.Hide();
+ maConfirmFT.Hide();
+ maConfirmED.Hide();
+ maPasswordFT.Hide();
+
+ Point aPos = maUserFT.GetPosPixel();
+ long nEnd = maUserED.GetPosPixel().X() + maUserED.GetSizePixel().Width();
+ maPasswordED.SetPosPixel( aPos );
+ Size aSize = maPasswordED.GetSizePixel();
+ aSize.Width() = nEnd - aPos.X();
+ maPasswordED.SetSizePixel( aSize );
+
+ nRowHided = 2;
+ }
+ else if ( SHOWEXTRAS_USER == mnExtras )
+ {
+ maConfirmFT.Hide();
+ maConfirmED.Hide();
+ }
+ else if ( SHOWEXTRAS_CONFIRM == mnExtras )
+ {
+ maUserFT.Hide();
+ maUserED.Hide();
+
+ Point aPwdPos1 = maPasswordFT.GetPosPixel();
+ Point aPwdPos2 = maPasswordED.GetPosPixel();
+
+ Point aPos = maUserFT.GetPosPixel();
+ maPasswordFT.SetPosPixel( aPos );
+ aPos = maUserED.GetPosPixel();
+ maPasswordED.SetPosPixel( aPos );
+
+ maConfirmFT.SetPosPixel( aPwdPos1 );
+ maConfirmED.SetPosPixel( aPwdPos2 );
+ }
+
+ Size aBoxSize = maPasswordBox.GetSizePixel();
+ aBoxSize.Height() -= ( nRowHided * maUserED.GetSizePixel().Height() );
+ aBoxSize.Height() -= ( nRowHided * a3Size.Height() );
+ maPasswordBox.SetSizePixel( aBoxSize );
+
+ long nDlgHeight = maPasswordBox.GetPosPixel().Y() + aBoxSize.Height() + a6Size.Height();
+ if ( nDlgHeight < nMinHeight )
+ nDlgHeight = nMinHeight;
+ Size aDlgSize = GetOutputSizePixel();
+ aDlgSize.Height() = nDlgHeight;
+ SetOutputSizePixel( aDlgSize );
+ }
+
+ return ModalDialog::Execute();
+}
+
+
diff --git a/sfx2/source/dialog/passwd.hrc b/sfx2/source/dialog/passwd.hrc
new file mode 100644
index 000000000000..80d7a6e59e78
--- /dev/null
+++ b/sfx2/source/dialog/passwd.hrc
@@ -0,0 +1,83 @@
+/*************************************************************************
+ *
+ * $RCSfile: passwd.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:31 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SFX_PASSWD_HRC
+#define _SFX_PASSWD_HRC
+
+// defines ---------------------------------------------------------------
+
+#define GB_PASSWD_PASSWORD 10
+#define FT_PASSWD_USER 11
+#define ED_PASSWD_USER 12
+#define FT_PASSWD_PASSWORD 13
+#define ED_PASSWD_PASSWORD 14
+#define FT_PASSWD_CONFIRM 15
+#define ED_PASSWD_CONFIRM 16
+
+#define BTN_PASSWD_OK 20
+#define BTN_PASSWD_CANCEL 21
+#define BTN_PASSWD_HELP 22
+
+#define STR_PASSWD_CONFIRM 30
+
+#endif
+
+// ******************************************************************* EOF
+
diff --git a/sfx2/source/dialog/passwd.src b/sfx2/source/dialog/passwd.src
new file mode 100644
index 000000000000..1abb012dc421
--- /dev/null
+++ b/sfx2/source/dialog/passwd.src
@@ -0,0 +1,269 @@
+/*************************************************************************
+ *
+ * $RCSfile: passwd.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:31 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+ // include ---------------------------------------------------------------
+#include "helpid.hrc"
+#include "dialog.hrc"
+#include "passwd.hrc"
+
+ // DLG_PASSWD ------------------------------------------------------------
+ModalDialog DLG_PASSWD
+{
+ HelpId = HID_PASSWD ;
+ OutputSize = TRUE ;
+ SVLook = TRUE ;
+ Size = MAP_APPFONT( 200, 68 );
+ Text = "Passwort eingeben" ;
+ Text [ ENGLISH ] = "Enter password" ;
+ Text [ norwegian ] = "Skriv inn passord" ;
+ Text [ italian ] = "Digita password" ;
+ Text [ portuguese_brazilian ] = "Digitar senha" ;
+ Text [ portuguese ] = "Digitar senha" ;
+ Text [ finnish ] = "Kirjoita salasana" ;
+ Text [ danish ] = "Indtast adgangskode" ;
+ Text [ french ] = "Saisie du mot de passe" ;
+ Text [ swedish ] = "Mata in lsenord" ;
+ Text [ dutch ] = "Wachtwoord invoeren" ;
+ Text [ spanish ] = "Introduzca la contrasea" ;
+ Text [ english_us ] = "Enter Password" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Wprowad haso";
+ Text[ japanese ] = "߽ܰނ̓";
+ Text[ chinese_traditional ] = "JKX";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = "н Է";
+ Moveable = TRUE ;
+ FixedText FT_PASSWD_USER
+ {
+ Pos = MAP_APPFONT( 12, 15 );
+ Size = MAP_APPFONT( 42, 10 );
+ Text = "~Benutzer";
+ Text[English] = "User";
+ Text[ english_us ] = "~User";
+ Text[ portuguese ] = "~Utilizador";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "~Gebruiker";
+ Text[ french ] = "~Utilisateur";
+ Text[ spanish ] = "Usuar~io";
+ Text[ italian ] = "Utente";
+ Text[ danish ] = "Bruger";
+ Text[ swedish ] = "Anvndare";
+ Text[ polish ] = "Uytkownik";
+ Text[ portuguese_brazilian ] = "User";
+ Text[ japanese ] = "հް(~U)";
+ Text[ korean ] = "(~U)";
+ Text[ chinese_simplified ] = "ʹ(~U)";
+ Text[ chinese_traditional ] = "ϥΪ(~U)";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "~Kullanc";
+ Text[ language_user1 ] = " ";
+ };
+ Edit ED_PASSWD_USER
+ {
+ Border = TRUE;
+ Pos = MAP_APPFONT( 57, 14 );
+ Size = MAP_APPFONT( 75, 12 );
+ };
+ FixedText FT_PASSWD_PASSWORD
+ {
+ Pos = MAP_APPFONT( 12, 30 );
+ Size = MAP_APPFONT( 42, 10 );
+ Text = "~Passwort";
+ Text[English] = "Password";
+ Text[ english_us ] = "~Password";
+ Text[ portuguese ] = "~Senha";
+ Text[ russian ] = "";
+ Text[ greek ] = " ";
+ Text[ dutch ] = "~Wachtwoord";
+ Text[ french ] = "~Mot de passe";
+ Text[ spanish ] = "~Contrasea";
+ Text[ italian ] = "~Password";
+ Text[ danish ] = "Adgangskode";
+ Text[ swedish ] = "Lsenord";
+ Text[ polish ] = "Haso";
+ Text[ portuguese_brazilian ] = "Password";
+ Text[ japanese ] = "߽ܰ(~P)";
+ Text[ korean ] = "н(~P)";
+ Text[ chinese_simplified ] = "(~P)";
+ Text[ chinese_traditional ] = "KX(~P)";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "~ifre";
+ Text[ language_user1 ] = " ";
+ };
+ Edit ED_PASSWD_PASSWORD
+ {
+ Border = TRUE;
+ PassWord = TRUE;
+ Pos = MAP_APPFONT( 57, 29 );
+ Size = MAP_APPFONT( 75, 12 );
+ };
+ FixedText FT_PASSWD_CONFIRM
+ {
+ Pos = MAP_APPFONT( 12, 45 );
+ Size = MAP_APPFONT( 42, 10 );
+ Text = "~Besttigen";
+ Text[English] = "Confirm";
+ Text[ english_us ] = "~Confirm";
+ Text[ portuguese ] = "~Confirmar";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "~Bevestigen";
+ Text[ french ] = "~Confirmer";
+ Text[ spanish ] = "~Confirmar";
+ Text[ italian ] = "Conferma";
+ Text[ danish ] = "Bekrft";
+ Text[ swedish ] = "Bekrfta";
+ Text[ polish ] = "Potwierd";
+ Text[ portuguese_brazilian ] = "Confirm";
+ Text[ japanese ] = "mF(~C)";
+ Text[ korean ] = "Ȯ(~C)";
+ Text[ chinese_simplified ] = "ȷ(~C)";
+ Text[ chinese_traditional ] = "T{(~C)";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "~Onayla";
+ };
+ Edit ED_PASSWD_CONFIRM
+ {
+ Border = TRUE;
+ PassWord = TRUE;
+ Pos = MAP_APPFONT( 57, 44 );
+ Size = MAP_APPFONT( 75, 12 );
+ };
+ GroupBox GB_PASSWD_PASSWORD
+ {
+ Pos = MAP_APPFONT( 6, 3 );
+ Size = MAP_APPFONT( 132, 59 );
+ Text = "Passwort" ;
+ Text [ ENGLISH ] = "Password" ;
+ Text [ norwegian ] = "Passord" ;
+ Text [ italian ] = "Password" ;
+ Text [ portuguese_brazilian ] = "Senha" ;
+ Text [ portuguese ] = "Senha" ;
+ Text [ finnish ] = "Salasana" ;
+ Text [ danish ] = "Adgangskode" ;
+ Text [ french ] = "Mot de passe" ;
+ Text [ swedish ] = "Lsenord" ;
+ Text [ dutch ] = "Wachtwoord" ;
+ Text [ spanish ] = "Contrasea" ;
+ Text [ english_us ] = "Password" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "Haso";
+ Text[ japanese ] = "߽ܰ";
+ Text[ chinese_traditional ] = "KX";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = "н";
+ Text[ turkish ] = "ifre";
+ Text[ language_user1 ] = " ";
+ };
+ OKButton BTN_PASSWD_OK
+ {
+ Disable = TRUE;
+ Pos = MAP_APPFONT( 144, 6 );
+ Size = MAP_APPFONT( 50, 14 );
+ DefButton = TRUE;
+ };
+ CancelButton BTN_PASSWD_CANCEL
+ {
+ Pos = MAP_APPFONT( 144, 23 );
+ Size = MAP_APPFONT( 50, 14 );
+ };
+ HelpButton BTN_PASSWD_HELP
+ {
+ Pos = MAP_APPFONT( 144, 43 );
+ Size = MAP_APPFONT( 50, 14 );
+ };
+ String STR_PASSWD_CONFIRM
+ {
+ Text = "Passwort besttigen" ;
+ Text [ ENGLISH ] = "Confirm password" ;
+ Text [ norwegian ] = "Bekrefte passord" ;
+ Text [ italian ] = "Conferma password" ;
+ Text [ portuguese_brazilian ] = "Confirmar senha" ;
+ Text [ portuguese ] = "Confirmar senha" ;
+ Text [ finnish ] = "Varmista salasana" ;
+ Text [ danish ] = "Bekrft adgangskode" ;
+ Text [ french ] = "Confirmer le mot de passe" ;
+ Text [ swedish ] = "Bekrfta lsenord" ;
+ Text [ dutch ] = "Wachtwoord bevestigen" ;
+ Text [ spanish ] = "Confirmar contrasea" ;
+ Text [ english_us ] = "Confirm password" ;
+ Text[ chinese_simplified ] = "ȷϿ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Potwierd haso";
+ Text[ japanese ] = "߽ܰނ̊mF";
+ Text[ chinese_traditional ] = "T{KX";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = "н Ȯ";
+ Text[ turkish ] = "ifreyi onayla";
+ Text[ language_user1 ] = " ";
+ };
+ Text[ turkish ] = "ifreyi girin";
+ Text[ language_user1 ] = " ";
+};
+
+// ********************************************************************** EOF
+
diff --git a/sfx2/source/dialog/sfxurl.cxx b/sfx2/source/dialog/sfxurl.cxx
new file mode 100644
index 000000000000..3205fe1b730c
--- /dev/null
+++ b/sfx2/source/dialog/sfxurl.cxx
@@ -0,0 +1,72 @@
+/*************************************************************************
+ *
+ * $RCSfile: sfxurl.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:31 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#include <iodlg.hxx>
+#include <sfxresid.hxx>
+#include <dialog.hrc>
+
+SfxUrlDialog::SfxUrlDialog( Window *pParent )
+ : ModalDialog( pParent, SfxResId( RID_URLOPEN ) ),
+ aEdit( this, ResId(RID_URLOPEN_URL) ),
+ aCancel( this, ResId(RID_URLOPEN_CANCEL) ),
+ aOk( this, ResId(RID_URLOPEN_OK) )
+{
+ FreeResource();
+}
diff --git a/sfx2/source/dialog/splitwin.cxx b/sfx2/source/dialog/splitwin.cxx
new file mode 100644
index 000000000000..7069973c3ddd
--- /dev/null
+++ b/sfx2/source/dialog/splitwin.cxx
@@ -0,0 +1,1337 @@
+/*************************************************************************
+ *
+ * $RCSfile: splitwin.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:31 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include <string> // HACK: prevent conflict between STLPORT and Workshop headers
+
+#ifndef _WRKWIN_HXX //autogen
+#include <vcl/wrkwin.hxx>
+#endif
+#ifndef _SYSTEM_HXX //autogen
+#include <vcl/system.hxx>
+#endif
+#ifndef _SFXINIMGR_HXX //autogen
+#include <svtools/iniman.hxx>
+#endif
+#pragma hdrstop
+
+#include "splitwin.hxx"
+#include "workwin.hxx"
+#include "dockwin.hxx"
+#include "app.hxx"
+#include "inimgr.hxx"
+#include "dialog.hrc"
+#include "sfxresid.hxx"
+#include "mnumgr.hxx"
+#include "virtmenu.hxx"
+#include "msgpool.hxx"
+#include "viewfrm.hxx"
+
+#define VERSION 1
+#define nPixel 30L
+
+struct SfxDock_Impl
+{
+ USHORT nType;
+ SfxDockingWindow* pWin; // SplitWindow hat dieses Fenster
+ BOOL bNewLine;
+ BOOL bHide; // SplitWindow hatte dieses Fenster
+ long nSize;
+};
+
+typedef SfxDock_Impl* SfxDockPtr;
+SV_DECL_PTRARR_DEL( SfxDockArr_Impl, SfxDockPtr, 4, 4);
+SV_IMPL_PTRARR( SfxDockArr_Impl, SfxDockPtr);
+
+class SfxEmptySplitWin_Impl : public SplitWindow
+{
+/* [Beschreibung]
+
+ Das SfxEmptySplitWin_Impldow ist ein leeres SplitWindow, das das SfxSplitWindow
+ im AutoHide-Modus ersetzt. Es dient nur als Platzhalter, um MouseMoves
+ zu empfangen und ggf. das eigentlichte SplitWindow einzublenden
+*/
+friend class SfxSplitWindow;
+
+ SfxSplitWindow* pOwner;
+ BOOL bFadeIn;
+ BOOL bAutoHide;
+ BOOL bSplit;
+ BOOL bEndAutoHide;
+ Timer aTimer;
+ Point aLastPos;
+ USHORT nState;
+
+ SfxEmptySplitWin_Impl( SfxSplitWindow *pParent )
+ : SplitWindow( pParent->GetParent(), WinBits( WB_BORDER | WB_3DLOOK ) )
+ , pOwner( pParent )
+ , bFadeIn( FALSE )
+ , bAutoHide( FALSE )
+ , bEndAutoHide( FALSE )
+ , bSplit( FALSE )
+ , nState( 1 )
+ {
+ aTimer.SetTimeoutHdl(
+ LINK(pOwner, SfxSplitWindow, TimerHdl ) );
+ aTimer.SetTimeout( 200 );
+ EnableDrop( TRUE );
+ SetAlign( pOwner->GetAlign() );
+ Actualize();
+ ShowAutoHideButton( pOwner->IsAutoHideButtonVisible() );
+ ShowFadeInHideButton( TRUE );
+ }
+
+ ~SfxEmptySplitWin_Impl()
+ {
+ aTimer.Stop();
+ }
+
+ virtual void MouseMove( const MouseEvent& );
+ virtual BOOL QueryDrop( DropEvent& rEvt );
+ virtual void AutoHide();
+ virtual void FadeIn();
+ void Actualize();
+};
+
+void SfxEmptySplitWin_Impl::Actualize()
+{
+ Size aSize( pOwner->GetSizePixel() );
+ switch ( pOwner->GetAlign() )
+ {
+ case WINDOWALIGN_LEFT:
+ case WINDOWALIGN_RIGHT:
+ aSize.Width() = GetFadeInSize();
+ break;
+ case WINDOWALIGN_TOP:
+ case WINDOWALIGN_BOTTOM:
+ aSize.Height() = GetFadeInSize();
+ break;
+ }
+
+ SetSizePixel( aSize );
+}
+
+void SfxEmptySplitWin_Impl::AutoHide()
+{
+ pOwner->SetPinned_Impl( !pOwner->bPinned );
+ FadeIn();
+ aLastPos = GetPointerPosPixel();
+ aTimer.Start();
+}
+
+void SfxEmptySplitWin_Impl::FadeIn()
+{
+ if (!bAutoHide )
+ bAutoHide = IsFadeNoButtonMode();
+ pOwner->SetFadeIn_Impl( TRUE );
+ pOwner->Show_Impl();
+ if ( bAutoHide )
+ {
+ // Timer zum Schlie\sen aufsetzen; der Aufrufer mu\s selbst sicherstellen,
+ // da\s das Window nicht gleich wieder zu geht ( z.B. durch Setzen des
+ // Focus oder einen modal mode )
+ aLastPos = GetPointerPosPixel();
+ aTimer.Start();
+ }
+}
+
+BOOL SfxEmptySplitWin_Impl::QueryDrop( DropEvent& rEvt )
+{
+#ifndef OS2
+ bAutoHide = TRUE;
+ FadeIn();
+#endif
+
+ return FALSE;
+}
+
+
+BOOL SfxSplitWindow::QueryDrop( DropEvent& rEvt )
+{
+ Point aMousePos( rEvt.GetPosPixel() );
+ Rectangle aRect( GetFadeOutRect() );
+ if ( aRect.IsInside( aMousePos ) && !bPinned )
+ {
+ FadeOut();
+ return FALSE;
+ }
+ else
+ return SplitWindow::QueryDrop( rEvt );
+}
+
+//-------------------------------------------------------------------------
+
+void SfxSplitWindow::MouseButtonDown( const MouseEvent& rMEvt )
+{
+ if ( rMEvt.GetClicks() != 2 )
+ SplitWindow::MouseButtonDown( rMEvt );
+}
+
+void SfxEmptySplitWin_Impl::MouseMove( const MouseEvent& rMEvt )
+{
+ SplitWindow::MouseMove( rMEvt );
+}
+
+//-------------------------------------------------------------------------
+
+SfxSplitWindow::SfxSplitWindow( Window* pParent, SfxChildAlignment eAl,
+ SfxWorkWindow *pW, BOOL bWithButtons, WinBits nBits )
+
+/* [Beschreibung]
+
+ Ein SfxSplitWindow verbirgt die rekursive Struktur des SV-Splitwindows
+ nach au\sen, indem es einen tabellenartigen Aufbau mit Zeilen und Spalten
+ ( also maximale Rekursionstiefe 2 ) simuliert.
+ Au\erdem sichert es die Persistenz der Anordnung der SfxDockingWindows.
+*/
+
+: SplitWindow ( pParent, nBits | WB_HIDE ),
+ eAlign(eAl),
+ pWorkWin(pW),
+ pDockArr( new SfxDockArr_Impl ),
+ bLocked(FALSE),
+ bPinned(FALSE),
+ pEmptyWin(NULL),
+ pActive(NULL)
+{
+ if ( bWithButtons )
+ {
+ ShowAutoHideButton( TRUE );
+ ShowFadeOutButton( TRUE );
+ }
+
+ // SV-Alignment setzen
+ WindowAlign eTbxAlign;
+ switch ( eAlign )
+ {
+ case SFX_ALIGN_LEFT:
+ eTbxAlign = WINDOWALIGN_LEFT;
+ break;
+ case SFX_ALIGN_RIGHT:
+ eTbxAlign = WINDOWALIGN_RIGHT;
+ break;
+ case SFX_ALIGN_TOP:
+ eTbxAlign = WINDOWALIGN_TOP;
+ break;
+ case SFX_ALIGN_BOTTOM:
+ eTbxAlign = WINDOWALIGN_BOTTOM;
+ bPinned = TRUE;
+ break;
+ }
+
+ SetAlign (eTbxAlign);
+ pEmptyWin = new SfxEmptySplitWin_Impl( this );
+ if ( bPinned )
+ {
+ pEmptyWin->bFadeIn = TRUE;
+ pEmptyWin->nState = 2;
+ }
+
+ if ( bWithButtons )
+ {
+ // Konfiguration einlesen
+ SfxIniManager *pAppIniMgr = SFX_APP()->GetAppIniManager();
+ if ( pAppIniMgr )
+ {
+ String aWinData( pAppIniMgr->Get( SFX_KEY_SPLITWINDOW, (USHORT) eTbxAlign ) );
+ if ( aWinData.Len() && aWinData.GetChar( (USHORT) 0 ) == 'V' )
+ {
+ pEmptyWin->nState = aWinData.GetToken( 1, ',' ).ToInt32();
+ if ( pEmptyWin->nState & 2 )
+ pEmptyWin->bFadeIn = TRUE;
+ bPinned = !( pEmptyWin->nState & 1 );
+
+ USHORT i=2;
+ USHORT nCount = (USHORT) aWinData.GetToken(i++, ',').ToInt32();
+ for ( USHORT n=0; n<nCount; n++ )
+ {
+ SfxDock_Impl *pDock = new SfxDock_Impl;
+ pDock->pWin = 0;
+ pDock->bNewLine = FALSE;
+ pDock->bHide = TRUE;
+ pDock->nType = (USHORT) aWinData.GetToken(i++, ',').ToInt32();
+ if ( !pDock->nType )
+ {
+ // K"onnte NewLine bedeuten
+ pDock->nType = (USHORT) aWinData.GetToken(i++, ',').ToInt32();
+ if ( !pDock->nType )
+ {
+ // Lesefehler
+ delete pDock;
+ break;
+ }
+ else
+ pDock->bNewLine = TRUE;
+ }
+
+ pDockArr->Insert(pDock,n);
+ }
+ }
+ }
+ }
+ else
+ {
+ bPinned = TRUE;
+ pEmptyWin->bFadeIn = TRUE;
+ pEmptyWin->nState = 2;
+ }
+
+ SetAutoHideState( !bPinned );
+ pEmptyWin->SetAutoHideState( !bPinned );
+}
+
+//-------------------------------------------------------------------------
+
+SfxSplitWindow::~SfxSplitWindow()
+{
+ if ( !pWorkWin->GetParent_Impl() )
+ {
+ // Konfiguration abspeichern
+ String aWinData('V');
+ aWinData += String::CreateFromInt32( VERSION );
+ aWinData += ',';
+ aWinData += String::CreateFromInt32( pEmptyWin->nState );
+ aWinData += ',';
+
+ USHORT nCount = 0;
+ USHORT n;
+ for ( n=0; n<pDockArr->Count(); n++ )
+ {
+ SfxDock_Impl *pDock = (*pDockArr)[n];
+ if ( pDock->bHide )
+ nCount++;
+ }
+
+ aWinData += String::CreateFromInt32( nCount );
+
+ for ( n=0; n<pDockArr->Count(); n++ )
+ {
+ SfxDock_Impl *pDock = (*pDockArr)[n];
+ if ( !pDock->bHide )
+ continue;
+ if ( pDock->bNewLine )
+ aWinData += DEFINE_CONST_UNICODE(",0");
+ aWinData += ',';
+ aWinData += String::CreateFromInt32( pDock->nType);
+ }
+
+ SfxIniManager *pIniMgr = SFX_INIMANAGER();
+ pIniMgr->Set( aWinData, SFX_KEY_SPLITWINDOW, GetAlign() );
+ }
+
+ if ( pEmptyWin )
+ {
+ // pOwner auf NULL setzen, sonst versucht pEmptyWin, nochmal zu
+ // l"oschen; es wird n"amlich von au\sen immer das Fenster deleted,
+ // das gerade angedockt ist
+ pEmptyWin->pOwner = NULL;
+ delete pEmptyWin;
+ }
+
+ delete pDockArr;
+}
+
+//-------------------------------------------------------------------------
+
+void SfxSplitWindow::StartSplit()
+{
+ long nSize;
+ Size aSize = GetSizePixel();
+
+ if ( pEmptyWin )
+ {
+ pEmptyWin->bFadeIn = TRUE;
+ pEmptyWin->bSplit = TRUE;
+ }
+
+ Rectangle aRect = pWorkWin->GetFreeArea( !bPinned );
+ switch ( GetAlign() )
+ {
+ case WINDOWALIGN_LEFT:
+ case WINDOWALIGN_RIGHT:
+ nSize = aSize.Width() + aRect.GetWidth();
+ break;
+ case WINDOWALIGN_TOP:
+ case WINDOWALIGN_BOTTOM:
+ nSize = aSize.Height() + aRect.GetHeight();
+ break;
+ }
+
+ SetMaxSizePixel( nSize );
+}
+
+//-------------------------------------------------------------------------
+
+void SfxSplitWindow::SplitResize()
+{
+ if ( bPinned )
+ {
+ pWorkWin->ArrangeChilds_Impl();
+ pWorkWin->ShowChilds_Impl();
+ }
+ else
+ pWorkWin->ArrangeAutoHideWindows( this );
+}
+
+//-------------------------------------------------------------------------
+
+void SfxSplitWindow::Split()
+{
+ if ( pEmptyWin )
+ pEmptyWin->bSplit = FALSE;
+
+ SplitWindow::Split();
+
+ USHORT nCount = pDockArr->Count();
+ for ( USHORT n=0; n<nCount; n++ )
+ {
+ SfxDock_Impl *pD = (*pDockArr)[n];
+ if ( pD->pWin )
+ {
+ USHORT nId = pD->nType;
+ long nSize = GetItemSize( nId );
+ long nSetSize = GetItemSize( GetSet( nId ) );
+ Size aSize;
+
+ if ( IsHorizontal() )
+ {
+ aSize.Width() = nSize;
+ aSize.Height() = nSetSize;
+ }
+ else
+ {
+ aSize.Width() = nSetSize;
+ aSize.Height() = nSize;
+ }
+
+ pD->pWin->SetItemSize_Impl( aSize );
+ }
+ }
+}
+
+//-------------------------------------------------------------------------
+
+void SfxSplitWindow::InsertWindow( SfxDockingWindow* pDockWin, const Size& rSize)
+
+/* [Beschreibung]
+
+ Zum Einf"ugen von SfxDockingWindows kann auch keine Position "ubergeben
+ werden. Das SfxSplitWindow sucht dann die zuletzt gemerkte zu dem
+ "ubergebenen SfxDockingWindow heraus oder h"angt es als letztes neu an.
+
+*/
+{
+ short nLine = -1; // damit erstes Fenster nLine auf 0 hochsetzen kann
+ USHORT nL;
+ USHORT nPos = 0;
+ BOOL bNewLine = TRUE;
+
+ SfxDock_Impl *pFoundDock=0;
+ USHORT nCount = pDockArr->Count();
+ for ( USHORT n=0; n<nCount; n++ )
+ {
+ SfxDock_Impl *pDock = (*pDockArr)[n];
+ if ( pDock->bNewLine )
+ {
+ // Das Fenster er"offnet eine neue Zeile
+ if ( pFoundDock )
+ // Aber hinter dem gerade eingef"ugten Fenster
+ break;
+
+ // Neue Zeile
+ nPos = 0;
+ bNewLine = TRUE;
+ }
+
+ if ( pDock->pWin )
+ {
+ // Es gibt an dieser Stelle gerade ein Fenster
+ if ( bNewLine && !pFoundDock )
+ {
+ // Bisher ist nicht bekannt, in welcher realen Zeile es liegt
+ GetWindowPos( pDock->pWin, nL, nPos );
+ nLine = (short) nL;
+ }
+
+ if ( !pFoundDock )
+ {
+ // Fenster liegt vor dem eingef"ugten
+ nPos++;
+ }
+
+ // Zeile ist schon er"offnet
+ bNewLine = FALSE;
+ if ( pFoundDock )
+ break;
+ }
+
+ if ( pDock->nType == pDockWin->GetType() )
+ {
+ DBG_ASSERT( !pFoundDock && !pDock->pWin, "Fenster ist schon vorhanden!");
+ pFoundDock = pDock;
+ if ( !bNewLine )
+ break;
+ else
+ {
+ // Es wurde zuletzt eine neue Reihe gestartet, aber noch kein
+ // darin liegendes Fenster gefunden; daher weitersuchen, ob noch
+ // ein Fenster in dieser Zeile folgt, um bNewLine korrekt zu setzen.
+ // Dabei darf aber nLine oder nPos nicht mehr ver"andert werden!
+ nLine++;
+ }
+ }
+ }
+
+ if ( !pFoundDock )
+ {
+ // Nicht gefunden, am Ende einf"ugen
+ pFoundDock = new SfxDock_Impl;
+ pFoundDock->bHide = TRUE;
+ pDockArr->Insert( pFoundDock, nCount );
+ pFoundDock->nType = pDockWin->GetType();
+ nLine++;
+ nPos = 0;
+ bNewLine = TRUE;
+ pFoundDock->bNewLine = bNewLine;
+ }
+
+ pFoundDock->pWin = pDockWin;
+ pFoundDock->bHide = FALSE;
+ InsertWindow_Impl( pFoundDock, rSize, nLine, nPos, bNewLine );
+}
+
+//-------------------------------------------------------------------------
+
+void SfxSplitWindow::ReleaseWindow_Impl(SfxDockingWindow *pDockWin)
+
+/* [Beschreibung]
+
+ Das DockingWindow wird nicht mehr in den internen Daten gespeichert.
+*/
+
+{
+ SfxDock_Impl *pDock=0;
+ USHORT nCount = pDockArr->Count();
+ BOOL bFound = FALSE;
+ for ( USHORT n=0; n<nCount; n++ )
+ {
+ pDock = (*pDockArr)[n];
+ if ( pDock->nType == pDockWin->GetType() )
+ {
+ if ( pDock->bNewLine && n<nCount-1 )
+ (*pDockArr)[n+1]->bNewLine = TRUE;
+
+ // Fenster hat schon eine Position, die vergessen wir
+ bFound = TRUE;
+ pDockArr->Remove(n);
+ break;
+ }
+ }
+
+ if ( bFound )
+ delete pDock;
+}
+
+//-------------------------------------------------------------------------
+
+void SfxSplitWindow::MoveWindow( SfxDockingWindow* pDockWin, const Size& rSize,
+ USHORT nLine, USHORT nPos, BOOL bNewLine)
+
+/* [Beschreibung]
+
+ Das DockingWindow wird innerhalb des Splitwindows verschoben.
+
+*/
+
+{
+ USHORT nL, nP;
+ GetWindowPos( pDockWin, nL, nP );
+
+ if ( nLine > nL && GetItemCount( GetItemId( nL, 0 ) ) == 1 )
+ {
+ // Wenn das letzte Fenster aus seiner Zeile entfernt wird, rutscht
+ // alles eine Zeile nach vorne!
+ nLine--;
+ }
+ else if ( nLine == nL && nPos > nP )
+ {
+ nPos--;
+ }
+
+ RemoveWindow( pDockWin );
+ InsertWindow( pDockWin, rSize, nLine, nPos, bNewLine );
+}
+
+//-------------------------------------------------------------------------
+
+void SfxSplitWindow::InsertWindow( SfxDockingWindow* pDockWin, const Size& rSize,
+ USHORT nLine, USHORT nPos, BOOL bNewLine)
+
+/* [Beschreibung]
+
+ Das DockingWindow wird in dieses Splitwindow geschoben und soll die
+ "ubergebene Position und Gr"o\se haben.
+
+*/
+{
+ ReleaseWindow_Impl( pDockWin );
+ SfxDock_Impl *pDock = new SfxDock_Impl;
+ pDock->bHide = FALSE;
+ pDock->nType = pDockWin->GetType();
+ pDock->bNewLine = bNewLine;
+ pDock->pWin = pDockWin;
+
+ DBG_ASSERT( nPos==0 || !bNewLine, "Falsche Paramenter!");
+ if ( bNewLine )
+ nPos = 0;
+
+ // Das Fenster mu\s vor dem ersten Fenster eingef"ugt werden, das die
+ // gleiche oder eine gr"o\sere Position hat als pDockWin.
+ USHORT nCount = pDockArr->Count();
+
+ // Wenn gar kein Fenster gefunden wird, wird als erstes eingef"ugt
+ USHORT nInsertPos = 0;
+ for ( USHORT n=0; n<nCount; n++ )
+ {
+ SfxDock_Impl *pD = (*pDockArr)[n];
+
+ if (pD->pWin)
+ {
+ // Ein angedocktes Fenster wurde gefunden
+ // Wenn kein geeignetes Fenster hinter der gew"unschten Einf"ugeposition
+ // gefunden wird, wird am Ende eingef"ugt
+ nInsertPos = nCount;
+ USHORT nL=0, nP=0;
+ GetWindowPos( pD->pWin, nL, nP );
+
+ if ( nL == nLine && nP == nPos || nL > nLine )
+ {
+ DBG_ASSERT( nL == nLine || bNewLine || nPos > 0, "Falsche Parameter!" );
+ if ( nL == nLine && nPos == 0 && !bNewLine )
+ {
+ DBG_ASSERT(pD->bNewLine, "Keine neue Zeile?");
+
+ // Das Fenster wird auf nPos==0 eingeschoben
+ pD->bNewLine = FALSE;
+ pDock->bNewLine = TRUE;
+ }
+
+ nInsertPos = n;
+ break;
+ }
+ }
+ }
+
+ pDockArr->Insert(pDock, nInsertPos);
+ InsertWindow_Impl( pDock, rSize, nLine, nPos, bNewLine );
+}
+
+//-------------------------------------------------------------------------
+
+void SfxSplitWindow::InsertWindow_Impl( SfxDock_Impl* pDock,
+ const Size& rSize,
+ USHORT nLine, USHORT nPos, BOOL bNewLine)
+
+/* [Beschreibung]
+
+ F"ugt ein DockingWindow ein und veranla\st die Neuberechnung der Gr"o\se
+ des Splitwindows.
+*/
+
+{
+ SfxDockingWindow* pDockWin = pDock->pWin;
+
+ USHORT nItemBits = pDockWin->GetWinBits_Impl();
+
+ long nWinSize, nSetSize;
+ if ( IsHorizontal() )
+ {
+ nWinSize = rSize.Width();
+ nSetSize = rSize.Height();
+ }
+ else
+ {
+ nSetSize = rSize.Width();
+ nWinSize = rSize.Height();
+ }
+
+ pDock->nSize = nWinSize;
+
+ BOOL bUpdateMode = IsUpdateMode();
+ if ( bUpdateMode )
+ SetUpdateMode( FALSE );
+
+ if ( bNewLine || nLine == GetItemCount( 0 ) )
+ {
+ // Es soll nicht in eine vorhandene Zeile eingef"ugt werden, sondern
+ // eine neue erzeugt werden
+
+ USHORT nId = 1;
+ for ( USHORT n=0; n<GetItemCount(0); n++ )
+ {
+ if ( GetItemId(n) >= nId )
+ nId = GetItemId(n)+1;
+ }
+
+ // Eine neue nLine-te Zeile erzeugen
+ USHORT nBits = nItemBits;
+ if ( GetAlign() == WINDOWALIGN_TOP || GetAlign() == WINDOWALIGN_BOTTOM )
+ nBits |= SWIB_COLSET;
+ InsertItem( nId, nSetSize, nLine, 0, nBits );
+ }
+
+ // In Zeile mit Position nLine das Fenster einf"ugen
+ // ItemWindowSize auf "Prozentual" setzen, da SV dann das Umgr"o\sern
+ // so macht, wie man erwartet; "Pixel" macht eigentlich nur Sinn, wenn
+ // auch Items mit prozentualen oder relativen Gr"o\sen dabei sind.
+ nItemBits |= SWIB_PERCENTSIZE;
+ bLocked = TRUE;
+ USHORT nSet = GetItemId( nLine );
+ InsertItem( pDockWin->GetType(), pDockWin, nWinSize, nPos, nSet, nItemBits );
+
+ // Splitwindows werden im SFX einmal angelegt und beim Einf"ugen des ersten
+ // DockingWindows sichtbar gemacht.
+ if ( GetItemCount( 0 ) == 1 && GetItemCount( 1 ) == 1 )
+ {
+ // Das Neuarrangieren am WorkWindow und ein Show() auf das SplitWindow
+ // wird vom SfxDockingwindow veranla\st (->SfxWorkWindow::ConfigChild_Impl)
+ if ( !bPinned && !IsFloatingMode() )
+ {
+ bPinned = TRUE;
+ BOOL bFadeIn = ( pEmptyWin->nState & 2 ) != 0;
+ pEmptyWin->bFadeIn = FALSE;
+ SetPinned_Impl( FALSE );
+ pEmptyWin->Actualize();
+ pWorkWin->RegisterChild_Impl( *GetSplitWindow(), eAlign, TRUE )->nVisible = CHILD_VISIBLE;
+ pWorkWin->ArrangeChilds_Impl();
+ if ( bFadeIn )
+ FadeIn();
+ }
+ else
+ {
+ BOOL bFadeIn = ( pEmptyWin->nState & 2 ) != 0;
+ pEmptyWin->bFadeIn = FALSE;
+ pEmptyWin->Actualize();
+ pWorkWin->RegisterChild_Impl( *GetSplitWindow(), eAlign, TRUE )->nVisible = CHILD_VISIBLE;
+ pWorkWin->ArrangeChilds_Impl();
+ if ( bFadeIn )
+ FadeIn();
+ }
+
+ pWorkWin->ShowChilds_Impl();
+ }
+
+ if ( bUpdateMode )
+ SetUpdateMode( TRUE );
+ bLocked = FALSE;
+}
+
+//-------------------------------------------------------------------------
+
+void SfxSplitWindow::RemoveWindow( SfxDockingWindow* pDockWin, BOOL bHide )
+
+/* [Beschreibung]
+
+ Entfernt ein DockingWindow. Wenn es das letzte war, wird das SplitWindow
+ gehidet.
+*/
+{
+ USHORT nSet = GetSet( pDockWin->GetType() );
+
+ // Splitwindows werden im SFX einmal angelegt und nach dem Entfernen
+ // des letzten DockingWindows unsichtbar gemacht.
+ if ( GetItemCount( nSet ) == 1 && GetItemCount( 0 ) == 1 )
+ {
+ // Das Neuarrangieren am WorkWindow wird vom SfxDockingwindow
+ // veranla\st!
+ Hide();
+ pEmptyWin->aTimer.Stop();
+ long nRealState = pEmptyWin->nState;
+ FadeOut();
+ pEmptyWin->Hide();
+ pWorkWin->ReleaseChild_Impl( *GetSplitWindow() );
+ pEmptyWin->nState = nRealState;
+ pWorkWin->ArrangeAutoHideWindows( this );
+ }
+
+ SfxDock_Impl *pDock=0;
+ USHORT nCount = pDockArr->Count();
+ BOOL bFound = FALSE;
+ for ( USHORT n=0; n<nCount; n++ )
+ {
+ pDock = (*pDockArr)[n];
+ if ( pDock->nType == pDockWin->GetType() )
+ {
+ pDock->pWin = 0;
+ pDock->bHide = bHide;
+ break;
+ }
+ }
+
+ // Fenster removen, und wenn es das letzte der Zeile war, auch die Zeile
+ // ( Zeile = ItemSet )
+ BOOL bUpdateMode = IsUpdateMode();
+ if ( bUpdateMode )
+ SetUpdateMode( FALSE );
+ bLocked = TRUE;
+
+ RemoveItem( pDockWin->GetType() );
+
+ if ( nSet && !GetItemCount( nSet ) )
+ RemoveItem( nSet );
+
+ if ( bUpdateMode )
+ SetUpdateMode( TRUE );
+ bLocked = FALSE;
+};
+
+//-------------------------------------------------------------------------
+
+BOOL SfxSplitWindow::GetWindowPos( const SfxDockingWindow* pWindow,
+ USHORT& rLine, USHORT& rPos ) const
+/* [Beschreibung]
+
+ Liefert die Id des Itemsets und die des Items f"ur das "ubergebene
+ DockingWindow in der alten Zeilen/Spalten-Bezeichnung zur"uck.
+*/
+
+{
+ USHORT nSet = GetSet ( pWindow->GetType() );
+ if ( nSet == SPLITWINDOW_ITEM_NOTFOUND )
+ return FALSE;
+
+ rPos = GetItemPos( pWindow->GetType(), nSet );
+ rLine = GetItemPos( nSet );
+ return TRUE;
+}
+
+//-------------------------------------------------------------------------
+
+BOOL SfxSplitWindow::GetWindowPos( const Point& rTestPos,
+ USHORT& rLine, USHORT& rPos ) const
+/* [Beschreibung]
+
+ Liefert die Id des Itemsets und die des Items f"ur das DockingWindow
+ an der "ubergebenen Position in der alten Zeilen/Spalten-Bezeichnung
+ zur"uck.
+*/
+
+{
+ USHORT nId = GetItemId( rTestPos );
+ if ( nId == 0 )
+ return FALSE;
+
+ USHORT nSet = GetSet ( nId );
+ rPos = GetItemPos( nId, nSet );
+ rLine = GetItemPos( nSet );
+ return TRUE;
+}
+
+//-------------------------------------------------------------------------
+
+USHORT SfxSplitWindow::GetLineCount() const
+
+/* [Beschreibung]
+
+ Liefert die Zeilenzahl = Zahl der Sub-Itemsets im Root-Set.
+*/
+{
+ return GetItemCount( 0 );
+}
+
+//-------------------------------------------------------------------------
+
+long SfxSplitWindow::GetLineSize( USHORT nLine ) const
+
+/* [Beschreibung]
+
+ Liefert die "Zeilenh"ohe" des nLine-ten Itemsets.
+*/
+{
+ USHORT nId = GetItemId( nLine );
+ return GetItemSize( nId );
+}
+
+//-------------------------------------------------------------------------
+
+USHORT SfxSplitWindow::GetWindowCount( USHORT nLine ) const
+
+/* [Beschreibung]
+
+ Liefert die
+*/
+{
+ USHORT nId = GetItemId( nLine );
+ return GetItemCount( nId );
+}
+
+//-------------------------------------------------------------------------
+
+USHORT SfxSplitWindow::GetWindowCount() const
+
+/* [Beschreibung]
+
+ Liefert die Gesamtzahl aller Fenstert
+*/
+{
+ return GetItemCount( 0 );
+}
+
+//-------------------------------------------------------------------------
+
+void SfxSplitWindow::Command( const CommandEvent& rCEvt )
+{
+#ifdef TF_AUTOSHOW_ON_MOUSEMOVE
+ if ( rCEvt.GetCommand() != COMMAND_CONTEXTMENU )
+ return;
+
+ SfxPopupMenuManager aPop( SfxResId( RID_AUTOHIDE ), pWorkWin->GetBindings() );
+ aPop.StartInsert();
+
+ if ( !bPinned )
+ {
+ aPop.RemoveItem( 0 );
+ String aText( SfxResId(RID_AUTOHIDE ) );
+ aPop.InsertItem( SID_AUTOHIDE, aText, MIB_CHECKABLE ) ;
+ }
+
+ aPop.InsertSeparator();
+
+ USHORT nCount = pDockArr->Count();
+ SfxSlotPool &rSlotPool = SFX_SLOTPOOL();
+ for ( USHORT n=0; n<nCount; n++ )
+ {
+ SfxDock_Impl *pD = (*pDockArr)[n];
+ if ( pD->pWin || pD->bHide )
+ {
+ String aHelpText;
+ String aMenuText = rSlotPool.GetSlotName_Impl( pD->nType, &aHelpText );
+ aPop.InsertItem( pD->nType, aMenuText, MIB_CHECKABLE );
+ }
+ }
+
+ aPop.EndInsert();
+
+ if ( aPop.Execute( GetPointerPosPixel() ) == SID_AUTOHIDE )
+ {
+ // ChildWindows neu anordnen
+ SetPinned_Impl( !bPinned );
+ if ( bPinned && pWorkWin->IsAutoHideMode( this ) )
+ pWorkWin->ArrangeAutoHideWindows( this );
+ pWorkWin->ArrangeChilds_Impl();
+ pWorkWin->ShowChilds_Impl();
+ }
+#else
+ SplitWindow::Command( rCEvt );
+#endif
+}
+
+//-------------------------------------------------------------------------
+
+IMPL_LINK( SfxSplitWindow, TimerHdl, Timer*, pTimer)
+{
+ if ( pTimer )
+ pTimer->Stop();
+
+ if ( CursorIsOverRect( FALSE ) || !pTimer )
+ {
+ // Wenn der Mauszeiger innerhalb des Fensters liegt, SplitWindow anzeigen
+ // und Timer zum Schlie\sen aufsetzen
+ pEmptyWin->bAutoHide = TRUE;
+ if ( !IsVisible() )
+ pEmptyWin->FadeIn();
+
+ pEmptyWin->aLastPos = GetPointerPosPixel();
+ pEmptyWin->aTimer.Start();
+ }
+ else if ( pEmptyWin->bAutoHide )
+ {
+ if ( GetPointerPosPixel() != pEmptyWin->aLastPos )
+ {
+ // Die Maus wurd innerhalb der Timerlaugzeit bewegt, also erst einmal
+ // nichts tun
+ pEmptyWin->aLastPos = GetPointerPosPixel();
+ pEmptyWin->aTimer.Start();
+ return 0L;
+ }
+
+ // Speziell f"ur TF_AUTOSHOW_ON_MOUSEMOVE :
+ // Wenn das Fenster nicht sichtbar ist, gibt es nichts zu tun
+ // (Benutzer ist einfach mit der Maus "uber pEmptyWin gefahren)
+ if ( IsVisible() )
+ {
+ pEmptyWin->bEndAutoHide = FALSE;
+ if ( !Application::IsInModalMode() &&
+ !PopupMenu::IsInExecute() &&
+ !pEmptyWin->bSplit && !HasChildPathFocus( TRUE ) )
+ {
+ // W"ahrend ein modaler Dialog oder ein Popupmenu offen sind
+ // oder w"ahrend des Splittens auf keinen Fall zumachen; auch
+ // solange eines der Children den Focus hat, bleibt das
+ // das Fenster offen
+ pEmptyWin->bEndAutoHide = TRUE;
+ }
+
+ if ( pEmptyWin->bEndAutoHide )
+ {
+ // Von mir aus kann Schlu\s sein mit AutoShow
+ // Aber vielleicht will noch ein anderes SfxSplitWindow offen bleiben,
+ // dann bleiben auch alle anderen offen
+ if ( !pWorkWin->IsAutoHideMode( this ) )
+ {
+ FadeOut();
+ pWorkWin->ArrangeAutoHideWindows( this );
+ }
+ else
+ {
+ pEmptyWin->aLastPos = GetPointerPosPixel();
+ pEmptyWin->aTimer.Start();
+ }
+ }
+ else
+ {
+ pEmptyWin->aLastPos = GetPointerPosPixel();
+ pEmptyWin->aTimer.Start();
+ }
+ }
+ }
+
+ return 0L;
+}
+
+//-------------------------------------------------------------------------
+
+BOOL SfxSplitWindow::CursorIsOverRect( BOOL bForceAdding ) const
+{
+ BOOL bVisible = IsVisible();
+
+ // Auch das kollabierte SplitWindow ber"ucksichtigen
+ Point aPos = pEmptyWin->GetParent()->OutputToScreenPixel( pEmptyWin->GetPosPixel() );
+ Size aSize = pEmptyWin->GetSizePixel();
+
+ if ( bForceAdding )
+ {
+ // Um +/- ein paar Pixel erweitern, sonst ist es zu nerv"os
+ aPos.X() -= nPixel;
+ aPos.Y() -= nPixel;
+ aSize.Width() += 2 * nPixel;
+ aSize.Height() += 2 * nPixel;
+ }
+
+ Rectangle aRect( aPos, aSize );
+
+ if ( bVisible )
+ {
+ Point aPos = GetPosPixel();
+ Size aSize = GetSizePixel();
+
+ // Um +/- ein paar Pixel erweitern, sonst ist es zu nerv"os
+ aPos.X() -= nPixel;
+ aPos.Y() -= nPixel;
+ aSize.Width() += 2 * nPixel;
+ aSize.Height() += 2 * nPixel;
+
+ Rectangle aVisRect( aPos, aSize );
+ aRect = aRect.GetUnion( aVisRect );
+ }
+
+ if ( aRect.IsInside( OutputToScreenPixel( ((Window*)this)->GetPointerPosPixel() ) ) )
+ return TRUE;
+ return FALSE;
+}
+
+//-------------------------------------------------------------------------
+
+SplitWindow* SfxSplitWindow::GetSplitWindow()
+{
+ if ( !bPinned || !pEmptyWin->bFadeIn )
+ return pEmptyWin;
+ return this;
+}
+
+//-------------------------------------------------------------------------
+BOOL SfxSplitWindow::IsFadeIn() const
+{
+ return pEmptyWin->bFadeIn;
+}
+
+BOOL SfxSplitWindow::IsAutoHide( BOOL bSelf ) const
+{
+ return bSelf ? pEmptyWin->bAutoHide && !pEmptyWin->bEndAutoHide : pEmptyWin->bAutoHide;
+}
+
+//-------------------------------------------------------------------------
+
+void SfxSplitWindow::SetPinned_Impl( BOOL bOn )
+{
+ if ( bPinned == bOn )
+ return;
+
+ bPinned = bOn;
+ if ( GetItemCount( 0 ) == 0 )
+ return;
+
+ if ( !bOn )
+ {
+ pEmptyWin->nState |= 1;
+ if ( pEmptyWin->bFadeIn )
+ {
+ // Ersatzfenster anmelden
+ pWorkWin->ReleaseChild_Impl( *this );
+ Hide();
+ pEmptyWin->Actualize();
+ pWorkWin->RegisterChild_Impl( *pEmptyWin, eAlign, TRUE )->nVisible = CHILD_VISIBLE;
+ }
+
+ Point aPos( GetPosPixel() );
+ aPos = GetParent()->OutputToScreenPixel( aPos );
+ SetFloatingPos( aPos );
+ SetFloatingMode( TRUE );
+ GetFloatingWindow()->SetOutputSizePixel( GetOutputSizePixel() );
+
+ if ( pEmptyWin->bFadeIn )
+ Show();
+ }
+ else
+ {
+ pEmptyWin->nState &= ~1;
+ SetOutputSizePixel( GetFloatingWindow()->GetOutputSizePixel() );
+ SetFloatingMode( FALSE );
+
+ if ( pEmptyWin->bFadeIn )
+ {
+ // Ersatzfenster abmelden
+ pWorkWin->ReleaseChild_Impl( *pEmptyWin );
+ pEmptyWin->Hide();
+ pWorkWin->RegisterChild_Impl( *this, eAlign, TRUE )->nVisible = CHILD_VISIBLE;
+ }
+ }
+
+ SetAutoHideState( !bPinned );
+ pEmptyWin->SetAutoHideState( !bPinned );
+}
+
+//-------------------------------------------------------------------------
+
+void SfxSplitWindow::SetFadeIn_Impl( BOOL bOn )
+{
+ if ( bOn == pEmptyWin->bFadeIn )
+ return;
+
+ if ( GetItemCount( 0 ) == 0 )
+ return;
+
+ pEmptyWin->bFadeIn = bOn;
+ if ( bOn )
+ {
+ pEmptyWin->nState |= 2;
+ if ( IsFloatingMode() )
+ {
+ // FloatingWindow ist nicht sichtbar, also anzeigen
+ pWorkWin->ArrangeAutoHideWindows( this );
+ Show();
+ }
+ else
+ {
+ pWorkWin->ReleaseChild_Impl( *pEmptyWin );
+ pEmptyWin->Hide();
+ pWorkWin->RegisterChild_Impl( *this, eAlign, TRUE )->nVisible = CHILD_VISIBLE;
+ pWorkWin->ArrangeChilds_Impl();
+ pWorkWin->ShowChilds_Impl();
+ }
+ }
+ else
+ {
+ pEmptyWin->bAutoHide = FALSE;
+ pEmptyWin->nState &= ~2;
+ if ( !IsFloatingMode() )
+ {
+ // Das Fenster "schwebt" nicht, soll aber ausgeblendet werden,
+ pWorkWin->ReleaseChild_Impl( *this );
+ Hide();
+ pEmptyWin->Actualize();
+ pWorkWin->RegisterChild_Impl( *pEmptyWin, eAlign, TRUE )->nVisible = CHILD_VISIBLE;
+ pWorkWin->ArrangeChilds_Impl();
+ pWorkWin->ShowChilds_Impl();
+ pWorkWin->ArrangeAutoHideWindows( this );
+ }
+ else
+ {
+ Hide();
+ pWorkWin->ArrangeAutoHideWindows( this );
+ }
+ }
+}
+
+void SfxSplitWindow::EndAutoShow_Impl()
+{
+ SfxWorkWindow *pWorkWin = SFX_APP()->GetWorkWindow_Impl(SfxViewFrame::Current());
+ pWorkWin->EndAutoShow_Impl();
+}
+
+void SfxSplitWindow::AutoHide()
+{
+ // Wenn dieser Handler am "echten" SplitWindow aufgerufen wird, ist es
+ // entweder angedockt und soll "schwebend" angezeigt werden oder umgekehrt
+ if ( !bPinned )
+ {
+ // Es "schwebt", also wieder andocken
+ SetPinned_Impl( TRUE );
+ pWorkWin->ArrangeChilds_Impl();
+ }
+ else
+ {
+ // In den "Schwebezustand" bringen
+ SetPinned_Impl( FALSE );
+ pWorkWin->ArrangeChilds_Impl();
+ pWorkWin->ArrangeAutoHideWindows( this );
+ }
+
+ pWorkWin->ShowChilds_Impl();
+}
+
+void SfxSplitWindow::FadeOut()
+{
+ SetFadeIn_Impl( FALSE );
+ Show_Impl();
+}
+
+void SfxSplitWindow::FadeIn()
+{
+ SetFadeIn_Impl( TRUE );
+ Show_Impl();
+}
+
+void SfxSplitWindow::Show_Impl()
+{
+ USHORT nCount = pDockArr->Count();
+ for ( USHORT n=0; n<nCount; n++ )
+ {
+ SfxDock_Impl *pDock = (*pDockArr)[n];
+ if ( pDock->pWin )
+ pDock->pWin->FadeIn( pEmptyWin->bFadeIn );
+ }
+}
+
+void SfxSplitWindow::Pin_Impl( BOOL bPin )
+{
+ if ( bPinned != bPin )
+ AutoHide();
+}
+
+BOOL SfxSplitWindow::ActivateNextChild_Impl( BOOL bForward )
+{
+ // Wenn kein pActive, auf erstes bzw. letztes Fenster gehen ( bei !bForward wird erst in der loop dekrementiert )
+ USHORT nCount = pDockArr->Count();
+ USHORT n = bForward ? 0 : nCount;
+
+ // Wenn Focus innerhalb, dann ein Fenster vor oder zur"uck, wenn m"oglich
+ if ( pActive )
+ {
+ // Aktives Fenster ermitteln
+ for ( n=0; n<nCount; n++ )
+ {
+ SfxDock_Impl *pD = (*pDockArr)[n];
+ if ( pD->pWin && pD->pWin->HasChildPathFocus() )
+ break;
+ }
+
+ if ( bForward )
+ // ein Fenster weiter ( wenn dann n>nCount, wird die Schleife unten gar nicht durchlaufen )
+ n++;
+ }
+
+ if ( bForward )
+ {
+ // N"achstes Fenster suchen
+ for ( USHORT nNext=n; nNext<nCount; nNext++ )
+ {
+ SfxDock_Impl *pD = (*pDockArr)[nNext];
+ if ( pD->pWin )
+ {
+ pD->pWin->GrabFocus();
+ return TRUE;
+ }
+ }
+ }
+ else
+ {
+ // Vorheriges Fenster suchen
+ for ( USHORT nNext=n; nNext--; )
+ {
+ SfxDock_Impl *pD = (*pDockArr)[nNext];
+ if ( pD->pWin )
+ {
+ pD->pWin->GrabFocus();
+ return TRUE;
+ }
+ }
+ }
+
+ return FALSE;
+}
+
+void SfxSplitWindow::SetActiveWindow_Impl( SfxDockingWindow* pWin )
+{
+ pActive = pWin;
+ pWorkWin->SetActiveChild_Impl( this );
+}
+
+
diff --git a/sfx2/source/dialog/styfitem.cxx b/sfx2/source/dialog/styfitem.cxx
new file mode 100644
index 000000000000..0aaa4485f934
--- /dev/null
+++ b/sfx2/source/dialog/styfitem.cxx
@@ -0,0 +1,175 @@
+/*************************************************************************
+ *
+ * $RCSfile: styfitem.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:31 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+// INCLUDE ---------------------------------------------------------------
+
+#pragma hdrstop
+
+#include "styfitem.hxx"
+
+// -----------------------------------------------------------------------
+
+class SfxStyleFamilyItem_Impl
+{
+ Bitmap aBitmap;
+ Image aImage;
+};
+
+// -----------------------------------------------------------------------
+
+// Implementierung des Resource-Konstruktors
+
+SfxStyleFamilyItem::SfxStyleFamilyItem( const ResId &rResId ) :
+
+ Resource( rResId.SetRT( RSC_SFX_STYLE_FAMILY_ITEM ) )
+
+{
+ USHORT nMask = (USHORT) ReadShortRes();
+
+ if(nMask & RSC_SFX_STYLE_ITEM_LIST)
+ {
+ USHORT nCount = (USHORT) ReadShortRes();
+ for( USHORT i = 0; i < nCount; i++ )
+ {
+ SfxFilterTupel *pTupel = new SfxFilterTupel;
+ pTupel->aName = ReadStringRes();
+ long lFlags = ReadLongRes();
+ pTupel->nFlags = (USHORT)lFlags;
+ aFilterList.Insert(pTupel, LIST_APPEND);
+ }
+ }
+ if(nMask & RSC_SFX_STYLE_ITEM_BITMAP)
+ {
+ aBitmap = Bitmap(ResId((RSHEADER_TYPE *)GetClassRes()));
+ IncrementRes( GetObjSizeRes( (RSHEADER_TYPE *)GetClassRes() ) );
+ }
+ if(nMask & RSC_SFX_STYLE_ITEM_TEXT)
+ {
+ aText = ReadStringRes();
+ }
+ if(nMask & RSC_SFX_STYLE_ITEM_HELPTEXT)
+ {
+ aHelpText = ReadStringRes();
+ }
+ if(nMask & RSC_SFX_STYLE_ITEM_STYLEFAMILY)
+ {
+ nFamily = (USHORT)ReadShortRes();
+ }
+ else
+ nFamily = SFX_STYLE_FAMILY_PARA;
+ if(nMask & RSC_SFX_STYLE_ITEM_IMAGE)
+ {
+ aImage = Image(ResId((RSHEADER_TYPE *)GetClassRes()));
+ IncrementRes( GetObjSizeRes( (RSHEADER_TYPE *)GetClassRes() ) );
+ }
+ else
+ aImage = Image(aBitmap);
+}
+
+// -----------------------------------------------------------------------
+
+// Destruktor; gibt interne Daten frei
+
+SfxStyleFamilyItem::~SfxStyleFamilyItem()
+{
+ SfxFilterTupel *pTupel = aFilterList.First();
+ while(pTupel)
+ {
+ delete pTupel;
+ pTupel = aFilterList.Next();
+ }
+}
+
+// -----------------------------------------------------------------------
+
+// Implementierung des Resource-Konstruktors
+
+SfxStyleFamilies::SfxStyleFamilies( const ResId& rResId ) :
+
+ Resource( rResId.SetRT( RSC_SFX_STYLE_FAMILIES ) ),
+ aEntryList( 4, 1 )
+{
+ USHORT nCount = (USHORT)ReadShortRes();
+ for( USHORT i = 0; i < nCount; i++ )
+ {
+ const ResId aResId((RSHEADER_TYPE *)GetClassRes());
+ SfxStyleFamilyItem *pItem = new SfxStyleFamilyItem(aResId);
+ IncrementRes( GetObjSizeRes( (RSHEADER_TYPE *)GetClassRes() ) );
+ aEntryList.Insert(pItem, LIST_APPEND);
+ }
+}
+
+// -----------------------------------------------------------------------
+
+// Destruktor; gibt interne Daten frei
+
+SfxStyleFamilies::~SfxStyleFamilies()
+{
+ SfxStyleFamilyItem *pItem = aEntryList.First();
+
+ while(pItem)
+ {
+ delete pItem;
+ pItem = aEntryList.Next();
+ }
+}
+
+
diff --git a/sfx2/source/dialog/styledlg.cxx b/sfx2/source/dialog/styledlg.cxx
new file mode 100644
index 000000000000..4d28e23dbc20
--- /dev/null
+++ b/sfx2/source/dialog/styledlg.cxx
@@ -0,0 +1,260 @@
+/*************************************************************************
+ *
+ * $RCSfile: styledlg.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:31 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+// include ---------------------------------------------------------------
+
+#ifndef _SFX_WHITER_HXX //autogen
+#include <svtools/whiter.hxx>
+#endif
+#ifndef _SFXSTYLE_HXX //autogen
+#include <svtools/style.hxx>
+#endif
+#ifndef _MSGBOX_HXX //autogen
+#include <vcl/msgbox.hxx>
+#endif
+#pragma hdrstop
+
+#include "styledlg.hxx"
+#include "mgetempl.hxx"
+#include "sfxresid.hxx"
+#include "sfxuno.hxx"
+
+#include "dialog.hrc"
+
+// class SfxStyleDialog --------------------------------------------------
+
+#if SUP <= 372
+
+SfxStyleDialog::SfxStyleDialog
+(
+ Window* pParent, // Parent
+ const ResId& rResId, // ResId
+ SfxStyleSheetBase& rStyle, // zu bearbeitendes StyleSheet
+ BOOL bFreeRes // Flag Resourcen freigeben
+) :
+
+/* [Beschreibung]
+
+ Konstruktor: Verwalten-TabPage zuf"ugen, ExampleSet vom Style setzen.
+*/
+
+ SfxTabDialog( pParent, rResId,
+ rStyle.GetItemSet().Clone(),
+ // auch ohne ParentSupport TRUE "ubergeben, aber erweitert
+ // um den StandardButton zu unterdr"ucken
+ rStyle.HasParentSupport() ? TRUE : 2 ),
+
+ pStyle( &rStyle )
+
+{
+ AddTabPage( ID_TABPAGE_MANAGESTYLES,
+ String( SfxResId( STR_TABPAGE_MANAGESTYLES ) ),
+ SfxManageStyleSheetPage::Create, 0, FALSE, 0 );
+
+ // bei neuer Vorlage immer die Verwaltungsseite als aktuelle
+ // Seite setzen
+
+ if( !rStyle.GetName().Len() )
+ SetCurPageId( ID_TABPAGE_MANAGESTYLES );
+ else
+ {
+ String sTxt( GetText() );
+ sTxt += DEFINE_CONST_UNICODE(": ");
+ sTxt += rStyle.GetName();
+ SetText( sTxt );
+ }
+ delete pExampleSet; // im SfxTabDialog::Ctor() schon angelegt
+ pExampleSet = &pStyle->GetItemSet();
+
+ if ( bFreeRes )
+ FreeResource();
+ GetCancelButton().SetClickHdl( LINK(this, SfxStyleDialog, CancelHdl) );
+}
+
+#endif
+
+SfxStyleDialog::SfxStyleDialog
+(
+ Window* pParent, // Parent
+ const ResId& rResId, // ResId
+ SfxStyleSheetBase& rStyle, // zu bearbeitendes StyleSheet
+ BOOL bFreeRes, // Flag Resourcen freigeben
+ const String* pUserBtnTxt
+) :
+
+/* [Beschreibung]
+
+ Konstruktor: Verwalten-TabPage zuf"ugen, ExampleSet vom Style setzen.
+*/
+
+ SfxTabDialog( pParent, rResId,
+ rStyle.GetItemSet().Clone(),
+ // auch ohne ParentSupport TRUE "ubergeben, aber erweitert
+ // um den StandardButton zu unterdr"ucken
+ rStyle.HasParentSupport() ? TRUE : 2,
+ pUserBtnTxt ),
+
+ pStyle( &rStyle )
+
+{
+ AddTabPage( ID_TABPAGE_MANAGESTYLES,
+ String( SfxResId( STR_TABPAGE_MANAGESTYLES ) ),
+ SfxManageStyleSheetPage::Create, 0, FALSE, 0 );
+
+ // bei neuer Vorlage immer die Verwaltungsseite als aktuelle
+ // Seite setzen
+
+ if( !rStyle.GetName().Len() )
+ SetCurPageId( ID_TABPAGE_MANAGESTYLES );
+ else
+ {
+ String sTxt( GetText() );
+ sTxt += DEFINE_CONST_UNICODE(": ") ;
+ sTxt += rStyle.GetName();
+ SetText( sTxt );
+ }
+ delete pExampleSet; // im SfxTabDialog::Ctor() schon angelegt
+ pExampleSet = &pStyle->GetItemSet();
+
+ if ( bFreeRes )
+ FreeResource();
+ GetCancelButton().SetClickHdl( LINK(this, SfxStyleDialog, CancelHdl) );
+}
+
+// -----------------------------------------------------------------------
+
+SfxStyleDialog::~SfxStyleDialog()
+
+/* [Beschreibung]
+
+ Destruktor: ExampleSet auf NULL setzen, damit der SfxTabDialog nicht den
+ Set vom Style l"oscht.
+*/
+
+{
+ pExampleSet = 0;
+ pStyle = 0;
+ delete GetInputSetImpl();
+}
+
+// -----------------------------------------------------------------------
+
+const SfxItemSet* SfxStyleDialog::GetRefreshedSet()
+
+/* [Beschreibung]
+
+ Diese wird gerufen, wenn <SfxTabPage::DeactivatePage(SfxItemSet *)>
+ <SfxTabPage::REFRESH_SET> liefert.
+*/
+
+{
+ return GetInputSetImpl();
+}
+
+// -----------------------------------------------------------------------
+
+short SfxStyleDialog::Ok()
+
+/* [Beschreibung]
+
+ "Uberladen, damit immer RET_OK zur"uckgegeben wird.
+*/
+
+{
+ SfxTabDialog::Ok();
+ return RET_OK;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SfxStyleDialog, CancelHdl, Button *, pButton )
+
+/* [Beschreibung]
+
+ Wenn der Dialog abgebrochen wurde, m"ussen alle schon eingestellten
+ Attribute wieder zur"uckgesetzt werden.
+*/
+
+{
+ SfxTabPage* pPage = GetTabPage( ID_TABPAGE_MANAGESTYLES );
+
+ const SfxItemSet* pInSet = GetInputSetImpl();
+ SfxWhichIter aIter( *pInSet );
+ USHORT nWhich = aIter.FirstWhich();
+
+ while ( nWhich )
+ {
+ SfxItemState eState = pInSet->GetItemState( nWhich, FALSE );
+
+ if ( SFX_ITEM_DEFAULT == eState )
+ pExampleSet->ClearItem( nWhich );
+ else
+ pExampleSet->Put( pInSet->Get( nWhich ) );
+ nWhich = aIter.NextWhich();
+ }
+
+ if ( pPage )
+ pPage->Reset( *GetInputSetImpl() );
+ EndDialog( RET_CANCEL );
+ return 0;
+}
+
+
diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx
new file mode 100644
index 000000000000..532d28667571
--- /dev/null
+++ b/sfx2/source/dialog/tabdlg.cxx
@@ -0,0 +1,1494 @@
+/*************************************************************************
+ *
+ * $RCSfile: tabdlg.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:31 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+// include ---------------------------------------------------------------
+
+#include <limits.h>
+#include <stdlib.h>
+
+#ifndef _SV_MSGBOX_HXX //autogen
+#include <vcl/msgbox.hxx>
+#endif
+#ifndef _SV_CLIP_HXX //autogen
+#include <vcl/clip.hxx>
+#endif
+#ifndef _SFXINIMGR_HXX //autogen
+#include <svtools/iniman.hxx>
+#endif
+#pragma hdrstop
+
+#define _SVSTDARR_USHORTS
+#include <svtools/svstdarr.hxx>
+
+#include "sfxtypes.hxx"
+#include "appdata.hxx"
+#include "minarray.hxx"
+#include "tabdlg.hxx"
+#include "viewfrm.hxx"
+#include "app.hxx"
+#include "inimgr.hxx"
+#include "sfxresid.hxx"
+#include "sfxhelp.hxx"
+
+#include "dialog.hrc"
+#include "helpid.hrc"
+
+/* -----------------------------------------------------------------
+ Verwaltungsdatenstruktur f"ur jede Seite
+ ----------------------------------------------------------------- */
+struct Data_Impl
+{
+ USHORT nId; // Die ID
+ CreateTabPage fnCreatePage; // Pointer auf die Factory
+ GetTabPageRanges fnGetRanges;// Pointer auf die Ranges-Funktion
+ SfxTabPage* pTabPage; // die TabPage selber
+ BOOL bOnDemand; // Flag: ItemSet onDemand
+ BOOL bRefresh; // Flag: Seite mu\s neu initialisiert werden
+
+ // Konstruktor
+ Data_Impl( USHORT Id, CreateTabPage fnPage,
+ GetTabPageRanges fnRanges, BOOL bDemand ) :
+
+ nId ( Id ),
+ fnCreatePage( fnPage ),
+ fnGetRanges ( fnRanges ),
+ pTabPage ( 0 ),
+ bOnDemand ( bDemand ),
+ bRefresh ( FALSE )
+ {}
+};
+
+
+DECL_PTRARRAY(SfxTabDlgData_Impl, Data_Impl *, 4,4)
+
+struct TabDlg_Impl
+{
+ BOOL bModified : 1,
+ bModal : 1,
+ bInOK : 1,
+ bHideResetBtn : 1;
+ SfxTabDlgData_Impl* pData;
+
+ TabDlg_Impl( BYTE nCnt ) :
+
+ bModified ( FALSE ),
+ bModal ( TRUE ),
+ bInOK ( FALSE ),
+ bHideResetBtn ( FALSE ),
+ pData ( new SfxTabDlgData_Impl( nCnt ) )
+ {}
+};
+
+struct TabPageImpl
+{
+ BOOL _bStandard;
+
+ TabPageImpl() : _bStandard( FALSE ) {}
+};
+
+/* -----------------------------------------------------------------
+ Hilfsfunktion: Finden einer Page anhand seiner Id
+ ----------------------------------------------------------------- */
+Data_Impl* Find( SfxTabDlgData_Impl& rArr, USHORT nId, USHORT* pPos = 0 );
+
+Data_Impl* Find( SfxTabDlgData_Impl& rArr, USHORT nId, USHORT* pPos )
+{
+ const USHORT nCount = rArr.Count();
+
+ for ( USHORT i = 0; i < nCount; ++i )
+ {
+ Data_Impl* pObj = rArr[i];
+
+ if ( pObj->nId == nId )
+ {
+ if ( pPos )
+ *pPos = i;
+ return pObj;
+ }
+ }
+ return 0;
+}
+
+// class SfxTabPage-------------------------------------------------------
+
+SfxTabPage::SfxTabPage( Window *pParent,
+ const ResId &rResId, const SfxItemSet &rAttrSet ) :
+
+/* [Beschreibung]
+
+ Konstruktor
+*/
+
+ TabPage( pParent, rResId ),
+
+ pSet ( &rAttrSet ),
+ bHasExchangeSupport ( FALSE ),
+ pTabDlg ( NULL ),
+ pImpl ( new TabPageImpl )
+
+{
+}
+// -----------------------------------------------------------------------
+SfxTabPage:: SfxTabPage( Window *pParent, WinBits nStyle, const SfxItemSet &rAttrSet ) :
+ TabPage(pParent, nStyle),
+ pSet ( &rAttrSet ),
+ bHasExchangeSupport ( FALSE ),
+ pTabDlg ( NULL ),
+ pImpl ( new TabPageImpl )
+{
+}
+// -----------------------------------------------------------------------
+
+SfxTabPage::~SfxTabPage()
+
+/* [Beschreibung]
+
+ Destruktor
+*/
+
+{
+ delete pImpl;
+}
+
+// -----------------------------------------------------------------------
+
+void SfxTabPage::ActivatePage( const SfxItemSet& )
+
+/* [Beschreibung]
+
+ Defaultimplementierung der virtuellen ActivatePage-Methode
+ Diese wird gerufen, wenn eine Seite des Dialogs den Datenaustausch
+ zwischen Pages unterst"utzt.
+
+ <SfxTabPage::DeactivatePage(SfxItemSet *)>
+*/
+
+{
+}
+
+// -----------------------------------------------------------------------
+
+int SfxTabPage::DeactivatePage( SfxItemSet* )
+
+/* [Beschreibung]
+
+ Defaultimplementierung der virtuellen DeactivatePage-Methode
+ Diese wird vor dem Verlassen einer Seite durch den Sfx gerufen;
+ die Anwendung kann "uber den Returnwert steuern,
+ ob die Seite verlassen werden soll.
+ Falls die Seite "uber bHasExchangeSupport
+ anzeigt, da\s sie einen Datenaustausch zwischen Seiten
+ unterst"utzt, wird ein Pointer auf das Austausch-Set als
+ Parameter "ubergeben. Dieser nimmt die Daten f"ur den Austausch
+ entgegen; das Set steht anschlie\send als Parameter in
+ <SfxTabPage::ActivatePage(const SfxItemSet &)> zur Verf"ugung.
+
+ [R"uckgabewert]
+
+ LEAVE_PAGE; Verlassen der Seite erlauben
+*/
+
+{
+ return LEAVE_PAGE;
+}
+
+// -----------------------------------------------------------------------
+
+void SfxTabPage::FillUserData()
+
+/* [Beschreibung]
+
+ virtuelle Methode, wird von der Basisklasse im Destruktor gerufen
+ um spezielle Informationen der TabPage in der Ini-Datei zu speichern.
+ Beim "Uberladen muss ein String zusammengestellt werden, der mit
+ <SetUserData()> dann weggeschrieben wird.
+*/
+
+{
+}
+
+// -----------------------------------------------------------------------
+
+BOOL SfxTabPage::IsReadOnly() const
+
+/* [Description]
+
+*/
+
+{
+ return FALSE;
+}
+
+// -----------------------------------------------------------------------
+
+const SfxPoolItem* SfxTabPage::GetItem( const SfxItemSet& rSet, USHORT nSlot )
+
+/* [Beschreibung]
+
+ static Methode: hiermit wird der Code der TabPage-Implementierungen
+ vereinfacht.
+
+*/
+
+{
+ const SfxItemPool* pPool = rSet.GetPool();
+ USHORT nWh = pPool->GetWhich( nSlot );
+ const SfxPoolItem* pItem = 0;
+ SfxItemState eState = rSet.GetItemState( nWh, TRUE, &pItem );
+
+ if ( !pItem && nWh != nSlot )
+ pItem = &pPool->GetDefaultItem( nWh );
+ return pItem;
+}
+
+// -----------------------------------------------------------------------
+
+const SfxPoolItem* SfxTabPage::GetOldItem( const SfxItemSet& rSet,
+ USHORT nSlot )
+
+/* [Beschreibung]
+
+ Diese Methode gibt f"ur Vergleiche den alten Wert eines
+ Attributs zur"uck.
+*/
+
+{
+ const SfxItemSet& rOldSet = GetItemSet();
+ USHORT nWh = GetWhich( nSlot );
+ const SfxPoolItem* pItem = 0;
+
+ if ( pImpl->_bStandard && rOldSet.GetParent() )
+ pItem = GetItem( *rOldSet.GetParent(), nSlot );
+ else if ( rSet.GetParent() &&
+ SFX_ITEM_DONTCARE == rSet.GetItemState( nWh ) )
+ pItem = GetItem( *rSet.GetParent(), nSlot );
+ else
+ pItem = GetItem( rOldSet, nSlot );
+ return pItem;
+}
+
+// -----------------------------------------------------------------------
+
+const SfxPoolItem* SfxTabPage::GetExchangeItem( const SfxItemSet& rSet,
+ USHORT nSlot )
+
+/* [Beschreibung]
+
+ Diese Methode gibt f"ur Vergleiche den alten Wert eines
+ Attributs zur"uck. Dabei wird ber"ucksichtigt, ob der Dialog
+ gerade mit OK beendet wurde.
+*/
+
+{
+ if ( pTabDlg && !pTabDlg->IsInOK() && pTabDlg->GetExampleSet() )
+ return GetItem( *pTabDlg->GetExampleSet(), nSlot );
+ else
+ return GetOldItem( rSet, nSlot );
+}
+
+// class SfxTabDialog ----------------------------------------------------
+
+#define INI_LIST \
+ aTabCtrl ( this, ResId(ID_TABCONTROL ) ),\
+ aOKBtn ( this ),\
+ pUserBtn ( pUserButtonText? new PushButton(this): 0 ),\
+ aCancelBtn ( this ),\
+ aHelpBtn ( this ),\
+ aResetBtn ( this ),\
+ aBaseFmtBtn ( this ),\
+ pSet ( pItemSet ),\
+ pOutSet ( 0 ),\
+ pExampleSet ( 0 ),\
+ pRanges ( 0 ),\
+ bItemsReset ( FALSE ),\
+ bFmt ( bEditFmt ),\
+ nResId ( rResId.GetId() ), \
+ nAppPageId ( USHRT_MAX ), \
+ pImpl ( new TabDlg_Impl( (BYTE)aTabCtrl.GetPageCount() ) )
+
+// -----------------------------------------------------------------------
+
+SfxTabDialog::SfxTabDialog
+
+/* [Beschreibung]
+
+ Konstruktor
+*/
+
+(
+ SfxViewFrame* pViewFrame, // Frame, zu dem der Dialog geh"ort
+ Window* pParent, // Parent-Fenster
+ const ResId& rResId, // ResourceId
+ const SfxItemSet* pItemSet, // Itemset mit den Daten;
+ // kann NULL sein, wenn Pages onDemand
+ BOOL bEditFmt, // Flag: es werden Vorlagen bearbeitet
+ // wenn ja -> zus"atzlicher Button f"ur Standard
+ const String* pUserButtonText // Text fuer BenutzerButton;
+ // wenn != 0, wird der UserButton erzeugt
+) :
+ TabDialog( pParent, rResId ),
+ INI_LIST,
+ pFrame( pViewFrame )
+{
+ Init_Impl( bFmt, pUserButtonText );
+}
+
+// -----------------------------------------------------------------------
+
+SfxTabDialog::SfxTabDialog
+
+/* [Beschreibung]
+
+ Konstruktor, tempor"ar ohne Frame
+*/
+
+(
+ Window* pParent, // Parent-Fenster
+ const ResId& rResId, // ResourceId
+ const SfxItemSet* pItemSet, // Itemset mit den Daten; kann NULL sein,
+ // wenn Pages onDemand
+ BOOL bEditFmt, // Flag: es werden Vorlagen bearbeitet
+ // wenn ja -> zus"atzlicher Button f"ur Standard
+ const String* pUserButtonText // Text f"ur BenutzerButton;
+ // wenn != 0, wird der UserButton erzeugt
+) :
+ TabDialog( pParent, rResId ),
+ INI_LIST,
+ pFrame( 0 )
+{
+ Init_Impl( bFmt, pUserButtonText );
+ DBG_WARNING( "bitte den Ctor mit ViewFrame verwenden" );
+}
+
+// -----------------------------------------------------------------------
+
+SfxTabDialog::~SfxTabDialog()
+{
+ // Konfiguration in Ini-Manager abspeichern
+ SfxIniManager* pIniMgr = SFX_APP()->GetAppIniManager();
+ String aDlgData( pIniMgr->GetString( GetPosPixel(), Size() ) );
+ aDlgData += pIniMgr->GetToken();
+ aDlgData += String::CreateFromInt32( aTabCtrl.GetCurPageId() );
+ pIniMgr->Set( aDlgData, SFX_KEY_DIALOG, nResId );
+ const USHORT nCount = pImpl->pData->Count();
+
+ for ( USHORT i = 0; i < nCount; ++i )
+ {
+ Data_Impl* pDataObject = pImpl->pData->GetObject(i);
+
+ if ( pDataObject->pTabPage )
+ {
+ pDataObject->pTabPage->FillUserData();
+ String aPageData(pDataObject->pTabPage->GetUserData());
+ if ( aPageData.Len() )
+ {
+ pIniMgr->Set( aPageData, SFX_KEY_PAGE, pDataObject->nId);
+ }
+
+ if ( pDataObject->bOnDemand )
+ delete (SfxItemSet*)&pDataObject->pTabPage->GetItemSet();
+ delete pDataObject->pTabPage;
+ }
+ delete pDataObject;
+ }
+ delete pImpl->pData;
+ delete pImpl;
+ delete pUserBtn;
+ delete pOutSet;
+ delete pExampleSet;
+ delete pRanges;
+
+ SfxHelpPI *pHelpPI = SFX_APP()->GetHelpPI();
+ if ( pHelpPI )
+ pHelpPI->ResetTopic();
+}
+
+// -----------------------------------------------------------------------
+
+void SfxTabDialog::Init_Impl( BOOL bFmt, const String* pUserButtonText )
+
+/* [Beschreibung]
+
+ interne Initialisierung des Dialogs
+*/
+
+{
+ aOKBtn.SetClickHdl( LINK( this, SfxTabDialog, OkHdl ) );
+ aResetBtn.SetClickHdl( LINK( this, SfxTabDialog, ResetHdl ) );
+ aResetBtn.SetText( String( SfxResId( STR_RESET ) ) );
+ aTabCtrl.SetActivatePageHdl(
+ LINK( this, SfxTabDialog, ActivatePageHdl ) );
+ aTabCtrl.SetDeactivatePageHdl(
+ LINK( this, SfxTabDialog, DeactivatePageHdl ) );
+ aTabCtrl.Show();
+ aOKBtn.Show();
+ aCancelBtn.Show();
+ aHelpBtn.Show();
+ aResetBtn.Show();
+ aResetBtn.SetHelpId( HID_TABDLG_RESET_BTN );
+
+ if ( pUserBtn )
+ {
+ pUserBtn->SetText( *pUserButtonText );
+ pUserBtn->SetClickHdl( LINK( this, SfxTabDialog, UserHdl ) );
+ pUserBtn->Show();
+ }
+
+ if ( bFmt )
+ {
+ String aStd( SfxResId( STR_STANDARD ) );
+ aStd.Insert( '~', 0 );
+ aBaseFmtBtn.SetText( aStd );
+ aBaseFmtBtn.SetClickHdl( LINK( this, SfxTabDialog, BaseFmtHdl ) );
+ aBaseFmtBtn.SetHelpId( HID_TABDLG_STANDARD_BTN );
+
+ // bFmt = tempor"ares Flag im Ctor() "ubergeben,
+ // wenn bFmt == 2, dann auch TRUE,
+ // zus"atzlich Ausblendung vom StandardButton,
+ // nach der Initialisierung wieder auf TRUE setzen
+ if ( bFmt != 2 )
+ aBaseFmtBtn.Show();
+ else
+ bFmt = TRUE;
+ }
+
+ if ( pSet )
+ {
+ pExampleSet = new SfxItemSet( *pSet );
+ pOutSet = new SfxItemSet( *pSet->GetPool(), pSet->GetRanges() );
+ }
+}
+
+// -----------------------------------------------------------------------
+
+void SfxTabDialog::RemoveResetButton()
+{
+ aResetBtn.Hide();
+ pImpl->bHideResetBtn = TRUE;
+}
+
+// -----------------------------------------------------------------------
+
+short SfxTabDialog::Execute()
+{
+ if ( !aTabCtrl.GetPageCount() )
+ return RET_CANCEL;
+ Start_Impl();
+ return TabDialog::Execute();
+}
+
+// -----------------------------------------------------------------------
+
+void SfxTabDialog::Start( BOOL bShow )
+{
+ aCancelBtn.SetClickHdl( LINK( this, SfxTabDialog, CancelHdl ) );
+ pImpl->bModal = FALSE;
+ Start_Impl();
+
+ if ( bShow )
+ Show();
+}
+
+// -----------------------------------------------------------------------
+
+void SfxTabDialog::Start_Impl()
+{
+ DBG_ASSERT( pImpl->pData->Count() == aTabCtrl.GetPageCount(),
+ "nicht alle Seiten angemeldet" );
+ Point aPos;
+ USHORT nActPage = aTabCtrl.GetPageId( 0 );
+
+ // Konfiguration vorhanden?
+ SfxApplication *pSfxApp = SFX_APP();
+ SfxIniManager* pIniMgr =
+ pFrame ? pFrame->GetIniManager() : pSfxApp->GetAppIniManager();
+ String aDlgData( pIniMgr->Get( SFX_KEY_DIALOG, nResId ) );
+
+ if ( aDlgData.Len() > 0 )
+ {
+ // ggf. Position aus Konfig
+ Size aDummySize;
+
+ if ( pIniMgr->GetPosSize( aDlgData.GetToken( 0, pIniMgr->GetToken() ), aPos, aDummySize ) )
+ SetPosPixel( aPos );
+
+ // initiale TabPage aus Programm/Hilfe/Konfig
+ nActPage = (USHORT)aDlgData.GetToken( 1, pIniMgr->GetToken() ).ToInt32();
+
+ if ( USHRT_MAX != nAppPageId )
+ nActPage = nAppPageId;
+ else
+ {
+ USHORT nAutoTabPageId = pSfxApp->Get_Impl()->nAutoTabPageId;
+
+ if ( nAutoTabPageId )
+ nActPage = nAutoTabPageId;
+ }
+
+ if ( TAB_PAGE_NOTFOUND == aTabCtrl.GetPagePos( nActPage ) )
+ nActPage = aTabCtrl.GetPageId( 0 );
+ }
+ else if ( USHRT_MAX != nAppPageId &&
+ TAB_PAGE_NOTFOUND != aTabCtrl.GetPagePos( nAppPageId ) )
+ nActPage = nAppPageId;
+
+ aTabCtrl.SetCurPageId( nActPage );
+ ActivatePageHdl( &aTabCtrl );
+}
+
+// -----------------------------------------------------------------------
+
+void SfxTabDialog::AddTabPage
+
+/* [Beschreibung]
+
+ Hinzuf"ugen einer Seite zu dem Dialog.
+ Mu\s korrespondieren zu einem entsprechende Eintrag im
+ TabControl in der Resource des Dialogs.
+*/
+
+(
+ USHORT nId, // ID der Seite
+ CreateTabPage pCreateFunc, // Pointer auf die Factory-Methode
+ GetTabPageRanges pRangesFunc, // Pointer auf die Methode f"ur das
+ // Erfragen der Ranges onDemand
+ BOOL bItemsOnDemand // gibt an, ob das Set dieser Seite beim
+ // Erzeugen der Seite erfragt wird
+)
+{
+ pImpl->pData->Append(
+ new Data_Impl( nId, pCreateFunc, pRangesFunc, bItemsOnDemand ) );
+}
+
+// -----------------------------------------------------------------------
+
+void SfxTabDialog::AddTabPage
+
+/* [Beschreibung]
+
+ Hinzuf"ugen einer Seite zu dem Dialog.
+ Der Ridertext wird "ubergeben, die Seite hat keine Entsprechung im
+ TabControl in der Resource des Dialogs.
+*/
+
+(
+ USHORT nId,
+ const String& rRiderText,
+ CreateTabPage pCreateFunc,
+ GetTabPageRanges pRangesFunc,
+ BOOL bItemsOnDemand,
+ USHORT nPos
+)
+{
+ DBG_ASSERT( TAB_PAGE_NOTFOUND == aTabCtrl.GetPagePos( nId ),
+ "Doppelte Page-Ids in der Tabpage" );
+ aTabCtrl.InsertPage( nId, rRiderText, nPos );
+ pImpl->pData->Append(
+ new Data_Impl( nId, pCreateFunc, pRangesFunc, bItemsOnDemand ) );
+}
+
+// -----------------------------------------------------------------------
+#ifdef SV_HAS_RIDERBITMAPS
+
+void SfxTabDialog::AddTabPage
+
+/* [Beschreibung]
+
+ Hinzuf"ugen einer Seite zu dem Dialog.
+ Die Riderbitmap wird "ubergeben, die Seite hat keine Entsprechung im
+ TabControl in der Resource des Dialogs.
+*/
+
+(
+ USHORT nId,
+ const Bitmap &rRiderBitmap,
+ CreateTabPage pCreateFunc,
+ GetTabPageRanges pRangesFunc,
+ BOOL bItemsOnDemand,
+ USHORT nPos
+)
+{
+ DBG_ASSERT( TAB_PAGE_NOTFOUND == aTabCtrl.GetPagePos( nId ),
+ "Doppelte Page-Ids in der Tabpage" );
+ aTabCtrl.InsertPage( nId, rRiderBitmap, nPos );
+ pImpl->pData->Append(
+ new Data_Impl( nId, pCreateFunc, pRangesFunc, bItemsOnDemand ) );
+}
+#endif
+
+// -----------------------------------------------------------------------
+
+void SfxTabDialog::RemoveTabPage( USHORT nId )
+
+/* [Beschreibung]
+
+ L"oschen der TabPage mit der ID nId
+*/
+
+{
+ USHORT nPos = 0;
+ aTabCtrl.RemovePage( nId );
+ Data_Impl* pDataObject = Find( *pImpl->pData, nId, &nPos );
+
+ if ( pDataObject )
+ {
+ if ( pDataObject->pTabPage )
+ {
+ pDataObject->pTabPage->FillUserData();
+ String aPageData(pDataObject->pTabPage->GetUserData());
+ if ( aPageData.Len() )
+ {
+ SfxIniManager* pIniMgr =
+ pFrame ? pFrame->GetIniManager() : SFX_APP()->GetAppIniManager();
+ pIniMgr->Set( aPageData, SFX_KEY_PAGE, pDataObject->nId);
+ }
+
+ if ( pDataObject->bOnDemand )
+ delete (SfxItemSet*)&pDataObject->pTabPage->GetItemSet();
+ delete pDataObject->pTabPage;
+ }
+
+ delete pDataObject;
+ pImpl->pData->Remove( nPos );
+ }
+ else
+ {
+ DBG_WARNINGFILE( "TabPage-Id nicht bekannt" );
+ }
+}
+
+// -----------------------------------------------------------------------
+
+void SfxTabDialog::PageCreated
+
+/* [Beschreibung]
+
+ Defaultimplemetierung der virtuellen Methode.
+ Diese wird unmittelbar nach dem Erzeugen einer Seite gerufen.
+ Hier kann der Dialog direkt an der TabPage Methoden rufen.
+*/
+
+(
+ USHORT, // Id der erzeugten Seite
+ SfxTabPage& // Referenz auf die erzeugte Seite
+)
+{
+}
+
+// -----------------------------------------------------------------------
+
+SfxItemSet* SfxTabDialog::GetInputSetImpl()
+
+/* [Beschreibung]
+
+ Abgeleitete Klassen legen ggf. fuer den InputSet neuen Speicher an.
+ Dieser mu\s im Destruktor auch wieder freigegeben werden. Dazu mu\s
+ diese Methode gerufen werden.
+*/
+
+{
+ return (SfxItemSet*)pSet;
+}
+
+// -----------------------------------------------------------------------
+
+SfxTabPage* SfxTabDialog::GetTabPage( USHORT nPageId ) const
+
+/* [Beschreibung]
+
+ TabPage mit der "Ubergebenen Id zur"uckgeben.
+*/
+
+{
+ USHORT nPos = 0;
+ Data_Impl* pDataObject = Find( *pImpl->pData, nPageId, &nPos );
+
+ if ( pDataObject )
+ return pDataObject->pTabPage;
+ return NULL;
+}
+
+// -----------------------------------------------------------------------
+
+BOOL SfxTabDialog::IsInOK() const
+
+/* [Beschreibung]
+
+*/
+
+{
+ return pImpl->bInOK;
+}
+
+// -----------------------------------------------------------------------
+
+short SfxTabDialog::Ok()
+
+/* [Beschreibung]
+
+ Ok-Handler des Dialogs
+ Das OutputSet wird erstellt und jede Seite wird mit
+ dem bzw. ihrem speziellen OutputSet durch Aufruf der Methode
+ <SfxTabPage::FillItemSet(SfxItemSet &)> dazu aufgefordert,
+ die vom Benuzter eingestellten Daten in das Set zu tun.
+
+ [R"uckgabewert]
+
+ RET_OK: wenn mindestens eine Seite TRUE als Returnwert von
+ FillItemSet geliefert hat, sonst RET_CANCEL.
+*/
+
+{
+ pImpl->bInOK = TRUE;
+
+ if ( !pOutSet )
+ {
+ if ( !pExampleSet && pSet )
+ pOutSet = pSet->Clone( FALSE ); // ohne Items
+ else if ( pExampleSet )
+ pOutSet = new SfxItemSet( *pExampleSet );
+ }
+ BOOL bModified = FALSE;
+
+ const USHORT nCount = pImpl->pData->Count();
+
+ for ( USHORT i = 0; i < nCount; ++i )
+ {
+ Data_Impl* pDataObject = pImpl->pData->GetObject(i);
+ SfxTabPage* pTabPage = pDataObject->pTabPage;
+
+ if ( pTabPage )
+ {
+ if ( pDataObject->bOnDemand )
+ {
+ SfxItemSet& rSet = (SfxItemSet&)pTabPage->GetItemSet();
+ rSet.ClearItem();
+ bModified |= pTabPage->FillItemSet( rSet );
+ }
+ else if ( pSet && !pTabPage->HasExchangeSupport() )
+ {
+ SfxItemSet aTmp( *pSet->GetPool(), pSet->GetRanges() );
+
+ if ( pTabPage->FillItemSet( aTmp ) )
+ {
+ bModified |= TRUE;
+ pExampleSet->Put( aTmp );
+ pOutSet->Put( aTmp );
+ }
+ }
+ }
+ }
+
+ if ( pImpl->bModified || ( pOutSet && pOutSet->Count() > 0 ) )
+ bModified |= TRUE;
+
+ if ( bFmt == 2 )
+ bModified |= TRUE;
+ return bModified ? RET_OK : RET_CANCEL;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SfxTabDialog, CancelHdl, Button*, pButton )
+{
+ Close();
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+SfxItemSet* SfxTabDialog::CreateInputItemSet( USHORT )
+
+/* [Beschreibung]
+
+ Defaultimplemetierung der virtuellen Methode.
+ Diese wird gerufen, wenn Pages ihre Sets onDenamd anlegen
+*/
+
+{
+ DBG_WARNINGFILE( "CreateInputItemSet nicht implementiert" );
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+const SfxItemSet* SfxTabDialog::GetRefreshedSet()
+
+/* [Beschreibung]
+
+ Defaultimplemetierung der virtuellen Methode.
+ Diese wird gerufen, wenn <SfxTabPage::DeactivatePage(SfxItemSet *)>
+ <SfxTabPage::REFRESH_SET> liefert.
+*/
+
+{
+ DBG_ERRORFILE( "GetRefreshedSet nicht implementiert" );
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SfxTabDialog, OkHdl, Button *, EMPTYARG )
+
+/* [Beschreibung]
+
+ Handler des Ok-Buttons
+ Dieser ruft f"ur die aktuelle Seite
+ <SfxTabPage::DeactivatePage(SfxItemSet *)>.
+ Liefert diese <SfxTabPage::LEAVE_PAGE>, wird <SfxTabDialog::Ok()> gerufen
+ und so der Dialog beendet.
+*/
+
+{
+ pImpl->bInOK = TRUE;
+
+ if ( OK_Impl() )
+ {
+ if ( pImpl->bModal )
+ EndDialog( Ok() );
+ else
+ {
+ Ok();
+ Close();
+ }
+ }
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+BOOL SfxTabDialog::OK_Impl()
+{
+ SfxTabPage* pPage =
+ (SfxTabPage*)aTabCtrl.GetTabPage( aTabCtrl.GetCurPageId() );
+
+ BOOL bEnd = !pPage;
+ if ( pPage )
+ {
+ int nRet = SfxTabPage::LEAVE_PAGE;
+ if ( pSet )
+ {
+ SfxItemSet aTmp( *pSet->GetPool(), pSet->GetRanges() );
+ BOOL bRet = FALSE;
+
+ if ( pPage->HasExchangeSupport() )
+ nRet = pPage->DeactivatePage( &aTmp );
+
+ if ( ( SfxTabPage::LEAVE_PAGE & nRet ) == SfxTabPage::LEAVE_PAGE
+ && aTmp.Count() )
+ {
+ pExampleSet->Put( aTmp );
+ pOutSet->Put( aTmp );
+ }
+ else if ( bRet )
+ pImpl->bModified |= TRUE;
+ }
+ else
+ nRet = pPage->DeactivatePage( NULL );
+ bEnd = nRet;
+ }
+
+ return bEnd;
+}
+
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SfxTabDialog, UserHdl, Button *, EMPTYARG )
+
+/* [Beschreibung]
+
+ Handler des User-Buttons
+ Dieser ruft f"ur die aktuelle Seite
+ <SfxTabPage::DeactivatePage(SfxItemSet *)>.
+ Liefert diese <SfxTabPage::LEAVE_PAGE>, wird <SfxTabDialog::Ok()> gerufen.
+ Mit dem Return-Wert von <SfxTabDialog::Ok()> wird dann der Dialog beendet.
+*/
+
+{
+ SfxTabPage* pPage =
+ (SfxTabPage *)aTabCtrl.GetTabPage( aTabCtrl.GetCurPageId() );
+
+ FASTBOOL bEnd = !pPage;
+
+ if ( pPage )
+ {
+ int nRet = SfxTabPage::LEAVE_PAGE;
+
+ if ( pSet )
+ {
+ SfxItemSet aTmp( *pSet->GetPool(), pSet->GetRanges() );
+
+ if ( pPage->HasExchangeSupport() )
+ nRet = pPage->DeactivatePage( &aTmp );
+
+ if ( ( SfxTabPage::LEAVE_PAGE & nRet ) == SfxTabPage::LEAVE_PAGE
+ && aTmp.Count() )
+ {
+ pExampleSet->Put( aTmp );
+ pOutSet->Put( aTmp );
+ }
+ }
+ else
+ nRet = pPage->DeactivatePage( NULL );
+ bEnd = nRet;
+ }
+
+ if ( bEnd )
+ {
+ short nRet = Ok();
+
+ if ( RET_OK == nRet )
+ nRet = RET_USER;
+ else
+ nRet = RET_USER_CANCEL;
+ EndDialog( nRet );
+ }
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SfxTabDialog, ResetHdl, Button *, EMPTYARG )
+
+/* [Beschreibung]
+
+ Handler hinter dem Zur"ucksetzen-Button.
+ Die aktuelle Page wird mit ihren initialen Daten
+ neu initialisiert; alle Einstellungen, die der Benutzer
+ auf dieser Seite get"atigt hat, werden aufgehoben.
+*/
+
+{
+ Data_Impl* pDataObject = Find( *pImpl->pData, aTabCtrl.GetCurPageId() );
+ DBG_ASSERT( pDataObject, "Id nicht bekannt" );
+
+ if ( pDataObject->bOnDemand )
+ {
+ // CSet auf AIS hat hier Probleme, daher getrennt
+ const SfxItemSet* pSet = &pDataObject->pTabPage->GetItemSet();
+ pDataObject->pTabPage->Reset( *(SfxItemSet*)pSet );
+ }
+ else
+ pDataObject->pTabPage->Reset( *pSet );
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SfxTabDialog, BaseFmtHdl, Button *, EMPTYARG )
+
+/* [Beschreibung]
+
+ Handler hinter dem Standard-Button.
+ Dieser Button steht beim Bearbeiten von StyleSheets zur Verf"ugung.
+ Alle in dem bearbeiteten StyleSheet eingestellten Attribute
+ werden gel"oscht.
+*/
+
+{
+ const USHORT nId = aTabCtrl.GetCurPageId();
+ Data_Impl* pDataObject = Find( *pImpl->pData, nId );
+ DBG_ASSERT( pDataObject, "Id nicht bekannt" );
+ bFmt = 2;
+
+ if ( pDataObject->fnGetRanges )
+ {
+ if ( !pExampleSet )
+ pExampleSet = new SfxItemSet( *pSet );
+
+ const SfxItemPool* pPool = pSet->GetPool();
+ const USHORT* pRanges = (pDataObject->fnGetRanges)();
+ SfxItemSet aTmpSet( *pExampleSet );
+
+ while ( *pRanges )
+ {
+ const USHORT* pU = pRanges + 1;
+
+ if ( *pRanges == *pU )
+ {
+ // Range mit zwei gleichen Werten -> nur ein Item setzen
+ USHORT nWh = pPool->GetWhich( *pRanges );
+ pExampleSet->ClearItem( nWh );
+ aTmpSet.ClearItem( nWh );
+ // am OutSet mit InvalidateItem,
+ // damit die "Anderung wirksam wird
+ pOutSet->InvalidateItem( nWh );
+ }
+ else
+ {
+ // richtiger Range mit mehreren Werten
+ USHORT nTmp = *pRanges, nTmpEnd = *pU;
+ DBG_ASSERT( nTmp <= nTmpEnd, "Range ist falsch sortiert" );
+
+ if ( nTmp > nTmpEnd )
+ {
+ // wenn wirklich falsch sortiert, dann neu setzen
+ USHORT nTmp1 = nTmp;
+ nTmp = nTmpEnd;
+ nTmpEnd = nTmp1;
+ }
+
+ while ( nTmp <= nTmpEnd )
+ {
+ // "uber den Range iterieren, und die Items setzen
+ USHORT nWh = pPool->GetWhich( nTmp );
+ pExampleSet->ClearItem( nWh );
+ aTmpSet.ClearItem( nWh );
+ // am OutSet mit InvalidateItem,
+ // damit die "Anderung wirksam wird
+ pOutSet->InvalidateItem( nWh );
+ nTmp++;
+ }
+ }
+ // zum n"achsten Paar gehen
+ pRanges += 2;
+ }
+ // alle Items neu gesetzt -> dann an der aktuellen Page Reset() rufen
+ DBG_ASSERT( pDataObject->pTabPage, "die Page ist weg" );
+ pDataObject->pTabPage->Reset( aTmpSet );
+ pDataObject->pTabPage->pImpl->_bStandard = TRUE;
+ }
+ return 1;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SfxTabDialog, ActivatePageHdl, TabControl *, pTabCtrl )
+
+/* [Beschreibung]
+
+ Handler, der vor dem Umschalten auf eine andere Seite
+ durch Starview gerufen wird.
+ Existiert die Seite noch nicht, so wird sie erzeugt und
+ die virtuelle Methode <SfxTabDialog::PageCreated( USHORT, SfxTabPage &)>
+ gerufen. Existiert die Seite bereits, so wird ggf.
+ <SfxTabPage::Reset(const SfxItemSet &)> oder
+ <SfxTabPage::ActivatePage(const SfxItemSet &)> gerufen.
+*/
+
+{
+ DBG_ASSERT( pImpl->pData->Count(), "keine Pages angemeldet" );
+ const USHORT nId = pTabCtrl->GetCurPageId();
+ SfxApplication *pSfxApp = SFX_APP();
+ SfxIniManager* pIniMgr =
+ pFrame ? pFrame->GetIniManager() : pSfxApp->GetAppIniManager();
+ if ( BOOL( pIniMgr->Get( SFX_GROUP_USER, DEFINE_CONST_UNICODE("HelpAuthor") ).ToInt32() ) )
+ {
+ String aText( DEFINE_CONST_UNICODE("slot:") );
+ aText += pSfxApp->Get_Impl()->nExecutingSID;
+ aText += 0x0023; // '#' = 23h
+ aText += String::CreateFromInt32(nId);
+ GetpApp()->ShowStatusText( aText );
+ Clipboard::Clear();
+ Clipboard::CopyString( aText );
+ }
+
+ // Tab Page schon da?
+ SfxTabPage* pTabPage = (SfxTabPage *)pTabCtrl->GetTabPage( nId );
+ Data_Impl* pDataObject = Find( *pImpl->pData, nId );
+ DBG_ASSERT( pDataObject, "Id nicht bekannt" );
+
+ // ggf. TabPage erzeugen:
+ if ( !pTabPage )
+ {
+ const SfxItemSet* pTmpSet = 0;
+
+ if ( pSet )
+ {
+ if ( bItemsReset && pSet->GetParent() )
+ pTmpSet = pSet->GetParent();
+ else
+ pTmpSet = pSet;
+ }
+
+ if ( pTmpSet && !pDataObject->bOnDemand )
+ pTabPage = (pDataObject->fnCreatePage)( pTabCtrl, *pTmpSet );
+ else
+ pTabPage = (pDataObject->fnCreatePage)
+ ( pTabCtrl, *CreateInputItemSet( nId ) );
+ DBG_ASSERT( NULL == pDataObject->pTabPage, "TabPage mehrfach erzeugt" );
+ pDataObject->pTabPage = pTabPage;
+ pDataObject->pTabPage->SetTabDialog( this );
+
+ pTabPage->SetUserData(pIniMgr->Get( SFX_KEY_PAGE, pDataObject->nId ));
+
+ Size aSiz = pTabPage->GetSizePixel();
+ Size aCtrlSiz = pTabCtrl->GetOutputSizePixel();
+ // Gr"o/se am TabControl nur dann setzen, wenn < als TabPage
+ if ( aCtrlSiz.Width() < aSiz.Width() ||
+ aCtrlSiz.Height() < aSiz.Height() )
+ pTabCtrl->SetOutputSizePixel( aSiz );
+ PageCreated( nId, *pTabPage );
+
+ if ( pDataObject->bOnDemand )
+ pTabPage->Reset( (SfxItemSet &)pTabPage->GetItemSet() );
+ else
+ pTabPage->Reset( *pSet );
+ pTabCtrl->SetTabPage( nId, pTabPage );
+ }
+ else if ( pDataObject->bRefresh )
+ pTabPage->Reset( *pSet );
+ pDataObject->bRefresh = FALSE;
+
+ if ( pExampleSet )
+ pTabPage->ActivatePage( *pExampleSet );
+
+ SfxHelpPI *pHelpPI = pSfxApp->GetHelpPI();
+ if ( pHelpPI )
+ pHelpPI->LoadTopic( pTabPage->GetHelpId() );
+
+ BOOL bReadOnly = pTabPage->IsReadOnly();
+ ( bReadOnly || pImpl->bHideResetBtn ) ? aResetBtn.Hide() : aResetBtn.Show();
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SfxTabDialog, DeactivatePageHdl, TabControl *, pTabCtrl )
+
+/* [Beschreibung]
+
+ Handler, der vor dem Verlassen einer Seite durch Starview gerufen wird.
+
+ [Querverweise]
+
+ <SfxTabPage::DeactivatePage(SfxItemSet *)>
+*/
+
+{
+ USHORT nId = pTabCtrl->GetCurPageId();
+ SfxApplication *pSfxApp = SFX_APP();
+ SfxIniManager* pIniMgr =
+ pFrame ? pFrame->GetIniManager() : pSfxApp->GetAppIniManager();
+ if ( BOOL( pIniMgr->Get( SFX_GROUP_USER, DEFINE_CONST_UNICODE("HelpAuthor") ).ToInt32() ) )
+ GetpApp()->HideStatusText();
+
+ SfxTabPage *pPage = (SfxTabPage*)pTabCtrl->GetTabPage( nId );
+ DBG_ASSERT( pPage, "keine aktive Page" );
+#ifdef DBG_UTIL
+ Data_Impl* pDataObject = Find( *pImpl->pData, pTabCtrl->GetCurPageId() );
+ DBG_ASSERT( pDataObject, "keine Datenstruktur zur aktuellen Seite" );
+ if ( pPage->HasExchangeSupport() && pDataObject->bOnDemand )
+ {
+ DBG_WARNING( "Datenaustausch bei ItemsOnDemand ist nicht gewuenscht!" );
+ }
+#endif
+
+ int nRet = SfxTabPage::LEAVE_PAGE;
+
+ if ( !pExampleSet && pPage->HasExchangeSupport() && pSet )
+ pExampleSet = new SfxItemSet( *pSet->GetPool(), pSet->GetRanges() );
+
+ if ( pSet )
+ {
+ SfxItemSet aTmp( *pSet->GetPool(), pSet->GetRanges() );
+
+ if ( pPage->HasExchangeSupport() )
+ nRet = pPage->DeactivatePage( &aTmp );
+//! else
+//! pPage->FillItemSet( aTmp );
+
+ if ( ( SfxTabPage::LEAVE_PAGE & nRet ) == SfxTabPage::LEAVE_PAGE &&
+ aTmp.Count() )
+ {
+ pExampleSet->Put( aTmp );
+ pOutSet->Put( aTmp );
+ }
+ }
+ else
+ {
+ if ( pPage->HasExchangeSupport() ) //!!!
+ {
+ if ( !pExampleSet )
+ {
+ SfxItemPool* pPool = pPage->GetItemSet().GetPool();
+ pExampleSet =
+ new SfxItemSet( *pPool, GetInputRanges( *pPool ) );
+ }
+ nRet = pPage->DeactivatePage( pExampleSet );
+ }
+ else
+ nRet = pPage->DeactivatePage( NULL );
+ }
+
+ if ( nRet & SfxTabPage::REFRESH_SET )
+ {
+ pSet = GetRefreshedSet();
+ DBG_ASSERT( pSet, "GetRefreshedSet() liefert NULL" );
+ // alle Pages als neu zu initialsieren flaggen
+ const USHORT nCount = pImpl->pData->Count();
+
+ for ( USHORT i = 0; i < nCount; ++i )
+ {
+ Data_Impl* pObj = (*pImpl->pData)[i];
+
+ if ( pObj->pTabPage != pPage ) // eigene Page nicht mehr refreshen
+ pObj->bRefresh = TRUE;
+ else
+ pObj->bRefresh = FALSE;
+ }
+ }
+ if ( nRet & SfxTabPage::LEAVE_PAGE )
+ return TRUE;
+ else
+ return FALSE;
+}
+
+// -----------------------------------------------------------------------
+
+const SfxItemSet* SfxTabDialog::GetOutputItemSet
+
+/* [Beschreibung]
+
+ Liefert die Pages, die ihre Sets onDemand liefern, das OutputItemSet.
+
+ [Querverweise]
+
+ <SfxTabDialog::AddTabPage(USHORT, CreateTabPage, GetTabPageRanges, BOOL)>
+ <SfxTabDialog::AddTabPage(USHORT, const String &, CreateTabPage, GetTabPageRanges, BOOL, USHORT)>
+ <SfxTabDialog::AddTabPage(USHORT, const Bitmap &, CreateTabPage, GetTabPageRanges, BOOL, USHORT)>
+*/
+
+(
+ USHORT nId // die Id, unter der die Seite bei AddTabPage()
+ // hinzugef"ugt wurde.
+) const
+{
+ Data_Impl* pDataObject = Find( *pImpl->pData, nId );
+ DBG_ASSERT( pDataObject, "TabPage nicht gefunden" );
+
+ if ( pDataObject )
+ {
+ if ( !pDataObject->pTabPage )
+ return NULL;
+
+ if ( pDataObject->bOnDemand )
+ return &pDataObject->pTabPage->GetItemSet();
+ // else
+ return pOutSet;
+ }
+ return NULL;
+}
+
+// -----------------------------------------------------------------------
+
+int SfxTabDialog::FillOutputItemSet()
+{
+ int nRet = SfxTabPage::LEAVE_PAGE;
+ if ( OK_Impl() )
+ Ok();
+ else
+ nRet = SfxTabPage::KEEP_PAGE;
+ return nRet;
+}
+
+// -----------------------------------------------------------------------
+
+#ifdef WNT
+int __cdecl TabDlgCmpUS_Impl( const void* p1, const void* p2 )
+#else
+#if defined(OS2) && defined(ICC)
+int _Optlink TabDlgCmpUS_Impl( const void* p1, const void* p2 )
+#else
+int TabDlgCmpUS_Impl( const void* p1, const void* p2 )
+#endif
+#endif
+
+/* [Beschreibung]
+
+ Vergleichsfunktion f"ur qsort
+*/
+
+{
+ return *(USHORT*)p1 - *(USHORT*)p2;
+}
+
+// -----------------------------------------------------------------------
+
+void SfxTabDialog::ShowPage( USHORT nId )
+
+/* [Beschreibung]
+
+ Es wird die TabPage mit der "ubergebenen Id aktiviert.
+*/
+
+{
+ aTabCtrl.SetCurPageId( nId );
+ ActivatePageHdl( &aTabCtrl );
+}
+
+// -----------------------------------------------------------------------
+
+const USHORT* SfxTabDialog::GetInputRanges( const SfxItemPool& rPool )
+
+/* [Beschreibung]
+
+ Bildet das Set "uber die Ranges aller Seiten des Dialogs.
+ Die Pages m"ussen die statische Methode f"ur das Erfragen ihrer
+ Ranges bei AddTabPage angegeben haben, liefern also ihre Sets onDemand.
+
+ [Querverweise]
+
+ <SfxTabDialog::AddTabPage(USHORT, CreateTabPage, GetTabPageRanges, BOOL)>
+ <SfxTabDialog::AddTabPage(USHORT, const String &, CreateTabPage, GetTabPageRanges, BOOL, USHORT)>
+ <SfxTabDialog::AddTabPage(USHORT, const Bitmap &, CreateTabPage, GetTabPageRanges, BOOL, USHORT)>
+
+ [R"uckgabewert]
+
+ Pointer auf nullterminiertes Array von USHORTs
+ Dieses Array geh"ort dem Dialog und wird beim
+ Zerst"oren des Dialogs gel"oscht.
+*/
+
+{
+ if ( pSet )
+ {
+ DBG_ERRORFILE( "Set bereits vorhanden!" );
+ return pSet->GetRanges();
+ }
+
+ if ( pRanges )
+ return pRanges;
+ SvUShorts aUS( 16, 16 );
+ USHORT nCount = pImpl->pData->Count();
+
+ USHORT i;
+ for ( i = 0; i < nCount; ++i )
+ {
+ Data_Impl* pDataObject = pImpl->pData->GetObject(i);
+
+ if ( pDataObject->fnGetRanges )
+ {
+ const USHORT* pTmpRanges = (pDataObject->fnGetRanges)();
+ const USHORT* pIter = pTmpRanges;
+
+ USHORT nLen;
+ for( nLen = 0; *pIter; ++nLen, ++pIter )
+ ;
+ aUS.Insert( pTmpRanges, nLen, aUS.Count() );
+ }
+ }
+
+ //! Doppelte Ids entfernen?
+#ifndef TF_POOLABLE
+ if ( rPool.HasMap() )
+#endif
+ {
+ nCount = aUS.Count();
+
+ for ( i = 0; i < nCount; ++i )
+ aUS[i] = rPool.GetWhich( aUS[i] );
+ }
+
+ // sortieren
+ if ( aUS.Count() > 1 )
+ qsort( (void*)aUS.GetData(),
+ aUS.Count(), sizeof(USHORT), TabDlgCmpUS_Impl );
+
+ // Ranges erzeugen
+ //!! Auskommentiert, da fehlerhaft
+ /*
+ pRanges = new USHORT[aUS.Count() * 2 + 1];
+ int j = 0;
+ i = 0;
+
+ while ( i < aUS.Count() )
+ {
+ pRanges[j++] = aUS[i];
+ // aufeinanderfolgende Zahlen
+ for( ; i < aUS.Count()-1; ++i )
+ if ( aUS[i] + 1 != aUS[i+1] )
+ break;
+ pRanges[j++] = aUS[i++];
+ }
+ pRanges[j] = 0; // terminierende NULL
+ */
+
+ pRanges = new USHORT[aUS.Count() + 1];
+ memcpy(pRanges, aUS.GetData(), sizeof(USHORT) * aUS.Count());
+ pRanges[aUS.Count()] = 0;
+ return pRanges;
+}
+
+// -----------------------------------------------------------------------
+
+void SfxTabDialog::SetInputSet( const SfxItemSet* pInSet )
+
+/* [Beschreibung]
+
+ Mit dieser Methode kann nachtr"aglich der Input-Set initial oder
+ neu gesetzt werden.
+*/
+
+{
+ FASTBOOL bSet = ( pSet != NULL );
+
+ pSet = pInSet;
+
+ if ( !bSet && !pExampleSet && !pOutSet )
+ {
+ pExampleSet = new SfxItemSet( *pSet );
+ pOutSet = new SfxItemSet( *pSet->GetPool(), pSet->GetRanges() );
+ }
+}
+
+
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
new file mode 100644
index 000000000000..57ba6c5d519f
--- /dev/null
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -0,0 +1,2644 @@
+/*************************************************************************
+ *
+ * $RCSfile: templdlg.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:31 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _MENU_HXX //autogen
+#include <vcl/menu.hxx>
+#endif
+#ifndef _INTN_HXX //autogen
+#include <tools/intn.hxx>
+#endif
+#ifndef _SFXINTITEM_HXX //autogen
+#include <svtools/intitem.hxx>
+#endif
+#ifndef _SFXSTRITEM_HXX //autogen
+#include <svtools/stritem.hxx>
+#endif
+#ifndef _EMBOBJ_HXX //autogen
+#include <so3/embobj.hxx>
+#endif
+#ifndef _SFXSTYLE_HXX //autogen
+#include <svtools/style.hxx>
+#endif
+#ifndef _IFACE_HXX //autogen
+#include <so3/iface.hxx>
+#endif
+#pragma hdrstop
+
+#define _SVSTDARR_STRINGSDTOR
+#include <svtools/svstdarr.hxx>
+
+#include <sfxhelp.hxx>
+#include "app.hxx"
+#include "dispatch.hxx"
+#include "bindings.hxx"
+#include "templdlg.hxx"
+#include "templdgi.hxx"
+#include "tplcitem.hxx"
+#include "sfxtypes.hxx"
+#include "styfitem.hxx"
+#include "objsh.hxx"
+#include "viewsh.hxx"
+#include "newstyle.hxx"
+#include "tplpitem.hxx"
+#include "sfxresid.hxx"
+
+#include "templdlg.hrc"
+#include "sfx.hrc"
+#include "dialog.hrc"
+#include "arrdecl.hxx"
+#include "fltfnc.hxx"
+#include "docfilt.hxx"
+
+#include "docvor.hxx"
+#include "doctempl.hxx"
+#include "module.hxx"
+#include "imgmgr.hxx"
+#include "helpid.hrc"
+#include "appdata.hxx"
+#include <objshimp.hxx>
+
+#include "viewfrm.hxx"
+
+//=========================================================================
+
+// Fenster wird ab jetzt dynamisch erstellt. Daher hier R"ander usw.
+
+#define SFX_TEMPLDLG_HFRAME 3
+#define SFX_TEMPLDLG_VTOPFRAME 3
+
+#ifdef MAC
+#define SFX_TEMPLDLG_VBOTFRAME 8
+#else
+#define SFX_TEMPLDLG_VBOTFRAME 3
+#endif
+
+#define SFX_TEMPLDLG_MIDHSPACE 3
+#define SFX_TEMPLDLG_MIDVSPACE 3
+#define SFX_TEMPLDLG_FILTERHEIGHT 100
+
+static USHORT nLastItemId = USHRT_MAX;
+
+//=========================================================================
+
+TYPEINIT0(SfxCommonTemplateDialog_Impl);
+TYPEINIT1(SfxTemplateDialog_Impl,SfxCommonTemplateDialog_Impl);
+TYPEINIT1(SfxTemplateCatalog_Impl,SfxCommonTemplateDialog_Impl);
+
+SFX_IMPL_DOCKINGWINDOW(SfxTemplateDialogWrapper, SID_STYLE_DESIGNER)
+
+//-------------------------------------------------------------------------
+
+// Redirektionsfunktionen
+
+SfxTemplateDialog::SfxTemplateDialog
+(
+ SfxBindings *pBindings,
+ SfxChildWindow *pCW,
+ Window *pParent
+)
+
+/* [Beschreibung]
+ Gestalterklasse.
+*/
+ : SfxDockingWindow( pBindings, pCW, pParent, SfxResId(DLG_STYLE_DESIGNER) ),
+ pImpl(0)
+{
+ pImpl=new SfxTemplateDialog_Impl(pParent, pBindings, this);
+}
+
+//-------------------------------------------------------------------------
+
+SfxTemplateDialog::~SfxTemplateDialog()
+{
+ delete pImpl;
+}
+
+ISfxTemplateCommon* SfxTemplateDialog::GetISfxTemplateCommon()
+{
+ return pImpl->GetISfxTemplateCommon();
+}
+
+//-------------------------------------------------------------------------
+
+void SfxTemplateDialog::Update()
+{
+ pImpl->Update();
+}
+
+//-------------------------------------------------------------------------
+
+void SfxTemplateDialog::Resize()
+{
+ if(pImpl)
+ pImpl->Resize();
+ SfxDockingWindow::Resize();
+}
+
+
+//-------------------------------------------------------------------------
+
+SfxChildAlignment SfxTemplateDialog::CheckAlignment(SfxChildAlignment eActAlign,SfxChildAlignment eAlign)
+{
+ switch (eAlign)
+ {
+ case SFX_ALIGN_TOP:
+ case SFX_ALIGN_HIGHESTTOP:
+ case SFX_ALIGN_LOWESTTOP:
+ case SFX_ALIGN_BOTTOM:
+ case SFX_ALIGN_LOWESTBOTTOM:
+ case SFX_ALIGN_HIGHESTBOTTOM:
+ return eActAlign;
+ break;
+
+ case SFX_ALIGN_LEFT:
+ case SFX_ALIGN_RIGHT:
+ case SFX_ALIGN_FIRSTLEFT:
+ case SFX_ALIGN_LASTLEFT:
+ case SFX_ALIGN_FIRSTRIGHT:
+ case SFX_ALIGN_LASTRIGHT:
+ return eAlign;
+ break;
+
+ default:
+ return eAlign;
+ break;
+ }
+}
+
+//-------------------------------------------------------------------------
+
+SfxTemplateCatalog::SfxTemplateCatalog(Window *pParent, SfxBindings *pBindings)
+ : SfxModalDialog(pParent,SfxResId(RID_STYLECATALOG))
+{
+ pImpl = new SfxTemplateCatalog_Impl(pParent, pBindings, this);
+}
+
+//-------------------------------------------------------------------------
+
+SfxTemplateCatalog::~SfxTemplateCatalog()
+{
+ delete pImpl;
+}
+
+//-------------------------------------------------------------------------
+
+void DropListBox_Impl::MouseButtonDown( const MouseEvent& rMEvt )
+{
+ nModifier = rMEvt.GetModifier();
+ SvTreeListBox::MouseButtonDown( rMEvt );
+}
+
+
+BOOL DropListBox_Impl::QueryDrop( DropEvent& rEvt )
+
+/* [Beschreibung ]
+
+ Droppen eigentlich immer dann erlaubt, wenn von den selektieren
+ Objekten ine Stylesheet erstellt werden kann und der Dragvorgang
+ von der Selektion aus gestartet wurde.
+ Hier vereinfachend: Es liegen Daten im Clipboardformat der
+ Applikation vor. Cave mehrere Writer gleichzeitig!
+*/
+
+{
+ SvDataObjectRef xObj = SvDataObject::PasteDragServer( rEvt );
+ SvObjectDescriptor aObj( xObj );
+ SfxObjectShell* pDocShell = pDialog->GetObjectShell();
+ if ( pDocShell && aObj.GetClassName() == pDocShell->GetFactory() )
+ {
+ if( rEvt.IsDefaultAction() )
+ rEvt.SetAction( DROP_COPY );
+ if( rEvt.GetAction() != DROP_COPY )
+ return FALSE;
+ SvLBoxEntry *pEntry = GetEntry( rEvt.GetPosPixel(), TRUE );
+ if( pPreDropEntry && ( pEntry != pPreDropEntry || rEvt.IsLeaveWindow()) )
+ {
+ ShowTargetEmphasis( pPreDropEntry, FALSE );
+ pPreDropEntry = 0;
+ }
+ if( pEntry && pEntry!=pPreDropEntry && !rEvt.IsLeaveWindow() )
+ {
+ ShowTargetEmphasis( pEntry, TRUE );
+// MakeVisible( pEntry );
+ pPreDropEntry = pEntry;
+ }
+ if( !pEntry && pDialog->bNewByExampleDisabled ||
+ pEntry && pDialog->bUpdateByExampleDisabled )
+ return FALSE;
+ else
+ return TRUE;
+ }
+ return SvTreeListBox::QueryDrop( rEvt );
+}
+
+//-------------------------------------------------------------------------
+
+BOOL DropListBox_Impl::Drop( const DropEvent& rEvt )
+{
+ BOOL bRet = TRUE;
+ SvDataObjectRef xObj = SvDataObject::PasteDragServer( rEvt );
+ SvObjectDescriptor aObj( xObj );
+ SfxObjectShell* pDocShell = pDialog->GetObjectShell();
+ if ( pDocShell && aObj.GetClassName() == pDocShell->GetFactory() )
+ {
+ SvLBoxEntry *pEntry = GetEntry( rEvt.GetPosPixel(), TRUE );
+ if( pEntry && pEntry!=pPreDropEntry )
+ {
+ ShowTargetEmphasis( pEntry, FALSE );
+ }
+ if( pEntry )
+ {
+ pDialog->SelectStyle( GetEntryText( pEntry) );
+ pDialog->ActionSelect( SID_STYLE_UPDATE_BY_EXAMPLE );
+ }
+ else
+ {
+ pDialog->ActionSelect( SID_STYLE_NEW_BY_EXAMPLE );
+ }
+ }
+ else
+ bRet = SvTreeListBox::Drop( rEvt );
+ return bRet;
+}
+
+//-------------------------------------------------------------------------
+
+
+SfxActionListBox::SfxActionListBox
+(
+ SfxCommonTemplateDialog_Impl* pParent,
+ WinBits nWinBits
+)
+
+/* [Beschreibung]
+
+ ListBox- Klasse, die im Command-Handler ein PopupMenu (Gestalter
+ spezifisch) startet.
+
+*/
+
+: DropListBox_Impl(pParent->GetWindow(), nWinBits, pParent)
+
+{
+}
+
+//-------------------------------------------------------------------------
+
+SfxActionListBox::SfxActionListBox( SfxCommonTemplateDialog_Impl* pParent,
+ const ResId &rResId) :
+ DropListBox_Impl(pParent->GetWindow(), rResId, pParent)
+{
+}
+
+//-------------------------------------------------------------------------
+
+void SfxActionListBox::Command( const CommandEvent& rCEvt )
+{
+ if ( COMMAND_CONTEXTMENU == rCEvt.GetCommand() )
+ pDialog->ExecuteContextMenu_Impl( rCEvt.GetMousePosPixel(), this );
+ else
+ DropListBox_Impl::Command( rCEvt );
+}
+
+//-------------------------------------------------------------------------
+
+SfxTemplateDialogWrapper::SfxTemplateDialogWrapper(Window *pParent,
+ USHORT nId, SfxBindings *p, SfxChildWinInfo *pInfo) :
+ SfxChildWindow(pParent, nId)
+{
+ SfxTemplateDialog *pWin = new SfxTemplateDialog(p, this, pParent);
+ pWindow = pWin;
+ eChildAlignment = SFX_ALIGN_NOALIGNMENT;
+ Point aEmptyPoint;
+
+ Rectangle aRect( aEmptyPoint, pParent->GetOutputSizePixel() );
+ Size aSize = aRect.GetSize();
+ Point aPoint = aRect.TopLeft();
+ Size aWinSize = pWin->GetSizePixel();
+ aPoint.X() += aSize.Width() - aWinSize.Width() - 20;
+ aPoint.Y() += aSize.Height() / 2 - aWinSize.Height() / 2;
+ pWin->SetFloatingPos( aPoint );
+
+ pWin->Initialize( pInfo );
+ pWin->SetMinOutputSizePixel(pWin->pImpl->GetMinOutputSizePixel());
+}
+
+//=========================================================================
+SV_DECL_PTRARR_DEL(ExpandedEntries, StringPtr,16,8)
+SV_IMPL_PTRARR(ExpandedEntries, StringPtr)
+
+
+/* [Beschreibung]
+
+ TreeListBox- Klasse f"ur die Anzeige der hierarchischen View
+ der Vorlagen
+
+*/
+class StyleTreeListBox_Impl: public DropListBox_Impl
+{
+ SvLBoxEntry *pCurEntry;
+ Link aDoubleClickLink;
+ Link aDropLink;
+ String aParent;
+ String aStyle;
+ SfxCommonTemplateDialog_Impl* pCommon;
+protected:
+
+ virtual void Command( const CommandEvent& rMEvt );
+ virtual BOOL DoubleClickHdl();
+ virtual long ExpandingHdl();
+ virtual void ExpandedHdl();
+ virtual BOOL NotifyMoving(SvLBoxEntry* pTarget,
+ SvLBoxEntry* pEntry,
+ SvLBoxEntry*& rpNewParent,
+ ULONG& rNewChildPos);
+public:
+ StyleTreeListBox_Impl( SfxCommonTemplateDialog_Impl* pParent, WinBits nWinStyle = 0);
+ void SetDoubleClickHdl(const Link &rLink) { aDoubleClickLink = rLink; }
+ void SetDropHdl(const Link &rLink) { aDropLink = rLink; }
+ const String &GetParent() const { return aParent; }
+ const String &GetStyle() const { return aStyle; }
+ void MakeExpanded_Impl(ExpandedEntries& rEntries) const;
+};
+
+//-------------------------------------------------------------------------
+
+
+void StyleTreeListBox_Impl::MakeExpanded_Impl(ExpandedEntries& rEntries) const
+{
+ SvLBoxEntry *pEntry;
+ USHORT nCount=0;
+ for(pEntry=(SvLBoxEntry*)FirstVisible();pEntry;pEntry=(SvLBoxEntry*)NextVisible(pEntry))
+ {
+ if(IsExpanded(pEntry))
+ {
+ StringPtr pString=new String(GetEntryText(pEntry));
+ rEntries.Insert(pString,nCount++);
+ }
+ }
+}
+
+
+BOOL StyleTreeListBox_Impl::DoubleClickHdl()
+
+/* [Beschreibung]
+
+
+ DoubleClick-Handler; ruft entsprechenden Link.
+ Virtuelle Methode aus SV.
+
+*/
+{
+ aDoubleClickLink.Call(this);
+ return FALSE;
+}
+
+//-------------------------------------------------------------------------
+
+void StyleTreeListBox_Impl::Command( const CommandEvent& rCEvt )
+
+/* [Beschreibung]
+
+ Command Handler; dieser executed ein PopupMenu (Gestalter
+ spezifisch).
+ Virtuelle Methode aus SV.
+
+*/
+{
+ if(COMMAND_CONTEXTMENU == rCEvt.GetCommand())
+// pCommon->ExecuteContextMenu_Impl(OutputToScreenPixel(rCEvt.GetMousePosPixel()));
+ pCommon->ExecuteContextMenu_Impl( rCEvt.GetMousePosPixel(), this );
+ else
+ SvTreeListBox::Command(rCEvt);
+}
+
+//-------------------------------------------------------------------------
+
+BOOL StyleTreeListBox_Impl::NotifyMoving(SvLBoxEntry* pTarget,
+ SvLBoxEntry* pEntry,
+ SvLBoxEntry*& rpNewParent,
+ ULONG& lPos)
+/* [Beschreibung]
+
+ NotifyMoving Handler; dieser leitet per Link das Event an den Dialog
+ weiter.
+ Virtuelle Methode aus SV.
+
+*/
+{
+ const International aInter(Application::GetAppInternational());
+ if(!pTarget || !pEntry)
+ return FALSE;
+ aParent = GetEntryText(pTarget);
+ aStyle = GetEntryText(pEntry);
+ const BOOL bRet = (BOOL)aDropLink.Call(this);
+ rpNewParent = pTarget;
+ lPos=0;
+ for(SvLBoxEntry *pTmpEntry=FirstChild(pTarget);
+ pTmpEntry && COMPARE_LESS==aInter.Compare(
+ GetEntryText(pTmpEntry),GetEntryText(pEntry));
+ pTmpEntry=NextSibling(pTmpEntry),lPos++);
+
+ return bRet? (BOOL)2: FALSE;
+}
+
+//-------------------------------------------------------------------------
+
+long StyleTreeListBox_Impl::ExpandingHdl()
+
+/* [Beschreibung]
+
+ ExpandingHdl Handler; der aktuelle Eintrag wird gemerkt.
+ Virtuelle Methode aus SV.
+
+ [Querverweise]
+ <StyleTreeListBox_Impl::ExpandedHdl()>
+
+*/
+{
+ pCurEntry = GetCurEntry();
+ return TRUE;
+}
+
+//-------------------------------------------------------------------------
+
+void StyleTreeListBox_Impl::ExpandedHdl()
+
+/* [Beschreibung]
+
+ ExpandedHdl Handler;
+ Virtuelle Methode aus SV.
+
+ [Querverweise]
+ <StyleTreeListBox_Impl::ExpandingHdl()>
+
+*/
+
+{
+ SvLBoxEntry *pEntry = GetHdlEntry();
+ if(!IsExpanded(pEntry) && pCurEntry != GetCurEntry())
+ SelectAll( FALSE );
+ pCurEntry = 0;
+}
+
+//-------------------------------------------------------------------------
+
+StyleTreeListBox_Impl::StyleTreeListBox_Impl(
+ SfxCommonTemplateDialog_Impl* pParent, WinBits nWinStyle) :
+ DropListBox_Impl(pParent->GetWindow(), nWinStyle, pParent),
+ pCurEntry(0),
+ pCommon(pParent)
+
+/* [Beschreibung]
+
+ Konstruktor StyleTreeListBox_Impl
+
+*/
+
+{
+ SetDragOptions(DROP_MOVE);
+}
+
+
+//-------------------------------------------------------------------------
+//-------------------------------------------------------------------------
+
+class StyleTreeArr_Impl;
+
+
+/* [Beschreibung]
+
+ Interne Struktur f"ur den Aufbau der hierarchischen View
+
+*/
+
+struct StyleTree_Impl
+{
+ String aName;
+ String aParent;
+ StyleTreeArr_Impl *pChilds;
+ BOOL bIsExpanded;
+ BOOL HasParent() const { return aParent.Len() != 0; }
+
+ StyleTree_Impl(const String &rName, const String &rParent):
+ aName(rName), aParent(rParent), pChilds(0), bIsExpanded(0) {}
+ ~StyleTree_Impl();
+ void Put(StyleTree_Impl* pIns, ULONG lPos=ULONG_MAX);
+ ULONG Count();
+};
+
+typedef StyleTree_Impl* StyleTree_ImplPtr;
+SV_DECL_PTRARR_DEL(StyleTreeArr_Impl, StyleTree_ImplPtr, 16, 8)
+SV_IMPL_PTRARR(StyleTreeArr_Impl, StyleTree_ImplPtr)
+
+
+ULONG StyleTree_Impl::Count()
+{
+ return pChilds ? pChilds->Count() : 0L;
+}
+
+//-------------------------------------------------------------------------
+
+StyleTree_Impl::~StyleTree_Impl()
+{
+ delete pChilds;
+}
+
+//-------------------------------------------------------------------------
+
+void StyleTree_Impl::Put(StyleTree_Impl* pIns, ULONG lPos)
+{
+ if ( !pChilds )
+ pChilds = new StyleTreeArr_Impl;
+
+ if ( ULONG_MAX == lPos )
+ lPos = pChilds->Count();
+ pChilds->Insert( pIns, (USHORT)lPos );
+}
+
+//-------------------------------------------------------------------------
+
+StyleTreeArr_Impl &MakeTree_Impl(StyleTreeArr_Impl &rArr)
+{
+ const International aInter(Application::GetAppInternational());
+ const USHORT nCount = rArr.Count();
+ // Alle unter ihren Parents einordnen
+ USHORT i;
+ for(i = 0; i < nCount; ++i)
+ {
+ StyleTree_ImplPtr pEntry = rArr[i];
+ if(pEntry->HasParent())
+ {
+ for(USHORT j = 0; j < nCount; ++j)
+ {
+ StyleTree_ImplPtr pCmp = rArr[j];
+ if(pCmp->aName == pEntry->aParent)
+ {
+ // initial sortiert einfuegen
+ USHORT ii;
+ for ( ii = 0;
+ ii < pCmp->Count() && COMPARE_LESS ==
+ aInter.Compare( (*pCmp->pChilds)[ii]->aName,
+ pEntry->aName);++ii);
+ pCmp->Put(pEntry,ii);
+ break;
+ }
+ }
+ }
+ }
+ // alle, die schon unter ihrem Parent eingeordnet wurden
+ // entfernen
+ for(i = 0; i < rArr.Count(); )
+ {
+ if(rArr[i]->HasParent())
+ rArr.Remove(i);
+ else
+ ++i;
+ }
+ return rArr;
+}
+
+//-------------------------------------------------------------------------
+
+
+inline BOOL IsExpanded_Impl( const ExpandedEntries& rEntries,
+ const String &rStr)
+{
+ USHORT nCount=rEntries.Count();
+ for(USHORT n=0;n<nCount;n++)
+ if(*rEntries[n]==rStr)
+ return TRUE;
+ return FALSE;
+}
+
+
+
+SvLBoxEntry* FillBox_Impl(SvTreeListBox *pBox,
+ StyleTree_ImplPtr pEntry,
+ const ExpandedEntries& rEntries,
+ SvLBoxEntry* pParent = 0)
+{
+ SvLBoxEntry* pNewEntry = pBox->InsertEntry(pEntry->aName, pParent);
+ const USHORT nCount = pEntry->pChilds? pEntry->pChilds->Count(): 0;
+ for(USHORT i = 0; i < nCount; ++i)
+ FillBox_Impl(pBox, (*pEntry->pChilds)[i], rEntries, pNewEntry);
+ return pNewEntry;
+}
+
+//-------------------------------------------------------------------------
+
+// Konstruktor
+
+SfxCommonTemplateDialog_Impl::SfxCommonTemplateDialog_Impl( SfxBindings* pB, SfxDockingWindow* pW ) :
+
+ aISfxTemplateCommon ( this ),
+ pBindings ( pB ),
+ pWindow ( pW ),
+ pModule ( NULL ),
+ pTimer ( NULL ),
+ pStyleSheetPool ( NULL ),
+ pTreeBox ( NULL ),
+ pCurObjShell ( NULL ),
+
+ aFmtLb ( this, WB_BORDER | WB_TABSTOP | WB_SORT ),
+ aFilterLb ( pW, WB_BORDER | WB_DROPDOWN | WB_TABSTOP ),
+
+ nActFamily ( 0xffff ),
+ nActFilter ( 0 ),
+ nAppFilter ( 0 ),
+
+ bDontUpdate ( FALSE ),
+ bIsWater ( FALSE ),
+ bEnabled ( TRUE ),
+ bUpdate ( FALSE ),
+ bUpdateFamily ( FALSE ),
+ bCanEdit ( FALSE ),
+ bCanDel ( FALSE ),
+ bCanNew ( TRUE ),
+ bWaterDisabled ( FALSE ),
+ bNewByExampleDisabled ( FALSE ),
+ bUpdateByExampleDisabled( FALSE ),
+ bTreeDrag ( TRUE ),
+ bHierarchical ( FALSE ),
+ bBindingUpdate ( TRUE )
+
+{
+ aFmtLb.SetHelpId( HID_TEMPLATE_FMT );
+ aFilterLb.SetHelpId( HID_TEMPLATE_FILTER );
+ aFmtLb.SetWindowBits( WB_SORT );
+ Font aFont = aFmtLb.GetFont();
+ aFont.SetWeight( WEIGHT_NORMAL );
+#ifdef MAC
+ aFont.SetName( String::CreateFromAscii( "Geneva" ) );
+ aFont.SetSize( Size( 0, 10 ) );
+#endif
+ aFmtLb.SetFont( aFont );
+}
+
+//-------------------------------------------------------------------------
+
+SfxCommonTemplateDialog_Impl::SfxCommonTemplateDialog_Impl( SfxBindings* pB, ModalDialog* pW ) :
+
+ aISfxTemplateCommon ( this ),
+ pBindings ( pB ),
+ pWindow ( pW ),
+ pModule ( NULL ),
+ pTimer ( NULL ),
+ pStyleSheetPool ( NULL ),
+ pTreeBox ( NULL ),
+ pCurObjShell ( NULL ),
+
+ aFmtLb ( this, SfxResId( BT_VLIST ) ),
+ aFilterLb ( pW, SfxResId( BT_FLIST ) ),
+
+ nActFamily ( 0xffff ),
+ nActFilter ( 0 ),
+ nAppFilter ( 0 ),
+
+ bDontUpdate ( FALSE ),
+ bIsWater ( FALSE ),
+ bEnabled ( TRUE ),
+ bUpdate ( FALSE ),
+ bUpdateFamily ( FALSE ),
+ bCanEdit ( FALSE ),
+ bCanDel ( FALSE ),
+ bCanNew ( TRUE ),
+ bWaterDisabled ( FALSE ),
+ bNewByExampleDisabled ( FALSE ),
+ bUpdateByExampleDisabled( FALSE ),
+ bTreeDrag ( TRUE ),
+ bHierarchical ( FALSE ),
+ bBindingUpdate ( TRUE )
+
+{
+ aFmtLb.SetWindowBits( WB_SORT );
+}
+
+//-------------------------------------------------------------------------
+
+USHORT SfxCommonTemplateDialog_Impl::StyleNrToInfoOffset(USHORT nId)
+{
+ const SfxStyleFamilyItem *pItem=pStyleFamilies->GetObject(nId);
+ return SfxFamilyIdToNId(pItem->GetFamily())-1;
+}
+
+//-------------------------------------------------------------------------
+
+void SfxTemplateDialog_Impl::EnableEdit(BOOL bEnable)
+{
+ SfxCommonTemplateDialog_Impl::EnableEdit( bEnable );
+ if( !bEnable || !bUpdateByExampleDisabled )
+ EnableItem( SID_STYLE_UPDATE_BY_EXAMPLE, bEnable);
+}
+
+//-------------------------------------------------------------------------
+
+
+USHORT SfxCommonTemplateDialog_Impl::InfoOffsetToStyleNr(USHORT nId)
+{
+ for ( USHORT i=0;i<pStyleFamilies->Count();i++ )
+ if ( SfxFamilyIdToNId(pStyleFamilies->GetObject(i)->GetFamily()) == nId+1 )
+ return i;
+ DBG_ERROR("Style Nummer nicht gefunden");
+ return 0;
+}
+
+
+//-------------------------------------------------------------------------
+
+void SfxCommonTemplateDialog_Impl::ReadResource()
+{
+ // globale Benutzer-Resource auslesen
+ USHORT i;
+ for(i = 0; i < MAX_FAMILIES; ++i)
+ pFamilyState[i] = 0;
+
+ SfxViewFrame* pViewFrame = pBindings->GetDispatcher_Impl()->GetFrame();
+ pCurObjShell = pViewFrame->GetObjectShell();
+ ResMgr* pMgr = pCurObjShell ? pCurObjShell->GetResMgr() : NULL;
+ ResId aFamId( DLG_STYLE_DESIGNER, pMgr );
+ aFamId.SetRT(RSC_SFX_STYLE_FAMILIES);
+ if( !pMgr || !pMgr->IsAvailable( aFamId ) )
+ pStyleFamilies = new SfxStyleFamilies;
+ else
+ pStyleFamilies = new SfxStyleFamilies( aFamId );
+
+ nActFilter = pCurObjShell ? pCurObjShell->Get_Impl()->nStyleFilter : 0xFFFF;
+
+ // Einfuegen in die Toolbox
+ // umgekehrte Reihenfolge, da immer vorne eingefuegt wird.
+ USHORT nCount = pStyleFamilies->Count();
+
+ pBindings->ENTERREGISTRATIONS();
+
+ for(i = 0; i < nCount; ++i)
+ {
+ USHORT nSlot = 0;
+ switch((USHORT)pStyleFamilies->GetObject(i)->GetFamily())
+ {
+ case SFX_STYLE_FAMILY_CHAR: nSlot = SID_STYLE_FAMILY1; break;
+ case SFX_STYLE_FAMILY_PARA: nSlot = SID_STYLE_FAMILY2; break;
+ case SFX_STYLE_FAMILY_FRAME:nSlot = SID_STYLE_FAMILY3; break;
+ case SFX_STYLE_FAMILY_PAGE: nSlot = SID_STYLE_FAMILY4; break;
+ case SFX_STYLE_FAMILY_PSEUDO: nSlot = SID_STYLE_FAMILY5; break;
+ default: DBG_ERROR("unbekannte StyleFamily"); break;
+ }
+ pBoundItems[i] =
+ new SfxTemplateControllerItem(nSlot, *this, *pBindings);
+ }
+ pBoundItems[i++] = new SfxTemplateControllerItem(
+ SID_STYLE_WATERCAN, *this, *pBindings);
+ pBoundItems[i++] = new SfxTemplateControllerItem(
+ SID_STYLE_NEW_BY_EXAMPLE, *this, *pBindings);
+ pBoundItems[i++] = new SfxTemplateControllerItem(
+ SID_STYLE_UPDATE_BY_EXAMPLE, *this, *pBindings);
+ pBoundItems[i++] = new SfxTemplateControllerItem(
+ SID_STYLE_NEW, *this, *pBindings);
+ pBoundItems[i++] = new SfxTemplateControllerItem(
+ SID_STYLE_DRAGHIERARCHIE, *this, *pBindings);
+ pBoundItems[i++] = new SfxTemplateControllerItem(
+ SID_STYLE_EDIT, *this, *pBindings);
+ pBoundItems[i++] = new SfxTemplateControllerItem(
+ SID_STYLE_DELETE, *this, *pBindings);
+ pBoundItems[i++] = new SfxTemplateControllerItem(
+ SID_STYLE_FAMILY, *this, *pBindings);
+ pBindings->LEAVEREGISTRATIONS();
+
+ for(; i < COUNT_BOUND_FUNC; ++i)
+ pBoundItems[i] = 0;
+
+ StartListening(*pBindings);
+
+//In umgekehrter Reihenfolge des Auftretens in den Stylefamilies einfuegen.
+//Das ist fuer den Toolbar des Gestalters. Die Listbox des Kataloges achtet
+//selbst auf korrekte Reihenfolge.
+
+//Reihenfolgen: Reihenfolge in der Resource = Reihenfolge in Toolbar bzw.
+//Listbox.
+//Reihenfolge aufsteigender SIDs: Niedrige SIDs werden als erstes angezeigt,
+//wenn Vorlagen mehrerer Familien aktiv sind.
+
+ for( ; nCount--; )
+ {
+ const SfxStyleFamilyItem *pItem = pStyleFamilies->GetObject( nCount );
+ USHORT nId = SfxFamilyIdToNId( (USHORT) pItem->GetFamily() );
+ InsertFamilyItem( nId, pItem );
+ }
+
+ Resize();
+
+ USHORT nStart = SID_STYLE_FAMILY1;
+ USHORT nEnd = SID_STYLE_FAMILY4;
+
+ for ( i = nStart; i <= nEnd; i++ )
+ pBindings->Update(i);
+
+ pModule = pCurObjShell ? pCurObjShell->GetModule() : NULL;
+}
+
+//-------------------------------------------------------------------------
+
+void SfxCommonTemplateDialog_Impl::ClearResource()
+{
+ ClearFamilyList();
+ DELETEX(pStyleFamilies);
+ USHORT i;
+ for ( i = 0; i < MAX_FAMILIES; ++i )
+ DELETEX(pFamilyState[i]);
+ for ( i = 0; i < COUNT_BOUND_FUNC; ++i )
+ delete pBoundItems[i];
+ pCurObjShell = NULL;
+}
+
+//-------------------------------------------------------------------------
+
+void SfxCommonTemplateDialog_Impl::Initialize()
+{
+ // globale Benutzer-Resource auslesen
+ ReadResource();
+ pBindings->Invalidate( SID_STYLE_FAMILY );
+ pBindings->Update( SID_STYLE_FAMILY );
+ Update_Impl();
+
+ aFilterLb.SetSelectHdl( LINK( this, SfxCommonTemplateDialog_Impl, FilterSelectHdl ) );
+ aFmtLb.SetDoubleClickHdl( LINK( this, SfxCommonTemplateDialog_Impl, ApplyHdl ) );
+ aFmtLb.SetSelectHdl( LINK( this, SfxCommonTemplateDialog_Impl, FmtSelectHdl ) );
+
+ aFilterLb.Show();
+ aFmtLb.Show();
+}
+
+//-------------------------------------------------------------------------
+
+SfxCommonTemplateDialog_Impl::~SfxCommonTemplateDialog_Impl()
+{
+ String aEmpty;
+ if ( bIsWater )
+ Execute_Impl(SID_STYLE_WATERCAN, aEmpty, aEmpty, 0);
+ GetWindow()->Hide();
+ DELETEX(pStyleFamilies);
+ USHORT i;
+ for ( i = 0; i < MAX_FAMILIES; ++i )
+ DELETEX(pFamilyState[i]);
+ for ( i = 0; i < COUNT_BOUND_FUNC; ++i )
+ delete pBoundItems[i];
+ if ( pStyleSheetPool )
+ EndListening(*pStyleSheetPool);
+ pStyleSheetPool = NULL;
+ delete pTreeBox;
+ delete pTimer;
+}
+
+//-------------------------------------------------------------------------
+
+USHORT SfxCommonTemplateDialog_Impl::SfxFamilyIdToNId( USHORT nFamily )
+{
+ switch ( nFamily )
+ {
+ case SFX_STYLE_FAMILY_CHAR: return 1; break;
+ case SFX_STYLE_FAMILY_PARA: return 2; break;
+ case SFX_STYLE_FAMILY_FRAME: return 3; break;
+ case SFX_STYLE_FAMILY_PAGE: return 4; break;
+ case SFX_STYLE_FAMILY_PSEUDO: return 5; break;
+ default: return 0;
+ }
+}
+
+//-------------------------------------------------------------------------
+
+// Hilfsfunktion: Zugriff auf aktuelles Family-Item
+const SfxStyleFamilyItem *SfxCommonTemplateDialog_Impl::GetFamilyItem_Impl() const
+{
+ const USHORT nCount = pStyleFamilies->Count();
+ for(USHORT i = 0; i < nCount; ++i)
+ {
+ const SfxStyleFamilyItem *pItem = pStyleFamilies->GetObject(i);
+// if(!pItem)continue;
+ USHORT nId = SfxFamilyIdToNId((USHORT)pItem->GetFamily());
+ if(nId == nActFamily)
+ return pItem;
+ }
+ return 0;
+}
+
+//-------------------------------------------------------------------------
+
+void SfxCommonTemplateDialog_Impl::SelectStyle(const String &rStr)
+{
+ const SfxStyleFamilyItem* pItem = GetFamilyItem_Impl();
+ if ( !pItem )
+ return;
+ const SfxStyleFamily eFam = pItem->GetFamily();
+ SfxStyleSheetBase* pStyle = pStyleSheetPool->Find( rStr, eFam, SFXSTYLEBIT_ALL );
+ if( pStyle )
+ EnableEdit( !(pStyle->GetMask() & SFXSTYLEBIT_READONLY) );
+
+ if ( pTreeBox )
+ {
+ if ( rStr.Len() )
+ {
+ SvLBoxEntry* pEntry = pTreeBox->First();
+ while ( pEntry )
+ {
+ if ( pTreeBox->GetEntryText( pEntry ) == rStr )
+ {
+ pTreeBox->MakeVisible( pEntry );
+ pTreeBox->Select( pEntry );
+ return;
+ }
+ pEntry = pTreeBox->Next( pEntry );
+ }
+ }
+ else
+ pTreeBox->SelectAll( FALSE );
+ }
+ else
+ {
+ BOOL bSelect = ( rStr.Len() > 0 );
+ if ( bSelect )
+ {
+ SvLBoxEntry* pEntry = (SvLBoxEntry*)aFmtLb.FirstVisible();
+ while ( pEntry && aFmtLb.GetEntryText( pEntry ) != rStr )
+ pEntry = (SvLBoxEntry*)aFmtLb.NextVisible( pEntry );
+ if ( !pEntry )
+ bSelect = FALSE;
+ else
+ {
+ aFmtLb.MakeVisible( pEntry );
+ aFmtLb.Select( pEntry );
+ FmtSelectHdl( NULL );
+ }
+ }
+
+ if ( !bSelect )
+ aFmtLb.SelectAll( FALSE );
+ }
+}
+
+//-------------------------------------------------------------------------
+
+String SfxCommonTemplateDialog_Impl::GetSelectedEntry() const
+{
+ String aRet;
+ if ( pTreeBox )
+ {
+ SvLBoxEntry* pEntry = pTreeBox->FirstSelected();
+ if( !pEntry )
+ pEntry = aFmtLb.GetPreDropEntry();
+ if ( pEntry )
+ aRet = pTreeBox->GetEntryText( pEntry );
+ }
+ else
+ {
+ SvLBoxEntry* pEntry = aFmtLb.FirstSelected();
+ if ( pEntry )
+ aRet = aFmtLb.GetEntryText( pEntry );
+ }
+ return aRet;
+}
+
+//-------------------------------------------------------------------------
+
+void SfxCommonTemplateDialog_Impl::EnableTreeDrag( BOOL bEnable )
+{
+ if ( pStyleSheetPool )
+ {
+ SfxStyleSheetBase* pStyle = pStyleSheetPool->First();
+ if ( pTreeBox )
+ {
+ if ( pStyle && pStyle->HasParentSupport() && bEnable )
+ pTreeBox->SetDragDropMode(SV_DRAGDROP_CTRL_MOVE);
+ else
+ pTreeBox->SetDragDropMode(SV_DRAGDROP_NONE);
+ }
+ }
+ bTreeDrag = bEnable;
+}
+
+//-------------------------------------------------------------------------
+
+void SfxCommonTemplateDialog_Impl::FillTreeBox()
+{
+ DBG_ASSERT(pTreeBox, "FillTreeBox ohne TreeBox");
+ if(pStyleSheetPool && nActFamily != 0xffff)
+ {
+ const SfxStyleFamilyItem *pItem = GetFamilyItem_Impl();
+ pStyleSheetPool->SetSearchMask(pItem->GetFamily(), SFXSTYLEBIT_ALL);
+ StyleTreeArr_Impl aArr;
+ SfxStyleSheetBase *pStyle = pStyleSheetPool->First();
+ if(pStyle && pStyle->HasParentSupport() && bTreeDrag )
+ pTreeBox->SetDragDropMode(SV_DRAGDROP_CTRL_MOVE);
+ else
+ pTreeBox->SetDragDropMode(SV_DRAGDROP_NONE);
+ while(pStyle)
+ {
+ StyleTree_ImplPtr pNew =
+ new StyleTree_Impl(pStyle->GetName(), pStyle->GetParent());
+ aArr.Insert(pNew, aArr.Count());
+ pStyle = pStyleSheetPool->Next();
+ }
+ MakeTree_Impl(aArr);
+ ExpandedEntries aEntries;
+ if(pTreeBox)
+ ((const StyleTreeListBox_Impl *)pTreeBox)->
+ MakeExpanded_Impl( aEntries);
+ pTreeBox->SetUpdateMode( FALSE );
+ pTreeBox->Clear();
+ const USHORT nCount = aArr.Count();
+ for(USHORT i = 0; i < nCount; ++i)
+ FillBox_Impl(pTreeBox, aArr[i], aEntries);
+
+// EnableEdit(FALSE);
+ EnableItem(SID_STYLE_WATERCAN,FALSE);
+
+ SfxTemplateItem *pState = pFamilyState[nActFamily-1];
+
+ if(nCount)
+ pTreeBox->Expand(pTreeBox->First());
+
+ for(SvLBoxEntry *pEntry=pTreeBox->First();
+ pEntry;pEntry=pTreeBox->Next(pEntry))
+ {
+ if(IsExpanded_Impl(aEntries,pTreeBox->GetEntryText(pEntry)))
+ pTreeBox->Expand(pEntry);
+ }
+
+ if(pState) //Aktuellen Eintrag selektieren
+ {
+ const String aStyle(pState->GetStyleName());
+ SelectStyle(aStyle);
+ }
+ EnableDelete();
+
+ pTreeBox->SetUpdateMode( TRUE );
+ }
+}
+
+//-------------------------------------------------------------------------
+inline BOOL SfxCommonTemplateDialog_Impl::HasSelectedStyle() const
+{
+ return pTreeBox? pTreeBox->FirstSelected() != 0:
+ aFmtLb.GetSelectionCount() != 0;
+}
+
+
+//-------------------------------------------------------------------------
+
+// intern: Aktualisierung der Anzeige
+void SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(USHORT nFlags) // Flags, was aktualisiert werden soll (s.o.)
+{
+ DBG_ASSERT(nFlags, "nichts zu tun");
+ const SfxStyleFamilyItem *pItem = GetFamilyItem_Impl();
+ if (!pItem)
+ {
+ // Ist beim Vorlagenkatalog der Fall
+ SfxTemplateItem **ppItem = pFamilyState;
+ const USHORT nFamilyCount = pStyleFamilies->Count();
+ USHORT n;
+ for(n=0;n<nFamilyCount;n++)
+ if(ppItem[StyleNrToInfoOffset(n)])break;
+ if ( n == nFamilyCount )
+ // passiert gelegentlich bei Beichten, Formularen etc.; wei der Teufel warum
+ return;
+ ppItem+=StyleNrToInfoOffset(n);
+ nAppFilter = (*ppItem)->GetValue();
+ FamilySelect( StyleNrToInfoOffset(n)+1 );
+ pItem = GetFamilyItem_Impl();
+ }
+
+ const SfxStyleFamily eFam = pItem->GetFamily();
+
+ SfxFilterTupel *pT = pItem->GetFilterList().GetObject(nActFilter);
+ USHORT nFilter = pT ? pItem->GetFilterList().GetObject(nActFilter)->nFlags : 0;
+ if(!nFilter) // automatisch
+ nFilter = nAppFilter;
+
+ DBG_ASSERT(pStyleSheetPool, "kein StyleSheetPool");
+ if(pStyleSheetPool)
+ {
+ pStyleSheetPool->SetSearchMask(eFam, nFilter);
+ const SfxStyleFamilyItem *pItem = GetFamilyItem_Impl();
+ if((nFlags & UPDATE_FAMILY) == UPDATE_FAMILY)
+ {
+ if(ISA(SfxTemplateDialog_Impl))
+ ((DockingWindow* )GetWindow())->SetText(
+ pItem->GetText()); // Titel setzen
+ CheckItem(nActFamily, TRUE); // Button in Toolbox checken
+ aFilterLb.SetUpdateMode(FALSE);
+ aFilterLb.Clear();
+ const SfxStyleFilter& rFilter = pItem->GetFilterList();
+ for(USHORT i = 0; i < rFilter.Count(); ++i)
+ aFilterLb.InsertEntry(rFilter.GetObject(i)->aName);
+ if(nActFilter < aFilterLb.GetEntryCount())
+ aFilterLb.SelectEntryPos(nActFilter);
+ else
+ aFilterLb.SelectEntryPos(nActFilter = 0);
+ aFilterLb.InsertEntry(String(SfxResId(STR_STYLE_FILTER_HIERARCHICAL)));
+
+ if(pTreeBox)
+ aFilterLb.SelectEntry(String(SfxResId(STR_STYLE_FILTER_HIERARCHICAL)));
+ //Falls in Treedarstellung wieder Family Hierarchie selektieren
+
+ aFilterLb.SetUpdateMode(TRUE);
+ }
+ else
+ {
+ if( nActFilter < aFilterLb.GetEntryCount() )
+ aFilterLb.SelectEntryPos(nActFilter);
+ else
+ aFilterLb.SelectEntryPos( nActFilter = 0 );
+ }
+
+ if(nFlags & UPDATE_FAMILY_LIST)
+ {
+// EnableEdit(FALSE);
+ EnableItem(SID_STYLE_WATERCAN,FALSE);
+
+ SfxStyleSheetBase *pStyle = pStyleSheetPool->First();
+ SvLBoxEntry* pEntry = aFmtLb.First();
+ SvStringsDtor aStrings;
+
+ while( pStyle )
+ {
+ //Bubblesort
+ for( USHORT nPos = aStrings.Count() + 1 ; nPos-- ;)
+ {
+ if( !nPos || *aStrings[nPos-1] < pStyle->GetName() )
+ {
+ // Die Namen stehen in den Styles, also nicht kopieren
+ // Reingefallen!: Writer hat insgesamt nur 1 Style
+ aStrings.Insert(
+ new String( pStyle->GetName() ), nPos );
+ break;
+ }
+ }
+ pStyle = pStyleSheetPool->Next();
+ }
+
+
+ USHORT nCount = aStrings.Count();
+ USHORT nPos = 0;
+ while( nPos < nCount && pEntry &&
+ *aStrings[ nPos ] == aFmtLb.GetEntryText( pEntry ) )
+ {
+ nPos++;
+ pEntry = aFmtLb.Next( pEntry );
+ }
+
+ if( nPos < nCount || pEntry )
+ {
+ // Box mit den Vorlagen fuellen
+ aFmtLb.SetUpdateMode(FALSE);
+ aFmtLb.Clear();
+
+ nPos = 0;
+ while( nPos < nCount )
+ aFmtLb.InsertEntry( *aStrings.GetObject( nPos++ ));
+ aFmtLb.SetUpdateMode(TRUE);
+ }
+ // aktuelle Vorlage anzeigen
+ SfxTemplateItem *pState = pFamilyState[nActFamily-1];
+ if(pState)
+ {
+ const String aStyle(pState->GetStyleName());
+ SelectStyle(aStyle);
+ }
+ EnableDelete();
+ }
+ }
+}
+
+//-------------------------------------------------------------------------
+
+// Aktualisierung Anzeige: Gie\skanne an/aus
+void SfxCommonTemplateDialog_Impl::SetWaterCanState(const SfxBoolItem *pItem)
+{
+// EnableItem(SID_STYLE_WATERCAN, pItem != 0);
+ bWaterDisabled = pItem == 0;
+
+ if(pItem)
+ {
+ CheckItem(SID_STYLE_WATERCAN, pItem->GetValue());
+ EnableItem( SID_STYLE_WATERCAN, TRUE );
+ }
+ else
+ EnableItem(SID_STYLE_WATERCAN, FALSE);
+
+//Waehrend Giesskannenmodus Statusupdates ignorieren.
+
+ USHORT nCount=pStyleFamilies->Count();
+ pBindings->EnterRegistrations();
+ for(USHORT n=0; n<nCount; n++)
+ {
+ SfxControllerItem *pCItem=pBoundItems[n];
+ BOOL bChecked = pItem && pItem->GetValue();
+ if( pCItem->IsBound() == bChecked )
+ if( !bChecked )
+ pCItem->ReBind();
+ else
+ pCItem->UnBind();
+ }
+ pBindings->LeaveRegistrations();
+}
+
+//-------------------------------------------------------------------------
+
+// Item mit dem Status einer Family wird kopiert und gemerkt
+// (Aktualisierung erfolgt, wenn alle Stati aktualisiert worden sind.
+// Siehe auch: <SfxBindings::AddDoneHdl(const Link &)>
+
+void SfxCommonTemplateDialog_Impl::SetFamilyState( USHORT nSlotId, const SfxTemplateItem* pItem )
+{
+ USHORT nIdx = nSlotId - SID_STYLE_FAMILY_START;
+ DELETEZ(pFamilyState[nIdx]);
+ if ( pItem )
+ pFamilyState[nIdx] = new SfxTemplateItem(*pItem);
+ bUpdate = TRUE;
+
+ // Wenn verwendete Vorlagen ( wie zum Teufel findet man das heraus ?? )
+ bUpdateFamily = TRUE;
+}
+
+//-------------------------------------------------------------------------
+
+// Benachrichtigung durch SfxBindings, da"s die Aktualisierung
+// beendet ist. St"o\st die Aktualisierung der Anzeige an.
+
+void SfxCommonTemplateDialog_Impl::Update_Impl()
+{
+ BOOL bDocChanged=FALSE;
+ SfxStyleSheetBasePool *pNewPool = 0;
+ SfxViewFrame *pViewFrame = pBindings->GetDispatcher_Impl()->GetFrame();
+ SfxObjectShell *pDocShell = pViewFrame->GetObjectShell();
+ if( pDocShell )
+ pNewPool = pDocShell->GetStyleSheetPool();
+
+ if ( pNewPool != pStyleSheetPool && pDocShell )
+ {
+ SfxModule* pNewModule = pDocShell->GetModule();
+ if( pNewModule && pNewModule != pModule )
+ {
+ ClearResource();
+ ReadResource();
+ }
+ if ( pStyleSheetPool )
+ {
+ EndListening(*pStyleSheetPool);
+ pStyleSheetPool = 0;
+ }
+
+ if ( pNewPool )
+ {
+ StartListening(*pNewPool);
+ pStyleSheetPool = pNewPool;
+ bDocChanged=TRUE;
+ }
+// InvalidateBindings();
+ }
+
+ if (bUpdateFamily)
+ UpdateFamily_Impl();
+
+ USHORT i;
+ for(i = 0; i < MAX_FAMILIES; ++i)
+ if(pFamilyState[i])
+ break;
+ if(i == MAX_FAMILIES || !pNewPool)
+ // nichts erlaubt
+ return;
+
+ SfxTemplateItem *pItem = 0;
+ // aktueller Bereich nicht innerhalb der erlaubten Bereiche
+ // oder Default
+ if(nActFamily == 0xffff || 0 == (pItem = pFamilyState[nActFamily-1] ) )
+ {
+ CheckItem(nActFamily, FALSE);
+ SfxTemplateItem **ppItem = pFamilyState;
+ const USHORT nFamilyCount = pStyleFamilies->Count();
+ USHORT n;
+ for(n=0;n<nFamilyCount;n++)
+ if(ppItem[StyleNrToInfoOffset(n)])break;
+ ppItem+=StyleNrToInfoOffset(n);
+
+ nAppFilter = (*ppItem)->GetValue();
+ FamilySelect( StyleNrToInfoOffset(n)+1 );
+
+ pItem = *ppItem;
+ }
+ else if( bDocChanged )
+ {
+ // andere DocShell -> alles neu
+ CheckItem( nActFamily, TRUE );
+ nActFilter = pDocShell->Get_Impl()->nStyleFilter;
+ nAppFilter = pItem->GetValue();
+ if(!pTreeBox)
+ {
+ UpdateStyles_Impl(UPDATE_FAMILY_LIST);
+ }
+ else
+ FillTreeBox();
+ }
+ else
+ {
+ // anderer Filter fuer automatisch
+ CheckItem( nActFamily, TRUE );
+ const SfxStyleFamilyItem *pStyleItem = GetFamilyItem_Impl();
+#ifdef DEBUG
+ SfxFilterTupel *pT = pStyleItem->GetFilterList().GetObject(nActFilter);
+#endif
+ if(0 == pStyleItem->GetFilterList().GetObject(nActFilter)->nFlags
+ && nAppFilter != pItem->GetValue())
+ {
+ nAppFilter = pItem->GetValue();
+ if(!pTreeBox)
+ UpdateStyles_Impl(UPDATE_FAMILY_LIST);
+ else
+ FillTreeBox();
+ }
+ else
+ nAppFilter = pItem->GetValue();
+ }
+ const String aStyle(pItem->GetStyleName());
+ SelectStyle(aStyle);
+ EnableDelete();
+ EnableNew( bCanNew );
+}
+
+//-------------------------------------------------------------------------
+
+IMPL_LINK( SfxCommonTemplateDialog_Impl, TimeOut, Timer *, pTim )
+{
+ if(!bDontUpdate)
+ {
+ bDontUpdate=TRUE;
+ if(!pTreeBox)
+ UpdateStyles_Impl(UPDATE_FAMILY_LIST);
+ else
+ {
+ FillTreeBox();
+ SfxTemplateItem *pState = pFamilyState[nActFamily-1];
+ if(pState)
+ {
+ const String aStyle(pState->GetStyleName());
+ SelectStyle(aStyle);
+ EnableDelete();
+ }
+ }
+ bDontUpdate=FALSE;
+ DELETEZ(pTimer);
+ }
+ else
+ pTimer->Start();
+ return 0;
+}
+
+
+//-------------------------------------------------------------------------
+void SfxCommonTemplateDialog_Impl::SFX_NOTIFY(SfxBroadcaster& rBC, const TypeId& rBCType,
+ const SfxHint& rHint, const TypeId& rHintType)
+{
+ // Aktualisierung anstossen
+ if(rHint.Type() == TYPE(SfxSimpleHint))
+ {
+ switch(((SfxSimpleHint&) rHint ).GetId())
+ {
+ case SFX_HINT_UPDATEDONE:
+ {
+ SfxViewFrame *pViewFrame = pBindings->GetDispatcher_Impl()->GetFrame();
+ SfxObjectShell *pDocShell = pViewFrame->GetObjectShell();
+ if( bUpdate && (
+ !IsCheckedItem(SID_STYLE_WATERCAN) || pDocShell
+ && pDocShell->GetStyleSheetPool() != pStyleSheetPool) )
+ {
+ bUpdate = FALSE;
+ Update_Impl();
+ }
+ else if ( bUpdateFamily )
+ {
+ UpdateFamily_Impl();
+ }
+
+ if( pStyleSheetPool )
+ {
+ String aStr = GetSelectedEntry();
+ if( aStr.Len() && pStyleSheetPool )
+ {
+ const SfxStyleFamilyItem *pItem = GetFamilyItem_Impl();
+ if( !pItem ) break;
+ const SfxStyleFamily eFam = pItem->GetFamily();
+ SfxStyleSheetBase *pStyle =
+ pStyleSheetPool->Find(
+ aStr, eFam, SFXSTYLEBIT_ALL );
+ if( pStyle )
+ EnableEdit(
+ !(pStyle->GetMask() & SFXSTYLEBIT_READONLY) );
+ }
+ }
+ break;
+ }
+ // noetig, wenn zwichen Dokumenten umgeschaltet wird,
+ // aber in beiden Dokumenten die gleiche Vorlage gilt.
+ // Nicht sofort Update_Impl rufen, fr den Fall da\s eines
+ // der Dokumente ein internes InPlaceObjekt ist!
+ case SFX_HINT_DOCCHANGED:
+ bUpdate = TRUE;
+ break;
+ case SFX_HINT_DYING:
+ {
+ EndListening(*pStyleSheetPool);
+ pStyleSheetPool=0;
+ break;
+ }
+ }
+ }
+
+ // Timer nicht aufsetzen, wenn der StyleSheetPool in die Kiste geht, denn
+ // es kann sein, da\s sich ein neuer erst anmeldet, nachdem der Timer
+ // abgelaufen ist - macht sich schlecht in UpdateStyles_Impl() !
+
+ ULONG nId = ((SfxSimpleHint&) rHint).GetId();
+
+ if(!bDontUpdate && nId != SFX_HINT_DYING &&
+ (rHint.Type() == TYPE(SfxStyleSheetPoolHint)||
+ rHint.Type() == TYPE(SfxStyleSheetHint) ||
+ rHint.Type() == TYPE( SfxStyleSheetHintExtended )))
+ {
+ if(!pTimer)
+ {
+ pTimer=new Timer;
+ pTimer->SetTimeout(500);
+ pTimer->SetTimeoutHdl(LINK(this,SfxCommonTemplateDialog_Impl,TimeOut));
+ }
+ pTimer->Start();
+
+ }
+}
+
+
+//-------------------------------------------------------------------------
+
+// Anderer Filter; kann durch den Benutzer umgeschaltet werden
+// oder als Folge von Neu oder Bearbeiten, wenn die aktuelle
+// Vorlage einem anderen Filter zugewiesen wurde.
+void SfxCommonTemplateDialog_Impl::FilterSelect(
+ USHORT nEntry, // Idx des neuen Filters
+ BOOL bForce ) // Aktualisierung erzwingen, auch wenn der neue Filter gleich dem aktuellen ist
+{
+ if( nEntry != nActFilter || bForce )
+ {
+ nActFilter = nEntry;
+ SfxViewFrame *pViewFrame = pBindings->GetDispatcher_Impl()->GetFrame();
+ SfxObjectShell *pDocShell = pViewFrame->GetObjectShell();
+ if (pDocShell)
+ pDocShell->Get_Impl()->nStyleFilter = nActFilter;
+
+ SfxStyleSheetBasePool *pOldStyleSheetPool = pStyleSheetPool;
+ pStyleSheetPool = pDocShell? pDocShell->GetStyleSheetPool(): 0;
+ if ( pOldStyleSheetPool != pStyleSheetPool )
+ {
+ if ( pOldStyleSheetPool )
+ EndListening(*pOldStyleSheetPool);
+ if ( pStyleSheetPool )
+ StartListening(*pOldStyleSheetPool);
+ }
+
+ UpdateStyles_Impl(UPDATE_FAMILY_LIST);
+ }
+}
+
+//-------------------------------------------------------------------------
+
+// Intern: Ausf"uhren von Funktionen "uber den Dispatcher
+BOOL SfxCommonTemplateDialog_Impl::Execute_Impl(
+ USHORT nId, const String &rStr, const String& rRefStr, USHORT nFamily,
+ USHORT nMask, USHORT *pIdx, const USHORT* pModifier)
+{
+ SfxDispatcher &rDispatcher = *SFX_APP()->GetDispatcher_Impl();
+ SfxStringItem aItem(nId, rStr);
+ SfxUInt16Item aFamily(SID_STYLE_FAMILY, nFamily);
+ SfxUInt16Item aMask( SID_STYLE_MASK, nMask );
+ SfxStringItem aUpdName(SID_STYLE_UPD_BY_EX_NAME, rStr);
+ SfxStringItem aRefName( SID_STYLE_REFERENCE, rRefStr );
+ const SfxPoolItem* pItems[ 6 ];
+ USHORT nCount = 0;
+ if( rStr.Len() )
+ pItems[ nCount++ ] = &aItem;
+ pItems[ nCount++ ] = &aFamily;
+ if( nMask )
+ pItems[ nCount++ ] = &aMask;
+ if(SID_STYLE_UPDATE_BY_EXAMPLE == nId)
+ {
+ //Sonderloesung fuer Numerierungsupdate im Writer
+ const String aTemplName(GetSelectedEntry());
+ aUpdName.SetValue(aTemplName);
+ pItems[ nCount++ ] = &aUpdName;
+ }
+ if ( rRefStr.Len() )
+ pItems[ nCount++ ] = &aRefName;
+
+ pItems[ nCount++ ] = 0;
+
+ const SfxPoolItem* pItem;
+ USHORT nModi = pModifier ? *pModifier : 0;
+ pItem = rDispatcher.Execute(
+ nId, SFX_CALLMODE_SYNCHRON | SFX_CALLMODE_RECORD | SFX_CALLMODE_MODAL,
+ pItems, nModi );
+
+ if ( !pItem )
+ return FALSE;
+
+ if ( nId == SID_STYLE_NEW || SID_STYLE_EDIT == nId )
+ {
+ SfxUInt16Item *pFilterItem = PTR_CAST(SfxUInt16Item, pItem);
+ DBG_ASSERT(pFilterItem, "SfxUINT16Item erwartet");
+ USHORT nFilterFlags = pFilterItem->GetValue() & ~SFXSTYLEBIT_USERDEF;
+ if(!nFilterFlags) // Benutzervorlage?
+ nFilterFlags = pFilterItem->GetValue();
+ const SfxStyleFamilyItem *pFamilyItem = GetFamilyItem_Impl();
+ const USHORT nCount = (USHORT) pFamilyItem->GetFilterList().Count();
+
+ for ( USHORT i = 0; i < nCount; ++i )
+ {
+ const SfxFilterTupel *pTupel =
+ pFamilyItem->GetFilterList().GetObject(i);
+
+ if ( ( pTupel->nFlags & nFilterFlags ) == nFilterFlags && pIdx )
+ *pIdx = i;
+ }
+ }
+ return TRUE;
+}
+
+//-------------------------------------------------------------------------
+
+// Handler der Listbox der Filter
+IMPL_LINK( SfxCommonTemplateDialog_Impl, FilterSelectHdl, ListBox *, pBox )
+{
+ if ( pBox->GetSelectEntry() == String(SfxResId(STR_STYLE_FILTER_HIERARCHICAL)) )
+ {
+ if ( !bHierarchical )
+ {
+ // TreeView einschalten
+ bHierarchical=TRUE;
+ const String aSelectEntry( GetSelectedEntry());
+ aFmtLb.Hide();
+ // aFilterLb.Disable();
+
+ pTreeBox = new StyleTreeListBox_Impl(
+ this, WB_HASBUTTONS | WB_HASLINES |
+ WB_BORDER | WB_TABSTOP | WB_HASLINESATROOT |
+ WB_HASBUTTONSATROOT );
+ pTreeBox->SetFont( aFmtLb.GetFont() );
+
+ pTreeBox->SetPosSizePixel(aFmtLb.GetPosPixel(), aFmtLb.GetSizePixel());
+ pTreeBox->SetNodeBitmaps(Image(SfxResId(BMP_COLLAPSED)),
+ Image(SfxResId(BMP_EXPANDED)));
+ pTreeBox->SetSelectHdl(
+ LINK(this, SfxCommonTemplateDialog_Impl, FmtSelectHdl));
+ ((StyleTreeListBox_Impl*)pTreeBox)->
+ SetDoubleClickHdl(
+ LINK(this, SfxCommonTemplateDialog_Impl, ApplyHdl));
+ ((StyleTreeListBox_Impl*)pTreeBox)->
+ SetDropHdl(LINK(this, SfxCommonTemplateDialog_Impl, DropHdl));
+ pTreeBox->SetIndent(10);
+
+ FillTreeBox();
+ SelectStyle(aSelectEntry);
+ pTreeBox->Show();
+ }
+ }
+
+ else
+ {
+ DELETEZ(pTreeBox);
+ aFmtLb.Show();
+ // aFilterLb.Enable();
+ // Falls bHierarchical, kann sich die Familie geaendert haben
+ FilterSelect(pBox->GetSelectEntryPos(), bHierarchical );
+ bHierarchical=FALSE;
+// UpdateStyles_Impl(UPDATE_FAMILY_LIST); // Anzeige aktualisieren
+ }
+
+ return 0;
+}
+
+//-------------------------------------------------------------------------
+
+// Select-Handler der Toolbox
+void SfxCommonTemplateDialog_Impl::FamilySelect(USHORT nEntry)
+{
+ USHORT nFamily = nActFamily;
+ if( nEntry != nActFamily )
+ {
+ CheckItem( nActFamily, FALSE );
+ nActFamily = nEntry;
+ SfxDispatcher* pDispat = pBindings->GetDispatcher_Impl();
+ SfxUInt16Item aItem( SID_STYLE_FAMILY, nEntry );
+ pDispat->Execute( SID_STYLE_FAMILY, SFX_CALLMODE_SYNCHRON, &aItem, 0L );
+ pBindings->Invalidate( SID_STYLE_FAMILY );
+ pBindings->Update( SID_STYLE_FAMILY );
+ UpdateFamily_Impl();
+ }
+}
+
+//-------------------------------------------------------------------------
+
+void SfxCommonTemplateDialog_Impl::ActionSelect(USHORT nEntry)
+{
+ String aEmpty;
+ switch(nEntry)
+ {
+ case SID_STYLE_WATERCAN:
+ {
+ const BOOL bState = IsCheckedItem(nEntry);
+ BOOL bCheck;
+ SfxBoolItem aBool;
+ // wenn eine Vorlage ausgewaehlt ist.
+ if(!bState && aFmtLb.GetSelectionCount())
+ {
+ const String aTemplName(
+ GetSelectedEntry());
+ Execute_Impl(
+ SID_STYLE_WATERCAN, aTemplName, aEmpty,
+ (USHORT)GetFamilyItem_Impl()->GetFamily() );
+ bCheck = TRUE;
+ }
+ else
+ {
+ Execute_Impl(SID_STYLE_WATERCAN, aEmpty, aEmpty, 0);
+ bCheck = FALSE;
+ }
+ CheckItem(nEntry, bCheck);
+ aBool.SetValue(bCheck);
+ SetWaterCanState(&aBool);
+ break;
+ }
+ case SID_STYLE_NEW_BY_EXAMPLE:
+ {
+ if(pStyleSheetPool && nActFamily != 0xffff)
+ {
+ const SfxStyleFamily eFam=GetFamilyItem_Impl()->GetFamily();
+//pStyleSheetPool->GetSearchFamily();
+ const SfxStyleFamilyItem *pItem = GetFamilyItem_Impl();
+ USHORT nFilter;
+ if(pItem&&nActFilter!=0xffff)
+ {
+ nFilter = pItem->GetFilterList().GetObject(
+ nActFilter)->nFlags;
+ if(!nFilter) // automatisch
+ nFilter = nAppFilter;
+ }
+ else
+ nFilter=pStyleSheetPool->GetSearchMask();
+ pStyleSheetPool->SetSearchMask( eFam, SFXSTYLEBIT_USERDEF );
+
+ SfxNewStyleDlg *pDlg =
+ // FloatingWindow must not be parent of a modal dialog
+ new SfxNewStyleDlg(SFX_APP()->GetTopWindow(), *pStyleSheetPool);
+ if(RET_OK == pDlg->Execute())
+ {
+ pStyleSheetPool->SetSearchMask(eFam, nFilter);
+ const String aTemplName(pDlg->GetName());
+ Execute_Impl(SID_STYLE_NEW_BY_EXAMPLE,
+ aTemplName, aEmpty,
+ (USHORT)GetFamilyItem_Impl()->GetFamily(),
+ nFilter);
+ }
+ pStyleSheetPool->SetSearchMask( eFam, nFilter );
+ delete pDlg;
+ }
+ break;
+ }
+ case SID_STYLE_UPDATE_BY_EXAMPLE:
+ {
+ Execute_Impl(SID_STYLE_UPDATE_BY_EXAMPLE,
+ aEmpty, aEmpty,
+ (USHORT)GetFamilyItem_Impl()->GetFamily());
+ break;
+ }
+ default: DBG_ERROR("not implemented"); break;
+ }
+}
+
+
+//-------------------------------------------------------------------------
+
+IMPL_LINK( SfxCommonTemplateDialog_Impl, DropHdl, StyleTreeListBox_Impl *, pBox )
+{
+ bDontUpdate=TRUE;
+ const SfxStyleFamilyItem *pItem = GetFamilyItem_Impl();
+ const SfxStyleFamily eFam = pItem->GetFamily();
+ long ret= pStyleSheetPool->SetParent(eFam,pBox->GetStyle(), pBox->GetParent())? 1L: 0L;
+ bDontUpdate=FALSE;
+ return ret;
+}
+
+//-------------------------------------------------------------------------
+
+// Handler des Neu-Buttons
+void SfxCommonTemplateDialog_Impl::NewHdl(void *)
+{
+ String aEmpty;
+ if ( nActFamily != 0xffff )
+ {
+ Window* pTmp;
+ pTmp = Application::GetDefDialogParent();
+ if ( ISA(SfxTemplateDialog_Impl) )
+ Application::SetDefDialogParent( pWindow->GetParent() );
+ else
+ Application::SetDefDialogParent( pWindow );
+
+ const SfxStyleFamilyItem *pItem = GetFamilyItem_Impl();
+ const SfxStyleFamily eFam=pItem->GetFamily();
+ USHORT nMask;
+ if(pItem&&nActFilter!=0xffff)
+ {
+ nMask = pItem->GetFilterList().GetObject(
+ nActFilter)->nFlags;
+ if(!nMask) // automatisch
+ nMask = nAppFilter;
+ }
+ else
+ nMask=pStyleSheetPool->GetSearchMask();
+
+ pStyleSheetPool->SetSearchMask(eFam,nMask);
+
+ Execute_Impl(SID_STYLE_NEW,
+ aEmpty, GetSelectedEntry(),
+ ( USHORT )GetFamilyItem_Impl()->GetFamily(),
+ nMask);
+
+ Application::SetDefDialogParent( pTmp );
+
+/* {
+ DBG_ASSERT(nFilter < aFilterLb.GetEntryCount(),
+ "Filter ueberindiziert");
+
+ if(!pTreeBox)
+ {
+// aFilterLb.SelectEntryPos(nFilter);
+ FilterSelect(nActFilter, TRUE);
+ }
+ else
+ {
+ FillTreeBox();
+ SfxTemplateItem *pState = pFamilyState[nActFamily-1];
+ if(pState)
+ {
+ const String aStyle(pState->GetStyleName());
+ SelectStyle(aStyle);
+ }
+ EnableDelete();
+ }*/
+// }
+ }
+}
+
+//-------------------------------------------------------------------------
+
+// Handler des Bearbeiten-Buttons
+void SfxCommonTemplateDialog_Impl::EditHdl(void *)
+{
+ if(IsInitialized() && HasSelectedStyle())
+ {
+ USHORT nFilter = nActFilter;
+ String aTemplName(GetSelectedEntry());
+ const SfxStyleFamilyItem *pItem = GetFamilyItem_Impl();
+ const SfxStyleFamily eFam = pItem->GetFamily();
+ SfxStyleSheetBase *pStyle =
+ pStyleSheetPool->Find(aTemplName,eFam,SFXSTYLEBIT_ALL);
+ Window* pTmp;
+ //DefModalDialogParent setzen fuer
+ //Modalitaet der nachfolgenden Dialoge
+ pTmp = Application::GetDefDialogParent();
+ if ( ISA(SfxTemplateDialog_Impl) )
+ Application::SetDefDialogParent( pWindow->GetParent() );
+ else
+ Application::SetDefDialogParent( pWindow );
+ if ( Execute_Impl( SID_STYLE_EDIT, aTemplName, String(),
+ (USHORT)GetFamilyItem_Impl()->GetFamily(), 0, &nFilter ) )
+ {
+// DBG_ASSERT(nFilter < aFilterLb.GetEntryCount(), "Filter ueberindiziert");
+// aTemplName = pStyle->GetName();
+// kann durch Bearbeiten umbenannt worden sein
+/* if(!pTreeBox)
+ {
+ // aFilterLb.SelectEntryPos(nFilter);
+ // FilterSelect(nFilter, TRUE);
+ }
+ else
+ FillTreeBox();*/
+ }
+ Application::SetDefDialogParent( pTmp );
+ }
+}
+
+//-------------------------------------------------------------------------
+
+// Handler des L"oschen-Buttons
+void SfxCommonTemplateDialog_Impl::DeleteHdl(void *)
+{
+ if ( IsInitialized() && HasSelectedStyle() )
+ {
+ const String aTemplName( GetSelectedEntry() );
+ const SfxStyleFamilyItem* pItem = GetFamilyItem_Impl();
+ SfxStyleSheetBase* pStyle =
+ pStyleSheetPool->Find( aTemplName, pItem->GetFamily(), SFXSTYLEBIT_ALL );
+ if ( pStyle )
+ {
+ String aMsg;
+ if ( pStyle->IsUsed() )
+ aMsg = String( SfxResId( STR_DELETE_STYLE_USED ) );
+ aMsg += String ( SfxResId( STR_DELETE_STYLE ) );
+ aMsg.SearchAndReplaceAscii( "$1", aTemplName );
+#if defined UNX
+ QueryBox aBox( SFX_APP()->GetTopWindow(), WB_YES_NO | WB_DEF_NO, aMsg );
+#else
+ QueryBox aBox( GetWindow(), WB_YES_NO | WB_DEF_NO , aMsg );
+#endif
+ if ( RET_YES == aBox.Execute() )
+ {
+ if ( pTreeBox ) // Damit die Treelistbox beim L"oschen nicht zuklappt
+ {
+ bDontUpdate = TRUE;
+ }
+ Execute_Impl( SID_STYLE_DELETE, aTemplName,
+ String(), (USHORT)GetFamilyItem_Impl()->GetFamily() );
+
+ if ( pTreeBox )
+ {
+ pTreeBox->RemoveParentKeepChilds( pTreeBox->FirstSelected() );
+ bDontUpdate = FALSE;
+ }
+ }
+ }
+ }
+}
+
+//-------------------------------------------------------------------------
+
+void SfxCommonTemplateDialog_Impl::EnableDelete()
+{
+ if(IsInitialized() && HasSelectedStyle())
+ {
+ DBG_ASSERT(pStyleSheetPool, "Kein StyleSheetPool");
+ const String aTemplName(GetSelectedEntry());
+ const SfxStyleFamilyItem *pItem = GetFamilyItem_Impl();
+ const SfxStyleFamily eFam = pItem->GetFamily();
+ USHORT nFilter = pItem->GetFilterList().GetObject(nActFilter)->nFlags;
+ if(!nFilter) // automatisch
+ nFilter = nAppFilter;
+ const SfxStyleSheetBase *pStyle =
+ pStyleSheetPool->Find(aTemplName,eFam,
+ pTreeBox? SFXSTYLEBIT_ALL: nFilter);
+ DBG_ASSERT(pStyle, "Style nicht gefunden");
+ if(pStyle && pStyle->IsUserDefined())
+ {
+ EnableDel(TRUE);
+ }
+ else
+ {
+ EnableDel(FALSE);
+ }
+ }
+ else
+ {
+ EnableDel(FALSE);
+ }
+// rBindings.Invalidate( SID_STYLE_DELETE );
+// rBindings.Update( SID_STYLE_DELETE );
+}
+
+//-------------------------------------------------------------------------
+
+// nach Selektion eines Eintrags den Focus gfs. wieder auf das App-Fenster
+// setzen
+void SfxCommonTemplateDialog_Impl::ResetFocus()
+{
+ if(ISA(SfxTemplateDialog_Impl))
+ {
+ SfxViewFrame *pViewFrame = pBindings->GetDispatcher_Impl()->GetFrame();
+ SfxViewShell *pVu = pViewFrame->GetViewShell();
+ Window *pAppWin = pVu ? pVu->GetWindow(): 0;
+ if(pAppWin)
+ pAppWin->GrabFocus();
+ }
+}
+
+//-------------------------------------------------------------------------
+
+// Doppelclick auf ein StyleSheet in der ListBox, wird angewendet.
+IMPL_LINK( SfxCommonTemplateDialog_Impl, ApplyHdl, Control *, pControl )
+{
+ // nur, wenn dieser Bereich erlaubt ist
+ if ( IsInitialized() && 0 != pFamilyState[nActFamily-1] &&
+ GetSelectedEntry().Len() )
+ {
+ USHORT nModifier = aFmtLb.GetModifier();
+ Execute_Impl(SID_STYLE_APPLY,
+ GetSelectedEntry(), String(),
+ ( USHORT )GetFamilyItem_Impl()->GetFamily(),
+ 0, 0, &nModifier );
+ if(ISA(SfxTemplateCatalog_Impl))
+ ((SfxTemplateCatalog_Impl*) this)->pReal->EndDialog(RET_OK);
+ }
+// ResetFocus();
+ return 0;
+}
+
+//-------------------------------------------------------------------------
+
+// Selektion einer Vorlage w"ahrend des Watercan-Status
+IMPL_LINK( SfxCommonTemplateDialog_Impl, FmtSelectHdl, SvTreeListBox *, pListBox )
+{
+ // HilfePI antriggern, wenn von Call als Handler und Bereich erlaubt ist
+ if( !pListBox || pListBox->IsSelected( pListBox->GetHdlEntry() ) )
+ {
+#ifdef WIR_KOENNEN_WIEDER_HILFE_FUER_STYLESHEETS
+ SfxHelpPI* pHelpPI = SFX_APP()->GetHelpPI();
+ if ( pHelpPI && pListBox && IsInitialized() &&
+ GetSelectedEntry().Len() )
+ {
+ const SfxStyleFamilyItem *pItem = GetFamilyItem_Impl();
+ const SfxStyleFamily eFam = pItem->GetFamily();
+ DBG_ASSERT(pStyleSheetPool, "Kein Pool");
+ // SfxStyleSheetBase* pStyle = pStyleSheetPool
+ // ? pStyleSheetPool->Find( GetSelectedEntry(), eFam ) : 0;
+ SfxStyleSheetBase *pStyle;
+ if ( pStyleSheetPool )
+ pStyle = pStyleSheetPool->Find ( GetSelectedEntry(), eFam );
+ else
+ pStyle = 0;
+
+ if ( pStyle )
+ {
+ String aHelpFile;
+ ULONG nHelpId=pStyle->GetHelpId(aHelpFile);
+ if ( nHelpId )
+ pHelpPI->LoadTopic( nHelpId );
+ }
+ }
+#endif
+
+ // nur, wenn Giesskanne an ist
+ if ( IsInitialized() &&
+ IsCheckedItem(SID_STYLE_WATERCAN) &&
+ // nur, wenn dieser Bereich erlaubt ist
+ 0 != pFamilyState[nActFamily-1] )
+ {
+ String aEmpty;
+ Execute_Impl(SID_STYLE_WATERCAN,
+ aEmpty, aEmpty, 0);
+ Execute_Impl(SID_STYLE_WATERCAN,
+ GetSelectedEntry(), aEmpty,
+ ( USHORT )GetFamilyItem_Impl()->GetFamily());
+ }
+// EnableEdit(TRUE);
+ EnableItem(SID_STYLE_WATERCAN, !bWaterDisabled);
+ EnableDelete();
+ }
+ if( pListBox )
+ SelectStyle( pListBox->GetEntryText( pListBox->GetHdlEntry() ));
+
+ return 0;
+}
+
+//-------------------------------------------------------------------------
+
+IMPL_LINK( SfxCommonTemplateDialog_Impl, MenuSelectHdl, Menu *, pMenu )
+{
+ if( pMenu )
+ {
+ nLastItemId = pMenu->GetCurItemId();
+ Application::PostUserEvent(
+ LINK( this, SfxCommonTemplateDialog_Impl, MenuSelectHdl ), 0 );
+ return TRUE;
+ }
+
+ switch(nLastItemId) {
+ case ID_NEW: NewHdl(0); break;
+ case ID_EDIT: EditHdl(0); break;
+ case ID_DELETE: DeleteHdl(0); break;
+ default: return FALSE;
+ }
+ return TRUE;
+}
+
+// -----------------------------------------------------------------------
+
+void SfxCommonTemplateDialog_Impl::ExecuteContextMenu_Impl( const Point& rPos, Window* pWin )
+{
+ if ( bBindingUpdate )
+ {
+ pBindings->Invalidate( SID_STYLE_NEW, TRUE, FALSE );
+ pBindings->Update( SID_STYLE_NEW );
+ bBindingUpdate = FALSE;
+ }
+ PopupMenu* pMenu = new PopupMenu( SfxResId( MN_CONTEXT_TEMPLDLG ) );
+ pMenu->SetSelectHdl( LINK( this, SfxCommonTemplateDialog_Impl, MenuSelectHdl ) );
+ pMenu->EnableItem( ID_EDIT, bCanEdit );
+ pMenu->EnableItem( ID_DELETE, bCanDel );
+ pMenu->EnableItem( ID_NEW, bCanNew );
+ pMenu->Execute( pWin, rPos );
+ delete pMenu;
+}
+
+// -----------------------------------------------------------------------
+
+SfxStyleFamily SfxCommonTemplateDialog_Impl::GetActualFamily() const
+{
+ const SfxStyleFamilyItem *pFamilyItem = GetFamilyItem_Impl();
+ if( !pFamilyItem || nActFamily == 0xffff )
+ return SFX_STYLE_FAMILY_PARA;
+ else
+ return pFamilyItem->GetFamily();
+}
+
+// -----------------------------------------------------------------------
+
+void SfxCommonTemplateDialog_Impl::EnableExample_Impl(USHORT nId, BOOL bEnable)
+{
+ if( nId == SID_STYLE_NEW_BY_EXAMPLE )
+ bNewByExampleDisabled = !bEnable;
+ else if( nId == SID_STYLE_UPDATE_BY_EXAMPLE )
+ bUpdateByExampleDisabled = !bEnable;
+ EnableItem(nId, bEnable);
+}
+
+// ------------------------------------------------------------------------
+
+SfxTemplateDialog_Impl::SfxTemplateDialog_Impl(
+ Window* pParent, SfxBindings* pB, SfxTemplateDialog* pWindow ) :
+
+ SfxCommonTemplateDialog_Impl( pB, pWindow ),
+
+ aActionTbL ( pWindow ),
+ pFloat ( pWindow ),
+ aActionTbR ( pWindow, ResId( TB_ACTION ) ),
+ bZoomIn ( FALSE )
+
+{
+
+ pWindow->FreeResource();
+ Initialize();
+
+ aActionTbL.SetSelectHdl(LINK(this, SfxTemplateDialog_Impl, ToolBoxLSelect));
+ aActionTbR.SetSelectHdl(LINK(this, SfxTemplateDialog_Impl, ToolBoxRSelect));
+ aActionTbL.Show();
+ aActionTbR.Show();
+ Font aFont=aFilterLb.GetFont();
+ aFont.SetWeight( WEIGHT_NORMAL );
+ aFilterLb.SetFont( aFont );
+ aActionTbL.SetHelpId( HID_TEMPLDLG_TOOLBOX_LEFT );
+
+ SFX_IMAGEMANAGER()->RegisterToolBox( &aActionTbL, SFX_TOOLBOX_CHANGEOUTSTYLE );
+ SFX_IMAGEMANAGER()->RegisterToolBox( &aActionTbR, SFX_TOOLBOX_CHANGEOUTSTYLE );
+}
+
+// ------------------------------------------------------------------------
+
+void SfxTemplateDialog_Impl::EnableFamilyItem( USHORT nId, BOOL bEnable )
+{
+ aActionTbL.EnableItem( nId, bEnable );
+}
+
+//-------------------------------------------------------------------------
+
+void SfxTemplateDialog_Impl::InsertFamilyItem(USHORT nId,const SfxStyleFamilyItem *pItem)
+{
+ USHORT nHelpId = 0;
+ switch( (USHORT) pItem->GetFamily() )
+ {
+ case SFX_STYLE_FAMILY_CHAR: nHelpId = SID_STYLE_FAMILY1; break;
+ case SFX_STYLE_FAMILY_PARA: nHelpId = SID_STYLE_FAMILY2; break;
+ case SFX_STYLE_FAMILY_FRAME:nHelpId = SID_STYLE_FAMILY3; break;
+ case SFX_STYLE_FAMILY_PAGE: nHelpId = SID_STYLE_FAMILY4; break;
+ case SFX_STYLE_FAMILY_PSEUDO: nHelpId = SID_STYLE_FAMILY5; break;
+ default: DBG_ERROR("unbekannte StyleFamily"); break;
+ }
+ aActionTbL.InsertItem( nId, pItem->GetImage(), pItem->GetText(), 0, 0);
+ aActionTbL.SetHelpId( nId, nHelpId );
+}
+
+// ------------------------------------------------------------------------
+
+void SfxTemplateDialog_Impl::ClearFamilyList()
+{
+ aActionTbL.Clear();
+}
+
+//-------------------------------------------------------------------------
+
+void SfxCommonTemplateDialog_Impl::InvalidateBindings()
+{
+ pBindings->Invalidate(SID_STYLE_NEW_BY_EXAMPLE, TRUE, FALSE);
+ pBindings->Update( SID_STYLE_NEW_BY_EXAMPLE );
+ pBindings->Invalidate(SID_STYLE_UPDATE_BY_EXAMPLE, TRUE, FALSE);
+ pBindings->Update( SID_STYLE_UPDATE_BY_EXAMPLE );
+ pBindings->Invalidate( SID_STYLE_WATERCAN, TRUE, FALSE);
+ pBindings->Update( SID_STYLE_WATERCAN );
+ pBindings->Invalidate( SID_STYLE_NEW, TRUE, FALSE );
+ pBindings->Update( SID_STYLE_NEW );
+ pBindings->Invalidate( SID_STYLE_DRAGHIERARCHIE, TRUE, FALSE );
+ pBindings->Update( SID_STYLE_DRAGHIERARCHIE );
+}
+
+//-------------------------------------------------------------------------
+
+SfxTemplateDialog_Impl::~SfxTemplateDialog_Impl()
+{
+ SFX_IMAGEMANAGER()->ReleaseToolBox( &aActionTbL );
+ SFX_IMAGEMANAGER()->ReleaseToolBox( &aActionTbR );
+}
+
+//-------------------------------------------------------------------------
+
+// "Uberladener Resize-Handler ( StarView )
+// Die Groesse der Listboxen wird angepasst
+void SfxTemplateDialog_Impl::Resize()
+{
+ FloatingWindow *pF = pFloat->GetFloatingWindow();
+ if ( pF )
+ {
+// if(pF->IsZoomedIn() && bZoomIn==FALSE)
+// pF->SetText(String(SfxResId( DLG_STYLE_DESIGNER )));
+// if(!pF->IsZoomedIn() && bZoomIn==TRUE && GetFamilyItem_Impl())
+// UpdateStyles_Impl(UPDATE_FAMILY); //Bereich wieder in Titel schreiben
+ bZoomIn = pF->IsRollUp();
+ if ( bZoomIn )
+ return;
+ }
+
+ Size aDlgSize=pFloat->PixelToLogic(pFloat->GetOutputSizePixel());
+ Size aSizeATL=pFloat->PixelToLogic(aActionTbL.CalcWindowSizePixel());
+ Size aSizeATR=pFloat->PixelToLogic(aActionTbR.CalcWindowSizePixel());
+ Size aMinSize = GetMinOutputSizePixel();
+
+ long nListHeight = pFloat->PixelToLogic( aFilterLb.GetSizePixel() ).Height();
+ long nWidth = aDlgSize.Width()- 2 * SFX_TEMPLDLG_HFRAME;
+
+ aActionTbL.SetPosSizePixel(pFloat->LogicToPixel(Point(SFX_TEMPLDLG_HFRAME,SFX_TEMPLDLG_VTOPFRAME)),
+ pFloat->LogicToPixel(aSizeATL));
+
+ // Die Position der rechten Toolbox nur ver"andern, wenn das Fenster
+ // breit genug ist
+ Point aPosATR(aDlgSize.Width()-SFX_TEMPLDLG_HFRAME-aSizeATR.Width(),SFX_TEMPLDLG_VTOPFRAME);
+ if(aDlgSize.Width() >= aMinSize.Width())
+ aActionTbR.SetPosPixel(pFloat->LogicToPixel(aPosATR));
+ else
+ aActionTbR.SetPosPixel( pFloat->LogicToPixel(
+ Point( SFX_TEMPLDLG_HFRAME + aSizeATL.Width() + SFX_TEMPLDLG_MIDHSPACE,
+ SFX_TEMPLDLG_VTOPFRAME ) ) );
+
+ aActionTbR.SetSizePixel(pFloat->LogicToPixel(aSizeATR));
+
+ Point aFilterPos(
+ pFloat->LogicToPixel(Point(SFX_TEMPLDLG_HFRAME,
+ aDlgSize.Height()-SFX_TEMPLDLG_VBOTFRAME-nListHeight)) );
+
+ Size aFilterSize(
+ pFloat->LogicToPixel(Size(nWidth,SFX_TEMPLDLG_FILTERHEIGHT)) );
+
+ Point aFmtPos(
+ pFloat->LogicToPixel(Point(SFX_TEMPLDLG_HFRAME, SFX_TEMPLDLG_VTOPFRAME +
+ SFX_TEMPLDLG_MIDVSPACE+aSizeATL.Height())) );
+ Size aFmtSize(
+ pFloat->LogicToPixel(Size(nWidth,
+ aDlgSize.Height() - SFX_TEMPLDLG_VBOTFRAME -
+ SFX_TEMPLDLG_VTOPFRAME - 2*SFX_TEMPLDLG_MIDVSPACE-
+ nListHeight-aSizeATL.Height())) );
+
+ // Die Position der Listboxen nur ver"andern, wenn das Fenster
+ // hoch genug ist
+ if(aDlgSize.Height() >= aMinSize.Height())
+ {
+ aFilterLb.SetPosPixel(aFilterPos);
+ aFmtLb.SetPosPixel( aFmtPos );
+ if(pTreeBox)
+ pTreeBox->SetPosPixel(aFmtPos);
+ }
+ else
+ aFmtSize.Height() += aFilterSize.Height();
+
+ aFilterLb.SetSizePixel(aFilterSize);
+ aFmtLb.SetSizePixel( aFmtSize );
+ if(pTreeBox)
+ pTreeBox->SetSizePixel(aFmtSize);
+}
+
+// -----------------------------------------------------------------------
+
+
+Size SfxTemplateDialog_Impl::GetMinOutputSizePixel()
+{
+ Size aSizeATL=pFloat->PixelToLogic(aActionTbL.CalcWindowSizePixel());
+ Size aSizeATR=pFloat->PixelToLogic(aActionTbR.CalcWindowSizePixel());
+ Size aMinSize=Size(
+ aSizeATL.Width()+aSizeATR.Width()+
+ 2*SFX_TEMPLDLG_HFRAME + SFX_TEMPLDLG_MIDHSPACE,
+ 4*aSizeATL.Height()+2*SFX_TEMPLDLG_MIDVSPACE);
+ return aMinSize;
+}
+
+//-------------------------------------------------------------------------
+
+void SfxTemplateDialog_Impl::Command( const CommandEvent& rCEvt )
+{
+ if(COMMAND_CONTEXTMENU == rCEvt.GetCommand())
+ ExecuteContextMenu_Impl( rCEvt.GetMousePosPixel(), pFloat );
+// ExecuteContextMenu_Impl(pFloat->OutputToScreenPixel(rCEvt.GetMousePosPixel()));
+ else
+ pFloat->Command(rCEvt);
+}
+
+//-------------------------------------------------------------------------
+
+void SfxTemplateDialog_Impl::EnableItem(USHORT nMesId, BOOL bCheck)
+{
+ String aEmpty;
+ switch(nMesId)
+ {
+ case SID_STYLE_WATERCAN :
+ if(!bCheck && IsCheckedItem(SID_STYLE_WATERCAN))
+ Execute_Impl(SID_STYLE_WATERCAN, aEmpty, aEmpty, 0);
+ case SID_STYLE_NEW_BY_EXAMPLE:
+ case SID_STYLE_UPDATE_BY_EXAMPLE:
+ aActionTbR.EnableItem(nMesId,bCheck);
+ break;
+ }
+}
+
+//-------------------------------------------------------------------------
+
+void SfxTemplateDialog_Impl::CheckItem(USHORT nMesId, BOOL bCheck)
+{
+ switch(nMesId)
+ {
+ case SID_STYLE_WATERCAN :
+ bIsWater=bCheck;
+ aActionTbR.CheckItem(SID_STYLE_WATERCAN,bCheck);
+ break;
+ default:
+ aActionTbL.CheckItem(nMesId,bCheck); break;
+ }
+}
+
+//-------------------------------------------------------------------------
+
+BOOL SfxTemplateDialog_Impl::IsCheckedItem(USHORT nMesId)
+{
+ switch(nMesId)
+ {
+ case SID_STYLE_WATERCAN :
+ return aActionTbR.GetItemState(SID_STYLE_WATERCAN)==STATE_CHECK;
+ default:
+ return aActionTbL.GetItemState(nMesId)==STATE_CHECK;
+ }
+}
+
+//-------------------------------------------------------------------------
+
+IMPL_LINK_INLINE_START( SfxTemplateDialog_Impl, ToolBoxLSelect, ToolBox *, pBox )
+{
+ const USHORT nEntry = pBox->GetCurItemId();
+ FamilySelect(nEntry);
+ return 0;
+}
+IMPL_LINK_INLINE_END( SfxTemplateDialog_Impl, ToolBoxLSelect, ToolBox *, pBox )
+
+//-------------------------------------------------------------------------
+
+IMPL_LINK_INLINE_START( SfxTemplateDialog_Impl, ToolBoxRSelect, ToolBox *, pBox )
+{
+ const USHORT nEntry = pBox->GetCurItemId();
+ ActionSelect(nEntry);
+ return 0;
+}
+IMPL_LINK_INLINE_END( SfxTemplateDialog_Impl, ToolBoxRSelect, ToolBox *, pBox )
+
+//-------------------------------------------------------------------------
+
+SfxTemplateCatalog_Impl::SfxTemplateCatalog_Impl( Window* pParent, SfxBindings* pB,
+ SfxTemplateCatalog* pWindow ) :
+
+ SfxCommonTemplateDialog_Impl( pB, pWindow ),
+
+ aOkBtn ( pWindow, SfxResId( BT_OK ) ),
+ aCancelBtn ( pWindow, SfxResId( BT_CANCEL ) ),
+ aNewBtn ( pWindow, SfxResId( BT_NEW ) ),
+ aChangeBtn ( pWindow, SfxResId( BT_EDIT ) ),
+ aDelBtn ( pWindow, SfxResId( BT_DEL ) ),
+ aHelpBtn ( pWindow, SfxResId( BT_HELP ) ),
+ aOrgBtn ( pWindow, SfxResId( BT_ORG ) ),
+ aFamList ( pWindow, SfxResId( BT_TOOL ) ),
+ pReal ( pWindow ),
+ aHelper ( pWindow )
+
+{
+ aNewBtn.Disable();
+ aDelBtn.Disable();
+ aChangeBtn.Disable();
+
+ SFX_APP()->Get_Impl()->pTemplateCommon = GetISfxTemplateCommon();
+ pWindow->FreeResource();
+
+ Initialize();
+
+ aFamList.SetSelectHdl( LINK( this, SfxTemplateCatalog_Impl, FamListSelect ) );
+ aOkBtn.SetClickHdl( LINK( this, SfxTemplateCatalog_Impl, OkHdl ) );
+ aCancelBtn.SetClickHdl( LINK( this, SfxTemplateCatalog_Impl, CancelHdl ) );
+ aNewBtn.SetClickHdl( LINK( this, SfxTemplateCatalog_Impl, NewHdl ) );
+ aDelBtn.SetClickHdl( LINK( this, SfxTemplateCatalog_Impl, DelHdl ) );
+ aChangeBtn.SetClickHdl( LINK( this, SfxTemplateCatalog_Impl, ChangeHdl ) );
+ aOrgBtn.SetClickHdl( LINK( this, SfxTemplateCatalog_Impl, OrgHdl ) );
+}
+
+//-------------------------------------------------------------------------
+
+SfxTemplateCatalog_Impl::~SfxTemplateCatalog_Impl()
+{
+ SFX_APP()->Get_Impl()->pTemplateCommon = 0;
+}
+
+//-------------------------------------------------------------------------
+
+IMPL_LINK_INLINE_START( SfxTemplateCatalog_Impl, OkHdl, Button *, pButton )
+{
+ ApplyHdl( NULL );
+ pReal->EndDialog( RET_OK );
+ return 0;
+}
+IMPL_LINK_INLINE_END( SfxTemplateCatalog_Impl, OkHdl, Button *, pButton )
+
+//-------------------------------------------------------------------------
+
+IMPL_LINK_INLINE_START( SfxTemplateCatalog_Impl, CancelHdl, Button *, pButton )
+{
+ pReal->EndDialog( RET_CANCEL );
+ return 0;
+}
+IMPL_LINK_INLINE_END( SfxTemplateCatalog_Impl, CancelHdl, Button *, pButton )
+
+//-------------------------------------------------------------------------
+
+IMPL_LINK_INLINE_START( SfxTemplateCatalog_Impl, NewHdl, Button *, pButton )
+{
+ aCancelBtn.SetText( String( SfxResId( STR_CLOSE ) ) );
+ SfxCommonTemplateDialog_Impl::NewHdl( NULL );
+ return 0;
+}
+IMPL_LINK_INLINE_END( SfxTemplateCatalog_Impl, NewHdl, Button *, pButton )
+
+//-------------------------------------------------------------------------
+
+IMPL_LINK_INLINE_START( SfxTemplateCatalog_Impl, ChangeHdl, Button *, pButton )
+{
+ aCancelBtn.SetText( String( SfxResId( STR_CLOSE ) ) );
+ SfxCommonTemplateDialog_Impl::EditHdl( NULL );
+ return 0;
+}
+IMPL_LINK_INLINE_END( SfxTemplateCatalog_Impl, ChangeHdl, Button *, pButton )
+
+//-------------------------------------------------------------------------
+
+IMPL_LINK_INLINE_START( SfxTemplateCatalog_Impl, DelHdl, Button *, pButton )
+{
+ aDelBtn.Disable();
+ aCancelBtn.SetText( String( SfxResId( STR_CLOSE ) ) );
+ SfxCommonTemplateDialog_Impl::DeleteHdl( NULL );
+ return 0;
+}
+IMPL_LINK_INLINE_END( SfxTemplateCatalog_Impl, DelHdl, Button *, pButton )
+
+//-------------------------------------------------------------------------
+
+IMPL_LINK( SfxTemplateCatalog_Impl, OrgHdl, Button *, pButton )
+{
+ aCancelBtn.SetText( String( SfxResId( STR_CLOSE ) ) );
+ SfxDocumentTemplates aTemplates;
+ aTemplates.Construct();
+ SfxTemplateOrganizeDlg* pDlg = new SfxTemplateOrganizeDlg( pReal, &aTemplates );
+ const short nRet = pDlg->Execute();
+ delete pDlg;
+ if ( RET_OK == nRet )
+ Update_Impl();
+ else if ( RET_EDIT_STYLE == nRet )
+ pReal->EndDialog( RET_CANCEL );
+ return 0;
+}
+
+//-------------------------------------------------------------------------
+
+void SfxTemplateCatalog_Impl::EnableEdit( BOOL bEnable )
+{
+ SfxCommonTemplateDialog_Impl::EnableEdit( bEnable );
+ aChangeBtn.Enable( bEnable );
+}
+
+//-------------------------------------------------------------------------
+
+void SfxTemplateCatalog_Impl::EnableDel( BOOL bEnable )
+{
+ SfxCommonTemplateDialog_Impl::EnableDel( bEnable );
+ aDelBtn.Enable( bEnable );
+}
+
+void SfxTemplateCatalog_Impl::EnableNew(BOOL bEnable)
+{
+ SfxCommonTemplateDialog_Impl::EnableNew( bEnable );
+ aNewBtn.Enable( bEnable );
+}
+
+//-------------------------------------------------------------------------
+
+IMPL_LINK_INLINE_START( SfxTemplateCatalog_Impl, FamListSelect, ListBox *, pList )
+{
+ const USHORT nEntry = aFamIds[pList->GetSelectEntryPos()];
+ FamilySelect(nEntry);
+ return 0;
+}
+IMPL_LINK_INLINE_END( SfxTemplateCatalog_Impl, FamListSelect, ListBox *, pList )
+
+//-------------------------------------------------------------------------
+
+void SfxTemplateCatalog_Impl::EnableItem( USHORT nMesId, BOOL bCheck )
+{
+ if ( nMesId == SID_STYLE_WATERCAN )
+ aOkBtn.Enable( bCheck );
+ if ( nMesId > SFX_STYLE_FAMILY_PSEUDO || nMesId < SFX_STYLE_FAMILY_CHAR )
+ return;
+
+/* for(USHORT i=0;i<aFamIds.Count&&aFamIds[i]!=nMesId;i++);
+ if(i!=aFamIds.Count())
+ aFamList.SelectEntry(aFamIds[i]);
+ else
+ DBG_ERROR("Entry nicht gefunden");*/
+
+}
+
+//-------------------------------------------------------------------------
+
+void SfxTemplateCatalog_Impl::CheckItem(USHORT nMesId, BOOL bCheck)
+{
+ if ( nMesId > SFX_STYLE_FAMILY_PSEUDO || nMesId < SFX_STYLE_FAMILY_CHAR )
+ return;
+ USHORT i;
+ for ( i = 0; i < aFamIds.Count() && aFamIds[i] != nMesId; i++ );
+ aFamList.SelectEntryPos(i);
+}
+
+//-------------------------------------------------------------------------
+
+BOOL SfxTemplateCatalog_Impl::IsCheckedItem(USHORT nMesId)
+{
+ if ( nMesId > SFX_STYLE_FAMILY_PSEUDO || nMesId < SFX_STYLE_FAMILY_CHAR )
+ return FALSE;
+ USHORT i;
+ for ( i = 0; i < aFamIds.Count() && aFamIds[i] != nMesId; i++ )
+ ;
+ return aFamList.IsEntrySelected( String::CreateFromInt32(i) );
+}
+
+//-------------------------------------------------------------------------
+
+// Der Katalog muss nur das Disablen beherrschen, da waehrend seiner
+// Lebenszeit keine Selektionsaenderungen vorgenommen werden koennen
+void SfxTemplateCatalog_Impl::EnableFamilyItem( USHORT nId, BOOL bEnable )
+{
+ if ( !bEnable )
+ for ( USHORT nPos = aFamIds.Count(); nPos--; )
+ if ( aFamIds[ nPos ] == nId )
+ {
+ aFamIds.Remove( nPos );
+ aFamList.RemoveEntry( nPos );
+ }
+}
+
+void SfxTemplateCatalog_Impl::InsertFamilyItem( USHORT nId, const SfxStyleFamilyItem* pItem )
+{
+ if ( nId > SFX_STYLE_FAMILY_PSEUDO || nId < SFX_STYLE_FAMILY_CHAR )
+ return;
+ aFamList.InsertEntry( pItem->GetText(), 0 );
+ aFamIds.Insert( nId, 0 );
+}
+
+void SfxTemplateCatalog_Impl::ClearFamilyList()
+{
+ aFamList.Clear();
+ aFamIds.Remove( 0, aFamIds.Count() );
+}
+
+void SfxCommonTemplateDialog_Impl::SetFamily( USHORT nId )
+{
+ if ( nId != nActFamily )
+ {
+ if ( nActFamily != 0xFFFF )
+ CheckItem( nActFamily, FALSE );
+ nActFamily = nId;
+ if ( nId != 0xFFFF )
+ bUpdateFamily = TRUE;
+ }
+}
+
+void SfxCommonTemplateDialog_Impl::UpdateFamily_Impl()
+{
+ bUpdateFamily = FALSE;
+
+ SfxDispatcher* pDispat = pBindings->GetDispatcher_Impl();
+ SfxViewFrame *pViewFrame = pDispat->GetFrame();
+ SfxObjectShell *pDocShell = pViewFrame->GetObjectShell();
+
+ SfxStyleSheetBasePool *pOldStyleSheetPool = pStyleSheetPool;
+ pStyleSheetPool = pDocShell? pDocShell->GetStyleSheetPool(): 0;
+ if ( pOldStyleSheetPool != pStyleSheetPool )
+ {
+ if ( pOldStyleSheetPool )
+ EndListening(*pOldStyleSheetPool);
+ if ( pStyleSheetPool )
+ StartListening(*pOldStyleSheetPool);
+ }
+
+ bWaterDisabled = FALSE;
+ bCanNew = TRUE;
+ bTreeDrag = TRUE;
+ bUpdateByExampleDisabled = FALSE;
+
+ if ( pStyleSheetPool )
+ {
+ if(!pTreeBox)
+ UpdateStyles_Impl(UPDATE_FAMILY | UPDATE_FAMILY_LIST);
+ else
+ {
+ UpdateStyles_Impl(UPDATE_FAMILY);
+ FillTreeBox();
+ }
+ }
+
+ InvalidateBindings();
+
+ if ( IsCheckedItem( SID_STYLE_WATERCAN ) &&
+ // nur, wenn dieser Bereich erlaubt ist
+ 0 != pFamilyState[ nActFamily - 1 ] )
+ Execute_Impl( SID_STYLE_APPLY, GetSelectedEntry(),
+ String(), (USHORT)GetFamilyItem_Impl()->GetFamily() );
+}
+
+
diff --git a/sfx2/source/dialog/templdlg.hrc b/sfx2/source/dialog/templdlg.hrc
new file mode 100644
index 000000000000..6999844a9b86
--- /dev/null
+++ b/sfx2/source/dialog/templdlg.hrc
@@ -0,0 +1,86 @@
+/*************************************************************************
+ *
+ * $RCSfile: templdlg.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:31 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define TB_FMT 1
+#define LB_FMT 3
+#define BTN_EDIT 11
+#define BTN_DELETE 12
+#define TB_ACTION 15
+#define BTN_NEW 10
+#define LB_FILTER 4
+
+#define ID_APPLY_TEMPLATE 10
+
+#define ID_NEW_STYLE_BY_EXAMPLE 20
+#define ID_UPDATE_STYLE_BY_EXAMPLE 21
+#define ID_TREEVIEW 22
+
+#define BT_OK 1
+#define BT_CANCEL 2
+#define BT_ORG 3
+#define BT_DEL 4
+#define BT_EDIT 5
+#define BT_NEW 6
+#define BT_HELP 7
+#define BT_FLIST 8
+#define BT_VLIST 9
+#define BT_TOOL 10
+
+
diff --git a/sfx2/source/dialog/templdlg.src b/sfx2/source/dialog/templdlg.src
new file mode 100644
index 000000000000..1af839c1c30b
--- /dev/null
+++ b/sfx2/source/dialog/templdlg.src
@@ -0,0 +1,435 @@
+/*************************************************************************
+ *
+ * $RCSfile: templdlg.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:31 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+ // include ---------------------------------------------------------------
+#include "sfx.hrc"
+#include "dialog.hrc"
+#include "templdlg.hrc"
+#include "helpid.hrc"
+ // pragma ----------------------------------------------------------------
+
+ // RID_TEMPLATE ----------------------------------------------------------
+ImageList DLG_STYLE_DESIGNER
+{
+ ImageBitmap = Bitmap { File = "sc_tdlg.bmp" ; };
+ MaskColor = Color { Red = 0xC000 ; Green = 0xC000 ; Blue = 0xC000 ; };
+ IdList =
+ {
+ SID_STYLE_WATERCAN ; SID_STYLE_NEW_BY_EXAMPLE ;
+ SID_STYLE_UPDATE_BY_EXAMPLE ;
+ };
+ IdCount = { 3 ; };
+};
+ // RID_STYLECATALOG ------------------------------------------------------
+ModalDialog RID_STYLECATALOG
+{
+ HelpId = SID_STYLE_CATALOG ;
+ OutputSize = TRUE ;
+ SVLook = TRUE ;
+ Size = MAP_APPFONT ( 181 , 134 ) ;
+ Text = "Vorlagenkatalog" ;
+ Text [ English ] = "Stylesheet Catalogue" ;
+ Text [ norwegian ] = "Stylesheet Catalogue" ;
+ Text [ italian ] = "Catalogo modelli" ;
+ Text [ portuguese_brazilian ] = "Stylesheet Catalogue" ;
+ Text [ portuguese ] = "Catlogo de estilos" ;
+ Text [ french ] = "Catalogue de styles" ;
+ Text [ dutch ] = "Catalogus opmaakprofielen" ;
+ Text [ spanish ] = "Catlogo de estilos" ;
+ Text [ danish ] = "Typografi-katalog" ;
+ Text [ swedish ] = "Mallkatalog" ;
+ Text [ finnish ] = "Stylesheet Catalogue" ;
+ Text [ english_us ] = "Style Catalog" ;
+ Moveable = TRUE ;
+ // Closeable = TRUE; // Dialog hat Cancel oder OK - Button !
+ OKButton BT_OK
+ {
+ DefButton = TRUE ;
+ Pos = MAP_APPFONT ( 123 , 6 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TabStop = TRUE ;
+ };
+ CancelButton BT_CANCEL
+ {
+ Pos = MAP_APPFONT ( 123 , 23 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TabStop = TRUE ;
+ };
+ PushButton BT_ORG
+ {
+ Pos = MAP_APPFONT ( 123 , 97 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ Text = "~Verwalten..." ;
+ Text [ English ] = "~Organize..." ;
+ Text [ norwegian ] = "~Organize..." ;
+ Text [ italian ] = "Gestisci..." ;
+ Text [ portuguese_brazilian ] = "~Organize..." ;
+ Text [ portuguese ] = "~Gerir..." ;
+ Text [ french ] = "~Grer..." ;
+ Text [ dutch ] = "Be~heren..." ;
+ Text [ spanish ] = "~Administrar..." ;
+ Text [ danish ] = "Administrer..." ;
+ Text [ swedish ] = "~Frvalta..." ;
+ Text [ finnish ] = "~Organize..." ;
+ Text [ english_us ] = "~Organizer..." ;
+ TabStop = TRUE ;
+ Text[ chinese_simplified ] = "(~O)...";
+ Text[ russian ] = "...";
+ Text[ polish ] = "Zarzdzaj...";
+ Text[ japanese ] = "Ǘ(~O)...";
+ Text[ chinese_traditional ] = "޲z(~O)...";
+ Text[ arabic ] = "...";
+ Text[ greek ] = "...";
+ Text[ korean ] = "(~O)...";
+ Text[ turkish ] = "~Ynet...";
+ };
+ PushButton BT_DEL
+ {
+ Pos = MAP_APPFONT ( 123 , 78 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? ~Lschen... : ~Lschen... */
+ /* ### ACHTUNG: Neuer Text in Resource? ~Lschen... : ~Lschen... */
+ Text = "~Lschen..." ;
+ Text [ English ] = "~Delete..." ;
+ Text [ norwegian ] = "~Delete..." ;
+ Text [ italian ] = "Elimina..." ;
+ Text [ portuguese_brazilian ] = "~Apagar..." ;
+ Text [ portuguese ] = "E~liminar..." ;
+ Text [ french ] = "~Supprimer..." ;
+ Text [ dutch ] = "~Wissen..." ;
+ Text [ spanish ] = "~Eliminar..." ;
+ Text [ danish ] = "Slet..." ;
+ Text [ swedish ] = "~Radera..." ;
+ Text [ finnish ] = "~Delete..." ;
+ Text [ english_us ] = "~Delete..." ;
+ TabStop = TRUE ;
+ Text[ chinese_simplified ] = "ɾ(~D)...";
+ Text[ russian ] = "...";
+ Text[ polish ] = "Usu...";
+ Text[ japanese ] = "폜(~D)...";
+ Text[ chinese_traditional ] = "R(~D)...";
+ Text[ arabic ] = "...";
+ Text[ greek ] = "...";
+ Text[ korean ] = "(~D)...";
+ Text[ turkish ] = "~Sil...";
+ };
+ PushButton BT_EDIT
+ {
+ Pos = MAP_APPFONT ( 123 , 60 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? ~ndern... : ~ndern... */
+ /* ### ACHTUNG: Neuer Text in Resource? ~ndern... : ~ndern... */
+ Text = "n~dern..." ;
+ Text [ English ] = "~Change..." ;
+ Text [ norwegian ] = "~Change..." ;
+ Text [ italian ] = "Mo~difica..." ;
+ Text [ portuguese_brazilian ] = "~Change..." ;
+ Text [ portuguese ] = "~Modificar..." ;
+ Text [ french ] = "~Personnaliser..." ;
+ Text [ dutch ] = "~Wijzigen..." ;
+ Text [ spanish ] = "~Modificar..." ;
+ Text [ danish ] = "Modificer..." ;
+ Text [ swedish ] = "n~dra..." ;
+ Text [ finnish ] = "~Change..." ;
+ Text [ english_us ] = "~Modify..." ;
+ TabStop = TRUE ;
+ Text[ chinese_simplified ] = "(~M)...";
+ Text[ russian ] = "...";
+ Text[ polish ] = "Modyfikuj...";
+ Text[ japanese ] = "ύX(~M)...";
+ Text[ chinese_traditional ] = "ܧ(~M)...";
+ Text[ arabic ] = "...";
+ Text[ greek ] = "...";
+ Text[ korean ] = "(~M)...";
+ Text[ turkish ] = "~Deitir...";
+ };
+ PushButton BT_NEW
+ {
+ Pos = MAP_APPFONT ( 123 , 43 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ Text = "~Neu..." ;
+ Text [ English ] = "~New..." ;
+ Text [ norwegian ] = "~New..." ;
+ Text [ italian ] = "Nuovo..." ;
+ Text [ portuguese_brazilian ] = "~Novo..." ;
+ Text [ portuguese ] = "~Novo..." ;
+ Text [ english_us ] = "~New..." ;
+ Text [ finnish ] = "~Uusi..." ;
+ Text [ danish ] = "Ny..." ;
+ Text [ french ] = "~Nouveau..." ;
+ Text [ swedish ] = "~Nytt..." ;
+ Text [ dutch ] = "~Nieuw.." ;
+ Text [ spanish ] = "~Nuevo..." ;
+ TabStop = TRUE ;
+ Text[ chinese_simplified ] = "½(~N)...";
+ Text[ russian ] = "...";
+ Text[ polish ] = "Nowy...";
+ Text[ japanese ] = "VK쐬(~N)...";
+ Text[ chinese_traditional ] = "}ҷs(~N)...";
+ Text[ arabic ] = "...";
+ Text[ greek ] = "...";
+ Text[ korean ] = "(~N)...";
+ Text[ turkish ] = "~Yeni...";
+ };
+ HelpButton BT_HELP
+ {
+ Pos = MAP_APPFONT ( 123 , 114 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TabStop = TRUE ;
+ };
+ ListBox BT_TOOL
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 6 , 6 ) ;
+ Size = MAP_APPFONT ( 110 , 55 ) ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+ };
+ Control BT_VLIST
+ {
+ HelpId = HID_TEMPLATE_FMT ;
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 6 , 23 ) ;
+ Size = MAP_APPFONT ( 110 , 89 ) ;
+ TabStop = TRUE ;
+ };
+ ListBox BT_FLIST
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 6 , 114 ) ;
+ Size = MAP_APPFONT ( 110 , 55 ) ;
+ TabStop = TRUE ;
+ Hide = TRUE ;
+ DropDown = TRUE ;
+ };
+ Text[ chinese_simplified ] = "ʽĿ¼";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Katalog stylw";
+ Text[ japanese ] = "ق̶۸";
+ Text[ chinese_traditional ] = "˦ؿ";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " īŻα";
+ Text[ turkish ] = "Biim katalou";
+};
+ // Strings ---------------------------------------------------------------
+String DLG_STYLE_DESIGNER
+{
+ Text = "Stylist" ;
+ Text [ English ] = "Stylist" ;
+ Text [ english_us ] = "Stylist" ;
+ Text [ portuguese_brazilian ] = "Designer" ;
+ Text [ swedish ] = "Stylist" ;
+ Text [ danish ] = "Stylist" ;
+ Text [ italian ] = "Stilista" ;
+ Text [ spanish ] = "Estilista" ;
+ Text [ french ] = "Styliste" ;
+ Text [ dutch ] = "Stylist" ;
+ Text [ portuguese ] = "Estilista" ;
+ Text[ chinese_simplified ] = "ʽ";
+ Text[ russian ] = "";
+ Text[ polish ] = "Stylista";
+ Text[ japanese ] = "ؽ";
+ Text[ chinese_traditional ] = "U˦";
+ Text[ arabic ] = "";
+ Text[ greek ] = "Stylist";
+ Text[ korean ] = "Stylist";
+ Text[ turkish ] = "Stylist";
+};
+String STR_STYLE_FILTER_HIERARCHICAL
+{
+ TEXT = "Hierarchisch" ;
+ TEXT [ English ] = "Hierarchical" ;
+ TEXT [ norwegian ] = "Hierarkisk" ;
+ TEXT [ italian ] = "Gerarchico" ;
+ TEXT [ portuguese_brazilian ] = "Hierarchical" ;
+ TEXT [ portuguese ] = "Hierrquico" ;
+ TEXT [ finnish ] = "Hierarchical" ;
+ TEXT [ danish ] = "Hierarkisk" ;
+ TEXT [ french ] = "Hirarchique" ;
+ TEXT [ swedish ] = "Hierarkiskt" ;
+ TEXT [ dutch ] = "Hirarchisch" ;
+ TEXT [ spanish ] = "Jerrquico" ;
+ TEXT [ english_us ] = "Hierarchical" ;
+ TEXT[ chinese_simplified ] = "ȼʽ";
+ TEXT[ russian ] = " ";
+ TEXT[ polish ] = "Hierarchiczny";
+ TEXT[ japanese ] = "Kw";
+ TEXT[ chinese_traditional ] = "Ŧ";
+ TEXT[ arabic ] = "";
+ TEXT[ greek ] = "";
+ TEXT[ korean ] = "";
+ TEXT[ turkish ] = "Hiyerarik";
+};
+ // DLG_STYLE_DESIGNER ----------------------------------------------------
+DockingWindow DLG_STYLE_DESIGNER
+{
+ HelpId = SID_STYLE_DESIGNER ;
+ OutputSize = TRUE ;
+ Hide = TRUE ;
+ SVLook = TRUE ;
+ Size = MAP_APPFONT ( 116 , 215 ) ;
+ Pos = MAP_APPFONT ( 0 , 0 ) ;
+ Closeable = TRUE ;
+ Zoomable = TRUE ;
+ Sizeable = TRUE ;
+ Dockable = TRUE ;
+ EnableResizing = TRUE ;
+ // HideWhenDeactivate = TRUE;
+ Border = TRUE ;
+ Moveable = TRUE ;
+ ToolBox TB_ACTION
+ {
+ Pos = MAP_APPFONT ( 3 , 3 ) ;
+ Size = MAP_APPFONT ( 57 , 42 ) ;
+ LineCount = 1 ;
+ ItemImageList = DLG_STYLE_DESIGNER ;
+ HelpId = HID_TEMPLDLG_TOOLBOX_RIGHT ;
+ ItemList =
+ {
+ ToolBoxItem
+ {
+ HelpId = HID_TEMPLDLG_WATERCAN ;
+ Identifier = SID_STYLE_WATERCAN ;
+ /* ### ACHTUNG: Neuer Text in Resource? Giekannenmodus : Giekannenmodus */
+ /* ### ACHTUNG: Neuer Text in Resource? Giekannenmodus : Giekannenmodus */
+ Text = "Giekannenmodus" ;
+ Text [ English ] = "Watercan" ;
+ Text [ norwegian ] = "Rammefyll" ;
+ Text [ italian ] = "Modo riempimento" ;
+ Text [ portuguese_brazilian ] = "Watercan" ;
+ Text [ portuguese ] = "Preenchimento completo" ;
+ Text [ english_us ] = "Fill Format Mode" ;
+ Text [ finnish ] = "Ruisku" ;
+ Text [ danish ] = "Fyldmodus" ;
+ Text [ french ] = "Mode Remplir tout" ;
+ Text [ swedish ] = "Vattenkannelge" ;
+ Text [ dutch ] = "Gietermodus" ;
+ Text [ spanish ] = "Modo regadera" ;
+ /* ### ACHTUNG: Neuer Text in Resource? Vorlagen im Giekannenmodus anwenden : Vorlagen im Giekannenmodus anwenden */
+ /* ### ACHTUNG: Neuer Text in Resource? Vorlagen im Giekannenmodus anwenden : Vorlagen im Giekannenmodus anwenden */
+ Text[ chinese_simplified ] = "ģʽ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Tryb polewaczki";
+ Text[ japanese ] = "Ӱ";
+ Text[ chinese_traditional ] = "RҦ";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ä";
+ Text[ turkish ] = "Doldur kipi";
+ };
+ ToolBoxItem
+ {
+ HelpId = HID_TEMPLDLG_NEWBYEXAMPLE ;
+ Identifier = SID_STYLE_NEW_BY_EXAMPLE ;
+ Text = "Neue Vorlage aus Selektion" ;
+ Text [ English ] = "New style by example" ;
+ Text [ norwegian ] = "Ny mal etter eksempel" ;
+ Text [ italian ] = "Nuovo modello dalla selezione" ;
+ Text [ portuguese_brazilian ] = "Novo estilo por exemplo" ;
+ Text [ portuguese ] = "Novo estilo a partir da seleco" ;
+ Text [ english_us ] = "New Style from Selection" ;
+ Text [ finnish ] = "Uusi tyyli esimerkin mukaan" ;
+ Text [ danish ] = "Ny typografi fra markeringen" ;
+ Text [ french ] = "Nouveau style partir de la slection" ;
+ Text [ swedish ] = "Ny formatmall frn markeringen" ;
+ Text [ dutch ] = "Nieuw opmaakprofiel uit selectie" ;
+ Text [ spanish ] = "Nuevo estilo a partir de seleccin" ;
+ Text[ chinese_simplified ] = "ѡеʽ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Nowy styl z selekcji";
+ Text[ japanese ] = "IقVK쐬";
+ Text[ chinese_traditional ] = "s˦q";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = "ÿ ";
+ Text[ turkish ] = "Yeni biim seimi";
+ };
+ ToolBoxItem
+ {
+ HelpId = HID_TEMPLDLG_UPDATEBYEXAMPLE ;
+ Identifier = SID_STYLE_UPDATE_BY_EXAMPLE ;
+ Text = "Vorlage aktualisieren" ;
+ Text [ English ] = "Update style by example" ;
+ Text [ norwegian ] = "Oppdater mal etter eksempel" ;
+ Text [ italian ] = "Aggiorna modello" ;
+ Text [ portuguese_brazilian ] = "Atualizar estilo por exemplo" ;
+ Text [ portuguese ] = "Actualizar modelo" ;
+ Text [ english_us ] = "Update Style" ;
+ Text [ finnish ] = "Pivit tyyli esimerkin mukaan" ;
+ Text [ danish ] = "Opdater typografi" ;
+ Text [ french ] = "Actualiser le style" ;
+ Text [ swedish ] = "Uppdatera formatmall" ;
+ Text [ dutch ] = "Opmaakprofiel actualiseren" ;
+ Text [ spanish ] = "Actualizar estilo" ;
+ Text[ chinese_simplified ] = "ʽ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Aktualizuj styl";
+ Text[ japanese ] = "ق̍XV";
+ Text[ chinese_traditional ] = "s˦";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " Ʈ";
+ Text[ turkish ] = "Biimi gncelle";
+ };
+ };
+ };
+};
+ // ********************************************************************** EOF
diff --git a/sfx2/source/dialog/tplcitem.cxx b/sfx2/source/dialog/tplcitem.cxx
new file mode 100644
index 000000000000..0cad3172011e
--- /dev/null
+++ b/sfx2/source/dialog/tplcitem.cxx
@@ -0,0 +1,187 @@
+/*************************************************************************
+ *
+ * $RCSfile: tplcitem.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:31 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+// INCLUDE ---------------------------------------------------------------
+
+#include <svtools/intitem.hxx>
+
+#pragma hdrstop
+
+#include "templdlg.hxx"
+#include "bindings.hxx"
+#include "tplpitem.hxx"
+#include "tplcitem.hxx"
+#include "templdgi.hxx"
+
+#include "sfx.hrc"
+#include "dialog.hrc"
+
+// STATIC DATA -----------------------------------------------------------
+
+// Konstruktor
+
+SfxTemplateControllerItem::SfxTemplateControllerItem(
+ USHORT nId, // ID
+ SfxCommonTemplateDialog_Impl &rDlg, // Controller-Instanz, dem dieses Item zugeordnet ist.
+ SfxBindings &rBindings):
+ SfxControllerItem(nId, rBindings),
+ rTemplateDlg(rDlg)
+{
+}
+
+// -----------------------------------------------------------------------
+
+// Benachrichtigung "uber Status"anderung; wird an den
+// im Konstruktor "ubergebenen Controller propagiert
+
+void SfxTemplateControllerItem::StateChanged( USHORT nSID, SfxItemState eState,
+ const SfxPoolItem* pItem )
+{
+ switch(nSID)
+ {
+ case SID_STYLE_FAMILY1:
+ case SID_STYLE_FAMILY2:
+ case SID_STYLE_FAMILY3:
+ case SID_STYLE_FAMILY4:
+ case SID_STYLE_FAMILY5:
+ {
+ FASTBOOL bAvailable = SFX_ITEM_AVAILABLE == eState;
+ if ( !bAvailable )
+ rTemplateDlg.SetFamilyState(GetId(), 0);
+ else {
+ const SfxTemplateItem *pStateItem = PTR_CAST(
+ SfxTemplateItem, pItem);
+ DBG_ASSERT(pStateItem != 0, "SfxTemplateItem erwartet");
+ rTemplateDlg.SetFamilyState( GetId(), pStateItem );
+ }
+ BOOL bDisable = eState == SFX_ITEM_DISABLED;
+ // Familie Disablen
+ USHORT nFamily;
+ switch( GetId())
+ {
+ case SID_STYLE_FAMILY1:
+ nFamily = 1; break;
+ case SID_STYLE_FAMILY2:
+ nFamily = 2; break;
+ case SID_STYLE_FAMILY3:
+ nFamily = 3; break;
+ case SID_STYLE_FAMILY4:
+ nFamily = 4; break;
+ case SID_STYLE_FAMILY5:
+ nFamily = 5; break;
+ default: DBG_ERROR("unbekannte StyleFamily"); break;
+ }
+ rTemplateDlg.EnableFamilyItem( nFamily, !bDisable );
+ break;
+ }
+ case SID_STYLE_WATERCAN:
+ {
+ if ( eState == SFX_ITEM_DISABLED )
+ rTemplateDlg.SetWaterCanState(0);
+ else if( eState == SFX_ITEM_AVAILABLE )
+ {
+ const SfxBoolItem *pStateItem = PTR_CAST(SfxBoolItem, pItem);
+ DBG_ASSERT(pStateItem != 0, "BoolItem erwartet");
+ rTemplateDlg.SetWaterCanState(pStateItem);
+ }
+ break;
+ }
+ case SID_STYLE_EDIT:
+ rTemplateDlg.EnableEdit( SFX_ITEM_DISABLED != eState );
+ break;
+ case SID_STYLE_DELETE:
+ rTemplateDlg.EnableDel( SFX_ITEM_DISABLED != eState );
+ break;
+ case SID_STYLE_NEW_BY_EXAMPLE:
+
+ rTemplateDlg.EnableExample_Impl(
+ GetId(), SFX_ITEM_DISABLED != eState );
+ break;
+ case SID_STYLE_UPDATE_BY_EXAMPLE:
+ {
+ rTemplateDlg.EnableExample_Impl(
+ GetId(), eState != SFX_ITEM_DISABLED );
+ // Das Select Disabled dann, falls enabled und Style Readonly
+/* String aStr = rTemplateDlg.GetSelectedEntry();
+ if( aStr.Len() ) rTemplateDlg.SelectStyle( aStr ); */
+ break;
+ }
+ case SID_STYLE_NEW:
+ {
+ rTemplateDlg.EnableNew( SFX_ITEM_DISABLED != eState );
+ break;
+ }
+ case SID_STYLE_DRAGHIERARCHIE:
+ {
+ rTemplateDlg.EnableTreeDrag( SFX_ITEM_DISABLED != eState );
+ break;
+ }
+ case SID_STYLE_FAMILY :
+ {
+ const SfxUInt16Item *pStateItem = PTR_CAST( SfxUInt16Item, pItem);
+ if (pStateItem)
+ rTemplateDlg.SetFamily( pStateItem->GetValue() );
+ break;
+ }
+ }
+}
+
+
diff --git a/sfx2/source/dialog/tplpitem.cxx b/sfx2/source/dialog/tplpitem.cxx
new file mode 100644
index 000000000000..ffb1dff8ad30
--- /dev/null
+++ b/sfx2/source/dialog/tplpitem.cxx
@@ -0,0 +1,123 @@
+/*************************************************************************
+ *
+ * $RCSfile: tplpitem.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:31 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+// INCLUDE ---------------------------------------------------------------
+
+#pragma hdrstop
+
+#include "tplpitem.hxx"
+
+// STATIC DATA -----------------------------------------------------------
+
+TYPEINIT1(SfxTemplateItem, SfxFlagItem);
+
+//=========================================================================
+
+SfxTemplateItem::SfxTemplateItem
+(
+ USHORT nWhich, // Slot-ID
+ const String& rStyle, // Name des aktuellen Styles
+ USHORT nValue // Flags f"ur das Filtern bei automatischer Anzeige
+) :
+
+ SfxFlagItem( nWhich, nValue ),
+
+ aStyle( rStyle )
+
+{
+}
+
+//-------------------------------------------------------------------------
+
+// copy ctor
+SfxTemplateItem::SfxTemplateItem( const SfxTemplateItem& rCopy ) :
+
+ SfxFlagItem( rCopy ),
+
+ aStyle( rCopy.aStyle )
+{
+}
+
+//-------------------------------------------------------------------------
+
+// op ==
+
+int SfxTemplateItem::operator==( const SfxPoolItem& rCmp ) const
+{
+ return ( SfxFlagItem::operator==( rCmp ) &&
+ aStyle == ( (const SfxTemplateItem&)rCmp ).aStyle );
+}
+
+//-------------------------------------------------------------------------
+
+SfxPoolItem* SfxTemplateItem::Clone( SfxItemPool *) const
+{
+ return new SfxTemplateItem(*this);
+}
+
+//-------------------------------------------------------------------------
+
+BYTE SfxTemplateItem::GetFlagCount() const
+{
+ return sizeof(USHORT) * 8;
+}
+
+
diff --git a/sfx2/source/dialog/versdlg.cxx b/sfx2/source/dialog/versdlg.cxx
new file mode 100644
index 000000000000..54a8f5fb6904
--- /dev/null
+++ b/sfx2/source/dialog/versdlg.cxx
@@ -0,0 +1,351 @@
+/*************************************************************************
+ *
+ * $RCSfile: versdlg.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:31 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include <svtools/eitem.hxx>
+#include <svtools/intitem.hxx>
+#include <svtools/stritem.hxx>
+#include <svtools/itemset.hxx>
+#include <vcl/msgbox.hxx>
+
+#include "versdlg.hrc"
+#include "versdlg.hxx"
+#include "viewfrm.hxx"
+#include "sfxresid.hxx"
+#include "docfile.hxx"
+#include "objsh.hxx"
+#include "sfxsids.hrc"
+#include "dispatch.hxx"
+#include "inimgr.hxx"
+#include "request.hxx"
+
+// **************************************************************************
+
+static String ConvertDateTime_Impl(const SfxStamp &rTime)
+{
+ const String pDelim ( DEFINE_CONST_UNICODE( ", "));
+ const International& rInter = Application::GetAppInternational();
+ String aStr(rInter.GetDate(rTime.GetTime()));
+ aStr += pDelim;
+ aStr += rInter.GetTime(rTime.GetTime(), TRUE, FALSE);
+ return aStr;
+}
+
+// Achtung im Code wird dieses Array direkt (0, 1, ...) indiziert
+static long nTabs_Impl[] =
+{
+ 3, // Number of Tabs
+ 0, 62, 124
+};
+
+void SfxVersionsTabListBox_Impl::KeyInput( const KeyEvent& rKeyEvent )
+{
+ const KeyCode& rCode = rKeyEvent.GetKeyCode();
+ switch ( rCode.GetCode() )
+ {
+ case KEY_RETURN :
+ case KEY_ESCAPE :
+ case KEY_TAB :
+ Window::GetParent()->KeyInput( rKeyEvent );
+ break;
+ default:
+ SvTabListBox::KeyInput( rKeyEvent );
+ break;
+ }
+}
+
+SfxVersionsTabListBox_Impl::SfxVersionsTabListBox_Impl( Window* pParent, const ResId& rResId )
+ : SvTabListBox( pParent, rResId )
+{
+}
+
+SfxVersionDialog::SfxVersionDialog ( SfxViewFrame* pFrame, Window *pParent )
+ : SfxModalDialog( pFrame, pParent, SfxResId( DLG_VERSIONS ) )
+ , aNewGroup( this, ResId( GB_NEWVERSIONS ) )
+ , aSaveButton( this, ResId( PB_SAVE ) )
+ , aSaveCheckBox( this, ResId( CB_SAVEONCLOSE ) )
+ , aExistingGroup( this, ResId( GB_OLDVERSIONS ) )
+ , aDateTimeText( this, ResId( FT_DATETIME ) )
+ , aSavedByText( this, ResId( FT_SAVEDBY ) )
+ , aCommentText( this, ResId( FT_COMMENTS ) )
+ , aVersionBox( this, ResId( TLB_VERSIONS ) )
+ , aViewButton( this, ResId( PB_VIEW ) )
+ , aOpenButton( this, ResId( PB_OPEN ) )
+ , aDeleteButton( this, ResId( PB_DELETE ) )
+ , aCompareButton( this, ResId( PB_COMPARE ) )
+ , aCloseButton( this, ResId( PB_CLOSE ) )
+ , aHelpButton( this, ResId ( PB_HELP ) )
+ , pViewFrame( pFrame )
+{
+ FreeResource();
+
+ aViewButton.SetClickHdl ( LINK( this, SfxVersionDialog, ButtonHdl_Impl ) );
+ aSaveButton.SetClickHdl ( LINK( this, SfxVersionDialog, ButtonHdl_Impl ) );
+ aDeleteButton.SetClickHdl ( LINK( this, SfxVersionDialog, ButtonHdl_Impl ) );
+ aCompareButton.SetClickHdl ( LINK( this, SfxVersionDialog, ButtonHdl_Impl ) );
+ aCloseButton.SetClickHdl ( LINK( this, SfxVersionDialog, ButtonHdl_Impl ) );
+ aOpenButton.SetClickHdl ( LINK( this, SfxVersionDialog, ButtonHdl_Impl ) );
+ aVersionBox.SetSelectHdl( LINK( this, SfxVersionDialog, SelectHdl_Impl ) );
+ aVersionBox.SetDoubleClickHdl( LINK( this, SfxVersionDialog, DClickHdl_Impl ) );
+ aSaveCheckBox.SetClickHdl ( LINK( this, SfxVersionDialog, ButtonHdl_Impl ) );
+
+ aVersionBox.GrabFocus();
+ aVersionBox.SetWindowBits( WB_HSCROLL | WB_CLIPCHILDREN );
+ aVersionBox.SetSelectionMode( SINGLE_SELECTION );
+ aVersionBox.SetTabs( &nTabs_Impl[0], MAP_APPFONT );
+ aVersionBox.Resize(); // OS: Hack fuer richtige Selektion
+ Init_Impl();
+}
+
+void SfxVersionDialog::Init_Impl()
+{
+ SfxObjectShell *pObjShell = pViewFrame->GetObjectShell();
+ SfxMedium* pMedium = pObjShell->GetMedium();
+ const SfxVersionTableDtor* pTable = pMedium->GetVersionList();
+ if ( pTable )
+ {
+ for ( USHORT n=0; n<pTable->Count(); n++ )
+ {
+ SfxVersionInfo *pInfo = pTable->GetObject(n);
+ String aEntry = ConvertDateTime_Impl( pInfo->aCreateStamp );
+ aEntry += '\t';
+ aEntry += pInfo->aCreateStamp.GetName();
+ aEntry += '\t';
+ aEntry += pInfo->aComment;
+ SvLBoxEntry *pEntry = aVersionBox.InsertEntry( aEntry );
+ pEntry->SetUserData( pInfo );
+ }
+ }
+
+ aSaveCheckBox.Check( pObjShell->GetDocInfo().IsSaveVersionOnClose() );
+
+ aOpenButton.Enable( FALSE );
+ aSaveButton.Enable( !pObjShell->IsReadOnly() );
+ aSaveCheckBox.Enable( !pObjShell->IsReadOnly() );
+ aDeleteButton.Enable( FALSE );
+
+ const SfxPoolItem *pDummy=NULL;
+ SfxItemState eState = pViewFrame->GetDispatcher()->QueryState( SID_DOCUMENT_MERGE, pDummy );
+ eState = pViewFrame->GetDispatcher()->QueryState( SID_DOCUMENT_COMPARE, pDummy );
+ aCompareButton.Enable( eState >= SFX_ITEM_AVAILABLE );
+
+ // set dialog title (filename or docinfo title)
+ String sText = GetText();
+ ( sText += ' ' ) += pObjShell->GetTitle();
+ SetText( sText );
+}
+
+SfxVersionDialog::~SfxVersionDialog ()
+{
+}
+
+void SfxVersionDialog::Open_Impl()
+{
+ SfxObjectShell *pObjShell = pViewFrame->GetObjectShell();
+
+ SvLBoxEntry *pEntry = aVersionBox.FirstSelected();
+ ULONG nPos = aVersionBox.GetModel()->GetRelPos( pEntry );
+ SfxInt16Item aItem( SID_VERSION, nPos+1 );
+ SfxStringItem aTarget( SID_TARGETNAME, DEFINE_CONST_UNICODE("_blank") );
+ SfxStringItem aReferer( SID_REFERER, DEFINE_CONST_UNICODE("private:user") );
+ SfxStringItem aFile( SID_FILE_NAME, pObjShell->GetMedium()->GetName() );
+ pViewFrame->GetDispatcher()->Execute(
+ SID_OPENDOC, SFX_CALLMODE_ASYNCHRON, &aFile, &aItem, &aTarget, &aReferer, 0L );
+ Close();
+}
+
+IMPL_LINK( SfxVersionDialog, DClickHdl_Impl, Control*, pControl )
+{
+ Open_Impl();
+ return 0L;
+}
+
+IMPL_LINK( SfxVersionDialog, SelectHdl_Impl, Control*, pControl )
+{
+ SfxObjectShell *pObjShell = pViewFrame->GetObjectShell();
+ SvLBoxEntry *pEntry = aVersionBox.FirstSelected();
+ aDeleteButton.Enable( !pObjShell->IsReadOnly() );
+ aOpenButton.Enable( TRUE );
+ return 0L;
+}
+
+IMPL_LINK( SfxVersionDialog, ButtonHdl_Impl, Button*, pButton )
+{
+ SfxObjectShell *pObjShell = pViewFrame->GetObjectShell();
+ SvLBoxEntry *pEntry = aVersionBox.FirstSelected();
+
+ if ( pButton == &aCloseButton )
+ {
+ Close();
+ }
+ else if ( pButton == &aSaveCheckBox )
+ {
+ pObjShell->GetDocInfo().SetSaveVersionOnClose( aSaveCheckBox.IsChecked() );
+ pObjShell->SetModified( TRUE );
+ }
+ else if ( pButton == &aSaveButton )
+ {
+ SfxVersionInfo aInfo;
+ aInfo.aCreateStamp = SfxStamp( SFX_INIMANAGER()->GetUserFullName() );
+ SfxViewVersionDialog_Impl* pDlg = new SfxViewVersionDialog_Impl( this, aInfo, TRUE );
+ short nRet = pDlg->Execute();
+ if ( nRet == RET_OK )
+ {
+ SfxStringItem aComment( SID_VERSION, aInfo.aComment );
+ pObjShell->SetModified( TRUE );
+ pViewFrame->GetDispatcher()->Execute(
+ SID_SAVEDOC, SFX_CALLMODE_SYNCHRON, &aComment, 0L );
+ aVersionBox.SetUpdateMode( FALSE );
+ aVersionBox.Clear();
+ Init_Impl();
+ aVersionBox.SetUpdateMode( TRUE );
+ }
+
+ delete pDlg;
+ }
+ if ( pButton == &aDeleteButton && pEntry )
+ {
+ pObjShell->GetMedium()->RemoveVersion_Impl( *(SfxVersionInfo*) pEntry->GetUserData() );
+ pObjShell->SetModified( TRUE );
+ aVersionBox.SetUpdateMode( FALSE );
+ aVersionBox.Clear();
+ Init_Impl();
+ aVersionBox.SetUpdateMode( TRUE );
+ }
+ else if ( pButton == &aOpenButton && pEntry )
+ {
+ Open_Impl();
+ }
+ else if ( pButton == &aViewButton && pEntry )
+ {
+ SfxVersionInfo* pInfo = (SfxVersionInfo*) pEntry->GetUserData();
+ SfxViewVersionDialog_Impl* pDlg = new SfxViewVersionDialog_Impl( this, *pInfo, FALSE );
+ pDlg->Execute();
+ delete pDlg;
+ }
+ else if ( pEntry && pButton == &aCompareButton )
+ {
+ SfxAllItemSet aSet( pObjShell->GetPool() );
+ ULONG nPos = aVersionBox.GetModel()->GetRelPos( pEntry );
+ aSet.Put( SfxInt16Item( SID_VERSION, nPos+1 ) );
+ aSet.Put( SfxStringItem( SID_FILE_NAME, pObjShell->GetMedium()->GetName() ) );
+
+ SfxItemSet* pSet = pObjShell->GetMedium()->GetItemSet();
+ SFX_ITEMSET_ARG( pSet, pFilterItem, SfxStringItem, SID_FILTER_NAME, FALSE );
+ SFX_ITEMSET_ARG( pSet, pFilterOptItem, SfxStringItem, SID_FILE_FILTEROPTIONS, FALSE );
+ if ( pFilterItem )
+ aSet.Put( *pFilterItem );
+ if ( pFilterOptItem )
+ aSet.Put( *pFilterOptItem );
+
+ pViewFrame->GetDispatcher()->Execute( SID_DOCUMENT_COMPARE, SFX_CALLMODE_ASYNCHRON, aSet );
+ Close();
+ }
+
+ return 0L;
+}
+
+SfxViewVersionDialog_Impl::SfxViewVersionDialog_Impl ( Window *pParent, SfxVersionInfo& rInfo, BOOL bEdit )
+ : SfxModalDialog( pParent, SfxResId( DLG_COMMENTS ) )
+ , aDateTimeText( this, ResId( FT_DATETIME ) )
+ , aSavedByText( this, ResId( FT_SAVEDBY ) )
+ , aEdit( this, ResId ( ME_VERSIONS ) )
+ , aOKButton( this, ResId( PB_OK ) )
+ , aCancelButton( this, ResId( PB_CANCEL ) )
+ , aCloseButton( this, ResId( PB_CLOSE ) )
+ , aHelpButton( this, ResId ( PB_HELP ) )
+ , pInfo( &rInfo )
+{
+ FreeResource();
+
+ aDateTimeText.SetText( aDateTimeText.GetText().Append(ConvertDateTime_Impl( pInfo->aCreateStamp )) );
+ aSavedByText.SetText( aSavedByText.GetText().Append(pInfo->aCreateStamp.GetName()) );
+ aEdit.SetText( rInfo.aComment );
+
+ aCloseButton.SetClickHdl ( LINK( this, SfxViewVersionDialog_Impl, ButtonHdl ) );
+ aOKButton.SetClickHdl ( LINK( this, SfxViewVersionDialog_Impl, ButtonHdl ) );
+
+ aEdit.GrabFocus();
+ if ( !bEdit )
+ {
+ aOKButton.Hide();
+ aCancelButton.Hide();
+ aEdit.SetReadOnly( TRUE );
+ }
+ else
+ aCloseButton.Hide();
+}
+
+IMPL_LINK( SfxViewVersionDialog_Impl, ButtonHdl, Button*, pButton )
+{
+ if ( pButton == &aCloseButton )
+ {
+ EndDialog( RET_CANCEL );
+ }
+ else if ( pButton == &aOKButton )
+ {
+ pInfo->aComment = aEdit.GetText();
+ EndDialog( RET_OK );
+ }
+
+ return 0L;
+}
+
+
diff --git a/sfx2/source/dialog/versdlg.hrc b/sfx2/source/dialog/versdlg.hrc
new file mode 100644
index 000000000000..7ca2fce0eb6c
--- /dev/null
+++ b/sfx2/source/dialog/versdlg.hrc
@@ -0,0 +1,82 @@
+/*************************************************************************
+ *
+ * $RCSfile: versdlg.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:31 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include <dialog.hrc>
+
+#define GB_NEWVERSIONS 1
+#define PB_SAVE 2
+#define CB_SAVEONCLOSE 3
+#define TLB_VERSIONS 4
+#define PB_DELETE 5
+#define PB_OPEN 6
+#define PB_HELP 7
+#define PB_CLOSE 8
+#define GB_OLDVERSIONS 9
+#define FT_DATETIME 10
+#define FT_SAVEDBY 11
+#define FT_COMMENTS 12
+#define PB_VIEW 13
+#define ME_VERSIONS 14
+#define PB_OK 15
+#define PB_CANCEL 16
+#define PB_COMPARE 17
+#define PB_MERGE 18
+
diff --git a/sfx2/source/dialog/versdlg.src b/sfx2/source/dialog/versdlg.src
new file mode 100644
index 000000000000..659da76934c4
--- /dev/null
+++ b/sfx2/source/dialog/versdlg.src
@@ -0,0 +1,581 @@
+/*************************************************************************
+ *
+ * $RCSfile: versdlg.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:31 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include "versdlg.hrc"
+ModalDialog DLG_VERSIONS
+{
+ OutputSize = TRUE ;
+ Size = MAP_APPFONT ( 340 , 184 ) ;
+ Text = "Versionen in" ;
+ Text [ English ] = "Versions in" ;
+ SvLook = TRUE ;
+ Moveable = TRUE ;
+ Closeable = TRUE ;
+ GroupBox GB_NEWVERSIONS
+ {
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 272 , 31 ) ;
+ Text = "Neue Versionen" ;
+ Text [ English ] = "New versions" ;
+ Text [ english_us ] = "New versions" ;
+ Text [ portuguese_brazilian ] = "Neue Versionen" ;
+ Text [ swedish ] = "Nya versioner" ;
+ Text [ danish ] = "Ny version" ;
+ Text [ italian ] = "Nuove versioni" ;
+ Text [ spanish ] = "Nuevas versiones" ;
+ Text [ french ] = "Nouvelles versions" ;
+ Text [ dutch ] = "Nieuwe versies" ;
+ Text [ portuguese ] = "Novas verses" ;
+ Text[ chinese_simplified ] = "°汾";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Nowe wersje";
+ Text[ japanese ] = "Vްޮ";
+ Text[ chinese_traditional ] = "s";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ";
+ Text[ turkish ] = "Yeni srmler";
+ Text[ language_user1 ] = " ";
+ };
+ PushButton PB_SAVE
+ {
+ Pos = MAP_APPFONT ( 12 , 14 ) ;
+ Size = MAP_APPFONT ( 80 , 14 ) ;
+ Text = "~Neue Version speichern" ;
+ Text [ English ] = "~Save new version" ;
+ TabStop = TRUE ;
+ Text [ english_us ] = "Save ~New Version" ;
+ Text [ portuguese_brazilian ] = "~Neue Version speichern" ;
+ Text [ swedish ] = "Spara ~ny version" ;
+ Text [ danish ] = "Gem ny version" ;
+ Text [ italian ] = "~Salva la versione nuova" ;
+ Text [ spanish ] = "~Guardar versin nueva" ;
+ Text [ french ] = "~Enregistrer une nouvelle version" ;
+ Text [ dutch ] = "~Nieuwe versie opslaan" ;
+ Text [ portuguese ] = "~Guardar nova verso" ;
+ Text[ chinese_simplified ] = "°汾(~S)";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Zapisz now wersj";
+ Text[ japanese ] = "Vްޮ݂̕ۑ(~S)";
+ Text[ chinese_traditional ] = "Oss(~S)";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " (~N)";
+ Text[ turkish ] = "~Yeni srm kaydet";
+ Text[ language_user1 ] = " ";
+ };
+ CheckBox CB_SAVEONCLOSE
+ {
+ Pos = MAP_APPFONT ( 131 , 16 ) ;
+ Size = MAP_APPFONT ( 144 , 10 ) ;
+ Text = "~Beim Schlieen immer Version speichern" ;
+ Text [ English ] = "~Always save a version on closing" ;
+ TabStop = TRUE ;
+ Text [ english_us ] = "~Always save a version on closing" ;
+ Text [ portuguese_brazilian ] = "~Beim Schlieen immer Version speichern" ;
+ Text [ swedish ] = "~Spara alltid en version vid stngning" ;
+ Text [ danish ] = "Gem version altid ved lukning" ;
+ Text [ italian ] = "~Salva sempre la versione quando chiudi" ;
+ Text [ spanish ] = "Guardar ~versin siempre al cerrar" ;
+ Text [ french ] = "~Toujours enregistrer une version lors de la fermeture" ;
+ Text [ dutch ] = "~Bij sluiten altijd versie opslaan" ;
+ Text [ portuguese ] = "~Guardar sempre uma verso ao fechar" ;
+ Text[ chinese_simplified ] = "ڹرʱDZ汾Ϣ(~A)";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Zawsze zapisuj wersj przy zamykaniu";
+ Text[ japanese ] = "‚ƂAްޮ݂̕ۑ(~A)";
+ Text[ chinese_traditional ] = "b`OOsT(~A)";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ׻ (~A)";
+ Text[ turkish ] = "~Kapatrken daima srm kaydet";
+ Text[ language_user1 ] = " ";
+ };
+ GroupBox GB_OLDVERSIONS
+ {
+ Pos = MAP_APPFONT ( 6 , 40 ) ;
+ Size = MAP_APPFONT ( 272 , 138 ) ;
+ Text = "Vorhandene Versionen" ;
+ Text [ English ] = "Existing versions" ;
+ Text [ english_us ] = "Existing versions" ;
+ Text [ portuguese_brazilian ] = "Vorhandene Versionen" ;
+ Text [ swedish ] = "Befintliga versioner" ;
+ Text [ danish ] = "Eksisterende version" ;
+ Text [ italian ] = "Versioni esistenti" ;
+ Text [ spanish ] = "Versiones existentes" ;
+ Text [ french ] = "Versions existantes" ;
+ Text [ dutch ] = "Bestaande versies" ;
+ Text [ portuguese ] = "Verses existentes" ;
+ Text[ chinese_simplified ] = "ִİ汾";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Istniejce wersje";
+ Text[ japanese ] = "ްޮ";
+ Text[ chinese_traditional ] = "{s";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ";
+ Text[ turkish ] = "Mevcut srmler";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_DATETIME
+ {
+ Pos = MAP_APPFONT ( 15 , 51 ) ;
+ Size = MAP_APPFONT ( 60 , 10 ) ;
+ Text = "Datum und Uhrzeit" ;
+ Text [ English ] = "Date and time" ;
+ Text [ english_us ] = "Date and time" ;
+ Text [ portuguese_brazilian ] = "Datum und Uhrzeit" ;
+ Text [ swedish ] = "Datum och tid" ;
+ Text [ danish ] = "Dato og klokkeslt" ;
+ Text [ italian ] = "Data e ora" ;
+ Text [ spanish ] = "Fecha y hora" ;
+ Text [ french ] = "Date et heure" ;
+ Text [ dutch ] = "Datum en tijd" ;
+ Text [ portuguese ] = "Data e horas" ;
+ Text[ chinese_simplified ] = "ںʱ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Data i godzina";
+ Text[ japanese ] = "tƎ";
+ Text[ chinese_traditional ] = "Mɶ";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = "¥ ð";
+ Text[ turkish ] = "Tarih ve saat";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_SAVEDBY
+ {
+ Pos = MAP_APPFONT ( 76 , 51 ) ;
+ Size = MAP_APPFONT ( 60 , 10 ) ;
+ Text = "gespeichert von" ;
+ Text [ English ] = "Saved by" ;
+ Text [ english_us ] = "Saved by" ;
+ Text [ portuguese_brazilian ] = "gespeichert von" ;
+ Text [ swedish ] = "Sparad av" ;
+ Text [ danish ] = "gemt af" ;
+ Text [ italian ] = "salvato da" ;
+ Text [ spanish ] = "Guardado por" ;
+ Text [ french ] = "Enregistre par" ;
+ Text [ dutch ] = "opgeslagen door" ;
+ Text [ portuguese ] = "Guardado por" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "Zapisana przez";
+ Text[ japanese ] = "ۑ";
+ Text[ chinese_traditional ] = "@";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ü";
+ Text[ turkish ] = "Kaydeden";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_COMMENTS
+ {
+ Pos = MAP_APPFONT ( 138 , 51 ) ;
+ Size = MAP_APPFONT ( 60 , 10 ) ;
+ Text = "Kommentar" ;
+ Text [ English ] = "Comments" ;
+ Text [ english_us ] = "Comments" ;
+ Text [ portuguese_brazilian ] = "Kommentar" ;
+ Text [ swedish ] = "Kommentar" ;
+ Text [ danish ] = "Kommentar" ;
+ Text [ italian ] = "Commento" ;
+ Text [ spanish ] = "Comentario" ;
+ Text [ french ] = "Commentaire" ;
+ Text [ dutch ] = "Commentaar" ;
+ Text [ portuguese ] = "Comentrio" ;
+ Text[ chinese_simplified ] = "ע";
+ Text[ russian ] = "";
+ Text[ polish ] = "Komentarz";
+ Text[ japanese ] = "";
+ Text[ chinese_traditional ] = "`";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "Aklama";
+ Text[ language_user1 ] = " ";
+ };
+ Control TLB_VERSIONS
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 12 , 64 ) ;
+ Size = MAP_APPFONT ( 260 , 108 ) ;
+ TabStop = TRUE ;
+ };
+ PushButton PB_CLOSE
+ {
+ Pos = MAP_APPFONT ( 284 , 6 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ Text = "Schlieen" ;
+ Text [ English ] = "Close" ;
+ TabStop = TRUE ;
+ Text [ english_us ] = "~Close" ;
+ Text [ portuguese_brazilian ] = "Schlieen" ;
+ Text [ swedish ] = "Stng" ;
+ Text [ danish ] = "Luk" ;
+ Text [ italian ] = "Chiudi" ;
+ Text [ spanish ] = "Cerrar" ;
+ Text [ french ] = "Fermer" ;
+ Text [ dutch ] = "Sluiten" ;
+ Text [ portuguese ] = "Fechar" ;
+ Text[ chinese_simplified ] = "ر";
+ Text[ russian ] = "";
+ Text[ polish ] = "Zamknij";
+ Text[ japanese ] = "‚";
+ Text[ chinese_traditional ] = "";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "ݱ(~C)";
+ Text[ turkish ] = "Kapat";
+ Text[ language_user1 ] = " ";
+ };
+ PushButton PB_OPEN
+ {
+ Pos = MAP_APPFONT ( 284 , 26 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ Text = "ffnen" ;
+ Text [ English ] = "Open" ;
+ TabStop = TRUE ;
+ Text [ english_us ] = "Open" ;
+ Text [ portuguese_brazilian ] = "ffnen" ;
+ Text [ swedish ] = "ppna" ;
+ Text [ danish ] = "bn" ;
+ Text [ italian ] = "Apri" ;
+ Text [ spanish ] = "Abrir" ;
+ Text [ french ] = "Ouvrir" ;
+ Text [ dutch ] = "Openen" ;
+ Text [ portuguese ] = "Abrir" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "Otwrz";
+ Text[ japanese ] = "J";
+ Text[ chinese_traditional ] = "}";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "A";
+ Text[ language_user1 ] = " ";
+ };
+ PushButton PB_VIEW
+ {
+ Pos = MAP_APPFONT ( 284 , 43 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ Text = "~Anzeigen..." ;
+ Text [ English ] = "~View" ;
+ TabStop = TRUE ;
+ DefButton = TRUE ;
+ Text [ english_us ] = "~Show..." ;
+ Text [ portuguese_brazilian ] = "~Anzeigen..." ;
+ Text [ swedish ] = "Vis~a..." ;
+ Text [ danish ] = "Vis..." ;
+ Text [ italian ] = "~Mostra..." ;
+ Text [ spanish ] = "~Mostrar..." ;
+ Text [ french ] = "~Afficher..." ;
+ Text [ dutch ] = "~Weergeven..." ;
+ Text [ portuguese ] = "~Mostrar..." ;
+ Text[ chinese_simplified ] = "ʾ(~S)...";
+ Text[ russian ] = "...";
+ Text[ polish ] = "Po~ka...";
+ Text[ japanese ] = "\\(~S)...";
+ Text[ chinese_traditional ] = "(~S)...";
+ Text[ arabic ] = "...";
+ Text[ greek ] = "...";
+ Text[ korean ] = "ǥ(~S)...";
+ Text[ turkish ] = "~Grntle...";
+ Text[ language_user1 ] = " ";
+ };
+ PushButton PB_DELETE
+ {
+ Pos = MAP_APPFONT ( 284 , 60 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ Text = "~Lschen" ;
+ Text [ English ] = "~Delete" ;
+ TabStop = TRUE ;
+ Text [ english_us ] = "~Delete" ;
+ Text [ portuguese_brazilian ] = "~Lschen" ;
+ Text [ swedish ] = "~Radera" ;
+ Text [ danish ] = "Slet" ;
+ Text [ italian ] = "~Elimina" ;
+ Text [ spanish ] = "~Eliminar" ;
+ Text [ french ] = "~Supprimer" ;
+ Text [ dutch ] = "~Wissen" ;
+ Text [ portuguese ] = "E~liminar" ;
+ Text[ chinese_simplified ] = "ɾ(~D)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Usu";
+ Text[ japanese ] = "폜(~D)";
+ Text[ chinese_traditional ] = "R(~D)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "(~D)";
+ Text[ turkish ] = "~Sil";
+ Text[ language_user1 ] = " ";
+ };
+ PushButton PB_COMPARE
+ {
+ Pos = MAP_APPFONT ( 284 , 77 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ Text = "Vergleichen" ;
+ Text [ English ] = "Compare" ;
+ TabStop = TRUE ;
+ Text [ english_us ] = "Compare" ;
+ Text [ portuguese_brazilian ] = "Vergleichen" ;
+ Text [ swedish ] = "~Jmfr" ;
+ Text [ danish ] = "Sammenlign" ;
+ Text [ italian ] = "Confronta" ;
+ Text [ spanish ] = "Comparar" ;
+ Text [ french ] = "Comparer" ;
+ Text [ dutch ] = "Vergelijken" ;
+ Text [ portuguese ] = "Comparar" ;
+ Text[ chinese_simplified ] = "Ƚ";
+ Text[ russian ] = "";
+ Text[ polish ] = "Porw~naj";
+ Text[ japanese ] = "r";
+ Text[ chinese_traditional ] = "";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "Karlatr";
+ Text[ language_user1 ] = " ";
+ };
+ HelpButton PB_HELP
+ {
+ Pos = MAP_APPFONT ( 284 , 97 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TabStop = TRUE ;
+ };
+ Text [ portuguese ] = "Verses em" ;
+ Text [ english_us ] = "Versions of" ;
+ Text [ portuguese_brazilian ] = "Versionen in" ;
+ Text [ swedish ] = "Versioner i" ;
+ Text [ danish ] = "Versioner i" ;
+ Text [ italian ] = "Versioni in" ;
+ Text [ spanish ] = "Versiones en" ;
+ Text [ french ] = "Versions de" ;
+ Text [ dutch ] = "Versies in" ;
+ Text[ chinese_simplified ] = "汾";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Wersje w";
+ Text[ japanese ] = "ްޮ";
+ Text[ chinese_traditional ] = "b";
+ Text[ arabic ] = " ";
+ Text[ language_user1 ] = "LS 16.07.99: Erkl?ung laut Help Agent: In der Titelleiste des Dialogs sehen Sie hinter \"Versionen in\" den Dateinamen ohne Pfad oder (wenn gesetzt) den Titel des Dokuments. (z.B. \"Versionen in brief.sdw\". (Warum nicht eher Versionen VON?)";
+ Text[ greek ] = " ";
+ Text[ korean ] = "";
+ Text[ turkish ] = "Mevcut srmler:";
+};
+ModalDialog DLG_COMMENTS
+{
+ OutputSize = TRUE ;
+ Size = MAP_APPFONT ( 180 , 118 ) ;
+ Text = "Versionskommentar eingeben" ;
+ Text [ English ] = "Input version comment" ;
+ SvLook = TRUE ;
+ Moveable = TRUE ;
+ FixedText FT_DATETIME
+ {
+ Pos = MAP_APPFONT ( 6 , 6 ) ;
+ Size = MAP_APPFONT ( 168 , 10 ) ;
+ Text = "Datum und Uhrzeit : " ;
+ Text [ English ] = "Date and time : " ;
+ Text [ english_us ] = "Date and time : " ;
+ Text [ portuguese_brazilian ] = "Datum und Uhrzeit : " ;
+ Text [ swedish ] = "Datum och tid : " ;
+ Text [ danish ] = "Dato og klokkeslt: " ;
+ Text [ italian ] = "Data e ora : " ;
+ Text [ spanish ] = "Fecha y hora: " ;
+ Text [ french ] = "Date et heure : " ;
+ Text [ dutch ] = "Datum en tijd : " ;
+ Text [ portuguese ] = "Data e horas : " ;
+ Text[ chinese_simplified ] = "ںʱ䣺 ";
+ Text[ russian ] = " : ";
+ Text[ polish ] = "Data i godzina : ";
+ Text[ japanese ] = "tƎ: ";
+ Text[ chinese_traditional ] = "MɶG ";
+ Text[ arabic ] = " : ";
+ Text[ greek ] = " : ";
+ Text[ korean ] = "¥ ð : ";
+ Text[ turkish ] = "Tarih ve saat : ";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_SAVEDBY
+ {
+ Pos = MAP_APPFONT ( 6 , 19 ) ;
+ Size = MAP_APPFONT ( 168 , 10 ) ;
+ Text = "gespeichert von " ;
+ Text [ English ] = "Saved by " ;
+ Text [ english_us ] = "Saved by " ;
+ Text [ portuguese_brazilian ] = "gespeichert von " ;
+ Text [ swedish ] = "sparat av " ;
+ Text [ danish ] = "gemt af " ;
+ Text [ italian ] = "salvato da " ;
+ Text [ spanish ] = "guardado por " ;
+ Text [ french ] = "Enregistr par " ;
+ Text [ dutch ] = "opgeslagen door " ;
+ Text [ portuguese ] = "Guardado por " ;
+ Text[ chinese_simplified ] = " ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "zapisany przez ";
+ Text[ japanese ] = "ۑ ";
+ Text[ chinese_traditional ] = "@ ";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ü ";
+ Text[ turkish ] = "Kaydeden ";
+ Text[ language_user1 ] = " ";
+ };
+ MultiLineEdit ME_VERSIONS
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 6 , 32 ) ;
+ Size = MAP_APPFONT ( 168 , 60 ) ;
+ TabStop = TRUE ;
+ };
+ OKButton PB_OK
+ {
+ Pos = MAP_APPFONT ( 15 , 98 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TabStop = TRUE ;
+ DefButton = TRUE ;
+ };
+ CancelButton PB_CANCEL
+ {
+ Pos = MAP_APPFONT ( 68 , 98 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TabStop = TRUE ;
+ };
+ PushButton PB_CLOSE
+ {
+ Pos = MAP_APPFONT ( 68 , 98 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ Text = "~Schlieen" ;
+ Text [ English ] = "~Close" ;
+ TabStop = TRUE ;
+ Text [ english_us ] = "~Close" ;
+ Text [ portuguese_brazilian ] = "~Schlieen" ;
+ Text [ swedish ] = "~Stng" ;
+ Text [ danish ] = "Luk" ;
+ Text [ italian ] = "~Chiudi" ;
+ Text [ spanish ] = "~Cerrar" ;
+ Text [ french ] = "~Fermer" ;
+ Text [ dutch ] = "~Sluiten" ;
+ Text [ portuguese ] = "~Fechar" ;
+ Text[ chinese_simplified ] = "ر(~C)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Zamknij";
+ Text[ japanese ] = "‚(~C)";
+ Text[ chinese_traditional ] = "(~C)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "ݱ(~C)";
+ Text[ turkish ] = "~Kapat";
+ Text[ language_user1 ] = " ";
+ };
+ HelpButton PB_HELP
+ {
+ Pos = MAP_APPFONT ( 124 , 98 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TabStop = TRUE ;
+ };
+ Text [ english_us ] = "Insert Version Comment" ;
+ Text [ portuguese_brazilian ] = "Versionskommentar eingeben" ;
+ Text [ swedish ] = "Mata in versionskommentar" ;
+ Text [ danish ] = "Indst versionskommentar" ;
+ Text [ italian ] = "Inserisci commento versioni" ;
+ Text [ spanish ] = "Escribir comentario sobre la versin" ;
+ Text [ french ] = "Saisie du commentaire de version (facultatif)" ;
+ Text [ dutch ] = "Versiecommentaar invoeren" ;
+ Text [ portuguese ] = "Inserir comentrio sobre verso" ;
+ Text[ chinese_simplified ] = "汾ע";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Wprowad komentarz do wersji";
+ Text[ japanese ] = "ްޮݺĂ̓";
+ Text[ chinese_traditional ] = "J`";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " Է";
+ Text[ turkish ] = "Srm aklamas ekle";
+ Text[ language_user1 ] = " ";
+};
+String DLG_COMMENTS
+{
+ Text = "Versionskommentar" ;
+ Text [ English ] = "Version comment" ;
+ Text [ portuguese ] = "Comentrio sobre verso" ;
+ Text [ english_us ] = "Version comment" ;
+ Text [ portuguese_brazilian ] = "Versionskommentar" ;
+ Text [ swedish ] = "Versionskommentar" ;
+ Text [ danish ] = "Versionskommentar" ;
+ Text [ italian ] = "Commento versioni" ;
+ Text [ spanish ] = "Comentario sobre la versin" ;
+ Text [ french ] = "Commentaire de version" ;
+ Text [ dutch ] = "Versiecommentaar" ;
+ Text[ chinese_simplified ] = "汾ע";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Komentarz do wersji";
+ Text[ japanese ] = "ްޮݺ";
+ Text[ chinese_traditional ] = "`";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ";
+ Text[ turkish ] = "Srm aklamas";
+ Text[ language_user1 ] = " ";
+};
diff --git a/sfx2/source/doc/doc.hrc b/sfx2/source/doc/doc.hrc
new file mode 100644
index 000000000000..73e672160d9f
--- /dev/null
+++ b/sfx2/source/doc/doc.hrc
@@ -0,0 +1,178 @@
+/*************************************************************************
+ *
+ * $RCSfile: doc.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:32 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SFX_DOC_HRC
+#define _SFX_DOC_HRC
+
+#include "sfx.hrc"
+
+// #defines *****************************************************************
+
+#define STR_NODEFPRINTER (RID_SFX_DOC_START+ 0)
+#define STR_PRINTER_NOTAVAIL_1 (RID_SFX_DOC_START+ 1)
+#define STR_PRINTER_NOTAVAIL_2 (RID_SFX_DOC_START+ 2)
+#define STR_PRINTER_NOTAVAIL_3 (RID_SFX_DOC_START+ 3)
+#define STR_PRINTER_NOTAVAIL_4 (RID_SFX_DOC_START+ 4)
+#define STR_PRINTER_NOTAVAIL_5 (RID_SFX_DOC_START+ 5)
+#define STR_PRINT_OPTIONS (RID_SFX_DOC_START+ 6)
+#define STR_ERROR_PRINTER_BUSY (RID_SFX_DOC_START+ 7)
+#define STR_NOSTARTPRINTER (RID_SFX_DOC_START+ 8)
+#define MSG_CONFIRM_FILTER (RID_SFX_DOC_START+11)
+#define MSG_CONFIRM_OVERWRITE_TEMPLATE (RID_SFX_DOC_START+12)
+#define MSG_QUERY_LOAD_TEMPLATE (RID_SFX_DOC_START+13)
+
+#define STR_DELETE_REGION (RID_SFX_DOC_START+14)
+#define STR_DELETE_TEMPLATE (RID_SFX_DOC_START+15)
+#define MSG_REGION_NOTEMPTY (RID_SFX_DOC_START+17)
+
+#define DLG_NEW_FILE (RID_SFX_DOC_START+1)
+#define DLG_DOC_TEMPLATE (RID_SFX_DOC_START+2)
+#define DLG_ORGANIZE (RID_SFX_DOC_START+3)
+
+#define BMP_STYLES_CLOSED (RID_SFX_DOC_START+ 0)
+#define BMP_STYLES_OPENED (RID_SFX_DOC_START+ 1)
+
+#define BMP_STYLES_FAMILY1 (RID_SFX_DOC_START+ 2)
+#define BMP_STYLES_FAMILY2 (RID_SFX_DOC_START+ 3)
+#define BMP_STYLES_FAMILY3 (RID_SFX_DOC_START+ 4)
+#define BMP_STYLES_FAMILY4 (RID_SFX_DOC_START+ 5)
+
+#define STR_STYLES (RID_SFX_DOC_START+ 18)
+#define STR_MACROS (RID_SFX_DOC_START+ 19)
+
+#define STR_PRINT_STYLES (RID_SFX_DOC_START+ 20)
+#define STR_PRINT_STYLES_HEADER (RID_SFX_DOC_START+ 21)
+#define MSG_PRINT_ERROR (RID_SFX_DOC_START+ 22)
+#define STR_BACKUP_COPY (RID_SFX_DOC_START+ 23)
+#define MSG_WARNING_BACKUP (RID_SFX_DOC_START+ 24)
+#define MSG_CANT_OPEN_TEMPLATE (RID_SFX_DOC_START+ 25)
+#define MSG_VIEW_OPEN_CANT_SAVE (RID_SFX_DOC_START+ 26)
+#define STR_ERROR_SAVE (RID_SFX_DOC_START+ 27)
+#define STR_TEMPLATE_FILTER (RID_SFX_DOC_START+ 28)
+#define STR_ERROR_COPY_TEMPLATE (RID_SFX_DOC_START+ 29)
+
+#define STR_ERROR_DELETE_TEMPLATE (RID_SFX_DOC_START+ 30)
+#define STR_ERROR_MOVE_TEMPLATE (RID_SFX_DOC_START+ 32)
+#define MSG_ERROR_RESCAN (RID_SFX_DOC_START+ 33)
+#define STR_ERROR_SAVE_TEMPLATE (RID_SFX_DOC_START+ 34)
+#define MSG_ERROR_RENAME_TEMPLATE (RID_SFX_DOC_START+ 34)
+#define MSG_ERROR_RENAME_TEMPLATE_REGION (RID_SFX_DOC_START+ 35)
+#define STR_CONFIG (RID_SFX_DOC_START+ 37)
+#define MSG_ERROR_EMPTY_NAME (RID_SFX_DOC_START+ 37)
+#define MSG_ERROR_UNIQ_NAME (RID_SFX_DOC_START+ 38)
+#define STR_QUERY_DEFAULT_TEMPLATE (RID_SFX_DOC_START+ 39)
+#define MSG_QUERY_RESET_DEFAULT_TEMPLATE (RID_SFX_DOC_START+ 39)
+#define MSG_TEMPLATE_DIR_NOT_EXIST (RID_SFX_DOC_START+ 40)
+#define MSG_DOCINFO_CANTREAD (RID_SFX_DOC_START+ 41)
+#define STR_ERROR_NOSTORAGE (RID_SFX_DOC_START+ 42)
+#define STR_QUERY_SAVEOWNFORMAT (RID_SFX_DOC_START+ 43)
+#define STR_QUERY_MUSTOWNFORMAT (RID_SFX_DOC_START+ 44)
+#define STR_SAVEDOC (RID_SFX_DOC_START+ 45)
+#define STR_UPDATEDOC (RID_SFX_DOC_START+ 46)
+#define STR_SAVEASDOC (RID_SFX_DOC_START+ 47)
+#define STR_SAVECOPYDOC (RID_SFX_DOC_START+ 48)
+#define STR_CLOSEDOC (RID_SFX_DOC_START+ 49)
+#define STR_CLOSEDOC_ANDRETURN (RID_SFX_DOC_START+ 50)
+#define STR_WIZARD (RID_SFX_DOC_START+ 51)
+#define RID_STR_FILTCONFIG (RID_SFX_DOC_START+ 52)
+#define RID_STR_FILTBASIC (RID_SFX_DOC_START+ 53)
+#define RID_STR_WARNSTYLEOVERWRITE (RID_SFX_DOC_START+ 54)
+#define RID_DLSTATUS (RID_SFX_DOC_START+ 55)
+#define RID_DLSTATUS2 (RID_SFX_DOC_START+ 56)
+
+#define STR_DOC_LOADING (RID_SFX_DOC_START+ 57)
+#define MSG_OPEN_READONLY (RID_SFX_DOC_START+ 58)
+
+#define RID_OFFICEFILTER (RID_SFX_DOC_START+ 59)
+#define RID_OFFICEFILTER_WILDCARD (RID_SFX_DOC_START+ 60)
+#define RID_OFFICEFILTER_MACTYPE (RID_SFX_DOC_START+ 61)
+#define RID_OFFICEFILTER_OS2TYPE (RID_SFX_DOC_START+ 62)
+#define STR_FRAMEOBJECT_PROPERTIES (RID_SFX_DOC_START+ 63)
+
+#define STR_FSET_FILTERNAME0 (RID_SFX_DOC_START+ 64)
+#define STR_FSET_FILTERNAME1 (RID_SFX_DOC_START+ 65)
+
+#define STR_TEMPL_MOVED (RID_SFX_DOC_START+ 66)
+#define STR_TEMPL_RESET (RID_SFX_DOC_START+ 67)
+#define STR_AUTOMATICVERSION (RID_SFX_DOC_START+ 68)
+
+#define STR_DOCTYPENAME_SW (RID_SFX_DOC_START+ 69)
+#define STR_DOCTYPENAME_SWWEB (RID_SFX_DOC_START+ 70)
+#define STR_DOCTYPENAME_SWGLOB (RID_SFX_DOC_START+ 71)
+#define STR_DOCTYPENAME_SC (RID_SFX_DOC_START+ 72)
+#define STR_DOCTYPENAME_SI (RID_SFX_DOC_START+ 73)
+#define STR_DOCTYPENAME_SD (RID_SFX_DOC_START+ 74)
+#define STR_DOCTYPENAME_MESSAGE (RID_SFX_DOC_START+ 75)
+#define RID_STR_NEW_TASK (RID_SFX_DOC_START+ 76)
+
+#define STR_SAVEANDCLOSE (RID_SFX_DOC_START+ 77)
+#define STR_NOSAVEANDCLOSE (RID_SFX_DOC_START+ 78)
+#define STR_PACKNGO_NOACCESS (RID_SFX_DOC_START+ 79)
+#define STR_PACKNGO_NEWMEDIUM (RID_SFX_DOC_START+ 80)
+
+#define DLOAD_URL 1
+#define DLOAD_STATUS 2
+#define DLOAD_NAME 3
+#define DLOAD_TEXT 4
+#define DLOAD_CANCEL 1
+
+
+#endif
+
diff --git a/sfx2/source/doc/doc.src b/sfx2/source/doc/doc.src
new file mode 100644
index 000000000000..f54c436fa449
--- /dev/null
+++ b/sfx2/source/doc/doc.src
@@ -0,0 +1,2066 @@
+/*************************************************************************
+ *
+ * $RCSfile: doc.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:32 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#include "sfx.hrc"
+#include "doc.hrc"
+#define __RSC
+#include <svtools/inetdef.hxx>
+#include <so3/so2defs.hxx>
+
+ // -----------------------------------------------------------------------
+QueryBox MSG_CONFIRM_FILTER
+{
+ Buttons = WB_YES_NO ;
+ DefButton = WB_DEF_YES ;
+ Message = "Beim Speichern in Fremdformate kann ein\nInformationsverlust aufgetreten sein. Trotzdem schlieen?" ;
+ Message [ English ] = "Saving in foreign formats might have caused\nlossage of information. Close anyway?" ;
+ Message [ norwegian ] = "Lagring i ukjent format kan forrsake\ntap av informasjon." ;
+ Message [ italian ] = "Salvare in formati estranei pu causare\nla perdita di informazioni. Chiudere lo stesso?" ;
+ Message [ portuguese_brazilian ] = "Gravar em formatos estrangeiros poder provocar \na perda de Informaes." ;
+ Message [ portuguese ] = "Ao guardar em formatos estranhos poder provocar \na perda de informaes. Mesmo assim, guardar?" ;
+ Message [ finnish ] = "Tallentaminen vieraaseen muotoon voi\naiheuttaa tietojen katoamista." ;
+ Message [ danish ] = "Lagring i fremmedformater kan have forrsaget\ninformationstab. Vil du lukke alligevel?" ;
+ Message [ french ] = "L'enregistrement dans un format externe peut entraner\nune perte de certaines informations. Voulez-vous vraiment poursuivre ?" ;
+ Message [ swedish ] = "Sparar Du i ett frmmande format kan\ninformation g frlorad. Stnga nd?" ;
+ Message [ dutch ] = "Bij het opslaan in een extern formaat kan\ninformatie verloren gegaan zijn. Toch sluiten?" ;
+ Message [ spanish ] = "Al guardar en formatos extraos podra haberse provocado una prdida\nde informacin. Desea cerrar de todas formas?" ;
+ Message [ english_us ] = "Saving in external formats may have caused\n information loss. Do you still want to close?" ;
+ Message[ chinese_simplified ] = "ļ̳һĸʽʱ\nܻʧϢ\nҪرļ";
+ Message[ russian ] = " \n . ?";
+ Message[ polish ] = "Podczas zapisu w obcych formatach n\nmoe doj do utraty informacji. Mimo to zamkn?";
+ Message[ japanese ] = "Oŕۑ\n񂪎”\\܂B‚Ă낵ł?";
+ Message[ chinese_traditional ] = "bxs@ӥ~Ӫ榡\nTi|yC\n٬OnoӤH";
+ Message[ arabic ] = " \n . ߿";
+ Message[ dutch ] = "Bij het opslaan in een extern formaat kan\ninformatie verloren gegaan zijn. Toch sluiten?";
+ Message[ chinese_simplified ] = "ļ̳һĸʽʱ\nܻʧϢ\nҪرļ";
+ Message[ greek ] = " \n . ;";
+ Message[ korean ] = "ܺ \n սǵ ֽϴ. ׷ ðڽϱ?";
+ Message[ turkish ] = "Yabanc formatla kaydederken verin\nkayb olumu olabilir. Yine de kapatmak istiyor musunuz?";
+ Message[ language_user1 ] = " ";
+};
+QueryBox MSG_CONFIRM_OVERWRITE_TEMPLATE
+{
+ Buttons = WB_YES_NO ;
+ DefButton = WB_DEF_NO ;
+ Message = "Es existiert bereits eine Vorlage mit diesem Namen.\nSoll sie berschrieben werden?" ;
+ Message [ English ] = "Name already in use.\nOverride document template?" ;
+ Message [ norwegian ] = "Navnet er allerede i bruk.\nIgnorer dokumentmal?" ;
+ Message [ italian ] = "Nome gi in uso.\nSovrascrivere il modello di documento?" ;
+ Message [ portuguese_brazilian ] = "Nome j em uso.\nSobregravar o modelo do documento?" ;
+ Message [ portuguese ] = "J existe um modelo com este nome.\nSobregravar o modelo do documento?" ;
+ Message [ finnish ] = "Nimi on jo kytss.\nOhitetaanko asiakirjamalli?" ;
+ Message [ danish ] = "Der eksisterer allerede et dokument med dette navn.\nSkal det erstattes?" ;
+ Message [ french ] = "Un modle de ce nom existe dj.\nRemplacer le modle existant ?" ;
+ Message [ swedish ] = "Det finns redan en mall med det hr namnet.\nVill Du skriva ver den?" ;
+ Message [ dutch ] = "Er bestaat reeds een sjabloon met deze naam.\nOverschrijven?" ;
+ Message [ spanish ] = "Ya existe una plantilla con este nombre.\nDesea sobrescribirla?" ;
+ Message [ english_us ] = "Name already in use.\nDo you want to overwrite document template?" ;
+ Message[ chinese_simplified ] = "һͬʽѾڡ\nҪд";
+ Message[ russian ] = " .\n?";
+ Message[ polish ] = "Ju istnieje szablon o tej nazwie.\nCzy go zastpi innym?";
+ Message[ japanese ] = "łɂ̖OڰĂ܂B\n㏑Ă낵ł?";
+ Message[ chinese_traditional ] = "@ӦPW˦wgsbC\nznмgH";
+ Message[ arabic ] = " .\n ";
+ Message[ dutch ] = "Er bestaat reeds een sjabloon met deze naam.\nOverschrijven?";
+ Message[ chinese_simplified ] = "һͬʽѾڡ\nҪд";
+ Message[ greek ] = " .\n ;";
+ Message[ korean ] = " ̸ ̹ ֽϴ.\n ðڽϱ?";
+ Message[ turkish ] = "Ayn ad tayan bir ablon zaten mevcut.\nBu ablonun zerine yazlsn m?";
+ Message[ language_user1 ] = " ";
+};
+QueryBox MSG_QUERY_LOAD_TEMPLATE
+{
+ BUTTONS = WB_YES_NO ;
+ DEFBUTTON = WB_DEF_NO ;
+ HelpId = MSG_QUERY_LOAD_TEMPLATE;
+
+ MESSAGE = "Die Formatvorlagen dieses Dokuments stimmen nicht mit Ihren aktuellen Vorlagen berein. Sollen Ihre aktuellen Vorlagen auf dieses Dokument angewendet werden?" ;
+ MESSAGE [ English ] = "Die Formatvorlagen dieses Dokuments stimmen nicht mit Ihren aktuellen Vorlagen berein. Sollen Ihre aktuellen Vorlagen auf dieses Dokument angewendet werden?" ;
+ MESSAGE[ english_us ] = "The Styles in this document do not match your current Styles. Should your current Styles be applied to this document?";
+ MESSAGE[ portuguese ] = "Os estilos de formato deste documento no coincidem com os estilos actuais. Aplicar os seus estilos actuais a este documento?";
+ MESSAGE[ russian ] = " .\n ?";
+ MESSAGE[ dutch ] = "De sjablonen bij dit document komen niet overeen met uw actuele sjablonen. Wilt u dat uw actuele sjablonen op dit documentworden toegepast?";
+ MESSAGE[ french ] = "Les styles de format utiliss dans ce document ne concordent pas avec les styles actifs.\nSouhaitez-vous appliquer les styles actifs dans ce document ?";
+ MESSAGE[ spanish ] = "Los estilos de este documento no coinciden con sus estilos actuales.\nDesea aplicar sus estilos actuales a este documento?";
+ MESSAGE[ italian ] = "I modelli del documento non corrispondono ai modelli attuali.\nApplicare i modelli attuali al documento?";
+ MESSAGE[ danish ] = "Dette dokuments formattypografi svarer ikke til din aktuelle skabelon. Skal den aktuelle skabelon anvendes p dette dokument?";
+ MESSAGE[ swedish ] = "Det hr dokumentets formatmall stmmer inte verens med den aktuella mallen. Skall Din aktuella mall anvndas i det hr dokumentet?";
+ MESSAGE[ polish ] = "Style formatu w tym dokumencie nie zgadzaj si z aktualnymi szablonami.\nCzy zastosowa twoje aktualne szablony do tego dokumentu?";
+ MESSAGE[ portuguese_brazilian ] = "O modelo do documento foi modificado.\nDeseja atualizar o modelo no documento?";
+ MESSAGE[ japanese ] = "޷Ă̏ق݂͌̽قƈv܂B\n݂̽ق޷ĂɓKp܂H";
+ MESSAGE[ chinese_simplified ] = "ĵĸʽʽѾġ\nҪõǰʽдĵ";
+ MESSAGE[ chinese_traditional ] = "oɮ׼˦wgܧC\nznsoӼ˦H";
+ MESSAGE[ arabic ] = " . Ͽ";
+ MESSAGE[ dutch ] = "De sjablonen bij dit document komen niet overeen met uw actuele sjablonen. Wilt u dat uw actuele sjablonen op dit documentworden toegepast?";
+ MESSAGE[ chinese_simplified ] = "ĵĸʽʽѾġ\nҪõǰʽдĵ";
+ MESSAGE[ greek ] = " . ;";
+ MESSAGE[ korean ] = " ġ ʽϴ. Ͻðڽϱ?";
+ MESSAGE[ turkish ] = "Bu belgenin biimleri, yrrlkteki biimlerle rtmyor. Yrrlkteki biimler bu belgenize uygulansn m?";
+ MESSAGE[ language_user1 ] = " ";
+};
+String STR_DELETE_REGION
+{
+ TEXT = "Soll der Bereich \"$1\" gelscht werden?" ;
+ TEXT [ English ] = "Delete region \"$1\"?" ;
+ Text [ english_us ] = "Are you sure you want to delete the region \"$1\"?" ;
+ Text [ portuguese_brazilian ] = "Apagar regiao" ;
+ Text [ swedish ] = "Skall omrdet \"$1\" raderas?" ;
+ Text [ danish ] = "Er du sikker p, at du vil slette omrdet \"$1\"?" ;
+ Text [ italian ] = "Eliminare la categoria \"$1\"?" ;
+ Text [ spanish ] = "Desea eliminar el rea \"$1\"?" ;
+ Text [ french ] = "Voulez-vous vraiment supprimer la catgorie $1?" ;
+ Text [ dutch ] = "Wilt u het bereik \"$1\" wissen?" ;
+ Text [ portuguese ] = "Eliminar realmente a categoria \"$1\"?" ;
+ Text[ chinese_simplified ] = "Ҫɾ $1 ";
+ Text[ russian ] = " \"$1\"?";
+ Text[ polish ] = "Czy usun obszar \"$1\"?";
+ Text[ japanese ] = "͈\"$1\"폜܂?";
+ Text[ chinese_traditional ] = "nRoӰϰ $1H";
+ Text[ arabic ] = " \"$1\"";
+ Text[ dutch ] = "Wilt u het bereik \"$1\" wissen?";
+ Text[ chinese_simplified ] = "Ҫɾ $1 ";
+ Text[ greek ] = " $1?";
+ Text[ korean ] = "$1 Ͻðڽϱ?";
+ Text[ turkish ] = "\"$1\" blm silinsin mi?";
+ Text[ language_user1 ] = " ";
+};
+String STR_DELETE_TEMPLATE
+{
+ TEXT = "Soll der Eintrag \"$1\" gelscht werden?" ;
+ TEXT [ English ] = "Delete entry \"$1\"?" ;
+ Text [ english_us ] = "Are you sure you want to delete the entry \"$1\"?" ;
+ Text [ portuguese_brazilian ] = "Apagar modelo" ;
+ Text [ swedish ] = "Skall posten \"$1\" raderas?" ;
+ Text [ danish ] = "Er du sikker p, at du vil slette elementet \"$1\"?" ;
+ Text [ italian ] = "Volete eliminare la voce \"$1\"?" ;
+ Text [ spanish ] = "Desea eliminar la entrada \"$1\"?" ;
+ Text [ french ] = "Voulez-vous vraiment supprimer l'entre $1?" ;
+ Text [ dutch ] = "Wilt u item \"$1\" wissen?" ;
+ Text [ portuguese ] = "Deseja realmente eliminar a entrada \"$1\"?" ;
+ Text[ chinese_simplified ] = "ҪɾĿ $1 ";
+ Text[ russian ] = " \"$1\"?";
+ Text[ polish ] = "Usun wpis \"$1\"?";
+ Text[ japanese ] = "͍\"$1\"폜܂?";
+ Text[ chinese_traditional ] = "nRoӶ $1 H";
+ Text[ arabic ] = " \"$1\"";
+ Text[ dutch ] = "Wilt u item \"$1\" wissen?";
+ Text[ chinese_simplified ] = "ҪɾĿ $1 ";
+ Text[ greek ] = " $1;";
+ Text[ korean ] = "׸$1 Ͻðڽϱ?";
+ Text[ turkish ] = "\"$1\" girii silinsin mi?";
+ Text[ language_user1 ] = " ";
+};
+QueryBox MSG_REGION_NOTEMPTY
+{
+ Buttons = WB_YES_NO ;
+ DefButton = WB_DEF_NO ;
+ Message = "Der Bereich ist nicht leer.\nTrotzdem lschen?" ;
+ Message [ English ] = "Region not empty.\nDelete anyway?" ;
+ Message [ norwegian ] = "Omrdet er ikke tomt.\nSlett likevel?" ;
+ Message [ italian ] = "L'area non vuota.\nVolete eliminarla lo stesso?" ;
+ Message [ portuguese_brazilian ] = "Regiao no est vazia.\nApagar de qualquer modo?" ;
+ Message [ portuguese ] = "A categoria no est vazia.\nMesmo assim, eliminar?" ;
+ Message [ finnish ] = "Alue ei ole tyhj.\nPoistetaanko se silti?" ;
+ Message [ danish ] = "Omrdet er ikke tomt.\nVil du slette alligevel?" ;
+ Message [ french ] = "La catgorie n'est pas vide.\nSupprimer quand mme ?" ;
+ Message [ swedish ] = "Omrdet r ej tomt.\nRadera nd?" ;
+ Message [ dutch ] = "Het bereik is niet leeg.\nToch verwijderen?" ;
+ Message [ spanish ] = "El rea no est vaca.\nDesea eliminarla de todas formas?" ;
+ Message [ english_us ] = "The category is not empty.\nDelete anyway?" ;
+ Message[ chinese_simplified ] = "ݡ\nҪɾ";
+ Message[ russian ] = " .\n ?";
+ Message[ polish ] = "Obszar nie jest pusty.\nMimo to usun?";
+ Message[ japanese ] = "͈͂͋ł͂܂B\nł폜܂?";
+ Message[ chinese_traditional ] = "oӰϰtơC\n٬OnRH";
+ Message[ arabic ] = " .\n ߿";
+ Message[ dutch ] = "Het bereik is niet leeg.\nToch verwijderen?";
+ Message[ chinese_simplified ] = "ݡ\nҪɾ";
+ Message[ greek ] = " .\n ;";
+ Message[ korean ] = " ʽϴ.\n׷ Ͻðڽϱ?";
+ Message[ turkish ] = "Kategori bo deil.\nYine de silinsin mi?";
+ Message[ language_user1 ] = " ";
+};
+String STR_QUERY_SAVE_DOCUMENT
+{
+ Text = "Das Dokument \"$(DOC)\" wurde gendert.\nSollen die nderungen gespeichert werden?" ;
+ Text [ English ] = "The Document \"$(DOC)\" has been modified.\nDo you want to save your changes?" ;
+ Text [ norwegian ] = "Dokumentet \"$(DOC)\" har blitt endret.\nVil du lagre endringene dine?" ;
+ Text [ italian ] = "Il documento \"$(DOC)\" stato modificato.\nVolete salvare le modifiche?" ;
+ Text [ portuguese_brazilian ] = "O documento '$(DOC)' foi modificado.\nDeseja gravar as modificaes?" ;
+ Text [ portuguese ] = "O documento \"$(DOC)\" foi modificado.\nGuardar modificaes?" ;
+ Text [ finnish ] = "Asiakirjaa \"$(DOC)\" on muokattu.\nTallennetaanko muutokset?" ;
+ Text [ danish ] = "Dokumentet \"$(DOC)\" er blevet ndret.\nSkal ndringerne gemmes?" ;
+ Text [ french ] = "Le document '$(DOC)' a t modifi.\nSouhaitez-vous enregistrer les modifications apportes ?" ;
+ Text [ swedish ] = "Dokumentet \"$(DOC)\" har ndrats.\nSkall ndringarna sparas?" ;
+ Text [ dutch ] = "Het document \"$(DOC)\" is gewijzigd.\nWilt u uw wijzigingen opslaan?" ;
+ Text [ spanish ] = "El documento \"$(DOC)\" ha sido modificado.\nDesea guardar las modificaciones?" ;
+ Text [ english_us ] = "The document \"$(DOC)\" has been modified.\nDo you want to save your changes?" ;
+ Text[ chinese_simplified ] = "ĵ$(DOC)Ѿ޸ġ\nҪЩ";
+ Text[ russian ] = " '$(DOC)' .\n ?";
+ Text[ polish ] = "Zmieniono dokument \"$(DOC)\".\nCzy zapisa zmiany?";
+ Text[ japanese ] = "޷\"$(DOC)\"͕ύXĂ܂B\nύXۑ܂?";
+ Text[ chinese_traditional ] = "oӤ$(DOC)wgܧC\nnxsoܧH";
+ Text[ arabic ] = " \"$(DOC)\".\n ʿ";
+ Text[ dutch ] = "Het document \"$(DOC)\" is gewijzigd.\nWilt u uw wijzigingen opslaan?";
+ Text[ chinese_simplified ] = "ĵ$(DOC)Ѿ޸ġ\nҪЩ";
+ Text[ greek ] = " '$(DOC)' .\n ;";
+ Text[ korean ] = "'$(DOC)' Ǿϴ.\n Ͻðڽϱ?";
+ Text[ turkish ] = "Belge \"$(DOC)\" deitirildi.\nDeiiklikler kaydedilsin mi?";
+};
+Bitmap BMP_STYLES_CLOSED { File = "newex.bmp" ; };
+Bitmap BMP_STYLES_OPENED { File = "newex.bmp" ; };
+String STR_STYLES
+{
+ Text = "Vorlagen" ;
+ Text [ English ] = "Styles" ;
+ Text [ norwegian ] = "Styles" ;
+ Text [ italian ] = "Modelli" ;
+ Text [ portuguese_brazilian ] = "Estilos" ;
+ Text [ portuguese ] = "Estilos" ;
+ Text [ finnish ] = "Tyylit" ;
+ Text [ danish ] = "Typografier" ;
+ Text [ french ] = "Styles" ;
+ Text [ swedish ] = "Mallar" ;
+ Text [ dutch ] = "Opmaakprofielen" ;
+ Text [ spanish ] = "Estilos" ;
+ Text [ english_us ] = "Styles" ;
+ Text[ chinese_simplified ] = "ʽ";
+ Text[ russian ] = "";
+ Text[ polish ] = "Style";
+ Text[ japanese ] = "";
+ Text[ chinese_traditional ] = "˦";
+ Text[ arabic ] = "";
+ Text[ dutch ] = "Opmaakprofielen";
+ Text[ chinese_simplified ] = "ʽ";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "Biimler";
+ Text[ language_user1 ] = " ";
+};
+String STR_MACROS
+{
+ Text = "Makros" ;
+ Text [ English ] = "Macros" ;
+ Text [ norwegian ] = "Makroer" ;
+ Text [ italian ] = "Macro" ;
+ Text [ portuguese_brazilian ] = "Macros" ;
+ Text [ portuguese ] = "Macros" ;
+ Text [ finnish ] = "Makrot" ;
+ Text [ danish ] = "Makroer" ;
+ Text [ french ] = "Macros" ;
+ Text [ swedish ] = "Makron" ;
+ Text [ dutch ] = "Macro's" ;
+ Text [ spanish ] = "Macros" ;
+ Text [ english_us ] = "Macros" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "Makra";
+ Text[ japanese ] = "ϸ";
+ Text[ chinese_traditional ] = "";
+ Text[ arabic ] = " ";
+ Text[ dutch ] = "Macro's";
+ Text[ chinese_simplified ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "ũ";
+ Text[ turkish ] = "Makro";
+ Text[ language_user1 ] = " ";
+};
+String STR_CONFIG
+{
+ Text = "Konfiguration" ;
+ Text [ English ] = "Configuration" ;
+ Text [ norwegian ] = "Konfigurasjon" ;
+ Text [ italian ] = "Configurazione" ;
+ Text [ portuguese_brazilian ] = "Configurao" ;
+ Text [ portuguese ] = "Configurao" ;
+ Text [ finnish ] = "Asetukset" ;
+ Text [ danish ] = "Konfiguration" ;
+ Text [ french ] = "Paramtres" ;
+ Text [ swedish ] = "Konfiguration" ;
+ Text [ dutch ] = "Configuratie" ;
+ Text [ spanish ] = "Configuracin" ;
+ Text [ english_us ] = "Configuration" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "Konfiguracja";
+ Text[ japanese ] = "ݒ";
+ Text[ chinese_traditional ] = "tm";
+ Text[ arabic ] = "";
+ Text[ dutch ] = "Configuratie";
+ Text[ chinese_simplified ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "Konfigrasyon";
+ Text[ language_user1 ] = " ";
+};
+String STR_PRINT_STYLES_HEADER
+{
+ Text = "Formatvorlagen in " ;
+ Text [ English ] = "Styles in " ;
+ Text [ norwegian ] = "Stiler i " ;
+ Text [ italian ] = "Modelli in " ;
+ Text [ portuguese_brazilian ] = "Estilos em " ;
+ Text [ portuguese ] = "Estilos em " ;
+ Text [ finnish ] = "Tyylit: " ;
+ Text [ danish ] = "Formattypografi i " ;
+ Text [ french ] = "Styles dans " ;
+ Text [ swedish ] = "Formatmallar i " ;
+ Text [ dutch ] = "Opmaakprofielen in " ;
+ Text [ spanish ] = "Estilos en " ;
+ Text [ english_us ] = "Styles in " ;
+ Text[ chinese_simplified ] = "ʽʽ ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Style formatu w ";
+ Text[ japanese ] = " ";
+ Text[ chinese_traditional ] = "榡˦b ";
+ Text[ arabic ] = " ";
+ Text[ dutch ] = "Opmaakprofielen in ";
+ Text[ chinese_simplified ] = "ʽʽ ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ";
+ Text[ turkish ] = "Biimler: ";
+ Text[ language_user1 ] = " ";
+};
+String STR_PRINT_STYLES
+{
+ Text = "Drucke Formatvorlagen" ;
+ Text [ English ] = "Printing styles" ;
+ Text [ norwegian ] = "Utskriftsstil" ;
+ Text [ italian ] = "Stampa modelli" ;
+ Text [ portuguese_brazilian ] = "Estilos de impresso" ;
+ Text [ portuguese ] = "Estilos de impresso" ;
+ Text [ finnish ] = "Tyylien tulostus" ;
+ Text [ danish ] = "Udskriver formattypografier" ;
+ Text [ french ] = "Impression des styles" ;
+ Text [ swedish ] = "Skriver ut formatmallar" ;
+ Text [ dutch ] = "Opmaakprofielen afdrukken" ;
+ Text [ spanish ] = "Imprimiento estilos de impresin" ;
+ Text [ english_us ] = "Printing Styles" ;
+ Text[ chinese_simplified ] = "ӡʽʽ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Drukuj style formatu";
+ Text[ japanese ] = "";
+ Text[ chinese_traditional ] = "CL榡˦";
+ Text[ arabic ] = " ";
+ Text[ dutch ] = "Opmaakprofielen afdrukken";
+ Text[ chinese_simplified ] = "ӡʽʽ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " μ";
+ Text[ turkish ] = "Biimler yazdrlyor";
+ Text[ language_user1 ] = " ";
+};
+Bitmap BMP_STYLES_FAMILY1 { File = "styfam1.bmp" ; };
+Bitmap BMP_STYLES_FAMILY2 { File = "styfam2.bmp" ; };
+Bitmap BMP_STYLES_FAMILY3 { File = "styfam3.bmp" ; };
+Bitmap BMP_STYLES_FAMILY4 { File = "styfam4.bmp" ; };
+ErrorBox MSG_PRINT_ERROR
+{
+ BUTTONS = WB_OK ;
+ DEFBUTTON = WB_DEF_OK ;
+ Message = "Der Druckvorgang konnte nicht gestartet werden." ;
+ Message [ ENGLISH ] = "The print job couldn't be started." ;
+ Message [ norwegian ] = "Utskriftsjobben kunne ikke startes." ;
+ Message [ italian ] = "Non stato possibile avviare il lavoro di stampa." ;
+ Message [ portuguese_brazilian ] = "O servio de impresso no pode ser iniciado." ;
+ Message [ portuguese ] = "Impossvel iniciar a impresso." ;
+ Message [ finnish ] = "Tulostustyt ei voi aloittaa." ;
+ Message [ danish ] = "Det var ikke muligt at starte udskrivningen." ;
+ Message [ french ] = "Le travail d'impression n'a pas pu tre lanc." ;
+ Message [ swedish ] = "Utskriftsarbetet kunde inte pbrjas." ;
+ Message [ dutch ] = "De afdrukopdracht kan niet worden gestart." ;
+ Message [ spanish ] = "No se pudo inicializar la impresin." ;
+ Message [ english_us ] = "The print job could not be started." ;
+ Message[ chinese_simplified ] = "޷ӡ";
+ Message[ russian ] = " .";
+ Message[ polish ] = "Zadanie wydruku nie mogo zosta rozpoczte.";
+ Message[ japanese ] = "͊Jnł܂łB";
+ Message[ chinese_traditional ] = "LkCLާ@C";
+ Message[ arabic ] = " ";
+ Message[ dutch ] = "De afdrukopdracht kan niet worden gestart.";
+ Message[ chinese_simplified ] = "޷ӡ";
+ Message[ greek ] = " .";
+ Message[ korean ] = "μ ۾ ߽ϴ.";
+ Message[ turkish ] = "Yazdrma ilemi balatlamad.";
+ Message[ language_user1 ] = " ";
+};
+String STR_BACKUP_COPY
+{
+ Text = " Kopie" ;
+ Text [ English ] = " Copy" ;
+ Text [ norwegian ] = "Kopi" ;
+ Text [ italian ] = "Copia" ;
+ Text [ portuguese_brazilian ] = "Copiar" ;
+ Text [ portuguese ] = "Cpia" ;
+ Text [ finnish ] = " Kopioi" ;
+ Text [ danish ] = "Kopi" ;
+ Text [ french ] = "Copie" ;
+ Text [ swedish ] = "Kopia" ;
+ Text [ dutch ] = "Kopie" ;
+ Text [ spanish ] = "Copia" ;
+ Text [ english_us ] = "Copy" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "Kopia";
+ Text[ japanese ] = "߰";
+ Text[ chinese_traditional ] = "ƻs";
+ Text[ arabic ] = "";
+ Text[ dutch ] = "Kopie";
+ Text[ chinese_simplified ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "Kopya";
+ Text[ language_user1 ] = " ";
+};
+WarningBox MSG_WARNING_BACKUP
+{
+ Message = "Sicherungskopie konnte nicht angelegt werden." ;
+ Message [ English ] = "Couldn't create backup copy." ;
+ Message [ norwegian ] = "Kan ikke lage sikkerhetskopi." ;
+ Message [ italian ] = "Impossibile creare copia di backup." ;
+ Message [ portuguese_brazilian ] = "No pude criar cpia em backup." ;
+ Message [ portuguese ] = "Impossvel criar cpia de segurana." ;
+ Message [ finnish ] = "Varmistuskopiota ei voi tehd." ;
+ Message [ danish ] = "Det var ikke muligt at oprette sikkerhedskopi." ;
+ Message [ french ] = "Cration de la copie de sauvegarde impossible." ;
+ Message [ swedish ] = "Skerhetskopia kunde inte skapas." ;
+ Message [ dutch ] = "Reservekopie kon niet worden gemaakt." ;
+ Message [ spanish ] = "No se pudo crear la copia de seguridad." ;
+ Message [ english_us ] = "Could not create backup copy." ;
+ Buttons = WB_OK ;
+ DefButton = WB_DEF_OK ;
+ Message[ chinese_simplified ] = "޷ȫ";
+ Message[ russian ] = " .";
+ Message[ polish ] = "Kopii zapasowej nie mona byo utworzy.";
+ Message[ japanese ] = "ޯ ͍߰쐬ł܂łB";
+ Message[ chinese_traditional ] = "LkإߦwƥC";
+ Message[ arabic ] = " .";
+ Message[ dutch ] = "Reservekopie kon niet worden gemaakt.";
+ Message[ chinese_simplified ] = "޷ȫ";
+ Message[ greek ] = " .";
+ Message[ korean ] = " 縦 ߽ϴ.";
+ Message[ turkish ] = "Yedekleme kopyas oluturulamad.";
+ Message[ language_user1 ] = " ";
+};
+InfoBox MSG_CANT_OPEN_TEMPLATE
+{
+ Message = "Die Dokumentvorlage kann nicht geffnet werden." ;
+ Message [ ENGLISH ] = "The document template could not be opened." ;
+ Message [ norwegian ] = "Dokumentmalen kan ikke pnes." ;
+ Message [ italian ] = "Impossibile aprire il modello." ;
+ Message [ portuguese_brazilian ] = "O modelo do documento no pode ser aberto." ;
+ Message [ portuguese ] = "No possvel abrir o modelo do documento." ;
+ Message [ finnish ] = "Asiakirjamallia ei voitu avata." ;
+ Message [ danish ] = "Det er ikke muligt at bne dokumentskabelonen." ;
+ Message [ french ] = "Impossible d'ouvrir le modle de document." ;
+ Message [ swedish ] = "Dokumentmallen kan inte ppnas." ;
+ Message [ dutch ] = "De documentsjabloon kan niet worden geopend." ;
+ Message [ spanish ] = "No se puede abrir la plantilla del documento." ;
+ Message [ english_us ] = "The template could not be opened." ;
+ Message[ chinese_simplified ] = "޷ļʽ";
+ Message[ russian ] = " ";
+ Message[ polish ] = "Szablonu dokumentu nie mona otworzy.";
+ Message[ japanese ] = "޷ ڰĂ͊JƂł܂B";
+ Message[ chinese_traditional ] = "Lk}Ҥ˦@";
+ Message[ arabic ] = " .";
+ Message[ dutch ] = "De documentsjabloon kan niet worden geopend.";
+ Message[ chinese_simplified ] = "޷ļʽ";
+ Message[ greek ] = " .";
+ Message[ korean ] = " ߽ϴ.";
+ Message[ turkish ] = "Belge ablonu alamyor.";
+ Message[ language_user1 ] = " ";
+};
+InfoBox MSG_VIEW_OPEN_CANT_SAVE
+{
+ BUTTONS = WB_OK ;
+ DEFBUTTON = WB_DEF_OK ;
+ MESSAGE = "Das Dokument ist bereits zur Bearbeitung geffnet." ;
+ MESSAGE [ English ] = "This document is already opened." ;
+ MESSAGE [ norwegian ] = "Dette dokumentet er allerede pent." ;
+ MESSAGE [ italian ] = "Questo documento gi aperto." ;
+ MESSAGE [ portuguese_brazilian ] = "Este documento j est aberto." ;
+ MESSAGE [ portuguese ] = "Este documento j est aberto para editar." ;
+ MESSAGE [ finnish ] = "Asiakirja on jo avattu." ;
+ MESSAGE [ danish ] = "Dette dokument er allerede bnet til redigering." ;
+ MESSAGE [ french ] = "Ce document est dj ouvert pour l'dition." ;
+ MESSAGE [ swedish ] = "Dokumentet r redan ppnat fr redigering." ;
+ MESSAGE [ dutch ] = "Dit document is reeds geopend." ;
+ MESSAGE [ spanish ] = "Este documento ya est abierto para editar." ;
+ MESSAGE [ english_us ] = "Document already open for editing." ;
+ MESSAGE[ chinese_simplified ] = "ļѾ򿪱༭";
+ MESSAGE[ russian ] = " .";
+ MESSAGE[ polish ] = "Dokument jest ju otwarty do edycji.";
+ MESSAGE[ japanese ] = "޷Ă͂łɕҏWpɊJĂ܂B";
+ MESSAGE[ chinese_traditional ] = "oɮפwg}ҽsC";
+ MESSAGE[ arabic ] = " .";
+ MESSAGE[ dutch ] = "Dit document is reeds geopend.";
+ MESSAGE[ chinese_simplified ] = "ļѾ򿪱༭";
+ MESSAGE[ greek ] = " .";
+ MESSAGE[ korean ] = " ̹ ֽϴ.";
+ MESSAGE[ turkish ] = "Belge zaten dzenlenmek zere ald.";
+ MESSAGE[ language_user1 ] = " ";
+};
+String STR_ERROR_SAVE
+{
+ Text = "Fehler beim Schreiben des Dokumentes " ;
+ Text [ English ] = "Error writing document " ;
+ Text [ norwegian ] = "Feil ved skriving av dokument " ;
+ Text [ italian ] = "Errore durante la scrittura del documento. " ;
+ Text [ portuguese_brazilian ] = "Erro ao gravar o documento " ;
+ Text [ portuguese ] = "Erro ao gravar o documento " ;
+ Text [ finnish ] = "Virhe kirjoitettaessa asiakirjaa " ;
+ Text [ danish ] = "Fejl under skrivning af dokumentet " ;
+ Text [ french ] = "Erreur lors de l'criture du document " ;
+ Text [ swedish ] = "Fel vid skrivning av dokument " ;
+ Text [ dutch ] = "Fout bij schrijven van document " ;
+ Text [ spanish ] = "Error al escribir documento " ;
+ Text [ english_us ] = "Error recording document " ;
+ Text[ chinese_simplified ] = "дĵʱһ ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Bd przy zapisie dokumentu ";
+ Text[ japanese ] = "޷Ă̈ړ̍ۂ̴װ ";
+ Text[ chinese_traditional ] = "bgJɵoͤ@ӿ~ ";
+ Text[ arabic ] = " ";
+ Text[ dutch ] = "Fout bij schrijven van document ";
+ Text[ chinese_simplified ] = "дĵʱһ ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " Ͻ ߻. ";
+ Text[ turkish ] = "Belge yazlrken hata olutu ";
+ Text[ language_user1 ] = " ";
+};
+String STR_TEMPLATE_FILTER
+{
+ Text = "Dokumentvorlagen" ;
+ Text [ English ] = "Document templates" ;
+ Text [ norwegian ] = "Dokumentmaler" ;
+ Text [ italian ] = "Modelli" ;
+ Text [ portuguese_brazilian ] = "Modelos do documento" ;
+ Text [ portuguese ] = "Modelos de documentos" ;
+ Text [ finnish ] = "Asiakirjamallit" ;
+ Text [ danish ] = "Dokumentskabeloner" ;
+ Text [ french ] = "Modles de document" ;
+ Text [ swedish ] = "Dokumentmallar" ;
+ Text [ dutch ] = "Sjablonen" ;
+ Text [ spanish ] = "Plantillas" ;
+ Text [ english_us ] = "Templates" ;
+ Text[ chinese_simplified ] = "ĵʽ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Szablony dokumentw";
+ Text[ japanese ] = "޷Ăڰ";
+ Text[ chinese_traditional ] = "˦";
+ Text[ arabic ] = " ";
+ Text[ dutch ] = "Sjablonen";
+ Text[ chinese_simplified ] = "ĵʽ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ";
+ Text[ turkish ] = "Belge ablonlar";
+ Text[ language_user1 ] = " ";
+};
+String STR_ERROR_COPY_TEMPLATE
+{
+ Text = "Fehler beim Kopieren der Vorlage \"$1\".\nEventuell existiert die Vorlage bereits." ;
+ Text [ English ] = "Error copying template \"$1\".\nMaybe template already exists." ;
+ Text [ norwegian ] = "Feil ved kopiering av mal \"$1\"." ;
+ Text [ italian ] = "Errore durante la copia del modello \"$1\".\nProbabilmente il modello esiste gi." ;
+ Text [ portuguese_brazilian ] = "Erro ao copiar o modelo" ;
+ Text [ portuguese ] = "Erro ao copiar o modelo \"$1\".\n possvel que j exista." ;
+ Text [ finnish ] = "Virhe kopioitaessa mallia " ;
+ Text [ danish ] = "Fejl ved kopiering af skabelonen \"$1\".\nMuligvis findes skabelonen allerede." ;
+ Text [ french ] = "Erreur lors de la copie du modle \"$1\".\nIl se peut qu'il existe dj." ;
+ Text [ swedish ] = "Fel vid kopiering av mallen \"$1\".\nEventuellt existerar mallen redan." ;
+ Text [ dutch ] = "Fout bij kopiren van sjabloon \"$1\".\nEventueel bestaat deze reeds." ;
+ Text [ spanish ] = "Error al copiar la plantilla \"$1\".\nEs posible que esta ya exista." ;
+ Text [ english_us ] = "Error copying template \"$1\". \nA template with this name may already exist." ;
+ Text[ chinese_simplified ] = "ڸʽ$1ʱ\nʽѾڡ";
+ Text[ russian ] = " \"$1\".\n, .";
+ Text[ polish ] = "Bd podczas kopiowania szablonu \"$1\".\nSzablon ju by moe istnieje.";
+ Text[ japanese ] = "ڰ\"$1\"߰ۂ̴װ\n炭ڰĂ͂łɂ܂B";
+ Text[ chinese_traditional ] = "bƻs˦ɵoͤ@ӿ~C\ni˦wgsbC";
+ Text[ arabic ] = " \"$1\".\n .";
+ Text[ dutch ] = "Fout bij kopiren van sjabloon \"$1\".\nEventueel bestaat deze reeds.";
+ Text[ chinese_simplified ] = "ڸʽ$1ʱ\nʽѾڡ";
+ Text[ greek ] = " \"$1\". \n .";
+ Text[ korean ] = "\"$1\" . \n ̹ 𸨴ϴ.";
+ Text[ turkish ] = "\"$1\" ablonu kopyalanrken hata olutu.\nBu ablon zaten mevcut olabilir.";
+ Text[ language_user1 ] = " ";
+};
+String STR_ERROR_DELETE_TEMPLATE
+{
+ Text = "Die Vorlage \"$1\" kann nicht gelscht werden." ;
+ Text [ English ] = "The template \"$1\" can't by deleted." ;
+ Text [ english_us ] = "The template \"$1\" can not be deleted." ;
+ Text [ portuguese_brazilian ] = "Die Vorlage $1 kann nicht gelscht werden." ;
+ Text [ swedish ] = "Mallen \"$1\" kan inte raderas." ;
+ Text [ danish ] = "Det er ikke muligt at slette skabelonen \"$1\"." ;
+ Text [ italian ] = "Impossibile eliminare il modello $1." ;
+ Text [ spanish ] = "No es posible eliminar la plantilla \"$1\"." ;
+ Text [ french ] = "Impossible de supprimer le modle \"$1\"." ;
+ Text [ dutch ] = "De sjabloon \"$1\" kan niet worden gewist." ;
+ Text [ portuguese ] = "Impossvel eliminar o modelo \"$1\"." ;
+ Text[ chinese_simplified ] = "޷ɾʽ $1";
+ Text[ russian ] = " \"$1\" .";
+ Text[ polish ] = "Szablonu \"$1\" nie mona usun.";
+ Text[ japanese ] = "ڰ\"$1\"͍폜ł܂B";
+ Text[ chinese_traditional ] = "LkRoӼ˦ $1 C";
+ Text[ arabic ] = " \"$1\".";
+ Text[ dutch ] = "De sjabloon \"$1\" kan niet worden gewist.";
+ Text[ chinese_simplified ] = "޷ɾʽ $1";
+ Text[ greek ] = " \"$1\".";
+ Text[ korean ] = " \"$1\" ϴ.";
+ Text[ turkish ] = "\"$1\" ablonu silinemiyor.";
+ Text[ language_user1 ] = " ";
+};
+String STR_ERROR_MOVE_TEMPLATE
+{
+ Text = "Fehler beim Verschieben der Vorlage \"$1\"." ;
+ Text [ English ] = "Error moving template \"$1\"." ;
+ Text [ norwegian ] = "Feil ved flytting av mal \"$1\"." ;
+ Text [ italian ] = "Errore durante lo spostamento del modello \"$1\"." ;
+ Text [ portuguese_brazilian ] = "Erro ao mover o modelo " ;
+ Text [ portuguese ] = "Erro ao mover o modelo \"$1\"." ;
+ Text [ finnish ] = "Virhe siirrettess mallia \"$1\"." ;
+ Text [ danish ] = "Fejl under flytning af skabelonen \"$1\"." ;
+ Text [ french ] = "Erreur lors du dplacement du modle \"$1\"." ;
+ Text [ swedish ] = "Fel vid flyttning av mall \"$1\" " ;
+ Text [ dutch ] = "Fout bij verplaatsen van sjabloon \"$1\"." ;
+ Text [ spanish ] = "Error al desplazar la plantilla \"$1\" " ;
+ Text [ english_us ] = "Error moving template \"$1\"." ;
+ Text[ chinese_simplified ] = "ƶʽ$1ʱ";
+ Text[ russian ] = " \"$1\".";
+ Text[ polish ] = "Bd przy przenoszeniu szablonu \"$1\".";
+ Text[ japanese ] = "ڰ\"$1\"̈ړ̍ۂ̴װB";
+ Text[ chinese_traditional ] = "bʼ˦ $1ɵoͿ~ C";
+ Text[ arabic ] = " \"$1\".";
+ Text[ dutch ] = "Fout bij verplaatsen van sjabloon \"$1\".";
+ Text[ chinese_simplified ] = "ƶʽ$1ʱ";
+ Text[ greek ] = " \"$1\".";
+ Text[ korean ] = " \"$1\" ̵ ߻.";
+ Text[ turkish ] = "\"$1\" ablonu tanrken hata olutu.";
+ Text[ language_user1 ] = " ";
+};
+ErrorBox MSG_ERROR_RESCAN
+{
+ BUTTONS = WB_OK ;
+ DEFBUTTON = WB_DEF_OK ;
+ Message = "Die Aktualisierungen konnte nicht gespeichert werden." ;
+ Message [ ENGLISH ] = "The updates could not be saved." ;
+ Message [ norwegian ] = "Oppdateringene kan ikke lagres." ;
+ Message [ italian ] = "Impossibile salvare gli aggiornamenti." ;
+ Message [ portuguese_brazilian ] = "As atualizaes no puderam ser gravadas." ;
+ Message [ portuguese ] = "As actualizaes no puderam ser guardadas." ;
+ Message [ finnish ] = "Pivityksi ei voitu tallentaa." ;
+ Message [ danish ] = "Det var ikke muligt at gemme opdateringen." ;
+ Message [ french ] = "Impossible d'enregistrer les actualisations !" ;
+ Message [ swedish ] = "Uppdateringen kunde inte sparas." ;
+ Message [ dutch ] = "De wijzigingen kunnen niet worden opgeslagen." ;
+ Message [ spanish ] = "No se pudieron guardar las actualizaciones." ;
+ Message [ english_us ] = "The updates could not be saved." ;
+ Message[ chinese_simplified ] = "޷̸¡";
+ Message[ russian ] = " .";
+ Message[ polish ] = "Aktualizacje nie mogy zosta zapisane.";
+ Message[ japanese ] = "XV͕ۑłĂ܂B";
+ Message[ chinese_traditional ] = "LkxsseC";
+ Message[ arabic ] = " .";
+ Message[ dutch ] = "De wijzigingen kunnen niet worden opgeslagen.";
+ Message[ chinese_simplified ] = "޷̸¡";
+ Message[ greek ] = " .";
+ Message[ korean ] = "Ʈ ߽ϴ.";
+ Message[ turkish ] = "Gncellemeler kaydedilemedi.";
+ Message[ language_user1 ] = " ";
+};
+String STR_ERROR_SAVE_TEMPLATE
+{
+ Text = "Fehler beim Schreiben der Vorlage " ;
+ Text [ English ] = "Error writing template " ;
+ Text [ norwegian ] = "Feil ved skriving av mal " ;
+ Text [ italian ] = "Errore durante la scrittura del modello " ;
+ Text [ portuguese_brazilian ] = "Erro ao gravar o modelo " ;
+ Text [ portuguese ] = "Erro ao gravar o modelo " ;
+ Text [ finnish ] = "Virhe kirjoitettaessa mallia " ;
+ Text [ danish ] = "Fejl under skrivning af skabelonen " ;
+ Text [ french ] = "Erreur lors de l'criture du modle " ;
+ Text [ swedish ] = "Fel vid skrivning av mall " ;
+ Text [ dutch ] = "Fout bij schrijven van sjabloon " ;
+ Text [ spanish ] = "Error de escritura de plantilla " ;
+ Text [ english_us ] = "Error saving template " ;
+ Text[ chinese_simplified ] = "дʽʱһ ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Bd przy zapisie szablonu ";
+ Text[ japanese ] = "ڰĂ̈ړ̍ۂ̴װ ";
+ Text[ chinese_traditional ] = "bgJ˦ɵoͤ@ӿ~ ";
+ Text[ arabic ] = " ";
+ Text[ dutch ] = "Fout bij schrijven van sjabloon ";
+ Text[ chinese_simplified ] = "дʽʱһ ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " Ͻ ߻ ";
+ Text[ turkish ] = "ablon yazlrken hata olutu ";
+ Text[ language_user1 ] = " ";
+};
+ErrorBox MSG_ERROR_RENAME_TEMPLATE
+{
+ BUTTONS = WB_OK ;
+ DEFBUTTON = WB_DEF_OK ;
+ Message = "Fehler bei der Umbenennung der Vorlage." ;
+ Message [ ENGLISH ] = "Error renaming template." ;
+ Message [ norwegian ] = "Feil oppstod da det ble gitt nytt navn til mal." ;
+ Message [ italian ] = "Errore durante la rinominazione del modello." ;
+ Message [ portuguese_brazilian ] = "Erro ao renomear o modelo." ;
+ Message [ portuguese ] = "Erro ao renomear o modelo." ;
+ Message [ finnish ] = "Virhe mallia nimettess." ;
+ Message [ danish ] = "Fejl under omdbning af skabelonen." ;
+ Message [ french ] = "Erreur lors du changement du nom du modle." ;
+ Message [ swedish ] = "Fel vid namnndring p mall." ;
+ Message [ dutch ] = "Fout bij de naamswijziging van de sjabloon." ;
+ Message [ spanish ] = "Error al cambiar el nombre de la plantilla." ;
+ Message [ english_us ] = "Error renaming template." ;
+ Message[ chinese_simplified ] = "ʽʱ";
+ Message[ russian ] = " .";
+ Message[ polish ] = "Bd przy zmianie nazwy szablonu.";
+ Message[ japanese ] = "ڰĂ̖OύX̍ۂ̴װ";
+ Message[ chinese_traditional ] = "sRW˦ɵoͿ~C";
+ Message[ arabic ] = " .";
+ Message[ dutch ] = "Fout bij de naamswijziging van de sjabloon.";
+ Message[ chinese_simplified ] = "ʽʱ";
+ Message[ greek ] = " .";
+ Message[ korean ] = " ̸ ߻.";
+ Message[ turkish ] = "ablon yeniden adlandrlrken hata olutu.";
+ Message[ language_user1 ] = " ";
+};
+ErrorBox MSG_ERROR_RENAME_TEMPLATE_REGION
+{
+ BUTTONS = WB_OK ;
+ DEFBUTTON = WB_DEF_OK ;
+ Message = "Fehler bei der Umbenennung des Bereiches." ;
+ Message [ ENGLISH ] = "Error renaming template region." ;
+ Message [ norwegian ] = "Feil oppstod da det ble gitt nytt navn til malomrde." ;
+ Message [ italian ] = "Errore durante la rinominazione dell'area." ;
+ Message [ portuguese_brazilian ] = "Erro ao renomear a regiao do modelo." ;
+ Message [ portuguese ] = "Erro ao renomear a regio do modelo." ;
+ Message [ finnish ] = "Virhe mallialuetta nimettess." ;
+ Message [ danish ] = "Fejl under omdbning af omrdet." ;
+ Message [ french ] = "Erreur du changement du nom de la catgorie." ;
+ Message [ swedish ] = "Fel vid namnndring p mallomrde." ;
+ Message [ dutch ] = "Fout bij de naamsverandering van het bereik." ;
+ Message [ spanish ] = "Error al cambiar el nombre del rea." ;
+ Message [ english_us ] = "Error renaming template catagory." ;
+ Message[ chinese_simplified ] = "ʱ";
+ Message[ russian ] = " .";
+ Message[ polish ] = "Bd przy zmianie nazwy obszaru.";
+ Message[ japanese ] = "͈̖͂OύX̍ۂ̴װ";
+ Message[ chinese_traditional ] = "sRWϰɵoͿ~C";
+ Message[ arabic ] = " .";
+ Message[ dutch ] = "Fout bij de naamsverandering van het bereik.";
+ Message[ chinese_simplified ] = "ʱ";
+ Message[ greek ] = " .";
+ Message[ korean ] = " ̸ ߻.";
+ Message[ turkish ] = "Kategori yeniden adlandrlrken hata olutu.";
+ Message[ language_user1 ] = " ";
+};
+ErrorBox MSG_ERROR_EMPTY_NAME
+{
+ BUTTONS = WB_OK ;
+ DEFBUTTON = WB_DEF_OK ;
+ Message = "Es muss ein Name angegeben werden." ;
+ Message [ ENGLISH ] = "You must specify a name." ;
+ Message [ norwegian ] = "Du m angi et navn." ;
+ Message [ italian ] = " necessario specificare un nome." ;
+ Message [ portuguese_brazilian ] = " preciso especificar um nome." ;
+ Message [ portuguese ] = " necessrio especificar um nome." ;
+ Message [ finnish ] = "Sinun on annettava nimi." ;
+ Message [ danish ] = "Du skal angive et navn." ;
+ Message [ french ] = "Veuillez indiquer un nom." ;
+ Message [ swedish ] = "Ett namn mste anges." ;
+ Message [ dutch ] = "U moet een naam invullen." ;
+ Message [ spanish ] = "Es necesario introducir un nombre." ;
+ Message [ english_us ] = "Please specify a name." ;
+ Message[ chinese_simplified ] = "ָһơ";
+ Message[ russian ] = " .";
+ Message[ polish ] = "Trzeba poda nazw.";
+ Message[ japanese ] = "Ow肵ĉB";
+ Message[ chinese_traditional ] = "zJ@ӦW١C";
+ Message[ arabic ] = " .";
+ Message[ dutch ] = "U moet een naam invullen.";
+ Message[ chinese_simplified ] = "ָһơ";
+ Message[ greek ] = " .";
+ Message[ korean ] = "̸ ؾ մϴ.";
+ Message[ turkish ] = "Bir ad girin.";
+ Message[ language_user1 ] = " ";
+};
+ErrorBox MSG_ERROR_UNIQ_NAME
+{
+ BUTTONS = WB_OK ;
+ DEFBUTTON = WB_DEF_OK ;
+ Message = "Es muss ein eindeutiger Name angegeben werden.\nZwischen Gro- und Kleinschreibung wird nicht unterschieden." ;
+ Message [ ENGLISH ] = "You must specify an uniq name.\nUpper and lower letters are the same." ;
+ Message [ norwegian ] = "Du m angi et unikt navn .\nOver- og underbokstaver er like." ;
+ Message [ italian ] = " necessario specificare un nome univoco.\n possibile utilizzare lettere maiuscole o minuscole." ;
+ Message [ portuguese_brazilian ] = " preciso especificar um nome exclusivo.\nLetras maisculas ou minsculas podem ser usadas." ;
+ Message [ portuguese ] = " necessrio especificar um nome unvoco.\nNo h distino entre maisculas e minsculas." ;
+ Message [ finnish ] = "Sinun on annettava yksiksitteinen nimi.\nIsoilla ja pienill kirjaimilla ei ole eroa." ;
+ Message [ danish ] = "Du skal angive et entydigt navn.\nDer gres ingen forskel mellem store og sm bogstaver." ;
+ Message [ french ] = "Veuillez indiquer un nom univoque.\nIl ne sera fait aucune distinction de casse (majuscules / minuscules)." ;
+ Message [ swedish ] = "Ett entydigt namn mste anges.\nDet grs ingen skillnad p sm och stora bokstver." ;
+ Message [ dutch ] = "De naam moet uniek zijn.\nEr wordt geen onderscheid gemaakt tussen hoofdletters en kleine letters." ;
+ Message [ spanish ] = "Debe especificar un nombre nico.\nNo se distingue entre maysculas y minsculas." ;
+ Message [ english_us ] = "Please specify a unique name.\nEntries must not be case specific." ;
+ Message[ chinese_simplified ] = "һȷеơ\nĸСд";
+ Message[ russian ] = " .\n .";
+ Message[ polish ] = "Musi zosta podana jednoznaczna nazwa. \nNie ma rozrniania duych i maych liter.";
+ Message[ japanese ] = "mȖOw肵ĉB\n啶Ə͋ʂ܂B";
+ Message[ chinese_traditional ] = "zJ@ӥTW١C\nzϧOrjpgC";
+ Message[ arabic ] = " .\n .";
+ Message[ dutch ] = "De naam moet uniek zijn.\nEr wordt geen onderscheid gemaakt tussen hoofdletters en kleine letters.";
+ Message[ chinese_simplified ] = "һȷеơ\nĸСд";
+ Message[ greek ] = " .\n .";
+ Message[ korean ] = "и ̸ ؾ մϴ.\n빮ڿ ҹ о Էմϴ.";
+ Message[ turkish ] = "Benzersiz bir ad girin.\nGirilen ad byk/kk harf duyarl olmamaldr.";
+ Message[ language_user1 ] = " ";
+};
+String STR_QUERY_DEFAULT_TEMPLATE
+{
+ TEXT = "Wollen Sie die Vorlage \"$(TEXT)\" zur Standardvorlage machen?" ;
+ TEXT [ English ] = "Should the template \"$(TEXT)\" become the default template?" ;
+ TEXT [ norwegian ] = "Vil du at malen \"$(TEXT)\" skal bli standardmal?" ;
+ TEXT [ italian ] = "Volete che il modello \"$(TESTO)\" diventi il modello predefinito?" ;
+ TEXT [ portuguese_brazilian ] = "O modelo $(TEXTO) deve se tornar o modelo padr o?" ;
+ TEXT [ portuguese ] = "Deseja usar o modelo \"$(TEXTO)\" como modelo padro?" ;
+ TEXT [ finnish ] = "Valitaanko malli \"$(TEXT)\" oletusmalliksi?" ;
+ TEXT [ danish ] = "Vil du definere skabelonen \"$(TEKST)\" som standardskabelon?" ;
+ TEXT [ french ] = "Souhaitez-vous faire du modle \"$(TEXT)\" le modle par dfaut ?" ;
+ TEXT [ swedish ] = "Skall mallen \"$(TEXT)\" gras till standardmall?" ;
+ TEXT [ dutch ] = "Moet de sjabloon \"$(TEKST)\" de standaardsjabloon worden?" ;
+ TEXT [ spanish ] = "Desea convertir la plantilla \"$(TEXT)\" en una plantilla predeterminada?" ;
+ TEXT [ english_us ] = "Should the template \"$(TEXT)\" become the default template?" ;
+ TEXT[ chinese_simplified ] = "Ҫʽ$(TEXT)趨ɱ׼ʽ";
+ TEXT[ russian ] = " , \"$(TEXT)\" ?";
+ TEXT[ polish ] = "Czy chcesz przeksztaci \"$(TEXT)\" na szablon domylny?";
+ TEXT[ japanese ] = "ڰ\"$(TEXT)\"Wقɂ܂?";
+ TEXT[ chinese_traditional ] = "nNoӼ˦$(TEXT)]wзǼ˦H";
+ TEXT[ arabic ] = " \"$(TEXT)\" ";
+ TEXT[ dutch ] = "Moet de sjabloon \"$(TEKST)\" de standaardsjabloon worden?";
+ TEXT[ chinese_simplified ] = "Ҫʽ$(TEXT)趨ɱ׼ʽ";
+ TEXT[ greek ] = " $(TEXT) ;";
+ TEXT[ korean ] = "$(TEXT) ⺻ Ϸ Ͻðڽϱ?";
+ TEXT[ turkish ] = "\"$(TEXT)\" ablonu, standart ablon olarak belirlensin mi?";
+ TEXT[ language_user1 ] = " ";
+};
+QueryBox MSG_QUERY_RESET_DEFAULT_TEMPLATE
+{
+ Buttons = WB_YES_NO ;
+ DefButton = WB_DEF_NO ;
+ Message = "Wollen Sie die Standardvorlage zurcksetzen?" ;
+ Message [ English ] = "Do you want to reset the default template?" ;
+ Message [ norwegian ] = "Vil du stille standardmalen inn p nytt?" ;
+ Message [ italian ] = "Reimpostare il modello predefinito?" ;
+ Message [ portuguese_brazilian ] = "Deseja redefinir o modelo padro?" ;
+ Message [ portuguese ] = "Deseja redefinir o modelo padro?" ;
+ Message [ finnish ] = "Haluatko palauttaa oletusmallin?" ;
+ Message [ danish ] = "Vil du nulstille standardskabelonen?" ;
+ Message [ french ] = "Souhaitez-vous restaurer le modle par dfaut ?" ;
+ Message [ swedish ] = "Vill Du terstlla standardmallen?" ;
+ Message [ dutch ] = "Wilt u de veranderingen in de standaardsjabloon ongedaan maken?" ;
+ Message [ spanish ] = "Desea usted restablecer la plantilla predeterminada?" ;
+ Message [ english_us ] = "Do you want to reset the default template?" ;
+ Message[ chinese_simplified ] = "Ҫ׼ʽļ";
+ Message[ russian ] = " ?";
+ Message[ polish ] = "Czy chcesz zresetowa szablon domylny?";
+ Message[ japanese ] = "WقؾĂ܂?";
+ Message[ chinese_traditional ] = "zn]зǼ˦ɮסH";
+ Message[ arabic ] = " ";
+ Message[ dutch ] = "Wilt u de veranderingen in de standaardsjabloon ongedaan maken?";
+ Message[ chinese_simplified ] = "Ҫ׼ʽļ";
+ Message[ greek ] = " ;";
+ Message[ korean ] = "⺻ Ͻðڽϱ?";
+ Message[ turkish ] = "Standart ablonu baa almak istiyor musunuz?";
+ Message[ language_user1 ] = " ";
+};
+InfoBox MSG_TEMPLATE_DIR_NOT_EXIST
+{
+ Message = "Das Vorlagenverzeichnis\n$(DIR)\nexistiert nicht." ;
+ Message [ ENGLISH ] = "The template directory\n$(DIR)\ndoen't exist." ;
+ Message [ norwegian ] = "Malkatalogen\n$(DIR)\nfinnes ikke." ;
+ Message [ italian ] = "La cartella dei modelli\n$(DIR)\nnon esiste." ;
+ Message [ portuguese_brazilian ] = "O diretrio modelo\n$(DIR)\nno existe." ;
+ Message [ portuguese ] = "O directrio dos modelos\n$(DIR)\nno existe." ;
+ Message [ finnish ] = "Mallihakemistoa\n$(DIR)\nei ole." ;
+ Message [ danish ] = "Skabelonbiblioteket\n$(DIR)\neksisterer ikke." ;
+ Message [ french ] = "Ce rpertoire de modles\n$(DIR)\nn'existe pas." ;
+ Message [ swedish ] = "Mallkatalogen\n$(DIR)\nfinns inte." ;
+ Message [ dutch ] = "De sjablonenmap\n$(DIR)\nbestaat niet." ;
+ Message [ spanish ] = "El directorio de plantillas\n$(DIR)\nno existe." ;
+ Message [ english_us ] = "Template directory\n$(DIR)\ndoes not exist." ;
+ Message[ chinese_simplified ] = "ʽĿ¼\n$(DIR)\nڡ";
+ Message[ russian ] = " \n$(DIR)\n .";
+ Message[ polish ] = "Katalog stylw \n$(DIR)\nnie istnieje.";
+ Message[ japanese ] = "ڰčڂ\n$(DIR)\n܂B";
+ Message[ chinese_traditional ] = "oӼ˦ؿ\n$(DIR)\nsbC";
+ Message[ arabic ] = " \n$(DIR)\n .";
+ Message[ dutch ] = "De sjablonenmap\n$(DIR)\nbestaat niet.";
+ Message[ chinese_simplified ] = "ʽĿ¼\n$(DIR)\nڡ";
+ Message[ greek ] = " \n$(DIR)\n .";
+ Message[ korean ] = " 丮\n$(DIR)\n ϴ.";
+ Message[ turkish ] = "\n$(DIR)\nablon dizini mevcut deil.";
+ Message[ language_user1 ] = " ";
+};
+InfoBox MSG_DOCINFO_CANTREAD
+{
+ Message = "Die Dokumenteigenschaften knnen nicht gelesen werden." ;
+ Message [ ENGLISH ] = "The document properties can't be read." ;
+ Message [ dutch ] = "De documentinformatie kon niet worden gelezen." ;
+ Message [ english_us ] = "Document info cannot be read." ;
+ Message [ italian ] = "Impossibile leggere le informazioni relative al documento." ;
+ Message [ spanish ] = "No se pueden leer las informaciones sobre el documento." ;
+ Message [ french ] = "Lecture des infos document impossible." ;
+ Message [ swedish ] = "Dokumentegenskaperna kan inte lsas." ;
+ Message [ danish ] = "Det er ikke muligt at lse dokumentegenskaberne." ;
+ Message [ portuguese ] = "No possvel ler as propriedades do documento." ;
+ Message [ portuguese_brazilian ] = "Die Dokumenteigenschaften knnen nicht gelesen werden." ;
+ Message[ chinese_simplified ] = "޷ȡĵԡ";
+ Message[ russian ] = " ";
+ Message[ polish ] = "Waciwoci dokumentu nie mona odczyta.";
+ Message[ japanese ] = "޷Ă͓̑ǂݎ܂łB";
+ Message[ chinese_traditional ] = "LkŪݩʡC";
+ Message[ arabic ] = " .";
+ Message[ dutch ] = "De documentinformatie kon niet worden gelezen.";
+ Message[ chinese_simplified ] = "޷ȡĵԡ";
+ Message[ greek ] = " .";
+ Message[ korean ] = " ϴ.";
+ Message[ turkish ] = "Belge zellikleri okunamyor.";
+ Message[ language_user1 ] = " ";
+};
+String STR_ERROR_NOSTORAGE
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Die ausgewhlte Datei besitzt ein falsches Format. : Die ausgewhlte Datei besitzt ein falsches Format. */
+ /* ### ACHTUNG: Neuer Text in Resource? Die ausgewhlte Datei besitzt ein falsches Format. : Die ausgewhlte Datei besitzt ein falsches Format. */
+ Text = "Die ausgewhlte Datei besitzt ein falsches Format." ;
+ Text [ ENGLISH ] = "The chosen file is in wrong format." ;
+ Text [ norwegian ] = "The chosen file is in wrong format." ;
+ Text [ italian ] = "Il file scelto ha un formato errato." ;
+ Text [ portuguese_brazilian ] = "The chosen file is in wrong format." ;
+ Text [ portuguese ] = "O ficheiro seleccionado tem um formato errado." ;
+ Text [ french ] = "Le fichier slectionn a un format incorrect." ;
+ Text [ dutch ] = "Het gekozen bestand heeft een verkeerd formaat." ;
+ Text [ spanish ] = "El archivo seleccionado tiene un formato incorrecto." ;
+ Text [ danish ] = "Den udvalgte fil har et forkert format." ;
+ Text [ swedish ] = "Den valda filen har ett felaktigt format." ;
+ Text [ finnish ] = "The chosen file is in wrong format." ;
+ Text [ english_us ] = "The selected file has an incorrect format." ;
+ Text[ chinese_simplified ] = "ѡеļĸʽЧ";
+ Text[ russian ] = " .";
+ Text[ polish ] = "Wybrany plik zawiera nieprawidowy format.";
+ Text[ japanese ] = "I̧ق͏܂B";
+ Text[ chinese_traditional ] = "襤ɮ׮榡LġC";
+ Text[ arabic ] = " .";
+ Text[ dutch ] = "Het gekozen bestand heeft een verkeerd formaat.";
+ Text[ chinese_simplified ] = "ѡеļĸʽЧ";
+ Text[ greek ] = " .";
+ Text[ korean ] = " Ʋ ϰ ֽϴ.";
+ Text[ turkish ] = "Seilen dosyann format yanl.";
+ Text[ language_user1 ] = " ";
+};
+String STR_QUERY_SAVEOWNFORMAT
+{
+ Text = "Dieses Dokument kann Formatierungen und Informationen\nenthalten, die nicht im $(FORMAT) Format gespeichert\nwerden knnen. Mchten Sie die nderungen im\n$(OWNFORMAT) Format speichern?" ;
+ Text [ ENGLISH ] = "This document may contain attributes and informations\nthat cannot be saved using the $(FORMAT). Do you want\nto save your changes using the $(OWNFORMAT) format?" ;
+ Text [ dutch ] = "Dit document kan opmaakattributen en gegevens \nbevatten die niet in $(FORMAT) formaat opgeslagen\nkunnen worden. Wilt u deze wijzigingen in\n$(OWNFORMAT) formaat opslaan?" ;
+ Text [ english_us ] = "This document may contain attributes and information that cannot be saved under\n$(FORMAT). Do you want to save your changes using the\n$(OWNFORMAT) format?" ;
+ Text [ italian ] = "Il presente documento pu contenere formattazioni e informazioni\nche non possono essere salvate nel formato \n$(FORMAT). Salvare le modifiche nel formato \n$(OWNFORMAT)?" ;
+ Text [ spanish ] = "Este documento puede contener informaciones y formatos\nque no se pueden guardar en el formato $(FORMAT).\nDesea guardar los cambios en formato\n$(OWNFORMAT)?" ;
+ Text [ french ] = "Ce document peut contenir des formatages et des informations,\nqui ne peuvent pas tre enregistrs au format $(FORMAT).\nSouhaitez-vous enregistrer les modifications au format\n$(OWNFORMAT) ?" ;
+ Text [ swedish ] = "Detta dokument kan innehlla formateringar och information\nsom inte kan sparas i $(FORMAT)format.\nSkall ndringarna sparas i \n$(OWNFORMAT) format?" ;
+ Text [ danish ] = "Dette dokument kan indeholde formateringer og informationer\nsom ikke kan gemmes i $(FORMAT) format.\nVil du gemme ndringerne i $(OWNFORMAT) format?" ;
+ Text [ portuguese ] = "Este documento poder conter atributos e informaes que no podem ser guardados no\nformato $(FORMAT). Guardar as modificaes no\nformato $(OWNFORMAT)?" ;
+ Text [ portuguese_brazilian ] = "Dieses Dokument kann Formatierungen und Informationen\nenthalten, die nicht im $(FORMAT) Format gespeichert\nwerden knnen. Mchten Sie die nderungen im\n$(OWNFORMAT) Format speichern?" ;
+ Text[ chinese_simplified ] = "ĵܺһЩ޷ $(FORMAT) ʽ̵ĸʽϢ\nҪʹ $(OWNFORMAT) ʽĵĸ";
+ Text[ russian ] = ", , $(FORMAT). \n$(OWNFORMAT)?";
+ Text[ polish ] = "Dokument ten moe zawiera formatowania\ni informacje, ktrych nie bdzie mona zapisa\nw formacie $(FORMAT). Czy chcesz zapisa\nzmiany w formacie $(OWNFORMAT)?";
+ Text[ japanese ] = "޷Ă $(FORMAT) ŕۑłȂݒƏ\n܂ł܂BύX\n$(OWNFORMAT) ɕۑ܂?";
+ Text[ chinese_traditional ] = "oӤit@ǵLk $(FORMAT) 榡xs榡C\nznϥ $(OWNFORMAT) 榡xsܧH";
+ Text[ arabic ] = " ʡ ϡ\n $(FORMAT). \n $(OWNFORMAT)";
+ Text[ dutch ] = "Dit document kan opmaakattributen en gegevens \nbevatten die niet in $(FORMAT) formaat opgeslagen\nkunnen worden. Wilt u deze wijzigingen in\n$(OWNFORMAT) formaat opslaan?";
+ Text[ chinese_simplified ] = "ĵܺһЩ޷ $(FORMAT) ʽ̵ĸʽϢ\nҪʹ $(OWNFORMAT) ʽĵĸ";
+ Text[ greek ] = " \n \n $(FORMAT). \n$(OWNFORMAT);";
+ Text[ korean ] = " $(FORMAT) Ŀ Ӽ \n ֽϴ. \n$(OWNFORMAT) Ŀ Ͻðڽϱ?";
+ Text[ turkish ] = "Bu belgede, $(FORMAT) formatnda kaydedilemeyen\n formatlamalar ve bilgiler bulunabilir. Deiiklikleri \n$(OWNFORMAT) formatnda kaydetmek istiyor musunuz?";
+ Text[ language_user1 ] = " ";
+};
+String STR_QUERY_MUSTOWNFORMAT
+{
+ Text = "Dokumente knnen nicht im $(FORMAT) Format gespeichert\nwerden. Mchten Sie das Dokument im $(OWNFORMAT) Format\nspeichern?" ;
+ Text [ ENGLISH ] = "Documents cannot be exportet to $(FORMAT) format. Do you\nwant to save your changes using the $(OWNFORMAT) format?" ;
+ Text [ english_us ] = "Documents cannot be saved in $(FORMAT) format. Do you\nwant to save your changes using the $(OWNFORMAT) format?" ;
+ Text [ italian ] = "I documenti non possono essere salvati nel formato $(FORMAT).\nVolete salvarli nel formato $(OWNFORMAT)?" ;
+ Text [ spanish ] = "Los documentos no se pueden guardar en el formato $(FORMAT).\nDesea guardar el documento en formato $(OWNFORMAT)?" ;
+ Text [ french ] = "Impossible d'enregistrer les documents au format $(FORMAT).\nSouhaitez-vous enregistrer le document au format $(OWNFORMAT) ?" ;
+ Text [ dutch ] = "Documenten kunnen niet in $(FORMAT) formaat worden \nopgeslagen. Wilt u het document in $(OWNFORMAT) formaat\nopslaan?" ;
+ Text [ swedish ] = "Dokument kan inte sparas i $(FORMAT)-format.\nSkall dokumentet sparas i $(OWNFORMAT)-format?" ;
+ Text [ danish ] = "Det er ikke muligt at gemmme dokumenter i $(FORMAT) format.\nVil du gemme dokumentet i $(OWNFORMAT) format?" ;
+ Text [ portuguese_brazilian ] = "Dokumente knnen nicht im $(FORMAT) Format gespeichert\nwerden. Mchten Sie das Dokument im $(OWNFORMAT) Format\nspeichern?" ;
+ Text [ portuguese ] = "Impossvel guardar documentos no formato $(FORMAT).\nDeseja guardar o documento no formato $(OWNFORMAT)?" ;
+ Text[ chinese_simplified ] = "޷ $(FORMAT) ʽĵ\nҪʹ $(OWNFORMAT) ʽ";
+ Text[ russian ] = " $(FORMAT) .\n \n $(OWNFORMAT)?";
+ Text[ polish ] = "Nie mona zapisa dokumentw w formacie $(FORMAT).\nCzy chcesz zapisa dokument\nw formacie $(OWNFORMAT) ?";
+ Text[ japanese ] = "޷Ă $(FORMAT) \nۑł܂łB޷Ă $(OWNFORMAT) \nۑ܂H";
+ Text[ chinese_traditional ] = "Lk $(FORMAT) 榡xsC\nznϥ $(OWNFORMAT) 榡xsH";
+ Text[ arabic ] = " $(FORMAT).\n \n$(OWNFORMAT)";
+ Text[ dutch ] = "Documenten kunnen niet in $(FORMAT) formaat worden \nopgeslagen. Wilt u het document in $(OWNFORMAT) formaat\nopslaan?";
+ Text[ chinese_simplified ] = "޷ $(FORMAT) ʽĵ\nҪʹ $(OWNFORMAT) ʽ";
+ Text[ greek ] = " $(FORMAT).\n $(OWNFORMAT);";
+ Text[ korean ] = " $(FORMAT) Ŀ ϴ. $(OWNFORMAT) Ŀ \nϽðڽϱ?";
+ Text[ turkish ] = "Belgeler $(FORMAT) formatnda kaydedilemiyor\n. Belgeyi $(OWNFORMAT) formatnda\nkaydetmek ister misiniz?";
+};
+String STR_SAVEDOC
+{
+ Text = "~Speichern" ;
+ Text [ ENGLISH ] = "~Save" ;
+ Text [ english_us ] = "~Save" ;
+ Text [ italian ] = "~Salva" ;
+ Text [ spanish ] = "~Guardar" ;
+ Text [ french ] = "~Enregistrer" ;
+ Text [ dutch ] = "~Opslaan" ;
+ Text [ swedish ] = "Spara" ;
+ Text [ danish ] = "Gem" ;
+ Text [ portuguese_brazilian ] = "~Speichern" ;
+ Text [ portuguese ] = "~Guardar" ;
+ Text[ chinese_simplified ] = "(~S)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Zapisz";
+ Text[ japanese ] = "ۑ(~S)";
+ Text[ chinese_traditional ] = "xs(~S)";
+ Text[ arabic ] = "";
+ Text[ dutch ] = "~Opslaan";
+ Text[ chinese_simplified ] = "(~S)";
+ Text[ greek ] = "";
+ Text[ korean ] = "(~S)";
+ Text[ turkish ] = "~Kaydet";
+ Text[ language_user1 ] = " ";
+};
+String STR_UPDATEDOC
+{
+ Text = "Aktuali~siere" ;
+ Text [ ENGLISH ] = "Update" ;
+ Text [ english_us ] = "~Update" ;
+ Text [ italian ] = "~Aggiorna" ;
+ Text [ spanish ] = "Actuali~zacin" ;
+ Text [ french ] = "Actuali~se" ;
+ Text [ dutch ] = "Aktuali~seer" ;
+ Text [ swedish ] = "~Uppdatera" ;
+ Text [ danish ] = "Opdater" ;
+ Text [ portuguese_brazilian ] = "Aktuali~siere" ;
+ Text [ portuguese ] = "A ac~tualizar" ;
+ Text[ chinese_simplified ] = "(~U)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Aktualizuj";
+ Text[ japanese ] = "XV(~U)";
+ Text[ chinese_traditional ] = "s(~U)";
+ Text[ arabic ] = "";
+ Text[ dutch ] = "Aktuali~seer";
+ Text[ chinese_simplified ] = "(~U)";
+ Text[ greek ] = "";
+ Text[ korean ] = "Ʈ(~U)";
+ Text[ turkish ] = "Gn~celle";
+ Text[ language_user1 ] = " ";
+};
+String STR_SAVEASDOC
+{
+ Text = "Speichern ~unter..." ;
+ Text [ ENGLISH ] = "Save ~as..." ;
+ Text [ dutch ] = "Opslaa~n als..." ;
+ Text [ english_us ] = "Save ~As..." ;
+ Text [ italian ] = "Salva ~con nome..." ;
+ Text [ spanish ] = "G~uardar como..." ;
+ Text [ french ] = "Enregistrer ~sous..." ;
+ Text [ swedish ] = "Spara som..." ;
+ Text [ danish ] = "Ge~m som..." ;
+ Text [ portuguese_brazilian ] = "Speichern ~unter..." ;
+ Text [ portuguese ] = "Guardar ~como..." ;
+ Text[ chinese_simplified ] = "Ϊ(~A)...";
+ Text[ russian ] = " ...";
+ Text[ polish ] = "Zapisz jako...";
+ Text[ japanese ] = "Otĕۑ(~A)...";
+ Text[ chinese_traditional ] = "tss(~A)...";
+ Text[ arabic ] = " ...";
+ Text[ dutch ] = "Opslaa~n als...";
+ Text[ chinese_simplified ] = "Ϊ(~A)...";
+ Text[ greek ] = " ...";
+ Text[ korean ] = "ٸ ̸ (~A)...";
+ Text[ turkish ] = "~Farkl kaydet...";
+ Text[ language_user1 ] = " ";
+};
+String STR_SAVECOPYDOC
+{
+ Text = "Kopie Speichern ~unter..." ;
+ Text [ ENGLISH ] = "Save Copy ~as" ;
+ Text [ english_us ] = "Save Copy ~as..." ;
+ Text [ italian ] = "Salva copia con ~nome..." ;
+ Text [ spanish ] = "Guardar copia ~como..." ;
+ Text [ french ] = "Enregistrer la copie ~sous..." ;
+ Text [ dutch ] = "~Kopie opslaan als..." ;
+ Text [ swedish ] = "Spara kopia som..." ;
+ Text [ danish ] = "Gem kopi som..." ;
+ Text [ portuguese_brazilian ] = "Kopie Speichern ~unter..." ;
+ Text [ portuguese ] = "Guardar ~cpia como..." ;
+ Text[ chinese_simplified ] = "Ϊ(~A)...";
+ Text[ russian ] = " ...";
+ Text[ polish ] = "Zapisz kopi jako...";
+ Text[ japanese ] = "߰ɖOtĕۑ(~A)...";
+ Text[ chinese_traditional ] = "_tss(~A)...";
+ Text[ arabic ] = " ...";
+ Text[ dutch ] = "~Kopie opslaan als...";
+ Text[ chinese_simplified ] = "Ϊ(~A)...";
+ Text[ greek ] = " ...";
+ Text[ korean ] = "縦 ٸ ̸ (~A)...";
+ Text[ turkish ] = "Kopyasn farkl ka~ydet...";
+ Text[ language_user1 ] = " ";
+};
+String STR_CLOSEDOC
+{
+ Text = "S~chlieen" ;
+ Text [ ENGLISH ] = "~Close" ;
+ Text [ dutch ] = "S~luiten" ;
+ Text [ english_us ] = "~Close" ;
+ Text [ italian ] = "Chiudi" ;
+ Text [ spanish ] = "~Cerrar" ;
+ Text [ french ] = "~Fermer" ;
+ Text [ swedish ] = "St~ng" ;
+ Text [ danish ] = "Luk" ;
+ Text [ portuguese_brazilian ] = "S~chlieen" ;
+ Text [ portuguese ] = "~Fechar" ;
+ Text[ chinese_simplified ] = "ر(~C)";
+ Text[ russian ] = "~";
+ Text[ polish ] = "Zamknij";
+ Text[ japanese ] = "‚(~C)";
+ Text[ chinese_traditional ] = "(~C)";
+ Text[ arabic ] = "";
+ Text[ dutch ] = "S~luiten";
+ Text[ chinese_simplified ] = "ر(~C)";
+ Text[ greek ] = "";
+ Text[ korean ] = "ݱ(~C)";
+ Text[ turkish ] = "~Kapat";
+ Text[ language_user1 ] = " ";
+};
+String STR_CLOSEDOC_ANDRETURN
+{
+ /* ### ACHTUNG: Neuer Text in Resource? S~chlieen & zurck zu : S~chlieen & zurck zu */
+ /* ### ACHTUNG: Neuer Text in Resource? S~chlieen & zurck zu : S~chlieen & zurck zu */
+ Text = "S~chlieen & zurck zu " ;
+ Text [ ENGLISH ] = "~Close & Return to " ;
+ Text [ english_us ] = "~Close & Return to " ;
+ Text [ italian ] = "Chiudi e ritorna a " ;
+ Text [ spanish ] = "C~errar y regresar a " ;
+ Text [ french ] = "~Fermer & retourner " ;
+ Text [ dutch ] = "S~luiten en terug naar " ;
+ Text [ swedish ] = "St~ng och tillbaka till " ;
+ Text [ danish ] = "Luk og g tilbage til " ;
+ Text [ portuguese_brazilian ] = "S~chlieen & zurck zu " ;
+ Text [ portuguese ] = "~Fechar & Regressar a " ;
+ Text[ chinese_simplified ] = "رպͷ(~C)";
+ Text[ russian ] = " & ";
+ Text[ polish ] = "Zamknij & Powr do ";
+ Text[ japanese ] = "‚&߂(~C)";
+ Text[ chinese_traditional ] = "M^(~C)";
+ Text[ arabic ] = " ";
+ Text[ dutch ] = "S~luiten en terug naar ";
+ Text[ chinese_simplified ] = "رպͷ(~C)";
+ Text[ greek ] = " ";
+ Text[ korean ] = "ݰ ǵư (~C)";
+ Text[ turkish ] = "Kapat ve geri dn ";
+ Text[ language_user1 ] = " ";
+};
+String STR_WIZARD
+{
+ Text = "wizard" ;
+ Text [ ENGLISH ] = "wizard" ;
+ Text [ english_us ] = "wizard" ;
+ Text [ italian ] = "wizard" ;
+ Text [ spanish ] = "asistente" ;
+ Text [ french ] = "Assistant" ;
+ Text [ dutch ] = "wizard" ;
+ Text [ swedish ] = "wizard" ;
+ Text [ danish ] = "wizard" ;
+ Text [ portuguese_brazilian ] = "wizard" ;
+ Text [ portuguese ] = "wizard" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "kreator";
+ Text[ japanese ] = "ް";
+ Text[ chinese_traditional ] = "Q";
+ Text[ arabic ] = "";
+ Text[ dutch ] = "wizard";
+ Text[ chinese_simplified ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "Asistan";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_FILTCONFIG
+{
+ Text = "Konfigurationen" ;
+ Text [ ENGLISH ] = "Configurations" ;
+ Text [ dutch ] = "Configuraties" ;
+ Text [ english_us ] = "Configurations" ;
+ Text [ italian ] = "Configurazioni" ;
+ Text [ spanish ] = "Configuraciones" ;
+ Text [ french ] = "Paramtres" ;
+ Text [ swedish ] = "Konfigurationer" ;
+ Text [ danish ] = "Konfigurationer" ;
+ Text [ portuguese_brazilian ] = "Konfigurationen" ;
+ Text [ portuguese ] = "Configuraes" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "Konfiguracje";
+ Text[ japanese ] = "ݒ";
+ Text[ chinese_traditional ] = "tm";
+ Text[ arabic ] = "";
+ Text[ dutch ] = "Configuraties";
+ Text[ chinese_simplified ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "Konfigrasyonlar";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_FILTBASIC
+{
+ Text = "StarBasic Bibliotheken" ;
+ Text [ ENGLISH ] = "StarBasic Libraries" ;
+ Text [ dutch ] = "StarOffice Basic Bibliotheken" ;
+ Text [ english_us ] = "StarOffice Basic Libraries" ;
+ Text [ italian ] = "Biblioteche di StarOffice Basic" ;
+ Text [ spanish ] = "Bibliotecas StarOffice Basic" ;
+ Text [ french ] = "Bibilothques StarOffice Basic" ;
+ Text [ swedish ] = "StarOffice Basic Bibliotek" ;
+ Text [ danish ] = "StarOffice Basic biblioteker" ;
+ Text [ portuguese_brazilian ] = "StarOffice Basic Bibliotheken" ;
+ Text [ portuguese ] = "Bibliotecas StarOffice Basic" ;
+ Text[ chinese_simplified ] = "StarOffice Basic ";
+ Text[ russian ] = " StarOffice Basic";
+ Text[ polish ] = "Biblioteki w StarOffice Basic";
+ Text[ japanese ] = "StarOffice Basic ײ";
+ Text[ chinese_traditional ] = "StarOffice Basic {w";
+ Text[ arabic ] = " StarOffice Basic";
+ Text[ dutch ] = "StarOffice Basic Bibliotheken";
+ Text[ chinese_simplified ] = "StarOffice Basic ";
+ Text[ greek ] = " StarOffice Basic";
+ Text[ korean ] = "StarOffice Basic ̺귯";
+ Text[ turkish ] = "StarOffice Basic kitaplklar";
+ Text[ language_user1 ] = " ";
+};
+String RID_STR_WARNSTYLEOVERWRITE
+{
+ Text = "Soll der Style \"$(ARG1)\" ersetzt werden?" ;
+ Text [ ENGLISH ] = "Should style \"$(ARG1)\" be overwritten?" ;
+ Text [ english_us ] = "Should the \"$(ARG1)\" Style be replaced?" ;
+ Text [ italian ] = "Volete sostituire lo stile \"$(ARG1)\"?" ;
+ Text [ spanish ] = "Desea substituir el estilo \"$(ARG1)\"?" ;
+ Text [ french ] = "Voulez-vous vraiment remplacer le style $(ARG1) ?" ;
+ Text [ dutch ] = "Wilt u opmaakprofiel \"$(ARG1)\" vervangen?" ;
+ Text [ swedish ] = "Ska formatet \"$(ARG1)\" ersttas?" ;
+ Text [ danish ] = "Skal typografien \"$(ARG1)\" erstattes?" ;
+ Text [ portuguese_brazilian ] = "Soll der Style $(ARG1) ersetzt werden?" ;
+ Text [ portuguese ] = "Deseja substituir o estilo \"$(ARG1)\"?" ;
+ Text[ chinese_simplified ] = "Ҫʽ$(ARG1)";
+ Text[ russian ] = " \"$(ARG1)\"?";
+ Text[ polish ] = "Zastpi styl \"$(ARG1)\"?";
+ Text[ japanese ] = "\"$(ARG1)\"u܂?";
+ Text[ chinese_traditional ] = "nN˦$(ARG1)H";
+ Text[ arabic ] = " \"$(ARG1)\"";
+ Text[ dutch ] = "Wilt u opmaakprofiel \"$(ARG1)\" vervangen?";
+ Text[ chinese_simplified ] = "Ҫʽ$(ARG1)";
+ Text[ greek ] = " $(ARG1);";
+ Text[ korean ] = " $(ARG1) üϽðڽϱ?";
+ Text[ turkish ] = "\"$(ARG1)\" biimi bakas ile deitirilsin mi?";
+ Text[ language_user1 ] = "All \"Vorlagen\" /Styles are written with a capital S.10.5.00EM";
+};
+String STR_DOC_LOADING
+{
+ Text = "Dokument wird geladen" ;
+ Text [ English ] = "loading document" ;
+ Text [ english_us ] = "Loading Document" ;
+ Text [ italian ] = "Il documento viene aperto" ;
+ Text [ spanish ] = "Cargando el documento" ;
+ Text [ french ] = "Document en cours de chargement" ;
+ Text [ dutch ] = "Document wordt geladen" ;
+ Text [ swedish ] = "Dokument laddas" ;
+ Text [ danish ] = "Indlser dokument" ;
+ Text [ portuguese_brazilian ] = "Dokument wird geladen" ;
+ Text [ portuguese ] = "A carregar documento" ;
+ Text[ chinese_simplified ] = "װĵ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "adowanie dokumentu";
+ Text[ japanese ] = "޷Ăǂݍł܂";
+ Text[ chinese_traditional ] = "b˸";
+ Text[ arabic ] = " ";
+ Text[ dutch ] = "Document wordt geladen";
+ Text[ chinese_simplified ] = "װĵ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ε ";
+ Text[ turkish ] = "Belge ykleniyor";
+ Text[ language_user1 ] = " ";
+};
+Resource RID_DLSTATUS
+{
+ String INET_NAME_RESOLVE_START
+ {
+ Text = "Verbindung zu: $(HOST). Warten auf Antwort..." ;
+ Text [ ENGLISH ] = "Connection to: $(HOST). Waiting for response..." ;
+ Text [ dutch ] = "Verbinding met: $(HOST). Wacht op antwoord..." ;
+ Text [ english_us ] = "Connection to: $(HOST). Waiting for response..." ;
+ Text [ italian ] = "Collegamento a: $(HOST). in attesa di risposta..." ;
+ Text [ spanish ] = "Conexin con: $(HOST). Esperando respuesta..." ;
+ Text [ french ] = "Connexion : $(HOST). Attend rponse..." ;
+ Text [ swedish ] = "Ansluter till: $(HOST). Vntar p svar..." ;
+ Text [ danish ] = "Forbindelse til: $(HOST). Venter p svar..." ;
+ Text [ portuguese_brazilian ] = "Verbindung zu: $(HOST). Warten auf Antwort..." ;
+ Text [ portuguese ] = "Ligao com: $(HOST). Esperando resposta..." ;
+ Text[ chinese_simplified ] = "ӵ$(HOST)ڵȺ...";
+ Text[ russian ] = " : $(HOST). ...";
+ Text[ polish ] = "Poczenie z: $(HOST). Czekanie na odpowied...";
+ Text[ japanese ] = "ڑ:$(HOST)B҂Ă܂...";
+ Text[ chinese_traditional ] = "su$(HOST)CbԵ_...";
+ Text[ arabic ] = " : $(HOST). ...";
+ Text[ dutch ] = "Verbinding met: $(HOST). Wacht op antwoord...";
+ Text[ chinese_simplified ] = "ӵ$(HOST)ڵȺ...";
+ Text[ greek ] = " : $(HOST). ...";
+ Text[ korean ] = " : $(HOST). ȸ ٸʽÿ...";
+ Text[ turkish ] = "Balanlan: $(HOST). Yant bekleniyor...";
+ Text[ language_user1 ] = " ";
+ };
+ String INET_CONNECT_START
+ {
+ Text = "Geffnet wird: $(TARGET) auf $(HOST)" ;
+ Text [ ENGLISH ] = "Opening $(TARGET) at $(HOST)" ;
+ Text [ dutch ] = "Geopend wordt: $(TARGET) op $(HOST)" ;
+ Text [ english_us ] = "Opening $(TARGET) at $(HOST)" ;
+ Text [ italian ] = "Viene aperto: $(TARGET) su $(HOST)" ;
+ Text [ spanish ] = "Abriendo: $(TARGET) en $(HOST)" ;
+ Text [ french ] = "Ouvrir : $(TARGET) $(HOST)" ;
+ Text [ swedish ] = "$(TARGET) ppnas p $(HOST)" ;
+ Text [ danish ] = "bner: $(TARGET) p $(HOST)" ;
+ Text [ portuguese_brazilian ] = "Geffnet wird: $(TARGET) auf $(HOST)" ;
+ Text [ portuguese ] = "Abrir: $(TARGET) em $(HOST)" ;
+ Text[ chinese_simplified ] = "򿪣$(HOST)ϵ$(TARGET)";
+ Text[ russian ] = "$(TARGET) $(HOST)";
+ Text[ polish ] = "Otwieranie: $(TARGET) na $(HOST)";
+ Text[ japanese ] = "J:$(HOST)$(TARGET)";
+ Text[ chinese_traditional ] = "}ҡG$(HOST)W$(TARGET)";
+ Text[ arabic ] = " : $(TARGET) $(HOST)";
+ Text[ dutch ] = "Geopend wordt: $(TARGET) op $(HOST)";
+ Text[ chinese_simplified ] = "򿪣$(HOST)ϵ$(TARGET)";
+ Text[ greek ] = ": $(TARGET) $(HOST)";
+ Text[ korean ] = "$(HOST) $(TARGET) ";
+ Text[ turkish ] = "Alan: $(HOST) zerinde bulunan $(TARGET)";
+ Text[ language_user1 ] = " ";
+ };
+ String INET_READ_STATUS
+ {
+ Text = "bertragen wird: $(TARGET) von $(HOST). Gelesen: $(BYTE)" ;
+ Text [ ENGLISH ] = "Loading: $(TARGET) from $(HOST). Loaded: $(BYTE)" ;
+ Text [ english_us ] = "Loading: $(TARGET) from $(HOST). Loaded: $(BYTE)" ;
+ Text [ italian ] = "Viene trasferito: $(TARGET) da $(HOST). Letti: $(BYTE)" ;
+ Text [ spanish ] = "Transfiriendo: $(TARGET) desde $(HOST). Ledo: $(BYTE)" ;
+ Text [ french ] = "$(TARGET) de $(HOST) transfr. Charg : $(BYTE)" ;
+ Text [ dutch ] = "Geladen wordt: $(TARGET) van $(HOST). Gelezen: $(BYTE)" ;
+ Text [ swedish ] = "$(TARGET) verfrs frn $(HOST). Lst: $(BYTE)" ;
+ Text [ danish ] = "Overfrer: $(TARGET) fra$(HOST). Indlst: $(BYTE)" ;
+ Text [ portuguese_brazilian ] = "bertragen wird: $(TARGET) von $(HOST). Gelesen: $(BYTE)" ;
+ Text [ portuguese ] = "Transferir: $(TARGET) de $(HOST). Lidos: $(BYTE)" ;
+ Text[ chinese_simplified ] = "ݣ$(HOST)$(TARGET)ѾĶ$(BYTE)";
+ Text[ russian ] = ": $(TARGET) $(HOST). : $(BYTE)";
+ Text[ polish ] = "adowanie: $(TARGET) z $(HOST). Zaadowano: $(BYTE)";
+ Text[ japanese ] = "]:$(HOST)$(TARGET)B ǂݎ: $(BYTE)";
+ Text[ chinese_traditional ] = "ǻG$(HOST)$(TARGET)Cwg\\ŪG $(BYTE)";
+ Text[ arabic ] = " : $(TARGET) $(HOST). : $(BYTE)";
+ Text[ dutch ] = "Geladen wordt: $(TARGET) van $(HOST). Gelezen: $(BYTE)";
+ Text[ chinese_simplified ] = "ݣ$(HOST)$(TARGET)ѾĶ$(BYTE)";
+ Text[ greek ] = ": $(TARGET) $(HOST). : $(BYTE)";
+ Text[ korean ] = " : $(HOST) $(TARGET) . ε: $(BYTE)";
+ Text[ turkish ] = "Aktarlan: $(HOST) sunucusundan $(TARGET). Okunan: $(BYTE)";
+ Text[ language_user1 ] = " ";
+ };
+ String INET_CONNECTION_CLOSED
+ {
+ Text = "Verbindung abgebaut" ;
+ Text [ ENGLISH ] = "Disconnected" ;
+ Text [ dutch ] = "Verbinding verbroken" ;
+ Text [ english_us ] = "Disconnected" ;
+ Text [ italian ] = "Collegamento interrotto" ;
+ Text [ spanish ] = "Desconectado" ;
+ Text [ french ] = "Dconnect" ;
+ Text [ swedish ] = "Nedkoppling" ;
+ Text [ danish ] = "Forbindelse afbrudt" ;
+ Text [ portuguese ] = "Ligao cancelada" ;
+ Text [ portuguese_brazilian ] = "Verbindung abgebaut" ;
+ Text[ chinese_simplified ] = "Ѿ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Poczenie rozczone";
+ Text[ japanese ] = "ڑ~܂";
+ Text[ chinese_traditional ] = "wgsu";
+ Text[ arabic ] = " ";
+ Text[ dutch ] = "Verbinding verbroken";
+ Text[ chinese_simplified ] = "Ѿ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ";
+ Text[ turkish ] = "Balant kesildi";
+ Text[ language_user1 ] = " ";
+ };
+};
+Resource RID_DLSTATUS2
+{
+ String SVBINDSTATUS_FINDINGRESOURCE
+ {
+ Text = "Verbindung zu: $(HOST). Warten auf Antwort..." ;
+ Text [ ENGLISH ] = "Connection to: $(HOST). Waiting for response..." ;
+ Text [ dutch ] = "Verbinding met: $(HOST). Wacht op antwoord..." ;
+ Text [ english_us ] = "Connection to: $(HOST). Waiting for response..." ;
+ Text [ italian ] = "Collegamento con: $(HOST). in attesa di risposta..." ;
+ Text [ spanish ] = "Conexin con: $(HOST). Esperando respuesta..." ;
+ Text [ french ] = "Connexion : $(HOST). Attend rponse..." ;
+ Text [ swedish ] = "Ansluter till: $(HOST). Vntar p svar..." ;
+ Text [ danish ] = "Forbindelse til: $(HOST). Venter p svar..." ;
+ Text [ portuguese_brazilian ] = "Verbindung zu: $(HOST). Warten auf Antwort..." ;
+ Text [ portuguese ] = "Ligao com: $(HOST). Esperando resposta ..." ;
+ Text[ chinese_simplified ] = "ӣ$(HOST)ڵȺ...";
+ Text[ russian ] = " : $(HOST). ...";
+ Text[ polish ] = "Poczenie z: $(HOST). Czekanie na odpowied...";
+ Text[ japanese ] = "ڑ:$(HOST)B҂Ă܂...";
+ Text[ chinese_traditional ] = "suG$(HOST)CbԵ_...";
+ Text[ arabic ] = " : $(HOST). ...";
+ Text[ dutch ] = "Verbinding met: $(HOST). Wacht op antwoord...";
+ Text[ chinese_simplified ] = "ӣ$(HOST)ڵȺ...";
+ Text[ greek ] = " : $(HOST). ...";
+ Text[ korean ] = " : $(HOST). ȸ ٸʽÿ...";
+ Text[ turkish ] = "Balanlan: $(HOST). Yant bekleniyor...";
+ Text[ language_user1 ] = " ";
+ };
+ String SVBINDSTATUS_CONNECTING
+ {
+ Text = "Geffnet wird: $(TARGET) auf $(HOST)" ;
+ Text [ ENGLISH ] = "Opening $(TARGET) at $(HOST)" ;
+ Text [ dutch ] = "Geopend wordt: $(TARGET) op $(HOST)" ;
+ Text [ english_us ] = "Opening $(TARGET) at $(HOST)" ;
+ Text [ italian ] = "Viene aperto: $(TARGET) su $(HOST)" ;
+ Text [ spanish ] = "Abriendo: $(TARGET) en $(HOST)" ;
+ Text [ french ] = "En cours d'ouverture : $(TARGET) sur $(HOST)" ;
+ Text [ swedish ] = "$(TARGET) ppnas p $(HOST)" ;
+ Text [ danish ] = "bner: $(TARGET) p $(HOST)" ;
+ Text [ portuguese ] = "Abrir: $(TARGET) em $(HOST)" ;
+ Text [ portuguese_brazilian ] = "Geffnet wird: $(TARGET) auf $(HOST)" ;
+ Text[ chinese_simplified ] = "򿪣 $(HOST)ϵ$(TARGET)";
+ Text[ russian ] = "$(TARGET) $(HOST)";
+ Text[ polish ] = "Otwieranie: $(TARGET) na $(HOST)";
+ Text[ japanese ] = "J:$(HOST)$(TARGET)";
+ Text[ chinese_traditional ] = "}ҡG$(HOST)W$(TARGET)";
+ Text[ arabic ] = " : $(TARGET) $(HOST)";
+ Text[ dutch ] = "Geopend wordt: $(TARGET) op $(HOST)";
+ Text[ chinese_simplified ] = "򿪣 $(HOST)ϵ$(TARGET)";
+ Text[ greek ] = ": $(TARGET) $(HOST)";
+ Text[ korean ] = "$(HOST) $(TARGET) ";
+ Text[ turkish ] = "Alan: $(HOST) zerinde bulunan $(TARGET)";
+ Text[ language_user1 ] = " ";
+ };
+ String SVBINDSTATUS_DOWNLOADINGDATA
+ {
+ Text = "bertragen wird: $(TARGET) Gelesen: $(BYTE)" ;
+ Text [ ENGLISH ] = "Loading: $(TARGET) Loaded: $(BYTE)" ;
+ Text [ english_us ] = "Loading: $(TARGET) Loaded: $(BYTE)" ;
+ Text [ italian ] = "Viene trasferito: $(TARGET) Letti: $(BYTE)" ;
+ Text [ spanish ] = "Transfiriendo: $(TARGET) Ledo: $(BYTE)" ;
+ Text [ french ] = "En cours de transfert : $(TARGET) Lu : $(BYTE)" ;
+ Text [ dutch ] = "Geladen wordt: $(TARGET) Gelezen: $(BYTE)" ;
+ Text [ swedish ] = "verfrs: $(TARGET) Lst: $(BYTE)" ;
+ Text [ danish ] = "Overfrer: $(TARGET) Indlst: $(BYTE)" ;
+ Text [ portuguese_brazilian ] = "bertragen wird: $(TARGET) Gelesen: $(BYTE)" ;
+ Text [ portuguese ] = "Transferir: $(TARGET) Lidos: $(BYTE)" ;
+ Text[ chinese_simplified ] = "ݣ$(TARGET)ѾĶ$(BYTE)";
+ Text[ russian ] = ": $(TARGET) : $(BYTE)";
+ Text[ polish ] = "adowanie: $(TARGET) Zaadowano: $(BYTE)";
+ Text[ japanese ] = "]:$(TARGET) ǂݎ:$(BYTE)";
+ Text[ chinese_traditional ] = "ǻG$(TARGET)wg\\ŪG$(BYTE)";
+ Text[ arabic ] = " : $(TARGET) : $(BYTE)";
+ Text[ dutch ] = "Geladen wordt: $(TARGET) Gelezen: $(BYTE)";
+ Text[ chinese_simplified ] = "ݣ$(TARGET)ѾĶ$(BYTE)";
+ Text[ greek ] = ": $(TARGET) : $(BYTE)";
+ Text[ korean ] = " : $(TARGET) ε: $(BYTE)";
+ Text[ turkish ] = "Aktarlan: $(TARGET) Okunan: $(BYTE)";
+ Text[ language_user1 ] = " ";
+ };
+ String SVBINDSTATUS_ENDDOWNLOADDATA
+ {
+ Text = "Verbindung abgebaut" ;
+ Text [ ENGLISH ] = "Disconnected" ;
+ Text [ english_us ] = "Disconnected" ;
+ Text [ italian ] = "Collegamento interrotto" ;
+ Text [ spanish ] = "Desconectado" ;
+ Text [ french ] = "Dconnexion connexion" ;
+ Text [ dutch ] = "Verbinding verbroken" ;
+ Text [ swedish ] = "Nedkopplad" ;
+ Text [ danish ] = "Forbindelse afbrudt" ;
+ Text [ portuguese_brazilian ] = "Verbindung abgebaut" ;
+ Text [ portuguese ] = "Ligao cancelada" ;
+ Text[ chinese_simplified ] = "Ѿ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Poczenie rozczone";
+ Text[ japanese ] = "ڑ~܂";
+ Text[ chinese_traditional ] = "wgsu";
+ Text[ arabic ] = " ";
+ Text[ dutch ] = "Verbinding verbroken";
+ Text[ chinese_simplified ] = "Ѿ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ";
+ Text[ turkish ] = "Balant kesildi";
+ Text[ language_user1 ] = " ";
+ };
+};
+QueryBox MSG_OPEN_READONLY
+{
+ BUTTONS = WB_YES_NO ;
+ DEFBUTTON = WB_DEF_YES ;
+ MESSAGE = "Das Dokument kann nicht zur Bearbeitung geffnet werden.\nMchten Sie es zum Lesen ffnen?" ;
+ MESSAGE [ English ] = "The Document can't be opened for writing.\nDo you want to open it read-only?" ;
+ MESSAGE [ norwegian ] = "Dokumentet kan ikke pnes for skriving.\nVil du pne det som skrivebeskyttet?" ;
+ MESSAGE [ italian ] = "Impossibile aprire il documento per la scrittura.\nAprirlo in sola lettura?" ;
+ MESSAGE [ portuguese_brazilian ] = "O documento no pode ser aberto para gravao.\nDeseja abri-lo como s leitura?" ;
+ MESSAGE [ portuguese ] = "Impossvel abrir documento para editar.\n Abri-lo apenas para leitura?" ;
+ MESSAGE [ finnish ] = "Asiakirjaa ei voi avata kirjoittamista varten.\nAvataanko se vain lukemista varten?" ;
+ MESSAGE [ danish ] = "Det er ikke muligt at bne dokumentet til redigering.\nVil du bne det i skrivebeskyttet tilstand?" ;
+ MESSAGE [ french ] = "Impossible d'ouvrir le document pour modification.\nVoulez-vous l'ouvrir en lecture seule ?" ;
+ MESSAGE [ swedish ] = "Dokumentet kan inte ppnas fr redigering. \nVill Du ppna det fr lsning?" ;
+ MESSAGE [ dutch ] = "Dit document is schrijfbeveiligd.\nWilt u het alleen-lezen?" ;
+ MESSAGE [ spanish ] = "El documento no se puede abrir para editar.\nDesea abrirlo solo para leer?" ;
+ MESSAGE [ english_us ] = "Document can't be opened for editing.\nDo you want to open it as read only?" ;
+ MESSAGE[ chinese_simplified ] = "ܱ༭ļ\nҪĶ";
+ MESSAGE[ russian ] = " .\n ?";
+ MESSAGE[ polish ] = "Dokumentu nie mona otworzy do edycji.\nCzy chcesz go otworzy do odczytu?";
+ MESSAGE[ japanese ] = "޷Ă͕ҏWpɊJƂ͂ł܂B\nǂݎpɊJ܂?";
+ MESSAGE[ chinese_traditional ] = "zsoɮסC\nn}Ҿ\\ŪH";
+ MESSAGE[ arabic ] = " .\n ɿ";
+ MESSAGE[ dutch ] = "Dit document is schrijfbeveiligd.\nWilt u het alleen-lezen?";
+ MESSAGE[ chinese_simplified ] = "ܱ༭ļ\nҪĶ";
+ MESSAGE[ greek ] = " .\n ;";
+ MESSAGE[ korean ] = " ϴ.\n ðڽϱ?";
+ MESSAGE[ turkish ] = "Belge dzenleme iin alamyor.\nBelge okuma iin alsn m?";
+ MESSAGE[ language_user1 ] = " ";
+};
+String STR_EDIT
+{
+ Text = "Bearbeiten" ;
+ Text [ English ] = "Edit" ;
+ Text [ english_us ] = "Edit" ;
+ Text [ portuguese_brazilian ] = "Bearbeiten" ;
+ Text [ swedish ] = "Redigera" ;
+ Text [ danish ] = "Rediger" ;
+ Text [ italian ] = "Modifica" ;
+ Text [ spanish ] = "Editar" ;
+ Text [ french ] = "Modifier" ;
+ Text [ dutch ] = "Bewerken" ;
+ Text [ portuguese ] = "Editar" ;
+ Text[ chinese_simplified ] = "༭";
+ Text[ russian ] = "";
+ Text[ polish ] = "Edytuj";
+ Text[ japanese ] = "ҏW";
+ Text[ chinese_traditional ] = "s";
+ Text[ arabic ] = "";
+ Text[ dutch ] = "Bewerken";
+ Text[ chinese_simplified ] = "༭";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "Dzenle";
+ Text[ language_user1 ] = " ";
+};
+String RID_OFFICEFILTER
+{
+ Text = "StarOffice Dokumente" ;
+ Text [ English ] = "StarOffice Documents" ;
+ Text [ english_us ] = "StarOffice Documents" ;
+ Text [ italian ] = "Documenti StarOffice" ;
+ Text [ spanish ] = "Documentos StarOffice" ;
+ Text [ french ] = "Documents StarOffice" ;
+ Text [ dutch ] = "StarOffice-documenten" ;
+ Text [ swedish ] = "StarOffice-dokument" ;
+ Text [ danish ] = "StarOffice dokumenter" ;
+ Text [ portuguese_brazilian ] = "StarOffice Dokumente" ;
+ Text [ portuguese ] = "Documentos StarOffice" ;
+ Text[ chinese_simplified ] = "StarOffice ĵ";
+ Text[ russian ] = "StarOffice - ";
+ Text[ polish ] = "StarOffice - Dokumenty";
+ Text[ japanese ] = "StarOffice޷";
+ Text[ chinese_traditional ] = "StarOffice ";
+ Text[ arabic ] = " StarOffice ";
+ Text[ dutch ] = "StarOffice-documenten";
+ Text[ chinese_simplified ] = "StarOffice ĵ";
+ Text[ greek ] = "StarOffice - ";
+ Text[ korean ] = "StarOffice ";
+ Text[ turkish ] = "StarOffice belgeleri";
+ Text[ language_user1 ] = " ";
+};
+String RID_OFFICEFILTER_WILDCARD
+{
+ Text = "*.sdw;*.sdd;*.sda;*.sdc;*.smf;*.sds;*.sd;*.sdm;*.smd" ;
+};
+String RID_OFFICEFILTER_MACTYPE
+{
+ Text = "SVsd0;SW/\2510;SVsc0;SVsm0;SVsh0;SVsd1;SW/\2511;SVsc1;SVsm1;SVsh1;MAIL" ;
+};
+String RID_OFFICEFILTER_OS2TYPE
+{
+ Text = "StarWriter 4.0;StarWriter 3.0;StarDraw 4.0;StarDraw 3.0;StarCalc 4.0;StarCalc 3.0;StarMath 4.0;StarMath 3.0;StarChart 4.0;StarChart 3.0;StarFrameSet;StarMessage" ;
+};
+String STR_FRAMEOBJECT_PROPERTIES
+{
+ Text = "~Eigenschaften ..." ;
+ Text [ ENGLISH ] = "~Properties ..." ;
+ Text [ english_us ] = "Propert~ies ..." ;
+ Text [ swedish ] = "~Egenskaper..." ;
+ Text [ danish ] = "Egenskaber ..." ;
+ Text [ italian ] = "Propri~et..." ;
+ Text [ spanish ] = "Prop~iedades..." ;
+ Text [ french ] = "~Proprits ..." ;
+ Text [ dutch ] = "~Eigenschappen ..." ;
+ Text [ portuguese_brazilian ] = "~Eigenschaften ..." ;
+ Text [ portuguese ] = "~Propriedades ..." ;
+ Text[ chinese_simplified ] = "(~I)...";
+ Text[ russian ] = " ...";
+ Text[ polish ] = "Waciwoci ...";
+ Text[ japanese ] = "è(~I)...";
+ Text[ chinese_traditional ] = "ݩ(~I)...";
+ Text[ arabic ] = "...";
+ Text[ dutch ] = "~Eigenschappen ...";
+ Text[ chinese_simplified ] = "(~I)...";
+ Text[ greek ] = " ...";
+ Text[ korean ] = "(~I)...";
+ Text[ turkish ] = "~zellikler ...";
+ Text[ language_user1 ] = " ";
+};
+String STR_FSET_FILTERNAME0
+{
+ Text = "HTML (FrameSet)" ;
+ Text [ ENGLISH ] = "HTML (FrameSet)" ;
+ Text [ english_us ] = "HTML (FrameSet)" ;
+ Text [ portuguese_brazilian ] = "HTML (FrameSet)" ;
+ Text [ swedish ] = "HTML (FrameSet)" ;
+ Text [ danish ] = "HTML (FrameSet)" ;
+ Text [ italian ] = "HTML (FrameSet)" ;
+ Text [ spanish ] = "HTML (FrameSet)" ;
+ Text [ french ] = "HTML (FrameSet)" ;
+ Text [ dutch ] = "HTML (FrameSet)" ;
+ Text [ portuguese ] = "HTML (FrameSet)" ;
+ Text[ chinese_simplified ] = "HTML ()";
+ Text[ russian ] = "HTML ( )";
+ Text[ polish ] = "HTML (Zestaw ramek)";
+ Text[ japanese ] = "HTML(ڰѾ)";
+ Text[ chinese_traditional ] = "HTML (Tج[)";
+ Text[ arabic ] = "HTML (FrameSet)";
+ Text[ dutch ] = "HTML (FrameSet)";
+ Text[ chinese_simplified ] = "HTML ()";
+ Text[ greek ] = "HTML (FrameSet)";
+ Text[ korean ] = "HTML ( )";
+ Text[ turkish ] = "HTML (FrameSet)";
+ Text[ language_user1 ] = " ";
+};
+String STR_FSET_FILTERNAME1
+{
+ // nur 'Dokument' "ubersetzen - only translate 'Document'
+ Text = "StarOffice Frame Dokument" ;
+ Text [ ENGLISH ] = "StarOffice Frame Document" ;
+ Text [ english_us ] = "StarOffice Frame Document" ;
+ Text [ portuguese_brazilian ] = "StarFrame Dokument" ;
+ Text [ swedish ] = "StarOffice Frame-dokument" ;
+ Text [ danish ] = "StarOffice Frame-dokument" ;
+ Text [ italian ] = "Documento StarOffice Frame" ;
+ Text [ spanish ] = "Documento StarOffice Frame" ;
+ Text [ french ] = "Document StarOffice Frame" ;
+ Text [ dutch ] = "StarOffice Frame-document" ;
+ Text [ portuguese ] = "Documento StarOffice Frame" ;
+ Text[ chinese_simplified ] = "StarOffice Frame ĵ";
+ Text[ russian ] = "StarOffice Frame - ";
+ Text[ polish ] = "Dokument StarOffice Frame";
+ Text[ japanese ] = "StarOffice Frame ޷";
+ Text[ chinese_traditional ] = "StarOffice Frame ";
+ Text[ arabic ] = " StarOffice Frame";
+ Text[ dutch ] = "StarOffice Frame-document";
+ Text[ chinese_simplified ] = "StarOffice Frame ĵ";
+ Text[ greek ] = " StarOfficeFrame";
+ Text[ korean ] = "StarOffice Frame ";
+ Text[ turkish ] = "StarOffice frame belgesi";
+ Text[ language_user1 ] = " ";
+};
+String STR_TEMPL_MOVED
+{
+ Text = "Die Vorlage \"$(TEMPLATE)\" wurde nicht an ihrem ursprnglichem Ort gefunden. Eine Vorlage gleichen Namens existiert an der Stelle \"$(FOUND)\". Soll diese Vorlage in Zukunft zum Abgleichen benutzt werden?" ;
+ Text [ ENGLISH ] = "Die Vorlage \"$(TEMPLATE)\" wurde nicht an ihrem ursprnglichem Ort gefunden. Eine Vorlage gleichen Namens existiert an der Stelle \"$(FOUND)\". Soll diese Vorlage in Zukunft zum Abgleichen benutzt werden?" ;
+ Text [ english_us ] = "The template \"$(TEMPLATE)\" was not found at the original location. A template with the same name exists at \"$(FOUND)\". Should this template be used in the future when comparing?" ;
+ Text [ portuguese_brazilian ] = "Die Vorlage $(TEMPLATE) wurde nicht an ihrem ursprnglichem Ort gefunden. Eine Vorlage gleichen Namens existiert an der Stelle $(FOUND). Soll diese Vorlage in Zukunft zum Abgleichen benutzt werden?" ;
+ Text [ swedish ] = "Mallen \"$(TEMPLATE)\" hittades inte p sin ursprungliga plats. En mall med samma namn finns p \"$(FOUND)\". Skall denna mall fortsttningsvis anvndas vid synkronisering?" ;
+ Text [ danish ] = "Skabelonen \"$(TEMPLATE)\" blev ikke fundet p det oprindelige sted. En skabelon med samme navn findes p stedet \"$(FOUND)\". Skal denne skabelon fremover bruges til synkronisering?" ;
+ Text [ italian ] = "Il modello $(TEMPLATE) non stato trovato al suo posto originario. Un modello con lo stesso nome esiste in $(FOUND). Volete usare in futuro questo modello per l'aggiornamento?" ;
+ Text [ spanish ] = "La plantilla \"$(TEMPLATE)\" no se encontr en su ubicacin original. Una plantilla con el mismo nombre se encontr en \"$(FOUND)\". Desea utilizar esta plantilla al sincronizar en el futuro?" ;
+ Text [ french ] = "Le modle \"$(TEMPLATE)\" n'a pas t trouv son emplacement d'origine. Un modle du mme nom a t dtect sur le chemin \"$(FOUND)\". Voulez-vous que ce modle soit utilis l'avenir en remplacement du modle introuvable ?" ;
+ Text [ dutch ] = "Sjabloon \"$(TEMPLATE)\" werd niet op de oorspronkelijke plaats gevonden. Een sjabloon met dezelfde naam bevindt zich op \"$(FOUND)\". Wilt u deze sjabloon in de toekomst voor het synchroniseren gebruiken?" ;
+ Text [ portuguese ] = "O modelo \"$(TEMPLATE)\" no foi encontrado no seu lugar original. J existe um modelo com o mesmo nome em \"$(FOUND)\". Deseja usar este modelo para actualizaes futuras?" ;
+ Text[ chinese_simplified ] = "ûԭλҵʽ$(TEMPLATE)һͬʽڡ$(FOUND)Ҫʹʽе";
+ Text[ russian ] = " \"$(TEMPLATE)\" . \"$(FOUND)\". ?";
+ Text[ polish ] = "Szablonu \"$(TEMPLATE)\" nie znaleziono na jego pierwotnym miejscu. Szablon o tej samej nazwie istnieje w \"$(FOUND)\". Czy uy w przyszoci tego szablonu do aktualizacji?";
+ Text[ japanese ] = "ڰ\"$(TEMPLATE)\" ̏ꏊɌ‚܂łBOڰĂ \"$(FOUND)\"ɂ܂BڰĂ ݸۂɎg܂?";
+ Text[ chinese_traditional ] = "SbӪmoӼ˦$(TEMPLATE)C@ӦPW˦b $(FOUND) CznoӼ˦H";
+ Text[ arabic ] = " \"$(TEMPLATE)\" . \"$(FOUND)\". ";
+ Text[ dutch ] = "Sjabloon \"$(TEMPLATE)\" werd niet op de oorspronkelijke plaats gevonden. Een sjabloon met dezelfde naam bevindt zich op \"$(FOUND)\". Wilt u deze sjabloon in de toekomst voor het synchroniseren gebruiken?";
+ Text[ chinese_simplified ] = "ûԭλҵʽ$(TEMPLATE)һͬʽڡ$(FOUND)Ҫʹʽе";
+ Text[ greek ] = " $(TEMPLATE) . $(FOUND). ;";
+ Text[ korean ] = "$(TEMPLATE) ġ ߰ߵ ʾҽϴ. ̸ $(FOUND) ֽϴ. ȭ ̿Ͻðڽϱ?";
+ Text[ turkish ] = "\"$(TEMPLATE)\" ablonu asl yerinde bulunamad. Ayn adl ablonun bulunduu yerin ad: \"$(FOUND)\". Bu ablon gelecekte karlatrma iin kullanlsn m?";
+ Text[ language_user1 ] = " ";
+};
+String STR_TEMPL_RESET
+{
+ Text = "Die Vorlage \"$(TEMPLATE)\" wurde nicht gefunden. Soll in Zukunft weiterhin nach ihr gesucht werden?" ;
+ Text [ ENGLISH ] = "Die Vorlage \"$(TEMPLATE)\" wurde nicht gefunden. Soll in Zukunft weiterhin nach ihr gesucht werden?" ;
+ Text [ english_us ] = "The template \"$(TEMPLATE)\" has not been found. Should the template be looked for the next time the document is opened ?" ;
+ Text [ portuguese_brazilian ] = "Die Vorlage $(TEMPLATE) wurde nicht gefunden. Soll in Zukunft weiterhin nach ihr gesucht werden?" ;
+ Text [ swedish ] = "Mallen \"$(TEMPLATE)\" hittades inte. Skall mallen skas nsta gng dokumentet ppnas?" ;
+ Text [ danish ] = "Skabelonen \"$(TEMPLATE)\" blev ikke fundet. Skal der sges efter den igen, nste gang dokumentet bnes?" ;
+ Text [ italian ] = "Il modello $(TEMPLATE) non stato trovato. Volete che venga cercato anche in futuro?" ;
+ Text [ spanish ] = "No se encontr la plantilla \"$(TEMPLATE)\". Desea que se busque la prxima vez que abra el documento?" ;
+ Text [ french ] = "Le modle $(TEMPLATE) est introuvable. Devra-t-il tre recherch la prochaine ouverture du document ?" ;
+ Text [ dutch ] = "De sjabloon \"$(TEMPLATE)\" werd niet gevonden. Wilt u dat er ook in de toekomst naar wordt gezocht?" ;
+ Text [ portuguese ] = "O modelo \"$(TEMPLATE)\" no foi encontrado. Deseja continuar a procura quando abrir o documento novamente?" ;
+ Text[ chinese_simplified ] = "޷ҵʽ$(TEMPLATE)ҪѰ";
+ Text[ russian ] = " \"$(TEMPLATE)\" . ?";
+ Text[ polish ] = "Szablonu \"$(TEMPLATE)\" nie znaleziono. Czy szuka go nadal?";
+ Text[ japanese ] = "ڰ\"$(TEMPLATE)\"͌‚܂łBꂩČ܂?";
+ Text[ chinese_traditional ] = "LkoӼ˦ $(TEMPLATE) Cn~M䥦H";
+ Text[ arabic ] = " \"$(TEMPLATE)\". ";
+ Text[ dutch ] = "De sjabloon \"$(TEMPLATE)\" werd niet gevonden. Wilt u dat er ook in de toekomst naar wordt gezocht?";
+ Text[ chinese_simplified ] = "޷ҵʽ$(TEMPLATE)ҪѰ";
+ Text[ greek ] = " $(TEMPLATE) . ;";
+ Text[ korean ] = " $(TEMPLATE) ߰ߵ ʾҽϴ. ε ãðڽϱ?";
+ Text[ turkish ] = "\"$(TEMPLATE)\" ablonu bulunamad. Bu ablon gelecekte de aransn m?";
+ Text[ language_user1 ] = " ";
+};
+String STR_AUTOMATICVERSION
+{
+ Text = "Automatisch gespeicherte Version" ;
+ Text [ ENGLISH ] = "Automatically saved version" ;
+ Text [ english_us ] = "Automatically saved version" ;
+ Text [ portuguese_brazilian ] = "Automatisch gespeicherte Version" ;
+ Text [ swedish ] = "Automatiskt sparad version" ;
+ Text [ danish ] = "Automatisk gemt version" ;
+ Text [ italian ] = "Versione salvata automaticamente" ;
+ Text [ spanish ] = "Versin guardada automticamente" ;
+ Text [ french ] = "Version enregistre automatiquement" ;
+ Text [ dutch ] = "Automatisch opgeslagen versie" ;
+ Text [ portuguese ] = "Verso guardada automaticamente" ;
+ Text[ chinese_simplified ] = "Զ̵İ汾";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Autoomatycznie zapisana wersja";
+ Text[ japanese ] = "ۑްޮ";
+ Text[ chinese_traditional ] = "۰xs";
+ Text[ arabic ] = " ";
+ Text[ dutch ] = "Automatisch opgeslagen versie";
+ Text[ chinese_simplified ] = "Զ̵İ汾";
+ Text[ greek ] = " ";
+ Text[ korean ] = "ڵ ";
+ Text[ turkish ] = "Otomatik kaydedilen srm";
+ Text[ language_user1 ] = " ";
+};
+
+String STR_DOCTYPENAME_SW
+{
+ Text = "Textdokument";
+ Text [ ENGLISH ] = "Text Document" ;
+ Text[ english_us ] = "Text Document";
+ Text[ portuguese ] = "Texto";
+ Text[ russian ] = " ";
+ Text[ greek ] = " ";
+ Text[ dutch ] = "Tekstdocument";
+ Text[ french ] = "Texte";
+ Text[ spanish ] = "Documento de texto";
+ Text[ italian ] = "Documento di testo";
+ Text[ danish ] = "Tekstdokument";
+ Text[ swedish ] = "Textdokument";
+ Text[ polish ] = "Dokument tekstowy";
+ Text[ portuguese_brazilian ] = "Text Document";
+ Text[ japanese ] = "޷";
+ Text[ korean ] = "Text Document";
+ Text[ chinese_simplified ] = "ıĵ";
+ Text[ chinese_traditional ] = "r";
+ Text[ turkish ] = "Metin belgesi";
+ Text[ arabic ] = " ";
+};
+
+String STR_DOCTYPENAME_SWWEB
+{
+ Text = "HTML-Dokument";
+ Text [ ENGLISH ] = "HTML Document" ;
+ Text[ english_us ] = "HTML Document";
+ Text[ portuguese ] = "Documento HTML";
+ Text[ russian ] = " HTML";
+ Text[ greek ] = " HTML";
+ Text[ dutch ] = "HTML-document";
+ Text[ french ] = "Document HTML";
+ Text[ spanish ] = "Documento HTML";
+ Text[ italian ] = "Documento HTML";
+ Text[ danish ] = "HTML-dokument";
+ Text[ swedish ] = "HTML-dokument";
+ Text[ polish ] = "Dokument HTML";
+ Text[ portuguese_brazilian ] = "HTML Document";
+ Text[ japanese ] = "HTML `޷";
+ Text[ korean ] = "HTML Document";
+ Text[ chinese_simplified ] = "HTML ĵ";
+ Text[ chinese_traditional ] = "HTML ";
+ Text[ turkish ] = "HTML belgesi";
+ Text[ arabic ] = "HTML ";
+};
+
+String STR_DOCTYPENAME_SWGLOB
+{
+ Text = "Globaldokument";
+ Text [ ENGLISH ] = "Master Document" ;
+ Text[ english_us ] = "Master Document";
+ Text[ portuguese ] = "Documento-mestre";
+ Text[ russian ] = " ";
+ Text[ greek ] = " ";
+ Text[ dutch ] = "Master-document";
+ Text[ french ] = "Document matre";
+ Text[ spanish ] = "Documento maestro";
+ Text[ italian ] = "Documento master";
+ Text[ danish ] = "Hoveddokument";
+ Text[ swedish ] = "Samlingsdokument";
+ Text[ polish ] = "Dokument gwny";
+ Text[ portuguese_brazilian ] = "Master Document";
+ Text[ japanese ] = "Ͻ ޷";
+ Text[ korean ] = "Master Document";
+ Text[ chinese_simplified ] = "ĵ";
+ Text[ chinese_traditional ] = "D";
+ Text[ turkish ] = "Ana belge";
+ Text[ arabic ] = " ";
+};
+
+String STR_DOCTYPENAME_SC
+{
+ Text = "Tabellendokument";
+ Text [ ENGLISH ] = "Spreadsheet" ;
+ Text[ english_us ] = "Spreadsheet";
+ Text[ portuguese ] = "Folha de clculo";
+ Text[ russian ] = " ";
+ Text[ greek ] = " ";
+ Text[ dutch ] = "Werkbladdocument";
+ Text[ french ] = "Classeur";
+ Text[ spanish ] = "Hoja de clculo";
+ Text[ italian ] = "Foglio elettronico";
+ Text[ danish ] = "Regneark";
+ Text[ swedish ] = "Tabelldokument";
+ Text[ polish ] = "Arkusz kalkulacyjny";
+ Text[ portuguese_brazilian ] = "Spreadsheet";
+ Text[ japanese ] = "\\vZ޷";
+ Text[ korean ] = "Spreadsheet";
+ Text[ chinese_simplified ] = "ĵ";
+ Text[ chinese_traditional ] = "u@";
+ Text[ turkish ] = "Hesap tablosu";
+ Text[ arabic ] = " ";
+};
+
+String STR_DOCTYPENAME_SI
+{
+ Text = "Prsentation";
+ Text [ ENGLISH ] = "Presentation" ;
+ Text[ english_us ] = "Presentation";
+ Text[ portuguese ] = "Apresentao";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "Presentatie";
+ Text[ french ] = "Prsentation";
+ Text[ spanish ] = "Presentacin";
+ Text[ italian ] = "Presentazione";
+ Text[ danish ] = "Prsentation";
+ Text[ swedish ] = "Presentation";
+ Text[ polish ] = "Prezentacja";
+ Text[ portuguese_brazilian ] = "Presentation";
+ Text[ japanese ] = "ھð";
+ Text[ korean ] = "Presentation";
+ Text[ chinese_simplified ] = "ʾĸ";
+ Text[ chinese_traditional ] = "²";
+ Text[ turkish ] = "Sunu";
+ Text[ arabic ] = " ";
+};
+
+String STR_DOCTYPENAME_SD
+{
+ Text = "Zeichnung";
+ Text [ ENGLISH ] = "Drawing" ;
+ Text[ english_us ] = "Drawing";
+ Text[ portuguese ] = "Desenho";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "Tekening";
+ Text[ french ] = "Dessin";
+ Text[ spanish ] = "Dibujo";
+ Text[ italian ] = "Disegno";
+ Text[ danish ] = "Tegning";
+ Text[ swedish ] = "Teckning";
+ Text[ polish ] = "Rysunek";
+ Text[ portuguese_brazilian ] = "Drawing";
+ Text[ japanese ] = "}``";
+ Text[ korean ] = "Drawing";
+ Text[ chinese_simplified ] = "ͼ";
+ Text[ chinese_traditional ] = "øϤ";
+ Text[ turkish ] = "izim";
+ Text[ arabic ] = "";
+};
+
+String STR_DOCTYPENAME_MESSAGE
+{
+ Text = "Nachricht";
+ Text [ ENGLISH ] = "Mail" ;
+ Text[ english_us ] = "Message";
+ Text[ portuguese ] = "Mensagem";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "Bericht";
+ Text[ french ] = "Message";
+ Text[ spanish ] = "Mensaje";
+ Text[ italian ] = "Messaggio";
+ Text[ danish ] = "Meddelelse";
+ Text[ swedish ] = "Meddelande";
+ Text[ polish ] = "Wiadomo";
+ Text[ portuguese_brazilian ] = "Mail";
+ Text[ japanese ] = "ү";
+ Text[ korean ] = "Mail";
+ Text[ chinese_simplified ] = "ʼ";
+ Text[ chinese_traditional ] = "qll";
+ Text[ turkish ] = "leti";
+ Text[ arabic ] = "";
+};
+
+String STR_NOSAVEANDCLOSE
+{
+ Text = "~Verwerfen" ;
+ Text [ ENGLISH ] = "~Discard" ;
+ Text [ english_us ] = "~Discard" ;
+ Text[ portuguese ] = "~Rejeitar";
+ Text[ russian ] = "";
+ Text[ dutch ] = "~Verwerpen";
+ Text[ french ] = "~Ignorer";
+ Text[ spanish ] = "~Rechazar";
+ Text[ italian ] = "~Rigetta";
+ Text[ danish ] = "Forkast";
+ Text[ swedish ] = "~Kasta bort";
+ Text[ polish ] = "Odrzu";
+ Text[ portuguese_brazilian ] = "~Discard";
+ Text[ japanese ] = "j(~D)";
+ Text[ chinese_simplified ] = "(~D)";
+ Text[ chinese_traditional ] = "(~D)";
+ Text[ arabic ] = "";
+ Text[ dutch ] = "~Verwerpen";
+ Text[ chinese_simplified ] = "(~D)";
+ Text[ greek ] = "";
+ Text[ korean ] = "(~D)";
+ Text[ turkish ] = "~Sil";
+ Text[ language_user1 ] = " ";
+};
+
+String STR_PACKNGO_NOACCESS
+{
+ Text = "Auf den aktuellen Datentrger konnte nicht zugegriffen werden." ;
+ Text [ ENGLISH ] = "It was not posiible to access the media." ;
+ Text [ english_us ] = "Access to the current data medium not possible." ;
+ Text[ portuguese ] = "Recusado o acesso ao suporte de dados actual.";
+ Text[ russian ] = " .";
+ Text[ greek ] = " .";
+ Text[ dutch ] = "Geen toegang tot het actuele medium";
+ Text[ french ] = "Impossible d'accder au mdia actuel !";
+ Text[ spanish ] = "No se pudo acceder al medio actual.";
+ Text[ italian ] = "Non stato possibile accedere al supporto dati attuale.";
+ Text[ danish ] = "Det var ikke muligt at f adgang til det aktuelle datamedie.";
+ Text[ swedish ] = "Det gick inte att f tillgng till det aktuella datamediet.";
+ Text[ polish ] = "Nie mona byo dosta si do aktualnego nonika danych.";
+ Text[ portuguese_brazilian ] = "It was not posiible to access the media.";
+ Text[ japanese ] = "ײނɱł܂";
+ Text[ korean ] = " ü ׼ Ұմϴ.";
+ Text[ chinese_simplified ] = "޷ȡǰ̡";
+ Text[ chinese_traditional ] = "LkŪeuϤC";
+ Text[ arabic ] = " .";
+ Text[ turkish ] = "Kullanlan veri taycsna eriim salanamad.";
+};
+
+String STR_PACKNGO_NEWMEDIUM
+{
+ Text = "Legen Sie den nchsten Datentrger ein und bettigen Sie den OK-Button." ;
+ Text [ ENGLISH ] = "Insert the next media and press OK.";
+ Text [ english_us ] = "Insert the next data carrier and press OK." ;
+ Text[ portuguese ] = "Coloque o suporte de dados seguinte e prima OK.";
+ Text[ russian ] = " OK.";
+ Text[ greek ] = " OK.";
+ Text[ dutch ] = "Leg het volgende medium in het station en klik op OK.";
+ Text[ french ] = "Insrez le mdia suivant et cliquez sur OK.";
+ Text[ spanish ] = "Inserte el siguiente medio y pulse el botn Aceptar.";
+ Text[ italian ] = "Inserite il supporto dati successivo, quindi confermate con OK.";
+ Text[ danish ] = "Indst det nste datamedie og tryk p OK.";
+ Text[ swedish ] = "Lgg in nsta datamedium och tryck OK.";
+ Text[ polish ] = "Wsu nastpny nonik danych i nacinij przycisk OK.";
+ Text[ portuguese_brazilian ] = "Insert the next media and press OK.";
+ Text[ japanese ] = "̔}̂[OK]دĉB";
+ Text[ korean ] = " ü ϰ Ȯ ư ʽÿ.";
+ Text[ chinese_simplified ] = "һ̲ȷ(OK)ť";
+ Text[ chinese_traditional ] = "бzJU@ӺϤAMZ@UTwC";
+ Text[ arabic ] = " \"\".";
+ Text[ turkish ] = "Bir sonraki veri taycsn takp Tamam dmesine tklaynz.";
+};
+
+// ******************************************************************* EOF
+
diff --git a/sfx2/source/doc/docfac.cxx b/sfx2/source/doc/docfac.cxx
new file mode 100644
index 000000000000..0bbea96cf24e
--- /dev/null
+++ b/sfx2/source/doc/docfac.cxx
@@ -0,0 +1,701 @@
+/*************************************************************************
+ *
+ * $RCSfile: docfac.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:32 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _COM_SUN_STAR_REGISTRY_MERGECONFLICTEXCEPTION_HPP_
+#include <com/sun/star/registry/MergeConflictException.hpp>
+#endif
+#ifndef _COM_SUN_STAR_REGISTRY_XSIMPLEREGISTRY_HPP_
+#include <com/sun/star/registry/XSimpleRegistry.hpp>
+#endif
+#ifndef _UNOTOOLS_PROCESSFACTORY_HXX_
+#include <unotools/processfactory.hxx>
+#endif
+
+#ifndef _EMBOBJ_HXX //autogen
+#include <so3/embobj.hxx>
+#endif
+
+#include <vcl/config.hxx>
+#pragma hdrstop
+
+#include "sfx.hrc"
+
+#include "docfilt.hxx"
+#include "docfac.hxx"
+#include "viewfac.hxx"
+#include "fltfnc.hxx"
+#include "appdata.hxx"
+#include "arrdecl.hxx"
+#include "app.hxx"
+#include "module.hxx"
+#include "mnumgr.hxx"
+#include "accmgr.hxx"
+#include <inimgr.hxx>
+#include <sfxresid.hxx>
+#include <sfxuno.hxx>
+#include "doc.hrc"
+
+//========================================================================
+
+DECL_PTRARRAY( SfxViewFactoryArr_Impl, SfxViewFactory*, 2, 2 );
+
+//========================================================================
+
+DBG_NAME(SfxObjectFactory);
+TYPEINIT1(SfxObjectFactory,SvFactory);
+
+static SfxObjectFactoryArr_Impl* pObjFac = 0;
+
+//========================================================================
+
+struct SfxObjectFactory_Impl
+{
+ SfxViewFactoryArr_Impl aViewFactoryArr;// Liste von <SfxViewFactory>s
+ SfxFilterArr_Impl aFilterArr; // Liste von <SFxFilter>n
+ ResId* pMenuBarResId;
+ ResId* pPluginMenuBarResId;
+ ResId* pAccelResId;
+ ResId* pNameResId;
+ String aHelpFile;
+ String aHelpPIFile;
+ ::rtl::OUString aServiceName;
+ sal_Bool bInitFactoryCalled;
+ SfxVoidFunc pInitFactory;
+ SfxFactoryFilterContainer* pFilterContainer;
+ SfxModule* pModule;
+ SfxMenuBarManager* pMenu;
+ SfxAcceleratorManager* pAccMgr;
+ sal_uInt16 nImageId;
+ sal_Bool bOwnsAccel;
+ sal_Bool bOwnsMenu;
+ String aStandardTemplate;
+ sal_Bool bTemplateInitialized;
+ sal_uInt16 nCreateNewSlotId;
+
+ SfxObjectFactory_Impl() :
+ pMenuBarResId ( NULL ),
+ pPluginMenuBarResId ( NULL ),
+ pAccelResId ( NULL ),
+ pNameResId ( NULL ),
+ bInitFactoryCalled ( sal_False ),
+ pInitFactory ( NULL ),
+ pFilterContainer ( NULL ),
+ pModule ( NULL ),
+ pMenu ( NULL ),
+ pAccMgr ( NULL ),
+ nImageId ( 0 ),
+ bTemplateInitialized( sal_False ),
+ nCreateNewSlotId ( 0 ) {}
+
+ ~SfxObjectFactory_Impl()
+ {
+ delete pMenuBarResId;
+ delete pPluginMenuBarResId;
+ delete pAccelResId;
+ // Jetzt vom FilterMatcher
+ // delete pFilterContainer;
+ if ( bOwnsMenu )
+ delete pMenu;
+ if ( bOwnsAccel )
+ delete pAccMgr;
+ }
+};
+
+//========================================================================
+
+SfxFactoryFilterContainer* SfxObjectFactory::GetFilterContainer(
+ sal_Bool bForceLoad ) const
+{
+ if( bForceLoad )
+ ((SfxObjectFactory *)this)->DoInitFactory();
+ return pImpl->pFilterContainer;
+}
+
+void SfxObjectFactory::RegisterInitFactory(SfxVoidFunc pFunc)
+{
+ pImpl->pInitFactory = pFunc;
+// DoInitFactory();
+}
+
+void SfxObjectFactory::RegisterFilter
+(
+ const String& rName, // Klartext-Name f"ur Anzeige im Dialog
+ const String& rWildcard, // Default-Wildcards
+ SfxFilterFlags eType, // SFX_FILTER_...
+ sal_uInt32 lFormat, // Clipboard-Format
+ const String& rMacType, // 4-Byte-Type f"ur Apple Macintosh
+ const String& rTypeName, // String-Type f"ur OS/2
+ sal_uInt16 nIconId, // Resource-Id f"ur Icon
+ const String& rMimeType,
+ const String& rUserData // zum Wiedererkennen oder (frei verwendbar)
+)
+{
+ DBG_CHKTHIS(SfxObjectFactory, 0);
+ sal_uInt16 nDemo = SFX_APP()->GetDemoKind();
+
+ SfxFilter* pFilter = new SfxFilter(
+ rName, rWildcard, eType, lFormat, rMacType,
+ rTypeName, nIconId, rMimeType, pImpl->pFilterContainer, rUserData );
+/* if( nDemo != SFX_DEMOKIND_DEMO && nDemo != SFX_DEMOKIND_INVALID ||
+ pFilter->IsOwnFormat() )*/
+ // Jetzt immer uebernehmen, da es keine Demo mehr gibt. Sonst bei Ablauf
+ // Absturz in sba
+ pImpl->pFilterContainer->AddFilter(
+ pFilter, pImpl->pFilterContainer->GetFilterCount() );
+/* else
+ delete pFilter;*/
+}
+
+//--------------------------------------------------------------------
+
+void SfxObjectFactory::DoInitFactory()
+{
+ if(!pImpl->bInitFactoryCalled)
+ {
+ pImpl->bInitFactoryCalled = sal_True;
+ // FilterContainer Landen
+ GetFilterCount( );
+ (*pImpl->pInitFactory)();
+ String aShortName( String::CreateFromAscii( pShortName ) );
+ aShortName.ToLowerAscii();
+ if ( aShortName.EqualsAscii( "swriter" ) )
+ pImpl->pNameResId = new SfxResId( STR_DOCTYPENAME_SW );
+ else if ( aShortName.EqualsAscii( "swriter/web" ) )
+ pImpl->pNameResId = new SfxResId( STR_DOCTYPENAME_SWWEB );
+ else if ( aShortName.EqualsAscii( "swriter/globaldocument" ) )
+ pImpl->pNameResId = new SfxResId( STR_DOCTYPENAME_SWGLOB );
+ else if ( aShortName.EqualsAscii( "scalc" ) )
+ pImpl->pNameResId = new SfxResId( STR_DOCTYPENAME_SC );
+ else if ( aShortName.EqualsAscii( "simpress" ) )
+ pImpl->pNameResId = new SfxResId( STR_DOCTYPENAME_SI );
+ else if ( aShortName.EqualsAscii( "sdraw" ) )
+ pImpl->pNameResId = new SfxResId( STR_DOCTYPENAME_SD );
+ else if ( aShortName.EqualsAscii( "message" ) )
+ pImpl->pNameResId = new SfxResId( STR_DOCTYPENAME_MESSAGE );
+
+ if ( pImpl->aServiceName.len() )
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xMan = ::utl::getProcessServiceFactory();
+ ::com::sun::star::uno::Reference< ::com::sun::star::registry::XSimpleRegistry > xRegistry = ::com::sun::star::uno::Reference< ::com::sun::star::registry::XSimpleRegistry >
+ ( xMan->createInstance( DEFINE_CONST_UNICODE( "com.sun.star.registry.DefaultRegistry" ) ), ::com::sun::star::uno::UNO_QUERY );
+ if ( xRegistry.is() )
+ {
+ SfxFilterContainer *pCont = GetFilterContainer();
+ ::com::sun::star::uno::Reference< ::com::sun::star::registry::XRegistryKey > xRootKey = xRegistry->getRootKey();
+
+ // In der Registry die Section suchen, in der Filter f"ur mein Model registriert sind
+ ::com::sun::star::uno::Reference< ::com::sun::star::registry::XRegistryKey > xKey = xRootKey->openKey( DEFINE_CONST_UNICODE( "/Filter/" ) + pImpl->aServiceName );
+ if ( xKey.is() && xKey->getValueType() == ::com::sun::star::registry::RegistryValueType_ASCIILIST )
+ {
+ ::com::sun::star::uno::Sequence< ::rtl::OUString > aNames = xKey->getAsciiListValue();
+ const ::rtl::OUString* pStr = aNames.getConstArray();
+ for ( sal_uInt32 n=0; n<aNames.getLength(); n++ )
+ {
+ // F"ur jeden Filter die Kriterien einsammeln und einen SfxFilter generieren
+ String aName, aPattern, aExtension, aMimeType;
+ ::com::sun::star::uno::Reference< ::com::sun::star::registry::XRegistryKey > xLocalKey = xRootKey->openKey( DEFINE_CONST_UNICODE( "/IMPLEMENTATIONS/" ) + pStr[n] + DEFINE_CONST_UNICODE( "/Filter" ) );
+
+ sal_uInt32 nFilterFlags = 0;
+ xKey = xLocalKey->openKey( DEFINE_CONST_UNICODE( "Import" ) );
+ if ( xKey.is() )
+ {
+ nFilterFlags |= SFX_FILTER_IMPORT;
+ xKey = xLocalKey->openKey( DEFINE_CONST_UNICODE( "Template" ) );
+ if ( xKey.is() )
+ nFilterFlags |= SFX_FILTER_TEMPLATE;
+ }
+
+ xKey = xLocalKey->openKey( DEFINE_CONST_UNICODE( "Export" ) );
+ if ( xKey.is() )
+ nFilterFlags |= SFX_FILTER_EXPORT;
+
+ if ( nFilterFlags )
+ {
+ nFilterFlags |= SFX_FILTER_STARONEFILTER;
+
+ xKey = xLocalKey->openKey( DEFINE_CONST_UNICODE( "Name" ) );
+ if ( xKey.is() )
+ aName = String( xKey->getAsciiValue() );
+ xKey = xLocalKey->openKey( DEFINE_CONST_UNICODE( "Pattern" ) );
+ if ( xKey.is() )
+ aPattern = String( xKey->getAsciiValue() );
+ xKey = xLocalKey->openKey( DEFINE_CONST_UNICODE( "MimeType" ) );
+ if ( xKey.is() )
+ aMimeType = String( xKey->getAsciiValue() );
+ xKey = xLocalKey->openKey( DEFINE_CONST_UNICODE( "Extension" ) );
+ if ( xKey.is() )
+ {
+ aExtension = DEFINE_CONST_UNICODE( "*." );
+ aExtension += String( xKey->getAsciiValue() );
+ }
+
+ SfxFilter *pFilter = new SfxFilter( pStr[n], aExtension, nFilterFlags, 0, String(), String(), 0, aMimeType, pCont, String() );
+ pFilter->SetUIName( aName );
+ pCont->AddFilter( pFilter, pCont->GetFilterCount() );
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+IMPL_LINK_INLINE( SfxObjectFactory, InitFactoryHdl, void*, EMPTYARG,
+{
+ pImpl->pFilterContainer->LoadHdl_Impl( pImpl->pFilterContainer, 0 );
+ SFX_APP()->Get_Impl()->aPendingInitFactories.Remove( this );
+ DoInitFactory();
+ return 0;
+}
+)
+
+sal_uInt16 SfxObjectFactory::GetFilterCount() const
+{
+ ((SfxObjectFactory *)this)->DoInitFactory();
+ return pImpl->pFilterContainer->GetFilterCount();
+}
+
+//--------------------------------------------------------------------
+
+const SfxFilter* SfxObjectFactory::GetFilter(sal_uInt16 i) const
+{
+ ((SfxObjectFactory *)this)->DoInitFactory();
+ return pImpl->pFilterContainer->GetFilter( i );
+}
+
+//--------------------------------------------------------------------
+
+SfxObjectShell *SfxObjectFactory::CreateObject(SfxObjectCreateMode eMode) const
+{
+ DBG_CHKTHIS(SfxObjectFactory, 0);
+ return (*fnCreate)(eMode);
+}
+
+// -----------------------------------------------------------------------
+
+void SfxObjectFactory::Construct
+(
+ sal_uInt16 nFactoryId,
+ SfxObjectCtor fnCreateFnc,
+ SfxObjectShellFlags nFlagsP,
+ const char* pName
+)
+{
+ DBG_CHKTHIS(SfxObjectFactory, 0);
+
+ nFlags = nFlagsP;
+ fnCreate = fnCreateFnc;
+ nId = nFactoryId;
+// pIniMgr = 0;
+ pShortName = pName;
+ pImpl->pFilterContainer = new SfxFactoryFilterContainer(
+ String::CreateFromAscii( pName ), *this );
+ SFX_APP()->GetFilterMatcher().AddContainer( pImpl->pFilterContainer );
+ if( !(nFlagsP & SFXOBJECTSHELL_DONTLOADFILTERS) )
+ pImpl->pFilterContainer->LoadFilters( String::CreateFromAscii( pName ) );
+
+ pImpl->aHelpFile = String::CreateFromAscii(pShortName);
+ pImpl->aHelpFile.Erase( 8 );
+ pImpl->aHelpPIFile = String(pImpl->aHelpFile,0,3);
+ pImpl->aHelpPIFile += DEFINE_CONST_UNICODE( "hlppi" );
+ pImpl->aHelpFile += DEFINE_CONST_UNICODE( ".hlp" );
+ pImpl->aHelpPIFile += DEFINE_CONST_UNICODE( ".hlp" );
+ pImpl->bOwnsMenu = pImpl->bOwnsAccel = sal_False;
+}
+
+//--------------------------------------------------------------------
+
+SfxObjectFactory::SfxObjectFactory
+(
+ const SvGlobalName& rName,
+ const String& rClassName,
+ CreateInstanceType funcCIT
+)
+: SvFactory( rName, rClassName, funcCIT ),
+ fnCreate( 0 ),
+ nId( 0 ),
+// pIniMgr( 0 ),
+ pShortName( 0 ),
+ pImpl( new SfxObjectFactory_Impl )
+{
+ DBG_CTOR(SfxObjectFactory, 0);
+
+ SfxApplication* pApp = SFX_APP();
+ RegisterObjectFactory_Impl(*this);
+ pApp->InsertLateInitHdl( LINK( this, SfxObjectFactory, InitFactoryHdl ) );
+ pApp->Get_Impl()->aPendingInitFactories.Insert( this );
+}
+
+//--------------------------------------------------------------------
+
+SfxObjectFactory::~SfxObjectFactory()
+{
+ DBG_DTOR(SfxObjectFactory, 0);
+
+ const sal_uInt16 nCount = pImpl->aFilterArr.Count();
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
+ delete pImpl->aFilterArr[i];
+ delete pImpl->pNameResId;
+ delete pImpl;
+}
+
+//--------------------------------------------------------------------
+
+void SfxObjectFactory::RegisterViewFactory
+(
+ SfxViewFactory &rFactory
+)
+{
+ sal_uInt16 nPos;
+ for ( nPos = 0;
+ nPos < pImpl->aViewFactoryArr.Count() &&
+ pImpl->aViewFactoryArr[nPos]->GetOrdinal() <= rFactory.GetOrdinal();
+ ++nPos )
+ /* empty loop */;
+ pImpl->aViewFactoryArr.Insert(nPos, &rFactory);
+}
+
+//--------------------------------------------------------------------
+
+sal_uInt16 SfxObjectFactory::GetViewFactoryCount() const
+{
+ return pImpl->aViewFactoryArr.Count();
+}
+
+//--------------------------------------------------------------------
+
+SfxViewFactory& SfxObjectFactory::GetViewFactory(sal_uInt16 i) const
+{
+ return *pImpl->aViewFactoryArr[i];
+}
+
+//--------------------------------------------------------------------
+
+void SfxObjectFactory::RegisterMenuBar( const ResId& rId )
+{
+ delete pImpl->pMenuBarResId;
+ pImpl->pMenuBarResId = new ResId( rId );
+}
+
+//--------------------------------------------------------------------
+
+void SfxObjectFactory::RegisterPluginMenuBar( const ResId& rId )
+{
+ delete pImpl->pPluginMenuBarResId;
+ pImpl->pPluginMenuBarResId = new ResId( rId );
+}
+
+//--------------------------------------------------------------------
+
+const ResId* SfxObjectFactory::GetMenuBarId() const
+{
+ return pImpl->pMenuBarResId;
+}
+
+//--------------------------------------------------------------------
+
+const ResId* SfxObjectFactory::GetPluginMenuBarId() const
+{
+ return pImpl->pPluginMenuBarResId;
+}
+
+//--------------------------------------------------------------------
+
+const ResId* SfxObjectFactory::GetAccelId() const
+{
+ return pImpl->pAccelResId;
+}
+
+//--------------------------------------------------------------------
+
+void SfxObjectFactory::RegisterAccel( const ResId& rId )
+{
+ DBG_ASSERT( !pImpl->pAccelResId, "SfxObjectFactory: double registration of Accel" );
+ pImpl->pAccelResId = new ResId(rId);
+}
+
+//--------------------------------------------------------------------
+
+//--------------------------------------------------------------------
+
+void SfxObjectFactory::RegisterHelpFile( const String& rString )
+{
+ pImpl->aHelpFile = rString;
+}
+
+//--------------------------------------------------------------------
+
+const String& SfxObjectFactory::GetHelpFile() const
+{
+ return pImpl->aHelpFile;
+}
+
+//--------------------------------------------------------------------
+
+void SfxObjectFactory::RegisterHelpPIFile( const String& rString )
+{
+ pImpl->aHelpPIFile = rString;
+}
+
+//--------------------------------------------------------------------
+
+const String& SfxObjectFactory::GetHelpPIFile() const
+{
+ return pImpl->aHelpPIFile;
+}
+
+SfxModule* SfxObjectFactory::GetModule() const
+{
+ return pImpl->pModule;
+}
+
+SfxAcceleratorManager* SfxObjectFactory::GetAccMgr_Impl()
+{
+ if ( !pImpl->pAccMgr && pImpl->pAccelResId )
+ {
+ // Checken, ob der Accel schon von einer anderen Factory angeboten wird
+ SfxApplication *pApp = SFX_APP();
+ SfxObjectFactoryArr_Impl& rArr = GetObjFacArray_Impl();
+ sal_uInt32 nCount = rArr.Count();
+ const ResId& rMyId = *GetAccelId();
+ for ( sal_uInt32 n=0; n<nCount; n++ )
+ {
+ SfxObjectFactory *pFact = rArr[(sal_uInt16)n];
+ if ( pFact == this )
+ break;
+ const ResId *pId = pFact->pImpl->pAccelResId;
+ if ( pId &&
+ pId->GetId() == rMyId.GetId() &&
+ pId->GetResMgr() == rMyId.GetResMgr() )
+ {
+ pImpl->pAccMgr = pFact->GetAccMgr_Impl();
+ return pImpl->pAccMgr;
+ }
+ }
+
+ pImpl->pAccMgr =
+ new SfxAcceleratorManager( rMyId );
+ pImpl->pAccMgr->Initialize();
+ pImpl->bOwnsAccel = sal_True;
+ }
+
+ return pImpl->pAccMgr;
+}
+
+void SfxObjectFactory::SetModule_Impl( SfxModule *pMod )
+{
+ pImpl->pModule = pMod;
+}
+
+void SfxObjectFactory::SetExplorerImageId( sal_uInt16 nImageId )
+{
+ pImpl->nImageId = nImageId;
+}
+
+sal_uInt16 SfxObjectFactory::GetExplorerImageId() const
+{
+ return pImpl->nImageId;
+}
+
+void SfxObjectFactory::SetStandardTemplate( const String& rFactoryURL, const String& rTemplate )
+{
+ const SfxObjectFactory* pFactory = SfxObjectFactory::GetFactory( rFactoryURL );
+ if ( pFactory )
+ {
+ ((SfxObjectFactory*)pFactory)->pImpl->aStandardTemplate = rTemplate;
+ SfxIniManager* pIni = SFX_INIMANAGER();
+ if ( !rTemplate.Len() )
+ pIni->DeleteKey( DEFINE_CONST_UNICODE( "StandardTemplates"),
+ String::CreateFromAscii( pFactory->pShortName ) );
+ else
+ pIni->WriteKey( DEFINE_CONST_UNICODE( "StandardTemplates"),
+ String::CreateFromAscii( pFactory->pShortName ), rTemplate );
+ }
+}
+
+const String& SfxObjectFactory::GetStandardTemplate() const
+{
+ if (!pImpl->bTemplateInitialized )
+ {
+ pImpl->bTemplateInitialized = sal_True;
+ SfxIniManager *pIni = SFX_INIMANAGER();
+ pImpl->aStandardTemplate = pIni->SubstPathVars( pIni->ReadKey( DEFINE_CONST_UNICODE( "StandardTemplates"),
+ String::CreateFromAscii( pShortName ) ) );
+ }
+
+ return pImpl->aStandardTemplate;
+}
+
+const SfxObjectFactory* SfxObjectFactory::GetFactory( const String& rFactoryURL )
+{
+ const SfxObjectFactory* pFactory = 0;
+ String aFact( rFactoryURL );
+ String aPrefix( DEFINE_CONST_UNICODE( "private:factory/" ) );
+ if ( aPrefix.Len() == aFact.Match( aPrefix ) )
+ // Aufruf m"oglich mit z.B. "swriter" oder "private:factory/swriter"
+ aFact.Erase( 0, aPrefix.Len() );
+ sal_uInt16 nPos = aFact.Search( '?' );
+
+ // Etwaige Parameter abschneiden
+ aFact.Erase( nPos, aFact.Len() );
+
+ SfxApplication *pApp = SFX_APP();
+
+ // "swriter4" durch "swriter" ersetzen, zum Vergleichen uppercase verwenden
+ WildCard aSearchedFac( aFact.EraseAllChars('4').ToUpperAscii() );
+ for( sal_uInt16 n = GetObjectFactoryCount_Impl(); !pFactory && n--; )
+ {
+ pFactory = &GetObjectFactory_Impl( n );
+ String aCompareTo = String::CreateFromAscii( pFactory->GetShortName() );
+ aCompareTo.ToUpperAscii();
+ if( !aSearchedFac.Matches( aCompareTo ) )
+ pFactory = 0;
+ }
+
+ return pFactory;
+}
+
+const SfxFilter* SfxObjectFactory::GetTemplateFilter() const
+{
+ sal_uInt16 nCount = GetFilterCount();
+ for ( sal_uInt16 n=0; n<nCount; n++ )
+ {
+ const SfxFilter *pFilter = pImpl->pFilterContainer->GetFilter(n);
+ if ( pFilter->GetFilterFlags() & SFX_FILTER_TEMPLATE)
+ return pFilter;
+ }
+
+ return 0;
+}
+
+void SfxObjectFactory::SetCreateNewSlotId( sal_uInt16 nId )
+{
+ pImpl->nCreateNewSlotId = nId;
+}
+
+sal_uInt16 SfxObjectFactory::GetCreateNewSlotId() const
+{
+ return pImpl->nCreateNewSlotId;
+}
+
+void SfxObjectFactory::SetDocumentTypeNameResource( const ResId& rId )
+{
+ DBG_ASSERT( !pImpl->pNameResId, "UI-Namensresource mehrfach gesetzt!" );
+ pImpl->pNameResId = new ResId( rId );
+}
+
+String SfxObjectFactory::GetDocumentTypeName() const
+{
+ ((SfxObjectFactory*)this)->DoInitFactory();
+ if ( pImpl->pNameResId )
+ return String( *pImpl->pNameResId );
+ return String();
+}
+
+void SfxObjectFactory::SetDocumentServiceName( const ::rtl::OUString& rServiceName )
+{
+ pImpl->aServiceName = rServiceName;
+}
+
+const ::rtl::OUString& SfxObjectFactory::GetDocumentServiceName() const
+{
+ return pImpl->aServiceName;
+}
+
+void SfxObjectFactory::RegisterObjectFactory_Impl( SfxObjectFactory &rFac )
+{
+ SfxObjectFactory *pFac = &rFac;
+ GetObjFacArray_Impl().C40_INSERT( SfxObjectFactory, pFac, GetObjFacArray_Impl().Count() );
+}
+
+//--------------------------------------------------------------------
+
+USHORT SfxObjectFactory::GetObjectFactoryCount_Impl()
+{
+ return GetObjFacArray_Impl().Count();
+}
+
+//--------------------------------------------------------------------
+
+const SfxObjectFactory &SfxObjectFactory::GetObjectFactory_Impl(USHORT i)
+{
+ return *GetObjFacArray_Impl()[i];
+}
+
+const SfxObjectFactory& SfxObjectFactory::GetDefaultFactory()
+{
+ const SfxObjectFactory &rFactory = GetObjectFactory_Impl(0);
+ return rFactory;
+}
+
+sal_Bool SfxObjectFactory::HasObjectFactories()
+{
+ return ( GetObjFacArray_Impl().Count() != 0 );
+}
+
+SfxObjectFactoryArr_Impl& SfxObjectFactory::GetObjFacArray_Impl()
+{
+ if ( !pObjFac )
+ pObjFac = new SfxObjectFactoryArr_Impl;
+ return *pObjFac;
+}
+
+
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
new file mode 100644
index 000000000000..39b4adaaa09c
--- /dev/null
+++ b/sfx2/source/doc/docfile.cxx
@@ -0,0 +1,3091 @@
+/*************************************************************************
+ *
+ * $RCSfile: docfile.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:32 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include <stdio.h>
+
+#include <uno/mapping.hxx>
+#include <com/sun/star/task/XInteractionHandler.hpp>
+
+#ifndef _EXTATTR_HXX
+#include <svtools/extattr.hxx>
+#endif
+#define _SVSTDARR_ULONGS
+#include <svtools/svstdarr.hxx>
+
+#ifndef _EXCHANGE_HXX //autogen
+#include <vcl/exchange.hxx>
+#endif
+#ifndef _CACHESTR_HXX //autogen
+#include <tools/cachestr.hxx>
+#endif
+#ifndef _UNDO_HXX //autogen
+#include <svtools/undo.hxx>
+#endif
+#ifndef _SFXSTRITEM_HXX //autogen
+#include <svtools/stritem.hxx>
+#endif
+#ifndef _SFXENUMITEM_HXX //autogen
+#include <svtools/eitem.hxx>
+#endif
+#ifndef _MSGBOX_HXX //autogen
+#include <vcl/msgbox.hxx>
+#endif
+#ifndef _BUTTON_HXX //autogen
+#include <vcl/button.hxx>
+#endif
+#ifndef _DIALOG_HXX //autogen
+#include <vcl/dialog.hxx>
+#endif
+#ifndef _SVSTOR_HXX //autogen
+#include <so3/svstor.hxx>
+#endif
+#ifndef _FIXED_HXX //autogen
+#include <vcl/fixed.hxx>
+#endif
+#ifndef _URLOBJ_HXX //autogen
+#include <tools/urlobj.hxx>
+#endif
+
+#ifndef _INET_CONFIG_HXX
+#include <inet/inetcfg.hxx>
+#endif
+
+#ifndef _UNOTOOLS_STREAMHELPER_HXX_
+#include <unotools/streamhelper.hxx>
+#endif
+
+#include <svtools/intitem.hxx>
+
+#include <tools/zcodec.hxx>
+#ifndef _TOOLS_TEMPFILE_HXX
+#include <tools/tempfile.hxx>
+#endif
+
+#define _SVSTDARR_STRINGSDTOR
+#include <svtools/svstdarr.hxx>
+
+#ifndef _COM_SUN_STAR_UTIL_DISKFULLEXCEPTION_HPP_
+#include <com/sun/star/util/DiskFullException.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UTIL_FILEIOEXCEPTION_HPP_
+#include <com/sun/star/util/FileIOException.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UTIL_XARCHIVER_HPP_
+#include <com/sun/star/util/XArchiver.hpp>
+#endif
+#ifndef _COM_SUN_STAR_IO_XCONNECTABLE_HPP_
+#include <com/sun/star/io/XConnectable.hpp>
+#endif
+#ifndef _COM_SUN_STAR_IO_XOUTPUTSTREAM_HPP_
+#include <com/sun/star/io/XOutputStream.hpp>
+#endif
+#ifndef _COM_SUN_STAR_IO_XDATAOUTPUTSTREAM_HPP_
+#include <com/sun/star/io/XDataOutputStream.hpp>
+#endif
+#ifndef _COM_SUN_STAR_IO_XACTIVEDATACONTROL_HPP_
+#include <com/sun/star/io/XActiveDataControl.hpp>
+#endif
+#ifndef _COM_SUN_STAR_IO_XDATAINPUTSTREAM_HPP_
+#include <com/sun/star/io/XDataInputStream.hpp>
+#endif
+#ifndef _COM_SUN_STAR_IO_XMARKABLESTREAM_HPP_
+#include <com/sun/star/io/XMarkableStream.hpp>
+#endif
+#ifndef _COM_SUN_STAR_IO_XINPUTSTREAM_HPP_
+#include <com/sun/star/io/XInputStream.hpp>
+#endif
+#ifndef _COM_SUN_STAR_IO_XSTREAMLISTENER_HPP_
+#include <com/sun/star/io/XStreamListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_IO_XACTIVEDATASINK_HPP_
+#include <com/sun/star/io/XActiveDataSink.hpp>
+#endif
+#ifndef _COM_SUN_STAR_IO_XACTIVEDATASOURCE_HPP_
+#include <com/sun/star/io/XActiveDataSource.hpp>
+#endif
+#ifndef _COM_SUN_STAR_IO_XINPUTSTREAM_HPP_
+#include <com/sun/star/io/XInputStream.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LANG_XINITIALIZATION_HPP_
+#include <com/sun/star/lang/XInitialization.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_UCB_INSERTCOMMANDARGUMENT_HPP_
+#include <com/sun/star/ucb/InsertCommandArgument.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UCB_NAMECLASH_HPP_
+#include <com/sun/star/ucb/NameClash.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UCB_TRANSFERINFO_HPP_
+#include <com/sun/star/ucb/TransferInfo.hpp>
+#endif
+
+#ifndef _UNOTOOLS_PROCESSFACTORY_HXX_
+#include <unotools/processfactory.hxx>
+#endif
+#include <com/sun/star/uno/Reference.h>
+#include <com/sun/star/ucb/XContent.hpp>
+
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::ucb;
+
+#include <svtools/lckbitem.hxx>
+
+#ifndef _SFXECODE_HXX
+#include <svtools/sfxecode.hxx>
+#endif
+
+#pragma hdrstop
+
+#include "appdata.hxx"
+#include "app.hxx"
+#include "sfxtypes.hxx"
+#include "openflag.hxx"
+#include "docfile.hxx"
+#include "docfilt.hxx"
+#include "docfac.hxx"
+#include "fltfnc.hxx"
+#include "sfxresid.hxx"
+#include "doc.hrc"
+#include "progress.hxx"
+#include "doctempl.hxx"
+#include "request.hxx"
+#include "dataurl.hxx"
+#include "ucbhelp.hxx"
+#include "inimgr.hxx"
+#include "helper.hxx"
+
+#define MAX_REDIRECT 5
+
+#ifndef _COM_SUN_STAR_IO_XINPUTSTREAM_HPP_
+#include <com/sun/star/io/XInputStream.hpp>
+#endif
+#ifndef _COM_SUN_STAR_IO_XSEEKABLE_HPP_
+#include <com/sun/star/io/XSeekable.hpp>
+#endif
+#ifndef _CPPUHELPER_IMPLBASE2_HXX_
+#include <cppuhelper/implbase2.hxx>
+#endif
+
+#define staruno ::com::sun::star::uno
+#define stario ::com::sun::star::io
+
+typedef ::cppu::WeakImplHelper2<com::sun::star::io::XInputStream, com::sun::star::io::XSeekable> InputStreamHelper_Base;
+class OInputStreamHelper : public InputStreamHelper_Base
+{
+ ::osl::Mutex m_aMutex;
+ SvLockBytesRef m_xLockBytes;
+ sal_uInt32 m_nActPos;
+ sal_Int32 m_nAvailable; // this is typically the chunk(buffer) size
+
+public:
+ OInputStreamHelper(const SvLockBytesRef& _xLockBytes,
+ sal_uInt32 _nAvailable,
+ sal_uInt32 _nPos = 0)
+ :m_xLockBytes(_xLockBytes)
+ ,m_nActPos(_nPos)
+ ,m_nAvailable(_nAvailable){}
+
+// stario::XInputStream
+ virtual sal_Int32 SAL_CALL readBytes( staruno::Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead ) throw(stario::NotConnectedException, stario::BufferSizeExceededException, stario::IOException, staruno::RuntimeException);
+ virtual sal_Int32 SAL_CALL readSomeBytes( staruno::Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead ) throw(stario::NotConnectedException, stario::BufferSizeExceededException, stario::IOException, staruno::RuntimeException);
+ virtual void SAL_CALL skipBytes( sal_Int32 nBytesToSkip ) throw(stario::NotConnectedException, stario::BufferSizeExceededException, stario::IOException, staruno::RuntimeException);
+ virtual sal_Int32 SAL_CALL available( ) throw(stario::NotConnectedException, stario::IOException, staruno::RuntimeException);
+ virtual void SAL_CALL closeInput( ) throw (stario::NotConnectedException, stario::IOException, staruno::RuntimeException);
+
+// stario::XSeekable
+ virtual void SAL_CALL seek( sal_Int64 location ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Int64 SAL_CALL getPosition( ) throw(::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
+ virtual sal_Int64 SAL_CALL getLength( ) throw(::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
+};
+
+//------------------------------------------------------------------------------
+sal_Int32 SAL_CALL OInputStreamHelper::readBytes(staruno::Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead)
+ throw(stario::NotConnectedException, stario::BufferSizeExceededException, stario::IOException, staruno::RuntimeException)
+{
+ if (!m_xLockBytes.Is())
+ throw stario::NotConnectedException(::rtl::OUString(), static_cast<staruno::XWeak*>(this));
+
+ if (nBytesToRead < 0)
+ throw stario::BufferSizeExceededException(::rtl::OUString(), static_cast<staruno::XWeak*>(this));
+
+ ::osl::MutexGuard aGuard( m_aMutex );
+ aData.realloc(nBytesToRead);
+
+ sal_uInt32 nRead;
+ ErrCode nError = m_xLockBytes->ReadAt(m_nActPos, (void*)aData.getArray(), nBytesToRead, &nRead);
+ m_nActPos += nRead;
+
+ if (nError != ERRCODE_NONE)
+ throw stario::IOException(::rtl::OUString(), static_cast<staruno::XWeak*>(this));
+
+ // adjust sequence if data read is lower than the desired data
+ if (nRead < (sal_uInt32)nBytesToRead)
+ aData.realloc( nRead );
+
+ return nRead;
+}
+
+void SAL_CALL OInputStreamHelper::seek( sal_Int64 location ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException)
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ m_nActPos = location;
+}
+
+sal_Int64 SAL_CALL OInputStreamHelper::getPosition( ) throw(::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException)
+{
+ return m_nActPos;
+}
+
+sal_Int64 SAL_CALL OInputStreamHelper::getLength( ) throw(::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException)
+{
+ if (!m_xLockBytes.Is())
+ return 0;
+
+ ::osl::MutexGuard aGuard( m_aMutex );
+ SvLockBytesStat aStat;
+ m_xLockBytes->Stat( &aStat, SVSTATFLAG_DEFAULT );
+ m_nActPos = aStat.nSize;
+ return m_nActPos;
+}
+
+//------------------------------------------------------------------------------
+sal_Int32 SAL_CALL OInputStreamHelper::readSomeBytes(staruno::Sequence< sal_Int8 >& aData,
+ sal_Int32 nMaxBytesToRead)
+ throw (stario::NotConnectedException, stario::BufferSizeExceededException, stario::IOException, staruno::RuntimeException)
+{
+ // read all data desired
+ return readBytes(aData, nMaxBytesToRead);
+}
+
+//------------------------------------------------------------------------------
+void SAL_CALL OInputStreamHelper::skipBytes(sal_Int32 nBytesToSkip)
+ throw (stario::NotConnectedException, stario::BufferSizeExceededException, stario::IOException, staruno::RuntimeException)
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ if (!m_xLockBytes.Is())
+ throw stario::NotConnectedException(::rtl::OUString(), static_cast<staruno::XWeak*>(this));
+
+ if (nBytesToSkip < 0)
+ throw stario::BufferSizeExceededException(::rtl::OUString(), static_cast<staruno::XWeak*>(this));
+
+ m_nActPos += nBytesToSkip;
+}
+
+//------------------------------------------------------------------------------
+sal_Int32 SAL_CALL OInputStreamHelper::available()
+ throw (stario::NotConnectedException, stario::IOException, staruno::RuntimeException)
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ if (!m_xLockBytes.Is())
+ throw stario::NotConnectedException(::rtl::OUString(), static_cast<staruno::XWeak*>(this));
+
+ return m_nAvailable;
+}
+
+//------------------------------------------------------------------------------
+void SAL_CALL OInputStreamHelper::closeInput()
+ throw (stario::NotConnectedException, stario::IOException, staruno::RuntimeException)
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ if (!m_xLockBytes.Is())
+ throw stario::NotConnectedException(::rtl::OUString(), static_cast<staruno::XWeak*>(this));
+
+ m_xLockBytes = NULL;
+}
+
+
+
+
+class FileSource_Impl : public ::com::sun::star::lang::XTypeProvider ,
+ public ::com::sun::star::io::XActiveDataSource ,
+ public ::com::sun::star::io::XActiveDataControl ,
+ public ::com::sun::star::lang::XInitialization ,
+ public ::cppu::OWeakObject
+{
+private:
+ SvStream* pStream;
+ SfxMedium* pMedium;
+ ::com::sun::star::uno::Reference< ::com::sun::star::io::XStreamListener > m_xListener;
+ ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream > m_xSink;
+
+public:
+
+ SFX_DECL_XINTERFACE_XTYPEPROVIDER
+
+ FileSource_Impl();
+ FileSource_Impl( SfxMedium* );
+ virtual ~FileSource_Impl();
+
+ void ResetMedium()
+ { pMedium = NULL; pStream = NULL;}
+ DECL_LINK( DataAvailableHdl, void* );
+
+ // ::com::sun::star::io::XActiveDataControl
+ virtual void SAL_CALL addListener(const ::com::sun::star::uno::Reference< ::com::sun::star::io::XStreamListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL removeListener(const ::com::sun::star::uno::Reference< ::com::sun::star::io::XStreamListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL start(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL terminate(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ // ::com::sun::star::io::XActiveDataSource
+ virtual void SAL_CALL setOutputStream(const ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream > & aStream) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream > SAL_CALL getOutputStream(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ // ::com::sun::star::lang::XInitialization
+ virtual void SAL_CALL initialize(const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& Arguments) throw( ::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException );
+
+};
+
+class FileSink_Impl : public ::com::sun::star::lang::XTypeProvider ,
+ public ::com::sun::star::io::XOutputStream ,
+ public ::cppu::OWeakObject
+{
+private:
+ SvStream* pStream;
+ SfxMedium* pMedium;
+
+public:
+ SFX_DECL_XINTERFACE_XTYPEPROVIDER
+
+ FileSink_Impl( SfxMedium* );
+ virtual ~FileSink_Impl();
+
+ void ResetMedium()
+ { pMedium = NULL; pStream = NULL;}
+
+ // ::com::sun::star::io::XOutputStream
+ virtual void SAL_CALL writeBytes(const ::com::sun::star::uno::Sequence< sal_Int8 >& aData) throw( ::com::sun::star::io::NotConnectedException, ::com::sun::star::io::BufferSizeExceededException, ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL flush(void) throw( ::com::sun::star::io::NotConnectedException, ::com::sun::star::io::BufferSizeExceededException, ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL closeOutput(void) throw( ::com::sun::star::io::NotConnectedException, ::com::sun::star::io::BufferSizeExceededException, ::com::sun::star::uno::RuntimeException );
+};
+
+SFX_IMPL_XINTERFACE_1( FileSink_Impl, OWeakObject, ::com::sun::star::io::XOutputStream )
+SFX_IMPL_XTYPEPROVIDER_1( FileSink_Impl, ::com::sun::star::io::XOutputStream )
+
+FileSink_Impl::FileSink_Impl( SfxMedium* pMed )
+ : pMedium( pMed )
+ , pStream( NULL )
+{
+}
+
+FileSink_Impl::~FileSink_Impl()
+{
+ if ( pMedium )
+ {
+ pMedium->ResetDataSink();
+ pMedium->ReleaseRef();
+ }
+}
+
+void SAL_CALL FileSink_Impl::writeBytes(const ::com::sun::star::uno::Sequence< sal_Int8 >& Buffer) throw( ::com::sun::star::io::NotConnectedException, ::com::sun::star::io::BufferSizeExceededException, ::com::sun::star::uno::RuntimeException )
+{
+ if ( !pStream && pMedium )
+ pStream = pMedium->GetOutStream();
+
+ if ( pStream )
+ pStream->Write( Buffer.getConstArray(), (sal_uInt32) Buffer.getLength() );
+}
+
+void SAL_CALL FileSink_Impl::flush(void) throw( ::com::sun::star::io::NotConnectedException, ::com::sun::star::io::BufferSizeExceededException, ::com::sun::star::uno::RuntimeException )
+{
+ if ( pMedium )
+ pMedium->GetOutStream()->Flush();
+}
+
+void SAL_CALL FileSink_Impl::closeOutput(void) throw( ::com::sun::star::io::NotConnectedException, ::com::sun::star::io::BufferSizeExceededException, ::com::sun::star::uno::RuntimeException )
+{
+ if ( pMedium )
+ pMedium->Close();
+}
+
+SFX_IMPL_XINTERFACE_3( FileSource_Impl, OWeakObject, ::com::sun::star::io::XActiveDataSource, ::com::sun::star::io::XActiveDataControl, ::com::sun::star::lang::XInitialization )
+SFX_IMPL_XTYPEPROVIDER_3( FileSource_Impl, ::com::sun::star::io::XActiveDataSource, ::com::sun::star::io::XActiveDataControl, ::com::sun::star::lang::XInitialization )
+
+FileSource_Impl::FileSource_Impl()
+ : pMedium( NULL )
+ , pStream( NULL )
+{
+}
+
+void SAL_CALL FileSource_Impl::initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& Arguments) throw( ::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException )
+{
+ const ::com::sun::star::uno::Any *pArr = Arguments.getConstArray();
+ ::rtl::OUString aName ;
+ pArr[0] >>= aName ;
+ if ( aName.len() )
+ {
+ pMedium = new SfxMedium( aName, STREAM_STD_READ, sal_True );
+ pMedium->SetTransferPriority( SFX_TFPRIO_SYNCHRON );
+ pMedium->SetDataAvailableLink( LINK( this, FileSource_Impl, DataAvailableHdl ) );
+ pMedium->SetDoneLink( LINK( this, FileSource_Impl, DataAvailableHdl ) );
+ pMedium->AddRef();
+ }
+}
+
+FileSource_Impl::FileSource_Impl( SfxMedium* pMed )
+ : pMedium( pMed )
+ , pStream( NULL )
+{
+}
+
+FileSource_Impl::~FileSource_Impl()
+{
+ if ( pMedium )
+ {
+ pMedium->ResetDataSource();
+ pMedium->ReleaseRef();
+ }
+}
+
+void SAL_CALL FileSource_Impl::addListener(const ::com::sun::star::uno::Reference< ::com::sun::star::io::XStreamListener > & aListener) throw( ::com::sun::star::uno::RuntimeException )
+{
+ if( m_xListener.is() )
+ fprintf( stderr, "Warning: addSourceControllerListener called when already having a listener\n" );
+ m_xListener = aListener;
+}
+
+void SAL_CALL FileSource_Impl::removeListener(const ::com::sun::star::uno::Reference< ::com::sun::star::io::XStreamListener > & aListener) throw( ::com::sun::star::uno::RuntimeException )
+{
+ m_xListener = ::com::sun::star::uno::Reference< ::com::sun::star::io::XStreamListener > ();
+}
+
+void SAL_CALL FileSource_Impl::setOutputStream( const ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream > & Listener )throw( ::com::sun::star::uno::RuntimeException )
+{
+ m_xSink = Listener;
+}
+
+::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream > SAL_CALL FileSource_Impl::getOutputStream(void) throw( ::com::sun::star::uno::RuntimeException )
+{
+ return m_xSink;
+}
+
+IMPL_LINK( FileSource_Impl, DataAvailableHdl, void*, pVoid )
+{
+ if ( !pStream )
+ pStream = pMedium->GetInStream();
+
+ if ( pStream && m_xSink.is() )
+ {
+ sal_Int8 buf[ 65536 ];
+ sal_uInt32 nBytes = 1;
+ while( nBytes && pStream->GetError() != ERRCODE_IO_PENDING )
+ {
+ nBytes = pStream->Read( buf, (sal_uInt32) sizeof( buf ) );
+ if ( nBytes )
+ m_xSink->writeBytes( ::com::sun::star::uno::Sequence<sal_Int8>( buf, nBytes ) );
+ }
+
+ if ( pStream->GetError() == ERRCODE_IO_PENDING )
+ pStream->ResetError();
+ else
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::io::XActiveDataSource > xRef( this );
+ m_xSink->closeOutput();
+ m_xSink = ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream > ();
+ if( m_xListener.is() )
+ m_xListener->closed();
+ m_xListener = ::com::sun::star::uno::Reference< ::com::sun::star::io::XStreamListener > ();
+ pMedium->GetItemSet()->ClearItem( SID_LOADENVIRONMENT );
+ }
+ }
+
+ return 0;
+}
+
+void SAL_CALL FileSource_Impl::start() throw( ::com::sun::star::uno::RuntimeException )
+{
+ pStream = pMedium->GetInStream();
+ if ( pStream && m_xSink.is() )
+ DataAvailableHdl( 0 );
+}
+
+void SAL_CALL FileSource_Impl::terminate() throw( ::com::sun::star::uno::RuntimeException )
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::io::XActiveDataSource > xRef( this );
+ if ( m_xSink.is() )
+ m_xSink->closeOutput();
+
+ m_xSink = ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream > ();
+ if( m_xListener.is() )
+ m_xListener->closed();
+ m_xListener = ::com::sun::star::uno::Reference< ::com::sun::star::io::XStreamListener > ();
+ pMedium->CancelTransfers();
+ pMedium->GetItemSet()->ClearItem( SID_LOADENVIRONMENT );
+ pMedium->Close();
+}
+
+String ConvertDateTime_Impl(const SfxStamp &rTime);
+
+//----------------------------------------------------------------
+SfxPoolCancelManager::SfxPoolCancelManager(
+ SfxCancelManager* pParent, const String& rName )
+ : SfxCancelManager( pParent ),
+ SfxCancellable( pParent ? pParent : this, rName ),
+ wParent( pParent )
+{
+ if( pParent )
+ {
+ StartListening( *this );
+ SetManager( 0 );
+ }
+}
+
+//----------------------------------------------------------------
+SfxPoolCancelManager::~SfxPoolCancelManager()
+{
+ for( sal_uInt16 nPos = GetCancellableCount(); nPos--; )
+ {
+ // nicht an Parent uebernehmen!
+ SfxCancellable* pCbl = GetCancellable( nPos );
+ if ( pCbl )
+ pCbl->SetManager( 0 );
+ }
+}
+
+
+//----------------------------------------------------------------
+void SfxPoolCancelManager::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
+{
+ if( !GetCancellableCount() ) SetManager( 0 );
+ else if( !GetManager() )
+ {
+ if( !wParent.Is() ) wParent = SFX_APP()->GetCancelManager();
+ SetManager( wParent );
+ }
+}
+
+//----------------------------------------------------------------
+void SfxPoolCancelManager::Cancel()
+{
+ SfxPoolCancelManagerRef xThis = this;
+ for( sal_uInt16 nPos = GetCancellableCount(); nPos--; )
+ {
+ SfxCancellable* pCbl = GetCancellable( nPos );
+ // Wenn wir nicht im Button stehen
+ if( pCbl && pCbl != this )
+ pCbl->Cancel();
+ if( GetCancellableCount() < nPos )
+ nPos = GetCancellableCount();
+ }
+}
+
+//----------------------------------------------------------------
+class SfxMedium_Impl : public SvCompatWeakBase
+{
+public:
+ Reference < XContent > xContent;
+ sal_Bool bUpdatePickList : 1;
+ sal_Bool bIsTemp : 1;
+ sal_Bool bUsesCache : 1;
+ sal_Bool bForceSynchron : 1;
+ sal_Bool bDontCreateCancellable : 1;
+ sal_Bool bDownloadDone : 1;
+
+ sal_uInt16 nPrio;
+
+ SfxPoolCancelManagerRef xCancelManager;
+ SfxMedium* pAntiImpl;
+ SvEaMgr* pEaMgr;
+
+ long nFileVersion;
+
+ const SfxFilter* pOrigFilter;
+ String aOrigURL;
+ String aPreRedirectionURL;
+ String aReferer;
+ DateTime aExpireTime;
+ SfxFrameWeak wLoadTargetFrame;
+ LoadEnvironment_Impl* pLoadEnv;
+ SvKeyValueIteratorRef xAttributes;
+
+ AsynchronLink aDoneLink;
+ AsynchronLink aAvailableLink;
+ UCB_Link_HelperRef aLinkList;
+
+ DECL_LINK( Done_Impl, void* );
+ DECL_LINK( DataAvailable_Impl, void* );
+ DECL_LINK( Cancel_Impl, void* );
+
+ SfxVersionTableDtor* pVersions;
+ FileSource_Impl* pSource;
+ FileSink_Impl* pSink;
+ TempFile* pTempDir;
+ TempFile* pTempFile;
+
+ SfxPoolCancelManager* GetCancelManager();
+
+ SfxMedium_Impl( SfxMedium* pAntiImplP );
+ ~SfxMedium_Impl();
+};
+
+IMPL_LINK( SfxMedium_Impl, Done_Impl, void*, pVoid )
+{
+ bDownloadDone = sal_True;
+
+ if ( pAntiImpl->GetErrorCode() == ERRCODE_NONE )
+ pAntiImpl->GetInStream();
+
+ // Don't call because it will crash !!
+// if ( aAvailableLink.IsSet() )
+// aAvailableLink.Call( pVoid );
+
+ aDoneLink.ClearPendingCall();
+ aDoneLink.Call( pVoid );
+
+ return 0;
+}
+
+IMPL_LINK( SfxMedium_Impl, DataAvailable_Impl, void*, pVoid )
+{
+ // ???? why?
+ pAntiImpl->GetInStream();
+
+ aAvailableLink.ClearPendingCall();
+ aAvailableLink.Call( pVoid );
+
+ return 0;
+}
+
+IMPL_LINK( SfxMedium_Impl, Cancel_Impl, void*, pVoid )
+{
+ pAntiImpl->SetError( ERRCODE_IO_GENERAL );
+ return 0;
+}
+
+SfxPoolCancelManager* SfxMedium_Impl::GetCancelManager()
+{
+ if( !xCancelManager.Is() )
+ {
+ if( !bDontCreateCancellable )
+ xCancelManager = new SfxPoolCancelManager(
+ wLoadTargetFrame ? wLoadTargetFrame->GetCancelManager() :
+ SFX_APP()->GetCancelManager(),
+ pAntiImpl->GetURLObject().GetURLNoPass() );
+ else
+ xCancelManager = new SfxPoolCancelManager(
+ 0, pAntiImpl->GetURLObject().GetURLNoPass() );
+ }
+ return xCancelManager;
+}
+
+//------------------------------------------------------------------
+SfxMedium_Impl::SfxMedium_Impl( SfxMedium* pAntiImplP )
+ :
+ SvCompatWeakBase( pAntiImplP ),
+ bUpdatePickList(sal_True), bIsTemp( sal_False ), pOrigFilter( 0 ),
+ bUsesCache(sal_True),
+ nPrio( 99 ), aExpireTime( Date() + 10, Time() ),
+ bForceSynchron( sal_False ),
+ pLoadEnv( 0 ), pAntiImpl( pAntiImplP ),
+ bDontCreateCancellable( sal_False ), pSource( NULL ), pSink( NULL ), pTempDir( NULL ),
+ bDownloadDone( sal_True ), nFileVersion( 0 ), pEaMgr( NULL ), pTempFile( NULL )
+{
+}
+
+//------------------------------------------------------------------
+SfxMedium_Impl::~SfxMedium_Impl()
+{
+ if ( aLinkList.Is() )
+ aLinkList->Clear();
+
+ aDoneLink.ClearPendingCall();
+ aAvailableLink.ClearPendingCall();
+
+ delete pEaMgr;
+ delete pVersions;
+
+ if ( pSource )
+ {
+ pSource->ResetMedium();
+ pSource->release();
+ }
+
+ if ( pSink )
+ {
+ pSink->ResetMedium();
+ pSink->release();
+ }
+
+ if ( pTempFile )
+ delete pTempFile;
+
+ if ( pTempDir )
+ delete pTempDir;
+}
+
+//================================================================
+
+#define IMPL_CTOR() \
+ eError( SVSTREAM_OK ), \
+ \
+ bDirect( sal_False ), \
+ bTriedStorage( sal_False ), \
+ bSetFilter( sal_False ), \
+ \
+ nStorOpenMode( SFX_STREAM_READWRITE ), \
+ pInStream(0), \
+ pOutStream( 0 )
+
+//------------------------------------------------------------------
+const SvGlobalName& SfxMedium::GetClassFilter()
+{
+ GetMedium_Impl();
+ if( GetError() )
+ return aFilterClass;
+ if( !bSetFilter && GetStorage() )
+ SetClassFilter( GetStorage()->GetClassName() );
+ return aFilterClass;
+}
+
+//------------------------------------------------------------------
+void SfxMedium::ResetError()
+{
+ eError = SVSTREAM_OK;
+ if( aStorage.Is() )
+ aStorage->ResetError();
+ if( pInStream )
+ pInStream->ResetError();
+ if( pOutStream )
+ pOutStream->ResetError();
+}
+
+//------------------------------------------------------------------
+sal_uInt32 SfxMedium::GetErrorCode() const
+{
+ sal_uInt32 lError=eError;
+ if(!lError && pInStream)
+ lError=pInStream->GetErrorCode();
+ if(!lError && pOutStream)
+ lError=pOutStream->GetErrorCode();
+ if(!lError && aStorage.Is())
+ lError=aStorage->GetErrorCode();
+ return lError;
+}
+
+//------------------------------------------------------------------
+long SfxMedium::GetFileVersion() const
+{
+ if ( !pImp->nFileVersion && pFilter )
+ return pFilter->GetVersion();
+ else
+ return pImp->nFileVersion;
+}
+
+//------------------------------------------------------------------
+Reference < XContent > SfxMedium::GetContent() const
+{
+ if ( !pImp->xContent.is() && GetName().Len() )
+ {
+ String aURL = GetURLObject().GetMainURL();
+ pImp->xContent = UCB_Helper::CreateContent( aURL );
+ }
+
+ if ( pImp->xContent.is() )
+ return pImp->xContent;
+ else
+ return NULL;
+}
+
+//------------------------------------------------------------------
+SvStream* SfxMedium::GetInStream()
+{
+ if ( pInStream )
+ return pInStream;
+
+ if ( pImp->pTempFile )
+ {
+ pInStream = new SvFileStream( aName, nStorOpenMode );
+
+ eError = pInStream->GetError();
+
+ if( !eError && (nStorOpenMode & STREAM_WRITE)
+ && ! pInStream->IsWritable() )
+ {
+ eError = ERRCODE_IO_ACCESSDENIED;
+ delete pInStream;
+ pInStream = NULL;
+ }
+ else
+ return pInStream;
+ }
+
+ GetMedium_Impl();
+
+ if ( !pInStream && eError == ERRCODE_IO_PENDING )
+ eError = SVSTREAM_OK;
+
+ return pInStream;
+}
+
+//------------------------------------------------------------------
+void SfxMedium::CloseInStream()
+{
+ CloseInStream_Impl();
+}
+
+void SfxMedium::CloseInStream_Impl()
+{
+ // if there is a storage based on the InStream, we have to
+ // close the storage, too, because otherwise the storage
+ // would use an invalid ( deleted ) stream.
+ if ( pInStream && aStorage.Is() )
+ {
+ const SvStream *pStorage = aStorage->GetSvStream();
+ if ( pStorage == pInStream )
+ {
+ CloseStorage();
+ }
+ }
+
+ delete pInStream;
+ pInStream = NULL;
+}
+
+//------------------------------------------------------------------
+SvStream* SfxMedium::GetOutStream()
+{
+ if ( !pOutStream )
+ {
+ // Create a temp. file if there is none because we always
+ // need one.
+ if ( !pImp->pTempFile )
+ CreateTempFile();
+
+ if ( pImp->pTempFile )
+ {
+ pOutStream = new SvFileStream( aName, STREAM_STD_READWRITE );
+ CloseStorage();
+ }
+ }
+
+ return pOutStream;
+}
+
+//------------------------------------------------------------------
+sal_Bool SfxMedium::CloseOutStream()
+{
+ CloseOutStream_Impl();
+ return sal_True;
+}
+
+sal_Bool SfxMedium::CloseOutStream_Impl()
+{
+ if ( pOutStream )
+ {
+ // if there is a storage based on the OutStream, we have to
+ // close the storage, too, because otherwise the storage
+ // would use an invalid ( deleted ) stream.
+
+ if ( aStorage.Is() )
+ {
+ const SvStream *pStorage = aStorage->GetSvStream();
+ if ( pStorage == pOutStream )
+ CloseStorage();
+ }
+
+ delete pOutStream;
+ pOutStream = NULL;
+ }
+
+ return sal_True;
+}
+
+//------------------------------------------------------------------
+const String& SfxMedium::GetPhysicalName() const
+{
+ if ( !pImp->pTempFile && (INET_PROT_FILE != GetURLObject().GetProtocol() ) )
+ (( SfxMedium*)this)->CreateFileStream();
+
+ // return the name then
+ return aName;
+}
+
+//------------------------------------------------------------------
+void SfxMedium::CreateFileStream()
+{
+ GetMedium_Impl();
+
+ if( pInStream && ! pImp->pTempFile )
+ {
+ DBG_WARNING( "W1: erzeuge FileStream" );
+
+ pImp->pTempFile = new TempFile;
+ pImp->pTempFile->EnableKillingFile( sal_True );
+
+ aName = pImp->pTempFile->GetName();
+
+ SvFileStream aTmpStream( aName, STREAM_STD_WRITE );
+ char *pBuf = new char [8192];
+ sal_uInt32 nErr = ERRCODE_NONE;
+
+ pInStream->Seek( 0L );
+
+ // Stream synchron downloaden
+ while( !pInStream->IsEof() &&
+ ( nErr == ERRCODE_NONE || nErr == ERRCODE_IO_PENDING ) )
+ {
+ sal_uInt32 nRead = pInStream->Read( pBuf, 8192 );
+ nErr = pInStream->GetError();
+ aTmpStream.Write( pBuf, nRead );
+ if( nErr == ERRCODE_IO_PENDING )
+ {
+ Application::Yield();
+ pInStream->ResetError();
+ }
+ }
+ delete pBuf;
+ pImp->bIsTemp = sal_True;
+
+ CloseInStream_Impl();
+ }
+}
+
+//------------------------------------------------------------------
+sal_Bool SfxMedium::Commit()
+{
+ if( aStorage.Is() )
+ {
+ // StorageStream immer direkt
+ if( !aStorage->Commit() )
+ eError = aStorage->GetError();
+ }
+ else if( pOutStream )
+ pOutStream->Flush();
+ else if( pInStream )
+ pInStream->Flush();
+
+ if ( ( GetError() == SVSTREAM_OK ) && pImp->pTempFile )
+ Transfer_Impl();
+
+ return GetError() == SVSTREAM_OK;
+}
+
+//------------------------------------------------------------------
+sal_Bool SfxMedium::IsStorage() const
+{
+ (const_cast< SfxMedium* > (this))->GetStorage();
+ (const_cast< SfxMedium* > (this))->ResetError();
+ return aStorage.Is();
+}
+
+//------------------------------------------------------------------
+Link SfxMedium::GetDataAvailableLink() const
+{
+ return pImp->aAvailableLink.GetLink();
+}
+
+//------------------------------------------------------------------
+Link SfxMedium::GetDoneLink() const
+{
+ return pImp->aDoneLink.GetLink();
+}
+
+//------------------------------------------------------------------
+sal_Bool SfxMedium::IsPreview_Impl()
+{
+ sal_Bool bPreview = sal_False;
+ SFX_ITEMSET_ARG( GetItemSet(), pPreview, SfxBoolItem, SID_PREVIEW, sal_False);
+ if ( pPreview )
+ bPreview = pPreview->GetValue();
+ else
+ {
+ SFX_ITEMSET_ARG( GetItemSet(), pFlags, SfxStringItem, SID_OPTIONS, sal_False);
+ if ( pFlags )
+ {
+ String aFileFlags = pFlags->GetValue();
+ aFileFlags.ToUpperAscii();
+ if ( STRING_NOTFOUND != aFileFlags.Search( 'B' ) )
+ bPreview = sal_True;
+ }
+ }
+
+ return bPreview;
+}
+
+//------------------------------------------------------------------
+sal_Bool SfxMedium::TryStorage()
+{
+ GetStorage();
+
+ if ( aStorage.Is() )
+ return sal_True;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xSMgr( ::utl::getProcessServiceFactory() );
+ ::com::sun::star::uno::Reference< ::com::sun::star::util::XArchiver >
+ xPacker( xSMgr->createInstance( DEFINE_CONST_UNICODE( "com.sun.star.util.Archiver" ) ), ::com::sun::star::uno::UNO_QUERY );
+
+ if( !xPacker.is() )
+ return sal_False;
+
+ // extract extra data
+ ::rtl::OUString aPath = GetURLObject().PathToFileName();
+ ::rtl::OUString aExtraData = xPacker->getExtraData( aPath );
+ const ::rtl::OUString aSig1( DEFINE_CONST_UNICODE( "private:" ) );
+ String aTmp( '?' );
+ aTmp += pFilter->GetFilterContainer()->GetName();
+ const ::rtl::OUString aSig2( aTmp );
+ sal_Int32 nIndex1 = aExtraData.indexOf( aSig1 );
+ sal_Int32 nIndex2 = aExtraData.indexOf( aSig2 );
+
+ if( nIndex1 != 0 || nIndex2 == -1 )
+ return sal_False;
+
+ nIndex1 += aSig1.getLength();
+ ::rtl::OUString aTempDoku = aExtraData.copy( nIndex1, nIndex2 - nIndex1 );
+
+ // create a temp dir to unpack to
+ pImp->pTempDir = new TempFile( NULL, sal_True );
+ pImp->pTempDir->EnableKillingFile( sal_True );
+
+ // unpack all files to temp dir
+
+ com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > xFactory = ::utl::getProcessServiceFactory();
+ com::sun::star::uno::Reference< com::sun::star::task::XInteractionHandler > xInteractionHandler(
+ xFactory->createInstance( DEFINE_CONST_UNICODE("com.sun.star.uui.InteractionHandler") ), UNO_QUERY );
+
+ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > aArgs(1);
+ aArgs.getArray()[0].Name = DEFINE_CONST_UNICODE( "InteractionHandler" );
+ aArgs.getArray()[0].Value <<= xInteractionHandler ;
+
+ ::com::sun::star::uno::Sequence< ::rtl::OUString > files(0);
+
+ if( !xPacker->unpack( pImp->pTempDir->GetName(), aPath, files, aArgs ) )
+ return sal_False;
+
+ String aNewName = pImp->pTempDir->GetName();
+ aNewName += '/';
+ aNewName += String( aTempDoku );
+ CloseInStream_Impl();
+ SetPhysicalName( aNewName );
+ GetStorage();
+
+ if ( aStorage.Is() )
+ {
+ const SfxFilter *pRealFilter = SFX_APP()->GetFilterMatcher().GetFilter4ClipBoardId( aStorage->GetFormat() );
+ if ( pRealFilter )
+ {
+ pImp->nFileVersion = pRealFilter->GetVersion();
+ aStorage->SetVersion( pImp->nFileVersion );
+ }
+
+ DBG_ASSERT( pRealFilter, "Unknown storage format!" );
+ }
+
+ return aStorage.Is();
+}
+
+ErrCode SfxMedium::Unpack_Impl( const String& rDest )
+{
+ ErrCode nRet = ERRCODE_NONE;
+ if ( pImp->pTempDir )
+ {
+/*
+ DirEntry aDestEntry( rDest );
+ Dir aDir( pImp->pTempDir->GetName(), FSYS_KIND_FILE );
+ sal_uInt16 nCount = aDir.Count();
+ for ( sal_uInt16 n=0; n<nCount; n++ )
+ {
+ DirEntry aDest( aDestEntry.GetPath() );
+ DirEntry aTmp = aDir[n];
+ aDest += aTmp.GetName();
+ if ( aDir[n] == DirEntry( GetPhysicalName() ) )
+ continue;
+
+ nRet = aTmp.CopyTo( aDest, FSYS_ACTION_COPYFILE );
+ if ( nRet != ERRCODE_NONE )
+ break;
+ }
+ */
+ }
+
+ return nRet;
+}
+
+//------------------------------------------------------------------
+SvStorage* SfxMedium::GetOutputStorage()
+{
+ if ( !pImp->pTempFile )
+ CreateTempFile();
+ return GetStorage();
+}
+
+SvStorage* SfxMedium::GetStorage()
+{
+ if ( aStorage.Is() || bTriedStorage )
+ return aStorage;
+
+ BOOL bResetSorage = FALSE;
+ SvStream *pStream;
+
+ INetURLObject aStorageName;
+ if ( pImp->pTempFile )
+ {
+ aStorageName.SetURL( pImp->pTempFile->GetName() );
+ pStream = GetOutStream();
+ }
+ else
+ {
+ aStorageName = GetURLObject();
+ pStream = GetInStream();
+ if ( pStream )
+ {
+ pStream->GetLockBytes()->SetSynchronMode( sal_True );
+ if ( !pImp->aDoneLink.IsSet() )
+ DownLoad();
+ }
+ }
+
+ bTriedStorage = sal_True;
+
+ if( !pStream || ( GetError() != SVSTREAM_OK ) )
+ return aStorage;
+
+ aStorage = new SvStorage( pStream, FALSE );
+ if ( INET_PROT_FILE == aStorageName.GetProtocol() )
+ aStorage->SetName( aStorageName.PathToFileName() );
+
+ if ( aStorage->GetError() == SVSTREAM_OK )
+ GetVersionList();
+
+ // ???? wird das noch gebraucht?
+// GetMedium_Impl();
+// if ( !aStorage.Is() )
+// CreateFileStream();
+
+ SFX_ITEMSET_ARG( pSet, pVersion, SfxInt16Item, SID_VERSION, sal_False);
+
+ if ( pVersion )
+ {
+ // Alle verf"ugbaren Versionen einlesen
+ if ( pImp->pVersions )
+ {
+ // Die zum Kommentar passende Version suchen
+ // Die Versionen sind von 1 an durchnumeriert, mit negativen
+ // Versionsnummern werden die Versionen von der aktuellen aus
+ // r"uckw"arts gez"ahlt
+ short nVersion = pVersion ? pVersion->GetValue() : 0;
+ if ( nVersion<0 )
+ nVersion = ( (short) pImp->pVersions->Count() ) + nVersion;
+ else if ( nVersion )
+ nVersion--;
+
+ SfxVersionInfo* pInfo = nVersion>=0 ? pImp->pVersions->GetObject( nVersion ) : NULL;
+ if ( pInfo )
+ {
+ String aVersionStream = pInfo->aName;
+
+ // SubStorage f"ur alle Versionen "offnen
+ SvStorageRef aSub =
+ aStorage->OpenStorage( DEFINE_CONST_UNICODE( "Versions" ), SFX_STREAM_READONLY );
+
+ DBG_ASSERT( aSub.Is() && !aSub->GetError(), "Versionsliste, aber keine Versionen!" );
+
+ // Dort ist die Version als gepackter Stream gespeichert
+ SvStorageStreamRef aStream =
+ aSub->OpenStream( aVersionStream, SFX_STREAM_READONLY );
+
+ if ( aStream.Is() && aStream->GetError() == SVSTREAM_OK )
+ {
+ // Stream ins TempDir auspacken
+ TempFile aTempFile;
+ String aTmpName = aTempFile.GetName();
+ SvFileStream aTmpStream( aTmpName, SFX_STREAM_READWRITE );
+
+ ZCodec aCodec;
+ aCodec.BeginCompression();
+ aCodec.Decompress( *aStream, aTmpStream );
+ aCodec.EndCompression();
+ aTmpStream.Close();
+
+ // Datei als Storage "offnen
+ nStorOpenMode = SFX_STREAM_READONLY;
+ aStorage = new SvStorage( aTmpName, nStorOpenMode );
+ SetPhysicalName( aTmpName );
+ pImp->bIsTemp = sal_True;
+ GetItemSet()->Put( SfxBoolItem( SID_DOC_READONLY, sal_True ) );
+ DELETEZ( pImp->pVersions );
+ }
+ else
+ bResetSorage = TRUE;
+ }
+ else
+ bResetSorage = TRUE;
+ }
+ else
+ bResetSorage = TRUE;
+ }
+
+ if ( aStorage.Is() )
+ {
+ if( aStorage->GetError() != SVSTREAM_OK )
+ bResetSorage = TRUE;
+ else if ( GetFilter() )
+ aStorage->SetVersion( GetFilter()->GetVersion() );
+ }
+
+ if ( bResetSorage )
+ {
+ SetError( aStorage->GetError() );
+ aStorage.Clear();
+ pStream->Seek( 0L );
+ }
+
+ return aStorage;
+}
+
+//------------------------------------------------------------------
+void SfxMedium::CloseStorage()
+{
+ aStorage.Clear();
+ bTriedStorage = sal_False;
+}
+
+//------------------------------------------------------------------
+void SfxMedium::SetOpenMode( StreamMode nStorOpen,
+ sal_Bool bDirectP,
+ sal_Bool bDontClose )
+{
+ if ( nStorOpenMode != nStorOpen )
+ {
+ nStorOpenMode = nStorOpen;
+
+ if( !bDontClose )
+ Close();
+ }
+
+ bDirect = bDirectP;
+ bSetFilter = sal_False;
+}
+
+//------------------------------------------------------------------
+void SfxMedium::Transfer_Impl()
+{
+ if( pImp->pTempFile && !eError )
+ {
+ Reference < XContent > xContent = GetContent();
+ if ( ! xContent.is() )
+ return;
+
+ sal_Bool bSuccess;
+
+ // check wether the the temp file has the same protocol
+ // scheme as the destination, wether the destination supports
+ // the transfer command and wether or not the command
+ // executed successfully
+
+ BOOL bTryTransfer = FALSE;
+ String aName;
+ INetURLObject aDest = GetURLObject();
+ INetURLObject aSource( pImp->pTempFile->GetName() );
+
+ aName = GetLongName();
+ if ( !aName.Len() )
+ aName = aDest.getName( INetURLObject::LAST_SEGMENT, true,
+ INetURLObject::DECODE_WITH_CHARSET );
+
+ if ( aDest.GetProtocol() == aSource.GetProtocol() )
+ {
+ bTryTransfer = UCB_Helper::HasCommand( xContent,
+ WID_TRANSFER );
+ }
+
+ if ( bTryTransfer && aDest.removeSegment() )
+ {
+ TransferInfo aInfo;
+ String aParentURL = aDest.GetMainURL();
+ Any aAny;
+
+ aInfo.MoveData = sal_True;
+ aInfo.SourceURL = aSource.GetMainURL();
+ aInfo.NewTitle = aName;
+
+ SFX_ITEMSET_ARG( GetItemSet(), pRename, SfxBoolItem, SID_RENAME, sal_False );
+ SFX_ITEMSET_ARG( GetItemSet(), pOverWrite, SfxBoolItem, SID_OVERWRITE, sal_False );
+
+ if ( pOverWrite && !pOverWrite->GetValue() )
+ {
+ aInfo.NameClash = NameClash::ERROR;
+ }
+ else if ( pRename && pRename->GetValue() )
+ {
+ aInfo.NameClash = NameClash::RENAME;
+ }
+ else
+ {
+ aInfo.NameClash = NameClash::OVERWRITE;
+ }
+
+ aAny <<= aInfo;
+ Close();
+ UCB_Helper::ExecuteCommand( aParentURL, WID_TRANSFER,
+ aAny, &bSuccess );
+ if ( bSuccess )
+ {
+ // when the transfer command executed successful
+ // there will be no tempfile anymore so we have
+ // to get rid of it
+ pImp->pTempFile->EnableKillingFile( sal_False );
+ delete pImp->pTempFile;
+ pImp->pTempFile = NULL;
+ bDownLoad = TRUE;
+ return;
+ }
+ }
+
+ SvStream *pStream = GetOutStream();
+ SvLockBytesRef xLockBytes = new SvLockBytes( pStream );
+ Reference < ::com::sun::star::io::XInputStream > xStream
+ = new OInputStreamHelper( xLockBytes, 8192 );
+
+ Any aAny;
+ InsertCommandArgument aArg;
+
+ aArg.Data = xStream;
+ aArg.ReplaceExisting = sal_True;
+ aAny <<= aArg;
+
+ UCB_Helper::ExecuteCommand( xContent, WID_INSERT,
+ aAny, &bSuccess );
+
+ if ( !bSuccess )
+ eError = ERRCODE_IO_GENERAL;
+ }
+}
+
+//------------------------------------------------------------------
+void SfxMedium::DoBackup_Impl()
+{
+ INetURLObject aDest;
+ INetURLObject aSource = GetURLObject();
+ String aParentURL;
+ String aName;
+ String aBakDir = SFX_INIMANAGER()->Get(SFX_KEY_BACKUP_PATH);
+ BOOL bTryTransfer = FALSE;
+ sal_Bool bSuccess = sal_False;
+ Reference < XContent > xContent;
+
+ // Backup Path gesetzt ? Dann diesen benutzen.
+ if( aBakDir.Len() )
+ {
+ aDest.SetSmartProtocol( INET_PROT_FILE );
+ aDest.SetSmartURL( aBakDir );
+ aDest.insertName( aSource.getName() );
+ }
+ else
+ {
+ aDest = GetURLObject();
+ }
+
+ // Derzeit immer bak dranhaengen (MAC ???)
+#ifndef MAC
+ // *.bak
+ aDest.setExtension( DEFINE_CONST_UNICODE( "bak" ) );
+#else
+ // * Kopie
+ aDest.setName( aDest.getName( INetURLObject::LAST_SEGMENT,
+ true,
+ INetURLObject::DECODE_WITH_CHARSET )
+ + String(SfxResId(STR_BACKUP_COPY)) );
+#endif
+
+ aName = aDest.getName( INetURLObject::LAST_SEGMENT, true,
+ INetURLObject::DECODE_WITH_CHARSET );
+
+ // check wether the the temp file has the same protocol
+ // scheme as the destination, wether the destination supports
+ // the transfer command and wether or not the command
+ // executed successfully
+
+ if ( aDest.GetProtocol() == aSource.GetProtocol() )
+ {
+ INetURLObject aDestDir = aDest;
+ if ( aDestDir.removeSegment() )
+ {
+ aParentURL = aDestDir.GetMainURL();
+ xContent = UCB_Helper::CreateContent( aParentURL );
+ if ( xContent.is() )
+ {
+ bTryTransfer = UCB_Helper::HasCommand( xContent,
+ WID_TRANSFER );
+ }
+ }
+ }
+
+ if ( bTryTransfer )
+ {
+ TransferInfo aInfo;
+ Any aAny;
+
+ aInfo.MoveData = sal_True;
+ aInfo.SourceURL = aSource.GetMainURL();
+ aInfo.NewTitle = aName;
+ aInfo.NameClash = NameClash::OVERWRITE;
+
+ aAny <<= aInfo;
+ Close();
+ UCB_Helper::ExecuteCommand( xContent, WID_TRANSFER,
+ aAny, &bSuccess );
+ }
+
+ if ( !bSuccess )
+ {
+ xContent = UCB_Helper::CreateContent( aDest.GetMainURL() );
+ if ( xContent.is() )
+ {
+ SvStream *pStream = GetInStream();
+ SvLockBytesRef xLockBytes = new SvLockBytes( pStream );
+ Reference < ::com::sun::star::io::XInputStream > xStream
+ = new OInputStreamHelper( xLockBytes, 8192 );
+
+ Any aAny;
+ InsertCommandArgument aArg;
+
+ aArg.Data = xStream;
+ aArg.ReplaceExisting = sal_True;
+ aAny <<= aArg;
+
+ UCB_Helper::ExecuteCommand( xContent, WID_INSERT, aAny, &bSuccess );
+ }
+ }
+
+ if ( ! bSuccess )
+ WarningBox( NULL, SfxResId( MSG_WARNING_BACKUP ) ).Execute();
+}
+
+//----------------------------------------------------------------
+void SfxMedium::GetMedium_Impl()
+{
+ if ( !pInStream )
+ {
+ DBG_ASSERT( bDownLoad, "Medium without DownloadFlag!" );
+ pImp->bDownloadDone = sal_False;
+
+ SvLockBytesRef xLockBytes;
+ if ( !pImp->aLinkList.Is() )
+ {
+ pImp->aLinkList = new UCB_Link_Helper;
+ pImp->aLinkList->SetDoneLink( LINK( pImp, SfxMedium_Impl, Done_Impl ) );
+ pImp->aLinkList->SetDataAvailLink( LINK( pImp, SfxMedium_Impl, DataAvailable_Impl ) );
+ pImp->aLinkList->SetCancelLink( LINK( pImp, SfxMedium_Impl, Cancel_Impl ) );
+ }
+
+ SFX_ITEMSET_ARG( pSet, pStreamItem, SfxUsrAnyItem, SID_INPUTSTREAM, sal_False);
+
+ if ( pStreamItem )
+ {
+ Reference < ::com::sun::star::io::XInputStream > xStream;
+ if ( ( pStreamItem->GetValue() >>= xStream ) && xStream.is() )
+ xLockBytes = UCB_Helper::CreateInputLockBytes(
+ xStream, pImp->aLinkList,
+ pImp->GetCancelManager() );
+ }
+ else
+ {
+ xLockBytes = UCB_Helper::CreateInputLockBytes(
+ GetContent(),
+ pImp->aLinkList,
+ pImp->GetCancelManager() );
+ }
+
+ if ( xLockBytes.Is() )
+ {
+ if ( pImp->bForceSynchron || ! pImp->aDoneLink.IsSet() )
+ xLockBytes->SetSynchronMode( sal_True );
+ else
+ xLockBytes->SetSynchronMode( sal_False );
+
+ pInStream = new SvStream( xLockBytes );
+ }
+ }
+
+#ifdef OLD_CODE_FOR_POSTING
+
+ SFX_ITEMSET_ARG( pSet, pContentType, SfxStringItem, SID_CONTENTTYPE, sal_False);
+ if( pContentType ) pImp->xBinding->SetSendMimeType(
+ pContentType->GetValue() );
+ pImp->xBinding->SetReferer( pImp->aReferer );
+ pImp->xBinding->SetPriority( pImp->nPrio );
+ const SfxPoolItem *pItem = 0;
+ if( pSet )
+ {
+ pSet->GetItemState( SID_POSTSTRING, sal_False, &pItem );
+ if( !pItem )
+ pSet->GetItemState( SID_POSTLOCKBYTES, sal_False, &pItem );
+ }
+
+ if( pItem )
+ {
+ if( pItem->ISA( SfxStringItem ))
+ {
+ SvCacheStream* pCacheStr = new SvCacheStream( 8192 );
+ pCacheStr->WriteByteString( ((SfxStringItem*)pItem)->GetValue(), RTL_TEXTENCODING_UTF8 );
+ SvLockBytesRef xRef (new SvLockBytes(pCacheStr, sal_True));
+ pImp->xBinding->GetBindContext().SetPostLockBytes ( xRef);
+ }
+ else if( pItem->ISA( SfxRefItem ))
+ {
+ SvLockBytes* pBytes = new SvLockBytes;
+ int nDiff = (char*)pBytes - (char*)(SvRefBase*)pBytes;
+ SvLockBytes* pLB = (SvLockBytes*)(
+ (char*)(SvRefBase*)&((SfxRefItem*)pItem )->GetValue() + nDiff );
+ delete pBytes;
+ SvLockBytesRef rTmpLB ( pLB );
+ pImp->xBinding->GetBindContext().SetPostLockBytes ( rTmpLB );
+ }
+ else if( pItem->ISA( SfxLockBytesItem ))
+ {
+ // f"ur sp"ater ...
+ SvLockBytes* pBytes = ((SfxLockBytesItem*)pItem)->GetValue();
+ SvLockBytesRef rTmpLB ( pBytes );
+ pImp->xBinding->GetBindContext().SetPostLockBytes ( rTmpLB );
+ }
+ }
+#endif
+}
+
+//------------------------------------------------------------------
+SfxPoolCancelManager* SfxMedium::GetCancelManager_Impl() const
+{
+ return pImp->GetCancelManager();
+}
+
+//------------------------------------------------------------------
+void SfxMedium::SetCancelManager_Impl( SfxPoolCancelManager* pMgr )
+{
+ pImp->xCancelManager = pMgr;
+}
+
+//----------------------------------------------------------------
+void SfxMedium::CancelTransfers()
+{
+ if( pImp->xCancelManager.Is() )
+ pImp->xCancelManager->Cancel();
+}
+
+//----------------------------------------------------------------
+void AddNumber_Impl( String& aNumber, sal_uInt32 nArg )
+{
+ if ( nArg >= 10240 )
+ {
+ aNumber += String::CreateFromInt32( (sal_uInt16)( ( nArg + 512 ) / 1024 ) );
+ aNumber += ' ';
+ aNumber += SfxResId( STR_KB );
+ }
+ else
+ {
+ aNumber += String::CreateFromInt32( nArg );
+ aNumber += ' ';
+ aNumber += SfxResId( STR_BYTES );
+ }
+}
+
+//----------------------------------------------------------------
+
+String SfxMedium::GetStatusString( const SvProgressArg* pArg )
+{
+ String aString;
+/*
+ StringList_Impl aSL( SfxResId( RID_DLSTATUS2 ), (USHORT)pArg->eStatus );
+ USHORT nTotal = 0;
+
+ if ( pArg->eStatus == SVBINDSTATUS_ENDDOWNLOADDATA && nTotal <= 1 )
+ return aString;
+
+ if( aSL )
+ {
+ INetURLObject aObj( pArg->rStatus );
+ aString = aSL.GetString();
+ aString.SearchAndReplaceAscii( "$(HOST)", aObj.GetHost() );
+ String aTarget = aObj.GetFull();
+ if( aTarget.Len() <= 1 && pArg->eStatus != SVBINDSTATUS_CONNECTING )
+ aTarget = aObj.GetHost();
+ if( pArg->nMax )
+ {
+ aTarget += DEFINE_CONST_UNICODE( " (" );
+ AddNumber_Impl( aTarget, pArg->nMax );
+ aTarget += ')';
+ }
+
+ aString.SearchAndReplaceAscii( "$(TARGET)",aTarget );
+ String aNumber;
+ AddNumber_Impl( aNumber, pArg->nProgress );
+ if( pArg->nRate )
+ {
+ aNumber+= DEFINE_CONST_UNICODE( " (" );
+ AddNumber_Impl( aNumber, (ULONG)pArg->nRate );
+ aNumber+= DEFINE_CONST_UNICODE( "/s)" );
+ }
+ if( pArg->nMax && pArg->nProgress && pArg->nMax != pArg->nProgress )
+ {
+ aNumber += DEFINE_CONST_UNICODE( " [" );
+ float aPerc = pArg->nProgress / (float)pArg->nMax;
+ aNumber += String::CreateFromInt32( (USHORT)(aPerc * 100) );
+ aNumber += DEFINE_CONST_UNICODE( "%]" );
+ }
+ aString.SearchAndReplaceAscii( "$(BYTE)", aNumber );
+ }
+ */
+ return aString;
+}
+
+sal_Bool SfxMedium::IsRemote()
+{
+ return bRemote;
+}
+
+//------------------------------------------------------------------
+
+void SfxMedium::SetUpdatePickList(sal_Bool bVal)
+{
+ if(!pImp)
+ pImp = new SfxMedium_Impl( this );
+ pImp->bUpdatePickList = bVal;
+}
+//------------------------------------------------------------------
+
+sal_Bool SfxMedium::IsUpdatePickList() const
+{
+ return pImp? pImp->bUpdatePickList: sal_True;
+}
+//----------------------------------------------------------------
+
+void SfxMedium::SetDoneLink( const Link& rLink )
+{
+ pImp->aDoneLink = rLink;
+}
+
+//----------------------------------------------------------------
+
+void SfxMedium::SetDataAvailableLink( const Link& rLink )
+{
+ pImp->aAvailableLink = rLink;
+}
+
+//----------------------------------------------------------------
+void SfxMedium::StartDownload()
+{
+ GetMedium_Impl();
+ GetInStream();
+}
+
+void SfxMedium::DownLoad( const Link& aLink )
+{
+ SetDoneLink( aLink );
+ GetInStream();
+ if ( !aLink.IsSet() )
+ {
+ while( !pImp->bDownloadDone )
+ Application::Yield();
+ }
+}
+
+//------------------------------------------------------------------
+void SfxMedium::Init_Impl()
+/* [Beschreibung]
+ Setzt in den Lo.Ischen Namen eine gueltige ::com::sun::star::util::URL (Falls zuvor ein Filename
+ drin war) und setzt den physikalschen Namen auf den Filenamen, falls
+ vorhanden.
+ */
+
+{
+ pImp->pVersions = NULL;
+ INetURLObject aUrl;
+ aUrl.SetSmartProtocol( INET_PROT_FILE );
+ aUrl.SetSmartURL( aLogicName );
+
+ // Ein leerer LogicName soll auch einen leeren Namen ergeben
+ if( aUrl.GetProtocol() == INET_PROT_FILE && aLogicName.Len() )
+ {
+ String aTemp( aUrl.GetMainURL() );
+ INetURLObject aObj( aTemp );
+ if ( INET_PROT_FTP == aObj.GetProtocol() )
+ {
+#if 0 //(dv)
+ CntINetConfig::load (NULL, NULL);
+ INetProxyConfig aProxyConfig;
+ if (CntINetConfig::shouldUseProxy (NULL, aTemp, aProxyConfig) &&
+ aProxyConfig.hasFtpProxy())
+ // ::com::sun::star::chaos::Anchor wird on demand erzeugt
+ aLogicName = aTemp;
+ else
+ pImp->xAnchor = xAnchor;
+#endif
+ }
+ else
+ {
+ aLogicName = aUrl.GetMainURL();
+ if ( aObj.GetProtocol() == INET_PROT_FILE )
+ {
+ if( !pImp->bIsTemp )
+ aName = aUrl.PathToFileName();
+ else
+ DBG_ERROR( "What name ?!" );
+ }
+ else
+ {
+ if( aName == aLogicName || !aName.Len() )
+ aName = aUrl.PathToFileName();
+ }
+ }
+ }
+ else if( aLogicName.Len() )
+ // Falls ein FileName reinkam
+ aLogicName = aUrl.GetMainURL();
+
+ SetIsRemote_Impl();
+
+ // Recover-Files sind immer temp
+ SFX_ITEMSET_ARG( pSet, pSalvageItem, SfxStringItem, SID_DOC_SALVAGE, sal_False);
+ if ( pSalvageItem )
+ pImp->bIsTemp = sal_True;
+}
+//------------------------------------------------------------------
+
+SfxMedium::SfxMedium()
+: IMPL_CTOR(),
+ bRoot( sal_False ),
+ pURLObj(0),
+ pSet(0),
+ pImp(new SfxMedium_Impl( this )),
+ pFilter(0)
+{
+ bDownLoad = sal_True;
+ Init_Impl();
+}
+//------------------------------------------------------------------
+
+SfxMedium::SfxMedium( const SfxMedium& rMedium, sal_Bool bTemporary )
+: IMPL_CTOR(),
+ bRoot(sal_True),
+ pURLObj( rMedium.pURLObj ? new INetURLObject(*rMedium.pURLObj) : 0 ),
+ pImp(new SfxMedium_Impl( this ))
+{
+ bDirect = rMedium.IsDirect();
+ nStorOpenMode = rMedium.GetOpenMode();
+ if ( bTemporary )
+ CreateTempFile();
+ else
+ aName = rMedium.GetName();
+
+ pImp->bIsTemp = bTemporary;
+ DBG_ASSERT( ! rMedium.pImp->bIsTemp,
+ "Temporaeres Medium darf nicht kopiert werden" );
+ aLogicName = rMedium.aLogicName;
+ pSet = rMedium.GetItemSet() ? new SfxItemSet(*rMedium.GetItemSet()) : 0;
+ pFilter = rMedium.pFilter;
+ Init_Impl();
+ if( bTemporary )
+ {
+ if ( !SfxContentHelper::CopyTo( rMedium.GetName(), GetPhysicalName() ) )
+ SetError( ERRCODE_IO_GENERAL );
+ }
+
+ bDownLoad = sal_True;
+
+ if ( rMedium.pImp->pEaMgr )
+ GetEaMgr();
+}
+//------------------------------------------------------------------
+
+void SfxMedium::SetFilter( const SfxObjectFactory& rFact, const String & rFilter )
+{
+ SetFilter( rFact.GetFilterContainer()->GetFilter(rFilter) );
+}
+//----------------------------------------------------------------
+
+void SfxMedium::SetFilter( const SfxFilter* pFilterP, sal_Bool bResetOrig )
+{
+ pFilter = pFilterP;
+ pImp->nFileVersion = 0;
+}
+//----------------------------------------------------------------
+
+const SfxFilter* SfxMedium::GetOrigFilter( sal_Bool bNotCurrent ) const
+{
+ return ( pImp->pOrigFilter || bNotCurrent ) ? pImp->pOrigFilter : pFilter;
+}
+//----------------------------------------------------------------
+
+void SfxMedium::SetOrigFilter_Impl( const SfxFilter* pFilter )
+{
+ pImp->pOrigFilter = pFilter;
+}
+//------------------------------------------------------------------
+
+void SfxMedium::Close()
+{
+ if ( aStorage.Is() )
+ {
+ // don't close the streams if they belong to the
+ // storage
+
+ const SvStream *pStream = aStorage->GetSvStream();
+ if ( pStream == pInStream )
+ {
+ pInStream = NULL;
+ aStorage->SetDeleteStream( TRUE );
+ }
+ if ( pStream == pOutStream )
+ {
+ pOutStream = NULL;
+ aStorage->SetDeleteStream( TRUE );
+ }
+
+ CloseStorage();
+ }
+
+ if ( pInStream )
+ CloseInStream_Impl();
+
+ if ( pOutStream )
+ CloseOutStream_Impl();
+}
+
+#if SUPD<605
+sal_uInt32 SfxMedium::UrlToAbs( String& rAbsUrl, const String& rUrl,
+ SfxObjectShell* pSh )
+{
+ String aMedName( pSh->GetMedium()->GetName() );
+ INetURLObject aAktUrl;
+ INetURLObject aTargetUrl;
+ if ( aMedName.Len() )
+ {
+ aAktUrl.SetSmartProtocol( INET_PROT_FILE );
+ aAktUrl.SetSmartURL( aMedName );
+ }
+
+ sal_Bool bTargetSet = sal_False;
+ sal_uInt32 nErr = ERRCODE_NONE;
+
+ // Absolutes File Protokoll testen
+ bool bWasAbsolute = FALSE;
+ INetURLObject aFileObj( aAktUrl );
+ aFileObj.smartRel2Abs( rUrl, bWasAbsolute );
+
+ if( bWasAbsolute && SfxContentHelper::Exists( aFileObj.GetURLNoMark() ) )
+ {
+ rAbsUrl = aFileObj.GetMainURL();
+ return ERRCODE_NONE;
+ }
+
+ // Ist aktuelles Doc unbenamt?
+ if( !aMedName.Len() )
+ {
+ if( bWasAbsolute )
+ {
+ rAbsUrl = aFileObj.GetMainURL();
+ return ERRCODE_NONE;
+ }
+ else
+ {
+ rAbsUrl = rUrl;
+ return ERRCODE_SFX_ISRELATIVE;
+ }
+ }
+
+ // Falls File Protokoll, testen ob DirEntry vorhanden (relativ)
+ if( aAktUrl.GetProtocol() == INET_PROT_FILE )
+ {
+ INetURLObject aFileObj;
+ aFileObj.SetSmartProtocol( INET_PROT_FILE );
+ if( aAktUrl.GetNewAbsURL( rUrl, &aFileObj ) )
+ {
+ String aFileName = aFileObj.PathToFileName();
+ //Relativ zum Dokument testen!
+ if( SfxContentHelper::Exists( aFileName ) )
+ {
+ // File e.Istiert, also als FileUrl Parsen
+ rAbsUrl = aFileObj.GetMainURL();
+ return ERRCODE_NONE;
+ }
+ }
+ }
+
+ if( !aAktUrl.GetNewAbsURL( rUrl, &aTargetUrl ) )
+ nErr = ERRCODE_IO_GENERAL;
+ rAbsUrl = aTargetUrl.GetMainURL();
+ return nErr;
+}
+#endif
+
+//------------------------------------------------------------------
+
+void SfxMedium::RefreshName_Impl()
+{
+#if 0 //(dv)
+ if ( pImp->xContent.is() )
+ {
+ String aNameP = pImp->xAnchor->GetViewURL();
+ pImp->aOrigURL = aNameP;
+ aLogicName = aNameP;
+ DELETEZ( pURLObj );
+ if (aLogicName.Len())
+ aLogicName = GetURLObject().GetMainURL();
+ SetIsRemote_Impl();
+ }
+#endif //(dv)
+}
+
+void SfxMedium::SetIsRemote_Impl()
+{
+ INetURLObject aObj( GetName() );
+ switch( aObj.GetProtocol() )
+ {
+ case INET_PROT_FTP:
+ case INET_PROT_HTTP:
+ case INET_PROT_HTTPS:
+ case INET_PROT_POP3:
+ case INET_PROT_NEWS:
+ case INET_PROT_IMAP:
+// case INET_PROT_OUT:
+ case INET_PROT_VIM:
+ bRemote = TRUE; break;
+ default:
+ bRemote = ( GetName().CompareToAscii( "private:msgid", 13 ) == COMPARE_EQUAL );
+ break;
+ }
+
+ // Da Dateien, die Remote geschrieben werden zur Uebertragung auch
+ // gelesen werden koennen muessen
+ if( bRemote )
+ nStorOpenMode |= STREAM_READ;
+}
+
+
+
+void SfxMedium::SetName( const String& aNameP, sal_Bool bSetOrigURL )
+{
+ if( !pImp->aOrigURL.Len() )
+ pImp->aOrigURL = aLogicName;
+ if( bSetOrigURL )
+ pImp->aOrigURL = aNameP;
+ aLogicName = aNameP;
+ DELETEZ( pURLObj );
+
+//(dv) if ( pImp->xAnchor.Is() && aNameP != pImp->xAnchor->GetViewURL() )
+//(dv) pImp->xAnchor = NULL;
+
+ if ( aLogicName.Len() )
+ {
+ INetURLObject aUrl;
+ aUrl.SetSmartProtocol( INET_PROT_FILE );
+ aUrl.SetSmartURL( aLogicName );
+ String aTemp( aUrl.GetMainURL() );
+ INetURLObject aObj( aTemp );
+
+ if ( INET_PROT_FTP == aObj.GetProtocol() )
+ {
+#if 0 //(dv)
+ CntINetConfig::load (NULL, NULL);
+ INetProxyConfig aProxyConfig;
+ if (CntINetConfig::shouldUseProxy (NULL, aTemp, aProxyConfig))
+ if (aProxyConfig.hasFtpProxy())
+ aLogicName = aTemp;
+#endif //(dv)
+ }
+
+ aLogicName = GetURLObject().GetMainURL();
+ }
+
+ SetIsRemote_Impl();
+}
+
+//----------------------------------------------------------------
+const String& SfxMedium::GetOrigURL() const
+{
+ return !pImp->aOrigURL.Len() ? (String &)aLogicName : pImp->aOrigURL;
+}
+
+//----------------------------------------------------------------
+void SfxMedium::SetPhysicalName( const String& rNameP )
+{
+ if( pImp->pTempFile )
+ {
+ delete pImp->pTempFile;
+ pImp->pTempFile = NULL;
+ }
+
+ aName = rNameP;
+ bTriedStorage = sal_False;
+
+ if ( aName.Len() )
+ {
+ INetURLObject aURL;
+ Reference < XContent > xContent;
+
+ aURL.SetSmartProtocol( INET_PROT_FILE );
+ aURL.SetSmartURL( aName );
+
+ xContent = UCB_Helper::CreateContent( aURL.GetMainURL() );
+ if ( xContent.is() )
+ pImp->xContent = xContent;
+ }
+}
+
+//------------------------------------------------------------------
+void SfxMedium::SetTemporary( sal_Bool bTemp )
+{
+ pImp->bIsTemp = bTemp;
+}
+
+//------------------------------------------------------------------
+sal_Bool SfxMedium::IsTemporary() const
+{
+ return pImp->bIsTemp;
+}
+
+//------------------------------------------------------------------
+
+sal_Bool SfxMedium::Exists( sal_Bool bForceSession )
+{
+ DBG_ERROR( "Not implemented!" );
+ return sal_False;
+}
+
+//------------------------------------------------------------------
+
+void SfxMedium::ReOpen()
+{
+ DBG_ASSERT( pFilter, "Kein Filter, aber ReOpen!" );
+ if( pFilter )
+ {
+ if( pFilter->UsesStorage() )
+ GetStorage();
+ else
+ GetInStream();
+ }
+}
+//------------------------------------------------------------------
+SfxMedium::SfxMedium
+(
+ const String &rName, StreamMode nOpenMode, sal_Bool bDirectP,
+ sal_Bool bDownLoadP, const SfxFilter *pFlt, SfxItemSet *pInSet
+)
+: IMPL_CTOR(),
+ bRoot( sal_False ),
+ pFilter(pFlt),
+ pURLObj(0),
+ pImp(new SfxMedium_Impl( this )),
+ pSet( pInSet )
+{
+ aName = aLogicName = rName;
+ nStorOpenMode = nOpenMode;
+ bDirect = bDirectP;
+ bDownLoad = bDownLoadP;
+ Init_Impl();
+}
+//------------------------------------------------------------------
+
+SfxMedium::SfxMedium( SvStorage *pStorage, sal_Bool bRootP )
+: IMPL_CTOR(),
+ bRoot( bRootP ),
+ aStorage(pStorage),
+ pURLObj(0),
+ pImp( new SfxMedium_Impl( this )),
+ pSet(0)
+{
+ SfxApplication* pApp = SFX_APP();
+ sal_uInt32 nFormat = pStorage->GetFormat();
+ if( !nFormat )
+ {
+#ifdef DBG_UTIL
+ if( aLogicName.Len() )
+ DBG_ERROR( "Unbekanntes StorageFormat, versuche eigenes Format" );
+#endif
+ pFilter = SfxObjectFactory::GetDefaultFactory().GetFilterContainer()->
+ GetFilter( 0 );
+ }
+ else
+ pFilter = pApp->GetFilterMatcher().GetFilter4ClipBoardId( nFormat, 0, 0 );
+ if( pFilter )
+ pFilter = pApp->GetFilterMatcher().ResolveRedirection( pFilter, *this );
+ if( !pFilter && nFormat )
+ {
+#ifdef DBG_UTIL
+ ByteString aErr( U2S( Exchange::GetFormatName( nFormat ) ) );
+ aErr += " leider kein Filter vorhanden";
+ DBG_ERROR( aErr.GetBuffer() );
+#endif
+ pFilter = SfxObjectFactory::GetDefaultFactory().GetFilterContainer()->
+ GetFilter( 0 );
+ }
+
+ bDownLoad = sal_False;
+ Init_Impl();
+}
+//------------------------------------------------------------------
+
+SfxMedium::~SfxMedium()
+{
+// CancelTransfers();
+ Close();
+
+ delete pSet;
+
+ if( pImp->bIsTemp && GetPhysicalName().Len() )
+ {
+ INetURLObject aObj( GetPhysicalName(), INET_PROT_FILE );
+ SfxContentHelper::Kill( aObj.GetMainURL() );
+ }
+
+ pFilter = 0;
+
+ delete pURLObj;
+ delete pImp;
+}
+//------------------------------------------------------------------
+
+void SfxMedium::SetItemSet(SfxItemSet *pNewSet)
+{
+ delete pSet;
+ pSet = pNewSet;
+}
+//------------------------------------------------------------------
+
+void SfxMedium::SetClassFilter( const SvGlobalName & rFilterClass )
+{
+ bSetFilter = sal_True;
+ aFilterClass = rFilterClass;
+}
+//----------------------------------------------------------------
+
+#if defined SINIX && defined GCC && defined C272
+const INetURLObject& SfxMedium::GetURLObject()
+{
+ if( !pURLObj )
+ {
+ pURLObj = new INetURLObject();
+ if ( GetName().Len() )
+ {
+ pURLObj->SetSmartProtocol( INET_PROT_FILE );
+ pURLObj->SetSmartURL( GetName() );
+ }
+ }
+ return *pURLObj;
+}
+#else
+const INetURLObject& SfxMedium::GetURLObject() const
+{
+ if( !pURLObj )
+ {
+ SfxMedium* pThis = (SfxMedium*)this;
+ pThis->pURLObj = new INetURLObject();
+ if ( GetName().Len() )
+ {
+ pThis->pURLObj->SetSmartProtocol( INET_PROT_FILE );
+ pThis->pURLObj->SetSmartURL( GetName() );
+ }
+ }
+ return *pURLObj;
+}
+#endif
+//----------------------------------------------------------------
+
+const String& SfxMedium::GetPreRedirectedURL() const
+{
+ return pImp->aPreRedirectionURL;
+}
+//----------------------------------------------------------------
+
+sal_uInt32 SfxMedium::GetMIMEAndRedirect( String &rName )
+{
+/* dv !!!! not needed any longer ?
+ INetProtocol eProt = GetURLObject().GetProtocol();
+ if( eProt == INET_PROT_FTP && SvBinding::ShouldUseFtpProxy( GetURLObject().GetMainURL() ) )
+ {
+ Any aAny( UCB_Helper::GetProperty( GetContent(), WID_FLAG_IS_FOLDER ) );
+ sal_Bool bIsFolder = FALSE;
+ if ( ( aAny >>= bIsFolder ) && bIsFolder )
+ return ERRCODE_NONE;
+ }
+
+ GetMedium_Impl();
+ if( !eError && pImp->xBinding.Is() )
+ {
+ eError = pImp->xBinding->GetMimeType( rName );
+
+ // Wir koennen keine Parameter wie CharSets usw.
+ rName = rName.GetToken( 0, ';' );
+ if( !eError )
+ {
+ if( !pImp->aPreRedirectionURL.Len() )
+ pImp->aPreRedirectionURL = aLogicName;
+ SetName( pImp->xBinding->GetRedirectedURL() );
+ }
+ pImp->aExpireTime = pImp->xBinding->GetExpireDateTime();
+ }
+ return eError;
+*/
+ return 0;
+}
+
+//----------------------------------------------------------------
+
+void SfxMedium::SetUsesCache( sal_Bool bUse )
+{
+ pImp->bUsesCache = bUse;
+}
+//----------------------------------------------------------------
+
+sal_Bool SfxMedium::UsesCache() const
+{
+ return pImp->bUsesCache;
+}
+//----------------------------------------------------------------
+
+//----------------------------------------------------------------
+
+void SfxMedium::SetReferer( const String& rRefer )
+{
+ pImp->aReferer = rRefer;
+}
+//----------------------------------------------------------------
+
+const String& SfxMedium::GetReferer( ) const
+{
+ return pImp->aReferer;
+}
+//----------------------------------------------------------------
+
+void SfxMedium::SetTransferPriority( sal_uInt16 nPrio )
+{
+ pImp->nPrio = nPrio;
+}
+//----------------------------------------------------------------
+
+sal_uInt16 SfxMedium::GetTransferPriority( ) const
+{
+ return pImp->nPrio;
+}
+//----------------------------------------------------------------
+
+void SfxMedium::SetExpired_Impl( const DateTime& rDateTime )
+{
+ pImp->aExpireTime = rDateTime;
+}
+//----------------------------------------------------------------
+
+sal_Bool SfxMedium::IsExpired() const
+{
+ return pImp->aExpireTime.IsValid() && pImp->aExpireTime < DateTime();
+}
+//----------------------------------------------------------------
+
+ErrCode SfxMedium::CheckOpenMode_Impl( sal_Bool bSilent, sal_Bool bAllowModeChange )
+{
+ sal_uInt32 nErr = 0;
+ switch( GetURLObject().GetProtocol() )
+ {
+ case INET_PROT_FILE:
+ {
+ Any aAny( UCB_Helper::GetProperty( GetContent(), WID_FLAG_IS_FOLDER ) );
+ sal_Bool bIsFolder = FALSE;
+ if ( ( aAny >>= bIsFolder ) && bIsFolder )
+ break;
+#if 0 // Don't use FSYS !!!!
+ // first check if file is a directory
+ if ( IsDirectory )
+ return ERRCODE_IO_NOTEXISTS;
+#endif
+ sal_Bool bTriesCopy(sal_False);
+ sal_Bool bReadOnly = GetOpenMode() == SFX_STREAM_READONLY;
+ if( !bReadOnly )
+ {
+ // Fuer MS und FL und Konsorten noch ueber die
+ // Dokumente huehnern wg. w95 Bug auf Netware-Servern
+ // bereits zum Schreiben ge"offnete Dokumente lassen sich
+ // nochmal zum Schreiben "offnen
+ for( SfxObjectShell* pFirst = SfxObjectShell::GetFirst();
+ pFirst; pFirst = SfxObjectShell::GetNext( *pFirst ) )
+ {
+ SfxMedium* pMed = pFirst->GetMedium();
+ if( pMed->GetName() == GetName() && pMed->GetOpenMode() != SFX_STREAM_READONLY )
+ {
+ // ggf. r/o oeffnen
+ if ( bAllowModeChange )
+ {
+ bReadOnly = sal_True;
+ GetItemSet()->Put( SfxBoolItem(SID_DOC_READONLY, sal_True));
+ SetOpenMode(SFX_STREAM_READONLY, sal_False);
+ }
+ else
+ nErr = ERRCODE_IO_ACCESSDENIED;
+ break;
+ }
+ }
+ }
+ while(1)
+ {
+ // erst der Zugriff auf den Storage erzeugt den Fehlercode
+ SvStorageRef aStor;
+ if ( IsStorage() )
+ aStor = GetStorage();
+ else
+ GetInStream();
+
+ if( aStor.Is() && bReadOnly && !bTriesCopy && !pImp->bIsTemp )
+ {
+ SfxApplication *pSfxApp = SFX_APP();
+ const SfxFilter* pFilter = pSfxApp->GetFilterMatcher().
+ GetFilter4ClipBoardId( aStor->GetFormat() );
+ if ( pFilter )
+ pFilter = pSfxApp->GetFilterMatcher().
+ ResolveRedirection( pFilter, *this );
+ // Eigenes Storageformat readonly per Kopie oeffnen
+ if( pFilter && pFilter->IsOwnFormat() )
+ {
+ nErr = ERRCODE_IO_ACCESSDENIED;
+ Close();
+ }
+ else nErr = GetError();
+ }
+ else nErr = GetError();
+ switch ( nErr )
+ {
+ default: return nErr;
+ case ERRCODE_IO_LOCKVIOLATION:
+ // Wg. Win95 Netware
+ case ERRCODE_IO_NOTEXISTS:
+ case ERRCODE_IO_ACCESSDENIED:
+ {
+ // Zur Zeit soll nicht nachgefragt werden
+ bSilent = sal_True;
+ if(!bReadOnly )
+ {
+ if( bAllowModeChange )
+ {
+ QueryBox aBox( 0, SfxResId(MSG_OPEN_READONLY) );
+ if ( bSilent || RET_YES == aBox.Execute() )
+ {
+ bReadOnly = sal_True;
+ if( GetItemSet() )
+ GetItemSet()->Put(
+ SfxBoolItem(SID_DOC_READONLY, sal_True));
+ SetOpenMode(SFX_STREAM_READONLY, sal_False);
+ ResetError();
+ }
+ else
+ return ERRCODE_ABORT;
+ }
+ else
+ return nErr;
+ }
+ else
+ {
+ if( !bTriesCopy )
+ {
+ String aOldName( aName );
+ CreateTempFile();
+ if ( !SfxContentHelper::CopyTo( aOldName, aName ) )
+ nErr = ERRCODE_IO_GENERAL;
+ ResetError();
+ pImp->bIsTemp = sal_True;
+ bTriesCopy = sal_True;
+ CloseInStream_Impl();
+ }
+ else
+ return nErr;
+ }
+ }
+ }
+ }
+ break;
+ }
+
+ case INET_PROT_DATA:
+ case INET_PROT_PRIVATE:
+ {
+ // Images und Docinfo nicht editieren
+ const INetURLObject& rObj = GetURLObject();
+ String aPath = rObj.GetURLPath();
+ if( rObj.GetProtocol() == INET_PROT_PRIVATE &&
+ aPath.CompareIgnoreCaseToAscii( "image/", 6 ) !=
+ COMPARE_EQUAL &&
+ aPath.CompareIgnoreCaseToAscii( "docinfo/", 8 ) !=
+ COMPARE_EQUAL &&
+ aPath.CompareIgnoreCaseToAscii( "info/", 5 ) !=
+ COMPARE_EQUAL )
+ return 0;
+
+ if( GetOpenMode() & STREAM_WRITE )
+ {
+ if( bAllowModeChange )
+ SetOpenMode(SFX_STREAM_READONLY, sal_False);
+ else
+ return ERRCODE_IO_ACCESSDENIED;
+ }
+ }
+ }
+ return nErr;
+}
+//----------------------------------------------------------------
+
+void SfxMedium::ForceSynchronStream_Impl( sal_Bool bForce )
+{
+ if( pInStream )
+ {
+ SvLockBytes* pBytes = pInStream->GetLockBytes();
+ if( pBytes )
+ pBytes->SetSynchronMode( bForce );
+ }
+ pImp->bForceSynchron = bForce;
+}
+//----------------------------------------------------------------
+/* Kann der URL ein MIME Type zugeordnent werden? */
+sal_Bool SfxMedium::SupportsMIME_Impl() const
+{
+ INetProtocol eProt = GetURLObject().GetProtocol();
+ if( eProt == INET_PROT_HTTPS || eProt == INET_PROT_HTTP )
+ return sal_True;
+
+ if( eProt == INET_PROT_NOT_VALID )
+ return sal_False;
+
+ if( eProt == INET_PROT_FTP )
+ {
+ Any aAny( UCB_Helper::GetProperty( GetContent(), WID_FLAG_IS_FOLDER ) );
+ sal_Bool bIsFolder = FALSE;
+ if ( ( aAny >>= bIsFolder ) && bIsFolder )
+ return SvBinding::ShouldUseFtpProxy( GetURLObject().GetMainURL() );
+ else
+ return sal_False;
+ }
+
+ return sal_False;
+}
+
+sal_Bool SfxMedium::IsAllowedForExternalBrowser() const
+{
+ if ( pFilter && !pFilter->GetFilterName().EqualsAscii( "ExternBrowser" ) )
+ return sal_False;
+
+ sal_Bool bCheckExternBrowser = SFX_APP()->ShouldUseExternalBrowser( aLogicName );
+ if ( bCheckExternBrowser )
+ {
+ // Wenn Reload eines mit dem Office geladenen Dokuments gemacht wird oder nicht readonly geladen wird,
+ // soll kein externer Browser benutzt werden
+ SFX_ITEMSET_ARG( GetItemSet(), pReloadItem, SfxBoolItem, SID_RELOAD, sal_False );
+ SFX_ITEMSET_ARG( GetItemSet(), pReadonlyItem, SfxBoolItem, SID_DOC_READONLY, sal_False );
+ SFX_ITEMSET_ARG( GetItemSet(), pHidden, SfxBoolItem, SID_HIDDEN, sal_False);
+ if ( pReloadItem || ( pReadonlyItem && !pReadonlyItem->GetValue() ) || pHidden && pHidden->GetValue() )
+ bCheckExternBrowser = sal_False;
+ }
+
+ return bCheckExternBrowser;
+}
+
+//----------------------------------------------------------------
+
+/* Kann der URL eine lokale Datei zugeordnet werden? */
+
+sal_Bool SfxMedium::ProvidesFile_Impl() const
+{
+ INetProtocol eProt = GetURLObject().GetProtocol();
+ return eProt == INET_PROT_FILE;
+}
+//----------------------------------------------------------------
+
+/* Liefert die ::com::sun::star::util::URL direkt einen Storage oder Stream? Hierzu z"ahlen
+ nicht Executable Filter, die ja erst in der n"achsten Runde einen
+ Stream liefern */
+
+sal_Bool SfxMedium::ProvidesData_Impl() const
+{
+ // perhaps this medium was constructed for an embedded object
+ if ( aStorage.Is() )
+ return sal_True;
+
+ if( pFilter )
+ {
+ if ( pFilter->GetFilterContainer()->GetName().EqualsAscii( "plugin" ) )
+ return sal_True;
+
+ if ( ( pFilter->GetFilterFlags() & SFX_FILTER_EXECUTABLE ) || pFilter->GetFilterName().EqualsAscii( SFX_FILTER_DOWNLOAD ) )
+ return sal_False;
+ }
+ else
+ {
+ const SfxFilter* pProtoFilter = SFX_APP()->GetFilterMatcher().GetFilter4Protocol( *(SfxMedium*)this );
+ if( pProtoFilter && (pProtoFilter->GetFilterFlags() & SFX_FILTER_EXECUTABLE ) )
+ return sal_False;
+ }
+
+ INetProtocol eProt;
+ if ( GetContent().is() )
+ {
+ const INetURLObject& aObj= GetURLObject();
+ eProt = aObj.GetProtocol();
+ if ( INET_PROT_FTP == eProt )
+ {
+#if 0 // (dv)
+ const String &rUrl = aObj.GetMainURL();
+ CntINetConfig::load (NULL, NULL);
+ INetProxyConfig aProxyConfig;
+ if (CntINetConfig::shouldUseProxy (NULL, rUrl, aProxyConfig))
+ if (aProxyConfig.hasFtpProxy())
+#endif
+ return sal_True;
+ }
+ else if( eProt == INET_PROT_HTTPS || eProt == INET_PROT_HTTP )
+ return sal_True;
+
+ Any aAny( UCB_Helper::GetProperty( GetContent(), WID_FLAG_IS_FOLDER ) );
+ sal_Bool bIsFolder = FALSE;
+ if ( ( aAny >>= bIsFolder ) && bIsFolder )
+ return sal_False;
+ }
+ else
+ eProt = GetURLObject().GetProtocol();
+
+ if ( eProt == INET_PROT_FILE )
+ {
+ if ( aLogicName.Search('{') != STRING_NOTFOUND )
+ return sal_False;
+ else
+ return sal_True;
+ }
+ else if ( INET_PROT_FTP == eProt )
+ return sal_True;
+ else if ( eProt == INET_PROT_NOT_VALID )
+ return sal_False;
+
+ return sal_False;
+}
+
+//----------------------------------------------------------------
+SfxFrame* SfxMedium::GetLoadTargetFrame() const
+{
+ return pImp->wLoadTargetFrame;
+}
+//----------------------------------------------------------------
+
+void SfxMedium::SetLoadTargetFrame(SfxFrame* pFrame )
+{
+ pImp->wLoadTargetFrame = pFrame;
+}
+//----------------------------------------------------------------
+
+SvStream* SfxMedium::RemoveStream_Impl()
+{
+ SvStream* pRet = GetInStream();
+ pInStream = 0;
+ return pRet;
+}
+//----------------------------------------------------------------
+
+void SfxMedium::SetStream_Impl( SvStream* pStrm )
+{
+ CloseInStream_Impl();
+ pInStream = pStrm;
+}
+//----------------------------------------------------------------
+
+void SfxMedium::SetStorage_Impl( SvStorage* pStor )
+{
+ aStorage = pStor;
+}
+//----------------------------------------------------------------
+
+SfxItemSet* SfxMedium::GetItemSet() const
+{
+ if( !pSet ) ((SfxMedium*)this)->pSet =
+ new SfxAllItemSet( SFX_APP()->GetPool() );
+ return pSet;
+}
+//----------------------------------------------------------------
+
+void SfxMedium::SetLoadEnvironment_Impl( LoadEnvironment_Impl* pEnv )
+{
+ pImp->pLoadEnv = pEnv;
+}
+//----------------------------------------------------------------
+
+LoadEnvironment_Impl* SfxMedium::GetLoadEnvironment_Impl() const
+{
+ return pImp->pLoadEnv;
+}
+//----------------------------------------------------------------
+
+SvKeyValueIterator* SfxMedium::GetHeaderAttributes_Impl()
+{
+ if( !pImp->xAttributes.Is() )
+/*!!!! if ( pImp->xBinding.Is() )
+ pImp->xAttributes = pImp->xBinding->GetHeaders();
+ else
+*/ pImp->xAttributes = SvKeyValueIteratorRef( new SvKeyValueIterator );
+
+ return pImp->xAttributes;
+}
+//----------------------------------------------------------------
+
+SvCompatWeakHdl* SfxMedium::GetHdl()
+{
+ return pImp->GetHdl();
+}
+
+sal_Bool SfxMedium::IsDownloadDone_Impl()
+{
+ return pImp->bDownloadDone;
+}
+
+SvEaMgr* SfxMedium::GetEaMgr()
+{
+ if ( !pImp->pEaMgr && ProvidesData_Impl() && pFilter )
+ {
+ /* the stream in the storage is probably not a filestream ( the stream is
+ closed anyway! ). Therefor we will always use GetPhysicalName to
+ create the SvEaMgr. */
+ // SvStream *pStream = aStorage.Is() ? aStorage->GetTargetSvStream() : NULL;
+ // if ( pStream && pStream->IsA() == ID_FILESTREAM )
+ // pImp->pEaMgr = new SvEaMgr(*(SvFileStream *)pStream);
+ // else
+ pImp->pEaMgr = new SvEaMgr( GetPhysicalName() );
+ }
+
+ return pImp->pEaMgr;
+}
+
+//----------------------------------------------------------------
+
+void SfxMedium::SetDontCreateCancellable( )
+{
+ pImp->bDontCreateCancellable = sal_True;
+}
+
+::com::sun::star::uno::Reference< ::com::sun::star::io::XActiveDataSource > SfxMedium::GetDataSource()
+{
+ if ( !pImp->pSource )
+ CreateDataSource();
+ return pImp->pSource;
+}
+
+::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream > SfxMedium::GetDataSink()
+{
+ if ( !pImp->pSink )
+ CreateDataSink();
+ return pImp->pSink;
+}
+
+void SfxMedium::CreateDataSource()
+{
+ if ( ProvidesData_Impl() )
+ {
+ SfxLoadEnvironment *pEnv = NULL;
+ if ( pImp->pLoadEnv )
+ {
+ pEnv = new SfxLoadEnvironment( pImp->pLoadEnv );
+ SfxRefItem aItem( SID_LOADENVIRONMENT, pEnv );
+ GetItemSet()->Put( aItem );
+ }
+
+ pImp->pSource = new FileSource_Impl( this );
+ pImp->pSource->acquire();
+ if ( pEnv )
+ pEnv->SetDataAvailableLink( LINK( pImp->pSource, FileSource_Impl, DataAvailableHdl ) );
+ }
+}
+
+void SfxMedium::CreateDataSink()
+{
+ pImp->pSink = new FileSink_Impl( this );
+ pImp->pSink->acquire();
+}
+
+void SfxMedium::ResetDataSource()
+{
+ if ( pImp->pSource )
+ {
+ pImp->pSource->ResetMedium();
+ pImp->pSource->release();
+ }
+}
+
+void SfxMedium::ResetDataSink()
+{
+ if ( pImp->pSink )
+ {
+ pImp->pSink->ResetMedium();
+ pImp->pSink->release();
+ }
+}
+
+const SfxVersionTableDtor* SfxMedium::GetVersionList()
+{
+ if ( !pImp->pVersions && IsStorage() )
+ {
+ SvStorageStreamRef aStream =
+ GetStorage()->OpenStream( DEFINE_CONST_UNICODE( "VersionList" ), SFX_STREAM_READONLY | STREAM_NOCREATE );
+ if ( aStream.Is() && aStream->GetError() == SVSTREAM_OK )
+ {
+ pImp->pVersions = new SfxVersionTableDtor;
+ pImp->pVersions->Read( *aStream );
+ }
+ }
+
+ return pImp->pVersions;
+}
+
+sal_uInt16 SfxMedium::AddVersion_Impl( SfxVersionInfo& rInfo )
+{
+ if ( IsStorage() )
+ {
+ if ( !pImp->pVersions )
+ pImp->pVersions = new SfxVersionTableDtor;
+
+ // Einen eindeutigen Namen f"ur den Stream ermitteln
+ SvULongs aLongs;
+ SfxVersionInfo* pInfo = pImp->pVersions->First();
+ while ( pInfo )
+ {
+ sal_uInt32 nVer = (sal_uInt32) pInfo->aName.Copy(7).ToInt32();
+ sal_uInt16 n;
+ for ( n=0; n<aLongs.Count(); n++ )
+ if ( nVer<aLongs[n] )
+ break;
+
+ aLongs.Insert( nVer, n );
+ pInfo = pImp->pVersions->Next();
+ }
+
+ sal_uInt16 nKey;
+ for ( nKey=0; nKey<aLongs.Count(); nKey++ )
+ if ( aLongs[nKey] > nKey+1 )
+ break;
+
+ rInfo.aName = DEFINE_CONST_UNICODE( "Version" );
+ rInfo.aName += String::CreateFromInt32( nKey + 1 );
+ pInfo = new SfxVersionInfo( rInfo );
+ pImp->pVersions->Insert( pInfo, LIST_APPEND );
+ return nKey;
+ }
+
+ return 0;
+}
+
+sal_Bool SfxMedium::RemoveVersion_Impl( const SfxVersionInfo& rInfo )
+{
+ if ( !pImp->pVersions )
+ return sal_False;
+
+ SfxVersionInfo* pInfo = pImp->pVersions->First();
+ while( pInfo )
+ {
+ if ( pInfo->aName == rInfo.aName )
+ {
+ pImp->pVersions->Remove( pInfo );
+ delete pInfo;
+ return sal_True;
+ }
+
+ pInfo = pImp->pVersions->Next();
+ }
+
+ return sal_False;
+}
+
+sal_Bool SfxMedium::TransferVersionList_Impl( SfxMedium& rMedium )
+{
+ if ( rMedium.pImp->pVersions )
+ {
+ delete pImp->pVersions;
+ pImp->pVersions = new SfxVersionTableDtor( *rMedium.pImp->pVersions );
+ return sal_True;
+ }
+
+ return sal_False;
+}
+
+sal_Bool SfxMedium::SaveVersionList_Impl()
+{
+ if ( IsStorage() )
+ {
+ if ( !pImp->pVersions )
+ return sal_True;
+
+ SvStorageStreamRef aStream =
+ GetStorage()->OpenStream( DEFINE_CONST_UNICODE( "Version.Ist" ), SFX_STREAM_READWRITE );
+ if ( aStream.Is() && aStream->GetError() == SVSTREAM_OK )
+ {
+ pImp->pVersions->Write( *aStream );
+ return sal_True;
+ }
+ }
+
+ return sal_False;
+}
+
+//----------------------------------------------------------------
+sal_Bool SfxMedium::IsReadOnly()
+{
+ sal_Bool bReadOnly = !( GetOpenMode() & STREAM_WRITE );
+/*(dv) if ( bReadOnly && pURLObj && CntAnchor::IsViewURL( pURLObj->GetMainURL() ) )
+ // Chaos-Storages sind niemals als readonly anzusehen!
+ return sal_False;
+*/
+ if ( !bReadOnly )
+ {
+ // lo.Isch readonly ge"offnet
+ SFX_ITEMSET_ARG( GetItemSet(), pItem, SfxBoolItem, SID_DOC_READONLY, sal_False);
+ if ( pItem )
+ bReadOnly = pItem->GetValue();
+ }
+
+ return bReadOnly;
+}
+
+//----------------------------------------------------------------
+void SfxMedium::CreateTempFile()
+{
+ if ( pImp->pTempFile )
+ delete pImp->pTempFile;
+
+ String aParentName;
+ INetURLObject aParent = GetURLObject();
+
+ if ( aParent.removeSegment() )
+ aParentName = aParent.GetMainURL();
+
+ pImp->pTempFile = new TempFile( &aParentName );
+ pImp->pTempFile->EnableKillingFile( sal_True );
+
+ aName = pImp->pTempFile->GetName();
+
+ CloseOutStream_Impl();
+ CloseStorage();
+}
+
+//----------------------------------------------------------------
+#define nActVersion 1
+
+SvStream& SfxVersionTableDtor::Read( SvStream& rStrm )
+{
+ sal_uInt16 nCount = 0, nVersion = 0;
+
+ rStrm >> nVersion;
+ rStrm >> nCount;
+
+ for( sal_uInt16 i=0; i<nCount; ++i )
+ {
+ SfxVersionInfo *pNew = new SfxVersionInfo;
+ rStrm.ReadByteString( pNew->aComment, RTL_TEXTENCODING_UTF8 );
+ rStrm.ReadByteString( pNew->aName, RTL_TEXTENCODING_UTF8 );
+ pNew->aCreateStamp.Load( rStrm );
+ Insert( pNew, LIST_APPEND );
+ }
+
+ return rStrm;
+}
+
+SvStream& SfxVersionTableDtor::Write( SvStream& rStream ) const
+{
+ rStream << (sal_uInt16) nActVersion;
+ rStream << (sal_uInt16) Count();
+
+ SfxVersionInfo* pInfo = ((SfxVersionTableDtor*)this)->First();
+ while( pInfo && rStream.GetError() == SVSTREAM_OK )
+ {
+ rStream.WriteByteString( pInfo->aComment, RTL_TEXTENCODING_UTF8 );
+ rStream.WriteByteString( pInfo->aName, RTL_TEXTENCODING_UTF8 );
+ pInfo->aCreateStamp.Save( rStream );
+ pInfo = ((SfxVersionTableDtor*)this)->Next();
+ }
+
+ return rStream;
+}
+
+void SfxVersionTableDtor::DelDtor()
+{
+ SfxVersionInfo* pTmp = First();
+ while( pTmp )
+ {
+ delete pTmp;
+ pTmp = Next();
+ }
+ Clear();
+}
+
+SfxVersionTableDtor& SfxVersionTableDtor::operator=( const SfxVersionTableDtor& rTbl )
+{
+ DelDtor();
+ SfxVersionInfo* pTmp = ((SfxVersionTableDtor&)rTbl).First();
+ while( pTmp )
+ {
+ SfxVersionInfo *pNew = new SfxVersionInfo( *pTmp );
+ Insert( pNew, LIST_APPEND );
+ pTmp = ((SfxVersionTableDtor&)rTbl).Next();
+ }
+ return *this;
+}
+
+//----------------------------------------------------------------
+//----------------------------------------------------------------
+//----------------------------------------------------------------
+SfxVersionInfo::SfxVersionInfo()
+{
+}
+
+SvStringsDtor* SfxVersionTableDtor::GetVersions() const
+{
+ SvStringsDtor *pList = new SvStringsDtor;
+ SfxVersionInfo* pInfo = ((SfxVersionTableDtor*) this)->First();
+ while ( pInfo )
+ {
+ String *pString = new String( pInfo->aComment );
+ (*pString) += DEFINE_CONST_UNICODE( "; " );
+ (*pString) += ConvertDateTime_Impl( pInfo->aCreateStamp );
+ pList->Insert( pString, pList->Count() );
+ pInfo = ((SfxVersionTableDtor*) this)->Next();
+ }
+
+ return pList;
+}
+
+//----------------------------------------------------------------
+//----------------------------------------------------------------
+//----------------------------------------------------------------
+::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SfxDataSourceFactory::createInstance(const ::rtl::OUString& ServiceSpecifier) throw( ::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException )
+{
+ INetProtocol eProt = INetURLObject::CompareProtocolScheme( U2S( ServiceSpecifier ) );
+ switch ( eProt )
+ {
+ case INET_PROT_FTP :
+ case INET_PROT_HTTP :
+ case INET_PROT_FILE :
+ case INET_PROT_HTTPS :
+ case INET_PROT_NEWS :
+ case INET_PROT_PRIV_SOFFICE :
+ case INET_PROT_IMAP :
+ case INET_PROT_POP3 :
+ case INET_PROT_VIM :
+ break;
+ default:
+ return ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > ();
+ break;
+ }
+
+ return (::cppu::OWeakObject*) new FileSource_Impl;
+}
+
+SFX_IMPL_XINTERFACE_2( SfxDataSourceFactory, OWeakObject, ::com::sun::star::lang::XMultiServiceFactory, ::com::sun::star::lang::XServiceInfo )
+SFX_IMPL_XTYPEPROVIDER_2( SfxDataSourceFactory, ::com::sun::star::lang::XMultiServiceFactory, ::com::sun::star::lang::XServiceInfo )
+SFX_IMPL_XSERVICEINFO( SfxDataSourceFactory, "com.sun.star.frame.DataSourceFactory", "com.sun.star.comp.sfx2.DataSourceFactory" )
+SFX_IMPL_SINGLEFACTORY( SfxDataSourceFactory )
+
+SfxDataSourceFactory::SfxDataSourceFactory( com::sun::star::uno::Reference < com::sun::star::lang::XMultiServiceFactory> const & )
+{
+ DBG_ERRORFILE( "NIJ!" );
+}
+
+SfxDataSourceFactory::~SfxDataSourceFactory()
+{
+}
+
+::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SfxDataSourceFactory::createInstanceWithArguments(const ::rtl::OUString& ServiceSpecifier, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& Arguments) throw( ::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException )
+{
+ INetProtocol eProt = INetURLObject::CompareProtocolScheme( U2S( ServiceSpecifier ) );
+ switch ( eProt )
+ {
+ case INET_PROT_FTP :
+ case INET_PROT_HTTP :
+ case INET_PROT_FILE :
+ case INET_PROT_HTTPS :
+ case INET_PROT_NEWS :
+ case INET_PROT_PRIV_SOFFICE :
+ case INET_PROT_IMAP :
+ case INET_PROT_POP3 :
+ case INET_PROT_VIM :
+ break;
+ default:
+ return ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > ();
+ break;
+ }
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xRet;
+ FileSource_Impl* pSource = new FileSource_Impl();
+ xRet = (::cppu::OWeakObject*) pSource;
+ pSource->initialize( Arguments );
+ return xRet;
+}
+
+::com::sun::star::uno::Sequence< ::rtl::OUString > SfxDataSourceFactory::getAvailableServiceNames(void) throw( ::com::sun::star::uno::RuntimeException )
+{
+ ::com::sun::star::uno::Sequence< ::rtl::OUString > aRet(9);
+ ::rtl::OUString *pArr = aRet.getArray();
+ pArr[0] = DEFINE_CONST_UNICODE( "ftp:" );
+ pArr[1] = DEFINE_CONST_UNICODE( "http:" );
+ pArr[2] = DEFINE_CONST_UNICODE( "https:" );
+ pArr[3] = DEFINE_CONST_UNICODE( "file:" );
+ pArr[4] = DEFINE_CONST_UNICODE( "news:" );
+ pArr[5] = DEFINE_CONST_UNICODE( "staroffice.private:" );
+ pArr[6] = DEFINE_CONST_UNICODE( "imap:" );
+ pArr[7] = DEFINE_CONST_UNICODE( "pop3:" );
+ pArr[8] = DEFINE_CONST_UNICODE( "vim:" );
+
+ return aRet;
+}
+
+#if SUPD<604
+void SfxMedium::SetReloadAvailableLink( const Link& rLink )
+{
+}
+#endif
+
+
diff --git a/sfx2/source/doc/docfilt.cxx b/sfx2/source/doc/docfilt.cxx
new file mode 100644
index 000000000000..e1d9edc6f42a
--- /dev/null
+++ b/sfx2/source/doc/docfilt.cxx
@@ -0,0 +1,322 @@
+/*************************************************************************
+ *
+ * $RCSfile: docfilt.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:32 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+// INCLUDE ---------------------------------------------------------------
+
+#include <string> // HACK: prevent conflict between STLPORT and Workshop headers
+
+#ifndef _EXCHANGE_HXX //autogen
+#include <vcl/exchange.hxx>
+#endif
+#ifndef _COM_SUN_STAR_PLUGIN_PLUGINMODE_HPP_
+#include <com/sun/star/plugin/PluginMode.hpp>
+#endif
+#ifndef _COM_SUN_STAR_PLUGIN_PLUGINDESCRIPTION_HPP_
+#include <com/sun/star/plugin/PluginDescription.hpp>
+#endif
+#ifndef _COM_SUN_STAR_PLUGIN_PLUGINEXCEPTION_HPP_
+#include <com/sun/star/plugin/PluginException.hpp>
+#endif
+#ifndef _COM_SUN_STAR_PLUGIN_PLUGINVARIABLE_HPP_
+#include <com/sun/star/plugin/PluginVariable.hpp>
+#endif
+#ifndef _COM_SUN_STAR_PLUGIN_XPLUGIN_HPP_
+#include <com/sun/star/plugin/XPlugin.hpp>
+#endif
+#ifndef _COM_SUN_STAR_PLUGIN_XPLUGINMANAGER_HPP_
+#include <com/sun/star/plugin/XPluginManager.hpp>
+#endif
+#ifndef _COM_SUN_STAR_PLUGIN_XPLUGINCONTEXT_HPP_
+#include <com/sun/star/plugin/XPluginContext.hpp>
+#endif
+#ifndef _UNOTOOLS_PROCESSFACTORY_HXX_
+#include <unotools/processfactory.hxx>
+#endif
+
+#pragma hdrstop
+
+#include "docfac.hxx"
+#include "docfilt.hxx"
+#include "fltfnc.hxx"
+#include "app.hxx"
+#include "sfxresid.hxx"
+#include "doc.hrc"
+#include "sfxuno.hxx"
+
+// STATIC DATA -----------------------------------------------------------
+
+DBG_NAME(SfxFilter);
+
+SfxFilter::SfxFilter( const String &rName,
+ const String &rWildCard,
+ SfxFilterFlags nType,
+ sal_uInt32 lFmt,
+ const String &rMacTyp,
+ const String &rTypNm,
+ sal_uInt16 nIcon,
+ const String &rMimeType,
+ const SfxFilterContainer* pContainerP,
+ const String &rUsrDat ):
+ lFormat(lFmt),
+ nFormatType(nType),
+ aWildCard(rWildCard, ';'),
+ aMacType(rMacTyp),
+ aTypeName(rTypNm),
+ nDocIcon(nIcon),
+ aUserData(rUsrDat),
+ aName( rName ),
+ aMimeType( rMimeType ),
+ aFilterName( rName ),
+ pContainer( pContainerP )
+{
+ InitMembers_Impl();
+ pContainer = pContainerP;
+ aFilterName = rName;
+ aMimeType = rMimeType;
+}
+
+
+SfxFilter::SfxFilter( const char* pName, const String &rWildCard,
+ SfxFilterFlags nType,
+ const SfxFilterContainer* pContainerP )
+ : lFormat(0),
+ nFormatType(nType),
+ aWildCard(rWildCard, ';'),
+ nDocIcon(0),
+ pContainer( pContainerP )
+{
+ aName = String::CreateFromAscii( pName );
+ aFilterName = String::CreateFromAscii( pName );
+ InitMembers_Impl();
+ pContainer = pContainerP;
+}
+
+SfxFilter::SfxFilter( const char* pName, const String &rWildCard,
+ SfxFilterFlags nType, const String &rTypeName,
+ const SfxFilterContainer* pContainerP )
+ : lFormat(0),
+ nFormatType(nType),
+ aWildCard(rWildCard, ';'),
+ aTypeName( rTypeName ),
+ nDocIcon(0),
+ pContainer( pContainerP )
+{
+ aName = String::CreateFromAscii( pName );
+ aFilterName = String::CreateFromAscii( pName );
+ InitMembers_Impl();
+ pContainer = pContainerP;
+}
+
+void SfxFilter::InitMembers_Impl()
+{
+ String aExts = GetWildcard()();
+ String aShort, aLong;
+ String aRet;
+ sal_uInt16 nMaxLength =
+#if defined( WIN ) || defined( OS2 )
+ 3
+#else
+ USHRT_MAX
+#endif
+ ;
+ String aTest;
+ sal_uInt16 nPos = 0;
+ while( ( aRet = aExts.GetToken( nPos++, ';' ) ).Len() )
+ {
+ aTest = aRet;
+ aTest.SearchAndReplace( DEFINE_CONST_UNICODE( "*." ), String() );
+ if( aTest.Len() <= nMaxLength )
+ {
+ if( aShort.Len() ) aShort += ';';
+ aShort += aRet;
+ }
+ else
+ {
+ if( aLong.Len() ) aLong += ';';
+ aLong += aRet;
+ }
+ }
+ if( aShort.Len() && aLong.Len() )
+ {
+ aShort += ';';
+ aShort += aLong;
+ }
+ aWildCard = aShort;
+
+ nVersion = SOFFICE_FILEFORMAT_NOW;
+ bPlugDataSearched = 0;
+ pPlugData = 0;
+
+ aName = pContainer->GetName();
+ aName += DEFINE_CONST_UNICODE( ": " );
+ aName += aFilterName;
+
+ aUIName = aFilterName;
+}
+
+SfxFilter::~SfxFilter()
+{
+ delete pPlugData;
+}
+
+const String& SfxFilter::GetTypeName() const
+{
+ return
+#ifdef MAC
+ aMacType;
+#else
+ aTypeName;
+#endif
+}
+
+const ::com::sun::star::plugin::PluginDescription* SfxFilter::GetPlugData()
+{
+ if( !bPlugDataSearched )
+ {
+ bPlugDataSearched = sal_True;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xMan = ::utl::getProcessServiceFactory();
+ ::com::sun::star::uno::Reference< ::com::sun::star::plugin::XPluginManager >
+ xPlugMgr( xMan->createInstance( DEFINE_CONST_UNICODE( "com.sun.star.plugin.PluginManager" ) ), ::com::sun::star::uno::UNO_QUERY );
+ DBG_ASSERT( xPlugMgr.is(), "### cannot create instance com.sun.star.plugin.PluginManager!" );
+ if( xPlugMgr.is() )
+ {
+ ::com::sun::star::uno::Sequence < ::com::sun::star::plugin::PluginDescription > aDescr = xPlugMgr->getPluginDescriptions();
+ const ::com::sun::star::plugin::PluginDescription *pArr = aDescr.getConstArray();
+ sal_uInt16 n;
+ for (n=0; n<aDescr.getLength(); n++ )
+ {
+ const ::com::sun::star::plugin::PluginDescription& rData = pArr[n];
+ String aTest = rData.Description;
+ aTest += DEFINE_CONST_UNICODE( " (PlugIn)" );
+ if( aTest == GetFilterName() )
+ break;
+ }
+
+ const ::com::sun::star::plugin::PluginDescription& rData = pArr[n];
+ ::com::sun::star::plugin::PluginDescription *pPlug = new ::com::sun::star::plugin::PluginDescription;
+ pPlug->PluginName = rData.PluginName;
+ pPlug->Mimetype = rData.Mimetype;
+ pPlug->Extension = rData.Extension;
+ pPlug->Description = rData.Description;
+
+ pPlugData = pPlug;
+ }
+ }
+
+ return pPlugData;
+}
+
+sal_Bool SfxFilter::IsFirstPlugin() const
+{
+ const ::com::sun::star::plugin::PluginDescription* pData = GetPlugData();
+ if( pData )
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xMan = ::utl::getProcessServiceFactory();
+ ::com::sun::star::uno::Reference< ::com::sun::star::plugin::XPluginManager >
+ xPlugMgr( xMan->createInstance( DEFINE_CONST_UNICODE( "com.sun.star.plugin.PluginManager" ) ), ::com::sun::star::uno::UNO_QUERY );
+ DBG_ASSERT( xPlugMgr.is(), "### cannot create instance com.sun.star.plugin.PluginManager!" );
+ if( xPlugMgr.is() )
+ {
+ ::com::sun::star::uno::Sequence < ::com::sun::star::plugin::PluginDescription > aDescr = xPlugMgr->getPluginDescriptions();
+ String aPlug;
+ const ::com::sun::star::plugin::PluginDescription *pArr = aDescr.getConstArray();
+ String aTest;
+ for ( sal_uInt16 n=0; n<aDescr.getLength(); n++ )
+ {
+ if( pArr[n].Description == pData->Description )
+ return sal_True;
+ else if( pArr[n].PluginName == pData->PluginName )
+ return sal_False;
+ }
+ }
+ }
+ return sal_False;
+}
+
+
+String SfxFilter::GetDefaultExtension() const
+{
+ return GetWildcard()().GetToken( 0, ';' );
+}
+
+
+String SfxFilter::GetSuffixes() const
+{
+ String aRet = GetWildcard()();
+ while( aRet.SearchAndReplaceAscii( "*.", String() ) != STRING_NOTFOUND );
+ while( aRet.SearchAndReplace( ';', ',' ) != STRING_NOTFOUND );
+ return aRet;
+}
+
+SfxOfficeFilter::SfxOfficeFilter( const SfxFilterContainer* pContainer ) :
+ SfxFilter(
+ String( SfxResId( RID_OFFICEFILTER ) ),
+ String( SfxResId( RID_OFFICEFILTER_WILDCARD ) ),
+ SFX_FILTER_IMPORT | SFX_FILTER_REDIRECT | SFX_FILTER_NOTINCHOOSER,
+ Exchange::RegisterFormatName( DEFINE_CONST_UNICODE("OfficeDocument") ),
+ String( SfxResId( RID_OFFICEFILTER_MACTYPE ) ),
+ String( SfxResId( RID_OFFICEFILTER_OS2TYPE ) ),
+ 0, String(), pContainer, String() )
+{
+}
+
+
diff --git a/sfx2/source/doc/docinf.cxx b/sfx2/source/doc/docinf.cxx
new file mode 100644
index 000000000000..82dd58b1fd12
--- /dev/null
+++ b/sfx2/source/doc/docinf.cxx
@@ -0,0 +1,1521 @@
+/*************************************************************************
+ *
+ * $RCSfile: docinf.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:32 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _BIGINT_HXX //autogen wg. BigInt
+#include <tools/bigint.hxx>
+#endif
+#ifndef _SFXECODE_HXX
+#include <svtools/sfxecode.hxx>
+#endif
+#pragma hdrstop
+
+#include "docfilt.hxx"
+#include "fcontnr.hxx"
+#include "openflag.hxx"
+#include "app.hxx"
+#include "docinf.hxx"
+#include "docfile.hxx"
+#include "saveopt.hxx"
+#include "inimgr.hxx"
+#include "sfxtypes.hxx"
+
+//========================================================================
+
+static const char __FAR_DATA pDocInfoSlot[] = "SfxDocumentInfo";
+static const char __FAR_DATA pPropSlot[] = "\005SummaryInformation";
+static const char __FAR_DATA pDocInfoHeader[] = "SfxDocumentInfo";
+#define VERSION 11
+#define STREAM_BUFFER_SIZE 2048
+
+#define VT_I4 3
+#define VT_LPSTR 30
+#define VT_FILETIME 64
+
+#define PID_TITLE 0x02
+#define PID_SUBJECT 0x03
+#define PID_AUTHOR 0x04
+#define PID_KEYWORDS 0x05
+#define PID_COMMENTS 0x06
+#define PID_TEMPLATE 0x07
+#define PID_LASTAUTHOR 0x08
+#define PID_REVNUMBER 0x09
+#define PID_EDITTIME 0x0a
+#define PID_LASTPRINTED_DTM 0x0b
+#define PID_CREATE_DTM 0x0c
+#define PID_LASTSAVED_DTM 0x0d
+
+//=========================================================================
+
+IMPL_PTRHINT(SfxDocumentInfoHint, SfxDocumentInfo)
+
+//=========================================================================
+
+class SfxPSProperty_Impl
+{
+private:
+ UINT32 nId;
+ UINT32 nType;
+
+public:
+ SfxPSProperty_Impl( UINT32 nIdP, UINT32 nTypeP ) : nId( nIdP ), nType( nTypeP ) {}
+ virtual ~SfxPSProperty_Impl();
+
+ virtual ULONG Save( SvStream& rStream ) = 0;
+ virtual ULONG Load( SvStream& rStream );
+ virtual ULONG Len() = 0;
+
+ UINT32 GetId() const { return nId; }
+ UINT32 GetType() const { return nType; }
+};
+
+//-------------------------------------------------------------------------
+
+SfxPSProperty_Impl::~SfxPSProperty_Impl()
+{
+}
+
+//-------------------------------------------------------------------------
+
+ULONG SfxPSProperty_Impl::Load( SvStream& )
+{
+ return 0;
+}
+
+//=========================================================================
+
+class SfxPSStringProperty_Impl : public SfxPSProperty_Impl
+{
+private:
+ String aString;
+
+public:
+ SfxPSStringProperty_Impl( UINT32 nIdP, const String& aStr ) :
+ aString(aStr), SfxPSProperty_Impl( nIdP, VT_LPSTR ) {}
+ SfxPSStringProperty_Impl( UINT32 nIdP ) :
+ SfxPSProperty_Impl( nIdP, VT_LPSTR ) {}
+
+ virtual ULONG Save( SvStream& rStream );
+ virtual ULONG Load( SvStream& rStream );
+ virtual ULONG Len();
+
+ const String& GetString() { return aString; }
+};
+
+//-------------------------------------------------------------------------
+
+ULONG SfxPSStringProperty_Impl::Save( SvStream& rStream )
+{
+ ByteString aTemp( aString, rStream.GetStreamCharSet() );
+ UINT32 nLen = aTemp.Len();
+ rStream << (UINT32)( nLen + 1 );
+ rStream.Write( aTemp.GetBuffer(), nLen );
+ rStream << '\0';
+ return rStream.GetErrorCode();
+}
+
+//-------------------------------------------------------------------------
+
+ULONG SfxPSStringProperty_Impl::Load( SvStream& rStream )
+{
+ UINT32 nLen;
+ rStream >> nLen;
+ ByteString aTemp;
+ rStream.Read( aTemp.AllocBuffer( (xub_StrLen)( nLen - 1 ) ), nLen );
+ aString = String( aTemp, rStream.GetStreamCharSet() );
+ return rStream.GetErrorCode();
+}
+
+//-------------------------------------------------------------------------
+
+ULONG SfxPSStringProperty_Impl::Len()
+{
+ return aString.Len() + 5;
+}
+
+//=========================================================================
+
+class SfxDocumentInfo_Impl
+{
+public:
+ String aCopiesTo;
+ String aOriginal;
+ String aReferences;
+ String aRecipient;
+ String aReplyTo;
+ String aBlindCopies;
+ String aInReplyTo;
+ String aNewsgroups;
+ String aSpecialMimeType;
+ USHORT nPriority;
+ BOOL bUseUserData;
+
+ SfxDocumentInfo_Impl() : nPriority( 0 ), bUseUserData( 1 ) {}
+};
+
+//=========================================================================
+
+class SfxPSUINT32Property_Impl : public SfxPSProperty_Impl
+{
+private:
+ UINT32 aInt;
+
+ public:
+ SfxPSUINT32Property_Impl( UINT32 nIdP, UINT32 aIntP ) :
+ aInt( aIntP ), SfxPSProperty_Impl( nIdP, VT_I4 ) {}
+
+ virtual ULONG Save( SvStream& rStream );
+ virtual ULONG Len();
+};
+
+//-------------------------------------------------------------------------
+
+ULONG SfxPSUINT32Property_Impl::Save( SvStream& rStream )
+{
+ rStream << aInt;
+ return rStream.GetErrorCode();
+}
+
+//-------------------------------------------------------------------------
+
+ULONG SfxPSUINT32Property_Impl::Len()
+{
+ return 4;
+}
+
+//=========================================================================
+
+class SfxPSDateTimeProperty_Impl : public SfxPSProperty_Impl
+{
+private:
+ DateTime aDateTime;
+
+public:
+ SfxPSDateTimeProperty_Impl( UINT32 nIdP, const DateTime& rDateTime ) :
+ aDateTime( rDateTime ), SfxPSProperty_Impl( nIdP, VT_FILETIME ) {}
+ SfxPSDateTimeProperty_Impl( UINT32 nIdP ) :
+ SfxPSProperty_Impl( nIdP, VT_FILETIME ) {};
+
+ virtual ULONG Save( SvStream& rStream );
+ virtual ULONG Load( SvStream& rStream );
+ virtual ULONG Len();
+
+ const DateTime& GetDateTime() { return aDateTime; }
+};
+
+//-------------------------------------------------------------------------
+
+ULONG SfxPSDateTimeProperty_Impl::Save(SvStream &rStream)
+{
+ // Nicht Valid ist das gleiche, wie bei MS, nur nicht konvertiert
+ if( aDateTime.IsValid() )
+ aDateTime.ConvertToUTC();
+ BigInt a100nPerSecond(10000000L);
+ BigInt a100nPerDay=a100nPerSecond*BigInt(60L*60*24);
+ USHORT nYears=aDateTime.GetYear()-1601;
+ long nDays=
+ nYears*365+nYears/4-nYears/100+nYears/400+
+ aDateTime.GetDayOfYear()-1;
+ BigInt aTime=
+ a100nPerDay*BigInt(nDays)+a100nPerSecond*
+ BigInt((long)( aDateTime.GetSec() +
+ 60* aDateTime.GetMin() +
+ 60L*60* aDateTime.GetHour() ));
+
+ BigInt aUlongMax((ULONG)ULONG_MAX);
+ aUlongMax += 1;
+
+ rStream<<(UINT32)(aTime % aUlongMax) ;
+ rStream<<(UINT32)(aTime / aUlongMax);
+ return rStream.GetErrorCode();
+}
+
+//-------------------------------------------------------------------------
+
+ErrCode SfxPSDateTimeProperty_Impl::Load( SvStream& rStream )
+{
+ UINT32 nLow, nHigh;
+ rStream >> nLow;
+ rStream >> nHigh;
+ BigInt aUlongMax( (ULONG)ULONG_MAX );
+ aUlongMax += 1;
+ BigInt aTime = aUlongMax * BigInt( nHigh );
+ aTime += nLow;
+ BigInt a100nPerSecond(10000000L);
+ BigInt a100nPerDay = a100nPerSecond*BigInt( 60L * 60 * 24 );
+ ULONG nDays = aTime / a100nPerDay;
+ USHORT nYears = (USHORT)
+ (( nDays - ( nDays / ( 4 * 365 ) ) + ( nDays / ( 100 * 365 ) ) -
+ ( nDays / ( 400 * 365 ) ) ) / 365 );
+ nDays -= nYears * 365 + nYears / 4 - nYears / 100 + nYears / 400;
+ USHORT nMonths = 0;
+ for( long nDaysCount = nDays; nDaysCount >= 0; )
+ {
+ nDays = nDaysCount;
+ nMonths ++;
+ nDaysCount-= Date( 1, nMonths, 1601 + nYears ).GetDaysInMonth();
+ }
+ Date _aDate( (USHORT)( nDays + 1 ), nMonths, nYears + 1601 );
+ Time _aTime( ( aTime / ( a100nPerSecond * BigInt( 60 * 60 ) ) ) %
+ BigInt( 24 ),
+ ( aTime / ( a100nPerSecond * BigInt( 60 ) ) ) %
+ BigInt( 60 ),
+ ( aTime / ( a100nPerSecond ) ) %
+ BigInt( 60 ) );
+ aDateTime = DateTime( _aDate, _aTime );
+ aDateTime.ConvertToLocalTime();
+ return rStream.GetErrorCode();
+}
+
+//-------------------------------------------------------------------------
+
+ULONG SfxPSDateTimeProperty_Impl::Len()
+{
+ return 8;
+}
+
+//=========================================================================
+
+typedef SfxPSProperty_Impl *SfxPSPropertyPtr_Impl;
+SV_DECL_PTRARR_DEL(SfxPSPropertyArr_Impl, SfxPSPropertyPtr_Impl, 10, 10);
+SV_IMPL_PTRARR(SfxPSPropertyArr_Impl, SfxPSPropertyPtr_Impl);
+
+struct SfxPSSection_Impl
+{
+ SvGlobalName aId;
+ SfxPSPropertyArr_Impl aProperties;
+ ULONG Save(SvStream &rStream);
+ ULONG Load( SvStream& rStream );
+};
+
+//=========================================================================
+
+class SfxPS_Impl
+{
+ SfxPSSection_Impl aSection;
+ USHORT GetPos( UINT32 nId );
+
+ public:
+
+ void SetSectionName(const SvGlobalName& aIdP);
+ void AddProperty( SfxPSProperty_Impl* pProp);
+ SfxPSProperty_Impl* GetProperty( UINT32 nId );
+
+ ULONG Save(SvStream &rStream);
+ ULONG Load( SvStream& rStream );
+};
+
+
+USHORT SfxPS_Impl::GetPos( UINT32 nId )
+{
+ SfxPSPropertyArr_Impl& rProperties = aSection.aProperties;
+ USHORT nCount = rProperties.Count();
+ for( USHORT n = 0 ; n < nCount; n++ )
+ if( rProperties.GetObject( n )->GetId() == nId )
+ return n;
+ return USHRT_MAX;
+}
+
+
+void SfxPS_Impl::AddProperty( SfxPSProperty_Impl* pProp)
+{
+ USHORT nPos = GetPos( pProp->GetId() );
+ if( nPos != USHRT_MAX )
+ {
+ delete aSection.aProperties[ nPos ];
+ aSection.aProperties.Remove( nPos );
+ }
+ aSection.aProperties.Insert(pProp,0);
+}
+
+//-------------------------------------------------------------------------
+
+void SfxPS_Impl::SetSectionName(const SvGlobalName& aIdP)
+{
+ aSection.aId = aIdP;
+}
+
+
+ULONG SfxPS_Impl::Save(SvStream &rStream)
+{
+ SvGlobalName aName;
+ rStream << (UINT16) 0xfffe // ByteOrder
+ << (UINT16) 0 // version
+ << (UINT16) 1 // Os MinorVersion
+ << (UINT16) // Os Type
+#if defined(MAC)
+ 1
+#elif defined(WNT)
+ 2
+#else
+ 0
+#endif
+ << aName
+ << (UINT32)1; // Immer eine Section
+ return aSection.Save(rStream);
+}
+
+
+ULONG SfxPS_Impl::Load( SvStream& rStream )
+{
+ SvGlobalName aName;
+ UINT16 nByteOrder;
+ UINT16 nVersion;
+ UINT16 nOsMinor;
+ UINT16 nOsType;
+ UINT32 nSections;
+
+ rStream >> nByteOrder >> nVersion >> nOsMinor >> nOsType >> aName >> nSections;
+
+ if( nSections != 1 )
+ {
+ DBG_WARNINGFILE( "DocInfo enthaelt mehr als eine Section" );
+ return ERRCODE_IO_GENERAL;
+ }
+ SetSectionName( aName );
+ return aSection.Load( rStream );
+}
+
+ULONG SfxPSSection_Impl::Load( SvStream& rStream )
+{
+//Nur eine Section laden: ( Use of more than 1 section is discouraged
+//and will not be supported in future windows apis).
+
+ UINT32 nPos;
+ rStream >> aId;
+ rStream >> nPos;
+
+ rStream.Seek( nPos ); // SectionHeader
+ UINT32 nLen;
+ UINT32 nCount;
+ rStream >> nLen;
+ rStream >> nCount;
+ UINT32 *pKeyIds = new UINT32[ nCount ];
+ UINT32 *pPositions = new UINT32[ nCount ];
+ USHORT n;
+ ULONG nErr = 0;
+ for( n = 0; n < nCount && !rStream.GetErrorCode(); n++ )
+ {
+ rStream >> pKeyIds[ n ];
+ rStream >> pPositions[ n ];
+ }
+ for( n = 0; n < nCount && !nErr; n++ )
+ {
+ rStream.Seek( nPos + pPositions[ n ] );
+ UINT32 nId;
+ rStream >> nId;
+ SfxPSProperty_Impl* pProp = 0;
+ switch( nId )
+ {
+ case VT_LPSTR:
+ {
+ pProp = new SfxPSStringProperty_Impl( pKeyIds[ n ] );
+ break;
+ }
+ case VT_FILETIME:
+ {
+ pProp = new SfxPSDateTimeProperty_Impl( pKeyIds[ n ] );
+ break;
+ }
+ }
+ if( pProp )
+ {
+ nErr = pProp->Load( rStream );
+ aProperties.Insert( pProp, 0 );
+ }
+ }
+ delete[] pKeyIds;
+ delete[] pPositions;
+ return nErr;
+}
+
+//-------------------------------------------------------------------------
+
+ULONG SfxPSSection_Impl::Save(SvStream &rStream)
+{
+
+//Nur eine Section schreiben: ( Use of more than 1 section is discouraged
+//and will not be supported in future windows apis).
+
+ ULONG nPos = rStream.Tell();
+ nPos += 20;
+ rStream << aId << (UINT32)nPos; //Offset
+
+
+ //SectionHeader Schreiben
+ ULONG nLen=8;
+ USHORT n;
+ for(n=0;n<aProperties.Count();n++)
+ nLen+=(((aProperties[n]->Len() + 3) >> 2) << 2)+12;
+ rStream << (UINT32) nLen << (UINT32) aProperties.Count();
+
+ //PropertyId/Offsetpaare schreiben
+
+ nLen=8+aProperties.Count()*8;
+ for(n=0;n<aProperties.Count();n++)
+ {
+ rStream << aProperties[n]->GetId() << (UINT32)nLen;
+ nLen+=(((aProperties[n]->Len() + 3) >> 2) << 2) + 4;
+ }
+
+ //Inhalte schreiben
+ for(n=0;n<aProperties.Count();n++)
+ {
+ rStream << (UINT32) aProperties[n]->GetType();
+ aProperties[n]->Save(rStream);
+ nLen=aProperties[n]->Len();
+ while(nLen++%4) //Auffuellen auf DWORD Grenze
+ rStream << (UINT8) 0;
+ }
+
+ return rStream.GetErrorCode();
+}
+
+
+SfxPSProperty_Impl* SfxPS_Impl::GetProperty( UINT32 nId )
+{
+ USHORT nPos = GetPos( nId );
+ return nPos == USHRT_MAX ? 0 : aSection.aProperties.GetObject( nPos );
+}
+
+//========================================================================
+
+
+SvStream& PaddWithBlanks_Impl(SvStream &rStream, USHORT nCount)
+{
+ for ( USHORT n = nCount; n; --n )
+ rStream << ' ';
+ return rStream;
+}
+
+//-------------------------------------------------------------------------
+
+inline SvStream& Skip(SvStream &rStream, USHORT nCount)
+{
+ rStream.SeekRel(nCount);
+ return rStream;
+}
+
+//-------------------------------------------------------------------------
+
+struct FileHeader
+{
+ String aHeader;
+ USHORT nVersion;
+ BOOL bPasswd;
+
+ FileHeader( const char* pHeader, USHORT nV, BOOL bPass ) :
+ nVersion( nV ), bPasswd( bPass ) { aHeader = String::CreateFromAscii( pHeader ); }
+ FileHeader( SvStream& rStream );
+
+ void Save( SvStream& rStream ) const;
+};
+
+//-------------------------------------------------------------------------
+
+
+FileHeader::FileHeader( SvStream& rStream )
+{
+ BYTE b;
+ long nVer = rStream.GetVersion();
+ rStream.SetVersion( SOFFICE_FILEFORMAT_40 );
+ rStream.ReadByteString( aHeader ); //(dv??)
+ rStream >> nVersion >> b;
+ rStream.SetVersion( nVer );
+ bPasswd = (BOOL)b;
+}
+
+//-------------------------------------------------------------------------
+
+void FileHeader::Save( SvStream& rStream ) const
+{
+ long nVer = rStream.GetVersion();
+ rStream.SetVersion( SOFFICE_FILEFORMAT_40 );
+ rStream.WriteByteString( aHeader );
+ rStream.SetVersion( nVer );
+ rStream << nVersion;
+ rStream << (BYTE)bPasswd;
+}
+
+//*************************************************************************
+#if SUPD < 563
+
+//-------------------------------------------------------------------------
+
+void SfxStamp::AdjustName_Impl()
+{
+ if ( aModifiedByName.Len() > TIMESTAMP_MAXLENGTH )
+ aModifiedByName.Erase( TIMESTAMP_MAXLENGTH );
+}
+
+//-------------------------------------------------------------------------
+
+BOOL SfxStamp::Load(SvStream &rStream)
+{
+ long d, t;
+ rStream >> aModifiedByName;
+ Skip(rStream, TIMESTAMP_MAXLENGTH - aModifiedByName.Len()) >> d >> t;
+ aModifiedDateTime = DateTime(Date(d), Time(t));
+ return rStream.GetError() == SVSTREAM_OK;
+}
+
+//-------------------------------------------------------------------------
+
+BOOL SfxStamp::Save(SvStream &rStream) const
+{
+ DBG_ASSERT(aModifiedByName.Len() <= TIMESTAMP_MAXLENGTH, "Max. Stringlaenge ueberschritten");
+ rStream << aModifiedByName;
+ PaddWithBlanks_Impl(rStream, TIMESTAMP_MAXLENGTH - aModifiedByName.Len())
+ << (long) aModifiedDateTime.GetDate()
+ << (long) aModifiedDateTime.GetTime();
+
+ return rStream.GetError() == SVSTREAM_OK;
+}
+
+//-------------------------------------------------------------------------
+SfxStamp::SfxStamp( const String& rName ) : aModifiedByName( rName )
+{
+ AdjustName_Impl();
+}
+//-------------------------------------------------------------------------
+SfxStamp::SfxStamp( const String& rName, const DateTime& rTime ) :
+ aModifiedByName( rName ), aModifiedDateTime( rTime )
+{
+ AdjustName_Impl();
+}
+//-------------------------------------------------------------------------
+const SfxStamp& SfxStamp::operator=( const SfxStamp& rCopy )
+{
+ aModifiedByName = rCopy.aModifiedByName;
+ aModifiedDateTime = rCopy.aModifiedDateTime;
+ AdjustName_Impl();
+ return *this;
+}
+//-------------------------------------------------------------------------
+void SfxStamp::SetName( const String&rName )
+{
+ aModifiedByName = rName;
+ AdjustName_Impl();
+}
+
+#endif // SUPD < 563
+//*************************************************************************
+
+//-------------------------------------------------------------------------
+void SfxDocUserKey::AdjustTitle_Impl()
+{
+ if ( aTitle.Len() > SFXDOCUSERKEY_LENMAX )
+ aTitle.Erase( SFXDOCUSERKEY_LENMAX );
+}
+
+//-------------------------------------------------------------------------
+
+BOOL SfxDocUserKey::Load(SvStream &rStream)
+{
+ rStream.ReadByteString( aTitle );
+ Skip(rStream, SFXDOCUSERKEY_LENMAX - aTitle.Len());
+ rStream.ReadByteString( aWord );
+ Skip(rStream, SFXDOCUSERKEY_LENMAX - aWord.Len());
+ return rStream.GetError() == SVSTREAM_OK;
+}
+
+
+//-------------------------------------------------------------------------
+
+BOOL SfxDocUserKey::Save(SvStream &rStream) const
+{
+ DBG_ASSERT(aTitle.Len() <= SFXDOCUSERKEY_LENMAX, "Max. Stringlaenge ueberschritten");
+ DBG_ASSERT(aWord.Len() <= SFXDOCUSERKEY_LENMAX, "Max. Stringlaenge ueberschritten");
+ rStream.WriteByteString( aTitle );
+ PaddWithBlanks_Impl(rStream, SFXDOCUSERKEY_LENMAX - aTitle.Len());
+ rStream.WriteByteString( aWord );
+ PaddWithBlanks_Impl(rStream, SFXDOCUSERKEY_LENMAX - aWord.Len());
+ return rStream.GetError() == SVSTREAM_OK;
+}
+
+//-------------------------------------------------------------------------
+SfxDocUserKey::SfxDocUserKey( const String& rTitle, const String& rWord ) :
+ aTitle( rTitle ), aWord( rWord )
+{
+ AdjustTitle_Impl();
+}
+//------------------------------------------------------------------------
+const SfxDocUserKey& SfxDocUserKey::operator=(const SfxDocUserKey &rCopy)
+{
+ aTitle = rCopy.aTitle;
+ aWord = rCopy.aWord;
+ AdjustTitle_Impl();
+ return *this;
+}
+//------------------------------------------------------------------------
+
+BOOL SfxDocumentInfo::Load( SvStream& rStream )
+{
+ long d, t;
+ USHORT nUS;
+ BYTE nByte;
+ FileHeader aHeader(rStream);
+ if( ! aHeader.aHeader.EqualsAscii( pDocInfoHeader ))
+ {
+ rStream.SetError(SVSTREAM_FILEFORMAT_ERROR);
+ return FALSE;
+ }
+ Free();
+ bPasswd = aHeader.bPasswd;
+ rStream >> nUS;
+ eFileCharSet = (CharSet)nUS;
+ // Einstellen an den Streams
+ rStream.SetStreamCharSet(eFileCharSet);
+
+ rStream >> nByte;
+ bPortableGraphics = nByte? 1: 0;
+ rStream >> nByte;
+ bQueryTemplate = nByte? 1: 0;
+
+ aCreated.Load(rStream);
+ aChanged.Load(rStream);
+ aPrinted.Load(rStream);
+
+ rStream.ReadByteString( aTitle );
+ Skip(rStream, SFXDOCINFO_TITLELENMAX - aTitle.Len());
+ rStream.ReadByteString( aTheme );
+ Skip(rStream, SFXDOCINFO_THEMELENMAX - aTheme.Len());
+ rStream.ReadByteString( aComment );
+ Skip(rStream, SFXDOCINFO_COMMENTLENMAX- aComment.Len());
+ rStream.ReadByteString( aKeywords );
+ Skip(rStream, SFXDOCINFO_KEYWORDLENMAX - aKeywords.Len());
+
+ USHORT i;
+ for(i = 0; i < MAXDOCUSERKEYS; ++i)
+ aUserKeys[i].Load(rStream);
+
+ rStream.ReadByteString( aTemplateName );
+ rStream.ReadByteString( aTemplateFileName );
+ rStream >> d >> t;
+ aTemplateDate = DateTime(Date(d), Time(t));
+
+ // wurde mal fuer MB in Panik eingebaut und dann doch nie benutzt :-)
+ if ( rStream.GetVersion() <= SOFFICE_FILEFORMAT_40 )
+ {
+ USHORT nMailAddr;
+ rStream >> nMailAddr;
+ for( i = 0; i < nMailAddr; i++ )
+ {
+ String aDummyString;
+ USHORT nDummyFlags;
+ rStream.ReadByteString( aDummyString );
+ rStream >> nDummyFlags;
+ }
+ }
+
+ rStream >> lTime;
+ if(aHeader.nVersion > 4)
+ rStream >> nDocNo;
+ else
+ nDocNo = 1;
+ rStream >> nUserDataSize;
+ if(nUserDataSize) {
+ pUserData = new char[nUserDataSize];
+ rStream.Read(pUserData,nUserDataSize);
+ }
+
+ BOOL bOK = (rStream.GetError() == SVSTREAM_OK);
+ nByte = 0; // wg.Kompatibilitaet;
+ rStream >> nByte; // evtl. nicht in DocInfo enthalten
+ bTemplateConfig = nByte ? 1 : 0;
+ if( aHeader.nVersion > 5 )
+ {
+ rStream >> bReloadEnabled;
+ rStream.ReadByteString( aReloadURL );
+ rStream >> nReloadSecs;
+ rStream.ReadByteString( aDefaultTarget );
+ }
+ if ( aHeader.nVersion > 6 )
+ {
+ rStream >> nByte;
+ bSaveGraphicsCompressed = nByte? 1: 0;
+ }
+ if ( aHeader.nVersion > 7 )
+ {
+ rStream >> nByte;
+ bSaveOriginalGraphics = nByte? 1: 0;
+ }
+ if ( aHeader.nVersion > 8 )
+ {
+ rStream >> nByte;
+ bSaveVersionOnClose = nByte? 1: 0;
+
+ rStream.ReadByteString( pImp->aCopiesTo );
+ rStream.ReadByteString( pImp->aOriginal );
+ rStream.ReadByteString( pImp->aReferences );
+ rStream.ReadByteString( pImp->aRecipient );
+ rStream.ReadByteString( pImp->aReplyTo );
+ rStream.ReadByteString( pImp->aBlindCopies );
+ rStream.ReadByteString( pImp->aInReplyTo );
+ rStream.ReadByteString( pImp->aNewsgroups );
+ rStream >> pImp->nPriority;
+ }
+ if ( aHeader.nVersion > 9 )
+ {
+ rStream.WriteByteString( pImp->aSpecialMimeType, rStream.GetStreamCharSet() ); //(dv??)
+ }
+ if ( aHeader.nVersion > 10 )
+ {
+ rStream >> nByte;
+ pImp->bUseUserData = nByte ? TRUE : FALSE;
+ }
+ return bOK;
+}
+
+#pragma optimize ( "", off )
+
+ULONG SfxDocumentInfo::LoadPropertySet( SvStorage* pStorage )
+{
+ SvStorageStreamRef aStrPropSet = pStorage->OpenStream(
+ String::CreateFromAscii( pPropSlot ), STREAM_STD_READ );
+ if ( !aStrPropSet.Is() )
+ return ERRCODE_IO_ACCESSDENIED;
+ aStrPropSet->SetBufferSize( STREAM_BUFFER_SIZE );
+ SfxPS_Impl* pPS = new SfxPS_Impl;
+ ULONG nErr = pPS->Load( *aStrPropSet );
+
+ UINT32 aStrArr[] = { PID_TITLE, PID_SUBJECT, PID_KEYWORDS, PID_TEMPLATE, PID_COMMENTS, 0 };
+ UINT32 aLens[] = { SFXDOCINFO_TITLELENMAX, SFXDOCINFO_THEMELENMAX,
+ SFXDOCINFO_KEYWORDLENMAX, USHRT_MAX, SFXDOCINFO_COMMENTLENMAX };
+
+#if ( __GNUC__ == 2 ) && ( __GNUC_MINOR__ == 95 )
+ void ( SfxDocumentInfo::*pStrFuncs[] )( String& ) =
+#else
+ void ( SfxDocumentInfo::*pStrFuncs[] )( const String& ) =
+#endif
+ {
+ &SfxDocumentInfo::SetTitle,
+ &SfxDocumentInfo::SetTheme,
+ &SfxDocumentInfo::SetKeywords,
+ &SfxDocumentInfo::SetTemplateName,
+ &SfxDocumentInfo::SetComment
+ };
+
+ for( USHORT n = 0; aStrArr[ n ]; n++ )
+ {
+ SfxPSStringProperty_Impl* pStr = ( SfxPSStringProperty_Impl* )pPS->GetProperty( aStrArr[ n ] );
+ if( pStr )
+ {
+ USHORT nLen = (USHORT)aLens[ n ];
+ ( this->*pStrFuncs[ n ] )( pStr->GetString().Copy( 0, nLen ) );
+ }
+ }
+
+ String aName;
+ DateTime aTime;
+ SfxPSStringProperty_Impl* pStr;
+ SfxPSDateTimeProperty_Impl* pDate;
+
+ pStr = (SfxPSStringProperty_Impl*) pPS->GetProperty( PID_AUTHOR );
+ if( pStr ) aName = pStr->GetString();
+ else aName.Erase();
+ pDate = (SfxPSDateTimeProperty_Impl*) pPS->GetProperty( PID_CREATE_DTM );
+ if( pDate ) aTime = pDate->GetDateTime();
+ else aTime = DateTime();
+ SetCreated( SfxStamp( aName.Copy(0, TIMESTAMP_MAXLENGTH ), aTime ) );
+
+ pStr = (SfxPSStringProperty_Impl*) pPS->GetProperty( PID_LASTAUTHOR );
+ if( pStr ) aName = pStr->GetString();
+ else aName.Erase();
+ pDate = (SfxPSDateTimeProperty_Impl*) pPS->GetProperty( PID_LASTSAVED_DTM );
+ if( pDate ) aTime = pDate->GetDateTime();
+ else aTime = DateTime();
+ SetChanged( SfxStamp( aName.Copy(0, TIMESTAMP_MAXLENGTH ), aTime ) );
+
+ pDate = (SfxPSDateTimeProperty_Impl*) pPS->GetProperty( PID_LASTPRINTED_DTM );
+ if( pDate ) aTime = pDate->GetDateTime();
+ else aTime = DateTime();
+ DateTime aTmpTime = aTime;
+ aTmpTime.ConvertToUTC();
+ if( aTmpTime != DateTime( Date( 1, 1, 1601 ), Time( 0, 0, 0 ) ) )
+ SetPrinted( SfxStamp( String(), aTime ) );
+ else
+//-----------------------------------------------------------------------
+#if SUPD > 562
+ SetPrinted( SfxStamp( TIMESTAMP_INVALID_DATETIME ));
+#else
+ SetPrinted( SfxStamp( SFX_STAMP_INVALID ));
+#endif // SUPD > 562
+//-----------------------------------------------------------------------
+
+ pStr = (SfxPSStringProperty_Impl*) pPS->GetProperty( PID_REVNUMBER );
+ if( pStr )
+ SetDocumentNumber( pStr->GetString().ToInt32() );
+
+ pDate = (SfxPSDateTimeProperty_Impl*) pPS->GetProperty( PID_EDITTIME );
+ if( pDate )
+ {
+ DateTime aDateTime = pDate->GetDateTime();
+ aDateTime.ConvertToUTC();
+ SetTime( aDateTime.GetTime() );
+ }
+
+ delete pPS;
+ return ERRCODE_NONE;
+}
+
+#pragma optimize ( "", on )
+
+//-------------------------------------------------------------------------
+BOOL SfxDocumentInfo::SavePropertySet( SvStorage *pStorage) const
+{
+ SfxPS_Impl* pPS = new SfxPS_Impl;
+ SvStorageStreamRef aStrPropSet = pStorage->OpenStream(
+ String::CreateFromAscii( pPropSlot ), STREAM_TRUNC | STREAM_STD_WRITE );
+ if ( !aStrPropSet.Is() )
+ {
+ DBG_ERROR( "Konnte PropSet nicht oeffnen" );
+ return FALSE;
+ }
+ pPS->SetSectionName( SvGlobalName(
+ 0xf29f85e0, 0x4ff9, 0x1068, 0xab, 0x91, 0x08, 0x00, 0x2b, 0x27, 0xb3, 0xd9 ) );
+ pPS->AddProperty( new SfxPSStringProperty_Impl( PID_TITLE, GetTitle() ) );
+ pPS->AddProperty( new SfxPSStringProperty_Impl( PID_SUBJECT, GetTheme() ) );
+ pPS->AddProperty( new SfxPSStringProperty_Impl( PID_KEYWORDS, GetKeywords() ) );
+ pPS->AddProperty( new SfxPSStringProperty_Impl( PID_TEMPLATE, GetTemplateName() ) );
+ pPS->AddProperty( new SfxPSStringProperty_Impl( PID_COMMENTS, GetComment() ) );
+ pPS->AddProperty( new SfxPSStringProperty_Impl( PID_AUTHOR, GetCreated().GetName() ) );
+ pPS->AddProperty( new SfxPSStringProperty_Impl( PID_LASTAUTHOR, GetChanged().GetName() ) );
+ pPS->AddProperty( new SfxPSDateTimeProperty_Impl( PID_CREATE_DTM, GetCreated().GetTime() ) );
+ pPS->AddProperty( new SfxPSDateTimeProperty_Impl( PID_LASTSAVED_DTM, GetChanged().GetTime() ) );
+ if ( GetPrinted().GetTime() != GetCreated().GetTime() )
+ pPS->AddProperty( new SfxPSDateTimeProperty_Impl( PID_LASTPRINTED_DTM, GetPrinted().GetTime() ) );
+ DateTime aEditTime( Date( 1, 1, 1601 ), Time( GetTime() ) );
+ aEditTime.ConvertToLocalTime();
+ pPS->AddProperty( new SfxPSDateTimeProperty_Impl( PID_EDITTIME, aEditTime ) );
+ pPS->AddProperty( new SfxPSStringProperty_Impl(
+ PID_REVNUMBER, String::CreateFromInt32( GetDocumentNumber() ) ) );
+ pPS->Save( *aStrPropSet );
+ delete pPS;
+ return ( aStrPropSet->GetErrorCode() == 0 );
+}
+
+//-------------------------------------------------------------------------
+
+BOOL SfxDocumentInfo::Save( SvStream& rStream ) const
+{
+ FileHeader aHeader(pDocInfoHeader, VERSION, bPasswd? 1: 0);
+ aHeader.Save(rStream);
+ rStream << (USHORT)eFileCharSet;
+ rStream.SetStreamCharSet(eFileCharSet);
+ rStream << (bPortableGraphics? (BYTE)1: (BYTE)0)
+ << (bQueryTemplate? (BYTE)1: (BYTE)0);
+ aCreated.Save(rStream);
+ aChanged.Save(rStream);
+ aPrinted.Save(rStream);
+ DBG_ASSERT(aTitle.Len() <= SFXDOCINFO_TITLELENMAX , "Max. Stringlaenge ueberschritten");
+ DBG_ASSERT(aTheme.Len() <= SFXDOCINFO_THEMELENMAX , "Max. Stringlaenge ueberschritten");
+ DBG_ASSERT(aComment.Len() <= SFXDOCINFO_COMMENTLENMAX , "Max. Stringlaenge ueberschritten");
+ DBG_ASSERT(aKeywords.Len() <= SFXDOCINFO_KEYWORDLENMAX , "Max. Stringlaenge ueberschritten");
+ rStream.WriteByteString( aTitle );
+ PaddWithBlanks_Impl(rStream, SFXDOCINFO_TITLELENMAX - aTitle.Len());
+ rStream.WriteByteString( aTheme );
+ PaddWithBlanks_Impl(rStream, SFXDOCINFO_THEMELENMAX - aTheme.Len());
+ rStream.WriteByteString( aComment );
+ PaddWithBlanks_Impl(rStream, SFXDOCINFO_COMMENTLENMAX - aComment.Len());
+ rStream.WriteByteString( aKeywords );
+ PaddWithBlanks_Impl(rStream, SFXDOCINFO_KEYWORDLENMAX - aKeywords.Len());
+
+ for(USHORT i = 0; i < MAXDOCUSERKEYS; ++i)
+ aUserKeys[i].Save(rStream);
+ rStream.WriteByteString( aTemplateName );
+ rStream.WriteByteString( aTemplateFileName );
+ rStream << (long)aTemplateDate.GetDate()
+ << (long)aTemplateDate.GetTime();
+
+ // wurde mal fuer MB in Panik eingebaut und dann doch nie benutzt :-)
+ if ( rStream.GetVersion() <= SOFFICE_FILEFORMAT_40 )
+ rStream << (USHORT) 0;
+
+ rStream << lTime << nDocNo;
+ rStream << nUserDataSize;
+ if(pUserData)
+ rStream.Write(pUserData, nUserDataSize);
+ rStream << (bTemplateConfig? (BYTE)1: (BYTE)0);
+ if( aHeader.nVersion > 5 )
+ {
+ rStream << bReloadEnabled;
+ rStream.WriteByteString( aReloadURL );
+ rStream << nReloadSecs;
+ rStream.WriteByteString( aDefaultTarget );
+ }
+ if ( aHeader.nVersion > 6 )
+ rStream << (bSaveGraphicsCompressed? (BYTE)1: (BYTE)0);
+ if ( aHeader.nVersion > 7 )
+ rStream << (bSaveOriginalGraphics? (BYTE)1: (BYTE)0);
+ if ( aHeader.nVersion > 8 )
+ {
+ rStream << (bSaveVersionOnClose? (BYTE)1: (BYTE)0);
+ rStream.WriteByteString( pImp->aCopiesTo );
+ rStream.WriteByteString( pImp->aOriginal );
+ rStream.WriteByteString( pImp->aReferences );
+ rStream.WriteByteString( pImp->aRecipient );
+ rStream.WriteByteString( pImp->aReplyTo );
+ rStream.WriteByteString( pImp->aBlindCopies );
+ rStream.WriteByteString( pImp->aInReplyTo );
+ rStream.WriteByteString( pImp->aNewsgroups );
+ rStream << pImp->nPriority;
+ }
+ if ( aHeader.nVersion > 9 )
+ {
+ rStream.WriteByteString( pImp->aSpecialMimeType );
+ }
+ if ( aHeader.nVersion > 10 )
+ {
+ rStream << ( pImp->bUseUserData ? (BYTE)1: (BYTE)0 );
+ }
+
+ return rStream.GetError() == SVSTREAM_OK;
+}
+
+//-------------------------------------------------------------------------
+
+BOOL SfxDocumentInfo::Load(SvStorage* pStorage)
+{
+#ifdef DBG_UTIL
+ if(!pStorage->IsStream( String::CreateFromAscii( pDocInfoSlot )))
+ return FALSE;
+#endif
+ SvStorageStreamRef aStr = pStorage->OpenStream( String::CreateFromAscii( pDocInfoSlot ),STREAM_STD_READ);
+ if(!aStr.Is())
+ return FALSE;
+ aStr->SetVersion( pStorage->GetVersion() );
+ aStr->SetBufferSize(STREAM_BUFFER_SIZE);
+ return Load(*aStr);
+}
+
+//-------------------------------------------------------------------------
+
+BOOL SfxDocumentInfo::Save(SvStorage* pStorage) const
+{
+ SvStorageStreamRef aStr = pStorage->OpenStream( String::CreateFromAscii( pDocInfoSlot ), STREAM_TRUNC | STREAM_STD_READWRITE);
+ if(!aStr.Is())
+ return FALSE;
+ aStr->SetVersion( pStorage->GetVersion() );
+ aStr->SetBufferSize(STREAM_BUFFER_SIZE);
+ if(!Save(*aStr))
+ return FALSE;
+ return SavePropertySet( pStorage );
+}
+
+//-------------------------------------------------------------------------
+
+const SfxDocUserKey& SfxDocumentInfo::GetUserKey( USHORT n ) const
+{
+ DBG_ASSERT(n < GetUserKeyCount(), "UserKeyArray ueberindiziert");
+ return aUserKeys[n];
+}
+
+//-------------------------------------------------------------------------
+
+void SfxDocumentInfo::SetUserKey( const SfxDocUserKey& rKey, USHORT n )
+{
+ DBG_ASSERT(n < GetUserKeyCount(), "UserKeyArray ueberindiziert");
+ aUserKeys[n] = rKey;
+}
+
+
+//-------------------------------------------------------------------------
+
+SfxDocumentInfo::SfxDocumentInfo( const SfxDocumentInfo& rInf):
+ nUserDataSize(0),
+ pUserData(0)
+{
+ pImp = new SfxDocumentInfo_Impl;
+ bReadOnly = rInf.bReadOnly;
+ bReloadEnabled = FALSE;
+ nReloadSecs = 60;
+ *this = rInf;
+}
+
+BOOL SfxDocumentInfo::IsReloadEnabled() const
+{
+ return bReloadEnabled;
+}
+
+void SfxDocumentInfo::EnableReload( BOOL bEnable )
+{
+ bReloadEnabled = bEnable;
+}
+
+const String& SfxDocumentInfo::GetDefaultTarget() const
+{
+ return aDefaultTarget;
+}
+
+void SfxDocumentInfo::SetDefaultTarget( const String& rString )
+{
+ aDefaultTarget = rString;
+}
+
+const String& SfxDocumentInfo::GetReloadURL() const
+{
+ return aReloadURL;
+}
+
+void SfxDocumentInfo::SetReloadURL( const String& rString )
+{
+ aReloadURL = rString;
+}
+
+ULONG SfxDocumentInfo::GetReloadDelay() const
+{
+ return nReloadSecs;
+}
+
+void SfxDocumentInfo::SetReloadDelay( ULONG nSec )
+{
+ nReloadSecs = nSec;
+}
+
+//-------------------------------------------------------------------------
+void SfxDocumentInfo::Clear()
+{
+ BOOL _bReadOnly = bReadOnly;
+ BOOL _bPortableGraphics = bPortableGraphics;
+ BOOL _bSaveGraphicsCompressed = bSaveGraphicsCompressed;
+ BOOL _bSaveOriginalGraphics = bSaveOriginalGraphics;
+
+ (*this) = SfxDocumentInfo();
+
+ bReadOnly = _bReadOnly;
+ bPortableGraphics = _bPortableGraphics;
+ bSaveGraphicsCompressed = _bSaveGraphicsCompressed;
+ bSaveOriginalGraphics = _bSaveOriginalGraphics;
+}
+
+const SfxDocumentInfo& SfxDocumentInfo::operator=( const SfxDocumentInfo& rInf)
+{
+ if( this == &rInf ) return *this;
+
+ bReadOnly = rInf.bReadOnly;
+ bPasswd = rInf.bPasswd;
+ bPortableGraphics = rInf.bPortableGraphics;
+ bSaveGraphicsCompressed = rInf.bSaveGraphicsCompressed;
+ bSaveOriginalGraphics = rInf.bSaveOriginalGraphics;
+ bQueryTemplate = rInf.bQueryTemplate;
+ bTemplateConfig = rInf.bTemplateConfig;
+ eFileCharSet = rInf.eFileCharSet;
+
+ aCreated = rInf.aCreated;
+ aChanged = rInf.aChanged;
+ aPrinted = rInf.aPrinted;
+ aTitle = rInf.aTitle;
+ aTheme = rInf.aTheme;
+ aComment = rInf.aComment;
+ aKeywords = rInf.aKeywords;
+
+ for(USHORT i=0; i < MAXDOCUSERKEYS; ++i)
+ aUserKeys[i] = rInf.aUserKeys[i];
+
+ aTemplateName = rInf.aTemplateName;
+ aTemplateFileName = rInf.aTemplateFileName;
+ aTemplateDate = rInf.aTemplateDate;
+
+ aDefaultTarget = rInf.GetDefaultTarget();
+ aReloadURL = rInf.GetReloadURL();
+ bReloadEnabled = rInf.IsReloadEnabled();
+ nReloadSecs = rInf.GetReloadDelay();
+
+ Free();
+
+ nUserDataSize = rInf.nUserDataSize;
+ if(nUserDataSize) {
+ pUserData = new char[nUserDataSize];
+ memcpy(pUserData, rInf.pUserData, nUserDataSize);
+ }
+ lTime = rInf.lTime;
+ nDocNo = rInf.nDocNo;
+
+ bSaveVersionOnClose = rInf.bSaveVersionOnClose;
+ pImp->aCopiesTo = rInf.pImp->aCopiesTo;
+ pImp->aOriginal = rInf.pImp->aOriginal;
+ pImp->aReferences = rInf.pImp->aReferences;
+ pImp->aRecipient = rInf.pImp->aRecipient;
+ pImp->aReplyTo = rInf.pImp->aReplyTo;
+ pImp->aBlindCopies = rInf.pImp->aBlindCopies;
+ pImp->aInReplyTo = rInf.pImp->aInReplyTo;
+ pImp->aNewsgroups = rInf.pImp->aNewsgroups;
+ pImp->aSpecialMimeType = rInf.pImp->aSpecialMimeType;
+ pImp->nPriority = rInf.pImp->nPriority;
+ pImp->bUseUserData = rInf.pImp->bUseUserData;
+
+ return *this;
+}
+
+//-------------------------------------------------------------------------
+
+int SfxDocumentInfo::operator==( const SfxDocumentInfo& rCmp) const
+{
+ if(eFileCharSet != rCmp.eFileCharSet ||
+ bPasswd != rCmp.bPasswd ||
+ bPortableGraphics != rCmp.bPortableGraphics ||
+ bSaveGraphicsCompressed != rCmp.bSaveGraphicsCompressed ||
+ bSaveOriginalGraphics != rCmp.bSaveOriginalGraphics ||
+ bQueryTemplate != rCmp.bQueryTemplate ||
+ bTemplateConfig != rCmp.bTemplateConfig ||
+ aCreated != rCmp.aCreated ||
+ aChanged != rCmp.aChanged ||
+ aPrinted != rCmp.aPrinted ||
+ aTitle != rCmp.aTitle ||
+ aTheme != rCmp.aTheme ||
+ aComment != rCmp.aComment ||
+ aKeywords != rCmp.aKeywords ||
+ aTemplateName != rCmp.aTemplateName ||
+ aTemplateDate != rCmp.aTemplateDate ||
+ IsReloadEnabled() != rCmp.IsReloadEnabled() ||
+ GetReloadURL() != rCmp.GetReloadURL() ||
+ GetReloadDelay() != rCmp.GetReloadDelay() ||
+ GetDefaultTarget() != rCmp.GetDefaultTarget())
+ return FALSE;
+
+ for(USHORT i = 0; i < MAXDOCUSERKEYS; ++i) {
+ if(aUserKeys[i] != rCmp.aUserKeys[i])
+ return FALSE;
+ }
+ if(nUserDataSize != rCmp.nUserDataSize)
+ return FALSE;
+ if(nUserDataSize)
+ return 0 == memcmp(pUserData, rCmp.pUserData, nUserDataSize);
+
+ if ( pImp->aCopiesTo != rCmp.pImp->aCopiesTo ||
+ pImp->aOriginal != rCmp.pImp->aOriginal ||
+ pImp->aReferences != rCmp.pImp->aReferences ||
+ pImp->aRecipient != rCmp.pImp->aRecipient ||
+ pImp->aReplyTo != rCmp.pImp->aReplyTo ||
+ pImp->aBlindCopies != rCmp.pImp->aBlindCopies ||
+ pImp->aInReplyTo != rCmp.pImp->aInReplyTo ||
+ pImp->aNewsgroups != rCmp.pImp->aNewsgroups ||
+ pImp->aSpecialMimeType != rCmp.pImp->aSpecialMimeType ||
+ pImp->nPriority != rCmp.pImp->nPriority ||
+ pImp->bUseUserData != rCmp.pImp->bUseUserData ||
+ bSaveVersionOnClose != rCmp.bSaveVersionOnClose )
+ return FALSE;
+
+ return TRUE;
+}
+
+//-------------------------------------------------------------------------
+
+const SfxDocumentInfo &SfxDocumentInfo::CopyUserData(const SfxDocumentInfo &rSource)
+{
+ bQueryTemplate = rSource.bQueryTemplate;
+ bTemplateConfig = rSource.bTemplateConfig;
+
+ SetReloadDelay( rSource.GetReloadDelay() );
+ SetReloadURL( rSource.GetReloadURL() );
+ EnableReload( rSource.IsReloadEnabled() );
+ SetDefaultTarget( rSource.GetDefaultTarget() );
+
+ aTitle = rSource.aTitle;
+ aTheme = rSource.aTheme;
+ aComment = rSource.aComment;
+ aKeywords = rSource.aKeywords;
+
+ aTemplateName = rSource.aTemplateName;
+ aTemplateFileName = rSource.aTemplateFileName;
+ aTemplateDate = rSource.aTemplateDate;
+
+ for(USHORT i = 0; i < MAXDOCUSERKEYS; ++i)
+ aUserKeys[i] = rSource.aUserKeys[i];
+
+ if(pUserData)
+ DELETEZ(pUserData);
+ nUserDataSize = rSource.nUserDataSize;
+ if(nUserDataSize) {
+ pUserData = new char[nUserDataSize];
+ memcpy(pUserData, rSource.pUserData, nUserDataSize);
+ }
+
+ pImp->aCopiesTo = rSource.pImp->aCopiesTo;
+ pImp->aOriginal = rSource.pImp->aOriginal;
+ pImp->aReferences = rSource.pImp->aReferences;
+ pImp->aRecipient = rSource.pImp->aRecipient;
+ pImp->aReplyTo = rSource.pImp->aReplyTo;
+ pImp->aBlindCopies = rSource.pImp->aBlindCopies;
+ pImp->aInReplyTo = rSource.pImp->aInReplyTo;
+ pImp->aNewsgroups = rSource.pImp->aNewsgroups;
+ pImp->aSpecialMimeType = rSource.pImp->aSpecialMimeType;
+ pImp->nPriority = rSource.pImp->nPriority;
+ pImp->bUseUserData = rSource.pImp->bUseUserData;
+
+ return *this;
+}
+
+//-------------------------------------------------------------------------
+
+void SfxDocumentInfo::Free()
+{
+ DELETEZ(pUserData);
+ nUserDataSize = 0;
+}
+
+//-------------------------------------------------------------------------
+
+String SfxDocumentInfo::AdjustTextLen_Impl( const String& rText, USHORT nMax )
+{
+ String aRet = rText;
+ if ( aRet.Len() > nMax )
+ aRet.Erase( nMax );
+ return aRet;
+}
+
+//-------------------------------------------------------------------------
+
+SfxDocumentInfo::SfxDocumentInfo() :
+ bPasswd(FALSE),
+ bQueryTemplate(FALSE),
+ bTemplateConfig(FALSE),
+ eFileCharSet(gsl_getSystemTextEncoding()),
+ nUserDataSize(0),
+ pUserData(0),
+ lTime(0),
+ nDocNo(1),
+ aChanged( TIMESTAMP_INVALID_DATETIME ),
+ aPrinted( TIMESTAMP_INVALID_DATETIME ),
+ bSaveVersionOnClose( FALSE )
+{
+ pImp = new SfxDocumentInfo_Impl;
+
+ bReadOnly = FALSE;
+ bReloadEnabled = FALSE;
+ nReloadSecs = 60;
+ SfxApplication *pSfxApp = SFX_APP();
+ bPortableGraphics = pSfxApp->GetOptions().IsIndepGrfFmt();
+ bSaveGraphicsCompressed = pSfxApp->GetOptions().IsSaveGraphicsCompressed();
+ bSaveOriginalGraphics = pSfxApp->GetOptions().IsSaveOriginalGraphics();
+
+ const String aInf( DEFINE_CONST_UNICODE( "Info " ) );
+ for( USHORT i = 0; i < MAXDOCUSERKEYS; ++i ) {
+ aUserKeys[i].aTitle = aInf;
+ aUserKeys[i].aTitle += String::CreateFromInt32(i);
+ }
+}
+
+//-------------------------------------------------------------------------
+
+SfxDocumentInfo::~SfxDocumentInfo()
+{
+ Free();
+ delete pImp;
+}
+
+String SfxDocumentInfo::GetCopiesTo() const
+{
+ return pImp->aCopiesTo;
+}
+
+void SfxDocumentInfo::SetCopiesTo( const String& rStr )
+{
+ pImp->aCopiesTo = rStr;
+}
+
+String SfxDocumentInfo::GetOriginal() const
+{
+ return pImp->aOriginal;
+}
+
+void SfxDocumentInfo::SetOriginal( const String& rStr )
+{
+ pImp->aOriginal = rStr;
+}
+
+String SfxDocumentInfo::GetReferences() const
+{
+ return pImp->aReferences;
+}
+
+void SfxDocumentInfo::SetReferences( const String& rStr )
+{
+ pImp->aReferences = rStr;
+}
+
+String SfxDocumentInfo::GetRecipient() const
+{
+ return pImp->aRecipient;
+}
+
+void SfxDocumentInfo::SetRecipient( const String& rStr )
+{
+ pImp->aRecipient = rStr;
+}
+
+String SfxDocumentInfo::GetReplyTo() const
+{
+ return pImp->aReplyTo;
+}
+
+void SfxDocumentInfo::SetReplyTo( const String& rStr )
+{
+ pImp->aReplyTo = rStr;
+}
+
+String SfxDocumentInfo::GetBlindCopies() const
+{
+ return pImp->aBlindCopies;
+}
+
+void SfxDocumentInfo::SetBlindCopies( const String& rStr )
+{
+ pImp->aBlindCopies = rStr;
+}
+
+String SfxDocumentInfo::GetInReplyTo() const
+{
+ return pImp->aInReplyTo;
+}
+
+void SfxDocumentInfo::SetInReplyTo( const String& rStr )
+{
+ pImp->aInReplyTo = rStr;
+}
+
+String SfxDocumentInfo::GetNewsgroups() const
+{
+ return pImp->aNewsgroups;
+}
+
+void SfxDocumentInfo::SetNewsgroups( const String& rStr )
+{
+ pImp->aNewsgroups = rStr;
+}
+
+String SfxDocumentInfo::GetSpecialMimeType() const
+{
+ return pImp->aSpecialMimeType;
+}
+
+void SfxDocumentInfo::SetSpecialMimeType( const String& rStr )
+{
+ pImp->aSpecialMimeType = rStr;
+}
+
+USHORT SfxDocumentInfo::GetPriority() const
+{
+ return pImp->nPriority;
+}
+
+void SfxDocumentInfo::SetPriority( USHORT nPrio )
+{
+ pImp->nPriority = nPrio;
+}
+
+BOOL SfxDocumentInfo::IsUseUserData() const
+{
+ return pImp->bUseUserData;
+}
+
+void SfxDocumentInfo::SetUseUserData( BOOL bNew )
+{
+ pImp->bUseUserData = bNew;
+}
+
+//-----------------------------------------------------------------------------
+
+ErrCode SfxDocumentInfo::Load(const String& rName)
+{
+ SfxMedium aMedium( rName, SFX_STREAM_READONLY_MAKECOPY, TRUE );
+ if ( !aMedium.IsStorage() || SVSTREAM_OK != aMedium.GetError() )
+ // Datei existiert nicht oder ist kein Storage
+ return ERRCODE_IO_CANTREAD;
+
+ // Filter-Detection wegen FileFormat-Version
+ const SfxFilter *pFilter = 0;
+ if ( 0 != SFX_APP()->GetFilterMatcher().GuessFilter( aMedium, &pFilter ) || !pFilter )
+ // unbekanntes Dateiformat
+ return ERRCODE_IO_CANTREAD;
+
+ // Storage "offnen
+ SvStorageRef xStor = aMedium.GetStorage();
+ xStor->SetVersion( pFilter->GetVersion() );
+ return Load( xStor ) ? ERRCODE_NONE : ERRCODE_IO_CANTREAD;
+}
+
+//------------------------------------------------------------------------
+
+void SfxDocumentInfo::SetTitle( const String& rVal )
+{
+ aTitle = AdjustTextLen_Impl( rVal, SFXDOCINFO_TITLELENMAX );
+}
+//------------------------------------------------------------------------
+
+void SfxDocumentInfo::SetTheme( const String& rVal )
+{
+ aTheme = AdjustTextLen_Impl( rVal, SFXDOCINFO_THEMELENMAX );
+}
+//------------------------------------------------------------------------
+
+void SfxDocumentInfo::SetComment( const String& rVal )
+{
+ aComment = AdjustTextLen_Impl( rVal, SFXDOCINFO_COMMENTLENMAX );
+}
+//------------------------------------------------------------------------
+
+void SfxDocumentInfo::SetKeywords( const String& rVal )
+{
+ aKeywords = AdjustTextLen_Impl( rVal, SFXDOCINFO_KEYWORDLENMAX );
+}
+
+
diff --git a/sfx2/source/doc/doctdlg.cxx b/sfx2/source/doc/doctdlg.cxx
new file mode 100644
index 000000000000..5aae4f905a8d
--- /dev/null
+++ b/sfx2/source/doc/doctdlg.cxx
@@ -0,0 +1,262 @@
+/*************************************************************************
+ *
+ * $RCSfile: doctdlg.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:32 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _MSGBOX_HXX //autogen
+#include <vcl/msgbox.hxx>
+#endif
+#ifndef _SFXSTRITEM_HXX //autogen
+#include <svtools/stritem.hxx>
+#endif
+#pragma hdrstop
+
+#include "doctdlg.hxx"
+#include "docvor.hxx"
+#include "sfxresid.hxx"
+#include "sfxtypes.hxx"
+#include "dispatch.hxx"
+
+#include "sfx.hrc"
+#include "doc.hrc"
+#include "doctdlg.hrc"
+#include "basedlgs.hxx"
+
+//=========================================================================
+
+SfxDocumentTemplateDlg::SfxDocumentTemplateDlg(
+ Window * pParent, SfxDocumentTemplates* pTempl )
+: ModalDialog( pParent, SfxResId(DLG_DOC_TEMPLATE) ),
+ aRegionFt( this, ResId( FT_SECTION ) ),
+ aRegionLb( this, ResId( LB_SECTION ) ),
+ aTemplateFt( this, ResId( FT_STYLESHEETS ) ),
+ aTemplateLb( this, ResId( LB_STYLESHEETS ) ),
+ aNameEd( this, ResId( ED_NAME ) ),
+ aTemplateGb( this, ResId( GB_STYLESHEETS ) ),
+ aEditGb( this, ResId( GB_EDIT ) ),
+ aOkBt( this, ResId( BT_OK ) ),
+ aEditBt( this, ResId( BT_EDIT ) ),
+ aCancelBt( this, ResId( BT_CANCEL ) ),
+ aOrganizeBt( this, ResId( BT_ORGANIZE ) ),
+ aHelpBt( this, ResId( BT_HELP ) ),
+ pTemplates( pTempl )
+{
+ FreeResource();
+ pHelper = new SfxModalDefParentHelper( this );
+ aOrganizeBt.SetClickHdl(LINK(this, SfxDocumentTemplateDlg, OrganizeHdl));
+ aNameEd.SetModifyHdl(LINK(this, SfxDocumentTemplateDlg, NameModify));
+ aOkBt.SetClickHdl(LINK(this, SfxDocumentTemplateDlg, OkHdl));
+ aEditBt.SetClickHdl(LINK(this, SfxDocumentTemplateDlg, EditHdl));
+ Init();
+}
+
+//-------------------------------------------------------------------------
+
+SfxDocumentTemplateDlg::~SfxDocumentTemplateDlg()
+{
+ delete pHelper;
+}
+
+//-------------------------------------------------------------------------
+
+IMPL_LINK( SfxDocumentTemplateDlg, EditHdl, Button *, pBut )
+{
+
+ if ( !aRegionLb.GetSelectEntryCount() ||
+ !aTemplateLb.GetSelectEntryCount())
+ return 0;
+
+ const SfxStringItem aRegion( SID_TEMPLATE_REGIONNAME, aRegionLb.GetSelectEntry() );
+ const SfxStringItem aName( SID_TEMPLATE_NAME, aTemplateLb.GetSelectEntry() );
+ SFX_APP()->GetAppDispatcher_Impl()->Execute( SID_OPENTEMPLATE, SFX_CALLMODE_ASYNCHRON|SFX_CALLMODE_RECORD, &aRegion, &aName, 0L );
+ EndDialog(RET_EDIT_STYLE);
+
+ return 0;
+}
+
+//-------------------------------------------------------------------------
+
+void SfxDocumentTemplateDlg::Init()
+{
+ if(!pTemplates->IsConstructed())
+ pTemplates->Construct();
+
+ const USHORT nCount = pTemplates->GetRegionCount();
+ for(USHORT i = 0; i < nCount; ++i)
+ aRegionLb.InsertEntry(pTemplates->GetFullRegionName(i));
+ if(!nCount)
+ aRegionLb.InsertEntry(String(SfxResId(STR_STANDARD)));
+ aRegionLb.SelectEntryPos(0);
+ if(nCount)
+ {
+ aRegionLb.SetSelectHdl(LINK(this, SfxDocumentTemplateDlg, RegionSelect));
+ RegionSelect(&aRegionLb);
+ aTemplateLb.SetSelectHdl(LINK(this, SfxDocumentTemplateDlg, TemplateSelect));
+ aTemplateLb.SetDoubleClickHdl(LINK(this, SfxDocumentTemplateDlg, EditHdl));
+ }
+ else {
+ Link aLink;
+ aTemplateLb.SetSelectHdl(aLink);
+ aTemplateLb.SetDoubleClickHdl(aLink);
+ }
+}
+
+//-------------------------------------------------------------------------
+
+IMPL_LINK( SfxDocumentTemplateDlg, OrganizeHdl, Button *, pButton )
+{
+ SfxTemplateOrganizeDlg *pDlg =
+ new SfxTemplateOrganizeDlg(this, pTemplates);
+ const short nRet = pDlg->Execute();
+ delete pDlg;
+ if(RET_OK == nRet)
+ {
+ // View aktualisieren
+ aRegionLb.SetUpdateMode( FALSE );
+ aRegionLb.Clear();
+ Init();
+ aRegionLb.SetUpdateMode( TRUE );
+ aRegionLb.Invalidate();
+ aRegionLb.Update();
+ aCancelBt.SetText(String(SfxResId(STR_CLOSE)));
+ }
+ else if(RET_EDIT_STYLE == nRet)
+ EndDialog(RET_CANCEL);
+ return 0;
+}
+
+//-------------------------------------------------------------------------
+
+IMPL_LINK( SfxDocumentTemplateDlg, OkHdl, Control *, pControl )
+{
+ // pruefen, ob eine Vorlage diesen Namens existiert
+ if(LISTBOX_ENTRY_NOTFOUND != aTemplateLb.GetEntryPos(
+ GetTemplateName())) {
+ QueryBox aQuery(this, SfxResId(MSG_CONFIRM_OVERWRITE_TEMPLATE));
+ if(RET_NO == aQuery.Execute())
+ return 0;
+ }
+ EndDialog(RET_OK);
+ return 0;
+}
+
+//-------------------------------------------------------------------------
+
+IMPL_LINK( SfxDocumentTemplateDlg, RegionSelect, ListBox *, pBox )
+{
+ const USHORT nRegion = pBox->GetSelectEntryPos();
+ const USHORT nCount = pTemplates->GetCount(nRegion);
+ aTemplateLb.SetUpdateMode(FALSE);
+ aTemplateLb.Clear();
+ for(USHORT i = 0; i < nCount; ++i)
+ aTemplateLb.InsertEntry(pTemplates->GetName(nRegion, i));
+ aTemplateLb.SelectEntryPos(0);
+ aTemplateLb.SetUpdateMode(TRUE);
+ aTemplateLb.Invalidate();
+ aTemplateLb.Update();
+ return 0;
+}
+
+//-------------------------------------------------------------------------
+
+IMPL_LINK_INLINE_START( SfxDocumentTemplateDlg, TemplateSelect, ListBox *, pBox )
+{
+ aNameEd.SetText(pBox->GetSelectEntry());
+ NameModify(&aNameEd);
+ return 0;
+}
+IMPL_LINK_INLINE_END( SfxDocumentTemplateDlg, TemplateSelect, ListBox *, pBox )
+
+//-------------------------------------------------------------------------
+
+IMPL_LINK( SfxDocumentTemplateDlg, NameModify, Edit *, pBox )
+{
+ const String &rText=pBox->GetText();
+ if(!rText.Len())
+ aEditBt.Enable();
+ else
+ {
+ aTemplateLb.SelectEntry(rText);
+ aEditBt.Enable( aTemplateLb.GetSelectEntry() == rText );
+ }
+
+ aOkBt.Enable( rText.Len() > 0 );
+ return 0;
+}
+
+//-------------------------------------------------------------------------
+
+String SfxDocumentTemplateDlg::GetTemplatePath()
+{
+ const String& rPath=GetTemplateName();
+ if(pTemplates->GetRegionCount())
+ return pTemplates->GetTemplatePath(
+ aRegionLb.GetSelectEntryPos(), rPath);
+ return pTemplates->GetDefaultTemplatePath(rPath);
+}
+
+//-------------------------------------------------------------------------
+
+void SfxDocumentTemplateDlg::NewTemplate(const String &rPath)
+{
+ pTemplates->NewTemplate(
+ aRegionLb.GetSelectEntryPos(), GetTemplateName(), rPath);
+}
+
+
diff --git a/sfx2/source/doc/doctdlg.hrc b/sfx2/source/doc/doctdlg.hrc
new file mode 100644
index 000000000000..d987e10ae7a8
--- /dev/null
+++ b/sfx2/source/doc/doctdlg.hrc
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * $RCSfile: doctdlg.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:32 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define FT_SECTION 1
+#define LB_SECTION 2
+#define FT_STYLESHEETS 3
+#define LB_STYLESHEETS 4
+#define BT_ORGANIZE 20
+#define BT_HELP 21
+#define GB_EDIT 5
+#define FT_NAME 6
+#define ED_NAME 7
+#define BT_OK 10
+#define BT_SECTION 11
+#define BT_EDIT 12
+#define BT_NEW 13
+#define BT_DELETE 15
+#define BT_CANCEL 16
+#define GB_STYLESHEETS 17
diff --git a/sfx2/source/doc/doctdlg.src b/sfx2/source/doc/doctdlg.src
new file mode 100644
index 000000000000..d5468f6553ab
--- /dev/null
+++ b/sfx2/source/doc/doctdlg.src
@@ -0,0 +1,298 @@
+/*************************************************************************
+ *
+ * $RCSfile: doctdlg.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:32 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+ // include --------------------------------------------------------------
+#include "sfx.hrc"
+#include "doc.hrc"
+#include "doctdlg.hrc"
+ // pragma ---------------------------------------------------------------
+
+ // DLG_DOC_TEMPLATE -----------------------------------------------------
+ModalDialog DLG_DOC_TEMPLATE
+{
+ HelpId = SID_DOCTEMPLATE ;
+ OutputSize = TRUE ;
+ SVLook = TRUE ;
+ Size = MAP_APPFONT ( 280 , 140 ) ;
+ Text = "Dokumentvorlagen" ;
+ Text [ ENGLISH ] = "document templates" ;
+ Text [ norwegian ] = "Rediger dokumetmal" ;
+ Text [ italian ] = "Modelli" ;
+ Text [ portuguese_brazilian ] = "Editar o modelo do documento" ;
+ Text [ portuguese ] = "Modelos de documentos" ;
+ Text [ finnish ] = "Muokkaa asiakirjamallia" ;
+ Text [ danish ] = "Rediger dokumentskabelon" ;
+ Text [ french ] = "Modles de document" ;
+ Text [ swedish ] = "Dokumentmallar" ;
+ Text [ dutch ] = "Sjablonen" ;
+ Text [ spanish ] = "Plantilla de documento" ;
+ Text [ english_us ] = "Templates" ;
+ Moveable = TRUE ;
+ Edit ED_NAME
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 12 , 14 ) ;
+ Size = MAP_APPFONT ( 200 , 12 ) ;
+ };
+ GroupBox GB_EDIT
+ {
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 212 , 29 ) ;
+ Text = "Neue Dokumentvorlage" ;
+ Text [ English ] = "New Template" ;
+ Text [ dutch ] = "Nieuw sjabloon" ;
+ Text [ english_us ] = "New template" ;
+ Text [ italian ] = "Nuovo modello" ;
+ Text [ spanish ] = "Nueva plantilla" ;
+ Text [ french ] = "Nouveau modle de document" ;
+ Text [ swedish ] = "Ny dokumentmall" ;
+ Text [ danish ] = "Ny dokumentskabelon" ;
+ Text [ portuguese_brazilian ] = "Neue Dokumentvorlage" ;
+ Text [ portuguese ] = "Novo modelo" ;
+ Text[ chinese_simplified ] = "½ĵʽ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Nowy szablon dokumentu";
+ Text[ japanese ] = "Vڰ";
+ Text[ chinese_traditional ] = "}ҷs˦";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ";
+ Text[ turkish ] = "Yeni belge ablonu";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_SECTION
+ {
+ Pos = MAP_APPFONT ( 12 , 49 ) ;
+ Size = MAP_APPFONT ( 97 , 10 ) ;
+ Text = "~Bereiche" ;
+ Text [ ENGLISH ] = "~Groups" ;
+ Text [ norwegian ] = "~Grupper" ;
+ Text [ italian ] = "~Categorie" ;
+ Text [ portuguese_brazilian ] = "~Grupos" ;
+ Text [ portuguese ] = "~Categorias" ;
+ Text [ finnish ] = "~Ryhmt" ;
+ Text [ danish ] = "Omrder" ;
+ Text [ french ] = "~Catgories" ;
+ Text [ swedish ] = "~Kategorier" ;
+ Text [ dutch ] = "~Bereiken" ;
+ Text [ spanish ] = "~reas" ;
+ Text [ english_us ] = "~Categories" ;
+ Text[ chinese_simplified ] = "(~C)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Obszary";
+ Text[ japanese ] = "͈(~C)";
+ Text[ chinese_traditional ] = "(~C)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "(~C)";
+ Text[ turkish ] = "~Kategori";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_SECTION
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 12 , 62 ) ;
+ Size = MAP_APPFONT ( 97 , 66 ) ;
+ };
+ FixedText FT_STYLESHEETS
+ {
+ Pos = MAP_APPFONT ( 115 , 49 ) ;
+ Size = MAP_APPFONT ( 97 , 10 ) ;
+ Text = "~Vorlagen" ;
+ Text [ ENGLISH ] = "~Templates" ;
+ Text [ norwegian ] = "~Maler" ;
+ Text [ italian ] = "~Modelli" ;
+ Text [ portuguese_brazilian ] = "~Modelos" ;
+ Text [ portuguese ] = "Modelos" ;
+ Text [ finnish ] = "~Mallit" ;
+ Text [ danish ] = "Skabeloner" ;
+ Text [ french ] = "~Noms de modles" ;
+ Text [ swedish ] = "~Mallar" ;
+ Text [ dutch ] = "S~jablonen" ;
+ Text [ spanish ] = "P~lantillas" ;
+ Text [ english_us ] = "~Templates" ;
+ Text[ chinese_simplified ] = "ʽ(~T)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Szablony";
+ Text[ japanese ] = "ڰ(~T)";
+ Text[ chinese_traditional ] = "˦(~T)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = " (~T)";
+ Text[ turkish ] = "~ablon";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_STYLESHEETS
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 115 , 62 ) ;
+ Size = MAP_APPFONT ( 97 , 66 ) ;
+ };
+ GroupBox GB_STYLESHEETS
+ {
+ Pos = MAP_APPFONT ( 6 , 38 ) ;
+ Size = MAP_APPFONT ( 212 , 96 ) ;
+ Text = "Vorlagen" ;
+ Text [ ENGLISH ] = "Templates" ;
+ Text [ norwegian ] = "Maler" ;
+ Text [ italian ] = "Modelli" ;
+ Text [ portuguese_brazilian ] = "Modelos" ;
+ Text [ portuguese ] = "Modelos" ;
+ Text [ finnish ] = "Mallit" ;
+ Text [ danish ] = "Skabeloner" ;
+ Text [ french ] = "Modles existants" ;
+ Text [ swedish ] = "Mallar" ;
+ Text [ dutch ] = "Sjablonen" ;
+ Text [ spanish ] = "Plantillas" ;
+ Text [ english_us ] = "Templates" ;
+ Text[ chinese_simplified ] = "ʽ";
+ Text[ russian ] = "";
+ Text[ polish ] = "Szablony";
+ Text[ japanese ] = "ڰ";
+ Text[ chinese_traditional ] = "˦";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = " ";
+ Text[ turkish ] = "ablon";
+ Text[ language_user1 ] = " ";
+ };
+ OKButton BT_OK
+ {
+ Pos = MAP_APPFONT ( 224 , 6 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ DefButton = TRUE ;
+ Disable = TRUE ;
+ };
+ CancelButton BT_CANCEL
+ {
+ Pos = MAP_APPFONT ( 224 , 23 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ };
+ HelpButton BT_HELP
+ {
+ Pos = MAP_APPFONT ( 224 , 43 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ };
+ PushButton BT_EDIT
+ {
+ Pos = MAP_APPFONT ( 224 , 62 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ Text = "~Bearbeiten" ;
+ Text [ English ] = "~Edit" ;
+ Text [ english_us ] = "~Edit" ;
+ Text [ dutch ] = "Be~werken" ;
+ Text [ italian ] = "Modifica" ;
+ Text [ spanish ] = "~Editar" ;
+ Text [ french ] = "~Personnaliser" ;
+ Text [ swedish ] = "~Redigera" ;
+ Text [ danish ] = "Rediger" ;
+ Text [ portuguese ] = "~Editar" ;
+ Text [ portuguese_brazilian ] = "~Bearbeiten" ;
+ Text[ chinese_simplified ] = "༭(~E)";
+ Text[ russian ] = "~";
+ Text[ polish ] = "~Edytuj";
+ Text[ japanese ] = "ҏW(~Ej";
+ Text[ chinese_traditional ] = "s(~E)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "~";
+ Text[ korean ] = "(~E)";
+ Text[ turkish ] = "~Dzenle";
+ Text[ language_user1 ] = " ";
+ };
+ PushButton BT_ORGANIZE
+ {
+ Pos = MAP_APPFONT ( 224 , 79 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ Text = "Ver~walten..." ;
+ Text [ English ] = "~Manage..." ;
+ Text [ norwegian ] = "~Styre..." ;
+ Text [ italian ] = "Gestisci..." ;
+ Text [ portuguese_brazilian ] = "~Gerenciar..." ;
+ Text [ portuguese ] = "~Gerir..." ;
+ Text [ finnish ] = "~Ksittele..." ;
+ Text [ danish ] = "Administrer..." ;
+ Text [ french ] = "~Grer..." ;
+ Text [ swedish ] = "~Frvalta..." ;
+ Text [ dutch ] = "Be~heren..." ;
+ Text [ spanish ] = "~Administrar..." ;
+ Text [ english_us ] = "~Organizer..." ;
+ Text[ chinese_simplified ] = "(~O)...";
+ Text[ russian ] = "...";
+ Text[ polish ] = "Zarzdzaj...";
+ Text[ japanese ] = "Ǘ(~O)...";
+ Text[ chinese_traditional ] = "޲z(~O)...";
+ Text[ arabic ] = "...";
+ Text[ greek ] = "...";
+ Text[ korean ] = "(~O)...";
+ Text[ turkish ] = "Ynet...";
+ Text[ language_user1 ] = " ";
+ };
+ Text[ chinese_simplified ] = "ĵʽ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Szablony dokumentu";
+ Text[ japanese ] = "޷Ăڰ";
+ Text[ chinese_traditional ] = "˦";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ";
+ Text[ turkish ] = "Belge ablonu";
+ Text[ language_user1 ] = " ";
+};
+ // ********************************************************************** EOF
diff --git a/sfx2/source/doc/doctempl.cxx b/sfx2/source/doc/doctempl.cxx
new file mode 100644
index 000000000000..dda94e26e399
--- /dev/null
+++ b/sfx2/source/doc/doctempl.cxx
@@ -0,0 +1,2484 @@
+/*************************************************************************
+ *
+ * $RCSfile: doctempl.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:32 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include <limits.h>
+#if ! defined( MAC ) && ! defined( UNX )
+#include <io.h>
+#endif
+
+#ifndef _COM_SUN_STAR_UNO_ANY_H_
+#include <com/sun/star/uno/Any.h>
+#endif
+#ifndef _SFXINIMGR_HXX //autogen
+#include <svtools/iniman.hxx>
+#endif
+#ifndef _SYSTEM_HXX //autogen
+#include <vcl/system.hxx>
+#endif
+#ifndef _MSGBOX_HXX //autogen
+#include <vcl/msgbox.hxx>
+#endif
+#ifndef _SVSTOR_HXX //autogen
+#include <so3/svstor.hxx>
+#endif
+#ifndef _SFXECODE_HXX
+#include <svtools/sfxecode.hxx>
+#endif
+#ifndef _EHDL_HXX
+#include <svtools/ehdl.hxx>
+#endif
+#include <tools/fsys.hxx>
+#include <tools/string.hxx>
+
+#include "doctempl.hxx"
+#include "docfac.hxx"
+#include "docfile.hxx"
+#include "objsh.hxx"
+#include "inimgr.hxx"
+#include "sfxtypes.hxx"
+#include "app.hxx"
+#include "inimgr.hxx"
+#include "sfxresid.hxx"
+#include "docfilt.hxx"
+#include "fltfnc.hxx"
+#include "doc.hrc"
+#include "ucbhelp.hxx"
+#include "openflag.hxx"
+
+//========================================================================
+
+const char __FAR_DATA pHeader[] = "Sfx Document Template Directory";
+const char __FAR_DATA pFileFileName[] = "sfx.tpl";
+const char __FAR_DATA pDirFileName[] = "sfx.tlx";
+const char __FAR_DATA pBakExtension[] = "bak";
+const char pMGName[] = "mg.bad";
+const char* cDefExtension = "*.vor";
+const char cDefWildcard = '*';
+
+#define CTRL_Z ((char)26)
+
+#define VERSION 4
+
+// Wird nur noch gebraucht, um die Datein beim Scannen zu "uberspringen
+// LongNameList_Impl needs this function, too!
+const String FileName_Impl(BOOL bDir)
+{
+ return bDir ? String::CreateFromAscii( pDirFileName ) :
+ String::CreateFromAscii( pFileFileName );
+}
+
+// ------------------------------------------------------------------------
+class LongNameList_Impl : public List
+{
+ List* mpNames;
+
+public:
+ LongNameList_Impl( const String& rDirName );
+ ~LongNameList_Impl();
+
+ String GetLongName( const String& rShortName ) const;
+ BOOL ReadHeader( SvStream& rStream ) const;
+};
+
+//------------------------------------------------------------------------
+class OpenNotifier_Impl : public SfxListener
+{
+ BOOL bEnd;
+//(dv) CntAnchorRef xAnchor;
+//(dv) CntOpenMode eMode;
+
+public:
+ OpenNotifier_Impl( /*(dv)const CntAnchorRef& rAnchor, CntOpenMode eOpenMode */ )
+ : bEnd( FALSE )
+//(dv) , xAnchor( rAnchor )
+//(dv) , eMode( eOpenMode )
+ {
+#if 0 //(dv)
+ StartListening( *xAnchor );
+ xAnchor->Put( SfxVoidItem( WID_GETDATA ) );
+ xAnchor->MakeVisible( TRUE );
+ xAnchor->MarkAsRoot();
+ xAnchor->DontThread();
+ xAnchor->Put( CntOpenModeItem(WID_OPEN,eMode) );
+#endif //(dv)
+ }
+
+ virtual void Notify( SfxBroadcaster&, const SfxHint& );
+ BOOL IsComplete() const
+ { return bEnd; }
+};
+
+void OpenNotifier_Impl::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
+{
+#if 0 //(dv)
+ if( rHint.ISA(CntStatusHint) )
+ {
+ const CntStatusHint& rStatusHint = (const CntStatusHint&)rHint;
+ USHORT nWhich = rStatusHint.GetRequest() ? rStatusHint.GetRequest()->Which() : 0;
+ const CntStatus eStatus = rStatusHint.GetStatus();
+ if ( nWhich == WID_OPEN && ( eStatus == CNT_STATUS_DONE || eStatus == CNT_STATUS_ERROR ) )
+ {
+ bEnd = TRUE;
+ EndListening( *xAnchor );
+ }
+ }
+#endif //(dv)
+}
+
+class SfxTemplateDir;
+
+
+class SfxTemplateDirEntry
+{
+//(dv) CntAnchorRef xAnchor;
+ String aLongName; // logischer Name des Benutzers
+ String aFileName; // Dateiname (ohne Pfad)
+ SfxTemplateDir* pParent; // Parentverzeichnis
+ DirEntry* pPath; // vollstaendiger Pfad ohne Name, wenn Dir.
+ SfxTemplateDir* pContent;
+ SfxObjectShellLock xObjShell;
+ SvStorageRef xStor;
+ BOOL bDidConvert;
+ BOOL bIsOwner;
+ BOOL bDefault;
+ BOOL bIsRoot;
+
+public:
+ SfxTemplateDirEntry( const String &rName,
+ SfxTemplateDir &rParent );
+ SfxTemplateDirEntry( const String &rName,
+ const String &rFileName,
+ SfxTemplateDir &rParent );
+ SfxTemplateDirEntry( const String &rName,
+ const DirEntry &rPath );
+ SfxTemplateDirEntry( const String &rName,
+ const String &rFileName,
+ const DirEntry &rPath, BOOL bRoot = FALSE );
+ SfxTemplateDirEntry( const SfxTemplateDirEntry & );
+ ~SfxTemplateDirEntry();
+
+ BOOL IsLoaded(){ return pContent!= 0; }
+ BOOL IsDefault() { return bDefault; }
+ BOOL IsRoot() { return bIsRoot; }
+
+ const SfxTemplateDir& GetParent() const { return *pParent; }
+ SfxTemplateDir& GetParent() { return *pParent; }
+ SfxTemplateDir& GetContent();
+ void SetContent(SfxTemplateDir *pCnt);
+
+ const String& GetLongName() const { return aLongName; }
+ const String& GetFileName() const { return aFileName; }
+ void SetLongName(const String &rStr) {aLongName = rStr;}
+ BOOL SetLongAndFileName( const String &rLong);
+ void SetFileName(const String &rStr) { aFileName = rStr; }
+ DirEntry GetFull() const;
+ DirEntry GetPath() const;
+ SfxObjectShellRef CreateObjectShell();
+ SfxObjectShellRef GetObjectShell() const { return (SfxObjectShellRef)(SfxObjectShell*) xObjShell; }
+ void SetObjectShell( SfxObjectShell *pSh )
+ { xObjShell = pSh; }
+ BOOL DeleteObjectShell();
+#if 0 //(dv)
+ void SetAnchor( const CntAnchorRef& rAnchor )
+ { xAnchor = rAnchor; }
+#endif //(dv)
+};
+
+//------------------------------------------------------------------------
+
+typedef SfxTemplateDirEntry* SfxTemplateDirEntryPtr;
+SV_DECL_PTRARR_DEL(_SfxTemplateDir, SfxTemplateDirEntryPtr, 16, 8)
+SV_IMPL_PTRARR(_SfxTemplateDir, SfxTemplateDirEntryPtr)
+
+//------------------------------------------------------------------------
+
+class SfxTemplateDir: public _SfxTemplateDir
+{
+ DirEntry aPath; // vollstaendiger Pfad zum Verzeichnis
+ BOOL bDir; // Directory?
+
+public:
+ const SfxTemplateDirEntry* Find_Impl(const DirEntry &rDirEntry) const;
+
+ SfxTemplateDir()
+ : bDir ( FALSE )
+ {}
+
+ SfxTemplateDir( const DirEntry &rPath )
+ : aPath(rPath)
+ , bDir( FALSE )
+ {}
+
+ SfxTemplateDir( const DirEntry &rPath,
+ BOOL bDirectory, BOOL bScan=2 );
+ SfxTemplateDir( const SfxTemplateDir & );
+
+ void Scan(BOOL bDirectory, BOOL bSave = FALSE);
+ const DirEntry& GetPath() const { return aPath; }
+ DirEntry& GetPath() { return aPath; }
+
+ // anhand des neuen TemplateDirs aktualisieren
+ BOOL Freshen(const SfxTemplateDir &rNew);
+ BOOL IsDir()
+ {return bDir;}
+};
+
+//------------------------------------------------------------------------
+
+void MakeFileName_Impl(DirEntry &rEntry,
+ const String &rLongName, BOOL bDir)
+{
+ String aFName(rLongName);
+ if(!bDir)
+ aFName+= DEFINE_CONST_UNICODE( ".vor" );
+ rEntry.MakeShortName(aFName, FSYS_KIND_NONE);
+}
+
+//------------------------------------------------------------------------
+
+SfxTemplateDirEntry::SfxTemplateDirEntry
+(
+ const String& rName,
+ SfxTemplateDir& rP
+)
+
+/* [Beschreibung]
+
+ Konstuktor;
+ der Dateiname und der logische Name sind identisch
+
+*/
+
+: aLongName(rName),
+ aFileName(rName),
+ pContent(0),
+ pPath(0),
+ pParent(&rP),
+ bIsRoot( FALSE ),
+ bDefault( FALSE )
+{}
+
+//------------------------------------------------------------------------
+
+SfxTemplateDirEntry::SfxTemplateDirEntry
+(
+ const String& rName,
+ const String& rFileName,
+ SfxTemplateDir& rP
+)
+/* [Beschreibung]
+
+ Konstuktor;
+ der Dateiname und der logische Name sind unterschiedlich
+
+*/
+
+: aLongName(rName),
+ aFileName(rFileName),
+ pContent(0),
+ pPath(0),
+ pParent(&rP),
+ bIsRoot( FALSE ),
+ bDefault( FALSE )
+{}
+
+//------------------------------------------------------------------------
+
+SfxTemplateDirEntry::SfxTemplateDirEntry
+(
+ const String &rName, // Der Stream, aus dem gelesen werden soll
+ const DirEntry &rP // Parentverzeichnis
+)
+
+/* [Beschreibung]
+
+ Konstuktor;
+ der Dateiname und der logische Name sind identisch
+*/
+
+: aLongName(rName),
+ aFileName(rName),
+ pContent(0),
+ pPath(new DirEntry(rP)),
+ pParent(0),
+ bIsRoot( FALSE ),
+ bDefault( FALSE )
+{}
+
+//------------------------------------------------------------------------
+
+SfxTemplateDirEntry::SfxTemplateDirEntry
+(
+ const String& rName,
+ const String& rFileName,
+ const DirEntry& rP, // Parentverzeichnis
+ BOOL bRoot
+)
+
+/* [Beschreibung]
+
+ Konstuktor;
+ der Dateiname und der logische Name sind unterschiedlich
+*/
+
+: aLongName(rName),
+ aFileName(rFileName),
+ pContent(0),
+ pPath(new DirEntry(rP)),
+ pParent(0),
+ bIsRoot( bRoot ),
+ bDefault( FALSE )
+{}
+
+//------------------------------------------------------------------------
+
+SfxTemplateDirEntry::SfxTemplateDirEntry(const SfxTemplateDirEntry &rCopy)
+
+/* [Beschreibung]
+
+ Copy Konstruktor
+
+*/
+
+: aLongName(rCopy.aLongName),
+ aFileName(rCopy.aFileName),
+ pParent(rCopy.pParent),
+ pPath(rCopy.pPath? new DirEntry(*rCopy.pPath): 0),
+ pContent(rCopy.pContent? new SfxTemplateDir(*rCopy.pContent): 0),
+ bDefault( rCopy.bDefault )
+{}
+
+//------------------------------------------------------------------------
+
+SfxTemplateDirEntry::~SfxTemplateDirEntry()
+
+/* [Beschreibung]
+
+ Destruktor
+
+*/
+
+{
+ DeleteObjectShell();
+ delete pContent;
+ delete pPath;
+ pParent = 0;
+}
+
+//------------------------------------------------------------------------
+
+SfxObjectShellRef SfxTemplateDirEntry::CreateObjectShell()
+
+/* [Beschreibung]
+
+ Anlegen einer DokumentShell zu diesem Entry; das Entry beinhaltet
+ den Dateinamen.
+
+
+ [R"uckgabewert]
+
+ SfxObjectShellRef Referenz auf die DokumentShell
+
+
+ [Querverweise]
+
+ <SfxTemplateDirEntry::DeleteObjectShell()>
+*/
+
+{
+ if(!xObjShell.Is())
+ {
+ bIsOwner=FALSE;
+ BOOL bDum = FALSE;
+ SfxApplication *pSfxApp = SFX_APP();
+ xObjShell = pSfxApp->DocAlreadyLoaded(GetFull().GetFull(),TRUE,bDum);
+ if(!xObjShell.Is())
+ {
+ bIsOwner=TRUE;
+ SfxMedium *pMed=new SfxMedium(
+ GetFull().GetFull(),(STREAM_READ | STREAM_SHARE_DENYWRITE),
+ FALSE, TRUE, 0);
+ const SfxFilter* pFilter = NULL;
+ if( pSfxApp->GetFilterMatcher().GuessFilter(
+ *pMed, &pFilter, SFX_FILTER_TEMPLATE, 0 ) ||
+ pFilter && !pFilter->IsOwnFormat() ||
+ pFilter && !pFilter->UsesStorage() )
+ {
+ SfxErrorContext aEc(ERRCTX_SFX_LOADTEMPLATE,
+ GetFull().GetFull(
+ FSYS_STYLE_HOST,FALSE,20));
+ delete pMed;
+ bDidConvert=TRUE;
+ ULONG lErr;
+ if ( xObjShell.Is() )
+ if(lErr=(pSfxApp->LoadTemplate(
+ xObjShell,GetFull().GetFull())!=ERRCODE_NONE))
+ ErrorHandler::HandleError(lErr);
+
+ }
+ else
+ {
+ const SfxObjectFactory &rFactory =
+ ((SfxFactoryFilterContainer*)pFilter->GetFilterContainer())
+ ->GetFactory();
+ delete pMed;
+ bDidConvert=FALSE;
+ xStor = new SvStorage(
+ GetFull().GetFull(),
+ STREAM_READWRITE | STREAM_NOCREATE |
+ STREAM_SHARE_DENYALL, STORAGE_TRANSACTED);
+ if ( pFilter )
+ xStor->SetVersion( pFilter->GetVersion() );
+ if ( SVSTREAM_OK == xStor->GetError() )
+ {
+ xObjShell = (SfxObjectShell *)
+ rFactory.CreateObject(SFX_CREATE_MODE_ORGANIZER);
+ if ( xObjShell.Is() )
+ {
+ xObjShell->DoInitNew(0);
+ if(!xObjShell->LoadFrom(xStor))
+ xObjShell.Clear();
+ else
+ {
+ xObjShell->DoHandsOff();
+ xObjShell->DoSaveCompleted(xStor);
+ }
+ }
+ }
+ }
+ }
+ }
+ return (SfxObjectShellRef)(SfxObjectShell*) xObjShell;
+}
+
+//------------------------------------------------------------------------
+
+BOOL SfxTemplateDirEntry::DeleteObjectShell()
+
+/* [Beschreibung]
+
+ "oschen der DokumentShell dieses Entrys, sofern eine DokumentShell
+ angelegt wurde
+
+
+ [R"uckgabewert]
+
+ BOOL FALSE: es ist ein Fehler beim Speichern aufgetreten;
+ TRUE: das Dokument wurde gespeichert
+
+
+ [Querverweise]
+
+ <SfxTemplateDirEntry::CreateObjectShell()>
+*/
+
+{
+ BOOL bRet = TRUE;
+ if ( xObjShell.Is() )
+ {
+ if( xObjShell->IsModified() )
+ {
+ //Hier speichern wir auch, falls die Vorlage in Bearbeitung ist...
+ bRet=FALSE;
+ if ( bIsOwner )
+ if( bDidConvert)
+ {
+ bRet=xObjShell->PreDoSaveAs_Impl(
+ GetFull().GetFull(),
+ xObjShell->GetFactory().GetFilter(0)->GetName(),0 );
+ }
+ else
+ {
+ if(xObjShell->Save())
+ bRet=xStor->Commit();
+ else
+ bRet=FALSE;
+ }
+ }
+ if(bRet)
+ {
+ xObjShell.Clear();
+ xStor.Clear();
+ }
+ }
+ return bRet;
+}
+
+//------------------------------------------------------------------------
+
+BOOL SfxTemplateDirEntry::SetLongAndFileName(const String &rStr)
+
+/* [Beschreibung]
+
+ Setzen der logischen Namens; geschieht dies auf einem Device,
+ da"s lange Namen unterst"utzt, wird auch die Datei physikalisch
+ auf diesen logischen Namen umbenannt.
+
+
+ [Querverweise]
+ <SfxDocTemplateDirEntry::GetLongName()>
+*/
+
+{
+ if(aLongName==rStr)
+ return TRUE;
+ DirEntry aActName(GetFull());
+ DirEntry aNew(aActName.GetPath());
+
+ MakeFileName_Impl(aNew,rStr,!pParent || pParent->IsDir());
+
+ String aNewFileName(aNew.GetFull());
+
+ if(aNew==aActName)
+ {
+ aLongName=rStr;
+ aFileName = aNewFileName;
+ return TRUE;
+ }
+
+ FSysError eErr;
+ eErr=aActName.MoveTo(aNew);
+ if ( FSYS_ERR_OK == eErr )
+ {
+ aLongName = rStr;
+ aFileName = DirEntry( aNewFileName ).GetName();
+
+ // Pfade in den Verwaltungsdaten anpassen
+ if ( pContent )
+ {
+ const USHORT nCount = pContent->Count();
+ for ( USHORT i = 0; i < nCount; ++i )
+ {
+ SfxTemplateDir *pParent = (*pContent)[i]->pParent;
+ if ( pParent )
+ pParent->GetPath().SetName(aFileName);
+ }
+ pContent->GetPath().SetName(aFileName);
+ }
+
+ return TRUE;
+ }
+ return FALSE;
+}
+
+//------------------------------------------------------------------------
+
+DirEntry SfxTemplateDirEntry::GetPath() const
+
+/* [Beschreibung]
+
+ Liefert den Pfad zu diesem Eintry (Pfad + FileName == vollst"andiger
+ Pfad zu der diesem Entry zugeordneten Datei)
+
+ [Querverweise]
+ <SfxDocTemplateDirEntry::GetFull()>
+*/
+
+{
+ return pParent? pParent->GetPath(): *pPath;
+}
+
+//------------------------------------------------------------------------
+
+DirEntry SfxTemplateDirEntry::GetFull() const
+
+/* [Beschreibung]
+
+ Liefert den Pfad plus Dateiname zu diesem Eintry
+
+ [Querverweise]
+ <SfxDocTemplateDirEntry::GetPath()>
+*/
+
+{
+ DirEntry aEntry(GetPath());
+ aEntry += DirEntry(aFileName);
+ return aEntry;
+}
+
+//------------------------------------------------------------------------
+
+SfxTemplateDir &SfxTemplateDirEntry::GetContent()
+
+/* [Beschreibung]
+
+ Zugriff auf den Inhalt eines Bereiches; der Bereich wird erst
+ bei Bedarf eingelesen.
+
+*/
+
+{
+ DBG_ASSERT(!pParent || pParent->IsDir(), "Ist kein Dir");
+ if ( !pContent )
+ pContent = new SfxTemplateDir(GetFull(), FALSE);
+ return *pContent;
+}
+
+
+
+//------------------------------------------------------------------------
+
+void SfxTemplateDirEntry::SetContent(SfxTemplateDir *pCnt)
+
+/* [Beschreibung]
+
+ Setzt den Inhalt eines Bereiches; der alte Bereich wird
+ gel"oscht
+
+*/
+
+{
+ delete pContent;
+ pContent = pCnt;
+}
+
+//------------------------------------------------------------------------
+
+SfxTemplateDirEntry* SeekEntry_Impl(SfxTemplateDir &rDir, const String &rLongName, USHORT * = 0);
+
+SfxTemplateDirEntry* SeekEntry_Impl
+(
+ SfxTemplateDir& rDir, // Das Directory, in dem gesucht werden soll
+ const String& rLongName, /* der logische Name, dessen Eintrag gefunden
+ werden soll */
+
+ USHORT* pUS /* Optional, enth"alt, falls gefunden, den Index
+ des Eintrags in rDir. */
+
+)
+
+/* [Beschreibung]
+
+ Sucht einen Eintrag anhand seines logischen Namens
+
+
+ [R"uckgabewert]
+
+ SfxTemplateDirEntry* Pointer auf den gefundenen Eintrag oder NULL,
+ wenn nicht gefunden.
+
+*/
+
+{
+ BOOL bCaseSensitive = rDir.GetPath().IsCaseSensitive();
+ const USHORT nCount = rDir.Count();
+ for ( USHORT i = 0; i < nCount; ++i )
+ {
+ const String& rName = rDir[i]->GetLongName();
+ if ( bCaseSensitive && rName == rLongName ||
+ !bCaseSensitive && rName.CompareIgnoreCaseToAscii( rLongName ) == COMPARE_EQUAL )
+ {
+ if ( pUS )
+ *pUS = i;
+ return rDir[i];
+ }
+ }
+ return 0;
+}
+
+//------------------------------------------------------------------------
+
+SfxTemplateDir::SfxTemplateDir
+(
+ const DirEntry& rPath,
+ BOOL bDirectory,
+ BOOL bScan
+)
+
+/* [Beschreibung]
+
+ Konstruktor
+ Wenn Directory, alle Verzeichnisse dieses Directories
+ sonst alle Vorlagen in diesem Directory
+
+ [Querverweise]
+ <SfxDocTemplateDir::Scan()>
+ <SfxDocTemplateDir::Load(const DirEntry &rFile, BOOL bDirectory)>
+*/
+
+: _SfxTemplateDir()
+ ,bDir(bDirectory)
+ ,aPath(rPath)
+{
+ if(!FileStat(rPath).IsKind(FSYS_KIND_DIR)) return;
+
+ if( bScan==2 || !bScan )
+ Scan(bDirectory, TRUE);
+ else
+ Scan(bDirectory, FALSE);
+}
+
+//------------------------------------------------------------------------
+
+void SfxTemplateDir::Scan
+(
+ BOOL bDirectory, // Flag, Directory oder Dateien in diesem Directory
+ BOOL bSave // Flag, speichern der sfx.tpl Files
+)
+
+/* [Beschreibung]
+
+ Liest ein Directory / den Inhalt eines Directorys von Platte ein
+*/
+
+{
+ LongNameList_Impl *pDirList = NULL;
+ DirEntry aActDir;
+ aActDir.ToAbs();
+ DirEntry aTmpPath(aPath);
+ aTmpPath.SetCWD();
+ const String aDirWild('*');
+ const String aDefDirWild(cDefWildcard);
+ const DirEntry aWild(bDirectory? aDirWild: aDefDirWild);
+ Dir aDir(aWild, bDirectory? FSYS_KIND_DIR: FSYS_KIND_FILE, FSYS_SORT_END);
+ DBG_ASSERT(aDir.Count() < USHRT_MAX, "zu viele DirEntraege");
+ const USHORT nCount = (USHORT)aDir.Count();
+ if(bDirectory)
+ {
+ const SfxTemplateDirEntryPtr pE=new SfxTemplateDirEntry(SfxResId(STR_STANDARD),String(),aTmpPath,TRUE);
+ Insert(pE, 0 );
+ pDirList = new LongNameList_Impl( aPath.GetFull( FSYS_STYLE_URL, TRUE ) );
+ }
+
+ for ( USHORT i = 0; i < nCount; ++i )
+ {
+ const DirEntry aDirEntry(aDir[i]);
+ const String aFileName(aDirEntry.GetName());
+ if ( aFileName.Len() &&
+ aFileName.CompareIgnoreCaseToAscii(pFileFileName)!=COMPARE_EQUAL &&
+ aFileName.CompareIgnoreCaseToAscii(pDirFileName)!=COMPARE_EQUAL &&
+ aFileName.GetChar(0) != '.' )
+ {
+ const SfxFilter* ppFilter = NULL;
+
+ if ( !bDirectory )
+ {
+/*
+ SfxMedium aSfxMedium( aDirEntry.GetName(),
+ STREAM_READ | STREAM_SHARE_DENYNONE,
+ FALSE );
+ if( SFX_APP()->GetFilterMatcher().GuessFilter(
+ aSfxMedium,
+ &ppFilter,
+ SFX_FILTER_IMPORT | SFX_FILTER_TEMPLATE )
+ || !ppFilter
+ || !ppFilter->IsAllowedAsTemplate() )
+ continue;
+ */
+ }
+ else if ( aFileName.CompareIgnoreCaseToAscii( "wizard" ) == COMPARE_EQUAL ||
+ aFileName.CompareIgnoreCaseToAscii( "internal" ) == COMPARE_EQUAL )
+ // hide internal template folder
+ continue;
+
+ String aLongName;
+
+ // try to get the long name of the entry. To get the long name of files
+ // we have to look into these files by getting the document info. The
+ // long names of directories are stored in a file named sfx.tlx. The
+ // pDirList should contain the data of that file. When we haven't found
+ // a long name, the long name will be set to the file name.
+ if ( !bDirectory )
+ {
+ DirEntry aName( aPath );
+ aName += aFileName;
+ SvStorageRef aStor = new SvStorage( aName.GetFull(), SFX_STREAM_READONLY );
+ if ( aStor->GetError() == SVSTREAM_OK )
+ {
+ SfxDocumentInfo aInfo;
+ BOOL bOK = aInfo.Load( aStor );
+ if ( bOK )
+ aLongName = aInfo.GetTitle();
+ }
+
+ if ( !aLongName.Len() )
+ aLongName = aName.GetBase();
+ }
+ else
+ {
+ if ( pDirList )
+ aLongName = pDirList->GetLongName( aFileName );
+ if ( !aLongName.Len() )
+ aLongName = aFileName;
+ }
+
+ const SfxTemplateDirEntryPtr pEntry = bDirectory?
+ new SfxTemplateDirEntry(aLongName, aFileName, aTmpPath):
+ new SfxTemplateDirEntry(aLongName, aFileName, *this);
+ const String &rLongName = pEntry->GetLongName();
+ const International aInter(GetpApp()->GetAppInternational());
+ const USHORT nCount = Count();
+ // initial sortiert einfuegen
+ USHORT ii;
+ for ( ii = bDirectory ? 1 : 0; //Ist Standard mit drinnen?
+ ii < Count() && COMPARE_LESS ==
+ aInter.Compare( (*this)[ii]->GetLongName(), rLongName);
+ ++ii)
+ ;
+ Insert(pEntry, ii);
+ }
+ }
+
+ if ( bSave && Count() )
+ {
+ DirEntry aFile(aTmpPath);
+ }
+
+ DirEntry aDumDir(FSYS_FLAG_ABSROOT);
+ aDumDir.SetCWD();
+ aActDir.SetCWD();
+
+ delete pDirList;
+}
+
+//------------------------------------------------------------------------
+
+SfxTemplateDir::SfxTemplateDir ( const SfxTemplateDir &rCopy ) :
+
+/* [Beschreibung]
+
+ Copy- Konstruktor
+
+*/
+
+ _SfxTemplateDir( (BYTE)rCopy.Count(), 1 ),
+
+ bDir( rCopy.bDir ),
+ aPath( rCopy.aPath )
+{
+ const USHORT nCount = rCopy.Count();
+ for (USHORT i = 0; i < nCount; ++i)
+ {
+ const SfxTemplateDirEntryPtr pEntry =
+ new SfxTemplateDirEntry( *rCopy[i] );
+ Insert( pEntry, i );
+ }
+}
+
+//------------------------------------------------------------------------
+
+const SfxTemplateDirEntry *SfxTemplateDir::Find_Impl
+(
+ const DirEntry& rDirEntry /* der Dateiname, dessen zugeordneter Eintrag
+ gefunden werden soll. */
+
+) const
+
+/* [Beschreibung]
+
+ Sucht einen Eintrag anhand seines Dateinamens
+
+
+ [R"uckgabewert] Pointer auf den gefundenen Eintrag oder NULL,
+ wenn nicht gefunden.
+
+*/
+
+{
+ const USHORT nCount = Count();
+ for (USHORT i = 0; i < nCount; ++i)
+ {
+ const SfxTemplateDirEntry *pEntry = (*this)[i];
+// const DirEntry aFileName(pEntry->GetFileName());
+ if(pEntry->GetFull() == rDirEntry)
+ return pEntry;
+ }
+ return 0;
+}
+
+//------------------------------------------------------------------------
+
+BOOL SfxTemplateDir::Freshen
+(
+ const SfxTemplateDir& rNew /* Das Directory, gegen das dieses Directoy
+ abgeglichen werden soll */
+
+)
+
+/* [Beschreibung]
+
+ Dieses Directory anhand des TemplateDirs rNew aktualisieren
+ (Aktualisieren aus Benutzersicht; das aktuelle Directory
+ wird gegen ein neu eingelesenes abgeglichen
+
+
+ [R"uckgabewert]
+
+ BOOL TRUE
+ wurde modifiziert
+
+ FALSE
+ wurde nicht modifiziert
+*/
+
+{
+ USHORT i = 0;
+ BOOL bModified = FALSE;
+ // alle die entfernen, wo die Datei physikalisch nicht
+ // mehr vorhanden ist
+ while(i < Count())
+ {
+ SfxTemplateDirEntry *pEntry = (*this)[i];
+ if(!rNew.Find_Impl(pEntry->GetFull()))
+ {
+ Remove(i, 1);
+ delete pEntry;
+ bModified = TRUE;
+ }
+ else
+ ++i;
+ }
+ // alle die aufnehmen, wo der Dateiname aus rNew in der aktuellen
+ // Version nicht vorhanden ist
+ const USHORT nCount = rNew.Count();
+ for(i = 0; i < nCount; ++i)
+ {
+ const SfxTemplateDirEntry *pEntry = rNew[i];
+ if(!Find_Impl(pEntry->GetFull()))
+ {
+ SfxTemplateDirEntry *pNew = new SfxTemplateDirEntry(*pEntry);
+/* if(&pEntry->GetParent())
+ pNew->GetParent()=*this;*/
+ Insert(pNew, Count());
+ bModified = TRUE;
+ }
+ }
+ return bModified;
+}
+
+//------------------------------------------------------------------------
+
+String SfxDocumentTemplates::GetFullRegionName
+(
+ USHORT nIdx // Index des Bereiches
+) const
+
+/* [Beschreibung]
+
+ Liefert den logischen Namen eines Bereiches Plus seinem Pfad
+
+
+ [R"uckgabewert] Referenz auf diesen Namen
+
+*/
+
+{
+ DBG_ASSERT( pDirs, "not initialized" );
+ String aName=(*pDirs)[nIdx]->GetLongName();
+
+ USHORT nCount=pDirs->Count();
+ for(USHORT i=0;i<nCount;i++)
+ {
+ if(i!=nIdx && (*pDirs)[i]->GetLongName()==aName)
+ {
+ DirEntry aParent( (*pDirs)[nIdx]->GetFull() );
+ if ( !(*pDirs)[nIdx]->IsRoot() )
+ aParent.CutName();
+ aName += DEFINE_CONST_UNICODE( " (" );
+ aName += aParent.GetFull( FSYS_STYLE_HOST, FALSE, 10 );
+ aName += DEFINE_CONST_UNICODE( ")" );
+ break;
+ }
+ }
+ return aName;
+}
+
+//------------------------------------------------------------------------
+
+const String& SfxDocumentTemplates::GetRegionName
+(
+ USHORT nIdx // Index des Bereiches
+) const
+
+/* [Beschreibung]
+
+ Liefert den logischen Namen eines Bereiches
+
+
+ [R"uckgabewert]
+
+ const String& Referenz auf diesen Namen
+
+*/
+{
+ DBG_ASSERT( pDirs, "not initialized" );
+ return (*pDirs)[nIdx]->GetLongName();
+}
+
+
+//------------------------------------------------------------------------
+
+USHORT SfxDocumentTemplates::GetRegionNo
+(
+ const String &rRegion // Name der Region
+) const
+
+/* [Beschreibung]
+
+ Liefert den Index f"ur einen logischen Namen eines Bereiches.
+
+
+ [R"uckgabewert]
+
+ USHORT Index von 'rRegion' oder USHRT_MAX falls unbekannt
+
+*/
+{
+ DBG_ASSERT( pDirs, "not initialized" );
+ for ( USHORT n = 0; n < pDirs->Count(); ++n )
+ if ( (*pDirs)[n]->GetLongName() == rRegion )
+ return n;
+ return USHRT_MAX;
+}
+
+
+//------------------------------------------------------------------------
+
+USHORT SfxDocumentTemplates::GetRegionCount() const
+
+/* [Beschreibung]
+
+ Liefert die Anzahl der Bereiche
+
+
+ [R"uckgabewert]
+
+ USHORT Anzahl der Bereiche
+
+*/
+{
+ return pDirs->Count();
+}
+
+//------------------------------------------------------------------------
+
+USHORT SfxDocumentTemplates::GetCount
+(
+ const String& rName /* Name des Bereiches, dessen Eintrags-
+ anzahl ermittelt werden soll */
+
+) const
+
+/* [Beschreibung]
+
+ Liefert die Anzahl der Eintr"age eines Bereiches
+
+
+ [R"uckgabewert]
+
+ USHORT Anzahl der Eintr"age
+
+*/
+
+{
+ DBG_ASSERT( pDirs, "not initialized" );
+
+ SfxTemplateDirEntry *pEntry = SeekEntry_Impl(*pDirs, rName);
+ DBG_ASSERT(pEntry , "Eintrag nicht gefunden");
+ return pEntry? pEntry->GetContent().Count(): 0;
+}
+
+//------------------------------------------------------------------------
+
+BOOL SfxDocumentTemplates::IsRegionLoaded( USHORT nIdx ) const
+{
+ return (*pDirs)[nIdx]->IsLoaded();
+}
+
+//------------------------------------------------------------------------
+
+USHORT SfxDocumentTemplates::GetCount
+(
+ USHORT nRegion /* Index des Bereiches, dessen Eintrags-
+ anzahl ermittelt werden soll */
+
+) const
+
+/* [Beschreibung]
+
+ Liefert die Anzahl der Eintr"age eines Bereiches
+
+
+ [R"uckgabewert] Anzahl der Eintr"age
+
+*/
+
+{
+ DBG_ASSERT( pDirs, "not initialized" );
+ DBG_ASSERT(nRegion < GetRegionCount(), "Regions ueberindiziert");
+ return (*pDirs)[nRegion]->GetContent().Count();
+}
+
+//------------------------------------------------------------------------
+
+const String& SfxDocumentTemplates::GetName
+(
+ USHORT nRegion, // Index des Bereiches, in dem der Eintrag liegt
+ USHORT nIdx // Index des Eintrags
+) const
+
+/* [Beschreibung]
+
+ Liefert den logischen Namen eines Eintrags eines Bereiches
+
+
+ [R"uckgabewert]
+
+ const String& Name des Eintrags
+
+*/
+
+{
+ DBG_ASSERT( pDirs, "not initialized" );
+ return (*pDirs)[nRegion]->GetContent()[nIdx]->GetLongName();
+}
+
+//------------------------------------------------------------------------
+
+const String& SfxDocumentTemplates::GetFileName
+(
+ USHORT nRegion, // Index des Bereiches, in dem der Eintrag liegt
+ USHORT nIdx // Index des Eintrags
+) const
+
+/* [Beschreibung]
+
+ Liefert den Dateinamen eines Eintrags eines Bereiches
+
+ [R"uckgabewert] Dateiname des Eintrags
+
+*/
+{
+ DBG_ASSERT( pDirs, "not initialized" );
+ return (*pDirs)[nRegion]->GetContent()[nIdx]->GetFileName();
+}
+
+//------------------------------------------------------------------------
+
+String SfxDocumentTemplates::GetPath
+(
+ USHORT nRegion, // Index des Bereiches, in dem der Eintrag liegt
+ USHORT nIdx // Index des Eintrags
+) const
+
+/* [Beschreibung]
+
+ Liefert den Dateinamen mit vollst"andigem Pfad zu der einem
+ Eintrag zugeordneten Datei
+
+
+ [R"uckgabewert]
+
+ String Dateiname mit vollst"andigem Pfad
+
+*/
+{
+ DBG_ASSERT( pDirs, "not initialized" );
+ SfxTemplateDirEntry *pDirectory = (*pDirs)[nRegion];
+ SfxTemplateDirEntry *pEntry = pDirectory->GetContent()[nIdx];
+ return pEntry->GetFull().GetFull();
+}
+
+//------------------------------------------------------------------------
+
+String SfxDocumentTemplates::GetTemplatePath
+(
+ USHORT nRegion, // Index des Bereiches, in dem der Eintrag liegt
+ const String& rLongName // logischer Name des Eintrags
+) const
+
+/* [Beschreibung]
+
+ Liefert den Dateinamen mit vollst"andigem Pfad zu der einem
+ Eintrag zugeordneten Datei
+
+
+ [R"uckgabewert]
+
+ String Dateiname mit vollst"andigem Pfad
+
+*/
+{
+ DBG_ASSERT( pDirs, "not initialized" );
+ SfxTemplateDirEntry *pDirectory = (*pDirs)[nRegion];
+ DirEntry aPath(pDirectory->GetFull());
+ const SfxTemplateDirEntry *pEntry = SeekEntry_Impl(pDirectory->GetContent(), rLongName);
+
+ // Vorlage mit diesem Langnamen existiert bereits
+ // => deren Dateiname muss verwendet werden
+ if(pEntry)
+ aPath += DirEntry(pEntry->GetFileName());
+ else
+ // Dateiname generieren
+ MakeFileName_Impl(aPath, rLongName, pDirectory->GetContent().IsDir());
+ aPath.ToAbs();
+ return aPath.GetFull();
+}
+
+//------------------------------------------------------------------------
+
+String SfxDocumentTemplates::GetDefaultTemplatePath
+(
+ const String&
+ rLongName
+)
+
+/* [Beschreibung]
+
+ Liefert den Standardpfad zu Dokumentvorlagen
+
+
+ [R"uckgabewert]
+
+ String Standardpfad zu Dokumentvorlagen
+
+*/
+{
+ DBG_ASSERT( pDirs, "not initialized" );
+ const String aSep(';');
+ cDelim = aSep.GetChar(0);
+ DBG_ASSERT(aDirs.GetTokenCount(cDelim), "Keine Bereiche");
+ DirEntry aPath(aDirs.GetToken(0, cDelim));
+
+ // Verzeichnis anlegen
+ if(!aPath.MakeDir())
+ return String();
+ MakeFileName_Impl(aPath, rLongName, TRUE);
+ SfxTemplateDir *pEntry = new SfxTemplateDir;
+ SfxTemplateDirEntryPtr pDirEntry =
+ new SfxTemplateDirEntry( String( '.' ), aPath.GetPath() );
+ pDirEntry->SetContent(new SfxTemplateDir(aPath.GetPath()));
+ pEntry->Insert(pDirEntry, pEntry->Count());
+ pDirs->Insert(pEntry, pDirs->Count());
+ return aPath.GetFull();
+}
+
+//------------------------------------------------------------------------
+
+BOOL SfxDocumentTemplates::SaveDir
+(
+ SfxTemplateDir& rDir // das zu speichernde Directory
+)
+
+/* [Beschreibung]
+
+ Speichert das Directory rDir
+
+
+ [R"uckgabewert]
+
+ BOOL FALSE,
+ Schreibfehler
+
+ TRUE
+ gespeichert
+
+*/
+
+{
+ return TRUE;
+}
+
+//------------------------------------------------------------------------
+
+void SfxDocumentTemplates::NewTemplate
+(
+ USHORT nRegion, /* Index des Bereiches, in dem die Vorlage
+ angelegt werden soll */
+
+ const String& rLongName, // logischer Name der neuen Vorlage
+ const String& rFileName // Dateiname der neuen Vorlage
+)
+
+/* [Beschreibung]
+
+ Eintragen einer neuen Dokumentvorlage in die Verwaltungsstrukturen
+ Das "Uberschreiben einer Vorlage gleichen Namens wird
+ verhindert (!! Fehlermeldung)
+
+*/
+
+{
+ DBG_ASSERT( pDirs, "not initialized" );
+ SfxTemplateDirEntry *pDirectory = (*pDirs)[nRegion];
+ SfxTemplateDir &rEntry = pDirectory->GetContent();
+
+ // Eintrag existiert bereits
+ if(SeekEntry_Impl(pDirectory->GetContent(), rLongName))
+ return;
+ const SfxTemplateDirEntryPtr pNewEntry =
+ new SfxTemplateDirEntry(rLongName, rFileName, rEntry);
+ rEntry.Insert(pNewEntry, rEntry.Count());
+ SaveDir(rEntry);
+}
+
+//------------------------------------------------------------------------
+
+BOOL SfxDocumentTemplates::CopyOrMove
+(
+ USHORT nTargetRegion, // Index des Zielbereiches
+ USHORT nTargetIdx, // Index Zielposition
+ USHORT nSourceRegion, // Index des Quellbereiches
+ USHORT nSourceIdx, /* Index der zu kopierenden / zu verschiebenden
+ Dokumentvorlage */
+ BOOL bMove // kopieren / verschieben
+)
+
+/* [Beschreibung]
+
+ Kopieren oder Verschieben einer Dokumentvorlage
+
+
+ [R"uckgabewert]
+
+ BOOL TRUE
+ Aktion konnte ausgef"uhrt werden
+
+ FALSE
+ Aktion konnte nicht ausgef2uhrt werden
+
+ [Querverweise]
+
+ <SfxDocumentTemplates::Move(USHORT,USHORT,USHORT,USHORT)>
+ <SfxDocumentTemplates::Copy(USHORT,USHORT,USHORT,USHORT)>
+*/
+
+{
+ DBG_ASSERT( pDirs, "not initialized" );
+ if(nSourceIdx == USHRT_MAX) // keine Verzeichnisse verschieben, kopieren
+ return FALSE ;
+ SfxTemplateDirEntry *pTargetDirectory = (*pDirs)[nTargetRegion];
+ SfxTemplateDirEntry *pSourceDirectory = (*pDirs)[nSourceRegion];
+ SfxTemplateDir &rTargetDir = pTargetDirectory->GetContent();
+ SfxTemplateDir &rSourceDir = pSourceDirectory->GetContent();
+ SfxTemplateDirEntry *pSourceEntry = rSourceDir[nSourceIdx];
+
+ // Verschieben einer Vorlage innerhalb eines Bereiches
+ // --> nur Verwaltungsdaten aktualisieren
+ if ( bMove && nTargetRegion == nSourceRegion && nSourceIdx != USHRT_MAX )
+ {
+ if(nTargetIdx == USHRT_MAX)
+ nTargetIdx = 0;
+ const SfxTemplateDirEntryPtr pEntry = rTargetDir[nSourceIdx];
+ rTargetDir.Insert(pEntry, nTargetIdx);
+ if(nTargetIdx < nSourceIdx)
+ ++nSourceIdx;
+ rTargetDir.Remove(nSourceIdx);
+ return SaveDir(rTargetDir);
+ }
+
+ if(nTargetIdx == USHRT_MAX)
+ nTargetIdx = rTargetDir.Count();
+ // Eintrag existiert bereits
+ if(SeekEntry_Impl(rTargetDir, pSourceEntry->GetLongName()))
+ return FALSE;
+ DirEntry aSource(pSourceEntry->GetFull());
+ DirEntry aDest(rTargetDir.GetPath());
+ MakeFileName_Impl(
+ aDest, rSourceDir[nSourceIdx]->GetLongName(), rTargetDir.IsDir());
+
+ // wenn aktuell das File geoeffnet ist,
+ // muss es hinterher wieder geoeffnet werden
+ SfxObjectShellRef xObjRef = pSourceEntry->GetObjectShell();
+ const BOOL bOpen = xObjRef.Is();
+ BOOL bOk = FALSE;
+ SvStorageRef aNewStor;
+ if(bOpen)
+ {
+ if(bMove)
+ {
+ xObjRef->DoHandsOff();
+ const FSysError eErrno = aSource.MoveTo(aDest);
+ bOk = FSYS_ERR_OK == eErrno;
+ }
+ else
+ {
+ // kopieren als speichern unter neuem Namen
+ aNewStor = new SvStorage(aDest.GetFull());
+ bOk = xObjRef->DoSaveAs(aNewStor);
+ // alten Storage wieder einsetzen -> Kopieren ist fertig
+ xObjRef->DoSaveCompleted( (SfxMedium*) 0 );
+ }
+ }
+ else
+ {
+ const FSysError eErrno =
+ bMove? aSource.MoveTo(aDest): aSource.CopyTo(aDest, FSYS_ACTION_COPYFILE);
+ bOk = FSYS_ERR_OK == eErrno;
+ }
+
+ if(bOk)
+ {
+ // neuen Eintrag einfuegen
+ // und Directory Eintraege schreiben
+ SfxTemplateDirEntryPtr pNewEntry = new SfxTemplateDirEntry(
+ rSourceDir[nSourceIdx]->GetLongName(),
+ aDest.GetName(),
+ rTargetDir);
+
+ rTargetDir.Insert(pNewEntry, nTargetIdx);
+ SaveDir(rTargetDir);
+
+ // gfs. alten Eintrag loeschen
+ if(bMove)
+ {
+ delete rSourceDir[nSourceIdx];
+ rSourceDir.Remove(nSourceIdx);
+ SaveDir(rSourceDir);
+
+ // Zielstorage einsetzen
+ if(bOpen)
+ {
+ // ObjectShell anlegen
+ const SfxObjectFactory &rFactory = SfxObjectFactory::GetDefaultFactory();
+ SfxObjectShellRef xObj =
+ rFactory.CreateObject(SFX_CREATE_MODE_ORGANIZER);
+ pNewEntry->SetObjectShell( xObj );
+ if ( xObj.Is() )
+ {
+ xObj->DoInitNew(0);
+ xObj->LoadFrom(aNewStor);
+ }
+ }
+ }
+ }
+ return bOk;
+}
+
+//------------------------------------------------------------------------
+
+BOOL SfxDocumentTemplates::Move
+(
+ USHORT nTargetRegion, // Index des Zielbereiches
+ USHORT nTargetIdx, // Index Zielposition
+ USHORT nSourceRegion, // Index des Quellbereiches
+ USHORT nSourceIdx /* Index der zu kopierenden / z uverschiebenden
+ Dokumentvorlage */
+)
+
+/* [Beschreibung]
+
+ Verschieben einer Dokumentvorlage
+
+
+ [R"uckgabewert]
+
+ BOOL TRUE
+ Aktion konnte ausgef"uhrt werden
+
+ FALSE
+ Aktion konnte nicht ausgef2uhrt werden
+
+ [Querverweise]
+
+ <SfxDocumentTemplates::CopyOrMove(USHORT,USHORT,USHORT,USHORT,BOOL)>
+*/
+{
+ DBG_ASSERT( pDirs, "not initialized" );
+ return CopyOrMove(nTargetRegion, nTargetIdx, nSourceRegion, nSourceIdx, TRUE);
+}
+
+//------------------------------------------------------------------------
+
+BOOL SfxDocumentTemplates::Copy
+(
+ USHORT nTargetRegion, // Index des Zielbereiches
+ USHORT nTargetIdx, // Index Zielposition
+ USHORT nSourceRegion, // Index des Quellbereiches
+ USHORT nSourceIdx /* Index der zu kopierenden / z uverschiebenden
+ Dokumentvorlage */
+)
+
+/* [Beschreibung]
+
+ Kopieren einer Dokumentvorlage
+
+
+ [R"uckgabewert]
+
+ BOOL TRUE
+ Aktion konnte ausgef"uhrt werden
+
+ FALSE
+ Aktion konnte nicht ausgef"uhrt werden
+
+ [Querverweise]
+
+ <SfxDocumentTemplates::CopyOrMove(USHORT,USHORT,USHORT,USHORT,BOOL)>
+*/
+
+{
+ return CopyOrMove(nTargetRegion, nTargetIdx, nSourceRegion, nSourceIdx, FALSE);
+}
+
+//------------------------------------------------------------------------
+
+BOOL SfxDocumentTemplates::CopyTo
+(
+ USHORT nRegion, /* Bereich der Vorlage, die exportiert werden
+ soll */
+ USHORT nIdx, /* Index der Vorlage, die exportiert werden
+ soll */
+ const String& rName /* Dateiname, unter dem die Vorlage angelegt
+ werden soll */
+) const
+
+/* [Beschreibung]
+
+ Exportieren einer Dokumentvorlage in das Dateisystem
+
+
+ [R"uckgabewert]
+
+ BOOL TRUE
+ Aktion konnte ausgef"uhrt werden
+
+ FALSE
+ Aktion konnte nicht ausgef"uhrt werden
+
+
+ [Querverweise]
+
+ <SfxDocumentTemplates::CopyFrom(USHORT,USHORT,String&)>
+*/
+
+{
+ DBG_ASSERT( pDirs, "not initialized" );
+ SfxTemplateDirEntry *pSourceDirectory = (*pDirs)[nRegion];
+ SfxTemplateDir &rSourceDir = pSourceDirectory->GetContent();
+ SfxTemplateDirEntry *pSourceEntry = rSourceDir[nIdx];
+ DirEntry aSource(pSourceEntry->GetFull());
+ DirEntry aDest(rName);
+ FSysError eErr = aSource.CopyTo(aDest, FSYS_ACTION_COPYFILE);
+ return FSYS_ERR_OK == eErr;
+}
+
+//------------------------------------------------------------------------
+
+BOOL SfxDocumentTemplates::CopyFrom
+(
+ USHORT nRegion, /* Bereich, in den die Vorlage importiert
+ werden soll */
+ USHORT nIdx, // Index der neuen Vorlage in diesem Bereich
+ String& rName /* Dateiname der Vorlage, die importiert
+ werden soll, als out-Parameter der (auto-
+ matisch aus dem Dateinamen generierte)
+ logische Name der Vorlage */
+)
+
+/* [Beschreibung]
+
+ Importieren einer Dokumentvorlage aus dem Dateisystem
+
+
+ [R"uckgabewert] Erfolg (TRUE) oder Mi"serfpTargetDirectory->GetContent());
+}
+
+
+//------------------------------------------------------------------------
+#pragmaolg (FALSE)
+
+ BOOL TRUE
+ Aktion konnte ausgef"uhrt werden
+
+ FALSE
+ Aktion konnte nicht ausgef"uhrt werden
+
+ [Querverweise]
+
+ <SfxDocumentTemplates::CopyTo(USHORT,USHORT,const String&)>
+*/
+
+{
+ DBG_ASSERT( pDirs, "not initialized" );
+ // Datei kopieren auf temp. Namen
+ // automatischen Namen erzeugen
+ // Vorlage in die Struktur einfuegen
+ // Struktur speichern
+ // Vorlage in die Listbox einfuegen (geschieht in der rufenden Funktion)
+ DirEntry aSource(rName);
+ SfxTemplateDirEntry *pTargetDirectory = (*pDirs)[nRegion];
+ SfxTemplateDir &rTargetDir=pTargetDirectory->GetContent();
+ DirEntry aTarget(pTargetDirectory->GetFull());
+ rName=aSource.GetBase();
+ MakeFileName_Impl(aTarget, rName, FALSE);
+
+ FSysError eErr = aSource.CopyTo(aTarget, FSYS_ACTION_COPYFILE);
+ if(FSYS_ERR_OK != eErr)
+ return FALSE;
+ rName = aSource.GetBase();
+ const SfxTemplateDirEntryPtr pNewEntry = new SfxTemplateDirEntry(rName,
+ aTarget.GetFull(), aTarget.GetPath());
+ rTargetDir.Insert(pNewEntry, nIdx+1);
+ return SaveDir(rTargetDir);
+}
+
+
+//------------------------------------------------------------------------
+
+BOOL SfxDocumentTemplates::KillDir
+(
+ SfxTemplateDir& rDir // das zu l"oschen de Directory
+)
+
+/* [Beschreibung]
+
+ "oschen des Verzeichnisses rDir incl. seines Inhaltes;
+ dies geschieht sowohl auf der Platte als auch in den Verwaltungsdaten.
+
+
+ [R"uckgabewert]
+
+ BOOL TRUE
+ Aktion konnte ausgef"uhrt werden
+
+ FALSE
+ Aktion konnte nicht ausgef"uhrt werden
+*/
+{
+ DBG_ASSERT( pDirs, "not initialized" );
+
+ // alle Vorlagen in dem Verzeichnis loeschen
+ USHORT i = 0;
+ BOOL bOk = TRUE;
+ while(i < rDir.Count())
+ {
+ SfxTemplateDirEntry *pEntry = rDir[i];
+ pEntry->DeleteObjectShell();
+ DirEntry aFile(pEntry->GetFull());
+ const FSysError eErr = aFile.Kill();
+ if(FSYS_ERR_OK == eErr || !aFile.Exists()) //! FSYS_ERR_NOTEXISTS == eErr)
+ {
+ rDir.Remove(i);
+ delete pEntry;
+ }
+ else
+ {
+ ++i;
+ bOk = FALSE;
+ }
+ }
+ if(bOk)
+ {
+ FSysError eErr = rDir.GetPath().Kill();
+ bOk = (FSYS_ERR_OK == eErr || !rDir.GetPath().Exists()); //!! FSYS_ERR_NOTEXISTS == eErr;
+ }
+ else
+ // bzw. im Fehlerfall aktualisieren
+ SaveDir(rDir);
+ return bOk;
+}
+
+//------------------------------------------------------------------------
+
+USHORT MakeRegionRelative_Impl
+(
+ USHORT* pDirCount, /* Array mit der Anzahl der Eintr"age eines
+ jeden Bereiches */
+ USHORT nRegion // der absolute Index
+)
+
+/* [Beschreibung]
+
+ Macht einen Eintrag relativ zu seinem Bereich
+
+
+ [R"uckgabewert]
+
+ USHORT der Index relativ zu seinem Bereich
+
+*/
+{
+ USHORT *pIter = pDirCount;
+ while(*pIter <= nRegion)
+ nRegion -= *pIter++;
+ return nRegion;
+}
+
+//------------------------------------------------------------------------
+
+BOOL SfxDocumentTemplates::Delete
+(
+ USHORT nRegion, // Index des Bereiches
+ USHORT nIdx /* Index des Eintrags oder USHRT_MAX,
+ wenn ein Verzeichnis gemeint ist. */
+)
+
+/* [Beschreibung]
+
+ "oschen eines Eintrags oder eines Verzeichnisses
+
+
+ [R"uckgabewert]
+
+ BOOL TRUE
+ Aktion konnte ausgef"uhrt werden
+
+ FALSE
+ Aktion konnte nicht ausgef"uhrt werden
+
+
+ [Querverweise]
+
+ <SfxDocumentTemplates::InsertDir(const String&,USHORT)>
+ <SfxDocumentTemplates::KillDir(SfxTemplateDir&)>
+ <SfxDocumentTemplates::SaveDir(SfxTemplateDir&)>
+*/
+
+{
+ DBG_ASSERT( pDirs, "not initialized" );
+
+ SfxTemplateDirEntry* pEntry = (*pDirs)[nRegion];
+ BOOL bOk = FALSE;
+
+ // handelt es sich im ein Verzeichnis?
+ if ( USHRT_MAX == nIdx )
+ {
+ bOk = KillDir( pEntry->GetContent() );
+ if ( bOk )
+ {
+/*!!! PB: #66330# nicht mehr n"otig, da jetzt die Template-Komponente verwendet wird
+ USHORT nIdx=nRegion;
+ USHORT *pIter = pDirCount;
+ while(*pIter <= nIdx)
+ nIdx -= *pIter++;
+ (*pIter)--;
+ DirEntry aFileName(pEntry->GetPath());
+ DirEntry aTplName( aFileName );
+ aTplName+=DirEntry(pDirFileName);
+ if( aTplName.Exists() )
+ {
+ SfxTemplateDir aDir(aFileName, TRUE);
+ SfxTemplateDirEntry *pTmpEntry = aDir[nIdx];
+ aDir.Remove(nIdx);
+ delete pTmpEntry;
+ bOk = SaveDir(aDir);
+ }
+ if ( bOk )
+*/
+ {
+ pDirs->Remove(nRegion);
+ delete pEntry;
+ }
+ }
+ }
+ else
+ {
+ // es handelt sich um eine einzelne Vorlage
+ SfxTemplateDir& rDir = pEntry->GetContent();
+ SfxTemplateDirEntry* pEntryToDelete = rDir[nIdx];
+ pEntryToDelete->DeleteObjectShell();
+ DirEntry aFile( pEntryToDelete->GetFull() );
+ const FSysError eErr = aFile.Kill();
+ if ( FSYS_ERR_OK == eErr || !aFile.Exists() ) //!!! FSYS_ERR_NOTEXISTS == eErr
+ {
+ rDir.Remove(nIdx);
+ bOk = SaveDir(rDir);
+ delete pEntryToDelete;
+ }
+ }
+ return bOk;
+}
+
+//------------------------------------------------------------------------
+
+BOOL SfxDocumentTemplates::InsertDir
+(
+ const String& rText, // der logische Name des neuen Bereiches
+ USHORT nRegion // Index des Bereiches
+)
+
+/* [Beschreibung]
+
+ Einf"ugen eines Verzeichnisses
+
+
+ [R"uckgabewert]
+
+ BOOL TRUE
+ Aktion konnte ausgef"uhrt werden
+
+ FALSE
+ Aktion konnte nicht ausgef"uhrt werden
+
+ [Querverweise]
+
+ <SfxDocumentTemplates::KillDir(SfxTemplateDir&)>
+ <SfxDocumentTemplates::SaveDir(SfxTemplateDir&)>
+*/
+{
+ DBG_ASSERT( pDirs, "not initialized" );
+
+ DirEntry aPath((*pDirs)[nRegion-1]->GetPath());
+ DirEntry aTmpName(aPath);
+ SfxTemplateDir aDir(aPath.GetFull(), TRUE);
+ MakeFileName_Impl(aTmpName, rText, TRUE);
+ String aName=aTmpName.GetName();
+ if( aName.GetChar(aName.Len()-1) == '.')
+ aName=String(aName,0,aName.Len()-1);
+ if(aTmpName.MakeDir())
+ {
+ SfxTemplateDirEntryPtr pEntry = new SfxTemplateDirEntry(
+ rText, aName, aTmpName.GetPath() );
+ pDirs->Insert(pEntry, nRegion);
+
+ // Directory-File im uebergeordneteten Directory aktualisieren
+
+ USHORT nLocalRegion=nRegion;
+ USHORT *pIter = pDirCount;
+ while(*pIter < nLocalRegion)
+ nLocalRegion -= *pIter++;
+
+ (*pIter)++;
+
+ aDir.Insert(pEntry, nLocalRegion);
+ SaveDir(pEntry->GetContent());
+
+ const BOOL bOk = SaveDir(aDir);
+
+
+ aDir.Remove(nLocalRegion);
+ if(!bOk)
+ {
+ pDirs->Remove(nRegion);
+ delete pEntry;
+ return FALSE;
+ }
+ return TRUE;
+ }
+ return FALSE;
+}
+
+//------------------------------------------------------------------------
+
+BOOL SfxDocumentTemplates::SetName
+(
+ const String& rName, // Der zu setzende Name
+ USHORT nRegion, // Index des Bereiches
+ USHORT nIdx /* Index des Eintrags oder USHRT_MAX,
+ wenn ein Verzeichnis gemeint ist. */
+)
+
+/* [Beschreibung]
+
+ "Andern des Namens eines Eintrags oder eines Verzeichnisses
+
+
+ [R"uckgabewert]
+
+ BOOL TRUE
+ Aktion konnte ausgef"uhrt werden
+
+ FALSE
+ Aktion konnte nicht ausgef"uhrt werden
+
+*/
+
+{
+ DBG_ASSERT( pDirs, "not initialized" );
+ SfxTemplateDirEntry *pEntry = (*pDirs)[nRegion];
+
+ // Vorlage wird umbenannt
+ if(USHRT_MAX != nIdx)
+ {
+ SfxTemplateDir &rDir = pEntry->GetContent();
+ pEntry = rDir[nIdx];
+ if(!pEntry->SetLongAndFileName(rName))
+ return FALSE;
+ SaveDir(rDir);
+ return TRUE;
+ }
+ else
+ {
+ if(!pEntry->SetLongAndFileName(rName))
+ return FALSE;
+
+ // Verzeichnis einlesen und mit den neuen Daten speichern
+ SfxTemplateDir aDir(pEntry->GetPath(), TRUE);
+ if(aDir.IsDir())
+ aDir[MakeRegionRelative_Impl(pDirCount, nRegion)]->SetLongName(rName);
+ aDir[MakeRegionRelative_Impl(pDirCount, nRegion)]->SetFileName(
+ pEntry->GetFileName());
+ SaveDir(aDir);
+ return TRUE;
+ }
+}
+
+//------------------------------------------------------------------------
+
+BOOL SfxDocumentTemplates::Rescan()
+
+/* [Beschreibung]
+
+ Abgleich des Verwaltungsdaten mit dem aktuellen Zustand auf der Platte.
+ Die logischen Namen, zu denen keine Datei mit existiert, werden aus
+ der Verwaltungsstruktur entfernt; Dateien, zu denen kein Eintrag
+ existiert, werden aufgenommen.
+
+
+ [R"uckgabewert]
+
+ BOOL TRUE
+ Aktion konnte ausgef"uhrt werden
+
+ FALSE
+ Aktion konnte nicht ausgef"uhrt werden
+
+
+ [Querverweise]
+
+ <SfxTemplateDir::Scan(BOOL bDirectory, BOOL bSave)>
+ <SfxTemplateDir::Freshen(const SfxTemplateDir &rNew)>
+*/
+{
+ DBG_ASSERT( pDirs, "not initialized" );
+
+//(mba)/task SfxWaitCursor aWait;
+
+ const USHORT nCount = pDirs->Count();
+ BOOL bOk = TRUE;
+
+ USHORT i;
+ for(i = 0; i < nCount; ++i)
+ {
+ SfxTemplateDirEntry *pEntry = (*pDirs)[i];
+ SfxTemplateDir &rCntnt = pEntry->GetContent();
+ SfxTemplateDir aNew(rCntnt.GetPath());
+ aNew.Scan(FALSE);
+ if(rCntnt.Freshen(aNew))
+ bOk |= SaveDir(rCntnt);
+ }
+
+ USHORT nMax=aDirs.GetTokenCount(cDelim);
+ for(i=0;i<nMax;i++)
+ {
+ SfxTemplateDir *pOldDir = new SfxTemplateDir(
+ aDirs.GetToken(i, cDelim), TRUE, FALSE);
+ SfxTemplateDir *pNewDir = new SfxTemplateDir(
+ aDirs.GetToken(i, cDelim), TRUE, TRUE);
+ if(pOldDir->Freshen(*pNewDir))
+ bOk |= SaveDir(*pOldDir);
+ delete pNewDir;
+ delete pOldDir;
+ }
+
+ DELETEZ(pDirs);
+ DELETEZ(pDirCount);
+
+ Construct();
+
+ return bOk;
+}
+
+//------------------------------------------------------------------------
+
+SfxObjectShellRef SfxDocumentTemplates::CreateObjectShell
+(
+ USHORT nRegion, // Index des Bereiches
+ USHORT nIdx // Index des Eintrags
+)
+
+/* [Beschreibung]
+
+ Zugriff auf die DokumentShell eines Eintrags
+
+
+ [R"uckgabewert]
+
+ SfxObjectShellRef Referenz auf die ObjectShell
+
+
+ [Querverweise]
+
+ <SfxTemplateDirEntry::CreateObjectShell()>
+ <SfxDocumentTemplates::DeleteObjectShell(USHORT, USHORT)>
+*/
+
+{
+ DBG_ASSERT( pDirs, "not initialized" );
+ return (*pDirs)[nRegion]->GetContent()[nIdx]->CreateObjectShell();
+}
+
+//------------------------------------------------------------------------
+
+BOOL SfxDocumentTemplates::DeleteObjectShell
+(
+ USHORT nRegion, // Index des Bereiches
+ USHORT nIdx // Index des Eintrags
+)
+
+/* [Beschreibung]
+
+ Freigeben der ObjectShell eines Eintrags
+
+
+ [R"uckgabewert]
+
+ BOOL TRUE
+ Aktion konnte ausgef"uhrt werden
+
+ FALSE
+ Aktion konnte nicht ausgef"uhrt werden
+
+ [Querverweise]
+
+ <SfxTemplateDirEntry::DeleteObjectShell()>
+ <SfxDocumentTemplates::CreateObjectShell(USHORT, USHORT)>
+*/
+
+{
+ DBG_ASSERT( pDirs, "not initialized" );
+ return (*pDirs)[nRegion]->GetContent()[nIdx]->DeleteObjectShell();
+}
+
+//------------------------------------------------------------------------
+
+BOOL SfxDocumentTemplates::GetFull
+(
+ const String &rRegion, // Der Name des Bereiches
+ const String &rName, // Der Name der Vorlage
+ String &rPath // Out: Pfad + Dateiname
+)
+
+/* [Beschreibung]
+
+ Liefert Pfad + Dateiname zu der durch rRegion und rName bezeichneten
+ Vorlage
+
+
+ [R"uckgabewert]
+
+ BOOL TRUE
+ Aktion konnte ausgef"uhrt werden
+
+ FALSE
+ Aktion konnte nicht ausgef"uhrt werden
+
+
+ [Querverweise]
+
+ <SfxDocumentTemplates::GetLogicNames(const String&,String&,String&)>
+*/
+
+{
+ DBG_ASSERT( pDirs, "not initialized" );
+
+ const SfxTemplateDirEntry* pEntry = NULL;
+ const USHORT nCount = pDirs->Count();
+ BOOL bFQ = FALSE;
+ USHORT nPos = rRegion.Len();
+ while( --nPos != USHRT_MAX && rRegion.GetChar( nPos ) != '(' )
+ ;
+ if ( nPos != USHRT_MAX && rRegion.GetChar( USHORT(rRegion.Len() - 1) ) == ')' )
+ bFQ = TRUE;
+
+ for ( USHORT i = 0; i < nCount; ++i )
+ {
+ String aName;
+ if( bFQ )
+ aName = GetFullRegionName( i );
+ else
+ aName = GetRegionName( i );
+ if( aName == rRegion )
+ {
+ pEntry = (*pDirs)[i];
+ SfxTemplateDir& rDir = ( (SfxTemplateDirEntry*)pEntry )->GetContent();
+ pEntry = SeekEntry_Impl( rDir, rName );
+ if ( pEntry )
+ rPath = pEntry->GetFull().GetFull();
+ if ( pEntry || bFQ )
+ break;
+ }
+ }
+
+ return ( pEntry != NULL );
+}
+
+//------------------------------------------------------------------------
+
+BOOL SfxDocumentTemplates::GetLogicNames
+(
+ const String &rPath, // vollst"andiger Pfad zu der Vorlage
+ String &rRegion, // Out: der Bereichsname
+ String &rName // Out: der Vorlagenname
+) const
+
+/* [Beschreibung]
+
+ Liefert Pfad und logischen Namen zu der durch rPath bezeichneten
+ Vorlage
+
+ [R"uckgabewert]
+
+ BOOL TRUE
+ Aktion konnte ausgef"uhrt werden
+
+ FALSE
+ Aktion konnte nicht ausgef"uhrt werden
+
+
+ [Querverweise]
+
+ <SfxDocumentTemplates::GetFull(const String&,const String&,DirEntry&)>
+*/
+
+{
+ DBG_ASSERT( pDirs, "not initialized" );
+ DirEntry aPath(rPath);
+ aPath.ToAbs();
+ const DirEntry aPathTo(aPath.GetPath());
+ const DirEntry aFileName(aPath.GetName());
+
+ const SfxTemplateDirEntry *pEntry = 0;
+ const USHORT nCount = pDirs->Count();
+ for(USHORT i = 0; i < nCount; ++i)
+ {
+ SfxTemplateDirEntry *p = (*pDirs)[i];
+ if (p->GetFull() == aPathTo ) // GetFull, da Directory
+ {
+ pEntry = p;
+ break;
+ }
+ }
+ if(!pEntry)
+ return FALSE;
+ rRegion = pEntry->GetLongName();
+ SfxTemplateDir &rDir = ((SfxTemplateDirEntry *)pEntry)->GetContent();
+ pEntry = rDir.Find_Impl(aPath.GetFull());
+ if(pEntry)
+ rName = pEntry->GetLongName();
+ return pEntry != 0;
+}
+
+//------------------------------------------------------------------------
+
+SfxDocumentTemplates::SfxDocumentTemplates()
+
+/* [Beschreibung]
+
+ Konstruktor
+*/
+
+: aDirs(SFX_INIMANAGER()->Get(SFX_KEY_TEMPLATE_PATH)),
+ pDirs(0)
+{
+}
+
+//-------------------------------------------------------------------------
+
+void SfxDocumentTemplates::Construct()
+
+// verz"ogerter Aufbau der Verwaltungsdaten
+
+{
+ // schon von jemandem anders konstruiert?
+ if ( pDirs )
+ return;
+
+ pDirs = new SfxTemplateDir;
+ cDelim = ';'; // absichtlich hart verdrahtet
+ pDirCount = new USHORT [aDirs.GetTokenCount(cDelim)+1];
+ SfxTemplateDir *pTmp=CreateRootTemplateDir(pDirCount);
+ pDirs->Insert(pTmp,0);
+ pTmp->Remove(0, pTmp->Count()); // Loeschen der Pointer verhindern
+ delete pTmp;
+ DirEntry aDir(aDirs.GetToken(0,cDelim));
+ aDir+=DirEntry( String::CreateFromAscii( pMGName ) );
+ if(aDir.Exists())
+ {
+ if ( aDir.Kill() == ERRCODE_NONE )
+ Rescan();
+ }
+#if 0 //(dv)
+ CntAnchorRef xAnchor = new CntAnchor( NULL, ".component:Template/" );
+
+#ifdef TF_UCB
+ DBG_ERRORFILE( "GetInterface NIY!!!" );
+#else
+ if ( xAnchor->GetInterface() )
+ {
+ OpenNotifier_Impl aOpen( xAnchor, CNT_OPEN_FOLDERS );
+ while ( !aOpen.IsComplete() )
+ Application::Yield();
+ }
+#endif
+
+ for ( USHORT n=0; n<xAnchor->SubAnchorCount(); n++ )
+ {
+ CntAnchorRef xRegion = xAnchor->GetSubAnchor( n );
+ String aStr = xRegion->GetViewURL();
+ USHORT nPos = aStr.Search( '/' );
+ aStr.Cut(0,nPos+2); // .component:template/_ abschneiden
+
+ xRegion->Put( SfxVoidItem( WID_GETDATA ) );
+ const CntStringItem& rItem = (const CntStringItem&) xRegion->Get( WID_TITLE);
+
+ SfxTemplateDirEntry *pEntry = 0;
+ const USHORT nCount = pDirs->Count();
+ for( USHORT i = 0; i < nCount; ++i )
+ {
+ DirEntry aDir( (*pDirs)[i]->GetFull() );
+ String aName( aDir.GetFull( FSYS_STYLE_URL ) );
+ if( !aDir.IsCaseSensitive() )
+ aName.ToLower();
+
+ if ( aName == aStr )
+ {
+ pEntry = (*pDirs)[i];
+ break;
+ }
+ }
+
+ if( pEntry )
+ {
+ pEntry->SetLongName( rItem.GetValue() );
+ pEntry->SetAnchor( xRegion );
+ }
+ }
+#endif //(dv)
+}
+
+//------------------------------------------------------------------------
+SfxTemplateDir *SfxDocumentTemplates::CreateRootTemplateDir(USHORT *pIter, SfxTemplateDir **ppDirs, BOOL bScan ) const
+{
+ DBG_ASSERT( pDirs, "not initialized" );
+
+ SfxTemplateDir *pDirs=new SfxTemplateDir;
+ const USHORT nRegions = aDirs.GetTokenCount(cDelim);
+ BOOL bDelPPDirs=FALSE;
+ if(!ppDirs)
+ {
+ ppDirs = new SfxTemplateDir *[nRegions];
+ bDelPPDirs = TRUE;
+ }
+
+ // rueckwaerts einfuegen,
+ // da AutoPiloten die Wizard-Templates vorne erwarten, jedoch in den
+ // Standard-Pfad reinschreiben wollen
+ for(USHORT i = 0; i < nRegions; ++i)
+ {
+ ppDirs[i] = new SfxTemplateDir(aDirs.GetToken(i, cDelim), TRUE, bScan);
+ if(!ppDirs[i]->Count())
+ {
+ const String aStd(SfxResId(STR_STANDARD));
+ const DirEntry aStdPath(aDirs.GetToken(i, cDelim));
+ DirEntry aStandard(aStdPath);
+ aStandard.MakeDir();
+
+ SfxTemplateDirEntryPtr pStd =
+ new SfxTemplateDirEntry(aStd, String(), aStdPath,TRUE);
+
+ ppDirs[i]->Insert( pStd, 0);
+
+ SaveDir(pStd->GetContent());
+
+ SaveDir(*ppDirs[i]);
+
+ }
+
+ pDirs->Insert( ppDirs[i], 0 );
+ *pIter++ = ppDirs[i]->Count();
+ }
+
+ if(bDelPPDirs)
+ delete[]ppDirs;
+ return pDirs;
+}
+
+//------------------------------------------------------------------------
+
+SfxDocumentTemplates::~SfxDocumentTemplates()
+
+/* [Beschreibung]
+
+ Destruktor
+ Freigeben der Verwaltungsdaten
+*/
+
+{
+ DBG_ASSERT( pDirs, "not initialized" );
+ delete pDirs;
+ delete pDirCount;
+}
+
+// ------------------------------------------------------------------------
+// ------------------------------------------------------------------------
+// ------------------------------------------------------------------------
+struct LongNameListRec
+{
+ String maShortName;
+ String maLongName;
+
+ LongNameListRec( const String& rShort,
+ const String& rLong )
+ : maShortName( rShort )
+ , maLongName( rLong )
+ {}
+};
+
+// ------------------------------------------------------------------------
+LongNameList_Impl::LongNameList_Impl( const String& rDirName )
+{
+ String aName = rDirName;
+
+ aName.Append( FileName_Impl( TRUE ) );
+
+ mpNames = 0;
+
+ SfxMedium aMedium( aName, STREAM_STD_READ, TRUE );
+ SvStream *pStream = aMedium.GetInStream();
+
+ if ( pStream )
+ {
+ char cDir;
+ USHORT nCount, i;
+ ByteString aLongName; // logischer Name des Benutzers
+ ByteString aFileName; // Dateiname (ohne Pfad)
+ LongNameListRec *pNew;
+
+ if ( ! ReadHeader( *pStream ) )
+ return;
+
+ *pStream >> cDir;
+ *pStream >> nCount;
+
+ mpNames = new List( nCount, 10 );
+
+ CharSet eCharSet = pStream->GetStreamCharSet();
+
+ for( i = 0; i < nCount; ++i )
+ {
+ pStream->ReadByteString( aLongName );
+ pStream->ReadByteString( aFileName );
+ pNew = new LongNameListRec( String( aFileName, eCharSet ),
+ String( aLongName, eCharSet ) );
+ mpNames->Insert( pNew );
+ }
+ }
+}
+
+// ------------------------------------------------------------------------
+LongNameList_Impl::~LongNameList_Impl()
+{
+ if ( mpNames )
+ {
+ LongNameListRec *pData = (LongNameListRec *) mpNames->First();
+
+ while ( pData )
+ {
+ delete pData;
+ pData = (LongNameListRec *) mpNames->Next();
+ }
+
+ delete mpNames;
+ }
+}
+
+// ------------------------------------------------------------------------
+String LongNameList_Impl::GetLongName( const String& rShortName ) const
+{
+ String aLongName;
+ LongNameListRec *pData;
+
+ if ( mpNames )
+ pData = (LongNameListRec *) mpNames->First();
+ else
+ pData = NULL;
+
+ while ( pData )
+ {
+ if ( pData->maShortName == rShortName )
+ {
+ aLongName = pData->maLongName;
+ break;
+ }
+ else
+ pData = (LongNameListRec *) mpNames->Next();
+ }
+
+ return aLongName;
+}
+
+// ------------------------------------------------------------------------
+BOOL LongNameList_Impl::ReadHeader( SvStream& rStream ) const
+{
+ ByteString aHeader;
+ USHORT nUS = strlen( pHeader );
+ USHORT nVersion;
+ CharSet eCharSet;
+ char c;
+
+ rStream.Read( aHeader.AllocBuffer( nUS ), nUS );
+ rStream >> c >> nVersion >> nUS;
+
+ // CharSet einlesen und am Stream setzen
+ eCharSet = (CharSet)nUS;
+ rStream.SetStreamCharSet(eCharSet);
+
+ if( aHeader != pHeader )
+ return FALSE;
+ if( nVersion != VERSION )
+ return FALSE;
+
+ return TRUE;
+}
+
+
diff --git a/sfx2/source/doc/docvor.cxx b/sfx2/source/doc/docvor.cxx
new file mode 100644
index 000000000000..462ee1a9cd3a
--- /dev/null
+++ b/sfx2/source/doc/docvor.cxx
@@ -0,0 +1,1997 @@
+/*************************************************************************
+ *
+ * $RCSfile: docvor.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:32 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _SV_PRNSETUP_HXX //autogen
+#include <svtools/prnsetup.hxx>
+#endif
+#ifndef _VCL_CMDEVT_HXX //autogen
+#include <vcl/cmdevt.hxx>
+#endif
+#ifndef _SV_MENUBTN_HXX //autogen
+#include <vcl/menubtn.hxx>
+#endif
+#ifndef _SV_MSGBOX_HXX //autogen
+#include <vcl/msgbox.hxx>
+#endif
+#ifndef _SV_DRAG_HXX //autogen
+#include <vcl/drag.hxx>
+#endif
+#ifndef _SV_PRINT_HXX //autogen
+#include <vcl/print.hxx>
+#endif
+#ifndef _SFXSTYLE_HXX //autogen
+#include <svtools/style.hxx>
+#endif
+#ifndef _SFXSTRITEM_HXX //autogen
+#include <svtools/stritem.hxx>
+#endif
+#ifndef _SFXECODE_HXX
+#include <svtools/sfxecode.hxx>
+#endif
+#ifndef _EHDL_HXX
+#include <svtools/ehdl.hxx>
+#endif
+#include <tools/urlobj.hxx>
+#pragma hdrstop
+
+#include "helpid.hrc"
+#include "docvor.hxx"
+#include "docfac.hxx"
+#include "orgmgr.hxx"
+#include "doctempl.hxx"
+#include "templdlg.hxx"
+#include "sfxtypes.hxx"
+#include "app.hxx"
+#include "dispatch.hxx"
+#include "inimgr.hxx"
+#include "sfxresid.hxx"
+#include "iodlg.hxx"
+#include "doc.hrc"
+#include "sfx.hrc"
+#include "docvor.hrc"
+#include "docfilt.hxx"
+
+static const char cDelim = ':';
+BOOL SfxOrganizeListBox_Impl::bDropMoveOk=TRUE;
+
+//=========================================================================
+
+
+class SuspendAccel
+{
+public:
+ Accelerator* pAccel;
+
+ SuspendAccel( Accelerator* pA )
+ {
+ pAccel=pA;
+ GetpApp()->RemoveAccel( pAccel );
+ }
+ ~SuspendAccel()
+ {
+ GetpApp()->InsertAccel( pAccel );
+ }
+};
+
+//=========================================================================
+
+
+class SfxOrganizeDlg_Impl
+{
+friend class SfxTemplateOrganizeDlg;
+friend class SfxOrganizeListBox_Impl;
+
+ SuspendAccel *pSuspend;
+ SfxTemplateOrganizeDlg* pDialog;
+
+ SfxOrganizeListBox_Impl aLeftLb;
+ ListBox aLeftTypLb;
+
+ SfxOrganizeListBox_Impl aRightLb;
+ ListBox aRightTypLb;
+
+ OKButton aOkBtn;
+ MenuButton aEditBtn;
+ HelpButton aHelpBtn;
+ PushButton aFilesBtn;
+
+// FixedText aDefaultTemplateLabel;
+// FixedInfo aDefaultTemplate;
+
+ Accelerator aEditAcc;
+
+ String aLastDir;
+ SfxOrganizeMgr aMgr;
+ SfxOrganizeListBox_Impl*pFocusBox;
+ Printer* pPrt;
+
+ long Dispatch_Impl( USHORT nId );
+ String GetPath_Impl( BOOL bOpen, const String& rFileName );
+
+ DECL_LINK( GetFocus_Impl, SfxOrganizeListBox_Impl * );
+ DECL_LINK( LeftListBoxSelect_Impl, ListBox * );
+ DECL_LINK( RightListBoxSelect_Impl, ListBox * );
+ DECL_LINK( AccelSelect_Impl, Accelerator * );
+ DECL_LINK( MenuSelect_Impl, Menu * );
+ DECL_LINK( MenuActivate_Impl, Menu * );
+ DECL_LINK( AddFiles_Impl, Button * );
+ BOOL DontDelete_Impl( SvLBoxEntry *pEntry);
+ void OkHdl(Button *);
+
+public:
+ SfxOrganizeDlg_Impl( SfxTemplateOrganizeDlg* pParent,
+ SfxDocumentTemplates* pTempl );
+};
+
+//-------------------------------------------------------------------------
+
+SfxOrganizeDlg_Impl::SfxOrganizeDlg_Impl( SfxTemplateOrganizeDlg* pParent,
+ SfxDocumentTemplates* pTempl )
+: aHelpBtn( pParent, ResId( BTN_HELP ) ),
+ pDialog( pParent ),
+ aOkBtn( pParent, ResId( BTN_OK ) ),
+ aLeftTypLb( pParent, ResId( LB_LEFT_TYP ) ),
+ aRightTypLb( pParent, ResId( LB_RIGHT_TYP ) ),
+ aLeftLb( this, pParent, WB_BORDER | WB_TABSTOP | WB_HSCROLL, SfxOrganizeListBox_Impl::VIEW_TEMPLATES ),
+ aRightLb( this, pParent, WB_BORDER | WB_TABSTOP | WB_HSCROLL, SfxOrganizeListBox_Impl::VIEW_FILES ),
+ aFilesBtn( pParent, ResId( BTN_FILES ) ),
+ aEditAcc( ResId( ACC_EDIT ) ),
+ aEditBtn( pParent, ResId( BTN_EDIT ) ),
+ aMgr(&aLeftLb, &aRightLb, pTempl),
+ pFocusBox(0),
+ pPrt(0)
+{
+ aLeftLb.SetHelpId( HID_CTL_ORGANIZER_LEFT );
+ aRightLb.SetHelpId( HID_CTL_ORGANIZER_RIGHT );
+
+ SfxIniManager* pIniMgr = SFX_INIMANAGER();
+ String aWorkPath = pIniMgr->Get( SFX_KEY_WORK_PATH );
+ if ( aWorkPath.Len() )
+ {
+ INetURLObject aObj( aWorkPath, INET_PROT_FILE );
+ aObj.setFinalSlash();
+ aLastDir = aObj.GetMainURL();
+ }
+ else
+ {
+ // fallback
+ INetURLObject aObj( Application::GetAppFileName(), INET_PROT_FILE );
+ aObj.removeSegment();
+ aObj.setFinalSlash();
+ aLastDir = aObj.GetMainURL();
+ }
+
+ // die Ordner-Bitmaps haben als Maskenfarbe rot
+ Color aMaskColor( 0xFF, 0x00, 0x00 );
+ Bitmap aBitmapOpenedFolder(SfxResId( BMP_OPENED_FOLDER ));
+ Image aOpenedFolderBmp( aBitmapOpenedFolder, aMaskColor );
+ Bitmap aBitmapClosedFolder(SfxResId(BMP_CLOSED_FOLDER));
+ Image aClosedFolderBmp( aBitmapClosedFolder, aMaskColor );
+ // die Dokumenten-Bitmaps haben keine Maskenfarbe
+ Bitmap aBitmapOpenedDoc(SfxResId(BMP_OPENED_DOC) );
+ Image aOpenedDocBmp( aBitmapOpenedDoc );
+ Bitmap aBitmapClosedDoc(SfxResId( BMP_CLOSED_DOC) );
+ Image aClosedDocBmp( aBitmapClosedDoc );
+
+ aLeftLb.SetBitmaps(aOpenedFolderBmp, aClosedFolderBmp,
+ aOpenedDocBmp, aClosedDocBmp);
+ aRightLb.SetBitmaps(aOpenedFolderBmp, aClosedFolderBmp,
+ aOpenedDocBmp, aClosedDocBmp);
+
+ aEditBtn.GetPopupMenu()->SetSelectHdl( LINK( this, SfxOrganizeDlg_Impl, MenuSelect_Impl ) );
+ aEditBtn.GetPopupMenu()->SetActivateHdl( LINK( this, SfxOrganizeDlg_Impl, MenuActivate_Impl ) );
+ aEditAcc.SetSelectHdl( LINK( this, SfxOrganizeDlg_Impl, AccelSelect_Impl ) );
+ GetpApp()->InsertAccel( &aEditAcc );
+
+ aFilesBtn.SetClickHdl(
+ LINK(this,SfxOrganizeDlg_Impl, AddFiles_Impl));
+ aLeftTypLb.SetSelectHdl(
+ LINK(this, SfxOrganizeDlg_Impl, LeftListBoxSelect_Impl));
+ aRightTypLb.SetSelectHdl(
+ LINK(this, SfxOrganizeDlg_Impl, RightListBoxSelect_Impl));
+ aLeftLb.SetGetFocusHdl(
+ LINK(this, SfxOrganizeDlg_Impl, GetFocus_Impl));
+ aRightLb.SetGetFocusHdl(
+ LINK(this, SfxOrganizeDlg_Impl, GetFocus_Impl));
+ aLeftLb.SetPosSizePixel(pParent->LogicToPixel(Point(3, 6), MAP_APPFONT),
+ pParent->LogicToPixel(Size(94, 132), MAP_APPFONT));
+ aRightLb.SetPosSizePixel(pParent->LogicToPixel(Point(103, 6), MAP_APPFONT),
+ pParent->LogicToPixel(Size(94, 132), MAP_APPFONT));
+
+ Font aFont(aLeftLb.GetFont());
+ aFont.SetWeight(WEIGHT_NORMAL);
+ aLeftLb.SetFont(aFont);
+ aRightLb.SetFont(aFont);
+ const long nIndent = aLeftLb.GetIndent() / 2;
+ aLeftLb.SetIndent( (short)nIndent );
+ aRightLb.SetIndent( (short)nIndent );
+
+ aLeftLb.SetMgr(&aMgr);
+ aRightLb.SetMgr(&aMgr);
+ aLeftLb.Reset();
+ aRightLb.Reset();//SetModel(aLeftLb.GetModel());
+ aLeftLb.Show();
+ aRightLb.Show();
+ aLeftLb.EnableInplaceEditing(TRUE);
+ aRightLb.EnableInplaceEditing(TRUE);
+
+
+ aRightLb.SelectAll( FALSE );
+ aLeftLb.GrabFocus();
+}
+
+//=========================================================================
+
+BOOL QueryDelete_Impl(Window *pParent, // Parent der QueryBox
+ USHORT nId, // Resource Id
+ const String &rTemplateName) // Name der zu l"oschenden Vorlage
+/* [Beschreibung]
+
+ "oschabfrage
+
+*/
+{
+ SfxResId aResId( nId );
+ String aEntryText( aResId );
+ aEntryText.SearchAndReplaceAscii( "$1", rTemplateName );
+ QueryBox aBox( pParent, WB_YES_NO | WB_DEF_NO, aEntryText );
+ return RET_NO != aBox.Execute();
+}
+
+//-------------------------------------------------------------------------
+
+void ErrorDelete_Impl(Window *pParent, const String &rName)
+
+/* [Beschreibung]
+
+ Benutzerinformation, da"s die Vorlage rName nicht gel"oscht werden konnte
+
+*/
+{
+ String aText( SfxResId( STR_ERROR_DELETE_TEMPLATE ) );
+ aText.SearchAndReplaceAscii( "$1", rName );
+ ErrorBox( pParent, WB_OK, aText ).Execute();
+}
+
+
+//=========================================================================
+
+/* [Beschreibung]
+
+ Implementierungsklasse; Referenzklasse f"ur USHORT-Array
+
+*/
+
+struct ImpPath_Impl
+{
+ SvUShorts aUS;
+ USHORT nRef;
+
+ ImpPath_Impl();
+ ImpPath_Impl( const ImpPath_Impl& rCopy );
+};
+
+//-------------------------------------------------------------------------
+
+ImpPath_Impl::ImpPath_Impl() : aUS(5), nRef(1)
+{
+}
+
+//-------------------------------------------------------------------------
+
+ImpPath_Impl::ImpPath_Impl( const ImpPath_Impl& rCopy ) :
+
+ aUS ( (BYTE)rCopy.aUS.Count() ),
+ nRef( 1 )
+
+{
+ const USHORT nCount = rCopy.aUS.Count();
+
+ for ( USHORT i = 0; i < nCount; ++i )
+ aUS.Insert( rCopy.aUS[i], i );
+}
+
+//==========================================================================
+
+/* [Beschreibung]
+
+ Implementierungsklasse; Darstellung einer Position in der Outline-
+ Listbox als USHORT-Array; dieses beschreibt die Position jeweil
+ als relative Postion zum "ubergeordneten Eintrag
+
+*/
+class Path
+{
+ ImpPath_Impl *pData;
+ void NewImp();
+public:
+ Path(SvLBox *pBox, SvLBoxEntry *pEntry);
+ Path(const Path &rPath):
+ pData(rPath.pData)
+ {
+ ++pData->nRef;
+ }
+ const Path &operator=(const Path &rPath)
+ {
+ if(&rPath != this)
+ {
+ if(!--pData->nRef)
+ delete pData;
+ pData = rPath.pData;
+ pData->nRef++;
+ }
+ return *this;
+ }
+ ~Path()
+ {
+ if(!--pData->nRef)
+ delete pData;
+ }
+ USHORT Count() const { return pData->aUS.Count(); }
+ USHORT operator[]( USHORT i ) const
+ {
+ return i < Count()? pData->aUS[i]: INDEX_IGNORE;
+ }
+};
+
+//-------------------------------------------------------------------------
+
+Path::Path(SvLBox *pBox, SvLBoxEntry *pEntry) :
+ pData(new ImpPath_Impl)
+{
+ DBG_ASSERT(pEntry != 0, "EntryPtr ist NULL");
+ if(!pEntry)
+ return;
+ SvLBoxEntry *pParent = pBox->GetParent(pEntry);
+ do {
+ pData->aUS.Insert(pBox->GetModel()->GetRelPos(pEntry), 0);
+ if(0 == pParent)
+ break;
+ pEntry = pParent;
+ pParent = pBox->GetParent(pEntry);
+ } while(1);
+}
+
+//-------------------------------------------------------------------------
+
+void Path::NewImp()
+{
+ if(pData->nRef != 1)
+ {
+ pData->nRef--;
+ pData = new ImpPath_Impl(*pData);
+ }
+}
+
+//-------------------------------------------------------------------------
+
+void SfxOrganizeListBox_Impl::Command( const CommandEvent& rCEvt )
+{
+ if ( COMMAND_CONTEXTMENU == rCEvt.GetCommand())
+ {
+ PopupMenu* pMenu = pDlg->aEditBtn.GetPopupMenu();
+ pMenu->Execute( this, rCEvt.GetMousePosPixel() );
+ }
+ else
+ SvTreeListBox::Command(rCEvt);
+}
+
+BOOL SfxOrganizeListBox_Impl::NotifyQueryDrop(SvLBoxEntry *pEntry)
+
+/* [Beschreibung]
+
+ QueryDrop-Handler (SV); Funktionsweise kann der Wahrheits,
+ tabelle unten entnommen werden.
+
+
+ B D C1 C2 C3
+
+ Quelle 0 1 2 3 4
+ Ziel
+ 0 - +*** - - -
+ 1 - +*** [-]* + -
+ 2 - - [-] p=p +** -
+ 3 - - - p=p +** p=p && pp=pp +
+ 4 - - - - p=p && pp=pp +
+ ----
+ * Problem Move; logische Bereiche koennen nicht geloescht werden
+ ** p = Parent -> p=p: identische Parents
+ pp = ParentParent
+ *** geht bei Vorlagen
+*/
+{
+ if(!pEntry)
+ return FALSE;
+ SvLBox *pSource = GetSourceView();
+ SvLBoxEntry *pSourceEntry = pSource->FirstSelected();
+ if(pEntry == pSourceEntry)
+ return FALSE;
+ USHORT nSourceLevel = pSource->GetModel()->GetDepth(pSourceEntry);
+ if(VIEW_FILES == ((SfxOrganizeListBox_Impl *)pSource)->GetViewType())
+ ++nSourceLevel;
+ USHORT nTargetLevel = GetModel()->GetDepth(pEntry);
+ if(VIEW_FILES == GetViewType())
+ ++nTargetLevel;
+ Path aSource(pSource, pSourceEntry);
+ Path aTarget(this, pEntry);
+ const USHORT SL = ((SfxOrganizeListBox_Impl *)pSource)->GetDocLevel();
+ const USHORT TL = GetDocLevel();
+
+ return( (nSourceLevel == 1 && nTargetLevel == 0 &&
+ VIEW_TEMPLATES ==
+ ((SfxOrganizeListBox_Impl *)pSource)->GetViewType()) ||
+ (nSourceLevel == 1 && nTargetLevel == 1 &&
+ VIEW_TEMPLATES ==
+ ((SfxOrganizeListBox_Impl *)pSource)->GetViewType() &&
+ VIEW_TEMPLATES == GetViewType()) ||
+ (nSourceLevel == 3 && nTargetLevel == 1) ||
+ (nSourceLevel == 3 && nTargetLevel == 2 &&
+ aSource[1+SL] == aTarget[1+TL]) ||
+ (nSourceLevel == 3 && nTargetLevel == 3 &&
+ aSource[1+SL] == aTarget[1+TL]) ||
+ (nSourceLevel == 4 && nTargetLevel == 3 &&
+ aSource[1+SL] == aTarget[1+TL] &&
+ aSource[2+SL] == aTarget[2+TL]) ||
+ (nSourceLevel == 4 && nTargetLevel == 4 &&
+ aSource[1+SL] == aTarget[1+TL] &&
+ aSource[2+SL] == aTarget[2+TL]));
+}
+
+//-------------------------------------------------------------------------
+
+SvLBoxEntry *GetIndices_Impl(SvLBox *pBox,
+ SvLBoxEntry *pEntry,
+ USHORT &rRegion,
+ USHORT &rOffset)
+/* [Beschreibung]
+
+ Bereich und Position innerhalb eines Bereiches f"ur eine
+ Dokumentvorlage wird ermittelt.
+
+ [Parameter]
+
+ SvLBox *pBox Listbox, an der das Ereignis auftrat
+ SvLBoxEntry *pEntry Eintrag, dessen Position ermittelt werden soll
+ USHORT &rRegion der Bereich innerhalb der Bereiche der
+ Dokumentvorlagen (Out-Parameter)
+ USHORT &rOffset die Position innerhalb des Bereiches
+ Dokumentvorlagen (Out-Parameter)
+
+ [Querverweise]
+
+ <class Path> (unter Umst"anden kann auf diese Funktion zugunsten
+ von Path verzichtet werden.)
+
+*/
+
+{
+ if(!pEntry)
+ {
+ rRegion = rOffset = 0;
+ return pEntry;
+ }
+ if(0 == pBox->GetModel()->GetDepth(pEntry))
+ {
+ rRegion = (USHORT)pBox->GetModel()->GetRelPos(pEntry);
+ rOffset = USHRT_MAX;
+ return pEntry;
+ }
+ SvLBoxEntry *pParent = pBox->GetParent(pEntry);
+ rRegion = (USHORT)pBox->GetModel()->GetRelPos(pParent);
+ rOffset = (USHORT)pBox->GetModel()->GetRelPos(pEntry);
+ return pEntry;
+}
+
+//-------------------------------------------------------------------------
+
+BOOL SfxOrganizeListBox_Impl::Select( SvLBoxEntry* pEntry, BOOL bSelect )
+{
+ if(!bSelect)
+ return SvTreeListBox::Select(pEntry,bSelect);
+ USHORT nLevel = GetDocLevel();
+ if(GetModel()->GetDepth(pEntry)+nLevel<3)
+ return SvTreeListBox::Select(pEntry,bSelect);
+
+ Path aPath(this, pEntry);
+ GetObjectShell(aPath)->TriggerHelpPI(
+ aPath[nLevel+1], aPath[nLevel+2], aPath[nLevel+3]);
+ return SvTreeListBox::Select(pEntry,bSelect);
+}
+
+DragDropMode SfxOrganizeListBox_Impl::NotifyBeginDrag(SvLBoxEntry *pSourceEntry)
+/* [Beschreibung]
+
+ Was fuer DragActions sind an dieser Stelle erlaubt.
+ Fuer Dokumentinhalte darf nur kopiert, nicht verschoben werden.
+*/
+{
+ USHORT nSourceLevel = GetModel()->GetDepth(pSourceEntry);
+ if(VIEW_FILES == GetViewType())
+ ++nSourceLevel;
+ if(nSourceLevel>=2)
+ {
+ bDropMoveOk=FALSE;
+ return GetDragDropMode();
+ }
+ else
+ {
+ bDropMoveOk=TRUE;
+ return GetDragDropMode();
+ }
+
+}
+
+//-------------------------------------------------------------------------
+
+BOOL SfxOrganizeListBox_Impl::IsStandard_Impl( SvLBoxEntry *pEntry) const
+{
+ String aStd(SfxResId(STR_STANDARD));
+ aStd.ToUpperAscii();
+ String aEntry = GetEntryText(pEntry);
+ aEntry.ToUpperAscii();
+ return !GetModel()->GetDepth(pEntry) &&
+ aEntry.Match(aStd)>=aStd.Len();
+}
+
+//-------------------------------------------------------------------------
+
+BOOL SfxOrganizeListBox_Impl::MoveOrCopyTemplates(SvLBox *pSourceBox,
+ SvLBoxEntry *pSource,
+ SvLBoxEntry* pTarget,
+ SvLBoxEntry *&pNewParent,
+ ULONG &rIdx,
+ BOOL bCopy)
+/* [Beschreibung]
+
+ Verschieben oder Kopieren von Dokumentvorlagen
+
+ [Parameter]
+
+ SvLBox *pSourceBox Quell-Listbox, an der das Ereignis auftrat
+ SvLBoxEntry *pSource Quell-Eintrag, der kopiert / verschoben werden soll
+ SvLBoxEntry* pTarget Ziel-Eintrag, auf den verschoben werden soll
+ SvLBoxEntry *&pNewParent der Parent der an der Zielposition erzeugten
+ Eintrags (Out-Parameter)
+ ULONG &rIdx Index des Zieleintrags
+ BOOL bCopy Flag f"ur Kopieren / Verschieben
+
+
+ [Returnwert] BOOL: Erfolg oder Mi"serfolg
+
+ [Querverweise]
+
+ <SfxOrganizeListBox_Impl::MoveOrCopyContents(SvLBox *pSourceBox,
+ SvLBoxEntry *pSource,
+ SvLBoxEntry* pTarget,
+ SvLBoxEntry *&pNewParent,
+ ULONG &rIdx,
+ BOOL bCopy)>
+ <BOOL SfxOrganizeListBox_Impl::NotifyMoving(SvLBoxEntry *pTarget,
+ SvLBoxEntry* pSource,
+ SvLBoxEntry *&pNewParent,
+ ULONG &rIdx)>
+ <BOOL SfxOrganizeListBox_Impl::NotifyCopying(SvLBoxEntry *pTarget,
+ SvLBoxEntry* pSource,
+ SvLBoxEntry *&pNewParent,
+ ULONG &rIdx)>
+*/
+
+{
+ BOOL bOk = FALSE;
+
+ if(pSource)
+ {
+ USHORT nTargetRegion = 0, nTargetIndex = 0;
+ GetIndices_Impl(this, pTarget, nTargetRegion, nTargetIndex);
+
+ USHORT nSourceRegion = 0, nSourceIndex = 0;
+ GetIndices_Impl(pSourceBox, pSource, nSourceRegion, nSourceIndex);
+
+ bOk = bCopy ?
+ pMgr->Copy(nTargetRegion, nTargetIndex+1,
+ nSourceRegion, nSourceIndex):
+ pMgr->Move(nTargetRegion, nTargetIndex+1,
+ nSourceRegion, nSourceIndex);
+
+ if(bOk)
+ {
+ if(pSourceBox->GetModel()->GetDepth(pSource) == GetModel()->GetDepth(pTarget))
+ {
+ pNewParent = GetParent(pTarget);
+ rIdx = GetModel()->GetRelPos(pTarget)+1;
+ }
+ else
+ {
+ if(nTargetIndex == USHRT_MAX)
+ {
+ pNewParent = pTarget;
+ rIdx = 0;
+ }
+ else
+ SvLBox::NotifyCopying(
+ pTarget, pSource, pNewParent, rIdx);
+ }
+ }
+ else
+ {
+ String aText( SfxResId( bCopy ? STR_ERROR_COPY_TEMPLATE : STR_ERROR_MOVE_TEMPLATE ) );
+ aText.SearchAndReplaceAscii( "$1",
+ ( (SvTreeListBox *)pSourceBox )->GetEntryText( pSource ) );
+ ErrorBox( this, WB_OK, aText ).Execute();
+ }
+ }
+ return bOk;
+}
+
+//-------------------------------------------------------------------------
+
+BOOL SfxOrganizeListBox_Impl::MoveOrCopyContents(SvLBox *pSourceBox,
+ SvLBoxEntry *pSource,
+ SvLBoxEntry* pTarget,
+ SvLBoxEntry *&pNewParent,
+ ULONG &rIdx,
+ BOOL bCopy)
+/* [Beschreibung]
+
+ Verschieben oder Kopieren von Dokumentinhalten
+
+ [Parameter]
+
+ SvLBox *pSourceBox Quell-Listbox, an der das Ereignis auftrat
+ SvLBoxEntry *pSource Quell-Eintrag, der kopiert / verschoben werden soll
+ SvLBoxEntry* pTarget Ziel-Eintrag, auf den verschoben werden soll
+ SvLBoxEntry *&pNewParent der Parent der an der Zielposition erzeugten
+ Eintrags (Out-Parameter)
+ ULONG &rIdx Index des Zieleintrags
+ BOOL bCopy Flag f"ur Kopieren / Verschieben
+
+
+ [Returnwert] BOOL: Erfolg oder Mi"serfolg
+
+ [Querverweise]
+
+ <SfxOrganizeListBox_Impl::MoveOrCopyTemplates(SvLBox *pSourceBox,
+ SvLBoxEntry *pSource,
+ SvLBoxEntry* pTarget,
+ SvLBoxEntry *&pNewParent,
+ ULONG &rIdx,
+ BOOL bCopy)>
+ <BOOL SfxOrganizeListBox_Impl::NotifyMoving(SvLBoxEntry *pTarget,
+ SvLBoxEntry* pSource,
+ SvLBoxEntry *&pNewParent,
+ ULONG &rIdx)>
+ <BOOL SfxOrganizeListBox_Impl::NotifyCopying(SvLBoxEntry *pTarget,
+ SvLBoxEntry* pSource,
+ SvLBoxEntry *&pNewParent,
+ ULONG &rIdx)>
+*/
+
+{
+ SfxErrorContext aEc( ERRCTX_SFX_MOVEORCOPYCONTENTS, this);
+ BOOL bOk = FALSE, bKeepExpansion = FALSE;
+ Path aSource(pSourceBox, pSource);
+ Path aTarget(this, pTarget);
+ SfxObjectShellRef aSourceDoc =
+ ((SfxOrganizeListBox_Impl *)pSourceBox)->GetObjectShell(aSource);
+
+ SfxObjectShellRef aTargetDoc = GetObjectShell(aTarget);
+ const USHORT nSLevel =
+ ((SfxOrganizeListBox_Impl *)pSourceBox)->GetDocLevel();
+ const USHORT nTLevel = GetDocLevel();
+
+ if(aSourceDoc.Is() && aTargetDoc.Is())
+ {
+ if (aSourceDoc->GetStyleSheetPool())
+ aSourceDoc->GetStyleSheetPool()->SetSearchMask(
+ SFX_STYLE_FAMILY_ALL, SFXSTYLEBIT_USERDEF | SFXSTYLEBIT_USED);
+
+ if (aTargetDoc->GetStyleSheetPool())
+ aTargetDoc->GetStyleSheetPool()->SetSearchMask(
+ SFX_STYLE_FAMILY_ALL, SFXSTYLEBIT_USERDEF | SFXSTYLEBIT_USED);
+ USHORT p[3];
+ USHORT nIdxDeleted = INDEX_IGNORE;
+ p[0]=aTarget[nTLevel+1];
+ p[1]=aTarget[nTLevel+2];
+ if(p[1]!=INDEX_IGNORE)p[1]++;
+ p[2]=aTarget[nTLevel+3];
+
+ bOk = aTargetDoc->Insert(
+ *aSourceDoc, aSource[nSLevel+1],
+ aSource[nSLevel+2], aSource[nSLevel+3],
+ p[0], p[1], p[2], nIdxDeleted);
+ // Positionskorrektur auswerten
+ // a = Dokumentinhalt
+ // b = Position Sub-Inhalt 1
+ // c = Position Sub-Inhalt 2
+ // doppelte Eintraege loeschen
+ if(bOk)
+ {
+ SvLBoxEntry *pParentIter = pTarget;
+ // bis auf die DokumentEbene nach oben als
+ // allgemeiner Bezugspunkt
+ while(GetModel()->GetDepth(pParentIter) != nTLevel)
+ pParentIter = GetParent(pParentIter);
+ if(pParentIter->HasChildsOnDemand() &&
+ !GetModel()->HasChilds(pParentIter))
+ RequestingChilds(pParentIter);
+ SvLBoxEntry *pChildIter = 0;
+
+ USHORT i = 0;
+ while(i < 2 && p[i+1] != INDEX_IGNORE)
+ {
+ pChildIter = FirstChild(pParentIter);
+ // bis zum Index der aktuellen Ebene
+ for(USHORT j = 0; j < p[i]; ++j)
+ pChildIter = NextSibling(pChildIter);
+ // gfs Fuellen bei Items onDemand
+ ++i;
+ if(p[i+1] != INDEX_IGNORE &&
+ pChildIter->HasChildsOnDemand() &&
+ !GetModel()->HasChilds(pChildIter))
+ RequestingChilds(pChildIter);
+ pParentIter = pChildIter;
+ }
+ rIdx = p[i];
+ pNewParent = pParentIter;
+ if(!IsExpanded(pNewParent) &&
+ pNewParent->HasChildsOnDemand() &&
+ !GetModel()->HasChilds(pNewParent))
+ {
+ bOk = FALSE;
+ if(!bCopy)
+ pSourceBox->GetModel()->Remove(pSource);
+ }
+ // Geloeschte Eintraege entfernen
+ // (kann durch Ueberschreiben geschehen)
+ if(nIdxDeleted != INDEX_IGNORE)
+ {
+ pChildIter = FirstChild(pParentIter);
+ for(USHORT i = 0; i < nIdxDeleted; ++i)
+ pChildIter = NextSibling(pChildIter);
+ if( pChildIter && pChildIter != pSource )
+ {
+ bKeepExpansion = IsExpanded(pParentIter);
+ GetModel()->Remove(pChildIter);
+ }
+ else
+ bOk = FALSE;
+ }
+ if(!bCopy && &aSourceDoc != &aTargetDoc)
+ aSourceDoc->Remove(aSource[nSLevel+1],
+ aSource[nSLevel+2],
+ aSource[nSLevel+3]);
+ }
+ }
+// rIdx++;
+ return (rIdx != INDEX_IGNORE && bOk )
+ ? bKeepExpansion? (BOOL)2: TRUE: FALSE;
+}
+
+//-------------------------------------------------------------------------
+
+BOOL SfxOrganizeListBox_Impl::NotifyMoving(SvLBoxEntry *pTarget,
+ SvLBoxEntry* pSource,
+ SvLBoxEntry *&pNewParent,
+ ULONG &rIdx)
+
+/* [Beschreibung]
+
+ Benachrichtigung, da"s ein Eintrag verschoben werden soll
+ (SV-Handler)
+
+ [Parameter]
+
+ SvLBoxEntry* pTarget Ziel-Eintrag, auf den verschoben werden soll
+ SvLBoxEntry *pSource Quell-Eintrag, der verschoben werden soll
+ SvLBoxEntry *&pNewParent der Parent der an der Zielposition erzeugten
+ Eintrags (Out-Parameter)
+ ULONG &rIdx Index des Zieleintrags
+
+
+ [Returnwert] BOOL: Erfolg oder Mi"serfolg
+
+ [Querverweise]
+
+ <SfxOrganizeListBox_Impl::MoveOrCopyTemplates(SvLBox *pSourceBox,
+ SvLBoxEntry *pSource,
+ SvLBoxEntry* pTarget,
+ SvLBoxEntry *&pNewParent,
+ ULONG &rIdx,
+ BOOL bCopy)>
+ <SfxOrganizeListBox_Impl::MoveOrCopyContents(SvLBox *pSourceBox,
+ SvLBoxEntry *pSource,
+ SvLBoxEntry* pTarget,
+ SvLBoxEntry *&pNewParent,
+ ULONG &rIdx,
+ BOOL bCopy)>
+ <BOOL SfxOrganizeListBox_Impl::NotifyCopying(SvLBoxEntry *pTarget,
+ SvLBoxEntry* pSource,
+ SvLBoxEntry *&pNewParent,
+ ULONG &rIdx)>
+*/
+
+{
+ BOOL bOk = FALSE;
+ SvLBox *pSourceBox = GetSourceView();
+ if(pSourceBox->GetModel()->GetDepth(pSource) <= GetDocLevel() &&
+ GetModel()->GetDepth(pTarget) <= GetDocLevel())
+ bOk = MoveOrCopyTemplates(pSourceBox, pSource, pTarget,
+ pNewParent, rIdx, FALSE);
+ else
+ bOk = MoveOrCopyContents(pSourceBox, pSource, pTarget,
+ pNewParent, rIdx, FALSE);
+ return bOk;
+}
+
+//-------------------------------------------------------------------------
+
+BOOL SfxOrganizeListBox_Impl::NotifyCopying(SvLBoxEntry *pTarget,
+ SvLBoxEntry* pSource,
+ SvLBoxEntry *&pNewParent,
+ ULONG &rIdx)
+/* [Beschreibung]
+
+ Benachrichtigung, da"s ein Eintrag kopiert werden soll
+ (SV-Handler)
+
+ [Parameter]
+
+ SvLBoxEntry* pTarget Ziel-Eintrag, auf den kopiert werden soll
+ SvLBoxEntry *pSource Quell-Eintrag, der kopiert werden soll
+ SvLBoxEntry *&pNewParent der Parent der an der Zielposition erzeugten
+ Eintrags (Out-Parameter)
+ ULONG &rIdx Index des Zieleintrags
+
+
+ [Returnwert] BOOL: Erfolg oder Mi"serfolg
+
+ [Querverweise]
+
+ <SfxOrganizeListBox_Impl::MoveOrCopyTemplates(SvLBox *pSourceBox,
+ SvLBoxEntry *pSource,
+ SvLBoxEntry* pTarget,
+ SvLBoxEntry *&pNewParent,
+ ULONG &rIdx,
+ BOOL bCopy)>
+ <SfxOrganizeListBox_Impl::MoveOrCopyContents(SvLBox *pSourceBox,
+ SvLBoxEntry *pSource,
+ SvLBoxEntry* pTarget,
+ SvLBoxEntry *&pNewParent,
+ ULONG &rIdx,
+ BOOL bCopy)>
+ <BOOL SfxOrganizeListBox_Impl::NotifyMoving(SvLBoxEntry *pTarget,
+ SvLBoxEntry* pSource,
+ SvLBoxEntry *&pNewParent,
+ ULONG &rIdx)>
+*/
+{
+ BOOL bOk = FALSE;
+ SvLBox *pSourceBox = GetSourceView();
+ if(pSourceBox->GetModel()->GetDepth(pSource) <= GetDocLevel() &&
+ GetModel()->GetDepth(pTarget) <= GetDocLevel())
+ bOk = MoveOrCopyTemplates(pSourceBox, pSource, pTarget,
+ pNewParent, rIdx, TRUE);
+ else
+ bOk = MoveOrCopyContents(pSourceBox, pSource, pTarget,
+ pNewParent, rIdx, TRUE );
+ return bOk;
+}
+
+//-------------------------------------------------------------------------
+
+BOOL SfxOrganizeListBox_Impl::EditingEntry( SvLBoxEntry* pEntry, Selection& )
+
+/* [Beschreibung]
+
+ Nachfrage, ob ein Eintrag editierbar ist
+ (SV-Handler)
+
+ [Querverweise]
+ <SfxOrganizeListBox_Impl::EditedEntry(SvLBoxEntry* pEntry, const String& rText)>
+*/
+
+{
+ if( VIEW_TEMPLATES == eViewType &&
+ GetModel()->GetDepth(pEntry) < 2 && !IsStandard_Impl(pEntry))
+ {
+ pDlg->pSuspend=new SuspendAccel(&pDlg->aEditAcc);
+ return TRUE;
+ }
+ return FALSE;
+}
+
+//-------------------------------------------------------------------------
+
+BOOL SfxOrganizeListBox_Impl::EditedEntry(SvLBoxEntry* pEntry, const String& rText)
+
+/* [Beschreibung]
+
+ Der Name eines Eintrags wurde bearbeitet; ist der eingegebene Name
+ ein g"ultiger Name ("ange > 0), wird das Model aktualisiert.
+ (SV-Handler)
+
+ [Returnwert]
+
+ BOOL TRUE: der Name soll in der Anzeige ge"andert werden
+ FALSE:der Name soll nicht ge"andert werden
+
+ [Querverweise]
+ <SfxOrganizeListBox_Impl::EditingEntry(SvLBoxEntry* pEntry, const String& rText)>
+*/
+
+{
+ DBG_ASSERT(pEntry, "kein Entry selektiert");
+ delete pDlg->pSuspend;
+ pDlg->pSuspend=0;
+ SvLBoxEntry* pParent = GetParent(pEntry);
+ if( !rText.Len() )
+ {
+ ErrorBox aBox( this, SfxResId( MSG_ERROR_EMPTY_NAME ) );
+ aBox.GrabFocus();
+ aBox.Execute();
+ return FALSE;
+ }
+ if ( !IsUniqName_Impl( rText, pParent, pEntry ) )
+ {
+ ErrorBox aBox( this, SfxResId( MSG_ERROR_UNIQ_NAME ) );
+ aBox.GrabFocus();
+ aBox.Execute();
+ return FALSE;
+ }
+ USHORT nRegion = 0, nIndex = 0;
+ GetIndices_Impl( this, pEntry, nRegion, nIndex );
+ String aOldName;
+ if ( USHRT_MAX != nIndex )
+ aOldName = pMgr->GetTemplates()->GetName( nRegion, nIndex );
+ else
+ aOldName = pMgr->GetTemplates()->GetRegionName( nRegion );
+
+ if ( !pMgr->SetName( rText, nRegion, nIndex ) )
+ {
+ SfxResId aResId( USHRT_MAX != nIndex ? MSG_ERROR_RENAME_TEMPLATE
+ : MSG_ERROR_RENAME_TEMPLATE_REGION );
+ ErrorBox( this, aResId ).Execute();
+ return FALSE;
+ }
+ else
+ {
+ SfxTemplateOrganizeDlg* pDlg = (SfxTemplateOrganizeDlg*)Window::GetParent();
+ }
+ return TRUE;
+}
+
+//-------------------------------------------------------------------------
+
+BOOL SfxOrganizeListBox_Impl::Drop( DropEvent& rEvt )
+
+/* [Beschreibung]
+
+ Drop Handler; wird verwendet, um in der Dokumentenansicht weitere
+ Dokumente per Drag&Drop hinzuf"ugen zu k"onnen
+ (SV-Handler)
+
+ [Returnwert]
+
+ BOOL Erfolg oder Mi"serfolg
+
+ [Querverweise]
+ <SfxOrganizeListBox_Impl::QueryDrop(DropEvent& rEvt)>
+*/
+
+{
+ const USHORT nCount = DragServer::GetItemCount();
+ BOOL bSuccess = FALSE;
+ for ( USHORT i = 0; i < nCount; ++i )
+ {
+ const String aFileName( DragServer::PasteFile(i) );
+ if ( !aFileName.Len() )
+ continue;
+ INetURLObject aObj( aFileName, INET_PROT_FILE );
+ bSuccess |= pMgr->InsertFile( this, aObj.GetMainURL() );
+ }
+ bDropMoveOk = TRUE;
+ return bSuccess ? bSuccess : SvTreeListBox::Drop( rEvt );
+}
+
+//-------------------------------------------------------------------------
+
+BOOL SfxOrganizeListBox_Impl::QueryDrop( DropEvent& rEvt )
+
+/* [Beschreibung]
+
+ QueryDrop Handler; wird verwendet, um in der Dokumentenansicht weitere
+ Dokumente per Drag&Drop hinzuf"ugen zu k"onnen
+ (SV-Handler)
+
+ [Returnwert]
+
+ BOOL Erfolg oder Mi"serfolg
+
+ [Querverweise]
+ <SfxOrganizeListBox_Impl::Drop(DropEvent& rEvt)>
+*/
+
+{
+
+/* if(rEvt.GetAction()==DROP_MOVE && !bDropMoveOk)
+ return FALSE;*/
+ if( rEvt.IsDefaultAction() )
+ rEvt.SetAction( DROP_COPY );
+ return eViewType == VIEW_FILES && DragServer::HasFormat(0, FORMAT_FILE)
+ ? TRUE : SvTreeListBox::QueryDrop(rEvt);
+}
+
+//-------------------------------------------------------------------------
+
+inline USHORT SfxOrganizeListBox_Impl::GetDocLevel() const
+
+/* [Beschreibung]
+
+ Ermittelt, auf welche Ebene sich Dokumente befinden (unterschiedlich
+ in der Dokumentvorlagensicht und der Dokumentensicht)
+
+ [Returnwert]
+
+ USHORT Die Ebene der Dokumente
+
+*/
+
+{
+ return eViewType == VIEW_FILES? 0: 1;
+}
+
+//-------------------------------------------------------------------------
+
+SfxObjectShellRef SfxOrganizeListBox_Impl::GetObjectShell(const Path &rPath)
+
+/* [Beschreibung]
+
+ Zugriff auf die ObjectShell, die dem aktuellen Eintrag zugeordnet
+ ist.
+
+ [Parameter]
+
+ const Path &rPath Beschreibung des aktuellen Eintrags
+
+ [Returnwert]
+
+ SfxObjectShellRef Referenz auf die ObjectShell
+
+ [Querverweise]
+
+ <class Path>
+
+*/
+
+{
+ SfxObjectShellRef aDoc;
+ if(eViewType == VIEW_FILES)
+ aDoc = pMgr->CreateObjectShell(rPath[0]);
+ else
+ aDoc = pMgr->CreateObjectShell(rPath[0], rPath[1]);
+ return aDoc;
+}
+
+//-------------------------------------------------------------------------
+
+void SfxOrganizeListBox_Impl::RequestingChilds( SvLBoxEntry* pEntry )
+
+/* [Beschreibung]
+
+ Aufforderung, der Childs eines Eintrags einzuf"ugen
+ ist.
+ (SV-Handler)
+
+ [Parameter]
+
+ SvLBoxEntry* pEntry der Eintrag, dessen Childs erfragt werden
+
+
+*/
+
+{
+ // wenn keine Childs vorhanden sind, gfs. Childs
+ // einfuegen
+ if(!GetModel()->HasChilds(pEntry))
+ {
+ // hier sind alle initial eingefuegt
+ SfxErrorContext aEc(ERRCTX_SFX_CREATEOBJSH, pDlg->pDialog);
+ if(VIEW_TEMPLATES == GetViewType() && 0 == GetModel()->GetDepth(pEntry))
+ {
+ USHORT i = (USHORT)GetModel()->GetRelPos(pEntry);
+ const USHORT nEntryCount = pMgr->GetTemplates()->GetCount(i);
+ for(USHORT j = 0; j < nEntryCount; ++j)
+ InsertEntry( pMgr->GetTemplates()->GetName( i, j ),
+ aOpenedDocBmp, aClosedDocBmp, pEntry, TRUE );
+ }
+ else
+ {
+ const USHORT nDocLevel = GetDocLevel();
+ Path aPath(this, pEntry);
+ SfxObjectShellRef aRef = GetObjectShell(aPath);
+ if(aRef.Is())
+ {
+ const USHORT nCount = aRef->GetContentCount(
+ aPath[nDocLevel+1], aPath[nDocLevel+2]);
+ String aText;
+ Bitmap aClosedBmp, aOpenedBmp;
+ const BOOL bCanHaveChilds =
+ aRef->CanHaveChilds(aPath[nDocLevel+1],
+ aPath[nDocLevel+2]);
+ for(USHORT i = 0; i < nCount; ++i)
+ {
+ BOOL bDeletable;
+ aRef->GetContent(
+ aText, aClosedBmp, aOpenedBmp, bDeletable,
+ i, aPath[nDocLevel+1], aPath[nDocLevel+2]);
+ SvLBoxEntry *pNew=InsertEntry(
+ aText, aOpenedBmp, aClosedBmp,
+ pEntry, bCanHaveChilds);
+ pNew->SetUserData(bDeletable ? &bDeletable : 0);
+ }
+ }
+ }
+ }
+}
+
+//-------------------------------------------------------------------------
+
+long SfxOrganizeListBox_Impl::ExpandingHdl()
+
+/* [Beschreibung]
+
+ SV-Handler, der nach dem und vor dem Aufklappen eines Eintrags
+ gerufen wird.
+ Wird verwendet, um gfs. die ObjectShell wieder zu schlie"sen;
+ die Eintr"age mit den Inhalten dieser Shell werden ebenfalls
+ entfernt.
+
+*/
+
+{
+ if ( !(nImpFlags & SVLBOX_IS_EXPANDING) )
+ {
+ SvLBoxEntry* pEntry = GetHdlEntry();
+ const USHORT nLevel = GetModel()->GetDepth(pEntry);
+ if((eViewType == VIEW_FILES && nLevel == 0) ||
+ (eViewType == VIEW_TEMPLATES && nLevel == 1))
+ {
+ Path aPath(this, pEntry);
+ // Beim Schliessen des Files die ObjectShell freigeben
+ if(eViewType == VIEW_FILES && nLevel == 0)
+ pMgr->DeleteObjectShell(aPath[0]);
+ else
+ pMgr->DeleteObjectShell(aPath[0], aPath[1]);
+ // alle SubEntries loeschen
+ SvLBoxEntry *pToDel = SvLBox::GetEntry(pEntry, 0);
+ while(pToDel)
+ {
+ GetModel()->Remove(pToDel);
+ pToDel = SvLBox::GetEntry(pEntry, 0);
+ }
+ }
+ }
+ return TRUE;
+}
+
+//-------------------------------------------------------------------------
+
+BOOL SfxOrganizeListBox_Impl::IsUniqName_Impl(const String &rText,
+ SvLBoxEntry* pParent, SvLBoxEntry *pEntry) const
+
+/* [Beschreibung]
+
+ Pr"uft, ob eine Name auf seiner Ebene eindeutig ist.
+
+ [Parameter]
+
+ const String & Name des zu suchenden Eintrags
+ SvLBoxEntry* pSibling Geschwister (bezeichnet die Ebene)
+
+ [Returnwert]
+
+ BOOL TRUE, wenn der Name eindeutig ist, sonst FALSE
+*/
+
+{
+ SvLBoxEntry* pChild = FirstChild(pParent);
+ while(pChild) {
+ const String aEntryText(GetEntryText(pChild));
+ if(COMPARE_EQUAL == aEntryText.CompareIgnoreCaseToAscii(rText)&&(!pEntry || pEntry!=pChild))
+ return FALSE;
+ pChild = NextSibling(pChild);
+ }
+ return TRUE;
+}
+
+//-------------------------------------------------------------------------
+
+USHORT SfxOrganizeListBox_Impl::GetLevelCount_Impl(SvLBoxEntry* pParent) const
+{
+ SvLBoxEntry* pChild = FirstChild(pParent);
+ USHORT nCount = 0;
+ while(pChild) {
+ pChild = NextSibling(pChild);
+ ++nCount;
+ }
+ return nCount;
+}
+
+//-------------------------------------------------------------------------
+
+SfxOrganizeListBox_Impl::SfxOrganizeListBox_Impl(
+ SfxOrganizeDlg_Impl *pArgDlg, Window *pParent,
+ WinBits nBits, DataEnum eType)
+: SvTreeListBox(pParent, nBits), pMgr(0), eViewType(eType),
+ pDlg(pArgDlg)
+
+/* [Beschreibung]
+
+ Konstruktor SfxOrganizeListBox
+
+*/
+
+{
+ SetDragDropMode( SV_DRAGDROP_CTRL_MOVE |
+ SV_DRAGDROP_CTRL_COPY |
+ SV_DRAGDROP_APP_MOVE |
+ SV_DRAGDROP_APP_COPY |
+ SV_DRAGDROP_APP_DROP);
+// SetDragOptions(DROP_COPY);
+ SetEntryHeight( 16 );
+ SetSelectionMode(SINGLE_SELECTION);
+ EnableDrop();
+ GetModel()->SetSortMode(SortNone); // Bug in SvTools 303
+}
+
+//-------------------------------------------------------------------------
+
+void SfxOrganizeListBox_Impl::Reset()
+
+/* [Beschreibung]
+
+ Einf"ugen der Elemente in die ListBox
+
+*/
+
+{
+ DBG_ASSERT( pMgr != 0, "kein Manager" );
+ // Inhalte l"oschen
+ SetUpdateMode(FALSE);
+ Clear();
+ if ( VIEW_TEMPLATES == eViewType )
+ {
+ const USHORT nCount = pMgr->GetTemplates()->GetRegionCount();
+ for ( USHORT i = 0; i < nCount; ++i )
+ {
+ SvLBoxEntry* pEntry = InsertEntry( pMgr->GetTemplates()->GetFullRegionName(i),
+ aOpenedFolderBmp, aClosedFolderBmp, 0, TRUE );
+ }
+ }
+ else
+ {
+ const SfxObjectList& rList = pMgr->GetObjectList();
+ const USHORT nCount = rList.Count();
+ for ( USHORT i = 0; i < nCount; ++i )
+ InsertEntry( rList.GetBaseName(i), aOpenedDocBmp, aClosedDocBmp, 0, TRUE );
+
+ }
+ SetUpdateMode(TRUE);
+ Invalidate();
+ Update();
+}
+
+//-------------------------------------------------------------------------
+
+const Image &SfxOrganizeListBox_Impl::GetClosedBmp(USHORT nLevel) const
+
+/* [Beschreibung]
+
+ Zugriff auf die Bitmap f"ur einen geschlossenen Eintrag
+ der jeweiligen Ebene
+
+ [Parameter]
+
+ USHORT nLevel Angabe der Ebene, 2 Ebenen sind erlaubt
+
+ [Returnwert]
+
+ const Image & das Image auf der Ebenen nLevel
+
+*/
+
+{
+ switch(nLevel) {
+ case 0: return aClosedFolderBmp;
+ case 1: return aClosedDocBmp;
+ }
+ DBG_ERROR("Bitmaps ueberindiziert");
+ return aClosedFolderBmp;
+}
+
+//-------------------------------------------------------------------------
+
+const Image &SfxOrganizeListBox_Impl::GetOpenedBmp(USHORT nLevel) const
+
+/* [Beschreibung]
+
+ Zugriff auf die Bitmap f"ur einen ge"offneten Eintrag
+ der jeweiligen Ebene
+
+ [Parameter]
+
+ USHORT nLevel Angabe der Ebene, 2 Ebenen sind erlaubt
+
+ [Returnwert]
+
+ const Image & das Image auf der Ebenen nLevel
+
+*/
+
+{
+ switch(nLevel)
+ {
+ case 0:
+ return aOpenedFolderBmp;
+ case 1:
+ return aOpenedDocBmp;
+ }
+ DBG_ERROR("Bitmaps ueberindiziert");
+ return aClosedFolderBmp;
+}
+
+//-------------------------------------------------------------------------
+
+String SfxOrganizeDlg_Impl::GetPath_Impl( BOOL bOpen, const String& rFileName )
+
+/* [Beschreibung]
+
+ Pfad per FileDialog erfragen, f"ur Import / Export von
+ Dokumentvorlagen
+
+ [Parameter]
+
+ BOOL bOpen Flag: "Offnen / Speichern
+ const String& rFileName aktueller Dateiname als Vorschlag
+
+ [R"uckgabewert] Dateiname mit Pfad oder Leerstring, wenn
+ der Benutzer 'Abbrechen' gedr"uckt hat
+*/
+
+{
+ String aPath;
+ ULONG nBits = bOpen ? WB_OPEN | WB_3DLOOK : WB_SAVEAS | WB_3DLOOK;
+ SfxSimpleFileDialog* pFileDlg = new SfxSimpleFileDialog( pDialog, nBits );
+ pFileDlg->SetDefaultExt( DEFINE_CONST_UNICODE( "vor" ) );
+ pFileDlg->AddFilter( String( SfxResId( STR_FILTERNAME_ALL ) ), DEFINE_CONST_UNICODE( FILEDIALOG_FILTER_ALL ) );
+ const String aFilter( SfxResId( STR_TEMPLATE_FILTER ) );
+ pFileDlg->AddFilter( aFilter, DEFINE_CONST_UNICODE( "*.vor" ) );
+ pFileDlg->SetCurFilter( aFilter );
+ if ( aLastDir.Len() || rFileName.Len() )
+ {
+ INetURLObject aObj;
+ aObj.SetSmartProtocol( INET_PROT_FILE );
+ if ( aLastDir.Len() )
+ {
+ aObj.SetSmartURL( aLastDir );
+ if ( rFileName.Len() )
+ aObj.insertName( rFileName );
+ }
+ else
+ aObj.SetSmartURL( rFileName );
+ pFileDlg->SetPath( aObj.GetMainURL() );
+ }
+ if ( RET_OK == pFileDlg->Execute() )
+ {
+ aPath = pFileDlg->GetPath();
+ INetURLObject aObj( aPath );
+ aObj.removeSegment();
+ aLastDir = aObj.GetMainURL();
+ }
+ delete pFileDlg;
+ return aPath;
+}
+
+//-------------------------------------------------------------------------
+
+BOOL SfxOrganizeDlg_Impl::DontDelete_Impl( SvLBoxEntry *pEntry)
+{
+ USHORT nDepth = pFocusBox->GetModel()->GetDepth(pEntry);
+ if(SfxOrganizeListBox_Impl::VIEW_FILES ==
+ pFocusBox->GetViewType())
+ nDepth++;
+ if( nDepth > 2 && !pEntry->GetUserData() ||
+ //Delete ueber GetContent verboten
+ pFocusBox->IsStandard_Impl(pEntry) ||
+ //StandardVorlage nicht loeschen
+ nDepth==2 || //Vorlage / Konfigurtionsrubrik nicht loeshcen
+ (nDepth==1 && SfxOrganizeListBox_Impl::VIEW_FILES ==
+ pFocusBox->GetViewType()) || //Files nicht loeschen
+ (0 == nDepth && pFocusBox->GetLevelCount_Impl(0) < 2))
+ //Mindestens eine Vorlage behalten
+ return TRUE;
+ else
+ return FALSE;
+}
+
+long SfxOrganizeDlg_Impl::Dispatch_Impl(USHORT nId)
+
+/* [Beschreibung]
+
+ Verarbeiten der Events aus MenuButton oder Accelerator
+
+ [Parameter]
+
+ USHORT nId ID des Events
+
+ [R"uckgabewert] 1: Event wurde verarbeitet,
+ 0: Event wurde nicht verarbeitet (SV-Menu)
+
+*/
+
+{
+ SuspendAccel aTmp(&aEditAcc);
+ SvLBoxEntry *pEntry = pFocusBox? pFocusBox->FirstSelected(): 0;
+ switch(nId)
+ {
+ case ID_NEW:
+ {
+ if(!pEntry)
+ return 1;
+ if(pFocusBox->GetViewType() == SfxOrganizeListBox_Impl::VIEW_TEMPLATES)
+ {
+ if(0 == pFocusBox->GetModel()->GetDepth(pEntry))
+ {
+ const String aNoName( SfxResId(STR_NONAME) );
+ SvLBoxEntry* pParent = pFocusBox->GetParent(pEntry);
+ String aName(aNoName);
+ USHORT n = 1;
+ while(!pFocusBox->IsUniqName_Impl(aName, pParent))
+ {
+ aName = aNoName;
+ aName += String::CreateFromInt32( n++ );
+ }
+ aMgr.InsertDir( pFocusBox, aName,
+ (USHORT)pFocusBox->GetModel()->GetRelPos(pEntry)+1);
+ }
+ }
+ break;
+ }
+
+ case ID_DELETE:
+ {
+ if(!pEntry || DontDelete_Impl(pEntry))
+ return 1;
+ const USHORT nDepth = pFocusBox->GetModel()->GetDepth(pEntry);
+ if(nDepth < 2)
+ {
+ if(0 == nDepth && pFocusBox->GetLevelCount_Impl(0) < 2) return 1;
+ if(SfxOrganizeListBox_Impl::VIEW_TEMPLATES ==
+ pFocusBox->GetViewType())
+ {
+ USHORT nResId = nDepth? STR_DELETE_TEMPLATE :
+ STR_DELETE_REGION;
+ String aStd(SfxResId(STR_STANDARD));
+ aStd.ToUpperAscii();
+ String aStdText(pFocusBox->GetEntryText(pEntry));
+ aStdText.ToUpperAscii();
+ if(!nDepth && aStdText.Match(aStd)>=aStd.Len())
+ return 1;
+ if( !QueryDelete_Impl(
+ pDialog, nResId, pFocusBox->GetEntryText(pEntry)))
+ return 1;
+ if ( STR_DELETE_REGION == nResId &&
+ pFocusBox->GetChildCount(pEntry))
+ {
+ QueryBox aQBox(pDialog, SfxResId(MSG_REGION_NOTEMPTY));
+ if(RET_NO == aQBox.Execute())
+ return 1;
+ }
+ USHORT nRegion = 0, nIndex = 0;
+ GetIndices_Impl(pFocusBox, pEntry, nRegion, nIndex);
+ BOOL bResetDef=FALSE;
+
+ if ( !aMgr.Delete(
+ pFocusBox, nRegion,
+ STR_DELETE_REGION == nResId? USHRT_MAX: nIndex) )
+ ErrorDelete_Impl(
+ pDialog, pFocusBox->GetEntryText(pEntry));
+
+ }
+ }
+ // Inhaltsformen
+ else if(nDepth + pFocusBox->GetDocLevel() >= 2)
+ {
+ String aStd(SfxResId(STR_STANDARD));
+ aStd.ToUpperAscii();
+ String aStdText(pFocusBox->GetEntryText(pEntry));
+ aStdText.ToUpperAscii();
+ if(!nDepth && aStdText.Match(aStd)>=aStd.Len())
+ return 1;
+ if(!QueryDelete_Impl(pDialog, STR_DELETE_TEMPLATE, pFocusBox->GetEntryText(pEntry)))
+ return 1;
+ Path aPath(pFocusBox, pEntry);
+ SfxObjectShellRef aRef = pFocusBox->GetObjectShell(aPath);
+ if(aRef.Is() &&
+ aRef->Remove(aPath[1+pFocusBox->GetDocLevel()],
+ aPath[2+pFocusBox->GetDocLevel()],
+ aPath[3+pFocusBox->GetDocLevel()]))
+ pFocusBox->GetModel()->Remove(pEntry);
+ else
+ ErrorDelete_Impl(pDialog, pFocusBox->GetEntryText(pEntry));
+ }
+ break;
+ }
+
+ case ID_EDIT:
+ {
+ if(!pEntry)
+ return 1;
+ USHORT nRegion = 0, nIndex = 0;
+ GetIndices_Impl( pFocusBox, pEntry, nRegion, nIndex );
+ const SfxStringItem aName( SID_FILE_NAME, aMgr.GetTemplates()->GetPath( nRegion, nIndex ) );
+ const SfxStringItem aLongName( SID_FILE_LONGNAME, pFocusBox->GetEntryText( pEntry ) );
+ const SfxStringItem aReferer( SID_REFERER, DEFINE_CONST_UNICODE( "private:user" ) );
+
+ SFX_APP()->GetAppDispatcher_Impl()->Execute( SID_OPENTEMPLATE, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD,
+ &aName, &aLongName, &aReferer, 0L );
+ pDialog->EndDialog( RET_EDIT_STYLE );
+ break;
+ }
+
+ case ID_COPY_FROM:
+ {
+ if ( !pEntry )
+ return 1;
+ USHORT nRegion = 0, nIndex = 0;
+ GetIndices_Impl( pFocusBox, pEntry, nRegion, nIndex );
+ String aPath = GetPath_Impl( TRUE, String() );
+
+ if ( aPath.Len() && !aMgr.CopyFrom( pFocusBox, nRegion, nIndex, aPath ) )
+ {
+ String aText( SfxResId( STR_ERROR_COPY_TEMPLATE ) );
+ aText.SearchAndReplaceAscii( "$1", aPath );
+ ErrorBox( pDialog, WB_OK, aText ).Execute();
+ }
+ break;
+ }
+
+ case ID_COPY_TO:
+ {
+ if ( !pEntry )
+ return 1;
+ USHORT nRegion = 0, nIndex = 0;
+ GetIndices_Impl( pFocusBox, pEntry, nRegion, nIndex );
+ String aPath = GetPath_Impl( FALSE, aMgr.GetTemplates()->GetFileName( nRegion, nIndex ) );
+
+ if ( aPath.Len() && !aMgr.CopyTo( nRegion, nIndex, aPath ) )
+ {
+ String aText( SfxResId( STR_ERROR_COPY_TEMPLATE ) );
+ aText.SearchAndReplaceAscii( "$1", aPath );
+ ErrorBox( pDialog, WB_OK, aText ).Execute();
+ }
+ break;
+ }
+
+ case ID_RESCAN:
+ if ( !aMgr.Rescan() )
+ ErrorBox( pDialog, SfxResId( MSG_ERROR_RESCAN ) ).Execute();
+ if ( SfxOrganizeListBox_Impl::VIEW_TEMPLATES == aLeftLb.GetViewType() )
+ aLeftLb.Reset();
+ if ( SfxOrganizeListBox_Impl::VIEW_TEMPLATES == aRightLb.GetViewType() )
+ aRightLb.Reset();
+ break;
+
+ case ID_PRINT:
+ {
+ if ( !pEntry )
+ return 1;
+ Path aPath( pFocusBox, pEntry );
+ SfxObjectShellRef aRef = pFocusBox->GetObjectShell( aPath );
+ if ( aRef.Is() )
+ {
+ const USHORT nDocLevel = pFocusBox->GetDocLevel();
+ if ( !pPrt )
+ pPrt = new Printer;
+ SvLBoxEntry *pDocEntry = pEntry;
+ while ( pFocusBox->GetModel()->GetDepth( pDocEntry ) > nDocLevel )
+ pDocEntry = pFocusBox->GetParent( pDocEntry );
+ const String aName(pFocusBox->GetEntryText(pDocEntry));
+ if ( !aRef->Print( *pPrt, aPath[1+nDocLevel],
+ aPath[2+nDocLevel], aPath[3+nDocLevel], &aName ) )
+ ErrorBox( pDialog, SfxResId( MSG_PRINT_ERROR ) ).Execute();
+ }
+ break;
+ }
+
+ case ID_PRINTER_SETUP:
+ {
+ PrinterSetupDialog* pDlg = new PrinterSetupDialog( pDialog );
+ if ( !pPrt )
+ pPrt = new Printer;
+ pDlg->SetPrinter( pPrt );
+ pDlg->Execute();
+ delete pDlg;
+#ifdef MAC
+ // bei bestimmten Druckertreibern gibt es Probleme mit
+ // dem Repaint. Deshalb hier explizit Invalidate() rufen
+ pDialog->Invalidate();
+#endif
+ break;
+ }
+
+ default: return 0;
+ }
+ return 1;
+
+}
+
+//-------------------------------------------------------------------------
+
+IMPL_LINK_INLINE_START( SfxOrganizeDlg_Impl, MenuSelect_Impl, Menu *, pMenu )
+
+/* [Beschreibung]
+
+ SelectHandler des Men"us des Men"ubuttons (SV)
+
+ [Parameter]
+
+ MenuButton *pBtn der das Event ausl"osende Button
+
+ [R"uckgabewert] 1: Event wurde verarbeitet,
+ 0: Event wurde nicht verarbeitet (SV-Menu)
+
+*/
+{
+ return Dispatch_Impl(pMenu->GetCurItemId());
+}
+IMPL_LINK_INLINE_END( SfxOrganizeDlg_Impl, MenuSelect_Impl, Menu *, pMenu )
+
+//-------------------------------------------------------------------------
+
+IMPL_LINK( SfxOrganizeDlg_Impl, AccelSelect_Impl, Accelerator *, pAccel )
+
+/* [Beschreibung]
+
+ SelectHandler des Accelerators (SV)
+
+ [Parameter]
+
+ Accelerator *pAccel der das Event ausl"osende Accelerator
+
+ [R"uckgabewert] 1: Event wurde verarbeitet,
+ 0: Event wurde nicht verarbeitet (SV)
+
+*/
+{
+ SvLBoxEntry *pEntry=pFocusBox && pFocusBox->GetSelectionCount()
+ ? pFocusBox->FirstSelected() : 0 ;
+ return pEntry && (pAccel->GetCurItemId() == ID_NEW ||
+ !DontDelete_Impl(pEntry)) ?
+ Dispatch_Impl(pAccel->GetCurItemId()): 0;
+ return 0;
+}
+
+//-------------------------------------------------------------------------
+
+void SfxOrganizeDlg_Impl::OkHdl(Button *pButton)
+{
+ if(pFocusBox && pFocusBox->IsEditingActive())
+ pFocusBox->EndEditing(FALSE);
+ pButton->Click();
+}
+
+
+
+IMPL_LINK( SfxOrganizeDlg_Impl, MenuActivate_Impl, Menu *, pMenu )
+
+/* [Beschreibung]
+
+ ActivateHandler des Men"us des Men"ubuttons (SV)
+
+ [Parameter]
+
+ Menu *pMenu das das Event ausl"osende Men"u
+
+ [R"uckgabewert] 1: Event wurde verarbeitet,
+ 0: Event wurde nicht verarbeitet (SV-Menu)
+
+*/
+{
+ if ( pFocusBox && pFocusBox->IsEditingActive() )
+ pFocusBox->EndEditing( FALSE );
+ BOOL bEnable = ( pFocusBox && pFocusBox->GetSelectionCount() );
+ SvLBoxEntry* pEntry = bEnable ? pFocusBox->FirstSelected() : NULL;
+ const USHORT nDepth =
+ ( bEnable && pFocusBox->GetSelectionCount() ) ? pFocusBox->GetModel()->GetDepth( pEntry ) : 0;
+ const USHORT nDocLevel = bEnable ? pFocusBox->GetDocLevel() : 0;
+ int eVT = pFocusBox ? pFocusBox->GetViewType() : 0;
+ // nur Vorlagen anlegen
+ pMenu->EnableItem( ID_NEW, bEnable && 0 == nDepth && SfxOrganizeListBox_Impl::VIEW_TEMPLATES == eVT );
+ // Vorlagen: Loeschen Ebene 0,1,3ff
+ // ein Bereich mu"s mindestens erhalten bleiben
+ // Dateien : Loeschen Ebene > 2
+
+ pMenu->EnableItem( ID_DELETE, bEnable && !DontDelete_Impl( pEntry ) );
+ pMenu->EnableItem( ID_EDIT,
+ bEnable && eVT == SfxOrganizeListBox_Impl::VIEW_TEMPLATES && nDepth == nDocLevel );
+ pMenu->EnableItem( ID_COPY_FROM,
+ bEnable && eVT == SfxOrganizeListBox_Impl::VIEW_TEMPLATES &&
+ ( nDepth == nDocLevel || nDepth == nDocLevel - 1 ) );
+ pMenu->EnableItem( ID_COPY_TO,
+ bEnable && eVT == SfxOrganizeListBox_Impl::VIEW_TEMPLATES &&
+ nDepth == nDocLevel );
+ pMenu->EnableItem( ID_RESCAN,
+ SfxOrganizeListBox_Impl::VIEW_TEMPLATES == aRightLb.GetViewType() ||
+ SfxOrganizeListBox_Impl::VIEW_TEMPLATES == aLeftLb.GetViewType() );
+ BOOL bPrint = bEnable && nDepth > pFocusBox->GetDocLevel();
+ if ( bPrint && pPrt )
+ bPrint = !pPrt->IsPrinting() && !pPrt->IsJobActive();
+ if ( bPrint && bEnable )
+ {
+ // only styles printable
+ Path aPath( pFocusBox, pFocusBox->FirstSelected() );
+ USHORT nIndex = aPath[ nDocLevel + 1 ];
+ bPrint = ( nIndex == CONTENT_STYLE );
+ }
+ pMenu->EnableItem( ID_PRINT, bPrint );
+ pMenu->EnableItem( ID_RESET_DEFAULT_TEMPLATE, bEnable );
+ pMenu->EnableItem( ID_DEFAULT_TEMPLATE,
+ bEnable && eVT == SfxOrganizeListBox_Impl::VIEW_TEMPLATES && nDepth == nDocLevel );
+ return 1;
+}
+
+//-------------------------------------------------------------------------
+
+IMPL_LINK( SfxOrganizeDlg_Impl, GetFocus_Impl, SfxOrganizeListBox_Impl *, pBox )
+
+/* [Beschreibung]
+
+ GetFocus-Handler, wird aus den Select-Handler der Listboxen
+ gerufen.
+ Wird verwendet, im die Listbox, die den Focus besitzt sowie
+ deren Zustand zu ermitteln.
+
+ [Parameter]
+
+ SfxOrganizeListBox *pBox die rufende Box
+
+*/
+
+{
+ if(pFocusBox && pFocusBox != pBox)
+ pFocusBox->SelectAll(FALSE);
+ pFocusBox = pBox;
+ aFilesBtn.Enable( SfxOrganizeListBox_Impl::VIEW_FILES ==
+ pFocusBox->GetViewType() );
+ return 0;
+}
+
+//-------------------------------------------------------------------------
+
+IMPL_LINK( SfxOrganizeDlg_Impl, LeftListBoxSelect_Impl, ListBox *, pBox )
+
+/* [Beschreibung]
+
+ Select-Handler, wird aus den Select-Handler der Listboxen
+ gerufen.
+ Wenn sich der Modus der Boxen (Dokumentsicht, Dokumentvorlagensicht)
+ unterscheiden, werden die Models getrennt; andernfalls zusammengefa"st.
+
+ [Parameter]
+
+ ListBox *pBox die rufende Box
+
+*/
+{
+ const SfxOrganizeListBox_Impl::DataEnum
+ eViewType = pBox->GetSelectEntryPos() == 0 ?
+ SfxOrganizeListBox_Impl::VIEW_TEMPLATES : SfxOrganizeListBox_Impl::VIEW_FILES;
+ if(eViewType!= aLeftLb.GetViewType()) {
+ aLeftLb.SetViewType(eViewType);
+ if(aRightLb.GetViewType() == eViewType)
+ aLeftLb.SetModel(aRightLb.GetModel());
+ else {
+ // Models trennen
+ aLeftLb.DisconnectFromModel();
+ aLeftLb.Reset();
+ }
+ }
+ GetFocus_Impl(&aLeftLb);
+ return 0;
+}
+
+//-------------------------------------------------------------------------
+
+IMPL_LINK( SfxOrganizeDlg_Impl, RightListBoxSelect_Impl, ListBox *, pBox )
+
+/* [Beschreibung]
+
+ Select-Handler, wird aus den Select-Handler der Listboxen
+ gerufen.
+ Wenn sich der Modus der Boxen (Dokumentsicht, Dokumentvorlagensicht)
+ unterscheiden, werden die Models getrennt; andernfalls zusammengefa"st.
+
+ [Parameter]
+
+ ListBox *pBox die rufende Box
+
+*/
+{
+ const SfxOrganizeListBox_Impl::DataEnum eViewType =
+ pBox->GetSelectEntryPos() == 0 ?
+ SfxOrganizeListBox_Impl::VIEW_TEMPLATES : SfxOrganizeListBox_Impl::VIEW_FILES;
+ if(eViewType!= aRightLb.GetViewType())
+ {
+ aRightLb.SetViewType(eViewType);
+ if(aLeftLb.GetViewType() == eViewType)
+ aRightLb.SetModel(aLeftLb.GetModel());
+ else
+ {
+ // Models trennen
+ aRightLb.DisconnectFromModel();
+ aRightLb.Reset();
+ }
+ }
+ aRightLb.GrabFocus();
+ GetFocus_Impl(&aRightLb);
+ return 0;
+}
+
+//-------------------------------------------------------------------------
+
+IMPL_LINK( SfxOrganizeDlg_Impl, AddFiles_Impl, Button *, pButton )
+
+/* [Beschreibung]
+
+ Handler des Buttons f"ur das Hinzuf"ugen von Dateien per Dialog.
+
+ [Parameter]
+
+ Button * der Button, der dieses Events ausgel"ost hat.
+
+*/
+{
+ SfxSimpleFileDialog *pFileDlg = new SfxSimpleFileDialog( pDialog, WB_OPEN );
+ const SfxObjectFactory& rFact = SfxObjectFactory::GetDefaultFactory();
+ USHORT nMax = rFact.GetFilterCount();
+ for ( USHORT i = 0; i < nMax; ++i )
+ {
+ const SfxFilter* pFilter = rFact.GetFilter(i);
+ if ( pFilter->IsInternal() )
+ continue;
+ BOOL bIsImpFilter = pFilter->CanImport();
+ if (bIsImpFilter && pFilter->IsAllowedAsTemplate())
+ {
+ pFileDlg->AddFilter(
+ pFilter->GetUIName(), pFilter->GetWildcard()(),
+ pFilter->GetTypeName() );
+ }
+ }
+ pFileDlg->AddFilter( String(SfxResId(RID_STR_FILTCONFIG)), DEFINE_CONST_UNICODE( "*.cfg" ) );
+ pFileDlg->AddFilter( String(SfxResId(RID_STR_FILTBASIC)), DEFINE_CONST_UNICODE( "*.sbl" ) );
+
+ if ( aLastDir.Len() )
+ pFileDlg->SetPath( aLastDir );
+ if ( RET_OK == pFileDlg->Execute() )
+ {
+ String aPath = pFileDlg->GetPath();
+ aMgr.InsertFile( pFocusBox, aPath );
+ INetURLObject aObj( aPath );
+ aObj.removeSegment();
+ aObj.setFinalSlash();
+ aLastDir = aObj.GetMainURL();
+ }
+ delete pFileDlg;
+ return 0;
+}
+
+//-------------------------------------------------------------------------
+
+short SfxTemplateOrganizeDlg::Execute()
+
+/* [Beschreibung]
+
+ "Uberladene Execute- Methode; speichert gfs. "Anderungen an den
+ Dokumentvorlagen
+ (SV-Methode)
+
+*/
+
+{
+ const short nRet = ModalDialog::Execute();
+ if(RET_CANCEL != nRet)
+ {
+ pImp->aMgr.SaveAll(this);
+ SfxTemplateDialog* pTemplDlg = SFX_APP()->GetTemplateDialog();
+ if(pTemplDlg)
+ pTemplDlg->Update();
+ }
+ return nRet;
+}
+
+
+//-------------------------------------------------------------------------
+
+SfxTemplateOrganizeDlg::SfxTemplateOrganizeDlg(Window * pParent,
+ SfxDocumentTemplates *pTempl)
+: ModalDialog( pParent, SfxResId(DLG_ORGANIZE)),
+ pImp( new SfxOrganizeDlg_Impl(this, pTempl) )
+
+/* [Beschreibung]
+
+ Konstruktor
+
+*/
+{
+ FreeResource();
+}
+
+//-------------------------------------------------------------------------
+
+SfxTemplateOrganizeDlg::~SfxTemplateOrganizeDlg()
+{
+ GetpApp()->RemoveAccel(&pImp->aEditAcc);
+ delete pImp->pPrt;
+ delete pImp;
+}
+
+
diff --git a/sfx2/source/doc/docvor.hrc b/sfx2/source/doc/docvor.hrc
new file mode 100644
index 000000000000..55579e7595d4
--- /dev/null
+++ b/sfx2/source/doc/docvor.hrc
@@ -0,0 +1,90 @@
+/*************************************************************************
+ *
+ * $RCSfile: docvor.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:32 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define BMP_OPENED_FOLDER 2
+#define BMP_CLOSED_FOLDER 1
+#define BMP_OPENED_DOC 3
+#define BMP_CLOSED_DOC 4
+#define ACC_EDIT 1
+#define ID_COPY 201
+#define ID_MOVE 202
+#define ID_DELETE 203
+#define ID_EDIT 204
+#define ID_COPY_FROM 211
+#define ID_EXPORT 221
+#define ID_RESCAN 220
+#define ID_COPY_TO 210
+#define ID_DEFAULT_TEMPLATE 230
+#define ID_RESET_DEFAULT_TEMPLATE 231
+#define ID_NEW 200
+#define ID_PRINT 240
+#define ID_PRINTER_SETUP 2341
+
+#define LB_RIGHT_TYP 11
+#define LB_RIGHT 10
+#define LB_LEFT_TYP 2
+#define BTN_EDIT 105
+#define BTN_FILES 3
+#define LB_LEFT 1
+#define FT_DEFAULT_TEMPLATE_LABEL 20
+#define FT_DEFAULT_TEMPLATE 21
+#define BTN_HELP 100
+#define BTN_OK 100
+#define BTN_CANCEL 101
diff --git a/sfx2/source/doc/docvor.src b/sfx2/source/doc/docvor.src
new file mode 100644
index 000000000000..91c41d28750c
--- /dev/null
+++ b/sfx2/source/doc/docvor.src
@@ -0,0 +1,775 @@
+/*************************************************************************
+ *
+ * $RCSfile: docvor.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:32 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+ // include ---------------------------------------------------------------
+#include "sfx.hrc"
+#include "doc.hrc"
+#include "docvor.hrc"
+#include "helpid.hrc"
+ // pragma ----------------------------------------------------------------
+
+ // DLG_ORGANIZE ----------------------------------------------------------
+ModalDialog DLG_ORGANIZE
+{
+ HelpId = SID_ORGANIZER ;
+ OutputSize = TRUE ;
+ SVLook = TRUE ;
+ Size = MAP_APPFONT ( 271 , 162 ) ;
+ Text = "Dokumentvorlagen verwalten" ;
+ Text [ English ] = "Manage document templates" ;
+ Text [ norwegian ] = "Rediger dokumentmaler" ;
+ Text [ italian ] = "Gestione dei modelli" ;
+ Text [ portuguese_brazilian ] = "Editar os modelos do documento" ;
+ Text [ portuguese ] = "Gerir modelos de documentos" ;
+ Text [ finnish ] = "Muokkaa asiakirjamalleja" ;
+ Text [ danish ] = "Administrer dokumentskabeloner" ;
+ Text [ french ] = "Gestion des modles de documents" ;
+ Text [ swedish ] = "Frvalta dokumentmallar" ;
+ Text [ dutch ] = "Sjablonen beheren" ;
+ Text [ spanish ] = "Administrar plantillas" ;
+ Text [ english_us ] = "Template Management" ;
+ Moveable = TRUE ;
+ HelpButton BTN_HELP
+ {
+ Pos = MAP_APPFONT ( 205 , 43 ) ;
+ Size = MAP_APPFONT ( 60 , 14 ) ;
+ TabStop = TRUE ;
+ };
+ OKButton BTN_OK
+ {
+ Pos = MAP_APPFONT ( 205 , 6 ) ;
+ Size = MAP_APPFONT ( 60 , 14 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? Schlieen : Schlieen */
+ /* ### ACHTUNG: Neuer Text in Resource? Schlieen : Schlieen */
+ Text = "Schlieen" ;
+ Text [ English ] = "Close" ;
+ Text [ norwegian ] = "Lukk" ;
+ Text [ italian ] = "Chiudi" ;
+ Text [ portuguese_brazilian ] = "Fechar" ;
+ Text [ portuguese ] = "Fechar" ;
+ Text [ finnish ] = "Sulje" ;
+ Text [ danish ] = "Luk" ;
+ Text [ french ] = "Fermer" ;
+ Text [ swedish ] = "Stng" ;
+ Text [ dutch ] = "Sluiten" ;
+ Text [ spanish ] = "Cerrar" ;
+ Text [ english_us ] = "Close" ;
+ TabStop = TRUE ;
+ DefButton = TRUE ;
+ Text[ chinese_simplified ] = "ر";
+ Text[ russian ] = "";
+ Text[ polish ] = "Zamknij";
+ Text[ japanese ] = "‚";
+ Text[ chinese_traditional ] = "";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "ݱ";
+ Text[ turkish ] = "Kapat";
+ Text[ language_user1 ] = " ";
+ };
+ PushButton BTN_FILES
+ {
+ Pos = MAP_APPFONT ( 205 , 143 ) ;
+ Size = MAP_APPFONT ( 60 , 14 ) ;
+ Text = "~Datei..." ;
+ Text [ English ] = "~Files..." ;
+ Text [ norwegian ] = "~Filer..." ;
+ Text [ italian ] = "~File..." ;
+ Text [ portuguese_brazilian ] = "~Arquivos..." ;
+ Text [ portuguese ] = "~Ficheiro..." ;
+ Text [ finnish ] = "~Tiedostot..." ;
+ Text [ danish ] = "~Fil..." ;
+ Text [ french ] = "~Fichier..." ;
+ Text [ swedish ] = "~Arkiv..." ;
+ Text [ dutch ] = "~Bestand..." ;
+ Text [ spanish ] = "~Archivo..." ;
+ Text [ english_us ] = "~File..." ;
+ TabStop = TRUE ;
+ Text[ chinese_simplified ] = "ļ(~F)...";
+ Text[ russian ] = "...";
+ Text[ polish ] = "Pli~k...";
+ Text[ japanese ] = "̧فi~F)...";
+ Text[ chinese_traditional ] = "ɮ(~F)...";
+ Text[ arabic ] = "...";
+ Text[ greek ] = "~...";
+ Text[ korean ] = "(~F)...";
+ Text[ turkish ] = "Dosya";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_LEFT_TYP
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 3 , 144 ) ;
+ Size = MAP_APPFONT ( 94 , 55 ) ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+ CurPos = 0 ;
+ StringList =
+ {
+ < "Dokumentvorlagen" ; Default ; > ;
+ < "Dokumente" ; Default ; > ;
+ };
+ StringList [ English ] =
+ {
+ < "Dokumentvorlagen" ; Default ; > ;
+ < "Dokumente" ; Default ; > ;
+ };
+ StringList [ norwegian ] =
+ {
+ < "Dokumentvorlagen" ; Default ; > ;
+ < "Dokumente" ; Default ; > ;
+ };
+ StringList [ italian ] =
+ {
+ < "Modelli" ; Default ; > ;
+ < "Documenti" ; Default ; > ;
+ };
+ StringList [ portuguese_brazilian ] =
+ {
+ < "Dokumentvorlagen" ; Default ; > ;
+ < "Arquivos" ; Default ; > ;
+ };
+ StringList [ portuguese ] =
+ {
+ < "Modelos de documentos" ; Default ; > ;
+ < "Documentos" ; Default ; > ;
+ };
+ StringList [ finnish ] =
+ {
+ < "Dokumentvorlagen" ; Default ; > ;
+ < "Dokumente" ; Default ; > ;
+ };
+ StringList [ danish ] =
+ {
+ < "Dokumentskabelon" ; Default ; > ;
+ < "Dokumenter" ; Default ; > ;
+ };
+ StringList [ french ] =
+ {
+ < "Modles de document" ; Default ; > ;
+ < "Documents" ; Default ; > ;
+ };
+ StringList [ swedish ] =
+ {
+ < "Dokumentmallar" ; Default ; > ;
+ < "Dokument" ; Default ; > ;
+ };
+ StringList [ dutch ] =
+ {
+ < "Sjablonen" ; Default ; > ;
+ < "Documenten" ; Default ; > ;
+ };
+ StringList [ spanish ] =
+ {
+ < "Plantillas de documento" ; Default ; > ;
+ < "Documentos" ; Default ; > ;
+ };
+ StringList [ english_us ] =
+ {
+ < "Templates" ; Default ; > ;
+ < "Documents" ; Default ; > ;
+ };
+ StringList [ chinese_simplified ] =
+ {
+ < "ĵʽ" ; Default ; > ;
+ < "ĵ" ; Default ; > ;
+ };
+ StringList [ russian ] =
+ {
+ < " " ; Default ; > ;
+ < "" ; Default ; > ;
+ };
+ StringList [ polish ] =
+ {
+ < "Szablony dokumentw" ; Default ; > ;
+ < "Dokumenty" ; Default ; > ;
+ };
+ StringList [ japanese ] =
+ {
+ < "޷Ăڰ" ; Default ; > ;
+ < "޷" ; Default ; > ;
+ };
+ StringList [ chinese_traditional ] =
+ {
+ < "˦" ; Default ; > ;
+ < "" ; Default ; > ;
+ };
+ StringList [ arabic ] =
+ {
+ < " " ; Default ; > ;
+ < "" ; Default ; > ;
+ };
+ StringList [ greek ] =
+ {
+ < " " ; Default ; > ;
+ < "" ; Default ; > ;
+ };
+ StringList [ korean ] =
+ {
+ < " " ; Default ; > ;
+ < "" ; Default ; > ;
+ };
+ StringList [ turkish ] =
+ {
+ < "Belge ablonlar" ; Default ; > ;
+ < "Belgeler" ; Default ; > ;
+ };
+ StringList [ language_user1 ] =
+ {
+ < " " ; Default ; > ;
+ < " " ; Default ; > ;
+ };
+ };
+ ListBox LB_RIGHT_TYP
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 103 , 144 ) ;
+ Size = MAP_APPFONT ( 94 , 55 ) ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+ CurPos = 1 ;
+ StringList =
+ {
+ < "Dokumentvorlagen" ; Default ; > ;
+ < "Dokumente" ; Default ; > ;
+ };
+ StringList [ English ] =
+ {
+ < "Dokumentvorlagen" ; Default ; > ;
+ < "Dokumente" ; Default ; > ;
+ };
+ StringList [ norwegian ] =
+ {
+ < "Dokumentvorlagen" ; Default ; > ;
+ < "Dokumente" ; Default ; > ;
+ };
+ StringList [ italian ] =
+ {
+ < "Modelli" ; Default ; > ;
+ < "Documenti" ; Default ; > ;
+ };
+ StringList [ portuguese_brazilian ] =
+ {
+ < "Dokumentvorlagen" ; Default ; > ;
+ < "Arquivos" ; Default ; > ;
+ };
+ StringList [ portuguese ] =
+ {
+ < "Modelos de documentos" ; Default ; > ;
+ < "Documentos" ; Default ; > ;
+ };
+ StringList [ finnish ] =
+ {
+ < "Dokumentvorlagen" ; Default ; > ;
+ < "Dokumente" ; Default ; > ;
+ };
+ StringList [ danish ] =
+ {
+ < "Dokumentskabeloner" ; Default ; > ;
+ < "Dokumenter" ; Default ; > ;
+ };
+ StringList [ french ] =
+ {
+ < "Modles de document" ; Default ; > ;
+ < "Documents" ; Default ; > ;
+ };
+ StringList [ swedish ] =
+ {
+ < "Dokumentmallar" ; Default ; > ;
+ < "Dokument" ; Default ; > ;
+ };
+ StringList [ dutch ] =
+ {
+ < "Sjablonen" ; Default ; > ;
+ < "Documenten" ; Default ; > ;
+ };
+ StringList [ spanish ] =
+ {
+ < "Plantillas de documento" ; Default ; > ;
+ < "Documentos" ; Default ; > ;
+ };
+ StringList [ english_us ] =
+ {
+ < "Templates" ; Default ; > ;
+ < "Documents" ; Default ; > ;
+ };
+ StringList [ chinese_simplified ] =
+ {
+ < "ĵʽ" ; Default ; > ;
+ < "ĵ" ; Default ; > ;
+ };
+ StringList [ russian ] =
+ {
+ < " " ; Default ; > ;
+ < "" ; Default ; > ;
+ };
+ StringList [ polish ] =
+ {
+ < "Szablony dokumentw" ; Default ; > ;
+ < "Dokumenty" ; Default ; > ;
+ };
+ StringList [ japanese ] =
+ {
+ < "޷Ăڰ" ; Default ; > ;
+ < "޷" ; Default ; > ;
+ };
+ StringList [ chinese_traditional ] =
+ {
+ < "˦" ; Default ; > ;
+ < "" ; Default ; > ;
+ };
+ StringList [ arabic ] =
+ {
+ < " " ; Default ; > ;
+ < "" ; Default ; > ;
+ };
+ StringList [ greek ] =
+ {
+ < " " ; Default ; > ;
+ < "" ; Default ; > ;
+ };
+ StringList [ korean ] =
+ {
+ < " " ; Default ; > ;
+ < "ȼ" ; Default ; > ;
+ };
+ StringList [ turkish ] =
+ {
+ < "Belge ablonlar" ; Default ; > ;
+ < "Belgeler" ; Default ; > ;
+ };
+ StringList [ language_user1 ] =
+ {
+ < " " ; Default ; > ;
+ < " " ; Default ; > ;
+ };
+ };
+ Control LB_LEFT
+ {
+ HelpId = HID_CTL_ORGANIZER_LEFT ;
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 3 , 6 ) ;
+ Size = MAP_APPFONT ( 94 , 132 ) ;
+ TabStop = TRUE ;
+ ClipChildren = TRUE ;
+ };
+ Control LB_RIGHT
+ {
+ HelpId = HID_CTL_ORGANIZER_RIGHT ;
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 103 , 6 ) ;
+ Size = MAP_APPFONT ( 94 , 132 ) ;
+ TabStop = TRUE ;
+ ClipChildren = TRUE ;
+ };
+ Accelerator ACC_EDIT
+ {
+ ItemList =
+ {
+ AcceleratorItem
+ {
+ Identifier = ID_NEW ;
+ Key = KeyCode
+ {
+ Code = KEY_INSERT ;
+ };
+ };
+ AcceleratorItem
+ {
+ Identifier = ID_DELETE ;
+ Key = KeyCode
+ {
+ Code = KEY_DELETE ;
+ };
+ };
+ };
+ };
+ MenuButton BTN_EDIT
+ {
+ Pos = MAP_APPFONT ( 205 , 23 ) ;
+ Size = MAP_APPFONT ( 60 , 14 ) ;
+ Text = "~Befehle" ;
+ Text [ English ] = "~Commands" ;
+ Text [ norwegian ] = "~Rediger" ;
+ Text [ italian ] = "Comandi" ;
+ Text [ portuguese_brazilian ] = "~Editar" ;
+ Text [ portuguese ] = "~Comandos" ;
+ Text [ finnish ] = "~Muokkaa" ;
+ Text [ danish ] = "Kommandoer" ;
+ Text [ french ] = "~Commandes" ;
+ Text [ swedish ] = "~Kommandon" ;
+ Text [ dutch ] = "~Opdrachten" ;
+ Text [ spanish ] = "~Comandos" ;
+ Text [ english_us ] = "Commands" ;
+ TabStop = TRUE ;
+ ButtonMenu = Menu
+ {
+ ItemList =
+ {
+ MenuItem
+ {
+ Identifier = ID_NEW ;
+ HelpId = HID_ORGANIZE_NEW ;
+ Text = "~Neu" ;
+ Text [ English ] = "~New" ;
+ Text [ norwegian ] = "~New" ;
+ Text [ italian ] = "~Nuovo" ;
+ Text [ portuguese_brazilian ] = "~Novo" ;
+ Text [ portuguese ] = "~Novo" ;
+ Text [ finnish ] = "~Uusi" ;
+ Text [ danish ] = "~Ny(t)" ;
+ Text [ french ] = "~Nouveau" ;
+ Text [ swedish ] = "~Nytt" ;
+ Text [ dutch ] = "~Nieuw" ;
+ Text [ spanish ] = "~Nuevo" ;
+ Text [ english_us ] = "~New" ;
+ AccelKey = KeyCode
+ {
+ Code = KEY_INSERT ;
+ };
+ Text[ chinese_simplified ] = "½(~N)";
+ Text[ russian ] = "~";
+ Text[ polish ] = "Nowy";
+ Text[ japanese ] = "VK쐬(~N)";
+ Text[ chinese_traditional ] = "}ҷs(~N)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "~";
+ Text[ korean ] = " (~N)";
+ Text[ turkish ] = "Y~eni";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Identifier = ID_DELETE ;
+ HelpId = HID_ORGANIZE_DELETE ;
+ /* ### ACHTUNG: Neuer Text in Resource? ~Lschen : ~Lschen */
+ /* ### ACHTUNG: Neuer Text in Resource? ~Lschen : ~Lschen */
+ Text = "~Lschen" ;
+ Text [ English ] = "~Delete" ;
+ Text [ norwegian ] = "~Slett" ;
+ Text [ italian ] = "~Elimina" ;
+ Text [ portuguese_brazilian ] = "~Apagar" ;
+ Text [ portuguese ] = "E~liminar" ;
+ Text [ finnish ] = "~Poista" ;
+ Text [ danish ] = "~Slet" ;
+ Text [ french ] = "~Supprimer" ;
+ Text [ swedish ] = "~Radera" ;
+ Text [ dutch ] = "~Wissen" ;
+ Text [ spanish ] = "~Eliminar" ;
+ Text [ english_us ] = "~Delete" ;
+ AccelKey = KeyCode
+ {
+ Code = KEY_DELETE ;
+ };
+ Text[ chinese_simplified ] = "ɾ(~D)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Usu";
+ Text[ japanese ] = "폜(~D)";
+ Text[ chinese_traditional ] = "R(~D)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "~";
+ Text[ korean ] = "(~D)";
+ Text[ turkish ] = "~Sil";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Identifier = ID_EDIT ;
+ HelpId = HID_ORGANIZE_EDIT ;
+ Text = "~Bearbeiten" ;
+ Text [ English ] = "~Edit" ;
+ Text [ norwegian ] = "~Rediger" ;
+ Text [ italian ] = "~Modifica" ;
+ Text [ portuguese_brazilian ] = "~Editar" ;
+ Text [ portuguese ] = "~Editar" ;
+ Text [ finnish ] = "~Muokkaa" ;
+ Text [ danish ] = "~Rediger" ;
+ Text [ french ] = "~Edition" ;
+ Text [ swedish ] = "~Redigera" ;
+ Text [ dutch ] = "~Bewerken" ;
+ Text [ spanish ] = "E~ditar" ;
+ Text [ english_us ] = "~Edit" ;
+ Text[ chinese_simplified ] = "༭(~E)";
+ Text[ russian ] = "~";
+ Text[ polish ] = "~Edytuj";
+ Text[ japanese ] = "ҏWi~dj";
+ Text[ chinese_traditional ] = "s(~E)";
+ Text[ arabic ] = "~";
+ Text[ greek ] = "~";
+ Text[ korean ] = "(~E)";
+ Text[ turkish ] = "~Dzenle";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Separator = TRUE ;
+ };
+ MenuItem
+ {
+ Identifier = ID_COPY_FROM ;
+ HelpId = HID_ORGANIZE_COPY_FROM ;
+ Text = "Vorlage ~importieren..." ;
+ Text [ English ] = "Import from..." ;
+ Text [ norwegian ] = "Kopier til..." ;
+ Text [ italian ] = "~Importa modello..." ;
+ Text [ portuguese_brazilian ] = "Copiar para..." ;
+ Text [ portuguese ] = "I~mportar modelo..." ;
+ Text [ finnish ] = "Kopioi mihin..." ;
+ Text [ danish ] = "Importer skabelon..." ;
+ Text [ french ] = "I~mporter un modle..." ;
+ Text [ swedish ] = "~Importera mall..." ;
+ Text [ dutch ] = "Sjabloon ~importeren..." ;
+ Text [ spanish ] = "I~mportar plantilla..." ;
+ Text [ english_us ] = "Import Template..." ;
+ Text[ chinese_simplified ] = "ʽ(~M)...";
+ Text[ russian ] = " ...";
+ Text[ polish ] = "Importuj szablon...";
+ Text[ japanese ] = "ڰĂ̲߰...";
+ Text[ chinese_traditional ] = "J˦(~M)...";
+ Text[ arabic ] = " ...";
+ Text[ greek ] = "~ ...";
+ Text[ korean ] = " ...";
+ Text[ turkish ] = "ablonu ie aktar...";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Identifier = ID_COPY_TO ;
+ HelpId = HID_ORGANIZE_COPY_TO ;
+ Text = "Vorlage ~exportieren..." ;
+ Text [ English ] = "Export to..." ;
+ Text [ norwegian ] = "Kopier fra..." ;
+ Text [ italian ] = "Esporta modello..." ;
+ Text [ portuguese_brazilian ] = "Copiar de..." ;
+ Text [ portuguese ] = "E~xportar modelo..." ;
+ Text [ finnish ] = "Kopioi mist..." ;
+ Text [ danish ] = "Eksporter skabelon..." ;
+ Text [ french ] = "E~xporter un modle..." ;
+ Text [ swedish ] = "~Exportera mall..." ;
+ Text [ dutch ] = "Sjabloon ~exporteren..." ;
+ Text [ spanish ] = "E~xportar plantilla..." ;
+ Text [ english_us ] = "Export Template..." ;
+ Text[ chinese_simplified ] = "ʽ(~X)...";
+ Text[ russian ] = " ...";
+ Text[ polish ] = "Eksportuj szablon...";
+ Text[ japanese ] = "ڰĂ̴߰...";
+ Text[ chinese_traditional ] = "X˦(~X)...";
+ Text[ arabic ] = " ...";
+ Text[ greek ] = "~ ...";
+ Text[ korean ] = " ...";
+ Text[ turkish ] = "ablonu da aktar...";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Separator = TRUE ;
+ };
+ MenuItem
+ {
+ Identifier = ID_PRINT ;
+ HelpId = HID_ORGANIZE_PRINT ;
+ Text = "~Drucken" ;
+ Text [ English ] = "~Print" ;
+ Text [ norwegian ] = "~Skriv ut" ;
+ Text [ italian ] = "Stam~pa" ;
+ Text [ portuguese_brazilian ] = "~Imprimir" ;
+ Text [ portuguese ] = "~Imprimir" ;
+ Text [ finnish ] = "Tul~osta" ;
+ Text [ danish ] = "~Udskriv" ;
+ Text [ french ] = "~Imprimer" ;
+ Text [ swedish ] = "Skriv ~ut" ;
+ Text [ dutch ] = "Af~drukken" ;
+ Text [ spanish ] = "~Imprimir" ;
+ Text [ english_us ] = "~Print" ;
+ Text[ chinese_simplified ] = "ӡ(~P)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Drukuj";
+ Text[ japanese ] = "(~P)";
+ Text[ chinese_traditional ] = "CL(~P)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "~";
+ Text[ korean ] = "μ(~P)";
+ Text[ turkish ] = "~Yazdr";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Identifier = ID_PRINTER_SETUP ;
+ HelpId = HID_ORGANIZE_PRINTER_SETUP ;
+ Text = "Druckereinstellun~gen..." ;
+ Text [ English ] = "Printer ~Setup..." ;
+ Text [ norwegian ] = "~Printer Setup..." ;
+ Text [ italian ] = "I~mpostazioni stampante..." ;
+ Text [ portuguese_brazilian ] = "~Printer Setup..." ;
+ Text [ portuguese ] = "~Configurao da impressora..." ;
+ Text [ french ] = "~Paramtres de l'imprimante..." ;
+ Text [ dutch ] = "Printerinstellin~gen..." ;
+ Text [ spanish ] = "~Configuracin de la impresora..." ;
+ Text [ danish ] = "Udskriftsindstillin~ger..." ;
+ Text [ swedish ] = "~Skrivarinstllningar..." ;
+ Text [ finnish ] = "~Printer Setup..." ;
+ Text [ english_us ] = "Printer Settings..." ;
+ Text[ chinese_simplified ] = "趨ӡ...";
+ Text[ russian ] = " ...";
+ Text[ polish ] = "Ustawienia drukarki...";
+ Text[ japanese ] = "̐ݒ...";
+ Text[ chinese_traditional ] = "]wL...";
+ Text[ arabic ] = " ...";
+ Text[ greek ] = " ~...";
+ Text[ korean ] = " ...";
+ Text[ turkish ] = "Yazc ayarlar";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Separator = TRUE ;
+ };
+ MenuItem
+ {
+ Identifier = ID_RESCAN ;
+ HelpId = HID_ORGANIZE_RESCAN ;
+ Text = "~Aktualisieren" ;
+ Text [ English ] = "~Update" ;
+ Text [ norwegian ] = "~Update" ;
+ Text [ italian ] = "~Aggiorna" ;
+ Text [ portuguese_brazilian ] = "~Atualizar" ;
+ Text [ portuguese ] = "~Actualizar" ;
+ Text [ finnish ] = "~Laske uudelleen" ;
+ Text [ danish ] = "Opdater" ;
+ Text [ french ] = "~Actualiser" ;
+ Text [ swedish ] = "Upp~datera" ;
+ Text [ dutch ] = "~Actualiseren" ;
+ Text [ spanish ] = "~Actualizar" ;
+ Text [ english_us ] = "Update" ;
+ Text[ chinese_simplified ] = "(~U)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Aktualizuj";
+ Text[ japanese ] = "XV";
+ Text[ chinese_traditional ] = "s(~U)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "~";
+ Text[ korean ] = "Ʈ";
+ Text[ turkish ] = "Gncelle";
+ Text[ language_user1 ] = " ";
+ };
+ };
+ };
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "Pole~cenia";
+ Text[ japanese ] = "";
+ Text[ chinese_traditional ] = "RO";
+ Text[ arabic ] = "";
+ Text[ greek ] = "~";
+ Text[ korean ] = "";
+ Text[ turkish ] = "Komutlar";
+ Text[ language_user1 ] = " ";
+ };
+ Bitmap BMP_OPENED_FOLDER
+ {
+ File = "folderop.bmp" ;
+ };
+ Bitmap BMP_CLOSED_FOLDER
+ {
+ File = "foldercl.bmp" ;
+ };
+ Bitmap BMP_OPENED_DOC
+ {
+ File = "doccl.bmp" ;
+ };
+ Bitmap BMP_CLOSED_DOC
+ {
+ File = "doccl.bmp" ;
+ };
+ /* FixedText FT_DEFAULT_TEMPLATE_LABEL
+ {
+ Pos = MAP_APPFONT ( 3 , 161 ) ;
+ Size = MAP_APPFONT ( 61 , 10 ) ;
+ Text = "Standardvorlage:" ;
+ Text [ English ] = "Default template:" ;
+ Text [ norwegian ] = "Standardmal:" ;
+ Text [ italian ] = "Modello standard:" ;
+ Text [ portuguese_brazilian ] = "Modelo padro:" ;
+ Text [ portuguese ] = "Modelo padro:" ;
+ Text [ finnish ] = "Oletusmalli:" ;
+ Text [ danish ] = "Standardskabelon:" ;
+ Text [ french ] = "Modle par dfaut :" ;
+ Text [ swedish ] = "Standardmall:" ;
+ Text [ dutch ] = "Standaardsjabloon:" ;
+ Text [ spanish ] = "Plantilla estndar:" ;
+ Text [ english_us ] = "Default template:" ;
+ };
+ FixedText FT_DEFAULT_TEMPLATE
+ {
+ Pos = MAP_APPFONT ( 66 , 161 ) ;
+ Size = MAP_APPFONT ( 131 , 10 ) ;
+ };*/
+ Text[ chinese_simplified ] = "ĵʽ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Zarzdzaj szablonami dokumentw";
+ Text[ japanese ] = "޷ڰĂ̊Ǘ";
+ Text[ chinese_traditional ] = "޲z˦";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ";
+ Text[ turkish ] = "Belge ablonlar";
+ Text[ language_user1 ] = " ";
+};
+ // ********************************************************************** EOF
diff --git a/sfx2/source/doc/frmdescr.cxx b/sfx2/source/doc/frmdescr.cxx
new file mode 100644
index 000000000000..7b65c5848bab
--- /dev/null
+++ b/sfx2/source/doc/frmdescr.cxx
@@ -0,0 +1,1067 @@
+/*************************************************************************
+ *
+ * $RCSfile: frmdescr.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:32 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include <sot/object.hxx>
+
+#ifndef _STREAM_HXX //autogen
+#include <tools/stream.hxx>
+#endif
+#ifndef _SV_SPLITWIN_HXX //autogen
+#include <vcl/splitwin.hxx>
+#endif
+#ifndef _SFXITEMSET_HXX //autogen
+#include <svtools/itemset.hxx>
+#endif
+#pragma hdrstop
+
+#include "frmdescr.hxx"
+#include "app.hxx"
+
+DBG_NAME(SfxFrameSetDescriptor);
+DBG_NAME(SfxFrameDescriptor);
+
+#define VERSION (USHORT) 3
+
+struct SfxFrameSetDescriptor_Impl
+{
+ Wallpaper* pWallpaper;
+ Bitmap* pBitmap;
+ BOOL bNetscapeCompat;
+};
+
+struct SfxFrameDescriptor_Impl
+{
+ Wallpaper* pWallpaper;
+ SfxItemSet* pArgs;
+ BOOL bEditable;
+
+ SfxFrameDescriptor_Impl() : pWallpaper( NULL ), pArgs( NULL ), bEditable( TRUE ) {}
+ ~SfxFrameDescriptor_Impl()
+ {
+ delete pWallpaper;
+ delete pArgs;
+ }
+};
+
+SfxFrameSetDescriptor::SfxFrameSetDescriptor(SfxFrameDescriptor *pFrame) :
+ pParentFrame( pFrame ),
+ nFrameSpacing( SPACING_NOT_SET ),
+ bIsRoot( pParentFrame ? (pParentFrame->pParentFrameSet == 0) : TRUE ),
+ bRowSet( FALSE ),
+ nMaxId( 0 ),
+ nHasBorder( BORDER_YES )
+{
+ DBG_CTOR(SfxFrameSetDescriptor, 0);
+
+ pImp = new SfxFrameSetDescriptor_Impl;
+ pImp->pBitmap = NULL;
+ pImp->pWallpaper = NULL;
+ pImp->bNetscapeCompat = TRUE;
+ if ( pParentFrame )
+ pParentFrame->pFrameSet = this;
+ if ( bIsRoot )
+ nHasBorder |= BORDER_SET;
+}
+
+SfxFrameSetDescriptor::~SfxFrameSetDescriptor()
+{
+ DBG_DTOR(SfxFrameSetDescriptor, 0);
+
+ for ( USHORT n=0; n<aFrames.Count(); n++ )
+ {
+ SfxFrameDescriptor *pFrame = aFrames[n];
+ pFrame->pParentFrameSet = NULL;
+ delete pFrame;
+ }
+ if ( pParentFrame )
+ pParentFrame->pFrameSet = NULL;
+ delete pImp;
+}
+
+SfxFrameDescriptor* SfxFrameSetDescriptor::SearchFrame( USHORT nId )
+{
+ for ( USHORT n=0; n<aFrames.Count(); n++ )
+ {
+ SfxFrameDescriptor *pFrame = aFrames[n];
+ if ( pFrame->nItemId == nId )
+ return pFrame;
+ if ( pFrame->GetFrameSet() )
+ {
+ pFrame = pFrame->GetFrameSet()->SearchFrame( nId );
+ if ( pFrame )
+ return pFrame;
+ }
+ }
+
+ return NULL;
+}
+
+SfxFrameDescriptor* SfxFrameSetDescriptor::SearchFrame( const String& rName )
+{
+ for ( USHORT n=0; n<aFrames.Count(); n++ )
+ {
+ SfxFrameDescriptor *pFrame = aFrames[n];
+ if ( pFrame->aName == rName )
+ return pFrame;
+ if ( pFrame->GetFrameSet() )
+ {
+ pFrame = pFrame->GetFrameSet()->SearchFrame( rName );
+ if ( pFrame )
+ return pFrame;
+ }
+ }
+
+ return NULL;
+}
+
+void SfxFrameSetDescriptor::InsertFrame
+(
+ SfxFrameDescriptor* pFrame,
+ USHORT nPos
+)
+{
+ // fucking SvPtrArrs ...
+ if ( nPos == 0xFFFF )
+ nPos = aFrames.Count();
+
+ aFrames.Insert( pFrame, nPos );
+ pFrame->pParentFrameSet = this;
+}
+
+void SfxFrameSetDescriptor::RemoveFrame( SfxFrameDescriptor* pFrame )
+{
+ USHORT nPos = aFrames.GetPos( pFrame );
+ DBG_ASSERT( nPos != 0xFFFF, "Unbekannter Frame!" );
+ aFrames.Remove( nPos );
+ pFrame->pParentFrameSet = 0L;
+}
+
+BOOL SfxFrameSetDescriptor::HasFrameBorder() const
+{
+ if ( pImp->bNetscapeCompat && !GetFrameSpacing() )
+ return FALSE;
+
+ if ( ( nHasBorder & BORDER_SET ) || bIsRoot )
+ return (nHasBorder & BORDER_YES) != 0;
+ else
+ return pParentFrame->HasFrameBorder();
+}
+
+//------------------------------------------------------------------------
+
+void SfxFrameSetDescriptor::SetNetscapeCompatibility( BOOL bCompat )
+// Frame-Spacing Verhalten wenn kein Border
+{
+ pImp->bNetscapeCompat = bCompat;
+}
+
+//------------------------------------------------------------------------
+
+BOOL SfxFrameSetDescriptor::GetNetscapeCompatibility() const
+// Frame-Spacing Verhalten wenn kein Border
+{
+ return pImp->bNetscapeCompat;
+}
+
+//------------------------------------------------------------------------
+
+long SfxFrameSetDescriptor::GetFrameSpacing() const
+{
+ if ( nFrameSpacing == SPACING_NOT_SET && !bIsRoot &&
+ pParentFrame && pParentFrame->pParentFrameSet )
+ {
+ return pParentFrame->pParentFrameSet->GetFrameSpacing();
+ }
+ else
+ return nFrameSpacing;
+}
+
+BOOL SfxFrameSetDescriptor::Store( SvStream& rStream ) const
+{
+ // Die "0" ist wg. Kompatibilit"at zu alten Versionen n"otig. Diese
+ // glauben dann, ein leeres Frameset zu lesen und st"urzen dann
+ // wenigstens nicht ab.
+ long lLength = 20;
+ rStream << VERSION << lLength << (USHORT) 0 << (USHORT) 0;
+ rStream << nHasBorder
+ << nFrameSpacing
+ << (USHORT) bRowSet
+ << aFrames.Count();
+
+ for ( USHORT n=0; n<aFrames.Count(); n++ )
+ {
+ SfxFrameDescriptor* pFrame = aFrames[n];
+ pFrame->Store( rStream );
+ }
+ return TRUE;
+}
+
+BOOL SfxFrameSetDescriptor::Load( SvStream& rStream )
+{
+ long lPos = rStream.Tell(); // aktuelle Position merken
+ USHORT nCount=0, nHorizontal;
+ rStream >> nHasBorder
+ >> nFrameSpacing
+ >> nHorizontal
+ >> nCount;
+
+ if ( nCount == 0 )
+ {
+ // Das mu\s ein neues Format sein, da ein Frame normalerweise immer
+ // dabei ist
+ USHORT nVersion = nHasBorder;
+ rStream.Seek( lPos );
+ return Load( rStream, nVersion );
+ }
+
+ bRowSet = (BOOL) nHorizontal;
+ for ( USHORT n=0; n<nCount; n++ )
+ {
+ SfxFrameDescriptor *pFrame = new SfxFrameDescriptor( this );
+ pFrame->Load( rStream, 2 );
+ }
+ return TRUE;
+}
+
+BOOL SfxFrameSetDescriptor::Load( SvStream& rStream, USHORT nVersion )
+{
+ long lLength = 10; // in Version 2
+ long lPos = rStream.Tell(); // aktuelle Position merken
+
+ USHORT nCount=0, nHorizontal, nDummy1, nDummy2;
+ if ( nVersion > 2 )
+ // In der final Version
+ rStream >> nVersion >> lLength >> nDummy1 >> nDummy2;
+
+ rStream >> nHasBorder
+ >> nFrameSpacing
+ >> nHorizontal
+ >> nCount;
+
+ rStream.Seek( lPos + lLength );
+
+ bRowSet = (BOOL) nHorizontal;
+ for ( USHORT n=0; n<nCount; n++ )
+ {
+ SfxFrameDescriptor *pFrame = new SfxFrameDescriptor( this );
+ pFrame->Load( rStream, nVersion );
+ }
+ return TRUE;
+}
+
+void SfxFrameSetDescriptor::SetWallpaper( const Wallpaper& rWallpaper )
+{
+ DELETEZ( pImp->pWallpaper );
+
+ if ( rWallpaper.GetStyle() != WALLPAPER_NULL )
+ pImp->pWallpaper = new Wallpaper( rWallpaper );
+}
+
+const Wallpaper* SfxFrameSetDescriptor::GetWallpaper() const
+{
+ return pImp->pWallpaper;
+}
+
+SfxFrameSetDescriptor* SfxFrameSetDescriptor::Clone(
+ SfxFrameDescriptor *pFrame, BOOL bWithIds ) const
+{
+ SfxFrameSetDescriptor *pSet = new SfxFrameSetDescriptor( pFrame );
+
+ for ( USHORT n=0; n<aFrames.Count(); n++ )
+ SfxFrameDescriptor* pFrame = aFrames[n]->Clone( pSet, bWithIds );
+
+ pSet->aDocumentTitle = aDocumentTitle;
+ pSet->nFrameSpacing = nFrameSpacing;
+ pSet->nHasBorder = nHasBorder;
+ pSet->nMaxId = nMaxId;
+ pSet->bIsRoot = bIsRoot;
+ pSet->bRowSet = bRowSet;
+ if ( pImp->pWallpaper )
+ pSet->pImp->pWallpaper = new Wallpaper( *pImp->pWallpaper );
+ pSet->pImp->bNetscapeCompat = pImp->bNetscapeCompat;
+
+ return pSet;
+}
+
+BOOL SfxFrameSetDescriptor::CheckContent() const
+{
+ BOOL bRet=FALSE;
+ for ( USHORT n=0; n<aFrames.Count(); n++ )
+ if ( bRet = aFrames[n]->CheckContent() )
+ break;
+ return bRet;
+}
+
+BOOL SfxFrameSetDescriptor::CompareOriginal(
+ SfxFrameSetDescriptor& rDescr ) const
+{
+ if( aFrames.Count() != rDescr.aFrames.Count() )
+ return FALSE;
+ else
+ for( USHORT nPos = aFrames.Count(); nPos--; )
+ if( !aFrames[ nPos ]->CompareOriginal(
+ *rDescr.aFrames[ nPos ] ) )
+ return FALSE;
+ return TRUE;
+}
+
+
+void SfxFrameSetDescriptor::UnifyContent( BOOL bTakeActual )
+{
+ for ( USHORT n=0; n<aFrames.Count(); n++ )
+ aFrames[n]->UnifyContent( bTakeActual );
+}
+
+void SfxFrameSetDescriptor::CutRootSet()
+{
+ for ( USHORT n=0; n<aFrames.Count(); n++ )
+ {
+ SfxFrameDescriptor* pFrame = aFrames[n];
+ SfxFrameSetDescriptor *pSet = pFrame->GetFrameSet();
+ if ( pSet )
+ {
+ if ( pSet->bIsRoot )
+ {
+ delete pSet;
+ pFrame->pFrameSet = NULL;
+ }
+ else
+ pSet->CutRootSet();
+ }
+ }
+}
+
+USHORT SfxFrameSetDescriptor::MakeItemId()
+{
+ if ( pParentFrame && pParentFrame->pParentFrameSet )
+ return pParentFrame->pParentFrameSet->MakeItemId();
+ else
+ return ++nMaxId;
+}
+
+SfxFrameDescriptor::SfxFrameDescriptor( SfxFrameSetDescriptor *pParSet ) :
+ aMargin( -1, -1 ),
+ nWidth( 0L ),
+ nItemId( 0 ),
+ pFrameSet( 0L ),
+ pParentFrameSet( pParSet ),
+ eScroll( ScrollingAuto ),
+ eSizeSelector( SIZE_ABS ),
+ nHasBorder( BORDER_YES ),
+ bResizeHorizontal( TRUE ),
+ bResizeVertical( TRUE ),
+ bHasUI( TRUE ),
+ bReadOnly( FALSE )
+{
+ DBG_CTOR(SfxFrameDescriptor, 0);
+
+ pImp = new SfxFrameDescriptor_Impl;
+ if ( pParentFrameSet )
+ pParentFrameSet->InsertFrame( this );
+}
+
+SfxFrameDescriptor::~SfxFrameDescriptor()
+{
+ DBG_DTOR(SfxFrameDescriptor, 0);
+
+ if ( pFrameSet )
+ delete pFrameSet;
+ if ( pParentFrameSet )
+ pParentFrameSet->RemoveFrame( this );
+ delete pImp;
+}
+
+SfxItemSet* SfxFrameDescriptor::GetArgs()
+{
+ if( !pImp->pArgs )
+ pImp->pArgs = new SfxAllItemSet( SFX_APP()->GetPool() );
+ return pImp->pArgs;
+}
+
+void SfxFrameDescriptor::SetURL( const String& rURL )
+{
+ aURL = rURL;
+ SetActualURL( aURL );
+}
+
+void SfxFrameDescriptor::SetURL( const INetURLObject& rURL )
+{
+ aURL = rURL.GetMainURL();
+ SetActualURL( aURL );
+}
+
+void SfxFrameDescriptor::SetActualURL( const String& rURL )
+{
+ aActualURL = rURL;
+ if ( pImp->pArgs )
+ pImp->pArgs->ClearItem();
+}
+
+void SfxFrameDescriptor::SetActualURL( const INetURLObject& rURL )
+{
+ SetActualURL( rURL.GetMainURL() );
+}
+
+void SfxFrameDescriptor::SetEditable( BOOL bSet )
+{
+ pImp->bEditable = bSet;
+}
+
+BOOL SfxFrameDescriptor::IsEditable() const
+{
+ return pImp->bEditable;
+}
+
+BOOL SfxFrameDescriptor::CompareOriginal( SfxFrameDescriptor& rDescr ) const
+{
+ if( aURL != rDescr.aURL )
+ return FALSE;
+ else
+ // Zwei Descriptoren sind kompatibel, wenn einer keinen SetDescriptor
+ // und der andere einen RootDescriptor hat,
+ // wenn beide SetDescriptoren haben
+ // und diese kompatibel sind oder wenn beide keine
+ // SetDescriptoren haben.
+ return
+ !pFrameSet &&
+ ( !rDescr.pFrameSet || rDescr.pFrameSet->IsRootFrameSet() ) ||
+ !rDescr.pFrameSet && pFrameSet->IsRootFrameSet() ||
+ pFrameSet && rDescr.pFrameSet && pFrameSet->CompareOriginal(
+ *rDescr.pFrameSet );
+}
+
+BOOL SfxFrameDescriptor::CheckContent() const
+{
+ BOOL bRet = !( aURL == aActualURL );
+ if ( !bRet && pFrameSet )
+ bRet = pFrameSet->CheckContent();
+ return bRet;
+}
+
+void SfxFrameDescriptor::UnifyContent( BOOL bTakeActual )
+{
+ if ( bTakeActual )
+ aURL = aActualURL;
+ else
+ aActualURL = aURL;
+ if ( pFrameSet )
+ pFrameSet->UnifyContent( bTakeActual );
+}
+
+BOOL SfxFrameDescriptor::Store( SvStream& rStream ) const
+{
+ long lPos = rStream.Tell();
+ long lLength = 0L;
+ rStream << lLength << VERSION;
+
+ USHORT nFlags1 = 0;
+ USHORT nFlags2 = 0;
+ if ( bResizeHorizontal )
+ nFlags1 |= 0x01;
+ if ( bResizeVertical )
+ nFlags2 |= 0x01;
+ if ( !bHasUI ) // anders herum, damit kompatibel
+ nFlags1 |= 0x02;
+ if ( bReadOnly )
+ nFlags1 |= 0x04;
+
+ rStream.WriteByteString( INetURLObject::AbsToRel( aURL.GetMainURL() ), RTL_TEXTENCODING_UTF8 );
+ rStream.WriteByteString( aName, RTL_TEXTENCODING_UTF8 );
+ rStream << aMargin
+ << nWidth
+ << (USHORT) eSizeSelector
+ << (USHORT) eScroll
+ << (USHORT) nFlags1
+ << (USHORT) nFlags2
+ << (USHORT) (pFrameSet != 0)
+ << nHasBorder;
+
+ long lActPos = rStream.Tell();
+ lLength = lActPos - lPos;
+ rStream.Seek( lPos );
+ rStream << lLength;
+ rStream.Seek( lActPos );
+
+ if ( pFrameSet )
+ pFrameSet->Store(rStream);
+
+ return TRUE;
+}
+
+BOOL SfxFrameDescriptor::Load( SvStream& rStream, USHORT nVersion )
+{
+ String aURLName;
+ USHORT nFlags1, nFlags2, nScroll, nSet, nSelector;
+
+ long lLength = 0L;
+ long lPos = rStream.Tell(); // aktuelle Position merken
+
+ if ( nVersion > 2 )
+ rStream >> lLength >> nVersion;
+
+ rStream.ReadByteString( aURLName, RTL_TEXTENCODING_UTF8 );
+ rStream.ReadByteString( aName, RTL_TEXTENCODING_UTF8 );
+ rStream >> aMargin
+ >> nWidth
+ >> nSelector
+ >> nScroll
+ >> nFlags1
+ >> nFlags2
+ >> nSet
+ >> nHasBorder;
+
+ if ( nVersion > 2 )
+ rStream.Seek( lPos + lLength );
+
+ bResizeHorizontal = ( nFlags1 & 0x01 ) != 0;
+ bResizeVertical = ( nFlags2 & 0x01 ) != 0;
+ bHasUI = ( nFlags1 & 0x02 ) == 0;
+ bReadOnly = ( nFlags1 & 0x04 ) != 0;
+ eSizeSelector = (SizeSelector) nSelector;
+ aURL = INetURLObject::RelToAbs( aURLName );
+ eScroll = (ScrollingMode) nScroll;
+ aActualURL = aURL;
+
+ if ( nSet )
+ {
+ pFrameSet = new SfxFrameSetDescriptor( this );
+ pFrameSet->Load( rStream, nVersion );
+ }
+
+ return TRUE;
+}
+
+SfxFrameDescriptor* SfxFrameDescriptor::Clone(
+ SfxFrameSetDescriptor *pSet, BOOL bWithIds ) const
+{
+ SfxFrameDescriptor *pFrame =
+ new SfxFrameDescriptor( pSet );
+
+ pFrame->aURL = aURL;
+ pFrame->aActualURL = aActualURL;
+ pFrame->aName = aName;
+ pFrame->aMargin = aMargin;
+ pFrame->nWidth = nWidth;
+ pFrame->eSizeSelector = eSizeSelector;
+ pFrame->eScroll = eScroll;
+ pFrame->bResizeHorizontal = bResizeHorizontal;
+ pFrame->bResizeVertical = bResizeVertical;
+ pFrame->nHasBorder = nHasBorder;
+ pFrame->bHasUI = bHasUI;
+ pFrame->SetReadOnly( IsReadOnly() );
+ pFrame->SetEditable( IsEditable() );
+ if ( pImp->pWallpaper )
+ pFrame->pImp->pWallpaper = new Wallpaper( *pImp->pWallpaper );
+ if( pImp->pArgs )
+ {
+ // Aktuell ist im Clone von SfxAllItemSets noch ein Bug...
+ pFrame->pImp->pArgs = new SfxAllItemSet( SFX_APP()->GetPool() );
+ pFrame->pImp->pArgs->Put(*pImp->pArgs);
+ }
+
+ if ( bWithIds )
+ pFrame->nItemId = nItemId;
+ else
+ pFrame->nItemId = 0;
+
+ if ( pFrameSet )
+ pFrame->pFrameSet = pFrameSet->Clone( pFrame, bWithIds );
+
+ return pFrame;
+}
+
+
+SfxFrameDescriptor* SfxFrameDescriptor::Split( BOOL bHorizontal, BOOL bParent )
+{
+ DBG_ASSERT( pParentFrameSet, "Frames ohne Set koennen nicht gesplittet werden!" );
+
+ // Die Root holen, um neue Ids erzeugen zu k"onnen
+ SfxFrameSetDescriptor *pRoot = pParentFrameSet;
+ while ( pRoot->pParentFrame && pRoot->pParentFrame->pParentFrameSet )
+ pRoot = pRoot->pParentFrame->pParentFrameSet;
+
+ // Der Frame, hinter dem ein neuer eingef"ugt werden soll
+ SfxFrameDescriptor *pPrev = this;
+
+ // Dieser Descriptor soll gesplittet werden ...
+ SfxFrameDescriptor *pSplit = this;
+ SfxFrameSetDescriptor *pSplitSet = pParentFrameSet;
+
+ if ( bParent )
+ {
+ // Ein FrameSet suchen, das die gleiche Orientierung hat wie
+ // die "ubergebene
+ pSplit = pSplitSet->bIsRoot ? NULL : pSplitSet->pParentFrame;
+ while ( pSplit && pSplit->pParentFrameSet )
+ {
+ pSplitSet = pSplit->pParentFrameSet;
+ if ( pSplitSet->bRowSet == bHorizontal )
+ break;
+ pSplit = pSplitSet->pParentFrame;
+ }
+
+ // pSplit ist NULL oder TopLevel, wenn das Set das RootSet ist
+ pPrev = pSplit;
+ }
+ else
+ {
+ // Wenn das aktuelle FrameSet eine andere Orientierung hat, der
+ // zu splittende Frame aber der einzige ist, wird einfach die
+ // Orientierung des Sets umgedreht( k"urzt den Baum)
+ if ( pSplitSet->GetFrameCount() == 1 )
+ pSplitSet->bRowSet = bHorizontal;
+ }
+
+ if ( pSplitSet->bRowSet != bHorizontal )
+ {
+ BOOL bCreated = FALSE;
+ if ( !pSplit || !pSplit->pParentFrameSet )
+ {
+ // RootSet splitten: das Alignment wechselt
+ pSplitSet->bRowSet = bHorizontal;
+ bHorizontal = !bHorizontal;
+ pSplit = new SfxFrameDescriptor( pSplitSet );
+ bCreated = TRUE;
+ }
+
+ if ( bParent )
+ {
+ // "Unter pSplit wird ein FrameSet eingef"ugt
+ SfxFrameSetDescriptor *pSet = new SfxFrameSetDescriptor( NULL );
+ pSet->bIsRoot = FALSE;
+ pSet->bRowSet = bHorizontal;
+
+ // Die Frames unterhalb des alten Sets umh"angen
+ USHORT nCount = pSplitSet->aFrames.Count();
+ USHORT nPos = 0;
+ for ( USHORT n=0; n<nCount; n++ )
+ {
+ SfxFrameDescriptor *pCur = pSplitSet->aFrames[0];
+ if ( pCur != pSplit )
+ {
+ pSplitSet->aFrames.Remove(nPos);
+ pSet->InsertFrame( pCur );
+ pCur->pParentFrameSet = pSet;
+ }
+ else
+ nPos++;
+ }
+
+ pPrev = pSplit;
+
+ if ( bCreated )
+ {
+ USHORT nID = pRoot->MakeItemId();
+ pSplit->SetItemId( nID );
+
+ // Neuer Frame erh"alt ganzen Platz
+ pPrev->nWidth = 100;
+ pPrev->eSizeSelector = SIZE_PERCENT;
+
+ // Verkettung herstellen
+ pSplit->pFrameSet = pSet;
+ pSet->pParentFrame = pSplit;
+ }
+ }
+ else
+ {
+ // Den gesplitteten Frame kopieren und moven
+ USHORT nPos = pSplitSet->aFrames.GetPos( pPrev );
+ pSplit = pPrev->Clone( pSplitSet );
+ pSplitSet->RemoveFrame( pSplit );
+ pSplitSet->InsertFrame( pSplit, nPos );
+
+ // Unter dem neuen Frame wird ein FrameSet eingef"ugt, das den
+ // alten Frame enth"alt, der anschlie\send geteilt wird
+ SfxFrameSetDescriptor *pSet = new SfxFrameSetDescriptor( pSplit );
+ pSet->bIsRoot = FALSE;
+ pSet->bRowSet = bHorizontal;
+
+ // Attribute des neu eingef"ugten Frames zur"ucksetzen und eine
+ // Id erzeugen
+ pSplit->aName.Erase();
+ pSplit->aMargin = Size( -1, -1 );
+ pSplit->aURL.SetURL( "" );
+ pSplit->aActualURL.SetURL( "" );
+ pSplit->SetItemId( pRoot->MakeItemId() );
+ bCreated = TRUE;
+
+ // Alter Frame erh"alt ganzen Platz im neu eingef"ugten Frameset
+ pPrev->nWidth = 100;
+ pPrev->eSizeSelector = SIZE_PERCENT;
+
+ // Alten Frame umh"angen
+ pSplitSet->RemoveFrame( pPrev );
+ pSet->InsertFrame( pPrev );
+ }
+ }
+
+ if ( !pPrev || !pPrev->pParentFrameSet )
+ return NULL;
+
+ // Hinter pPrev einen neuen Frame einf"ugen
+ SfxFrameDescriptor *pFrame = new SfxFrameDescriptor( NULL );
+ pSplitSet = pPrev->pParentFrameSet;
+ pSplitSet->InsertFrame( pFrame, pSplitSet->aFrames.GetPos( pPrev ) + 1 );
+ pFrame->pParentFrameSet = pSplitSet;
+
+ // Size und ID setzen
+ USHORT n = pRoot->MakeItemId();
+ pFrame->SetItemId( n );
+
+ // Platz zwischen beiden Frames aufteilen
+ long nSize = pPrev->nWidth / 2L;
+ pPrev->nWidth = nSize ? nSize : 1L;
+ pFrame->nWidth = pPrev->nWidth;
+ pFrame->eSizeSelector = pPrev->eSizeSelector;
+
+ return pFrame;
+}
+
+BOOL SfxFrameDescriptor::CanSplit( BOOL bHorizontal, BOOL bParent ) const
+{
+ DBG_ASSERT( pParentFrameSet, "Frames ohne Set koennen nicht gesplittet werden!" );
+
+ // Die Root holen, um neue Ids erzeugen zu k"onnen
+ const SfxFrameSetDescriptor *pRoot = pParentFrameSet;
+ while ( pRoot->pParentFrame && pRoot->pParentFrame->pParentFrameSet )
+ pRoot = pRoot->pParentFrame->pParentFrameSet;
+
+ // Der Frame, hinter dem ein neuer eingef"ugt werden soll
+ const SfxFrameDescriptor *pPrev = this;
+
+ // Dieser Descriptor soll gesplittet werden ...
+ const SfxFrameDescriptor *pSplit = this;
+ const SfxFrameSetDescriptor *pSplitSet = pParentFrameSet;
+ BOOL bRowSet = pSplitSet->bRowSet;
+
+ if ( bParent )
+ {
+ // Ein FrameSet suchen, das die gleiche Orientierung hat wie
+ // die "ubergebene
+ pSplit = pSplitSet->bIsRoot ? NULL : pSplitSet->pParentFrame;
+ while ( pSplit && pSplit->pParentFrameSet )
+ {
+ pSplitSet = pSplit->pParentFrameSet;
+ if ( pSplitSet->bRowSet == bHorizontal )
+ break;
+ pSplit = pSplitSet->pParentFrame;
+ }
+
+ // pSplit ist jetzt NULL oder TopLevel, wenn das Set das RootSet ist
+ pPrev = pSplit;
+ bRowSet = pSplitSet->bRowSet;
+ }
+ else
+ {
+ // Wenn das aktuelle FrameSet eine andere Orientierung hat, der
+ // zu splittende Frame aber der einzige ist, wird einfach die
+ // Orientierung des Sets umgedreht( k"urzt den Baum)
+ if ( pSplitSet->GetFrameCount() == 1 )
+ bRowSet = bHorizontal;
+ }
+
+ if ( bRowSet == bHorizontal && ( !pPrev || !pPrev->pParentFrameSet ) )
+ return FALSE;
+ return TRUE;
+}
+
+SfxFrameDescriptor* SfxFrameDescriptor::Next() const
+{
+ if ( !pParentFrameSet )
+ return NULL;
+
+ USHORT nPos = pParentFrameSet->aFrames.GetPos( (SfxFrameDescriptor*) this );
+ if ( nPos < pParentFrameSet->aFrames.Count() - 1 )
+ return pParentFrameSet->aFrames[nPos+1];
+ else
+ return NULL;
+}
+
+SfxFrameDescriptor* SfxFrameDescriptor::Prev() const
+{
+ if ( !pParentFrameSet )
+ return NULL;
+
+ USHORT nPos = pParentFrameSet->aFrames.GetPos( (SfxFrameDescriptor*) this );
+ if ( nPos > 0 )
+ return pParentFrameSet->aFrames[nPos-1];
+ else
+ return NULL;
+}
+
+USHORT SfxFrameDescriptor::GetParentSetId() const
+{
+ if ( !pParentFrameSet )
+ return USHRT_MAX;
+
+ SfxFrameDescriptor *pFrame = pParentFrameSet->pParentFrame;
+ if ( pFrame )
+ return pFrame->nItemId;
+ else
+ return 0;
+}
+
+USHORT SfxFrameDescriptor::GetWinBits() const
+{
+ USHORT nBits = 0;
+ if ( eSizeSelector == SIZE_REL )
+ nBits |= SWIB_RELATIVESIZE;
+ if ( eSizeSelector == SIZE_PERCENT )
+ nBits |= SWIB_PERCENTSIZE;
+ if ( !IsResizable() )
+ nBits |= SWIB_FIXED;
+ if ( pFrameSet && pFrameSet->IsColSet() )
+ nBits |= SWIB_COLSET;
+ if ( !nWidth )
+ nBits |= SWIB_INVISIBLE;
+ return nBits;
+}
+
+BOOL SfxFrameDescriptor::HasFrameBorder() const
+{
+ if ( pParentFrameSet )
+ {
+ if ( pParentFrameSet->pImp->bNetscapeCompat && !pParentFrameSet->GetFrameSpacing() )
+ return FALSE;
+ else if ( ( nHasBorder & BORDER_SET ) )
+ return (nHasBorder & BORDER_YES) != 0;
+ else
+ return pParentFrameSet->HasFrameBorder();
+ }
+ else
+ return (nHasBorder & BORDER_YES) != 0;
+}
+
+long SfxFrameDescriptor::GetSize() const
+{
+#if !defined ( VCL ) && ( defined (WIN) || defined (WNT) )
+ long nSize = nWidth;
+ if ( nSize && eSizeSelector == SIZE_ABS && System::GetGUIVersion() < 400 && HasFrameBorder() )
+ // SV zeichnet dann den Border um das Fenster herum
+ nSize += 1L;
+ return nSize;
+#endif
+
+ return nWidth;
+}
+
+void SfxFrameDescriptor::TakeProperties( const SfxFrameProperties& rProp )
+{
+ aURL = aActualURL = rProp.aURL;
+ aName = rProp.aName;
+ aMargin.Width() = rProp.lMarginWidth;
+ aMargin.Height() = rProp.lMarginHeight;
+ nWidth = rProp.lSize;
+ eScroll = rProp.eScroll;
+ eSizeSelector = rProp.eSizeSelector;
+ nHasBorder = rProp.bHasBorder ? BORDER_YES : BORDER_NO;
+ if ( rProp.bBorderSet )
+ nHasBorder |= BORDER_SET;
+ bResizeHorizontal = bResizeVertical = rProp.bResizable;
+ if ( pParentFrameSet )
+ {
+ SfxFrameDescriptor *pParent = pParentFrameSet->pParentFrame;
+ if ( pParent )
+ {
+ pParent->nWidth = rProp.lSetSize;
+ pParent->eSizeSelector = rProp.eSetSizeSelector;
+ pParent->bResizeHorizontal = pParent->bResizeVertical = rProp.bSetResizable;
+ }
+
+ pParentFrameSet->nFrameSpacing = rProp.lFrameSpacing;
+ }
+}
+
+void SfxFrameDescriptor::SetWallpaper( const Wallpaper& rWallpaper )
+{
+ DELETEZ( pImp->pWallpaper );
+
+ if ( rWallpaper.GetStyle() != WALLPAPER_NULL )
+ pImp->pWallpaper = new Wallpaper( rWallpaper );
+}
+
+const Wallpaper* SfxFrameDescriptor::GetWallpaper() const
+{
+ return pImp->pWallpaper;
+}
+
+USHORT SfxFrameDescriptor::GetItemPos() const
+{
+ if ( pParentFrameSet )
+ {
+ USHORT nRet = pParentFrameSet->aFrames.GetPos((SfxFrameDescriptor*)this);
+ for ( USHORT n=0; n<nRet; n++ )
+ if ( !pParentFrameSet->GetFrame(n)->nWidth )
+ nRet--;
+ return nRet;
+ }
+
+ return USHRT_MAX;
+}
+
+
+SfxFrameProperties::SfxFrameProperties( const SfxFrameDescriptor *pD )
+ : aURL( pD->GetURL().GetMainURL() )
+ , aName( pD->GetName() )
+ , lMarginWidth( pD->GetMargin().Width() )
+ , lMarginHeight( pD->GetMargin().Height() )
+ , lSize( pD->GetWidth() )
+ , lSetSize( SIZE_NOT_SET )
+ , lFrameSpacing( SPACING_NOT_SET )
+ , lInheritedFrameSpacing( SPACING_NOT_SET )
+ , eScroll( pD->GetScrollingMode() )
+ , eSizeSelector( pD->GetSizeSelector() )
+ , eSetSizeSelector( SIZE_REL )
+ , bHasBorder( pD->HasFrameBorder() )
+ , bHasBorderInherited( FALSE )
+ , bBorderSet( pD->IsFrameBorderSet() )
+ , bResizable( pD->IsResizable() )
+ , bIsInColSet( FALSE )
+ , bSetResizable( FALSE )
+ , bIsRootSet( FALSE )
+ , pFrame( pD->Clone() )
+{
+ SfxFrameSetDescriptor *pSet = pD->GetParent();
+ if ( pSet )
+ {
+ bIsRootSet = ( pSet->IsRootFrameSet() );
+ lFrameSpacing = pSet->GetFrameSpacing();
+ lSetSize = bIsRootSet ? SIZE_NOT_SET : pSet->GetParentFrame()->GetWidth();
+ eSetSizeSelector = bIsRootSet ? SIZE_ABS : pSet->GetParentFrame()->GetSizeSelector();
+ bSetResizable = bIsRootSet ? FALSE : pSet->GetParentFrame()->IsResizable();
+ bIsInColSet = pSet->IsColSet();
+ bHasBorderInherited = pSet->HasFrameBorder();
+ lInheritedFrameSpacing = bIsRootSet ? SPACING_NOT_SET : pSet->GetParentFrame()->GetParent()->GetFrameSpacing();
+ }
+ else
+ bBorderSet = TRUE;
+}
+
+SfxFrameProperties& SfxFrameProperties::operator =(
+ const SfxFrameProperties &rProp )
+{
+ aURL = rProp.aURL;
+ aName = rProp.aName;
+ lMarginWidth = rProp.lMarginWidth;
+ lMarginHeight = rProp.lMarginHeight;
+ lSize = rProp.lSize;
+ lSetSize = rProp.lSetSize;
+ lFrameSpacing = rProp.lFrameSpacing;
+ lInheritedFrameSpacing = rProp.lInheritedFrameSpacing;
+ eScroll = rProp.eScroll;
+ eSizeSelector = rProp.eSizeSelector;
+ eSetSizeSelector = rProp.eSetSizeSelector;
+ bHasBorder = rProp.bHasBorder;
+ bBorderSet = rProp.bBorderSet;
+ bResizable = rProp.bResizable;
+ bSetResizable = rProp.bSetResizable;
+ bIsRootSet = rProp.bIsRootSet;
+ bIsInColSet = rProp.bIsInColSet;
+ bHasBorderInherited = rProp.bHasBorderInherited;
+ pFrame = rProp.pFrame->Clone();
+ return *this;
+}
+
+int SfxFrameProperties::operator ==( const SfxFrameProperties& rProp ) const
+{
+ return aURL == rProp.aURL && aName == rProp.aName && lMarginWidth == rProp.lMarginWidth && lMarginHeight == rProp.lMarginHeight &&
+ lSize == rProp.lSize && eScroll == rProp.eScroll && eSizeSelector == rProp.eSizeSelector &&
+ lSetSize == rProp.lSetSize && lFrameSpacing == rProp.lFrameSpacing && eSetSizeSelector == rProp.eSetSizeSelector &&
+ bHasBorder == rProp.bHasBorder && bBorderSet == rProp.bBorderSet &&
+ bResizable == rProp.bResizable && bSetResizable == rProp.bSetResizable;
+}
+
+TYPEINIT1(SfxFrameDescriptorItem, SfxPoolItem);
+
+SfxFrameDescriptorItem::~SfxFrameDescriptorItem()
+{}
+
+int SfxFrameDescriptorItem::operator==( const SfxPoolItem& rAttr ) const
+{
+ DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
+
+ return aProperties == ((SfxFrameDescriptorItem&)rAttr).aProperties;
+}
+
+// -----------------------------------------------------------------------
+
+SfxPoolItem* SfxFrameDescriptorItem::Clone( SfxItemPool* ) const
+{
+ return new SfxFrameDescriptorItem( *this );
+}
+
+//------------------------------------------------------------------------
+
+SfxItemPresentation SfxFrameDescriptorItem::GetPresentation
+(
+ SfxItemPresentation ePres,
+ SfxMapUnit eCoreUnit,
+ SfxMapUnit ePresUnit,
+ XubString& rText,
+ const International *
+) const
+{
+ rText.Erase();
+ return SFX_ITEM_PRESENTATION_NONE;
+}
+
+
diff --git a/sfx2/source/doc/makefile.mk b/sfx2/source/doc/makefile.mk
new file mode 100644
index 000000000000..be9da34394b0
--- /dev/null
+++ b/sfx2/source/doc/makefile.mk
@@ -0,0 +1,120 @@
+#*************************************************************************
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.1.1.1 $
+#
+# last change: $Author: hr $ $Date: 2000-09-18 16:52:32 $
+#
+# The Contents of this file are made available subject to the terms of
+# either of the following licenses
+#
+# - GNU Lesser General Public License Version 2.1
+# - Sun Industry Standards Source License Version 1.1
+#
+# Sun Microsystems Inc., October, 2000
+#
+# GNU Lesser General Public License Version 2.1
+# =============================================
+# Copyright 2000 by Sun Microsystems, Inc.
+# 901 San Antonio Road, Palo Alto, CA 94303, USA
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License version 2.1, as published by the Free Software Foundation.
+#
+# This library 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 for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+#
+# Sun Industry Standards Source License Version 1.1
+# =================================================
+# The contents of this file are subject to the Sun Industry Standards
+# Source License Version 1.1 (the "License"); You may not use this file
+# except in compliance with the License. You may obtain a copy of the
+# License at http://www.openoffice.org/license.html.
+#
+# Software provided under this License is provided on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+# See the License for the specific provisions governing your rights and
+# obligations concerning the Software.
+#
+# The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+#
+# Copyright: 2000 by Sun Microsystems, Inc.
+#
+# All Rights Reserved.
+#
+# Contributor(s): _______________________________________
+#
+#
+#
+#*************************************************************************
+
+PRJ=..$/..
+
+PRJNAME=sfx2
+TARGET=doc
+ENABLE_EXCEPTIONS=TRUE
+.INCLUDE : $(PRJ)$/util$/makefile.pmk
+AUTOSEG=true
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : svpre.mk
+.INCLUDE : settings.mk
+.INCLUDE : sv.mk
+
+# --- Files --------------------------------------------------------
+
+SRCFILES = \
+ doc.src new.src doctdlg.src docvor.src
+
+SLOFILES = \
+ $(SLO)$/docfile.obj \
+ $(SLO)$/objuno.obj \
+ $(SLO)$/frmdescr.obj \
+ $(SLO)$/fsetobsh.obj \
+ $(SLO)$/docinf.obj \
+ $(SLO)$/interno.obj \
+ $(SLO)$/objxtor.obj \
+ $(SLO)$/objmisc.obj \
+ $(SLO)$/objstor.obj \
+ $(SLO)$/objcont.obj \
+ $(SLO)$/objserv.obj \
+ $(SLO)$/objitem.obj \
+ $(SLO)$/clientsh.obj \
+ $(SLO)$/docfac.obj \
+ $(SLO)$/docfilt.obj \
+ $(SLO)$/doctempl.obj \
+ $(SLO)$/docvor.obj \
+ $(SLO)$/new.obj \
+ $(SLO)$/doctdlg.obj \
+ $(SLO)$/frameobj.obj \
+ $(SLO)$/sfxbasemodel.obj
+
+EXCEPTIONSFILES=$(SLO)$/objuno.obj \
+ $(SLO)$/docfile.obj \
+# $(SLO)$/msgmodel.obj \
+ $(SLO)$/sfxbasemodel.obj \
+ $(SLO)$/objxtor.obj
+
+# --- Tagets -------------------------------------------------------
+
+.INCLUDE : target.mk
+
+
+
+
+
+
+
diff --git a/sfx2/source/doc/new.cxx b/sfx2/source/doc/new.cxx
new file mode 100644
index 000000000000..8fbf975b4fd4
--- /dev/null
+++ b/sfx2/source/doc/new.cxx
@@ -0,0 +1,695 @@
+/*************************************************************************
+ *
+ * $RCSfile: new.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:32 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include "new.hxx"
+
+#ifndef _GROUP_HXX //autogen
+#include <vcl/group.hxx>
+#endif
+#ifndef _GDIMTF_HXX //autogen
+#include <vcl/gdimtf.hxx>
+#endif
+#ifndef _MSGBOX_HXX //autogen
+#include <vcl/msgbox.hxx>
+#endif
+#ifndef _MOREBTN_HXX //autogen
+#include <vcl/morebtn.hxx>
+#endif
+#ifndef _SVSTOR_HXX //autogen
+#include <so3/svstor.hxx>
+#endif
+#ifndef _SVMEDIT_HXX
+#include <svtools/svmedit.hxx>
+#endif
+#include <svtools/itemset.hxx>
+#include <svtools/eitem.hxx>
+#ifndef _SFXECODE_HXX
+#include <svtools/sfxecode.hxx>
+#endif
+#ifndef _EHDL_HXX
+#include <svtools/ehdl.hxx>
+#endif
+
+#include "new.hrc"
+#include "doc.hrc"
+#include "sfx.hrc"
+#include "helpid.hrc"
+#include "sfxtypes.hxx"
+#include "app.hxx"
+#include "docinf.hxx"
+#include "viewfrm.hxx"
+#include "docfac.hxx"
+#include "objsh.hxx"
+#include "fltfnc.hxx"
+#include "viewsh.hxx"
+#include "viewfac.hxx"
+#include "interno.hxx"
+#include "sfxresid.hxx"
+#include "docfile.hxx"
+#include "preview.hxx"
+
+//========================================================================
+
+#define MORE_BTN(x) pMoreBt->x
+
+//========================================================================
+
+void SfxPreviewBase_Impl::SetObjectShell( SfxObjectShell* pObj )
+{
+ GDIMetaFile* pFile = pObj ? pObj->GetPreviewMetaFile( ) : 0;
+ delete pMetaFile;
+ pMetaFile = pFile;
+ Invalidate();
+}
+
+SfxPreviewBase_Impl::SfxPreviewBase_Impl(
+ Window* pParent, const ResId& rResId )
+ : Window(pParent, rResId), pMetaFile( 0 )
+{
+}
+
+SfxPreviewBase_Impl::SfxPreviewBase_Impl( Window* pParent )
+ : Window(pParent, 0 ), pMetaFile( 0 )
+{
+ Resize();
+ Show();
+}
+
+SfxPreviewBase_Impl::~SfxPreviewBase_Impl()
+{
+ delete pMetaFile;
+}
+
+void SfxPreviewBase_Impl::Resize()
+{
+ Invalidate();
+}
+
+void SfxPreviewBase_Impl::SetGDIFile( GDIMetaFile* pFile )
+{
+ delete pMetaFile;
+ pMetaFile = pFile;
+ Invalidate();
+}
+
+SfxFrameWindow* SfxPreviewWin_Impl::PreviewFactory(
+ SfxFrame* pFrame, const String& rName )
+{
+ return new SfxFrameWindow( new SfxPreviewWin_Impl(
+ &pFrame->GetCurrentViewFrame()->GetWindow() ) );
+}
+
+void SfxPreviewWin_Impl::ImpPaint(
+ const Rectangle&, GDIMetaFile* pFile, Window* pWindow )
+{
+ Size aTmpSize = pFile ? pFile->GetPrefSize() : Size(1,1 );
+ DBG_ASSERT( aTmpSize.Height()*aTmpSize.Width(),
+ "size of first page is 0, overload GetFirstPageSize or set vis-area!" );
+#define FRAME 4
+ long nWidth = pWindow->GetOutputSize().Width() - 2*FRAME;
+ long nHeight = pWindow->GetOutputSize().Height() - 2*FRAME;
+ if( nWidth < 0 ) nWidth = 0;
+ if( nHeight < 0 ) nHeight = 0;
+
+ double dRatio=((double)aTmpSize.Width())/aTmpSize.Height();
+ double dRatioPreV=((double) nWidth ) / nHeight;
+ Size aSize;
+ Point aPoint;
+ if (dRatio>dRatioPreV)
+ {
+ aSize=Size(nWidth, (USHORT)(nWidth/dRatio));
+ aPoint=Point( 0, (USHORT)((nHeight-aSize.Height())/2));
+ }
+ else
+ {
+ aSize=Size((USHORT)(nHeight*dRatio), nHeight);
+ aPoint=Point((USHORT)((nWidth-aSize.Width())/2),0);
+ }
+ Point bPoint=Point(nWidth,nHeight)-aPoint;
+
+ pWindow->SetLineColor();
+ Color aLightGrayCol( COL_LIGHTGRAY );
+ pWindow->SetFillColor( aLightGrayCol );
+ pWindow->DrawRect( Rectangle( Point( 0,0 ), pWindow->GetOutputSize() ) );
+ if ( pFile )
+ {
+ Color aBlackCol( COL_BLACK );
+ Color aWhiteCol( COL_WHITE );
+ pWindow->SetLineColor( aBlackCol );
+ pWindow->SetFillColor( aWhiteCol );
+ pWindow->DrawRect( Rectangle( aPoint + Point( FRAME, FRAME ), bPoint + Point( FRAME, FRAME ) ) );
+//! pFile->Move( Point( FRAME, FRAME ) );
+//! pFile->Scale( Fraction( aTmpSize.Width(), aSize.Width() ),
+//! Fraction( aTmpSize.Height(), aSize.Height() ) );
+ pFile->WindStart();
+ pFile->Play( pWindow, aPoint + Point( FRAME, FRAME ), aSize );
+ }
+}
+
+void SfxPreviewWin_Impl::Paint( const Rectangle& rRect )
+{
+ ImpPaint( rRect, pMetaFile, this );
+}
+
+SfxPreviewWin::SfxPreviewWin(
+ Window* pParent, const ResId& rResId, SfxObjectShellLock &rDocSh )
+ : Window(pParent, rResId), rDocShell( rDocSh )
+{
+ SetHelpId( HID_PREVIEW_FRAME );
+}
+
+void SfxPreviewWin::Paint( const Rectangle& rRect )
+{
+ GDIMetaFile* pFile = rDocShell->GetPreviewMetaFile();
+ SfxPreviewWin_Impl::ImpPaint( rRect, pFile, this );
+ delete pFile;
+}
+
+
+class SfxNewFileDialog_Impl
+{
+ FixedText aRegionFt;
+ ListBox aRegionLb;
+ FixedText aTemplateFt;
+ ListBox aTemplateLb;
+
+ CheckBox aPreviewBtn;
+ SfxPreviewWin_Impl aPreviewWin;
+
+ FixedText aTitleFt;
+ Edit aTitleEd;
+ FixedText aThemaFt;
+ Edit aThemaEd;
+ FixedText aKeywordsFt;
+ Edit aKeywordsEd;
+ FixedText aDescFt;
+ MultiLineEdit aDescEd;
+ GroupBox aDocinfoGb;
+
+ OKButton aOkBt;
+ CancelButton aCancelBt;
+ HelpButton aHelpBt;
+ MoreButton* pMoreBt;
+ Timer aPrevTimer;
+ String aNone;
+
+ USHORT nFlags;
+ SfxDocumentTemplates aTemplates;
+ SfxObjectShellLock xDocShell;
+ SfxDocumentInfo *pDocInfo;
+ SfxNewFileDialog* pAntiImpl;
+
+ void ClearInfo();
+ DECL_LINK( Update, void * );
+
+ DECL_LINK( RegionSelect, ListBox * );
+ DECL_LINK( TemplateSelect, ListBox * );
+ DECL_LINK( DoubleClick, ListBox * );
+ void TogglePreview(CheckBox *);
+ DECL_LINK( Expand, MoreButton * );
+ DECL_LINK( PreviewClick, CheckBox * );
+ USHORT GetSelectedTemplatePos() const;
+
+public:
+
+ SfxNewFileDialog_Impl( SfxNewFileDialog* pAntiImplP, USHORT nFlags );
+ ~SfxNewFileDialog_Impl();
+
+ // Liefert FALSE, wenn '- Keine -' als Vorlage eingestellt ist
+ // Nur wenn IsTemplate() TRUE liefert, koennen Vorlagennamen
+ // erfragt werden
+ BOOL IsTemplate() const;
+ String GetTemplateRegion() const;
+ String GetTemplateName() const;
+ String GetTemplateFileName() const;
+};
+
+
+//-------------------------------------------------------------------------
+
+void SfxNewFileDialog_Impl::ClearInfo()
+{
+ const String aNo;
+ aTitleEd.SetText(aNo);
+ aThemaEd.SetText(aNo);
+ aKeywordsEd.SetText(aNo);
+ aDescEd.SetText(aNo);
+}
+
+//-------------------------------------------------------------------------
+
+IMPL_LINK( SfxNewFileDialog_Impl, Update, void *, EMPTYARG )
+{
+ if ( xDocShell.Is() )
+ {
+ if ( xDocShell->GetProgress() )
+ return FALSE;
+ xDocShell.Clear();
+ }
+
+ const USHORT nEntry = GetSelectedTemplatePos();
+ if(!nEntry)
+ {
+ ClearInfo();
+ aPreviewWin.Invalidate();
+ aPreviewWin.SetObjectShell( 0);
+ return 0;
+ }
+
+ if (nFlags & SFXWB_DOCINFO)
+ {
+ // DocInfo anzeigen
+ const String aFile(
+ aTemplates.GetPath(aRegionLb.GetSelectEntryPos(), nEntry-1) );
+
+ // Dokumentinfo lesen und anzeigen
+ if (pAntiImpl->FillDocumentInfo(aFile, *pDocInfo))
+ {
+ aTitleEd.SetText(pDocInfo->GetTitle());
+ aThemaEd.SetText(pDocInfo->GetTheme());
+ aKeywordsEd.SetText(pDocInfo->GetKeywords());
+ aDescEd.SetText(pDocInfo->GetComment());
+ }
+ else
+ ClearInfo();
+ }
+
+ if ( aPreviewBtn.IsChecked() && (nFlags & SFXWB_PREVIEW) == SFXWB_PREVIEW)
+ {
+
+ String aFileName = aTemplates.GetPath( aRegionLb.GetSelectEntryPos(), nEntry-1);
+ INetURLObject aObj( aFileName, INET_PROT_FILE );
+
+ for ( SfxObjectShell* pTmp = SfxObjectShell::GetFirst();
+ pTmp;
+ pTmp = SfxObjectShell::GetNext(*pTmp) )
+ {
+ //! fsys bug op==
+ if ( pTmp->GetMedium())
+ // ??? HasName() MM
+ if( INetURLObject( pTmp->GetMedium()->GetName(), INET_PROT_FILE ) == aObj )
+ {
+ xDocShell = pTmp;
+ break;
+ }
+ }
+
+ if ( !xDocShell.Is() )
+ {
+ Window *pParent = Application::GetDefDialogParent();
+ Application::SetDefDialogParent( pAntiImpl );
+ SfxErrorContext eEC(ERRCTX_SFX_LOADTEMPLATE,pAntiImpl);
+ SfxApplication *pSfxApp = SFX_APP();
+ ULONG lErr;
+ SfxItemSet* pSet = new SfxAllItemSet( pSfxApp->GetPool() );
+ pSet->Put( SfxBoolItem( SID_TEMPLATE, TRUE ) );
+ pSet->Put( SfxBoolItem( SID_PREVIEW, TRUE ) );
+ if( lErr = pSfxApp->LoadTemplate( xDocShell, aFileName, String(), TRUE, pSet ) )
+ ErrorHandler::HandleError(lErr);
+ Application::SetDefDialogParent( pParent );
+ if ( !xDocShell.Is() )
+ {
+ aPreviewWin.SetObjectShell( 0 );
+ return FALSE;
+ }
+ }
+
+ aPreviewWin.SetObjectShell( xDocShell );
+ }
+ return TRUE;
+}
+
+//-------------------------------------------------------------------------
+
+IMPL_LINK( SfxNewFileDialog_Impl, RegionSelect, ListBox *, pBox )
+{
+ if ( xDocShell.Is() && xDocShell->GetProgress() )
+ return 0;
+
+ const USHORT nRegion = pBox->GetSelectEntryPos();
+ const USHORT nCount = aTemplates.GetRegionCount()? aTemplates.GetCount(nRegion): 0;
+ aTemplateLb.SetUpdateMode(FALSE);
+ aTemplateLb.Clear();
+ String aSel=aRegionLb.GetSelectEntry();
+ USHORT nc=aSel.Search('(');
+ if (nc-1&&nc!=STRING_NOTFOUND)
+ aSel.Erase(nc-1);
+ if (aSel.CompareIgnoreCaseToAscii( String(SfxResId(STR_STANDARD)) )==COMPARE_EQUAL)
+ aTemplateLb.InsertEntry(aNone);
+ for (USHORT i = 0; i < nCount; ++i)
+ aTemplateLb.InsertEntry(aTemplates.GetName(nRegion, i));
+ aTemplateLb.SelectEntryPos(0);
+ aTemplateLb.SetUpdateMode(TRUE);
+ aTemplateLb.Invalidate();
+ aTemplateLb.Update();
+ if (nFlags & SFXWB_DOCINFO && aTemplateLb.GetEntryCount() >= 1)
+ TemplateSelect(&aTemplateLb);
+ return 0;
+}
+
+//-------------------------------------------------------------------------
+
+IMPL_LINK_INLINE_START( SfxNewFileDialog_Impl, Expand, MoreButton *, pMoreButton )
+{
+ TemplateSelect(&aTemplateLb);
+ return 0;
+}
+IMPL_LINK_INLINE_END( SfxNewFileDialog_Impl, Expand, MoreButton *, pMoreButton )
+
+//-------------------------------------------------------------------------
+
+IMPL_LINK( SfxNewFileDialog_Impl, PreviewClick, CheckBox *, pBox )
+{
+ if ( xDocShell.Is() && xDocShell->GetProgress() )
+ return 0;
+
+ USHORT nEntry = GetSelectedTemplatePos();
+ if ( nEntry && pBox->IsChecked() )
+ {
+ if(!Update(0))
+ aPreviewWin.Invalidate();
+ }
+ else
+ {
+ if (xDocShell.Is())
+ xDocShell.Clear();
+ aPreviewWin.SetObjectShell( 0 );
+ }
+ return 0;
+}
+
+//-------------------------------------------------------------------------
+
+IMPL_LINK( SfxNewFileDialog_Impl, TemplateSelect, ListBox *, pListBox )
+{
+
+ // noch am Laden
+ if ( xDocShell && xDocShell->GetProgress() )
+ return 0;
+
+ if ( !MORE_BTN(GetState()) )
+ // Dialog nicht aufgeklappt
+ return 0;
+
+ aPrevTimer.Start();
+ return 0;
+}
+
+//-------------------------------------------------------------------------
+
+IMPL_LINK_INLINE_START( SfxNewFileDialog_Impl, DoubleClick, ListBox *, pListBox )
+{
+ // noch am Laden
+ if ( !xDocShell.Is() || !xDocShell->GetProgress() )
+ pAntiImpl->EndDialog(RET_OK);
+ return 0;
+}
+IMPL_LINK_INLINE_END( SfxNewFileDialog_Impl, DoubleClick, ListBox *, pListBox )
+
+//-------------------------------------------------------------------------
+
+USHORT SfxNewFileDialog_Impl::GetSelectedTemplatePos() const
+{
+ USHORT nEntry=aTemplateLb.GetSelectEntryPos();
+ String aSel=aRegionLb.GetSelectEntry().Copy();
+ USHORT nc=aSel.Search('(');
+ if (nc-1&&nc!=STRING_NOTFOUND)
+ aSel.Erase(nc-1);
+ if (aSel.CompareIgnoreCaseToAscii(String(SfxResId(STR_STANDARD)))!=COMPARE_EQUAL)
+ nEntry++;
+ if (!aTemplateLb.GetSelectEntryCount())
+ nEntry=0;
+ return nEntry;
+}
+
+//-------------------------------------------------------------------------
+
+BOOL SfxNewFileDialog_Impl::IsTemplate() const
+{
+ return GetSelectedTemplatePos()!=0;
+
+}
+
+//-------------------------------------------------------------------------
+
+String SfxNewFileDialog_Impl::GetTemplateFileName() const
+{
+ if(!IsTemplate() || !aTemplates.GetRegionCount())
+ return String();
+ return aTemplates.GetPath(aRegionLb.GetSelectEntryPos(),
+ GetSelectedTemplatePos()-1);
+}
+
+//-------------------------------------------------------------------------
+
+String SfxNewFileDialog_Impl::GetTemplateRegion() const
+{
+ if(!IsTemplate() || !aTemplates.GetRegionCount())
+ return String();
+ return aRegionLb.GetSelectEntry();
+}
+
+//-------------------------------------------------------------------------
+
+String SfxNewFileDialog_Impl::GetTemplateName() const
+{
+ if(!IsTemplate() || !aTemplates.GetRegionCount())
+ return String();
+ return aTemplateLb.GetSelectEntry();
+}
+
+//-------------------------------------------------------------------------
+
+void AdjustPosSize_Impl(Window *pWin, short nMoveOffset, short nSizeOffset)
+{
+ Point aPos(pWin->GetPosPixel());
+ Size aSize(pWin->GetSizePixel());
+ aPos.X() -= nMoveOffset;
+ aSize.Width() += nSizeOffset;
+ pWin->SetPosSizePixel(aPos, aSize);
+}
+
+//-------------------------------------------------------------------------
+
+SfxNewFileDialog_Impl::SfxNewFileDialog_Impl(
+ SfxNewFileDialog* pAntiImplP, USHORT nFl)
+ : aOkBt( pAntiImplP, ResId( BT_OK ) ),
+ aCancelBt( pAntiImplP, ResId( BT_CANCEL ) ),
+ aTemplateLb( pAntiImplP, ResId( LB_TEMPLATE ) ),
+ aRegionFt( pAntiImplP, ResId( FT_REGION ) ),
+ aThemaFt( pAntiImplP, ResId( FT_THEMA ) ),
+ aPreviewWin( pAntiImplP, ResId( WIN_PREVIEW ) ),
+ aTemplateFt( pAntiImplP, ResId( FT_TEMPLATE ) ),
+ aRegionLb( pAntiImplP, ResId( LB_REGION ) ),
+ aHelpBt( pAntiImplP, ResId( BT_HELP ) ),
+ aKeywordsEd( pAntiImplP, ResId( ED_KEYWORDS ) ),
+ aTitleEd( pAntiImplP, ResId( ED_TITLE ) ),
+ aThemaEd( pAntiImplP, ResId( ED_THEMA ) ),
+ pMoreBt( new MoreButton( pAntiImplP, ResId( BT_MORE ) ) ),
+ aPreviewBtn( pAntiImplP, ResId( BTN_PREVIEW ) ),
+ aDocinfoGb( pAntiImplP, ResId( GB_DOCINFO ) ),
+ aTitleFt( pAntiImplP, ResId( FT_TITLE ) ),
+ aKeywordsFt( pAntiImplP, ResId( FT_KEYWORDS ) ),
+ aDescFt( pAntiImplP, ResId( FT_DESC ) ),
+ aDescEd( pAntiImplP, ResId( ED_DESC ) ),
+ aNone( ResId(STR_NONE) ),
+ nFlags(nFl),
+ pDocInfo(0),
+ pAntiImpl( pAntiImplP )
+{
+ short nMoveOffset = *(short *)pAntiImplP->GetClassRes();
+ pAntiImplP->IncrementRes(sizeof(short));
+ short nExpandSize= *(short *)pAntiImplP->GetClassRes();
+ pAntiImplP->IncrementRes(sizeof(short));
+ pAntiImplP->FreeResource();
+ aTemplates.Construct();
+
+ if (!nFlags)
+ MORE_BTN(Hide());
+ else
+ {
+ MORE_BTN(SetClickHdl(LINK(this, SfxNewFileDialog_Impl, Expand)));
+ if(nFlags & SFXWB_DOCINFO)
+ {
+ MORE_BTN(AddWindow(&aTitleFt));
+ MORE_BTN(AddWindow(&aTitleEd));
+ MORE_BTN(AddWindow(&aThemaFt));
+ MORE_BTN(AddWindow(&aThemaEd));
+ MORE_BTN(AddWindow(&aKeywordsFt));
+ MORE_BTN(AddWindow(&aKeywordsEd));
+ MORE_BTN(AddWindow(&aDescFt));
+ MORE_BTN(AddWindow(&aDescEd));
+ MORE_BTN(AddWindow(&aDocinfoGb));
+ aTemplateLb.SetSelectHdl(LINK(this, SfxNewFileDialog_Impl, TemplateSelect));
+ pDocInfo = new SfxDocumentInfo;
+ }
+ if((nFlags & SFXWB_PREVIEW) == SFXWB_PREVIEW)
+ {
+ MORE_BTN(AddWindow(&aPreviewBtn));
+ MORE_BTN(AddWindow(&aPreviewWin));
+ aPreviewBtn.SetClickHdl(LINK(this, SfxNewFileDialog_Impl, PreviewClick));
+ }
+ else
+ {
+ aPreviewBtn.Hide();
+ aPreviewWin.Hide();
+ nMoveOffset = (short)pAntiImplP->LogicToPixel(
+ Size(nMoveOffset, nMoveOffset), MAP_APPFONT).Width();
+ nExpandSize = (short)pAntiImplP->LogicToPixel(
+ Size(nExpandSize, nExpandSize), MAP_APPFONT).Width();
+ AdjustPosSize_Impl(&aTitleFt, nMoveOffset, 0);
+ AdjustPosSize_Impl(&aTitleEd, nMoveOffset, nExpandSize);
+ AdjustPosSize_Impl(&aThemaFt, nMoveOffset, 0);
+ AdjustPosSize_Impl(&aThemaEd, nMoveOffset, nExpandSize);
+ AdjustPosSize_Impl(&aKeywordsFt, nMoveOffset, 0);
+ AdjustPosSize_Impl(&aKeywordsEd, nMoveOffset, nExpandSize);
+ AdjustPosSize_Impl(&aDescFt , nMoveOffset, 0);
+ AdjustPosSize_Impl(&aDescEd , nMoveOffset, nExpandSize);
+ AdjustPosSize_Impl(&aDocinfoGb, nMoveOffset, nExpandSize);
+ }
+ }
+
+ String &rExtra = pAntiImplP->GetExtraData();
+ USHORT nTokCount = rExtra.GetTokenCount( '|' );
+ if( nTokCount > 0 && nFlags )
+ MORE_BTN(SetState( rExtra.GetToken( 0, '|' ) == 'Y' ));
+ if( nTokCount > 1 && nFlags )
+ aPreviewBtn.Check( rExtra.GetToken( 1 ,'|' ) == 'Y' );
+
+ aTemplateLb.SetDoubleClickHdl(LINK(this, SfxNewFileDialog_Impl, DoubleClick));
+ const USHORT nCount = aTemplates.GetRegionCount();
+ if (nCount)
+ {
+ for(USHORT i = 0; i < nCount; ++i)
+ aRegionLb.InsertEntry(aTemplates.GetFullRegionName(i));
+ aRegionLb.SetSelectHdl(LINK(this, SfxNewFileDialog_Impl, RegionSelect));
+ }
+
+ aPrevTimer.SetTimeout( 500 );
+ aPrevTimer.SetTimeoutHdl( LINK( this, SfxNewFileDialog_Impl, Update));
+
+// else
+// aRegionLb.InsertEntry(String(SfxResId(STR_STANDARD)));
+ aRegionLb.SelectEntryPos(0);
+ RegionSelect(&aRegionLb);
+}
+
+//-------------------------------------------------------------------------
+
+SfxNewFileDialog_Impl::~SfxNewFileDialog_Impl()
+{
+ String &rExtra = pAntiImpl->GetExtraData();
+ rExtra = MORE_BTN(GetState()) ? 'Y' : 'N';
+ rExtra += '|';
+ rExtra += aPreviewBtn.IsChecked() ? 'Y' : 'N';
+
+ delete pDocInfo;
+ delete pMoreBt;
+}
+
+
+SfxNewFileDialog::SfxNewFileDialog(Window *pParent, USHORT nFlags)
+ : SfxModalDialog( pParent, SfxResId( DLG_NEW_FILE ) )
+{
+ pImpl = new SfxNewFileDialog_Impl( this, nFlags );
+}
+
+SfxNewFileDialog::~SfxNewFileDialog()
+{
+ delete pImpl;
+}
+
+BOOL SfxNewFileDialog::IsTemplate() const
+{
+ return pImpl->IsTemplate();
+}
+
+String SfxNewFileDialog::GetTemplateRegion() const
+{
+ return pImpl->GetTemplateRegion();
+}
+
+String SfxNewFileDialog::GetTemplateName() const
+{
+ return pImpl->GetTemplateName();
+}
+
+String SfxNewFileDialog::GetTemplateFileName() const
+{
+ return pImpl->GetTemplateFileName();
+}
+
+BOOL SfxNewFileDialog::FillDocumentInfo
+(
+ const String &rFile, // Datei incl. Pfad, deren DocInfo gelesen werden soll
+ SfxDocumentInfo &rInfo // DocInfo, die gefuellt werden soll
+)
+{
+ SvStorageRef aStor = new SvStorage(
+ rFile, STREAM_READ |STREAM_NOCREATE | STREAM_SHARE_DENYWRITE, STORAGE_TRANSACTED );
+ if ( SVSTREAM_OK != aStor->GetError() )
+ return FALSE;
+ BOOL bLoadOk;
+ bLoadOk=rInfo.Load(aStor);
+ return bLoadOk;
+}
+
+
diff --git a/sfx2/source/doc/new.hrc b/sfx2/source/doc/new.hrc
new file mode 100644
index 000000000000..3294b4f6325a
--- /dev/null
+++ b/sfx2/source/doc/new.hrc
@@ -0,0 +1,84 @@
+/*************************************************************************
+ *
+ * $RCSfile: new.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:32 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define BTN_PREVIEW 51
+#define WIN_PREVIEW 50
+#define GB_DOCCLASS 1
+#define LB_DOCCLASS 2
+#define GB_DESC 10
+#define FT_DESC 11
+#define FT_STYLESHEETS 19
+#define FT_REGION 20
+#define ED_TITLE 56
+#define ED_KEYWORDS 61
+#define FT_KEYWORDS 60
+#define FT_TITLE 55
+#define ED_DESC 71
+#define FT_DOCINFO 70
+#define LB_REGION 21
+#define BT_OK 30
+#define BT_CANCEL 31
+#define BT_HELP 32
+#define GB_DOCINFO 70
+#define ED_THEMA 55
+#define FT_THEMA 54
+#define FT_TEMPLATE 53
+#define LB_TEMPLATE 52
+#define BT_MORE 32
diff --git a/sfx2/source/doc/new.src b/sfx2/source/doc/new.src
new file mode 100644
index 000000000000..87686b977922
--- /dev/null
+++ b/sfx2/source/doc/new.src
@@ -0,0 +1,439 @@
+/*************************************************************************
+ *
+ * $RCSfile: new.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:32 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+ // include ---------------------------------------------------------------
+#include "sfx.hrc"
+#include "doc.hrc"
+#include "new.hrc"
+ // pragma ----------------------------------------------------------------
+
+ // DLG_NEW_FILE ----------------------------------------------------------
+ModalDialog DLG_NEW_FILE
+{
+ HelpId = SID_NEWDOC ;
+ OutputSize = TRUE ;
+ SVLook = TRUE ;
+ Size = MAP_APPFONT ( 330 , 96 ) ;
+ Text = "Neu" ;
+ Text [ ENGLISH ] = "New" ;
+ Text [ norwegian ] = "Ny" ;
+ Text [ italian ] = "Nuovo" ;
+ Text [ portuguese_brazilian ] = "Novo" ;
+ Text [ portuguese ] = "Novo" ;
+ Text [ finnish ] = "Uusi" ;
+ Text [ danish ] = "Ny" ;
+ Text [ french ] = "Nouveau" ;
+ Text [ swedish ] = "Nytt" ;
+ Text [ dutch ] = "Nieuw" ;
+ Text [ spanish ] = "Nuevo" ;
+ Text [ english_us ] = "New" ;
+ Moveable = TRUE ;
+ OKButton BT_OK
+ {
+ Pos = MAP_APPFONT ( 274 , 6 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ DefButton = TRUE ;
+ };
+ CancelButton BT_CANCEL
+ {
+ Pos = MAP_APPFONT ( 274 , 23 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ };
+ HelpButton BT_HELP
+ {
+ Pos = MAP_APPFONT ( 274 , 43 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ };
+ ListBox LB_REGION
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 6 , 18 ) ;
+ Size = MAP_APPFONT ( 127 , 72 ) ;
+ CurPos = 0 ;
+ };
+ FixedText FT_REGION
+ {
+ Pos = MAP_APPFONT ( 6 , 6 ) ;
+ Size = MAP_APPFONT ( 97 , 10 ) ;
+ Text = "~Bereiche" ;
+ Text [ ENGLISH ] = "~Regions" ;
+ Text [ norwegian ] = "~Omrder" ;
+ Text [ italian ] = "~Categorie" ;
+ Text [ portuguese_brazilian ] = "~Regies" ;
+ Text [ portuguese ] = "~Categorias" ;
+ Text [ finnish ] = "~Alueet" ;
+ Text [ danish ] = "Omrder" ;
+ Text [ french ] = "~Catgories" ;
+ Text [ swedish ] = "~Kategorier" ;
+ Text [ dutch ] = "~Bereiken" ;
+ Text [ spanish ] = "~reas" ;
+ Text [ english_us ] = "~Categories" ;
+ Left = TRUE ;
+ Text[ chinese_simplified ] = "(~C)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Obszary";
+ Text[ japanese ] = "͈(~C)";
+ Text[ chinese_traditional ] = "(~C)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "(~C)";
+ Text[ turkish ] = "~Kategori";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_TEMPLATE
+ {
+ Pos = MAP_APPFONT ( 139 , 6 ) ;
+ Size = MAP_APPFONT ( 97 , 10 ) ;
+ Text = "~Vorlagen" ;
+ Text [ ENGLISH ] = "~Templates" ;
+ Text [ norwegian ] = "~Maler" ;
+ Text [ italian ] = "~Modelli" ;
+ Text [ portuguese_brazilian ] = "~Modelos" ;
+ Text [ portuguese ] = "~Modelos" ;
+ Text [ finnish ] = "~Mallit" ;
+ Text [ danish ] = "Skabeloner" ;
+ Text [ french ] = "~Modles" ;
+ Text [ swedish ] = "~Mallar" ;
+ Text [ dutch ] = "S~jablonen" ;
+ Text [ spanish ] = "P~lantillas" ;
+ Text [ english_us ] = "~Templates" ;
+ Left = TRUE ;
+ Text[ chinese_simplified ] = "ʽ(~T)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Szablony";
+ Text[ japanese ] = "ڰ(~T)";
+ Text[ chinese_traditional ] = "˦(~T)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = " (~T)";
+ Text[ turkish ] = "~ablon";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_TEMPLATE
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 139 , 18 ) ;
+ Size = MAP_APPFONT ( 127 , 72 ) ;
+ CurPos = 0 ;
+ };
+ MoreButton BT_MORE
+ {
+ Pos = MAP_APPFONT ( 274 , 70 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? ~Zustze : ~Zustze */
+ /* ### ACHTUNG: Neuer Text in Resource? ~Zustze : ~Zustze */
+ Text = "~Zustze" ;
+ Text [ ENGLISH ] = "~More" ;
+ Text [ norwegian ] = "~Mer" ;
+ Text [ italian ] = "E~xtra" ;
+ Text [ portuguese_brazilian ] = "~Mais" ;
+ Text [ portuguese ] = "~Outros" ;
+ Text [ finnish ] = "~Enemmn" ;
+ Text [ danish ] = "Flere" ;
+ Text [ french ] = "O~ptions" ;
+ Text [ swedish ] = "~Fler" ;
+ Text [ dutch ] = "~Overige" ;
+ Text [ spanish ] = "~Opciones" ;
+ Text [ english_us ] = "~More" ;
+ Delta = 148 ;
+ MapUnit = MAP_APPFONT ;
+ Text[ chinese_simplified ] = "(~M)";
+ Text[ russian ] = "~";
+ Text[ polish ] = "~Dodatki";
+ Text[ japanese ] = "ڍ(~M)";
+ Text[ chinese_traditional ] = "[(~M)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "(~M)";
+ Text[ turkish ] = "~Aralar";
+ Text[ language_user1 ] = " ";
+ };
+ Window WIN_PREVIEW
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 6 , 110 ) ;
+ Size = MAP_APPFONT ( 127 , 129 ) ;
+ Hide = TRUE ;
+ SVLook = FALSE ;
+ };
+ CheckBox BTN_PREVIEW
+ {
+ Pos = MAP_APPFONT ( 6 , 96 ) ;
+ Size = MAP_APPFONT ( 97 , 10 ) ;
+ Text = "Vor~schau" ;
+ Text [ ENGLISH ] = "Pre~view" ;
+ Text [ norwegian ] = "For~hndsvisning" ;
+ Text [ italian ] = "Anteprima" ;
+ Text [ portuguese_brazilian ] = "E~xaminar" ;
+ Text [ portuguese ] = "~Previsualizao" ;
+ Text [ finnish ] = "~Esikatselu" ;
+ Text [ danish ] = "Eksempel" ;
+ Text [ french ] = "~Aperu" ;
+ Text [ swedish ] = "Frhandsvi~sning" ;
+ Text [ dutch ] = "~Voorbeeld" ;
+ Text [ spanish ] = "Pre~visualizacin" ;
+ Text [ english_us ] = "Pre~view" ;
+ Hide = TRUE ;
+ Text[ chinese_simplified ] = "Ԥ(~V)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Po~dgld";
+ Text[ japanese ] = "ޭ(~V)";
+ Text[ chinese_traditional ] = "˵(~V)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "̸ (~V)";
+ Text[ turkish ] = "~nizleme";
+ Text[ language_user1 ] = " ";
+ };
+ GroupBox GB_DOCINFO
+ {
+ Pos = MAP_APPFONT ( 139 , 97 ) ;
+ Size = MAP_APPFONT ( 186 , 143 ) ;
+ Text = "Beschreibung" ;
+ Text [ English ] = "Description" ;
+ Hide = TRUE ;
+ Text [ english_us ] = "Description" ;
+ Text [ italian ] = "Descrizione" ;
+ Text [ spanish ] = "Descripcin" ;
+ Text [ french ] = "Description" ;
+ Text [ dutch ] = "Beschrijving" ;
+ Text [ swedish ] = "Beskrivning" ;
+ Text [ danish ] = "Beskrivelse" ;
+ Text [ portuguese_brazilian ] = "Beschreibung" ;
+ Text [ portuguese ] = "Descrio" ;
+ Text[ chinese_simplified ] = "˵";
+ Text[ russian ] = "";
+ Text[ polish ] = "Opis";
+ Text[ japanese ] = "v";
+ Text[ chinese_traditional ] = "yz";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "Tanm";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_TITLE
+ {
+ Pos = MAP_APPFONT ( 145 , 108 ) ;
+ Size = MAP_APPFONT ( 175 , 10 ) ;
+ Text = "~Titel" ;
+ Text [ ENGLISH ] = "T~itle" ;
+ Text [ norwegian ] = "Tittel" ;
+ Text [ italian ] = "~Titolo" ;
+ Text [ portuguese_brazilian ] = "Ttulo" ;
+ Text [ portuguese ] = "~Ttulo" ;
+ Text [ finnish ] = "Otsikko" ;
+ Text [ danish ] = "Titel" ;
+ Text [ french ] = "~Titre" ;
+ Text [ swedish ] = "~Rubrik" ;
+ Text [ dutch ] = "~Titel" ;
+ Text [ spanish ] = "~Ttulo" ;
+ Text [ english_us ] = "~Title" ;
+ Hide = TRUE ;
+ Text[ chinese_simplified ] = "(~T)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Tytu";
+ Text[ japanese ] = "(~T)";
+ Text[ chinese_traditional ] = "D(~T)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "~";
+ Text[ korean ] = "(~T)";
+ Text[ turkish ] = "~Balk";
+ Text[ language_user1 ] = " ";
+ };
+ Edit ED_TITLE
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 145 , 121 ) ;
+ Size = MAP_APPFONT ( 175 , 12 ) ;
+ ReadOnly = TRUE ;
+ Hide = TRUE ;
+ };
+ FixedText FT_THEMA
+ {
+ Pos = MAP_APPFONT ( 145 , 135 ) ;
+ Size = MAP_APPFONT ( 175 , 10 ) ;
+ Text = "The~ma" ;
+ Text [ ENGLISH ] = "Th~eme" ;
+ Text [ norwegian ] = "Tema" ;
+ Text [ italian ] = "Argomento" ;
+ Text [ portuguese_brazilian ] = "Tema" ;
+ Text [ portuguese ] = "~Assunto" ;
+ Text [ finnish ] = "Aihe" ;
+ Text [ danish ] = "Emne" ;
+ Text [ french ] = "S~ujet" ;
+ Text [ swedish ] = "~Tema" ;
+ Text [ dutch ] = "~Onderwerp" ;
+ Text [ spanish ] = "~Tema" ;
+ Text [ english_us ] = "Subject" ;
+ Hide = TRUE ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "Temat";
+ Text[ japanese ] = "ð";
+ Text[ chinese_traditional ] = "DD";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "Konu";
+ Text[ language_user1 ] = " ";
+ };
+ Edit ED_THEMA
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 145 , 148 ) ;
+ Size = MAP_APPFONT ( 175 , 12 ) ;
+ ReadOnly = TRUE ;
+ Hide = TRUE ;
+ };
+ FixedText FT_KEYWORDS
+ {
+ Pos = MAP_APPFONT ( 145 , 162 ) ;
+ Size = MAP_APPFONT ( 175 , 10 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? S~chlsselworte : S~chlsselworte */
+ /* ### ACHTUNG: Neuer Text in Resource? S~chlsselworte : S~chlsselworte */
+ Text = "S~chlsselworte" ;
+ Text [ ENGLISH ] = "~Keywords" ;
+ Text [ norwegian ] = "Nkkelord" ;
+ Text [ italian ] = "Parole chiave" ;
+ Text [ portuguese_brazilian ] = "Palavras-chave" ;
+ Text [ portuguese ] = "~Palavras-chave" ;
+ Text [ finnish ] = "Avainsanat" ;
+ Text [ danish ] = "Ngleord" ;
+ Text [ french ] = "Mots-cl~s" ;
+ Text [ swedish ] = "~Nyckelord" ;
+ Text [ dutch ] = "S~leutelwoorden" ;
+ Text [ spanish ] = "Palabras ~clave" ;
+ Text [ english_us ] = "~Key words" ;
+ Hide = TRUE ;
+ Text[ chinese_simplified ] = "ؼ(~K)";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Sowa kluczowe";
+ Text[ japanese ] = "ܰ(~K)";
+ Text[ chinese_traditional ] = "r(~K)";
+ Text[ arabic ] = " ";
+ Text[ greek ] = "-";
+ Text[ korean ] = "Ű(~K)";
+ Text[ turkish ] = "A~nahtar szckler";
+ Text[ language_user1 ] = " ";
+ };
+ Edit ED_KEYWORDS
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 145 , 175 ) ;
+ Size = MAP_APPFONT ( 175 , 12 ) ;
+ ReadOnly = TRUE ;
+ Hide = TRUE ;
+ };
+ FixedText FT_DESC
+ {
+ Pos = MAP_APPFONT ( 145 , 189 ) ;
+ Size = MAP_APPFONT ( 175 , 10 ) ;
+ Text = "B~eschreibung" ;
+ Text [ ENGLISH ] = "~Description" ;
+ Text [ norwegian ] = "Beskrivelse" ;
+ Text [ italian ] = "Descrizione" ;
+ Text [ portuguese_brazilian ] = "Descrio" ;
+ Text [ portuguese ] = "~Descrio" ;
+ Text [ finnish ] = "Kuvaus" ;
+ Text [ danish ] = "Beskrivelse" ;
+ Text [ french ] = "~Description" ;
+ Text [ swedish ] = "B~eskrivning" ;
+ Text [ dutch ] = "Be~schrijving" ;
+ Text [ spanish ] = "~Descripcin" ;
+ Text [ english_us ] = "~Description" ;
+ Hide = TRUE ;
+ Text[ chinese_simplified ] = "˵(~D)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Opis";
+ Text[ japanese ] = "v(~D)";
+ Text[ chinese_traditional ] = "yz(~D)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "(~D)";
+ Text[ turkish ] = "~Tanm";
+ Text[ language_user1 ] = " ";
+ };
+ MultiLineEdit ED_DESC
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 144 , 202 ) ;
+ Size = MAP_APPFONT ( 175 , 32 ) ;
+ IgnoreTab = TRUE ;
+ ReadOnly = TRUE ;
+ Hide = TRUE ;
+ };
+ ExtraData =
+ {
+ 103;
+ 44;
+ };
+ Text[ chinese_simplified ] = "½";
+ Text[ russian ] = "";
+ Text[ polish ] = "Nowy";
+ Text[ japanese ] = "VK쐬";
+ Text[ chinese_traditional ] = "}ҷs";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "Yeni";
+ Text[ language_user1 ] = " ";
+};
+ // ********************************************************************** EOF
diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx
new file mode 100644
index 000000000000..0fc3dbd4390e
--- /dev/null
+++ b/sfx2/source/doc/objcont.cxx
@@ -0,0 +1,1669 @@
+/*************************************************************************
+ *
+ * $RCSfile: objcont.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:32 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include "docfile.hxx"
+
+#ifndef _CACHESTR_HXX //autogen
+#include <tools/cachestr.hxx>
+#endif
+#ifndef _SV_MSGBOX_HXX //autogen wg. QueryBox
+#include <vcl/msgbox.hxx>
+#endif
+#ifndef _SFXSTYLE_HXX //autogen
+#include <svtools/style.hxx>
+#endif
+#ifndef _SV_WRKWIN_HXX //autogen
+#include <vcl/wrkwin.hxx>
+#endif
+
+#pragma hdrstop
+
+#include <svtools/stritem.hxx>
+#include <svtools/intitem.hxx>
+#include <svtools/rectitem.hxx>
+#include <svtools/urihelper.hxx>
+
+#ifndef _SFXECODE_HXX
+#include <svtools/sfxecode.hxx>
+#endif
+#ifndef _EHDL_HXX
+#include <svtools/ehdl.hxx>
+#endif
+#ifndef _DATETIME_HXX
+#include <tools/datetime.hxx>
+#endif
+#include <math.h>
+
+#include "sfxresid.hxx"
+#include "saveopt.hxx"
+#include "stbmgr.hxx"
+#include "dinfdlg.hxx"
+#include "fltfnc.hxx"
+#include "docfac.hxx"
+#include "saveopt.hxx"
+#include "cfgmgr.hxx"
+#include "inimgr.hxx"
+#include "viewsh.hxx"
+#include "objsh.hxx"
+#include "objshimp.hxx"
+#include "cfgitem.hxx"
+#include "evntconf.hxx"
+#include "interno.hxx"
+#include "sfxhelp.hxx"
+#include "dispatch.hxx"
+#include "urlframe.hxx"
+#include "printer.hxx"
+#include "topfrm.hxx"
+#include "basmgr.hxx"
+#include "doctempl.hxx"
+#include "doc.hrc"
+
+//====================================================================
+
+#define SFX_WINDOWS_STREAM "SfxWindows"
+#define SFX_PREVIEW_STREAM "SfxPreview"
+
+//====================================================================
+
+GDIMetaFile* SfxObjectShell::GetPreviewMetaFile( ) const
+{
+ // Nur wenn gerade nicht gedruckt wird, darf DoDraw aufgerufen
+ // werden, sonst wird u.U. der Printer abgeschossen !
+ SfxViewFrame *pFrame = SfxViewFrame::GetFirst( this );
+ if ( pFrame && pFrame->GetViewShell() &&
+ pFrame->GetViewShell()->GetPrinter() &&
+ pFrame->GetViewShell()->GetPrinter()->IsPrinting() )
+ return 0;
+
+ Size aTmpSize = ((SfxObjectShell*)this)->GetFirstPageSize();
+ GDIMetaFile* pFile = new GDIMetaFile;
+ pFile->SetPrefSize( aTmpSize );
+ DBG_ASSERT( aTmpSize.Height()*aTmpSize.Width(),
+ "size of first page is 0, overload GetFirstPageSize or set vis-area!" );
+#define FRAME 4
+
+ VirtualDevice aDevice;
+ aDevice.EnableOutput( FALSE );
+ SfxInPlaceObject* pObj = GetInPlaceObject();
+ if( pObj )
+ {
+ MapMode aMode( pObj->GetMapUnit() );
+ aDevice.SetMapMode( aMode );
+ }
+ pFile->Record( &aDevice );
+ SfxInPlaceObject* pInPlaceObj = GetInPlaceObject();
+ DBG_ASSERT( pInPlaceObj, "Ohne Inplace Objekt keine Grafik" );
+ if (pInPlaceObj)
+ pInPlaceObj->DoDraw(
+ &aDevice, Point(0,0), aTmpSize,
+ JobSetup(), ASPECT_THUMBNAIL );
+ pFile->Stop();
+ return pFile;
+}
+
+FASTBOOL SfxObjectShell::SaveWindows_Impl( SvStorage &rStor ) const
+{
+ SvStorageStreamRef xStream = rStor.OpenStream( DEFINE_CONST_UNICODE( SFX_WINDOWS_STREAM ),
+ STREAM_TRUNC | STREAM_STD_READWRITE);
+ if ( !xStream )
+ return FALSE;
+
+ xStream->SetBufferSize(1024);
+ xStream->SetVersion( rStor.GetVersion() );
+
+ // "uber alle Fenster iterieren (aber aktives Window zuletzt)
+ SfxViewFrame *pActFrame = SfxViewFrame::Current();
+ if ( pActFrame->GetObjectShell() != this )
+ pActFrame = SfxViewFrame::GetFirst(this);
+
+ String aActWinData;
+ for ( SfxViewFrame *pFrame = SfxViewFrame::GetFirst(this, TYPE(SfxTopViewFrame) ); pFrame;
+ pFrame = SfxViewFrame::GetNext(*pFrame, this, TYPE(SfxTopViewFrame) ) )
+ {
+ // Bei Dokumenten, die Outplace aktiv sind, kann beim Speichern auch schon die View weg sein!
+ if ( pFrame->GetViewShell() )
+ {
+ SfxTopFrame* pTop = (SfxTopFrame*) pFrame->GetFrame();
+ Window* pWin = pTop->GetTopWindow_Impl();
+
+ char cToken = SfxIniManager::GetToken();
+ const BOOL bActWin = pActFrame == pFrame;
+ String aUserData;
+ pFrame->GetViewShell()->WriteUserData(aUserData);
+
+ // assemble ini-data
+ String aWinData;
+ aWinData += pFrame->GetCurViewId();
+ aWinData += cToken;
+/*
+ if ( !pWin || pWin->IsMaximized() )
+ aWinData += SFX_WINSIZE_MAX;
+ else if ( pWin->IsMinimized() )
+ aWinData += SFX_WINSIZE_MIN;
+ else
+*/
+ aWinData += SfxIniManager::GetString( pWin->GetPosPixel(), pWin->GetSizePixel() );
+ aWinData += cToken;
+ aWinData += aUserData;
+
+ // aktives kennzeichnen
+ aWinData += cToken;
+ aWinData += bActWin ? '1' : '0';
+
+ // je nachdem merken oder abspeichern
+ if ( bActWin )
+ aActWinData = aWinData;
+ else
+ xStream->WriteByteString( aWinData );
+ }
+ }
+
+ // aktives Window hinterher
+ xStream->WriteByteString( aActWinData );
+ return !xStream->GetError();
+}
+
+//====================================================================
+
+SfxViewFrame* SfxObjectShell::LoadWindows_Impl( SfxTopFrame *pPreferedFrame )
+{
+ DBG_ASSERT( pPreferedFrame, "Can't be implemented in StarPortal!" );
+ if ( pImp->bLoadingWindows || !pPreferedFrame )
+ return NULL;
+
+ const SfxFilter* pFilter;
+ if( GetMedium() && ( pFilter = GetMedium()->GetFilter() ) && !pFilter->UsesStorage() )
+ return 0;
+
+ // Modus bestimmen
+ SfxApplication *pSfxApp = SFX_APP();
+ SfxViewFrame *pPrefered = pPreferedFrame ? pPreferedFrame->GetCurrentViewFrame() : 0;
+ SfxOptions &rOpt = pSfxApp->GetOptions();
+ BOOL bLoadDocWins = rOpt.IsSaveDocWins() && !pPrefered;
+ BOOL bLoadDocView = rOpt.IsSaveDocView();
+
+ // In a StarPortal not possible at the moment
+ bLoadDocWins = FALSE;
+
+ // gar nichts laden?
+ if ( !bLoadDocView )
+ return 0;
+
+ // Sub-Stream "offnen
+ SvStorage *pStor = GetStorage();
+ SvStorageStreamRef xStream = pStor ? pStor->OpenStream( DEFINE_CONST_UNICODE( SFX_WINDOWS_STREAM ), STREAM_STD_READ ) : 0;
+ if ( !xStream )
+ return 0;
+
+ BOOL bOldFormat = TRUE;
+ xStream->SetVersion( pStor->GetVersion() );
+ xStream->SetBufferSize(1024);
+
+ // alle gespeicherten Fenster "offnen
+ SfxViewFrame *pActiveFrame = 0;
+ String aWinData;
+ char cToken = SfxIniManager::GetToken();
+ SfxItemSet *pSet = GetMedium()->GetItemSet();
+
+ pImp->bLoadingWindows = TRUE;
+ BOOL bLoaded = FALSE;
+ while ( xStream->ReadByteString( aWinData ), aWinData.Len() )
+ {
+ if ( aWinData.GetToken( 0, cToken ).EqualsAscii( "TASK" ) )
+ {
+ // doesn't make any sense with the new task handling using system tasks or browser windows
+ bOldFormat = FALSE;
+ }
+ else
+ {
+ USHORT nViewId = (USHORT) aWinData.GetToken( 0, cToken ).ToInt32();
+ FASTBOOL bActive=FALSE, bMaximized=FALSE;
+ String aUserData, aPosSize;
+ if ( bOldFormat )
+ {
+ // Old format
+ aPosSize = aWinData.GetToken( 1, cToken );
+ aPosSize.ToLowerAscii();
+ aUserData = aWinData.GetToken( 2, cToken );
+ bActive = aWinData.GetToken( 3, cToken ).ToInt32();
+
+ if ( aPosSize.EqualsAscii( SFX_WINSIZE_MAX ) )
+ bMaximized = TRUE;
+ else if ( aPosSize.EqualsAscii( SFX_WINSIZE_MIN ) )
+ {
+ bMaximized = TRUE;
+ bActive = FALSE;
+ }
+ else
+ bMaximized = FALSE;
+ }
+ else
+ {
+ // 5.0-Format, get activity state and UserData
+ USHORT nPos=0;
+ bActive = aWinData.GetToken( 3, cToken, nPos ).ToInt32();
+ aUserData = aWinData.Copy( nPos );
+ }
+
+ Point aPt;
+ Size aSz;
+ if ( !bMaximized )
+ SfxIniManager::GetPosSize( aPosSize, aPt, aSz );
+
+ // nur aktives soll geladen werden, es ist aber nicht das aktive?
+ if ( !bLoadDocWins && !bActive )
+ continue;
+
+ pSet->ClearItem( SID_USER_DATA );
+
+ SfxViewFrame *pFrame = 0;
+ if ( pPrefered )
+ {
+ // dann den mitgegebenen Frame verwenden, aber keine Gr"o\se
+ // am Window setzen
+ pFrame = pPrefered;
+ if ( pFrame->GetViewShell() || !pFrame->GetObjectShell() )
+ {
+ pSet->ClearItem( SID_VIEW_POS_SIZE );
+ pSet->ClearItem( SID_WIN_POSSIZE );
+ pSet->Put( SfxUInt16Item( SID_VIEW_ID, nViewId ) );
+
+ // Flackern vermeiden
+ SfxBindings &rBind = pFrame->GetBindings();
+ rBind.ENTERREGISTRATIONS();
+
+ // dann ausr"aumen und das eigene Doc reinsetzen
+ pPreferedFrame->InsertDocument( this );
+
+ // Updating reaktivieren
+ rBind.LEAVEREGISTRATIONS();
+ }
+ else
+ {
+ // sonst neue View erzeugen
+ pFrame->CreateView_Impl( nViewId );
+ }
+ }
+ else
+ {
+ if ( bLoadDocWins )
+ {
+ // Im Hintergrund "offnen
+ pSet->Put( SfxUInt16Item( SID_VIEW_ZOOM_MODE, 0 ) );
+ if ( !bMaximized )
+ pSet->Put( SfxRectangleItem( SID_VIEW_POS_SIZE, Rectangle( aPt, aSz ) ) );
+ }
+
+ pSet->Put( SfxUInt16Item( SID_VIEW_ID, nViewId ) );
+ pPreferedFrame->InsertDocument( this );
+ pFrame = pPreferedFrame->GetCurrentViewFrame();
+
+ // Wird nicht mehr gebraucht
+ pSet->ClearItem( SID_VIEW_POS_SIZE );
+ pSet->ClearItem( SID_WIN_POSSIZE );
+ pSet->ClearItem( SID_VIEW_ZOOM_MODE );
+ }
+
+ bLoaded = TRUE;
+
+ // UserData hier einlesen, da es ansonsten immer mit bBrowse=TRUE
+ // aufgerufen wird, beim Abspeichern wurde aber bBrowse=FALSE verwendet
+ if ( pFrame && pFrame->GetViewShell() )
+ pFrame->GetViewShell()->ReadUserData( aUserData, !bLoadDocWins );
+
+ // Evtl. sollen noch weitere Fenster geladen werden
+ pPreferedFrame = NULL;
+
+ if ( bActive )
+ pActiveFrame = pFrame;
+
+ if( pPrefered || !bLoadDocWins )
+ // Es sollte nur das aktive Window geladen werden
+ break;
+ }
+ }
+
+ if ( pActiveFrame )
+ {
+ if ( !pPrefered )
+ // Den zu aktivierenden Frame aktivieren
+ pActiveFrame->MakeActive_Impl( TRUE );
+ }
+
+ pImp->bLoadingWindows = FALSE;
+ return pPrefered && bLoaded ? pPrefered : pActiveFrame;
+}
+
+//====================================================================
+
+void SfxObjectShell::UpdateDocInfoForSave()
+{
+ SfxDocumentInfo &rDocInfo = GetDocInfo();
+ rDocInfo.SetTemplateConfig( HasTemplateConfig() );
+
+ if ( IsModified() )
+ {
+ // Keine Unterschiede mehr zwischen Save, SaveAs
+ String aUserName = SFX_INIMANAGER()->GetUserFullName();
+ if ( !rDocInfo.IsUseUserData() )
+ aUserName.Erase();
+
+ rDocInfo.SetChanged( aUserName );
+ if ( !HasName() || pImp->bIsSaving )
+ UpdateTime_Impl( rDocInfo );
+ }
+
+ if ( !pImp->bIsSaving )
+ {
+ // Flag fuer Passwort merken
+ rDocInfo.SetPasswd( pImp->bPasswd );
+
+ // ggf. DocInfo Dialog
+ if ( !pImp->bSilent && eCreateMode == SFX_CREATE_MODE_STANDARD &&
+ 0 == ( pImp->eFlags & SFXOBJECTSHELL_NODOCINFO ) && SFX_APP()->GetOptions().IsDocInfoSave() )
+ {
+//(mba)/task
+/*
+ Window* pWindow = Application::GetAppWindow();
+ if ( pWindow )
+ pWindow->EnterWait();
+ */
+ DocInfoDlg_Impl( rDocInfo );
+/*
+ if ( pWindow )
+ pWindow->LeaveWait();
+ */
+ }
+ }
+
+ Broadcast( SfxDocumentInfoHint( &rDocInfo ) );
+}
+
+// -----------------------------------------------------------------------
+
+BOOL SfxObjectShell::SaveInfoAndConfig_Impl( SvStorageRef pNewStg )
+{
+ //Demnaechst mal gemeinsame Teile zusammenfassen
+ UpdateDocInfoForSave();
+
+#if !defined( SFX_KEY_MAXPREVIEWSIZE ) && defined( TFPLUGCOMM )
+#define SFX_KEY_MAXPREVIEWSIZE SFX_KEY_ISFREE
+#endif
+
+#ifdef MI_doch_wieder_die_alte_preview
+ String aMaxSize = SFX_INIMANAGER()->Get( SFX_KEY_MAXPREVIEWSIZE );
+ ULONG nMaxSize = aMaxSize.Len() ? ULONG( aMaxSize ) : 50000;
+#else
+ ULONG nMaxSize = 0L;
+#endif
+ if( nMaxSize && !GetDocInfo().IsPasswd() &&
+ SFX_CREATE_MODE_STANDARD == eCreateMode )
+ {
+ GDIMetaFile* pFile = GetPreviewMetaFile();
+ if ( pFile )
+ {
+ SvCacheStream aStream;
+ long nVer = pNewStg->GetVersion();
+ aStream.SetVersion( nVer );
+ aStream << *pFile;
+ if( aStream.Tell() < nMaxSize )
+ {
+ SvStorageStreamRef xStream = pNewStg->OpenStream(
+ DEFINE_CONST_UNICODE( SFX_PREVIEW_STREAM ),
+ STREAM_TRUNC | STREAM_STD_READWRITE);
+ if( xStream.Is() && !xStream->GetError() )
+ {
+ long nVer = pNewStg->GetVersion();
+ xStream->SetVersion( nVer );
+ aStream.Seek( 0L );
+ *xStream << aStream;
+ }
+ }
+ delete pFile;
+ }
+ }
+
+ if( pImp->bIsSaving )
+ {
+ //!! kein Aufruf der Basisklasse wegen doppeltem Aufruf in Persist
+ //if(!SfxObjectShell::Save())
+ // return FALSE;
+ SvStorageRef aRef = GetMedium()->GetStorage();
+ if ( aRef.Is() )
+ {
+ SfxDocumentInfo& rDocInfo = GetDocInfo();
+ rDocInfo.Save(pNewStg);
+
+ // wenn es sich um ein Dokument lokales Basic handelt, dieses
+ // schreiben
+ if ( pImp->pBasicMgr )
+ pImp->pBasicMgr->Store( *pNewStg );
+ else
+ {
+ String aURL;
+ if( HasName() )
+ aURL = GetMedium()->GetName();
+ else
+ {
+ aURL = GetDocInfo().GetTemplateFileName();
+ // Bei Templates keine URL...
+ aURL = URIHelper::SmartRelToAbs( aURL );
+ }
+#ifndef TFPLUGCOMM
+ SfxBasicManager::CopyBasicData( GetStorage(), aURL, pNewStg );
+#endif
+ }
+
+ // Windows-merken
+ if ( TRUE ) HACK(aus config)
+ SaveWindows_Impl( *pNewStg );
+
+ // Konfiguration schreiben
+ if ( GetConfigManager() )
+ {
+ if ( rDocInfo.HasTemplateConfig() )
+ {
+ const String aTemplFileName( rDocInfo.GetTemplateFileName() );
+ if ( aTemplFileName.Len() )
+ {
+ INetURLObject aURL( aTemplFileName, INET_PROT_FILE );
+ SvStorageRef aStor = new SvStorage( aURL.GetMainURL() );
+ if ( SVSTREAM_OK == aStor->GetError() )
+ {
+ GetConfigManager()->SaveConfig(aStor);
+ if (aRef->IsStream(SfxConfigManager::GetStreamName()))
+ aRef->Remove(SfxConfigManager::GetStreamName());
+ }
+ }
+ }
+ else
+ {
+ GetConfigManager()->SetModified( TRUE );
+ GetConfigManager()->SaveConfig(pNewStg);
+ }
+ }
+ }
+ return TRUE;
+ }
+ else
+ {
+ //!! kein Aufruf der Basisklasse wegen doppeltem Aufruf in Persist
+ //if(!SfxObjectShell::SaveAs(pNewStg))
+ // return FALSE;
+ SfxApplication *pSfxApp = SFX_APP();
+ SfxMedium *pActMed = GetMedium();
+
+ // alte DocInfo laden
+ SfxDocumentInfo &rDocInfo = GetDocInfo();
+
+ // DocInfo speichern
+ rDocInfo.Save( pNewStg );
+
+ // wenn es sich um ein Dokument lokales Basic handelt, dieses schreiben
+ if ( pImp->pBasicMgr )
+ pImp->pBasicMgr->Store( *pNewStg );
+#ifndef MI_NONOS
+ else
+ {
+ String aURL;
+ if( HasName() )
+ aURL = GetMedium()->GetName();
+ else
+ {
+ aURL = GetDocInfo().GetTemplateFileName();
+ // Bei Templates keine URL...
+ aURL = URIHelper::SmartRelToAbs( aURL );
+ }
+#ifndef TFPLUGCOMM
+ SfxBasicManager::CopyBasicData( GetStorage(), aURL, pNewStg );
+#endif
+ }
+#endif
+ // Windows-merken
+ if ( TRUE ) HACK(aus config)
+ SaveWindows_Impl( *pNewStg );
+
+ // Konfiguration schreiben
+ if (GetConfigManager())
+ {
+ if ( rDocInfo.HasTemplateConfig() )
+ {
+ const String aTemplFileName( rDocInfo.GetTemplateFileName() );
+ if ( aTemplFileName.Len() )
+ {
+ INetURLObject aURL( aTemplFileName, INET_PROT_FILE );
+ SvStorageRef aStor = new SvStorage( aURL.GetMainURL() );
+ if ( SVSTREAM_OK == aStor->GetError() )
+ {
+ GetConfigManager()->SaveConfig(aStor);
+ if (pNewStg->IsStream(SfxConfigManager::GetStreamName()))
+ pNewStg->Remove(SfxConfigManager::GetStreamName());
+ }
+ }
+ }
+ else
+ {
+ GetConfigManager()->SetModified( TRUE );
+ GetConfigManager()->SaveConfig(pNewStg);
+ }
+ }
+
+ return TRUE;
+ }
+}
+
+//--------------------------------------------------------------------
+
+// Bearbeitungszeit aktualisieren
+SfxDocumentInfo& SfxObjectShell::UpdateTime_Impl(SfxDocumentInfo &rInfo)
+{
+ // Get old time from documentinfo
+ Time aOldTime(rInfo.GetTime());
+
+ // Initialize some local member! Its neccessary for wollow operations!
+ DateTime aNow ; // Date and time at current moment
+ Time n24Time (24,0,0,0) ; // Time-value for 24 hours - see follow calculation
+ ULONG nDays = 0 ; // Count of days between now and last editing
+ Time nAddTime (0) ; // Value to add on aOldTime
+
+ // Safe impossible cases!
+ // User has changed time to the past between last editing and now ... its not possible!!!
+ DBG_ASSERT( !(aNow.GetDate()<pImp->nTime.GetDate()), "Timestamp of last change is in the past ?!..." );
+
+ // Do the follow only, if user has NOT changed time to the past.
+ // Else add a time of 0 to aOldTime ... !!!
+ if (aNow.GetDate()>=pImp->nTime.GetDate())
+ {
+ // Get count of days last editing.
+ nDays = aNow.GetSecFromDateTime(pImp->nTime.GetDate())/86400 ;
+
+ if (nDays==0)
+ {
+ // If no day between now and last editing - calculate time directly.
+ nAddTime = aNow-pImp->nTime ;
+ }
+ else
+ // If time of working without save greater then 1 month (!) ....
+ // we add 0 to aOldTime!
+ if (nDays<=31)
+ {
+ // If 1 or up to 31 days between now and last editing - calculate time indirectly.
+ // nAddTime = (24h - nTime) + (nDays * 24h) + aNow
+ --nDays;
+ nAddTime = nDays*n24Time.GetTime() ;
+ nAddTime += n24Time-pImp->nTime ;
+ nAddTime += aNow ;
+ }
+
+ aOldTime += nAddTime;
+ }
+
+ rInfo.SetTime(aOldTime.GetTime());
+ pImp->nTime = aNow;
+ rInfo.IncDocumentNumber();
+ //! DocumentNummer
+#if 0
+ const String aDocNo(rInfo.GetUserKey(0).GetWord());
+ const String aTitle(rInfo.GetUserKey(0).GetTitle());
+ USHORT nNo = 1;
+ if ( aDocNo.Len() )
+ {
+ nNo = (USHORT)aDocNo;
+ if(nNo)
+ ++nNo;
+ else
+ nNo = 1;
+ }
+ rInfo.SetUserKey(SfxDocUserKey(aTitle, nNo), 0);
+#endif
+ return rInfo;
+}
+
+//--------------------------------------------------------------------
+
+void SfxObjectShell::DocInfoDlg_Impl( SfxDocumentInfo &rDocInfo )
+{
+ // anzuzeigenden Dokumentnamen ermitteln
+ String aURL, aTitle;
+ if ( HasName() && !pImp->aNewName.Len() )
+ {
+ aURL = GetMedium()->GetName();
+ aTitle = GetTitle();
+ }
+ else
+ {
+ if ( !pImp->aNewName.Len() )
+ {
+ aURL = DEFINE_CONST_UNICODE( "private:factory/" );
+ aURL += String::CreateFromAscii( GetFactory().GetShortName() );
+ // aTitle = String( SfxResId( STR_NONAME ) );
+ }
+ else
+ {
+ aURL = DEFINE_CONST_UNICODE( "[private:factory/" );
+ aURL += String::CreateFromAscii( GetFactory().GetShortName() );
+ aURL += DEFINE_CONST_UNICODE( "]" );
+ INetURLObject aURLObj( pImp->aNewName );
+ aURL += aURLObj.GetMainURL();
+ // aTitle = aURLObj.GetBase();
+ }
+ aTitle = GetTitle();
+ }
+
+ // Itemset f"ur Dialog aufbereiten
+ SfxDocumentInfoItem aDocInfoItem( aURL, rDocInfo );
+ if ( !GetSlotState( SID_DOCTEMPLATE ) )
+ aDocInfoItem.SetTemplate(FALSE);
+ SfxItemSet aSet(GetPool(), SID_DOCINFO, SID_DOCINFO,
+ SID_EXPLORER_PROPS_START, SID_EXPLORER_PROPS_START,
+ 0L );
+ aSet.Put( aDocInfoItem );
+ aSet.Put( SfxStringItem( SID_EXPLORER_PROPS_START, aTitle ) );
+
+ // Dialog via Factory erzeugen und ausf"uhren
+ SfxDocumentInfoDialog *pDlg = CreateDocumentInfoDialog(0, aSet);
+ if ( RET_OK == pDlg->Execute() )
+ {
+ // neue DocInfo aus Dialog holen
+ const SfxPoolItem *pItem = 0;
+ if ( SFX_ITEM_SET ==
+ pDlg->GetOutputItemSet()->GetItemState( SID_DOCINFO, TRUE, &pItem ) )
+ {
+ rDocInfo = (*(const SfxDocumentInfoItem *)pItem)();
+
+ // ggf. den Titel des Dokuments neu setzen
+ String aNewTitle = rDocInfo.GetTitle();
+ aNewTitle.EraseLeadingChars();
+ aNewTitle.EraseTrailingChars();
+ if ( aTitle != aNewTitle && aNewTitle.Len() )
+ SetTitle( aNewTitle );
+ }
+ }
+ delete pDlg;
+}
+
+//------------------------------------------------------------------------
+
+SfxDocumentInfoDialog* SfxObjectShell::CreateDocumentInfoDialog
+(
+ Window* pParent,
+ const SfxItemSet& rSet
+)
+{
+ return new SfxDocumentInfoDialog(pParent, rSet);
+}
+
+//--------------------------------------------------------------------
+
+SvEmbeddedInfoObject* SfxObjectShell::InsertObject
+(
+ SvEmbeddedObject* pObj,
+ const String& rName
+)
+
+{
+ // Objekt erzeugen ist fehlgeschlagen?
+ if ( !pObj )
+ HACK(Fehlermeldung fehlt)
+ return 0;
+
+ String aName( rName );
+ if( !aName.Len() )
+ {
+ aName = DEFINE_CONST_UNICODE( "Object " );
+ String aStr;
+ USHORT i = 1;
+ HACK(Wegen Storage Bug 46033)
+ // for-Schleife wegen Storage Bug 46033
+ for( USHORT n = 0; n < 100; n++ )
+ {
+ do
+ {
+ aStr = aName;
+ aStr += String::CreateFromInt32( i );
+ i++;
+ } while ( Find( aStr ) );
+
+ SvInfoObjectRef xSub = new SvEmbeddedInfoObject( pObj, aStr );
+ if ( Move( xSub, aStr ) ) // Eigentuemer Uebergang
+ return (SvEmbeddedInfoObject*) &xSub;
+ }
+ }
+ else
+ {
+ SvInfoObjectRef xSub = new SvEmbeddedInfoObject( pObj, aName );
+ if ( Move( xSub, aName ) ) // Eigentuemer Uebergang
+ return (SvEmbeddedInfoObject*) &xSub;
+ }
+ return 0;
+}
+
+//-------------------------------------------------------------------------
+
+SfxConfigManager* SfxObjectShell::GetConfigManager() const
+{
+ return pImp->pCfgMgr;
+}
+
+//-------------------------------------------------------------------------
+
+void SfxObjectShell::SetConfigManager(SfxConfigManager *pMgr)
+{
+ if (pImp->pCfgMgr == SFX_CFGMANAGER() && pMgr)
+ pMgr->Activate(pImp->pCfgMgr);
+
+ if (pImp->pCfgMgr)
+ delete pImp->pCfgMgr;
+
+ pImp->pCfgMgr = pMgr;
+ pMgr->SetObjectShell(this);
+}
+
+//-------------------------------------------------------------------------
+
+void SfxObjectShell::SetTemplateConfig(BOOL bTplConf)
+{
+// pImp->bTemplateConfig = bTplConf;
+// DBG_ASSERT(pImp->pCfgMgr || !bTplConf,"Keine Konfiguration in der Vorlage!");
+}
+
+//-------------------------------------------------------------------------
+
+BOOL SfxObjectShell::HasTemplateConfig() const
+{
+// return pImp->bTemplateConfig;
+ return FALSE;
+}
+
+//-------------------------------------------------------------------------
+
+void SfxObjectShell::TransferConfig(SfxObjectShell& rObjSh)
+{
+ SfxConfigManager *pNewCfgMgr=0, *pOldCfgMgr=0;
+ pOldCfgMgr = pImp->pCfgMgr;
+ pImp->pCfgMgr = 0;
+
+ pNewCfgMgr = rObjSh.pImp->pCfgMgr;
+ rObjSh.pImp->pCfgMgr=0;
+
+ SetConfigManager(pNewCfgMgr);
+ rObjSh.SetConfigManager(pOldCfgMgr);
+}
+
+//--------------------------------------------------------------------
+
+SfxStyleSheetBasePool* SfxObjectShell::GetStyleSheetPool()
+{
+ return 0;
+}
+
+void SfxObjectShell::SetOrganizerSearchMask(
+ SfxStyleSheetBasePool* pPool) const
+{
+ pPool->SetSearchMask(SFX_STYLE_FAMILY_ALL,
+ SFXSTYLEBIT_USERDEF | SFXSTYLEBIT_USED);
+}
+
+//--------------------------------------------------------------------
+
+USHORT SfxObjectShell::GetContentCount(USHORT nIdx1,
+ USHORT nIdx2)
+{
+ switch(nIdx1)
+ {
+ case INDEX_IGNORE:
+ return DEF_CONTENT_COUNT;
+ case CONTENT_STYLE:
+ {
+ SfxStyleSheetBasePool *pPool = GetStyleSheetPool();
+ if(!pPool)
+ return 0;
+ SetOrganizerSearchMask(pPool);
+ return pPool->Count();
+ }
+ case CONTENT_MACRO:
+ break;
+
+ case CONTENT_CONFIG:
+ return (GetConfigManager() && !HasTemplateConfig()) ?
+ GetConfigManager()->GetItemCount() : 0;
+ break;
+ }
+ return 0;
+}
+
+
+//--------------------------------------------------------------------
+
+void SfxObjectShell::TriggerHelpPI(USHORT nIdx1, USHORT nIdx2, USHORT nIdx3)
+{
+ if(nIdx1==CONTENT_STYLE && nIdx2 != INDEX_IGNORE) //StyleSheets
+ {
+ SfxStyleSheetBasePool *pPool = GetStyleSheetPool();
+ SetOrganizerSearchMask(pPool);
+ SfxStyleSheetBase *pStyle = (*pPool)[nIdx2];
+#ifdef WIR_KOENNEN_WIEDER_HILFE_FUER_STYLESHEETS
+ if(pStyle)
+ {
+ String aHelpFile;
+ ULONG nHelpId=pStyle->GetHelpId(aHelpFile);
+ SfxHelpPI* pHelpPI = SFX_APP()->GetHelpPI();
+ if ( pHelpPI && nHelpId )
+ pHelpPI->LoadTopic( nHelpId );
+ }
+#endif
+ }
+}
+
+BOOL SfxObjectShell::CanHaveChilds(USHORT nIdx1,
+ USHORT nIdx2)
+{
+ switch(nIdx1) {
+ case INDEX_IGNORE:
+ return TRUE;
+ case CONTENT_STYLE:
+ return INDEX_IGNORE == nIdx2 || !GetStyleSheetPool()? FALSE: TRUE;
+ case CONTENT_MACRO:
+//!! return INDEX_IGNORE == nIdx2? FALSE: TRUE;
+ return FALSE;
+ case CONTENT_CONFIG:
+ return INDEX_IGNORE == nIdx2 ? FALSE : TRUE;
+ }
+ return FALSE;
+}
+
+//--------------------------------------------------------------------
+
+void SfxObjectShell::GetContent(String &rText,
+ Bitmap &rClosedBitmap,
+ Bitmap &rOpenedBitmap,
+ BOOL &bCanDel,
+ USHORT i,
+ USHORT nIdx1,
+ USHORT nIdx2)
+{
+ bCanDel=TRUE;
+
+ switch(nIdx1)
+ {
+ case INDEX_IGNORE:
+ {
+ USHORT nTextResId = 0;
+ USHORT nClosedBitmapResId; // evtl. sp"ater mal unterschiedliche
+ USHORT nOpenedBitmapResId; // " " " "
+ switch(i)
+ {
+ case CONTENT_STYLE:
+ nTextResId = STR_STYLES;
+ nClosedBitmapResId= BMP_STYLES_CLOSED;
+ nOpenedBitmapResId= BMP_STYLES_OPENED;
+ break;
+ case CONTENT_MACRO:
+ nTextResId = STR_MACROS;
+ nClosedBitmapResId= BMP_STYLES_CLOSED;
+ nOpenedBitmapResId= BMP_STYLES_OPENED;
+ break;
+ case CONTENT_CONFIG:
+ nTextResId = STR_CONFIG;
+ nClosedBitmapResId= BMP_STYLES_CLOSED;
+ nOpenedBitmapResId= BMP_STYLES_OPENED;
+ break;
+ }
+
+ if ( nTextResId )
+ {
+ rText = String(SfxResId(nTextResId));
+ rClosedBitmap = Bitmap(SfxResId(nClosedBitmapResId));
+ rOpenedBitmap = Bitmap(SfxResId(nOpenedBitmapResId));
+ }
+ break;
+ }
+
+ case CONTENT_STYLE:
+ {
+ SfxStyleSheetBasePool *pPool = GetStyleSheetPool();
+ SetOrganizerSearchMask(pPool);
+ SfxStyleSheetBase *pStyle = (*pPool)[i];
+ rText = pStyle->GetName();
+ bCanDel=((pStyle->GetMask() & SFXSTYLEBIT_USERDEF)
+ == SFXSTYLEBIT_USERDEF);
+ rClosedBitmap = rOpenedBitmap =
+ GetStyleFamilyBitmap(pStyle->GetFamily());
+ }
+ break;
+ case CONTENT_MACRO:
+ break;
+ case CONTENT_CONFIG:
+ if ( GetConfigManager() && !HasTemplateConfig())
+ {
+ rText = GetConfigManager()->GetItem(i);
+ bCanDel = GetConfigManager()->CanDelete(i);
+ }
+ else
+ rText = String();
+ rClosedBitmap = Bitmap(SfxResId(BMP_STYLES_CLOSED));
+ rOpenedBitmap = Bitmap(SfxResId(BMP_STYLES_OPENED));
+ break;
+ }
+}
+
+//--------------------------------------------------------------------
+
+Bitmap SfxObjectShell::GetStyleFamilyBitmap(SfxStyleFamily eFamily)
+{
+ USHORT nResId = 0;
+ switch(eFamily)
+ {
+ case SFX_STYLE_FAMILY_CHAR:
+ nResId = BMP_STYLES_FAMILY1;
+ break;
+ case SFX_STYLE_FAMILY_PARA:
+ nResId = BMP_STYLES_FAMILY2;
+ break;
+ case SFX_STYLE_FAMILY_FRAME:
+ nResId = BMP_STYLES_FAMILY3;
+ break;
+ case SFX_STYLE_FAMILY_PAGE :
+ nResId = BMP_STYLES_FAMILY4;
+ break;
+ }
+
+ if ( nResId )
+ return Bitmap(SfxResId(nResId));
+ else
+ return Bitmap();
+}
+
+
+//--------------------------------------------------------------------
+
+BOOL SfxObjectShell::Insert(SfxObjectShell &rSource,
+ USHORT nSourceIdx1,
+ USHORT nSourceIdx2,
+ USHORT nSourceIdx3,
+ USHORT &nIdx1,
+ USHORT &nIdx2,
+ USHORT &nIdx3,
+ USHORT &nDeleted)
+{
+ BOOL bRet = FALSE;
+
+ if (INDEX_IGNORE == nIdx1 && CONTENT_STYLE == nSourceIdx1)
+ nIdx1 = CONTENT_STYLE;
+
+ if (CONTENT_STYLE == nSourceIdx1 && CONTENT_STYLE == nIdx1)
+ {
+ SfxStyleSheetBasePool* pHisPool = rSource.GetStyleSheetPool();
+ SfxStyleSheetBasePool* pMyPool = GetStyleSheetPool();
+ SetOrganizerSearchMask(pHisPool);
+ SetOrganizerSearchMask(pMyPool);
+
+ SfxStyleSheetBase* pHisSheet = (*pHisPool)[nSourceIdx2];
+
+ // Einfuegen ist nur dann noetig, wenn ein StyleSheet
+ // zwischen unterschiedlichen(!) Pools bewegt wird
+
+ if (pMyPool != pHisPool)
+ {
+ if (INDEX_IGNORE == nIdx2)
+ {
+ nIdx2 = pMyPool->Count();
+ }
+
+ // wenn so eine Vorlage schon existiert: loeschen!
+ String aOldName(pHisSheet->GetName());
+ SfxStyleFamily eOldFamily = pHisSheet->GetFamily();
+
+ SfxStyleSheetBase* pExist = pMyPool->Find(aOldName, eOldFamily);
+ // USHORT nOldHelpId = pExist->GetHelpId(??? VB ueberlegt sich was);
+ BOOL bUsedOrUserDefined;
+ if( pExist )
+ {
+ bUsedOrUserDefined =
+ pExist->IsUsed() || pExist->IsUserDefined();
+ if( ErrorHandler::HandleError(
+ *new MessageInfo( ERRCODE_SFXMSG_STYLEREPLACE, aOldName ) )
+ != ERRCODE_BUTTON_OK )
+ return FALSE;
+ else
+ {
+ pMyPool->Replace( *pHisSheet, *pExist );
+ SetModified( TRUE );
+ nIdx2 = nIdx1 = INDEX_IGNORE;
+ return TRUE;
+ }
+ }
+
+ SfxStyleSheetBase& rNewSheet = pMyPool->Make(
+ aOldName, eOldFamily,
+ pHisSheet->GetMask(), nIdx2);
+
+ // ItemSet der neuen Vorlage fuellen
+ rNewSheet.GetItemSet().Set(pHisSheet->GetItemSet());
+
+ // wer bekommt den Neuen als Parent? wer benutzt den Neuen als Follow?
+ SfxStyleSheetBase* pTestSheet = pMyPool->First();
+ while (pTestSheet)
+ {
+ if (pTestSheet->GetFamily() == eOldFamily &&
+ pTestSheet->HasParentSupport() &&
+ pTestSheet->GetParent() == aOldName)
+ {
+ pTestSheet->SetParent(aOldName);
+ // Verknuepfung neu aufbauen
+ }
+
+ if (pTestSheet->GetFamily() == eOldFamily &&
+ pTestSheet->HasFollowSupport() &&
+ pTestSheet->GetFollow() == aOldName)
+ {
+ pTestSheet->SetFollow(aOldName);
+ // Verknuepfung neu aufbauen
+ }
+
+ pTestSheet = pMyPool->Next();
+ }
+ bUsedOrUserDefined =
+ rNewSheet.IsUsed() || rNewSheet.IsUserDefined();
+
+
+ // hat der Neue einen Parent? wenn ja, mit gleichem Namen bei uns suchen
+ if (pHisSheet->HasParentSupport())
+ {
+ const String& rParentName = pHisSheet->GetParent();
+ if (0 != rParentName.Len())
+ {
+ SfxStyleSheetBase* pParentOfNew =
+ pMyPool->Find(rParentName, eOldFamily);
+ if (pParentOfNew)
+ rNewSheet.SetParent(rParentName);
+ }
+ }
+
+ // hat der Neue einen Follow? wenn ja, mit gleichem
+ // Namen bei uns suchen
+ if (pHisSheet->HasFollowSupport())
+ {
+ const String& rFollowName = pHisSheet->GetFollow();
+ if (0 != rFollowName.Len())
+ {
+ SfxStyleSheetBase* pFollowOfNew =
+ pMyPool->Find(rFollowName, eOldFamily);
+ if (pFollowOfNew)
+ rNewSheet.SetFollow(rFollowName);
+ }
+ }
+
+ SetModified( TRUE );
+ if( !bUsedOrUserDefined ) nIdx2 = nIdx1 = INDEX_IGNORE;
+
+ bRet = TRUE;
+ }
+ else
+ bRet = FALSE;
+ }
+ else if (nSourceIdx1 == CONTENT_CONFIG)
+ {
+ nIdx1 = CONTENT_CONFIG;
+
+ SfxConfigManager *pCfgMgr = SFX_CFGMANAGER();
+ if (!GetConfigManager() || HasTemplateConfig())
+ {
+ SetConfigManager(new SfxConfigManager(0, pCfgMgr));
+ SetTemplateConfig(FALSE);
+ if (this == Current())
+ GetConfigManager()->Activate(pCfgMgr);
+ }
+
+ if (GetConfigManager()->CopyItem(
+ nSourceIdx2, nIdx2, rSource.GetConfigManager()))
+ {
+ SetModified(TRUE);
+ bRet = TRUE;
+ SFX_APP()->GetDispatcher_Impl()->Update_Impl(TRUE);
+ }
+ }
+
+ return bRet;
+}
+
+//--------------------------------------------------------------------
+
+BOOL SfxObjectShell::Remove
+(
+ USHORT nIdx1,
+ USHORT nIdx2,
+ USHORT nIdx3
+)
+{
+ BOOL bRet = FALSE;
+
+ if (CONTENT_STYLE == nIdx1)
+ {
+ SfxStyleSheetBasePool* pMyPool = GetStyleSheetPool();
+
+ SetOrganizerSearchMask(pMyPool);
+
+ SfxStyleSheetBase* pMySheet = (*pMyPool)[nIdx2];
+ String aName(pMySheet->GetName());
+ String aEmpty;
+ SfxStyleFamily eFamily = pMySheet->GetFamily();
+ if (pMySheet)
+ {
+ pMyPool->Erase(pMySheet);
+ bRet = TRUE;
+ }
+
+ SfxStyleSheetBase* pTestSheet = pMyPool->First();
+ while (pTestSheet)
+ {
+ if (pTestSheet->GetFamily() == eFamily &&
+ pTestSheet->HasParentSupport() &&
+ pTestSheet->GetParent() == aName)
+ {
+ pTestSheet->SetParent(aEmpty); // Verknuepfung aufloesen
+ }
+
+ if (pTestSheet->GetFamily() == eFamily &&
+ pTestSheet->HasFollowSupport() &&
+ pTestSheet->GetFollow() == aName)
+ {
+ pTestSheet->SetFollow(aEmpty); // Verknuepfung aufloesen
+ }
+
+ pTestSheet = pMyPool->Next();
+ }
+ if(bRet)
+ SetModified( TRUE );
+ }
+ else if (nIdx1 == CONTENT_CONFIG)
+ {
+ if (GetConfigManager()->RemoveItem(nIdx2))
+ {
+ SetModified(TRUE);
+ bRet = TRUE;
+ SFX_APP()->GetDispatcher_Impl()->Update_Impl(TRUE);
+ }
+ }
+ return bRet;
+}
+
+//--------------------------------------------------------------------
+
+BOOL SfxObjectShell::Print
+(
+ Printer& rPrt,
+ USHORT nIdx1,
+ USHORT nIdx2,
+ USHORT nIdx3,
+ const String* pObjectName
+)
+
+/* [Beschreibung]
+*/
+
+{
+ switch(nIdx1)
+ {
+ case CONTENT_STYLE:
+ {
+ SfxStyleSheetBasePool *pPool = GetStyleSheetPool();
+ SetOrganizerSearchMask(pPool);
+ SfxStyleSheetIterator* pIter = pPool->CreateIterator(
+ pPool->GetSearchFamily(), pPool->GetSearchMask() );
+ USHORT nStyles = pIter->Count();
+ SfxStyleSheetBase *pStyle = pIter->First();
+ if ( !pStyle )
+ return TRUE;
+
+ if ( !rPrt.StartJob(String(SfxResId(STR_STYLES))) )
+ {
+ delete pIter;
+ return FALSE;
+ }
+ if ( !rPrt.StartPage() )
+ {
+ delete pIter;
+ return FALSE;
+ }
+ SfxStatusBarManager* pStbMgr = SFX_APP()->GetStatusBarManager();
+ if ( pStbMgr )
+ pStbMgr->StartProgressMode(String(SfxResId(STR_PRINT_STYLES)), nStyles);
+ rPrt.SetMapMode(MapMode(MAP_10TH_MM));
+ Font aFont( DEFINE_CONST_UNICODE( "Arial" ), Size(0, 64)); // 18pt
+ aFont.SetWeight(WEIGHT_BOLD);
+ rPrt.SetFont(aFont);
+ const Size aPageSize(rPrt.GetOutputSize());
+ const USHORT nXIndent = 200;
+ USHORT nYIndent = 200;
+ Point aOutPos(nXIndent, nYIndent);
+ String aHeader(SfxResId(STR_PRINT_STYLES_HEADER));
+ if ( pObjectName )
+ aHeader += *pObjectName;
+ else
+ aHeader += GetTitle();
+ ULONG nTextHeight( rPrt.GetTextHeight() );
+ rPrt.DrawText(aOutPos, aHeader);
+ aOutPos.Y() += nTextHeight;
+ aOutPos.Y() += nTextHeight/2;
+ aFont.SetSize(Size(0, 35)); // 10pt
+ nStyles = 1;
+ while(pStyle)
+ {
+ if(pStbMgr)
+ pStbMgr->SetProgressState(nStyles++);
+ // Ausgabe des Vorlagennamens
+ String aStr(pStyle->GetName());
+ aFont.SetWeight(WEIGHT_BOLD);
+ rPrt.SetFont(aFont);
+ nTextHeight = rPrt.GetTextHeight();
+ // Seitenwechsel
+ if ( aOutPos.Y() + nTextHeight*2 >
+ aPageSize.Height() - nYIndent )
+ {
+ rPrt.EndPage();
+ rPrt.StartPage();
+ aOutPos.Y() = nYIndent;
+ }
+ rPrt.DrawText(aOutPos, aStr);
+ aOutPos.Y() += nTextHeight;
+
+ // Ausgabe der Vorlagenbeschreibung
+ aFont.SetWeight(WEIGHT_NORMAL);
+ rPrt.SetFont(aFont);
+ aStr = pStyle->GetDescription();
+ const char cDelim = ' ';
+ USHORT nStart = 0, nIdx = 0;
+
+ nTextHeight = rPrt.GetTextHeight();
+ // wie viele Worte passen auf eine Zeile
+ while(nIdx < aStr.Len())
+ {
+ USHORT nOld = nIdx;
+ ULONG nTextWidth;
+ nIdx = aStr.Search(cDelim, nStart);
+ nTextWidth = rPrt.GetTextWidth(aStr, nStart, nIdx-nStart);
+ while(nIdx != STRING_NOTFOUND &&
+ aOutPos.X() + nTextWidth <
+ aPageSize.Width() - nXIndent)
+ {
+ nOld = nIdx;
+ nIdx = aStr.Search(cDelim, nIdx+1);
+ nTextWidth = rPrt.GetTextWidth(aStr, nStart, nIdx-nStart);
+ }
+ String aTmp(aStr, nStart, nIdx == STRING_NOTFOUND?
+ STRING_LEN :
+ nOld-nStart);
+ if ( aTmp.Len() )
+ {
+ nStart = nOld+1; // wegen trailing space
+ }
+ else
+ {
+ USHORT nChar = 1;
+ while(
+ nStart + nChar < aStr.Len() &&
+ aOutPos.X() + rPrt.GetTextWidth(
+ aStr, nStart, nChar) <
+ aPageSize.Width() - nXIndent)
+ ++nChar;
+ aTmp = String(aStr, nStart, nChar-1);
+ nIdx = nStart + nChar;
+ nStart = nIdx;
+ }
+ if ( aOutPos.Y() + nTextHeight*2 >
+ aPageSize.Height() - nYIndent )
+ {
+ rPrt.EndPage();
+ rPrt.StartPage();
+ aOutPos.Y() = nYIndent;
+ }
+ rPrt.DrawText(aOutPos, aTmp);
+ aOutPos.Y() += rPrt.GetTextHeight();
+ }
+ pStyle = pIter->Next();
+ }
+ rPrt.EndPage();
+ rPrt.EndJob();
+ if ( pStbMgr )
+ pStbMgr->EndProgressMode();
+ delete pIter;
+ break;
+ }
+ default:
+ return FALSE;
+ }
+ return TRUE;
+}
+
+//--------------------------------------------------------------------
+
+void SfxObjectShell::LoadStyles
+(
+ SfxObjectShell &rSource /* die Dokument-Vorlage, aus der
+ die Styles geladen werden sollen */
+)
+
+/* [Beschreibung]
+
+ Diese Methode wird vom SFx gerufen, wenn aus einer Dokument-Vorlage
+ Styles nachgeladen werden sollen. Bestehende Styles soll dabei
+ "uberschrieben werden. Das Dokument mu"s daher neu formatiert werden.
+ Daher werden die Applikationen in der Regel diese Methode "uberladen
+ und in ihrer Implementierung die Implementierung der Basisklasse
+ rufen.
+*/
+
+{
+ struct Styles_Impl
+ {
+ SfxStyleSheetBase *pSource;
+ SfxStyleSheetBase *pDest;
+// Styles_Impl () : pSource(0), pDest(0) {}
+ };
+
+ SfxStyleSheetBasePool *pSourcePool = rSource.GetStyleSheetPool();
+ DBG_ASSERT(pSourcePool, "Source-DocumentShell ohne StyleSheetPool");
+ SfxStyleSheetBasePool *pMyPool = GetStyleSheetPool();
+ DBG_ASSERT(pMyPool, "Dest-DocumentShell ohne StyleSheetPool");
+ pSourcePool->SetSearchMask(SFX_STYLE_FAMILY_ALL, 0xffff);
+ Styles_Impl *pFound = new Styles_Impl[pSourcePool->Count()];
+ USHORT nFound = 0;
+
+ SfxStyleSheetBase *pSource = pSourcePool->First();
+ while ( pSource )
+ {
+ SfxStyleSheetBase *pDest =
+ pMyPool->Find( pSource->GetName(), pSource->GetFamily() );
+ if ( !pDest )
+ {
+ pDest = &pMyPool->Make( pSource->GetName(),
+ pSource->GetFamily(), pSource->GetMask());
+ // Setzen des Parents, der Folgevorlage
+ }
+ pFound[nFound].pSource = pSource;
+ pFound[nFound].pDest = pDest;
+ ++nFound;
+ pSource = pSourcePool->Next();
+ }
+
+ for ( USHORT i = 0; i < nFound; ++i )
+ {
+ pFound[i].pDest->GetItemSet().PutExtended(pFound[i].pSource->GetItemSet(), SFX_ITEM_DONTCARE, SFX_ITEM_DEFAULT);
+// pFound[i].pDest->SetHelpId(pFound[i].pSource->GetHelpId());
+ if(pFound[i].pSource->HasParentSupport())
+ pFound[i].pDest->SetParent(pFound[i].pSource->GetParent());
+ if(pFound[i].pSource->HasFollowSupport())
+ pFound[i].pDest->SetFollow(pFound[i].pSource->GetParent());
+ }
+ delete pFound;
+}
+
+//--------------------------------------------------------------------
+
+void SfxObjectShell::UpdateFromTemplate_Impl( )
+
+/* [Beschreibung]
+
+ Diese interne Methode pr"uft, ob das Dokument aus einem Template
+ erzeugt wurde, und ob dieses neuer ist als das Dokument. Ist dies
+ der Fall, wird der Benutzer gefragt, ob die Vorlagen (StyleSheets)
+ updated werden sollen. Wird dies positiv beantwortet, werden die
+ StyleSheets updated.
+*/
+
+{
+ // Storage-medium?
+ SfxMedium *pFile = GetMedium();
+ DBG_ASSERT( pFile, "cannot UpdateFromTemplate without medium" );
+
+ // only for own storage formats
+ SvStorageRef xDocStor = pFile && pFile->IsStorage() ? pFile->GetStorage() : 0;
+ if ( !xDocStor.Is() || !pFile->GetFilter() || !pFile->GetFilter()->IsOwnFormat() )
+ return;
+
+ // created from template?
+ SfxDocumentInfo *pInfo = &GetDocInfo();
+ String aTemplName( pInfo->GetTemplateName() );
+ String aTemplFileName( pInfo->GetTemplateFileName() );
+ String aFoundName;
+ SvStorageRef aTemplStor;
+ if ( aTemplName.Len() || aTemplFileName.Len() )
+ {
+ // try to locate template, first using filename
+ // this must be done because writer global document uses this "great" idea to manage the templates of all parts
+ // in the master document
+ // but it is NOT an error if the template filename points not to a valid file
+ SfxDocumentTemplates aTempl;
+ aTempl.Construct();
+ if ( aTemplFileName.Len() && !IsReadOnly() )
+ {
+ INetURLObject aURL( aTemplFileName, INET_PROT_FILE );
+ aTemplStor = new SvStorage( aURL.GetMainURL(),
+ STREAM_READ | STREAM_NOCREATE |
+ STREAM_SHARE_DENYWRITE, STORAGE_TRANSACTED );
+ if ( aTemplStor->GetError() )
+ aTemplStor.Clear();
+ else
+ aFoundName = aTemplFileName;
+ }
+
+ // if the template filename did not lead to success, try the template logical name
+ if( !aFoundName.Len() && aTempl.GetFull( String(), aTemplName, aFoundName ) && !IsReadOnly() )
+ {
+ // template found, check if comparing filenames is enabled
+ if( (USHORT)SFX_INIMANAGER()->Get( SFX_KEY_SEARCHTEMPLATE ).ToInt32() && aTemplFileName != aFoundName )
+ {
+ // template with given template name was found but with a different filename
+ SfxMedium aSfxMedium( aFoundName, STREAM_READ | STREAM_SHARE_DENYNONE, FALSE );
+ const SfxFilter* pFilter = NULL;
+ SFX_APP()->GetFilterMatcher().GuessFilter( aSfxMedium, &pFilter, SFX_FILTER_IMPORT | SFX_FILTER_TEMPLATE );
+ if ( pFilter && pFilter->GetFilterContainer() == pFile->GetFilter()->GetFilterContainer() )
+ {
+ String aMsg( SfxResId( STR_TEMPL_MOVED ) );
+ aMsg.SearchAndReplace( DEFINE_CONST_UNICODE( "$(TEMPLATE)" ), aTemplName );
+ aMsg.SearchAndReplace( DEFINE_CONST_UNICODE( "$(FOUND)" ), aFoundName );
+ if( QueryBox( 0, WB_YES_NO, aMsg ).Execute() == RET_YES )
+ {
+ pInfo->SetTemplateFileName( aFoundName );
+ FlushDocInfo();
+ SetModified( TRUE );
+ }
+ else
+ aFoundName.Erase();
+ }
+ else
+ aFoundName.Erase();
+ }
+ }
+ else if ( !IsReadOnly() )
+ {
+ // template not found, ask user for removing template link
+ String aMsg( SfxResId( STR_TEMPL_RESET ) );
+ aMsg.SearchAndReplace( DEFINE_CONST_UNICODE( "$(TEMPLATE)" ), aTemplName );
+ if( QueryBox( 0, WB_YES_NO, aMsg ).Execute() == RET_NO )
+ {
+ String aStr;
+ pInfo->SetTemplateFileName( aStr );
+ pInfo->SetTemplateName( aStr );
+ FlushDocInfo();
+ SetModified( TRUE );
+ }
+ }
+ }
+
+ if ( aFoundName.Len() )
+ {
+ aTemplFileName = aFoundName;
+ BOOL bLoad = FALSE;
+ INetURLObject aURL( aTemplFileName, INET_PROT_FILE );
+ if ( !aTemplStor.Is() )
+ aTemplStor = new SvStorage( aURL.GetMainURL(),
+ STREAM_READ | STREAM_NOCREATE |
+ STREAM_SHARE_DENYWRITE, STORAGE_TRANSACTED );
+
+ if ( !aTemplStor->GetError() )
+ {
+ // Template-DocInfo laden
+ SfxDocumentInfo *pTemplInfo = new SfxDocumentInfo;
+ DateTime aTemplDate;
+ if ( pTemplInfo->Load(aTemplStor) )
+ aTemplDate = pTemplInfo->GetChanged().GetTime();
+
+ // soll der Benutzer gefragt werden?
+ if ( pInfo->IsQueryLoadTemplate() )
+ {
+ // ist das Template neuer?
+ const DateTime aInfoDate( pInfo->GetTemplateDate(),
+ pInfo->GetTemplateDate() );
+ if ( aTemplDate > aInfoDate )
+ {
+ // Benutzer fragen, ob update
+ QueryBox aBox( 0, SfxResId(MSG_QUERY_LOAD_TEMPLATE) );
+ if ( RET_YES == aBox.Execute() )
+ bLoad = TRUE;
+ else
+ {
+ // nein => am Doc merken, da\s nie wieder gefragt wird
+ pInfo->SetQueryLoadTemplate(FALSE);
+ pInfo->Save(xDocStor);
+ }
+ }
+ }
+
+ // StyleSheets aus Template updaten?
+ SfxConfigManager *pCfgMgr = SFX_CFGMANAGER();
+ if ( bLoad )
+ {
+ // Document-Instanz f"ur das Template erzeugen und laden
+ SfxObjectShellLock xTemplDoc =
+ GetFactory().CreateObject(SFX_CREATE_MODE_ORGANIZER);
+ xTemplDoc->DoInitNew(0);
+ String aOldBaseURL = INetURLObject::GetBaseURL();
+ INetURLObject::SetBaseURL( INetURLObject( aTemplFileName, INET_PROT_FILE ).GetMainURL() );
+ if ( xTemplDoc->LoadFrom(aTemplStor) )
+ {
+ // StyleSheets ins eigene Doc laden
+ LoadStyles(*xTemplDoc);
+
+ // Update im Doc merken
+ pInfo->SetTemplateDate(aTemplDate);
+ pInfo->Save(xDocStor);
+ }
+
+ INetURLObject::SetBaseURL( aOldBaseURL );
+ }
+/*
+ // Config aus Template laden?
+ BOOL bConfig = pInfo->HasTemplateConfig();
+ {
+ // Config-Manager aus Template-Storage erzeugen
+ SfxConfigManager *pTemplCfg = new SfxConfigManager(aTemplStor, pCfgMgr);
+ SetConfigManager(pTemplCfg);
+ SetTemplateConfig(TRUE);
+
+ // Falls der gerade zerst"orte CfgMgr des Dokuments der
+ // aktive war, pCfgMgr lieber neu holen
+ pCfgMgr = SFX_CFGMANAGER();
+
+ // ggf. den neuen ConfigManager aktivieren
+ if ( this == SfxObjectShell::Current() )
+ pTemplCfg->Activate(pCfgMgr);
+ }
+*/
+ // Template und Template-DocInfo werden nicht mehr gebraucht
+ delete pTemplInfo;
+ }
+ }
+}
+
+SfxEventConfigItem_Impl* SfxObjectShell::GetEventConfig_Impl( BOOL bForce )
+{
+ SfxApplication *pApp = SFX_APP();
+
+ if ( bForce || pImp->pCfgMgr )
+ {
+ // Wenn kein bForce, aber es eine DocConfig gibt, mu\s auch eine
+ // EventConfig angelegt werden
+ if ( !pImp->pCfgMgr )
+ {
+ // Es soll eine EventConfig konfiguriert werden, dazu mu\s sie am
+ // ConfigManager des Dokuments h"angen
+ SfxConfigManager *pMgr = pApp->GetConfigManager();
+ SetConfigManager( new SfxConfigManager( 0, pMgr ) );
+ if ( this == SfxObjectShell::Current() )
+ pImp->pCfgMgr->Activate( pMgr );
+ }
+
+ // Gegebenenfalls EventConfig erzeugen und ans Dokument konfigurieren
+ if ( !pImp->pEventConfig )
+ {
+ pImp->pEventConfig =
+ new SfxEventConfigItem_Impl( SFX_ITEMTYPE_DOCEVENTCONFIG,
+ pApp->GetEventConfig() );
+ pImp->pEventConfig->Init( pImp->pCfgMgr );
+ }
+ }
+
+ return pImp->pEventConfig;
+}
+
+
diff --git a/sfx2/source/doc/objitem.cxx b/sfx2/source/doc/objitem.cxx
new file mode 100644
index 000000000000..0293bdb69e28
--- /dev/null
+++ b/sfx2/source/doc/objitem.cxx
@@ -0,0 +1,116 @@
+/*************************************************************************
+ *
+ * $RCSfile: objitem.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:32 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#pragma hdrstop
+
+#include "objsh.hxx"
+//#include "objshimp.hxx"
+#include "objitem.hxx"
+
+//====================================================================
+
+TYPEINIT1(SfxObjectShellItem,SfxPoolItem)
+TYPEINIT1_AUTOFACTORY(SfxObjectItem,SfxPoolItem)
+
+//=========================================================================
+
+int SfxObjectShellItem::operator==( const SfxPoolItem &rItem ) const
+{
+ return PTR_CAST(SfxObjectShellItem, &rItem)->pObjSh == pObjSh;
+}
+
+//--------------------------------------------------------------------
+
+String SfxObjectShellItem::GetValueText() const
+{
+ return String();
+}
+
+//--------------------------------------------------------------------
+
+SfxPoolItem* SfxObjectShellItem::Clone( SfxItemPool *) const
+{
+ return new SfxObjectShellItem( Which(), pObjSh );
+}
+
+//=========================================================================
+
+SfxObjectItem::SfxObjectItem( USHORT nWhich, SfxShell *pSh )
+: SfxPoolItem( nWhich ),
+ _pSh( pSh )
+{}
+
+//--------------------------------------------------------------------
+
+int SfxObjectItem::operator==( const SfxPoolItem &rItem ) const
+{
+ SfxObjectItem *pOther = PTR_CAST(SfxObjectItem, &rItem);
+ return pOther->_pSh == _pSh;
+}
+
+//--------------------------------------------------------------------
+
+SfxPoolItem* SfxObjectItem::Clone( SfxItemPool *) const
+{
+ return new SfxObjectItem( Which(), _pSh );
+}
+
+
diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
new file mode 100644
index 000000000000..73a67c4dc930
--- /dev/null
+++ b/sfx2/source/doc/objmisc.cxx
@@ -0,0 +1,1452 @@
+/*************************************************************************
+ *
+ * $RCSfile: objmisc.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:32 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _INETMSG_HXX //autogen
+#include <svtools/inetmsg.hxx>
+#endif
+#ifndef _SFXENUMITEM_HXX //autogen
+#include <svtools/eitem.hxx>
+#endif
+#ifndef _SFXSTRITEM_HXX //autogen
+#include <svtools/stritem.hxx>
+#endif
+#ifndef _SVSTOR_HXX //autogen
+#include <so3/svstor.hxx>
+#endif
+#ifndef _SFXINIMGR_HXX //autogen
+#include <svtools/iniman.hxx>
+#endif
+#ifndef _SV_DRAG_HXX //autogen
+#include <vcl/drag.hxx>
+#endif
+#include <so3/inetbnd.hxx>
+#include <vos/mutex.hxx>
+
+#pragma hdrstop
+
+#ifndef _COM_SUN_STAR_SCRIPT_XTYPECONVERTER_HPP_
+#include <com/sun/star/script/XTypeConverter.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SCRIPT_FINISHENGINEEVENT_HPP_
+#include <com/sun/star/script/FinishEngineEvent.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SCRIPT_INTERRUPTREASON_HPP_
+#include <com/sun/star/script/InterruptReason.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SCRIPT_XENGINELISTENER_HPP_
+#include <com/sun/star/script/XEngineListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SCRIPT_XDEBUGGING_HPP_
+#include <com/sun/star/script/XDebugging.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SCRIPT_XINVOKATION_HPP_
+#include <com/sun/star/script/XInvocation.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SCRIPT_CONTEXTINFORMATION_HPP_
+#include <com/sun/star/script/ContextInformation.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SCRIPT_FINISHREASON_HPP_
+#include <com/sun/star/script/FinishReason.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SCRIPT_XENGINE_HPP_
+#include <com/sun/star/script/XEngine.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SCRIPT_INTERRUPTENGINEEVENT_HPP_
+#include <com/sun/star/script/InterruptEngineEvent.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SCRIPT_XLIBRARYACCESS_HPP_
+#include <com/sun/star/script/XLibraryAccess.hpp>
+#endif
+
+#include <com/sun/star/uno/Reference.h>
+#include <com/sun/star/uno/Any.h>
+#include <com/sun/star/ucb/XContent.hpp>
+
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::ucb;
+
+#ifndef _SB_SBUNO_HXX
+#include <basic/sbuno.hxx>
+#endif
+#ifndef _SB_SBSTAR_HXX
+#include <basic/sbstar.hxx>
+#endif
+#ifndef _SB_BASMGR_HXX
+#include <basic/basmgr.hxx>
+#endif
+#ifndef _VCL_MSGBOX_HXX
+#include <vcl/msgbox.hxx>
+#endif
+#ifndef _SBXCLASS_HXX //autogen
+#include <svtools/sbx.hxx>
+#endif
+#ifndef _SFXECODE_HXX
+#include <svtools/sfxecode.hxx>
+#endif
+#ifndef _EHDL_HXX
+#include <svtools/ehdl.hxx>
+#endif
+
+#include "appdata.hxx"
+#include "request.hxx"
+#include "bindings.hxx"
+#include "sfxresid.hxx"
+#include "docfile.hxx"
+#include "docinf.hxx"
+#include "docfilt.hxx"
+#include "interno.hxx"
+#include "objsh.hxx"
+#include "objshimp.hxx"
+#include "event.hxx"
+#include "fltfnc.hxx"
+#include "sfx.hrc"
+#include "dispatch.hxx"
+#include "viewfrm.hxx"
+#include "viewsh.hxx"
+#include "ctrlitem.hxx"
+#include "arrdecl.hxx"
+#include "module.hxx"
+#include "macrconf.hxx"
+#include "docfac.hxx"
+#include "inimgr.hxx"
+#include "ucbhelp.hxx"
+#include "helper.hxx"
+
+// class SfxHeaderAttributes_Impl ----------------------------------------
+
+class SfxHeaderAttributes_Impl : public SvKeyValueIterator
+{
+private:
+ SfxObjectShell* pDoc;
+ SvKeyValueIteratorRef xIter;
+ sal_Bool bAlert;
+
+public:
+ SfxHeaderAttributes_Impl( SfxObjectShell* pSh ) :
+ pDoc( pSh ), SvKeyValueIterator(),
+ xIter( pSh->GetMedium()->GetHeaderAttributes_Impl() ),
+ bAlert( sal_False ) {}
+
+ virtual sal_Bool GetFirst( SvKeyValue& rKV ) { return xIter->GetFirst( rKV ); }
+ virtual sal_Bool GetNext( SvKeyValue& rKV ) { return xIter->GetNext( rKV ); }
+ virtual void Append( const SvKeyValue& rKV );
+
+ void ClearForSourceView() { xIter = new SvKeyValueIterator; bAlert = sal_False; }
+ void SetAttributes();
+ void SetAttribute( const SvKeyValue& rKV );
+};
+
+//=========================================================================
+
+sal_uInt16 __READONLY_DATA aTitleMap_Impl[3][2] =
+{
+ // local remote
+ /* SFX_TITLE_CAPTION */ { SFX_TITLE_FILENAME, SFX_TITLE_TITLE },
+#ifdef MAC
+ /* SFX_TITLE_PICKLIST */ { SFX_TITLE_FILENAME, SFX_TITLE_FULLNAME },
+#else
+ /* SFX_TITLE_PICKLIST */ { 32, SFX_TITLE_FULLNAME },
+#endif
+ /* SFX_TITLE_HISTORY */ { 32, SFX_TITLE_FULLNAME }
+};
+
+//=========================================================================
+
+void SfxObjectShell::AbortImport()
+{
+ pImp->bIsAbortingImport = sal_True;
+}
+
+//-------------------------------------------------------------------------
+
+sal_Bool SfxObjectShell::IsAbortingImport() const
+{
+ return pImp->bIsAbortingImport;
+}
+
+//-------------------------------------------------------------------------
+
+#if SUPD<604
+void SfxObjectShell::NotifyReloadAvailable()
+{
+}
+#endif
+
+//-------------------------------------------------------------------------
+
+SfxDocumentInfo& SfxObjectShell::GetDocInfo()
+{
+ if( !pImp->pDocInfo )
+ {
+ pImp->pDocInfo = new SfxDocumentInfo;
+ pImp->pDocInfo->SetReadOnly( IsReadOnly() );
+ }
+
+ return *pImp->pDocInfo;
+}
+
+//-------------------------------------------------------------------------
+
+void SfxObjectShell::FlushDocInfo()
+{
+ SetModified(sal_True);
+ SfxDocumentInfo &rInfo = GetDocInfo();
+ Broadcast( SfxDocumentInfoHint( &rInfo ) );
+ SetAutoLoad( rInfo.GetReloadURL(), rInfo.GetReloadDelay() * 1000,
+ rInfo.IsReloadEnabled() );
+
+ // bitte beachten:
+ // 1. Titel in DocInfo aber nicht am Doc (nach HTML-Import)
+ // => auch am Doc setzen
+ // 2. Titel in DocInfo leer (Briefumschlagsdruck)
+ // => nicht am Doc setzen, da sonst "unbenanntX" daraus wird
+ String aDocInfoTitle = GetDocInfo().GetTitle();
+ if ( aDocInfoTitle.Len() )
+ SetTitle( aDocInfoTitle );
+}
+
+//-------------------------------------------------------------------------
+
+void SfxObjectShell::SetError(sal_uInt32 lErr)
+{
+ if(pImp->lErr==ERRCODE_NONE)
+ pImp->lErr=lErr;
+}
+
+//-------------------------------------------------------------------------
+
+sal_uInt32 SfxObjectShell::GetError() const
+{
+ return ERRCODE_TOERROR(GetErrorCode());
+}
+
+//-------------------------------------------------------------------------
+
+sal_uInt32 SfxObjectShell::GetErrorCode() const
+{
+ sal_uInt32 lError=pImp->lErr;
+ if(!lError && GetMedium())
+ lError=GetMedium()->GetErrorCode();
+ if(!lError && HasStorage())
+ lError= GetStorage()->GetErrorCode();
+ return lError;
+}
+
+//-------------------------------------------------------------------------
+
+void SfxObjectShell::ResetError()
+{
+ pImp->lErr=0;
+ SfxMedium * pMed = GetMedium();
+ if( pMed )
+ pMed->ResetError();
+ SvStorage *pStor= HasStorage() ? GetStorage() : 0;
+ if( pStor )
+ pStor->ResetError();
+}
+
+//-------------------------------------------------------------------------
+
+sal_Bool SfxObjectShell::IsTemplate() const
+{
+ return pImp->bIsTemplate;
+}
+
+//-------------------------------------------------------------------------
+
+void SfxObjectShell::SetTemplate(sal_Bool bIs)
+{
+ pImp->bIsTemplate=bIs;
+ SfxFilterMatcher aMatcher( GetFactory().GetFilterContainer() );
+ SfxFilterMatcherIter aIter( &aMatcher, SFX_FILTER_TEMPLATEPATH );
+ SfxMedium* pMed = GetMedium();
+ if( pMed ) pMed->SetFilter( aIter.First() );
+}
+
+//-------------------------------------------------------------------------
+
+void SfxObjectShell::ModifyChanged()
+
+/* [Beschreibung]
+
+ Diese virtuelle Methode wird aus der virtuellen Basisklasse SvPersist
+ gerufen, wenn sich das Modified-Flag ge"andert hat. Diese Querverbindung
+ ist notwendig, da aus einem Zweig einer virtuellen Vererbung nicht
+ quer un den anderen gerufen werden kann.
+*/
+
+{
+ if ( pImp->bClosing )
+ // SetModified aus dem dispose des Models!
+ return;
+
+ {DBG_CHKTHIS(SfxObjectShell, 0);}
+ SfxObjectShell *pDoc;
+ for ( pDoc = SfxObjectShell::GetFirst(); pDoc;
+ pDoc = SfxObjectShell::GetNext(*pDoc) )
+ if( pDoc->IsModified() )
+ break;
+ SfxApplication *pSfxApp = SFX_APP();
+ Timer *pTimer = pSfxApp->GetAutoSaveTimer_Impl();
+ if( pDoc )
+ {
+ if( !pTimer->IsActive() )
+ pTimer->Start();
+ }
+ else
+ pTimer->Stop();
+
+ SfxViewFrame* pViewFrame = SfxViewFrame::Current();
+ if ( pViewFrame )
+ pViewFrame->GetBindings().Invalidate( SID_SAVEDOCS );
+
+ pSfxApp->NotifyEvent( SfxEventHint( SFX_EVENT_MODIFYCHANGED, this ) );
+}
+
+//--------------------------------------------------------------------
+
+SfxInPlaceObject* SfxObjectShell::GetInPlaceObject() const
+{
+ if( !pImp->pInPlaceObj && !pImp->bSetInPlaceObj )
+ {
+ // try to cast
+ SvInPlaceObjectRef xSvIP( (SfxObjectShell *)this );
+ if ( xSvIP.Is() )
+ pImp->pInPlaceObj = (SfxInPlaceObject*) &xSvIP;
+ pImp->bSetInPlaceObj = sal_True;
+ }
+ return pImp->pInPlaceObj;
+}
+
+//-------------------------------------------------------------------------
+
+sal_Bool SfxObjectShell::IsReadOnlyUI() const
+
+/* [Beschreibung]
+
+ Liefert sal_True, wenn das Dokument fuer die UI wie r/o behandelt werden
+ soll. Dieses ist unabhaengig vom tatsaechlichen r/o, welches per
+ <IsReadOnly()> erfragbar ist.
+*/
+
+{
+ return pImp->bReadOnlyUI;
+}
+
+//-------------------------------------------------------------------------
+
+sal_Bool SfxObjectShell::IsReadOnlyMedium() const
+
+/* [Beschreibung]
+
+ Liefert sal_True, wenn das Medium r/o ist bzw. r/o geoeffnet wurde.
+*/
+
+{
+ if ( !pMedium )
+ return sal_True;
+ return pMedium->IsReadOnly();
+}
+
+//-------------------------------------------------------------------------
+
+void SfxObjectShell::SetReadOnlyUI( sal_Bool bReadOnly )
+
+/* [Beschreibung]
+
+ Schaltet das Dokument in einen r/o bzw. r/w Zustand ohne es neu
+ zu laden und ohne die Open-Modi des Mediums zu aendern.
+*/
+
+{
+ sal_Bool bWasRO = IsReadOnly();
+ pImp->bReadOnlyUI = bReadOnly;
+ if ( bWasRO != IsReadOnly() )
+ {
+ Broadcast( SfxSimpleHint(SFX_HINT_MODECHANGED) );
+ if ( pImp->pDocInfo )
+ pImp->pDocInfo->SetReadOnly( IsReadOnly() );
+ }
+}
+
+//-------------------------------------------------------------------------
+
+sal_Bool SfxObjectShell::IsReadOnly() const
+{
+ return pImp->bReadOnlyUI || IsReadOnlyMedium();
+}
+
+//-------------------------------------------------------------------------
+
+sal_Bool SfxObjectShell::IsInModalMode() const
+
+/* [Beschreibung]
+
+ Diese Methode liefert sal_True, falls in einer ::com::sun::star::sdbcx::View auf dieses Dokument
+ ein modaler Dialog exitiert, sonst sal_False.
+*/
+
+{
+ return pImp->bModalMode;
+}
+
+//-------------------------------------------------------------------------
+
+sal_Bool SfxObjectShell::IsInAPICall() const
+
+/* [Beschreibung]
+
+ Diese Methode liefert sal_True, falls z.B. ein zur Zeit durchzufuehrendes
+ ConvertFrom (oder andere Callbacks) von der API gerufen werden. Dann
+ duefen keine Dialoge gestartet werden.
+*/
+
+{
+ return pImp->bSilent;
+}
+
+//-------------------------------------------------------------------------
+
+void SfxObjectShell::SetModalMode_Impl( sal_Bool bModal )
+{
+ // nur Broadcasten wenn modifiziert, sonst ggf. Endlosrekursion
+ if ( !pImp->bModalMode != !bModal )
+ {
+ // zentral mitz"ahlen
+ sal_uInt16 &rDocModalCount = SFX_APP()->Get_Impl()->nDocModalMode;
+ if ( bModal )
+ ++rDocModalCount;
+ else
+ --rDocModalCount;
+
+ // umschalten
+ pImp->bModalMode = bModal;
+ Broadcast( SfxSimpleHint( SFX_HINT_MODECHANGED ) );
+ }
+}
+
+//--------------------------------------------------------------------
+
+Size SfxObjectShell::GetFirstPageSize()
+{
+ Size aRet;
+ SfxInPlaceObject *pIpObj = GetInPlaceObject();
+ if ( pIpObj )
+ aRet = pIpObj->GetVisArea(ASPECT_THUMBNAIL).GetSize();
+ return aRet;
+}
+
+
+//--------------------------------------------------------------------
+
+IndexBitSet& SfxObjectShell::GetNoSet_Impl()
+{
+ return pImp->aBitSet;
+}
+
+//--------------------------------------------------------------------
+// changes the title of the document
+
+void SfxObjectShell::SetTitle
+(
+ const String& rTitle // der neue Titel des Dokuments
+)
+
+/* [Beschreibung]
+
+ Mit dieser Methode kann der Titel des Dokuments gesetzt werden.
+ Dieser entspricht initial dem kompletten Dateinamen. Ein Setzen
+ des Titels wirkt jedoch nicht zu"uck auf den Dateinamen; er wird
+ jedoch in den Caption-Bars der MDI-Fenster angezeigt.
+*/
+
+{
+ DBG_CHKTHIS(SfxObjectShell, 0);
+
+ // nix zu tun?
+ if ( ( HasName() && pImp->aTitle == rTitle ) ||
+ ( !HasName() && GetTitle() == rTitle ) )
+ return;
+
+ SfxApplication *pSfxApp = SFX_APP();
+#if 0
+ // wird 'unbenannt#' als Titel gesetzt
+ String aNoName(SfxResId(STR_NONAME));
+ if ( rTitle.Match(aNoName) <= aNoName.Len() )
+ {
+ // er ist es selbst => ignorieren
+ pSfxApp->ReleaseIndex(pImp->nVisualDocumentNumber);
+ pImp->bIsNamedVisible=0;
+ }
+#endif
+
+ // ggf. die unbenannt-Nummer freigeben
+ if ( pImp->bIsNamedVisible && USHRT_MAX != pImp->nVisualDocumentNumber )
+ {
+ pSfxApp->ReleaseIndex(pImp->nVisualDocumentNumber);
+ pImp->bIsNamedVisible = 0;
+ }
+
+ // Title setzen
+ pImp->aTitle = rTitle;
+// Wieso denn in der DocInfo?
+// GetDocInfo().SetTitle( rTitle );
+// FlushDocInfo();
+
+ // Benachrichtigungen
+ SfxShell::SetName( GetTitle(SFX_TITLE_APINAME) );
+ Broadcast( SfxSimpleHint(SFX_HINT_TITLECHANGED) );
+}
+
+//--------------------------------------------------------------------
+
+#ifdef DEBUG
+String X(const String &rRet)
+{
+ if ( !rRet.Len() )
+ return DEFINE_CONST_UNICODE( "-empty-" );
+ return rRet;
+}
+#else
+#define X(ret) ret
+#endif
+
+//--------------------------------------------------------------------
+String SfxObjectShell::GetTitle
+(
+ sal_uInt16 nMaxLength /* 0 (default)
+ der Titel selbst, so wie er ist
+
+ 1 (==SFX_TITLE_FILENAME)
+ liefert den logischen Dateinamen ohne Pfad
+ (unter WNT je nach Systemeinstellung ohne
+ Extension)
+
+ 2 (==SFX_TITLE_FULLNAME)
+ liefert den mit komplettem logischen Dateinamen
+ mit Pfad (remote => ::com::sun::star::util::URL)
+
+ 3 (==SFX_TITLE_APINAME)
+ liefert den logischen Dateinamen ohne Pfad
+ und Extension
+
+ 4 (==SFX_TITLE_DETECT)
+ liefert den kompletten Titel, falls noch
+ nicht gesetzt wird aber aus DocInfo oder
+ dem Namen des Medium erzeugt
+
+ 5 (==SFX_TITLE_CAPTION)
+ liefert den Titel so, wie MB ihn heute in
+ der CaptionBar anzeigen m"ochte
+
+ 6 (==SFX_TITLE_PICKLIST)
+ liefert den Titel so, wie MB ihn heute in
+ der PickList anzeigen m"ochte
+
+ 7 (==SFX_TITLE_HISTORY)
+ liefert den Titel so, wie MB ihn heute in
+ der History anzeigen m"ochte
+
+ 10 bis USHRT_MAX
+ liefert maximal 'nMaxLength' Zeichen vom logischen
+ Dateinamen inkl. Pfad (remote => ::com::sun::star::util::URL)
+ */
+) const
+
+/* [Beschreibung]
+
+ Liefert den Titel bzw. logischen Dateinamen des Dokuments, je nach
+ 'nMaxLength'.
+
+ Falls der Dateiname mit Pfad verwendet wird, wird die Namensk"urzung durch
+ Ersetzung eines oder mehrerer Directory-Namen durch "..." durchgef"uhrt,
+ URLs werden z.Zt. immer komplett geliefert.
+*/
+
+{
+// if ( GetCreateMode() == SFX_CREATE_MODE_EMBEDDED )
+// return String();
+
+ // Titel erzeugen?
+ if ( SFX_TITLE_DETECT == nMaxLength && !pImp->aTitle.Len() )
+ {
+ static sal_Bool bRecur = sal_False;
+ if ( bRecur )
+ return DEFINE_CONST_UNICODE( "-not available-" );
+ bRecur = sal_True;
+
+ // evtl. ist Titel aus DocInfo verwendbar
+ SfxObjectShell *pThis = (SfxObjectShell*) this;
+ String aTitle = pThis->GetDocInfo().GetTitle();
+ aTitle.EraseLeadingChars();
+ aTitle.EraseTrailingChars();
+ if ( !aTitle.Len() )
+ // sonst wie SFX_TITLE_FILENAME
+ aTitle = GetTitle( SFX_TITLE_FILENAME );
+ pThis->SetTitle( aTitle );
+ bRecur = sal_False;
+ return X(aTitle);
+ }
+ else if (SFX_TITLE_APINAME == nMaxLength )
+ return X(GetAPIName());
+
+ // Sonderfall Vorlagen:
+ if( IsTemplate() && pImp->aTitle.Len() &&
+ ( nMaxLength == SFX_TITLE_CAPTION || nMaxLength == SFX_TITLE_PICKLIST ) )
+ return X(pImp->aTitle);
+
+ // Picklist/Caption wird gemappt
+ SfxMedium *pMed = GetMedium();
+ if ( pMed && ( nMaxLength == SFX_TITLE_CAPTION || nMaxLength == SFX_TITLE_PICKLIST ) )
+ {
+ // Wenn ein spezieller Titel beim "Offnen mitgegebent wurde;
+ // wichtig bei URLs, die INET_PROT_FILE verwenden, denn bei denen
+ // wird der gesetzte Titel nicht beachtet.
+ // (s.u., Auswertung von aTitleMap_Impl)
+ SFX_ITEMSET_ARG( pMed->GetItemSet(), pNameItem, SfxStringItem, SID_DOCINFO_TITLE, sal_False );
+
+ // Demn"achst nur noch SID_FILE_LONGNAME statt SID_DOCINFO_TITLE
+ if ( !pNameItem )
+ SFX_ITEMSET_ARG( pMed->GetItemSet(), pNameItem, SfxStringItem, SID_FILE_LONGNAME, sal_False );
+
+ if ( pNameItem )
+ {
+ return X( pNameItem->GetValue() );
+ }
+ }
+
+ if ( nMaxLength >= SFX_TITLE_CAPTION && nMaxLength <= SFX_TITLE_HISTORY )
+ {
+ sal_uInt16 nRemote;
+ if( !pMed || pMed->GetURLObject().GetProtocol() == INET_PROT_FILE )
+ nRemote = 0;
+ else nRemote = 1;
+ nMaxLength = aTitleMap_Impl[nMaxLength-SFX_TITLE_CAPTION][nRemote];
+ }
+
+ // noch unbenannt?
+ DBG_ASSERT( !HasName() || pMed, "HasName() aber kein Medium?!?" );
+ if ( !HasName() || !pMed )
+ {
+ // schon Titel gesezt?
+ if ( pImp->aTitle.Len() )
+ return X(pImp->aTitle);
+
+ // mu\s es durchnumeriert werden?
+ String aNoName( SfxResId( STR_NONAME ) );
+ if ( pImp->bIsNamedVisible )
+ // Nummer hintenanh"angen
+ aNoName += String::CreateFromInt32( pImp->nVisualDocumentNumber );
+
+ // Dokument hei\st vorerst 'unbenannt#'
+ return X(aNoName);
+ }
+
+
+ // lokale Datei?
+ const INetURLObject& aURL = pMed->GetURLObject();
+ if ( aURL.GetProtocol() == INET_PROT_FILE )
+ {
+ String aName( aURL.HasMark() ? INetURLObject( aURL.GetURLNoMark() ).PathToFileName() : aURL.PathToFileName() );
+
+// if ( nMaxLength > SFX_TITLE_MAXLEN )
+// return X( DirEntry( aName ).GetFull( FSYS_STYLE_HOST, sal_False, nMaxLength ) );
+ /* else*/ if ( nMaxLength == SFX_TITLE_FULLNAME )
+ return X( aName );
+
+ if ( !pImp->aTitle.Len() )
+ {
+ INetURLObject aPath( aName, INET_PROT_FILE );
+ if ( nMaxLength == SFX_TITLE_FILENAME )
+ return X( aPath.GetName() );
+
+ // sonst Titel aus Dateiname generieren
+ pImp->aTitle = aPath.GetBase();
+ }
+ }
+ else
+ {
+ // ::com::sun::star::util::URL-Versionen
+ if ( nMaxLength >= SFX_TITLE_MAXLEN )
+ {
+ String aComplete( pMed->GetName() );
+ if( aComplete.Len() > nMaxLength )
+ {
+ String aRet( DEFINE_CONST_UNICODE( "..." ) );
+ aRet += aComplete.Copy( aComplete.Len() - nMaxLength + 3, nMaxLength - 3 );
+ return X( aRet );
+ }
+ else
+ return X( pMed->GetName() );
+ }
+ else if ( nMaxLength == SFX_TITLE_FILENAME )
+ {
+ String aName( aURL.GetLastName() );
+ aName = INetURLObject::decode( aName, INET_HEX_ESCAPE, INetURLObject::DECODE_WITH_CHARSET );
+ if( !aName.Len() )
+ aName = aURL.GetURLNoPass();
+ return X(aName);
+ }
+ else if ( nMaxLength == SFX_TITLE_FULLNAME )
+ return X(aURL.GetMainURL());
+
+ // ggf. Titel aus Dateiname generieren
+ if ( !pImp->aTitle.Len() )
+ pImp->aTitle = aURL.GetBase();
+ }
+
+ // ganzer Titel
+ return X(pImp->aTitle);
+}
+
+//--------------------------------------------------------------------
+
+void SfxObjectShell::InvalidateName()
+
+/* [Beschreibung]
+
+ Ermittelt den Titel des Dokuments neu aus 'unbenannt', DocInfo-Titel
+ bzw. Dateinamen. Wird nach Laden aus Template oder SaveAs ben"otigt.
+*/
+
+{
+ // Title neu erzeugen
+ pImp->aTitle.Erase();
+// pImp->nVisualDocumentNumber = USHRT_MAX;
+ GetTitle( SFX_TITLE_DETECT );
+ SetName( GetTitle( SFX_TITLE_APINAME ) );
+
+ // Benachrichtigungen
+ Broadcast( SfxSimpleHint(SFX_HINT_TITLECHANGED) );
+}
+
+//--------------------------------------------------------------------
+
+void SfxObjectShell::SetNamedVisibility_Impl()
+{
+ if ( !pImp->bIsNamedVisible )
+ {
+ // Nummer verpassen
+ pImp->bIsNamedVisible = sal_True;
+ // ggf. neue Nummer verpassen
+ if ( !HasName() && USHRT_MAX == pImp->nVisualDocumentNumber && !pImp->aTitle.Len() )
+ {
+ pImp->nVisualDocumentNumber = SFX_APP()->GetFreeIndex();
+ Broadcast( SfxSimpleHint(SFX_HINT_TITLECHANGED) );
+ }
+ }
+
+ SetName( GetTitle(SFX_TITLE_APINAME) );
+}
+
+//--------------------------------------------------------------------
+
+void SfxObjectShell::MemoryError()
+{
+}
+
+//--------------------------------------------------------------------
+
+SfxProgress* SfxObjectShell::GetProgress() const
+{
+ return pImp->pProgress;
+}
+
+//--------------------------------------------------------------------
+
+void SfxObjectShell::SetProgress_Impl
+(
+ SfxProgress *pProgress /* zu startender <SfxProgress> oder 0, falls
+ der Progress zur"uckgesetzt werden soll */
+)
+
+/* [Beschreibung]
+
+ Interne Methode zum setzen oder zur"ucksetzen des Progress-Modes
+ f"ur diese SfxObjectShell.
+*/
+
+{
+ DBG_ASSERT( ( !pImp->pProgress && pProgress ) ||
+ ( pImp->pProgress && !pProgress ),
+ "Progress activation/deacitivation mismatch" );
+ pImp->pProgress = pProgress;
+}
+
+//--------------------------------------------------------------------
+
+void SfxObjectShell::PostActivateEvent_Impl()
+{
+ SfxApplication* pSfxApp = SFX_APP();
+ if ( !pSfxApp->IsDowning() && !IsLoading() )
+ {
+ if (pImp->nEventId)
+ {
+ SFX_ITEMSET_ARG( pMedium->GetItemSet(), pSalvageItem,
+ SfxStringItem, SID_DOC_SALVAGE, sal_False );
+ sal_uInt16 nId = pImp->nEventId;
+ pImp->nEventId = 0;
+ if ( !pSalvageItem )
+ pSfxApp->NotifyEvent(SfxEventHint( nId, this, pImp->bAddToHistory), sal_False);
+ }
+
+ if ( GetFrame() )
+ pSfxApp->NotifyEvent(SfxEventHint(SFX_EVENT_ACTIVATEDOC, this), sal_False);
+ }
+}
+
+//--------------------------------------------------------------------
+
+void SfxObjectShell::SetActivateEvent_Impl(sal_uInt16 nId, sal_Bool bAddToHistory)
+{
+ if ( GetFactory().GetFlags() & SFXOBJECTSHELL_HASOPENDOC )
+ {
+ pImp->nEventId = nId;
+ pImp->bAddToHistory = bAddToHistory;
+ }
+}
+
+//--------------------------------------------------------------------
+
+void SfxObjectShell::RegisterTransfer( SfxMedium& rMedium )
+/* [Beschreibung ]
+ Alle Medien, die aufgesetzt werden, um Teile eines Dokumentes zu
+ laden, muessen an der zugehoerigen SfxObjectShell angemeldet
+ werden. So kann dokumentweise abgebrochen werden. */
+{
+ rMedium.SetCancelManager_Impl( GetMedium()->GetCancelManager_Impl() );
+ if( IsReloading() )
+ rMedium.SetUsesCache( sal_False );
+ rMedium.SetReferer( GetMedium()->GetName() );
+}
+
+//-------------------------------------------------------------------------
+
+void SfxObjectShell::PrepareReload( )
+/* [Beschreibung ]
+ Wird vor dem Reload gerufen und gibt die Moeglichkeit,
+ etwaige Caches zu leeren. */
+{
+}
+
+//-------------------------------------------------------------------------
+
+sal_Bool SfxObjectShell::IsReloading() const
+/* [Beschreibung ]
+ Wird beim Aufsetzen neuer Downloads abgefragt, um gegebenenfalls
+ am SfxMedium SetUsesCache( sal_False ) zu rufen. */
+
+{
+ return !GetMedium()->UsesCache();
+}
+
+//-------------------------------------------------------------------------
+
+void SfxObjectShell::LockAutoLoad( sal_Bool bLock )
+
+/* Verhindert ein evtl. eintreffendes AutoLoad. Wird auch vor AutoLoad
+ eines umgebenden FrameSet beruecksichtigt.
+*/
+
+{
+ if ( bLock )
+ ++pImp->nAutoLoadLocks;
+ else
+ --pImp->nAutoLoadLocks;
+}
+
+//-------------------------------------------------------------------------
+
+// kann nach frame.cxx gemoved werden, wenn 358+36x-Stand gemerged sind
+
+sal_Bool SfxFrame::IsAutoLoadLocked_Impl() const
+{
+ // sein einges Doc gelockt?
+ const SfxObjectShell* pObjSh = GetCurrentDocument();
+ if ( !pObjSh || !pObjSh->IsAutoLoadLocked() )
+ return sal_False;
+
+ // seine Childs gelockt?
+ for ( sal_uInt16 n = GetChildFrameCount(); n--; )
+ if ( !GetChildFrame(n)->IsAutoLoadLocked_Impl() )
+ return sal_False;
+
+ // sonst ist AutoLoad erlaubt
+ return sal_True;
+}
+
+//-------------------------------------------------------------------------
+
+sal_Bool SfxObjectShell::IsAutoLoadLocked() const
+
+/* Liefert, ob ein eintreffendes AutoLoad ausgefuehrt werden darf. Wird auch
+ vor AutoLoad eines umgebenden FrameSet beruecksichtigt.
+*/
+
+{
+ return !IsReadOnly() || pImp->nAutoLoadLocks > 0;
+}
+
+//-------------------------------------------------------------------------
+
+void SfxObjectShell::SetAutoLoad(
+ const INetURLObject& rUrl, sal_uInt32 nTime, sal_Bool bReload )
+/* [Beschreibung ]
+ Hiermit wird automatisches Laden der Url rUrl nTime
+ Millisekunden nach Aufruf von FinishedLoading angefordert. bReload
+ bestimmt, ob das Dokument aus dem Cache geladen werden soll oder
+ nicht. */
+{
+ if ( pImp->pReloadTimer )
+ DELETEZ(pImp->pReloadTimer);
+ if ( bReload )
+ {
+ pImp->pReloadTimer = new AutoReloadTimer_Impl(
+ rUrl.GetMainURL(), nTime, bReload, this );
+ pImp->pReloadTimer->Start();
+ }
+}
+
+void SfxObjectShell::FinishedLoading( sal_uInt16 nFlags )
+{
+ sal_Bool bSetModifiedTRUE = sal_False;
+ if( ( nFlags & SFX_LOADED_MAINDOCUMENT ) &&
+ !(pImp->nLoadedFlags & SFX_LOADED_MAINDOCUMENT ))
+ {
+ ((SfxHeaderAttributes_Impl*)GetHeaderAttributes())->SetAttributes();
+ pImp->bImportDone = sal_True;
+ const SfxFilter* pFilter = GetMedium()->GetFilter();
+ if( !IsAbortingImport() )
+ {
+ if( pFilter && !pFilter->UsesStorage() &&
+ !(GetMedium()->GetOpenMode() & STREAM_WRITE ) )
+ GetMedium()->Close();
+ PositionView_Impl();
+ }
+ // Salvage
+ SFX_ITEMSET_ARG( pMedium->GetItemSet(), pSalvageItem,
+ SfxStringItem, SID_DOC_SALVAGE, sal_False );
+ if ( pSalvageItem )
+ bSetModifiedTRUE = sal_True;
+ }
+
+ if( ( nFlags & SFX_LOADED_IMAGES ) &&
+ !(pImp->nLoadedFlags & SFX_LOADED_IMAGES ) )
+ {
+ SfxDocumentInfo& rInfo = GetDocInfo();
+ SetAutoLoad( rInfo.GetReloadURL(), rInfo.GetReloadDelay() * 1000,
+ rInfo.IsReloadEnabled() );
+ if( !bSetModifiedTRUE && IsEnableSetModified() )
+ SetModified( sal_False );
+ Invalidate( SID_SAVEASDOC );
+ SfxFrame* pFrame = GetMedium()->GetLoadTargetFrame();
+ if( pFrame ) pFrame->SetLoadCancelable_Impl( 0 );
+ }
+
+ pImp->nLoadedFlags |= nFlags;
+
+ if( pImp->nLoadedFlags & SFX_LOADED_MAINDOCUMENT &&
+ pImp->nLoadedFlags & SFX_LOADED_IMAGES )
+ GetMedium()->SetUsesCache( sal_True );
+
+ if ( bSetModifiedTRUE )
+ SetModified( sal_True );
+ if ( pImp->nEventId )
+ {
+ // Falls noch kein OnLoad ausgel"ost wurde, weil beim Erzeugen der ::com::sun::star::sdbcx::View der Frame nicht aktiv war,
+ // mu\s das jetzt nachgeholt werden, indem der Frame benachrichtigt wird.
+ Broadcast( SfxEventHint( SFX_EVENT_LOADFINISHED, this, sal_False ) );
+
+ SFX_ITEMSET_ARG( pMedium->GetItemSet(), pHiddenItem, SfxBoolItem, SID_HIDDEN, sal_False );
+ if ( pHiddenItem && pHiddenItem->GetValue() )
+ {
+ sal_uInt16 nId = pImp->nEventId;
+ pImp->nEventId = 0;
+ SFX_APP()->NotifyEvent(SfxEventHint( nId, this, pImp->bAddToHistory), sal_False);
+ }
+ }
+}
+
+//-------------------------------------------------------------------------
+
+void SfxObjectShell::PositionView_Impl()
+{
+ MarkData_Impl *pMark = Get_Impl()->pMarkData;
+ if( pMark )
+ {
+ SfxViewShell* pSh = pMark->pFrame->GetViewShell();
+ if( pMark->aUserData.Len() )
+ pSh->ReadUserData( pMark->aUserData, sal_True );
+ else if( pMark->aMark.Len() )
+ pSh->JumpToMark( pMark->aMark );
+ DELETEZ( Get_Impl()->pMarkData );
+ }
+}
+
+//-------------------------------------------------------------------------
+
+sal_Bool SfxObjectShell::IsLoading() const
+/* [Beschreibung ]
+ Wurde bereits FinishedLoading aufgerufeb? */
+{
+ return !( pImp->nLoadedFlags & SFX_LOADED_MAINDOCUMENT );
+}
+
+//-------------------------------------------------------------------------
+
+void SfxObjectShell::CancelTransfers()
+/* [Beschreibung ]
+ Hier koennen Transfers gecanceled werden, die nicht mit
+ RegisterTransfer registiert wurden */
+{
+ GetMedium()->CancelTransfers();
+ if( ( pImp->nLoadedFlags & SFX_LOADED_ALL ) != SFX_LOADED_ALL )
+ {
+ AbortImport();
+ if( IsLoading() )
+ FinishedLoading( SFX_LOADED_ALL );
+
+/*
+ SfxViewFrame* pFrame = SfxViewFrame::GetFirst( this );
+ while( pFrame )
+ {
+ pFrame->CancelTransfers();
+ pFrame = SfxViewFrame::GetNext( *pFrame, this );
+ }*/
+ }
+}
+
+//-------------------------------------------------------------------------
+
+AutoReloadTimer_Impl::AutoReloadTimer_Impl(
+ const String& rURL, sal_uInt32 nTime, sal_Bool bReloadP, SfxObjectShell* pSh )
+ : aUrl( rURL ), bReload( bReloadP ), pObjSh( pSh )
+{
+ SetTimeout( nTime );
+}
+
+//-------------------------------------------------------------------------
+
+void AutoReloadTimer_Impl::Timeout()
+{
+ SfxViewFrame *pFrame = SfxViewFrame::GetFirst( pObjSh );
+
+ if ( pFrame )
+ {
+ // momentan nicht m"oglich/sinnvoll?
+ if ( !pObjSh->CanReload_Impl() || pObjSh->IsAutoLoadLocked() || DragManager::GetDragManager() )
+ {
+ // erneuten Versuch erlauben
+ Start();
+ return;
+ }
+
+ SfxAllItemSet aSet( SFX_APP()->GetPool() );
+ aSet.Put( SfxBoolItem( SID_AUTOLOAD, sal_True ) );
+ if ( aUrl.Len() )
+ aSet.Put( SfxStringItem( SID_FILE_NAME, aUrl ) );
+ SfxRequest aReq( SID_RELOAD, 0, aSet );
+ pObjSh->Get_Impl()->pReloadTimer = 0;
+ delete this;
+ pFrame->ExecReload_Impl( aReq );
+ return;
+ }
+
+ pObjSh->Get_Impl()->pReloadTimer = 0;
+ delete this;
+}
+
+//-------------------------------------------------------------------------
+
+void SfxObjectShell::SetActualSize( const Size &rSize )
+{
+ pImp->aViewSize = rSize;
+}
+
+//-------------------------------------------------------------------------
+
+Size SfxObjectShell::GetActualSize() const
+{
+ return pImp->aViewSize;
+}
+
+sal_Bool SfxObjectShell::IsInFrame() const
+{
+ return pImp->bInFrame;
+}
+
+void SfxObjectShell::SetInFrame( sal_Bool bOn )
+{
+ pImp->bInFrame = bOn;
+}
+
+SfxModule* SfxObjectShell::GetModule() const
+{
+ return GetFactory().GetModule();
+}
+
+sal_Bool SfxObjectShell::IsBasic(
+ const String & rCode, SbxObject * pVCtrl )
+{
+ if( !rCode.Len() ) return sal_False;
+ if( !pImp->bIsBasicDefault )
+ return sal_False;
+ return SfxMacroConfig::IsBasic( pVCtrl, rCode, GetBasicManager() );
+}
+
+ErrCode SfxObjectShell::CallBasic( const String& rMacro,
+ const String& rBasic, SbxObject* pVCtrl, SbxArray* pArgs,
+ SbxValue* pRet )
+{
+ if ( !IsSecure() )
+ return ERRCODE_IO_ACCESSDENIED;
+
+ SfxApplication* pApp = SFX_APP();
+ pApp->EnterBasicCall();
+ BasicManager *pMgr = GetBasicManager();
+ if( pApp->GetName() == rBasic )
+ pMgr = pApp->GetBasicManager();
+ ErrCode nRet = SfxMacroConfig::Call( pVCtrl, rMacro, pMgr, pArgs, pRet );
+ pApp->LeaveBasicCall();
+ return nRet;
+}
+
+ErrCode SfxObjectShell::Call( const String & rCode, sal_Bool bIsBasicReturn, SbxObject * pVCtrl )
+{
+ ErrCode nErr = ERRCODE_NONE;
+ if ( bIsBasicReturn )
+ CallBasic( rCode, String(), pVCtrl );
+ return nErr;
+}
+
+extern ::com::sun::star::uno::Any sbxToUnoValue( SbxVariable* pVar );
+
+ErrCode SfxObjectShell::CallScript(
+ const String & rScriptType,
+ const String & rCode,
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & rSource,
+ void *pArgs,
+ void *pRet
+)
+{
+ ::vos::OClearableGuard aGuard( Application::GetSolarMutex() );
+ ErrCode nErr = ERRCODE_NONE;
+ if( rScriptType.EqualsAscii( "StarBasic" ) )
+ {
+
+ SbxArrayRef xArray;
+ String aTmp;
+ if( pArgs )
+ {
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > * pTmpArgs = (::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > *)pArgs;
+ sal_Int32 nCnt = pTmpArgs->getLength();
+
+ if( nCnt )
+ {
+ xArray = new SbxArray;
+ const ::com::sun::star::uno::Any *pArgs = pTmpArgs->getConstArray();
+ for( sal_Int32 i = 0; i < nCnt; i++ )
+ xArray->Put( GetSbUnoObject( aTmp, pArgs[i] ), i+1 );
+ }
+ }
+
+ SbxVariableRef xValue = pRet ? new SbxVariable : 0;
+ nErr = CallBasic( rCode, aTmp, NULL, xArray, xValue );
+ if ( pRet )
+ *((::com::sun::star::uno::Any*)pRet) = sbxToUnoValue( xValue );
+
+ if ( nErr == ERRCODE_BASIC_PROC_UNDEFINED )
+ {
+ aTmp = SFX_APP()->GetName();
+ nErr = CallBasic( rCode, aTmp, 0, xArray );
+ }
+ }
+ else if( rScriptType.EqualsAscii( "JavaScript" ) )
+ {
+ DBG_ERROR( "JavaScript not allowed" );
+ return 0;
+ }
+ else
+ {
+ DBG_ERROR( "StarScript not allowed" );
+ }
+ return nErr;
+}
+
+SfxFrame* SfxObjectShell::GetSmartSelf( SfxFrame* pSelf, SfxMedium& rMedium )
+{
+ return pSelf;
+}
+
+SfxObjectShellFlags SfxObjectShell::GetFlags() const
+{
+ if( pImp->eFlags == SFXOBJECTSHELL_UNDEFINED )
+ pImp->eFlags = GetFactory().GetFlags();
+ return pImp->eFlags;
+}
+
+void SfxObjectShell::SetFlags( SfxObjectShellFlags eFlags )
+{
+ pImp->eFlags = eFlags;
+}
+
+void SfxObjectShell::SetBaseURL( const String& rURL )
+{
+ pImp->aBaseURL = rURL;
+}
+
+const String& SfxObjectShell::GetBaseURL() const
+{
+ if ( pImp->aBaseURL.Len() )
+ return pImp->aBaseURL;
+ else if ( pMedium->GetFilter() && ( pMedium->GetFilter()->GetFilterFlags() & SFX_FILTER_PACKED ) )
+ return pMedium->GetPhysicalName();
+ else
+ return pMedium->GetName();
+}
+
+String SfxObjectShell::QueryTitle( SfxTitleQuery eType ) const
+{
+ String aRet;
+
+ switch( eType )
+ {
+ case SFX_TITLE_QUERY_SAVE_NAME_PROPOSAL:
+ {
+ SfxMedium* pMed = GetMedium();
+ const INetURLObject& rObj = pMed->GetURLObject();
+ aRet = rObj.GetMainURL();
+ if ( !aRet.Len() )
+ aRet = GetTitle( SFX_TITLE_CAPTION );
+ break;
+ }
+ }
+ return aRet;
+}
+
+void SfxHeaderAttributes_Impl::SetAttributes()
+{
+ bAlert = sal_True;
+ SvKeyValue aPair;
+ for( sal_Bool bCont = xIter->GetFirst( aPair ); bCont;
+ bCont = xIter->GetNext( aPair ) )
+ SetAttribute( aPair );
+}
+
+void SfxHeaderAttributes_Impl::SetAttribute( const SvKeyValue& rKV )
+{
+ String aValue = rKV.GetValue();
+ if( rKV.GetKey().CompareIgnoreCaseToAscii( "refresh" ) == COMPARE_EQUAL && rKV.GetValue().Len() )
+ {
+ sal_uInt32 nTime = aValue.GetToken( 0, ';' ).ToInt32() ;
+ String aURL = aValue.GetToken( 1, ';' );
+ aURL.EraseTrailingChars().EraseLeadingChars();
+ SfxDocumentInfo& rInfo = pDoc->GetDocInfo();
+ if( aURL.Copy(0, 4).CompareIgnoreCaseToAscii( "url=" ) == COMPARE_EQUAL )
+ {
+ INetURLObject aObj;
+ pDoc->GetMedium()->GetURLObject().GetNewAbsURL(
+ aURL.Copy( 4 ), &aObj );
+ rInfo.SetReloadURL( aObj.GetMainURL() );
+ }
+ rInfo.EnableReload( sal_True );
+ rInfo.SetReloadDelay( nTime );
+ pDoc->FlushDocInfo();
+ }
+ else if( rKV.GetKey().CompareIgnoreCaseToAscii( "expires" ) == COMPARE_EQUAL )
+ {
+ DateTime aDateTime;
+ if( INetRFC822Message::ParseDateField( rKV.GetValue(), aDateTime ) )
+ {
+ aDateTime.ConvertToLocalTime();
+ pDoc->GetMedium()->SetExpired_Impl( aDateTime );
+ }
+ else
+ {
+// DBG_ERROR( "Schlechtes ::com::sun::star::util::DateTime fuer Expired" );
+ pDoc->GetMedium()->SetExpired_Impl( Date( 1, 1, 1970 ) );
+ }
+ }
+}
+
+void SfxHeaderAttributes_Impl::Append( const SvKeyValue& rKV )
+{
+ xIter->Append( rKV );
+ if( bAlert ) SetAttribute( rKV );
+}
+
+SvKeyValueIterator* SfxObjectShell::GetHeaderAttributes()
+{
+ if( !pImp->xHeaderAttributes.Is() )
+ {
+ DBG_ASSERT( pMedium, "Kein Medium" );
+ pImp->xHeaderAttributes = new SfxHeaderAttributes_Impl( this );
+ }
+ return ( SvKeyValueIterator*) &pImp->xHeaderAttributes;
+}
+
+void SfxObjectShell::ClearHeaderAttributesForSourceViewHack()
+{
+ ((SfxHeaderAttributes_Impl*)GetHeaderAttributes())
+ ->ClearForSourceView();
+}
+
+
+void SfxObjectShell::SetHeaderAttributesForSourceViewHack()
+{
+ ((SfxHeaderAttributes_Impl*)GetHeaderAttributes())
+ ->SetAttributes();
+}
+
+void SfxObjectShell::StartLoading_Impl()
+{
+ pImp->nLoadedFlags = 0;
+}
+
+sal_Bool SfxObjectShell::IsPreview() const
+{
+ if ( !pMedium )
+ return sal_False;
+
+ sal_Bool bPreview = sal_False;
+ SFX_ITEMSET_ARG( pMedium->GetItemSet(), pFlags, SfxStringItem, SID_OPTIONS, sal_False);
+ if ( pFlags )
+ {
+ // Werte auf einzelne Items verteilen
+ String aFileFlags = pFlags->GetValue();
+ aFileFlags.ToUpperAscii();
+ if ( STRING_NOTFOUND != aFileFlags.Search( 'B' ) )
+ bPreview = sal_True;
+ }
+
+ if ( !bPreview )
+ {
+ SFX_ITEMSET_ARG( pMedium->GetItemSet(), pItem, SfxBoolItem, SID_PREVIEW, sal_False);
+ if ( pItem )
+ bPreview = pItem->GetValue();
+ }
+
+ return bPreview;
+}
+
+sal_Bool SfxObjectShell::IsSecure()
+{
+ // Wenn globale Warnung an ist, nach Secure-Referer-Liste gehen
+ String aReferer = GetMedium()->GetName();
+ if ( !aReferer.Len() )
+ {
+ // bei neuen Dokumenten das Template als Referer nehmen
+ String aTempl( GetDocInfo().GetTemplateFileName() );
+ if ( aTempl.Len() )
+ aReferer = INetURLObject( aTempl, INET_PROT_FILE ).GetMainURL();
+ else
+ // Da leider ein noch nicht gespeichertes Dokument zwar als "lokal"
+ // zu gelten hat, aber kein ::com::sun::star::util::URL hat: ( !!HACK!! )
+ aReferer = DEFINE_CONST_UNICODE( "file://" );
+ }
+
+ INetURLObject aURL( "macro:" );
+ if ( SFX_APP()->IsSecureURL( aURL, &aReferer ) )
+ {
+ if ( GetMedium()->GetContent().is() )
+ {
+ Any aAny( UCB_Helper::GetProperty( GetMedium()->GetContent(), WID_IS_PROTECTED ) );
+ sal_Bool bIsProtected = FALSE;
+ if ( ( aAny >>= bIsProtected ) && bIsProtected )
+ return sal_False;
+ else
+ return sal_True;
+ }
+ else
+ return sal_True;
+ }
+ else
+ return sal_False;
+}
+
+void SfxObjectShell::SetWaitCursor( BOOL bSet ) const
+{
+ for( SfxViewFrame* pFrame = SfxViewFrame::GetFirst( this ); pFrame; pFrame = SfxViewFrame::GetNext( *pFrame, this ) )
+ {
+ if ( bSet )
+ pFrame->GetFrame()->GetWindow().EnterWait();
+ else
+ pFrame->GetFrame()->GetWindow().LeaveWait();
+ }
+}
+
+String SfxObjectShell::GetAPIName() const
+{
+ INetURLObject aURL( GetMedium()->GetName() );
+ String aName( aURL.GetBase() );
+ if( !aName.Len() )
+ aName = aURL.GetURLNoPass();
+ if ( !aName.Len() )
+ aName = GetTitle( SFX_TITLE_DETECT );
+ return aName;
+}
+
+void SfxObjectShell::Invalidate( USHORT nId )
+{
+ for( SfxViewFrame* pFrame = SfxViewFrame::GetFirst( this ); pFrame; pFrame = SfxViewFrame::GetNext( *pFrame, this ) )
+ Invalidate_Impl( pFrame->GetBindings(), nId );
+}
+
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
new file mode 100644
index 000000000000..ac3a47b470f1
--- /dev/null
+++ b/sfx2/source/doc/objserv.cxx
@@ -0,0 +1,1173 @@
+/*************************************************************************
+ *
+ * $RCSfile: objserv.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:32 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#include <so3/svstor.hxx>
+
+#ifndef _URLOBJ_HXX //autogen
+#include <tools/urlobj.hxx>
+#endif
+#ifndef _SFX_INIMGR_HXX //autogen
+#include <inimgr.hxx>
+#endif
+#ifndef _SFX_WHITER_HXX //autogen
+#include <svtools/whiter.hxx>
+#endif
+#ifndef _SFXINIMGR_HXX //autogen
+#include <svtools/iniman.hxx>
+#endif
+#ifndef _MSGBOX_HXX //autogen
+#include <vcl/msgbox.hxx>
+#endif
+#ifndef _SFXINTITEM_HXX //autogen
+#include <svtools/intitem.hxx>
+#endif
+#ifndef _SFXENUMITEM_HXX //autogen
+#include <svtools/eitem.hxx>
+#endif
+#include <vcl/wrkwin.hxx>
+#ifndef _SFXECODE_HXX
+#include <svtools/sfxecode.hxx>
+#endif
+#ifndef _EHDL_HXX
+#include <svtools/ehdl.hxx>
+#endif
+
+#include <svtools/sbx.hxx>
+
+#pragma hdrstop
+
+#include "sfxresid.hxx"
+#include "event.hxx"
+#include "request.hxx"
+#include "printer.hxx"
+#include "viewsh.hxx"
+#include "doctdlg.hxx"
+#include "docfilt.hxx"
+#include "docfile.hxx"
+#include "docinf.hxx"
+#include "dispatch.hxx"
+#include "dinfdlg.hxx"
+#include "objitem.hxx"
+#include "objsh.hxx"
+#include "objshimp.hxx"
+#include "sfxtypes.hxx"
+#include "interno.hxx"
+#include "module.hxx"
+#include "topfrm.hxx"
+#include "versdlg.hxx"
+#include "doc.hrc"
+#include "docfac.hxx"
+
+//====================================================================
+
+BOOL ShallSetBaseURL_Impl( SfxMedium &rMed );
+
+#define SfxObjectShell
+#include "sfxslots.hxx"
+
+AsynchronLink* pPendingCloser = 0;
+
+//=========================================================================
+
+SFX_IMPL_INTERFACE(SfxObjectShell,SfxShell,SfxResId(0))
+{
+}
+
+long SfxObjectShellClose_Impl( void* pObj, void* pArg )
+{
+ SfxObjectShell *pObjSh = (SfxObjectShell*) pArg;
+ if ( pObjSh->Get_Impl()->bHiddenLockedByAPI )
+ {
+ pObjSh->Get_Impl()->bHiddenLockedByAPI = FALSE;
+ pObjSh->OwnerLock(FALSE);
+ }
+ else if ( !pObjSh->Get_Impl()->bClosing )
+ // GCC stuerzt ab, wenn schon im dtor, also vorher Flag abfragen
+ pObjSh->DoClose();
+ return 0;
+}
+
+//=========================================================================
+
+void SfxObjectShell::PrintExec_Impl(SfxRequest &rReq)
+{
+ SfxViewFrame *pFrame = SfxViewFrame::GetFirst(this);
+ if ( pFrame )
+ {
+ rReq.SetSlot( SID_PRINTDOC );
+ pFrame->GetViewShell()->ExecuteSlot(rReq);
+ }
+}
+
+//--------------------------------------------------------------------
+
+void SfxObjectShell::PrintState_Impl(SfxItemSet &rSet)
+{
+ FASTBOOL bPrinting = FALSE;
+ SfxViewFrame *pFrame = SfxViewFrame::GetFirst(this, TYPE(SfxTopViewFrame));
+ if ( pFrame )
+ {
+ SfxPrinter *pPrinter = pFrame->GetViewShell()->GetPrinter();
+ bPrinting = pPrinter && pPrinter->IsPrinting();
+ }
+ rSet.Put( SfxBoolItem( SID_PRINTOUT, bPrinting ) );
+}
+
+//--------------------------------------------------------------------
+void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
+{
+ {DBG_CHKTHIS(SfxObjectShell, 0);}
+
+ pImp->bSetStandardName=FALSE;
+ USHORT nId = rReq.GetSlot();
+ if ( !GetMedium() && nId != SID_CLOSEDOC )
+ return;
+
+ if( nId == SID_SAVEDOC || nId == SID_UPDATEDOC )
+ {
+ // Embedded?
+ SfxInPlaceObject *pObj=GetInPlaceObject();
+ if( pObj && pObj->GetProtocol().IsEmbed() )
+ {
+ BOOL bRet = pObj->GetClient()->SaveObject();
+ rReq.SetReturnValue( SfxBoolItem(0, bRet) );
+ rReq.Done();
+ return;
+ }
+
+ // not-modified => nichts tun, kein BASIC-Laufzeitfehler (API)
+ if ( !IsModified() )
+ {
+ rReq.SetReturnValue( SfxBoolItem(0, FALSE) );
+ rReq.Done();
+ return;
+ }
+ }
+
+ // API-Call => suppress dialogs
+ SfxBoolResetter aSilentReset( pImp->bSilent );
+ if ( rReq.IsAPI() )
+ pImp->bSilent = TRUE;
+
+ const SfxFilter *pCurFilter = GetMedium()->GetFilter();
+ const SfxFilter *pDefFilter = GetFactory().GetFilter(0);
+ if ( nId == SID_SAVEDOC &&
+ pCurFilter && !pCurFilter->CanExport() &&
+ pDefFilter && pDefFilter->IsInternal() )
+ nId = SID_SAVEASDOC;
+
+ // interaktiv speichern via (nicht-Default) Filter?
+ if ( !rReq.IsAPI() && GetMedium()->GetFilter() && HasName() &&
+ (nId == SID_SAVEDOC || nId == SID_UPDATEDOC) )
+ {
+ // aktuellen und Default-Filter besorgen
+
+ // Filter kann nicht exportieren und Default-Filter ist verf"ugbar?
+ if ( !pCurFilter->CanExport() &&
+ !pDefFilter->IsInternal() )
+ {
+ // fragen, ob im default-Format gespeichert werden soll
+ String aWarn(SfxResId(STR_QUERY_MUSTOWNFORMAT));
+ aWarn = SearchAndReplace( aWarn, DEFINE_CONST_UNICODE( "$(FORMAT)" ),
+ GetMedium()->GetFilter()->GetFilterName() );
+ aWarn = SearchAndReplace( aWarn, DEFINE_CONST_UNICODE( "$(OWNFORMAT)" ),
+ GetFactory().GetFilter(0)->GetFilterName() );
+ QueryBox aWarnBox(0,WB_OK_CANCEL|WB_DEF_OK,aWarn);
+ if ( aWarnBox.Execute() == RET_OK )
+ {
+ // ja: Save-As in eigenem Foramt
+ rReq.SetSlot(nId = SID_SAVEASDOC);
+ pImp->bSetStandardName=TRUE;
+ }
+ else
+ {
+ // nein: Abbruch
+ rReq.Ignore();
+ return;
+ }
+ }
+ else
+ {
+ // fremdes Format mit m"oglichem Verlust (aber nicht per API) wenn noch nicht gewarnt und anschlieend im
+ // alien format gespeichert wurde
+ if ( !( pCurFilter->IsOwnFormat() && pCurFilter->GetVersion() == SOFFICE_FILEFORMAT_NOW || ( pCurFilter->GetFilterFlags() & SFX_FILTER_SILENTEXPORT ) )
+ && ( !pImp->bDidWarnFormat || !pImp->bDidDangerousSave ) )
+ {
+ // Default-Format verf"ugbar?
+ if ( !pDefFilter->IsInternal() && pCurFilter != pDefFilter )
+ {
+ // fragen, ob im default-Format gespeichert werden soll
+ String aWarn(SfxResId(STR_QUERY_SAVEOWNFORMAT));
+ aWarn = SearchAndReplace( aWarn, DEFINE_CONST_UNICODE( "$(FORMAT)" ),
+ GetMedium()->GetFilter()->GetFilterName());
+ aWarn = SearchAndReplace( aWarn, DEFINE_CONST_UNICODE( "$(OWNFORMAT)" ),
+ GetFactory().GetFilter(0)->GetFilterName());
+
+ SfxViewFrame *pFrame = SfxObjectShell::Current() == this ?
+ SfxViewFrame::Current() : SfxViewFrame::GetFirst( this );
+ while ( pFrame && (pFrame->GetFrameType() & SFXFRAME_SERVER ) )
+ pFrame = SfxViewFrame::GetNext( *pFrame, this );
+
+ if ( pFrame )
+ {
+ SfxFrame* pTop = pFrame->GetTopFrame();
+ SFX_APP()->SetViewFrame( pTop->GetCurrentViewFrame() );
+ pFrame->GetFrame()->Appear();
+
+ QueryBox aWarnBox(&pFrame->GetWindow(),WB_YES_NO_CANCEL|WB_DEF_YES,aWarn);
+ switch(aWarnBox.Execute())
+ {
+ case RET_YES:
+ {
+ // ja: in Save-As umsetzen
+ rReq.SetSlot(nId = SID_SAVEASDOC);
+ SFX_ITEMSET_ARG( GetMedium()->GetItemSet(), pPassItem, SfxStringItem, SID_PASSWORD, FALSE );
+ if ( pPassItem )
+ rReq.AppendItem( *pPassItem );
+ pImp->bSetStandardName = TRUE;
+ break;
+ }
+
+ case RET_CANCEL:
+ // nein: Abbruch
+ rReq.Ignore();
+ return;
+ }
+
+ pImp->bDidWarnFormat=TRUE;
+ }
+ }
+ }
+ }
+ }
+
+ // Speichern eines namenslosen oder readonly Dokumentes
+ BOOL bMediumRO = IsReadOnlyMedium();
+ if ( ( nId == SID_SAVEDOC || nId == SID_UPDATEDOC ) &&
+ ( !HasName() || bMediumRO ) )
+ {
+ if ( rReq.IsAPI() )
+ {
+ // FALSE zur"uckliefern
+ rReq.SetReturnValue( SfxBoolItem( 0, FALSE ) );
+ rReq.Done();
+ return;
+ }
+ else
+ {
+ // in SaveAs umwandlen
+ rReq.SetSlot(nId = SID_SAVEASDOC);
+ if ( SFX_APP()->IsPlugin() && !HasName() )
+ {
+ SFX_REQUEST_ARG( rReq, pWarnItem, SfxBoolItem, SID_FAIL_ON_WARNING, FALSE);
+ if ( pWarnItem && pWarnItem->GetValue() )
+ {
+ INetURLObject aObj( SFX_INIMANAGER()->Get(SFX_KEY_WORK_PATH), INET_PROT_FILE );
+ aObj.insertName( GetTitle(), false, INetURLObject::LAST_SEGMENT, true, INetURLObject::ENCODE_ALL );
+ const SfxFilter* pFilter = GetFactory().GetFilter(0);
+ String aExtension( pFilter->GetDefaultExtension().Copy(2) );
+ aObj.setExtension( aExtension, INetURLObject::LAST_SEGMENT, true, INetURLObject::ENCODE_ALL );
+ rReq.AppendItem( SfxStringItem( SID_FILE_NAME, aObj.GetMainURL() ) );
+ rReq.AppendItem( SfxBoolItem( SID_RENAME, TRUE ) );
+ }
+ }
+ }
+ }
+
+ switch(nId)
+ {
+ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ case SID_VERSION:
+ {
+ SfxViewFrame* pFrame = GetFrame();
+ if ( !pFrame )
+ pFrame = SfxViewFrame::GetFirst( this );
+ if ( !pFrame )
+ return;
+
+ if ( !rReq.IsAPI() )
+ {
+ if ( pFrame->GetFrame()->GetParentFrame() )
+ {
+ pFrame->GetTopViewFrame()->GetObjectShell()->ExecuteSlot( rReq );
+ return;
+ }
+ }
+
+ if ( !IsOwnStorageFormat_Impl( *GetMedium() ) )
+ return;
+
+ SfxVersionDialog *pDlg = new SfxVersionDialog( pFrame, NULL );
+ pDlg->Execute();
+ delete pDlg;
+ rReq.Done();
+ break;
+ }
+
+ case SID_LOAD_LIBRARY:
+ case SID_UNLOAD_LIBRARY:
+ case SID_REMOVE_LIBRARY:
+ case SID_ADD_LIBRARY:
+ {
+ // Diese Funktionen sind nur f"ur Aufrufe aus dem Basic gedacht
+ SfxApplication *pApp = SFX_APP();
+ if ( pApp->IsInBasicCall() )
+ pApp->BasicLibExec_Impl( rReq, GetBasicManager() );
+ break;
+ }
+
+ case SID_SAVEDOC:
+ {
+ //!! detaillierte Auswertung eines Fehlercodes
+ SfxObjectShellRef xLock( this );
+ SfxErrorContext aEc(ERRCTX_SFX_SAVEDOC,GetTitle());
+ SFX_APP()->NotifyEvent(SfxEventHint(SFX_EVENT_SAVEDOC,this));
+
+ BOOL bOk = Save_Impl( rReq.GetArgs() );
+
+ ULONG lErr=GetErrorCode();
+ if( !lErr && !bOk )
+ lErr=ERRCODE_IO_GENERAL;
+
+ if ( lErr && bOk )
+ {
+ SFX_REQUEST_ARG( rReq, pWarnItem, SfxBoolItem, SID_FAIL_ON_WARNING, FALSE);
+ if ( pWarnItem && pWarnItem->GetValue() )
+ bOk = FALSE;
+ }
+
+ if( !ErrorHandler::HandleError( lErr ) )
+ SFX_APP()->NotifyEvent( SfxEventHint( SFX_EVENT_SAVEFINISHED, this ) );
+ ResetError();
+
+ rReq.SetReturnValue( SfxBoolItem(0, bOk) );
+ if ( bOk )
+ SFX_APP()->NotifyEvent(SfxEventHint(SFX_EVENT_SAVEDOCDONE,this));
+ break;
+ }
+
+ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ case SID_UPDATEDOC:
+ {
+ return;
+ }
+
+ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ case SID_DOCINFO:
+ {
+ SFX_REQUEST_ARG(rReq, pDocInfItem, SfxDocumentInfoItem, SID_DOCINFO, FALSE);
+
+ // keine Parameter vorhanden?
+ if ( !pDocInfItem )
+ {
+ // Dialog ausf"uhren
+ SfxDocumentInfo *pOldInfo = new SfxDocumentInfo;
+ if ( pImp->pDocInfo )
+ // r/o-flag korrigieren falls es zu frueh gesetzt wurde
+ pImp->pDocInfo->SetReadOnly( IsReadOnly() );
+ *pOldInfo = GetDocInfo();
+ DocInfoDlg_Impl( GetDocInfo() );
+
+ // ge"andert?
+ if( !(*pOldInfo == GetDocInfo()) )
+ {
+ // Dokument gilt als ver"andert
+ FlushDocInfo();
+ rReq.Done();
+ }
+ else
+ rReq.Ignore();
+
+ delete pOldInfo;
+ }
+ else
+ {
+ // DocInfo aus Parameter anwenden
+ GetDocInfo() = (*pDocInfItem)();
+ FlushDocInfo();
+ }
+
+ return;
+ }
+
+ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ case SID_SAVEASURL:
+ case SID_SAVEASDOC:
+ {
+ //!! detaillierte Auswertung eines Fehlercodes
+ SfxObjectShellRef xLock( this );
+ SfxErrorContext aEc(ERRCTX_SFX_SAVEASDOC,GetTitle());
+ SFX_APP()->NotifyEvent(SfxEventHint(SFX_EVENT_SAVEASDOC,this));
+
+ // Bei Calls "uber StarOne OverWrite-Status checken
+ SFX_REQUEST_ARG( rReq, pOverwriteItem, SfxBoolItem, SID_OVERWRITE, FALSE );
+ if ( pOverwriteItem )
+ {
+ // because there is no "exist" function, the overwrite handling is done in the SfxMedium
+ INetURLObject aURL;
+ aURL.SetSmartProtocol( INET_PROT_FILE );
+ SFX_REQUEST_ARG( rReq, pItem, SfxStringItem, SID_FILE_NAME, FALSE );
+ if ( !pItem )
+ // In diesem Falle mu\s ein Dateiname mitkommen
+ SetError( ERRCODE_IO_INVALIDPARAMETER );
+ }
+
+ BOOL bWasReadonly = IsReadOnly();
+ BOOL bOk = SaveAs_Impl(nId == SID_SAVEASURL, &rReq);
+ ULONG lErr=GetErrorCode();
+ if ( !lErr && !bOk )
+ lErr=ERRCODE_IO_GENERAL;
+
+ if ( lErr && bOk )
+ {
+ SFX_REQUEST_ARG( rReq, pWarnItem, SfxBoolItem, SID_FAIL_ON_WARNING, FALSE );
+ if ( pWarnItem && pWarnItem->GetValue() )
+ bOk = FALSE;
+ }
+
+ if ( lErr!=ERRCODE_IO_ABORT )
+ ErrorHandler::HandleError(lErr);
+
+ ResetError();
+ rReq.SetReturnValue( SfxBoolItem(0, bOk) );
+ if ( bOk )
+ {
+ SFX_APP()->NotifyEvent(SfxEventHint(SFX_EVENT_SAVEASDOCDONE,this));
+
+ // Daten am Medium updaten
+ SfxItemSet *pSet = GetMedium()->GetItemSet();
+ pSet->ClearItem( SID_POSTSTRING );
+ pSet->ClearItem( SID_POSTLOCKBYTES );
+ pSet->ClearItem( SID_TEMPLATE );
+ pSet->ClearItem( SID_DOC_READONLY );
+ pSet->ClearItem( SID_CONTENTTYPE );
+ pSet->ClearItem( SID_CHARSET );
+ pSet->ClearItem( SID_FILTER_NAME );
+ pSet->ClearItem( SID_OPTIONS );
+ pSet->ClearItem( SID_FILE_FILTEROPTIONS );
+ pSet->ClearItem( SID_VERSION );
+ SFX_REQUEST_ARG( rReq, pFilterItem, SfxStringItem, SID_FILTER_NAME, FALSE );
+ if ( pFilterItem )
+ pSet->Put( *pFilterItem );
+ SFX_REQUEST_ARG( rReq, pOptionsItem, SfxStringItem, SID_OPTIONS, FALSE );
+ if ( pOptionsItem )
+ pSet->Put( *pOptionsItem );
+ SFX_REQUEST_ARG( rReq, pFilterOptItem, SfxStringItem, SID_FILE_FILTEROPTIONS, FALSE );
+ if ( pFilterOptItem )
+ pSet->Put( *pFilterOptItem );
+ if ( bWasReadonly )
+ Broadcast( SfxSimpleHint(SFX_HINT_MODECHANGED) );
+ }
+
+ Invalidate();
+ break;
+ }
+
+ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ case SID_CLOSEDOC:
+ {
+ if ( !rReq.IsAPI() )
+ {
+ SfxViewFrame *pFrame = GetFrame();
+ if ( pFrame && pFrame->GetFrame()->GetParentFrame() )
+ {
+ // Wenn SID_CLOSEDOC "uber Menue etc. ausgef"uhrt wird, das
+ // aktuelle Dokument aber in einem Frame liegt, soll eigentlich
+ // das FrameSetDocument geclosed werden
+ pFrame->GetTopViewFrame()->GetObjectShell()->ExecuteSlot( rReq );
+ return;
+ }
+
+ BOOL bInFrameSet = FALSE;
+ pFrame = SfxViewFrame::GetFirst( this );
+ while ( pFrame )
+ {
+ if ( pFrame->GetFrame()->GetParentFrame() )
+ {
+ // Auf dieses Dokument existiert noch eine Sicht, die
+ // in einem FrameSet liegt; diese darf nat"urlich nicht
+ // geclosed werden
+ bInFrameSet = TRUE;
+ }
+
+ pFrame = SfxViewFrame::GetNext( *pFrame, this );
+ }
+
+ if ( bInFrameSet )
+ {
+ // Alle Sichten, die nicht in einem FrameSet liegen, closen
+ pFrame = SfxViewFrame::GetFirst( this );
+ while ( pFrame )
+ {
+ if ( !pFrame->GetFrame()->GetParentFrame() )
+ pFrame->GetFrame()->DoClose();
+ pFrame = SfxViewFrame::GetNext( *pFrame, this );
+ }
+ }
+ }
+
+ // Parameter auswerten
+ SFX_REQUEST_ARG(rReq, pSaveItem, SfxBoolItem, SID_CLOSEDOC_SAVE, FALSE);
+ SFX_REQUEST_ARG(rReq, pNameItem, SfxStringItem, SID_CLOSEDOC_FILENAME, FALSE);
+ if ( pSaveItem )
+ {
+ if ( pSaveItem->GetValue() )
+ {
+ if ( !pNameItem )
+ {
+ SbxBase::SetError( SbxERR_WRONG_ARGS );
+ rReq.Ignore();
+ return;
+ }
+ SfxAllItemSet aArgs( GetPool() );
+ SfxStringItem aTmpItem( SID_FILE_NAME, pNameItem->GetValue() );
+ aArgs.Put( aTmpItem, aTmpItem.Which() );
+ SfxRequest aSaveAsReq( SID_SAVEASDOC, SFX_CALLMODE_API, aArgs );
+ ExecFile_Impl( aSaveAsReq );
+ if ( !aSaveAsReq.IsDone() )
+ {
+ rReq.Ignore();
+ return;
+ }
+ }
+ else
+ SetModified(FALSE);
+ }
+ else if ( rReq.IsAPI() )
+ {
+ SbxBase::SetError( SbxERR_WRONG_ARGS );
+ rReq.Ignore();
+ return;
+ }
+
+ // Benutzer bricht ab?
+ if ( !PrepareClose( !rReq.IsAPI() ) )
+ {
+ rReq.SetReturnValue( SfxBoolItem(0, FALSE) );
+ rReq.Done();
+ return;
+ }
+
+ ULONG lErr = GetErrorCode();
+ ErrorHandler::HandleError(lErr);
+
+ rReq.SetReturnValue( SfxBoolItem(0, TRUE) );
+ rReq.Done();
+ rReq.ReleaseArgs(); // da der Pool in Close zerst"ort wird
+ if ( rReq.IsAPI() )
+ // falls Handler eines Controls dies ruft, sonst GPF nach return
+ {
+ if( !pImp->pCloser )
+ {
+
+ if ( pPendingCloser )
+ pPendingCloser->ForcePendingCall();
+ pImp->pCloser = new AsynchronLink(
+ Link( 0, SfxObjectShellClose_Impl ) );
+ pImp->pCloser->Call( this );
+ pPendingCloser = pImp->pCloser;
+ }
+ }
+ else
+ DoClose();
+ return;
+ }
+
+ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ case SID_DOCTEMPLATE:
+ {
+ // speichern als Dokumentvorlagen
+ SfxDocumentTemplateDlg *pDlg = 0;
+ SfxErrorContext aEc(ERRCTX_SFX_DOCTEMPLATE,GetTitle());
+ SfxDocumentTemplates *pTemplates = new SfxDocumentTemplates;
+ pTemplates->Construct();
+
+ if ( !rReq.GetArgs() )
+ {
+ pDlg = new SfxDocumentTemplateDlg(0, pTemplates);
+ if ( RET_OK == pDlg->Execute() && pDlg->GetTemplateName().Len())
+ {
+ rReq.AppendItem(SfxStringItem(
+ SID_FILE_NAME, pTemplates->GetTemplatePath(
+ pDlg->GetRegion(),
+ pDlg->GetTemplateName())));
+
+ rReq.AppendItem(SfxStringItem(
+ SID_TEMPLATE_NAME, pDlg->GetTemplateName()));
+ rReq.AppendItem(SfxUInt16Item(
+ SID_TEMPLATE_REGION, pDlg->GetRegion()));
+ }
+ else
+ {
+ delete pDlg;
+ rReq.Ignore();
+ return;
+ }
+ }
+
+ // Region und Name aus Parameter holen
+ SFX_REQUEST_ARG(rReq, pRegionItem, SfxStringItem, SID_TEMPLATE_REGIONNAME, FALSE);
+ SFX_REQUEST_ARG(rReq, pNameItem, SfxStringItem, SID_TEMPLATE_NAME, FALSE);
+ SFX_REQUEST_ARG(rReq, pRegionNrItem, SfxUInt16Item, SID_TEMPLATE_REGION, FALSE);
+ if ( (!pRegionItem && !pRegionNrItem ) || !pNameItem )
+ {
+ DBG_ASSERT( rReq.IsAPI(), "non-API call without Arguments" );
+ SbxBase::SetError( SbxERR_WRONG_ARGS );
+ rReq.Ignore();
+ return;
+ }
+ String aTemplateName = pNameItem->GetValue();
+
+ // Region-Nr besorgen
+ USHORT nRegion;
+ if( pRegionItem )
+ {
+ // Region-Name finden (eigentlich nicht unbedingt eindeutig)
+ nRegion = pTemplates->GetRegionNo( pRegionItem->GetValue() );
+ if ( nRegion == USHRT_MAX )
+ {
+ SbxBase::SetError( ERRCODE_IO_INVALIDPARAMETER );
+ rReq.Ignore();
+ return;
+ }
+ }
+ if ( pRegionNrItem )
+ nRegion = pRegionNrItem->GetValue();
+
+ // kein File-Name angegeben?
+ if ( SFX_ITEM_SET != rReq.GetArgs()->GetItemState( SID_FILE_NAME ) )
+ {
+ // TemplatePath nicht angebgeben => aus Region+Name ermitteln
+ // Dateiname zusammenbauen lassen
+ String aTemplPath = pTemplates->GetTemplatePath(
+ nRegion, aTemplateName );
+ rReq.AppendItem(
+ SfxStringItem(SID_FILE_NAME, aTemplPath) );
+ rReq.AppendItem( SfxStringItem(SID_FILE_NAME, aTemplPath) );
+ }
+
+
+ // Dateiname
+ SFX_REQUEST_ARG(rReq, pFileItem, SfxStringItem, SID_FILE_NAME, FALSE);
+ const String aFileName(((const SfxStringItem *)pFileItem)->GetValue());
+
+ // Filter
+ const SfxFilter* pFilter;
+ const SfxObjectFactory& rFactory = GetFactory();
+ USHORT nFilterCount = rFactory.GetFilterCount();
+ int n;
+ for( n=0; n<nFilterCount; n++)
+ {
+ pFilter = rFactory.GetFilter( n );
+ if( pFilter && pFilter->IsOwnFormat() &&
+ pFilter->IsOwnTemplateFormat() )
+ break;
+ }
+ DBG_ASSERT( n < nFilterCount && pFilter, "Template Filter nicht gefunden" );
+ if( !pFilter || n == nFilterCount )
+ pFilter = rFactory.GetFilter(0);
+
+ // Medium zusammenbauen
+ SfxItemSet* pSet = new SfxAllItemSet( *rReq.GetArgs() );
+ pSet->Put( SfxStringItem( SID_DOCTEMPLATE, aTemplateName ) );
+ SfxMedium aMedium( aFileName, STREAM_STD_READWRITE | STREAM_TRUNC,
+ FALSE, FALSE, pFilter, pSet);
+
+ // als Vorlage speichern
+ BOOL bModified = IsModified();
+ BOOL bHasTemplateConfig = HasTemplateConfig();
+ SetTemplateConfig( FALSE );
+ BOOL bOK = FALSE;
+ const String aOldURL( INetURLObject::GetBaseURL() );
+ if( ShallSetBaseURL_Impl( aMedium ) )
+ INetURLObject::SetBaseURL(
+ aMedium.GetURLObject().GetMainURL() );
+ else
+ INetURLObject::SetBaseURL( String() );
+
+ aMedium.CreateTempFile();
+
+ // Because we can't save into a storage directly ( only using tempfile ), we must save the DocInfo first, then
+ // we can call SaveTo_Impl and Commit
+ if ( pFilter->UsesStorage() )
+ {
+ SfxDocumentInfo *pInfo = new SfxDocumentInfo;
+ pInfo->CopyUserData(GetDocInfo());
+ pInfo->SetTitle( aTemplateName );
+ pInfo->SetChanged( SfxStamp(SFX_INIMANAGER()->GetUserFullName()));
+ SvStorageRef aRef = aMedium.GetStorage();
+ if ( aRef.Is() )
+ {
+ pInfo->SetTime(0L);
+ pInfo->Save(aRef);
+ }
+
+ delete pInfo;
+ }
+
+ if ( SaveTo_Impl(aMedium) )
+ {
+ bOK = TRUE;
+ aMedium.Commit();
+ pTemplates->NewTemplate( nRegion, aTemplateName, aFileName );
+ }
+
+ INetURLObject::SetBaseURL( aOldURL );
+
+ DELETEX(pDlg);
+
+ SetError(aMedium.GetErrorCode());
+ ULONG lErr=GetErrorCode();
+ if(!lErr && !bOK)
+ lErr=ERRCODE_IO_GENERAL;
+ ErrorHandler::HandleError(lErr);
+ ResetError();
+ delete pTemplates;
+ HACK(warum qualifiziert? SfxObjectShell::) DoSaveCompleted();
+ SetTemplateConfig( bHasTemplateConfig );
+ SetModified(bModified);
+ rReq.SetReturnValue( SfxBoolItem( 0, bOK ) );
+ if ( !bOK )
+ return;
+ break;
+ }
+ }
+
+ // Picklisten-Eintrag verhindern
+ if ( rReq.IsAPI() )
+ GetMedium()->SetUpdatePickList( FALSE );
+ else if ( rReq.GetArgs() )
+ {
+ SFX_ITEMSET_GET( *rReq.GetArgs(), pPicklistItem, SfxBoolItem, SID_PICKLIST, FALSE );
+ if ( pPicklistItem )
+ GetMedium()->SetUpdatePickList( pPicklistItem->GetValue() );
+ }
+
+ // Ignore()-Zweige haben schon returnt
+ rReq.Done();
+}
+
+//--------------------------------------------------------------------
+
+void SfxObjectShell::GetState_Impl(SfxItemSet &rSet)
+{
+ DBG_CHKTHIS(SfxObjectShell, 0);
+ SfxWhichIter aIter( rSet );
+ SfxInPlaceObject *pObj=GetInPlaceObject();
+ for ( USHORT nWhich = aIter.FirstWhich(); nWhich; nWhich = aIter.NextWhich() )
+ {
+ switch ( nWhich )
+ {
+ case SID_DOCTEMPLATE :
+ {
+ if ( !GetFactory().GetTemplateFilter() )
+ rSet.DisableItem( nWhich );
+ break;
+ }
+
+ case SID_VERSION:
+ {
+ SfxObjectShell *pDoc = this;
+ SfxViewFrame* pFrame = GetFrame();
+ if ( !pFrame )
+ pFrame = SfxViewFrame::GetFirst( this );
+ if ( pFrame )
+ {
+ if ( pFrame->GetFrame()->GetParentFrame() )
+ {
+ pFrame = pFrame->GetTopViewFrame();
+ pDoc = pFrame->GetObjectShell();
+ }
+ }
+
+ if ( !pFrame || !pDoc->HasName() ||
+ !IsOwnStorageFormat_Impl( *pDoc->GetMedium() ) ||
+ pDoc->GetMedium()->GetStorage()->GetVersion() < SOFFICE_FILEFORMAT_50 )
+ rSet.DisableItem( nWhich );
+ break;
+ }
+ case SID_SAVEDOC:
+ case SID_UPDATEDOC:
+ if (pObj && pObj->GetProtocol().IsEmbed())
+ {
+ String aEntry (SfxResId(STR_UPDATEDOC));
+ aEntry += ' ';
+ aEntry += GetInPlaceObject()->GetDocumentName();
+ rSet.Put(SfxStringItem(nWhich, aEntry));
+ }
+ else
+ {
+ BOOL bMediumRO = IsReadOnlyMedium();
+ if ( !bMediumRO && GetMedium() && IsModified() )
+ rSet.Put(SfxStringItem(
+ nWhich, String(SfxResId(STR_SAVEDOC))));
+ else
+ rSet.DisableItem(nWhich);
+ }
+ break;
+
+ case SID_DOCINFO:
+ if ( 0 != ( pImp->eFlags & SFXOBJECTSHELL_NODOCINFO ) )
+ rSet.DisableItem( nWhich );
+ else
+ rSet.Put( SfxDocumentInfoItem( GetTitle(), GetDocInfo() ) );
+ break;
+
+ case SID_CLOSEDOC:
+ {
+ SfxObjectShell *pDoc = this;
+ SfxViewFrame *pFrame = GetFrame();
+ if ( pFrame && pFrame->GetFrame()->GetParentFrame() )
+ {
+ // Wenn SID_CLOSEDOC "uber Menue etc. ausgef"uhrt wird, das
+ // aktuelle Dokument aber in einem Frame liegt, soll eigentlich
+ // das FrameSetDocument geclosed werden
+ pDoc = pFrame->GetTopViewFrame()->GetObjectShell();
+ }
+
+ if ( pDoc->GetFlags() & SFXOBJECTSHELL_DONTCLOSE )
+ rSet.DisableItem(nWhich);
+ else if ( pObj && pObj->GetProtocol().IsEmbed() )
+ {
+ String aEntry (SfxResId(STR_CLOSEDOC_ANDRETURN));
+ aEntry += pObj->GetDocumentName();
+ rSet.Put( SfxStringItem(nWhich, aEntry) );
+ }
+ else
+ rSet.Put(SfxStringItem(nWhich, String(SfxResId(STR_CLOSEDOC))));
+ break;
+ }
+
+ case SID_SAVEASDOC:
+ {
+ if( ( pImp->nLoadedFlags & SFX_LOADED_MAINDOCUMENT ) != SFX_LOADED_MAINDOCUMENT )
+ {
+ rSet.DisableItem( nWhich );
+ break;
+ }
+
+ if ( !GetMedium() )
+ rSet.DisableItem(nWhich);
+ else if ( pObj && pObj->GetProtocol().IsEmbed() )
+ rSet.Put( SfxStringItem( nWhich, String( SfxResId( STR_SAVECOPYDOC ) ) ) );
+ else
+ rSet.Put( SfxStringItem( nWhich, String( SfxResId( STR_SAVEASDOC ) ) ) );
+ break;
+ }
+
+ case SID_DOC_MODIFIED:
+ {
+ rSet.Put( SfxStringItem( SID_DOC_MODIFIED, IsModified() ? '*' : ' ' ) );
+ break;
+ }
+
+ case SID_MODIFIED:
+ {
+ rSet.Put( SfxBoolItem( SID_MODIFIED, IsModified() ) );
+ break;
+ }
+
+ case SID_DOCINFO_TITLE:
+ {
+ rSet.Put( SfxStringItem(
+ SID_DOCINFO_TITLE, GetDocInfo().GetTitle() ) );
+ break;
+ }
+ case SID_FILE_NAME:
+ {
+ if( GetMedium() && HasName() )
+ rSet.Put( SfxStringItem(
+ SID_FILE_NAME, GetMedium()->GetName() ) );
+ break;
+ }
+ }
+ }
+}
+
+//--------------------------------------------------------------------
+
+void SfxObjectShell::ExecProps_Impl(SfxRequest &rReq)
+{
+ switch ( rReq.GetSlot() )
+ {
+ case SID_MODIFIED:
+ {
+ SetModified( ( (SfxBoolItem&) rReq.GetArgs()->Get(SID_MODIFIED)).GetValue() );
+ rReq.Done();
+ break;
+ }
+
+ case SID_DOCTITLE:
+ SetTitle( ( (SfxStringItem&) rReq.GetArgs()->Get(SID_DOCTITLE)).GetValue() );
+ rReq.Done();
+ break;
+
+ case SID_ON_CREATEDOC:
+ case SID_ON_OPENDOC:
+ case SID_ON_PREPARECLOSEDOC:
+ case SID_ON_CLOSEDOC:
+ case SID_ON_SAVEDOC:
+ case SID_ON_SAVEASDOC:
+ case SID_ON_ACTIVATEDOC:
+ case SID_ON_DEACTIVATEDOC:
+ case SID_ON_PRINTDOC:
+ case SID_ON_SAVEDOCDONE:
+ case SID_ON_SAVEASDOCDONE:
+ SFX_APP()->EventExec_Impl( rReq, this );
+ break;
+
+ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ case SID_PLAYMACRO:
+ {
+ SFX_APP()->PlayMacro_Impl( rReq, GetBasic() );
+ break;
+ }
+
+ case SID_DOCINFO_AUTHOR :
+ {
+ String aStr = ( (SfxStringItem&)rReq.GetArgs()->Get(rReq.GetSlot())).GetValue();
+ SfxStamp aStamp( GetDocInfo().GetCreated() );
+ aStamp.SetName( aStr );
+ GetDocInfo().SetCreated( aStamp );
+ break;
+ }
+
+ case SID_DOCINFO_COMMENTS :
+ {
+ String aStr = ( (SfxStringItem&)rReq.GetArgs()->Get(rReq.GetSlot())).GetValue();
+ GetDocInfo().SetComment( aStr );
+ break;
+ }
+
+ case SID_DOCINFO_KEYWORDS :
+ {
+ String aStr = ( (SfxStringItem&)rReq.GetArgs()->Get(rReq.GetSlot())).GetValue();
+ GetDocInfo().SetKeywords( aStr );
+ break;
+ }
+ }
+}
+
+//--------------------------------------------------------------------
+
+void SfxObjectShell::StateProps_Impl(SfxItemSet &rSet)
+{
+ SfxWhichIter aIter(rSet);
+ for ( USHORT nSID = aIter.FirstWhich(); nSID; nSID = aIter.NextWhich() )
+ {
+ switch ( nSID )
+ {
+ case SID_DOCINFO_AUTHOR :
+ {
+ String aStr = GetDocInfo().GetCreated().GetName();
+ rSet.Put( SfxStringItem( nSID, aStr ) );
+ break;
+ }
+
+ case SID_DOCINFO_COMMENTS :
+ {
+ String aStr = GetDocInfo().GetComment();
+ rSet.Put( SfxStringItem( nSID, aStr ) );
+ break;
+ }
+
+ case SID_DOCINFO_KEYWORDS :
+ {
+ String aStr = GetDocInfo().GetKeywords();
+ rSet.Put( SfxStringItem( nSID, aStr ) );
+ break;
+ }
+
+ case SID_DOCPATH:
+ {
+ String aPath;
+ if ( GetMedium() )
+ {
+ INetURLObject aURL( GetMedium()->GetName() );
+ if ( INET_PROT_FILE == aURL.GetProtocol() )
+ aURL.removeSegment();
+ aPath = aURL.PathToFileName();
+ }
+ rSet.Put( SfxStringItem( SID_DOCPATH, aPath ) );
+ break;
+ }
+
+ case SID_DOCFULLNAME:
+ {
+ rSet.Put( SfxStringItem( SID_DOCFULLNAME, GetTitle(SFX_TITLE_FULLNAME) ) );
+ break;
+ }
+
+ case SID_DOCTITLE:
+ {
+ rSet.Put( SfxStringItem( SID_DOCTITLE, GetTitle() ) );
+ break;
+ }
+
+ case SID_DOC_READONLY:
+ {
+ rSet.Put( SfxBoolItem( SID_DOC_READONLY, IsReadOnly() ) );
+ break;
+ }
+
+ case SID_DOC_SAVED:
+ {
+ rSet.Put( SfxBoolItem( SID_DOC_SAVED, !IsModified() ) );
+ break;
+ }
+
+ case SID_CLOSING:
+ {
+ rSet.Put( SfxBoolItem( SID_CLOSING, Get_Impl()->bInCloseEvent ) );
+ break;
+ }
+
+ case SID_THISDOCUMENT:
+ {
+ rSet.Put( SfxObjectItem( SID_THISDOCUMENT, this ) );
+ break;
+ }
+
+ case SID_THISWINDOW:
+ {
+ rSet.Put( SfxObjectItem( SID_THISWINDOW, SfxViewFrame::GetFirst(this) ) );
+ break;
+ }
+
+ case SID_ON_CREATEDOC:
+ case SID_ON_OPENDOC:
+ case SID_ON_PREPARECLOSEDOC:
+ case SID_ON_CLOSEDOC:
+ case SID_ON_SAVEDOC:
+ case SID_ON_SAVEASDOC:
+ case SID_ON_ACTIVATEDOC:
+ case SID_ON_DEACTIVATEDOC:
+ case SID_ON_PRINTDOC:
+ case SID_ON_SAVEDOCDONE:
+ case SID_ON_SAVEASDOCDONE:
+ SFX_APP()->EventState_Impl( nSID, rSet, this );
+ break;
+
+ case SID_DOC_LOADING:
+ rSet.Put( SfxBoolItem( nSID, SFX_LOADED_MAINDOCUMENT !=
+ ( pImp->nLoadedFlags & SFX_LOADED_MAINDOCUMENT ) ) );
+ break;
+
+ case SID_IMG_LOADING:
+ rSet.Put( SfxBoolItem( nSID, SFX_LOADED_IMAGES !=
+ ( pImp->nLoadedFlags & SFX_LOADED_IMAGES ) ) );
+ break;
+
+ case SID_ACTIVEMODULE:
+ {
+ SfxShell *pSh = GetModule();
+ if ( !pSh )
+ pSh = this;
+ rSet.Put( SfxObjectItem( SID_ACTIVEMODULE, pSh ) );
+ break;
+ }
+ }
+ }
+}
+
+//--------------------------------------------------------------------
+
+void SfxObjectShell::ExecView_Impl(SfxRequest &rReq)
+{
+ switch ( rReq.GetSlot() )
+ {
+ case SID_ACTIVATE:
+ {
+ SfxViewFrame *pFrame =
+ SfxViewFrame::GetFirst( this, TYPE(SfxTopViewFrame), TRUE );
+ if ( pFrame )
+ pFrame->GetFrame()->Appear();
+ rReq.SetReturnValue( SfxObjectItem( 0, pFrame ) );
+ rReq.Done();
+ break;
+ }
+ case SID_NEWWINDOWFOREDIT:
+ {
+ SfxViewFrame* pFrame = SfxViewFrame::Current();
+ if( pFrame->GetObjectShell() == this &&
+ ( pFrame->GetFrameType() & SFXFRAME_HASTITLE ) )
+ pFrame->ExecuteSlot( rReq );
+ else
+ {
+ String aFileName( GetObjectShell()->GetMedium()->GetName() );
+ if ( aFileName.Len() )
+ {
+ SfxStringItem aName( SID_FILE_NAME, aFileName );
+ SfxBoolItem aCreateView( SID_OPEN_NEW_VIEW, TRUE );
+ SFX_APP()->GetAppDispatcher_Impl()->Execute(
+ SID_OPENDOC, SFX_CALLMODE_ASYNCHRON, &aName,
+ &aCreateView, 0L);
+ }
+ }
+ }
+ }
+}
+
+//--------------------------------------------------------------------
+
+void SfxObjectShell::StateView_Impl(SfxItemSet &rSet)
+{
+}
+
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
new file mode 100644
index 000000000000..88d97cacf076
--- /dev/null
+++ b/sfx2/source/doc/objstor.cxx
@@ -0,0 +1,2044 @@
+/*************************************************************************
+ *
+ * $RCSfile: objstor.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:32 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _MSGBOX_HXX //autogen
+#include <vcl/msgbox.hxx>
+#endif
+#ifndef _SFXENUMITEM_HXX //autogen
+#include <svtools/eitem.hxx>
+#endif
+#ifndef _SFXSTRITEM_HXX //autogen
+#include <svtools/stritem.hxx>
+#endif
+#ifndef _SVSTOR_HXX //autogen
+#include <so3/svstor.hxx>
+#endif
+#ifndef _EXTATTR_HXX //autogen
+#include <svtools/extattr.hxx>
+#endif
+#ifndef _ZCODEC_HXX //autogen
+#include <tools/zcodec.hxx>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XSTORABLE_HPP_
+#include <com/sun/star/frame/XStorable.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XMODEL_HPP_
+#include <com/sun/star/frame/XModel.hpp>
+#endif
+#ifndef _COM_SUN_STAR_IO_DATATRANSFEREVENT_HPP_
+#include <com/sun/star/io/DataTransferEvent.hpp>
+#endif
+#ifndef _COM_SUN_STAR_IO_XDATAIMPORTER_HPP_
+#include <com/sun/star/io/XDataImporter.hpp>
+#endif
+#ifndef _COM_SUN_STAR_IO_XDATATRANSFEREVENTLISTENER_HPP_
+#include <com/sun/star/io/XDataTransferEventListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_IO_XDATAEXPORTER_HPP_
+#include <com/sun/star/io/XDataExporter.hpp>
+#endif
+#ifndef _SFXECODE_HXX
+#include <svtools/sfxecode.hxx>
+#endif
+#pragma hdrstop
+
+#ifndef _CPPUHELPER_WEAK_HXX_
+#include <cppuhelper/weak.hxx>
+#endif
+#ifndef _UNOTOOLS_PROCESSFACTORY_HXX_
+#include <unotools/processfactory.hxx>
+#endif
+
+#ifndef _SO_CLSIDS_HXX
+#include <so3/clsids.hxx>
+#endif
+#ifndef _CACHESTR_HXX
+#include <tools/cachestr.hxx>
+#endif
+
+#include "objsh.hxx"
+#include "childwin.hxx"
+#include "inimgr.hxx"
+#include "sfxdir.hxx"
+#include "request.hxx"
+#include "saveopt.hxx"
+#include "sfxresid.hxx"
+#include "iodlg.hxx"
+#include "docfile.hxx"
+#include "fltfnc.hxx"
+#include "docfilt.hxx"
+#include "docinf.hxx"
+#include "docfac.hxx"
+#include "cfgmgr.hxx"
+#include "objshimp.hxx"
+#include "sfxtypes.hxx"
+#include "appdata.hxx"
+#include "doc.hrc"
+#include "sfxsids.hrc"
+#include "interno.hxx"
+#include "module.hxx"
+#include "dispatch.hxx"
+#include "openflag.hxx"
+#include "helper.hxx"
+
+#define S2BS(s) ByteString( s, RTL_TEXTENCODING_MS_1252 )
+
+class DataTransferEventListener_Impl : public ::com::sun::star::io::XDataTransferEventListener ,
+ public ::com::sun::star::lang::XTypeProvider ,
+ public ::cppu::OWeakObject
+{
+private:
+ SfxObjectShellRef xDoc;
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xTransfer;
+
+public:
+ SFX_DECL_XINTERFACE_XTYPEPROVIDER
+
+ DataTransferEventListener_Impl( SfxObjectShell *pDoc, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & xRef )
+ : xDoc( pDoc )
+ , xTransfer( xRef )
+ {}
+
+ ~DataTransferEventListener_Impl();
+
+ void Finish();
+ virtual void SAL_CALL finished(const ::com::sun::star::io::DataTransferEvent& aEvent) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL cancelled(const ::com::sun::star::io::DataTransferEvent& aEvent) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL disposing(const ::com::sun::star::lang::EventObject &) throw( ::com::sun::star::uno::RuntimeException );
+};
+
+SFX_IMPL_XINTERFACE_2( DataTransferEventListener_Impl, OWeakObject, ::com::sun::star::io::XDataTransferEventListener, ::com::sun::star::lang::XEventListener )
+SFX_IMPL_XTYPEPROVIDER_2( DataTransferEventListener_Impl, ::com::sun::star::io::XDataTransferEventListener, ::com::sun::star::lang::XEventListener )
+
+void DataTransferEventListener_Impl::Finish()
+{
+ if ( xDoc.Is() )
+ {
+ if ( !xDoc->Get_Impl()->nLoadedFlags )
+ xDoc->FinishedLoading();
+ xDoc.Clear();
+ }
+
+ xTransfer = ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > ();
+}
+
+DataTransferEventListener_Impl::~DataTransferEventListener_Impl()
+{
+ Finish();
+}
+
+void SAL_CALL DataTransferEventListener_Impl::disposing(const ::com::sun::star::lang::EventObject &) throw( ::com::sun::star::uno::RuntimeException )
+{
+ Finish();
+}
+
+void SAL_CALL DataTransferEventListener_Impl::finished(const ::com::sun::star::io::DataTransferEvent& aEvent) throw( ::com::sun::star::uno::RuntimeException )
+{
+ Finish();
+}
+
+void SAL_CALL DataTransferEventListener_Impl::cancelled(const ::com::sun::star::io::DataTransferEvent& aEvent) throw( ::com::sun::star::uno::RuntimeException )
+{
+ Finish();
+}
+
+extern sal_uInt32 CheckPasswd_Impl( Window*, SfxItemPool&, SfxMedium* );
+
+//=========================================================================
+
+sal_Bool ShallSetBaseURL_Impl( SfxMedium &rMed )
+{
+ SfxOptions &rOpt = SFX_APP()->GetOptions();
+ sal_Bool bIsRemote = rMed.IsRemote();
+ return rOpt.IsSaveRelINet() && bIsRemote ||
+ rOpt.IsSaveRelFSys() && !bIsRemote;
+}
+
+//=========================================================================
+
+sal_Bool SfxObjectShell::Save()
+{
+ return SaveInfoAndConfig_Impl( GetMedium()->GetStorage() );
+}
+
+//--------------------------------------------------------------------------
+
+sal_Bool SfxObjectShell::SaveAs( SvStorage* pNewStg )
+{
+ return SaveInfoAndConfig_Impl( pNewStg );
+}
+
+//-------------------------------------------------------------------------
+
+sal_Bool GetPasswd_Impl( const SfxItemSet* pSet, String& rPasswd )
+{
+ const SfxPoolItem* pItem = NULL;
+ if ( pSet && SFX_ITEM_SET == pSet->GetItemState( SID_PASSWORD, sal_True, &pItem ) )
+ {
+ DBG_ASSERT( pItem->IsA( TYPE(SfxStringItem) ), "wrong item type" );
+ rPasswd = ( (const SfxStringItem*)pItem )->GetValue();
+ return sal_True;
+ }
+ return sal_False;
+}
+
+//-------------------------------------------------------------------------
+sal_Bool SfxObjectShell::DoInitNew_Impl( const String& rName )
+
+/* [Beschreibung]
+*/
+
+{
+ if ( rName.Len() )
+ {
+ ModifyBlocker_Impl aBlock( this );
+ pMedium = new SfxMedium( rName, SFX_STREAM_READONLY_MAKECOPY, sal_False );
+ if ( InitNew( pMedium->GetStorage() ) )
+ {
+ bIsTmp = !( pMedium->GetStorage() );
+ if ( SFX_CREATE_MODE_EMBEDDED == eCreateMode )
+ SetTitle( String( SfxResId( STR_NONAME ) ));
+ return sal_True;
+ }
+ return sal_False;
+ }
+ else
+ return DoInitNew(0);
+}
+
+
+sal_Bool SfxObjectShell::DoInitNew( SvStorage * pStor )
+
+/* [Beschreibung]
+
+ Diese von SvPersist geerbte virtuelle Methode wird gerufen, um
+ die SfxObjectShell-Instanz aus einem Storage (pStor != 0) bzw.
+ (pStor == 0) ganz neu zu initialisieren.
+
+ Wie alle Do...-Methoden liegt hier eine Steuerung vor, die eigentliche
+ Implementierung erfolgt, indem die ebenfalls virtuellen Methode
+ InitNew(SvStorate*) von der SfxObjectShell-Subclass implementiert wird.
+
+ F"ur pStor == 0 wird ein die SfxObjectShell-Instanz mit einem leeren
+ SfxMedium verbunden, sonst mit einem SfxMedium, welches auf den
+ als Parameter "ubergeben SvStorage verweist.
+
+ Erst nach InitNew() oder Load() ist das Objekt korrekt initialisiert.
+
+ [R"uckgabewert]
+ sal_True Das Objekt wurde initialisiert.
+ sal_False Das Objekt konnte nicht initialisiert werden
+*/
+
+{
+ ModifyBlocker_Impl aBlock( this );
+ if ( pStor )
+ pMedium = new SfxMedium( pStor );
+ else
+ {
+ bIsTmp = sal_True;
+ pMedium = new SfxMedium;
+ }
+
+ if ( InitNew( pStor ) )
+ {
+ if ( SFX_CREATE_MODE_EMBEDDED == eCreateMode )
+ SetTitle( String( SfxResId( STR_NONAME ) ));
+ return sal_True;
+ }
+ return sal_False;
+}
+
+//-------------------------------------------------------------------------
+
+void SfxObjectShell::DoHandsOff()
+
+/* [Beschreibung]
+
+ Diese von SvPersist geerbte virtuelle Methode wird gerufen, um
+ das Objekt aufzufordern, den ihm zugeteilten SvStorage freizugeben,
+ insbesondere Substorages und Streams zu schlie"sen.
+
+ Als Do...-Methode liegt hier nur die Steuerung. Der Implementierer
+ von Subclasses kann die ebenfalls virtuelle Methode HandsOff()
+ implementieren, um seine Substorages und Streams zu schlie"sen.
+
+ Nach dem Aufruf dieser Methode, ist dem Objekt kein SfxMedium mehr
+ zugeordnet, bis SaveCompleted() durchlaufen ist.
+*/
+
+{
+ const SfxFilter *pFilter = pMedium->GetFilter();
+ if( !pFilter || pFilter->IsOwnFormat() || ( pFilter->GetFilterFlags() & SFX_FILTER_PACKED ) )
+ HandsOff();
+ pMedium->Close();
+// DELETEZ( pMedium );
+}
+
+//-------------------------------------------------------------------------
+
+sal_Bool SfxObjectShell::DoLoad(
+ const String& rFileName, StreamMode nStreamMode, StorageMode nStorageMode)
+{
+ // Es wird nur die IPersistStorage-Schnittstelle angeboten
+ ModifyBlocker_Impl aBlock( this );
+ SvStorageRef xStor = new SvStorage( rFileName, nStreamMode | STREAM_WRITE, nStorageMode );
+ if( !xStor.Is() )
+ xStor = new SvStorage( rFileName, nStreamMode, nStorageMode );
+
+ if ( SVSTREAM_OK == xStor->GetError() )
+ {
+ SfxMedium* pMedium = new SfxMedium( xStor );
+ pMedium->SetName( rFileName );
+ pMedium->Init_Impl();
+
+ // Muss !!!
+ SetFileName( rFileName );
+
+ if( DoLoad( pMedium ) )
+ {
+ if ( SFX_CREATE_MODE_EMBEDDED == eCreateMode )
+ SetTitle( rFileName );
+ return sal_True;
+ }
+ }
+ return sal_False;
+}
+
+
+//-------------------------------------------------------------------------
+
+sal_Bool SfxObjectShell::DoLoad( SvStorage * pStor )
+
+/* [Beschreibung]
+
+ Diese von SvPersist geerbte virtuelle Methode steuert das Laden
+ des Objektes aus einem Storage. Dabei wird der SvStorage zun"achst
+ in einem SfxMedium verpackt und SfxObjectShell::DoLoad(SfxMedium*)
+ mit diesem gerufen.
+
+ [R"uckgabewert]
+ sal_True Das Objekt wurde initialisiert.
+ sal_False Das Objekt konnte nicht initialisiert werden
+*/
+
+{
+ pMedium = new SfxMedium( pStor );
+ if ( DoLoad(pMedium) )
+ {
+ if ( SFX_CREATE_MODE_EMBEDDED == eCreateMode )
+ {
+ ModifyBlocker_Impl aBlock( this );
+ // bei Embedded Objekten setzt sonst keiner den Namen
+// DBG_ASSERT( pStor->GetName().Len(),
+// "StorageName hat Laenge Null" );
+ SetTitle( pStor->GetName() );
+ }
+ return sal_True;
+ }
+
+ return sal_False;
+}
+
+//-------------------------------------------------------------------------
+
+sal_Bool SfxObjectShell::DoLoad( SfxMedium *pMed )
+
+/* [Beschreibung]
+
+ Diese Methode steuert das Laden des Objektes aus dem von dem
+ "ubergebenen SfxMedium beschriebenen Medium. Hinterher ist das Objekt
+ mit diesem SfxMedium verbunden.
+
+ Handelt es sich bei dem SfxMedium um einen Storage im eigenen Format,
+ wird die virtuelle Methode SvPersit::Load(SvStorage*) gerufen, welche
+ die Implementierer von Subclasses "uberladen m"ussen, um das Objekt
+ aus einem eigenen Storage zu laden (=> Swapping m"oeglich).
+
+ Handelt es sich bei dem SfxMedium um einen Storage in einem fremden
+ Format, oder um ein Flat-File, dann wird die virtuelle Methode
+ <SfxObjectShell::ConvertFrom(SfxMedium*)> gerufen, welche die
+ Implementierer von Subclasses "uberladen m"ussen, um das Objekt
+ aus dem SfxMedium zu konvertieren. W"ahrend der Bearbeitung ist
+ das Objekt dann mit einem tempor"aren SvStorage verbunden.
+
+ Erst nach InitNew() oder Load() ist das Objekt korrekt
+ initialisiert.
+
+ [R"uckgabewert]
+ sal_True Das Objekt wurde geladen.
+ sal_False Das Objekt konnte nicht geladen werden
+*/
+
+{
+ SfxApplication *pSfxApp = SFX_APP();
+ ModifyBlocker_Impl aBlock( this );
+
+ if ( SFX_CREATE_MODE_EMBEDDED != eCreateMode )
+ GetpApp()->ShowStatusText( SfxResId(STR_DOC_LOADING) );
+
+ pMedium = pMed;
+ sal_Bool bOk = sal_False;
+ const SfxFilter* pFilter = pMed->GetFilter();
+ SfxItemSet* pSet = pMedium->GetItemSet();
+ if( !pImp->nEventId )
+ {
+ SFX_ITEMSET_ARG(
+ pSet, pTemplateItem, SfxBoolItem,
+ SID_TEMPLATE, sal_False);
+ SFX_ITEMSET_ARG(
+ pSet, pBrowsingItem, SfxBoolItem, SID_BROWSING, sal_False );
+ SetActivateEvent_Impl(
+ ( pTemplateItem && pTemplateItem->GetValue() )
+ ? SFX_EVENT_CREATEDOC : SFX_EVENT_OPENDOC,
+ pBrowsingItem && pBrowsingItem->GetValue() );
+ }
+
+
+ SFX_ITEMSET_ARG( pSet, pBaseItem, SfxStringItem,
+ SID_BASEURL, sal_False);
+ String aBaseURL;
+ if( pBaseItem ) aBaseURL = pBaseItem->GetValue();
+ else
+ {
+ SFX_ITEMSET_ARG( pMedium->GetItemSet(), pSalvageItem, SfxStringItem, SID_DOC_SALVAGE, sal_False);
+ if( GetCreateMode() == SFX_CREATE_MODE_EMBEDDED )
+ {
+ aBaseURL = INetURLObject::GetBaseURL();
+ SetBaseURL( aBaseURL );
+ }
+ else if ( pSalvageItem )
+ {
+ INetURLObject aObj;
+ aObj.SetSmartProtocol( INET_PROT_FILE );
+ aObj.SetSmartURL( pMed->GetPhysicalName() );
+ aBaseURL = aObj.GetMainURL();
+ }
+ else
+ aBaseURL = pMed->GetName();
+ }
+
+ SfxApplication* pApp = SFX_APP();
+ pImp->nLoadedFlags = 0;
+ sal_Bool bProvidesData = pMedium->ProvidesData_Impl();
+ sal_Bool bHasStorage = !pFilter || ( pFilter->IsOwnFormat() && pFilter->UsesStorage() && !(pFilter->GetFilterFlags() & SFX_FILTER_PLUGIN ) );
+ if ( !bHasStorage && pFilter && ( pFilter->GetFilterFlags() & SFX_FILTER_PACKED ) )
+ {
+ bHasStorage = pMed->TryStorage();
+ if ( bHasStorage )
+ {
+ INetURLObject aObj;
+ aObj.SetSmartProtocol( INET_PROT_FILE );
+ aObj.SetSmartURL( pMed->GetPhysicalName() );
+ aBaseURL = aObj.GetMainURL();
+ }
+ }
+
+ if ( bHasStorage )
+ {
+ SvStorageRef xStor( pMed->GetStorage() );
+ // Undoobjekte aufraeumen, muss vor dem eigentlichen Laden erfolgen
+ if(xStor.Is() && !xStor->GetError() )
+ {
+ SvEmbeddedObjectRef xThis = this;
+ SvPersistRef xPer;
+ if ( xThis.Is() )
+ xPer = new SvEmbeddedObject;
+ else
+ xPer = new SvPersist;
+
+ xPer->DoOwnerLoad(xStor);
+ xPer->CleanUp();
+ xPer->DoSave();
+ xPer->DoSaveCompleted( 0 );
+ }
+
+ // Load
+ const String aOldURL( INetURLObject::GetBaseURL() );
+ if( aBaseURL.Len() ) INetURLObject::SetBaseURL( aBaseURL );
+ pImp->nLoadedFlags = 0;
+ bOk = xStor.Is() && LoadOwnFormat( *pMed );
+ INetURLObject::SetBaseURL( aOldURL );
+
+ if ( bOk )
+ {
+ GetDocInfo().Load(xStor);
+ bHasName = sal_True;
+ }
+ else
+ SetError( ERRCODE_ABORT );
+ }
+ else if ( InitNew(0) )
+ {
+ // Name vor ConvertFrom setzen, damit GetSbxObject() schon funktioniert
+ bHasName = sal_True;
+ SetName( SfxResId( STR_NONAME ) );
+
+ // Importieren
+ const String aOldURL( INetURLObject::GetBaseURL() );
+ if( aBaseURL.Len() ) INetURLObject::SetBaseURL( aBaseURL );
+ if( bProvidesData && !pMedium->GetFilter()->UsesStorage() )
+ pMedium->GetInStream();
+
+ pImp->nLoadedFlags = 0;
+ if ( pMedium->GetFilter() && ( pMedium->GetFilter()->GetFilterFlags() & SFX_FILTER_STARONEFILTER ) )
+ {
+ bOk = ImportFrom(*pMedium);
+ }
+ else
+ {
+ bOk = ConvertFrom(*pMedium);
+ }
+
+ INetURLObject::SetBaseURL( aOldURL );
+
+ if( bProvidesData && bOk && pMedium->GetOpenMode() & STREAM_WRITE )
+ //Medium offen halten um andere Zugriffe zu verhindern
+ {
+ if(pMedium->GetFilter() && pMedium->GetFilter()->UsesStorage())
+ pMedium->GetStorage();
+ else
+ pMedium->GetInStream();
+ if(pMedium->GetError())
+ bOk = sal_False;
+ }
+ }
+
+ if ( bOk )
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > xModel ( GetModel(), ::com::sun::star::uno::UNO_QUERY );
+ if ( xModel.is() )
+ {
+ ::rtl::OUString aURL = GetMedium()->GetOrigURL();
+ SfxItemSet *pSet = GetMedium()->GetItemSet();
+ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > aArgs;
+ TransformItems( SID_OPENDOC, *pSet, aArgs );
+ xModel->attachResource( aURL, aArgs );
+ }
+
+ GetTitle( SFX_TITLE_DETECT );
+
+ // Falls nicht asynchron geladen wird selbst FinishedLoading aufrufen
+ if ( !( pImp->nLoadedFlags & SFX_LOADED_MAINDOCUMENT ) &&
+ ( !bProvidesData || !pMedium->GetFilter() ||
+ pMedium->GetFilter()->UsesStorage() ||
+ pMedium->GetInStream() && pMedium->GetInStream()->GetLockBytes() &&
+ pMedium->GetInStream()->GetLockBytes()->IsSynchronMode() ) )
+ FinishedLoading( SFX_LOADED_MAINDOCUMENT );
+
+ if(bProvidesData && IsOwnStorageFormat_Impl(*pMed) && pMed->GetFilter())
+ {
+//???? dv DirEntry aDirEntry( pMed->GetPhysicalName() );
+//???? dv SetFileName( aDirEntry.GetFull() );
+ }
+ Broadcast( SfxSimpleHint(SFX_HINT_NAMECHANGED) );
+ }
+
+ if( bOk )
+ {
+ String aFacName = String::CreateFromAscii( GetFactory().GetShortName() );
+ if( ! aFacName.EqualsAscii( "swriter" ) &&
+ ! aFacName.EqualsAscii( "FrameSet" ) &&
+ ! aFacName.EqualsAscii( "swriter/web" ) )
+ {
+#ifdef DBG_UTIL
+ if( pImp->nLoadedFlags != SFX_LOADED_ALL )
+ {
+ ByteString aError( U2S( aFacName ) );
+ aError += " hat uralte Mussaenderung nicht gemacht. TLX fragen";
+ DBG_ERROR( aError.GetBuffer() );
+ }
+#endif
+ FinishedLoading( SFX_LOADED_ALL );
+ }
+ }
+
+ if ( SFX_CREATE_MODE_EMBEDDED != eCreateMode )
+ GetpApp()->HideStatusText();
+ return bOk;
+}
+
+//-------------------------------------------------------------------------
+
+sal_Bool SfxObjectShell::IsOwnStorageFormat_Impl(const SfxMedium &rMedium) const
+{
+ return !rMedium.GetFilter() || // Embedded
+ ( rMedium.GetFilter()->IsOwnFormat() &&
+ rMedium.GetFilter()->UsesStorage() );
+}
+
+//-------------------------------------------------------------------------
+
+sal_Bool SfxObjectShell::DoSave()
+// DoSave wird nur noch ueber OLE aufgerufen. Sichern eigener Dokument
+// laeuft uber SaveAs, um das Anlegen von Backups zu ermoeglichen.
+// Save in eigenes Format jetzt auch wieder Hierueber
+{
+ sal_Bool bOk = sal_False ;
+ {
+ ModifyBlocker_Impl aBlock( this );
+ SfxForceLinkTimer_Impl aFLT( this );
+ pImp->bIsSaving = sal_True;
+ String aPasswd;
+ if ( IsOwnStorageFormat_Impl( *GetMedium() ) &&
+ GetPasswd_Impl( GetMedium()->GetItemSet(), aPasswd ) )
+ GetMedium()->GetStorage()->SetKey( S2BS( aPasswd ) ); //!!! (pb) needs new implementation
+ GetStorage()->SetVersion( GetMedium()->GetFilter()->GetVersion() );
+ bOk = Save();
+ }
+
+ if ( bOk )
+ SetModified( sal_False );
+ return bOk;
+}
+
+//-------------------------------------------------------------------------
+
+sal_Bool SfxObjectShell::SaveTo_Impl
+(
+ SfxMedium &rMedium, // Medium, in das gespeichert werden soll
+ const SfxItemSet* pSet
+)
+
+/* [Beschreibung]
+
+ Schreibt den aktuellen Inhalt in das Medium rMedium.
+ Ist das Zielmedium kein Storage, so wird ueber ein temporaeres
+ Medium gespeichert, sonst direkt, da das Medium transacted
+ geschaltet ist, wenn wir es selbst geoeffnet haben und falls wir
+ Server sind entweder der Container einen transacted Storage zur
+ Verfuegung stellt oder selbst einen temporaeren Storage erzeugt hat.
+*/
+
+{
+ sal_Bool bOk = sal_False;
+ SfxForceLinkTimer_Impl aFLT( this );
+ ModifyBlocker_Impl aBlock( this );
+ const SfxFilter *pFilter = rMedium.GetFilter();
+ if ( !pFilter )
+ {
+ pFilter = GetFactory().GetFilter(0);
+ rMedium.SetFilter(pFilter);
+ }
+ sal_Bool bStorage = pFilter->UsesStorage();
+ if( bStorage )
+ rMedium.GetStorage();
+ else
+ rMedium.GetOutStream();
+ if( rMedium.GetErrorCode() )
+ return sal_False;
+
+#ifdef DBG_UTILx
+ SvStorageRef xRef;
+ if( bStorage )
+ {
+ xRef = rMedium.GetStorage();
+ if( xRef.Is() )
+ xRef->EnableRootCommit( sal_False );
+ }
+#endif
+
+ sal_Bool bOldStat = pImp->bForbidReload;
+ pImp->bForbidReload = sal_True;
+
+ SfxViewFrame *pFrame= SfxViewFrame::GetFirst(this);
+ while ( pFrame )
+ {
+ pFrame->GetDispatcher()->Lock( sal_True );
+ pFrame->Enable( sal_False );
+ pFrame = SfxViewFrame::GetNext(*pFrame, this);
+ }
+
+ if(IsOwnStorageFormat_Impl(rMedium))
+ {
+ SvStorageRef aMedRef = rMedium.GetStorage();
+ if ( !aMedRef.Is() )
+ return sal_False;
+ String aPasswd;
+ if ( GetPasswd_Impl( rMedium.GetItemSet(), aPasswd ) )
+ aMedRef->SetKey( S2BS( aPasswd ) ); //!!! (pb) needs new implementation
+
+ // Speichern
+ const SfxFilter* pFilter = rMedium.GetFilter();
+ if( ((SvStorage *)aMedRef) == ((SvStorage *)GetStorage() ) )
+ {
+ aMedRef->SetVersion( pFilter->GetVersion() );
+ bOk = Save();
+ }
+ else
+ bOk = SaveAsOwnFormat( rMedium );
+
+ // Soll als Version gespeichert werden ?
+
+ const SfxStringItem *pVersionItem = pSet ? (const SfxStringItem*)
+ SfxRequest::GetItem( pSet, SID_VERSION, sal_False, TYPE(SfxStringItem) ) : NULL;
+
+ const SfxStringItem *pAuthorItem = pSet ? (const SfxStringItem*)
+ SfxRequest::GetItem( pSet, SID_DOCINFO_AUTHOR, sal_False, TYPE(SfxStringItem) ) : NULL;
+
+ if ( pVersionItem )
+ {
+ // Versionskommentar und Author der Version
+ SfxVersionInfo aInfo;
+ aInfo.aComment = pVersionItem->GetValue();
+ String aAuthor;
+ if ( pAuthorItem )
+ aAuthor = pAuthorItem->GetValue();
+ else
+ aAuthor = SFX_INIMANAGER()->GetUserFullName();
+
+ aInfo.aCreateStamp.SetName( aAuthor );
+
+ // Version in die Liste aufnehmen; diese mu\s vorher schon vom
+ // "alten" Medium "ubertragen worden sein
+ rMedium.AddVersion_Impl( aInfo );
+ rMedium.SaveVersionList_Impl();
+
+ // Den Storage f"ur die Versionen "offnen
+ SvStorageRef xVersion = aMedRef->OpenStorage( DEFINE_CONST_UNICODE( "Versions" ) );
+
+ // Ggf. alle schon vorhandenen Versionen kopieren
+ SvStorageRef xOldVersions = GetStorage()->OpenStorage( DEFINE_CONST_UNICODE( "Versions" ), SFX_STREAM_READONLY );
+ if ( xOldVersions.Is() && xOldVersions->GetError() == SVSTREAM_OK )
+ {
+ const SfxVersionTableDtor *pList = rMedium.GetVersionList();
+ sal_uInt32 n=0;
+ SfxVersionInfo* pInfo = pList->GetObject(n++);
+ while( pInfo )
+ {
+ const String& rName = pInfo->aName;
+ if ( xOldVersions->IsStream( rName ) )
+ xOldVersions->CopyTo( rName, xVersion, rName );
+ pInfo = pList->GetObject(n++);
+ }
+ }
+
+ // Einen Stream aufmachen, auf den dann der Storage gesetzt wird,
+ // in den gespeichert wird
+ SvMemoryStream aTmp;
+ SvStorageRef xTmp = new SvStorage( aTmp );
+ rMedium.SetStorage_Impl( xTmp );
+
+ // Version speichern
+ if ( aPasswd.Len() )
+ xTmp->SetKey( S2BS( aPasswd ) ); //!!! (pb) needs new implementation
+ if( ((SvStorage*) xTmp ) == ((SvStorage*) GetStorage()) )
+ {
+ xTmp->SetVersion( pFilter->GetVersion() );
+ bOk = Save();
+ }
+ else
+ bOk = SaveAsOwnFormat( rMedium );
+
+ xTmp->Commit();
+
+ // Den Stream mit dem Storage komprimiert abspeichern
+ SvStorageStreamRef xStrm = xVersion->OpenStream( aInfo.aName );
+ aTmp.Seek(0);
+ ZCodec aCodec;
+ aCodec.BeginCompression( ZCODEC_BEST_COMPRESSION );
+ aCodec.Compress( aTmp, *xStrm );
+ aCodec.EndCompression();
+
+ // Versionen-Storage committen
+ xVersion->Commit();
+
+ // Medium wieder auf den alten Storage setzen
+ rMedium.SetStorage_Impl( aMedRef );
+ }
+ else if ( pImp->bIsSaving )
+ {
+ rMedium.SaveVersionList_Impl();
+ const SfxVersionTableDtor *pList = rMedium.GetVersionList();
+ if ( pList && pList->Count() )
+ {
+ SvStorageRef xVersion = aMedRef->OpenStorage( DEFINE_CONST_UNICODE( "Versions" ) );
+ SvStorageRef xOldVersions = GetStorage()->OpenStorage( DEFINE_CONST_UNICODE( "Versions" ), SFX_STREAM_READONLY );
+ if ( xOldVersions.Is() && xOldVersions->GetError() == SVSTREAM_OK )
+ {
+ sal_uInt32 n=0;
+ SfxVersionInfo* pInfo = pList->GetObject(n++);
+ while( pInfo )
+ {
+ const String& rName = pInfo->aName;
+ if ( xOldVersions->IsStream( rName ) )
+ xOldVersions->CopyTo( rName, xVersion, rName );
+ pInfo = pList->GetObject(n++);
+ }
+ }
+ }
+ }
+ }
+ else
+ {
+ if ( rMedium.GetFilter() && ( rMedium.GetFilter()->GetFilterFlags() & SFX_FILTER_STARONEFILTER ) )
+ bOk = ExportTo( rMedium );
+ else
+ bOk=ConvertTo( rMedium );
+
+ if( bOk )
+ bOk = SaveChilds();
+ }
+
+
+#ifdef DBG_UTILx
+ if( bStorage )
+ {
+ if( xRef.Is() )
+ xRef->EnableRootCommit( sal_True );
+ }
+#endif
+
+ if(bOk)
+ {
+ /* When the new medium ( rMedium ) has the same name as the
+ current one, we need to call DoHandsOff() so Commit() can
+ overwrite the old version. This is a good time to check
+ wether we want a backup copy, too.
+ (dv) We have to call DoHandsOff wether or not the names
+ are the same
+ */
+
+ sal_Bool bCopyTo = sal_False;
+ SfxItemSet *pSet = rMedium.GetItemSet();
+
+ if( pSet )
+ {
+ SFX_ITEMSET_ARG( pSet, pSaveToItem, SfxBoolItem, SID_SAVETO, sal_False );
+ bCopyTo = GetCreateMode() == SFX_CREATE_MODE_EMBEDDED ||
+ pSaveToItem && pSaveToItem->GetValue();
+ }
+
+ if ( ! bCopyTo )
+ DoHandsOff();
+
+ if ( pMedium &&
+ ( rMedium.GetName() == pMedium->GetName() ) )
+ {
+ const sal_Bool bDoBackup = SFX_APP()->GetOptions().IsBackup();
+ if ( bDoBackup )
+ pMedium->DoBackup_Impl();
+ }
+
+ RegisterTransfer( rMedium );
+ bOk=rMedium.Commit();
+ }
+ else
+ return sal_False;
+
+ pFrame = SfxViewFrame::GetFirst(this);
+ while ( pFrame )
+ {
+ pFrame->GetDispatcher()->Lock( sal_False );
+ pFrame->Enable( sal_True );
+ pFrame = SfxViewFrame::GetNext(*pFrame, this);
+ }
+
+ pImp->bForbidReload = bOldStat;
+
+ if(bOk && pFilter)
+ if(pFilter->IsAlienFormat())
+ pImp->bDidDangerousSave=sal_True;
+ else
+ pImp->bDidDangerousSave=sal_False;
+
+ if ( bOk )
+ SetEAs_Impl(rMedium);
+
+ return bOk;
+}
+
+//------------------------------------------------------------------------
+
+sal_Bool SfxObjectShell::ConnectTmpStorage_Impl( SvStorage* pStg)
+
+/* [Beschreibung]
+
+ Arbeitet die Applikation auf einem temporaeren Storage,
+ so darf der temporaere Storage nicht aus dem SaveCompleted
+ genommen werden. Daher wird in diesem Fall schon hier an
+ den neuen Storage connected. SaveCompleted tut dann nichts.
+
+ */
+
+{
+ // wenn es kein temp. Storage ist, einen anlegen
+ SvStorageRef aTmpMed = new SvStorage(String());
+ // nach HandsOff muss der alte Storage wieder eingesetzt werden
+ if ( !pStg->CopyTo(aTmpMed) )
+ {
+ SetError(aTmpMed->GetErrorCode());
+ aTmpMed.Clear();
+ return sal_False;
+ }
+
+ SetError(GetMedium()->GetErrorCode());
+ SaveCompleted(aTmpMed); // neuer temp. Storage; gibt alten frei
+ return sal_True;
+}
+
+
+//-------------------------------------------------------------------------
+
+sal_Bool SfxObjectShell::DoSaveAs( SvStorage * pNewStor )
+{
+ sal_Bool bOk;
+ {
+ SfxForceLinkTimer_Impl aFLT( this );
+ ModifyBlocker_Impl aBlock( this );
+ //Abwehr gegen feindlich gesinnte Applikationen.
+ if ( !pNewStor->GetFormat() )
+ SetupStorage( pNewStor );
+
+ pImp->bIsSaving = sal_False;
+ SfxMedium* pNewMed = new SfxMedium( pNewStor );
+ const String aOldURL( INetURLObject::GetBaseURL() );
+
+ bOk = SaveAsOwnFormat( *pNewMed );
+ INetURLObject::SetBaseURL( aOldURL );
+ delete pNewMed;
+ }
+ return bOk;
+}
+
+//-------------------------------------------------------------------------
+
+sal_Bool SfxObjectShell::DoSaveAs( SfxMedium &rMedium )
+{
+ // hier kommen nur Root-Storages rein, die via Temp-File gespeichert werden
+ const String aOldURL( INetURLObject::GetBaseURL() );
+ if( GetCreateMode() != SFX_CREATE_MODE_EMBEDDED )
+ if ( ShallSetBaseURL_Impl( rMedium ) )
+ INetURLObject::SetBaseURL( rMedium.GetName() );
+ else
+ INetURLObject::SetBaseURL( String() );
+
+ rMedium.CreateTempFile();
+
+ sal_Bool bRet = SaveTo_Impl(rMedium);
+ INetURLObject::SetBaseURL( aOldURL );
+ if( bRet )
+ DoHandsOff();
+ else
+ SetError(rMedium.GetErrorCode());
+ return bRet;
+}
+
+//-------------------------------------------------------------------------
+
+sal_Bool SfxObjectShell::DoSaveCompleted( SfxMedium * pNewMed )
+{
+ sal_Bool bOk = sal_True;
+ sal_Bool bMedChanged = pNewMed && pNewMed!=pMedium;
+/* sal_Bool bCreatedTempStor = pNewMed && pMedium &&
+ IsOwnStorageFormat_Impl(*pMedium) &&
+ !IsOwnStorageFormat_Impl(*pNewMed) &&
+ pMedium->GetName().Len();
+*/
+ if ( bMedChanged )
+ {
+ delete pMedium;
+ pMedium = pNewMed;
+ Broadcast( SfxSimpleHint(SFX_HINT_MODECHANGED) );
+ //MI? DELETEZ(pImp->pDocInfo);
+ }
+
+ const SfxFilter *pFilter = pMedium ? pMedium->GetFilter() : 0;
+ if ( pNewMed )
+ {
+ if( bMedChanged )
+ {
+ if( pNewMed->GetName().Len() )
+ bHasName = sal_True;
+ String aBase = GetBaseURL();
+ if( Current() == this && aBase.Len() )
+ INetURLObject::SetBaseURL( aBase );
+ Broadcast( SfxSimpleHint(SFX_HINT_NAMECHANGED) );
+ }
+ if ( !pFilter || pFilter->IsOwnFormat())
+ bOk = SaveCompleted( pMedium->GetStorage() );
+ else if( pFilter->UsesStorage() )
+ pMedium->GetStorage();
+ else if( pMedium->GetOpenMode() & STREAM_WRITE )
+ pMedium->GetInStream();
+ }
+ else
+ {
+ if( pMedium )
+ {
+ const SfxFilter* pFilter = pMedium->GetFilter();
+ if( pFilter && !pFilter->IsOwnFormat() &&
+ (pMedium->GetOpenMode() & STREAM_WRITE ))
+ pMedium->ReOpen();
+ else
+ SaveCompleted( 0 );
+ }
+ // entweder Save oder ConvertTo
+ else
+ bOk = SaveCompleted( NULL );
+ }
+
+ if ( bOk && pNewMed )
+ {
+ if( bMedChanged )
+ {
+ // Titel neu setzen
+ if ( pNewMed->GetName().Len() &&
+ SFX_CREATE_MODE_EMBEDDED != eCreateMode )
+ InvalidateName();
+ SetModified(sal_False); // nur bei gesetztem Medium zur"ucksetzen
+ }
+
+ // ggf. Notify, dass im FileSystem was passiert ist
+ if ( eCreateMode != SFX_CREATE_MODE_EMBEDDED )
+ {
+ SfxMedium *pMed = pNewMed ? pNewMed : pMedium;
+ if ( INET_PROT_FILE == pMed->GetURLObject().GetProtocol() && pMed->GetName().Len() )
+ SFX_APP()->Broadcast( SfxDirEntryHint( 0, pMed->GetURLObject().GetMainURL() ) );
+ }
+ }
+
+ return bOk;
+}
+
+//-------------------------------------------------------------------------
+
+sal_Bool SfxObjectShell::DoSaveCompleted( SvStorage * pNewStor )
+{
+ return DoSaveCompleted(pNewStor? new SfxMedium( pNewStor ): 0);
+}
+
+//-------------------------------------------------------------------------
+
+sal_Bool SfxObjectShell::ConvertFrom
+(
+ SfxMedium& rMedium /* <SfxMedium>, welches die Quell-Datei beschreibt
+ (z.B. Dateiname, <SfxFilter>, Open-Modi etc.) */
+)
+
+/* [Beschreibung]
+
+ Diese Methode wird zum Laden von Dokumenten "uber alle Filter gerufen,
+ die nicht SFX_FILTER_OWN sind oder f"ur die kein Clipboard-Format
+ registriert wurde (also kein Storage-Format benutzen). Mit anderen Worten:
+ mit dieser Methode wird importiert.
+
+ Das hier zu "offende File sollte "uber 'rMedium' ge"offnet werden,
+ um die richtigen Open-Modi zu gew"ahrleisten. Insbesondere wenn das
+ Format beibehalten wird (nur m"oglich bei SFX_FILTER_SIMULATE oder
+ SFX_FILTER_ONW) mu\s die Datei STREAM_SHARE_DENYWRITE ge"offnet werden.
+
+
+ [R"uckgabewert]
+
+ sal_Bool sal_True
+ Das Dokument konnte geladen werden.
+
+ sal_False
+ Das Dokument konnte nicht geladen werden, ein
+ Fehlercode ist mit <SvMedium::GetError()const> zu
+ erhalten.
+
+
+ [Beispiel]
+
+ sal_Bool DocSh::ConvertFrom( SfxMedium &rMedium )
+ {
+ SvStreamRef xStream = rMedium.GetInStream();
+ if( xStream.is() )
+ {
+ xStream->SetBufferSize(4096);
+ *xStream >> ...;
+
+ // NICHT 'rMedium.CloseInStream()' rufen! File gelockt halten!
+ return SVSTREAM_OK == rMedium.GetError();
+ }
+
+ return sal_False;
+ }
+
+
+ [Querverweise]
+
+ <SfxObjectShell::ConvertTo(SfxMedium&)>
+ <SFX_FILTER_REGISTRATION>
+*/
+{
+ return sal_False;
+}
+
+sal_Bool SfxObjectShell::ImportFrom( SfxMedium& rMedium )
+{
+ String aName( GetMedium()->GetFilter()->GetFilterName() );
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xMan = ::utl::getProcessServiceFactory();
+ ::com::sun::star::uno::Reference< ::com::sun::star::io::XDataImporter > xLoader( xMan->createInstance( aName ), ::com::sun::star::uno::UNO_QUERY );
+ if ( xLoader.is() )
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > xComp( GetModel(), ::com::sun::star::uno::UNO_QUERY );
+ xLoader->importData( GetMedium()->GetDataSource(), xComp, new DataTransferEventListener_Impl( this, xLoader ) );
+ pImp->xFilter = ::com::sun::star::uno::Reference< ::com::sun::star::io::XDataExporter > ( xLoader, ::com::sun::star::uno::UNO_QUERY );
+ if ( pImp->xFilter.is() )
+ pImp->aStarOneFilterName = aName;
+ else
+ pImp->aStarOneFilterName.Erase();
+ return sal_True;
+ }
+
+ return sal_False;
+}
+
+sal_Bool SfxObjectShell::ExportTo( SfxMedium& rMedium )
+{
+ String aName( rMedium.GetFilter()->GetFilterName() );
+ ::com::sun::star::uno::Reference< ::com::sun::star::io::XDataExporter > xExport;
+ if ( pImp->aStarOneFilterName == aName )
+ xExport = pImp->xFilter;
+ else
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xMan = ::utl::getProcessServiceFactory();
+ xExport = ::com::sun::star::uno::Reference< ::com::sun::star::io::XDataExporter > ( xMan->createInstance( aName ), ::com::sun::star::uno::UNO_QUERY );
+ }
+
+ if ( xExport.is() )
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > xComp( GetModel(), ::com::sun::star::uno::UNO_QUERY );
+ xExport->exportData( rMedium.GetDataSink(), xComp, new DataTransferEventListener_Impl( this, xExport ) );
+ return sal_True;
+ }
+
+ return sal_False;
+}
+
+//-------------------------------------------------------------------------
+
+sal_Bool SfxObjectShell::ConvertTo
+(
+ SfxMedium& rMedium /* <SfxMedium>, welches die Ziel-Datei beschreibt
+ (z.B. Dateiname, <SfxFilter>, Open-Modi etc.) */
+)
+
+/* [Beschreibung]
+
+ Diese Methode wird zum Speichern von Dokumenten "uber alle Filter gerufen,
+ die nicht SFX_FILTER_OWN sind oder f"ur die kein Clipboard-Format
+ registriert wurde (also kein Storage-Format benutzen). Mit anderen Worten:
+ mit dieser Methode wird exportiert.
+
+ Das hier zu "offende File sollte "uber 'rMedium' ge"offnet werden,
+ um die richtigen Open-Modi zu gew"ahrleisten. Insbesondere wenn das
+ Format beibehalten wird (nur m"oglich bei SFX_FILTER_SIMULATE oder
+ SFX_FILTER_ONW) mu\s die Datei auch nach dem Speichern im Modus
+ STREAM_SHARE_DENYWRITE ge"offnet bleiben.
+
+
+ [R"uckgabewert]
+
+ sal_Bool sal_True
+ Das Dokument konnte gespeichert werden.
+
+ sal_False
+ Das Dokument konnte nicht gespeichert werden, ein
+ Fehlercode ist mit <SvMedium::GetError()const> zu
+ erhalten.
+
+
+ [Beispiel]
+
+ sal_Bool DocSh::ConvertTo( SfxMedium &rMedium )
+ {
+ SvStreamRef xStream = rMedium.GetOutStream();
+ if ( xStream.is() )
+ {
+ xStream->SetBufferSize(4096);
+ *xStream << ...;
+
+ rMedium.CloseOutStream(); // "offnet automatisch wieder den InStream
+ return SVSTREAM_OK == rMedium.GetError();
+ }
+ return sal_False ;
+ }
+
+
+ [Querverweise]
+
+ <SfxObjectShell::ConvertFrom(SfxMedium&)>
+ <SFX_FILTER_REGISTRATION>
+*/
+
+{
+ return sal_False;
+}
+
+//-------------------------------------------------------------------------
+
+void SfxObjectShell::SetEAs_Impl( SfxMedium &rMedium )
+{
+ //!! wenn OV eine entsprechende Funktionalitaet zur Verfuegung stellt,
+ // besser auf der geoeffneten Datei arbeiten
+ SvEaMgr *pMgr = rMedium.GetEaMgr();
+ SvEaMgr *pOld = GetMedium()->GetEaMgr();
+ if ( !pMgr )
+ return;
+
+ if ( pOld )
+ pOld->Clone( *pMgr );
+
+ String aBuffer;
+ pMgr->SetComment( GetDocInfo().GetComment() );
+
+ pMgr->SetFileType( rMedium.GetFilter()->GetTypeName().GetToken( 0, ';' ) );
+ if ( SvEaMgr::GetAppCreator(aBuffer) )
+ pMgr->SetCreator(aBuffer);
+
+ if ( rMedium.GetLongName().Len() )
+ pMgr->SetLongName(rMedium.GetLongName());
+}
+
+//-------------------------------------------------------------------------
+
+sal_Bool SfxObjectShell::DoSave_Impl( const SfxItemSet* pArgs )
+
+//Hier jetzt mal eine Einordnung der einzelnen Save Funktionen
+//
+//DoSave / DoSaveAs: Werden ausschliesslich ueber OLE gerufen
+//DoSave_Impl : Einfaches Speichern mit allem OLE Protokoll SchnickSchnack
+//Save_Impl : Bearbeitungsfunktion fuer SAVEDOC
+
+{
+ sal_Bool bSaved = sal_False;
+ SfxMedium *pMedium = GetMedium();
+
+// Save jetzt in jedem Fall ueber SaveAs in temporaeres Medium
+// Ausser, wenn kein Backup gewuensch ist und wir ins eigene
+// Storageformat schreiben und wir nicht in SaveAs sind.
+
+ // Backup will be created in SaveTo_Impl()
+ // const sal_Bool bDoBackup=SFX_APP()->GetOptions().IsBackup();
+ const sal_Bool bIsOwn=IsOwnStorageFormat_Impl(*pMedium);
+
+// Zur Zeit wirder immer ueber temporaere Datei, um Storages schrumpfen
+// zu lassen.
+//
+ {
+ const StreamMode nFlags = pMedium->GetOpenMode();
+ const sal_Bool bDirect = pMedium->IsDirect();
+ const String aLongName(pMedium->GetLongName());
+
+ SfxItemSet *pSet =
+ pMedium->GetItemSet()?
+ new SfxAllItemSet(*pMedium->GetItemSet()): 0;
+
+ const SfxFilter *pFilter = GetMedium()->GetFilter();
+ SfxMedium *pMediumTmp = new SfxMedium( pMedium->GetName(), nFlags, bDirect, sal_False, pFilter, pSet );
+ pMediumTmp->CreateTempFile();
+ pMediumTmp->SetLongName( aLongName );
+
+ // Nat"urlich keine Version in einem neuen Medium!
+ pMediumTmp->GetItemSet()->ClearItem( SID_VERSION );
+ pMediumTmp->GetItemSet()->Put( SfxStringItem( SID_DOCTEMPLATE, pMedium->GetURLObject().GetBase()) );
+
+ const String aOldURL( INetURLObject::GetBaseURL() );
+ if( GetCreateMode() != SFX_CREATE_MODE_EMBEDDED )
+ if ( ShallSetBaseURL_Impl(*pMedium) )
+ INetURLObject::SetBaseURL( pMedium->GetName() );
+ else
+ INetURLObject::SetBaseURL( String() );
+
+ pMediumTmp->TransferVersionList_Impl( *pMedium );
+
+ if ( pFilter && ( pFilter->GetFilterFlags() & SFX_FILTER_PACKED ) )
+ SetError( GetMedium()->Unpack_Impl( pMedium->GetPhysicalName() ) );
+
+ if( !GetError() && SaveTo_Impl(*pMediumTmp, pArgs) )
+ {
+ INetURLObject::SetBaseURL( aOldURL );
+ ByteString aKey;
+ if ( IsOwnStorageFormat_Impl( *pMediumTmp ) )
+ aKey = pMediumTmp->GetStorage()->GetKey();
+
+ DoHandsOff();
+ SfxItemSet *pSet = pMediumTmp->GetItemSet();
+ if(pSet)
+ pMedium->GetItemSet()->Put(*pSet);
+
+ pMedium->TransferVersionList_Impl( *pMediumTmp );
+ SetError(pMediumTmp->GetErrorCode());
+ pMediumTmp->Close();
+ bSaved=sal_True;
+ delete pMediumTmp;
+
+ sal_Bool bOpen = DoSaveCompleted(pMedium);
+ if ( bOpen && aKey.Len() )
+ pMedium->GetStorage()->SetKey( aKey );
+ DBG_ASSERT(bOpen,"Fehlerbehandlung fuer DoSaveCompleted nicht implementiert");
+ }
+ else
+ {
+ INetURLObject::SetBaseURL( aOldURL );
+ SetError( pMediumTmp->GetError() );
+ String aTmp( pMediumTmp->GetPhysicalName() );
+ delete pMediumTmp;
+ SfxContentHelper::Kill( aTmp );
+ DoSaveCompleted( (SvStorage*)0 );
+ }
+ }
+
+ SetModified(!bSaved);
+ return bSaved;
+}
+
+//-------------------------------------------------------------------------
+
+sal_Bool SfxObjectShell::Save_Impl( const SfxItemSet* pSet )
+{
+ DBG_CHKTHIS(SfxObjectShell, 0);
+ SfxApplication *pSfxApp = SFX_APP();
+
+ pImp->bIsSaving = sal_True;
+ sal_Bool bSaved;
+ SFX_ITEMSET_ARG( GetMedium()->GetItemSet(), pSalvageItem, SfxStringItem, SID_DOC_SALVAGE, sal_False);
+ if ( pSalvageItem )
+ {
+ SFX_ITEMSET_ARG( GetMedium()->GetItemSet(), pFilterItem, SfxStringItem, SID_FILTER_NAME, sal_False);
+ const SfxFilter *pFilter = pFilterItem
+ ? GetFactory().GetFilterContainer()->GetFilter(pFilterItem->GetValue())
+ : 0;
+ SfxMedium *pMed = new SfxMedium(
+ pSalvageItem->GetValue(), STREAM_READWRITE | STREAM_SHARE_DENYWRITE,
+ sal_False, sal_False, pFilter );
+
+ SFX_ITEMSET_ARG( GetMedium()->GetItemSet(), pPasswordItem, SfxStringItem, SID_PASSWORD, sal_False);
+ if ( pPasswordItem )
+ pMed->GetItemSet()->Put( *pPasswordItem );
+
+ bSaved = DoSaveAs( *pMed );
+ if ( bSaved )
+ bSaved = DoSaveCompleted( pMed );
+ else
+ delete pMed;
+ }
+ else
+ bSaved = DoSave_Impl( pSet );
+ if ( bSaved && pSfxApp->GetOptions().IsAutoSave() )
+ pSfxApp->GetAutoSaveTimer_Impl()->Start();
+ return bSaved;
+}
+
+//-------------------------------------------------------------------------
+
+class SfxSaveAsContext_Impl
+{
+ String& _rNewNameVar;
+ String _aNewName;
+
+public:
+ SfxSaveAsContext_Impl( String &rNewNameVar,
+ const String &rNewName )
+ : _rNewNameVar( rNewNameVar ),
+ _aNewName( rNewName )
+ { rNewNameVar = rNewName; }
+ ~SfxSaveAsContext_Impl()
+ { _rNewNameVar.Erase(); }
+};
+
+//-------------------------------------------------------------------------
+
+sal_Bool SfxObjectShell::SaveAs_Impl(sal_Bool bUrl, SfxRequest *pRequest)
+{
+ // must we ask the user for the filename?
+ INetURLObject aURL;
+ aURL.SetSmartProtocol( INET_PROT_FILE );
+ sal_uInt16 nActFilt = 0;
+ const SfxFilter* pFilt;
+ for( pFilt = GetFactory().GetFilter( 0 );
+ pFilt && ( !pFilt->CanExport() || pFilt->IsInternal() );
+ pFilt = GetFactory().GetFilter( ++nActFilt ) );
+
+ DBG_ASSERT( pFilt, "Kein Filter zum Speichern" );
+
+ String aFilterName;
+ if( pFilt )
+ aFilterName = pFilt->GetName();
+
+ SfxItemSet *pParams = new SfxAllItemSet( SFX_APP()->GetPool() );
+ SFX_REQUEST_ARG( (*pRequest), pFileNameItem, SfxStringItem, SID_FILE_NAME, sal_False );
+ if ( pRequest->GetArgs() )
+ pParams->Put( *pRequest->GetArgs() );
+
+ if ( !pFileNameItem )
+ {
+ if(! bUrl )
+ {
+ // get the filename by dialog
+ ISfxModule *pMod = GetModule();
+ if ( !pMod )
+ pMod = SFX_APP()->GetISfxModule();
+
+ SfxFileDialog* pDlg = pMod->CreateDocFileDialog( WB_SAVEAS | WB_3DLOOK, GetFactory(), pParams );
+ if ( HasName() )
+ {
+ String aLastName = QueryTitle(
+ SFX_TITLE_QUERY_SAVE_NAME_PROPOSAL );
+ const SfxFilter* pMedFilter = GetMedium()->GetFilter();
+ if( pImp->bSetStandardName && !IsTemplate() || !pMedFilter ||
+ !pMedFilter->CanExport() ||
+ pMedFilter->GetVersion() != SOFFICE_FILEFORMAT_NOW )
+ {
+ if( aLastName.Len() )
+ {
+ String aPath( aLastName );
+
+ bool bWasAbsolute = FALSE;
+ INetURLObject aObj( SFX_INIMANAGER()->Get( SFX_KEY_WORK_PATH ) );
+ aObj.smartRel2Abs( aPath, bWasAbsolute );
+
+ aObj.SetExtension( pFilt->GetDefaultExtension().Copy(2) );
+ pDlg->SetSmartPath( aObj.GetMainURL() );
+ }
+
+ pDlg->SetCurFilter( pFilt->GetName() );
+ }
+ else
+ {
+ if( aLastName.Len() )
+ {
+ String aPath( pDlg->GetPath() );
+ aPath += aLastName;
+ pDlg->SetSmartPath( aPath );
+ }
+
+ pDlg->SetCurFilter( pMedFilter->GetName() );
+ }
+ }
+ else
+ {
+ pDlg->SetSmartPath( SFX_INIMANAGER()->Get(SFX_KEY_WORK_PATH) );
+ }
+
+ if ( pDlg->Execute() == RET_CANCEL )
+ {
+ delete pDlg;
+ SetError(ERRCODE_IO_ABORT);
+ return sal_False;
+ }
+
+ aURL.SetSmartURL( pDlg->GetPath() );
+
+ // gibt es schon ein Doc mit dem Namen?
+ const String aName(aURL.GetMainURL());
+ SfxObjectShell* pDoc = 0;
+ for ( SfxObjectShell* pTmp = SfxObjectShell::GetFirst();
+ pTmp && !pDoc;
+ pTmp = SfxObjectShell::GetNext(*pTmp) )
+ //! fsys bug op==
+ if ( pTmp->GetMedium() )
+ // ??? HasName() MM
+ if(pTmp != this && pTmp->GetMedium()->GetName() == aName )
+ pDoc = pTmp;
+ if ( pDoc )
+ {
+ // dann Fehlermeldeung: "schon offen"
+ SetError(ERRCODE_SFX_ALREADYOPEN);
+ delete pDlg;
+ return sal_False;
+ }
+
+ // Parameter aus Dialog holen
+ const String aFilter(pDlg->GetCurFilter());
+ if(aFilter.Len())
+ aFilterName = aFilter;
+ pParams->Put( *pDlg->GetItemSet() );
+ delete pDlg;
+ }
+ else
+ {
+ SfxUrlDialog aDlg( 0 );
+ if( aDlg.Execute() == RET_OK )
+ aURL.SetURL( aDlg.GetUrl() );
+ else
+ {
+ SetError(ERRCODE_IO_ABORT);
+ return sal_False;
+ }
+ }
+
+ // Request mit Dateiname und Filter vervollst"andigen
+ pRequest->AppendItem(SfxStringItem( SID_FILE_NAME, aURL.GetMainURL()) );
+ pRequest->AppendItem(SfxStringItem( SID_FILTER_NAME, aFilterName));
+ const SfxPoolItem* pItem=0;
+ pRequest->GetArgs()->GetItemState( SID_FILE_NAME, sal_False, &pItem );
+ pFileNameItem = PTR_CAST( SfxStringItem, pItem );
+ }
+
+ // neuen Namen an der Object-Shell merken
+ SfxSaveAsContext_Impl aSaveAsCtx( pImp->aNewName, aURL.GetMainURL() );
+
+ // now we can get the filename from the SfxRequest
+ DBG_ASSERT( pRequest->GetArgs() != 0, "fehlerhafte Parameter");
+ SFX_REQUEST_ARG( (*pRequest), pSaveToItem, SfxBoolItem, SID_SAVETO, sal_False );
+ FASTBOOL bSaveTo = pSaveToItem ? pSaveToItem->GetValue() : sal_False;
+ if ( !pFileNameItem && bSaveTo )
+ {
+ // SaveTo auch ohne Filenamen m"oglich -> dann FileDialog "offnen
+ ISfxModule *pMod = GetModule();
+ if ( !pMod )
+ pMod = SFX_APP()->GetISfxModule();
+
+ SfxFileDialog* pDlg = pMod->CreateDocFileDialog( WB_SAVEAS | WB_3DLOOK, GetFactory(), pRequest->GetArgs() );
+ if ( pDlg->Execute() == RET_CANCEL )
+ {
+ // Speichern abbrechen
+ delete pDlg;
+ SetError(ERRCODE_IO_ABORT);
+ return sal_False;
+ }
+ else
+ {
+ // Einstellungen aus dem FileDialog "ubernehmen
+ aURL.SetURL( pDlg->GetPath() );
+ aFilterName = pDlg->GetCurFilter();
+ delete pDlg;
+ }
+ }
+ else if ( pFileNameItem )
+ {
+ aURL.SetSmartURL(((const SfxStringItem *)pFileNameItem)->GetValue() );
+ const SfxPoolItem* pFilterNameItem=0;
+ const SfxItemState eState = pRequest->GetArgs()->GetItemState(SID_FILTER_NAME, sal_True, &pFilterNameItem);
+ if ( SFX_ITEM_SET == eState )
+ {
+ DBG_ASSERT(pFilterNameItem->IsA( TYPE(SfxStringItem) ), "Fehler Parameter");
+ aFilterName = ((const SfxStringItem *)pFilterNameItem)->GetValue();
+ }
+ }
+ else
+ {
+ SetError( ERRCODE_IO_INVALIDPARAMETER );
+ return sal_False;
+ }
+
+ const SfxFilter* pFilter = GetFactory().GetFilterContainer()->GetFilter( aFilterName );
+ if ( !pFilter )
+ {
+ SetError( ERRCODE_IO_INVALIDPARAMETER );
+ return sal_False;
+ }
+
+ pImp->bPasswd = pParams && SFX_ITEM_SET == pParams->GetItemState(SID_PASSWORD);
+
+ // unter gleichem Namen speichern?
+ SfxMedium *pActMed = GetMedium();
+ const INetURLObject aActName(pActMed->GetName());
+
+ if ( aURL == aActName )
+ {
+ if ( IsReadOnly() )
+ {
+ SetError(ERRCODE_SFX_DOCUMENTREADONLY);
+ return sal_False;
+ }
+ // gleicher Filter? -> Save()
+ const SfxFilter *pFilter = pActMed->GetFilter();
+ if ( pFilter && pFilter->GetName() == aFilterName )
+ {
+ pImp->bIsSaving=sal_False;
+ if ( pParams )
+ {
+ SfxItemSet* pSet = pMedium->GetItemSet();
+ pSet->ClearItem( SID_PASSWORD );
+ pSet->Put( *pParams );
+ }
+ return DoSave_Impl();
+ }
+ }
+
+ if( aURL.HasError() )
+ {
+ SetError( ERRCODE_IO_INVALIDPARAMETER );
+ return sal_False;
+ }
+
+// former code using fsys, must be handled in UCB
+// if( aURL.GetProtocol() == INET_PROT_FILE && !aURL.GetPath().Exists() )
+// {
+// SetError( ERRCODE_IO_NOTEXISTSPATH );
+// return sal_False;
+// }
+
+ if ( PreDoSaveAs_Impl(aURL.GetMainURL(),aFilterName,pParams))
+ {
+ pImp->bWaitingForPicklist = sal_True;
+ if (!pImp->bSetStandardName)
+ pImp->bDidWarnFormat=sal_False;
+ // Muss !!!
+ if ( IsOwnStorageFormat_Impl(*GetMedium()))
+ {
+ SetFileName( GetMedium()->GetPhysicalName() );
+ }
+
+ return sal_True;
+ }
+ else
+ return sal_False;
+}
+
+//-------------------------------------------------------------------------
+
+sal_Bool SfxObjectShell::PreDoSaveAs_Impl
+(
+ const String& rFileName,
+ const String& aFilterName,
+ SfxItemSet* pParams
+)
+{
+ if ( pParams )
+ pParams->Put(
+ SfxStringItem(
+ SID_DOCTEMPLATE, INetURLObject( rFileName ).GetBase()) );
+ SfxAllItemSet* pMergedParams = new SfxAllItemSet(
+ *pMedium->GetItemSet() );
+ pMergedParams->ClearItem( SID_PASSWORD );
+ pMergedParams->ClearItem( SID_DOCINFO_TITLE );
+
+ if( pParams )
+ pMergedParams->Put( *pParams );
+ delete pParams;
+ pMergedParams->ClearItem( SID_DOC_SALVAGE );
+ pParams = pMergedParams;
+
+// SfxItemSet *pSet = pParams ? new SfxAllItemSet(*pParams) : 0;
+
+ SfxMedium *pNewFile = new SfxMedium(
+ rFileName, STREAM_READWRITE | STREAM_SHARE_DENYWRITE, sal_False,
+ sal_False, 0, pParams );
+
+ SFX_ITEMSET_ARG(
+ pParams, pSaveToItem, SfxBoolItem, SID_SAVETO, sal_False );
+
+ sal_Bool bCopyTo =
+ GetCreateMode() == SFX_CREATE_MODE_EMBEDDED ||
+ pSaveToItem && pSaveToItem->GetValue();
+
+ SfxDocumentInfo aSavedInfo;
+ if ( bCopyTo )
+ aSavedInfo = GetDocInfo();
+
+ pNewFile->SetFilter( GetFactory(), aFilterName);
+ pNewFile->CreateTempFile();
+
+ sal_Bool bOk;
+
+ SfxMedium *pMediumTmp;
+
+ const String aOldURL( INetURLObject::GetBaseURL() );
+ if( GetCreateMode() != SFX_CREATE_MODE_EMBEDDED )
+ if ( ShallSetBaseURL_Impl(*pNewFile) )
+ INetURLObject::SetBaseURL( pNewFile->GetName() );
+ else
+ INetURLObject::SetBaseURL( String() );
+
+ pMediumTmp = pNewFile;
+
+ // Nat"urlich keine Version in einem neuen Medium!
+ pMediumTmp->GetItemSet()->ClearItem( SID_VERSION );
+
+ if ( aFilterName.Len() )
+ pMediumTmp->SetFilter( GetFactory(), aFilterName );
+ else
+ pMediumTmp->SetFilter( GetFactory().GetFilterContainer()->GetFilter(0) );
+
+ pImp-> bIsSaving = sal_False;
+ bOk = sal_False;
+
+ if ( IsOwnStorageFormat_Impl(*pNewFile) )
+ {
+ long nFormat = pMediumTmp->GetFilter()->GetFormat();
+ SfxFilterMatcher& rMatcher = SFX_APP()->GetFilterMatcher();
+ const SfxFilter *pFilt = rMatcher.GetFilter4ClipBoardId( nFormat );
+ if ( pFilt )
+ {
+ pFilt = rMatcher.ResolveRedirection( pFilt, *pMediumTmp );
+ if ( pFilt->GetFilterContainer() != pMediumTmp->GetFilter()->GetFilterContainer() )
+ pMediumTmp->GetStorage()->SetClass( SvFactory::GetServerName( nFormat ), nFormat, pFilt->GetTypeName() );
+ }
+ }
+
+ if ( GetMedium()->GetFilter() && ( GetMedium()->GetFilter()->GetFilterFlags() & SFX_FILTER_PACKED ) )
+ {
+ SfxMedium *pMed = bCopyTo ? pMedium : pNewFile;
+ pMediumTmp->SetError( GetMedium()->Unpack_Impl( pMed->GetPhysicalName() ) );
+ }
+
+ sal_Bool bCouldNotConnect = sal_False;
+ sal_Bool bNeedsStorage;
+ SvStorageRef xNewTempRef;
+
+ if ( !pMediumTmp->GetErrorCode() )
+ {
+
+ // Falls jetzt in ein Fremdformat gespeichert wird, darf nicht der
+ // Objektstorage weiterverwendet werden, wenn das alte Format das
+ // eigene war. Daher wird hier eine temporaerer erzeugt.
+ // Damit DoHandsOff gerufen werden kann, merken wir uns den
+ // Storage und rufen anschliessend von Hand SaveCompleted
+
+ bNeedsStorage = !bCopyTo && IsOwnStorageFormat_Impl(*pMedium) &&
+ !IsOwnStorageFormat_Impl(*pNewFile);
+
+ if ( bNeedsStorage && pMedium->GetName().Len() )
+ {
+ if(!ConnectTmpStorage_Impl( pMedium->GetStorage() ))
+ bCouldNotConnect = sal_True;
+ }
+ if( bNeedsStorage )
+ xNewTempRef = GetStorage();
+ }
+
+ if ( !pMediumTmp->GetErrorCode() && SaveTo_Impl( *pMediumTmp ) )
+ {
+ bOk = sal_True;
+ INetURLObject::SetBaseURL( aOldURL );
+
+ if ( bCouldNotConnect )
+ bOk = sal_False;
+
+#ifdef DONT_NEEDED_ANY_LONGER
+ // Auf die Platte
+ if( !bRemote )
+ {
+ // Options vorhanden?
+ SfxItemSet *pOptions = pMediumTmp->GetItemSet();
+ if ( pOptions )
+ // Options "ubernehmen
+ pNewFile->SetItemSet( new SfxAllItemSet( *pOptions ) );
+
+ // Falls jetzt in ein Fremdformat gespeichert wird, darf nicht der
+ // Objektstorage weiterverwendet werden, wenn das alte Format das
+ // eigene war. Daher wird hier eine temporaerer erzeugt.
+
+ // Damit DoHandsOff gerufen werden kann, merken wir uns den
+ // Storage und rufen anschliessend von Hand SaveCompleted
+
+ sal_Bool bNeedsStorage =
+ !bCopyTo && IsOwnStorageFormat_Impl(*pMedium) &&
+ !IsOwnStorageFormat_Impl(*pNewFile);
+
+ // Sind wir embedded, so war es Save Copy to
+ SvStorageRef xNewTempRef;
+ if ( bNeedsStorage && pMedium->GetName().Len())
+ {
+ if(!ConnectTmpStorage_Impl( pMedium->GetStorage() ))
+ bOk = sal_False;
+ }
+ if( bNeedsStorage )
+ xNewTempRef = GetStorage();
+ if( !bCopyTo ) // Braucht kein HandsOff, da nicht ueber sich selbst
+ DoHandsOff(); //gespeichert wird.
+
+ ErrCode nErr = aFileName.Exists() ? aFileName.Kill() : 0;
+ if( !nErr )
+ {
+ SetError(pMediumTmp->GetErrorCode());
+ pMediumTmp->Close();
+ nErr = aTmpFile.MoveTo(pNewFile->GetPhysicalName() );
+ if( nErr != ERRCODE_NONE )
+ {
+ // Extrabehandlung HS Fall: man kann schreiben, aber nicht
+ // moven
+ nErr = aTmpFile.CopyTo( pNewFile->GetPhysicalName(),
+ FSYS_ACTION_COPYFILE );
+ if( nErr != ERRCODE_NONE )
+ {
+ SetError( nErr );
+ DoSaveCompleted( pMediumTmp );
+ DBG_ERROR("Fall der Faelle" );
+ return sal_False;
+ }
+ else aTmpFile.Kill();
+ }
+ else if( bNeedsStorage )
+ SaveCompleted( xNewTempRef );
+ }
+ else bOk = sal_False;
+ }
+#endif
+ if( bNeedsStorage )
+ SaveCompleted( xNewTempRef );
+
+ SfxMedium *pMed = bCopyTo ? pMedium : pNewFile;
+
+ if ( ! bCopyTo )
+ bOk = DoSaveCompleted( pMed );
+
+ //! Vorsich. Muss nicht immer klappen.
+ DBG_ASSERT( bOk, "DoSaveCompleted nicht geklappt "
+ "und keine Fehlerbehandlung");
+
+ if( bOk )
+ {
+ if( bCopyTo )
+ {
+// if ( !bRemote )
+// DELETEZ( pNewFile );
+ }
+ else
+ {
+ SetModified(sal_False);
+ bOk=sal_True;
+ }
+ }
+ else
+ {
+ SetError( pNewFile->GetErrorCode() );
+ DoSaveCompleted( pMedium );
+ DELETEZ( pNewFile );
+ }
+
+ String aPasswd;
+ if ( IsOwnStorageFormat_Impl( *GetMedium() ) && GetPasswd_Impl( GetMedium()->GetItemSet(), aPasswd ) )
+ GetMedium()->GetStorage()->SetKey( S2BS( aPasswd ) ); //!!! (pb) needs new implementation
+ }
+ else
+ {
+ INetURLObject::SetBaseURL( aOldURL );
+ SetError(pMediumTmp->GetErrorCode());
+// aTmpFile.Kill();
+ DoSaveCompleted( (SvStorage*)0 );
+ }
+// if( !bRemote )
+// delete pMediumTmp;
+
+ if(!bOk)
+ SetModified(sal_True);
+
+ if ( bCopyTo )
+ {
+ SfxDocumentInfo &rDocInfo = GetDocInfo();
+ rDocInfo = aSavedInfo;
+ }
+
+ return bOk;
+}
+
+//------------------------------------------------------------------------
+
+sal_Bool SfxObjectShell::LoadFrom( SvStorage *pStor )
+{
+ if (pStor->IsStream(SfxConfigManager::GetStreamName()))
+ SetConfigManager (new SfxConfigManager( pStor, 0));
+ GetDocInfo().Load(pStor);
+ return sal_True;
+}
+
+//-------------------------------------------------------------------------
+
+sal_Bool SfxObjectShell::CanReload_Impl()
+
+/* [Beschreibung]
+
+ Interne Methode zum Feststellen, ob eine erneutes Laden des
+ Dokuments (auch als RevertToSaved oder LastVersion bekannt)
+ m"oglich ist.
+*/
+
+{
+ const SfxMedium *pMedium = GetMedium();
+ const SfxFilter *pFilter = pMedium ? pMedium->GetFilter() : 0;
+ return pMedium && HasName() &&
+ ( !pFilter || ! pFilter->GetFilterName().EqualsAscii( SFX_FILTER_DOWNLOAD ) ) &&
+ !IsInModalMode() && !Application::IsInModalMode() &&
+ !pImp->bForbidReload;
+ // Fuer AutoLoad muss Reload immer enabled sein, also NICHT:
+ // ( IsModified() || GetMedium()->IsRemote()
+}
+
+//-------------------------------------------------------------------------
+
+sal_Bool SfxObjectShell::LoadLayout() const
+{
+ return pImp->bLoadLayout;
+}
+
+//-------------------------------------------------------------------------
+
+void SfxObjectShell::SetLoadLayout_Impl( sal_Bool bLoadLayout )
+{
+ pImp->bLoadLayout = bLoadLayout;
+}
+
+//-------------------------------------------------------------------------
+
+sal_Bool SfxObjectShell::IsInformationLost()
+{
+ const SfxFilter *pFilt = GetMedium()->GetFilter();
+ return pFilt && pFilt->IsAlienFormat() && pImp->bDidDangerousSave && !(pFilt->GetFilterFlags() & SFX_FILTER_SILENTEXPORT);
+}
+
+sal_Bool SfxObjectShell::LoadOwnFormat( SfxMedium& rMedium )
+{
+ SvStorageRef xStor = rMedium.GetStorage();
+ if ( xStor.Is() )
+ {
+ // Config
+ if ( xStor->IsStream(SfxConfigManager::GetStreamName()) )
+ SetConfigManager (new SfxConfigManager( xStor, SFX_CFGMANAGER()));
+ if ( rMedium.GetFileVersion() )
+ xStor->SetVersion( rMedium.GetFileVersion() );
+
+ // Password
+ SFX_ITEMSET_ARG( rMedium.GetItemSet(), pPasswdItem,
+ SfxStringItem, SID_PASSWORD, sal_False );
+ SfxApplication *pApp = SFX_APP();
+ if ( pPasswdItem || ERRCODE_IO_ABORT != CheckPasswd_Impl( 0, pApp->GetPool(), pMedium ) )
+ {
+ String aPasswd;
+ if ( GetPasswd_Impl(pMedium->GetItemSet(), aPasswd) )
+ xStor->SetKey( S2BS( aPasswd ) ); //!!! (pb) needs new implementation
+
+ // load document
+ return Load( xStor );
+ }
+ return sal_False;
+ }
+ else
+ return sal_False;
+}
+
+sal_Bool SfxObjectShell::SaveAsOwnFormat( SfxMedium& rMedium )
+{
+ SvStorageRef xStor = rMedium.GetStorage();
+ if( xStor.Is() )
+ {
+ xStor->SetVersion( rMedium.GetFilter()->GetVersion() );
+ const SfxFilter* pFilter = rMedium.GetFilter();
+ return SaveAs( xStor );
+ }
+ else return sal_False;
+}
+
+
+void SfxObjectShell::AddXMLAsZipToTheStorage( SvStorage& rRoot )
+{
+ static struct _ObjExpType {
+ const char* pModuleNm;
+ // GlobalNameId
+ UINT32 n1;
+ USHORT n2, n3;
+ BYTE b8, b9, b10, b11, b12, b13, b14, b15;
+ } aArr[] = {
+ { "Writer", SO3_SW_CLASSID_50 },
+ { "Calc", SO3_SC_CLASSID_50 },
+ { "Impress", SO3_SIMPRESS_CLASSID_50 },
+ { "Draw", SO3_SDRAW_CLASSID_50 },
+ { 0 }
+ };
+
+ for( const _ObjExpType* pArr = aArr; pArr->pModuleNm; ++pArr )
+ {
+ SvGlobalName aGlbNm( pArr->n1, pArr->n2, pArr->n3,
+ pArr->b8, pArr->b9, pArr->b10, pArr->b11,
+ pArr->b12, pArr->b13, pArr->b14, pArr->b15 );
+ if( *GetSvFactory() == aGlbNm )
+ {
+ // 1. check if the option is set and unequal 0 or is not set
+ String sStr( String::CreateFromAscii( "Add_XML_to_Storage_" ));
+ sStr.AppendAscii( pArr->pModuleNm );
+ String sCfgEntry( SFX_APP()->GetIniManager()->Get(
+ SFX_GROUP_WORKINGSET_IMPL, sStr ));
+ if( sCfgEntry.Len() && 0 != sCfgEntry.ToInt32() )
+ {
+ // the flag is set
+ sStr.AssignAscii( "StarOffice XML (" );
+ sStr.AppendAscii( pArr->pModuleNm );
+ sStr += ')';
+ // 2. exist the XML filter? "StarOffice XML (<Application>)"?
+ const SfxFilter* pFilter = GetFactory().GetFilterContainer()->
+ GetFilter4FilterName( sStr );
+ if( pFilter )
+ {
+ // 3. create a temp stream and write the XML format into it
+ SvCacheStream aTmp;
+ SvStorageRef xTmp = new SvStorage( aTmp );
+ SfxMedium aMed( xTmp, TRUE );
+
+ aMed.SetFilter( pFilter );
+
+ if( ConvertTo( aMed ) )
+ {
+ // 4. zip the XML and put it into the root storage.
+ // The name of the stream is XMLFormat
+ SvStorageStreamRef xStrm( rRoot.OpenStream(
+ String::CreateFromAscii( "XMLFormat" ) ));
+ SvStream* pOutStrm = aMed.GetOutStream();
+ pOutStrm->Seek( 0 );
+
+ ZCodec aCodec;
+ aCodec.BeginCompression( ZCODEC_BEST_COMPRESSION );
+ aCodec.Compress( *pOutStrm, *xStrm );
+ aCodec.EndCompression();
+ }
+ }
+ }
+ // that's all
+ break;
+ }
+ }
+}
diff --git a/sfx2/source/doc/objuno.cxx b/sfx2/source/doc/objuno.cxx
new file mode 100644
index 000000000000..348ce72e4ca9
--- /dev/null
+++ b/sfx2/source/doc/objuno.cxx
@@ -0,0 +1,911 @@
+/*************************************************************************
+ *
+ * $RCSfile: objuno.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:32 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _COM_SUN_STAR_LANG_DISPOSEDEXCEPTION_HPP_
+#include <com/sun/star/lang/DisposedException.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XFRAME_HPP_
+#include <com/sun/star/frame/XFrame.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UTIL_DATETIME_HPP_
+#include <com/sun/star/util/DateTime.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HPP_
+#include <com/sun/star/beans/PropertyAttribute.hpp>
+#endif
+#ifndef _CPPUHELPER_INTERFACECONTAINER_HXX_
+#include <cppuhelper/interfacecontainer.hxx>
+#endif
+#ifndef _COM_SUN_STAR_IO_IOEXCEPTION_HPP_
+#include <com/sun/star/io/IOException.hpp>
+#endif
+
+#include <tools/errcode.hxx>
+#include <so3/svstor.hxx>
+#include <svtools/cntwids.hrc>
+#include <svtools/itemset.hxx>
+#include <svtools/stritem.hxx>
+#include <svtools/intitem.hxx>
+#include <svtools/eitem.hxx>
+#include <svtools/adrparse.hxx>
+
+#include "objuno.hxx"
+#include "sfx.hrc"
+#include "sfxsids.hrc"
+#include "viewsh.hxx"
+#include "viewfrm.hxx"
+#include "printer.hxx"
+#include "objsh.hxx"
+#include "docinf.hxx"
+#include "docfile.hxx"
+#include "dispatch.hxx"
+#include "openflag.hxx"
+#include "app.hxx"
+#include "fcontnr.hxx"
+#include "request.hxx"
+#include "sfxuno.hxx"
+#include <objshimp.hxx>
+
+#include <osl/mutex.hxx>
+#ifdef _USE_NAMESPACE
+using namespace vos;
+#endif
+
+#define SfxIOException_Impl( nErr ) ::com::sun::star::io::IOException()
+
+//=============================================================================
+
+#define PROPERTY_UNBOUND 0
+SfxItemPropertyMap aDocInfoPropertyMap_Impl[] =
+{
+ { "Author" , 6 , WID_FROM, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
+ { "AutoloadEnabled" , 15, MID_DOCINFO_AUTOLOADENABLED, &::getBooleanCppuType(), PROPERTY_UNBOUND, 0 },
+ { "AutoloadSecs" , 12, MID_DOCINFO_AUTOLOADSECS, &::getCppuType((const sal_Int16*)0), PROPERTY_UNBOUND, 0 },
+ { "AutoloadURL" , 11, MID_DOCINFO_AUTOLOADURL, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
+ { "BlindCopiesTo" , 13, WID_BCC, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
+ { "CopyTo" , 6 , WID_CC, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
+ { "CreationDate" , 12, WID_DATE_CREATED, &::getCppuType((const ::com::sun::star::util::DateTime*)0),PROPERTY_UNBOUND, 0 },
+ { "DefaultTarget" , 13, MID_DOCINFO_DEFAULTTARGET, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
+ { "Description" , 11, MID_DOCINFO_DESCRIPTION, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
+ { "EditingCycles" , 13, MID_DOCINFO_REVISION, &::getCppuType((const sal_Int16*)0), PROPERTY_UNBOUND, 0 },
+ { "EditingDuration" , 15, MID_DOCINFO_EDITTIME, &::getCppuType((const sal_Int32*)0), PROPERTY_UNBOUND, 0 },
+ { "InReplyTo" , 9 , WID_IN_REPLY_TO, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
+ { "IsEncrypted" , 11, MID_DOCINFO_ENCRYPTED, &::getBooleanCppuType(), PROPERTY_UNBOUND | ::com::sun::star::beans::PropertyAttribute::READONLY, 0 },
+ { "Keywords" , 8 , WID_KEYWORDS, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
+ { "MIMEType" , 8 , WID_CONTENT_TYPE, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND | ::com::sun::star::beans::PropertyAttribute::READONLY, 0 },
+ { "ModifiedBy" , 10, MID_DOCINFO_MODIFICATIONAUTHOR, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
+ { "ModifyDate" , 10, WID_DATE_MODIFIED, &::getCppuType((const ::com::sun::star::util::DateTime*)0),PROPERTY_UNBOUND, 0 },
+ { "Newsgroups" , 10, WID_NEWSGROUPS, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
+ { "Original" , 8 , WID_MESSAGE_ID, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
+ { "PrintDate" , 9 , MID_DOCINFO_PRINTDATE, &::getCppuType((const ::com::sun::star::util::DateTime*)0),PROPERTY_UNBOUND, 0 },
+ { "PrintedBy" , 9 , MID_DOCINFO_PRINTEDBY, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
+ { "Priority" , 8 , WID_PRIORITY, &::getCppuType((const sal_Int16*)0), PROPERTY_UNBOUND, 0 },
+ { "Recipient" , 9 , WID_TO, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
+ { "References" , 10, WID_REFERENCES, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
+ { "ReplyTo" , 7 , WID_REPLY_TO, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
+ { "Template" , 8 , MID_DOCINFO_TEMPLATE, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
+ { "TemplateFileName", 16, SID_TEMPLATE_NAME, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
+ { "TemplateDate" , 12, MID_DOCINFO_TEMPLATEDATE, &::getCppuType((const ::com::sun::star::util::DateTime*)0),PROPERTY_UNBOUND, 0 },
+ { "Theme" , 5 , MID_DOCINFO_SUBJECT, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
+ { "Title" , 5 , WID_TITLE, &::getCppuType((const ::rtl::OUString*)0), PROPERTY_UNBOUND, 0 },
+ {0,0,0,0,0}
+};
+
+//-----------------------------------------------------------------------------
+SFX_IMPL_XINTERFACE_5( SfxDocumentInfoObject, OWeakObject, ::com::sun::star::document::XDocumentInfo, ::com::sun::star::lang::XComponent, ::com::sun::star::beans::XPropertySet, ::com::sun::star::beans::XFastPropertySet, ::com::sun::star::beans::XPropertyAccess )
+SFX_IMPL_XTYPEPROVIDER_5( SfxDocumentInfoObject, ::com::sun::star::document::XDocumentInfo, ::com::sun::star::lang::XComponent, ::com::sun::star::beans::XPropertySet, ::com::sun::star::beans::XFastPropertySet, ::com::sun::star::beans::XPropertyAccess )
+/*
+::com::sun::star::uno::Reference< ::com::sun::star::reflection::XIdlClass > SfxDocumentInfoObject::getStaticIdlClass()
+{
+ // Global Method, must be guarded (multithreading)
+ MutexGuard aGuard( Mutex::getGlobalMutex() );
+ {
+ // use the standard class implementation of the usr library
+ static ::com::sun::star::uno::Reference< ::com::sun::star::reflection::XIdlClass > xClass =
+ createStandardClass(
+ "com.sun.star.comp.sfx2.DocumentInfo",
+ OWeakObject::getStaticIdlClass(),
+ 4,
+ ::getCppuType((const ::com::sun::star::lang::XComponent*)0),
+ ::getCppuType((const ::com::sun::star::document::XDocumentInfo*)0),
+ ::getCppuType((const ::com::sun::star::beans::XPropertyAccess*)0),
+ ::getCppuType((const ::com::sun::star::beans::XPropertySet*)0),
+ ::getCppuType((const ::com::sun::star::beans::XFastPropertySet*)0) );
+
+ return xClass;
+ }
+}
+*/
+//-----------------------------------------------------------------------------
+struct SfxDocumentInfoObject_Impl
+{
+ SfxObjectShell* _pObjSh;
+ ::osl::Mutex _aMutex;
+ ::cppu::OInterfaceContainerHelper _aDisposeContainer;
+
+ SfxDocumentInfoObject_Impl( SfxObjectShell* pObjSh )
+ : _pObjSh( pObjSh )
+ , _aDisposeContainer( _aMutex )
+ {
+ }
+};
+
+//-----------------------------------------------------------------------------
+
+SfxDocumentInfoObject::SfxDocumentInfoObject( sal_Bool bStandalone )
+ : _aPropSet( aDocInfoPropertyMap_Impl )
+ , _pInfo( NULL )
+ , _pFilter( NULL )
+ , _bStandalone( bStandalone )
+ , _pImp( new SfxDocumentInfoObject_Impl( NULL ) )
+{
+}
+
+//-----------------------------------------------------------------------------
+
+SfxDocumentInfoObject::SfxDocumentInfoObject( SfxObjectShell *pObjSh )
+ : _aPropSet( aDocInfoPropertyMap_Impl )
+ , _pInfo( 0 )
+ , _pFilter( NULL )
+ , _bStandalone( sal_False )
+ , _pImp( new SfxDocumentInfoObject_Impl( pObjSh ) )
+{
+ if ( pObjSh )
+ {
+ SfxDocumentInfo &rDocInfo = pObjSh->GetDocInfo();
+ _pInfo = &rDocInfo;
+ _pFilter = pObjSh->GetMedium()->GetFilter();
+ _xObjSh = pObjSh;
+ }
+}
+
+//-----------------------------------------------------------------------------
+
+SfxDocumentInfoObject::~SfxDocumentInfoObject()
+{
+ if ( _bStandalone )
+ delete _pInfo;
+ delete _pImp;
+}
+
+//-----------------------------------------------------------------------------
+
+void SAL_CALL SfxDocumentInfoObject::dispose() throw( ::com::sun::star::uno::RuntimeException )
+{
+ ::com::sun::star::lang::EventObject aEvent( (::cppu::OWeakObject *)this );
+ _pImp->_aDisposeContainer.disposeAndClear( aEvent );
+
+/*
+ _xCurrent = ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController > ();
+ for ( sal_uInt32 n = _aControllers.ge.getLength(); n; --n )
+ SequenceRemoveElementAt( _aControllers, n-1 );
+*/
+}
+
+//-----------------------------------------------------------------------------
+
+void SAL_CALL SfxDocumentInfoObject::addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException )
+{
+ _pImp->_aDisposeContainer.addInterface( aListener );
+}
+
+//-----------------------------------------------------------------------------
+
+void SAL_CALL SfxDocumentInfoObject::removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException )
+{
+ _pImp->_aDisposeContainer.removeInterface( aListener );
+}
+//-----------------------------------------------------------------------------
+
+::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL SfxDocumentInfoObject::getPropertySetInfo() throw( ::com::sun::star::uno::RuntimeException )
+{
+ return _aPropSet.getPropertySetInfo();
+}
+
+//-----------------------------------------------------------------------------
+
+void SAL_CALL SfxDocumentInfoObject::setPropertyValue(const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue) throw( ::com::sun::star::uno::RuntimeException )
+{
+ const SfxItemPropertyMap* pMap = SfxItemPropertyMap::GetByName(
+ aDocInfoPropertyMap_Impl,
+ aPropertyName );
+ if ( pMap )
+ setFastPropertyValue( pMap->nWID, aValue );
+}
+
+//-----------------------------------------------------------------------------
+
+::com::sun::star::uno::Any SAL_CALL SfxDocumentInfoObject::getPropertyValue(const ::rtl::OUString& aPropertyName) throw( ::com::sun::star::uno::RuntimeException )
+{
+ const SfxItemPropertyMap* pMap = SfxItemPropertyMap::GetByName( aDocInfoPropertyMap_Impl,
+ aPropertyName );
+ if ( pMap )
+ return getFastPropertyValue( pMap->nWID );
+ else
+ return ::com::sun::star::uno::Any();
+}
+
+//-----------------------------------------------------------------------------
+
+void SAL_CALL SfxDocumentInfoObject::addPropertyChangeListener(const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener > & aListener) throw( ::com::sun::star::uno::RuntimeException )
+{}
+
+//-----------------------------------------------------------------------------
+
+void SAL_CALL SfxDocumentInfoObject::removePropertyChangeListener(const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener > & aListener) throw( ::com::sun::star::uno::RuntimeException )
+{}
+
+//-----------------------------------------------------------------------------
+
+void SAL_CALL SfxDocumentInfoObject::addVetoableChangeListener(const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener > & aListener) throw( ::com::sun::star::uno::RuntimeException )
+{}
+
+//-----------------------------------------------------------------------------
+
+void SAL_CALL SfxDocumentInfoObject::removeVetoableChangeListener(const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener > & aListener) throw( ::com::sun::star::uno::RuntimeException )
+{}
+
+::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL SfxDocumentInfoObject::getPropertyValues( void ) throw( ::com::sun::star::uno::RuntimeException )
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > xInfo = getPropertySetInfo();
+ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property > aProps = xInfo->getProperties();
+
+ const ::com::sun::star::beans::Property* pProps = aProps.getConstArray();
+ sal_uInt32 nCount = aProps.getLength();
+
+ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >aSeq( nCount );
+ ::com::sun::star::beans::PropertyValue* pValues = aSeq.getArray();
+
+ for ( sal_uInt32 n = 0; n < nCount; ++n )
+ {
+ ::com::sun::star::beans::PropertyValue& rCurrValue = pValues[n];
+ const ::com::sun::star::beans::Property& rCurrProp = pProps[n];
+
+ rCurrValue.Name = rCurrProp.Name;
+ rCurrValue.Handle = rCurrProp.Handle;
+ rCurrValue.Value = getPropertyValue( rCurrProp.Name );
+ }
+
+ return aSeq;
+}
+
+void SAL_CALL SfxDocumentInfoObject::setPropertyValues( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aProps )
+ throw( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException )
+{
+ const ::com::sun::star::beans::PropertyValue* pProps = aProps.getConstArray();
+ sal_uInt32 nCount = aProps.getLength();
+
+ for ( sal_uInt32 n = 0; n < nCount; ++n )
+ {
+ const ::com::sun::star::beans::PropertyValue& rProp = pProps[n];
+ setPropertyValue( rProp.Name, rProp.Value );
+ }
+}
+
+::com::sun::star::util::DateTime SfxDocumentInfoObject::impl_DateTime_Object2Struct( const ::DateTime& aDateTimeObject )
+{
+ // Attention!
+ // We can't use a DateTime-object as type of any property with new UNO!
+ // We must use a DateTime-struct and convert the values.
+
+ ::com::sun::star::util::DateTime aDateTimeStruct ; // com/sun/star/util/DateTime !!!
+
+ // ... and convert DateTime-object to struct ! (copy values)
+ aDateTimeStruct.HundredthSeconds = aDateTimeObject.Get100Sec () ;
+ aDateTimeStruct.Seconds = aDateTimeObject.GetSec () ;
+ aDateTimeStruct.Minutes = aDateTimeObject.GetMin () ;
+ aDateTimeStruct.Hours = aDateTimeObject.GetHour () ;
+ aDateTimeStruct.Day = aDateTimeObject.GetDay () ;
+ aDateTimeStruct.Month = aDateTimeObject.GetMonth () ;
+ aDateTimeStruct.Year = aDateTimeObject.GetYear () ;
+
+ // Return ricght type with right values.
+ return aDateTimeStruct ;
+}
+
+::DateTime SfxDocumentInfoObject::impl_DateTime_Struct2Object ( const ::com::sun::star::util::DateTime& aDateTimeStruct )
+{
+ // Attention!
+ // We can't use a DateTime-object as type of any property with new UNO!
+ // We must use a DateTime-struct and convert the values.
+
+ // Get values from DateTime-struct and create a date and time instance ...
+ ::Date aDate ( aDateTimeStruct.Day , aDateTimeStruct.Month , aDateTimeStruct.Year ) ;
+ ::Time aTime ( aDateTimeStruct.Hours, aDateTimeStruct.Minutes , aDateTimeStruct.Seconds, aDateTimeStruct.HundredthSeconds ) ;
+
+ // ... to use it for creation of a DateTime-object ...
+ ::DateTime aDateTimeObject ( aDate, aTime ) ;
+
+ // Return converted values.
+ return aDateTimeObject ;
+}
+
+
+void SAL_CALL SfxDocumentInfoObject::setFastPropertyValue(sal_Int32 nHandle, const ::com::sun::star::uno::Any& aValue) throw( ::com::sun::star::uno::RuntimeException )
+{
+ sal_Bool bModified = sal_True;
+
+ if ( _pInfo && aValue.getValueType() == ::getCppuType((const ::rtl::OUString*)0) )
+ {
+ ::rtl::OUString sTemp ;
+ aValue >>= sTemp ;
+ String aStrVal( sTemp );
+ switch ( nHandle )
+ {
+ case WID_FROM :
+ {
+ const SfxStamp& rStamp = _pInfo->GetCreated();
+ if ( aStrVal.Len() > TIMESTAMP_MAXLENGTH )
+ {
+ SvAddressParser aParser( aStrVal );
+ if ( aParser.Count() > 0 )
+ {
+ String aEmail = aParser.GetEmailAddress(0);
+ String aRealname = aParser.GetRealName(0);
+
+ if ( aRealname.Len() <= TIMESTAMP_MAXLENGTH )
+ aStrVal = aRealname;
+ else if ( aEmail.Len() <= TIMESTAMP_MAXLENGTH )
+ aStrVal = aEmail;
+ }
+ }
+ _pInfo->SetCreated( SfxStamp( aStrVal, rStamp.GetTime() ) );
+ break;
+ }
+ case MID_DOCINFO_PRINTEDBY:
+ {
+ const SfxStamp& rStamp = _pInfo->GetPrinted();
+ _pInfo->SetPrinted( SfxStamp( aStrVal, rStamp.GetTime() ) );
+ }
+ case MID_DOCINFO_MODIFICATIONAUTHOR:
+ {
+ const SfxStamp& rStamp = _pInfo->GetChanged();
+ _pInfo->SetChanged( SfxStamp( aStrVal, rStamp.GetTime() ) );
+ break;
+ }
+ case WID_TITLE :
+ _pInfo->SetTitle( aStrVal );
+ if ( _xObjSh )
+ {
+ _xObjSh->InvalidateName();
+ _xObjSh->Broadcast( SfxSimpleHint( SFX_HINT_TITLECHANGED ) );
+ }
+ break;
+ case MID_DOCINFO_SUBJECT :
+ _pInfo->SetTheme( aStrVal );
+ break;
+ case WID_KEYWORDS :
+ _pInfo->SetKeywords( aStrVal );
+ break;
+ case WID_CC :
+ _pInfo->SetCopiesTo( aStrVal );
+ break;
+ case WID_MESSAGE_ID :
+ _pInfo->SetOriginal( aStrVal );
+ break;
+ case WID_REFERENCES :
+ _pInfo->SetReferences( aStrVal );
+ break;
+ case WID_TO :
+ _pInfo->SetRecipient( aStrVal );
+ break;
+ case WID_REPLY_TO :
+ _pInfo->SetReplyTo( aStrVal );
+ break;
+ case MID_DOCINFO_TEMPLATE:
+ _pInfo->SetTemplateName( aStrVal );
+ break;
+ case SID_TEMPLATE_NAME:
+ _pInfo->SetTemplateFileName( aStrVal );
+ break;
+ case WID_BCC :
+ _pInfo->SetBlindCopies( aStrVal );
+ break;
+ case WID_IN_REPLY_TO :
+ _pInfo->SetInReplyTo( aStrVal );
+ break;
+ case WID_NEWSGROUPS :
+ _pInfo->SetNewsgroups( aStrVal );
+ break;
+ case MID_DOCINFO_DESCRIPTION:
+ _pInfo->SetComment( aStrVal );
+ break;
+ case MID_DOCINFO_AUTOLOADURL:
+ _pInfo->SetReloadURL( aStrVal );
+ break;
+ case MID_DOCINFO_DEFAULTTARGET:
+ _pInfo->SetDefaultTarget( aStrVal );
+ break;
+ default:
+ bModified = sal_False;
+ break;
+ }
+ }
+ else if ( _pInfo && aValue.getValueType() == ::getCppuType((const ::com::sun::star::util::DateTime*)0) )
+ {
+ switch ( nHandle )
+ {
+ case WID_DATE_CREATED :
+ {
+ const SfxStamp& rStamp = _pInfo->GetCreated();
+ ::com::sun::star::util::DateTime aDateTime ;
+ aValue >>= aDateTime ;
+ _pInfo->SetCreated( SfxStamp( rStamp.GetName(), impl_DateTime_Struct2Object(aDateTime) ) );
+ break;
+ }
+ case WID_DATE_MODIFIED :
+ {
+ const SfxStamp& rStamp = _pInfo->GetChanged();
+ ::com::sun::star::util::DateTime aDateTime ;
+ aValue >>= aDateTime ;
+ _pInfo->SetChanged( SfxStamp( rStamp.GetName(), impl_DateTime_Struct2Object(aDateTime) ) );
+ break;
+ }
+ case MID_DOCINFO_PRINTDATE :
+ {
+ const SfxStamp& rStamp = _pInfo->GetPrinted();
+ ::com::sun::star::util::DateTime aDateTime ;
+ aValue >>= aDateTime ;
+ _pInfo->SetPrinted( SfxStamp( rStamp.GetName(), impl_DateTime_Struct2Object(aDateTime) ) );
+ break;
+ }
+ default:
+ bModified = sal_False;
+ break;
+ }
+ }
+ else if ( _pInfo && aValue.getValueType() == ::getBooleanCppuType() )
+ {
+ sal_Bool bBoolVal ;
+ aValue >>= bBoolVal ;
+ switch ( nHandle )
+ {
+ case MID_DOCINFO_AUTOLOADENABLED:
+ _pInfo->EnableReload( bBoolVal );
+ break;
+ default:
+ bModified = sal_False;
+ }
+ }
+ else if ( _pInfo && aValue.getValueType() == ::getCppuType((const sal_Int32*)0) )
+ {
+ long nIntVal ;
+ aValue >>= nIntVal ;
+ switch ( nHandle )
+ {
+ case MID_DOCINFO_AUTOLOADSECS:
+ _pInfo->SetReloadDelay( nIntVal );
+ break;
+ case MID_DOCINFO_EDITTIME:
+ _pInfo->SetTime( nIntVal );
+ default:
+ bModified = sal_False;
+ }
+ }
+ else if ( _pInfo && aValue.getValueType() == ::getCppuType((const sal_Int16*)0) )
+ {
+ short nIntVal ;
+ aValue >>= nIntVal ;
+ switch ( nHandle )
+ {
+ case MID_DOCINFO_REVISION:
+ _pInfo->SetDocumentNumber( nIntVal );
+ case WID_PRIORITY :
+ _pInfo->SetPriority( nIntVal );
+ break;
+ default:
+ bModified = sal_False;
+ break;
+ }
+ }
+
+ if ( bModified && _pImp->_pObjSh )
+ _pImp->_pObjSh->SetModified( sal_True );
+}
+
+//-----------------------------------------------------------------------------
+
+::com::sun::star::uno::Any SAL_CALL SfxDocumentInfoObject::getFastPropertyValue(sal_Int32 nHandle) throw( ::com::sun::star::uno::RuntimeException )
+{
+ ::com::sun::star::uno::Any aValue;
+ if ( nHandle == WID_CONTENT_TYPE )
+ {
+ if ( _pInfo && _pInfo->GetSpecialMimeType().Len() )
+ {
+ ::rtl::OUString sTemp ( _pInfo->GetSpecialMimeType() );
+ aValue <<= sTemp ;
+ }
+ else if ( _pFilter )
+ {
+ ::rtl::OUString sTemp ( _pFilter->GetMimeType() );
+ aValue <<= sTemp ;
+ }
+ else
+ aValue <<= ::rtl::OUString() ;
+ }
+ else if ( _pInfo )
+ {
+ switch ( nHandle )
+ {
+ case MID_DOCINFO_REVISION :
+ aValue <<= _pInfo->GetDocumentNumber() ;
+ break;
+ case MID_DOCINFO_EDITTIME :
+ aValue <<= _pInfo->GetTime();
+ break;
+ case WID_FROM :
+ {
+ const SfxStamp& rStamp = _pInfo->GetCreated();
+ if ( rStamp.IsValid() )
+ aValue <<= ::rtl::OUString( rStamp.GetName() );
+ else
+ aValue <<= ::rtl::OUString() ;
+ break;
+ }
+ case WID_DATE_CREATED :
+ {
+ const SfxStamp& rStamp = _pInfo->GetCreated();
+ if ( rStamp.IsValid() )
+ aValue <<= impl_DateTime_Object2Struct(rStamp.GetTime());
+ break;
+ }
+ case WID_TITLE :
+ aValue <<= ::rtl::OUString( _pInfo->GetTitle() );
+ break;
+ case MID_DOCINFO_SUBJECT:
+ aValue <<= ::rtl::OUString( _pInfo->GetTheme() );
+ break;
+ case MID_DOCINFO_MODIFICATIONAUTHOR:
+ {
+ const SfxStamp& rStamp = _pInfo->GetChanged();
+ if ( rStamp.IsValid() )
+ aValue <<= ::rtl::OUString( rStamp.GetName() );
+ else
+ aValue <<= ::rtl::OUString() ;
+ break;
+ }
+ case WID_DATE_MODIFIED :
+ {
+ const SfxStamp& rStamp = _pInfo->GetChanged();
+ if ( rStamp.IsValid() )
+ aValue <<= impl_DateTime_Object2Struct(rStamp.GetTime());
+ break;
+ }
+ case MID_DOCINFO_PRINTEDBY:
+ {
+ const SfxStamp& rStamp = _pInfo->GetPrinted();
+ if ( rStamp.IsValid() )
+ aValue <<= ::rtl::OUString( rStamp.GetName() );
+ else
+ aValue <<= ::rtl::OUString() ;
+ break;
+ }
+ case MID_DOCINFO_PRINTDATE:
+ {
+ const SfxStamp& rStamp = _pInfo->GetPrinted();
+ if ( rStamp.IsValid() )
+ aValue <<= impl_DateTime_Object2Struct(rStamp.GetTime());
+ break;
+ }
+ case WID_KEYWORDS :
+ aValue <<= rtl::OUString( _pInfo->GetKeywords() );
+ break;
+ case WID_PRIORITY :
+ aValue <<= _pInfo->GetPriority() ;
+ break;
+ case WID_CC :
+ aValue <<= rtl::OUString( _pInfo->GetCopiesTo() );
+ break;
+ case WID_MESSAGE_ID :
+ aValue <<= rtl::OUString( _pInfo->GetOriginal() );
+ break;
+ case WID_REFERENCES :
+ aValue <<= rtl::OUString( _pInfo->GetReferences() );
+ break;
+ case WID_TO :
+ aValue <<= rtl::OUString( _pInfo->GetRecipient() );
+ break;
+ case WID_REPLY_TO :
+ aValue <<= rtl::OUString( _pInfo->GetReplyTo() );
+ break;
+ case WID_BCC :
+ aValue <<= rtl::OUString( _pInfo->GetBlindCopies() );
+ break;
+ case WID_IN_REPLY_TO :
+ aValue <<= rtl::OUString( _pInfo->GetInReplyTo() );
+ break;
+ case WID_NEWSGROUPS :
+ aValue <<= rtl::OUString( _pInfo->GetNewsgroups() );
+ break;
+ case MID_DOCINFO_DESCRIPTION:
+ aValue <<= rtl::OUString( _pInfo->GetComment() );
+ break;
+ case MID_DOCINFO_TEMPLATE:
+ aValue <<= rtl::OUString( _pInfo->GetTemplateName() );
+ break;
+ case SID_TEMPLATE_NAME:
+ aValue <<= rtl::OUString( _pInfo->GetTemplateFileName() );
+ break;
+ case MID_DOCINFO_TEMPLATEDATE:
+ aValue <<= impl_DateTime_Object2Struct(_pInfo->GetTemplateDate());
+ break;
+ case MID_DOCINFO_AUTOLOADENABLED:
+ aValue <<= _pInfo->IsReloadEnabled() ;
+ break;
+ case MID_DOCINFO_AUTOLOADURL:
+ aValue <<= rtl::OUString( _pInfo->GetReloadURL() );
+ break;
+ case MID_DOCINFO_AUTOLOADSECS:
+ aValue <<= _pInfo->GetReloadDelay() ;
+ break;
+ case MID_DOCINFO_DEFAULTTARGET:
+ aValue <<= rtl::OUString( _pInfo->GetDefaultTarget() );
+ break;
+ default:
+ aValue <<= ::rtl::OUString();
+ break;
+ }
+ }
+
+ return aValue;
+}
+
+//-----------------------------------------------------------------------------
+
+sal_Int16 SAL_CALL SfxDocumentInfoObject::getUserFieldCount() throw( ::com::sun::star::uno::RuntimeException )
+{
+ return _pInfo->GetUserKeyCount();
+}
+
+//-----------------------------------------------------------------------------
+
+::rtl::OUString SAL_CALL SfxDocumentInfoObject::getUserFieldName(sal_Int16 nIndex) throw( ::com::sun::star::uno::RuntimeException )
+{
+ if ( _pInfo && nIndex < _pInfo->GetUserKeyCount() )
+ return _pInfo->GetUserKey( nIndex ).GetTitle();
+ else
+ return ::rtl::OUString();
+}
+
+//-----------------------------------------------------------------------------
+
+::rtl::OUString SAL_CALL SfxDocumentInfoObject::getUserFieldValue(sal_Int16 nIndex) throw( ::com::sun::star::uno::RuntimeException )
+{
+ if ( _pInfo && nIndex < _pInfo->GetUserKeyCount() )
+ return _pInfo->GetUserKey( nIndex ).GetWord();
+ else
+ return ::rtl::OUString();
+}
+
+//-----------------------------------------------------------------------------
+
+void SAL_CALL SfxDocumentInfoObject::setUserFieldName(sal_Int16 nIndex, const ::rtl::OUString& aName ) throw( ::com::sun::star::uno::RuntimeException )
+{
+ if ( _pInfo && nIndex < _pInfo->GetUserKeyCount() )
+ {
+ const SfxDocUserKey& rKey = _pInfo->GetUserKey( nIndex );
+ _pInfo->SetUserKey( SfxDocUserKey( aName, rKey.GetWord() ), nIndex );
+ if ( _pImp->_pObjSh )
+ _pImp->_pObjSh->SetModified( sal_True );
+ }
+}
+
+//-----------------------------------------------------------------------------
+
+void SAL_CALL SfxDocumentInfoObject::setUserFieldValue( sal_Int16 nIndex, const ::rtl::OUString& aValue ) throw( ::com::sun::star::uno::RuntimeException )
+{
+ if ( _pInfo && nIndex < _pInfo->GetUserKeyCount() )
+ {
+ const SfxDocUserKey& rKey = _pInfo->GetUserKey( nIndex );
+ _pInfo->SetUserKey( SfxDocUserKey( rKey.GetTitle(), aValue ), nIndex );
+ if ( _pImp->_pObjSh )
+ _pImp->_pObjSh->SetModified( sal_True );
+ }
+}
+
+//-----------------------------------------------------------------------------
+SFX_IMPL_XINTERFACE_1( SfxStandaloneDocumentInfoObject, SfxDocumentInfoObject, ::com::sun::star::document::XStandaloneDocumentInfo )
+SFX_IMPL_XTYPEPROVIDER_6( SfxStandaloneDocumentInfoObject, ::com::sun::star::document::XDocumentInfo, ::com::sun::star::lang::XComponent, ::com::sun::star::beans::XPropertySet, ::com::sun::star::beans::XFastPropertySet, ::com::sun::star::beans::XPropertyAccess, ::com::sun::star::document::XStandaloneDocumentInfo )
+SFX_IMPL_XSERVICEINFO( SfxStandaloneDocumentInfoObject, "com.sun.star.document.StandaloneDocumentInfo", "com.sun.star.comp.sfx2.StandaloneDocumentInfo" )
+SFX_IMPL_SINGLEFACTORY( SfxStandaloneDocumentInfoObject )
+
+SfxStandaloneDocumentInfoObject::SfxStandaloneDocumentInfoObject( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xFactory )
+ : SfxDocumentInfoObject( sal_True )
+ , _pMedium( NULL )
+{
+}
+
+//-----------------------------------------------------------------------------
+
+SfxStandaloneDocumentInfoObject::~SfxStandaloneDocumentInfoObject()
+{
+ delete _pMedium;
+}
+
+//-----------------------------------------------------------------------------
+
+SvStorage* SfxStandaloneDocumentInfoObject::GetStorage_Impl( const String& rName, sal_Bool bWrite )
+{
+ // Medium erstellen
+ if ( _pMedium )
+ delete _pMedium;
+
+ _pMedium = new SfxMedium( rName, bWrite ? SFX_STREAM_READWRITE : SFX_STREAM_READONLY, sal_True );
+ if ( !_pMedium->IsStorage() || SVSTREAM_OK != _pMedium->GetError() )
+ // Datei existiert nicht oder ist kein Storage
+ return NULL;
+
+ // Filter-Detection wegen FileFormat-Version
+ _pFilter = 0;
+ if ( 0 != SFX_APP()->GetFilterMatcher().GuessFilter( *_pMedium, &_pFilter )
+ || !bWrite && !_pFilter )
+ // unbekanntes Dateiformat
+ return NULL;
+
+ // Storage "offnen
+ SvStorageRef xStor = _pMedium->GetStorage();
+ DBG_ASSERT( xStor.Is(), "no storage" );
+ xStor->SetVersion( _pFilter ? _pFilter->GetVersion() : SOFFICE_FILEFORMAT_NOW );
+ return xStor;
+}
+
+//-----------------------------------------------------------------------------
+
+sal_Int16 SAL_CALL SfxStandaloneDocumentInfoObject::getUserFieldCount() throw( ::com::sun::star::uno::RuntimeException )
+{
+ return SfxDocumentInfoObject::getUserFieldCount();
+}
+
+//-----------------------------------------------------------------------------
+
+::rtl::OUString SAL_CALL SfxStandaloneDocumentInfoObject::getUserFieldName(sal_Int16 nIndex) throw( ::com::sun::star::uno::RuntimeException )
+{
+ return SfxDocumentInfoObject::getUserFieldName(nIndex);
+}
+
+//-----------------------------------------------------------------------------
+
+::rtl::OUString SAL_CALL SfxStandaloneDocumentInfoObject::getUserFieldValue(sal_Int16 nIndex) throw( ::com::sun::star::uno::RuntimeException )
+{
+ return SfxDocumentInfoObject::getUserFieldValue(nIndex);
+}
+
+//-----------------------------------------------------------------------------
+
+void SAL_CALL SfxStandaloneDocumentInfoObject::setUserFieldName(sal_Int16 nIndex, const ::rtl::OUString& aName ) throw( ::com::sun::star::uno::RuntimeException )
+{
+ SfxDocumentInfoObject::setUserFieldName( nIndex, aName );
+}
+
+//-----------------------------------------------------------------------------
+
+void SAL_CALL SfxStandaloneDocumentInfoObject::setUserFieldValue( sal_Int16 nIndex, const ::rtl::OUString& aValue ) throw( ::com::sun::star::uno::RuntimeException )
+{
+ SfxDocumentInfoObject::setUserFieldValue( nIndex, aValue );
+}
+//-----------------------------------------------------------------------------
+
+void SAL_CALL SfxStandaloneDocumentInfoObject::loadFromURL(const ::rtl::OUString& aURL) throw( ::com::sun::star::uno::RuntimeException )
+{
+ sal_Bool bOK = sal_False;
+ String aName( aURL );
+ SvStorage* pStor = GetStorage_Impl( aName, sal_False );
+ if ( pStor )
+ {
+ if ( !_pInfo )
+ _pInfo = new SfxDocumentInfo;
+
+ // DocInfo laden
+ bOK = _pInfo->Load( pStor );
+ }
+
+ DELETEZ( _pMedium );
+ if ( !bOK )
+ throw SfxIOException_Impl( ERRCODE_IO_CANTREAD );
+}
+
+//-----------------------------------------------------------------------------
+
+void SAL_CALL SfxStandaloneDocumentInfoObject::storeIntoURL(const ::rtl::OUString& aURL) throw( ::com::sun::star::uno::RuntimeException )
+{
+ sal_Bool bOK = sal_False;
+ String aName( aURL );
+ SvStorage* pStor = GetStorage_Impl( aName, sal_True );
+ if ( pStor )
+ {
+ if ( !_pInfo )
+ _pInfo = new SfxDocumentInfo;
+
+ // DocInfo speichern
+ bOK = _pInfo->Save( pStor ) && pStor->Commit();
+ }
+
+ DELETEZ( _pMedium );
+ if ( !bOK )
+ throw SfxIOException_Impl( ERRCODE_IO_CANTREAD );
+}
+
+//=============================================================================
+/* ASMUSS
+#ifdef TEST_CODE
+ // Testcode fuer DocumentInfoObject
+ // Einmal zum Holen
+ ::com::sun::star::uno::Reference< XServiceManager > xMan = getGlobalServiceManager();
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Uik > aIfaces( 2 );
+ aIfaces.getArray()[0] = ::getCppuType((const Reference< ::com::sun::star::document::XDocumentInfo >*)0);
+ aIfaces.getArray()[1] = ::getCppuType((const Reference< ::com::sun::star::beans::XFastPropertySet >*)0);
+ ::com::sun::star::uno::Reference< XServiceProvider > xSSI = xMan->getServiceProvider(
+ "com.sun.star.document.DocumentInfo", aIfaces, ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Uik >() );
+// automatisch auskommentiert - [getIdlClass(es) or queryInterface] - Bitte XTypeProvider benutzen!
+// ::com::sun::star::uno::Reference< ::com::sun::star::document::XDocumentInfo > xInfo = (::com::sun::star::document::XDocumentInfo*) xSSI->newInstance()->queryInterface( ::getCppuType((const Reference< ::com::sun::star::document::XDocumentInfo >*)0) );
+
+// automatisch auskommentiert - [getIdlClass(es) or queryInterface] - Bitte XTypeProvider benutzen!
+// ::com::sun::star::uno::Reference< ::com::sun::star::beans::XFastPropertySet > xProps = (::com::sun::star::beans::XFastPropertySet*) xInfo->queryInterface( ::getCppuType((const Reference< ::com::sun::star::beans::XFastPropertySet >*)0) );
+
+
+ // Laden und Werte auslesen
+ xInfo->load( StringToOUString( aURL, CHARSET_SYSTEM ) );
+ ::com::sun::star::uno::Any aValue = xProps->getFastPropertyValue( WID_FROM );
+ String aAuthor = OUStringToString( aValue.getString(), CHARSET_SYSTEM );
+#endif
+*/
+
+
diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx
new file mode 100644
index 000000000000..4d447764b907
--- /dev/null
+++ b/sfx2/source/doc/objxtor.cxx
@@ -0,0 +1,762 @@
+/*************************************************************************
+ *
+ * $RCSfile: objxtor.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:33 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include "arrdecl.hxx"
+
+#ifndef _MSGBOX_HXX //autogen
+#include <vcl/msgbox.hxx>
+#endif
+#ifndef _WRKWIN_HXX //autogen
+#include <vcl/wrkwin.hxx>
+#endif
+#ifndef _SFXENUMITEM_HXX //autogen
+#include <svtools/eitem.hxx>
+#endif
+#ifndef _RTTI_HXX //autogen
+#include <tools/rtti.hxx>
+#endif
+#ifndef _SFXLSTNER_HXX //autogen
+#include <svtools/lstner.hxx>
+#endif
+#ifndef _SB_SBSTAR_HXX //autogen
+#include <basic/sbstar.hxx>
+#endif
+#ifndef _SFXSTRITEM_HXX
+#include <svtools/stritem.hxx>
+#endif
+#pragma hdrstop
+
+#ifndef _SBXCLASS_HXX //autogen
+#include <svtools/sbx.hxx>
+#endif
+#ifndef _SFXINIMGR_HXX //autogen
+#include <svtools/iniman.hxx>
+#endif
+
+#include "objsh.hxx"
+
+#ifndef _BASIC_SBUNO_HXX
+#include <basic/sbuno.hxx>
+#endif
+
+#ifndef _SFXECODE_HXX
+#include <svtools/sfxecode.hxx>
+#endif
+#ifndef _EHDL_HXX
+#include <svtools/ehdl.hxx>
+#endif
+
+#include <svtools/urihelper.hxx>
+
+#include "picklist.hxx"
+#include "docfac.hxx"
+#include "docfile.hxx"
+#include "event.hxx"
+#include "cfgmgr.hxx"
+#include "dispatch.hxx"
+#include "viewsh.hxx"
+#include "interno.hxx"
+#include "sfxresid.hxx"
+#include "objshimp.hxx"
+#include "appbas.hxx"
+#include "sfxtypes.hxx"
+#include "evntconf.hxx"
+#include "request.hxx"
+#include "doc.hrc"
+#include "docinf.hxx"
+#include "objuno.hxx"
+#include "appdata.hxx"
+#include "appuno.hxx"
+#include "sfxsids.hrc"
+#include "basmgr.hxx"
+
+#ifndef _UNO_MAPPING_HXX_
+#include <uno/mapping.hxx>
+#endif
+
+//====================================================================
+
+DBG_NAME(SfxObjectShell);
+
+#define DocumentInfo
+#include "sfxslots.hxx"
+
+extern AsynchronLink* pPendingCloser;
+
+//=========================================================================
+
+TYPEINIT1(SfxObjectShell, SfxShell);
+
+//--------------------------------------------------------------------
+
+SfxObjectShell_Impl::~SfxObjectShell_Impl()
+{
+ if ( pPendingCloser == pCloser )
+ pPendingCloser = 0;
+ delete pCloser;
+}
+
+// initializes a document from a file-description
+
+SfxObjectShell::SfxObjectShell
+(
+ SfxObjectCreateMode eMode /* Zweck, zu dem die SfxObjectShell
+ erzeugt wird:
+
+ SFX_CREATE_MODE_EMBEDDED (default)
+ als SO-Server aus einem anderen
+ Dokument heraus
+
+ SFX_CREATE_MODE_STANDARD,
+ als normales, selbst"aendig ge"offnetes
+ Dokument
+
+ SFX_CREATE_MODE_PREVIEW
+ um ein Preview durchzuf"uhren,
+ ggf. werden weniger Daten ben"otigt
+
+ SFX_CREATE_MODE_ORGANIZER
+ um im Organizer dargestellt zu
+ werden, hier werden keine Inhalte
+ ben"otigt */
+)
+
+/* [Beschreibung]
+
+ Konstruktor der Klasse SfxObjectShell.
+*/
+
+: pImp( new SfxObjectShell_Impl ),
+ _pFactory( 0 ),
+ eCreateMode(eMode),
+ pStyleSheetPool(0),
+ pMedium(0)
+{
+ DBG_CTOR(SfxObjectShell, 0);
+
+ bHasName = sal_False;
+ SfxShell::SetName( GetTitle() );
+ nViewNo = 0;
+
+ // Aggregation InPlaceObject+Automation
+//(mba) AddInterface( SvDispatch::ClassFactory() );
+
+ SfxObjectShell *pThis = this;
+ SfxObjectShellArr_Impl &rArr = SFX_APP()->GetObjectShells_Impl();
+ rArr.C40_INSERT( SfxObjectShell, pThis, rArr.Count() );
+ pImp->bInList = sal_True;
+ pImp->nLoadedFlags = SFX_LOADED_ALL;
+}
+
+//--------------------------------------------------------------------
+
+// virtual dtor of typical base-class SfxObjectShell
+
+SfxObjectShell::~SfxObjectShell()
+{
+ DBG_DTOR(SfxObjectShell, 0);
+
+ if ( IsEnableSetModified() )
+ EnableSetModified( sal_False );
+
+ // Niemals GetInPlaceObject() aufrufen, der Zugriff auf den
+ // Ableitungszweig SfxInternObject ist wegen eines Compiler Bugs nicht
+ // erlaubt
+ SfxObjectShell::Close();
+
+ DELETEX(pMedium);
+ DELETEX(pImp->pEventConfig);
+ DELETEX(pImp->pCfgMgr);
+ DELETEX( pImp->pReloadTimer );
+
+ SfxApplication *pSfxApp = SFX_APP();
+ if ( USHRT_MAX != pImp->nVisualDocumentNumber )
+ pSfxApp->ReleaseIndex(pImp->nVisualDocumentNumber);
+
+ // Basic-Manager zerst"oren
+ if ( pImp->pBasicMgr )
+ DELETEX(pImp->pBasicMgr);
+
+ if ( pSfxApp->GetDdeService() )
+ pSfxApp->RemoveDdeTopic( this );
+
+ delete pImp->pDocInfo;
+ if ( pImp->xModel.is() )
+ pImp->xModel = ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > ();
+
+ delete pImp;
+}
+
+//--------------------------------------------------------------------
+
+SfxObjectFactory& SfxObjectShell::GetFactory() const
+{
+ return *_pFactory;
+}
+//--------------------------------------------------------------------
+
+void SfxObjectShell::ViewAssigned()
+
+/* [Beschreibung]
+
+ Diese Methode wird gerufen, wenn eine ::com::sun::star::sdbcx::View zugewiesen wird.
+*/
+
+{
+ // Spaetestens jetzt die Factory initialisieren (wegen HelpFileName)
+ GetFactory().DoInitFactory();
+}
+
+//--------------------------------------------------------------------
+// closes the Object and all its views
+
+sal_Bool SfxObjectShell::Close()
+{
+ {DBG_CHKTHIS(SfxObjectShell, 0);}
+ if ( !pImp->bClosing )
+ {
+ // falls noch ein Progress l"auft, nicht schlie\sen
+ if ( GetProgress() )
+ return sal_False;
+
+ // aus Document-Liste austragen
+ SfxApplication *pSfxApp = SFX_APP();
+ SfxObjectShellArr_Impl &rDocs = pSfxApp->GetObjectShells_Impl();
+ const SfxObjectShell *pThis = this;
+ sal_uInt16 nPos = rDocs.GetPos(pThis);
+ if ( nPos < rDocs.Count() )
+ rDocs.Remove( nPos );
+ pImp->bInList = sal_False;
+
+ // Broadcasten (w"ahrend dessen festhalten)
+ pImp->bClosing = sal_True;
+ SfxObjectShellRef aRef(this);
+/*
+ // Ist leider zu sp"at, da kaum noch Macros laufen, wenn keine ::com::sun::star::sdbcx::View
+ // mehr da ist!
+ if ( _pFactory && _pFactory->GetFlags() & SFXOBJECTSHELL_HASOPENDOC )
+ // Event nur bei echten Dokumenten
+ pSfxApp->NotifyEvent( SfxEventHint(SFX_EVENT_CLOSEDOC, this) );
+*/
+ Broadcast( SfxSimpleHint(SFX_HINT_DYING) );
+ //pImp->bClosing = sal_False;
+
+ if ( pImp->xModel.is() )
+ pImp->xModel->dispose();
+ }
+
+ return sal_True;
+}
+
+//--------------------------------------------------------------------
+
+// returns a pointer the first SfxDocument of specified type
+
+SfxObjectShell* SfxObjectShell::GetFirst
+(
+ const TypeId* pType ,
+ sal_Bool bOnlyVisible
+)
+{
+ SfxObjectShellArr_Impl &rDocs = SFX_APP()->GetObjectShells_Impl();
+
+ // seach for a SfxDocument of the specified type
+ for ( sal_uInt16 nPos = 0; nPos < rDocs.Count(); ++nPos )
+ {
+ SfxObjectShell* pSh = rDocs.GetObject( nPos );
+ if ( bOnlyVisible && pSh->IsPreview() && pSh->IsReadOnly() )
+ continue;
+
+ if ( ( !pType || pSh->IsA(*pType) ) &&
+ ( !bOnlyVisible || SfxViewFrame::GetFirst( pSh, 0, sal_True )))
+ return pSh;
+ }
+
+ return 0;
+}
+//--------------------------------------------------------------------
+
+// returns a pointer to the next SfxDocument of specified type behind *pDoc
+
+SfxObjectShell* SfxObjectShell::GetNext
+(
+ const SfxObjectShell& rPrev,
+ const TypeId* pType,
+ sal_Bool bOnlyVisible
+)
+{
+ SfxObjectShellArr_Impl &rDocs = SFX_APP()->GetObjectShells_Impl();
+
+ // refind the specified predecessor
+ sal_uInt16 nPos;
+ for ( nPos = 0; nPos < rDocs.Count(); ++nPos )
+ if ( rDocs.GetObject(nPos) == &rPrev )
+ break;
+
+ // search for the next SfxDocument of the specified type
+ for ( ++nPos; nPos < rDocs.Count(); ++nPos )
+ {
+ SfxObjectShell* pSh = rDocs.GetObject( nPos );
+ if ( bOnlyVisible && pSh->IsPreview() && pSh->IsReadOnly() )
+ continue;
+
+ if ( ( !pType || pSh->IsA(*pType) ) &&
+ ( !bOnlyVisible || SfxViewFrame::GetFirst( pSh, 0, sal_True )))
+ return pSh;
+ }
+ return 0;
+}
+
+//--------------------------------------------------------------------
+
+SfxObjectShell* SfxObjectShell::Current()
+{
+ SfxViewFrame *pFrame = SFX_APP()->GetViewFrame();
+ return pFrame ? pFrame->GetObjectShell() : 0;
+}
+
+//-------------------------------------------------------------------------
+
+sal_Bool SfxObjectShell::IsInPrepareClose() const
+
+/* [Beschreibung]
+
+ Diese Methode liefert sal_True, falls gerade ein PrepareClose laeuft.
+*/
+
+{
+ return pImp->bInPrepareClose;
+}
+
+//------------------------------------------------------------------------
+
+struct BoolEnv_Impl
+{
+ SfxObjectShell_Impl* pImp;
+ BoolEnv_Impl( SfxObjectShell_Impl* pImpP) : pImp( pImpP )
+ { pImpP->bInPrepareClose = sal_True; }
+ ~BoolEnv_Impl() { pImp->bInPrepareClose = sal_False; }
+};
+
+
+sal_uInt16 SfxObjectShell::PrepareClose
+(
+ sal_Bool bUI, // sal_True: Dialoge etc. erlaubt, sal_False: silent-mode
+ sal_Bool bForBrowsing
+)
+{
+ if( pImp->bInPrepareClose || pImp->bPreparedForClose )
+ return sal_True;
+ BoolEnv_Impl aBoolEnv( pImp );
+
+ // DocModalDialog?
+ if ( IsInModalMode() )
+ return sal_False;
+
+ SfxViewFrame* pFirst = SfxViewFrame::GetFirst( this );
+ if( pFirst && !pFirst->GetFrame()->PrepareClose_Impl( bUI, bForBrowsing ) )
+ return sal_False;
+
+ // prepare views for closing
+ for ( SfxViewFrame* pFrm = SfxViewFrame::GetFirst(
+ this, TYPE(SfxViewFrame));
+ pFrm; pFrm = SfxViewFrame::GetNext( *pFrm, this ) )
+ {
+ DBG_ASSERT(pFrm->GetViewShell(),"KeineShell");
+ if ( pFrm->GetViewShell() )
+ {
+ sal_uInt16 nRet = pFrm->GetViewShell()->PrepareClose( bUI, bForBrowsing );
+ if ( nRet != sal_True )
+ return nRet;
+ }
+ }
+
+ if( GetInPlaceObject() && GetInPlaceObject()->GetClient())
+ {
+ pImp->bPreparedForClose = sal_True;
+ return sal_True;
+ }
+
+ // ggf. nachfragen, ob gespeichert werden soll
+ // nur fuer in sichtbaren Fenstern dargestellte Dokumente fragen
+ SfxViewFrame *pFrame = SfxObjectShell::Current() == this
+ ? SfxViewFrame::Current() : SfxViewFrame::GetFirst( this );
+ while ( pFrame && (pFrame->GetFrameType() & SFXFRAME_SERVER ) )
+ pFrame = SfxViewFrame::GetNext( *pFrame, this );
+
+ SfxApplication *pSfxApp = SFX_APP();
+ pSfxApp->NotifyEvent( SfxEventHint(SFX_EVENT_PREPARECLOSEDOC, this) );
+ sal_Bool bClose = sal_False;
+ if ( bUI && IsModified() )
+ {
+ if ( pFrame )
+ {
+ // minimierte restoren
+ SfxFrame* pTop = pFrame->GetTopFrame();
+ pSfxApp->SetViewFrame( pTop->GetCurrentViewFrame() );
+ pFrame->GetFrame()->Appear();
+
+ // fragen, ob gespeichert werden soll
+ String aText( SfxResId( STR_QUERY_SAVE_DOCUMENT ) );
+ aText.SearchAndReplace( DEFINE_CONST_UNICODE( "$(DOC)" ),
+ GetTitle( SFX_TITLE_PICKLIST ) );
+ /*HACK for plugin::destroy()*/
+ // Don't show SAVE dialog in plugin mode! We save our document in every way.
+ short nRet = RET_YES;
+ if( SfxApplication::IsPlugin() == sal_False )
+ {
+ QueryBox aQBox( &pFrame->GetWindow(), WB_YES_NO_CANCEL | WB_DEF_YES, aText );
+ aQBox.SetButtonText( BUTTONID_NO, SfxResId( STR_NOSAVEANDCLOSE ) );
+ aQBox.SetButtonText( BUTTONID_YES, SfxResId( STR_SAVEDOC ) );
+ //(mba)/task if ( bForBrowsing )
+ // aQBox.AddButton( String( SfxResId( RID_STR_NEW_TASK ) ), RET_NEWTASK, BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_FOCUSBUTTON );
+ nRet = aQBox.Execute();
+ }
+ /*HACK for plugin::destroy()*/
+
+ if ( RET_YES == nRet )
+ {
+ sal_Bool bVersion = GetDocInfo().IsSaveVersionOnClose();
+
+ // per Dispatcher speichern
+ const SfxPoolItem *pPoolItem;
+ if ( bVersion )
+ {
+ SfxStringItem aItem( SID_VERSION, String( SfxResId( STR_AUTOMATICVERSION ) ) );
+ SfxBoolItem aWarnItem( SID_FAIL_ON_WARNING, TRUE );
+ const SfxPoolItem* ppArgs[] = { &aItem, &aWarnItem, 0 };
+ pPoolItem = pFrame->GetDispatcher()->Execute( SID_SAVEDOC, SFX_CALLMODE_SYNCHRON, ppArgs, 0 );
+ }
+ else
+ {
+ SfxBoolItem aWarnItem( SID_FAIL_ON_WARNING, TRUE );
+ const SfxPoolItem* ppArgs[] = { &aWarnItem, 0 };
+ pPoolItem = pFrame->GetDispatcher()->Execute( SID_SAVEDOC, SFX_CALLMODE_SYNCHRON, ppArgs, 0 );
+ }
+
+ if ( !pPoolItem || !pPoolItem->ISA(SfxBoolItem) || !( (const SfxBoolItem*) pPoolItem )->GetValue() )
+ return sal_False;
+ else
+ bClose = sal_True;
+ }
+ else if ( RET_CANCEL == nRet )
+ // abgebrochen
+ return sal_False;
+ else if ( RET_NEWTASK == nRet )
+ {
+ return RET_NEWTASK;
+ }
+ else
+ {
+ // Bei Nein nicht noch Informationlost
+ bClose = sal_True;
+
+ // nicht mehr aus Cache nachladen
+ MemCache_Impl &rCache = SfxPickList_Impl::Get()->GetMemCache();
+ rCache.RemoveObject( this );
+ }
+ }
+ }
+
+ // ggf. hinweisen, da\s unter Fremdformat gespeichert
+ if( pMedium )
+ {
+ SFX_ITEMSET_ARG( pMedium->GetItemSet(), pIgnoreInformationLost,
+ SfxBoolItem, SID_DOC_IGNOREINFORMATIONLOST, sal_False);
+ if( pIgnoreInformationLost && pIgnoreInformationLost->GetValue() )
+ bUI = sal_False;
+ }
+ if ( bUI && !bClose && IsInformationLost() )
+ {
+ // minimierte restoren
+ SfxFrame* pTop = pFrame->GetTopFrame();
+ pSfxApp->SetViewFrame( pTop->GetCurrentViewFrame() );
+ pFrame->GetFrame()->Appear();
+ QueryBox aBox( &pFrame->GetWindow(), SfxResId(MSG_CONFIRM_FILTER));
+ if ( RET_NO == aBox.Execute() )
+ return sal_False;
+ }
+
+ pImp->bPreparedForClose = sal_True;
+ return sal_True;
+}
+
+//--------------------------------------------------------------------
+
+BasicManager* SfxObjectShell::GetBasicManager() const
+{
+ return HasBasic() ? pImp->pBasicMgr : SFX_APP()->GetBasicManager();
+}
+
+sal_Bool SfxObjectShell::HasBasic() const
+{
+ if ( !pImp->bBasicInitialized )
+ {
+ String aName( GetMedium()->GetName() );
+ ((SfxObjectShell*)this)->InitBasicManager_Impl( GetStorage(), aName.Len() ? &aName : NULL );
+ }
+ return pImp->pBasicMgr != NULL;
+}
+
+//--------------------------------------------------------------------
+
+StarBASIC* SfxObjectShell::GetBasic() const
+{
+ return GetBasicManager()->GetLib(0);
+}
+
+//--------------------------------------------------------------------
+
+void SfxObjectShell::InitBasicManager_Impl
+(
+ SvStorage* pStor /* Storage, aus dem das Dokument geladen wird
+ (aus <SvPersist::Load()>) bzw. 0, falls es
+ sich um ein neues Dokument handelt
+ (aus <SvPersist::InitNew()>). */
+ , const String* pName
+)
+/* [Beschreibung]
+
+ Erzeugt einen Dokument-BasicManager und l"adt diesen ggf. (pStor != 0)
+ aus dem Storage.
+
+
+ [Anmerkung]
+
+ Diese Methode mu"s aus den "Uberladungen von <SvPersist::Load()> (mit
+ dem pStor aus dem Parameter von Load()) sowie aus der "Uberladung
+ von <SvPersist::InitNew()> (mit pStor = 0) gerufen werden.
+*/
+
+{
+ StarBASIC *pAppBasic = SFX_APP()->GetBasic();
+ DBG_ASSERT( !pImp->bBasicInitialized && !pImp->pBasicMgr, "Lokaler BasicManager bereits vorhanden");
+
+ pImp->bBasicInitialized = TRUE;
+ if ( pStor )
+ {
+ String aOldURL = INetURLObject::GetBaseURL();
+ String aNewURL;
+ if( HasName() )
+ aNewURL = GetMedium()->GetName();
+ else
+ {
+ aNewURL = GetDocInfo().GetTemplateFileName();
+ // Bei Templates keine ::com::sun::star::util::URL...
+ aNewURL = URIHelper::SmartRelToAbs( aNewURL );
+ }
+ INetURLObject::SetBaseURL( aNewURL );
+
+ // load BASIC-manager
+ SfxErrorContext aErrContext( ERRCTX_SFX_LOADBASIC, GetTitle() );
+ SfxIniManager *pIniMgr = SFX_APP()->GetIniManager();
+ String aAppBasicDir( pIniMgr->Get(SFX_KEY_BASIC_PATH) );
+ pImp->pBasicMgr = new SfxBasicManager( *pStor, pAppBasic, &aAppBasicDir );
+ if ( pImp->pBasicMgr->HasErrors() )
+ {
+ // handle errors
+ BasicError *pErr = pImp->pBasicMgr->GetFirstError();
+ while ( pErr )
+ {
+ // show message to user
+ if ( ERRCODE_BUTTON_CANCEL ==
+ ErrorHandler::HandleError( pErr->GetErrorId() ) )
+ {
+ // user wants to break loading of BASIC-manager
+ delete pImp->pBasicMgr;
+ pStor = 0;
+ break;
+ }
+ pErr = pImp->pBasicMgr->GetNextError();
+ }
+ }
+
+ INetURLObject::SetBaseURL( aOldURL );
+ }
+
+ // not loaded?
+ if ( !pStor )
+ {
+ // create new BASIC-manager
+ StarBASIC *pBas = new StarBASIC(pAppBasic);
+ pBas->SetFlag( SBX_EXTSEARCH );
+ pImp->pBasicMgr = new SfxBasicManager( pBas );
+ }
+
+ // damit auch Dialoge etc. 'qualifiziert' angesprochen werden k"onnen
+ StarBASIC *pBas = pImp->pBasicMgr->GetLib(0);
+ // Initialize Uno
+ //pBas->setRoot( GetModel() );
+ sal_Bool bWasModified = pBas->IsModified();
+ pBas->SetParent( pAppBasic );
+
+ // Properties im Doc-BASIC
+ // ThisComponent
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xInterface ( GetModel(), ::com::sun::star::uno::UNO_QUERY );
+ ::com::sun::star::uno::Any aComponent;
+ aComponent <<= xInterface;
+ SbxObjectRef xUnoObj = GetSbUnoObject( DEFINE_CONST_UNICODE("ThisComponent"), aComponent );
+ xUnoObj->SetFlag( SBX_DONTSTORE );
+ pBas->Insert( xUnoObj );
+
+ // Modify-Flag wird bei MakeVariable gesetzt
+ pBas->SetModified( bWasModified );
+}
+
+//--------------------------------------------------------------------
+#if 0 //(mba)
+SotObjectRef SfxObjectShell::CreateAggObj( const SotFactory* pFact )
+{
+ // SvDispatch?
+ SotFactory* pDispFact = SvDispatch::ClassFactory();
+ if( pFact == pDispFact )
+ return( (SfxShellObject*)GetSbxObject() );
+
+ // sonst unbekannte Aggregation
+ DBG_ERROR("unkekannte Factory");
+ SotObjectRef aSvObjectRef;
+ return aSvObjectRef;
+}
+#endif
+
+//--------------------------------------------------------------------
+
+sal_uInt16 SfxObjectShell::Count()
+{
+ return SFX_APP()->GetObjectShells_Impl().Count();
+}
+
+//--------------------------------------------------------------------
+
+sal_Bool SfxObjectShell::DoClose()
+{
+ return Close();
+}
+
+//--------------------------------------------------------------------
+
+void SfxObjectShell::SetLastMark_Impl( const String &rMark )
+{
+ pImp->aMark = rMark;
+}
+
+//--------------------------------------------------------------------
+
+const String& SfxObjectShell::GetLastMark_Impl() const
+{
+ return pImp->aMark;
+}
+
+//--------------------------------------------------------------------
+
+SfxObjectShell* SfxObjectShell::GetObjectShell()
+{
+ return this;
+}
+
+//--------------------------------------------------------------------
+/* ASDBG
+void SfxObjectShell::SetModel( SfxModel* pModel )
+{
+ if ( pImp->xModel.is() )
+ DBG_WARNING( "Model already set!" );
+ pImp->xModel = pModel;
+}
+
+//--------------------------------------------------------------------
+
+XModel* SfxObjectShell::GetModel()
+{
+ return pImp->xModel;
+}
+*/
+//--------------------------------------------------------------------
+
+void SfxObjectShell::SetModel( SfxBaseModel* pModel )
+{
+ if ( pImp->xModel.is() )
+ DBG_WARNING( "Model already set!" );
+
+ pImp->xModel = pModel;
+}
+
+//--------------------------------------------------------------------
+
+::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > SfxObjectShell::GetModel()
+{
+ return pImp->xModel;
+}
+
+void SfxObjectShell::SetBaseModel( SfxBaseModel* pModel )
+{
+ if ( pImp->xModel.is() )
+ DBG_WARNING( "Model already set!" );
+
+ pImp->xModel = pModel;
+}
+
+//--------------------------------------------------------------------
+
+::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > SfxObjectShell::GetBaseModel()
+{
+ return pImp->xModel;
+}
+
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
new file mode 100644
index 000000000000..cd9299dd852a
--- /dev/null
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -0,0 +1,1483 @@
+/*************************************************************************
+ *
+ * $RCSfile: sfxbasemodel.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:32 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+//________________________________________________________________________________________________________
+// my own includes
+//________________________________________________________________________________________________________
+
+#ifndef _SFX_SFXBASEMODEL_HXX_
+#include <sfxbasemodel.hxx>
+#endif
+
+//________________________________________________________________________________________________________
+// include of other projects
+//________________________________________________________________________________________________________
+
+#ifndef _COM_SUN_STAR_VIEW_XSELECTIONSUPPLIER_HPP_
+#include <com/sun/star/view/XSelectionSupplier.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_AWT_SIZE_HPP_
+#include <com/sun/star/awt/Size.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_LANG_DISPOSEDEXCEPTION_HPP_
+#include <com/sun/star/lang/DisposedException.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_LANG_ILLEGALARGUMENTEXCEPTION_HPP_
+#include <com/sun/star/lang/IllegalArgumentException.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_VIEW_PAPERFORMAT_HPP_
+#include <com/sun/star/view/PaperFormat.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_VIEW_PAPERORIENTATION_HPP_
+#include <com/sun/star/view/PaperOrientation.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_VIEW_PAPERORIENTATION_HPP_
+#include <com/sun/star/view/PaperOrientation.hpp>
+#endif
+
+#ifndef _CPPUHELPER_INTERFACECONTAINER_HXX_
+#include <cppuhelper/interfacecontainer.hxx>
+#endif
+
+//ASDBG #ifndef _USR_SMARTCONV_HXX_
+//ASDBG #include <usr/smartconv.hxx>
+//ASDBG #endif
+
+#ifndef _UNO_MAPPING_HXX_
+#include <uno/mapping.hxx>
+#endif
+
+#ifndef _SFXITEMSET_HXX
+#include <svtools/itemset.hxx>
+#endif
+
+#ifndef _SFXSTRITEM_HXX
+#include <svtools/stritem.hxx>
+#endif
+
+#ifndef _SFXINTITEM_HXX
+#include <svtools/intitem.hxx>
+#endif
+
+#ifndef _SFXENUMITEM_HXX
+#include <svtools/eitem.hxx>
+#endif
+
+//________________________________________________________________________________________________________
+// includes of my own project
+//________________________________________________________________________________________________________
+
+#ifndef _SFX_SFXUNO_HXX
+#include <sfxuno.hxx>
+#endif
+
+#ifndef _SFX_OBJSHIMP_HXX
+#include <objshimp.hxx>
+#endif
+
+#ifndef _SFXVIEWFRM_HXX
+#include <viewfrm.hxx>
+#endif
+
+#ifndef _SFXVIEWSH_HXX
+#include <viewsh.hxx>
+#endif
+
+#ifndef _SFXDOCFILE_HXX
+#include <docfile.hxx>
+#endif
+
+#ifndef _SFXDISPATCH_HXX
+#include <dispatch.hxx>
+#endif
+
+#ifndef _SFXREQUEST_HXX
+#include <request.hxx>
+#endif
+
+#ifndef _SFX_OBJUNO_HXX
+#include <objuno.hxx>
+#endif
+
+#ifndef _SFX_PRINTER_HXX
+#include <printer.hxx>
+#endif
+
+#include <vos/mutex.hxx>
+
+#include "sfxsids.hrc"
+
+//________________________________________________________________________________________________________
+// defines
+//________________________________________________________________________________________________________
+
+#define SfxIOException_Impl( nErr ) ::com::sun::star::io::IOException()
+
+#define XFRAME ::com::sun::star::frame::XFrame
+#define XINTERFACE ::com::sun::star::uno::XInterface
+#define OMULTITYPEINTERFACECONTAINERHELPER ::cppu::OMultiTypeInterfaceContainerHelper
+#define UNO_QUERY ::com::sun::star::uno::UNO_QUERY
+#define DISPOSEDEXCEPTION ::com::sun::star::lang::DisposedException
+#define MAPPING ::com::sun::star::uno::Mapping
+#define XSELECTIONSUPPLIER ::com::sun::star::view::XSelectionSupplier
+#define ANY ::com::sun::star::uno::Any
+#define ILLEGALARGUMENTEXCEPTION ::com::sun::star::lang::IllegalArgumentException
+#define OINTERFACECONTAINERHELPER ::cppu::OInterfaceContainerHelper
+#define OINTERFACEITERATORHELPER ::cppu::OInterfaceIteratorHelper
+#define SIZE ::com::sun::star::awt::Size
+#define PAPERFORMAT ::com::sun::star::view::PaperFormat
+#define PAPERORIENTATION ::com::sun::star::view::PaperOrientation
+#define OTYPECOLLECTION ::cppu::OTypeCollection
+#define OIMPLEMENTATIONID ::cppu::OImplementationId
+#define MUTEXGUARD ::osl::MutexGuard
+
+//________________________________________________________________________________________________________
+// namespaces
+//________________________________________________________________________________________________________
+
+//using namespace ::osl ;
+//using namespace ::rtl ;
+//using namespace ::cppu ;
+//using namespace ::com::sun::star::uno ;
+//using namespace ::com::sun::star::container ;
+//using namespace ::com::sun::star::frame ;
+//using namespace ::com::sun::star::document ;
+//using namespace ::com::sun::star::lang ;
+//using namespace ::com::sun::star::util ;
+//using namespace ::com::sun::star::view ;
+//using namespace ::com::sun::star::beans ;
+
+//________________________________________________________________________________________________________
+// impl. declarations
+//________________________________________________________________________________________________________
+
+struct IMPL_SfxBaseModel_DataContainer
+{
+ SfxObjectShell* m_pObjectShell ;
+ OUSTRING m_sURL ;
+ sal_uInt16 m_nControllerLockCount ;
+ OMULTITYPEINTERFACECONTAINERHELPER m_aInterfaceContainer ;
+ REFERENCE< XINTERFACE > m_xParent ;
+ REFERENCE< XCONTROLLER > m_xCurrent ;
+ REFERENCE< XDOCUMENTINFO > m_xDocumentInfo ;
+ SEQUENCE< PROPERTYVALUE> m_seqArguments ;
+ SEQUENCE< REFERENCE< XCONTROLLER > > m_seqControllers ;
+
+ IMPL_SfxBaseModel_DataContainer::IMPL_SfxBaseModel_DataContainer( MUTEX& aMutex ,
+ SfxObjectShell* pObjectShell )
+ : m_pObjectShell ( pObjectShell )
+ , m_sURL ( String() )
+ , m_nControllerLockCount ( 0 )
+ , m_aInterfaceContainer ( aMutex )
+ {
+ }
+
+} ;
+
+/* ASDBG
+//________________________________________________________________________________________________________
+// methods for bridging smart<->uno3
+// Please don't use! Will be deleted in ... days :-)
+//________________________________________________________________________________________________________
+
+REFERENCE< XMODEL > impl_Smart2Uno3_XModel( XModel* pSmart )
+{
+ MAPPING aConverter( "smart" , CPPU_CURRENT_LANGUAGE_BINDING_NAME ) ;
+
+ XMODEL* pUno3 = SAL_STATIC_CAST(XMODEL*,(aConverter.mapInterface( pSmart, ::getCppuType((const REFERENCE< XMODEL >*)0) ))) ;
+ REFERENCE< XMODEL > xUno3 = pUno3 ;
+
+ xUno3->release() ;
+
+ return xUno3 ;
+}
+
+REFERENCE< XCONTROLLER > impl_Smart2Uno3_XController( XController* pSmart )
+{
+ MAPPING aConverter( "smart" , CPPU_CURRENT_LANGUAGE_BINDING_NAME ) ;
+
+ XCONTROLLER* pUno3 = SAL_STATIC_CAST(XCONTROLLER*,(aConverter.mapInterface( pSmart, ::getCppuType((const REFERENCE< XCONTROLLER >*)0) ))) ;
+ REFERENCE< XCONTROLLER > xUno3 = pUno3 ;
+
+ xUno3->release() ;
+
+ return xUno3 ;
+}
+
+REFERENCE< XDOCUMENTINFO > impl_Smart2Uno3_XDocumentInfo( XDocumentInfo* pSmart )
+{
+ MAPPING aConverter( "smart" , CPPU_CURRENT_LANGUAGE_BINDING_NAME ) ;
+
+ XDOCUMENTINFO* pUno3 = SAL_STATIC_CAST(XDOCUMENTINFO*,(aConverter.mapInterface( pSmart, ::getCppuType((const REFERENCE< XDOCUMENTINFO >*)0) ))) ;
+ REFERENCE< XDOCUMENTINFO > xUno3 = pUno3 ;
+
+ xUno3->release() ;
+
+ return xUno3 ;
+}
+
+SEQUENCE< PROPERTYVALUE > impl_Smart2Uno3_seqPropertyValue( const Sequence< PropertyValue >& seqSmart )
+{
+ sal_Int32 nCount = seqSmart.getLen() ;
+ const PropertyValue* pSmartProperty = seqSmart.getConstArray() ;
+ sal_Int32 nPosition = 0 ;
+
+ SEQUENCE< PROPERTYVALUE > seqUno3 ( nCount ) ;
+ PROPERTYVALUE* pUno3Property = seqUno3.getArray() ;
+
+ for ( nPosition=0; nPosition<nCount; nPosition++ )
+ {
+ pUno3Property[nPosition].Name = pSmartProperty[nPosition].Name ;
+ pUno3Property[nPosition].Handle = pSmartProperty[nPosition].Handle ;
+ switch ( pSmartProperty[nPosition].State )
+ {
+ case PropertyState_DIRECT_VALUE : pUno3Property[nPosition].State = ::com::sun::star::beans::PropertyState_DIRECT_VALUE ;
+ break;
+ case PropertyState_DEFAULT_VALUE : pUno3Property[nPosition].State = ::com::sun::star::beans::PropertyState_DEFAULT_VALUE ;
+ break;
+ case PropertyState_AMBIGUOUS_VALUE : pUno3Property[nPosition].State = ::com::sun::star::beans::PropertyState_AMBIGUOUS_VALUE ;
+ break;
+ default: DBG_ASSERT ( sal_False, "SfxBaseModel::impl_Smart2Uno3_sePropertyValue()\nPropertyState unknown!\n" ) ;
+ }
+ ::usr::convertUsr2UnoAny( pUno3Property[nPosition].Value, pSmartProperty[nPosition].Value ) ;
+ }
+
+ return seqUno3 ;
+}
+*/
+SIZE impl_Size_Object2Struct( const Size& aSize )
+{
+ SIZE aReturnValue;
+
+ aReturnValue.Width = aSize.Width() ;
+ aReturnValue.Height = aSize.Height() ;
+
+ return aReturnValue ;
+}
+
+Size impl_Size_Struct2Object( const SIZE& aSize )
+{
+ Size aReturnValue;
+
+ aReturnValue.Width() = aSize.Width ;
+ aReturnValue.Height() = aSize.Height ;
+
+ return aReturnValue ;
+}
+
+//________________________________________________________________________________________________________
+// constructor
+//________________________________________________________________________________________________________
+
+SfxBaseModel::SfxBaseModel( SfxObjectShell *pObjectShell ) : IMPL_SfxBaseModel_MutexContainer ( )
+ , m_pData ( new IMPL_SfxBaseModel_DataContainer( m_aMutex, pObjectShell ) )
+{
+ if ( pObjectShell != NULL )
+ {
+ StartListening( *pObjectShell ) ;
+ }
+}
+
+//________________________________________________________________________________________________________
+// destructor
+//________________________________________________________________________________________________________
+
+SfxBaseModel::~SfxBaseModel()
+{
+ delete m_pData ;
+}
+
+//________________________________________________________________________________________________________
+// XInterface
+//________________________________________________________________________________________________________
+
+ANY SAL_CALL SfxBaseModel::queryInterface( const UNOTYPE& rType ) throw( RUNTIMEEXCEPTION )
+{
+ // Attention:
+ // Don't use mutex or guard in this method!!! Is a method of XInterface.
+
+ // Ask for my own supported interfaces ...
+ ANY aReturn( ::cppu::queryInterface( rType ,
+ static_cast< XTYPEPROVIDER* > ( this ) ,
+ static_cast< XCHILD* > ( this ) ,
+ static_cast< XDOCUMENTINFOSUPPLIER* > ( this ) ,
+ static_cast< XEVENTLISTENER* > ( this ) ,
+ static_cast< XMODEL* > ( this ) ,
+ static_cast< XMODIFIABLE* > ( this ) ,
+ static_cast< XMODIFYBROADCASTER* > ( this ) ,
+ static_cast< XCOMPONENT* > ( this ) ,
+ static_cast< XPRINTABLE* > ( this ) ,
+ static_cast< XSTORABLE* > ( this ) ) ) ;
+
+ // If searched interface supported by this class ...
+ if ( aReturn.hasValue() == sal_True )
+ {
+ // ... return this information.
+ return aReturn ;
+ }
+ else
+ {
+ // Else; ... ask baseclass for interfaces!
+ return OWeakObject::queryInterface( rType ) ;
+ }
+}
+
+//________________________________________________________________________________________________________
+// XInterface
+//________________________________________________________________________________________________________
+
+void SAL_CALL SfxBaseModel::acquire() throw( RUNTIMEEXCEPTION )
+{
+ // Attention:
+ // Don't use mutex or guard in this method!!! Is a method of XInterface.
+
+ // Forward to baseclass
+ OWeakObject::acquire() ;
+}
+
+//________________________________________________________________________________________________________
+// XInterface
+//________________________________________________________________________________________________________
+
+void SAL_CALL SfxBaseModel::release() throw( RUNTIMEEXCEPTION )
+{
+ // Attention:
+ // Don't use mutex or guard in this method!!! Is a method of XInterface.
+
+ // Forward to baseclass
+ OWeakObject::release() ;
+}
+
+//________________________________________________________________________________________________________
+// XTypeProvider
+//________________________________________________________________________________________________________
+
+SEQUENCE< UNOTYPE > SAL_CALL SfxBaseModel::getTypes() throw( RUNTIMEEXCEPTION )
+{
+ // Optimize this method !
+ // We initialize a static variable only one time. And we don't must use a mutex at every call!
+ // For the first call; pTypeCollection is NULL - for the second call pTypeCollection is different from NULL!
+ static OTYPECOLLECTION* pTypeCollection = NULL ;
+
+ if ( pTypeCollection == NULL )
+ {
+ // Ready for multithreading; get global mutex for first call of this method only! see before
+ MUTEXGUARD aGuard( MUTEX::getGlobalMutex() ) ;
+
+ // Control these pointer again ... it can be, that another instance will be faster then these!
+ if ( pTypeCollection == NULL )
+ {
+ // Create a static typecollection ...
+ static OTYPECOLLECTION aTypeCollection( ::getCppuType(( const REFERENCE< XTYPEPROVIDER >*)NULL ) ,
+ ::getCppuType(( const REFERENCE< XCHILD >*)NULL ) ,
+ ::getCppuType(( const REFERENCE< XDOCUMENTINFOSUPPLIER >*)NULL ) ,
+ ::getCppuType(( const REFERENCE< XEVENTLISTENER >*)NULL ) ,
+ ::getCppuType(( const REFERENCE< XMODEL >*)NULL ) ,
+ ::getCppuType(( const REFERENCE< XMODIFIABLE >*)NULL ) ,
+ ::getCppuType(( const REFERENCE< XPRINTABLE >*)NULL ) ,
+ ::getCppuType(( const REFERENCE< XSTORABLE >*)NULL ) ) ;
+
+ // ... and set his address to static pointer!
+ pTypeCollection = &aTypeCollection ;
+ }
+ }
+
+ return pTypeCollection->getTypes() ;
+}
+
+//________________________________________________________________________________________________________
+// XTypeProvider
+//________________________________________________________________________________________________________
+
+SEQUENCE< sal_Int8 > SAL_CALL SfxBaseModel::getImplementationId() throw( RUNTIMEEXCEPTION )
+{
+ // Create one Id for all instances of this class.
+ // Use ethernet address to do this! (sal_True)
+
+ // Optimize this method
+ // We initialize a static variable only one time. And we don't must use a mutex at every call!
+ // For the first call; pID is NULL - for the second call pID is different from NULL!
+ static OIMPLEMENTATIONID* pID = NULL ;
+
+ if ( pID == NULL )
+ {
+ // Ready for multithreading; get global mutex for first call of this method only! see before
+ MUTEXGUARD aGuard( MUTEX::getGlobalMutex() ) ;
+
+ // Control these pointer again ... it can be, that another instance will be faster then these!
+ if ( pID == NULL )
+ {
+ // Create a new static ID ...
+ static OIMPLEMENTATIONID aID( sal_False ) ;
+ // ... and set his address to static pointer!
+ pID = &aID ;
+ }
+ }
+
+ return pID->getImplementationId() ;
+}
+
+//________________________________________________________________________________________________________
+// XChild
+//________________________________________________________________________________________________________
+
+REFERENCE< XINTERFACE > SAL_CALL SfxBaseModel::getParent() throw( RUNTIMEEXCEPTION )
+{
+/* #77222#
+ AS->MBA: There is one view only at the moment. We don't must search for other parents in other frames ...!?
+
+ if ( !m_pData->m_xParent.is() && m_pData->m_xCurrent.is() )
+ {
+ // If no parent is set get the parent by view hierarchy
+ REFERENCE< XFRAME > xParentFrame( m_pData->m_xCurrent->getFrame()->getCreator(), UNO_QUERY );
+ if ( xParentFrame.is() )
+ {
+ REFERENCE< XCONTROLLER > xCtrl( xParentFrame->getController() );
+ if ( xCtrl.is() )
+ return xCtrl->getModel();
+ }
+ }
+*/
+ return m_pData->m_xParent;
+}
+
+//________________________________________________________________________________________________________
+// XChild
+//________________________________________________________________________________________________________
+
+void SAL_CALL SfxBaseModel::setParent(const REFERENCE< XINTERFACE >& Parent) throw(NOSUPPORTEXCEPTION, RUNTIMEEXCEPTION)
+{
+ if ( Parent.is() && getParent().is() )
+ // only set parent when no parent is available
+ throw NOSUPPORTEXCEPTION();
+
+ m_pData->m_xParent = Parent;
+}
+
+//________________________________________________________________________________________________________
+// XChild
+//________________________________________________________________________________________________________
+
+long SfxObjectShellClose_Impl( void* pObj, void* pArg );
+
+void SAL_CALL SfxBaseModel::dispose()
+{
+ // object already disposed?
+ if ( impl_isDisposed() )
+ throw DISPOSEDEXCEPTION();
+
+ EVENTOBJECT aEvent( (XMODEL *)this );
+ m_pData->m_aInterfaceContainer.disposeAndClear( aEvent );
+
+ // is an object shell assigned?
+ if ( m_pData->m_pObjectShell )
+ {
+ // Rekursion vermeiden
+ SfxObjectShell *pShell;
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ {
+ ::osl::MutexGuard aGuard( m_aMutex );
+ pShell = m_pData->m_pObjectShell;
+ EndListening( *pShell );
+ m_pData->m_pObjectShell = NULL;
+ }
+
+ // Bei dispose keine Speichern-R"uckfrage
+ if ( pShell->IsEnableSetModified() && !pShell->Get_Impl()->bClosing )
+ pShell->SetModified( sal_False );
+ SfxObjectShellClose_Impl( 0, (void*) pShell );
+ }
+
+ ::osl::MutexGuard aGuard( m_aMutex );
+ m_pData->m_xCurrent = REFERENCE< XCONTROLLER > ();
+//ASDBG for ( sal_uInt32 n = m_pData->m_seqControllers.getLength(); n; --n )
+//ASDBG SEQUENCERemoveElementAt( m_pData->m_seqControllers, n-1 );
+ m_pData->m_seqControllers = SEQUENCE< REFERENCE< XCONTROLLER > > () ;
+}
+
+//________________________________________________________________________________________________________
+// XChild
+//________________________________________________________________________________________________________
+
+void SAL_CALL SfxBaseModel::addEventListener( const REFERENCE< XEVENTLISTENER >& aListener )
+{
+ // object already disposed?
+ if ( impl_isDisposed() )
+ throw DISPOSEDEXCEPTION();
+
+ m_pData->m_aInterfaceContainer.addInterface( ::getCppuType((const REFERENCE< XEVENTLISTENER >*)0), aListener );
+}
+
+//________________________________________________________________________________________________________
+// XChild
+//________________________________________________________________________________________________________
+
+void SAL_CALL SfxBaseModel::removeEventListener( const REFERENCE< XEVENTLISTENER >& aListener )
+{
+ // object already disposed?
+ if ( impl_isDisposed() )
+ throw DISPOSEDEXCEPTION();
+
+ m_pData->m_aInterfaceContainer.removeInterface( ::getCppuType((const REFERENCE< XEVENTLISTENER >*)0), aListener );
+}
+
+//________________________________________________________________________________________________________
+// XDOCUMENTINFOSupplier
+//________________________________________________________________________________________________________
+
+REFERENCE< XDOCUMENTINFO > SAL_CALL SfxBaseModel::getDocumentInfo()
+{
+ // object already disposed?
+ if ( impl_isDisposed() )
+ throw DISPOSEDEXCEPTION();
+
+ ::osl::MutexGuard aGuard( m_aMutex );
+ if ( !m_pData->m_xDocumentInfo.is() && m_pData->m_pObjectShell )
+ {
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ ((SfxBaseModel*)this)->m_pData->m_xDocumentInfo = new SfxDocumentInfoObject( m_pData->m_pObjectShell ) ;
+ }
+
+ return m_pData->m_xDocumentInfo;
+}
+
+//________________________________________________________________________________________________________
+// XEVENTLISTENER
+//________________________________________________________________________________________________________
+
+void SAL_CALL SfxBaseModel::disposing( const EVENTOBJECT& aObject )
+{
+ REFERENCE< XMODIFYLISTENER > xMod( aObject.Source, UNO_QUERY );
+ REFERENCE< XEVENTLISTENER > xListener( aObject.Source, UNO_QUERY );
+ if ( xMod.is() )
+ m_pData->m_aInterfaceContainer.removeInterface( ::getCppuType((const REFERENCE< XMODIFYLISTENER >*)0), xMod );
+ else if ( xListener.is() )
+ m_pData->m_aInterfaceContainer.removeInterface( ::getCppuType((const REFERENCE< XEVENTLISTENER >*)0), xListener );
+
+ ::osl::MutexGuard aGuard( m_aMutex );
+ sal_uInt32 nCount = m_pData->m_seqControllers.getLength();
+ for ( sal_uInt32 n = 0; n < nCount; n++ )
+ {
+ if( m_pData->m_seqControllers.getConstArray()[n] == aObject.Source )
+ {
+ m_pData->m_seqControllers.getArray()[n] = REFERENCE< XCONTROLLER > () ;
+ break;
+ }
+//ASDBG if( m_pData->m_seqControllers.getConstArray()[n] == aObject.Source )
+//ASDBG {
+//ASDBG SequenceRemoveElementAt( m_pData->m_seqControllers, n );
+//ASDBG break;
+//ASDBG }
+ }
+
+ if ( m_pData->m_xCurrent.is() && m_pData->m_xCurrent == aObject.Source )
+ m_pData->m_xCurrent = REFERENCE< XCONTROLLER > ();
+}
+
+//________________________________________________________________________________________________________
+// XMODEL
+//________________________________________________________________________________________________________
+
+sal_Bool SAL_CALL SfxBaseModel::attachResource( const OUSTRING& rURL ,
+ const SEQUENCE< PROPERTYVALUE >& rArgs )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ m_pData->m_sURL = rURL ;
+ m_pData->m_seqArguments = rArgs ;
+ return sal_True ;
+}
+
+//________________________________________________________________________________________________________
+// XMODEL
+//________________________________________________________________________________________________________
+
+OUSTRING SAL_CALL SfxBaseModel::getURL()
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ return m_pData->m_sURL ;
+}
+
+//________________________________________________________________________________________________________
+// XMODEL
+//________________________________________________________________________________________________________
+
+SEQUENCE< PROPERTYVALUE > SAL_CALL SfxBaseModel::getArgs()
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ return m_pData->m_seqArguments ;
+}
+
+//________________________________________________________________________________________________________
+// XMODEL
+//________________________________________________________________________________________________________
+
+void SAL_CALL SfxBaseModel::connectController( const REFERENCE< XCONTROLLER >& xController )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ sal_uInt32 nOldCount = m_pData->m_seqControllers.getLength();
+ SEQUENCE<REFERENCE< XCONTROLLER > > aNewSeq( nOldCount + 1 );
+ for ( sal_uInt32 n = 0; n < nOldCount; n++ )
+ aNewSeq.getArray()[n] = m_pData->m_seqControllers.getConstArray()[n];
+ aNewSeq.getArray()[nOldCount] = xController;
+ m_pData->m_seqControllers = aNewSeq;
+}
+
+//________________________________________________________________________________________________________
+// XMODEL
+//________________________________________________________________________________________________________
+
+void SAL_CALL SfxBaseModel::disconnectController( const REFERENCE< XCONTROLLER >& xController )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ sal_uInt32 nOldCount = m_pData->m_seqControllers.getLength();
+ SEQUENCE<REFERENCE< XCONTROLLER > > aNewSeq( nOldCount - 1 );
+ for ( sal_uInt32 nOld = 0, nNew = 0; nOld < nOldCount; ++nOld )
+ if ( xController != m_pData->m_seqControllers.getConstArray()[nOld] )
+ {
+ aNewSeq.getArray()[nNew] = m_pData->m_seqControllers.getConstArray()[nOld];
+ ++nNew;
+ }
+ m_pData->m_seqControllers = aNewSeq;
+
+ if ( xController == m_pData->m_xCurrent )
+ m_pData->m_xCurrent = REFERENCE< XCONTROLLER > ();
+}
+
+//________________________________________________________________________________________________________
+// XMODEL
+//________________________________________________________________________________________________________
+
+void SAL_CALL SfxBaseModel::lockControllers()
+{
+ ++m_pData->m_nControllerLockCount ;
+}
+
+//________________________________________________________________________________________________________
+// XMODEL
+//________________________________________________________________________________________________________
+
+void SAL_CALL SfxBaseModel::unlockControllers()
+{
+ --m_pData->m_nControllerLockCount ;
+}
+
+//________________________________________________________________________________________________________
+// XMODEL
+//________________________________________________________________________________________________________
+
+sal_Bool SAL_CALL SfxBaseModel::hasControllersLocked()
+{
+ return ( m_pData->m_nControllerLockCount != 0 ) ;
+}
+
+//________________________________________________________________________________________________________
+// XMODEL
+//________________________________________________________________________________________________________
+
+REFERENCE< XCONTROLLER > SAL_CALL SfxBaseModel::getCurrentController()
+{
+ // object already disposed?
+ if ( impl_isDisposed() )
+ throw DISPOSEDEXCEPTION();
+
+ // is the active controller a controller of this model?
+ SfxViewFrame *pCurViewFrame = SfxViewFrame::Current();
+
+//ASDBG XCONTROLLER *pController = pCurViewFrame &&
+//ASDBG pCurViewFrame->GetObjectShell()->GetModel() == (XMODEL*) this
+//ASDBG ? pCurViewFrame->GetFrame()->GetController()
+//ASDBG : 0;
+
+ REFERENCE< XMODEL > xShellModel = pCurViewFrame->GetObjectShell()->GetModel() ;
+ REFERENCE< XMODEL > xMyModel (SAL_STATIC_CAST(XMODEL*,this)) ;
+ REFERENCE< XCONTROLLER > xController ;
+
+ if ( pCurViewFrame && ( xShellModel == xMyModel ) )
+ {
+ xController = pCurViewFrame->GetFrame()->GetController() ;
+ }
+
+ if ( xController.is() )
+ return xController;
+
+ // get the least active controller of this model
+ ::osl::MutexGuard aGuard( m_aMutex );
+ if ( m_pData->m_xCurrent.is() )
+ return m_pData->m_xCurrent;
+
+ // get the first controller of this model
+ return m_pData->m_seqControllers.getLength() ? m_pData->m_seqControllers.getConstArray()[0] : m_pData->m_xCurrent;
+}
+
+//________________________________________________________________________________________________________
+// XMODEL
+//________________________________________________________________________________________________________
+
+void SAL_CALL SfxBaseModel::setCurrentController( const REFERENCE< XCONTROLLER >& xCurrentController )
+{
+ // object already disposed?
+ if ( impl_isDisposed() )
+ throw DISPOSEDEXCEPTION();
+
+ ::osl::MutexGuard aGuard( m_aMutex );
+ m_pData->m_xCurrent = xCurrentController;
+}
+
+//________________________________________________________________________________________________________
+// XMODEL
+//________________________________________________________________________________________________________
+
+REFERENCE< XINTERFACE > SAL_CALL SfxBaseModel::getCurrentSelection()
+{
+ // object already disposed?
+ if ( impl_isDisposed() )
+ throw DISPOSEDEXCEPTION();
+
+ REFERENCE< XINTERFACE > xReturn;
+ REFERENCE< XCONTROLLER > xController = getCurrentController() ;
+
+ if ( xController.is() )
+ {
+ REFERENCE< XSELECTIONSUPPLIER > xDocView( xController, UNO_QUERY );
+ if ( xDocView.is() )
+ {
+ ANY xSel = xDocView->getSelection();
+ // automatisch auskommentiert - Wird von UNO III nicht weiter untersttzt!
+ // return xSel.getReflection() == XINTERFACE_getReflection()
+ // return xSel.getValueType() == ::getCppuType((const XINTERFACE*)0)
+ // ? *(REFERENCE< XINTERFACE > *) xSel.get() : REFERENCE< XINTERFACE > ();
+ xSel >>= xReturn ;
+ }
+ }
+
+ return xReturn ;
+}
+
+//________________________________________________________________________________________________________
+// XModifiable
+//________________________________________________________________________________________________________
+
+sal_Bool SAL_CALL SfxBaseModel::isModified()
+{
+ // object already disposed?
+ if ( impl_isDisposed() )
+ throw DISPOSEDEXCEPTION();
+
+ ::osl::MutexGuard aGuard( m_aMutex );
+ return m_pData->m_pObjectShell ? m_pData->m_pObjectShell->IsModified() : sal_False;
+}
+
+//________________________________________________________________________________________________________
+// XModifiable
+//________________________________________________________________________________________________________
+
+void SAL_CALL SfxBaseModel::setModified( sal_Bool bModified )
+{
+ // object already disposed?
+ if ( impl_isDisposed() )
+ throw DISPOSEDEXCEPTION();
+
+ if ( m_pData->m_pObjectShell )
+ {
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ m_pData->m_pObjectShell->SetModified(bModified);
+ }
+}
+
+//________________________________________________________________________________________________________
+// XModifiable
+//________________________________________________________________________________________________________
+
+void SAL_CALL SfxBaseModel::addModifyListener(const REFERENCE< XMODIFYLISTENER >& xListener) throw(RUNTIMEEXCEPTION )
+{
+ // object already disposed?
+ if ( impl_isDisposed() )
+ throw DISPOSEDEXCEPTION();
+
+ m_pData->m_aInterfaceContainer.addInterface( ::getCppuType((const REFERENCE< XMODIFYLISTENER >*)0),xListener );
+}
+
+//________________________________________________________________________________________________________
+// XModifiable
+//________________________________________________________________________________________________________
+
+void SAL_CALL SfxBaseModel::removeModifyListener(const REFERENCE< XMODIFYLISTENER >& xListener) throw(RUNTIMEEXCEPTION )
+{
+ // object already disposed?
+ if ( impl_isDisposed() )
+ throw DISPOSEDEXCEPTION();
+
+ m_pData->m_aInterfaceContainer.removeInterface( ::getCppuType((const REFERENCE< XMODIFYLISTENER >*)0), xListener );
+}
+
+//________________________________________________________________________________________________________
+// XPrintable
+//________________________________________________________________________________________________________
+
+SEQUENCE< PROPERTYVALUE > SAL_CALL SfxBaseModel::getPrinter()
+{
+ // object already disposed?
+ if ( impl_isDisposed() )
+ throw DISPOSEDEXCEPTION();
+
+ // Printer beschaffen
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ SfxViewFrame *pViewFrm = m_pData->m_pObjectShell ? SfxViewFrame::GetFirst( m_pData->m_pObjectShell, 0, sal_False ) : 0;
+ if ( !pViewFrm )
+ return SEQUENCE<PROPERTYVALUE>();
+ const SfxPrinter *pPrinter = pViewFrm->GetViewShell()->GetPrinter(sal_True);
+ if ( !pPrinter )
+ return SEQUENCE<PROPERTYVALUE>();
+
+ // Printer Eigenschaften uebertragen
+ SEQUENCE<PROPERTYVALUE> aPrinter(8);
+
+ aPrinter.getArray()[7].Name = DEFINE_CONST_UNICODE( "CanSetPaperSize" );
+//ASDBG aPrinter.getArray()[7].Value.setBOOL( pPrinter->HasSupport( SUPPORT_SET_PAPERSIZE ) );
+ aPrinter.getArray()[7].Value <<= ( pPrinter->HasSupport( SUPPORT_SET_PAPERSIZE ) );
+
+ aPrinter.getArray()[6].Name = DEFINE_CONST_UNICODE( "CanSetPaperFormat" );
+//ASDBG aPrinter.getArray()[6].Value.setBOOL( pPrinter->HasSupport( SUPPORT_SET_PAPER ) );
+ aPrinter.getArray()[6].Value <<= ( pPrinter->HasSupport( SUPPORT_SET_PAPER ) );
+
+ aPrinter.getArray()[5].Name = DEFINE_CONST_UNICODE( "CanSetPaperOrientation" );
+//ASDBG aPrinter.getArray()[5].Value.setBOOL( pPrinter->HasSupport( SUPPORT_SET_ORIENTATION ) );
+ aPrinter.getArray()[5].Value <<= ( pPrinter->HasSupport( SUPPORT_SET_ORIENTATION ) );
+
+ aPrinter.getArray()[4].Name = DEFINE_CONST_UNICODE( "IsBusy" );
+//ASDBG aPrinter.getArray()[4].Value.setBOOL( pPrinter->IsJobActive() );
+ aPrinter.getArray()[4].Value <<= ( pPrinter->IsJobActive() );
+
+ aPrinter.getArray()[3].Name = DEFINE_CONST_UNICODE( "PaperSize" );
+ SIZE aSize = impl_Size_Object2Struct(pPrinter->GetPaperSize() );
+// automatisch auskommentiert - Wird von UNO III nicht weiter untersttzt!
+// aPrinter.getArray()[3].Value.set( &aSize, Size_getReflection() );
+ aPrinter.getArray()[3].Value <<= aSize;
+
+ aPrinter.getArray()[2].Name = DEFINE_CONST_UNICODE( "PaperFormat" );
+ PAPERFORMAT eFormat = (PAPERFORMAT)pPrinter->GetPaper();
+// automatisch auskommentiert - Wird von UNO III nicht weiter untersttzt!
+// aPrinter.getArray()[2].Value.set( &eFormat, PaperFormat_getReflection() );
+ aPrinter.getArray()[2].Value <<= eFormat;
+
+ aPrinter.getArray()[1].Name = DEFINE_CONST_UNICODE( "PaperOrientation" );
+ PAPERORIENTATION eOrient = (PAPERORIENTATION)pPrinter->GetOrientation();
+// automatisch auskommentiert - Wird von UNO III nicht weiter untersttzt!
+// aPrinter.getArray()[1].Value.set( &eOrient, PaperOrientation_getReflection() );
+ aPrinter.getArray()[1].Value <<= eOrient;
+
+ aPrinter.getArray()[0].Name = DEFINE_CONST_UNICODE( "Name" );
+// aPrinter.getArray()[0].Value <<= ( S2U(pPrinter->GetName()) );
+ String sStringTemp = pPrinter->GetName() ;
+ aPrinter.getArray()[0].Value <<= ::rtl::OUString( sStringTemp );
+
+ return aPrinter;
+}
+
+//________________________________________________________________________________________________________
+// XPrintable
+//________________________________________________________________________________________________________
+
+void SAL_CALL SfxBaseModel::setPrinter(const SEQUENCE< PROPERTYVALUE >& rPrinter)
+{
+ // object already disposed?
+ if ( impl_isDisposed() )
+ throw DISPOSEDEXCEPTION();
+
+ // alten Printer beschaffen
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ SfxViewFrame *pViewFrm = m_pData->m_pObjectShell ? SfxViewFrame::GetFirst( m_pData->m_pObjectShell, 0, sal_False ) : 0;
+ if ( !pViewFrm )
+ return;
+ SfxViewShell *pViewSh = pViewFrm->GetViewShell();
+ SfxPrinter *pPrinter = pViewSh->GetPrinter(sal_True);
+ if ( !pPrinter )
+ return;
+
+ // new Printer-Name available?
+ sal_uInt16 nChangeFlags = 0;
+ for ( int n = 0; n < rPrinter.getLength(); ++n )
+ {
+ // get Property-Value from printer description
+ const PROPERTYVALUE &rProp = rPrinter.getConstArray()[n];
+
+ // Name-Property?
+ if ( rProp.Name.compareToAscii( "Name" ) == 0 )
+ {
+// automatisch auskommentiert - Wird von UNO III nicht weiter untersttzt!
+// if ( rProp.Value.getReflection() != OOUSTRING_getReflection() )
+ if ( rProp.Value.getValueType() != ::getCppuType((const OUSTRING*)0) )
+
+ throw ILLEGALARGUMENTEXCEPTION();
+
+// String aPrinterName( U2S( rProp.Value.getString() ) );
+ OUSTRING sTemp;
+ rProp.Value >>= sTemp ;
+ String aPrinterName( sTemp ) ;
+
+ pPrinter = new SfxPrinter( pPrinter->GetOptions().Clone(),
+ aPrinterName );
+ nChangeFlags = SFX_PRINTER_PRINTER;
+ break;
+ }
+ }
+
+ Size aSetPaperSize( 0, 0);
+ sal_Int32 nPaperFormat = PAPER_USER;
+ // other properties
+ for ( int i = 0; i < rPrinter.getLength(); ++i )
+ {
+ // get Property-Value from printer description
+ const PROPERTYVALUE &rProp = rPrinter.getConstArray()[i];
+// IMPL_SmartAny aValue( rProp.Value );
+
+ // PaperOrientation-Property?
+ if ( rProp.Name.compareToAscii( "PaperOrientation" ) == 0 )
+ {
+ sal_Int32 nOrient;
+// if ( !aValue.queryEnum( nOrient ) )
+ if ( ( rProp.Value >>= nOrient ) == sal_False )
+ throw ILLEGALARGUMENTEXCEPTION();
+
+ pPrinter->SetOrientation( (Orientation) nOrient );
+ nChangeFlags |= SFX_PRINTER_CHG_ORIENTATION;
+ }
+
+ // PaperFormat-Property?
+ if ( rProp.Name.compareToAscii( "PaperFormat" ) == 0 )
+ {
+// if ( !aValue.queryEnum( nPaperFormat ) )
+ if ( ( rProp.Value >>= nPaperFormat ) == sal_False )
+ throw ILLEGALARGUMENTEXCEPTION();
+
+ pPrinter->SetPaper( (Paper) nPaperFormat );
+ nChangeFlags |= SFX_PRINTER_CHG_SIZE;
+ }
+
+ // PaperSize-Property?
+ if ( rProp.Name.compareToAscii( "PaperSize" ) == 0 )
+ {
+// automatisch auskommentiert - Wird von UNO III nicht weiter untersttzt!
+// if ( rProp.Value.getReflection() != Size_getReflection() )
+// if ( rProp.Value.getValueType() != ::getCppuType((const Size*)0) )
+// throw( ILLEGALARGUMENTEXCEPTION() );
+//
+// aSetPaperSize = ( *(const Size*) rProp.Value.get() );
+ SIZE aTempSize ;
+ if ( ( rProp.Value >>= aTempSize ) == sal_False )
+ {
+ throw ILLEGALARGUMENTEXCEPTION();
+ }
+ else
+ {
+ aSetPaperSize = impl_Size_Struct2Object(aTempSize);
+ }
+ }
+ }
+ //os 12.11.98: die PaperSize darf nur gesetzt werden, wenn tatsaechlich
+ //PAPER_USER gilt, sonst koennte vom Treiber ein falsches Format gewaehlt werden
+ if(nPaperFormat == PAPER_USER &&
+ aSetPaperSize.Width())
+ {
+ //JP 23.09.98 - Bug 56929 - MapMode von 100mm in die am
+ // Device gesetzten umrechnen. Zusaetzlich nur dann
+ // setzen, wenn sie wirklich veraendert wurden.
+ aSetPaperSize = pPrinter->LogicToPixel( aSetPaperSize, MAP_100TH_MM );
+ if( aSetPaperSize != pPrinter->GetPaperSizePixel() )
+ {
+ pPrinter->SetPaperSizeUser( pPrinter->PixelToLogic( aSetPaperSize ) );
+ nChangeFlags |= SFX_PRINTER_CHG_SIZE;
+ }
+ }
+
+ // set new printer
+ pViewSh->SetPrinter( pPrinter, nChangeFlags );
+}
+
+//________________________________________________________________________________________________________
+// XPrintable
+//________________________________________________________________________________________________________
+
+void SAL_CALL SfxBaseModel::print(const SEQUENCE< PROPERTYVALUE >& rOptions)
+{
+ // object already disposed?
+ if ( impl_isDisposed() )
+ throw DISPOSEDEXCEPTION();
+
+ // get view for sfx printing capabilities
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ SfxViewFrame *pViewFrm = m_pData->m_pObjectShell ? SfxViewFrame::GetFirst( m_pData->m_pObjectShell, 0, sal_False ) : 0;
+ if ( !pViewFrm )
+ return;
+ SfxViewShell* pView = pViewFrm->GetViewShell();
+ if ( !pView )
+ return;
+
+ SfxAllItemSet aArgs( pView->GetPool() );
+ sal_Bool bMonitor = sal_False;
+
+ sal_Bool bWaitUntilEnd = sal_False;
+ for ( int n = 0; n < rOptions.getLength(); ++n )
+ {
+ // get Property-Value from options
+ const PROPERTYVALUE &rProp = rOptions.getConstArray()[n];
+// IMPL_SmartAny aValue( rProp.Value );
+
+ // FileName-Property?
+ if ( rProp.Name.compareToAscii( "FileName" ) == 0 )
+ {
+// automatisch auskommentiert - Wird von UNO III nicht weiter untersttzt!
+// if ( rProp.Value.getReflection() == OOUSTRING_getReflection() )
+ if ( rProp.Value.getValueType() == ::getCppuType((const OUSTRING*)0) )
+ {
+// aArgs.Put( SfxStringItem( SID_FILE_NAME, U2S( rProp.Value.getString() ) ) );
+ OUSTRING sTemp;
+ rProp.Value >>= sTemp;
+ aArgs.Put( SfxStringItem( SID_FILE_NAME, String( sTemp ) ) );
+ }
+// automatisch auskommentiert - Wird von UNO III nicht weiter untersttzt!
+// else if ( rProp.Value.getReflection() != Void_getReflection() )
+ else if ( rProp.Value.getValueType() != ::getCppuVoidType() )
+ throw ILLEGALARGUMENTEXCEPTION();
+ }
+
+ // CopyCount-Property
+ else if ( rProp.Name.compareToAscii( "CopyCount" ) == 0 )
+ {
+ sal_Int32 nCopies = 0;
+// if ( !aValue.queryINT32( nCopies ) )
+ if ( ( rProp.Value >>= nCopies ) == sal_False )
+ throw ILLEGALARGUMENTEXCEPTION();
+ aArgs.Put( SfxInt16Item( SID_PRINT_COPIES, nCopies ) );
+ }
+
+ // Collate-Property
+ else if ( rProp.Name.compareToAscii( "Collate" ) == 0 )
+ {
+// automatisch auskommentiert - Wird von UNO III nicht weiter untersttzt!
+// if ( rProp.Value.getReflection() == BOOL_getReflection() )
+ if ( rProp.Value.getValueType() == ::getCppuBooleanType() )
+ {
+ sal_Bool bTemp ;
+ rProp.Value >>= bTemp ;
+ aArgs.Put( SfxBoolItem( SID_PRINT_COLLATE, bTemp ) );
+ }
+ else
+ throw ILLEGALARGUMENTEXCEPTION();
+ }
+
+ // Sort-Property
+ else if ( rProp.Name.compareToAscii( "Sort" ) == 0 )
+ {
+// automatisch auskommentiert - Wird von UNO III nicht weiter untersttzt!
+// if ( rProp.Value.getReflection() == BOOL_getReflection() )
+ if ( rProp.Value.getValueType() == ::getCppuBooleanType() )
+ {
+ sal_Bool bTemp ;
+ rProp.Value >>= bTemp ;
+ aArgs.Put( SfxBoolItem( SID_PRINT_SORT, bTemp ) );
+ }
+ else
+ throw ILLEGALARGUMENTEXCEPTION();
+ }
+
+ // Pages-Property
+ else if ( rProp.Name.compareToAscii( "Pages" ) == 0 )
+ {
+// automatisch auskommentiert - Wird von UNO III nicht weiter untersttzt!
+// if ( rProp.Value.getReflection() == OOUSTRING_getReflection() )
+ if ( rProp.Value.getValueType() == ::getCppuType((const OUSTRING*)0) )
+ {
+ OUSTRING sTemp;
+ rProp.Value >>= sTemp;
+ aArgs.Put( SfxStringItem( SID_PRINT_PAGES, String( sTemp ) ) );
+ }
+ else
+ throw ILLEGALARGUMENTEXCEPTION();
+ }
+
+ // MonitorVisible
+ else if ( rProp.Name.compareToAscii( "MonitorVisible" ) == 0 )
+ {
+// automatisch auskommentiert - Wird von UNO III nicht weiter untersttzt!
+// if ( rProp.Value.getReflection() == BOOL_getReflection() )
+ if ( rProp.Value.getValueType() == ::getCppuBooleanType() )
+ rProp.Value >>= bMonitor ;
+ else
+ throw ILLEGALARGUMENTEXCEPTION();
+ }
+
+ // MonitorVisible
+ else if ( rProp.Name.compareToAscii( "Wait" ) == 0 )
+ {
+// automatisch auskommentiert - Wird von UNO III nicht weiter untersttzt!
+// if ( rProp.Value.getReflection() == BOOL_getReflection() )
+ if ( rProp.Value.getValueType() == ::getCppuBooleanType() )
+ rProp.Value >>= bWaitUntilEnd ;
+ else
+ throw ILLEGALARGUMENTEXCEPTION();
+ }
+ }
+
+ aArgs.Put( SfxBoolItem( SID_SILENT, !bMonitor ) );
+ if ( bWaitUntilEnd )
+ aArgs.Put( SfxBoolItem( SID_ASYNCHRON, sal_False ) );
+ SfxRequest aReq( SID_PRINTDOC, SFX_CALLMODE_SYNCHRON | SFX_CALLMODE_API, pView->GetPool() );
+ aReq.SetArgs( aArgs );
+ pView->ExecuteSlot( aReq );
+}
+
+//________________________________________________________________________________________________________
+// XStorable
+//________________________________________________________________________________________________________
+
+sal_Bool SAL_CALL SfxBaseModel::hasLocation()
+{
+ // object already disposed?
+ if ( impl_isDisposed() )
+ throw DISPOSEDEXCEPTION();
+
+ return m_pData->m_pObjectShell ? m_pData->m_pObjectShell->HasName() : sal_False;
+}
+
+//________________________________________________________________________________________________________
+// XStorable
+//________________________________________________________________________________________________________
+
+OUSTRING SAL_CALL SfxBaseModel::getLocation()
+{
+ // object already disposed?
+ if ( impl_isDisposed() )
+ throw DISPOSEDEXCEPTION();
+
+ return m_pData->m_pObjectShell ? OUSTRING(m_pData->m_pObjectShell->GetMedium()->GetName()) : m_pData->m_sURL;
+}
+
+//________________________________________________________________________________________________________
+// XStorable
+//________________________________________________________________________________________________________
+
+sal_Bool SAL_CALL SfxBaseModel::isReadonly()
+{
+ // object already disposed?
+ if ( impl_isDisposed() )
+ throw DISPOSEDEXCEPTION();
+
+ return m_pData->m_pObjectShell ? m_pData->m_pObjectShell->IsReadOnly() : sal_True;
+}
+
+//________________________________________________________________________________________________________
+// XStorable
+//________________________________________________________________________________________________________
+
+void SAL_CALL SfxBaseModel::store()
+{
+ // object already disposed?
+ if ( impl_isDisposed() )
+ throw DISPOSEDEXCEPTION();
+
+ if ( m_pData->m_pObjectShell )
+ {
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ m_pData->m_pObjectShell->Save_Impl();
+ }
+}
+
+//________________________________________________________________________________________________________
+// XStorable
+//________________________________________________________________________________________________________
+
+void SAL_CALL SfxBaseModel::storeAsURL( const OUSTRING& rURL ,
+ const SEQUENCE< PROPERTYVALUE >& rArgs )
+{
+ // object already disposed?
+ if ( impl_isDisposed() )
+ throw DISPOSEDEXCEPTION();
+
+ if ( m_pData->m_pObjectShell )
+ {
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ impl_store( m_pData->m_pObjectShell, rURL, rArgs, sal_False );
+
+ SEQUENCE< PROPERTYVALUE > aSequence ;
+ TransformItems( SID_OPENDOC, *m_pData->m_pObjectShell->GetMedium()->GetItemSet(), aSequence );
+ attachResource( rURL, aSequence );
+ }
+}
+
+//________________________________________________________________________________________________________
+// XStorable
+//________________________________________________________________________________________________________
+
+void SAL_CALL SfxBaseModel::storeToURL( const OUSTRING& rURL ,
+ const SEQUENCE< PROPERTYVALUE >& rArgs )
+{
+ // object already disposed?
+ if ( impl_isDisposed() )
+ throw DISPOSEDEXCEPTION();
+
+ if ( m_pData->m_pObjectShell )
+ {
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ impl_store( m_pData->m_pObjectShell, rURL, rArgs, sal_True );
+ }
+}
+
+//________________________________________________________________________________________________________
+// SfxListener
+//________________________________________________________________________________________________________
+
+void SfxBaseModel::Notify( SfxBroadcaster& rBC ,
+ const SfxHint& rHint )
+{
+ if ( &rBC == m_pData->m_pObjectShell )
+ {
+ SfxSimpleHint* pHint = PTR_CAST( SfxSimpleHint, &rHint );
+ if ( pHint && pHint->GetId() == SFX_HINT_DOCCHANGED )
+ changing();
+ }
+}
+
+//________________________________________________________________________________________________________
+// public impl.
+//________________________________________________________________________________________________________
+
+void SfxBaseModel::changing()
+{
+ // object already disposed?
+ if ( impl_isDisposed() )
+ return;
+
+ OINTERFACECONTAINERHELPER* pIC = m_pData->m_aInterfaceContainer.getContainer( ::getCppuType((const REFERENCE< XMODIFYLISTENER >*)0) );
+ if( pIC )
+
+ {
+ EVENTOBJECT aEvent( (XMODEL *)this );
+ OINTERFACEITERATORHELPER aIt( *pIC );
+ while( aIt.hasMoreElements() )
+ ((XMODIFYLISTENER *)aIt.next())->modified( aEvent );
+ }
+}
+
+void SfxBaseModel::impl_change()
+{
+ // object already disposed?
+ if ( impl_isDisposed() )
+ return;
+
+ OINTERFACECONTAINERHELPER* pIC = m_pData->m_aInterfaceContainer.getContainer( ::getCppuType((const REFERENCE< XMODIFYLISTENER >*)0) );
+ if( pIC )
+
+ {
+ EVENTOBJECT aEvent( (XMODEL *)this );
+ OINTERFACEITERATORHELPER aIt( *pIC );
+ while( aIt.hasMoreElements() )
+ ((XMODIFYLISTENER *)aIt.next())->modified( aEvent );
+ }
+}
+
+//________________________________________________________________________________________________________
+// public impl.
+//________________________________________________________________________________________________________
+
+SfxObjectShell* SfxBaseModel::GetObjectShell() const
+{
+ return m_pData ? m_pData->m_pObjectShell : 0;
+}
+
+SfxObjectShell* SfxBaseModel::impl_getObjectShell() const
+{
+ return m_pData ? m_pData->m_pObjectShell : 0;
+}
+
+//________________________________________________________________________________________________________
+// public impl.
+//________________________________________________________________________________________________________
+
+sal_Bool SfxBaseModel::IsDisposed() const
+{
+ return ( m_pData == NULL ) ;
+}
+
+sal_Bool SfxBaseModel::impl_isDisposed() const
+{
+ return ( m_pData == NULL ) ;
+}
+
+//________________________________________________________________________________________________________
+// private impl.
+//________________________________________________________________________________________________________
+
+void SfxBaseModel::impl_store( SfxObjectShell* pObjectShell ,
+ const OUSTRING& sURL ,
+ const SEQUENCE<PROPERTYVALUE>& seqArguments ,
+ sal_Bool bSaveTo )
+{
+ SfxRequest aReq( SID_SAVEASDOC, SFX_CALLMODE_SYNCHRON, pObjectShell->GetPool() );
+ aReq.AppendItem( SfxStringItem( SID_FILE_NAME, String(sURL) ) );
+ if ( bSaveTo )
+ aReq.AppendItem( SfxBoolItem( SID_SAVETO, sal_True ) );
+
+ // Parameter auswerten
+ for ( int n = 0; n < seqArguments.getLength(); ++n )
+ {
+ // get Property-Value from args
+ const PROPERTYVALUE &rProp = seqArguments.getConstArray()[n];
+
+ // FilterName-Property?
+ if ( rProp.Name.compareToAscii( "FilterName" ) == 0 )
+ {
+ OUSTRING sTemp;
+ if ( ( rProp.Value >>= sTemp ) == sal_True )
+ aReq.AppendItem( SfxStringItem( SID_FILTER_NAME, String( sTemp ) ) );
+ else if ( rProp.Value.getValueType() != ::getCppuVoidType() )
+ throw ILLEGALARGUMENTEXCEPTION();
+ }
+
+ // FilterFlags-Property?
+ else if ( rProp.Name.compareToAscii( "FilterOptions" ) == 0 )
+ {
+ OUSTRING sTemp;
+ if ( ( rProp.Value >>= sTemp ) == sal_True )
+ aReq.AppendItem( SfxStringItem( SID_FILE_FILTEROPTIONS, String( sTemp ) ) );
+ else if ( rProp.Value.getValueType() != ::getCppuVoidType() )
+ throw ILLEGALARGUMENTEXCEPTION();
+ }
+
+ // Version-Property?
+ else if ( rProp.Name.compareToAscii( "Version" ) == 0 )
+ {
+ OUSTRING sTemp ;
+ if ( ( rProp.Value >>= sTemp ) == sal_True )
+ aReq.AppendItem( SfxStringItem( SID_VERSION, String( sTemp ) ) );
+ else if ( rProp.Value.getValueType() != ::getCppuVoidType() )
+ throw ILLEGALARGUMENTEXCEPTION();
+ }
+
+ // Author-Property?
+ else if ( rProp.Name.compareToAscii( "Author" ) == 0 )
+ {
+ OUSTRING sTemp ;
+ if ( ( rProp.Value >>= sTemp ) == sal_True )
+ aReq.AppendItem( SfxStringItem( SID_DOCINFO_AUTHOR, String( sTemp ) ) );
+ else if ( rProp.Value.getValueType() != ::getCppuVoidType() )
+ throw ILLEGALARGUMENTEXCEPTION();
+ }
+
+ // Password-Property?
+ else if ( rProp.Name.compareToAscii( "Password" ) == 0 )
+ {
+ OUSTRING sTemp ;
+ if ( ( rProp.Value >>= sTemp ) == sal_True )
+ aReq.AppendItem( SfxStringItem( SID_PASSWORD, String( sTemp ) ) );
+ else if ( rProp.Value.getValueType() != ::getCppuVoidType() )
+ throw ILLEGALARGUMENTEXCEPTION();
+ }
+
+ // Overwrite-Property?
+ else if ( rProp.Name.compareToAscii( "Overwrite" ) == 0 )
+ {
+ sal_Bool bTemp ;
+ if ( ( rProp.Value >>= bTemp ) == sal_True )
+ aReq.AppendItem( SfxBoolItem( SID_OVERWRITE, bTemp ) );
+ else if ( rProp.Value.getValueType() != ::getCppuVoidType() )
+ throw ILLEGALARGUMENTEXCEPTION();
+ }
+
+ // TemplateRegion-Property?
+ else if ( rProp.Name.compareToAscii( "TemplateRegion" ) == 0 )
+ {
+ aReq.SetSlot( SID_DOCTEMPLATE );
+ OUSTRING sTemp ;
+ if ( ( rProp.Value >>= sTemp ) == sal_True )
+ aReq.AppendItem( SfxStringItem( SID_TEMPLATE_REGIONNAME, String( sTemp ) ) );
+ else if ( rProp.Value.getValueType() != ::getCppuVoidType() )
+ throw ILLEGALARGUMENTEXCEPTION();
+ }
+
+ // Template-Property?
+ else if ( rProp.Name.compareToAscii( "TemplateName" ) == 0 )
+ {
+ aReq.SetSlot( SID_DOCTEMPLATE );
+ OUSTRING sTemp ;
+ if ( ( rProp.Value >>= sTemp ) == sal_True )
+ aReq.AppendItem( SfxStringItem( SID_TEMPLATE_NAME, String( sTemp ) ) );
+ else if ( rProp.Value.getValueType() != ::getCppuVoidType() )
+ throw ILLEGALARGUMENTEXCEPTION();
+ }
+
+ else
+ {
+ throw ::com::sun::star::beans::UnknownPropertyException(
+ rProp.Name, *this );
+ }
+ }
+
+ const SfxBoolItem *pRet = (const SfxBoolItem*) pObjectShell->ExecuteSlot( aReq );
+ if ( !pRet || !pRet->GetValue() )
+ throw SfxIOException_Impl( ERRCODE_IO_CANTWRITE );
+}
diff --git a/sfx2/source/explorer/makefile.mk b/sfx2/source/explorer/makefile.mk
new file mode 100644
index 000000000000..11943408a7bd
--- /dev/null
+++ b/sfx2/source/explorer/makefile.mk
@@ -0,0 +1,112 @@
+#*************************************************************************
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.1.1.1 $
+#
+# last change: $Author: hr $ $Date: 2000-09-18 16:52:33 $
+#
+# The Contents of this file are made available subject to the terms of
+# either of the following licenses
+#
+# - GNU Lesser General Public License Version 2.1
+# - Sun Industry Standards Source License Version 1.1
+#
+# Sun Microsystems Inc., October, 2000
+#
+# GNU Lesser General Public License Version 2.1
+# =============================================
+# Copyright 2000 by Sun Microsystems, Inc.
+# 901 San Antonio Road, Palo Alto, CA 94303, USA
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License version 2.1, as published by the Free Software Foundation.
+#
+# This library 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 for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+#
+# Sun Industry Standards Source License Version 1.1
+# =================================================
+# The contents of this file are subject to the Sun Industry Standards
+# Source License Version 1.1 (the "License"); You may not use this file
+# except in compliance with the License. You may obtain a copy of the
+# License at http://www.openoffice.org/license.html.
+#
+# Software provided under this License is provided on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+# See the License for the specific provisions governing your rights and
+# obligations concerning the Software.
+#
+# The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+#
+# Copyright: 2000 by Sun Microsystems, Inc.
+#
+# All Rights Reserved.
+#
+# Contributor(s): _______________________________________
+#
+#
+#
+#*************************************************************************
+
+PRJ=..$/..
+
+PRJNAME=sfx2
+TARGET=explorer
+ENABLE_EXCEPTIONS=TRUE
+.INCLUDE : $(PRJ)$/util$/makefile.pmk
+AUTOSEG=true
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : svpre.mk
+.INCLUDE : settings.mk
+.INCLUDE : sv.mk
+
+# --- Files --------------------------------------------------------
+
+IMGLST_SRS=$(SRS)$/explorer.srs
+BMP_IN=$(PRJ)$/win/res
+
+# --- Files --------------------------------------------------------
+
+SLOFILES = \
+ $(SLO)$/ucbhelp.obj \
+ $(SLO)$/nochaos.obj \
+ $(SLO)$/expfile.obj \
+ $(SLO)$/explorer.obj \
+ $(SLO)$/exptypes.obj \
+ $(SLO)$/infodlgs.obj \
+ $(SLO)$/iodlg.obj \
+ $(SLO)$/iodlgimp.obj \
+ $(SLO)$/sfxdir.obj \
+ $(SLO)$/fileview.obj
+
+.IF "$(GUI)"=="WNT"
+CXXFILES += goffline.cxx
+SLOFILES += $(SLO)$/goffline.obj
+.ENDIF
+
+EXCEPTIONSFILES = \
+ $(SLO)$/ucbhelp.obj
+
+SRCFILES = \
+ explorer.src \
+ iodlg.src \
+ fileview.src
+
+# --- Targets ------------------------------------------------------
+
+.INCLUDE : target.mk
+
diff --git a/sfx2/source/explorer/nochaos.cxx b/sfx2/source/explorer/nochaos.cxx
new file mode 100644
index 000000000000..e4c9111d3261
--- /dev/null
+++ b/sfx2/source/explorer/nochaos.cxx
@@ -0,0 +1,247 @@
+/*************************************************************************
+ *
+ * $RCSfile: nochaos.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:33 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include <svtools/itempool.hxx>
+#include <svtools/poolitem.hxx>
+#include <svtools/stritem.hxx>
+#include <nochaos.hxx>
+#include "sfxuno.hxx"
+
+
+#define WID_CHAOS_START 500
+//=========================================================================
+//
+// class CntStaticPoolDefaults_Impl
+//
+//=========================================================================
+
+class CntItemPool;
+
+class CntStaticPoolDefaults_Impl
+{
+ sal_uInt32 m_nItems;
+ SfxPoolItem** m_ppDefaults;
+ SfxItemInfo* m_pItemInfos;
+
+private:
+ // Forbidden and not implemented...
+ CntStaticPoolDefaults_Impl( const CntStaticPoolDefaults_Impl& );
+ CntStaticPoolDefaults_Impl& operator=( const CntStaticPoolDefaults_Impl& );
+
+ inline void Insert( SfxPoolItem* pItem, sal_uInt16 nSID, sal_uInt16 nFlags );
+
+public:
+ CntStaticPoolDefaults_Impl( CntItemPool* pPool );
+ ~CntStaticPoolDefaults_Impl();
+
+ SfxPoolItem** GetDefaults() const { return m_ppDefaults; }
+ const SfxItemInfo* GetItemInfos() const { return m_pItemInfos; }
+};
+
+//----------------------------------------------------------------------------
+
+//=========================================================================
+
+class CntItemPool: public SfxItemPool
+{
+ static CntItemPool* _pThePool;
+ USHORT _nRefs;
+
+protected:
+ CntItemPool();
+ virtual ~CntItemPool();
+
+public:
+ static CntItemPool* Acquire();
+ static USHORT Release();
+};
+
+//----------------------------------------------------------------------------
+
+//----------------------------------------------------------------------------
+// static
+SfxItemPool* NoChaos::GetItemPool()
+{
+ // Get and hold CHAOS item pool.
+ return CntItemPool::Acquire();
+}
+
+//----------------------------------------------------------------------------
+// static
+USHORT NoChaos::ReleaseItemPool()
+{
+ // Release CHAOS item pool.
+ return CntItemPool::Release();
+}
+
+//=========================================================================
+//
+// CntItemPool implementation
+//
+//=========================================================================
+
+static CntStaticPoolDefaults_Impl* pPoolDefs_Impl = NULL;
+
+// static member!
+CntItemPool* CntItemPool::_pThePool = NULL;
+
+//-------------------------------------------------------------------------
+CntItemPool::CntItemPool()
+: SfxItemPool( DEFINE_CONST_UNICODE("chaos"), WID_CHAOS_START, WID_CHAOS_START, NULL ),
+ _nRefs( 0 )
+{
+ SetFileFormatVersion( SOFFICE_FILEFORMAT_NOW );
+
+ FreezeIdRanges();
+
+ // Create static defaults.
+ pPoolDefs_Impl = new CntStaticPoolDefaults_Impl( this );
+
+ // Set item infos.
+ SetItemInfos( pPoolDefs_Impl->GetItemInfos() );
+
+ // Set static pool default items.
+ SetDefaults( pPoolDefs_Impl->GetDefaults() );
+}
+
+//-------------------------------------------------------------------------
+//virtual
+CntItemPool::~CntItemPool()
+{
+ // Release static pool default items.
+ ReleaseDefaults( sal_False );
+}
+
+//-------------------------------------------------------------------------
+// static
+CntItemPool* CntItemPool::Acquire()
+{
+ if ( !_pThePool )
+ _pThePool = new CntItemPool;
+
+ _pThePool->_nRefs++;
+
+ return _pThePool;
+}
+
+//-------------------------------------------------------------------------
+// static
+sal_uInt16 CntItemPool::Release()
+{
+ if ( !_pThePool )
+ return 0;
+
+ sal_uInt16& nRefs = _pThePool->_nRefs;
+
+ if ( nRefs )
+ --nRefs;
+
+ if ( !nRefs )
+ {
+ DELETEZ( _pThePool );
+ DELETEZ( pPoolDefs_Impl );
+ return 0;
+ }
+
+ return nRefs;
+}
+
+//=========================================================================
+//
+// CntStaticPoolDefaults_Impl implementation.
+//
+//=========================================================================
+
+inline void CntStaticPoolDefaults_Impl::Insert(
+ SfxPoolItem* pItem, /* Static Pool Default Item */
+ sal_uInt16 nSID, sal_uInt16 nFlags /* Item Info */ )
+{
+ sal_uInt16 nPos = pItem->Which() - WID_CHAOS_START;
+
+ m_ppDefaults[ nPos ] = pItem;
+ m_pItemInfos[ nPos ]._nSID = nSID;
+ m_pItemInfos[ nPos ]._nFlags = nFlags;
+}
+
+//-------------------------------------------------------------------------
+CntStaticPoolDefaults_Impl::~CntStaticPoolDefaults_Impl()
+{
+ for ( sal_uInt32 n = 0; n < m_nItems; ++n )
+ delete m_ppDefaults[ n ];
+
+ delete [] m_ppDefaults;
+ delete [] m_pItemInfos;
+}
+
+//-------------------------------------------------------------------------
+CntStaticPoolDefaults_Impl::CntStaticPoolDefaults_Impl( CntItemPool* pPool )
+: m_nItems( 1 ),
+ m_ppDefaults( new SfxPoolItem* [ m_nItems ] ),
+ m_pItemInfos( new SfxItemInfo [ m_nItems ] )
+{
+ rtl_zeroMemory( m_ppDefaults, sizeof( m_ppDefaults ) * m_nItems );
+ rtl_zeroMemory( m_pItemInfos, sizeof( m_pItemInfos ) * m_nItems );
+
+ Insert(
+ new SfxStringItem( WID_CHAOS_START, String() ),
+ 0,
+ SFX_ITEM_POOLABLE );
+}
diff --git a/sfx2/source/inc/acccfg.hxx b/sfx2/source/inc/acccfg.hxx
new file mode 100644
index 000000000000..ca8d33496a31
--- /dev/null
+++ b/sfx2/source/inc/acccfg.hxx
@@ -0,0 +1,150 @@
+/*************************************************************************
+ *
+ * $RCSfile: acccfg.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:33 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _ACCCFG_HXX
+#define _ACCCFG_HXX
+
+// #include *****************************************************************
+
+#ifndef _GROUP_HXX //autogen
+#include <vcl/group.hxx>
+#endif
+#ifndef _FIXED_HXX //autogen
+#include <vcl/fixed.hxx>
+#endif
+#ifndef _BUTTON_HXX //autogen
+#include <vcl/button.hxx>
+#endif
+#ifndef _DIALOG_HXX //autogen
+#include <vcl/dialog.hxx>
+#endif
+#ifndef _LSTBOX_HXX //autogen
+#include <vcl/lstbox.hxx>
+#endif
+#include "minarray.hxx"
+
+// forward ******************************************************************
+
+class SfxAcceleratorManager;
+
+// class SfxAcceleratorConfigListBox *************************************************
+
+class SfxAcceleratorConfigListBox : public ListBox
+{
+ void KeyInput( const KeyEvent &rKEvt );
+
+public:
+
+ SfxAcceleratorConfigListBox( Window *pParent, ResId &rResId ) :
+ ListBox( pParent, rResId ) {}
+
+ void ReplaceEntry( USHORT nPos, const String &rStr );
+ void ExpandEntry ( USHORT nPos, const String &rStr );
+};
+
+// class USHORTArr **********************************************************
+
+#if !defined(_MNUCFG_HXX) && !defined(_TBXCFG_HXX)
+DECL_2BYTEARRAY(USHORTArr, USHORT, 10, 10);
+#endif
+
+// class SfxAcceleratorConfigDialog **************************************************
+
+class SfxAcceleratorConfigDialog : public ModalDialog
+{
+ OKButton aOKButton;
+ CancelButton aCancelButton;
+ PushButton aChangeButton;
+ PushButton aRemoveButton;
+ SfxAcceleratorConfigListBox aEntriesBox;
+ FixedText aDescriptionTextText;
+ FixedText aDescriptionInfoText;
+ GroupBox aKeyboardGroup;
+ FixedText aGroupText;
+ ListBox aGroupBox;
+ FixedText aFunctionText;
+ ListBox aFunctionBox;
+ FixedText aKeyText;
+ ListBox aKeyBox;
+ GroupBox aFunctionsGroup;
+
+ SfxAcceleratorManager *pMgr;
+
+ USHORTArr aAccelArr;
+ USHORTArr aFunctionArr;
+ USHORTArr aKeyArr;
+
+ void OKHdl ( Button * );
+ void ChangeHdl( Button * );
+ void RemoveHdl( Button * );
+ void SelectHdl( ListBox *pListBox );
+
+ KeyCode PosToKeyCode ( USHORT nPos ) const;
+ USHORT KeyCodeToPos ( const KeyCode &rCode ) const;
+ String GetFunctionName( KeyFuncType eType ) const;
+
+public:
+
+ SfxAcceleratorConfigDialog( Window *pParent );
+};
+
+#endif
+
diff --git a/sfx2/source/inc/appbas.hxx b/sfx2/source/inc/appbas.hxx
new file mode 100644
index 000000000000..2eca845b995d
--- /dev/null
+++ b/sfx2/source/inc/appbas.hxx
@@ -0,0 +1,80 @@
+/*************************************************************************
+ *
+ * $RCSfile: appbas.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:33 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SFX_APPBAS_HXX
+#define _SFX_APPBAS_HXX
+
+
+#ifndef _SBXDEF_HXX //autogen
+#include <svtools/sbxdef.hxx>
+#endif
+
+class StarBASIC;
+class SbxObject;
+
+//=========================================================================
+
+SbxVariable* MakeVariable( StarBASIC *pBas, SbxObject *pObject,
+ const char *pName, ULONG nSID, SbxDataType eType=SbxOBJECT,
+ SbxClassType = SbxCLASS_PROPERTY );
+
+
+#endif
+
diff --git a/sfx2/source/inc/appdata.hxx b/sfx2/source/inc/appdata.hxx
new file mode 100644
index 000000000000..9f1976ff4a30
--- /dev/null
+++ b/sfx2/source/inc/appdata.hxx
@@ -0,0 +1,301 @@
+/*************************************************************************
+ *
+ * $RCSfile: appdata.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:33 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SFX_APPDATA_HXX
+#define _SFX_APPDATA_HXX
+
+#include <tools/link.hxx>
+#include <tools/list.hxx>
+#include <svtools/lstner.hxx>
+#include <bitset.hxx>
+#include <objsh.hxx>
+
+class SfxTaskManager;
+
+class SfxApplication;
+class SvBindingTransportFactory;
+class SvLockBytesFactory;
+class SfxIniDefaultManager;
+class DataLockByteFactory_Impl;
+class SvStrings;
+class Config;
+class PopupMenu;
+class SfxBmkMenu;
+class SvVerbList;
+class SfxProgress;
+class SfxConfigManager;
+class SfxChildWinFactArr_Impl;
+class SfxToolBoxConfig;
+class SfxMacro;
+class SfxDdeDocTopics_Impl;
+class DdeService;
+class SfxEventConfiguration;
+class SfxMacroConfig;
+class SvFactory;
+class SotFactory;
+class SfxItemPool;
+class SfxInitLinkList;
+class SfxFilterMatcher;
+class DemoData_Impl;
+class SfxExplorer;
+class SfxMenuBarManager;
+class StopButtonTimer_Impl;
+class SvUShorts;
+class SfxNodeData_Impl;
+class SfxSIDList_Impl;
+struct SfxFrameObjectFactoryPtr;
+struct SfxPluginObjectFactoryPtr;
+struct SfxPluginObjectFactoryPtr;
+class ISfxTemplateCommon;
+class SfxAnchorJobList_Impl;
+class SfxFilterMatcher;
+class INetConnection;
+class SfxINetPlugInService;
+class SfxTrash;
+class SfxSimpleLockBytesFactoryMemberList;
+class CntUpdateResults_Impl;
+class SfxIniDefaultManager;
+class SfxFolderCfgList_Impl;
+class SfxCancelManager;
+class ISfxModule;
+struct SfxDownload_Impl;
+class SvBindStatusCallback;
+class SfxStatusDispatcher;
+class SfxDesktop;
+class SfxDdeTriggerTopic_Impl;
+class OfaMiscCfg;
+class SvLibrary;
+class SfxDocumentTemplates;
+
+DECLARE_LIST( ConnectionList_Impl, INetConnection * );
+
+class StopButtonTimer_Impl : public Timer
+{
+ BOOL bState;
+protected:
+ virtual void Timeout();
+public:
+ StopButtonTimer_Impl();
+ void SetButtonState( BOOL bStateP );
+ BOOL GetButtonState() const { return bState; }
+};
+
+
+//=========================================================================
+// SfxFolderState
+//=========================================================================
+
+/*
+ [Beschreibung]
+ Elemente dieser Aufzaehlung geben den Zustand eines Ordners an:
+ SFX_FOLDERSTATE_EMPTY der Ordner hat keine Unterordner
+ SFX_FOLDERSTATE_CONTENT der Ordner hat Unterordner
+ SFX_FOLDERSTATE_UNKNOWN es ist nicht bekannt, ob Unterordner vorhanden sind
+ */
+
+enum SfxFolderState
+{
+ SFX_FOLDERSTATE_EMPTY = 0,
+ SFX_FOLDERSTATE_CONTENT = 1,
+ SFX_FOLDERSTATE_UNKNOWN = 2
+};
+
+
+//=========================================================================
+// SfxAppData_Impl
+//=========================================================================
+
+class SfxFrameArr_Impl;
+
+class SfxAppData_Impl : public SfxListener
+{
+public:
+ SfxConfigManager* pAppCfg;
+ SfxProgress* pProgress;
+ SfxItemPool* pPool;
+ SfxChildWinFactArr_Impl* pFactArr;
+ SfxMacro* pMacro;
+ SvLibrary* pODKLib;
+ String aLastDir;
+ String aLastFilter;
+ char nConfigManagerAvailable;
+ IndexBitSet aIndexBitSet;
+ DdeService* pDdeService; // wollen wir DDE machen?
+ SfxDdeDocTopics_Impl* pDocTopics;
+ SfxEventConfiguration* pEventConfig;
+ SotFactory* pSfxApplicationObjectFactory;
+ USHORT nAsynchronCalls;
+ SvVerbList* pVerbs;
+ USHORT nBasicCallLevel;
+ USHORT nRescheduleLocks;
+ USHORT nInReschedule;
+ DemoData_Impl* pDemoData;
+ SfxInitLinkList* pInitLinkList;
+ Timer aLateInitTimer;
+ SfxFilterMatcher* pMatcher;
+ SfxExplorer* pExplorer;
+ String aSaveAsTarget;
+ String aUserEMailAddr;
+ ConnectionList_Impl aConnectionList;
+ SfxObjectFactory* pSfxPlugInObjectShellFactory;
+ Window* pDefFocusWin;
+ SfxMenuBarManager* pAppManager;
+ SfxFrameObjectFactoryPtr* pSfxFrameObjectFactoryPtr;
+ List aPendingInitFactories;
+ SfxIniDefaultManager* pIniDefMgr;
+ String aLogicAppName;
+ SfxINetPlugInService* pPlugService;
+ StopButtonTimer_Impl* pStopButtonTimer;
+ SfxCancelManager* pCancelMgr;
+ USHORT nDocModalMode;
+ SvUShorts* pDisabledSlotList;
+ Config* pFilterIni;
+ ISfxModule* pISfxModule;
+ String aLastNewURL;
+ SfxPluginObjectFactoryPtr* pSfxPluginObjectFactoryPtr;
+ SfxNodeData_Impl* pNodeData_Impl;
+ SfxSIDList_Impl* pSIDList_Impl;
+ ISfxTemplateCommon* pTemplateCommon;
+ Window* pActiveInplaceWindow;
+ SfxAnchorJobList_Impl* pAnchorJobList;
+ ResMgr* pLabelResMgr;
+ USHORT nDemoKind;
+ SfxFrameArr_Impl* pTopFrames;
+ SfxTrash* pTrash;
+ SvStrings* pSecureURLs;
+ USHORT nAutoTabPageId;
+ DataLockByteFactory_Impl* pDataLockBytesFactory;
+ USHORT nExecutingSID;
+ CntUpdateResults_Impl* pNewMessages;
+ USHORT nNewMessages;
+ SvLockBytesFactory* pImageLockBytesFactory;
+ SvLockBytesFactory* pInfoLockBytesFactory;
+ SfxBmkMenu* pNewMenu;
+ SfxBmkMenu* pBookmarkMenu;
+ SfxBmkMenu* pAutoPilotMenu;
+ SfxBmkMenu* pStartMenu;
+ SfxStatusDispatcher* pAppDispatch;
+ SfxDdeTriggerTopic_Impl* pTriggerTopic;
+ DdeService* pDdeService2;
+ SvStrings* pExtBrwOnExceptionList;
+ SvStrings* pExtBrwOffExceptionList;
+ OfaMiscCfg* pMiscConfig;
+ SfxObjectShell* pThisDocument;
+ BYTE bMultiQuickSearch;
+ BYTE bShowFsysExtension;
+ BYTE bUseExternBrowser;
+ BOOL bAccelEnabled : 1;
+ BOOL bIBMTitle : 1;
+ BOOL bOLEResize : 1;
+ BOOL bDirectAliveCount : 1;
+ BOOL bInQuit : 1;
+ BOOL bStbWasVisible : 1;
+ BOOL bSessionFailed : 1;
+ BOOL bOLEAutomation : 1;
+ BOOL bInvalidateOnUnlock : 1;
+ BOOL bBean : 1;
+ BOOL bMinimized : 1;
+ BOOL bInvisible : 1;
+ BOOL bSmartBeamer : 1;
+ BOOL bInException : 1;
+ BOOL bNewMessagesBlinker : 1;
+ BOOL bNewTaskForNewMessages : 1;
+ BOOL bBeamerSwitchedOn : 1;
+ BOOL bLateInit_BrowseRegistrationPage : 1;
+ USHORT nAppEvent;
+ SfxDocumentTemplates* pTemplates;
+ String aOpenList;
+ String aPrintList;
+ String aUcbUrl;
+
+ SfxAppData_Impl( SfxApplication* pApp );
+ ~SfxAppData_Impl();
+
+ PopupMenu* GetPopupMenu( USHORT nSid, BOOL bBig=FALSE, BOOL bNew=FALSE );
+ virtual void Notify( SfxBroadcaster &rBC, const SfxHint &rHint );
+ DECL_STATIC_LINK( SfxAppData_Impl, CreateDataLockBytesFactory, void* );
+ void ResetNewMessages( const String &rFolderULR );
+ void LoadNewMessages();
+ void SaveNewMessages();
+ void UpdateApplicationSettings( BOOL bDontHide );
+ SfxDocumentTemplates* GetDocumentTemplates();
+};
+
+extern void FATToVFat_Impl( String& );
+
+#include <svtools/poolitem.hxx>
+
+class SfxPtrItem : public SfxPoolItem
+{
+ void* pPtr;
+public:
+ TYPEINFO();
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const
+ { return new SfxPtrItem( *this ); }
+ virtual int operator==( const SfxPoolItem& rL) const
+ { return ((SfxPtrItem&)rL).pPtr == pPtr; }
+ SfxPtrItem( USHORT nWhich, void * pValue ) : SfxPoolItem( nWhich )
+ { pPtr = pValue; }
+ void* GetValue() const { return pPtr; }
+};
+
+#endif // #ifndef _SFX_APPDATA_HXX
+
+
diff --git a/sfx2/source/inc/cfg.hxx b/sfx2/source/inc/cfg.hxx
new file mode 100644
index 000000000000..d7e0f6f7a04b
--- /dev/null
+++ b/sfx2/source/inc/cfg.hxx
@@ -0,0 +1,435 @@
+/*************************************************************************
+ *
+ * $RCSfile: cfg.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:33 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SFXCFG_HXX
+#define _SFXCFG_HXX
+
+#ifndef _SV_LSTBOX_HXX //autogen
+#include <vcl/lstbox.hxx>
+#endif
+#ifndef _SV_FIXED_HXX //autogen
+#include <vcl/fixed.hxx>
+#endif
+#ifndef _SV_GROUP_HXX //autogen
+#include <vcl/group.hxx>
+#endif
+#ifndef _SVTABBX_HXX //autogen
+#include <svtools/svtabbx.hxx>
+#endif
+#ifndef _SVTREEBOX_HXX //autogen
+#include <svtools/svtreebx.hxx>
+#endif
+
+#define _SVSTDARR_USHORTS
+#define _SVSTDARR_STRINGSDTOR
+#include <svtools/svstdarr.hxx> // SvUShorts
+#include "minarray.hxx"
+#include "tabdlg.hxx"
+
+class SfxMenuManager;
+class SfxAcceleratorManager;
+class SfxMacroInfoArr_Impl;
+class SfxMacroInfoItem;
+class SfxMacroInfo;
+class SfxConfigManager;
+
+#define SFX_CFGGROUP_FUNCTION 1
+#define SFX_CFGGROUP_BASICMGR 2
+#define SFX_CFGGROUP_DOCBASICMGR 3
+#define SFX_CFGGROUP_BASICLIB 4
+#define SFX_CFGGROUP_BASICMOD 5
+#define SFX_CFGFUNCTION_MACRO 6
+#define SFX_CFGFUNCTION_SLOT 7
+
+struct SfxGroupInfo_Impl
+{
+ USHORT nKind;
+ USHORT nOrd;
+ void* pObject;
+ BOOL bWasOpened;
+
+ SfxGroupInfo_Impl( USHORT n, USHORT nr, void* pObj = 0 ) :
+ nKind( n ), nOrd( nr ), pObject( pObj ), bWasOpened(FALSE) {}
+};
+
+typedef SfxGroupInfo_Impl* SfxGroupInfoPtr;
+SV_DECL_PTRARR_DEL(SfxGroupInfoArr_Impl, SfxGroupInfoPtr, 5, 5);
+DECL_2BYTEARRAY(USHORTArr, USHORT, 10, 10);
+
+class SfxConfigFunctionListBox_Impl : public SvTreeListBox
+{
+friend class SfxConfigGroupListBox_Impl;
+ Timer aTimer;
+ SvLBoxEntry* pCurEntry;
+ SfxGroupInfoArr_Impl aArr;
+
+ DECL_LINK( TimerHdl, Timer* );
+ virtual void MouseMove( const MouseEvent& rMEvt );
+
+public:
+ SfxConfigFunctionListBox_Impl( Window*, const ResId& );
+ ~SfxConfigFunctionListBox_Impl();
+ void ClearAll();
+ SvLBoxEntry* GetEntry_Impl( USHORT nId );
+ SvLBoxEntry* GetEntry_Impl( const String& );
+ USHORT GetId( SvLBoxEntry *pEntry );
+ String GetHelpText( SvLBoxEntry *pEntry );
+ USHORT GetCurId()
+ { return GetId( FirstSelected() ); }
+ SfxMacroInfo* GetMacroInfo();
+ void FunctionSelected();
+};
+
+class SfxConfigGroupListBox_Impl : public SvTreeListBox
+{
+ SfxConfigFunctionListBox_Impl* pFunctionListBox;
+ SfxGroupInfoArr_Impl aArr;
+ ULONG nMode;
+ String aScriptType;
+
+protected:
+ virtual void RequestingChilds( SvLBoxEntry *pEntry);
+#if SUPD>=527
+ virtual BOOL Expand( SvLBoxEntry* pParent );
+#endif
+
+public:
+ SfxConfigGroupListBox_Impl ( Window* pParent,
+ const ResId&, ULONG nConfigMode = 0 );
+ ~SfxConfigGroupListBox_Impl();
+
+ void Init( SvStringsDtor *pArr = 0 );
+ void SetFunctionListBox( SfxConfigFunctionListBox_Impl *pBox )
+ { pFunctionListBox = pBox; }
+ void Open( SvLBoxEntry*, BOOL );
+ void GroupSelected();
+ void SelectMacro( const SfxMacroInfoItem* );
+ void SelectMacro( const String&, const String& );
+ String GetGroup();
+ void SetScriptType( const String& rScriptType );
+};
+
+class SfxMenuConfigEntry
+{
+private:
+ USHORT nId;
+ BOOL bPopUp;
+ String aHelpText;
+ String aStr;
+
+public:
+ SfxMenuConfigEntry( USHORT nInitId, const String& rInitStr,
+ const String& rHelpText, BOOL bPopup = FALSE );
+ SfxMenuConfigEntry() : nId( 0 ), bPopUp( FALSE ) {}
+ ~SfxMenuConfigEntry();
+
+ USHORT GetId() const { return nId; }
+ void SetId( USHORT nNew );
+ const String& GetName() const { return aStr; }
+ void SetName( const String& rStr ) { aStr = rStr; }
+ const String& GetHelpText() const { return aHelpText; }
+ void SetHelpText( const String& rStr ) { aHelpText = rStr; }
+ void SetPopup( BOOL bOn = TRUE ) { bPopUp = bOn; }
+ BOOL IsBinding() const { return nId != 0 && !bPopUp; }
+ BOOL IsSeparator() const { return nId == 0; }
+ BOOL IsPopup() const { return bPopUp; }
+};
+
+// class SfxMenuConfigEntryArr *************************************************
+
+SV_DECL_PTRARR_DEL(SfxMenuConfigEntryArr, SfxMenuConfigEntry *, 16, 16)
+
+class SfxMenuConfigPage;
+class SfxMenuCfgTabListBox_Impl : public SvTabListBox
+{
+ SfxMenuConfigPage* pPage;
+ SfxMenuConfigEntryArr aMenuArr;
+ Timer aTimer;
+ SfxMenuConfigEntry* pCurEntry;
+
+ DECL_LINK( TimerHdl, Timer* );
+
+public :
+ SfxMenuCfgTabListBox_Impl( Window *pParent, const ResId& rResId );
+ ~SfxMenuCfgTabListBox_Impl();
+
+ virtual long PreNotify( NotifyEvent& );
+ virtual void ModelIsRemoving( SvListEntry* pEntry );
+ void EntryInserted( SvListEntry* pEntry );
+ virtual void ModelHasCleared();
+ virtual void EditingRequest( SvLBoxEntry* pEntry,
+ SvLBoxItem* pItem, const Point& rMousePos );
+ virtual BOOL EditedEntry( SvLBoxEntry* pEntry, const String& rNewText );
+ virtual void MouseMove( const MouseEvent& rMEvt );
+ virtual BOOL QueryDrop( DropEvent& );
+ virtual BOOL NotifyMoving(SvLBoxEntry*, SvLBoxEntry*, SvLBoxEntry*&, ULONG& );
+ void Apply( SfxMenuManager* pMgr, SvLBoxEntry *pParent = NULL );
+};
+
+// class SfxMenuConfigPage -----------------------------------------------
+
+class SfxMenuConfigPage : public SfxTabPage
+{
+private:
+ SfxMenuCfgTabListBox_Impl aEntriesBox;
+ GroupBox aMenuGroup;
+ PushButton aNewButton;
+ PushButton aNewPopupButton;
+ PushButton aChangeButton;
+ PushButton aRemoveButton;
+ ImageButton aUpButton;
+ ImageButton aDownButton;
+ FixedText aGroupText;
+ SfxConfigGroupListBox_Impl aGroupBox;
+ FixedText aFunctionText;
+ SfxConfigFunctionListBox_Impl aFunctionBox;
+ GroupBox aFunctionsGroup;
+ PushButton aLoadButton;
+ PushButton aSaveButton;
+ PushButton aResetButton;
+
+ SfxMenuManager* pMgr;
+
+ BOOL bModified;
+ BOOL bDefault;
+
+ DECL_LINK( MoveHdl, Button * );
+ DECL_LINK( NewHdl, Button * );
+ DECL_LINK( NewPopupHdl, Button * );
+ DECL_LINK( ChangeHdl, Button * );
+ DECL_LINK( RemoveHdl, Button * );
+ DECL_LINK( SelectHdl, Control* );
+
+ void CheckEntry( Control* );
+ USHORT GetCurId();
+ String MakeEntry( const SfxMenuConfigEntry &rEntry ) const;
+ String Trim( const String &rStr ) const;
+
+ void Init();
+ void ResetConfig();
+
+ BOOL TryMove_Impl( Button*, SvLBoxEntry** pEntry=NULL, ULONG* pPos=NULL );
+
+ DECL_LINK( Default, PushButton * );
+ DECL_LINK( Save, Button * );
+ DECL_LINK( Load, Button * );
+
+public:
+ SfxMenuConfigPage( Window *pParent, const SfxItemSet& rItemSet );
+ virtual ~SfxMenuConfigPage();
+
+ virtual BOOL FillItemSet( SfxItemSet& );
+ virtual void Reset( const SfxItemSet& );
+ void Apply();
+ void SetModified( BOOL bSet ) { bModified = bSet; }
+ void SetDefault( BOOL bSet ) { bDefault = bSet; }
+};
+
+
+class SfxAcceleratorManager;
+
+// class SfxAcceleratorConfigListBox *************************************************
+
+class SfxAccCfgTabListBox_Impl : public SfxMenuCfgTabListBox_Impl
+{
+ void KeyInput( const KeyEvent &rKEvt );
+
+public:
+ SfxAccCfgTabListBox_Impl( Window *pParent,
+ const ResId &rResId ) :
+ SfxMenuCfgTabListBox_Impl( pParent, rResId )
+ {}
+
+ void ReplaceEntry( USHORT nPos, const String &rStr );
+};
+
+// class SfxAcceleratorConfigPage ----------------------------------------
+
+class SfxAcceleratorConfigPage : public SfxTabPage
+{
+private:
+ SfxAccCfgTabListBox_Impl aEntriesBox;
+ GroupBox aKeyboardGroup;
+ PushButton aChangeButton;
+ PushButton aRemoveButton;
+ FixedText aGroupText;
+ SfxConfigGroupListBox_Impl aGroupBox;
+ FixedText aFunctionText;
+ SfxConfigFunctionListBox_Impl aFunctionBox;
+ FixedText aKeyText;
+ ListBox aKeyBox;
+ GroupBox aFunctionsGroup;
+ PushButton aLoadButton;
+ PushButton aSaveButton;
+ PushButton aResetButton;
+
+ SfxAcceleratorManager* pMgr;
+
+ USHORTArr aAccelArr;
+ USHORTArr aKeyArr;
+ BOOL bModified;
+ BOOL bDefault;
+
+ DECL_LINK( ChangeHdl, Button * );
+ DECL_LINK( RemoveHdl, Button * );
+ DECL_LINK( SelectHdl, Control * );
+ DECL_LINK( Save, Button * );
+ DECL_LINK( Load, Button * );
+ DECL_LINK( Default, PushButton * );
+
+ KeyCode PosToKeyCode ( USHORT nPos ) const;
+ USHORT KeyCodeToPos ( const KeyCode &rCode ) const;
+ String GetFunctionName( KeyFuncType eType ) const;
+
+ void Init();
+ void ResetConfig();
+
+public:
+ SfxAcceleratorConfigPage( Window *pParent, const SfxItemSet& rItemSet );
+ virtual ~SfxAcceleratorConfigPage();
+
+ virtual BOOL FillItemSet( SfxItemSet& );
+ virtual void Reset( const SfxItemSet& );
+
+ void SelectMacro(const SfxMacroInfoItem*);
+ void Apply();
+};
+
+class SfxConfigDialog : public SfxTabDialog
+{
+ const SfxMacroInfoItem* pMacroInfo;
+ USHORT nObjectBar;
+
+public:
+ SfxConfigDialog( Window*, const SfxItemSet* );
+ ~SfxConfigDialog();
+
+ void ActivateToolBoxConfig( USHORT nId );
+ void ActivateMacroConfig( const SfxMacroInfoItem* );
+
+ virtual void PageCreated( USHORT nId, SfxTabPage &rPage );
+ virtual short Ok();
+
+ static String FileDialog_Impl( Window *pParent, WinBits nBits, const String& rTitle );
+ static SfxConfigManager* MakeCfgMgr_Impl( const String& rName, BOOL& bCreated );
+};
+
+class SfxStatusBarManager;
+class SfxStbInfoArr_Impl;
+
+class SfxStatusBarConfigListBox : public SvTreeListBox
+{
+friend class SfxStatusBarConfigPage;
+ SvLBoxButtonData* pButton;
+ BOOL bModified;
+ BOOL bDefault;
+ SvLBoxEntry* pCurEntry;
+ Timer aTimer;
+
+ DECL_LINK( TimerHdl, Timer* );
+
+public:
+
+ SfxStatusBarConfigListBox( Window* pParent,
+ const ResId& );
+
+ virtual BOOL NotifyQueryDrop( SvLBoxEntry* pEntry );
+ virtual BOOL NotifyMoving(SvLBoxEntry*,
+ SvLBoxEntry*,SvLBoxEntry*&,ULONG&);
+ virtual void CheckButtonHdl();
+ virtual void MouseMove( const MouseEvent& rMEvt );
+ virtual void KeyInput( const KeyEvent& rKeyEvent );
+};
+
+// class SfxStatusBarConfigPage ------------------------------------------
+
+class SfxStatusBarConfigPage : public SfxTabPage
+{
+private:
+ SfxStatusBarConfigListBox aEntriesBox;
+ GroupBox aStatusBarGroup;
+ PushButton aLoadButton;
+ PushButton aSaveButton;
+ PushButton aResetButton;
+
+ SvUShorts aListOfIds;
+ SfxStatusBarManager* pMgr;
+ SfxStbInfoArr_Impl* pArr;
+
+ DECL_LINK( SelectHdl, SvTreeListBox * );
+ DECL_LINK( Save, Button * );
+ DECL_LINK( Load, Button * );
+ DECL_LINK( Default, PushButton * );
+
+ void Init();
+ void ResetConfig();
+
+public:
+ SfxStatusBarConfigPage( Window *pParent, const SfxItemSet& rItemSet );
+ virtual ~SfxStatusBarConfigPage();
+
+ virtual BOOL FillItemSet( SfxItemSet& );
+ virtual void Reset( const SfxItemSet& );
+ void Apply();
+};
+
+
+#endif
+
diff --git a/sfx2/source/inc/eventdlg.hxx b/sfx2/source/inc/eventdlg.hxx
new file mode 100644
index 000000000000..c5d79cbf2765
--- /dev/null
+++ b/sfx2/source/inc/eventdlg.hxx
@@ -0,0 +1,109 @@
+/*************************************************************************
+ *
+ * $RCSfile: eventdlg.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:34 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _EVENTDLG_HXX
+#define _EVENTDLG_HXX
+
+#ifndef _GROUP_HXX //autogen
+#include <vcl/group.hxx>
+#endif
+#ifndef _MENUBTN_HXX //autogen
+#include <vcl/menubtn.hxx>
+#endif
+
+#include "evntconf.hxx"
+#include "macropg.hxx"
+
+class Menu;
+class SfxMacroInfoItem;
+class SvxMacroItem;
+
+class SfxEventConfigPage : public _SfxMacroTabPage
+{
+ RadioButton aStarOfficeRB;
+ RadioButton aDocumentRB;
+// CheckBox aWarningCB;
+ CheckBox aAlwaysWarningCB;
+ GroupBox aSafetyGb;
+
+ SvxMacroItem* pAppItem;
+ SvxMacroItem* pDocItem;
+ BOOL bModified;
+ BOOL bAppConfig;
+
+ DECL_LINK( ButtonHdl, Button* );
+ DECL_LINK( SelectHdl_Impl, RadioButton* );
+
+public:
+ SfxEventConfigPage( Window *pParent, const SfxItemSet& rSet );
+ ~SfxEventConfigPage();
+
+ void Init();
+ void SelectMacro( const SfxMacroInfoItem* );
+ void SelectMacro( const SvxMacro* );
+ void Apply();
+
+ virtual BOOL FillItemSet( SfxItemSet& );
+ virtual void Reset( const SfxItemSet& );
+};
+
+
+#endif
+
diff --git a/sfx2/source/inc/fltfnc.hxx b/sfx2/source/inc/fltfnc.hxx
new file mode 100644
index 000000000000..4217c4e1fba3
--- /dev/null
+++ b/sfx2/source/inc/fltfnc.hxx
@@ -0,0 +1,69 @@
+/*************************************************************************
+ *
+ * $RCSfile: fltfnc.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:34 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SFXFLTFNC_HXX
+#define _SFXFLTFNC_HXX
+
+#include "fcontnr.hxx"
+
+BOOL SfxIsHelpEntryURL( const String &rURL, const String &rExtMask );
+
+#endif
+
diff --git a/sfx2/source/inc/helper.hxx b/sfx2/source/inc/helper.hxx
new file mode 100644
index 000000000000..28c316127108
--- /dev/null
+++ b/sfx2/source/inc/helper.hxx
@@ -0,0 +1,111 @@
+/*************************************************************************
+ *
+ * $RCSfile: helper.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:34 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SFX_HELPER_HXX
+#define _SFX_HELPER_HXX
+
+// include ---------------------------------------------------------------
+
+#ifndef _COM_SUN_STAR_UNO_SEQUENCE_HXX_
+#include <com/sun/star/uno/Sequence.hxx>
+#endif
+#ifndef _COM_SUN_STAR_UCB_NAMECLASH_HPP_
+#include <com/sun/star/ucb/NameClash.hpp>
+#endif
+
+#include <tools/string.hxx>
+#include <tools/errcode.hxx>
+#include <tools/bigint.hxx>
+
+// class SfxContentHelper ------------------------------------------------
+
+class SfxContentHelper
+{
+private:
+ static sal_Bool Transfer_Impl( const String& rSource, const String& rDest, sal_Bool bMoveData,
+ sal_Int32 nNameClash );
+
+public:
+ static sal_Bool IsDocument( const String& rContent );
+ static sal_Bool IsFolder( const String& rContent );
+ static sal_Bool GetTitle( const String& rContent, String& rTitle );
+ static sal_Bool Kill( const String& rContent );
+
+ static ::com::sun::star::uno::Sequence< ::rtl::OUString >
+ GetFolderContents( const String& rFolder, sal_Bool bFolder );
+ static ::com::sun::star::uno::Sequence< ::rtl::OUString >
+ GetFolderContentProperties( const String& rFolder, sal_Bool bFolder );
+
+ static sal_Bool CopyTo( const String& rSource, const String& rDest );
+ static sal_Bool MoveTo( const String& rSource, const String& rDest, sal_Int32 nNameClash = com::sun::star::ucb::NameClash::ERROR );
+
+ static sal_Bool MakeFolder( const String& rFolder );
+ static ErrCode QueryDiskSpace( const String& rPath, sal_Int64& rFreeBytes );
+ static ULONG GetSize( const String& rContent );
+ static sal_Bool IsYounger( const String& rIsYoung, const String& rIsOlder );
+
+ // please don't use this!
+ static sal_Bool Exists( const String& rContent );
+ static sal_Bool Find( const String& rFolder, const String& rName, String& rFile );
+};
+
+#endif // #ifndef _SFX_HELPER_HXX
+
+
diff --git a/sfx2/source/inc/helpid.hrc b/sfx2/source/inc/helpid.hrc
new file mode 100644
index 000000000000..bd98f5f07b22
--- /dev/null
+++ b/sfx2/source/inc/helpid.hrc
@@ -0,0 +1,344 @@
+/*************************************************************************
+ *
+ * $RCSfile: helpid.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:34 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SFX_HELPID_HRC
+#define _SFX_HELPID_HRC
+
+// include ------------------------------------------------------------------
+
+#include <svtools/solar.hrc>
+
+// Help-Ids -----------------------------------------------------------------
+
+#define HID_FILTER_SELECT (HID_SFX_START + 0)
+#define HID_USERDEFBMP (HID_SFX_START + 1)
+#define HID_DOCINFO_EDT (HID_SFX_START + 2)
+#define HID_PASSWD (HID_SFX_START + 3)
+#define HID_PRINTMONITOR (HID_SFX_START + 4)
+#define HID_CONFIG_OBJECTBAR (HID_SFX_START + 5)
+#define HID_MANAGE_STYLES (HID_SFX_START + 6)
+#define HID_CONFIG_EVENT (HID_SFX_START + 7)
+#define HID_DOCINFODESC (HID_SFX_START + 8)
+#define HID_DOCINFODOC (HID_SFX_START + 9)
+#define HID_DOCINFOUSER (HID_SFX_START + 10)
+#define HID_CONFIG_MENU (HID_SFX_START + 11)
+#define HID_CONFIG_ACCEL (HID_SFX_START + 12)
+#define HID_CONFIG_STATBAR (HID_SFX_START + 13)
+#define HID_BOOKMARKPROPS (HID_SFX_START + 14)
+#define HID_BOOKGROUPPROPS (HID_SFX_START + 15)
+#define HID_BOOKFILEPROPS (HID_SFX_START + 16)
+#define HID_NEWS_SERVERPROPS (HID_SFX_START + 20)
+#define HID_NEWS_RULEPAGE (HID_SFX_START + 21)
+#define HID_MAILINTRAYPROPS (HID_SFX_START + 23)
+#define HID_DOCINFORELOAD (HID_SFX_START + 24)
+#define HID_NEWS_GROUPPAGE (HID_SFX_START + 25)
+#define HID_NEWS_SERVERPAGE (HID_SFX_START + 26)
+#define HID_FILEDLG_STANDARD (HID_SFX_START + 27)
+#define HID_FILEDLG_MANAGER (HID_SFX_START + 28)
+#define HID_FILEDLG_URL (HID_SFX_START + 29)
+#define HID_FILEDLG_FILE (HID_SFX_START + 30)
+#define HID_FILEDLG_USE_PASSWD (HID_SFX_START + 31)
+#define HID_FILEDLG_READ_ONLY (HID_SFX_START + 32)
+#define HID_EXPLORERCONTROL (HID_SFX_START + 33)
+#define HID_BROWSERCONTROL (HID_SFX_START + 34)
+#define HID_CTL_ORGANIZER_LEFT (HID_SFX_START + 35)
+#define HID_CTL_ORGANIZER_RIGHT (HID_SFX_START + 36)
+#define HID_EXPLMAILSRV_GENERAL_PAGE (HID_SFX_START + 37)
+#define HID_EXPLMAILSRV_PROTOCOL_PAGE (HID_SFX_START + 38)
+#define HID_EXPLMAILSRV_DATAMATCH_PAGE (HID_SFX_START + 39)
+#define HID_EXPLMAILSRV_SENDJOURNAL_PAGE (HID_SFX_START + 40)
+#define HID_EXPLMAIL_GENERAL_PAGE (HID_SFX_START + 41)
+#define HID_NEWS_CTL_RULES (HID_SFX_START + 42)
+#define HID_NEWS_CTL_GROUPS (HID_SFX_START + 43)
+#define HID_CONFIG_OBJECTBAR_CTL (HID_SFX_START + 44)
+#define HID_NEWS_QUICKSEARCH (HID_SFX_START + 45)
+#define HID_NEWS_SERVERVIEWPROPS (HID_SFX_START + 46)
+#define HID_NEWS_SHOWARTICLEPROPS (HID_SFX_START + 47)
+#define HID_NEWS_SHOWGROUPPROPS (HID_SFX_START + 48)
+#define HID_NEWS_USER (HID_SFX_START + 49)
+#define HID_MULTISELECTION_GENERAL_PAGE (HID_SFX_START + 50)
+#define HID_LINK_GENERAL_PAGE (HID_SFX_START + 51)
+#define HID_LINK_ADDRESS_PAGE (HID_SFX_START + 52)
+#define HID_FOLDER_GENERAL_PAGE (HID_SFX_START + 53)
+#define HID_FILE_GENERAL_PAGE (HID_SFX_START + 54)
+#define HID_FTP_GENERAL_PAGE (HID_SFX_START + 55)
+#define HID_PRINT_OPTIONS (HID_SFX_START + 56)
+#define HID_PREVIEW_FRAME (HID_SFX_START + 57)
+#define HID_DOCINFO_FRAME (HID_SFX_START + 58)
+#define HID_EXPLORER_FRAME (HID_SFX_START + 59)
+#define HID_APP_WIN (HID_SFX_START + 60)
+#define HID_TEMPLATE_FMT (HID_SFX_START + 61)
+#define HID_TEMPLATE_FILTER (HID_SFX_START + 62)
+#define HID_FTPSERVER_PAGE (HID_SFX_START + 63)
+#define HID_MACRO_LB_EVENT (HID_SFX_START + 64)
+#define HID_DLG_SFX_EXP_SEARCH (HID_SFX_START + 65)
+#define HID_TP_SFX_EXP_SEARCH_CRITERIA (HID_SFX_START + 66)
+#define HID_TP_SFX_EXP_SEARCH_PLACE (HID_SFX_START + 67)
+#define HID_SEARCH_DLG_TABLB (HID_SFX_START + 68)
+#define HID_TEMPLDLG_NEWBYEXAMPLE (HID_SFX_START + 69)
+#define HID_TEMPLDLG_UPDATEBYEXAMPLE (HID_SFX_START + 70)
+#define HID_TEMPLDLG_WATERCAN (HID_SFX_START + 71)
+#define HID_CONFIGFUNCTION_LISTBOX (HID_SFX_START + 72)
+#define HID_CONFIGGROUP_LISTBOX (HID_SFX_START + 73)
+#define HID_STATUSBARCONFIG_LISTBOX (HID_SFX_START + 74)
+#define HID_ACCELCONFIG_LISTBOX (HID_SFX_START + 75)
+#define HID_MENUCONFIG_LISTBOX (HID_SFX_START + 76)
+#define HID_TOOLBOXCONFIG_LISTBOX (HID_SFX_START + 77)
+#define HID_DESKTOP (HID_SFX_START + 78)
+#define HID_EXPLORERTOOLSTOOLBOX (HID_SFX_START + 79)
+#define HID_EXPLOREROBJECTTOOLBOX (HID_SFX_START + 80)
+#define HID_RECORDINGTOOLBOX (HID_SFX_START + 81)
+#define HID_FULLSCREENTOOLBOX (HID_SFX_START + 82)
+#define HID_HELPBAR (HID_SFX_START + 83)
+#define HID_ENVTOOLBOX (HID_SFX_START + 84)
+#define HID_FRAMESETEDIT_TOOLBOX (HID_SFX_START + 85)
+#define HID_NAVIGATOR_WINDOW (HID_SFX_START + 86)
+#define HID_MACRO_GROUP (HID_SFX_START + 87)
+#define HID_MACRO_MACROS (HID_SFX_START + 88)
+#define HID_TABDLG_RESET_BTN (HID_SFX_START + 89)
+#define HID_TABDLG_STANDARD_BTN (HID_SFX_START + 90)
+#define HID_HELPAGENT_TIP_BOX (HID_SFX_START + 91)
+#define HID_TEMPLDLG_TOOLBOX_LEFT (HID_SFX_START + 92)
+#define HID_TEMPLDLG_TOOLBOX_RIGHT (HID_SFX_START + 93)
+#define HID_EXPLORER_SRCH_COUNT (HID_SFX_START + 94)
+#define HID_BEAMER_SORT_ASCENDING (HID_SFX_START + 95)
+#define HID_BEAMER_SORT_DESCENDING (HID_SFX_START + 96)
+#define HID_EXPLORER_SRCH_LATEST_COUNT (HID_SFX_START + 97)
+#define HID_CONFIG_EVENT_OFFICE_BASED (HID_SFX_START + 98)
+#define HID_CONFIG_EVENT_DOCUMENT_BASED (HID_SFX_START + 99)
+#define HID_ORGANIZE_NEW (HID_SFX_START + 100)
+#define HID_ORGANIZE_DELETE (HID_SFX_START + 101)
+#define HID_ORGANIZE_EDIT (HID_SFX_START + 102)
+#define HID_ORGANIZE_COPY_FROM (HID_SFX_START + 103)
+#define HID_ORGANIZE_COPY_TO (HID_SFX_START + 104)
+#define HID_ORGANIZE_PRINT (HID_SFX_START + 105)
+#define HID_ORGANIZE_PRINTER_SETUP (HID_SFX_START + 106)
+#define HID_ORGANIZE_RESCAN (HID_SFX_START + 107)
+#define HID_STYLIST_NEW (HID_SFX_START + 108)
+#define HID_STYLIST_EDIT (HID_SFX_START + 109)
+#define HID_STYLIST_DELETE (HID_SFX_START + 110)
+#define HID_EXPLORERMENU_ARRANGEICONS (HID_SFX_START + 111)
+#define HID_EXPLORERMENU_ARRANGEICONS_ONGRID (HID_SFX_START + 112)
+#define HID_EXPLORERMENU_FIXEDICONPOS (HID_SFX_START + 113)
+#define HID_EXPLORERMENU_OPEN (HID_SFX_START + 114)
+#define HID_EXPLORERMENU_PRINT (HID_SFX_START + 115)
+#define HID_EXPLORERMENU_SEARCH (HID_SFX_START + 116)
+#define HID_EXPLORERMENU_COPY (HID_SFX_START + 117)
+#define HID_EXPLORERMENU_DELETE (HID_SFX_START + 118)
+#define HID_EXPLORERMENU_CREATELINK (HID_SFX_START + 119)
+#define HID_EXPLORERMENU_EDITPROPERTIES (HID_SFX_START + 120)
+#define HID_EXPLORERMENU_DOWNLOAD (HID_SFX_START + 121)
+#define HID_EXPLORERMENU_STDTEMPLATE (HID_SFX_START + 122)
+#define HID_EXPLORERDLG_FILE (HID_SFX_START + 123)
+#define HID_EXPLORERDLG_FILELIST (HID_SFX_START + 124)
+#define HID_PDFOLDERS_WORKPLACE (HID_SFX_START + 125)
+#define HID_PDFOLDERS_EXPLORER (HID_SFX_START + 126)
+#define HID_PDFOLDERS_STANDARD (HID_SFX_START + 127)
+#define HID_PDFOLDERS_ROOT (HID_SFX_START + 128)
+#define HID_PDFOLDERS_DESKTOP (HID_SFX_START + 129)
+#define HID_CNTMENU_REMOVE_GROUP (HID_SFX_START + 130)
+#define HID_CNTMENU_CLEAR_CACHE (HID_SFX_START + 131)
+#define HID_CNT_SYNC_INFO_DLG (HID_SFX_START + 132)
+#define HID_CNT_REMOVE_REMOVEDLIST (HID_SFX_START + 133)
+#define HID_CNT_ABORT_DIALOG (HID_SFX_START + 134)
+#define HID_CNT_PAGE_PRJ_DATAEXCHANGE (HID_SFX_START + 135)
+#define HID_CHAOSDOC_OBJECTBAR_FILE (HID_SFX_START + 136)
+#define HID_CHAOSDOC_OBJECTBAR_MESSAGE (HID_SFX_START + 137)
+#define HID_CHAOSDOC_MN_PART_OPEN (HID_SFX_START + 138)
+#define HID_CHAOSDOC_MN_PART_DELETE (HID_SFX_START + 139)
+#define HID_CHAOSDOC_MN_PART_RENAME (HID_SFX_START + 140)
+#define HID_CHAOSDOC_MN_PART_SAVEAS (HID_SFX_START + 141)
+#define HID_EXPLORER_DOCVIEW_ICON (HID_SFX_START + 142)
+#define HID_EXPLORER_DOCVIEW_DETAILS (HID_SFX_START + 143)
+#define HID_CHAOSDOC_WIN (HID_SFX_START + 144)
+#define HID_CHAOSDOC_WIN_HEADER (HID_SFX_START + 145)
+#define HID_CHAOSDOC_WIN_PARTS (HID_SFX_START + 146)
+#define HID_CHAOSDOC_WIN_BODY (HID_SFX_START + 147)
+#define HID_CNT_INSERT_COLUMN (HID_SFX_START + 148)
+#define HID_CNT_REMOVE_COLUMN (HID_SFX_START + 149)
+#define HID_CNT_OPT_WIDTH (HID_SFX_START + 150)
+#define HID_CNT_SORT_ASC (HID_SFX_START + 151)
+#define HID_CNT_SORT_DESC (HID_SFX_START + 152)
+#define HID_CNT_RULEPG_OPEN_DIR (HID_SFX_START + 153)
+#define HID_CHAOSDOC_MN_HEADER_ADDRESSBOOK (HID_SFX_START + 154)
+#define HID_CHAOSDOC_MN_HEADER_COPYLINK (HID_SFX_START + 155)
+#define HID_CLEAN_CACHE (HID_SFX_START + 156)
+#define HID_SBOX_LOCATION (HID_SFX_START + 157)
+#define HID_SBOX_SUBSCRIBTION (HID_SFX_START + 158)
+#define HID_SBOX_CDF_SUBSCRIBTION (HID_SFX_START + 159)
+#define HID_SBOX_SCHEDULE (HID_SFX_START + 160)
+#define HID_SBOX_NOTIFICATION (HID_SFX_START + 161)
+#define HID_SBOX_SDC_GENERAL (HID_SFX_START + 162)
+#define HID_BRWBOX_HEADERBAR (HID_SFX_START + 163)
+#define HID_CANNOT_CREATE_BMK_HERE (HID_SFX_START + 164)
+#define HID_CREATE_BOOKMARK (HID_SFX_START + 165)
+#define HID_TASKBAR (HID_SFX_START + 166)
+#define HID_TASKBUTTONBAR (HID_SFX_START + 167)
+#define HID_TASKTOOLBAR (HID_SFX_START + 168)
+#define HID_CHAOSDOC_SHOW_FSYS_EXTENSION (HID_SFX_START + 169)
+#define HID_CNT_FILE (HID_SFX_START + 170)
+#define HID_CHAOSDOC_MN_BODY_OPENLINK (HID_SFX_START + 171)
+#define HID_CHAOSDOC_MN_BODY_OPENLINK_BLANK (HID_SFX_START + 172)
+#define HID_CHAOSDOC_MN_BODY_DOWNLOAD (HID_SFX_START + 173)
+#define HID_CHAOSDOC_MN_BODY_ADDBOOKMARK (HID_SFX_START + 174)
+#define HID_OPEN_MENU_CNT (HID_SFX_START + 175)
+#define HID_CNT_OPEN_AS_TEMPLATE (HID_SFX_START + 176)
+#define HID_CNT_OPEN_AS_DOC (HID_SFX_START + 177)
+#define HID_PDFOLDERS_TEMPLATE (HID_SFX_START + 178)
+#define HID_EXPLORER_ROOT (HID_SFX_START + 179)
+#define HID_RESET_URL (HID_SFX_START + 180)
+#define HID_PHONE_DIALOG (HID_SFX_START + 181)
+#define HID_QB_RESOLVE_LINK (HID_SFX_START + 182)
+#define HID_CHAOSDOC_MN_HEADER_FLAG_BOLD (HID_SFX_START + 183)
+#define HID_CHAOSDOC_MN_HEADER_FLAG_ITALIC (HID_SFX_START + 184)
+#define HID_CHAOSDOC_MN_HEADER_BIG_HEADER (HID_SFX_START + 185)
+#define HID_CHAOSDOC_MN_HEADER_TEMPLATE_HEADER (HID_SFX_START + 186)
+#define HID_CNT_MARK_THREAD_MARKED (HID_SFX_START + 187)
+#define HID_CNT_MARK_THREAD_UNMARKED (HID_SFX_START + 188)
+#define HID_CNT_DLG_SEARCH_BT_SHOW (HID_SFX_START + 189)
+#define HID_CNT_DLG_SEARCH_BT_UPDATE (HID_SFX_START + 190)
+#define HID_CNT_DLG_SEARCH_BT_SYNCHRONIZE (HID_SFX_START + 191)
+#define HID_CNT_DLG_SEARCH_BT_STOP (HID_SFX_START + 192)
+#define HID_CNT_PAGE_HEADER (HID_SFX_START + 193)
+#define HID_CNT_DLG_ADDRESS (HID_SFX_START + 194)
+#define HID_EXPLORERMENU_AUTO_ARRANGEICONS (HID_SFX_START + 195)
+#define HID_EXPLORERMENU_AUTO_ADJUSTICONS (HID_SFX_START + 196)
+#define HID_EXPLORERMENU_FREE_POSITIONING (HID_SFX_START + 197)
+#define HID_CNT_TARGET_MENU (HID_SFX_START + 198)
+#define HID_CNT_PAGE_DESCRIPTION (HID_SFX_START + 199)
+#define HID_CNT_LB_HEADER (HID_SFX_START + 200)
+#define HID_CNT_LB_DESCRIPTION (HID_SFX_START + 201)
+#define HID_GROUPVIEW_BIG_SYMBOLS (HID_SFX_START + 202)
+#define HID_GROUPVIEW_SMALL_SYMBOLS (HID_SFX_START + 203)
+#define HID_GROUPVIEW_ADD_GROUP (HID_SFX_START + 204)
+#define HID_GROUPVIEW_REMOVE_GROUP (HID_SFX_START + 205)
+#define HID_GROUPVIEW_RENAME_GROUP (HID_SFX_START + 206)
+#define HID_GROUPVIEW_ADD_BOOKMARK (HID_SFX_START + 207)
+#define HID_GROUPVIEW_TREE (HID_SFX_START + 208)
+#define HID_GROUPVIEW_ADD_AS_FOLDER (HID_SFX_START + 209)
+#define HID_GROUPVIEW_ADD_AS_BMK (HID_SFX_START + 210)
+#define HID_GROUPVIEW_REMOVE_BMK (HID_SFX_START + 211)
+#define HID_GROUPVIEW_CONTENT_BIG (HID_SFX_START + 212)
+#define HID_GROUPVIEW_CONTENT_SMALL (HID_SFX_START + 213)
+#define HID_GROUPVIEW_CONTENT_TREE (HID_SFX_START + 214)
+#define HID_GROUPVIEW_SHOW_DOCS (HID_SFX_START + 215)
+#define HID_EDIT_TEMPLATE (HID_SFX_START + 216)
+#define HID_PDFOLDERS_GRAPHICS (HID_SFX_START + 217)
+#define HID_FILEDLG_AUTOCOMPLETEBOX (HID_SFX_START + 218)
+#define HID_FILEDLG_SAVE_BTN (HID_SFX_START + 219)
+#define HID_FILEDLG_SAVE_FILENAME (HID_SFX_START + 220)
+#define HID_FILEDLG_SAVE_FILETYPE (HID_SFX_START + 221)
+#define HID_FILEDLG_INSERT_BTN (HID_SFX_START + 222)
+#define HID_FILEDLG_PATH_BTN (HID_SFX_START + 223)
+#define HID_FILEDLG_PATH_FILENAME (HID_SFX_START + 224)
+#define HID_FILEDLG_FOLDER_BTN (HID_SFX_START + 225)
+#define HID_FILEDLG_FOLDER_FILENAME (HID_SFX_START + 226)
+#define HID_FILEDLG_SRCHFOLDER_BTN (HID_SFX_START + 227)
+#define HID_PDFOLDERS_GROUPS (HID_SFX_START + 228)
+#define HID_OPEN_CHOOSE_FILTER (HID_SFX_START + 229)
+#define HID_PDFOLDERS_BOOKMARKS (HID_SFX_START + 230)
+#define HID_PDFOLDERS_FAVORITES_ADD (HID_SFX_START + 231)
+#define HID_PDFOLDERS_FAVORITES_REMOVE (HID_SFX_START + 232)
+#define HID_PDFOLDERS_HISTORY (HID_SFX_START + 233)
+#define HID_FILEDLG_EDIT_FAVORITES (HID_SFX_START + 234)
+#define HID_FILEDLG_NEW_FAVORITE (HID_SFX_START + 235)
+#define HID_FILEDLG_EDIT_FAVORITES_LISTBOX (HID_SFX_START + 236)
+#define HID_FILEDLG_EDIT_FAVORITES_HEADERBAR (HID_SFX_START + 237)
+#define HID_CONFIGFUNCTION_ACC_LISTBOX (HID_SFX_START + 238)
+#define HID_CONFIGGROUP_ACC_LISTBOX (HID_SFX_START + 239)
+#define HID_CNT_CB_FORCE_BODY_EXPORT (HID_SFX_START + 240)
+#define HID_CNT_PAGE_REPSTATE_CONTROL (HID_SFX_START + 241)
+#define HID_TASKSTATUSBAR (HID_SFX_START + 242)
+#define HID_STATUSBAR (HID_SFX_START + 243)
+#define HID_CNT_PAGE_HEADER_TABBAR (HID_SFX_START + 244)
+#define HID_CNT_PAGE_SUBSCR_TABBAR (HID_SFX_START + 245)
+#define HID_CHAOSDOC_MN_PART_PRINT (HID_SFX_START + 246)
+#define HID_STATUSINDICATOR_TEXT (HID_SFX_START + 247)
+#define HID_STATUSINDICATOR_PROGRESS (HID_SFX_START + 248)
+#define HID_CNT_VALUE_ADDED_NONE (HID_SFX_START + 249)
+#define HID_CNT_VALUE_ADDED_DOCINFO (HID_SFX_START + 250)
+#define HID_CNT_VALUE_ADDED_FULL (HID_SFX_START + 251)
+#define HID_CNT_MESSAGE_STOREMODE_REMOTE (HID_SFX_START + 252)
+#define HID_CNT_MESSAGE_STOREMODE_LOCAL (HID_SFX_START + 253)
+#define HID_CNT_VIEW_ALL_ARTICLES (HID_SFX_START + 254)
+#define HID_CNT_VIEW_UNREAD_ARTICLES (HID_SFX_START + 255)
+#define HID_CNT_VIEW_READ_ARTICLES (HID_SFX_START + 256)
+#define HID_CNT_VIEW_MARKED_ARTICLES (HID_SFX_START + 257)
+#define HID_CNT_VIEW_MARKED_AND_UNREAD_ARTICLES (HID_SFX_START + 258)
+#define HID_CNT_VIEW_ALL_FOLDERS (HID_SFX_START + 259)
+#define HID_CNT_VIEW_SUBSCRIBED_FOLDERS (HID_SFX_START + 260)
+#define HID_CNT_VIEW_ACTIVE_FOLDERS (HID_SFX_START + 261)
+#define HID_CNT_SENT_VIEW_ALL_ARTICLES (HID_SFX_START + 262)
+#define HID_CNT_SENT_VIEW_SENT_ARTICLES (HID_SFX_START + 263)
+#define HID_CNT_SENT_VIEW_UNSENT_ARTICLES (HID_SFX_START + 264)
+#define HID_CNT_SENT_VIEW_MARKED_ARTICLES (HID_SFX_START + 265)
+
+#define ACT_SFX_HID_END HID_CNT_SENT_VIEW_MARKED_ARTICLES
+
+// "Uberlaufpr"ufung --------------------------------------------------------
+
+#if ACT_SFX_HID_END > HID_SFX_END
+#error Resource-Ueberlauf in #line, #file
+#endif
+
+#endif // #ifndef _SFX_HELPID_HRC
+
+// ******************************************************************* EOF
+
diff --git a/sfx2/source/inc/hexplwnd.hxx b/sfx2/source/inc/hexplwnd.hxx
new file mode 100644
index 000000000000..e2888930d333
--- /dev/null
+++ b/sfx2/source/inc/hexplwnd.hxx
@@ -0,0 +1,173 @@
+/*************************************************************************
+ *
+ * $RCSfile: hexplwnd.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:34 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _HEXPLWND_HXX
+#define _HEXPLWND_HXX
+
+// includes --------------------------------------------------------------
+
+#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUES_HPP_
+#include <com/sun/star/beans/PropertyValues.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
+#include <com/sun/star/beans/XPropertySet.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_
+#include <com/sun/star/beans/PropertyValue.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_PROPERTYSTATE_HPP_
+#include <com/sun/star/beans/PropertyState.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSETINFO_HPP_
+#include <com/sun/star/beans/XPropertySetInfo.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XMULTIPROPERTYSET_HPP_
+#include <com/sun/star/beans/XMultiPropertySet.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XFASTPROPERTYSET_HPP_
+#include <com/sun/star/beans/XFastPropertySet.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XVETOABLECHANGELISTENER_HPP_
+#include <com/sun/star/beans/XVetoableChangeListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSTATE_HPP_
+#include <com/sun/star/beans/XPropertyState.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSTATECHANGELISTENER_HPP_
+#include <com/sun/star/beans/XPropertyStateChangeListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HPP_
+#include <com/sun/star/beans/PropertyAttribute.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTIESCHANGELISTENER_HPP_
+#include <com/sun/star/beans/XPropertiesChangeListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYCHANGELISTENER_HPP_
+#include <com/sun/star/beans/XPropertyChangeListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYACCESS_HPP_
+#include <com/sun/star/beans/XPropertyAccess.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYCONTAINER_HPP_
+#include <com/sun/star/beans/XPropertyContainer.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_PROPERTYSTATECHANGEEVENT_HPP_
+#include <com/sun/star/beans/PropertyStateChangeEvent.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_PROPERTYCHANGEEVENT_HPP_
+#include <com/sun/star/beans/PropertyChangeEvent.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XFRAME_HPP_
+#include <com/sun/star/frame/XFrame.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UTIL_URL_HPP_
+#include <com/sun/star/util/URL.hpp>
+#endif
+#include "childwin.hxx"
+#include "dockwin.hxx"
+
+// forward ---------------------------------------------------------------
+
+class SfxBeamerUnoFrame_Impl;
+
+// class SfxExplorerHorizChildWnd_Impl -----------------------------------
+
+class SfxExplorerHorizChildWnd_Impl : public SfxChildWindow
+{
+public:
+ SfxExplorerHorizChildWnd_Impl( Window* pParent, sal_uInt16 nId,
+ SfxBindings* pBindings,
+ SfxChildWinInfo* pInfo );
+
+ SFX_DECL_CHILDWINDOW(SfxExplorerHorizChildWnd_Impl);
+
+
+ virtual sal_Bool QueryClose();
+};
+
+// class SfxExplorerDockWnd_Impl -----------------------------------------
+
+class SfxExplorerHorizDockWnd_Impl : public SfxDockingWindow
+{
+private:
+ SfxBeamerUnoFrame_Impl* _pFrame;
+
+protected:
+ virtual void GetFocus();
+ virtual long Notify( NotifyEvent& rNEvt );
+
+public:
+ SfxExplorerHorizDockWnd_Impl( SfxBindings* pBindings,
+ SfxChildWindow* pChildWin,
+ Window* pParent, const ResId& rResId );
+ ~SfxExplorerHorizDockWnd_Impl();
+
+ virtual void FillInfo( SfxChildWinInfo& ) const;
+ virtual void FadeIn( sal_Bool );
+ sal_Bool QueryClose();
+ void SetURL( const ::com::sun::star::util::URL& rURL, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rArgs );
+ const ::com::sun::star::util::URL& GetURL() const;
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > GetFrameInterface();
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& GetArgs() const;
+};
+
+
+#endif
+
diff --git a/sfx2/source/inc/intro.hxx b/sfx2/source/inc/intro.hxx
new file mode 100644
index 000000000000..a8d48e30b4b2
--- /dev/null
+++ b/sfx2/source/inc/intro.hxx
@@ -0,0 +1,93 @@
+/*************************************************************************
+ *
+ * $RCSfile: intro.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:34 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SFX_INTRO_HXX
+#define _SFX_INTRO_HXX
+
+// include ---------------------------------------------------------------
+
+#ifndef _SV_WRKWIN_HXX
+#include <vcl/wrkwin.hxx>
+#endif
+#ifndef _SV_BITMAP_HXX
+#include <vcl/bitmap.hxx>
+#endif
+
+// class IntroWindow_Impl ------------------------------------------------
+
+class IntroWindow_Impl : public WorkWindow
+{
+private:
+ Bitmap aIntroBmp;
+
+ void Init();
+
+public:
+ IntroWindow_Impl( const Bitmap& rBmp );
+ ~IntroWindow_Impl();
+
+ virtual void Paint( const Rectangle& );
+
+ void Slide();
+};
+
+#endif // #ifndef _SFX_INTRO_HXX
+
+
diff --git a/sfx2/source/inc/mnucfga.hxx b/sfx2/source/inc/mnucfga.hxx
new file mode 100644
index 000000000000..0209fba527b6
--- /dev/null
+++ b/sfx2/source/inc/mnucfga.hxx
@@ -0,0 +1,87 @@
+/*************************************************************************
+ *
+ * $RCSfile: mnucfga.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:34 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SFXMNUCFGA_HXX
+#define _SFXMNUCFGA_HXX
+
+#ifndef _STRING_HXX //autogen
+#include <tools/string.hxx>
+#endif
+#ifndef _SFXMINARRAY_HXX
+#include "minarray.hxx"
+#endif
+
+//==================================================================
+
+class SfxMenuCfgItemArr;
+
+struct SfxMenuCfgItem
+{
+ USHORT nId; // id of the binding or 0 if none
+ String aTitle; // title of the item
+ String aHelpText; // Hilfetext
+ SfxMenuCfgItemArr* pPopup; // pointer to a popup menu (if any)
+};
+
+DECL_PTRARRAY(SfxMenuCfgItemArr, SfxMenuCfgItem*, 4, 4 );
+
+
+#endif
+
diff --git a/sfx2/source/inc/nfltdlg.hxx b/sfx2/source/inc/nfltdlg.hxx
new file mode 100644
index 000000000000..66f8fb0e7f37
--- /dev/null
+++ b/sfx2/source/inc/nfltdlg.hxx
@@ -0,0 +1,108 @@
+/*************************************************************************
+ *
+ * $RCSfile: nfltdlg.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:34 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SFXNFLTDLG_HXX
+#define _SFXNFLTDLG_HXX
+
+
+#ifndef _DIALOG_HXX //autogen
+#include <vcl/dialog.hxx>
+#endif
+#ifndef _LSTBOX_HXX //autogen
+#include <vcl/lstbox.hxx>
+#endif
+#ifndef _BUTTON_HXX //autogen
+#include <vcl/button.hxx>
+#endif
+#ifndef _FIXED_HXX //autogen
+#include <vcl/fixed.hxx>
+#endif
+#ifndef _GROUP_HXX //autogen
+#include <vcl/group.hxx>
+#endif
+class SfxFilterMatcher;
+
+class SfxMedium;
+class SfxFilterDialog : public ModalDialog
+{
+private:
+ GroupBox aGroupType;
+ FixedText aMIMEType;
+ FixedText aExtension;
+ ListBox aListbox;
+ GroupBox aGroupFrm;
+ OKButton aOkBtn;
+ CancelButton aCancelBtn;
+ HelpButton aHelpBtn;
+ String aDefFilter;
+ const SfxFilterMatcher& rMatcher;
+ DECL_LINK( OkHdl, Control * );
+
+public:
+ SfxFilterDialog( Window * pParent,
+ SfxMedium* pMed,
+ const SfxFilterMatcher &rMatcher,
+ const String *pDefFilter, BOOL bShowConvert = TRUE );
+
+ String GetSelectEntry() const;
+};
+
+
+#endif
diff --git a/sfx2/source/inc/nochaos.hxx b/sfx2/source/inc/nochaos.hxx
new file mode 100644
index 000000000000..089ad04b3f7b
--- /dev/null
+++ b/sfx2/source/inc/nochaos.hxx
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * $RCSfile: nochaos.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:34 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SFX_NOCHAOS_HXX
+#define _SFX_NOCHAOS_HXX
+
+class SfxItemPool;
+
+class NoChaos
+{
+public:
+ static SfxItemPool* GetItemPool();
+ static USHORT ReleaseItemPool();
+};
+
+#endif
+
diff --git a/sfx2/source/inc/objmnctl.hxx b/sfx2/source/inc/objmnctl.hxx
new file mode 100644
index 000000000000..b5a06f3104de
--- /dev/null
+++ b/sfx2/source/inc/objmnctl.hxx
@@ -0,0 +1,90 @@
+/*************************************************************************
+ *
+ * $RCSfile: objmnctl.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:34 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SFX_OBJMNCTL_HXX
+#define _SFX_OBJMNCTL_HXX
+
+
+#ifndef _SFX_HXX
+#include "mnuitem.hxx"
+#endif
+
+class SfxBindings;
+class PopupMenu;
+class Menu;
+
+class SfxObjectVerbsControl: public SfxMenuControl
+{
+ PopupMenu* pMenu;
+ Menu& rParent;
+
+private:
+ void FillMenu();
+ DECL_LINK( MenuSelect, Menu * );
+ virtual void StateChanged( USHORT, SfxItemState, const SfxPoolItem* pState );
+
+public:
+ SfxObjectVerbsControl(USHORT, Menu&, SfxBindings&);
+ ~SfxObjectVerbsControl();
+ virtual PopupMenu* GetPopup() const;
+ SFX_DECL_MENU_CONTROL();
+};
+
+#endif
diff --git a/sfx2/source/inc/objshimp.hxx b/sfx2/source/inc/objshimp.hxx
new file mode 100644
index 000000000000..4eea3381fbb7
--- /dev/null
+++ b/sfx2/source/inc/objshimp.hxx
@@ -0,0 +1,237 @@
+/*************************************************************************
+ *
+ * $RCSfile: objshimp.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:34 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SFX_OBJSHIMP_HXX
+#define _SFX_OBJSHIMP_HXX
+
+#include "objsh.hxx"
+#include "bitset.hxx"
+#ifndef _COM_SUN_STAR_IO_DATATRANSFEREVENT_HPP_
+#include <com/sun/star/io/DataTransferEvent.hpp>
+#endif
+#ifndef _COM_SUN_STAR_IO_XDATAIMPORTER_HPP_
+#include <com/sun/star/io/XDataImporter.hpp>
+#endif
+#ifndef _COM_SUN_STAR_IO_XDATATRANSFEREVENTLISTENER_HPP_
+#include <com/sun/star/io/XDataTransferEventListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_IO_XDATAEXPORTER_HPP_
+#include <com/sun/star/io/XDataExporter.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XMODEL_HPP_
+#include <com/sun/star/frame/XModel.hpp>
+#endif
+#ifndef _DATETIME_HXX
+#include <tools/datetime.hxx>
+#endif
+class AsynchronLink;
+
+//====================================================================
+
+DBG_NAMEEX(SfxObjectShell);
+
+class SfxViewFrame;
+struct MarkData_Impl
+{
+ String aMark;
+ String aUserData;
+ SfxViewFrame* pFrame;
+};
+
+class SfxFrame;
+#if SUPD<582
+class SfxJSDocument;
+class SfxJSDocumentManager;
+#endif
+class SvIPCClient;
+struct SfxObjectShell_Impl
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::io::XDataExporter > xFilter;
+ String aStarOneFilterName;
+ SfxDocumentInfo* pDocInfo;
+ SfxConfigManager* pCfgMgr;
+ SfxInPlaceObject* pInPlaceObj; // das dazugeh"orige SO2-Objekt, falls this ein SfxInPlaceObject ist
+ BasicManager* pBasicMgr; // Doc-BASIC oder 0
+ SfxProgress* pProgress;
+ String aTitle;
+ DateTime nTime;
+ sal_uInt16 nVisualDocumentNumber;
+ sal_Bool bTemplateConfig:1,
+ bInList:1, // ob per First/Next erreichbar
+ bClosing:1, // sal_True w"aehrend Close(), um Benachrichtigungs-Rekursionen zu verhindern
+ bSetInPlaceObj:1, // sal_True, falls bereits versucht wurde pInPlaceObject zu casten
+ bIsSaving:1,
+ bPasswd:1,
+ bIsTmp:1,
+ bIsNamedVisible:1,
+ bLoadLayout:1,
+ bDidWarnFormat:1, // sal_True, falls schon wg. speichern in Fremformat gewarnt wurde
+ bSetStandardName:1, // sal_True, falls im FileSave Dialog xxxx.sdw im Standardverzeichnis vorgeschlagen werden soll.
+ bDidDangerousSave:1, // sal_True, falls ein Save in ein Alienformat durchgefuehrt wurde
+ bIsTemplate:1,
+ bIsAbortingImport:1, // Importvorgang soll abgebrochen werden.
+ bImportDone : 1, //Import schon fertig? Fuer AutoReload von Docs.
+ bInPrepareClose : 1,
+ bPreparedForClose : 1,
+ bWaitingForPicklist : 1,// Muss noch in die Pickliste
+ bModuleSearched : 1,
+ bIsBasicDefault : 1,
+ bIsHelpObjSh : 1,
+ bForbidCaching : 1,
+ bForbidReload : 1,
+ bSupportsEventMacros: 1,
+ bLoadingWindows: 1,
+ bBasicInitialized :1;
+
+
+ String aNewName; // Der Name, unter dem das Doc gespeichert
+ // werden soll
+ IndexBitSet aBitSet;
+ sal_uInt32 lErr;
+ sal_uInt16 nEventId; // falls vor Activate noch ein
+ // Open/Create gesendet werden mu/s
+ sal_Bool bAddToHistory; // nicht per Forward/Backward
+ sal_Bool bSilent; // e.g. in API-Call => no dialogs
+
+ AutoReloadTimer_Impl *pReloadTimer;
+ MarkData_Impl* pMarkData;
+ sal_uInt16 nLoadedFlags;
+ String aMark;
+ Size aViewSize; // wird leider vom Writer beim
+ sal_Bool bInFrame; // HTML-Import gebraucht
+ sal_Bool bModalMode;
+ sal_Bool bReloadAvailable;
+ sal_uInt16 nAutoLoadLocks;
+ SfxModule* pModule;
+ SfxFrame* pFrame;
+ SfxEventConfigItem_Impl* pEventConfig;
+ SfxObjectShellFlags eFlags;
+ AsynchronLink* pCloser;
+ String aBaseURL;
+ sal_Bool bReadOnlyUI;
+ SvRefBaseRef xHeaderAttributes;
+ sal_Bool bHiddenLockedByAPI;
+ sal_Bool bInCloseEvent;
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > xModel;
+ sal_uInt16 nStyleFilter;
+
+ SfxObjectShell_Impl() :
+ nTime(),
+ bIsTmp( sal_False),
+ bClosing( sal_False),
+ bSetInPlaceObj( sal_False),
+ bPasswd( sal_False),
+ pInPlaceObj( 0),
+ pBasicMgr( 0),
+ pProgress( 0),
+ nVisualDocumentNumber( USHRT_MAX),
+ bIsSaving( sal_False),
+ bIsNamedVisible( sal_False),
+ bLoadLayout( sal_True),
+ pCfgMgr( 0),
+ bTemplateConfig( sal_False),
+ bDidWarnFormat( sal_False),
+ bDidDangerousSave(sal_False),
+ bIsBasicDefault( sal_True ),
+ bIsTemplate(sal_False),
+ lErr(ERRCODE_NONE),
+ nEventId ( 0),
+ bAddToHistory ( sal_True),
+ pDocInfo ( 0),
+ bIsAbortingImport ( sal_False),
+ bInList ( sal_False),
+ bImportDone ( sal_False),
+ pReloadTimer ( 0),
+ nLoadedFlags ( SFX_LOADED_MAINDOCUMENT ),
+ pMarkData( 0 ),
+ bInFrame( sal_False ),
+ bModalMode( sal_False ),
+ bReloadAvailable( sal_False ),
+ nAutoLoadLocks( 0 ),
+ bInPrepareClose( sal_False ),
+ bPreparedForClose( sal_False ),
+ bWaitingForPicklist( sal_False ),
+ pModule( 0 ),
+ bModuleSearched( sal_False ),
+ pFrame( 0 ),
+ pEventConfig(NULL),
+ bIsHelpObjSh( sal_False ),
+ bForbidCaching( sal_False ),
+ bSilent(sal_False),
+ bForbidReload( sal_False ),
+ bBasicInitialized( sal_False ),
+ eFlags( SFXOBJECTSHELL_UNDEFINED ),
+ pCloser( 0 ),
+ bSupportsEventMacros( sal_True ),
+ bReadOnlyUI( sal_False ),
+ bHiddenLockedByAPI( sal_False ),
+ bInCloseEvent( sal_False ),
+ bLoadingWindows( sal_False )
+ , nStyleFilter( 0 )
+ {}
+ ~SfxObjectShell_Impl();
+
+};
+
+extern void GetFileTitle_Impl( String& aName );
+
+
+#endif
+
diff --git a/sfx2/source/inc/openflag.hxx b/sfx2/source/inc/openflag.hxx
new file mode 100644
index 000000000000..6161ac3722f6
--- /dev/null
+++ b/sfx2/source/inc/openflag.hxx
@@ -0,0 +1,75 @@
+/*************************************************************************
+ *
+ * $RCSfile: openflag.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:34 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SFX_OPENFLAG_HXX
+#define _SFX_OPENFLAG_HXX
+
+// Datei zum Bearbeiten "offnen, anschliessend funktioniert nur noch
+// die dritte Variante (Lesen einer Kopie)
+#define SFX_STREAM_READWRITE (STREAM_READWRITE | STREAM_SHARE_DENYWRITE)
+// Ich arbeite roh auf dem Original, keine Kopie
+// -> Datei kann anschliessend nicht zum Bearbeiten ge"offnet werden
+#define SFX_STREAM_READONLY (STREAM_READ | STREAM_SHARE_DENYWRITE) // + !bDirect
+// Jemand anders bearbeitet das File, es wird eine Kopie erstellt
+// -> Datei kann anschliessend zum Bearbeiten ge"offnet werden
+#define SFX_STREAM_READONLY_MAKECOPY (STREAM_READ | STREAM_SHARE_DENYNONE)
+
+
+#endif
diff --git a/sfx2/source/inc/partwnd.hxx b/sfx2/source/inc/partwnd.hxx
new file mode 100644
index 000000000000..28ebeb489e85
--- /dev/null
+++ b/sfx2/source/inc/partwnd.hxx
@@ -0,0 +1,169 @@
+/*************************************************************************
+ *
+ * $RCSfile: partwnd.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:34 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _PARTWND_HXX
+#define _PARTWND_HXX
+
+// includes --------------------------------------------------------------
+/* ASDBG
+#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUES_HPP_
+#include <com/sun/star/beans/PropertyValues.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
+#include <com/sun/star/beans/XPropertySet.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_
+#include <com/sun/star/beans/PropertyValue.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_PROPERTYSTATE_HPP_
+#include <com/sun/star/beans/PropertyState.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSETINFO_HPP_
+#include <com/sun/star/beans/XPropertySetInfo.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XMULTIPROPERTYSET_HPP_
+#include <com/sun/star/beans/XMultiPropertySet.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XFASTPROPERTYSET_HPP_
+#include <com/sun/star/beans/XFastPropertySet.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XVETOABLECHANGELISTENER_HPP_
+#include <com/sun/star/beans/XVetoableChangeListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSTATE_HPP_
+#include <com/sun/star/beans/XPropertyState.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSTATECHANGELISTENER_HPP_
+#include <com/sun/star/beans/XPropertyStateChangeListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HPP_
+#include <com/sun/star/beans/PropertyAttribute.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTIESCHANGELISTENER_HPP_
+#include <com/sun/star/beans/XPropertiesChangeListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYCHANGELISTENER_HPP_
+#include <com/sun/star/beans/XPropertyChangeListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYACCESS_HPP_
+#include <com/sun/star/beans/XPropertyAccess.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYCONTAINER_HPP_
+#include <com/sun/star/beans/XPropertyContainer.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_PROPERTYSTATECHANGEEVENT_HPP_
+#include <com/sun/star/beans/PropertyStateChangeEvent.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_PROPERTYCHANGEEVENT_HPP_
+#include <com/sun/star/beans/PropertyChangeEvent.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XFRAME_HPP_
+#include <com/sun/star/frame/XFrame.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UTIL_URL_HPP_
+#include <com/sun/star/util/URL.hpp>
+#endif
+*/
+#include "childwin.hxx"
+#include "dockwin.hxx"
+
+// forward ---------------------------------------------------------------
+
+class SfxPartwinFrame_Impl;
+
+// class SfxPartChildWnd_Impl -----------------------------------
+
+class SfxPartChildWnd_Impl : public SfxChildWindow
+{
+public:
+ SfxPartChildWnd_Impl( Window* pParent, sal_uInt16 nId,
+ SfxBindings* pBindings,
+ SfxChildWinInfo* pInfo );
+
+ SFX_DECL_CHILDWINDOW(SfxPartChildWnd_Impl);
+
+ virtual sal_Bool QueryClose();
+};
+
+// class SfxExplorerDockWnd_Impl -----------------------------------------
+
+class SfxPartDockWnd_Impl : public SfxDockingWindow
+{
+private:
+ SfxPartwinFrame_Impl* _pFrame;
+
+protected:
+ virtual void Resize();
+ virtual long Notify( NotifyEvent& rNEvt );
+
+public:
+ SfxPartDockWnd_Impl( SfxBindings* pBindings,
+ SfxChildWindow* pChildWin,
+ Window* pParent,
+ WinBits nBits );
+
+ ~SfxPartDockWnd_Impl();
+ sal_Bool QueryClose();
+ virtual void FillInfo(SfxChildWinInfo&) const;
+};
+
+
+#endif
+
diff --git a/sfx2/source/inc/preview.hxx b/sfx2/source/inc/preview.hxx
new file mode 100644
index 000000000000..1fade8d62200
--- /dev/null
+++ b/sfx2/source/inc/preview.hxx
@@ -0,0 +1,107 @@
+/*************************************************************************
+ *
+ * $RCSfile: preview.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:34 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SFXPREVIEW_HXX
+#define _SFXPREVIEW_HXX
+
+
+#include "doctempl.hxx"
+#include "basedlgs.hxx"
+
+class SfxObjectShell;
+class SvStorageRef;
+class SfxFrameWindow;
+
+class SfxFrame;
+class GDIMetaFile;
+
+class SfxPreviewBase_Impl : public Window
+{
+protected:
+ GDIMetaFile* pMetaFile;
+public:
+ SfxPreviewBase_Impl( Window* pParent,
+ const ResId& rResId );
+ SfxPreviewBase_Impl( Window* pParent );
+ ~SfxPreviewBase_Impl( );
+ void SetObjectShell( SfxObjectShell* pObj );
+ void SetGDIFile( GDIMetaFile* pFile );
+ virtual void Resize();
+};
+
+
+
+class SfxPreviewWin_Impl: public SfxPreviewBase_Impl
+{
+protected:
+ virtual void Paint( const Rectangle& rRect );
+public:
+ SfxPreviewWin_Impl( Window* pParent,
+ const ResId& rResId )
+ : SfxPreviewBase_Impl( pParent, rResId ){};
+ SfxPreviewWin_Impl( Window* pParent )
+ : SfxPreviewBase_Impl( pParent ){};
+ static void ImpPaint(
+ const Rectangle& rRect, GDIMetaFile* pFile, Window* pWindow );
+ static SfxFrameWindow*
+ PreviewFactory( SfxFrame* pFrame, const String& rName );
+};
+
+#endif
diff --git a/sfx2/source/inc/referers.hxx b/sfx2/source/inc/referers.hxx
new file mode 100644
index 000000000000..4a9301811a34
--- /dev/null
+++ b/sfx2/source/inc/referers.hxx
@@ -0,0 +1,70 @@
+/*************************************************************************
+ *
+ * $RCSfile: referers.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:34 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SFX_REFERERS_HXX
+#define _SFX_REFERERS_HXX
+
+#define SFX_REFERER_USER "private:user"
+#define SFX_REFERER_APPEVENT "private:appevent"
+#define SFX_REFERER_EXPLORER "private:explorer"
+#define SFX_REFERER_NEWMENU "private:newmenu"
+
+
+#endif
diff --git a/sfx2/source/inc/sfxlocal.hrc b/sfx2/source/inc/sfxlocal.hrc
new file mode 100644
index 000000000000..be879cb7b04e
--- /dev/null
+++ b/sfx2/source/inc/sfxlocal.hrc
@@ -0,0 +1,87 @@
+/*************************************************************************
+ *
+ * $RCSfile: sfxlocal.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:34 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+//============================================================================
+// Lokale Resourcen
+//
+// (C) 1996 - 2000 Star Division GmbH, Hamburg, Germany
+// $Author: hr $ $Date: 2000-09-18 16:52:34 $ $Revision: 1.1.1.1 $
+// $Logfile: T:/sfx2/source/inc/sfxlocal.hrv $ $Workfile: SFXLOCAL.HRC $
+//----------------------------------------------------------------------------
+#ifndef _SFXLOCAL_HRC
+#define _SFXLOCAL_HRC
+
+#include <sfx.hrc>
+
+// Strings ---------------------------------------------------------------
+
+#define STR_SFX_NEWOFFICEDOC (RID_SFX_SFXLOCAL_START + 0)
+#define STR_MENU_NEWMAIL (RID_SFX_SFXLOCAL_START + 1)
+
+// MessBoxen -------------------------------------------------------------
+
+#define ERRBOX_SFX_INVALID_MERGEOPT (RID_SFX_SFXLOCAL_START + 0)
+#define MSG_ERROR_PASSWD (RID_SFX_SFXLOCAL_START + 1)
+#define ERRBOX_SFX_NO_OUTBOX (RID_SFX_SFXLOCAL_START + 2)
+#define INFOBOX_NO_SUBSCRIBED (RID_SFX_SFXLOCAL_START + 3)
+
+
+#endif
+
diff --git a/sfx2/source/inc/sfxtypes.hxx b/sfx2/source/inc/sfxtypes.hxx
new file mode 100644
index 000000000000..b685951fbaca
--- /dev/null
+++ b/sfx2/source/inc/sfxtypes.hxx
@@ -0,0 +1,271 @@
+/*************************************************************************
+ *
+ * $RCSfile: sfxtypes.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:34 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SFX_SFXTYPES_HXX
+#define _SFX_SFXTYPES_HXX
+
+#ifndef _DEBUG_HXX //autogen
+#include <tools/debug.hxx>
+#endif
+#ifndef _RC_HXX //autogen
+#include <vcl/rc.hxx>
+#endif
+#ifndef _RCID_H //autogen
+#include <vcl/rcid.h>
+#endif
+#ifndef _RESID_HXX //autogen
+#include <vcl/resid.hxx>
+#endif
+#ifndef _LINK_HXX //autogen
+#include <tools/link.hxx>
+#endif
+#ifndef _APP_HXX //autogen
+#include <vcl/svapp.hxx>
+#endif
+#ifndef _SV_WRKWIN_HXX
+#include <vcl/wrkwin.hxx>
+#endif
+
+#ifndef _VOS_MUTEX_HXX //autogen
+#include <vos/mutex.hxx>
+#endif
+
+#ifndef DELETEZ
+#define DELETEZ(pPtr) ( delete pPtr, pPtr = 0 )
+#endif
+
+#ifndef DELETEX
+#ifdef DBG_UTIL
+#define DELETEX(pPtr) ( delete pPtr, (void*&) pPtr = (void*) 0xFFFFFFFF )
+#else
+#define DELETEX(pPtr) delete pPtr
+#endif
+#endif
+
+class SfxShell;
+class Timer;
+
+#if !defined(_SFX_APPCTOR_CXX) && defined(WNT)
+#ifndef _DLL_
+#error _DLL_ mal wieder nicht defined => GetpApp() == 0
+#endif
+#endif
+
+//------------------------------------------------------------------------
+
+// Macro fuer den Call-Profiler unter WinNT
+// mit S_CAP kann eine Messung gestarted, mit E_CAP wieder gestoppt werden
+#if defined( WNT ) && defined( PROFILE )
+
+extern "C" {
+ void StartCAP();
+ void StopCAP();
+ void DumpCAP();
+};
+
+#define S_CAP() StartCAP();
+#define E_CAP() StopCAP(); DumpCAP();
+
+struct _Capper
+{
+ _Capper() { S_CAP(); }
+ ~_Capper() { E_CAP(); }
+};
+
+#define CAP _Capper _aCap_
+
+#else
+
+#define S_CAP()
+#define E_CAP()
+#define CAP
+
+#endif
+
+#ifdef DBG_UTIL
+#ifndef DBG
+#define DBG(statement) statement
+#endif
+#define DBG_OUTF(x) DbgOutf x
+#else
+#ifndef DBG
+#define DBG(statement)
+#endif
+#define DBG_OUTF(x)
+#endif
+
+#define TRIM(s) s.EraseLeadingChars().EraseTrailingChars()
+
+//------------------------------------------------------------------------
+
+String SfxShellIdent_Impl( const SfxShell *pSh );
+
+//------------------------------------------------------------------------
+
+#if defined(DBG_UTIL) && ( defined(WNT) || defined(OS2) )
+
+class SfxStack
+{
+ static unsigned nLevel;
+
+public:
+ SfxStack( const char *pName )
+ {
+ ++nLevel;
+ DbgOutf( "STACK: enter %3d %s", nLevel, pName );
+ }
+ ~SfxStack()
+ {
+ DbgOutf( "STACK: leave %3d", nLevel );
+ --nLevel;
+ }
+};
+
+#define SFX_STACK(s) SfxStack aSfxStack_( #s )
+#else
+#define SFX_STACK(s)
+#endif
+
+//------------------------------------------------------------------------
+
+String SearchAndReplace( const String &rSource,
+ const String &rToReplace,
+ const String &rReplacement );
+
+#define SFX_PASSWORD_CODE "_:;*?()/&[&"
+String SfxStringEncode( const String &rSource,
+ const char *pKey = SFX_PASSWORD_CODE );
+String SfxStringDecode( const String &rSource,
+ const char *pKey = SFX_PASSWORD_CODE );
+
+
+class NAMESPACE_VOS( OMutex );
+class AsynchronLink
+{
+ Link _aLink;
+ ULONG _nEventId;
+ Timer* _pTimer;
+ BOOL _bInCall;
+ BOOL* _pDeleted;
+ void* _pArg;
+ NAMESPACE_VOS( OMutex )* _pMutex;
+
+ DECL_STATIC_LINK( AsynchronLink, HandleCall, void* );
+ void Call_Impl( void* pArg );
+public:
+ AsynchronLink( const Link& rLink ) :
+ _pTimer( 0 ), _aLink( rLink ), _nEventId( 0 ), _bInCall( FALSE ),
+ _pDeleted( 0 ), _pMutex( 0 ){}
+ AsynchronLink() : _nEventId( 0 ), _pTimer( 0 ), _bInCall( FALSE ),
+ _pDeleted( 0 ), _pMutex( 0 ){}
+ ~AsynchronLink();
+
+ void CreateMutex();
+ void operator=( const Link& rLink ) { _aLink = rLink; }
+ void Call( void* pObj, BOOL bAllowDoubles = FALSE,
+ BOOL bUseTimer = FALSE );
+ void ForcePendingCall( );
+ void ClearPendingCall( );
+ BOOL IsSet() const { return _aLink.IsSet(); }
+ Link GetLink() const { return _aLink; }
+};
+
+
+struct StringList_Impl : private Resource
+{
+
+ ResId aResId;
+
+ StringList_Impl( const ResId& rErrIdP, USHORT nId)
+ : Resource( rErrIdP ),aResId(nId){}
+ ~StringList_Impl() { FreeResource(); }
+
+ String GetString(){ return String( aResId ); }
+ operator BOOL(){return IsAvailableRes(aResId.SetRT(RSC_STRING));}
+
+};
+
+#define SFX_DEL_PTRARR(pArr) \
+ { \
+ for ( USHORT n = (pArr)->Count(); n--; ) \
+ delete (pArr)->GetObject(n); \
+ DELETEX(pArr); \
+ }
+
+class SfxBoolResetter
+{
+ BOOL& _rVar;
+ BOOL _bOld;
+
+public:
+ SfxBoolResetter( BOOL &rVar )
+ : _rVar( rVar ),
+ _bOld( rVar )
+ {}
+
+ ~SfxBoolResetter()
+ { _rVar = _bOld; }
+};
+
+#define GPF() *(int*)0 = 0
+
+#endif // #ifndef _SFX_SFXTYPES_HXX
+
+
diff --git a/sfx2/source/inc/slotserv.hxx b/sfx2/source/inc/slotserv.hxx
new file mode 100644
index 000000000000..ed184539c930
--- /dev/null
+++ b/sfx2/source/inc/slotserv.hxx
@@ -0,0 +1,118 @@
+/*************************************************************************
+ *
+ * $RCSfile: slotserv.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:34 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SFXSLOTSERV_HXX
+#define _SFXSLOTSERV_HXX
+
+#include <tools/solar.h>
+
+class SfxSlot;
+
+class SfxSlotServer
+{
+private:
+ const SfxSlot* _pSlot;
+ USHORT _nShellLevel;
+
+public:
+ SfxSlotServer( const SfxSlot &rSlot, USHORT nShell );
+ SfxSlotServer();
+
+ USHORT GetShellLevel() const;
+ void SetShellLevel(USHORT nLevel) { _nShellLevel = nLevel; }
+ void SetSlot(const SfxSlot* pSlot) {
+ _pSlot = pSlot;
+ }
+ const SfxSlot* GetSlot() const;
+ void Invalidate() { _pSlot = 0; }
+};
+
+//--------------------------------------------------------------------
+
+inline SfxSlotServer::SfxSlotServer( const SfxSlot &rSlot, USHORT nShell ):
+ _pSlot( &rSlot),
+ _nShellLevel( nShell )
+{
+}
+
+//--------------------------------------------------------------------
+
+inline SfxSlotServer::SfxSlotServer():
+ _pSlot(0),
+ _nShellLevel(0)
+{
+}
+
+//--------------------------------------------------------------------
+
+inline USHORT SfxSlotServer::GetShellLevel() const
+{
+ return _nShellLevel;
+}
+
+//--------------------------------------------------------------------
+
+inline const SfxSlot* SfxSlotServer::GetSlot() const
+{
+ return _pSlot;
+}
+
+
+#endif
diff --git a/sfx2/source/inc/speakerdlg.hxx b/sfx2/source/inc/speakerdlg.hxx
new file mode 100644
index 000000000000..1bde13d69def
--- /dev/null
+++ b/sfx2/source/inc/speakerdlg.hxx
@@ -0,0 +1,101 @@
+/*************************************************************************
+ *
+ * $RCSfile: speakerdlg.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:34 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _SPEAKERDLG_HXX
+#define _SPEAKERDLG_HXX
+
+#ifndef _GOODIES_RECOGNIZER_HXX_
+#include <goodies/recognizer.hxx>
+#endif
+
+#ifndef _DIALOG_HXX
+#include <vcl/dialog.hxx>
+#endif
+#ifndef _BUTTON_HXX
+#include <vcl/button.hxx>
+#endif
+#ifndef _LSTBOX_HXX
+#include <vcl/lstbox.hxx>
+#endif
+
+// ---------------
+// - SfxSpeakerDlg -
+// ---------------
+
+class SfxSpeakerDlg: public ModalDialog
+{
+ OKButton aBtnOK;
+ CancelButton aBtnCancel;
+ ListBox aListBox;
+ CharSet aCharSet;
+
+ OSpeakerManagerRef m_aSpeakerMgr;
+
+public:
+
+ SfxSpeakerDlg(Window *pParent, OSpeakerManagerRef& aSpeakerMgr);
+ ~SfxSpeakerDlg();
+
+ virtual short Execute();
+};
+
+
+#endif // _SPEAKER_HXX
diff --git a/sfx2/source/inc/splitwin.hxx b/sfx2/source/inc/splitwin.hxx
new file mode 100644
index 000000000000..6f14af1018b7
--- /dev/null
+++ b/sfx2/source/inc/splitwin.hxx
@@ -0,0 +1,165 @@
+/*************************************************************************
+ *
+ * $RCSfile: splitwin.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:34 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SFXSPLITWIN_HXX
+#define _SFXSPLITWIN_HXX
+
+#ifndef _SPLITWIN_HXX //autogen
+#include <vcl/splitwin.hxx>
+#endif
+#include "childwin.hxx"
+
+class SfxWorkWindow;
+class SfxDockingWindow;
+class SfxDockArr_Impl;
+struct SfxDock_Impl;
+
+class SfxSplitWindow : public SplitWindow
+{
+friend class SfxEmptySplitWin_Impl;
+
+private:
+ SfxChildAlignment eAlign;
+ SfxWorkWindow* pWorkWin;
+ SfxDockArr_Impl* pDockArr;
+ BOOL bLocked;
+ BOOL bPinned;
+ SfxEmptySplitWin_Impl* pEmptyWin;
+ SfxDockingWindow* pActive;
+
+ void InsertWindow_Impl( SfxDock_Impl* pDockWin,
+ const Size& rSize,
+ USHORT nLine,
+ USHORT nPos,
+ BOOL bNewLine=FALSE );
+
+ DECL_LINK( TimerHdl, Timer* );
+ BOOL CursorIsOverRect( BOOL bForceAdding = FALSE ) const;
+ void SetPinned_Impl( BOOL );
+ void SetFadeIn_Impl( BOOL );
+
+protected:
+
+ virtual void StartSplit();
+ virtual void SplitResize();
+ virtual void Split();
+ virtual void Command ( const CommandEvent& rCEvt );
+ virtual void MouseButtonDown ( const MouseEvent& );
+ virtual BOOL QueryDrop( DropEvent& rEvt );
+
+public:
+ SfxSplitWindow( Window* pParent, SfxChildAlignment eAl,
+ SfxWorkWindow *pW, BOOL bWithButtons,
+ WinBits nBits = WB_BORDER | WB_SIZEABLE | WB_3DLOOK );
+
+ ~SfxSplitWindow();
+
+ void ReleaseWindow_Impl(SfxDockingWindow *pWin);
+
+ void InsertWindow( SfxDockingWindow* pDockWin,
+ const Size& rSize);
+
+ void InsertWindow( SfxDockingWindow* pDockWin,
+ const Size& rSize,
+ USHORT nLine,
+ USHORT nPos,
+ BOOL bNewLine=FALSE );
+
+ void MoveWindow( SfxDockingWindow* pDockWin,
+ const Size& rSize,
+ USHORT nLine,
+ USHORT nPos,
+ BOOL bNewLine=FALSE );
+
+ void RemoveWindow( SfxDockingWindow* pDockWin, BOOL bHide=TRUE);
+
+ void Lock( BOOL bLock=TRUE )
+ {
+ bLocked = bLock;
+ SetUpdateMode( !bLock );
+ }
+ BOOL IsLocked() const { return bLocked; }
+ BOOL GetWindowPos( const SfxDockingWindow* pWindow,
+ USHORT& rLine, USHORT& rPos ) const;
+ BOOL GetWindowPos( const Point& rTestPos,
+ USHORT& rLine, USHORT& rPos ) const;
+ USHORT GetLineCount() const;
+ long GetLineSize( USHORT ) const;
+ USHORT GetWindowCount(USHORT nLine) const;
+ USHORT GetWindowCount() const;
+
+ BOOL IsPinned() const { return bPinned; }
+ BOOL IsFadeIn() const;
+ BOOL IsAutoHide( BOOL bSelf = FALSE ) const;
+ SplitWindow* GetSplitWindow();
+ static void EndAutoShow_Impl();
+
+ virtual void AutoHide();
+ virtual void FadeOut();
+ virtual void FadeIn();
+ void Show_Impl();
+ void Pin_Impl( BOOL bPinned );
+ BOOL ActivateNextChild_Impl( BOOL bForward = TRUE );
+ void SetActiveWindow_Impl( SfxDockingWindow* pWin );
+};
+
+#endif // #ifndef _SFXSPLITWIN_HXX
+
+
diff --git a/sfx2/source/inc/statcach.hxx b/sfx2/source/inc/statcach.hxx
new file mode 100644
index 000000000000..dbf6bd6cffbe
--- /dev/null
+++ b/sfx2/source/inc/statcach.hxx
@@ -0,0 +1,220 @@
+/*************************************************************************
+ *
+ * $RCSfile: statcach.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:35 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SFXSTATCACH_HXX
+#define _SFXSTATCACH_HXX
+
+#ifndef _COM_SUN_STAR_FRAME_XDISPATCHPROVIDERINTERCEPTOR_HPP_
+#include <com/sun/star/frame/XDispatchProviderInterceptor.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XDISPATCH_HPP_
+#include <com/sun/star/frame/XDispatch.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XDISPATCHPROVIDER_HPP_
+#include <com/sun/star/frame/XDispatchProvider.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XSTATUSLISTENER_HPP_
+#include <com/sun/star/frame/XStatusListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_FRAMESEARCHFLAG_HPP_
+#include <com/sun/star/frame/FrameSearchFlag.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XDISPATCHPROVIDERINTERCEPTION_HPP_
+#include <com/sun/star/frame/XDispatchProviderInterception.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_FEATURESTATEEVENT_HPP_
+#include <com/sun/star/frame/FeatureStateEvent.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_DISPATCHDESCRIPTOR_HPP_
+#include <com/sun/star/frame/DispatchDescriptor.hpp>
+#endif
+#ifndef _CPPUHELPER_WEAK_HXX_
+#include <cppuhelper/weak.hxx>
+#endif
+
+#ifndef _SFXBINDINGS_HXX
+#include "bindings.hxx"
+#endif
+
+#ifndef _SFXMSGSERV_HXX
+#include "slotserv.hxx"
+#endif
+
+#include "sfxuno.hxx"
+
+class SfxControllerItem;
+class SfxDispatcher;
+class BindDispatch_Impl : public ::com::sun::star::frame::XStatusListener ,
+ public ::com::sun::star::lang::XTypeProvider ,
+ public ::cppu::OWeakObject
+{
+friend class SfxStateCache;
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > xDisp;
+ ::com::sun::star::util::URL aURL;
+ ::com::sun::star::frame::FeatureStateEvent aStatus;
+ SfxStateCache* pCache;
+
+public:
+ BindDispatch_Impl(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > & rDisp,
+ const ::com::sun::star::util::URL& rURL,
+ SfxStateCache* pStateCache );
+
+ SFX_DECL_XINTERFACE_XTYPEPROVIDER
+
+ virtual void SAL_CALL statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) throw ( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw ( ::com::sun::star::uno::RuntimeException );
+
+ void Release();
+ const ::com::sun::star::frame::FeatureStateEvent& GetStatus() const;
+ void Dispatch( sal_Bool bForceSynchron = sal_False );
+};
+
+class SfxStateCache
+{
+friend class BindDispatch_Impl;
+ BindDispatch_Impl* pDispatch;
+ sal_uInt16 nId; // Slot-Id
+ SfxControllerItem* pController; // Ptr auf 1. gebundenen Controller (untereinander verkettet)
+ SfxSlotServer aSlotServ; // SlotServer, SlotPtr = 0 -> Nicht auf Stack
+ SfxPoolItem* pLastItem; // zuletzt verschicktes Item, nie -1
+ SfxItemState eLastState; // zuletzt verschickter State
+ sal_Bool bCtrlDirty:1; // Controller aktualisiert?
+ sal_Bool bSlotDirty:1; // Funktion gfs. vorhanden, muss aktualisiert werden
+ sal_Bool bItemDirty; // G"ultigkeit von pLastItem
+
+private:
+ SfxStateCache( const SfxStateCache& rOrig ); // n.i.
+ void SetState_Impl( SfxItemState, const SfxPoolItem * );
+ sal_Bool UpdateDispatch( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > & xProv );
+
+public:
+ SfxStateCache( sal_uInt16 nFuncId );
+ ~SfxStateCache();
+
+ sal_uInt16 GetId() const;
+
+ const SfxSlotServer* GetSlotServer( SfxDispatcher &rDispat, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > & xProv );
+ const SfxSlotServer* GetSlotServer( SfxDispatcher &rDispat )
+ { return GetSlotServer( rDispat, ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > () ); }
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > GetDispatch() const;
+ void Dispatch( sal_Bool bForceSynchron = sal_False );
+ sal_Bool IsControllerDirty() const
+ { return bCtrlDirty ? sal_True : sal_False; }
+ SfxPoolItem* GetItem() const { return pLastItem; }
+ void ClearCache();
+
+ void SetState( SfxItemState, const SfxPoolItem * );
+ void SetCachedState();
+ void DeleteFloatingWindows();
+ void Invalidate( sal_Bool bWithSlot );
+
+ SfxControllerItem* ChangeItemLink( SfxControllerItem* pNewBinding );
+ SfxControllerItem* GetItemLink() const;
+};
+
+//--------------------------------------------------------------------
+
+// checks wheather this function is in the stack of active SfxObjectInterface
+
+//inline sal_Bool SfxStateCache::IsCallable( SfxDispatcher &rDispat )
+//{
+// return GetSlotServer(rDispat) != 0;
+//}
+//--------------------------------------------------------------------
+
+// clears Cached-Item
+
+inline void SfxStateCache::ClearCache()
+{
+ bItemDirty = sal_True;
+}
+
+//--------------------------------------------------------------------
+
+// registeres a item representing this function
+
+inline SfxControllerItem* SfxStateCache::ChangeItemLink( SfxControllerItem* pNewBinding )
+{
+ SfxControllerItem* pOldBinding = pController;
+ pController = pNewBinding;
+ if ( pNewBinding )
+ {
+ bCtrlDirty = sal_True;
+ bItemDirty = sal_True;
+ }
+ return pOldBinding;
+}
+//--------------------------------------------------------------------
+
+// returns the func binding which becomes called on spreading states
+
+inline SfxControllerItem* SfxStateCache::GetItemLink() const
+{
+ return pController;
+}
+//--------------------------------------------------------------------
+
+inline sal_uInt16 SfxStateCache::GetId() const
+{
+ return nId;
+}
+
+#endif
diff --git a/sfx2/source/inc/templdgi.hxx b/sfx2/source/inc/templdgi.hxx
new file mode 100644
index 000000000000..3e4bec379d46
--- /dev/null
+++ b/sfx2/source/inc/templdgi.hxx
@@ -0,0 +1,377 @@
+/*************************************************************************
+ *
+ * $RCSfile: templdgi.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:35 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SFX_TEMPDLGI_HXX
+#define _SFX_TEMPDLGI_HXX
+
+class SfxTemplateControllerItem;
+
+#ifndef _BUTTON_HXX //autogen
+#include <vcl/button.hxx>
+#endif
+#ifndef _TOOLBOX_HXX //autogen
+#include <vcl/toolbox.hxx>
+#endif
+#ifndef _LSTBOX_HXX //autogen
+#include <vcl/lstbox.hxx>
+#endif
+#ifndef _SFXLSTNER_HXX //autogen
+#include <svtools/lstner.hxx>
+#endif
+#ifndef _SVTREEBOX_HXX //autogen
+#include <svtools/svtreebx.hxx>
+#endif
+#ifndef _SFXENUMITEM_HXX //autogen
+#include <svtools/eitem.hxx>
+#endif
+
+#define _SVSTDARR_USHORTS
+#include <svtools/svstdarr.hxx> // SvUShorts
+
+#include <rsc/rscsfx.hxx>
+#include <tools/rtti.hxx>
+
+#include "childwin.hxx"
+#include "templdlg.hxx"
+
+class SfxStyleFamilies;
+class SfxStyleFamilyItem;
+class SfxTemplateItem;
+class SfxBindings;
+class SfxStyleSheetBasePool;
+class SvTreeListBox ;
+class StyleTreeListBox_Impl;
+class SfxTemplateDialog_Impl;
+class SfxCommonTemplateDialog_Impl;
+class SfxTemplateDialogWrapper;
+class SfxDockingWindow;
+
+// class DropListBox_Impl ------------------------------------------------
+
+class DropListBox_Impl : public SvTreeListBox
+{
+protected:
+ SvLBoxEntry* pPreDropEntry;
+ SfxCommonTemplateDialog_Impl* pDialog;
+ USHORT nModifier;
+
+public:
+ DropListBox_Impl( Window* pParent, const ResId& rId, SfxCommonTemplateDialog_Impl* pD ) :
+ SvTreeListBox( pParent, rId ), pDialog( pD ), pPreDropEntry( NULL )
+ { EnableDrop( TRUE ); }
+ DropListBox_Impl( Window* pParent, WinBits nWinBits, SfxCommonTemplateDialog_Impl* pD ) :
+ SvTreeListBox( pParent, nWinBits ), pDialog( pD ), pPreDropEntry( NULL )
+ { EnableDrop( TRUE ); }
+
+ virtual void MouseButtonDown( const MouseEvent& rMEvt );
+ virtual BOOL Drop( const DropEvent& rEvt );
+ virtual BOOL QueryDrop( DropEvent& rEvt );
+
+ USHORT GetModifier() const { return nModifier; }
+ SvLBoxEntry* GetPreDropEntry() const { return pPreDropEntry; }
+};
+
+// class SfxActionListBox ------------------------------------------------
+
+class SfxActionListBox : public DropListBox_Impl
+{
+protected:
+ virtual void Command( const CommandEvent& rMEvt );
+
+public:
+ SfxActionListBox( SfxCommonTemplateDialog_Impl* pParent, WinBits nWinBits );
+ SfxActionListBox( SfxCommonTemplateDialog_Impl* pParent, const ResId &rResId );
+};
+
+// class SfxCommonTemplateDialog_Impl ------------------------------------
+
+class SfxCommonTemplateDialog_Impl : public SfxListener
+{
+private:
+ class ISfxTemplateCommon_Impl : public ISfxTemplateCommon
+ {
+ private:
+ SfxCommonTemplateDialog_Impl* pDialog;
+ public:
+ ISfxTemplateCommon_Impl( SfxCommonTemplateDialog_Impl* pDialogP ) : pDialog( pDialogP ) {}
+ virtual SfxStyleFamily GetActualFamily() const { return pDialog->GetActualFamily(); }
+ virtual String GetSelectedEntry() const { return pDialog->GetSelectedEntry(); }
+ };
+
+ ISfxTemplateCommon_Impl aISfxTemplateCommon;
+
+ void ReadResource();
+ void ClearResource();
+
+protected:
+#define MAX_FAMILIES 5
+#define COUNT_BOUND_FUNC 13
+
+#define UPDATE_FAMILY_LIST 0x0001
+#define UPDATE_FAMILY 0x0002
+
+ friend class DropListBox_Impl;
+ friend class SfxTemplateControllerItem;
+ friend class SfxTemplateDialogWrapper;
+
+ SfxBindings* pBindings;
+ SfxTemplateControllerItem* pBoundItems[COUNT_BOUND_FUNC];
+
+ Window* pWindow;
+ SfxModule* pModule;
+ Timer* pTimer;
+
+ SfxStyleFamilies* pStyleFamilies;
+ SfxTemplateItem* pFamilyState[MAX_FAMILIES];
+ SfxStyleSheetBasePool* pStyleSheetPool;
+ SvTreeListBox* pTreeBox;
+ SfxObjectShell* pCurObjShell;
+
+ SfxActionListBox aFmtLb;
+ ListBox aFilterLb;
+ Size aSize;
+
+ USHORT nActFamily; // Id in der ToolBox = Position - 1
+ USHORT nActFilter; // FilterIdx
+ USHORT nAppFilter; // Filter, den die Applikation gesetzt hat (fuer automatisch)
+
+ BOOL bDontUpdate :1,
+ bIsWater :1,
+ bEnabled :1,
+ bUpdate :1,
+ bUpdateFamily :1,
+ bCanEdit :1,
+ bCanDel :1,
+ bCanNew :1,
+ bWaterDisabled :1,
+ bNewByExampleDisabled :1,
+ bUpdateByExampleDisabled:1,
+ bTreeDrag :1,
+ bHierarchical :1,
+ bBindingUpdate :1;
+
+ DECL_LINK( FilterSelectHdl, ListBox * );
+ DECL_LINK( FmtSelectHdl, SvTreeListBox * );
+ DECL_LINK( ApplyHdl, Control * );
+ DECL_LINK( DropHdl, StyleTreeListBox_Impl * );
+ DECL_LINK( TimeOut, Timer * );
+
+ // Rechnet von den SFX_STYLE_FAMILY Ids auf 1-5 um
+ static USHORT SfxFamilyIdToNId( USHORT nFamily );
+
+ virtual void EnableItem( USHORT nMesId, BOOL bCheck = TRUE ) {}
+ virtual void CheckItem( USHORT nMesId, BOOL bCheck = TRUE ) {}
+ virtual BOOL IsCheckedItem( USHORT nMesId ) { return TRUE; }
+ virtual void Resize() {}
+ virtual void Update() { UpdateStyles_Impl(UPDATE_FAMILY_LIST); }
+ virtual void InvalidateBindings();
+ virtual void InsertFamilyItem( USHORT nId, const SfxStyleFamilyItem* pIten ) = 0;
+ virtual void EnableFamilyItem( USHORT nId, BOOL bEnabled = TRUE ) = 0;
+ virtual void ClearFamilyList() = 0;
+
+ void NewHdl( void* );
+ void EditHdl( void* );
+ void DeleteHdl( void* );
+
+ BOOL Execute_Impl( USHORT nId, const String& rStr, const String& rRefStr,
+ USHORT nFamily, USHORT nMask = 0,
+ USHORT* pIdx = NULL, const USHORT* pModifier = NULL );
+
+ void UpdateStyles_Impl(USHORT nFlags);
+ const SfxStyleFamilyItem* GetFamilyItem_Impl() const;
+ BOOL IsInitialized() { return nActFamily != 0xffff; }
+ void ResetFocus();
+ void EnableDelete();
+ void Initialize();
+
+ void FilterSelect( USHORT nFilterIdx, BOOL bForce = FALSE );
+ void SetFamilyState( USHORT nSlotId, const SfxTemplateItem* );
+ void SetWaterCanState( const SfxBoolItem* pItem );
+
+ void SelectStyle( const String& rStyle );
+ BOOL HasSelectedStyle() const;
+ void FillTreeBox();
+ void Update_Impl();
+ void UpdateFamily_Impl();
+
+ // In welchem FamilyState muss ich nachsehen, um die Info der i-ten
+ // Family in der pStyleFamilies zu bekommen.
+ USHORT StyleNrToInfoOffset( USHORT i );
+ USHORT InfoOffsetToStyleNr( USHORT i );
+
+ void SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
+ const SfxHint& rHint, const TypeId& rHintType );
+
+ void FamilySelect( USHORT nId );
+ void SetFamily( USHORT nId );
+ void ActionSelect( USHORT nId );
+
+public:
+ TYPEINFO();
+
+ SfxCommonTemplateDialog_Impl( SfxBindings* pB, SfxDockingWindow* );
+ SfxCommonTemplateDialog_Impl( SfxBindings* pB, ModalDialog* );
+ ~SfxCommonTemplateDialog_Impl();
+
+ DECL_LINK( MenuSelectHdl, Menu * );
+
+ virtual void EnableEdit( BOOL b = TRUE ) { bCanEdit = b; }
+ virtual void EnableDel( BOOL b = TRUE ) { bCanDel = b; }
+ virtual void EnableNew( BOOL b = TRUE ) { bCanNew = b; }
+
+ ISfxTemplateCommon* GetISfxTemplateCommon() { return &aISfxTemplateCommon; }
+ Window* GetWindow() { return pWindow; }
+
+ void EnableTreeDrag( BOOL b = TRUE );
+ void ExecuteContextMenu_Impl( const Point& rPos, Window* pWin );
+ void EnableExample_Impl( USHORT nId, BOOL bEnable );
+ SfxStyleFamily GetActualFamily() const;
+ String GetSelectedEntry() const;
+ SfxObjectShell* GetObjectShell() const { return pCurObjShell; }
+};
+
+// class SfxTemplateDialog_Impl ------------------------------------------
+
+class SfxTemplateDialog_Impl : public SfxCommonTemplateDialog_Impl
+{
+private:
+ friend class SfxTemplateControllerItem;
+ friend class SfxTemplateDialogWrapper;
+
+ SfxTemplateDialog* pFloat;
+ BOOL bZoomIn;
+ ToolBox aActionTbL;
+ ToolBox aActionTbR;
+
+ DECL_LINK( ToolBoxLSelect, ToolBox * );
+ DECL_LINK( ToolBoxRSelect, ToolBox * );
+
+protected:
+ virtual void Command( const CommandEvent& rMEvt );
+ virtual void EnableEdit( BOOL = TRUE );
+ virtual void EnableItem( USHORT nMesId, BOOL bCheck = TRUE );
+ virtual void CheckItem( USHORT nMesId, BOOL bCheck = TRUE );
+ virtual BOOL IsCheckedItem( USHORT nMesId );
+ virtual void InsertFamilyItem( USHORT nId, const SfxStyleFamilyItem* pIten );
+ virtual void EnableFamilyItem( USHORT nId, BOOL bEnabled = TRUE );
+ virtual void ClearFamilyList();
+
+ void Resize();
+ Size GetMinOutputSizePixel();
+
+public:
+ friend class SfxTemplateDialog;
+ TYPEINFO();
+
+ SfxTemplateDialog_Impl( Window* pParent, SfxBindings*, SfxTemplateDialog* pWindow );
+ ~SfxTemplateDialog_Impl();
+};
+
+// class SfxTemplateCatalog_Impl -----------------------------------------
+
+class SfxTemplateCatalog_Impl : public SfxCommonTemplateDialog_Impl
+{
+private:
+ friend class SfxTemplateControllerItem;
+ friend class SfxCommonTemplateDialog_Impl;
+
+ ListBox aFamList;
+ OKButton aOkBtn;
+ CancelButton aCancelBtn;
+ PushButton aNewBtn;
+ PushButton aChangeBtn;
+ PushButton aDelBtn;
+ PushButton aOrgBtn;
+ HelpButton aHelpBtn;
+
+ SfxTemplateCatalog* pReal;
+ SvUShorts aFamIds;
+ SfxModalDefParentHelper aHelper;
+
+protected:
+ virtual void EnableItem( USHORT nMesId, BOOL bCheck = TRUE );
+ virtual void CheckItem( USHORT nMesId, BOOL bCheck = TRUE );
+ virtual BOOL IsCheckedItem( USHORT nMesId );
+ virtual void InsertFamilyItem( USHORT nId, const SfxStyleFamilyItem* pIten );
+ virtual void EnableFamilyItem( USHORT nId, BOOL bEnabled = TRUE );
+ virtual void ClearFamilyList();
+ virtual void EnableEdit( BOOL = TRUE );
+ virtual void EnableDel( BOOL = TRUE );
+ virtual void EnableNew( BOOL = TRUE );
+
+ DECL_LINK( FamListSelect, ListBox * );
+ DECL_LINK( OkHdl, Button * );
+ DECL_LINK( CancelHdl, Button * );
+ DECL_LINK( NewHdl, Button * );
+ DECL_LINK( ChangeHdl, Button * );
+ DECL_LINK( DelHdl, Button * );
+ DECL_LINK( OrgHdl, Button * );
+
+public:
+ TYPEINFO();
+ SfxTemplateCatalog_Impl( Window* pParent, SfxBindings*, SfxTemplateCatalog* pWindow );
+ ~SfxTemplateCatalog_Impl();
+
+friend class SfxTemplateCatalog;
+};
+
+#endif // #ifndef _SFX_TEMPDLGI_HXX
+
+
diff --git a/sfx2/source/inc/tplcitem.hxx b/sfx2/source/inc/tplcitem.hxx
new file mode 100644
index 000000000000..eaaeaee84147
--- /dev/null
+++ b/sfx2/source/inc/tplcitem.hxx
@@ -0,0 +1,78 @@
+/*************************************************************************
+ *
+ * $RCSfile: tplcitem.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:35 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _TPLCITEM_HXX
+#define _TPLCITEM_HXX
+
+#include "ctrlitem.hxx"
+
+class SfxCommonTemplateDialog_Impl;
+
+class SfxTemplateControllerItem: public SfxControllerItem {
+ SfxCommonTemplateDialog_Impl &rTemplateDlg;
+protected:
+ virtual void StateChanged( USHORT, SfxItemState, const SfxPoolItem* pState );
+
+public:
+ SfxTemplateControllerItem( USHORT nId, SfxCommonTemplateDialog_Impl &rDlg, SfxBindings &);
+};
+
+
+#endif
diff --git a/sfx2/source/inc/tplcomp.hxx b/sfx2/source/inc/tplcomp.hxx
new file mode 100644
index 000000000000..f6d1879d92c3
--- /dev/null
+++ b/sfx2/source/inc/tplcomp.hxx
@@ -0,0 +1,313 @@
+/*************************************************************************
+ *
+ * $RCSfile: tplcomp.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:35 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _TPLCOMP_HXX
+#define _TPLCOMP_HXX
+
+#include <osl/mutex.hxx>
+//ASDBG #ifndef _USR_UNO_HXX
+//ASDBG #include <usr/uno.hxx>
+//ASDBG #endif
+//ASDBG #ifndef _USR_LSTCOMP_HXX
+//ASDBG #include <usr/iterhlp.hxx>
+//ASDBG #endif
+//ASDBG #ifndef _USR_SERVICES_HXX
+//ASDBG #include <usr/services.hxx>
+//ASDBG #endif
+#ifndef _DTRANS_HXX
+#include <so3/dtrans.hxx>
+#endif
+#ifndef _COM_SUN_STAR_CHAOS_XCOMMANDEXECUTOR_HPP_
+#include <com/sun/star/chaos/XCommandExecutor.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CHAOS_XSTATUSCALLBACK_HPP_
+#include <com/sun/star/chaos/XStatusCallback.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CHAOS_UNKNOWNCOMMANDEXCEPTION_HPP_
+#include <com/sun/star/chaos/UnknownCommandException.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CHAOS_STATUSCALLBACKEVENT_HPP_
+#include <com/sun/star/chaos/StatusCallbackEvent.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CHAOS_XURLCONTENT_HPP_
+#include <com/sun/star/chaos/XURLContent.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CHAOS_XEXPLOREREXCHANGE_HPP_
+#include <com/sun/star/chaos/XExplorerExchange.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUES_HPP_
+#include <com/sun/star/beans/PropertyValues.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
+#include <com/sun/star/beans/XPropertySet.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_
+#include <com/sun/star/beans/PropertyValue.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_PROPERTYSTATE_HPP_
+#include <com/sun/star/beans/PropertyState.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSETINFO_HPP_
+#include <com/sun/star/beans/XPropertySetInfo.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XMULTIPROPERTYSET_HPP_
+#include <com/sun/star/beans/XMultiPropertySet.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XFASTPROPERTYSET_HPP_
+#include <com/sun/star/beans/XFastPropertySet.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XVETOABLECHANGELISTENER_HPP_
+#include <com/sun/star/beans/XVetoableChangeListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSTATE_HPP_
+#include <com/sun/star/beans/XPropertyState.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSTATECHANGELISTENER_HPP_
+#include <com/sun/star/beans/XPropertyStateChangeListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HPP_
+#include <com/sun/star/beans/PropertyAttribute.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTIESCHANGELISTENER_HPP_
+#include <com/sun/star/beans/XPropertiesChangeListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYCHANGELISTENER_HPP_
+#include <com/sun/star/beans/XPropertyChangeListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYACCESS_HPP_
+#include <com/sun/star/beans/XPropertyAccess.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYCONTAINER_HPP_
+#include <com/sun/star/beans/XPropertyContainer.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_PROPERTYSTATECHANGEEVENT_HPP_
+#include <com/sun/star/beans/PropertyStateChangeEvent.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_PROPERTYCHANGEEVENT_HPP_
+#include <com/sun/star/beans/PropertyChangeEvent.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#endif
+#ifndef _CPPUHELPER_WEAK_HXX_
+#include <cppuhelper/weak.hxx>
+#endif
+#ifndef _CPPUHELPER_INTERFACECONTAINER_HXX_
+#include <cppuhelper/interfacecontainer.hxx>
+#endif
+
+class CntAnchor;
+
+class TplAnchorListener;
+
+// -----------------
+// - TplComponent -
+// -----------------
+
+class TplComponent : public ::com::sun::star::chaos::XURLContent, public ::com::sun::star::chaos::XCommandExecutor,
+ public ::com::sun::star::beans::XPropertySet, public ::com::sun::star::chaos::XExplorerExchange,
+ public ::cppu::OWeakObject, public ::com::sun::star::lang::XServiceInfo
+{
+private:
+
+ void HandleNewEvt( const ::rtl::OUString& rCommand,
+ const ::com::sun::star::uno::Any& rAny );
+ void CreatePopupMenu( ::com::sun::star::uno::Any& rAny ) const;
+
+protected:
+
+ ::rtl::OUString maURL;
+ ::rtl::OUString maName;
+ ::osl::Mutex aMutex;
+ ::cppu::OInterfaceContainerHelper maListeners;
+ TplAnchorListener* mpListener;
+ short mnOpenMode;
+
+public:
+
+ SFX_DECL_XINTERFACE_XTYPEPROVIDER_XSERVICEINFO
+
+ TplComponent();
+ ~TplComponent();
+
+ // interface ::com::sun::star::ucb::XContent
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getParent() throw ( ::com::sun::star::uno::RuntimeException )
+ { ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > aRef; return aRef; }
+ virtual void SAL_CALL setParent( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & Parent ) throw ( ::com::sun::star::uno::RuntimeException )
+ {}
+
+ // interface ::com::sun::star::chaos::XURLContent
+ virtual ::rtl::OUString SAL_CALL getURL() throw ( ::com::sun::star::uno::RuntimeException )
+ { return maURL; }
+ virtual sal_Bool SAL_CALL initialize( const ::com::sun::star::uno::Reference< ::com::sun::star::chaos::XURLContent > & aParent, const ::rtl::OUString& aURL ) throw ( ::com::sun::star::uno::RuntimeException );
+
+ // interface ::com::sun::star::chaos::XCommandExecutor
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL queryCommands() throw ( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL cancel( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & rCommandId ) throw ( ::com::sun::star::uno::RuntimeException )
+ {}
+ virtual void SAL_CALL execute( const ::rtl::OUString& rCommand, const ::com::sun::star::uno::Any& rArgs,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::chaos::XStatusCallback > & rCallback ) throw ( ::com::sun::star::uno::RuntimeException );
+
+ // interface ::com::sun::star::beans::XPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() throw ( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw ( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& aPropertyName ) throw ( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener > & aListener ) throw ( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener > & aListener ) throw ( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& aPropertyName,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener > & aListener ) throw ( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& aPropertyName,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener > & aListener ) throw ( ::com::sun::star::uno::RuntimeException );
+ // interface ::com::sun::star::chaos::XExplorerExchange
+ virtual ::com::sun::star::uno::Any SAL_CALL createDataObject( sal_uInt16& nSourceOptions ) throw ( ::com::sun::star::uno::RuntimeException );
+ virtual sal_uInt16 SAL_CALL insertDataObject( const ::com::sun::star::uno::Any& pSotDataObjectPtr,
+ sal_uInt16 nUserAction,
+ sal_uInt16 nSourceOptions ) throw ( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL queryInsertDataObject( const ::com::sun::star::uno::Any& pSotDataObjectPtr,
+ sal_uInt16 nUserAction,
+ sal_uInt16 nSourceOptions,
+ sal_uInt16& nResultingAction,
+ sal_uInt16& nDefaultAction ) throw ( ::com::sun::star::uno::RuntimeException );
+
+
+ // -------------------------------------------------------------
+
+ void CreateNewChild( CntAnchor* pAnchor,
+ const String& rTitle );
+ void RemoveChild( CntAnchor* pAnchor );
+ void StopListening( CntAnchor* pAnchor );
+ void HandleOpenEvt();
+};
+
+// ------------------------
+// - TplContentsComponent -
+// ------------------------
+
+class TplContentsListener;
+
+class TplContentsComponent : public TplComponent
+{
+private:
+ ::com::sun::star::uno::Reference< ::com::sun::star::chaos::XURLContent > _xParent;
+ TplContentsListener* _pListener;
+ SvDataObjectRef _xObject;
+ sal_uInt16 _nLayout;
+
+ void HandleOpenEvt( const ::com::sun::star::uno::Reference< ::com::sun::star::chaos::XStatusCallback > & rJob,
+ const ::com::sun::star::chaos::StatusCallbackEvent& rEvt );
+ void HandleNewEvt( const ::rtl::OUString& rCommand,
+ const ::com::sun::star::uno::Any& rAny );
+ void HandleInitEvt();
+
+ void CreateFileName( String& rName,
+ String& rDirURL );
+ void CreateNewTpl( const String& rFilter,
+ const String& rParentDir,
+ const String& rFileName,
+ const String& rDocName );
+protected:
+
+ void CreatePopupMenu( ::com::sun::star::uno::Any& rAny ) const;
+
+public:
+
+ SFX_DECL_XINTERFACE_XTYPEPROVIDER_XSERVICEINFO
+
+ TplContentsComponent();
+ ~TplContentsComponent();
+
+ virtual sal_Bool SAL_CALL initialize( const ::com::sun::star::uno::Reference< ::com::sun::star::chaos::XURLContent > & aParent, const ::rtl::OUString& aURL ) throw ( ::com::sun::star::uno::RuntimeException );
+
+
+ // interface ::com::sun::star::chaos::XCommandExecutor
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL queryCommands() throw ( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL execute( const ::rtl::OUString& rCommand, const ::com::sun::star::uno::Any& rArgs,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::chaos::XStatusCallback > & rCallback ) throw ( ::com::sun::star::uno::RuntimeException );
+
+ // interface ::com::sun::star::beans::XPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() throw ( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& aPropertyName ) throw ( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw ( ::com::sun::star::uno::RuntimeException );
+
+ // interface ::com::sun::star::chaos::XExplorerExchange
+ virtual ::com::sun::star::uno::Any SAL_CALL createDataObject( sal_uInt16& nSourceOptions ) throw ( ::com::sun::star::uno::RuntimeException );
+ virtual sal_uInt16 SAL_CALL insertDataObject( const ::com::sun::star::uno::Any& pSotDataObjectPtr,
+ sal_uInt16 nUserAction,
+ sal_uInt16 nSourceOptions ) throw ( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL queryInsertDataObject( const ::com::sun::star::uno::Any& pSotDataObjectPtr,
+ sal_uInt16 nUserAction,
+ sal_uInt16 nSourceOptions,
+ sal_uInt16& nResultingAction,
+ sal_uInt16& nDefaultAction ) throw ( ::com::sun::star::uno::RuntimeException );
+
+ // -------------------------------------------------------------
+
+ void CreateNewChild( CntAnchor* pAnchor );
+ void HandleDeleteEvt();
+ void SetURL( const ::rtl::OUString& rURL);
+ void SetName( const ::rtl::OUString& rNewName );
+};
+
+
+#endif
+
diff --git a/sfx2/source/inc/versdlg.hxx b/sfx2/source/inc/versdlg.hxx
new file mode 100644
index 000000000000..0bf6cdfdd6fc
--- /dev/null
+++ b/sfx2/source/inc/versdlg.hxx
@@ -0,0 +1,144 @@
+/*************************************************************************
+ *
+ * $RCSfile: versdlg.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:35 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _VERSDLG_HXX
+#define _VERSDLG_HXX
+
+// #include *****************************************************************
+
+#ifndef _BUTTON_HXX //autogen
+#include <vcl/button.hxx>
+#endif
+#ifndef _FIXED_HXX //autogen
+#include <vcl/fixed.hxx>
+#endif
+#ifndef _SVTREEBOX_HXX //autogen
+#include <svtools/svtabbx.hxx>
+#endif
+#ifndef _SV_GROUP_HXX //autogen
+#include <vcl/group.hxx>
+#endif
+#ifndef _SVEDIT_HXX //autogen
+#include <svtools/svmedit.hxx>
+#endif
+#include "basedlgs.hxx"
+
+class SfxObjectShell;
+struct SfxVersionInfo;
+
+class SfxVersionsTabListBox_Impl : public SvTabListBox
+{
+ virtual void KeyInput( const KeyEvent& rKeyEvent );
+
+public:
+ SfxVersionsTabListBox_Impl(
+ Window* pParent, const ResId& );
+};
+
+class SfxVersionDialog : public SfxModalDialog
+{
+ GroupBox aNewGroup;
+ PushButton aSaveButton;
+ CheckBox aSaveCheckBox;
+ GroupBox aExistingGroup;
+ FixedText aDateTimeText;
+ FixedText aSavedByText;
+ FixedText aCommentText;
+ SfxVersionsTabListBox_Impl aVersionBox;
+ PushButton aCloseButton;
+ PushButton aOpenButton;
+ PushButton aViewButton;
+ PushButton aDeleteButton;
+ PushButton aCompareButton;
+ HelpButton aHelpButton;
+ SfxViewFrame* pViewFrame;
+
+ DECL_LINK( DClickHdl_Impl, Control* );
+ DECL_LINK( SelectHdl_Impl, Control* );
+ DECL_LINK( ButtonHdl_Impl, Button* );
+ void Init_Impl();
+ void Open_Impl();
+
+public:
+ SfxVersionDialog ( SfxViewFrame* pFrame,
+ Window *pParent );
+ virtual ~SfxVersionDialog ();
+};
+
+class SfxViewVersionDialog_Impl : public SfxModalDialog
+{
+ FixedText aDateTimeText;
+ FixedText aSavedByText;
+ MultiLineEdit aEdit;
+ OKButton aOKButton;
+ CancelButton aCancelButton;
+ PushButton aCloseButton;
+ HelpButton aHelpButton;
+ SfxVersionInfo* pInfo;
+
+ DECL_LINK( ButtonHdl, Button* );
+
+public:
+ SfxViewVersionDialog_Impl( Window *pParent,
+ SfxVersionInfo& rInfo, BOOL bEdit );
+};
+
+#endif
diff --git a/sfx2/source/inc/virtmenu.hxx b/sfx2/source/inc/virtmenu.hxx
new file mode 100644
index 000000000000..df2e96c692bb
--- /dev/null
+++ b/sfx2/source/inc/virtmenu.hxx
@@ -0,0 +1,186 @@
+/*************************************************************************
+ *
+ * $RCSfile: virtmenu.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:35 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SFXVIRTMENU_HXX
+#define _SFXVIRTMENU_HXX
+
+
+#ifndef _SVARRAY_HXX //autogen
+#include <svtools/svarray.hxx>
+#endif
+#ifndef _SFXMNUITEM_HXX
+#include "mnuitem.hxx"
+#endif
+
+#ifndef _SFXMNUCFGA_HXX
+#include "mnucfga.hxx"
+#endif
+
+class SfxBindings;
+class Timer;
+
+SV_DECL_PTRARR_DEL( SfxMenuCtrlArr_Impl, SfxMenuControl*, 2, 2 );
+
+class SfxVirtualMenu
+{
+friend class SfxMenuControl;
+
+private:
+ Menu* pSVMenu;
+ SfxVirtualMenu* pParent;
+ SfxMenuCtrlArr_Impl* pAppCtrl;
+ SfxMenuControl* pItems;
+ SfxBindings* pBindings;
+ ResMgr* pResMgr;
+ PopupMenu* pWindowMenu;
+ PopupMenu* pPickMenu;
+ Timer* pAutoDeactivate; // Hack fuer QAP-Bug
+ USHORT nVisibleItems;
+ USHORT nId;
+ USHORT nCount;
+ USHORT nLocks;
+ BOOL bResCtor : 1; // SV Menu created from resource
+ BOOL bOLE : 1; // InPlaceMenu
+ BOOL bHelpInitialized : 1;
+ BOOL bIsActive : 1;
+ BOOL bControllersUnBound : 1;
+ BOOL bRemoveDisabledEntries: 1;
+
+private:
+ void Construct_Impl();
+ FASTBOOL Bind_Impl( Menu *pMenu );
+ inline SfxMenuCtrlArr_Impl& GetAppCtrl_Impl()
+ {
+ return pAppCtrl? *pAppCtrl: *(pAppCtrl = new SfxMenuCtrlArr_Impl) ;
+ }
+ void UnbindControllers();
+ void BindControllers();
+
+protected:
+ SfxVirtualMenu( USHORT nOwnId, SfxVirtualMenu* pParent, Menu& rMenu, BOOL bWithHelp,
+ SfxBindings &rBind, BOOL bOLEServer=FALSE, BOOL bRes=FALSE );
+
+ void CreateFromSVMenu();
+ DECL_LINK( Highlight, Menu * );
+ DECL_LINK( Activate, Menu * );
+ DECL_LINK( Deactivate, Menu * );
+ DECL_LINK( Select, Menu * );
+
+public:
+ ~SfxVirtualMenu();
+ SfxVirtualMenu( Menu *pStarViewMenu, BOOL bWithHelp,
+ SfxBindings &rBind, BOOL bOLEServer=FALSE, BOOL bRes=FALSE );
+ void CheckItem( USHORT nItemId, BOOL bCheck );
+ void EnableItem( USHORT nItemId, BOOL bEnable );
+ void SetItemText( USHORT nItemId, const String& rText );
+
+ USHORT GetItemPos( USHORT nItemId ) const;
+
+ USHORT GetItemCount() const;
+ Menu* GetSVMenu() const;
+ SfxMenuControl& operator[]( USHORT nPos ) const;
+ USHORT GetItemId( USHORT nPos ) const;
+ SfxVirtualMenu* GetPopupMenu( USHORT nId ) const;
+ SfxVirtualMenu* GetParentMenu() const { return pParent; }
+ void SetParentMenu( SfxVirtualMenu* pNewParent )
+ { pParent = pNewParent; }
+ String GetItemText( USHORT nId ) const;
+ String GetItemHelpText( USHORT nId ) const;
+ void InvalidateKeyCodes();
+
+ void SetPopupMenu( USHORT nId, PopupMenu *pMenu );
+ BOOL IsFromResource() const
+ { return bResCtor; }
+ void InitPopup(USHORT nPos, BOOL bOLE = TRUE);
+ void InitializeHelp();
+ void SetResMgr(ResMgr* pMgr) {pResMgr = pMgr; }
+ ResMgr* GetResMgr() { return pResMgr; }
+ void SetHelpIds( ResMgr* );
+ void RemoveDisabledEntries();
+ void SetRemoveDisabledEntries();
+};
+
+//--------------------------------------------------------------------
+
+// return the number of virtual items in this menu
+
+inline USHORT SfxVirtualMenu::GetItemCount() const
+{
+ return nCount;
+}
+//--------------------------------------------------------------------
+
+//
+
+inline SfxMenuControl& SfxVirtualMenu::operator[]( USHORT nPos ) const
+{
+ return *(pItems+nPos);
+}
+//--------------------------------------------------------------------
+
+// returns the item id at position nPos in the menu (or 0 if sep.)
+
+inline USHORT SfxVirtualMenu::GetItemId( USHORT nPos ) const
+{
+ return pItems ? pItems[nPos].GetId() : 0;
+}
+
+
+#endif
diff --git a/sfx2/source/inc/workwin.hxx b/sfx2/source/inc/workwin.hxx
new file mode 100644
index 000000000000..5f6141d697cd
--- /dev/null
+++ b/sfx2/source/inc/workwin.hxx
@@ -0,0 +1,400 @@
+/*************************************************************************
+ *
+ * $RCSfile: workwin.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:35 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SFXWORKWIN_HXX
+#define _SFXWORKWIN_HXX
+
+#ifndef _COM_SUN_STAR_FRAME_XDISPATCH_HPP_
+#include <com/sun/star/frame/XDispatch.hpp>
+#endif
+
+#define _SVSTDARR_USHORTS
+#include <svtools/svstdarr.hxx> // SvUShorts
+
+#ifndef _IFACE_HXX //autogen
+#include <so3/iface.hxx>
+#endif
+
+#include "sfx.hrc"
+#include "childwin.hxx"
+#include "shell.hxx"
+#include "minarray.hxx"
+#include "ctrlitem.hxx"
+
+class SfxToolBoxManager;
+class SfxInPlaceEnv_Impl;
+class SfxPlugInEnv_Impl;
+class SfxSplitWindow;
+class SfxWorkWindow;
+class XDispatch;
+
+//====================================================================
+// Dieser struct h"alt alle relevanten Informationen "uber Toolboxen bereit.
+
+struct SfxObjectBar_Impl
+{
+ USHORT nId; // Resource - und ConfigId der Toolbox
+ USHORT nMode; // spezielle Sichtbarkeitsflags
+ SfxToolBoxManager* pTbx;
+ String aName;
+ ResMgr* pResMgr;
+ SfxInterface* pIFace;
+
+ SfxObjectBar_Impl() :
+ nId(0),
+ nMode(0),
+ pTbx(0),
+ pResMgr(0),
+ pIFace(0)
+ {}
+};
+
+//------------------------------------------------------------------------------
+// Dieser struct h"alt alle relevanten Informationen "uber die Statuszeile bereit.
+struct SfxStatBar_Impl
+{
+ ResMgr* pResMgr;
+ SfxShell* pShell;
+ SfxBindings* pBindings;
+ USHORT nId;
+ SfxStatusBarManager* pStatusBar;
+ BOOL bOn;
+ BOOL bTemp;
+
+ SfxStatBar_Impl() :
+ nId(0),
+ pResMgr(0),
+ pShell(0),
+ pBindings(0),
+ pStatusBar(0),
+ bOn(TRUE),
+ bTemp(FALSE)
+ {}
+};
+
+//------------------------------------------------------------------------------
+
+#define CHILD_NOT_VISIBLE 0
+#define CHILD_ACTIVE 1 // nicht durch HidePopups ausgeschaltet
+#define CHILD_NOT_HIDDEN 2 // nicht durch HideChildWindow ausgeschaltet
+#define CHILD_FITS_IN 4 // nicht zu gro\s f"ur OutputSize des parent
+#define CHILD_VISIBLE (CHILD_NOT_HIDDEN | CHILD_ACTIVE | CHILD_FITS_IN)
+#define CHILD_ISVISIBLE (CHILD_NOT_HIDDEN | CHILD_ACTIVE)
+
+struct SfxChild_Impl
+{
+ Window* pWin;
+ Size aSize;
+ SfxChildAlignment eAlign;
+ USHORT nVisible;
+ BOOL bResize;
+ BOOL bCanGetFocus;
+
+ SfxChild_Impl( Window& rChild, const Size& rSize,
+ SfxChildAlignment eAlignment, BOOL bIsVisible ):
+ pWin(&rChild), aSize(rSize), eAlign(eAlignment), bResize(FALSE),
+ bCanGetFocus( FALSE )
+ {
+ nVisible = bIsVisible ? CHILD_VISIBLE : CHILD_NOT_VISIBLE;
+ }
+};
+
+//--------------------------------------------------------------------
+class SfxChildWinController_Impl : public SfxControllerItem
+{
+ SfxWorkWindow* pWorkwin;
+
+ public:
+ SfxChildWinController_Impl( USHORT nId, SfxWorkWindow *pWin );
+ virtual void StateChanged( USHORT nSID, SfxItemState eState,
+ const SfxPoolItem* pState );
+};
+
+struct SfxChildWin_Impl
+{
+ USHORT nSaveId; // die ChildWindow-Id
+ USHORT nInterfaceId; // der aktuelle Context
+ USHORT nId; // aktuelle Id
+ SfxChildWindow* pWin;
+ BOOL bCreate;
+ SfxChildWinInfo aInfo;
+ SfxChild_Impl* pCli; // != 0 bei direkten Children
+ USHORT nVisibility;
+ BOOL bEnable;
+ SfxChildWinController_Impl* pControl;
+ BOOL bDisabled;
+
+ SfxChildWin_Impl( ULONG nID ) :
+ nSaveId((USHORT) (nID & 0xFFFF) ),
+ nInterfaceId((USHORT) (nID >> 16)),
+ nId(nSaveId),
+ pWin(0),
+ bCreate(FALSE),
+ pCli(0),
+ nVisibility( FALSE ),
+ bEnable( TRUE ),
+ bDisabled( FALSE ),
+ pControl( 0 )
+ {}
+};
+
+enum SfxChildIdentifier
+{
+ SFX_CHILDWIN_STATBAR,
+ SFX_CHILDWIN_OBJECTBAR,
+ SFX_CHILDWIN_DOCKINGWINDOW,
+ SFX_CHILDWIN_SPLITWINDOW
+};
+
+enum SfxDockingConfig
+{
+ SFX_SETDOCKINGRECTS,
+ SFX_ALIGNDOCKINGWINDOW,
+ SFX_TOGGLEFLOATMODE,
+ SFX_MOVEDOCKINGWINDOW
+};
+
+DECL_PTRARRAY( SfxChildList_Impl, SfxChild_Impl*, 2, 2 );
+DECL_PTRARRAY( SfxChildWindows_Impl, SfxChildWin_Impl*, 2, 2 );
+
+SV_DECL_OBJARR( SfxObjectBarArr_Impl, SfxObjectBar_Impl, 1, 2 );
+
+struct SfxObjectBarList_Impl
+{
+ SfxObjectBarArr_Impl aArr;
+ USHORT nAct;
+
+ SfxObjectBar_Impl operator[] ( USHORT n )
+ { return aArr[n]; }
+ SfxObjectBar_Impl Actual()
+ { return aArr[nAct]; }
+};
+
+struct SfxSplitWin_Impl
+{
+ SfxSplitWindow* pSplitWin;
+ SfxChildWindows_Impl* pChildWins;
+};
+
+#define SFX_SPLITWINDOWS_LEFT 0
+#define SFX_SPLITWINDOWS_TOP 2
+#define SFX_SPLITWINDOWS_RIGHT 1
+#define SFX_SPLITWINDOWS_BOTTOM 3
+#define SFX_SPLITWINDOWS_MAX 4
+
+//--------------------------------------------------------------------
+
+class SfxWorkWindow
+{
+protected:
+ SfxStatBar_Impl aStatBar;
+ SfxWorkWindow* pParent;
+ SvUShorts aSortedList;
+ SfxObjectBar_Impl aObjBars[SFX_OBJECTBAR_MAX];
+ SfxObjectBarList_Impl aObjBarLists[SFX_OBJECTBAR_MAX];
+ SfxSplitWindow* pSplit[SFX_SPLITWINDOWS_MAX];
+ SfxChildList_Impl* pChilds;
+ SfxChildWindows_Impl* pChildWins;
+ SfxBindings* pBindings;
+ Window* pWorkWin;
+ USHORT nUpdateMode;
+ USHORT nChilds;
+ BOOL bSorted;
+ USHORT nOrigMode;
+ Rectangle aClientArea;
+ BOOL bDockingAllowed;
+ BOOL bAllChildsVisible;
+ SfxShell* pConfigShell;
+ Window* pActiveChild;
+
+protected:
+ void CreateChildWin_Impl(SfxChildWin_Impl*);
+ void RemoveChildWin_Impl(SfxChildWin_Impl*);
+ void Sort_Impl();
+ void AlignChild_Impl( Window& rWindow, const Size& rNewSize,
+ SfxChildAlignment eAlign );
+ SfxChild_Impl* FindChild_Impl( const Window& rWindow ) const;
+ virtual BOOL RequestTopToolSpacePixel_Impl( SvBorder aBorder );
+ virtual Rectangle GetTopRect_Impl();
+ SvBorder Arrange_Impl( Rectangle & rRect);
+ virtual void SaveStatus_Impl(SfxChildWindow*, const SfxChildWinInfo&);
+
+public:
+ SfxWorkWindow( Window *pWin, SfxBindings& rBindings, SfxWorkWindow* pParent = NULL);
+ ~SfxWorkWindow();
+ SystemWindow* GetTopWindow() const;
+ SfxBindings& GetBindings()
+ { return *pBindings; }
+ Window* GetWindow() const
+ { return pWorkWin; }
+ Rectangle GetFreeArea( BOOL bAutoHide ) const;
+ void SetDockingAllowed(BOOL bSet)
+ { bDockingAllowed = bSet; }
+ BOOL IsDockingAllowed() const
+ { return bDockingAllowed; }
+ SfxWorkWindow* GetParent_Impl() const
+ { return pParent; }
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > CreateDispatch( const String& );
+
+ // Methoden f"ur alle Child-Fenster
+ void ReleaseChild_Impl( Window& rWindow );
+ SfxChild_Impl* RegisterChild_Impl( Window& rWindow, SfxChildAlignment eAlign, BOOL bCanGetFocus=FALSE );
+ void ShowChilds_Impl();
+ void HideChilds_Impl();
+ void Close_Impl();
+ BOOL PrepareClose_Impl();
+ virtual void ArrangeChilds_Impl();
+ void DeleteControllers_Impl();
+ void HidePopups_Impl(BOOL bHide, BOOL bParent=FALSE, USHORT nId=0);
+ void ConfigChild_Impl(SfxChildIdentifier,
+ SfxDockingConfig, USHORT);
+ void MakeChildsVisible_Impl( BOOL bVis );
+ void ArrangeAutoHideWindows( SfxSplitWindow *pSplit );
+ BOOL IsAutoHideMode( const SfxSplitWindow *pSplit );
+ void EndAutoShow_Impl();
+
+ // Methoden f"ur Objectbars
+ virtual void UpdateObjectBars_Impl();
+ void ResetObjectBars_Impl();
+ void SetObjectBar_Impl( USHORT nPos, const ResId& rId,
+ SfxInterface *pIFace, const String* pName=0 );
+ Window* GetObjectBar_Impl( USHORT nPos, ResId& rResId );
+ FASTBOOL KnowsObjectBar_Impl( USHORT nPos ) const;
+ void SetObjectBarVisibility_Impl( USHORT nVis );
+ BOOL IsContainer_Impl() const;
+ void NextObjectBar_Impl( USHORT nPos );
+ USHORT HasNextObjectBar_Impl( USHORT nPos, String* pStr=0 );
+
+ // Methoden f"ur ChildWindows
+ void UpdateChildWindows_Impl();
+ void ResetChildWindows_Impl();
+ void SetChildWindowVisible_Impl( ULONG, BOOL, USHORT );
+ void ToggleChildWindow_Impl(USHORT);
+ BOOL HasChildWindow_Impl(USHORT);
+ BOOL KnowsChildWindow_Impl(USHORT);
+ void ShowChildWindow_Impl(USHORT, BOOL bVisible=TRUE);
+ void SetChildWindow_Impl(USHORT, BOOL bOn);
+ SfxChildWindow* GetChildWindow_Impl(USHORT);
+ virtual void InitializeChild_Impl(SfxChildWin_Impl*);
+ SfxSplitWindow* GetSplitWindow_Impl(SfxChildAlignment);
+
+ BOOL IsVisible_Impl( USHORT nMode ) const;
+ void DisableChildWindow_Impl( USHORT nId, BOOL bDisable );
+ BOOL IsFloating( USHORT nId );
+ void ChangeWindow_Impl( Window *pNew );
+ void SetActiveChild_Impl( Window *pChild );
+ Window* GetActiveChild_Impl();
+ virtual BOOL ActivateNextChild_Impl( BOOL bForward = TRUE );
+
+ // Methoden f"ur StatusBar
+ void SetTempStatusBar_Impl( BOOL bSet );
+ void ResetStatusBar_Impl();
+ void SetStatusBar_Impl(const ResId&, SfxShell *pShell, SfxBindings& );
+ void UpdateStatusBar_Impl();
+ SfxStatusBarManager* GetStatusBarManager_Impl();
+};
+
+class SfxPIWorkWin_Impl : public SfxWorkWindow
+{
+ SfxPlugInEnv_Impl* pEnv;
+ Window* pDialogParent;
+
+public:
+ SfxPIWorkWin_Impl(
+ Window *pWin, SfxBindings &rBindings,
+ SfxPlugInEnv_Impl* pE);
+ virtual Window* GetModalDialogParent() const;
+
+private:
+ virtual void ArrangeChilds_Impl();
+ virtual void UpdateObjectBars_Impl();
+ virtual void SaveStatus_Impl(SfxChildWindow*, const SfxChildWinInfo&);
+ virtual void InitializeChild_Impl(SfxChildWin_Impl*);
+ virtual Rectangle GetTopRect_Impl();
+};
+
+
+class SfxIPWorkWin_Impl : public SfxWorkWindow
+{
+ SfxInPlaceEnv_Impl* pEnv;
+
+public:
+ SfxIPWorkWin_Impl( WorkWindow *pWin, SfxBindings &rBindings,
+ SfxInPlaceEnv_Impl* pE);
+private:
+ virtual BOOL RequestTopToolSpacePixel_Impl( SvBorder aBorder );
+ virtual void UpdateObjectBars_Impl();
+ virtual Rectangle GetTopRect_Impl();
+ virtual void ArrangeChilds_Impl();
+ virtual void SaveStatus_Impl(SfxChildWindow*, const SfxChildWinInfo&);
+};
+
+class SfxFrameWorkWin_Impl : public SfxWorkWindow
+{
+ SfxFrame* pFrame;
+public:
+ SfxFrameWorkWin_Impl( Window* pWin, SfxFrame* pTask );
+ virtual void ArrangeChilds_Impl();
+ virtual void UpdateObjectBars_Impl();
+ virtual Rectangle GetTopRect_Impl();
+};
+
+
+#endif
diff --git a/sfx2/source/inet/inettbc.cxx b/sfx2/source/inet/inettbc.cxx
new file mode 100644
index 000000000000..a5d9668e0d88
--- /dev/null
+++ b/sfx2/source/inet/inettbc.cxx
@@ -0,0 +1,1053 @@
+/*************************************************************************
+ *
+ * $RCSfile: inettbc.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:35 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include "inettbc.hxx"
+
+#pragma hdrstop
+
+#ifndef _SFXENUMITEM_HXX //autogen
+#include <svtools/eitem.hxx>
+#endif
+#ifndef _SFXSTRITEM_HXX //autogen
+#include <svtools/stritem.hxx>
+#endif
+#ifndef _SFXCANCEL_HXX //autogen
+#include <svtools/cancel.hxx>
+#endif
+#include <vcl/toolbox.hxx>
+#ifndef _VOS_THREAD_HXX //autogen
+#include <vos/thread.hxx>
+#endif
+#ifndef _VOS_MUTEX_HXX //autogen
+#include <vos/mutex.hxx>
+#endif
+
+#include <svtools/urihelper.hxx>
+
+#include "picklist.hxx"
+#include "sfx.hrc"
+#include "dispatch.hxx"
+#include "viewfrm.hxx"
+#include "objsh.hxx"
+#include "referers.hxx"
+#include "sfxtypes.hxx"
+#include "helper.hxx"
+
+// -----------------------------------------------------------------------
+class SfxMatchContext_Impl : public ::vos::OThread
+{
+ static ::vos::OMutex* pDirMutex;
+
+ SvStringsDtor aPickList;
+ SvStringsDtor aCompletions;
+ SvStringsDtor aURLs;
+ AsynchronLink aLink;
+ String aBaseURL;
+ String aText;
+ SfxURLBox* pBox;
+ SfxCancellable* pCancel;
+ BOOL bStop; // Abbruch erwuenscht
+ BOOL bOnlyDirectories;
+
+ DECL_STATIC_LINK( SfxMatchContext_Impl, Select_Impl, void* );
+
+ virtual void SAL_CALL onTerminated( );
+ virtual void SAL_CALL run();
+ virtual void SAL_CALL Cancel();
+ void Insert( const String& rCompletion, const String& rURL, BOOL bForce = FALSE);
+ void ReadFolder( const String& rURL, const String& rMatch );
+public:
+ static ::vos::OMutex* GetMutex();
+
+ SfxMatchContext_Impl( SfxURLBox* pBoxP, const String& rText, BOOL bSelectFirst );
+ ~SfxMatchContext_Impl();
+ void Stop();
+};
+
+void SAL_CALL SfxMatchContext_Impl::Cancel()
+{
+ terminate();
+}
+
+::vos::OMutex* SfxMatchContext_Impl::pDirMutex = 0;
+
+::vos::OMutex* SfxMatchContext_Impl::GetMutex()
+{
+ ::vos::OGuard aGuard( ::vos::OMutex::getGlobalMutex() );
+ if( !pDirMutex )
+ pDirMutex = new ::vos::OMutex;
+ return pDirMutex;
+}
+
+SfxMatchContext_Impl::SfxMatchContext_Impl(
+ SfxURLBox* pBoxP, const String& rText, BOOL bSelectFirst )
+ : aText( rText )
+ , pBox( pBoxP )
+ , aLink( STATIC_LINK( this, SfxMatchContext_Impl, Select_Impl ) )
+ , bStop( FALSE )
+ , pCancel( new SfxCancellable( SFX_APP()->GetCancelManager(), rText ) )
+ , bOnlyDirectories( pBoxP->bOnlyDirectories )
+ , aBaseURL( pBoxP->aBaseURL )
+{
+ // Pickliste abziehen wg. konkurrierender Zugriffe
+ SfxPickList_Impl& rList = *SfxPickList_Impl::Get();
+ USHORT nCount = (USHORT)rList.HistoryPickEntryCount();
+ // Uber char* casten fuer getrennte Impdaten
+ for( USHORT nPos = 0; nPos < nCount; nPos++ )
+ {
+ const StringPtr pStr = new String(rList.GetHistoryPickEntry( nPos )->aTitle );
+ aPickList.Insert(pStr, nPos );
+ }
+
+ // Thread starten
+// Application::EnterMultiThread();
+ create();
+}
+
+SfxMatchContext_Impl::~SfxMatchContext_Impl()
+{
+ aLink.ClearPendingCall();
+ delete pCancel;
+// Application::EnterMultiThread( FALSE );
+}
+
+void SfxMatchContext_Impl::Stop()
+{
+ if( isRunning() )
+ {
+ bStop = TRUE;
+ terminate();
+ }
+}
+
+// Select l"auft im Mainthread, da "uber einen asynchronen Link gecalled wird.
+// Es wird immer erst gerufen, wenn der Thread mit seiner Arbeit fertig ist.
+// Falls inzwischen der MatchContext zerst"ort wurde, fliegt auch der asynchrone Link
+// ab, da er ja ein member des MatchContexts ist, d.h. der Link wird dann auch nicht gecalled
+IMPL_STATIC_LINK( SfxMatchContext_Impl, Select_Impl, void*, pArg )
+{
+ if( pArg )
+ {
+ DELETEZ( pThis->pCancel );
+ if( pThis->bStop )
+ {
+ delete pThis;
+ return 0;
+ }
+ }
+
+ SfxURLBox* pBox = pThis->pBox;
+ pBox->bAutoCompleteMode = TRUE;
+
+ pBox->Clear();
+ for( USHORT nPos = 0; nPos<pThis->aCompletions.Count(); nPos++ )
+ {
+ String aMatchString( pThis->aText );
+ aMatchString += *pThis->aCompletions[nPos];
+ pBox->InsertEntry( aMatchString );
+ }
+
+ if( pThis->aCompletions.Count() )
+ {
+ String aTmp( pBox->GetEntry(0) );
+ pBox->SetText( aTmp );
+ pBox->SetSelection( Selection( pThis->aText.Len(), aTmp.Len() ) );
+ }
+
+ pBox->Resize();
+ return 0;
+}
+
+void SfxMatchContext_Impl::Insert( const String& rCompletion, const String& rURL, BOOL bForce )
+{
+ if( !bForce )
+ for( USHORT nPos = aCompletions.Count(); nPos--; )
+ if( *aCompletions[ nPos ] == rCompletion )
+ return;
+
+ const StringPtr pCompletion = new String( rCompletion );
+ aCompletions.Insert( pCompletion, aCompletions.Count() );
+ const StringPtr pURL = new String( rURL );
+ aURLs.Insert( pURL, aURLs.Count() );
+}
+
+void SfxMatchContext_Impl::ReadFolder( const String& rURL, const String& rMatch )
+{
+ if( !SfxContentHelper::IsFolder( rURL ) )
+ return;
+
+ INetURLObject aMatchObj( rMatch, INET_PROT_FILE );
+ String aMatchName;
+ if ( rURL != aMatchObj.GetMainURL() )
+ {
+ aMatchName = aMatchObj.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET );
+ aMatchName.ToLowerAscii();
+ }
+
+ xub_StrLen nMatchLen = aMatchName.Len();
+ ::com::sun::star::uno::Sequence< ::rtl::OUString > aEntries =
+ SfxContentHelper::GetFolderContentProperties( rURL, sal_True );
+ const ::rtl::OUString* pEntries = aEntries.getConstArray();
+ UINT32 nCount = aEntries.getLength();
+ for ( UINT32 i=0; schedule() && i < nCount; i++ )
+ {
+ String aRow( pEntries[i] );
+ String aTitle = aRow.GetToken( 0, '\t' );
+ aTitle.ToLowerAscii();
+ String aURL = aRow.GetToken( 3, '\t' );
+ sal_Bool bIsFolder = ( '1' == aRow.GetToken( 4, '\t' ).GetChar(0) );
+
+ if( !nMatchLen || aMatchName.CompareTo( aTitle, nMatchLen ) == COMPARE_EQUAL )
+ {
+ // all names fit if matchstring is empty
+ INetURLObject aObj( aURL );
+ if ( bIsFolder )
+ aObj.setFinalSlash();
+ String aMatch = aObj.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET );
+ if ( nMatchLen )
+ aMatch.Erase( 0, nMatchLen );
+ Insert( aMatch, aObj.GetMainURL(), TRUE );
+ }
+ }
+}
+
+void SfxMatchContext_Impl::run()
+{
+ ::vos::OGuard aGuard( GetMutex() );
+
+ // Reset match lists
+ aCompletions.Remove( 0, aCompletions.Count() );
+ aURLs.Remove( 0, aURLs.Count() );
+
+ // check for input
+ USHORT nTextLen = aText.Len();
+ if ( !nTextLen )
+ return;
+
+ if( aText.Search( '*' ) != STRING_NOTFOUND || aText.Search( '?' ) != STRING_NOTFOUND )
+ // no autocompletion for wildcards
+ return;
+
+ String aMatch( aText );
+ INetURLObject aURLObject( aMatch, INET_PROT_FILE );
+ INetProtocol eProt = INetURLObject::CompareProtocolScheme( aText );
+ INetProtocol eSmartProt = pBox->GetSmartProtocol();
+
+ // check if it is or may be file protocol
+ if( !aURLObject.HasError() && ( eProt == INET_PROT_FILE || eProt == INET_PROT_NOT_VALID ) && ( eSmartProt == INET_PROT_FILE || eSmartProt == INET_PROT_NOT_VALID ) )
+ {
+ // not stopped yet ?
+ if( schedule() )
+ {
+ USHORT nPos = aText.Search( ':' );
+ if( nPos != STRING_NOTFOUND && ( nPos != 1 || aText.Len() < 3 || aText.GetChar( 2 ) != '\\' ) )
+ // cannot be handled correctly by generic URLObject
+ return;
+
+ if( aBaseURL.Len() )
+ {
+ // if a base URL is set the string may be parsed relative
+ if( aText.Search( '/' ) == 0 )
+ {
+ // text starting with slashes means absolute file URLs
+ String aTmp = String::CreateFromAscii( "file://" );
+ aTmp += aMatch;
+ aURLObject.SetURL( aTmp );
+ aMatch = aTmp;
+ }
+ else
+ {
+ INetURLObject aObj( aBaseURL );
+ if( aText.Search( '\\' ) == 0 )
+ {
+ // cut to first segment
+ String aTmp = String::CreateFromAscii( "file:///" );
+ aTmp += aObj.getName( 0, true, INetURLObject::DECODE_WITH_CHARSET );
+ aObj.SetURL( aTmp );
+ aMatch.Erase(0,1);
+ }
+
+ // base URL must be a directory !
+ aObj.setFinalSlash();
+
+ // take base URL and append current input
+ bool bWasAbsolute = FALSE;
+ INetURLObject aTmp( aObj.smartRel2Abs( aMatch, bWasAbsolute ) );
+ if ( aText.GetChar( aText.Len() - 1 ) == '.' )
+ // INetURLObject appends a final slash for the directories "." and "..", this is a bug!
+ // Remove it as a workaround
+ aTmp.removeFinalSlash();
+
+ aMatch = aTmp.GetMainURL();
+ aURLObject.SetURL( aMatch );
+ }
+ }
+
+ // if text input is a directory, it must be part of the match list! Until then it is scanned
+ if ( SfxContentHelper::IsFolder( aURLObject.GetMainURL()) && aURLObject.hasFinalSlash() )
+ Insert( String(), aMatch );
+ else
+ // otherwise the parent folder will be taken
+ aURLObject.removeSegment();
+
+ // scan directory and insert all matches
+ ReadFolder( aURLObject.GetMainURL(), aMatch );
+ }
+ }
+
+ if ( bOnlyDirectories )
+ // don't scan history picklist if only directories are allowed, picklist contains only files
+ return;
+
+ BOOL bFull = FALSE;
+ int nCount = aPickList.Count();
+
+ INetURLObject aCurObj;
+ String aEmpty, aCurString, aCurMainURL;
+ INetURLObject aObj;
+ aObj.SetSmartProtocol( eSmartProt == INET_PROT_NOT_VALID ? INET_PROT_HTTP : eSmartProt );
+ for( ;; )
+ {
+ for( USHORT nPos = 0; schedule() && nPos < nCount; nPos++ )
+ {
+ aCurObj.SetURL( *aPickList.GetObject( nPos ) );
+ aCurObj.SetSmartURL( aCurObj.GetURLNoPass());
+ aCurMainURL = aCurObj.GetMainURL();
+ if( eProt != INET_PROT_NOT_VALID && aCurObj.GetProtocol() != eProt )
+ continue;
+
+ if( eSmartProt != INET_PROT_NOT_VALID && aCurObj.GetProtocol() != eSmartProt )
+ continue;
+
+ switch( aCurObj.GetProtocol() )
+ {
+ case INET_PROT_HTTP:
+ case INET_PROT_HTTPS:
+ case INET_PROT_FTP:
+ {
+ // Wenn schon mehr, als der Pfad da ist, kein kurzes Matchen
+ if( eProt == INET_PROT_NOT_VALID && !bFull )
+ {
+ aObj.SetSmartURL( aText );
+ if( aObj.GetURLPath().Len() > 1 )
+ continue;
+ }
+
+ aCurString = aCurMainURL;
+ if( eProt == INET_PROT_NOT_VALID )
+ {
+ // try if text matches the scheme
+ String aScheme( INetURLObject::GetScheme( aCurObj.GetProtocol() ) );
+ if ( aText.CompareTo( aScheme, aText.Len() ) == COMPARE_EQUAL && aText.Len() < aScheme.Len() )
+ {
+ if( bFull )
+ aMatch = aCurObj.GetMainURL();
+ else
+ {
+ aCurObj.SetMark( aEmpty );
+ aCurObj.SetParam( aEmpty );
+ aCurObj.SetURLPath( aEmpty );
+ aMatch = aCurObj.GetMainURL();
+ }
+
+ String aTmp( aMatch );
+ aTmp.Erase( 0, aText.Len() );
+ Insert( aTmp, aMatch );
+ }
+
+ // now try smart matching
+ aCurString.Erase( 0, aScheme.Len() );
+ }
+
+ if( aText.CompareTo( aCurString, aText.Len() )== COMPARE_EQUAL )
+ {
+ if( bFull )
+ aMatch = aCurObj.GetMainURL();
+ else
+ {
+ aCurObj.SetMark( aEmpty );
+ aCurObj.SetParam( aEmpty );
+ aCurObj.SetURLPath( aEmpty );
+ aMatch = aCurObj.GetMainURL();
+ }
+
+ String aURL( aMatch );
+ if( eProt == INET_PROT_NOT_VALID )
+ aMatch.Erase( 0, INetURLObject::GetScheme( aCurObj.GetProtocol() ).Len() );
+
+ if( aText.Len() < aMatch.Len() )
+ {
+ String aTmp( aMatch );
+ aTmp.Erase( 0, aText.Len() );
+ Insert( aTmp, aURL );
+ }
+
+ continue;
+ }
+ break;
+ }
+ default:
+ {
+ // Dateien matchen sofort den gesamten Namen
+ if( bFull )
+ continue;
+
+ if( aText.CompareTo( aCurMainURL, aText.Len() ) == COMPARE_EQUAL )
+ {
+ if( aText.Len() < aCurMainURL.Len() )
+ {
+ String aTmp( aCurMainURL );
+ aTmp.Erase( 0, aText.Len() );
+ Insert( aTmp, aCurMainURL );
+ }
+
+ continue;
+ }
+/* // PathToFileName is forbidden for generic parsing !
+ if( eProt == INET_PROT_NOT_VALID )
+ {
+ // Noch keine erkennbares Protocol
+ // Bei File-Protocol auch als Pfadname versuchen
+ if( aCurObj.GetProtocol() == INET_PROT_FILE &&
+ aText.CompareTo( aCurObj.PathToFileName(), aText.Len() ) == COMPARE_EQUAL )
+ {
+ if( aText.Len() < aCurObj.PathToFileName().Len() )
+ {
+ String aTmp( aCurObj.PathToFileName() );
+ aTmp.Erase( 0, aText.Len() );
+ Insert( aTmp, aCurMainURL );
+ }
+ }
+ }
+*/
+ break;
+ }
+ }
+ }
+
+ if( !bFull )
+ bFull = TRUE;
+ else
+ break;
+ }
+
+ return;
+}
+
+void SfxMatchContext_Impl::onTerminated( )
+{
+ aLink.CreateMutex();
+ aLink.Call( this );
+}
+
+void SfxURLBox::TryAutoComplete( BOOL bForward, BOOL bForce )
+{
+ if( Application::AnyInput( INPUT_KEYBOARD ) ) return;
+
+ String aMatchString;
+ String aCurText = GetText();
+ Selection aSelection( GetSelection() );
+ if( aSelection.Max() != aCurText.Len() && !bForce )
+ return;
+ USHORT nLen = (USHORT)aSelection.Min();
+ aCurText.Erase( nLen );
+ if( aCurText.Len() )
+ pCtx = new SfxMatchContext_Impl( this, aCurText, bForward );
+}
+
+SfxURLBox::SfxURLBox( Window* pParent, INetProtocol eSmart )
+ : ComboBox( pParent , WB_DROPDOWN | WB_AUTOSIZE | WB_AUTOHSCROLL ),
+ bTryAutoComplete( FALSE ),
+ bAutoCompleteMode( FALSE ),
+ bOnlyDirectories( FALSE ),
+ bCtrlClick( FALSE ),
+ pCtx( 0 ),
+ eSmartProtocol( eSmart )
+{
+ SetHelpId( SID_OPENURL );
+ EnableAutocomplete( FALSE );
+ EnableDrop();
+ if ( GetDesktopRectPixel().GetWidth() > 800 )
+ SetSizePixel( Size( 300, 240 ) );
+ else
+ SetSizePixel( Size( 225, 240 ) );
+ SetText( String() );
+
+ GetSubEdit()->SetAutocompleteHdl( LINK( this, SfxURLBox, AutoCompleteHdl_Impl ) );
+ UpdatePicklistForSmartProtocol_Impl();
+}
+
+void SfxURLBox::SetSmartProtocol( INetProtocol eProt )
+{
+ if ( eSmartProtocol != eProt )
+ {
+ eSmartProtocol = eProt;
+ UpdatePicklistForSmartProtocol_Impl();
+ }
+}
+
+void SfxURLBox::UpdatePicklistForSmartProtocol_Impl()
+{
+ Clear();
+ SfxPickList_Impl* pPickList = SfxPickList_Impl::Get();
+ const ULONG nCount = pPickList->HistoryPickEntryCount();
+ INetURLObject aCurObj;
+ for( USHORT nPos = 0; nPos < nCount; nPos++ )
+ {
+ String aEntry = pPickList->GetHistoryPickEntry( nPos )->aTitle;
+ if ( eSmartProtocol != INET_PROT_NOT_VALID )
+ {
+ aCurObj.SetURL( aEntry );
+ if( aCurObj.GetProtocol() != eSmartProtocol )
+ continue;
+ }
+
+ InsertEntry( aEntry );
+ }
+}
+
+// **************************************************************************
+
+BOOL SfxURLBox::QueryDrop( DropEvent &rEvt )
+{
+ return SFX_APP()->QueryDrop( rEvt );
+}
+
+// **************************************************************************
+
+BOOL SfxURLBox::Drop( const DropEvent &rEvt )
+{
+ return SFX_APP()->Drop( (DropEvent&) rEvt );
+}
+
+// **************************************************************************
+
+void SfxURLBox::OpenURL( SfxPickEntry_Impl* pEntry, const String& rName, BOOL bNew ) const
+{
+ String aName;
+ String aFilter;
+ String aOptions;
+ if ( pEntry )
+ {
+ aName = pEntry->aName;
+ String aFilter = pEntry->aFilter;
+ USHORT nPos = aFilter.Search( '|' );
+ if( nPos != STRING_NOTFOUND )
+ {
+ aOptions = aFilter.Copy( nPos + 1 );
+ aFilter.Erase( nPos + 1 );
+ }
+ }
+ else
+ {
+ if ( rName.CompareToAscii( "vnd.sun.star.webdav:", 20 ) == 0 )
+ {
+ aName = String::CreateFromAscii("http:");
+ aName += rName.Copy(20);
+ }
+ else
+ aName = URIHelper::SmartRelToAbs( rName );
+ }
+
+ SfxStringItem aUrl( SID_FILE_NAME, aName );
+ SfxViewFrame *pViewFrame = bNew ? 0 : SfxViewFrame::Current();
+ if ( pViewFrame )
+ pViewFrame = pViewFrame->GetTopViewFrame();
+ SfxFrameItem aView( SID_DOCFRAME , pViewFrame ? pViewFrame->GetFrame() : 0 );
+ SfxBoolItem aBrowsing( SID_BROWSING, TRUE );
+ SfxStringItem aReferer( SID_REFERER, DEFINE_CONST_UNICODE(SFX_REFERER_USER) );
+ SfxStringItem aFilterItem( SID_FILTER_NAME, aFilter );
+ SfxStringItem aOptionItem( SID_FILE_FILTEROPTIONS, aOptions );
+
+ const SfxPoolItem* pFilterItem = NULL;
+ const SfxPoolItem* pOptionItem = NULL;
+
+ if ( aFilter.Len() )
+ {
+ pFilterItem = &aFilterItem;
+ pOptionItem = &aOptionItem;
+ }
+
+ SFX_APP()->GetAppDispatcher_Impl()->Execute( SID_OPENURL, SFX_CALLMODE_RECORD, &aUrl, &aBrowsing, &aReferer, &aView,
+ pFilterItem, pOptionItem, 0L );
+}
+
+// **************************************************************************
+
+BOOL SfxURLBox::ProcessKey( const KeyCode& rKey )
+{
+ // laufende Completion abbrechen
+ if( pCtx )
+ {
+ pCtx->Stop();
+ pCtx = 0;
+ }
+
+ KeyCode aCode( rKey.GetCode() );
+ if ( aCode == KEY_RETURN && GetText().Len() )
+ {
+ // warten bis Thread beendet (OS/2 stuerzt uns sonst ab...)
+ ::vos::OGuard aGuard( SfxMatchContext_Impl::GetMutex() );
+
+ if ( bAutoCompleteMode )
+ {
+ bAutoCompleteMode = FALSE;
+ Selection aSelection( GetSelection() );
+ SetSelection( Selection( aSelection.Min(), aSelection.Min() ) );
+ if ( bOnlyDirectories )
+ Clear();
+ else
+ UpdatePicklistForSmartProtocol_Impl();
+ Resize();
+ }
+
+ String aInput = GetText();
+ aInput.EraseLeadingChars();
+ aInput.EraseTrailingChars();
+
+ bCtrlClick = rKey.IsMod1();
+ BOOL bHandled = FALSE;
+ if ( GetOpenHdl().IsSet() )
+ {
+ bHandled = TRUE;
+ GetOpenHdl().Call(this);
+ }
+ else if ( GetSelectHdl().IsSet() )
+ {
+ bHandled = TRUE;
+ GetSelectHdl().Call(this);
+ }
+
+ bCtrlClick = FALSE;
+
+ ClearModifyFlag();
+ return bHandled;
+ }
+ else if ( aCode == KEY_RETURN && !GetText().Len() && GetOpenHdl().IsSet() )
+ {
+ // FileDialog: LeerString + Enter behandeln
+ bAutoCompleteMode = FALSE;
+ GetOpenHdl().Call(this);
+ return TRUE;
+ }
+ else if( aCode == KEY_ESCAPE )
+ {
+ Selection aSelection( GetSelection() );
+ if ( bAutoCompleteMode || aSelection.Min() != aSelection.Max() )
+ {
+ SetSelection( Selection( aSelection.Min(), aSelection.Min() ) );
+ if ( bOnlyDirectories )
+ Clear();
+ else
+ UpdatePicklistForSmartProtocol_Impl();
+ Resize();
+ }
+ else if ( Application::IsInModalMode() )
+ {
+ return FALSE;
+ }
+ else
+ {
+ SfxViewFrame* pFrm = SfxViewFrame::Current();
+ if( pFrm )
+ pFrm->GetTopViewFrame()->GetFrame()->GrabFocusOnComponent_Impl();
+ }
+
+ bAutoCompleteMode = FALSE;
+ return TRUE;
+ }
+ else
+ {
+ return FALSE;
+ }
+}
+
+// **************************************************************************
+
+void SfxURLBox::Modify()
+{
+ ComboBox::Modify();
+}
+
+// **************************************************************************
+
+long SfxURLBox::PreNotify( NotifyEvent& rNEvt )
+{
+ if( rNEvt.GetWindow() == GetSubEdit() && rNEvt.GetType() == EVENT_KEYINPUT )
+ {
+ const KeyEvent& rEvent = *rNEvt.GetKeyEvent();
+ const KeyCode& rKey = rEvent.GetKeyCode();
+ KeyCode aCode( rKey.GetCode() );
+ if( ProcessKey( rKey ) )
+ {
+ return TRUE;
+ }
+ else if( ( aCode == KEY_UP || aCode == KEY_DOWN ) && !rKey.IsMod2() )
+ {
+ Selection aSelection( GetSelection() );
+ USHORT nLen = (USHORT)aSelection.Min();
+ GetSubEdit()->KeyInput( rEvent );
+ SetSelection( Selection( nLen, GetText().Len() ) );
+ return TRUE;
+ }
+ }
+
+ return ComboBox::PreNotify( rNEvt );
+}
+
+IMPL_LINK( SfxURLBox, AutoCompleteHdl_Impl, void*, pVoid )
+{
+ if ( GetSubEdit()->GetAutocompleteAction() == AUTOCOMPLETE_KEYINPUT )
+ {
+ TryAutoComplete( TRUE, FALSE );
+ return 1L;
+ }
+
+ return 0L;
+}
+
+// **************************************************************************
+
+long SfxURLBox::Notify( NotifyEvent &rEvt )
+/*
+ [Beschreibung]
+ Aktualisierung der Combobox mit dem aktuellen Picklisteninhalt
+*/
+{
+ if ( EVENT_GETFOCUS == rEvt.GetType() )
+ {
+ SetSelection( Selection( 0, GetText().Len() ) );
+ }
+ else if ( EVENT_LOSEFOCUS == rEvt.GetType() )
+ {
+ if( !GetText().Len() )
+ ClearModifyFlag();
+ if ( pCtx )
+ {
+ pCtx->Stop();
+ pCtx = 0;
+ }
+ }
+
+ return ComboBox::Notify( rEvt );
+}
+
+// **************************************************************************
+
+void SfxURLBox::Select()
+/*
+ [Beschreibung]
+ Die Methode laedt das selektierte Element ein.
+*/
+{
+ ComboBox::Select();
+ ClearModifyFlag();
+}
+
+// **************************************************************************
+
+void SfxURLBox::SetOnlyDirectories( BOOL bDir )
+
+/* [Beschreibung]
+
+ Die Methode setzt das Flag, ob nur auf Verzeichnisse ergnzt werden soll.
+ Wenn das Flag auf TRUE gesetzt wird, wird die Liste gel"oscht.
+*/
+
+{
+ bOnlyDirectories = bDir;
+ if ( bOnlyDirectories )
+ Clear();
+}
+
+//***************************************************************************
+// SfxURLToolBoxControl_Impl
+//***************************************************************************
+
+SFX_IMPL_TOOLBOX_CONTROL(SfxURLToolBoxControl_Impl,SfxStringItem)
+
+SfxURLToolBoxControl_Impl::SfxURLToolBoxControl_Impl( USHORT nId ,
+ ToolBox& rBox ,
+ SfxBindings& rBindings )
+ : SfxToolBoxControl( nId , rBox , rBindings )
+ , aURLForwarder( SID_CURRENT_URL, *this )
+{
+// Application::EnterMultiThread();
+}
+
+SfxURLBox* SfxURLToolBoxControl_Impl::GetURLBox() const
+{
+ return (SfxURLBox*) GetToolBox().GetItemWindow(GetId());
+}
+
+//***************************************************************************
+
+Window* SfxURLToolBoxControl_Impl::CreateItemWindow( Window* pParent )
+{
+ DBG_ASSERT( pParent , "CreateItemWindow:invalider Parentpointer" );
+
+ SfxURLBox* pURLBox = new SfxURLBox( pParent );
+ pURLBox->SetOpenHdl( LINK( this, SfxURLToolBoxControl_Impl, OpenHdl ) );
+ pURLBox->SetSelectHdl( LINK( this, SfxURLToolBoxControl_Impl, SelectHdl ) );
+
+ DBG_ASSERT( pURLBox , "CreateItemWindow:Itemwindow nicht erstellt" );
+ return pURLBox;
+}
+
+IMPL_LINK( SfxURLToolBoxControl_Impl, SelectHdl, void*, pVoid )
+{
+ SfxURLBox* pURLBox = GetURLBox();
+ String aName( pURLBox->GetText() );
+
+ if ( !pURLBox->IsTravelSelect() && aName.Len() )
+ {
+ aName = URIHelper::SmartRelToAbs( aName );
+ SfxPickList_Impl* pPickList = SfxPickList_Impl::Get();
+ SfxPickEntry_Impl* pEntry = pPickList->GetHistoryPickEntryFromTitle( aName );
+ if ( !pEntry )
+ pPickList->SetCurHistoryPos( pURLBox->GetEntryPos( aName ) );
+ pURLBox->OpenURL( pEntry, aName, FALSE );
+ }
+
+ return 1L;
+}
+
+IMPL_LINK( SfxURLToolBoxControl_Impl, OpenHdl, void*, pVoid )
+{
+ SfxURLBox* pURLBox = GetURLBox();
+ SfxPickEntry_Impl* pEntry = SfxPickList_Impl::Get()->GetHistoryPickEntryFromTitle( pURLBox->GetText() );
+ pURLBox->OpenURL( pEntry, pURLBox->GetText(), pURLBox->IsCtrlOpen() );
+ SfxViewFrame* pFrm = SfxViewFrame::Current();
+ if( pFrm )
+ pFrm->GetFrame()->GrabFocusOnComponent_Impl();
+ return 1L;
+}
+
+//***************************************************************************
+
+void SfxURLToolBoxControl_Impl::StateChanged
+(
+ USHORT nSID,
+ SfxItemState eState,
+ const SfxPoolItem* pState
+)
+
+/* [Beschreibung]
+
+ Hier wird die URL des aktiven Dokuments angezeigt.
+*/
+
+{
+ if( nSID == SID_FOCUSURLBOX )
+ {
+ if ( GetURLBox()->IsVisible() )
+ GetURLBox()->GrabFocus();
+ }
+ else if ( !GetURLBox()->IsModified() && SFX_ITEM_AVAILABLE == eState )
+ {
+ SfxURLBox* pURLBox = GetURLBox();
+
+ // in VCL hier die URLBox updaten
+ SfxPickList_Impl* pPickList = SfxPickList_Impl::Get();
+ DBG_ASSERT( pPickList , "Pickliste invalid" );
+ pURLBox->Clear();
+ const ULONG nPickEntryCount = pPickList->HistoryPickEntryCount();
+ ULONG nPickEntry;
+ for ( nPickEntry = 0; nPickEntry < nPickEntryCount; ++nPickEntry )
+ {
+ DBG_ASSERT( pPickList->GetHistoryPickEntry( nPickEntry ),
+ "Pickentry ist invalid" );
+ pURLBox->InsertEntry(
+ pPickList->GetHistoryPickEntry( nPickEntry )->aTitle );
+ }
+
+ const SfxStringItem *pURL = PTR_CAST(SfxStringItem,pState);
+ String aRep( pURL->GetValue() );
+ INetURLObject aURL( aRep );
+ INetProtocol eProt = aURL.GetProtocol();
+ if ( eProt == INET_PROT_FILE ||
+ eProt == INET_PROT_FTP ||
+ eProt == INET_PROT_NEWS ||
+ eProt == INET_PROT_POP3 ||
+ eProt == INET_PROT_IMAP ||
+ eProt == INET_PROT_OUT ||
+ eProt == INET_PROT_HTTP ||
+ eProt == INET_PROT_HTTPS )
+ pURLBox->SetText( aURL.GetURLNoPass() );
+ else
+ pURLBox->SetText( String() );
+ }
+}
+
+//***************************************************************************
+// SfxCancelToolBoxControl_Impl
+//***************************************************************************
+
+SFX_IMPL_TOOLBOX_CONTROL(SfxCancelToolBoxControl_Impl,SfxBoolItem)
+
+//***************************************************************************
+
+SfxCancelToolBoxControl_Impl::SfxCancelToolBoxControl_Impl
+(
+ USHORT nId,
+ ToolBox& rBox,
+ SfxBindings& rBindings
+)
+: SfxToolBoxControl( nId, rBox, rBindings )
+{
+}
+
+//***************************************************************************
+
+SfxPopupWindowType SfxCancelToolBoxControl_Impl::GetPopupWindowType() const
+{
+ return SFX_POPUPWINDOW_ONTIMEOUT;
+}
+
+//***************************************************************************
+
+SfxPopupWindow* SfxCancelToolBoxControl_Impl::CreatePopupWindow()
+{
+ // Menu erzeugen und mit allen cancellables fuellen
+ PopupMenu aMenu;
+ BOOL bExecute = FALSE, bSeparator = FALSE;
+ USHORT nIndex = 1;
+ for ( SfxCancelManager *pCancelMgr = SfxViewFrame::Current()->GetTopViewFrame()->GetCancelManager();
+ pCancelMgr;
+ pCancelMgr = pCancelMgr->GetParent() )
+ {
+ for ( USHORT n=0; n<pCancelMgr->GetCancellableCount(); ++n )
+ {
+ if ( !n && bSeparator )
+ {
+ aMenu.InsertSeparator();
+ bSeparator = FALSE;
+ }
+ String aItemText = pCancelMgr->GetCancellable(n)->GetTitle();
+ if ( aItemText.Len() > 50 )
+ {
+ aItemText.Erase( 48 );
+ aItemText += DEFINE_CONST_UNICODE("...");
+ }
+ aMenu.InsertItem( nIndex++, aItemText );
+ bExecute = TRUE;
+ bSeparator = TRUE;
+ }
+ }
+
+ // Menu ausfuehren
+ ToolBox& rToolBox = GetToolBox();
+ USHORT nId = bExecute ? nId = aMenu.Execute( &rToolBox, rToolBox.GetPointerPosPixel() ) : 0;
+ GetToolBox().EndSelection();
+ ClearCache();
+ UpdateSlot();
+ if ( nId )
+ {
+ // den selektierten canceln
+ String aSearchText = aMenu.GetItemText(nId);
+ for ( SfxCancelManager *pCancelMgr = SfxViewFrame::Current()->GetTopViewFrame()->GetCancelManager();
+ pCancelMgr;
+ pCancelMgr = pCancelMgr->GetParent() )
+ {
+ for ( USHORT n = 0; n < pCancelMgr->GetCancellableCount(); ++n )
+ {
+ SfxCancellable *pCancel = pCancelMgr->GetCancellable(n);
+ String aItemText = pCancel->GetTitle();
+ if ( aItemText.Len() > 50 )
+ {
+ aItemText.Erase( 48 );
+ aItemText += DEFINE_CONST_UNICODE("...");
+ }
+
+ if ( aItemText == aSearchText )
+ {
+ pCancel->Cancel();
+ return 0;
+ }
+ }
+ }
+
+ }
+
+ return 0;
+}
+
+//***************************************************************************
+
+void SfxCancelToolBoxControl_Impl::StateChanged
+(
+ USHORT nSID,
+ SfxItemState eState,
+ const SfxPoolItem* pState
+)
+
+/* [Beschreibung]
+
+ Hier wird angezeigt, ob cancelbare Jobs laufen.
+*/
+
+{
+ SfxVoidItem aVoidItem( nSID );
+ //SfxToolBoxControl::StateChanged( nSID, eState, pState ? &aVoidItem : 0 );
+ SfxToolBoxControl::StateChanged( nSID, eState, pState );
+}
+
+
diff --git a/sfx2/source/inet/makefile.mk b/sfx2/source/inet/makefile.mk
new file mode 100644
index 000000000000..1eaf30fdcffa
--- /dev/null
+++ b/sfx2/source/inet/makefile.mk
@@ -0,0 +1,98 @@
+#*************************************************************************
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.1.1.1 $
+#
+# last change: $Author: hr $ $Date: 2000-09-18 16:52:35 $
+#
+# The Contents of this file are made available subject to the terms of
+# either of the following licenses
+#
+# - GNU Lesser General Public License Version 2.1
+# - Sun Industry Standards Source License Version 1.1
+#
+# Sun Microsystems Inc., October, 2000
+#
+# GNU Lesser General Public License Version 2.1
+# =============================================
+# Copyright 2000 by Sun Microsystems, Inc.
+# 901 San Antonio Road, Palo Alto, CA 94303, USA
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License version 2.1, as published by the Free Software Foundation.
+#
+# This library 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 for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+#
+# Sun Industry Standards Source License Version 1.1
+# =================================================
+# The contents of this file are subject to the Sun Industry Standards
+# Source License Version 1.1 (the "License"); You may not use this file
+# except in compliance with the License. You may obtain a copy of the
+# License at http://www.openoffice.org/license.html.
+#
+# Software provided under this License is provided on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+# See the License for the specific provisions governing your rights and
+# obligations concerning the Software.
+#
+# The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+#
+# Copyright: 2000 by Sun Microsystems, Inc.
+#
+# All Rights Reserved.
+#
+# Contributor(s): _______________________________________
+#
+#
+#
+#*************************************************************************
+
+PRJ=..$/..
+
+PRJNAME=sfx2
+TARGET=inet
+ENABLE_EXCEPTIONS=TRUE
+.INCLUDE : $(PRJ)$/util$/makefile.pmk
+AUTOSEG=true
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : svpre.mk
+.INCLUDE : settings.mk
+.INCLUDE : sv.mk
+
+# w.g. compilerbugs
+#!IF "$(GUI)"=="WNT"
+#CFLAGS=$(CFLAGS) -Od
+#!ENDIF
+
+
+# --- Files --------------------------------------------------------
+
+CXXFILES = \
+ inettbc.cxx \
+ inetslot.cxx \
+ $(PROJECTPCHSOURCE).cxx
+
+
+SLOFILES = \
+ $(SLO)$/inettbc.obj \
+ $(SLO)$/inetslot.obj
+
+# --- Targets -------------------------------------------------------
+
+.INCLUDE : target.mk
+
diff --git a/sfx2/source/menu/makefile.mk b/sfx2/source/menu/makefile.mk
new file mode 100644
index 000000000000..cdd44c5d0c1f
--- /dev/null
+++ b/sfx2/source/menu/makefile.mk
@@ -0,0 +1,106 @@
+#*************************************************************************
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.1.1.1 $
+#
+# last change: $Author: hr $ $Date: 2000-09-18 16:52:35 $
+#
+# The Contents of this file are made available subject to the terms of
+# either of the following licenses
+#
+# - GNU Lesser General Public License Version 2.1
+# - Sun Industry Standards Source License Version 1.1
+#
+# Sun Microsystems Inc., October, 2000
+#
+# GNU Lesser General Public License Version 2.1
+# =============================================
+# Copyright 2000 by Sun Microsystems, Inc.
+# 901 San Antonio Road, Palo Alto, CA 94303, USA
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License version 2.1, as published by the Free Software Foundation.
+#
+# This library 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 for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+#
+# Sun Industry Standards Source License Version 1.1
+# =================================================
+# The contents of this file are subject to the Sun Industry Standards
+# Source License Version 1.1 (the "License"); You may not use this file
+# except in compliance with the License. You may obtain a copy of the
+# License at http://www.openoffice.org/license.html.
+#
+# Software provided under this License is provided on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+# See the License for the specific provisions governing your rights and
+# obligations concerning the Software.
+#
+# The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+#
+# Copyright: 2000 by Sun Microsystems, Inc.
+#
+# All Rights Reserved.
+#
+# Contributor(s): _______________________________________
+#
+#
+#
+#*************************************************************************
+
+PRJ=..$/..
+
+
+PRJNAME=sfx2
+TARGET=menu
+ENABLE_EXCEPTIONS=TRUE
+.INCLUDE : $(PRJ)$/util$/makefile.pmk
+AUTOSEG=true
+
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : svpre.mk
+.INCLUDE : settings.mk
+.INCLUDE : sv.mk
+
+# --- ImageList ----------------------------------------------------
+
+IMGLST_SRS=$(SRS)$/menu.srs
+BMP_IN=$(PRJ)$/win/res
+
+# --- Files --------------------------------------------------------
+
+CXXFILES = \
+ bmkmenu.cxx \
+ mnumgr.cxx \
+ virtmenu.cxx \
+ mnuitem.cxx \
+ objmnctl.cxx \
+ $(PROJECTPCHSOURCE).cxx
+
+SRCFILES = menu.src
+
+SLOFILES = \
+ $(SLO)$/bmkmenu.obj \
+ $(SLO)$/mnumgr.obj \
+ $(SLO)$/virtmenu.obj \
+ $(SLO)$/objmnctl.obj \
+ $(SLO)$/mnuitem.obj
+
+# --- Tagets -------------------------------------------------------
+
+.INCLUDE : target.mk
+
diff --git a/sfx2/source/menu/menu.hrc b/sfx2/source/menu/menu.hrc
new file mode 100644
index 000000000000..60dfa45c6f52
--- /dev/null
+++ b/sfx2/source/menu/menu.hrc
@@ -0,0 +1,103 @@
+/*************************************************************************
+ *
+ * $RCSfile: menu.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:35 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _MNUCFG_HRC
+#define _MNUCFG_HRC
+
+#include "sfx.hrc"
+
+// #defines *****************************************************************
+
+#define DLG_MENUCONFIG (RID_SFX_MENU_START+1)
+#define IBX_MNUCFG_ALREADY_INCLUDED (RID_SFX_MENU_START+2)
+#define QBX_MNUCFG_UNDEFINED_FUNCTIONS (RID_SFX_MENU_START+3)
+#define QBX_MNUCFG_POPUP_FUNCTIONS (RID_SFX_MENU_START+4)
+#define RID_IMGLST_SMALL (RID_SFX_MENU_START+5)
+#define RID_IMGLST_BIG (RID_SFX_MENU_START+6)
+
+#define BTN_OK 1
+#define BTN_CANCEL 2
+#define BTN_UP 3
+#define BTN_LEFT 4
+#define BTN_RIGHT 5
+#define BTN_DOWN 6
+#define BTN_NEW 7
+#define BTN_CHANGE 8
+#define BTN_REMOVE 9
+#define BOX_ENTRIES 10
+#define TXT_TEXT 11
+#define EDT_TEXT 12
+#define TXT_FUNCTIONTEXT 13
+#define TXT_FUNCTIONINFO 14
+#define TXT_DESCRIPTIONTEXT 15
+#define TXT_DESCRIPTIONINFO 16
+#define GRP_MENU 17
+#define TXT_GROUP 18
+#define BOX_GROUP 19
+#define TXT_FUNCTION 20
+#define BOX_FUNCTION 21
+#define GRP_FUNCTIONS 22
+
+#define STR_MENU_CFGITEM RID_SFX_MENU_START+1
+
+#define MN_CLIPBOARDFUNCS RID_SFX_MENU_START+1
+#endif
+
diff --git a/sfx2/source/menu/menu.src b/sfx2/source/menu/menu.src
new file mode 100644
index 000000000000..8540af820d95
--- /dev/null
+++ b/sfx2/source/menu/menu.src
@@ -0,0 +1,344 @@
+/*************************************************************************
+ *
+ * $RCSfile: menu.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:35 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include "menu.hrc"
+#include "cntimage.hrc"
+
+String STR_MENU_CFGITEM
+{
+ TEXT = "Men" ;
+ TEXT [ English ] = "Menu" ;
+ TEXT [ norwegian ] = "Konfigurasjonsmeny" ;
+ TEXT [ italian ] = "Menu" ;
+ TEXT [ portuguese_brazilian ] = "Menu de Configurao" ;
+ TEXT [ portuguese ] = "Menu de configurao" ;
+ TEXT [ finnish ] = "Mritysvalikko" ;
+ TEXT [ danish ] = "Menu" ;
+ TEXT [ french ] = "Menu" ;
+ TEXT [ swedish ] = "Meny" ;
+ TEXT [ dutch ] = "Menu" ;
+ TEXT [ spanish ] = "Men" ;
+ TEXT [ english_us ] = "Configuration Menu" ;
+ TEXT[ chinese_simplified ] = "˵";
+ TEXT[ russian ] = "";
+ TEXT[ polish ] = "Menu";
+ TEXT[ japanese ] = "ƭ";
+ TEXT[ chinese_traditional ] = "\\";
+ TEXT[ arabic ] = "";
+ TEXT[ dutch ] = "Menu";
+ TEXT[ chinese_simplified ] = "˵";
+ TEXT[ greek ] = "";
+ TEXT[ korean ] = "޴";
+ TEXT[ turkish ] = "Mn";
+};
+
+Menu MN_CLIPBOARDFUNCS
+{
+ ItemList =
+ {
+ MenuItem
+ {
+ Identifier = SID_CUT ;
+ HelpID = SID_CUT ;
+ Text = "~Ausschneiden" ;
+ Text [ English ] = "Cu~t" ;
+ Text [ norwegian ] = "Klipp~ut" ;
+ Text [ italian ] = "Ta~glia" ;
+ Text [ portuguese_brazilian ] = "Co~rtar" ;
+ Text [ portuguese ] = "Co~rtar" ;
+ Text [ finnish ] = "~Leikkaa" ;
+ Text [ danish ] = "~Klip" ;
+ Text [ french ] = "~Couper" ;
+ Text [ swedish ] = "~Klipp ut" ;
+ Text [ dutch ] = "Kn~ippen" ;
+ Text [ spanish ] = "C~ortar" ;
+ Text [ english_us ] = "Cu~t" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "~Wytnij";
+ Text[ japanese ] = "؂(~T)";
+ Text[ chinese_traditional ] = "ŤU(~T)";
+ Text[ arabic ] = "";
+ Text[ dutch ] = "Kn~ippen";
+ Text[ chinese_simplified ] = "";
+ Text[ greek ] = "~";
+ Text[ korean ] = "߶ (~T)";
+ Text[ turkish ] = "Kes";
+ };
+ MenuItem
+ {
+ Identifier = SID_COPY ;
+ HelpID = SID_COPY ;
+ Text = "~Kopieren" ;
+ Text [ English ] = "~Copy" ;
+ Text [ norwegian ] = "~Kopier" ;
+ Text [ italian ] = "~Copia" ;
+ Text [ portuguese_brazilian ] = "~Copiar" ;
+ Text [ portuguese ] = "~Copiar" ;
+ Text [ finnish ] = "~Kopioi" ;
+ Text [ danish ] = "K~opier" ;
+ Text [ french ] = "Co~pier" ;
+ Text [ swedish ] = "K~opiera" ;
+ Text [ dutch ] = "~Kopiren" ;
+ Text [ spanish ] = "~Copiar" ;
+ Text [ english_us ] = "~Copy" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "~Kopiuj";
+ Text[ japanese ] = "߰(~C)";
+ Text[ chinese_traditional ] = "ƻs(~C)";
+ Text[ arabic ] = "";
+ Text[ dutch ] = "~Kopiren";
+ Text[ chinese_simplified ] = "";
+ Text[ greek ] = "~";
+ Text[ korean ] = "(~C)";
+ Text[ turkish ] = "Kopyala";
+ };
+ MenuItem
+ {
+ Identifier = SID_PASTE ;
+ HelpID = SID_PASTE ;
+ Text = "E~infgen" ;
+ Text [ English ] = "~Paste" ;
+ Text [ norwegian ] = "~Paste" ;
+ Text [ italian ] = "~Incolla" ;
+ Text [ portuguese_brazilian ] = "~Colar" ;
+ Text [ portuguese ] = "Co~lar" ;
+ Text [ finnish ] = "L~iit" ;
+ Text [ danish ] = "St i~nd" ;
+ Text [ french ] = "C~oller" ;
+ Text [ swedish ] = "K~listra in" ;
+ Text [ dutch ] = "~Plakken" ;
+ Text [ spanish ] = "~Pegar" ;
+ Text [ english_us ] = "~Paste" ;
+ Text[ russian ] = "";
+ Text[ polish ] = "~Wklej";
+ Text[ japanese ] = "\\t(~P)";
+ Text[ chinese_simplified ] = "(~P)";
+ Text[ chinese_traditional ] = "J(~P)";
+ Text[ arabic ] = "";
+ Text[ dutch ] = "~Plakken";
+ Text[ chinese_simplified ] = "(~P)";
+ Text[ greek ] = "~";
+ Text[ korean ] = "ٿ ֱ(~P)";
+ Text[ turkish ] = "Yaptr";
+ };
+ };
+};
+
+#define CNT_IMAGELIST \
+ CNT_IMG_CHECKMARK ; \
+ CNT_IMG_OPENED_FOLDER ; \
+ CNT_IMG_CLOSED_FOLDER ; \
+ CNT_IMG_IS_READ ; \
+ CNT_IMG_IS_UNREAD ; \
+ CNT_IMG_IS_MARKED ; \
+ CNT_IMG_IS_UNMARKED ; \
+ CNT_IMG_BOX_POP3 ; \
+ CNT_IMG_DOC_NEWS ; \
+ CNT_IMG_FOLDER_NEWS ; \
+ CNT_IMG_FOLDER_SEARCH ; \
+ CNT_IMG_BOX_NEWS ; \
+ CNT_IMG_DOC_NEWS_READ ; \
+ CNT_IMG_FOLDER_NEWS_SUBSCR ; \
+ CNT_IMG_DOC_POP3 ; \
+ CNT_IMG_DOC_POP3_READ ; \
+ CNT_IMG_BOX_TRASH ; \
+ CNT_IMG_DOC_OUT_COMPLETE_LOC_SENT ; \
+ CNT_IMG_DOC_OUT_PART_LOC_SENT ; \
+ CNT_IMG_DOC_OUT_WRITTEN ; \
+ CNT_IMG_DOC_OUT_RECOV_LOC_ERROR ; \
+ CNT_IMG_DOC_OUT_NONRECOV_LOC_ERROR ; \
+ CNT_IMG_DOC_OUT_EXT_ERROR ; \
+ CNT_IMG_DOC_OUT_CONFIRMED ; \
+ CNT_IMG_BOX_IMAP ; \
+ CNT_IMG_FOLDER_SOMEREADNEWS ; \
+ CNT_IMG_DEV_FIXED ; \
+ CNT_IMG_DEV_REMOVEABLE ; \
+ CNT_IMG_DEV_CDROM ; \
+ CNT_IMG_DEV_NETWORK ; \
+ CNT_IMG_DEV_RAM ; \
+ CNT_IMG_BOX_VIM ; \
+ CNT_IMG_FOLDER_VIM_BBOARD ; \
+ CNT_IMG_FOLDER_VIM_INBOX ; \
+ CNT_IMG_BOX_FSYS ; \
+ CNT_IMG_BOX_SUBSCRIBE ; \
+ CNT_IMG_BOX_FTP ; \
+ CNT_IMG_BOX_OUT ; \
+ CNT_IMG_BMK_SUBSCR_DEFAULT ; \
+ CNT_IMG_BMK_SUBSCR_ERROR ; \
+ CNT_IMG_BMK_SUBSCR_IN_PROGRESS ; \
+ CNT_IMG_BOX_PROJECT ; \
+ CNT_IMG_FILE_TEXTFILE ; \
+ CNT_IMG_FILE_APP ; \
+ CNT_IMG_FILE_BITMAP ; \
+ CNT_IMG_FILE_TABLE ; \
+ CNT_IMG_FILE_WORD ; \
+ CNT_IMG_FILE_DXF ; \
+ CNT_IMG_FILE_GIF ; \
+ CNT_IMG_FILE_HELP ; \
+ CNT_IMG_FILE_HTML ; \
+ CNT_IMG_FILE_JPG ; \
+ CNT_IMG_FILE_MET ; \
+ CNT_IMG_FILE_PCD ; \
+ CNT_IMG_FILE_PCT ; \
+ CNT_IMG_FILE_PCX ; \
+ CNT_IMG_FILE_PNG ; \
+ CNT_IMG_FILE_MACROLIB ; \
+ CNT_IMG_FILE_DRAW ; \
+ CNT_IMG_FILE_DATABASE ; \
+ CNT_IMG_FILE_CALC ; \
+ CNT_IMG_FILE_IMPRESS ; \
+ CNT_IMG_FILE_CHART ; \
+ CNT_IMG_FILE_WRITER ; \
+ CNT_IMG_FILE_FRAMESET ; \
+ CNT_IMG_FILE_GALLERY ; \
+ CNT_IMG_FILE_SGF ; \
+ CNT_IMG_FILE_GLOBAL_DOC ; \
+ CNT_IMG_FILE_SGV ; \
+ CNT_IMG_FILE_SIM ; \
+ CNT_IMG_FILE_MESSAGE ; \
+ CNT_IMG_FILE_MATH ; \
+ CNT_IMG_FILE_SVHELP ; \
+ CNT_IMG_FILE_SVM ; \
+ CNT_IMG_FILE_TIFF ; \
+ CNT_IMG_FILE_WRITERTEMPLATE ; \
+ CNT_IMG_FILE_WMF ; \
+ CNT_IMG_FILE_EXCEL ; \
+ CNT_IMG_FILE_EXCELTEMPLATE ; \
+ CNT_IMG_IS_LINK ; \
+ CNT_IMG_FILE_SCHEDULE_CMBVIEW ; \
+ CNT_IMG_FILE_SCHEDULE_TVIEW ; \
+ CNT_IMG_FILE_SCHEDULE_EFORM ; \
+ CNT_IMG_FILE_SCHEDULE_TFORM ; \
+ CNT_IMG_DOC_POP3_SOMEREAD ; \
+ CNT_IMG_EXPLORERROOT ; \
+ CNT_IMG_DESKTOP ; \
+ CNT_IMG_DESKTOP_ACTIVE ; \
+ CNT_IMG_GALLERY ; \
+ CNT_IMG_GALLERY_THEME ; \
+ CNT_IMG_CDF_ITEM ; \
+ CNT_IMG_CDF_CHANNEL ; \
+ CNT_IMG_CDF_SUBCHANNEL ; \
+ CNT_IMG_SDC_CHANNEL ; \
+ CNT_IMG_DEFAULT ; \
+ CNT_IMG_BOX_SCHEDULE ; \
+ CNT_IMG_FLD_SCHEDULE_TASK ; \
+ CNT_IMG_FLD_SCHEDULE_EVT ; \
+ CNT_IMG_SCHEDULE_EVT ; \
+ CNT_IMG_SCHEDULE_TASK ; \
+ CNT_IMG_FILE_VOR ; \
+ CNT_IMG_BOOKMARKS ; \
+ CNT_IMG_USER2 ; \
+ CNT_IMG_USER3 ; \
+ CNT_IMG_USER4 ; \
+ CNT_IMG_USER5 ; \
+ CNT_IMG_USER6 ; \
+ CNT_IMG_USER7 ; \
+ CNT_IMG_USER8 ; \
+ CNT_IMG_USER9 ; \
+ CNT_IMG_USER10 ; \
+ CNT_IMG_USER11 ; \
+ CNT_IMG_USER12 ; \
+ CNT_IMG_SCHEDULE_SERVERS ; \
+ CNT_IMG_SCHEDULE_SERVER ; \
+ CNT_IMG_SCHEDULE_USER ; \
+ CNT_IMG_FILE_POWERPOINT ; \
+ CNT_IMG_DOC_POP3_NO_BODY_READ ; \
+ CNT_IMG_DOC_NEWS_NO_BODY ; \
+ CNT_IMG_DOC_POP3_NO_BODY ; \
+ CNT_IMG_DOC_NEWS_NO_BODY_READ ; \
+ CNT_IMG_FOLDER_SOMEREADNEWS_NO_BODY ; \
+ CNT_IMG_DOC_POP3_SOMEREAD_NO_BODY ; \
+ CNT_IMG_FOLDER_FAVORITE ; \
+ CNT_IMG_MARKFLAG ; \
+ CNT_IMG_FILE_IMPRESSPACKED ;
+
+ImageList RID_IMGLST_SMALL
+{
+ ImageBitmap = Bitmap { File = "sn_cnt.bmp" ; };
+ MaskColor = Color { Red = 0xFFFF ; Green = 0x0000 ; Blue = 0xFFFF ; };
+ IdList =
+ {
+ CNT_IMAGELIST
+ };
+ IdCount =
+ {
+ 126;
+ };
+};
+
+ImageList RID_IMGLST_BIG
+{
+ ImageBitmap = Bitmap { File = "ln_cnt.bmp" ; };
+ MaskColor = Color { Red = 0xFFFF ; Green = 0x0000 ; Blue = 0xFFFF ; };
+ IdList =
+ {
+ CNT_IMAGELIST
+ };
+ IdCount =
+ {
+ 126;
+ };
+};
+
+// ******************************************************************* EOF
+
diff --git a/sfx2/source/menu/mnuitem.cxx b/sfx2/source/menu/mnuitem.cxx
new file mode 100644
index 000000000000..a79f6e27b3b2
--- /dev/null
+++ b/sfx2/source/menu/mnuitem.cxx
@@ -0,0 +1,460 @@
+/*************************************************************************
+ *
+ * $RCSfile: mnuitem.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:35 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include <string> // HACK: prevent conflict between STLPORT and Workshop includes
+
+#ifndef _SFXENUMITEM_HXX //autogen
+#include <svtools/eitem.hxx>
+#endif
+#ifndef _SFXSTRITEM_HXX //autogen
+#include <svtools/stritem.hxx>
+#endif
+#pragma hdrstop
+
+#include "appdata.hxx"
+#include "sfx.hrc"
+#include "msgpool.hxx"
+#include "msgdescr.hxx"
+#include "msg.hxx"
+#include "bindings.hxx"
+#include "dispatch.hxx"
+#include "idpool.hxx"
+#include "sfxtypes.hxx"
+#include "macrconf.hxx"
+#include "virtmenu.hxx"
+#include "mnuitem.hxx"
+#include "tbxctrl.hxx"
+#include "arrdecl.hxx"
+#include "module.hxx"
+
+//====================================================================
+
+class SfxEnumMenu: public PopupMenu
+{
+ USHORT nSlot;
+ SfxEnumItem *pItem;
+ SfxBindings* pBindings;
+
+protected:
+ virtual void Select();
+
+public:
+ SfxEnumMenu( USHORT nSlot, SfxBindings* pBind, const SfxEnumItem &rItem );
+ ~SfxEnumMenu();
+};
+
+//=========================================================================
+
+SfxEnumMenu::SfxEnumMenu( USHORT nSlotId, SfxBindings* pBind, const SfxEnumItem &rItem ):
+ nSlot( nSlotId ),
+ pItem( (SfxEnumItem*) rItem.Clone() ),
+ pBindings( pBind )
+{
+ for ( USHORT nVal = 0; nVal < pItem->GetValueCount(); ++nVal )
+ InsertItem( nVal+1, pItem->GetValueTextByPos(nVal) );
+ CheckItem( pItem->GetValue() + 1, TRUE );
+}
+
+//-------------------------------------------------------------------------
+
+SfxEnumMenu::~SfxEnumMenu()
+{
+ delete pItem;
+}
+
+//-------------------------------------------------------------------------
+
+void SfxEnumMenu::Select()
+{
+ pItem->SetValue( GetCurItemId()-1 );
+ pBindings->GetDispatcher()->Execute( nSlot,
+ SFX_CALLMODE_ASYNCHRON|SFX_CALLMODE_RECORD,
+ pItem, 0L, 0L );
+}
+
+//--------------------------------------------------------------------
+
+void SfxMenuControl::SetOwnMenu( SfxVirtualMenu* pMenu )
+{
+ pOwnMenu = pMenu;
+ if ( pSubMenu )
+ pSubMenu->SetParentMenu( pMenu );
+}
+
+
+//--------------------------------------------------------------------
+
+// binds the instance to the specified id and assignes the title
+
+void SfxMenuControl::Bind( SfxVirtualMenu* pOwn,
+ USHORT nId, const String& rTitle,
+ const String &rHelpText,
+ SfxBindings &rBindings )
+{
+ DBG_MEMTEST();
+
+ aTitle = rTitle;
+ aHelpText = rHelpText;
+ pOwnMenu = pOwn;
+ pSubMenu = 0;
+ if ( pOwn )
+ SfxControllerItem::Bind(nId, &rBindings);
+ else
+ SetId( nId );
+
+ DBG( CheckConfigure_Impl(SFX_SLOT_MENUCONFIG) );
+}
+
+
+//--------------------------------------------------------------------
+
+// binds the item to the specified menu and assignes the title
+
+void SfxMenuControl::Bind( SfxVirtualMenu* pOwn,
+ USHORT nId, SfxVirtualMenu& rMenu,
+ const String& rTitle, const String &rHelpText,
+ SfxBindings &rBindings )
+{
+ DBG_MEMTEST();
+ if ( nId == SID_NONE )
+ nId = SFX_SLOTPOOL().GetIdPool().Get();
+ SetId( nId );
+ SetBindings(rBindings);
+ pOwnMenu = pOwn;
+ pSubMenu = &rMenu;
+ aTitle = rTitle;
+ aHelpText = rHelpText;
+}
+
+//--------------------------------------------------------------------
+
+// ctor for explicit registration
+
+SfxMenuControl::SfxMenuControl( BOOL bShowStrings )
+: pOwnMenu(0),
+ pSubMenu(0),
+ b_ShowStrings(bShowStrings)
+{
+ DBG_MEMTEST();
+}
+
+//--------------------------------------------------------------------
+
+// ctor for array
+
+SfxMenuControl::SfxMenuControl():
+ pOwnMenu(0),
+ pSubMenu(0),
+ b_ShowStrings(FALSE)
+{
+ DBG_MEMTEST();
+}
+
+//--------------------------------------------------------------------
+
+SfxMenuControl::SfxMenuControl(USHORT nId, SfxBindings& rBindings):
+ SfxControllerItem(nId, rBindings),
+ pOwnMenu(0),
+ pSubMenu(0),
+ b_ShowStrings(FALSE)
+{
+ DBG_MEMTEST();
+
+ // Dieser Ctor soll es erm"oglichen, w"ahrend der Konstruktion schon
+ // auf die Bindings zur"uckgreifen zu k"onnen, aber gebunden wird
+ // wie immer erst sp"ater. Anwendung z.B. wenn im ctor der abgeleiteten
+ // Klasse z.B. ein StatusForwarder erzeugt werden soll.
+ UnBind();
+}
+
+
+//--------------------------------------------------------------------
+
+// dtor
+
+SfxMenuControl::~SfxMenuControl()
+{
+ if ( SfxMacroConfig::IsMacroSlot( GetId() ) )
+ SFX_APP()->GetMacroConfig()->ReleaseSlotId(GetId());
+ delete pSubMenu;
+}
+
+void SfxMenuControl::RemovePopup()
+{
+ DELETEZ( pSubMenu );
+}
+
+//--------------------------------------------------------------------
+
+// changes the state in the virtual menu
+
+void SfxMenuControl::StateChanged
+(
+ USHORT nSID,
+ SfxItemState eState,
+ const SfxPoolItem* pState
+)
+{
+ DBG_MEMTEST();
+ DBG_ASSERT( nSID == GetId(), "strange SID" );
+ DBG_ASSERT( pOwnMenu != 0, "setting state to dangling SfxMenuControl" );
+
+ FASTBOOL bIsObjMenu =
+ GetId() >= SID_OBJECTMENU0 && GetId() < SID_OBJECTMENU_LAST;
+
+ // enabled/disabled-Flag pauschal korrigieren
+ pOwnMenu->EnableItem( GetId(), bIsObjMenu
+ ? 0 != pOwnMenu->GetSVMenu()->GetPopupMenu( GetId() )
+ : eState != SFX_ITEM_DISABLED );
+
+ if ( eState != SFX_ITEM_AVAILABLE )
+ {
+ // checken nur bei nicht-Object-Menus
+ if ( !bIsObjMenu )
+ pOwnMenu->CheckItem( GetId(), FALSE );
+
+ // SetItemText flackert in MenuBar insbes. unter OS/2 (Bug #20658)
+ if ( // !bIsObjMenu && nicht wegen "Format/Datenbank"
+ pOwnMenu->GetSVMenu()->GetItemText( GetId() ) != GetTitle() )
+ pOwnMenu->SetItemText( GetId(), GetTitle() );
+
+ return;
+ }
+
+ // ggf. das alte Enum-Menu entfernen/loeschen
+ //! delete pOwnMenu->GetMenu().ChangePopupMenu( GetId(), 0 );
+
+ FASTBOOL bCheck = FALSE;
+ if ( pState->ISA(SfxBoolItem) )
+ {
+ // BoolItem fuer checken
+ DBG_ASSERT( GetId() < SID_OBJECTMENU0 || GetId() > SID_OBJECTMENU_LAST,
+ "SfxBoolItem not allowed for SID_OBJECTMENUx" );
+ bCheck = ((const SfxBoolItem*)pState)->GetValue();
+ }
+ else if ( pState->ISA(SfxEnumItemInterface) &&
+ ((SfxEnumItemInterface *)pState)->HasBoolValue() )
+ {
+ // EnumItem wie Bool behandeln
+ DBG_ASSERT( GetId() < SID_OBJECTMENU0 || GetId() > SID_OBJECTMENU_LAST,
+ "SfxEnumItem not allowed for SID_OBJECTMENUx" );
+ bCheck = ((SfxEnumItemInterface *)pState)->GetBoolValue();
+ }
+ else if ( ( b_ShowStrings || bIsObjMenu ) && pState->ISA(SfxStringItem) )
+ // MenuText aus SfxStringItem holen
+ pOwnMenu->SetItemText( GetId(), ((const SfxStringItem*)pState)->GetValue());
+
+#ifdef enum_item_menu_ok
+ else if ( aType == TYPE(SfxEnumItem) )
+ {
+ DBG_ASSERT( GetId() < SID_OBJECTMENU0 || GetId() > SID_OBJECTMENU_LAST,
+ "SfxEnumItem not allowed for SID_OBJECTMENUx" );
+ pOwnMenu->GetMenu().ChangePopupMenu( GetId(), &GetBindings(),
+ new SfxEnumMenu( GetId(), *(const SfxEnumItem*)pState ) );
+ }
+#endif
+
+ pOwnMenu->CheckItem( GetId(), bCheck );
+}
+
+//--------------------------------------------------------------------
+
+SfxMenuControl* SfxMenuControl::CreateImpl( USHORT nId, Menu &rMenu, SfxBindings &rBindings )
+{
+ return new SfxMenuControl( TRUE );
+}
+
+//--------------------------------------------------------------------
+
+void SfxMenuControl::RegisterControl( USHORT nSlotId, SfxModule *pMod )
+{
+ SFX_APP()->RegisterMenuControl( pMod, new SfxMenuCtrlFactory(
+ SfxMenuControl::CreateImpl, TYPE(SfxStringItem), nSlotId ) );
+}
+
+//--------------------------------------------------------------------
+
+SfxMenuControl* SfxMenuControl::CreateControl( USHORT nId, Menu &rMenu, SfxBindings &rBindings )
+{
+ TypeId aSlotType = SFX_SLOTPOOL().GetSlotType(nId);
+ if ( aSlotType )
+ {
+ SfxApplication *pApp = SFX_APP();
+ SfxDispatcher *pDisp = rBindings.GetDispatcher_Impl();
+ SfxModule *pMod = pDisp ? pApp->GetActiveModule( pDisp->GetFrame() ) :0;
+ if ( pMod )
+ {
+ SfxMenuCtrlFactArr_Impl *pFactories = pMod->GetMenuCtrlFactories_Impl();
+ if ( pFactories )
+ {
+ SfxMenuCtrlFactArr_Impl &rFactories = *pFactories;
+ for ( USHORT nFactory = 0; nFactory < rFactories.Count(); ++nFactory )
+ if ( rFactories[nFactory]->nTypeId == aSlotType &&
+ ( ( rFactories[nFactory]->nSlotId == 0 ) ||
+ ( rFactories[nFactory]->nSlotId == nId) ) )
+ return rFactories[nFactory]->pCtor( nId, rMenu, rBindings );
+ }
+ }
+
+ SfxMenuCtrlFactArr_Impl &rFactories = pApp->GetMenuCtrlFactories_Impl();
+
+ for ( USHORT nFactory = 0; nFactory < rFactories.Count(); ++nFactory )
+ if ( rFactories[nFactory]->nTypeId == aSlotType &&
+ ( ( rFactories[nFactory]->nSlotId == 0 ) ||
+ ( rFactories[nFactory]->nSlotId == nId) ) )
+ return rFactories[nFactory]->pCtor( nId, rMenu, rBindings );
+ }
+ return 0;
+}
+
+
+
+BOOL SfxMenuControl::IsSpecialControl( USHORT nId, SfxBindings& rBindings )
+{
+ TypeId aSlotType = SFX_SLOTPOOL().GetSlotType( nId );
+ if ( aSlotType )
+ {
+ SfxApplication *pApp = SFX_APP();
+ SfxDispatcher *pDisp = rBindings.GetDispatcher_Impl();
+ SfxModule *pMod = pDisp ? pApp->GetActiveModule( pDisp->GetFrame() ) :0;
+ if ( pMod )
+ {
+ SfxMenuCtrlFactArr_Impl *pFactories = pMod->GetMenuCtrlFactories_Impl();
+ if ( pFactories )
+ {
+ SfxMenuCtrlFactArr_Impl &rFactories = *pFactories;
+ for ( USHORT nFactory = 0; nFactory < rFactories.Count(); ++nFactory )
+ if ( rFactories[nFactory]->nTypeId == aSlotType &&
+ ( ( rFactories[nFactory]->nSlotId == 0 ) ||
+ ( rFactories[nFactory]->nSlotId == nId) ) )
+ return TRUE;
+ }
+ }
+
+ SfxMenuCtrlFactArr_Impl &rFactories = pApp->GetMenuCtrlFactories_Impl();
+
+ for ( USHORT nFactory = 0; nFactory < rFactories.Count(); ++nFactory )
+ if ( rFactories[nFactory]->nTypeId == aSlotType &&
+ ( ( rFactories[nFactory]->nSlotId == 0 ) ||
+ ( rFactories[nFactory]->nSlotId == nId) ) )
+ return TRUE;
+ }
+ return 0;
+}
+
+//--------------------------------------------------------------------
+
+PopupMenu* SfxMenuControl::GetPopup () const
+{
+ if (GetPopupMenu())
+ return (PopupMenu*)GetPopupMenu()->GetSVMenu();
+ else
+ return 0;
+}
+
+SFX_IMPL_MENU_CONTROL( SfxAppMenuControl_Impl, SfxStringItem );
+
+SfxAppMenuControl_Impl::SfxAppMenuControl_Impl(
+ USHORT nPos, Menu& rMenu, SfxBindings& rBindings )
+ : SfxMenuControl( nPos, rBindings ), pMenu(0)
+{
+ String aText = rMenu.GetItemText( nPos );
+ SfxApplication* pApp = SFX_APP();
+ SfxAppData_Impl* pImpl = pApp->Get_Impl();
+ PopupMenu* pView = pImpl->GetPopupMenu( nPos );
+ if ( pView )
+ rMenu.SetPopupMenu( nPos, pView );
+}
+
+SfxAppMenuControl_Impl::~SfxAppMenuControl_Impl()
+{
+}
+
+SfxUnoMenuControl* SfxMenuControl::CreateControl( const String& rCmd,
+ USHORT nId, Menu& rMenu, SfxBindings &rBindings, SfxVirtualMenu* pVirt )
+{
+ return new SfxUnoMenuControl( rCmd, nId, rMenu, rBindings, pVirt );
+}
+
+SfxUnoMenuControl::SfxUnoMenuControl( const String& rCmd, USHORT nId,
+ Menu& rMenu, SfxBindings& rBindings, SfxVirtualMenu* pVirt )
+ : SfxMenuControl( nId, rBindings )
+{
+ Bind( pVirt, nId, rMenu.GetItemText(nId),
+ rMenu.GetHelpText(nId), rBindings);
+ UnBind();
+ pUnoCtrl = new SfxUnoControllerItem( this, rBindings, rCmd );
+ pUnoCtrl->acquire();
+ pUnoCtrl->GetNewDispatch();
+}
+
+SfxUnoMenuControl::~SfxUnoMenuControl()
+{
+ pUnoCtrl->UnBind();
+ pUnoCtrl->release();
+}
+
+void SfxUnoMenuControl::Select()
+{
+ pUnoCtrl->Execute();
+}
+
+
diff --git a/sfx2/source/menu/mnumgr.cxx b/sfx2/source/menu/mnumgr.cxx
new file mode 100644
index 000000000000..34794d03cac2
--- /dev/null
+++ b/sfx2/source/menu/mnumgr.cxx
@@ -0,0 +1,1426 @@
+/*************************************************************************
+ *
+ * $RCSfile: mnumgr.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:35 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include <string> // HACK: prevent conflict between STLPORT and Workshop headers
+#include <cstdarg> // std::va_list
+
+#ifndef _SYSTEM_HXX //autogen
+#include <vcl/system.hxx>
+#endif
+#ifndef _PSEUDO_HXX //autogen
+#include <so3/pseudo.hxx>
+#endif
+#ifndef _POINTR_HXX //autogen
+#include <vcl/pointr.hxx>
+#endif
+#pragma hdrstop
+
+#include "mnumgr.hxx"
+
+#define _SVSTDARR_USHORTS
+#include <svtools/svstdarr.hxx>
+
+#include "virtmenu.hxx"
+#include "msg.hxx"
+#include "dispatch.hxx"
+#include "minstack.hxx"
+#include "app.hxx"
+#include "sfxtypes.hxx"
+#include "bindings.hxx"
+#include "mnucfga.hxx"
+#include "sfxresid.hxx"
+#include "macrconf.hxx"
+#include "msgpool.hxx"
+
+// SFX_INIMANAGER()
+#include "inimgr.hxx"
+
+#include "sfx.hrc"
+#include "menu.hrc"
+
+static const USHORT nCompatVersion = 4;
+static const USHORT nVersion = 5;
+
+//=========================================================================
+
+DECL_PTRSTACK(SfxMenuCfgItemArrStack, SfxMenuCfgItemArr*, 4, 4 );
+
+//-------------------------------------------------------------------------
+
+void TryToHideDisabledEntries_Impl( Menu* pMenu )
+{
+ DBG_ASSERT( pMenu, "invalid menu" );
+ if ( !SFX_INIMANAGER()->IsDontHideDisabledEntries() )
+ pMenu->SetMenuFlags( pMenu->GetMenuFlags() | MENU_FLAG_HIDEDISABLEDENTRIES );
+}
+
+//-------------------------------------------------------------------------
+
+class SfxMenuIter_Impl
+
+/* [Beschreibung]
+
+ Mit solchen Instanzen wird beim Auslesen des Men"us f"ur die
+ Konfiguration ein Stack gebildet, um die Iterator-Position zu
+ bestimmen.
+
+ Die Instanzen l"oschen sich selbst, wenn der Stack abgebaut wird.
+*/
+
+{
+ SfxMenuIter_Impl* _pPrev; // der vorherige auf dem Stack
+ Menu* _pMenu; // das Men"u "uber das gerade iteriert wird
+ Menu* _pPopup; // Popup an dieser Pos falls noch zu durchl.
+ USHORT _nPos; // die Position des Iterators in 'pMenu'
+ USHORT _nId; // Id an Position '_nPos'
+ USHORT _nLevel; // Schachteltiefe
+
+ SfxMenuIter_Impl( Menu *pMenu,
+ SfxMenuIter_Impl *pPrev = 0 );
+
+ ~SfxMenuIter_Impl()
+ {}
+
+public:
+ static SfxMenuIter_Impl* Create( Menu *pMenu )
+ { return ( pMenu && pMenu->GetItemCount() )
+ ? new SfxMenuIter_Impl( pMenu )
+ : 0; }
+
+ USHORT GetLevel() const
+ { return _nLevel; }
+
+ Menu* GetMenu() const
+ { return _pMenu; }
+
+ USHORT GetItemId() const
+ { return _nId; }
+
+ MenuItemType GetItemType() const
+ { return _pMenu->GetItemType( _nPos ); }
+
+ Menu* GetPopupMenu() const
+ { return _pPopup; }
+
+ String GetItemText() const
+ { return _pMenu->GetItemText( _nId ); }
+
+ String GetItemHelpText() const
+ { return _pMenu->GetHelpText( _nId ); }
+
+ BOOL IsSeparator() const
+ { return MENUITEM_SEPARATOR == GetItemType(); }
+
+ SfxMenuIter_Impl* NextItem();
+
+ void RemovePopup()
+ { _pPopup = NULL; }
+};
+
+//=========================================================================
+
+SfxMenuIter_Impl::SfxMenuIter_Impl
+(
+ Menu* pMenu,
+ SfxMenuIter_Impl* pPrev
+)
+: _pPrev( pPrev ),
+ _pMenu( pMenu ),
+ _nPos( 0 ),
+ _nId( pMenu->GetItemId(0) ),
+ _nLevel( pPrev ? ( pPrev->_nLevel + 1 ) : 0 )
+{
+ _pPopup = pMenu->GetPopupMenu( _nId );
+}
+
+//--------------------------------------------------------------------
+
+SfxMenuIter_Impl* SfxMenuIter_Impl::NextItem()
+{
+ // noch nicht durchlaufenes Popup vorhanden
+ if ( _pPopup )
+ {
+ // dann bevor es weitergeht, das Popup durchlaufen
+ Menu *pSub = _pPopup;
+ _pPopup = 0; // als durchlaufen markieren
+ if ( pSub->GetItemCount() )
+ return new SfxMenuIter_Impl( pSub, this );
+ }
+
+ // zur n"achsten Position in diesem Men"u
+ if ( ++_nPos >=_pMenu->GetItemCount() )
+ {
+ // Men"u zuende => eine Stack-Etage hoch
+ SfxMenuIter_Impl *pPrev = _pPrev;
+ delete this;
+ return pPrev ? pPrev->NextItem() : 0;
+ }
+
+ // bleibt in diesem Menu
+ _nId = _pMenu->GetItemId(_nPos);
+ _pPopup = _pMenu->GetPopupMenu(_nId);
+
+ // nicht alles wird angezeigt
+ if ( _nId >= SID_PICK1 && _nId <= SID_PICK9 )
+ return NextItem();
+
+ // nicht alle Popups werden durchlaufen
+ if ( _nId == SID_OBJECT ||
+ ( _nId >= SID_OBJECTMENU0 && _nId <= SID_OBJECTMENU_LAST ) )
+ _pPopup = 0;
+
+ // diesen Eintrag nehmen
+ return this;
+}
+
+//=========================================================================
+
+void SfxMenuManager::Construct( SfxVirtualMenu& rMenu )
+{
+ DBG_MEMTEST();
+ pMenu = &rMenu;
+
+ // set the handlers
+ Menu *pSvMenu = pMenu->GetSVMenu();
+ pSvMenu->SetSelectHdl( LINK(this, SfxMenuManager, Select) );
+ TryToHideDisabledEntries_Impl( pSvMenu );
+}
+
+//--------------------------------------------------------------------
+
+SfxMenuManager::SfxMenuManager( const ResId& rResId, SfxBindings &rBindings, BOOL bBar )
+: SfxConfigItem(rResId.GetId()),
+ bMenuBar(bBar),
+ pMenu(0),
+ pOldMenu(0),
+ pResMgr(rResId.GetResMgr()),
+ pBindings(&rBindings)
+{
+ bOLE = FALSE;
+ bAddClipboardFuncs = FALSE;
+ DBG_MEMTEST();
+}
+
+//--------------------------------------------------------------------
+
+SfxMenuManager::~SfxMenuManager()
+{
+ DBG_MEMTEST();
+ pBindings->ENTERREGISTRATIONS();
+ delete pMenu;
+ pBindings->LEAVEREGISTRATIONS();
+}
+
+//--------------------------------------------------------------------
+
+BOOL SfxMenuManager::Initialize(BOOL bOLEServer)
+{
+ BOOL bRet;
+ if (!bOLEServer)
+ {
+ bRet = SfxConfigItem::Initialize();
+ }
+ else
+ {
+ bOLE = TRUE;
+ bRet = SfxConfigItem::Initialize();
+ }
+
+ return bRet;
+}
+
+//--------------------------------------------------------------------
+
+// executes the function for the selected item
+
+IMPL_LINK( SfxMenuManager, Select, Menu *, pMenu )
+{
+ DBG_MEMTEST();
+
+ USHORT nId = (USHORT) pMenu->GetCurItemId();
+ if ( pBindings->IsBound(nId) )
+ // normal function
+ pBindings->Execute( nId );
+ else
+ // special menu function
+ pBindings->GetDispatcher_Impl()->Execute( nId );
+
+ return TRUE;
+}
+
+//--------------------------------------------------------------------
+
+// resets the item iterator, FALSE if none
+
+BOOL SfxMenuManager::FirstItem()
+{
+ pIterator = SfxMenuIter_Impl::Create( pMenu->GetSVMenu() );
+ return 0 != pIterator;
+}
+
+//--------------------------------------------------------------------
+
+// skips to the next item, FALSE if no more
+
+BOOL SfxMenuManager::NextItem()
+{
+ DBG_ASSERT( pIterator, "invalid iterator state" );
+
+ pIterator = pIterator->NextItem();
+ return 0 != pIterator;
+}
+
+//--------------------------------------------------------------------
+
+// TRUE if current item is a binding
+
+BOOL SfxMenuManager::IsBinding() const
+{
+ DBG_ASSERT( pIterator, "invalid iterator state" );
+
+ USHORT nId = pIterator->GetItemId();
+ if ( pIterator->GetPopupMenu() && nId > SID_SFX_START )
+ if ( !SfxMenuControl::IsSpecialControl( nId, *pBindings ) )
+ // "Unechtes" Binding: Popup mit SlotId
+ return FALSE;
+ return nId >= SID_SFX_START;
+}
+
+//--------------------------------------------------------------------
+
+// TRUE if current item is a separator
+
+BOOL SfxMenuManager::IsSeparator() const
+{
+ DBG_ASSERT( pIterator, "invalid iterator state" );
+
+ return pIterator->IsSeparator();
+}
+
+//--------------------------------------------------------------------
+
+// TRUE if current item is a popup; may be also a binding
+
+BOOL SfxMenuManager::IsPopup() const
+{
+ DBG_ASSERT( pIterator, "invalid iterator state" );
+
+ return 0 != pIterator->GetPopupMenu();
+}
+
+//--------------------------------------------------------------------
+
+// returns sub-menu-level
+
+USHORT SfxMenuManager::GetLevel() const
+{
+ DBG_ASSERT( pIterator, "invalid iterator state" );
+
+ return pIterator->GetLevel();
+}
+
+//--------------------------------------------------------------------
+
+// id of binding if IsBinding()
+
+USHORT SfxMenuManager::GetItemId() const
+{
+ DBG_ASSERT( pIterator, "invalid iterator state" );
+
+#ifdef DBG_UTIL
+ ByteString aStr( U2S(pIterator->GetItemText()) );
+#endif
+
+ USHORT nId = pIterator->GetItemId();
+
+#ifdef DBG_UTIL
+ const SfxSlot *pSlot = nId ? SFX_SLOTPOOL().GetSlot( nId ) : NULL;
+ if ( pSlot && !pSlot->IsMode( SFX_SLOT_MENUCONFIG ) && nId != SID_MDIWINDOWLIST )
+ {
+ ByteString aStr( "Slot ");
+ aStr += ByteString::CreateFromInt32( nId );
+ aStr += ByteString( " : MenuConfig fehlt!" );
+ DBG_ERROR( aStr.GetBuffer() );
+ }
+#endif
+
+ if ( pIterator->GetPopupMenu() )
+ {
+#if defined( DBG_UTIL ) && !defined( WIN )
+ aStr += ByteString( " : Popups muessen Ids != 0 haben!" );
+ DBG_ASSERT( nId, aStr.GetBuffer() );
+#endif
+ return nId;
+ }
+ else
+ {
+#if defined( DBG_UTIL ) && !defined( WIN )
+ aStr += ByteString( " : Menue-Entries muessen Ids > SID_SFX_START haben!" );
+ DBG_ASSERT( nId > SID_SFX_START || pIterator->IsSeparator(), aStr.GetBuffer() );
+#endif
+ return nId > SID_SFX_START ? nId : SID_NONE;
+ }
+}
+
+//--------------------------------------------------------------------
+
+// title of popup if IsPopup()
+
+String SfxMenuManager::GetTitle() const
+{
+ DBG_ASSERT( pIterator, "invalid iterator state" );
+
+ return pIterator->GetItemText();
+}
+
+//--------------------------------------------------------------------
+
+String SfxMenuManager::GetHelpText() const
+{
+ DBG_ASSERT( pIterator, "invalid iterator state" );
+
+ return pIterator->GetItemHelpText();
+}
+
+//--------------------------------------------------------------------
+
+// call this before reconfiguring
+
+void SfxMenuManager::Clear()
+{
+ pBindings->ENTERREGISTRATIONS();
+ pOldMenu = pMenu;
+
+ // create the root config and a stack for the current sub-configs
+ pCfg = new SfxMenuCfgItemArr;
+ pCfgStack = new SfxMenuCfgItemArrStack;
+ pCfgStack->Push( pCfg );
+}
+
+//--------------------------------------------------------------------
+
+// call this after reconfiguring
+
+void SfxMenuManager::Reconfigure()
+{
+ SfxVirtualMenu *pVMenu;
+ Menu *pSVMenu;
+ if (bMenuBar )
+ {
+ pSVMenu = new MenuBar;
+ }
+ else
+ pSVMenu = new PopupMenu;
+
+ TryToHideDisabledEntries_Impl( pSVMenu );
+ ConstructSvMenu( pSVMenu, *pCfg );
+
+ pVMenu = new SfxVirtualMenu( pSVMenu, FALSE, *pBindings, FALSE );
+ Construct(*pVMenu);
+ if ( bMenuBar && pOldMenu )
+ {
+ SfxMenuBarManager *pBar = (SfxMenuBarManager*) this;
+ MenuBar* pOldBar = (MenuBar*) pOldMenu->GetSVMenu();
+ MenuBar* pSvBar = (MenuBar*) GetMenu()->GetSVMenu();
+ if ( pBar->GetWindow()->GetMenuBar() == pOldBar )
+ //! jetzt im VirtMenu: InvalidateKeyCodes();
+ pBar->GetWindow()->SetMenuBar( pSvBar );
+ }
+
+ delete pOldMenu;
+ pOldMenu = 0;
+ pBindings->LEAVEREGISTRATIONS();
+ SetDefault( FALSE );
+}
+
+//--------------------------------------------------------------------
+
+// Baut aus einem ConfigItemArray rekursiv das StarView-Menu auf
+
+void SfxMenuManager::ConstructSvMenu( Menu* pSuper, SfxMenuCfgItemArr& rCfg)
+{
+ USHORT nCount = rCfg.Count();
+ for ( USHORT n = 0; n < rCfg.Count(); ++n )
+ {
+ SfxMenuCfgItem *pmIt=rCfg[n];
+ if ( rCfg[n]->pPopup )
+ {
+ pSuper->InsertItem( rCfg[n]->nId, rCfg[n]->aTitle );
+ pSuper->SetHelpId( rCfg[n]->nId, (ULONG) rCfg[n]->nId );
+ PopupMenu *pPopupMenu;
+ pPopupMenu = new PopupMenu;
+ pSuper->SetPopupMenu( rCfg[n]->nId, pPopupMenu );
+ ConstructSvMenu( pPopupMenu, *(rCfg[n]->pPopup) );
+ }
+ else if ( rCfg[n]->nId )
+ {
+ pSuper->InsertItem( rCfg[n]->nId, rCfg[n]->aTitle );
+ pSuper->SetHelpId( rCfg[n]->nId, (ULONG) rCfg[n]->nId );
+ }
+ else
+ {
+ pSuper->InsertSeparator();
+ }
+ }
+}
+
+//--------------------------------------------------------------------
+
+// Baut aus einem ConfigStream rekursiv das StarView-Menu auf
+
+void SfxMenuManager::ConstructSvMenu( Menu* pSuper, SvStream& rStream,
+ BOOL bWithHelp, BOOL bCompat )
+{
+ SvUShorts aShorts;
+
+ USHORT nCount = 0xFFFF;
+ if ( bCompat )
+ {
+ // Alte Eintr"age wg. Kompatibilit"at einlesen
+ USHORT nCtrls,nId;
+ rStream >> nCtrls;
+ for (USHORT i=0; i<nCtrls; i++)
+ rStream >> nId;
+ rStream >> nCount;
+ }
+
+ char cTag;
+ for ( USHORT n=0; n<nCount; n++ )
+ {
+ rStream >> cTag;
+ String aTitle;
+ USHORT nId;
+
+ switch ( cTag )
+ {
+ case 'S':
+ pSuper->InsertSeparator();
+ break;
+
+ case 'I':
+ {
+ rStream >> nId;
+ rStream.ReadByteString( aTitle, RTL_TEXTENCODING_UTF8 );
+
+ String aHelpText;
+ if ( bWithHelp )
+ rStream.ReadByteString( aHelpText, RTL_TEXTENCODING_UTF8 );
+
+ if (nId >= SID_MACRO_START && nId <= SID_MACRO_END)
+ {
+ SfxMacroInfo aInfo;
+ rStream >> aInfo;
+ nId = aInfo.GetSlotId();
+ }
+
+ pSuper->InsertItem( nId, aTitle );
+ pSuper->SetHelpId( nId, (ULONG) nId );
+ if ( bWithHelp )
+ pSuper->SetHelpText( nId, aHelpText );
+ break;
+ }
+
+ case 'P':
+ {
+ rStream >> nId;
+ rStream.ReadByteString( aTitle, RTL_TEXTENCODING_UTF8 );
+
+ if ( nId >= SID_MACRO_START && nId <= SID_MACRO_END ||
+ nId < SID_SFX_START )
+ {
+ // Bug im Cfg-Dialog: Popups mit Macro-SlotIds
+ USHORT i;
+ for ( i=0; i<aShorts.Count(); i++ )
+ {
+ // Erste Id nehmen, deren Wert gr"o\ser ist als die Position
+ if ( aShorts[i] > i+1 )
+ break;
+ }
+
+ nId = i+1;
+ aShorts.Insert( nId, i );
+ }
+
+ String aHelpText;
+ if ( bWithHelp )
+ rStream.ReadByteString( aHelpText, RTL_TEXTENCODING_UTF8 );
+
+ pSuper->InsertItem( nId, aTitle );
+ pSuper->SetHelpId( nId, (ULONG) nId );
+ if ( bWithHelp )
+ pSuper->SetHelpText( nId, aHelpText );
+
+ PopupMenu *pPopupMenu;
+ pPopupMenu = new PopupMenu;
+ pSuper->SetPopupMenu( nId, pPopupMenu );
+ ConstructSvMenu( pPopupMenu, rStream, bWithHelp, bCompat );
+ break;
+ }
+
+ case 'E':
+ {
+ n = nCount-1; // Ende
+ break;
+ }
+
+ default:
+ {
+ // Wenn ein Fehler aufgetreten ist, sollte man besser aufh"oren
+ DBG_ERROR( "invalid item type in menu-config" );
+ n = nCount-1; // Ende
+ break;
+ }
+ }
+ }
+}
+
+//--------------------------------------------------------------------
+
+// append a binding by function-id
+
+void SfxMenuManager::AppendItem(const String &rText,
+ const String &rHelpText, USHORT nId )
+{
+ SfxMenuCfgItem* pItem = new SfxMenuCfgItem;
+ pItem->nId = nId;
+ if (nId >= SID_MACRO_START && nId <= SID_MACRO_END)
+ SFX_APP()->GetMacroConfig()->RegisterSlotId(nId);
+ pItem->aTitle = rText;
+ pItem->aHelpText = rHelpText;
+ pItem->pPopup = 0;
+ pCfgStack->Top()->Append( pItem );
+}
+
+//--------------------------------------------------------------------
+
+// append a separator
+
+void SfxMenuManager::AppendSeparator()
+{
+ SfxMenuCfgItem* pItem = new SfxMenuCfgItem;
+ pItem->nId = 0;
+ pItem->pPopup = 0;
+ pCfgStack->Top()->Append( pItem );
+}
+
+//--------------------------------------------------------------------
+
+// append a popup (sub)-menu
+
+void SfxMenuManager::EnterPopup(const String& rTitle,
+ const String& rHelpText, USHORT nId )
+{
+ SfxMenuCfgItem* pItem = new SfxMenuCfgItem;
+ pItem->nId = nId;
+ pItem->aTitle = rTitle;
+ pItem->aHelpText = rHelpText;
+ pItem->pPopup = new SfxMenuCfgItemArr;
+ pCfgStack->Top()->Append( pItem );
+ pCfgStack->Push( pItem->pPopup );
+}
+
+//--------------------------------------------------------------------
+
+// end a sub-menu
+
+void SfxMenuManager::LeavePopup()
+{
+ SfxMenuCfgItemArr* pArr = pCfgStack->Top();
+ SvUShorts aShorts;
+
+ USHORT n;
+ for ( n=0; n<pArr->Count(); n++ )
+ {
+ USHORT nId = (*pArr)[n]->nId;
+ if ( nId < SID_SFX_START )
+ {
+ // Alle vewendeten Popup-Ids < 5000 merken
+ USHORT i;
+ for ( i=0; i<aShorts.Count(); i++ )
+ {
+ if ( aShorts[i] > nId )
+ break;
+ }
+
+ aShorts.Insert( nId, i );
+ }
+ }
+
+ for ( n=0; n<pArr->Count(); n++ )
+ {
+ SfxMenuCfgItem* pItem = (*pArr)[n];
+ if ( pItem->pPopup && pItem->nId >= SID_MACRO_START && pItem->nId <= SID_MACRO_END )
+ {
+ // Weil in dem Fucking-ConfigDialog Entries und Popups bunt
+ // vermischt sind, kann auch ein Popup eine Macro-Id haben, die
+ // mu\s nat"urlich weg
+ SFX_APP()->GetMacroConfig()->ReleaseSlotId( pItem->nId );
+
+ // Nun noch eine erlaubte Id suchen
+ USHORT nCount = aShorts.Count();
+ USHORT i;
+ for ( i=0; i<nCount; i++ )
+ {
+ if ( aShorts[i] > i+1 )
+ // Erste Id nehmen, deren Wert gr"o\ser ist als die Position
+ break;
+ }
+
+ pItem->nId = i+1;
+ aShorts.Insert( i+1, i );
+ }
+ }
+
+ pCfgStack->Pop();
+}
+
+//--------------------------------------------------------------------
+
+// reload all KeyCodes
+
+void SfxMenuManager::InvalidateKeyCodes()
+{
+ if ( pMenu )
+ pMenu->InvalidateKeyCodes();
+}
+
+//====================================================================
+
+// creates a menu-manager and loads it from resource RID_DEFAULTMENU or RID_DEFAULTPLUGINMENU
+
+SfxMenuBarManager::SfxMenuBarManager( SfxBindings& rBindings, BOOL bPlugin ) :
+
+ SfxMenuManager( bPlugin ? RID_DEFAULTPLUGINMENU : RID_DEFAULTMENU, rBindings, TRUE ),
+
+ pWindow( rBindings.GetSystemWindow() )
+
+{
+ DBG_MEMTEST();
+
+ // initialize ObjectMenus
+ for ( int n = 0; n < 4; ++n )
+ {
+ aObjMenus[n].nId = 0;
+ aObjMenus[n].pPMMgr = NULL;
+ aObjMenus[n].pResMgr = NULL;
+ }
+}
+
+//--------------------------------------------------------------------
+
+// creates a menu-manager and loads it from a resource
+
+SfxMenuBarManager::SfxMenuBarManager( const ResId& rResId, SfxBindings &rBindings ) :
+
+ SfxMenuManager( rResId, rBindings, TRUE ),
+
+ pWindow( rBindings.GetSystemWindow() )
+
+{
+ DBG_MEMTEST();
+
+ // initialize ObjectMenus
+ for ( int n = 0; n < 4; ++n )
+ {
+ aObjMenus[n].nId = 0;
+ aObjMenus[n].pPMMgr = NULL;
+ aObjMenus[n].pResMgr = NULL;
+ }
+}
+
+//--------------------------------------------------------------------
+
+SfxMenuBarManager::~SfxMenuBarManager()
+{
+ DBG_MEMTEST();
+
+ DBG_ASSERT(!aObjMenus[0].pPMMgr || !aObjMenus[1].pPMMgr ||
+ !aObjMenus[2].pPMMgr || !aObjMenus[3].pPMMgr,
+ "da sind noch ObjectMenus" );
+
+ ResetObjectMenus();
+ UpdateObjectMenus();
+
+ MenuBar* pSvBar = (MenuBar*) GetMenu()->GetSVMenu();
+ if ( pWindow && pWindow->GetMenuBar() == pSvBar )
+ pWindow->SetMenuBar( 0 );
+}
+
+//====================================================================
+
+// creates a menu-manager and loads it from a stream
+
+SfxPopupMenuManager::SfxPopupMenuManager(const ResId& rResId, SfxBindings &rBindings )
+ : SfxMenuManager( rResId, rBindings, FALSE )
+ , pSVMenu( NULL )
+{
+ DBG_MEMTEST();
+ SetInternal(TRUE);
+}
+
+//-------------------------------------------------------------------------
+
+void SfxPopupMenuManager::RemoveDisabledEntries()
+{
+ if ( pSVMenu )
+ TryToHideDisabledEntries_Impl( pSVMenu );
+}
+
+//--------------------------------------------------------------------
+
+USHORT SfxPopupMenuManager::Execute( const Point& rPos, Window* pWindow )
+{
+ DBG_MEMTEST();
+ return ( (PopupMenu*) GetMenu()->GetSVMenu() )->Execute( pWindow, rPos );
+}
+
+//--------------------------------------------------------------------
+
+IMPL_LINK_INLINE_START( SfxPopupMenuManager, SelectHdl, void *, pvoid )
+{
+ return 1;
+}
+IMPL_LINK_INLINE_END( SfxPopupMenuManager, SelectHdl, void *, pvoid )
+
+
+//--------------------------------------------------------------------
+
+USHORT SfxPopupMenuManager::Execute( Window* pWindow, va_list pArgs, const SfxPoolItem *pArg1 )
+{
+ DBG_MEMTEST();
+
+ PopupMenu* pMenu = ( (PopupMenu*)GetMenu()->GetSVMenu() );
+ pMenu->SetSelectHdl( LINK( this, SfxPopupMenuManager, SelectHdl ) );
+ USHORT nId = pMenu->Execute( pWindow, pWindow->GetPointerPosPixel() );
+ pMenu->SetSelectHdl( Link() );
+
+ if ( nId )
+ GetBindings().GetDispatcher()->_Execute( nId, SFX_CALLMODE_RECORD, pArgs, pArg1 );
+
+ return nId;
+}
+
+//--------------------------------------------------------------------
+
+USHORT SfxPopupMenuManager::Execute( Window* pWindow, const SfxPoolItem *pArg1, ... )
+{
+ DBG_MEMTEST();
+
+ va_list pArgs;
+ va_start(pArgs, pArg1);
+
+ return (Execute( pWindow, pArgs, pArg1 ));
+}
+
+//-------------------------------------------------------------------------
+
+void SfxPopupMenuManager::StartInsert()
+{
+ ResId aResId(GetType());
+ aResId.SetRT(RSC_MENU);
+ aResId.SetResMgr(pResMgr);
+ pSVMenu = new PopupMenu( aResId );
+ TryToHideDisabledEntries_Impl( pSVMenu );
+}
+
+//-------------------------------------------------------------------------
+
+void SfxPopupMenuManager::EndInsert()
+{
+ pBindings->ENTERREGISTRATIONS();
+ pMenu = new SfxVirtualMenu( pSVMenu, FALSE, *pBindings, TRUE, TRUE );
+ Construct( *pMenu );
+ pBindings->LEAVEREGISTRATIONS();
+}
+
+//-------------------------------------------------------------------------
+
+void SfxPopupMenuManager::InsertSeparator( USHORT nPos )
+{
+ pSVMenu->InsertSeparator( nPos );
+}
+
+//-------------------------------------------------------------------------
+
+void SfxPopupMenuManager::InsertItem( USHORT nId, const String& rName, MenuItemBits nBits, USHORT nPos )
+{
+ pSVMenu->InsertItem( nId, rName, nBits,nPos );
+ pSVMenu->SetHelpId( nId, (ULONG) nId );
+}
+
+//-------------------------------------------------------------------------
+
+void SfxPopupMenuManager::RemoveItem( USHORT nId )
+{
+ pSVMenu->RemoveItem( nId );
+}
+
+//-------------------------------------------------------------------------
+
+void SfxPopupMenuManager::CheckItem( USHORT nId, BOOL bCheck )
+{
+ pSVMenu->CheckItem( nId, bCheck );
+}
+
+
+//--------------------------------------------------------------------
+
+// stores the complete menu-configuration
+
+BOOL SfxMenuManager::Store( SvStream& rStream )
+{
+ DBG_MEMTEST();
+ return StreamMenu( pMenu->GetSVMenu(), rStream, FALSE );
+/*
+ LanguageType eLangType = SFX_APP()->GetAppInternational().GetLanguage();
+ if (eLangType == LANGUAGE_SYSTEM)
+ {
+ eLangType = System::GetLanguage();
+ }
+
+ rStream << nVersion
+ << (USHORT) eLangType;
+
+ FirstItem();
+ USHORT nLevel = GetLevel();
+ do
+ {
+ while ( GetLevel() < nLevel )
+ {
+ // Ein Popup wurde verlassen
+ // Ende-Markierung setzen
+ rStream << 'E';
+ nLevel--;
+ }
+
+ nLevel = GetLevel();
+
+ if ( IsSeparator() )
+ {
+ rStream << 'S';
+ }
+ else
+ {
+ USHORT nId = GetItemId();
+ String aTitle = GetTitle();
+ if( !IsPopup() )
+ {
+ rStream << 'I';
+ rStream << nId << aTitle;
+ if (nId >= SID_MACRO_START && nId <= SID_MACRO_END)
+ // MacroInfo speichern
+ rStream << *(SFX_APP()->GetMacroConfig()->GetMacroInfo(nId));
+ }
+ else
+ {
+ rStream << 'P';
+ rStream << nId << aTitle;
+ if ( !pIterator->GetPopupMenu()->GetItemCount() )
+ rStream << 'E';
+ }
+ }
+ }
+ while ( NextItem() );
+
+ // Letzte Ende-Markierung setzen
+ rStream << 'E';
+
+ // Ende-Markierung f"ur MenuBar setzen
+ rStream << 'E';
+*/
+}
+
+//-------------------------------------------------------------------------
+
+void SfxMenuManager::SetForceCtrlCreateMode( BOOL bCreate )
+{
+ bOLE = TRUE;
+}
+
+//--------------------------------------------------------------------
+
+int SfxMenuManager::Load_Impl( SvStream& rStream, BOOL bForPlugComm )
+{
+ DBG_MEMTEST();
+
+ // Config-Version und Sprache der Menuetexte
+ USHORT nFileVersion, nLanguage;
+ rStream >> nFileVersion;
+ if(nFileVersion < nCompatVersion)
+ return SfxConfigItem::WARNING_VERSION;
+
+ rStream >> nLanguage;
+ LanguageType eLangType = Application::GetAppInternational().GetLanguage();
+ if (eLangType == LANGUAGE_SYSTEM)
+ {
+ eLangType = System::GetLanguage();
+ }
+
+ if ( eLangType != (LanguageType) nLanguage && !bForPlugComm )
+ {
+ // Wenn die Text f"ur eine andere Sprache sind, Default-Config
+ // verwenden. Fehlermeldung ??
+ UseDefault();
+ return SfxConfigItem::ERR_OK;
+ }
+
+ SfxVirtualMenu *pOldVirtMenu=0;
+ if (pMenu)
+ {
+ // Es wird umkonfiguriert
+ pOldVirtMenu = pMenu;
+ pBindings->ENTERREGISTRATIONS();
+ }
+
+ BOOL bCompat = FALSE;
+ if ( nFileVersion == nCompatVersion )
+ bCompat = TRUE;
+ BOOL bWithHelp = FALSE;
+ if ( bCompat || bForPlugComm )
+ bWithHelp = TRUE;
+
+ Menu *pSVMenu;
+ if (bMenuBar )
+ {
+ pSVMenu = new MenuBar;
+ TryToHideDisabledEntries_Impl( pSVMenu );
+ }
+ else
+ pSVMenu = new PopupMenu;
+
+ ConstructSvMenu( pSVMenu, rStream, bWithHelp, bCompat );
+
+ SfxVirtualMenu *pVMenu = new SfxVirtualMenu( pSVMenu, bWithHelp, *pBindings, bOLE );
+ Construct(*pVMenu);
+
+ if ( bMenuBar && pOldVirtMenu )
+ {
+ SfxMenuBarManager *pBar = (SfxMenuBarManager*) this;
+ MenuBar* pOldBar = (MenuBar*) pOldVirtMenu->GetSVMenu();
+ MenuBar* pSvBar = (MenuBar*) GetMenu()->GetSVMenu();
+ if ( pBar->GetWindow()->GetMenuBar() == pOldBar )
+ //! jetzt im VirtMenu: InvalidateKeyCodes();
+ pBar->GetWindow()->SetMenuBar( pSvBar );
+ }
+
+ if (pOldVirtMenu)
+ {
+ delete pOldVirtMenu;
+ pBindings->LEAVEREGISTRATIONS();
+ }
+
+ return SfxConfigItem::ERR_OK;
+}
+
+//-------------------------------------------------------------------------
+
+int SfxMenuManager::Load( SvStream& rStream )
+{
+ return Load_Impl( rStream, FALSE );
+}
+
+//--------------------------------------------------------------------
+
+void SfxMenuManager::UseDefault()
+{
+ DBG_MEMTEST();
+
+ SfxApplication *pSfxApp = SFX_APP();
+ SfxVirtualMenu *pOldVirtMenu=0;
+ if (pMenu)
+ {
+ pOldVirtMenu = pMenu;
+ pBindings->ENTERREGISTRATIONS();
+ }
+
+ SfxVirtualMenu *pVMenu = 0;
+ if ( bMenuBar )
+ {
+ ResId aId( GetType(), pResMgr );
+ aId.SetRT(RSC_MENU);
+ if ( Resource::GetResManager()->IsAvailable( aId ) )
+ {
+ MenuBar *pSvMenu = new MenuBar( ResId(GetType(), pResMgr) );
+ TryToHideDisabledEntries_Impl( pSvMenu );
+ pVMenu = new SfxVirtualMenu( pSvMenu, FALSE, *pBindings, bOLE, TRUE );
+ }
+ else
+ {
+ MenuBar *pSvMenu = new MenuBar;
+ pVMenu = new SfxVirtualMenu( pSvMenu, FALSE, *pBindings, bOLE, TRUE );
+ }
+ }
+ else
+ {
+ ResId aResId(GetType());
+ aResId.SetRT(RSC_MENU);
+ aResId.SetResMgr(pResMgr);
+ Menu *pSVMenu = new PopupMenu( aResId );
+
+ if ( bAddClipboardFuncs )
+ {
+ USHORT n, nCount = pSVMenu->GetItemCount();
+ for ( n=0; n<nCount; n++ )
+ {
+ USHORT nId = pSVMenu->GetItemId( n );
+ if ( nId == SID_COPY || nId == SID_CUT || nId == SID_PASTE )
+ break;
+ }
+
+ if ( n == nCount )
+ {
+ PopupMenu aPop( SfxResId( MN_CLIPBOARDFUNCS ) );
+ nCount = aPop.GetItemCount();
+ pSVMenu->InsertSeparator();
+ for ( n=0; n<nCount; n++ )
+ {
+ USHORT nId = aPop.GetItemId( n );
+ pSVMenu->InsertItem( nId, aPop.GetItemText( nId ), aPop.GetItemBits( nId ) );
+ }
+ }
+ }
+
+ pVMenu = new SfxVirtualMenu( pSVMenu, FALSE, *pBindings, TRUE, TRUE );
+ }
+
+ Construct(*pVMenu);
+
+ if ( bMenuBar && pOldVirtMenu )
+ {
+ SfxMenuBarManager *pBar = (SfxMenuBarManager*) this;
+ MenuBar* pOldBar = (MenuBar*) pOldVirtMenu->GetSVMenu();
+ MenuBar* pSvBar = (MenuBar*) GetMenu()->GetSVMenu();
+ if ( pBar->GetWindow()->GetMenuBar() == pOldBar )
+ //! jetzt im VirtMenu: InvalidateKeyCodes();
+ pBar->GetWindow()->SetMenuBar( pSvBar );
+ }
+
+ if (pOldVirtMenu)
+ {
+ delete pOldVirtMenu;
+ pBindings->LEAVEREGISTRATIONS();
+ }
+}
+
+// ------------------------------------------------------------------------
+
+String SfxMenuManager::GetName() const
+{
+ return String(SfxResId(STR_MENU_CFGITEM));
+}
+
+
+// ------------------------------------------------------------------------
+
+BOOL SfxMenuManager::IsPopupFunction( USHORT nId )
+{
+ return nId == SID_PICKLIST ||
+ nId == SID_MDIWINDOWLIST ||
+ nId == SID_HELPMENU ||
+ nId == SID_HELPMENU;
+}
+
+//------------------------------------------------------------------------
+
+void SfxMenuBarManager::ResetObjectMenus()
+{
+ for ( int n = 0; n <= 3; ++n )
+ aObjMenus[n].nId = 0;
+}
+
+//------------------------------------------------------------------------
+
+void SfxMenuBarManager::SetObjectMenu( USHORT nPos, const ResId& rResId )
+{
+ nPos -= SID_OBJECTMENU0;
+ DBG_ASSERT( nPos < 4, "only 4 object Menu positions defined" );
+
+ aObjMenus[nPos].nId = rResId.GetId();
+ aObjMenus[nPos].pResMgr = rResId.GetResMgr();
+}
+
+
+//------------------------------------------------------------------------
+
+MenuBar* SfxMenuBarManager::GetMenuBar() const
+{
+ return (MenuBar*) GetMenu()->GetSVMenu();
+}
+
+//------------------------------------------------------------------------
+
+PopupMenu* SfxMenuBarManager::GetObjectMenu( USHORT nPos, USHORT &rConfigId )
+{
+ nPos -= SID_OBJECTMENU0;
+ DBG_ASSERT( nPos < 4, "only 4 object Menu positions defined" );
+
+ rConfigId = aObjMenus[nPos].nId;
+ return aObjMenus[nPos].pPMMgr
+ ? (PopupMenu*) aObjMenus[nPos].pPMMgr->GetMenu()->GetSVMenu()
+ : 0;
+}
+
+//------------------------------------------------------------------------
+
+void SfxMenuBarManager::UpdateObjectMenus()
+{
+ Menu *pMenu = GetMenu()->GetSVMenu();
+ for ( int n = 0; n < 4; ++n )
+ {
+ SfxPopupMenuManager *pOldPopup = aObjMenus[n].pPMMgr;
+ if ( aObjMenus[n].nId )
+ {
+ // Nur ObjectMenues erzeugen, wenn im Menue auch vorhanden!
+ if ( pMenu->GetItemPos( n + SID_OBJECTMENU0 ) != MENU_ITEM_NOTFOUND )
+ {
+ if ( !pOldPopup ||
+ ( pOldPopup && pOldPopup->GetType() != aObjMenus[n].nId ) )
+ {
+ ResId aResId( aObjMenus[n].nId, aObjMenus[n].pResMgr );
+ aObjMenus[n].pPMMgr =
+ new SfxPopupMenuManager( aResId , GetBindings() );
+ aObjMenus[n].pPMMgr->Initialize();
+ }
+ else
+ pOldPopup = NULL;
+
+ pMenu->SetPopupMenu( n + SID_OBJECTMENU0,
+ (PopupMenu*) aObjMenus[n].pPMMgr->GetMenu()->GetSVMenu() );
+ pMenu->EnableItem( n + SID_OBJECTMENU0, TRUE );
+ }
+ }
+ else if ( pOldPopup )
+ {
+ if ( pMenu->GetItemPos( n + SID_OBJECTMENU0 ) != MENU_ITEM_NOTFOUND )
+ {
+ pMenu->EnableItem( n + SID_OBJECTMENU0, FALSE );
+ pMenu->SetPopupMenu( n + SID_OBJECTMENU0, 0 );
+ }
+ }
+
+ if ( pOldPopup )
+ {
+ if ( pOldPopup == aObjMenus[n].pPMMgr )
+ aObjMenus[n].pPMMgr = NULL;
+ pOldPopup->StoreConfig();
+ delete pOldPopup;
+ }
+ }
+}
+
+//------------------------------------------------------------------------
+
+void SfxMenuBarManager::ReconfigureObjectMenus()
+{
+ for ( int n = 0; n < 4; ++n )
+ {
+ if ( aObjMenus[n].nId )
+ {
+ Menu *pMenu = GetMenu()->GetSVMenu();
+ if ( pMenu->GetItemPos( n + SID_OBJECTMENU0 ) != MENU_ITEM_NOTFOUND )
+ {
+ if ( !aObjMenus[n].pPMMgr )
+ {
+ ResId aResId(aObjMenus[n].nId, aObjMenus[n].pResMgr);
+ aObjMenus[n].pPMMgr =
+ new SfxPopupMenuManager( aResId , GetBindings() );
+ aObjMenus[n].pPMMgr->Initialize();
+ }
+
+ pMenu->SetPopupMenu( n + SID_OBJECTMENU0,
+ (PopupMenu*) aObjMenus[n].pPMMgr->GetMenu()->GetSVMenu() );
+ pMenu->EnableItem( n + SID_OBJECTMENU0, TRUE );
+ }
+ }
+ }
+}
+
+//-------------------------------------------------------------------------
+
+void SfxMenuManager::InsertVerbs(const SvVerbList *pList)
+
+/* Man k"onnte hier auch einen Separator oder eine bestimmte Menu-Id
+ als Kennung zu Einf"ugen benutzen, dann mu\s man aber das Items-Array
+ verschieben etc.
+*/
+
+{
+ // hinten anh"angen
+ if ( !pList->Count() )
+ return;
+
+ Menu *pMenu = GetMenu()->GetSVMenu();
+ pMenu->InsertSeparator();
+
+ USHORT nr=0;
+ for ( USHORT n = 0; n < pList->Count(); ++n )
+ {
+ // nicht alle Verbs landen im Men"u
+ const SvVerb& rVerb = (*pList)[n];
+ if ( !rVerb.IsOnMenu() )
+ continue;
+
+ // neue Id vergeben
+ USHORT nId = SID_VERB_START + nr++;
+ DBG_ASSERT(nId <= SID_VERB_END, "Zuviele Verben!");
+ if ( nId > SID_VERB_END )
+ break;
+
+ // einf"ugen
+ pMenu->InsertItem( nId, rVerb.GetName() );
+ pMenu->SetHelpId( nId, (ULONG) nId );
+ }
+}
+
+//-------------------------------------------------------------------------
+
+BOOL SfxMenuManager::StreamMenu( Menu *pMenu, SvStream& rStream, BOOL bWithHelp )
+{
+ LanguageType eLangType = Application::GetAppInternational().GetLanguage();
+ if (eLangType == LANGUAGE_SYSTEM)
+ {
+ eLangType = System::GetLanguage();
+ }
+
+ rStream << nVersion
+ << (USHORT) eLangType;
+
+ if ( !FirstItem() )
+ return TRUE;
+
+ SfxMenuIter_Impl *pFirstIter = pIterator;
+ USHORT nFirstLevel = pFirstIter->GetLevel();
+ USHORT nLevel = nFirstLevel;
+ do
+ {
+ while ( pIterator->GetLevel() < nLevel )
+ {
+ // Ein Popup wurde verlassen
+ // Ende-Markierung setzen
+ rStream << 'E';
+ nLevel--;
+ }
+
+ nLevel = pIterator->GetLevel();
+
+ if ( pIterator->IsSeparator() )
+ {
+ rStream << 'S';
+ }
+ else
+ {
+ USHORT nId = pIterator->GetItemId();
+ String aTitle = pIterator->GetItemText();
+ if( IsBinding() )
+ {
+ rStream << 'I';
+ rStream << nId;
+ rStream.WriteByteString(aTitle, RTL_TEXTENCODING_UTF8 );
+ if ( bWithHelp )
+ rStream.WriteByteString(pIterator->GetItemHelpText(), RTL_TEXTENCODING_UTF8 );
+ if (nId >= SID_MACRO_START && nId <= SID_MACRO_END)
+ // MacroInfo speichern
+ rStream << *(SFX_APP()->GetMacroConfig()->GetMacroInfo(nId));
+ if ( pIterator->GetPopupMenu() )
+ // Unechtes Popup "uberspringen
+ pIterator->RemovePopup();
+ }
+ else if ( pIterator->GetPopupMenu() )
+ {
+ rStream << 'P';
+ rStream << nId;
+ rStream.WriteByteString(aTitle, RTL_TEXTENCODING_UTF8 );
+ if ( bWithHelp )
+ rStream.WriteByteString(pIterator->GetItemHelpText(), RTL_TEXTENCODING_UTF8 );
+ if ( !pIterator->GetPopupMenu()->GetItemCount() )
+ rStream << 'E';
+ }
+ else
+ DBG_ERROR( "Invalid menu configuration!" );
+ }
+ }
+ while ( NextItem() );
+
+ while ( nLevel > nFirstLevel )
+ {
+ // Ein Popup wurde verlassen
+ // Ende-Markierung setzen
+ rStream << 'E';
+ nLevel--;
+ }
+
+ // Ende-Markierung f"ur MenuBar setzen
+ rStream << 'E';
+ return TRUE;
+}
+
+void SfxPopupMenuManager::AddClipboardFunctions()
+{
+ if ( bMenuBar )
+ {
+ DBG_ERROR( "Not for menubars!" );
+ return;
+ }
+
+ bAddClipboardFuncs = TRUE;
+}
+
+
diff --git a/sfx2/source/menu/objmnctl.cxx b/sfx2/source/menu/objmnctl.cxx
new file mode 100644
index 000000000000..96136c78123a
--- /dev/null
+++ b/sfx2/source/menu/objmnctl.cxx
@@ -0,0 +1,186 @@
+/*************************************************************************
+ *
+ * $RCSfile: objmnctl.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:35 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include <tools/list.hxx>
+#ifndef _MENU_HXX //autogen
+#include <vcl/menu.hxx>
+#endif
+#ifndef _PSEUDO_HXX //autogen
+#include <so3/pseudo.hxx>
+#endif
+#ifndef _SFXSTRITEM_HXX //autogen
+#include <svtools/stritem.hxx>
+#endif
+#pragma hdrstop
+
+#include "sfxsids.hrc"
+#include "objmnctl.hxx"
+#include "dispatch.hxx"
+#include "viewsh.hxx"
+#include "viewfrm.hxx"
+
+// STATIC DATA -----------------------------------------------------------
+
+SFX_IMPL_MENU_CONTROL(SfxObjectVerbsControl, SfxStringItem);
+
+//--------------------------------------------------------------------
+
+/*
+ Ctor; setzt Select-Handler am Menu und traegt Menu
+ in seinen Parent ein.
+ */
+
+SfxObjectVerbsControl::SfxObjectVerbsControl(USHORT nId, Menu &rMenu, SfxBindings &rBindings)
+ : SfxMenuControl( nId, rBindings )
+ , pMenu(new PopupMenu)
+ , rParent(rMenu)
+{
+ rMenu.SetPopupMenu(nId, pMenu);
+ pMenu->SetSelectHdl(LINK(this, SfxObjectVerbsControl, MenuSelect));
+ FillMenu();
+}
+
+//--------------------------------------------------------------------
+
+/*
+ Fuellt das Menu mit den aktuellen Verben aus der ViewShell.
+ */
+
+void SfxObjectVerbsControl::FillMenu()
+{
+ pMenu->Clear();
+ SfxViewShell *pView = GetBindings().GetDispatcher()->GetFrame()->GetViewShell();
+ if (pView)
+ {
+ const SvVerbList *pList = pView->GetVerbs();
+ if (pList)
+ {
+ USHORT nId = SID_VERB_START;
+ for (USHORT n=0; n<pList->Count(); n++)
+ {
+ const SvVerb& rVerb = (*pList)[n];
+ if (!rVerb.IsOnMenu())
+ continue;
+
+ DBG_ASSERT(nId <= SID_VERB_END, "Zuviele Verben!");
+ if (nId > SID_VERB_END)
+ break;
+
+ pMenu->InsertItem(nId++, rVerb.GetName());
+ }
+ }
+ }
+ rParent.EnableItem( GetId(), (BOOL)pMenu->GetItemCount() );
+}
+
+//--------------------------------------------------------------------
+
+/*
+ Statusbenachrichtigung;
+ fuellt gfs. das Menu mit den aktuellen Verben aus der ViewShell.
+ der DocumentShell.
+ Ist die Funktionalit"at disabled, wird der entsprechende
+ Menueeintrag im Parentmenu disabled, andernfalls wird er enabled.
+ */
+
+void SfxObjectVerbsControl::StateChanged( USHORT nSID, SfxItemState eState,
+ const SfxPoolItem* pState )
+{
+ rParent.EnableItem(GetId(), SFX_ITEM_AVAILABLE == eState );
+ if ( SFX_ITEM_AVAILABLE == eState )
+ FillMenu();
+}
+
+//--------------------------------------------------------------------
+
+/*
+ Select-Handler des Menus;
+ das selektierte Verb mit ausgef"uhrt,
+ */
+
+IMPL_LINK_INLINE_START( SfxObjectVerbsControl, MenuSelect, Menu *, pMenu )
+{
+ const USHORT nId = pMenu->GetCurItemId();
+ if( nId )
+ GetBindings().Execute(nId);
+ return 1;
+}
+IMPL_LINK_INLINE_END( SfxObjectVerbsControl, MenuSelect, Menu *, pMenu )
+
+//--------------------------------------------------------------------
+
+/*
+ Dtor; gibt das Menu frei.
+ */
+
+SfxObjectVerbsControl::~SfxObjectVerbsControl()
+{
+ delete pMenu;
+}
+
+//--------------------------------------------------------------------
+
+PopupMenu* SfxObjectVerbsControl::GetPopup() const
+{
+ return pMenu;
+}
+
+
diff --git a/sfx2/source/menu/virtmenu.cxx b/sfx2/source/menu/virtmenu.cxx
new file mode 100644
index 000000000000..03be92c5ebbd
--- /dev/null
+++ b/sfx2/source/menu/virtmenu.cxx
@@ -0,0 +1,1015 @@
+/*************************************************************************
+ *
+ * $RCSfile: virtmenu.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:35 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include <sot/factory.hxx>
+#include <vcl/system.hxx>
+#include <svtools/libcall.hxx>
+#pragma hdrstop
+
+#include "virtmenu.hxx"
+#include "msgpool.hxx"
+#include "statcach.hxx"
+#include "msg.hxx"
+#include "idpool.hxx"
+#include "mnuitem.hxx"
+#include "mnumgr.hxx"
+#include "bindings.hxx"
+#include "dispatch.hxx"
+#include "app.hxx"
+#include "accmgr.hxx"
+#include "sfxtypes.hxx"
+#include "arrdecl.hxx"
+#include "sfx.hrc"
+#include "ipfrm.hxx"
+#include "ipenv.hxx"
+#include "appdata.hxx"
+#include "picklist.hxx"
+#include "viewsh.hxx"
+
+//=========================================================================
+
+DBG_NAME(SfxVirtualMenu);
+
+static long nAutoDeactivateTimeout_Impl = -1;
+
+//=========================================================================
+
+typedef SfxMenuControl* SfxMenuControlPtr;
+SV_IMPL_PTRARR(SfxMenuCtrlArr_Impl, SfxMenuControlPtr);
+
+//=========================================================================
+
+/* Diese Hilfsfunktion pr"uft, ob eine Slot-Id im aktuellen Applikations-
+ Status sichtbar ist oder nicht. Dabei bezieht sich der Applikations-Status
+ darauf, ob die Applikation OLE-Server ist oder nicht.
+*/
+
+BOOL IsItemHidden_Impl( USHORT nItemId, int bOleServer, int bMac )
+{
+ return ( bMac &&
+ ( nItemId == SID_ARRANGEICONS || nItemId == SID_MINIMIZEWINS ) ) ||
+ ( bOleServer &&
+ ( nItemId == SID_QUITAPP || nItemId == SID_SAVEDOC ||
+ nItemId == SID_OPENDOC || nItemId == SID_SAVEASDOC ||
+ nItemId == SID_NEWDOC ) ) ||
+ ( !bOleServer &&
+ ( nItemId == SID_EXITANDRETURN || nItemId == SID_UPDATEDOC ) );
+}
+
+//====================================================================
+
+void SfxVirtualMenu::Construct_Impl()
+{
+ pWindowMenu = NULL;
+ pPickMenu = NULL;
+ bIsActive = FALSE;
+ bControllersUnBound = FALSE;
+ pSVMenu->SetHighlightHdl( LINK(this, SfxVirtualMenu, Highlight) );
+ pSVMenu->SetActivateHdl( LINK(this, SfxVirtualMenu, Activate) );
+ pSVMenu->SetDeactivateHdl( LINK(this, SfxVirtualMenu, Deactivate) );
+ pSVMenu->SetSelectHdl( LINK(this, SfxVirtualMenu, Select) );
+
+ // Accels eintragen
+ InvalidateKeyCodes();
+
+ if ( !pResMgr && pParent )
+ pResMgr = pParent->pResMgr;
+}
+
+//--------------------------------------------------------------------
+
+SfxVirtualMenu::SfxVirtualMenu( USHORT nOwnId,
+ SfxVirtualMenu* pOwnParent, Menu& rMenu, BOOL bWithHelp,
+ SfxBindings &rBindings, BOOL bOLEServer, BOOL bRes ):
+ pItems(0),
+ pBindings(&rBindings),
+ pResMgr(0),
+ nLocks(0), pAutoDeactivate(0), bHelpInitialized( bWithHelp )
+ , bRemoveDisabledEntries( FALSE )
+{
+ DBG_MEMTEST();
+ DBG_CTOR(SfxVirtualMenu, 0);
+ pSVMenu = &rMenu;
+
+#ifdef UNX
+ USHORT nPos = pSVMenu->GetItemPos( SID_DESKTOPMODE );
+ if ( nPos != MENU_ITEM_NOTFOUND )
+ pSVMenu->RemoveItem( nPos );
+#endif
+
+ bResCtor = bRes;
+ bOLE = bOLEServer;
+ nId = nOwnId;
+ pParent = pOwnParent;
+ nVisibleItems = 0;
+ pAppCtrl = 0;
+ CreateFromSVMenu();
+ Construct_Impl();
+ bHelpInitialized = FALSE;
+}
+
+//--------------------------------------------------------------------
+
+// creates a virtual menu from a StarView MenuBar or PopupMenu
+
+SfxVirtualMenu::SfxVirtualMenu( Menu *pStarViewMenu, BOOL bWithHelp,
+ SfxBindings &rBindings, BOOL bOLEServer, BOOL bRes ):
+ pItems(0),
+ pBindings(&rBindings),
+ pResMgr(0),
+ nLocks(0), pAutoDeactivate(0), bHelpInitialized( bWithHelp )
+ , bRemoveDisabledEntries( FALSE )
+{
+ DBG_MEMTEST();
+ DBG_CTOR(SfxVirtualMenu, 0);
+
+#ifdef UNX
+ USHORT nPos = pStarViewMenu->GetItemPos( SID_DESKTOPMODE );
+ if ( nPos != MENU_ITEM_NOTFOUND )
+ pStarViewMenu->RemoveItem( nPos );
+#endif
+
+ pSVMenu = pStarViewMenu;
+
+ bResCtor = bRes;
+ bOLE = bOLEServer;
+ nId = 0;
+ pParent = 0;
+ pAppCtrl = 0;
+ nVisibleItems = 0;
+ CreateFromSVMenu();
+ Construct_Impl();
+ bHelpInitialized = FALSE;
+}
+
+//--------------------------------------------------------------------
+
+/* Der Destruktor der Klasse SfxVirtualMenu gib die gebundenen Items frei
+ und klinkt das zugeh"orige StarView-PopupMenu aus seinem Parent aus.
+ Falls es sich um das Pickmenu oder das MDI-Menu handelt, wird es
+ dort abgemeldet.
+*/
+
+SfxVirtualMenu::~SfxVirtualMenu()
+{
+ DBG_MEMTEST();
+ DBG_DTOR(SfxVirtualMenu, 0);
+
+ if ( bIsActive )
+ {
+ pBindings->LEAVEREGISTRATIONS(); --nLocks; bIsActive = FALSE;
+ }
+
+ // QAP-Hack
+ if ( pAutoDeactivate )
+ {
+ if ( pAutoDeactivate->IsActive() )
+ Deactivate(0);
+ DELETEX(pAutoDeactivate);
+ }
+
+ if (pItems)
+ {
+#ifdef MPW
+ // der MPW-Compiler ruft sonst keine Dtoren!
+ for ( USHORT n = 0; n < nCount; ++n )
+ (pItems+n)->SfxMenuControl::~SfxMenuControl();
+ delete (void*) pItems;
+#else
+ __DELETE(nCount) pItems;
+#endif
+ }
+
+ delete pAppCtrl;
+ pBindings = 0;
+
+ // Alle Menues, die von SV erzeugt wurden, werden auch dort wieder
+ // gel"oscht (also die beim Laden aus der Resource erzeugten).
+ // Das Top-Level-Menu wird nie von SV gel"oscht, da die Allocierung
+ // im SFX erfolgt
+ if ( !bResCtor || !pParent)
+ {
+ if ( pParent )
+ {
+ if( pParent->pSVMenu->GetItemPos( nId ) != MENU_ITEM_NOTFOUND )
+ pParent->pSVMenu->SetPopupMenu( nId, 0 );
+ if ( pParent->pPickMenu == pSVMenu )
+ pParent->pPickMenu = 0;
+ if ( pParent->pWindowMenu == pSVMenu)
+ pParent->pWindowMenu = 0;
+ }
+
+ delete pSVMenu;
+ }
+
+ DBG_OUTF( ("SfxVirtualMenu %lx destroyed", this) );
+ DBG_ASSERT( !nLocks, "destroying active menu" );
+}
+//--------------------------------------------------------------------
+
+// internal: creates the virtual menu from the pSVMenu
+
+void SfxVirtualMenu::CreateFromSVMenu()
+{
+ DBG_MEMTEST();
+ DBG_CHKTHIS(SfxVirtualMenu, 0);
+
+ // get and store the number of items
+ nCount = pSVMenu->GetItemCount();
+
+ // Achtung: nur zu diesem Zeitpunkt ist garantiert, da\s nCount und
+ // der ItemCount des SV-Menues "ubereinstimmen; sp"ater kann das SvMenue
+ // auch mehr Eintr"age haben (Pickliste!)
+ if (nCount)
+ pItems = new SfxMenuControl[nCount];
+
+ // remember some values
+ SfxApplication *pSfxApp = SFX_APP();
+ const int bOleServer = FALSE;
+ const int bMac = FALSE;
+
+ // iterate through the items
+ pBindings->ENTERREGISTRATIONS(); ++nLocks;
+ USHORT nSVPos = 0;
+ for ( USHORT nPos = 0; nPos < nCount; ++nPos, ++nSVPos )
+ {
+ USHORT nId = pSVMenu->GetItemId(nSVPos);
+ PopupMenu* pPopup = pSVMenu->GetPopupMenu(nId);
+ if ( pPopup )
+ {
+ DBG_ASSERT( SfxMenuManager::IsPopupFunction(nId) ||
+ !SFX_SLOTPOOL().GetIdPool().IsLocked(nId),
+ "popupmenu with existing func-id" );
+ SfxMenuControl *pMnuCtrl =
+ SfxMenuControl::CreateControl(nId, *pPopup, *pBindings);
+
+ if ( pMnuCtrl )
+ {
+ // Das Popup war offensichtlich kein "echtes"; solche werden
+ // niemals aus der Resource geladen und m"ussen daher explizit
+ // gel"oscht werden
+ if ( pSVMenu->GetPopupMenu( nId ) == pPopup )
+ pSVMenu->SetPopupMenu( nId, NULL );
+ DELETEZ( pPopup );
+
+ SfxMenuCtrlArr_Impl &rCtrlArr = GetAppCtrl_Impl();
+ rCtrlArr.C40_INSERT( SfxMenuControl, pMnuCtrl, rCtrlArr.Count() );
+ (pItems+nPos)->Bind( 0, nId, pSVMenu->GetItemText(nId),
+ pSVMenu->GetHelpText(nId), *pBindings);
+ pMnuCtrl->Bind( this, nId, pSVMenu->GetItemText(nId),
+ pSVMenu->GetHelpText(nId), *pBindings);
+ }
+ else
+ {
+/*
+ if ( nId >= SID_SFX_START && !SfxMenuManager::IsPopupFunction(nId) )
+ {
+ // Echte Popups sollen keine SlotIds haben; leider sind
+ // da noch Altlasten mit herumzuschleppen ...
+ String aTitle = pSVMenu->GetItemText( nId );
+ pSVMenu->SetPopupMenu( nId, NULL );
+ USHORT nPos = pSVMenu->GetItemPos( nId );
+ pSVMenu->RemoveItem( nPos );
+ nId = 1;
+ while ( pSVMenu->GetItemPos(nId) != MENU_ITEM_NOTFOUND )
+ nId++;
+ pSVMenu->InsertItem( nId, aTitle, 0, nPos );
+ pSVMenu->SetPopupMenu( nId, pPopup );
+ }
+*/
+
+ pSVMenu->SetHelpId( nId, 0L );
+ pMnuCtrl = pItems+nPos;
+
+ // normalerweise jetzt erst im Activate-Handler
+ if ( bOLE )
+ {
+ pMnuCtrl->Bind( this, nId,
+ *new SfxVirtualMenu(nId, this, *pPopup, bHelpInitialized, *pBindings, bOLE, bResCtor),
+ pSVMenu->GetItemText(nId), pSVMenu->GetHelpText(nId),
+ *pBindings );
+ }
+ }
+
+ ++nVisibleItems;
+ }
+ else
+ {
+ switch ( pSVMenu->GetItemType(nSVPos) )
+ {
+ case MENUITEM_STRING:
+ {
+ SfxMenuControl *pMnuCtrl;
+ String aCmd( pSVMenu->GetItemCommand( nId ) );
+ if ( aCmd.Len() )
+ {
+ pMnuCtrl = SfxMenuControl::CreateControl( aCmd, nId,
+ *pSVMenu, *pBindings, this );
+ if ( pMnuCtrl )
+ {
+ SfxMenuCtrlArr_Impl &rCtrlArr = GetAppCtrl_Impl();
+ rCtrlArr.C40_INSERT( SfxMenuControl,
+ pMnuCtrl, rCtrlArr.Count());
+ (pItems+nPos)->Bind( 0, nId, pSVMenu->GetItemText(nId),
+ pSVMenu->GetHelpText(nId), *pBindings);
+ }
+ else
+ {
+ pMnuCtrl = (pItems+nPos);
+ pMnuCtrl->Bind( this, nId, pSVMenu->GetItemText(nId),
+ pSVMenu->GetHelpText(nId), *pBindings);
+ }
+ }
+ else
+ {
+ pMnuCtrl = SfxMenuControl::CreateControl(nId,
+ *pSVMenu, *pBindings);
+
+ if ( pMnuCtrl )
+ {
+ SfxMenuCtrlArr_Impl &rCtrlArr = GetAppCtrl_Impl();
+ rCtrlArr.C40_INSERT( SfxMenuControl,
+ pMnuCtrl, rCtrlArr.Count());
+ (pItems+nPos)->Bind( 0, nId, pSVMenu->GetItemText(nId),
+ pSVMenu->GetHelpText(nId), *pBindings);
+ }
+ else
+ pMnuCtrl = (pItems+nPos);
+
+ pMnuCtrl->Bind( this, nId, pSVMenu->GetItemText(nId),
+ pSVMenu->GetHelpText(nId), *pBindings);
+ }
+
+ if ( !IsItemHidden_Impl(nId, bOleServer, bMac) )
+ ++nVisibleItems;
+ else
+ pSVMenu->RemoveItem( nSVPos-- );
+ break;
+ }
+
+ case MENUITEM_IMAGE:
+ //! not implemented
+ break;
+
+ case MENUITEM_SEPARATOR:
+ //! not implemented
+ break;
+ }
+ }
+ }
+ pBindings->LEAVEREGISTRATIONS(); --nLocks;
+}
+
+//--------------------------------------------------------------------
+
+// called on activation of the SV-Menu
+
+IMPL_LINK( SfxVirtualMenu, Highlight, Menu *, pMenu )
+{
+ DBG_MEMTEST();
+ DBG_CHKTHIS(SfxVirtualMenu, 0);
+
+ // eigenes StarView-Menu
+ if ( pMenu == pSVMenu )
+ {
+ // AutoDeactivate ist jetzt nicht mehr n"otig
+ USHORT nId = pMenu->GetCurItemId();
+ if ( pAutoDeactivate )
+ pAutoDeactivate->Stop();
+ }
+
+ return TRUE;
+}
+//--------------------------------------------------------------------
+
+FASTBOOL SfxVirtualMenu::Bind_Impl( Menu *pMenu )
+{
+ // Selber suchen, da SV mit 'USHORT nSID = pSVMenu->GetCurItemId();' immer
+ // 0 liefert. Das ist so, weil die Event-Weiterleitung lt. TH nichts mit
+ // CurItem des Parent-Menus zu tun hat.
+ for ( USHORT nPos = 0; nPos < nCount; ++nPos )
+ {
+ // angesprochenes Sub-Menu gefunden?
+ FASTBOOL bFound = FALSE;
+ USHORT nSID = pSVMenu->GetItemId(nPos);
+ SfxMenuControl &rCtrl = pItems[nPos];
+ bFound = pSVMenu->GetPopupMenu(nSID) == pMenu;
+ SfxVirtualMenu *pSubMenu = rCtrl.GetPopupMenu();
+
+ if ( bFound )
+ {
+ // Nur ein gebundener Menu-Controller hat schon seine Id!
+ if ( !rCtrl.GetId() )
+ {
+ DBG_ASSERT( !pSubMenu, "Popup schon vorhanden!");
+
+ // VirtualMenu f"ur Sub-Menu erzeugen
+ BOOL bRes = bResCtor;
+ SfxVirtualMenu *pSubMenu = new SfxVirtualMenu( nSID, this,
+ *pMenu, FALSE, *pBindings, bOLE, bRes);
+
+ DBG_OUTF( ("Neues VirtualMenu %lx erzeugt", pSubMenu) );
+
+ rCtrl.Bind( this, nSID, *pSubMenu,
+ pSVMenu->GetItemText(nSID), pSVMenu->GetHelpText(nSID),
+ *pBindings );
+
+ // Activate weiterleiten
+ pSubMenu->Bind_Impl( pMenu );
+ pSubMenu->Activate( pMenu );
+ }
+ }
+
+ // rekursiv weitersuchen (SV Activate nur am Menu selbst und Top-Menu)
+ if ( !bFound && pSubMenu )
+ bFound = pSubMenu->Bind_Impl( pMenu );
+
+ // gefunden, dann abbrechen
+ if ( bFound )
+ return TRUE;
+ }
+
+ // nicht in diesem Untermenu gefunden
+ return FALSE;
+}
+
+void SfxVirtualMenu::BindControllers()
+{
+ pBindings->ENTERREGISTRATIONS();
+
+ USHORT nPos;
+ for ( nPos = 0; nPos < nCount; ++nPos )
+ {
+ SfxMenuControl& rCtrl = pItems[nPos];
+ if ( rCtrl.IsBindable_Impl() && !rCtrl.GetPopupMenu() )
+ rCtrl.ReBind();
+ }
+
+ SfxMenuCtrlArr_Impl& rCtrlArr = GetAppCtrl_Impl();
+ for ( nPos=0; nPos<rCtrlArr.Count(); nPos++ )
+ {
+ SfxMenuControl* pCtrl = rCtrlArr[nPos];
+ USHORT nId = pCtrl->GetId();
+ if ( !pSVMenu->GetItemCommand(nId).Len() )
+ pCtrl->ReBind();
+ }
+
+ pBindings->LEAVEREGISTRATIONS();
+ bControllersUnBound = FALSE;
+}
+
+void SfxVirtualMenu::UnbindControllers()
+{
+ pBindings->ENTERREGISTRATIONS();
+
+ USHORT nPos;
+ for ( nPos = 0; nPos < nCount; ++nPos )
+ {
+ SfxMenuControl &rCtrl = pItems[nPos];
+ if ( rCtrl.IsBound() )
+ rCtrl.UnBind();
+ }
+
+ SfxMenuCtrlArr_Impl& rCtrlArr = GetAppCtrl_Impl();
+ for ( nPos=0; nPos<rCtrlArr.Count(); nPos++ )
+ {
+ SfxMenuControl* pCtrl = rCtrlArr[nPos];
+ if ( pCtrl->IsBound() )
+ // UnoController sind nicht gebunden!
+ pCtrl->UnBind();
+ }
+
+ pBindings->LEAVEREGISTRATIONS();
+ bControllersUnBound = TRUE;
+}
+
+
+//--------------------------------------------------------------------
+
+// called on activation of the SV-Menu
+
+#define ITEMID_MDIWINDOW SHRT_MAX // all values greater than maximum value for slotids
+
+IMPL_LINK( SfxVirtualMenu, Activate, Menu *, pMenu )
+{
+ DBG_MEMTEST();
+ DBG_CHKTHIS(SfxVirtualMenu, 0);
+ DBG_OUTF( ("SfxVirtualMenu %lx activated %lx, own %lx", this, pMenu, pSVMenu));
+
+ // MI: wozu war der noch gut?
+ // MBA: scheint ein alter QAP-Hack gewesen zu sein ( in rev.1.41 eingecheckt ! )
+// if ( Application::IsInModalMode() )
+// return TRUE; // abw"urgen
+
+ if ( pMenu )
+ {
+ sal_Bool bDontHide = (sal_Bool)(sal_uInt16)
+ SFX_INIMANAGER()->Get( SFX_KEY_DONTHIDE_DISABLEDENTRIES ).ToInt32();
+ sal_uInt16 nFlag = pMenu->GetMenuFlags();
+ if ( bDontHide )
+ nFlag &= ~MENU_FLAG_HIDEDISABLEDENTRIES;
+ else
+ nFlag |= MENU_FLAG_HIDEDISABLEDENTRIES;
+ pMenu->SetMenuFlags( nFlag );
+ }
+
+ // eigenes StarView-Menu
+ if ( pMenu == pSVMenu )
+ {
+ // doppelt-Activate verhindern
+ if ( bIsActive )
+ return TRUE;
+
+ // ggf. Pick-Menu erzeugen
+ if ( pParent && pSVMenu == pParent->pPickMenu )
+ {
+ SfxPickList_Impl::Get()->SetPickMenu( pParent->pPickMenu );
+ }
+ else
+ pPickMenu = pSVMenu->GetPopupMenu(SID_PICKLIST);
+
+ if ( pParent && pSVMenu == pParent->pWindowMenu )
+ {
+ PopupMenu* pWindowMenu = pParent->pWindowMenu;
+ sal_uInt16 nPos = pWindowMenu->GetItemPos( ITEMID_MDIWINDOW );
+ for ( sal_uInt16 n=nPos; n<pWindowMenu->GetItemCount(); )
+ pWindowMenu->RemoveItem( n );
+ if ( pWindowMenu->GetItemType( pWindowMenu->GetItemCount()-1 ) == MENUITEM_SEPARATOR )
+ pWindowMenu->RemoveItem( pWindowMenu->GetItemCount()-1 );
+
+ SfxViewFrame *pView = pBindings->GetDispatcher()->GetFrame();
+ while ( pView->GetParentViewFrame_Impl() )
+ pView = pView->GetParentViewFrame_Impl();
+ SfxFrame *pActive = pView->GetFrame();
+
+ SfxFrameArr_Impl& rArr = *SFX_APP()->Get_Impl()->pTopFrames;
+ if ( rArr.Count() > 0 &&
+ pWindowMenu->GetItemType( pWindowMenu->GetItemCount()-1 ) != MENUITEM_SEPARATOR )
+ pWindowMenu->InsertSeparator();
+ sal_uInt16 nNo;
+ sal_uInt16 nAllowedMenuSize = USHRT_MAX - ITEMID_MDIWINDOW;
+ for ( nNo = 0, nPos = 0; ( nPos < nAllowedMenuSize ) && ( nNo < rArr.Count() ); ++nNo )
+ {
+ SfxFrame *pFrame = rArr[nNo];
+ if ( pFrame->GetCurrentViewFrame() && pFrame->GetCurrentViewFrame()->IsVisible() )
+ {
+ pWindowMenu->InsertItem( ITEMID_MDIWINDOW + nNo,
+ pFrame->GetWindow().GetText(), MIB_RADIOCHECK );
+ if ( pFrame == pActive )
+ pWindowMenu->CheckItem( ITEMID_MDIWINDOW + nNo, sal_True );
+ nPos++;
+ }
+ }
+ }
+ else
+ pWindowMenu = pSVMenu->GetPopupMenu(SID_MDIWINDOWLIST);
+
+ // f"ur konstistenten Status sorgen
+ if ( bControllersUnBound )
+ BindControllers();
+
+ pBindings->GetDispatcher_Impl()->Flush();
+ for ( USHORT nPos = 0; nPos < nCount; ++nPos )
+ {
+ USHORT nId = (pItems+nPos)->GetId();
+ if ( nId && nId < ITEMID_MDIWINDOW )
+ pBindings->Update(nId);
+ }
+
+ if ( bRemoveDisabledEntries )
+ RemoveDisabledEntries();
+
+ // HelpText on-demand
+ if ( !bHelpInitialized )
+ {
+ bHelpInitialized = TRUE;
+ SfxSlotPool &rSlotPool = SFX_SLOTPOOL();
+ for ( USHORT nPos = 0; nPos < pMenu->GetItemCount(); ++nPos )
+ {
+ USHORT nId = pMenu->GetItemId(nPos);
+ pMenu->SetHelpText( nId, rSlotPool.GetSlotHelpText_Impl(nId) );
+ }
+ }
+
+ // bis zum Deactivate die Statusupdates unterdr"ucken
+ pBindings->ENTERREGISTRATIONS(); ++nLocks; bIsActive = TRUE;
+
+ if ( pAutoDeactivate ) // QAP-Hack
+ pAutoDeactivate->Start();
+
+ // erledigt
+ return TRUE;
+ }
+ else
+ {
+ // VirtualMenu fuer SubMenu finden und ggf. an VirtualMenu binden
+ BOOL bRet = Bind_Impl( pMenu );
+#ifdef DBG_UTIL
+ if ( !bRet)
+ DBG_WARNING( "W1: Virtual menu konnte nicht erzeugt werden!" );
+#endif
+ return bRet;
+ }
+
+ return FALSE; // dead code for WTC
+}
+
+//--------------------------------------------------------------------
+
+IMPL_LINK( SfxVirtualMenu, Deactivate, Menu *, pMenu )
+{
+ DBG_MEMTEST();
+ DBG_OUTF( ("SfxVirtualMenu %lx deactivated %lx, own %lx", this, pMenu, pSVMenu) );
+ if ( bIsActive && ( 0 == pMenu || pMenu == pSVMenu ) )
+ {
+ if ( pAutoDeactivate )
+ pAutoDeactivate->Stop();
+
+ // Bis auf die Menubar k"onnen alle Controller unbinded werden, wenn
+ // das Menue deaktiviert ( = zugeklappt ) wird
+ if ( pParent )
+ UnbindControllers();
+ pBindings->LEAVEREGISTRATIONS(); --nLocks; bIsActive = FALSE;
+ }
+ return TRUE;
+}
+//--------------------------------------------------------------------
+
+// called on activation of the SV-Menu
+
+IMPL_LINK( SfxVirtualMenu, Select, Menu *, pMenu )
+{
+ USHORT nId = (USHORT) pMenu->GetCurItemId();
+ DBG_OUTF( ("SfxVirtualMenu %lx selected %u from %lx", this, nId, pMenu) );
+
+ if ( pSVMenu->GetItemCommand( nId ).Len() )
+ {
+ SfxMenuCtrlArr_Impl& rCtrlArr = GetAppCtrl_Impl();
+ for ( USHORT nPos=0; nPos<rCtrlArr.Count(); nPos++ )
+ {
+ SfxMenuControl* pCtrl = rCtrlArr[nPos];
+ if ( pCtrl->GetId() == nId )
+ {
+ SfxUnoMenuControl *pUnoCtrl = (SfxUnoMenuControl*) pCtrl;
+ pUnoCtrl->Select();
+ return TRUE;
+ }
+ }
+ }
+
+ if ( nId >= ITEMID_MDIWINDOW )
+ {
+ SfxFrameArr_Impl& rArr = *SFX_APP()->Get_Impl()->pTopFrames;
+ sal_uInt16 nWindowId = nId - ITEMID_MDIWINDOW;
+ if ( nWindowId < rArr.Count() )
+ {
+ SfxFrame *pFrame = rArr[ nWindowId ];
+ SfxViewFrame *pView = pFrame->GetCurrentViewFrame();
+ pView->MakeActive_Impl( TRUE );
+ return sal_True;
+ }
+ }
+
+ pBindings->Execute( nId );
+
+ return TRUE;
+}
+//--------------------------------------------------------------------
+
+// return the position of the specified item
+
+USHORT SfxVirtualMenu::GetItemPos( USHORT nItemId ) const
+{
+ DBG_MEMTEST();
+ DBG_CHKTHIS(SfxVirtualMenu, 0);
+
+ for ( USHORT nPos = 0; nPos < nCount; ++nPos )
+ if ( (pItems+nPos)->GetId() == nItemId )
+ return nPos;
+ return MENU_ITEM_NOTFOUND;
+}
+//--------------------------------------------------------------------
+
+// returns the associated StarView-menu
+
+Menu* SfxVirtualMenu::GetSVMenu() const
+{
+ DBG_MEMTEST();
+ DBG_CHKTHIS(SfxVirtualMenu, 0);
+
+ return pSVMenu;
+}
+
+//--------------------------------------------------------------------
+
+// returns the popup-menu assigned to the item or 0 if none
+
+SfxVirtualMenu* SfxVirtualMenu::GetPopupMenu( USHORT nId ) const
+{
+ DBG_MEMTEST();
+ DBG_CHKTHIS(SfxVirtualMenu, 0);
+
+ USHORT nPos = GetItemPos(nId);
+ if ( nPos != MENU_ITEM_NOTFOUND )
+ return (pItems+nPos)->GetPopupMenu();
+ return 0;
+}
+//--------------------------------------------------------------------
+
+// returns the text of the item as currently shown in the menu
+
+String SfxVirtualMenu::GetItemText( USHORT nId ) const
+{
+ DBG_MEMTEST();
+ DBG_CHKTHIS(SfxVirtualMenu, 0);
+
+ USHORT nPos = GetItemPos(nId);
+ if ( nPos != MENU_ITEM_NOTFOUND )
+ return (pItems+nPos)->GetTitle();
+ return String();
+}
+//--------------------------------------------------------------------
+
+// returns the text of the item as currently shown in the menu
+
+String SfxVirtualMenu::GetItemHelpText( USHORT nId ) const
+{
+ DBG_MEMTEST();
+ DBG_CHKTHIS(SfxVirtualMenu, 0);
+
+ USHORT nPos = GetItemPos(nId);
+ if ( nPos != MENU_ITEM_NOTFOUND )
+ return (pItems+nPos)->GetHelpText();
+ return String();
+}
+
+//--------------------------------------------------------------------
+
+void SfxVirtualMenu::InvalidateKeyCodes()
+{
+ DBG_ASSERT( pSVMenu, "invalidating key of incomplete menu" );
+
+ SfxApplication* pSfxApp = SFX_APP();
+ SfxViewFrame *pViewFrame = pSfxApp->GetViewFrame();
+ SfxAcceleratorManager* pAccMgr = pViewFrame->GetViewShell()->GetAccMgr_Impl();
+ if ( !pAccMgr )
+ return;
+
+ SfxAcceleratorManager* pAppAccel = pSfxApp->GetAppAccel_Impl();
+ for ( USHORT nPos = 0; nPos < pSVMenu->GetItemCount(); ++nPos )
+ {
+ USHORT nId = pSVMenu->GetItemId(nPos);
+ SfxVirtualMenu *pPopup = GetPopupMenu(nId);
+ if ( pPopup )
+ pPopup->InvalidateKeyCodes();
+ else if ( nId )
+ {
+ KeyCode aCode = pAccMgr->GetKeyCode( nId );
+ if ( !aCode.GetCode() && pAccMgr != pAppAccel )
+ aCode = pAppAccel->GetKeyCode( nId );
+ pSVMenu->SetAccelKey( nId, aCode );
+ }
+ }
+}
+
+//--------------------------------------------------------------------
+
+// set the checkmark of the specified item
+
+void SfxVirtualMenu::CheckItem( USHORT nItemId, BOOL bCheck )
+{
+ DBG_MEMTEST();
+ DBG_CHKTHIS(SfxVirtualMenu, 0);
+ DBG_ASSERT( this != 0, "");
+ DBG_ASSERT( pSVMenu != 0, "" );
+ if (pSVMenu->GetItemPos( nItemId ) != MENU_ITEM_NOTFOUND )
+ pSVMenu->CheckItem( nItemId, bCheck );
+}
+//--------------------------------------------------------------------
+
+// set the enabled-state of the specified item
+
+void SfxVirtualMenu::EnableItem( USHORT nItemId, BOOL bEnable )
+{
+ DBG_MEMTEST();
+ DBG_CHKTHIS(SfxVirtualMenu, 0);
+ DBG_ASSERT( this != 0, "");
+ DBG_ASSERT( pSVMenu != 0, "" );
+
+ if (pSVMenu->GetItemPos( nItemId ) != MENU_ITEM_NOTFOUND )
+ pSVMenu->EnableItem( nItemId, bEnable );
+}
+//--------------------------------------------------------------------
+
+// set the text of the specified item
+
+void SfxVirtualMenu::SetItemText( USHORT nItemId, const String& rText )
+{
+ DBG_MEMTEST();
+ DBG_CHKTHIS(SfxVirtualMenu, 0);
+ DBG_ASSERT( this != 0, "");
+ DBG_ASSERT( pSVMenu != 0, "" );
+ if (pSVMenu->GetItemPos( nItemId ) != MENU_ITEM_NOTFOUND )
+ pSVMenu->SetItemText( nItemId, rText );
+}
+
+//--------------------------------------------------------------------
+
+//
+
+void SfxVirtualMenu::SetPopupMenu( USHORT nId, PopupMenu *pMenu )
+{
+ DBG_MEMTEST();
+ DBG_CHKTHIS(SfxVirtualMenu, 0);
+
+ if (pSVMenu->GetItemPos( nId ) != MENU_ITEM_NOTFOUND )
+ GetSVMenu()->SetPopupMenu( nId, pMenu );
+ for ( USHORT n = 0; n < nCount; ++n )
+ {
+ SfxVirtualMenu *pSubMenu = (pItems+n)->GetPopupMenu();
+ if ( pSubMenu )
+ pSubMenu->SetPopupMenu( nId, pMenu );
+ }
+}
+
+//--------------------------------------------------------------------
+
+// Erzwingt die Initialisierung, die sonst nur im Activate kommt
+
+void SfxVirtualMenu::InitPopup( USHORT nPos, BOOL bOLE )
+{
+ DBG_MEMTEST();
+ DBG_CHKTHIS(SfxVirtualMenu, 0);
+
+ USHORT nSID = pSVMenu->GetItemId(nPos);
+ PopupMenu *pMenu = pSVMenu->GetPopupMenu( nSID );
+
+ DBG_ASSERT( pMenu, "Hier gibt es kein Popup!");
+
+ SfxMenuControl &rCtrl = pItems[nPos];
+ if ( !rCtrl.GetId() )
+ {
+ // VirtualMenu f"ur Sub-Menu erzeugen
+ BOOL bRes = bResCtor;
+ SfxVirtualMenu *pSubMenu =
+ new SfxVirtualMenu(nSID, this, *pMenu, FALSE, *pBindings, bOLE, bRes);
+
+ DBG_OUTF( ("Neues VirtualMenu %lx erzeugt", pSubMenu) );
+
+ rCtrl.Bind( this, nSID, *pSubMenu,
+ pSVMenu->GetItemText(nSID), pSVMenu->GetHelpText(nSID),
+ *pBindings );
+ }
+}
+
+void SfxVirtualMenu::InitializeHelp()
+{
+ SfxSlotPool &rSlotPool = SFX_SLOTPOOL();
+ for ( USHORT nPos = 0; nPos<pSVMenu->GetItemCount(); ++nPos )
+ {
+ USHORT nId = pSVMenu->GetItemId(nPos);
+ if ( !bHelpInitialized )
+ pSVMenu->SetHelpText( nId, rSlotPool.GetSlotHelpText_Impl( nId ) );
+ SfxMenuControl &rCtrl = pItems[nPos];
+ if ( nId && !rCtrl.GetId() )
+ {
+ InitPopup( nPos, TRUE );
+ }
+
+ SfxVirtualMenu *pSubMenu = rCtrl.GetPopupMenu();
+ if ( pSubMenu )
+ pSubMenu->InitializeHelp();
+ }
+
+ bHelpInitialized = TRUE;
+}
+
+typedef ULONG (__LOADONCALLAPI *HelpIdFunc) ( const String& );
+
+void SfxVirtualMenu::SetHelpIds( ResMgr *pRes )
+{
+ pResMgr = pRes;
+/* SvLibrary aLib( SVLIBRARY( "ss" ) );
+ if ( aLib.ModulFound() )
+ {
+ HelpIdFunc pFunc = (HelpIdFunc) aLib.GetFunction( DEFINE_CONST_UNICODE("GetHelpId") );
+ if ( pFunc )
+ {
+ for ( USHORT nPos=0; nPos<pSVMenu->GetItemCount(); nPos++ )
+ {
+ USHORT nId = pSVMenu->GetItemId( nPos );
+ SfxVirtualMenu *pPopup = GetPopupMenu(nId);
+ if ( pPopup )
+ pPopup->SetHelpIds( pResMgr );
+ else
+ {
+ USHORT nHelpId = (*pFunc)( pSVMenu->GetItemCommand( nId ) );
+ pSVMenu->SetHelpId( nId, nHelpId );
+ }
+ }
+ }
+ }*/
+}
+
+void SfxVirtualMenu::SetRemoveDisabledEntries()
+{
+ bRemoveDisabledEntries = TRUE;
+}
+
+void SfxVirtualMenu::RemoveDisabledEntries()
+{
+ pBindings->ENTERREGISTRATIONS();
+
+ // Zuerst die Spezial-Controller
+ SfxMenuCtrlArr_Impl& rCtrlArr = GetAppCtrl_Impl();
+ USHORT nPos;
+ for ( nPos=0; nPos<rCtrlArr.Count(); nPos++ )
+ {
+ SfxMenuControl* pCtrl = rCtrlArr[nPos];
+ USHORT nId = pCtrl->GetId();
+ if ( !pSVMenu->IsItemEnabled( nId ) && pCtrl->IsBound() )
+ pCtrl->UnBind();
+ }
+
+ for ( nPos = 0; nPos<nCount; ++nPos )
+ {
+ SfxMenuControl &rCtrl = pItems[nPos];
+ USHORT nId = rCtrl.GetId();
+ if ( nId && !pSVMenu->IsItemEnabled( nId ) && rCtrl.IsBound() )
+ rCtrl.UnBind();
+
+ SfxVirtualMenu *pPopup = rCtrl.GetPopupMenu();
+ if ( pPopup )
+ {
+ pPopup->RemoveDisabledEntries();
+ if ( !pPopup->pSVMenu->GetItemCount() )
+ {
+ rCtrl.RemovePopup();
+ pSVMenu->RemoveItem( pSVMenu->GetItemPos( nId ) );
+ }
+ }
+ }
+
+ pSVMenu->RemoveDisabledEntries( FALSE, FALSE );
+ pBindings->LEAVEREGISTRATIONS();
+}
+
+
diff --git a/sfx2/source/notify/hintpost.cxx b/sfx2/source/notify/hintpost.cxx
new file mode 100644
index 000000000000..0bc880ec6b68
--- /dev/null
+++ b/sfx2/source/notify/hintpost.cxx
@@ -0,0 +1,245 @@
+/*************************************************************************
+ *
+ * $RCSfile: hintpost.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:35 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#pragma hdrstop
+
+#include "arrdecl.hxx"
+#include "hintpost.hxx"
+#include "app.hxx"
+#include "sfxtypes.hxx"
+
+//====================================================================
+
+void SfxHintPoster::RegisterEvent()
+{
+ DBG_MEMTEST();
+}
+
+//--------------------------------------------------------------------
+
+SfxHintPoster::SfxHintPoster()
+{
+ RegisterEvent();
+}
+
+//--------------------------------------------------------------------
+
+SfxHintPoster::SfxHintPoster( const GenLink& rLink ):
+ aLink(rLink)
+{
+}
+
+
+//--------------------------------------------------------------------
+
+SfxHintPoster::~SfxHintPoster()
+{
+}
+
+//--------------------------------------------------------------------
+
+void SfxHintPoster::Post( SfxHint* pHintToPost )
+{
+ GetpApp()->PostUserEvent( ( LINK(this, SfxHintPoster, DoEvent_Impl) ), pHintToPost );
+ AddRef();
+}
+
+//--------------------------------------------------------------------
+
+IMPL_LINK_INLINE_START( SfxHintPoster, DoEvent_Impl, SfxHint *, pPostedHint )
+{
+ DBG_MEMTEST();
+ Event( pPostedHint );
+ ReleaseRef();
+ return 0;
+}
+IMPL_LINK_INLINE_END( SfxHintPoster, DoEvent_Impl, SfxHint *, pPostedHint )
+
+//--------------------------------------------------------------------
+
+void SfxHintPoster::Event( SfxHint* pPostedHint )
+{
+ aLink.Call( pPostedHint );
+}
+
+//--------------------------------------------------------------------
+
+void SfxHintPoster::SetEventHdl( const GenLink& rLink )
+{
+ DBG_MEMTEST();
+ aLink = rLink;
+}
+
+
+#define LOG( x )
+#if 0
+#define LOG( x ) \
+{ \
+ SvFileStream aStrm( "f:\\temp\\log", STREAM_READWRITE ); \
+ aStrm.Seek( STREAM_SEEK_TO_END ); \
+ aStrm << x.GetStr() << '\n'; \
+}
+#endif
+
+
+//--------------------------------------------------------------------
+
+void AsynchronLink::CreateMutex()
+{
+ if( !_pMutex ) _pMutex = new NAMESPACE_VOS( OMutex );
+}
+
+void AsynchronLink::Call( void* pObj, BOOL bAllowDoubles, BOOL bUseTimer )
+{
+#ifdef DBG_UTIL
+ if ( bUseTimer || !_bInCall )
+ DBG_WARNING( "Recursives Call. Eher ueber Timer. TLX Fragen" );
+#endif
+ if( _aLink.IsSet() )
+ {
+ _pArg = pObj;
+ DBG_ASSERT( bAllowDoubles ||
+ ( !_nEventId && ( !_pTimer || !_pTimer->IsActive() ) ),
+ "Schon ein Call unterwegs" );
+ if( _nEventId )
+ {
+ if( _pMutex ) _pMutex->acquire();
+ LOG( String( "Remove " ) + String( _nEventId ) );
+ Application::RemoveUserEvent( _nEventId );
+ if( _pMutex ) _pMutex->release();
+ }
+ if( _pTimer )_pTimer->Stop();
+ if( bUseTimer )
+ {
+ if( !_pTimer )
+ {
+ _pTimer = new Timer;
+ _pTimer->SetTimeout( 0 );
+ _pTimer->SetTimeoutHdl( STATIC_LINK(
+ this, AsynchronLink, HandleCall) );
+ }
+ _pTimer->Start();
+ }
+ else
+ {
+ if( _pMutex ) _pMutex->acquire();
+ Application::PostUserEvent( _nEventId, STATIC_LINK( this, AsynchronLink, HandleCall), 0 );
+ LOG( String( "Posted " ) + String( _nEventId ) );
+ if( _pMutex ) _pMutex->release();
+ }
+ }
+}
+
+AsynchronLink::~AsynchronLink()
+{
+ if( _nEventId )
+ {
+ LOG( String( "Remove " ) + String( _nEventId ) );
+ Application::RemoveUserEvent( _nEventId );
+ }
+ delete _pTimer;
+ if( _pDeleted ) *_pDeleted = TRUE;
+ delete _pMutex;
+}
+
+IMPL_STATIC_LINK( AsynchronLink, HandleCall, void*, EMPTYARG )
+{
+ if( pThis->_pMutex ) pThis->_pMutex->acquire();
+ pThis->_nEventId = 0;
+ if( pThis->_pMutex ) pThis->_pMutex->release();
+ pThis->Call_Impl( pThis->_pArg );
+ return 0;
+}
+
+void AsynchronLink::ForcePendingCall()
+{
+ ClearPendingCall();
+ Call_Impl( _pArg );
+}
+
+void AsynchronLink::ClearPendingCall()
+{
+ if( _pMutex ) _pMutex->acquire();
+ if( _nEventId )
+ {
+ Application::RemoveUserEvent( _nEventId );
+ _nEventId = 0;
+ }
+ if( _pMutex ) _pMutex->release();
+ if( _pTimer ) _pTimer->Stop();
+}
+
+void AsynchronLink::Call_Impl( void* pArg )
+{
+ _bInCall = TRUE;
+ BOOL bDeleted = FALSE;
+ _pDeleted = &bDeleted;
+ _aLink.Call( pArg );
+ if( !bDeleted )
+ {
+ _bInCall = FALSE;
+ _pDeleted = 0;
+ }
+}
+
+SV_IMPL_PTRARR( AsynchronLinkArr_Impl, AsynchronLink* );
+
+
diff --git a/sfx2/source/notify/makefile.mk b/sfx2/source/notify/makefile.mk
new file mode 100644
index 000000000000..e3dca5e8ed16
--- /dev/null
+++ b/sfx2/source/notify/makefile.mk
@@ -0,0 +1,91 @@
+#*************************************************************************
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.1.1.1 $
+#
+# last change: $Author: hr $ $Date: 2000-09-18 16:52:35 $
+#
+# The Contents of this file are made available subject to the terms of
+# either of the following licenses
+#
+# - GNU Lesser General Public License Version 2.1
+# - Sun Industry Standards Source License Version 1.1
+#
+# Sun Microsystems Inc., October, 2000
+#
+# GNU Lesser General Public License Version 2.1
+# =============================================
+# Copyright 2000 by Sun Microsystems, Inc.
+# 901 San Antonio Road, Palo Alto, CA 94303, USA
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License version 2.1, as published by the Free Software Foundation.
+#
+# This library 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 for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+#
+# Sun Industry Standards Source License Version 1.1
+# =================================================
+# The contents of this file are subject to the Sun Industry Standards
+# Source License Version 1.1 (the "License"); You may not use this file
+# except in compliance with the License. You may obtain a copy of the
+# License at http://www.openoffice.org/license.html.
+#
+# Software provided under this License is provided on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+# See the License for the specific provisions governing your rights and
+# obligations concerning the Software.
+#
+# The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+#
+# Copyright: 2000 by Sun Microsystems, Inc.
+#
+# All Rights Reserved.
+#
+# Contributor(s): _______________________________________
+#
+#
+#
+#*************************************************************************
+
+PRJ=..$/..
+
+PRJNAME=sfx2
+TARGET=notify
+.INCLUDE : $(PRJ)$/util$/makefile.pmk
+AUTOSEG=true
+
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : svpre.mk
+.INCLUDE : settings.mk
+.INCLUDE : sv.mk
+
+# --- Files --------------------------------------------------------
+
+CXXFILES = \
+ hintpost.cxx \
+ linkhdl.cxx \
+ $(PROJECTPCHSOURCE).cxx
+
+SLOFILES = \
+ $(SLO)$/hintpost.obj \
+ $(SLO)$/linkhdl.obj
+
+# --- Tagets -------------------------------------------------------
+
+.INCLUDE : target.mk
+
diff --git a/sfx2/source/statbar/makefile.mk b/sfx2/source/statbar/makefile.mk
new file mode 100644
index 000000000000..311747a2176c
--- /dev/null
+++ b/sfx2/source/statbar/makefile.mk
@@ -0,0 +1,100 @@
+#*************************************************************************
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.1.1.1 $
+#
+# last change: $Author: hr $ $Date: 2000-09-18 16:52:35 $
+#
+# The Contents of this file are made available subject to the terms of
+# either of the following licenses
+#
+# - GNU Lesser General Public License Version 2.1
+# - Sun Industry Standards Source License Version 1.1
+#
+# Sun Microsystems Inc., October, 2000
+#
+# GNU Lesser General Public License Version 2.1
+# =============================================
+# Copyright 2000 by Sun Microsystems, Inc.
+# 901 San Antonio Road, Palo Alto, CA 94303, USA
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License version 2.1, as published by the Free Software Foundation.
+#
+# This library 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 for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+#
+# Sun Industry Standards Source License Version 1.1
+# =================================================
+# The contents of this file are subject to the Sun Industry Standards
+# Source License Version 1.1 (the "License"); You may not use this file
+# except in compliance with the License. You may obtain a copy of the
+# License at http://www.openoffice.org/license.html.
+#
+# Software provided under this License is provided on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+# See the License for the specific provisions governing your rights and
+# obligations concerning the Software.
+#
+# The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+#
+# Copyright: 2000 by Sun Microsystems, Inc.
+#
+# All Rights Reserved.
+#
+# Contributor(s): _______________________________________
+#
+#
+#
+#*************************************************************************
+
+PRJ=..$/..
+
+PRJNAME=sfx2
+TARGET=statbar
+ENABLE_EXCEPTIONS=TRUE
+.INCLUDE : $(PRJ)$/util$/makefile.pmk
+AUTOSEG=true
+
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : svpre.mk
+.INCLUDE : settings.mk
+.INCLUDE : sv.mk
+
+# --- Files --------------------------------------------------------
+
+IMGLST_SRS=$(SRS)$/statbar.srs
+BMP_IN=$(PRJ)$/win/res
+
+CXXFILES = \
+ stbmgr.cxx \
+ stbitem.cxx \
+ progind.cxx \
+ $(PROJECTPCHSOURCE).cxx
+
+SRCFILES = \
+ statbar.src
+
+SLOFILES = \
+ $(SLO)$/stbmgr.obj \
+ $(SLO)$/stbitem.obj \
+ $(SLO)$/progind.obj
+
+# --- Targets -------------------------------------------------------
+
+.INCLUDE : target.mk
+
diff --git a/sfx2/source/statbar/stbitem.cxx b/sfx2/source/statbar/stbitem.cxx
new file mode 100644
index 000000000000..cdbfb2a1c780
--- /dev/null
+++ b/sfx2/source/statbar/stbitem.cxx
@@ -0,0 +1,357 @@
+/*************************************************************************
+ *
+ * $RCSfile: stbitem.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:35 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _SFXSTRITEM_HXX //autogen
+#include <svtools/stritem.hxx>
+#endif
+#pragma hdrstop
+
+#include "stbitem.hxx"
+#include "sfxtypes.hxx"
+#include "stbmgr.hxx"
+#include "msg.hxx"
+#include "arrdecl.hxx"
+#include "bindings.hxx"
+#include "msgdescr.hxx"
+#include "msgpool.hxx"
+#include "module.hxx"
+#include "dispatch.hxx"
+
+#include "sfx.hrc"
+
+//--------------------------------------------------------------------
+
+SfxStatusBarControl::SfxStatusBarControl
+(
+ USHORT nId, /* Slot-Id, mit der diese Instanz
+ verbunden wird. Wurde bei der
+ Registrierung eine Slot-Id != 0
+ angegeben, ist dies immer die dort
+ angegebene. */
+
+ StatusBar& rBar, /* Referenz auf die StatusBar, f"ur die
+ dieses Control erzeugt wurde. */
+ SfxBindings& rBindings // Die Bindings dieses Controls
+)
+
+/* [Beschreibung]
+
+ Konstruktor der Klasse SfxStatusBarControl. Die Subclasses werden
+ bei Bedarf per Factory vom SFx erzeugt.
+
+ Instanzen dieser Basisklasse werden f"ur alle StatusBar-Felder
+ erzeugt, f"ur die keine speziellen registriert wurden.
+*/
+
+: SfxControllerItem(nId, rBindings),
+ pBar(&rBar)
+{
+ DBG( CheckConfigure_Impl(SFX_SLOT_STATUSBARCONFIG) );
+}
+
+//--------------------------------------------------------------------
+
+SfxStatusBarControl::~SfxStatusBarControl()
+
+/* [Beschreibung]
+
+ Destruktor der Klasse SfxStatusBarControl. Die Instanzen dieser
+ Klasse und deren Subklassen werden vom SFx zerst"ort.
+*/
+
+{}
+
+//--------------------------------------------------------------------
+
+void SfxStatusBarControl::StateChanged
+(
+ USHORT nSID,
+ SfxItemState eState,
+ const SfxPoolItem* pState /* Zeiger auf ein SfxPoolItem, welches nur
+ innerhalb dieses Methodenaufrufs g"ultig
+ ist. Es kann ein 0-Pointer, ein Pointer
+ auf ein SfxVoidItem oder auf den Typ, f"ur
+ den die Subclass von SfxStatusBarControl
+ registriert ist vorkommen. */
+)
+
+/* [Beschreibung]
+
+ Die Basisimplementation versteht Items vom Type SfxStringItem, bei
+ denen der Text in das Status-Zeilen-Feld eingetragen wird und
+ SfxVoidItem, bei denen das Feld geleert wird. Die Basisimplementierng
+ sollte in "uberladenen Methoden nicht gerufen werden.
+*/
+
+{
+ DBG_MEMTEST();
+ DBG_ASSERT( pBar != 0, "setting state to dangling StatusBar" );
+
+ if ( eState == SFX_ITEM_AVAILABLE && pState->ISA(SfxStringItem) )
+ pBar->SetItemText( nSID,
+ PTR_CAST(SfxStringItem,pState)->GetValue() );
+ else
+ {
+ DBG_ASSERT( eState != SFX_ITEM_AVAILABLE|| pState->ISA(SfxVoidItem),
+ "wrong SfxPoolItem subclass in SfxStatusBarControl" );
+ pBar->SetItemText( nSID, String() );
+ }
+}
+
+//--------------------------------------------------------------------
+
+BOOL SfxStatusBarControl::MouseButtonDown( const MouseEvent & )
+
+/* [Beschreibung]
+
+ Diese virtuelle Methode ist eine Weiterleitung des Events
+ MouseButtonDown() der StatusBar, falls die Maus-Position innerhalb
+ des Bereichs des betreffenden Items ist, oder die Maus von diesem
+ Control mit <SfxStatusBarControl::CaptureMouse()> gecaptured wurde.
+
+ Die Defaultimplementierung ist leer und gibt FALSE zur"uck.
+
+
+ [Rckgabewert]
+
+ BOOL TRUE
+ das Event wurde bearbeitet und soll nicht an
+ die StatusBar weitergeleitet werden
+
+ FALSE
+ das Event wurde nicht bearbeitet und soll an
+ die StatusBar weitergeleitet werden
+*/
+
+{
+ return FALSE;
+}
+
+//--------------------------------------------------------------------
+
+BOOL SfxStatusBarControl::MouseMove( const MouseEvent & )
+
+/* [Beschreibung]
+
+ Diese virtuelle Methode ist eine Weiterleitung des Events
+ MouseMove() der StatusBar, falls die Maus-Position innerhalb
+ des Bereichs des betreffenden Items ist, oder die Maus von diesem
+ Control mit <SfxStatusBarControl::CaptureMouse()> gecaptured wurde.
+
+ Die Defaultimplementierung ist leer und gibt FALSE zur"uck.
+
+
+ [Rckgabewert]
+
+ BOOL TRUE
+ das Event wurde bearbeitet und soll nicht an
+ die StatusBar weitergeleitet werden
+
+ FALSE
+ das Event wurde nicht bearbeitet und soll an
+ die StatusBar weitergeleitet werden
+*/
+
+{
+ return FALSE;
+}
+
+//--------------------------------------------------------------------
+
+BOOL SfxStatusBarControl::MouseButtonUp( const MouseEvent & )
+
+/* [Beschreibung]
+
+ Diese virtuelle Methode ist eine Weiterleitung des Events
+ MouseButtonUp() der StatusBar, falls die Maus-Position innerhalb
+ des Bereichs des betreffenden Items ist, oder die Maus von diesem
+ Control mit <SfxStatusBarControl::CaptureMouse()> gecaptured wurde.
+
+ Die Defaultimplementierung ist leer und gibt FALSE zur"uck.
+
+
+ [Rckgabewert]
+
+ BOOL TRUE
+ das Event wurde bearbeitet und soll nicht an
+ die StatusBar weitergeleitet werden
+
+ FALSE
+ das Event wurde nicht bearbeitet und soll an
+ die StatusBar weitergeleitet werden
+*/
+
+{
+ return FALSE;
+}
+
+//--------------------------------------------------------------------
+
+void SfxStatusBarControl::Command( const CommandEvent &rEvt )
+
+/* [Beschreibung]
+
+ Diese virtuelle Methode wird gerufen, wenn f"ur dieses SfxStatusBarControl
+ ein CommandEvent f"ur erkannt wurde.
+
+ Die Defaultimplementierung ist leer.
+*/
+
+{
+}
+
+//--------------------------------------------------------------------
+
+void SfxStatusBarControl::Click()
+
+/* [Beschreibung]
+
+ Diese virtuelle Methode wird gerufen, wenn der Anwender mit der Maus
+ in das zu diesem Control geh"orige Feld der Statuszeile klickt.
+
+ Die Defaultimplementierung ist leer.
+*/
+
+{
+}
+
+//--------------------------------------------------------------------
+
+void SfxStatusBarControl::DoubleClick()
+
+/* [Beschreibung]
+
+ Diese virtuelle Methode wird gerufen, wenn der Anwender mit der Maus
+ in das zu diesem Control geh"orige Feld der Statuszeile doppel-klickt.
+
+ Die Defaultimplementierung ist leer.
+*/
+
+{
+ GetBindings().Execute( GetId() );
+}
+
+//--------------------------------------------------------------------
+
+void SfxStatusBarControl::Paint
+(
+ const UserDrawEvent& rUDEvt /* Referenz auf einen UserDrawEvent */
+)
+
+/* [Beschreibung]
+
+ Diese virtuelle Methode wird gerufen, falls das betreffende Feld
+ mit SIB_USERDRAW gekennzeichnet ist, um den Inhalt zu zeichnen.
+ Die Ausgabe mu"s auf dem in durch rUDEvt.GetDevice() erh"altlichen
+ OutputDevice innerhalb des durch rUDEvt.GetRect() angegebenenen
+ Rechtecks erfolgen.
+
+ Die Defaultimplementierung ist leer.
+*/
+
+{
+}
+
+//--------------------------------------------------------------------
+
+SfxStatusBarControl* SfxStatusBarControl::CreateControl
+(
+ USHORT nId,
+ StatusBar* pBar,
+ SfxBindings& rBindings,
+ SfxModule* pMod
+)
+{
+ SfxApplication *pApp = SFX_APP();
+ SfxSlotPool *pSlotPool;
+ if ( pMod )
+ pSlotPool = pMod->GetSlotPool();
+ else
+ pSlotPool = &pApp->GetSlotPool();
+ TypeId aSlotType = pSlotPool->GetSlotType(nId);
+ if ( aSlotType )
+ {
+ SfxDispatcher *pDisp = rBindings.GetDispatcher_Impl();
+ if ( pMod )
+ {
+ SfxStbCtrlFactArr_Impl *pFactories = pMod->GetStbCtrlFactories_Impl();
+ if ( pFactories )
+ {
+ SfxStbCtrlFactArr_Impl &rFactories = *pFactories;
+ for ( USHORT nFactory = 0; nFactory < rFactories.Count(); ++nFactory )
+ if ( rFactories[nFactory]->nTypeId == aSlotType &&
+ ( ( rFactories[nFactory]->nSlotId == 0 ) ||
+ ( rFactories[nFactory]->nSlotId == nId) ) )
+ return rFactories[nFactory]->pCtor( nId, *pBar, rBindings );
+ }
+ }
+
+ SfxStbCtrlFactArr_Impl &rFactories = pApp->GetStbCtrlFactories_Impl();
+ for ( USHORT nFactory = 0; nFactory < rFactories.Count(); ++nFactory )
+ if ( rFactories[nFactory]->nTypeId == aSlotType &&
+ ( ( rFactories[nFactory]->nSlotId == 0 ) ||
+ ( rFactories[nFactory]->nSlotId == nId) ) )
+ return rFactories[nFactory]->pCtor( nId, *pBar, rBindings );
+ }
+ return new SfxStatusBarControl( nId, *pBar, rBindings );
+}
+ //--------------------------------------------------------------------
+
diff --git a/sfx2/source/toolbox/imgmgr.cxx b/sfx2/source/toolbox/imgmgr.cxx
new file mode 100644
index 000000000000..42fcfc6ef1a0
--- /dev/null
+++ b/sfx2/source/toolbox/imgmgr.cxx
@@ -0,0 +1,1150 @@
+/*************************************************************************
+ *
+ * $RCSfile: imgmgr.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:35 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _STREAM_HXX //autogen
+#include <tools/stream.hxx>
+#endif
+#ifndef _SV_WRKWIN_HXX //autogen
+#include <vcl/wrkwin.hxx>
+#endif
+#ifndef _SV_BITMAP_HXX
+#include <vcl/bitmap.hxx>
+#endif
+#pragma hdrstop
+
+#include "imgmgr.hxx"
+#include "sfx.hrc"
+#include "app.hxx"
+#include "sfxresid.hxx"
+#include "tbxmgr.hxx"
+#include "bindings.hxx"
+#include "statcach.hxx"
+#include "module.hxx"
+#include "sfxtypes.hxx"
+#include "viewfrm.hxx"
+
+static const USHORT nVersion = 5;
+
+//=========================================================================
+
+// Enth"alt eine Kombination aus Bitmap und zugeordneter SlotId
+struct ToolboxBitmap_Impl
+{
+ USHORT nId;
+ Bitmap* pBitmap;
+
+ ToolboxBitmap_Impl( USHORT n, const Bitmap& rBmp ) : nId( n )
+ {
+ pBitmap = new Bitmap( rBmp );
+ }
+
+ ~ToolboxBitmap_Impl() { delete pBitmap; }
+};
+
+// Enth"alt einen Ptr auf eine registrierte Toolbox und Flags f"ur die
+// Ereignisse, bei denen die Toolbox upgedatet werden soll
+struct ToolBoxInf_Impl
+{
+ SfxToolBoxManager* pMgr;
+ SfxModule* pModule;
+ ToolBox *pToolBox;
+ USHORT nFlags;
+};
+
+//-------------------------------------------------------------------------
+
+DECL_PTRARRAY( SfxBitmapArr_Impl, ToolboxBitmap_Impl*, 4, 4 );
+DECL_PTRARRAY( SfxToolBoxArr_Impl, ToolBoxInf_Impl*, 4, 4 );
+
+//-------------------------------------------------------------------------
+
+// Liste der geladenen Userdef-Bitmaps
+class SfxBitmapList_Impl
+{
+ SfxBitmapArr_Impl* pList;
+
+public:
+friend SvStream& operator >> (SvStream& rStream, SfxBitmapList_Impl& rList);
+friend SvStream& operator << (SvStream& rStream, const SfxBitmapList_Impl& rList);
+
+ SfxBitmapList_Impl()
+ { pList = new SfxBitmapArr_Impl; }
+
+ ~SfxBitmapList_Impl()
+ {
+ for (USHORT n=0; n<pList->Count(); n++)
+ delete (*pList)[n];
+ delete pList;
+ }
+
+ USHORT GetBitmapCount() const
+ { return pList->Count(); }
+
+ USHORT GetBitmapId(USHORT n) const
+ { return (*pList)[n]->nId; }
+
+ USHORT GetBitmapPos(USHORT nId) const;
+ Bitmap* GetBitmap(USHORT nId) const;
+ void AddBitmap (USHORT nId, const Bitmap& rpBmp);
+ void ReplaceBitmap (USHORT nId, const Bitmap& rpBmp);
+ void RemoveBitmap (USHORT nId);
+};
+
+//=========================================================================
+
+/* [Beschreibung]
+
+ Liefert die Position einer Bitmap in der internen Bitmapliste
+*/
+
+USHORT SfxBitmapList_Impl::GetBitmapPos( USHORT nId ) const
+{
+ USHORT nPos;
+ for ( nPos=0; nPos<pList->Count(); nPos++ )
+ if ( (*pList)[nPos]->nId == nId ) break;
+
+ if ( nPos < pList->Count() )
+ return nPos;
+ else
+ return USHRT_MAX;
+}
+
+//-------------------------------------------------------------------------
+
+/* [Beschreibung]
+
+ Liefert die Bitmap an der "uebergebenen Position der internen Bitmapliste
+*/
+
+Bitmap* SfxBitmapList_Impl::GetBitmap(USHORT nId) const
+{
+ USHORT nPos;
+ for ( nPos=0; nPos<pList->Count(); nPos++ )
+ if ( (*pList)[nPos]->nId == nId ) break;
+
+ if ( nPos < pList->Count() )
+ return (*pList)[nPos]->pBitmap;
+ else
+ return 0;
+}
+
+//-------------------------------------------------------------------------
+
+/* [Beschreibung]
+
+ F"ugt der internen Bitmapliste eine Bitmap hinzu, die f"ur die "ubergebene
+ SlotId registriert wird. Die Bitmap geht in den Besitz des ImageManagers
+ "uber.
+*/
+
+void SfxBitmapList_Impl::AddBitmap( USHORT nId, const Bitmap& rBmp )
+{
+ for ( USHORT nPos=0; nPos<pList->Count(); nPos++ )
+ if ( (*pList)[nPos]->nId == nId ) break;
+
+ DBG_ASSERT( nPos>=pList->Count(), "Bitmap mit dieser Id schon vorhanden!" );
+
+ ToolboxBitmap_Impl *pTbBmp = new ToolboxBitmap_Impl( nId, rBmp );
+ pList->Append( pTbBmp );
+}
+
+//-------------------------------------------------------------------------
+
+/* [Beschreibung]
+
+ Ersetzt die Bitmap in der internen Bitmapliste, die f"ur die "ubergebene
+ SlotId registriert ist, durch die "ubergebene Bitmap.
+ Die Bitmap geht in den Besitz des ImageManagers "uber.
+*/
+
+void SfxBitmapList_Impl::ReplaceBitmap( USHORT nId, const Bitmap& rBmp )
+{
+ RemoveBitmap( nId );
+ AddBitmap( nId, rBmp );
+}
+
+//-------------------------------------------------------------------------
+
+/* [Beschreibung]
+
+ Entfernt die Bitmap in der internen Bitmapliste, die f"ur die "ubergebene
+ SlotId registriert ist.
+ Da die Bitmap dem ImageManagers geh"ort, wird sie zerst"ort.
+*/
+
+void SfxBitmapList_Impl::RemoveBitmap( USHORT nId )
+{
+ USHORT nPos;
+ for (nPos=0; nPos<pList->Count(); nPos++)
+ if ((*pList)[nPos]->nId == nId) break;
+
+ DBG_ASSERT(nPos<pList->Count(), "Bitmap mit dieser Id unbekannt!");
+
+ if (nPos<pList->Count())
+ {
+ delete (*pList)[nPos];
+ pList->Remove(nPos);
+ }
+}
+
+//-------------------------------------------------------------------------
+
+/* [Beschreibung]
+
+ Liest die interne Bitmapliste aus einem Stream.
+*/
+
+SvStream& operator >> (SvStream& rStream, SfxBitmapList_Impl& rList)
+{
+ USHORT nCount, nId;
+ rStream >> nCount;
+ for (USHORT n=0; n<nCount; n++)
+ {
+ Bitmap aBmp;
+ rStream >> nId >> aBmp;
+ rList.AddBitmap(nId, aBmp);
+ }
+
+ return rStream;
+}
+
+//-------------------------------------------------------------------------
+
+/* [Beschreibung]
+
+ Speichert die interne Bitmapliste in einem Stream,
+*/
+
+SvStream& operator << (SvStream& rStream, const SfxBitmapList_Impl& rList)
+{
+ rStream << rList.GetBitmapCount();
+ for (USHORT n=0; n<rList.GetBitmapCount(); n++)
+ rStream << (*rList.pList)[n]->nId << *((*rList.pList)[n]->pBitmap);
+
+ return rStream;
+}
+
+//-------------------------------------------------------------------------
+
+/* [Beschreibung]
+
+ ctor. Erzeugt einen "leeren" ImageManager; die Initialisierung erfolgt durch
+ Aufruf von UseDefault oder Load.
+*/
+
+SfxImageManager::SfxImageManager() :
+ SfxConfigItem(SFX_ITEMTYPE_IMAGELIST),
+ eSymbolSet(SFX_SYMBOLS_SMALL),
+ pImageList(0),
+ pOffImageList(0),
+ pUserImageList(0),
+ pUserDefList(0),
+ nOutStyle(0)
+{
+ DBG_MEMTEST();
+ SetInternal( TRUE );
+ pToolBoxList = new SfxToolBoxArr_Impl;
+}
+
+//-------------------------------------------------------------------------
+
+/* [Beschreibung]
+
+ dtor. Die angelegten Listen werden freigegeben.
+*/
+
+SfxImageManager::~SfxImageManager()
+{
+ delete pImageList;
+ delete pUserDefList;
+ delete pUserImageList;
+ delete pOffImageList;
+ delete pToolBoxList;
+}
+
+//-------------------------------------------------------------------------
+
+/* [Beschreibung]
+
+ Laden der Konfiguration aus einem Stream. Wenn die abgespeicherte
+ Konfiguration f"ur eine andere Farbtiefe oder eine andere Symbolgr"o\se
+ gilt, wird anhand der gelesenen Daten neu aufgebaut.
+*/
+
+int SfxImageManager::Load(SvStream& rStream)
+{
+ USHORT nFileVersion, nSymbolSet;
+ ULONG nColorCount = Application::GetDefaultDevice()->GetColorCount();
+
+ rStream >> nFileVersion;
+ if ( nFileVersion < nVersion)
+ return SfxConfigItem::WARNING_VERSION;
+
+ rStream >> nSymbolSet // Symbolset, f"ur das abgespeichert wurde
+ >> nColorCount; // Farbtiefe, f"ur die abgespeichert wurde
+
+ SfxSymbolSet eNewSet;
+ if ( eSymbolSet != SFX_SYMBOLS_SMALL )
+ {
+ // Schon von SfxToolBoxConfig initialisiert
+ eNewSet = eSymbolSet; // erw"unscht
+ eSymbolSet = (SfxSymbolSet) nSymbolSet; // Zustand der ImageList
+ }
+ else
+ {
+ // Noch nicht initialisiert, wird ggf. sp"ater nachgeholt
+ eSymbolSet = eNewSet = (SfxSymbolSet) nSymbolSet;
+ }
+
+ MakeLists_Impl( eSymbolSet );
+
+ // Userdef-Listen einlesen
+ rStream >> *pUserImageList;
+ rStream >> *pUserDefList;
+
+ if ( nColorCount != Application::GetDefaultDevice()->GetColorCount() )
+ {
+ // Neuaufbau der Listen erzwingen, wenn Farbtiefe anders
+ eSymbolSet = ( eSymbolSet == SFX_SYMBOLS_SMALL_COLOR ?
+ SFX_SYMBOLS_SMALL :
+ SFX_SYMBOLS_LARGE );
+ }
+
+ // Neuaufbau, wenn anderes SymbolSet
+ if ( eSymbolSet != eNewSet )
+ SetSymbolSet( eNewSet );
+
+ for ( USHORT i=0; i<pImageList->GetImageCount(); i++ )
+ {
+ // An allen registrierten Toolboxen die Images austauschen (Reconfigure)
+ USHORT nId = pImageList->GetImageId(i);
+ ExchangeItemImage_Impl( nId, GetImage(nId) );
+ }
+
+// SvFileStream aBitmapStream( String("d:\\INPUT.BMP"), STREAM_STD_WRITE);
+// aBitmapStream << pUserImageList->GetBitmap();
+
+ return SfxConfigItem::ERR_OK;
+}
+
+
+//-------------------------------------------------------------------------
+
+/* [Beschreibung]
+
+ Legt alle notwendigen Listen an bzw. erzeugt sie neu.
+*/
+
+void SfxImageManager::MakeLists_Impl( SfxSymbolSet )
+{
+ if ( eSymbolSet == SFX_SYMBOLS_SMALL_MONO )
+ eSymbolSet = SFX_SYMBOLS_SMALL_COLOR;
+ if ( eSymbolSet == SFX_SYMBOLS_LARGE_MONO )
+ eSymbolSet = SFX_SYMBOLS_LARGE_COLOR;
+
+ if ( pUserImageList )
+ {
+ // Reconfigure
+ delete pUserImageList;
+ delete pUserDefList;
+ }
+ else
+ {
+ // Erstmaliges Anlegen
+ MakeDefaultImageList_Impl();
+ }
+
+ pUserDefList = new SfxBitmapList_Impl;
+ pUserImageList = new ImageList;
+}
+
+//-------------------------------------------------------------------------
+
+/* [Beschreibung]
+
+ Schreiben in die Konfiguration.
+*/
+
+BOOL SfxImageManager::Store(SvStream& rStream)
+{
+// SvFileStream aBitmapStream(String("d:\\OUTPUT.BMP"), STREAM_STD_WRITE);
+// aBitmapStream << pUserImageList->GetBitmap();
+
+ rStream << nVersion
+ << (USHORT) eSymbolSet
+ << Application::GetDefaultDevice()->GetColorCount();
+
+ rStream << *pUserImageList;
+ rStream << *pUserDefList;
+
+ return TRUE;
+}
+
+//-------------------------------------------------------------------------
+
+/* [Beschreibung]
+
+ Erzeugt eine Imagelist aus der Resource mit dem default ResMgr.
+ Bei Bedarf k"onnen sp"ater andere ImageListen verwendet werden.
+*/
+
+void SfxImageManager::UseDefault()
+{
+ eSymbolSet = SFX_SYMBOLS_SMALL_COLOR;
+ MakeLists_Impl( eSymbolSet );
+
+ SfxConfigItem::UseDefault();
+
+ for (USHORT i=0; i<pImageList->GetImageCount(); i++)
+ {
+ // An allen registrierten Toolboxen die Images austauschen (Reconfigure)
+ USHORT nId = pImageList->GetImageId(i);
+ ExchangeItemImage_Impl( nId, GetImage(nId) );
+ }
+}
+
+//-------------------------------------------------------------------------
+
+String SfxImageManager::GetName() const
+{
+ return (DEFINE_CONST_UNICODE("SfxImageManager"));
+}
+
+//-------------------------------------------------------------------------
+
+/* [Beschreibung]
+
+ Nimmt eine Referenz auf ein Image auf und erweitert die aktuelle ImageList
+ ggf. um ein weiteres Image. Der Zweck dieser Methode ist, da\s verhindert
+ werden mu\s, da\s die Toolbox "uber das Image eine Referenz auf die
+ Quell-Liste diese am Leben erh"alt.
+*/
+
+void SfxImageManager::LockImage( USHORT nId, ToolBox *pBox )
+{
+ // Neue Images kommen aus der Office-Liste
+ if ( !pOffImageList || pOffImageList->GetImagePos( nId ) == IMAGELIST_IMAGE_NOTFOUND )
+ return;
+
+ // Das Image mu\s die richtige Gr"o\e haben
+ if ( pBox->GetItemImage(nId).GetSizePixel() == pImageList->GetImageSize() )
+ {
+ // Ist das Image schon vorhanden ?
+ if ( pUserImageList->GetImagePos( nId ) == IMAGELIST_IMAGE_NOTFOUND )
+ {
+ // Eine physikalische Kopie des Images in der User-Liste machen
+ pUserImageList->AddImage( nId, pBox->GetItemImage( nId ) );
+ SetDefault( FALSE );
+ }
+
+ // In der Toolbox dieses neue Image benutzen, so da\s die Referenz
+ // auf die Quellliste wieder entfernt wird.
+ pBox->SetItemImage( nId, pUserImageList->GetImage( nId ) );
+ }
+}
+
+//-------------------------------------------------------------------------
+
+/* [Beschreibung]
+
+ Wechselt das SymbolSet und baut die aktuellen Listen aus den ImageLists
+ in der Resource wieder auf.
+*/
+
+void SfxImageManager::SetSymbolSet(SfxSymbolSet eNewSet)
+{
+ if ( eNewSet != eSymbolSet && pImageList )
+ {
+ eSymbolSet = eNewSet;
+ Size aOldSize = pImageList->GetImageSize();
+
+ // neue DefaultList erzeugen
+ delete pImageList;
+ MakeDefaultImageList_Impl();
+ Size aNewSize = pImageList->GetImageSize();
+
+ ImageList *pOld = pOffImageList;
+ if ( pOffImageList || !IsDefault() )
+ {
+ // Auch die Officeliste neu erzeugen bzw. neu anlegen
+ DELETEZ( pOffImageList );
+ StartCustomize();
+ }
+
+ if ( !IsDefault() )
+ {
+ // Userliste neu aufbauen
+ Color aColor (0xC0, 0xC0, 0xC0);
+ VirtualDevice aDev;
+ aDev.SetOutputSizePixel(aNewSize);
+
+ ImageList *pOldList = pUserImageList;
+ pUserImageList = new ImageList( pOldList->GetImageCount() );
+ for ( USHORT i=0; i<pOldList->GetImageCount(); i++ )
+ {
+ USHORT nId = pOldList->GetImageId( i );
+ Image aImage;
+
+ // Image benutzerdefiniert ?
+ if ( pUserDefList->GetBitmapPos(nId) != USHRT_MAX )
+ {
+ Bitmap *pBmp = pUserDefList->GetBitmap( nId );
+ if ( pBmp->GetSizePixel() != aNewSize )
+ {
+ aDev.DrawBitmap( Point(), aNewSize, *pBmp );
+ aImage = Image( aDev.GetBitmap(Point(), aNewSize), aColor );
+ }
+ else
+ aImage = Image( *pBmp, aColor );
+ }
+ else
+ aImage = SeekImage( nId );
+
+ if ( aImage.GetSizePixel() == aNewSize )
+ pUserImageList->AddImage( nId, aImage );
+ }
+
+ delete pOldList;
+ }
+
+ // Wenn es die Officeliste vorher nicht gab, muss sie jetzt wieder entfernt werden
+ if ( !pOld )
+ EndCustomize();
+
+ for ( USHORT n=0; n<pToolBoxList->Count(); n++ )
+ {
+ ToolBoxInf_Impl *pInf = (*pToolBoxList)[n];
+ if ( pInf->nFlags & SFX_TOOLBOX_CHANGESYMBOLSET )
+ {
+ ToolBox *pBox = pInf->pToolBox;
+ SfxToolBoxManager* pMgr = pInf->pMgr;
+
+ if ( pMgr )
+ {
+ pMgr->RefreshImages_Impl();
+ }
+ else
+ {
+ USHORT nCount = pBox->GetItemCount();
+ for ( USHORT nPos=0; nPos<nCount; nPos++ )
+ {
+ USHORT nId = pBox->GetItemId( nPos );
+ if ( pBox->GetItemType(nPos) == TOOLBOXITEM_BUTTON )
+ {
+ pBox->SetItemImage( nId, GetImage( nId, pInf->pModule ) );
+ SfxStateCache *pCache = SfxViewFrame::Current()->GetBindings().GetStateCache( nId );
+ if ( pCache )
+ pCache->SetCachedState();
+ }
+ }
+ }
+
+ if ( !pBox->IsFloatingMode() )
+ {
+ Size aActSize( pBox->GetSizePixel() );
+ Size aSize( pBox->CalcWindowSizePixel() );
+ if ( pBox->IsHorizontal() )
+ aSize.Width() = aActSize.Width();
+ else
+ aSize.Height() = aActSize.Height();
+
+ pBox->SetSizePixel( aSize );
+ }
+ }
+ }
+ }
+}
+
+//-------------------------------------------------------------------------
+
+/* [Beschreibung]
+
+ Sucht das Image der uebergebenen Id. Suchreihenfolge:
+
+ UserDefListe, Modul-Imageliste( sofern vorhanden ), Default-Liste,
+ Officeliste( sofern vorhanden ).
+*/
+
+Image SfxImageManager::SeekImage( USHORT nId, SfxModule *pModule ) const
+{
+ if ( !pModule )
+ pModule = SFX_APP()->GetActiveModule();
+ ImageList *pList=0;
+ if ( pModule )
+ pList = pModule->GetImageList_Impl( eSymbolSet );
+
+ if ( pUserImageList->GetImagePos( nId ) != IMAGELIST_IMAGE_NOTFOUND )
+ return pUserImageList->GetImage( nId );
+ else if ( pList && pList->GetImagePos( nId ) != IMAGELIST_IMAGE_NOTFOUND )
+ return pList->GetImage( nId );
+ else if ( pImageList->GetImagePos( nId ) != IMAGELIST_IMAGE_NOTFOUND )
+ return pImageList->GetImage( nId );
+ else if ( pOffImageList )
+ return pOffImageList->GetImage( nId );
+ else
+ return pImageList->GetImage(nId); // leeres Image zur"uckgeben
+}
+
+//-------------------------------------------------------------------------
+
+/* [Beschreibung]
+
+ Sucht das Image der uebergebenen Id genauso wie SeekImage, allerdings
+ wird die Office-liste nicht durchsucht, d.h. es werden nur die aktuell
+ konfigurierten Images ber"ucksichtigt.
+*/
+Image SfxImageManager::GetImage( USHORT nId, SfxModule *pModule ) const
+{
+ if ( !pModule )
+ pModule = SFX_APP()->GetActiveModule();
+ ImageList *pList=0;
+ if ( pModule )
+ pList = pModule->GetImageList_Impl( eSymbolSet );
+
+ if ( pUserImageList->GetImagePos( nId ) != IMAGELIST_IMAGE_NOTFOUND )
+ return pUserImageList->GetImage( nId );
+ else if ( pList && pList->GetImagePos( nId ) != IMAGELIST_IMAGE_NOTFOUND )
+ return pList->GetImage( nId );
+ else
+ return pImageList->GetImage( nId );
+}
+
+Image SfxImageManager::GetImageFromModule_Impl( USHORT nId, SfxModule *pModule )
+{
+ if ( pModule )
+ {
+ ImageList *pList = pModule->GetImageList_Impl( eSymbolSet );
+ if ( pList )
+ return pList->GetImage( nId );
+ }
+ else
+ {
+ if ( pOffImageList )
+ return pOffImageList->GetImage( nId );
+ else
+ return pImageList->GetImage( nId );
+ }
+ return Image();
+}
+
+Image SfxImageManager::GetAndLockImage_Impl( USHORT nId, SfxModule *pModule )
+{
+ // Zuerst in der UserImagelist suchen
+ if ( pUserImageList->GetImagePos( nId ) != IMAGELIST_IMAGE_NOTFOUND )
+ return pUserImageList->GetImage( nId );
+ else if ( pModule )
+ return GetImage( nId, pModule );
+ else
+ {
+ pModule = SFX_APP()->GetActiveModule();
+
+ // Wenn das Image nicht in der default-Liste steht, das Image aber
+ // f"ur diese Liste angefordert wird
+ if ( pModule && pImageList->GetImagePos( nId ) == IMAGELIST_IMAGE_NOTFOUND )
+ {
+ // Dann in der Liste des aktiven Moduls suchen
+ ImageList *pList = pModule->GetImageList_Impl( eSymbolSet );
+ if ( pList && pList->GetImagePos( nId ) != IMAGELIST_IMAGE_NOTFOUND )
+ {
+ // Das Image in die UserImageList "ubertragen
+ pUserImageList->AddImage( nId, pList->GetImage( nId ) );
+ SetDefault( FALSE );
+ return pUserImageList->GetImage( nId );
+ }
+ }
+
+ return pImageList->GetImage( nId );
+ }
+}
+
+//-------------------------------------------------------------------------
+
+/* [Beschreibung]
+
+ Erzeugt die Office-Liste, die f"ur das Konfigurieren ben"otigt wird.
+*/
+
+void SfxImageManager::StartCustomize()
+{
+ // Officeliste schon angelegt ?
+ if ( pOffImageList )
+ return;
+
+ USHORT nType=0;
+ switch (eSymbolSet)
+ {
+ case SFX_SYMBOLS_SMALL_COLOR:
+ nType = RID_OFFICEIMAGELIST_SC;
+ break;
+ case SFX_SYMBOLS_SMALL_MONO:
+ nType = RID_OFFICEIMAGELIST_SM;
+ break;
+ case SFX_SYMBOLS_LARGE_COLOR:
+ nType = RID_OFFICEIMAGELIST_LC;
+ break;
+ case SFX_SYMBOLS_LARGE_MONO:
+ nType = RID_OFFICEIMAGELIST_LM;
+ break;
+ default:
+ DBG_ERROR("Unbekannter Symboltyp!");
+ break;
+ }
+
+ // Die Office-Imagelist wird vom default-ResMgr bereitgestellt
+ ResMgr *pResMgr = Resource::GetResManager();
+ ResId aResId( nType );
+ aResId.SetRT( RSC_IMAGELIST );
+
+ DBG_ASSERT( pResMgr->IsAvailable(aResId),
+ "Keine default ImageList vorhanden!" );
+
+ if ( pResMgr->IsAvailable(aResId) )
+ pOffImageList = new ImageList( aResId );
+ else
+ pOffImageList = new ImageList();
+}
+
+//-------------------------------------------------------------------------
+
+/* [Beschreibung]
+
+ Entfernt die nachgeladenen ImageLists wieder aus dem Speicher.
+*/
+
+void SfxImageManager::EndCustomize()
+{
+ DELETEZ( pOffImageList);
+}
+
+//-------------------------------------------------------------------------
+
+/* [Beschreibung]
+
+ Erzeugt eine zum aktuellen Symboltyp passende default ImageList.
+*/
+
+void SfxImageManager::MakeDefaultImageList_Impl()
+{
+ USHORT nType=0;
+ switch (eSymbolSet)
+ {
+ case SFX_SYMBOLS_SMALL_COLOR:
+ nType = RID_DEFAULTIMAGELIST_SC;
+ break;
+ case SFX_SYMBOLS_SMALL_MONO:
+ nType = RID_DEFAULTIMAGELIST_SM;
+ break;
+ case SFX_SYMBOLS_LARGE_COLOR:
+ nType = RID_DEFAULTIMAGELIST_LC;
+ break;
+ case SFX_SYMBOLS_LARGE_MONO:
+ nType = RID_DEFAULTIMAGELIST_LM;
+ break;
+ default:
+ DBG_ERROR("Unbekannter Symboltyp!");
+ break;
+ }
+
+ ResMgr *pResMgr = Resource::GetResManager();
+ ResId aResId( nType );
+ aResId.SetRT( RSC_IMAGELIST );
+
+ DBG_ASSERT( pResMgr->IsAvailable(aResId),
+ "Keine default ImageList vorhanden!" );
+
+ if ( pResMgr->IsAvailable(aResId) )
+ {
+ if ( Application::IsRemoteServer() )
+ pImageList = new ImageList( aResId );
+ else
+ pImageList = new ImageList( aResId );
+ }
+ else
+ pImageList = new ImageList();
+}
+
+//-------------------------------------------------------------------------
+
+/* [Beschreibung]
+
+ Ersetzt das Image f"ur die "ubergebene Id durch die "ubergebene Bitmap
+ bzw. entfernt die Bindung an eine Bitmap.
+*/
+
+void SfxImageManager::ReplaceImage( USHORT nId, Bitmap* pBmp )
+{
+ BOOL bReplaced = FALSE;
+ if ( !pBmp && GetImage( nId ).GetSizePixel().Width() )
+ {
+ // Auf default zuruecksetzen; zuerst das Userdef-Image entfernen
+ pUserImageList->RemoveImage( nId );
+
+ // Falls zu der "ubergebenen Id eine UserBitmap vorliegt, wird sie
+ // jetzt wieder entfernt
+ for ( USHORT i=0; i<pUserDefList->GetBitmapCount(); i++ )
+ if ( pUserDefList->GetBitmapId(i) == nId )
+ pUserDefList->RemoveBitmap( nId );
+
+ Image aImage = GetImage( nId );
+ if ( !aImage.GetSizePixel().Width() )
+ {
+ // Kein default-Image vorhanden, vielleicht eines in Officeliste?
+ ImageList *pOldOffImageList = pOffImageList;
+ if ( !pOldOffImageList )
+ StartCustomize();
+ aImage = pOffImageList->GetImage( nId );
+
+ // Wenn es die OfficeListe vorher nicht gab, mu\s sie jetzt wieder
+ // entfernt werden
+ if ( !pOldOffImageList )
+ EndCustomize();
+ }
+
+ if ( aImage.GetSizePixel().Width() )
+ {
+ // F"ur die Id soll wieder ein Image aktiviert werden, das nicht
+ // defaultm"assig vorhanden ist
+ pUserImageList->AddImage( nId, aImage );
+ }
+
+ bReplaced = TRUE;
+ }
+ else if ( pBmp )
+ {
+ // Eine neue Bitmap aufnehmen
+ Size aSize = pBmp->GetSizePixel();
+ if ( aSize.Width() > 208 || aSize.Height() > 208 )
+ {
+ // Maximale Gr"o\se, die f"ur 16x16 und 26x26-BMP n"otig ist
+ VirtualDevice aDev;
+ Size aSz( 208, 208 );
+ aDev.SetOutputSizePixel( aSz );
+ aDev.DrawBitmap( Point(), aSz, *pBmp );
+ delete pBmp;
+ pBmp = new Bitmap( aDev.GetBitmap( Point(), aSz ) );
+ }
+
+ if ( pUserDefList->GetBitmapPos( nId ) == USHRT_MAX )
+ pUserDefList->AddBitmap( nId, *pBmp );
+ else
+ pUserDefList->ReplaceBitmap( nId, *pBmp );
+
+#ifndef VCL
+ Color aColor ( 0xC000, 0xC000, 0xC000 );
+#else
+ Color aColor ( 0xC0, 0xC0, 0xC0 );
+#endif
+ Image aImage( *pBmp, aColor );
+ if ( pBmp->GetSizePixel() != pImageList->GetImageSize() )
+ {
+ // Evtl. Imagegr"o\se anpassen
+ VirtualDevice aDev;
+ Size aSize = pImageList->GetImageSize();
+ aDev.SetOutputSizePixel( aSize );
+ aDev.DrawBitmap( Point(), aSize, *pBmp );
+ aImage = Image( aDev.GetBitmap(Point(), aSize), aColor );
+ }
+
+ // In die User-Liste aufnehmen
+ if ( pUserImageList->GetImagePos( nId ) == IMAGELIST_IMAGE_NOTFOUND )
+ pUserImageList->AddImage( nId, aImage );
+ else
+ pUserImageList->ReplaceImage( nId, aImage );
+
+ bReplaced = TRUE;
+ }
+
+
+ if ( bReplaced )
+ {
+ // Alle registrierten Toolboxen auf den Stand bringen
+ ExchangeItemImage_Impl( nId, GetImage( nId ) );
+
+ if ( pUserImageList->GetImageCount() )
+ SetDefault( FALSE );
+ else
+ SetDefault( TRUE );
+ }
+
+// SvFileStream aBitmapStream(String("d:\\REPLACE.BMP"), STREAM_STD_WRITE);
+// aBitmapStream << pUserImageList->GetBitmap();
+}
+
+//-------------------------------------------------------------------------
+
+/* [Beschreibung]
+
+ Wechselt an allen registrierten Toolboxen das Image f"ur die "ubergebene
+ Id aus.
+*/
+
+void SfxImageManager::ExchangeItemImage_Impl( USHORT nId, const Image& rImage )
+{
+ for ( USHORT n=0; n<pToolBoxList->Count(); n++ )
+ {
+ ToolBox *pBox = (*pToolBoxList)[n]->pToolBox;
+ pBox->SetItemImage( nId, rImage );
+ }
+}
+
+/* [Beschreibung]
+
+ Meldet eine Toolbox an, damit sie (je nach Flags) bei "Anderungen von
+ Symbolset oder OutStyle benachrichtigt werden kann.
+*/
+
+void SfxImageManager::RegisterToolBox( ToolBox *pBox, USHORT nFlags )
+{
+ ToolBoxInf_Impl *pInf = new ToolBoxInf_Impl;
+ pInf->pToolBox = pBox;
+ pInf->pMgr = NULL;
+ pInf->nFlags = nFlags;
+ pInf->pModule = NULL;
+ pToolBoxList->Append( pInf );
+ pBox->SetOutStyle( nOutStyle );
+}
+
+void SfxImageManager::RegisterToolBox( ToolBox *pBox, SfxModule* pModule, USHORT nFlags )
+{
+ ToolBoxInf_Impl *pInf = new ToolBoxInf_Impl;
+ pInf->pToolBox = pBox;
+ pInf->pMgr = NULL;
+ pInf->nFlags = nFlags;
+ pInf->pModule = pModule;
+ pToolBoxList->Append( pInf );
+ pBox->SetOutStyle( nOutStyle );
+}
+
+//-------------------------------------------------------------------------
+
+/* [Beschreibung]
+
+ Meldet eine Toolbox wieder ab.
+*/
+
+void SfxImageManager::ReleaseToolBox( ToolBox *pBox )
+{
+ for ( USHORT n=0; n<pToolBoxList->Count(); n++ )
+ {
+ if ( (*pToolBoxList)[n]->pToolBox == pBox )
+ {
+ delete (*pToolBoxList)[n];
+ pToolBoxList->Remove( n );
+ return;
+ }
+ }
+}
+
+void SfxImageManager::RegisterToolBoxManager( SfxToolBoxManager *pMgr, USHORT nFlags )
+{
+ ToolBoxInf_Impl *pInf = new ToolBoxInf_Impl;
+ pInf->pToolBox = &pMgr->GetToolBox();
+ pInf->pMgr = pMgr;
+ pInf->nFlags = nFlags;
+ pToolBoxList->Append( pInf );
+ pInf->pToolBox->SetOutStyle( nOutStyle );
+}
+
+//-------------------------------------------------------------------------
+
+/* [Beschreibung]
+
+ Meldet eine Toolbox wieder ab.
+*/
+
+void SfxImageManager::ReleaseToolBoxManager( SfxToolBoxManager *pMgr )
+{
+ for ( USHORT n=0; n<pToolBoxList->Count(); n++ )
+ {
+ if ( (*pToolBoxList)[n]->pMgr == pMgr )
+ {
+ delete (*pToolBoxList)[n];
+ pToolBoxList->Remove( n );
+ return;
+ }
+ }
+}
+
+//-------------------------------------------------------------------------
+
+/* [Beschreibung]
+
+ Gibt die Color zu"ruck, die als Maskenfarbe verwendet wird.
+*/
+
+Color SfxImageManager::GetMaskColor() const
+{
+ if (pImageList->HasMaskColor())
+ return pImageList->GetMaskColor();
+ else
+#ifndef VCL
+ return Color(0xC000, 0xC000, 0xC000);
+#else
+ return Color(0xC0, 0xC0, 0xC0);
+#endif
+}
+
+//-------------------------------------------------------------------------
+
+/* [Beschreibung]
+
+ Versorgt die "ubergebene Toolbox mit allen Images, die f"ur die enthaltenen
+ Ids konfiguriert sind.
+ Es wird ( genauso wie bei GetImage ) nicht in der Office-Liste gesucht.
+*/
+
+void SfxImageManager::SetImages( ToolBox& rToolBox, SfxModule *pModule )
+{
+ if ( !pModule )
+ pModule = SFX_APP()->GetActiveModule();
+ ImageList *pList=0;
+ if ( pModule )
+ pList = pModule->GetImageList_Impl( eSymbolSet );
+
+ USHORT nCount = rToolBox.GetItemCount();
+ for (USHORT n=0; n<nCount; n++)
+ {
+ USHORT nId = rToolBox.GetItemId(n);
+ switch ( rToolBox.GetItemType(n) )
+ {
+ case TOOLBOXITEM_BUTTON:
+ {
+ if ( pUserImageList->GetImagePos( nId ) != IMAGELIST_IMAGE_NOTFOUND )
+ rToolBox.SetItemImage(nId, pUserImageList->GetImage(nId));
+ else if ( pList && pList->GetImagePos( nId ) != IMAGELIST_IMAGE_NOTFOUND )
+ rToolBox.SetItemImage(nId, pList->GetImage(nId));
+ else if ( pImageList->GetImagePos( nId ) != IMAGELIST_IMAGE_NOTFOUND )
+ rToolBox.SetItemImage(nId, pImageList->GetImage(nId));
+ }
+
+ case TOOLBOXITEM_SEPARATOR:
+ case TOOLBOXITEM_SPACE:
+ case TOOLBOXITEM_BREAK:
+ break;
+
+ default:
+ DBG_ERROR( "invalid item-type in toolbox config" );
+ }
+ }
+}
+
+//-------------------------------------------------------------------------
+
+/* [Beschreibung]
+
+ Gibt zur"uck, ob f"ur die angegebene Id eine Bitmap konfiguriert wurde.
+*/
+
+BOOL SfxImageManager::IsUserDef_Impl(USHORT nId) const
+{
+ return ( pUserDefList->GetBitmapPos(nId) != USHRT_MAX );
+}
+
+//-------------------------------------------------------------------------
+
+/* [Beschreibung]
+
+ Gibt die konfigurierte Bitmap f"ur die angegebene Id zur"uck. Wichtig:
+ vorher mu\s mit IsUserDef_Impl "uberpr"uft werden, ob es auch eine gibt.
+*/
+
+const Bitmap& SfxImageManager::GetUserDefBitmap_Impl( USHORT nId ) const
+{
+ USHORT nPos = pUserDefList->GetBitmapPos( nId );
+ DBG_ASSERT( nPos != USHRT_MAX, "Bitmap nicht vorhanden!" );
+ return ( *pUserDefList->GetBitmap(nId) );
+}
+
+/* [Beschreibung]
+
+ Wechselt den OutStyle bei allen daf"ur registrierten Toolboxen.
+*/
+
+void SfxImageManager::SetOutStyle( USHORT nStyle )
+{
+ if ( nOutStyle != nStyle )
+ {
+ nOutStyle = nStyle;
+ for ( USHORT n=0; n<pToolBoxList->Count(); n++ )
+ {
+ ToolBoxInf_Impl *pInf = (*pToolBoxList)[n];
+ if ( pInf->nFlags & SFX_TOOLBOX_CHANGEOUTSTYLE )
+ {
+ ToolBox *pBox = pInf->pToolBox;
+ pBox->SetOutStyle( nStyle );
+ if ( !pBox->IsFloatingMode() )
+ {
+ Size aActSize( pBox->GetSizePixel() );
+ Size aSize( pBox->CalcWindowSizePixel() );
+ if ( pBox->IsHorizontal() )
+ aSize.Width() = aActSize.Width();
+ else
+ aSize.Height() = aActSize.Height();
+
+ pBox->SetSizePixel( aSize );
+ }
+ pBox->Invalidate();
+ }
+ }
+ }
+}
+
+
diff --git a/sfx2/source/toolbox/makefile.mk b/sfx2/source/toolbox/makefile.mk
new file mode 100644
index 000000000000..1db17e38db90
--- /dev/null
+++ b/sfx2/source/toolbox/makefile.mk
@@ -0,0 +1,110 @@
+#*************************************************************************
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.1.1.1 $
+#
+# last change: $Author: hr $ $Date: 2000-09-18 16:52:35 $
+#
+# The Contents of this file are made available subject to the terms of
+# either of the following licenses
+#
+# - GNU Lesser General Public License Version 2.1
+# - Sun Industry Standards Source License Version 1.1
+#
+# Sun Microsystems Inc., October, 2000
+#
+# GNU Lesser General Public License Version 2.1
+# =============================================
+# Copyright 2000 by Sun Microsystems, Inc.
+# 901 San Antonio Road, Palo Alto, CA 94303, USA
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License version 2.1, as published by the Free Software Foundation.
+#
+# This library 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 for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+#
+# Sun Industry Standards Source License Version 1.1
+# =================================================
+# The contents of this file are subject to the Sun Industry Standards
+# Source License Version 1.1 (the "License"); You may not use this file
+# except in compliance with the License. You may obtain a copy of the
+# License at http://www.openoffice.org/license.html.
+#
+# Software provided under this License is provided on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+# See the License for the specific provisions governing your rights and
+# obligations concerning the Software.
+#
+# The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+#
+# Copyright: 2000 by Sun Microsystems, Inc.
+#
+# All Rights Reserved.
+#
+# Contributor(s): _______________________________________
+#
+#
+#
+#*************************************************************************
+
+PRJ=..$/..
+
+PRJNAME=sfx2
+TARGET=toolbox
+ENABLE_EXCEPTIONS=TRUE
+.INCLUDE : $(PRJ)$/util$/makefile.pmk
+AUTOSEG=true
+
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : svpre.mk
+.INCLUDE : settings.mk
+.INCLUDE : sv.mk
+
+# --- Files --------------------------------------------------------
+
+# schdldrp.cxx \
+
+CXXFILES = \
+ tbxmgr.cxx \
+ tbxchild.cxx \
+ tbxitem.cxx \
+ imgmgr.cxx \
+ tbxopdlg.cxx \
+ tbxcust.cxx \
+ tbxconf.cxx \
+ $(PROJECTPCHSOURCE).cxx
+
+SRCFILES =\
+ tbxopdlg.src\
+ tbxcust.src\
+ tbxpopup.src\
+ toolbox.src
+
+SLOFILES = \
+ $(SLO)$/tbxmgr.obj \
+ $(SLO)$/tbxchild.obj \
+ $(SLO)$/tbxopdlg.obj \
+ $(SLO)$/tbxcust.obj \
+ $(SLO)$/imgmgr.obj \
+ $(SLO)$/tbxconf.obj \
+ $(SLO)$/tbxitem.obj
+
+# --- Tagets -------------------------------------------------------
+
+.INCLUDE : target.mk
+
diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx
new file mode 100644
index 000000000000..fba7e3b55519
--- /dev/null
+++ b/sfx2/source/toolbox/tbxitem.cxx
@@ -0,0 +1,880 @@
+/*************************************************************************
+ *
+ * $RCSfile: tbxitem.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:36 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _SV_DRAG_HXX
+#include <vcl/drag.hxx>
+#endif
+#ifndef _SFXENUMITEM_HXX //autogen
+#include <svtools/eitem.hxx>
+#endif
+#ifndef _SFXSTRITEM_HXX //autogen
+#include <svtools/stritem.hxx>
+#endif
+#ifndef _URLBMK_HXX //autogen
+#include <svtools/urlbmk.hxx>
+#endif
+#ifndef _SV_TOOLBOX_HXX
+#include <vcl/toolbox.hxx>
+#endif
+#pragma hdrstop
+
+#include "tbxctrl.hxx"
+#include "mnumgr.hxx"
+#include "stbmgr.hxx"
+#include "dispatch.hxx"
+#include "fltfnc.hxx"
+#include "msg.hxx"
+#include "msgpool.hxx"
+#include "statcach.hxx"
+#include "viewfrm.hxx"
+#include "arrdecl.hxx"
+#include "sfxtypes.hxx"
+#include "macrconf.hxx"
+#include "genlink.hxx"
+#include "sfxresid.hxx"
+#include "toolbox.hrc"
+#include "sfx.hrc"
+#include "module.hxx"
+#include "appdata.hxx"
+#include "expfile.hxx"
+#include "docfile.hxx"
+#include "docfac.hxx"
+#include "referers.hxx"
+#include "frmhtmlw.hxx"
+#include "app.hxx"
+
+//--------------------------------------------------------------------
+
+static USHORT nLastId_Impl = SID_NEWDOCDIRECT;
+
+//====================================================================
+
+SFX_IMPL_TOOLBOX_CONTROL_ARG(SfxToolBoxControl, SfxStringItem, TRUE);
+SFX_IMPL_TOOLBOX_CONTROL(SfxAppToolBoxControl_Impl, SfxStringItem);
+SFX_IMPL_TOOLBOX_CONTROL(SfxDragToolBoxControl_Impl, SfxStringItem);
+SFX_IMPL_TOOLBOX_CONTROL(SfxHistoryToolBoxControl_Impl, SfxStringItem);
+SFX_IMPL_TOOLBOX_CONTROL(SfxReloadToolBoxControl_Impl, SfxBoolItem);
+
+//--------------------------------------------------------------------
+
+SfxToolBoxControl::SfxToolBoxControl
+(
+ USHORT nId,
+ ToolBox& rBox,
+ SfxBindings& rBindings,
+ BOOL bShowStringItems
+)
+: SfxControllerItem(nId, rBindings),
+ pBox(&rBox),
+ bShowString(bShowStringItems),
+ pFact(0)
+{
+ nSelectModifier = 0;
+ DBG( CheckConfigure_Impl(SFX_SLOT_TOOLBOXCONFIG) );
+}
+
+//--------------------------------------------------------------------
+
+SfxToolBoxControl::~SfxToolBoxControl()
+{
+ if ( SfxMacroConfig::IsMacroSlot( GetId() ) )
+ SFX_APP()->GetMacroConfig()->ReleaseSlotId(GetId());
+}
+
+//--------------------------------------------------------------------
+
+SfxToolBoxControl* SfxToolBoxControl::CreateControl( USHORT nId,
+ ToolBox *pBox, SfxBindings &rBindings, SfxModule *pMod )
+{
+ SfxToolBoxControl *pCtrl;
+ SfxApplication *pApp = SFX_APP();
+ if ( !pMod )
+ {
+ SfxDispatcher *pDisp = rBindings.GetDispatcher_Impl();
+ pMod = pDisp ? pApp->GetActiveModule( pDisp->GetFrame() ) :0;
+ }
+
+ SfxSlotPool *pSlotPool;
+ if ( pMod )
+ pSlotPool = pMod->GetSlotPool();
+ else
+ pSlotPool = &pApp->GetSlotPool();
+ TypeId aSlotType = pSlotPool->GetSlotType(nId);
+ if ( aSlotType )
+ {
+ if ( pMod )
+ {
+ SfxTbxCtrlFactArr_Impl *pFactories = pMod->GetTbxCtrlFactories_Impl();
+ if ( pFactories )
+ {
+ SfxTbxCtrlFactArr_Impl &rFactories = *pFactories;
+ for ( USHORT nFactory = 0; nFactory < rFactories.Count(); ++nFactory )
+ if ( rFactories[nFactory]->nTypeId == aSlotType &&
+ ( ( rFactories[nFactory]->nSlotId == 0 ) ||
+ ( rFactories[nFactory]->nSlotId == nId) ) )
+ {
+ pCtrl = rFactories[nFactory]->pCtor( nId, *pBox, rBindings );
+ pCtrl->pFact = rFactories[nFactory];
+ return pCtrl;
+ }
+ }
+ }
+
+ SfxTbxCtrlFactArr_Impl &rFactories = pApp->GetTbxCtrlFactories_Impl();
+
+ for ( USHORT nFactory = 0; nFactory < rFactories.Count(); ++nFactory )
+ if ( rFactories[nFactory]->nTypeId == aSlotType &&
+ ( ( rFactories[nFactory]->nSlotId == 0 ) ||
+ ( rFactories[nFactory]->nSlotId == nId) ) )
+ {
+ pCtrl = rFactories[nFactory]->pCtor( nId, *pBox, rBindings );
+ pCtrl->pFact = rFactories[nFactory];
+ return pCtrl;
+ }
+ }
+
+ return new SfxToolBoxControl( nId, *pBox, rBindings );
+}
+
+//--------------------------------------------------------------------
+
+void SfxToolBoxControl::StateChanged
+(
+ USHORT nId,
+ SfxItemState eState,
+ const SfxPoolItem* pState
+)
+{
+ DBG_MEMTEST();
+ DBG_ASSERT( GetId() == nId, "strange SID" );
+ DBG_ASSERT( pBox != 0, "setting state to dangling ToolBox" );
+
+ if ( GetId() >= SID_OBJECTMENU0 && GetId() <= SID_OBJECTMENU_LAST )
+ return;
+
+ // enabled/disabled-Flag pauschal korrigieren
+ pBox->EnableItem( GetId(), eState != SFX_ITEM_DISABLED );
+
+ TriState eTri = STATE_NOCHECK;
+ switch ( eState )
+ {
+ case SFX_ITEM_AVAILABLE:
+ {
+ if ( pState->ISA(SfxBoolItem) )
+ {
+ // BoolItem fuer checken
+ if ( ((const SfxBoolItem*)pState)->GetValue() )
+ eTri = STATE_CHECK;
+ }
+ else if ( pState->ISA(SfxEnumItemInterface) &&
+ ((SfxEnumItemInterface *)pState)->HasBoolValue())
+ {
+ // EnumItem wie Bool behandeln
+ if ( ((const SfxEnumItemInterface *)pState)->GetBoolValue() )
+ eTri = STATE_CHECK;
+ }
+ else if ( bShowString && pState->ISA(SfxStringItem) )
+ pBox->SetItemText(nId, ((const SfxStringItem*)pState)->GetValue() );
+ break;
+ }
+
+ case SFX_ITEM_DONTCARE:
+ eTri = STATE_DONTKNOW;
+ }
+
+ pBox->SetItemState( GetId(), eTri );
+}
+
+//------------------------------------------------------------------------
+
+BOOL SfxToolBoxControl::Drop( DropEvent& rEvt )
+
+/* [Beschreibung]
+
+ Diese virtuelle Methode kann "uberladen werden, um ein Drop auf ein
+ Toolbox-Control auszuf"uhren. Die Basisimplementierung braucht
+ i.d.R. nicht gerufen zu werden, da sie das Drop nur f"ur einige
+ spezielle SIDs implementiert, f"ur die es i.d.R. eigene Instanzen
+ von <SfxToolBoxControl> gibt.
+
+ Die Semantik ist wie in StarView, Positionen sind relativ zur
+ Toolbox.
+*/
+
+{
+ return SFX_APP()->Drop_Impl( GetId(), rEvt );
+}
+
+//------------------------------------------------------------------------
+
+BOOL SfxToolBoxControl::QueryDrop( DropEvent& rEvt )
+
+/* [Beschreibung]
+
+ Diese virtuelle Methode kann "uberladen werden, um ein auf QueryDrop
+ auf ein Toolbox-Control auszuwerten. Die Basisimplementierung braucht
+ i.d.R. nicht gerufen zu werden, da sie das QueryDrop nur f"ur einige
+ spezielle SIDs implementiert, f"ur die es i.d.R. eigene Instanzen
+ von <SfxToolBoxControl> gibt.
+
+ Die Semantik ist wie in StarView, Positionen sind relativ zur
+ Toolbox.
+*/
+
+{
+ return SFX_APP()->QueryDrop_Impl( GetId(), rEvt );
+}
+
+//--------------------------------------------------------------------
+
+void SfxToolBoxControl::Select( USHORT nModifier )
+{
+ nSelectModifier = nModifier;
+ Select( BOOL((nModifier & KEY_MOD1)!=0) );
+}
+
+//--------------------------------------------------------------------
+
+void SfxToolBoxControl::Select( BOOL bMod1 )
+{
+ GetBindings().Execute( GetId(), 0, nSelectModifier );
+}
+
+//--------------------------------------------------------------------
+
+void SfxToolBoxControl::DoubleClick()
+{
+}
+
+//--------------------------------------------------------------------
+
+void SfxToolBoxControl::Click()
+{
+}
+
+//--------------------------------------------------------------------
+
+SfxPopupWindowType SfxToolBoxControl::GetPopupWindowType() const
+{
+ return SFX_POPUPWINDOW_NONE;
+}
+
+//--------------------------------------------------------------------
+
+SfxPopupWindow* SfxToolBoxControl::CreatePopupWindow()
+{
+ if ( GetId() >= SID_OBJECTMENU0 && GetId() <= SID_OBJECTMENU_LAST )
+ {
+ USHORT nConfigId;
+ PopupMenu *pPopup = SFX_APP()->GetMenuBarManager()->
+ GetObjectMenu( GetId(), nConfigId );
+ if ( pPopup )
+ {
+ Rectangle aItemRect( GetToolBox().GetItemRect(GetId()) );
+
+ Point aPos;
+ switch ( GetToolBox().GetAlign() )
+ {
+ case WINDOWALIGN_TOP:
+ aPos = aItemRect.BottomLeft();
+ break;
+
+ case WINDOWALIGN_BOTTOM:
+ aPos = aItemRect.TopLeft();
+ break;
+
+ case WINDOWALIGN_LEFT:
+ aPos = aItemRect.TopRight();
+ break;
+
+ case WINDOWALIGN_RIGHT:
+ aPos = aItemRect.TopLeft();
+ break;
+ }
+
+ pPopup->Execute( pBox, aPos );
+ }
+ }
+
+ return 0;
+}
+
+SfxPopupWindow* SfxToolBoxControl::CreatePopupWindowCascading()
+{
+ return 0;
+}
+
+//--------------------------------------------------------------------
+
+Window* SfxToolBoxControl::CreateItemWindow( Window * )
+{
+ return 0;
+}
+
+SfxToolBoxControl* SfxToolBoxControl::ReInit_Impl()
+{
+ USHORT nId = GetId();
+ SfxBindings& rBindings = GetBindings();
+ ToolBox *pBox = &GetToolBox();
+
+ // Test, welche ToolboxController-Factory im aktuellen Kontext einen
+ // Controller mit der Id dieses Controllers erzeugen k"onnte
+ SfxToolBoxControl *pCtrl = this;
+ SfxApplication *pApp = SFX_APP();
+ SfxDispatcher *pDisp = rBindings.GetDispatcher_Impl();
+ SfxModule *pMod = pDisp ? pApp->GetActiveModule( pDisp->GetFrame() ) :0;
+ SfxSlotPool *pSlotPool;
+ if ( pMod )
+ pSlotPool = pMod->GetSlotPool();
+ else
+ pSlotPool = &pApp->GetSlotPool();
+ TypeId aSlotType = pSlotPool->GetSlotType(nId);
+ if ( aSlotType )
+ {
+ if ( pMod )
+ {
+ SfxTbxCtrlFactArr_Impl *pFactories = pMod->GetTbxCtrlFactories_Impl();
+ if ( pFactories )
+ {
+ SfxTbxCtrlFactArr_Impl &rFactories = *pFactories;
+ for ( USHORT nFactory = 0; nFactory < rFactories.Count(); ++nFactory )
+ if ( rFactories[nFactory]->nTypeId == aSlotType &&
+ ( ( rFactories[nFactory]->nSlotId == 0 ) ||
+ ( rFactories[nFactory]->nSlotId == nId) ) )
+ {
+ if ( pFact != rFactories[nFactory] )
+ {
+ // Es wurde eine Factory gefunden, und es ist eine
+ // andere als die dieses Controllers, d.h. durch
+ // einen Contextwechsel wurde auch der Controller
+ // ge"andert
+ pCtrl = rFactories[nFactory]->pCtor( nId, *pBox, rBindings );
+ pCtrl->pFact = rFactories[nFactory];
+ }
+
+ // Die gefundene Factory ist die gleiche wie die dieses
+ // Controllers, d.h. es hat sich nichts ge"andert
+ return pCtrl;
+ }
+ }
+ }
+
+ SfxTbxCtrlFactArr_Impl &rFactories = pApp->GetTbxCtrlFactories_Impl();
+
+ for ( USHORT nFactory = 0; nFactory < rFactories.Count(); ++nFactory )
+ if ( rFactories[nFactory]->nTypeId == aSlotType &&
+ ( ( rFactories[nFactory]->nSlotId == 0 ) ||
+ ( rFactories[nFactory]->nSlotId == nId) ) )
+ {
+ if ( pFact != rFactories[nFactory] )
+ {
+ // Es wurde eine Factory gefunden, und es ist eine
+ // andere als die dieses Controllers, d.h. durch
+ // einen Contextwechsel wurde auch der Controller
+ // ge"andert
+ pCtrl = rFactories[nFactory]->pCtor( nId, *pBox, rBindings );
+ pCtrl->pFact = rFactories[nFactory];
+ }
+
+ // Die gefundene Factory ist die gleiche wie die dieses
+ // Controllers, d.h. es hat sich nichts ge"andert
+ return pCtrl;
+ }
+ }
+
+ // Wenn der aktuelle Controller eine Factory hat, aber aktuell kein gefunden
+ // wird, mu\s dieser Controller durch einen StandardController ersetzt werden,
+ return pFact ? new SfxToolBoxControl( nId, *pBox, rBindings ) : this;
+}
+
+//--------------------------------------------------------------------
+
+BOOL SfxPopupWindow::Close()
+{
+ bFloating = FALSE;
+ FloatingWindow::Close();
+
+ if ( SFX_APP()->IsDowning() )
+ {
+ Delete(0);
+ }
+ else
+ {
+ UnBind();
+ GetpApp()->PostUserEvent(LINK(this, SfxPopupWindow, Delete) , (void*)0);
+ }
+
+ return TRUE;
+}
+
+//--------------------------------------------------------------------
+
+void SfxPopupWindow::PopupModeEnd()
+{
+ if ( IsVisible() )
+ {
+ // wurde abgerissen
+ GetBindings().GetStateCache(GetId())->DeleteFloatingWindows();
+ bFloating = TRUE;
+ }
+ else
+ Close();
+}
+
+//--------------------------------------------------------------------
+
+void SfxPopupWindow::DeleteFloatingWindow()
+{
+ if ( bFloating )
+ {
+ HACK(dieses muss via Parameter durchgereicht werden)
+ SfxPopupAction eAction = GetBindings().GetPopupAction_Impl();
+ switch ( eAction )
+ {
+ case SFX_POPUP_DELETE:
+ Hide();
+ Delete(0);
+ break;
+
+ case SFX_POPUP_HIDE:
+ Hide();
+ if ( GetParent() != SFX_APP()->GetTopWindow() )
+ SetParent( SFX_APP()->GetTopWindow() );
+ break;
+
+ case SFX_POPUP_SHOW:
+ {
+ if ( GetParent() != SFX_APP()->GetTopWindow() )
+ SetParent( SFX_APP()->GetTopWindow() );
+
+ // Achtung: k"onnte wegen seines Kontextes unsichtbar sein!
+ SfxBindings &rBindings = GetBindings();
+ rBindings.Invalidate( GetId() );
+ rBindings.Update( GetId() );
+ break;
+ }
+ }
+ }
+}
+
+//--------------------------------------------------------------------
+
+SfxPopupWindow::SfxPopupWindow( USHORT nId, WinBits nBits, SfxBindings &rBindings ):
+ SfxControllerItem(nId, rBindings.GetSubBindings_Impl() ? *rBindings.GetSubBindings_Impl(TRUE) : rBindings ),
+ FloatingWindow( SFX_APP()->GetTopWindow(), nBits ),
+ bFloating(FALSE)
+{
+ bCascading = FALSE;
+}
+
+//--------------------------------------------------------------------
+
+SfxPopupWindow::SfxPopupWindow( USHORT nId, const ResId &rId, SfxBindings &rBindings ):
+ SfxControllerItem(nId, rBindings.GetSubBindings_Impl() ? *rBindings.GetSubBindings_Impl(TRUE) : rBindings ),
+ FloatingWindow( SFX_APP()->GetTopWindow(), rId ),
+ bFloating(FALSE)
+{
+ bCascading = FALSE;
+}
+
+void SfxPopupWindow::MouseMove( const MouseEvent& rMEvt )
+{
+ if ( bCascading == FALSE )
+ FloatingWindow::MouseMove( rMEvt );
+ else
+ {
+ // MouseMove-Event an die Children forwarden
+ Point aPos = rMEvt.GetPosPixel();
+ Point aScrPos = OutputToScreenPixel( aPos );
+ int i = 0;
+ Window* pWindow = GetChild( i );
+ while ( pWindow )
+ {
+ MouseEvent aMEvt( pWindow->ScreenToOutputPixel( aScrPos ),
+ rMEvt.GetClicks(), rMEvt.GetMode(),
+ rMEvt.GetButtons(), rMEvt.GetModifier() );
+ pWindow->MouseMove( rMEvt );
+ pWindow->Update();
+ i++;
+ pWindow = GetChild( i );
+ }
+ }
+}
+
+void SfxPopupWindow::StartCascading_Impl()
+{
+ bCascading= TRUE;
+}
+
+void SfxPopupWindow::EndCascading_Impl()
+{
+ bCascading = FALSE;
+}
+
+//--------------------------------------------------------------------
+
+SfxPopupWindow* SfxPopupWindow::Clone() const
+
+/* [Beschreibung]
+
+ Diese Methode mu\s "uberladen werden, um dieses Popup auch im
+ Presentations-Modus anzuzeigen. Sie wird gerufen, wenn ein Show()
+ sinnlos w"are, da der Parent nicht das Presentations-Window ist.
+ Beim neu erzeugen wird automatisch das neue Top-Window verwendet, so
+ da\s der Parent das Presentations-Window ist und das neue Popup somit
+ sichtbar ist.
+*/
+
+{
+ return 0;
+}
+
+//--------------------------------------------------------------------
+
+void SfxPopupWindow::StateChanged( USHORT nSID, SfxItemState eState,
+ const SfxPoolItem* pState )
+/* [Bescheibung]
+
+ Siehe auch <SfxControllerItem::StateChanged()>. Au\serdem wird
+ bei eState==SFX_ITEM_DISABLED das Popup gehided und in allen anderen
+ F"allen, falls es floating ist, wieder angezeigt. Daher mu\s die
+ Basisklasse i.d.R. gerufen werden.
+
+ Es findet wegen des Parents eine Sonderbehandlung f"ur den
+ Presentationsmodus statt.
+
+*/
+
+{
+ if ( SFX_ITEM_DISABLED == eState )
+ {
+ Hide();
+ }
+ else if ( bFloating )
+ {
+ Show();
+ }
+}
+
+//--------------------------------------------------------------------
+
+IMPL_LINK( SfxPopupWindow, Delete, void *, pvoid )
+{
+/*
+ if ( pvoid )
+ {
+ SfxBindings& rBindings = GetBindings();
+ rBindings.DENTERREGISTRATIONS();
+ SfxPopupWindow *pNew = Clone();
+ if ( pNew )
+ {
+ pNew->SetPosSizePixel( GetPosPixel(), GetSizePixel() );
+ pNew->bFloating = TRUE;
+ rBindings.DLEAVEREGISTRATIONS();
+ rBindings.Invalidate( GetId() );
+ rBindings.Update( GetId() );
+ }
+ }
+*/
+ if ( aDeleteLink.IsSet() )
+ aDeleteLink.Call( this );
+ delete this;
+ return 0;
+}
+
+//--------------------------------------------------------------------
+
+SfxAppToolBoxControl_Impl::SfxAppToolBoxControl_Impl
+(
+ USHORT nId, ToolBox& rBox, SfxBindings &rBindings
+)
+ : SfxToolBoxControl( nId, rBox, rBindings )
+ , bBigImages( FALSE )
+{
+ aTimer.SetTimeout( 250 );
+ aTimer.SetTimeoutHdl( LINK( this, SfxAppToolBoxControl_Impl, Timeout ) );
+ if( nId == SID_NEWDOCDIRECT )
+ SetImage( SFX_APP()->Get_Impl()->aLastNewURL );
+}
+
+void SfxAppToolBoxControl_Impl::SetImage( const String &rURL )
+{
+ String aURL = rURL;
+ if( !rURL.Len() )
+ {
+ aURL = DEFINE_CONST_UNICODE("private:factory/");
+ aURL += String::CreateFromAscii(SfxObjectFactory::GetDefaultFactory().GetShortName());
+ }
+ GetToolBox().SetItemImage( SID_NEWDOCDIRECT,
+ SfxExplorerFile::GetImage( INetURLObject( aURL ), FALSE ) );
+}
+
+//--------------------------------------------------------------------
+
+void SfxAppToolBoxControl_Impl::Select( BOOL bMod1 )
+{
+ aTimer.Stop();
+ SfxApplication* pApp = SFX_APP();
+ String aLastNewURL( pApp->Get_Impl()->aLastNewURL );
+ if( aLastNewURL.Len() )
+ {
+ SfxStringItem aName( SID_FILE_NAME, aLastNewURL );
+ SfxStringItem aReferer( SID_REFERER, DEFINE_CONST_UNICODE(SFX_REFERER_NEWMENU) );
+ SfxBoolItem aTemplate( SID_TEMPLATE, TRUE );
+
+ const SfxPoolItem* aItems[4];
+ aItems[3] = 0;
+ aItems[0] = &aName;
+ aItems[1] = &aReferer;
+ aItems[2] = &aTemplate;
+ GetBindings().Execute( SID_OPENDOC, aItems, 0, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD );
+ }
+ else
+ SfxToolBoxControl::Select( bMod1 );
+}
+
+//--------------------------------------------------------------------
+
+IMPL_LINK( SfxAppToolBoxControl_Impl, Timeout, Timer *, pTimer )
+{
+ SfxApplication* pApp = SFX_APP();
+ ToolBox& rBox = GetToolBox();
+ Rectangle aRect( rBox.GetItemRect( GetId() ) );
+// aRect.SetPos( rBox.OutputToScreenPixel( aRect.TopLeft() ) );
+
+ USHORT nId = GetId();
+ BOOL bNew = FALSE;
+
+ PopupMenu* pMenu = pApp->Get_Impl()->GetPopupMenu( nId, bBigImages, bNew );
+ if( pMenu )
+ {
+ rBox.SetItemDown( GetId(), TRUE );
+ USHORT nSelected = pMenu->Execute( &rBox, aRect, POPUPMENU_EXECUTE_UP );
+ if( nId == SID_NEWDOCDIRECT )
+ {
+ pApp->Get_Impl()->aLastNewURL = pMenu->GetItemCommand( nSelected );
+ SetImage( pMenu->GetItemCommand( nSelected ) );
+ }
+
+ rBox.SetItemDown( GetId(), FALSE );
+ }
+
+ return 0;
+}
+
+//--------------------------------------------------------------------
+
+void SfxAppToolBoxControl_Impl::Click( )
+{
+ if ( GetId() == SID_NEWDOCDIRECT )
+ aTimer.Start();
+ else
+ Timeout(0);
+}
+
+//--------------------------------------------------------------------
+
+SfxDragToolBoxControl_Impl::SfxDragToolBoxControl_Impl
+(
+ USHORT nId, ToolBox& rBox, SfxBindings &rBindings
+)
+ : SfxToolBoxControl( nId, rBox, rBindings )
+{
+}
+
+Window* SfxDragToolBoxControl_Impl::CreateItemWindow( Window *pParent )
+{
+ return new SfxDragButton_Impl( pParent, GetBindings() );
+}
+
+void SfxDragToolBoxControl_Impl::Select( BOOL bMod1 )
+{
+ GetBindings().Execute( SID_CREATELINK, NULL, 0, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD );
+}
+
+SfxDragButton_Impl::SfxDragButton_Impl( Window *pParent, SfxBindings& rBind )
+ : FixedImage( pParent )
+ , pBindings( &rBind )
+{
+ SetBackground( pParent->GetBackground() );
+ Image aImage( SfxResId( RID_GREPIMAGE ) );
+ SetImage( aImage );
+ Size aSize( aImage.GetSizePixel() );
+ aSize.Width() += 6;
+ SetSizePixel( aSize );
+}
+
+void SfxDragButton_Impl::Command ( const CommandEvent& rCEvt )
+{
+ if( rCEvt.GetCommand() != COMMAND_STARTDRAG )
+ return;
+
+ SfxViewFrame *pViewFrame = SfxViewFrame::Current();
+ if ( pViewFrame )
+ {
+ SfxFrame *pFrame = pBindings->GetDispatcher()->GetFrame()->GetFrame()->GetTopFrame();
+ SfxObjectShell* pSh = pFrame->GetCurrentDocument();
+ if( pSh && pSh->HasName() )
+ {
+ DragServer::Clear();
+ INetBookmark aBmk(
+ SfxFrameHTMLWriter::CreateURL( pFrame ),
+ pSh->GetTitle( SFX_TITLE_CAPTION ) );
+ aBmk.CopyDragServer();
+ Pointer aMovePtr = Pointer( POINTER_MOVEDATA );
+ Pointer aCopyPtr = Pointer( POINTER_COPYDATA );
+ Pointer aLinkPtr = Pointer( POINTER_LINKDATA );
+ ExecuteDrag( aMovePtr, aCopyPtr, aLinkPtr, DRAG_COPYABLE | DRAG_LINKABLE );
+ }
+ }
+}
+
+void SfxDragButton_Impl::MouseMove( const MouseEvent& rEvt )
+{
+ SetPointer( Pointer( POINTER_HAND ) );
+}
+
+void SfxDragButton_Impl::MouseButtonDown( const MouseEvent& rEvt )
+{
+}
+
+SfxHistoryToolBoxControl_Impl::SfxHistoryToolBoxControl_Impl( USHORT nId,
+ ToolBox& rBox, SfxBindings &rBindings )
+ : SfxToolBoxControl( nId, rBox, rBindings )
+{
+ aTimer.SetTimeout( 250 );
+ aTimer.SetTimeoutHdl( LINK( this, SfxHistoryToolBoxControl_Impl, Timeout ) );
+}
+
+void SfxHistoryToolBoxControl_Impl::Select( BOOL bMod1 )
+{
+ aTimer.Stop();
+ SfxToolBoxControl::Select( bMod1 );
+}
+
+IMPL_LINK( SfxHistoryToolBoxControl_Impl, Timeout, Timer *, pTimer )
+{
+ ToolBox& rBox = GetToolBox();
+
+#ifdef VCL
+ rBox.SetItemDown( GetId(), TRUE );
+#endif
+
+ SfxApplication* pApp = SFX_APP();
+ Rectangle aRect( rBox.GetItemRect( GetId() ) );
+ aRect.SetPos( rBox.OutputToScreenPixel( aRect.TopLeft() ) );
+
+ SfxFrame *pTop = GetBindings().GetDispatcher()->GetFrame()->GetFrame()->GetTopFrame();
+ if ( pTop->ExecuteHistoryMenu_Impl( GetId(), aRect, POPUPMENU_EXECUTE_UP ) )
+ rBox.SetItemDown( GetId(), FALSE );
+ return 0;
+}
+
+void SfxHistoryToolBoxControl_Impl::Click( )
+{
+ aTimer.Start();
+ // SfxToolBoxControl::Click();
+}
+
+SfxReloadToolBoxControl_Impl::SfxReloadToolBoxControl_Impl( USHORT nId,
+ ToolBox& rBox, SfxBindings &rBindings )
+ : SfxToolBoxControl( nId, rBox, rBindings )
+{
+}
+
+void SfxReloadToolBoxControl_Impl::Select( USHORT nModifier )
+{
+ SfxBoolItem aItem( SID_RELOAD, TRUE );
+ const SfxPoolItem* aItems[2];
+ aItems[1] = 0;
+ aItems[0] = &aItem;
+ GetBindings().Execute( GetId(),
+ aItems, nModifier, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD );
+}
+
+SfxUnoToolBoxControl* SfxToolBoxControl::CreateControl( const String& rCmd,
+ USHORT nId, ToolBox *pBox, SfxBindings &rBindings )
+{
+ return new SfxUnoToolBoxControl( rCmd, nId, pBox, rBindings );
+}
+
+SfxUnoToolBoxControl::SfxUnoToolBoxControl( const String& rCmd, USHORT nId,
+ ToolBox *pBox, SfxBindings& rBindings )
+ : SfxToolBoxControl( nId, *pBox, rBindings )
+{
+ UnBind();
+ pUnoCtrl = new SfxUnoControllerItem( this, rBindings, rCmd );
+ pUnoCtrl->acquire();
+ pUnoCtrl->GetNewDispatch();
+}
+
+SfxUnoToolBoxControl::~SfxUnoToolBoxControl()
+{
+ pUnoCtrl->UnBind();
+ pUnoCtrl->release();
+}
+
+void SfxUnoToolBoxControl::Select( BOOL bMod1 )
+{
+ pUnoCtrl->Execute();
+}
+
+
diff --git a/sfx2/source/view/frame.cxx b/sfx2/source/view/frame.cxx
new file mode 100644
index 000000000000..5e12d112a12a
--- /dev/null
+++ b/sfx2/source/view/frame.cxx
@@ -0,0 +1,2181 @@
+/*************************************************************************
+ *
+ * $RCSfile: frame.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:36 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _COM_SUN_STAR_UNO_REFERENCE_H_
+#include <com/sun/star/uno/Reference.h>
+#endif
+#ifndef _COM_SUN_STAR_AWT_XWINDOW_HPP_
+#include <com/sun/star/awt/XWindow.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UTIL_XURLTRANSFORMER_HPP_
+#include <com/sun/star/util/XURLTransformer.hpp>
+#endif
+
+#ifndef _MENU_HXX //autogen
+#include <vcl/menu.hxx>
+#endif
+#ifndef _SFXINTITEM_HXX //autogen
+#include <svtools/intitem.hxx>
+#endif
+#ifndef _SPLITWIN_HXX //autogen
+#include <vcl/splitwin.hxx>
+#endif
+#ifndef _SFXENUMITEM_HXX //autogen
+#include <svtools/eitem.hxx>
+#endif
+#ifndef _SFXSTRITEM_HXX //autogen
+#include <svtools/stritem.hxx>
+#endif
+#ifndef _TOOLKIT_UNOHLP_HXX
+#include <toolkit/helper/vclunohelper.hxx>
+#endif
+#ifndef _COM_SUN_STAR_AWT_POSSIZE_HPP_
+#include <com/sun/star/awt/PosSize.hpp>
+#endif
+#ifndef _UNOTOOLS_PROCESSFACTORY_HXX
+#include <unotools/processfactory.hxx>
+#endif
+#include <vcl/msgbox.hxx>
+
+#pragma hdrstop
+
+#include "unoctitm.hxx"
+#include "frame.hxx"
+#include "arrdecl.hxx"
+#include "objsh.hxx"
+#include "dispatch.hxx"
+#include "docfile.hxx"
+#include "docfilt.hxx"
+#include "frmdescr.hxx"
+#include "appdata.hxx"
+#include "openflag.hxx"
+#include "urlframe.hxx"
+#include "viewsh.hxx"
+#include "viewfrm.hxx"
+#include "request.hxx"
+#include "fcontnr.hxx"
+#include "impframe.hxx"
+#include "appuno.hxx"
+#include "topfrm.hxx"
+#include "workwin.hxx"
+#include "fsetvwsh.hxx"
+#include <sfxuno.hxx>
+#include <msgpool.hxx>
+
+#ifdef DBG_UTIL
+#include "frmhtmlw.hxx"
+#endif
+
+static SfxFrameArr_Impl* pFramesArr_Impl=0;
+
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::util;
+using namespace ::com::sun::star::frame;
+
+TYPEINIT1(SfxFrame, SfxListener);
+TYPEINIT1(SfxFrameItem, SfxPoolItem);
+TYPEINIT1(SfxUsrAnyItem, SfxPoolItem);
+
+void SfxFrame::SetLoadCancelable_Impl( SfxCancellable* pCbl )
+{
+ delete pImp->pLoadCancellable;
+ pImp->pLoadCancellable = pCbl;
+}
+
+void SfxFrame::CopyHistory_Impl( SfxFrame *pFrame ) const
+{
+ if ( pParentFrame )
+ {
+ pParentFrame->CopyHistory_Impl( pFrame );
+ return;
+ }
+
+ pFrame->ClearHistory();
+ pFrame->pImp->pHistory = new SfxFrameHistory_Impl;
+ SfxFrameHistory_Impl* pSource = pImp->pHistory;
+ SfxFrameHistory_Impl* pTarget = pFrame->pImp->pHistory;
+
+ // Zuerst die History bis jetzt kopieren
+ sal_uInt32 nCurHisEntry = 0;
+ if ( pSource )
+ {
+ // Die aktuelle Position in der UndoHistory
+ nCurHisEntry = pSource->GetCurPos();
+ sal_uInt32 nCount = pSource->Count();
+ SfxFramePickEntry_Impl* pActEntry = pSource->GetCurObject();
+ if( pActEntry )
+ {
+ GetTopFrame()->GetDescriptor()->GetArgs()->ClearItem( SID_VIEW_DATA );
+ pActEntry->Update( GetTopFrame() );
+ }
+
+ for ( sal_uInt32 n=0; n<=nCurHisEntry; n++ )
+ {
+ SfxFramePickEntry_Impl *pEntry = pSource->GetObject(n);
+ if ( pEntry->aName.Len() )
+ pTarget->Insert( pEntry->Clone(), pTarget->Count() );
+ }
+ }
+
+ pTarget->Seek( pTarget->Count() - 1 );
+}
+
+
+void SfxFrame::ClearHistory()
+{
+ SfxFrameHistory_Impl* pHistory = pImp->pHistory;
+ if ( pHistory )
+ {
+ for ( sal_uInt32 n= pHistory->Count(); n--; )
+ {
+ SfxFramePickEntry_Impl *pEntry = pHistory->GetObject(n);
+ delete pEntry;
+ }
+ delete pImp->pHistory;
+ pImp->pHistory = NULL;
+ }
+}
+
+SfxFrame::SfxFrame(SfxFrame* pParent):
+ pParentFrame( pParent ),
+ pChildArr(0),
+ pUnoImp(0)
+{
+ pImp = new SfxFrame_Impl( this );
+ if ( pParent )
+ pParent->InsertChildFrame_Impl( this );
+ if ( !pFramesArr_Impl )
+ pFramesArr_Impl = new SfxFrameArr_Impl;
+ pFramesArr_Impl->Insert( this, pFramesArr_Impl->Count() );
+}
+
+SvCompatWeakHdl* SfxFrame::GetHdl()
+{
+ return pImp->GetHdl();
+}
+
+SfxCancelManager* SfxFrame::GetCancelManager() const
+{
+ SfxFrame *pFrame = GetTopFrame();
+ SfxCancelManager*& rpMgr = pFrame->pImp->pCancelMgr;
+ if ( !rpMgr )
+ {
+ rpMgr = new SfxCancelManager( SFX_APP()->GetCancelManager() );
+ pFrame->pImp->StartListening( *rpMgr );
+ }
+ return rpMgr;
+}
+
+//--------------------------------------------------------------------
+
+void SfxFrame::Lock_Impl( sal_Bool bLock )
+{
+ SfxFrame *pParent = pParentFrame; // this kann kaputt gehen!
+
+ if ( bLock )
+ {
+ // erstes Lock?
+ if ( 1 == ++pImp->nLocks )
+ SvFactory::IncAliveCount();
+ }
+ else
+ {
+ // letztes Lock?
+ if ( !--pImp->nLocks )
+ {
+ if ( pImp->bCloseOnUnlock )
+ DoClose();
+ SvFactory::DecAliveCount();
+ }
+ }
+
+ if ( pParent )
+ pParent->Lock_Impl(bLock);
+}
+
+//--------------------------------------------------------------------
+
+sal_uInt16 SfxFrame::GetLockCount_Impl() const
+{
+ return pImp->nLocks;
+}
+
+//--------------------------------------------------------------------
+
+void SfxFrame::CloseOnUnlock_Impl()
+{
+ pImp->bCloseOnUnlock = sal_True;
+}
+
+//--------------------------------------------------------------------
+
+SfxFrame::~SfxFrame()
+{
+ pFramesArr_Impl->Remove( pFramesArr_Impl->GetPos( this ) );
+
+ if ( pParentFrame )
+ {
+ pParentFrame->RemoveChildFrame_Impl( this );
+ pParentFrame = 0;
+ }
+
+ for ( sal_uInt32 n=0; n<pImp->aHistory.Count(); n++ )
+ {
+ SfxFramePickEntry_Impl *pEntry = pImp->aHistory.GetObject(n);
+ delete pEntry;
+ }
+
+ if ( pImp->pHistory )
+ {
+ for ( sal_uInt32 n=0; n<pImp->pHistory->Count(); n++ )
+ {
+ SfxFramePickEntry_Impl *pEntry = pImp->pHistory->GetObject(n);
+ delete pEntry;
+ }
+ delete pImp->pHistory;
+ }
+
+ // Nur TopLevel-Frames verwalten ihren Descriptor selbst, bei den anderen
+ // tut es das Frameset
+ if ( pImp->pDescr && !pImp->pDescr->GetParent() )
+ delete pImp->pDescr;
+
+ if ( pChildArr )
+ {
+ DBG_ASSERT( !pChildArr->Count(), "Childs nicht entfernt!" );
+ delete pChildArr;
+ }
+
+ delete pImp;
+}
+
+sal_Bool SfxFrame::DoClose()
+{
+ // Eigentlich wird noch ein PrepareClose gebraucht !!!
+ if ( !pImp->bClosing )
+ {
+ // wenn jetzt gelockt, dann sp"ater wiederholen
+ if ( IsLocked_Impl() )
+ {
+ CloseOnUnlock_Impl();
+ return sal_False;
+ }
+
+ pImp->bClosing = sal_True;
+ CancelTransfers();
+
+ // Bei FrameSets verhindern, da\s das Closen der Childs zu st"andigen
+ // ReCalcs im SplitWindow f"uhrt; SetUpdateMode am FrameWindow wirkt
+ // leider nicht auf dem MAC
+ Window *pWin = NULL;
+ SfxViewShell *pViewSh;
+ if ( pImp->pCurrentViewFrame &&
+ 0 != ( pViewSh = pImp->pCurrentViewFrame->GetViewShell() ) )
+ {
+ pWin = pViewSh->GetWindow();
+ if ( pWin )
+ {
+ if ( pWin->GetType() == RSC_SPLITWINDOW )
+ ((SplitWindow*)pWin)->SetUpdateMode( sal_False );
+ pWin->Hide();
+ }
+ }
+
+ sal_Bool bRet = sal_True;
+ SfxBindings* pBindings = NULL;
+ if ( pImp->pCurrentViewFrame )
+ {
+ pBindings = &pImp->pCurrentViewFrame->GetBindings();
+ bRet = pImp->pCurrentViewFrame->Close();
+ }
+
+ Reference < XFrame > xFrame( pImp-> xFrame );
+ if ( bRet )
+ {
+ // Bei internen Tasks m"ussen Controller und Tools abger"aumt werden
+ if ( pImp->pWorkWin )
+ {
+ pImp->pWorkWin->DeleteControllers_Impl();
+ DELETEZ( pImp->pWorkWin );
+ }
+
+ if ( pImp->bOwnsBindings )
+ delete pBindings;
+
+ // now close frame; it will be deleted if this call is successful, so don't use any members after that!
+ bRet = Close();
+ }
+
+ if ( bRet )
+ {
+ if ( xFrame.is() )
+ xFrame->dispose();
+ }
+ else
+ {
+ if ( pWin )
+ {
+ if ( pWin->GetType() == RSC_SPLITWINDOW )
+ {
+ ((SplitWindow*)pWin)->SetUpdateMode( sal_True );
+ ((SplitWindow*)pWin)->Show();
+ }
+ else
+ pWin->Show();
+ }
+
+ pImp->bClosing = sal_False;
+ }
+
+ return bRet;
+ }
+
+ return sal_True;
+}
+
+void SfxFrame::Clear_Impl()
+{
+ CancelTransfers();
+
+ // Bei FrameSets verhindern, da\s das Closen der Childs zu st"andigen
+ // ReCalcs im SplitWindow f"uhrt; SetUpdateMode am FrameWindow wirkt
+ // leider nicht auf dem MAC
+ Window *pWin = NULL;
+ SfxViewShell *pViewSh;
+ if ( pImp->pCurrentViewFrame &&
+ 0 != ( pViewSh = pImp->pCurrentViewFrame->GetViewShell() ) )
+ {
+ pWin = pViewSh->GetWindow();
+ if ( pWin )
+ {
+ if ( pWin->GetType() == RSC_SPLITWINDOW )
+ ((SplitWindow*)pWin)->SetUpdateMode( sal_False );
+ pWin->Hide();
+ }
+ }
+
+ sal_Bool bRet = sal_True;
+ SfxBindings* pBindings = NULL;
+ if ( pImp->pCurrentViewFrame )
+ {
+ pBindings = &pImp->pCurrentViewFrame->GetBindings();
+ pImp->bClosing = sal_True;
+ bRet = pImp->pCurrentViewFrame->Close();
+ pImp->bClosing = sal_False;
+ }
+
+ if ( bRet )
+ {
+ // Bei internen Tasks m"ussen Controller und Tools abger"aumt werden
+ if ( pImp->pWorkWin )
+ {
+ pImp->pWorkWin->DeleteControllers_Impl();
+ DELETEZ( pImp->pWorkWin );
+ }
+
+ if ( pImp->bOwnsBindings )
+ delete pBindings;
+ }
+ else
+ {
+ if ( pWin )
+ {
+ if ( pWin->GetType() == RSC_SPLITWINDOW )
+ {
+ ((SplitWindow*)pWin)->SetUpdateMode( sal_True );
+ ((SplitWindow*)pWin)->Show();
+ }
+ else
+ pWin->Show();
+ }
+ }
+}
+
+
+sal_Bool SfxFrame::DocIsModified_Impl()
+{
+ if ( pImp->pCurrentViewFrame && pImp->pCurrentViewFrame->GetObjectShell() &&
+ pImp->pCurrentViewFrame->GetObjectShell()->IsModified() )
+ return sal_True;
+ for( sal_uInt16 nPos = GetChildFrameCount(); nPos--; )
+ if( pChildArr->GetObject( nPos )->DocIsModified_Impl() )
+ return sal_True;
+ return sal_False;
+}
+
+sal_uInt16 SfxFrame::PrepareClose_Impl( sal_Bool bUI, sal_Bool bForBrowsing )
+{
+ sal_uInt16 nRet = RET_OK;
+
+ // prevent recursive calls
+ if( !pImp->bPrepClosing )
+ {
+ pImp->bPrepClosing = sal_True;
+
+ SfxObjectShell* pCur = GetCurrentDocument() ;
+ if( pCur )
+ {
+ // SFX components have a known behaviour
+ // First check if this frame is the only view to its current document
+ int bOther = sal_False;
+ for ( const SfxViewFrame *pFrame = SfxViewFrame::GetFirst( pCur );
+ !bOther && pFrame; pFrame = SfxViewFrame::GetNext( *pFrame, pCur ) )
+ {
+ bOther = ( pFrame->GetFrame() != this );
+ }
+
+ if ( bOther )
+ // if there are other views only the current view of this frame must be asked
+ nRet = GetCurrentViewFrame()->GetViewShell()->PrepareClose( bUI, bForBrowsing );
+ else
+ // otherwise ask the document
+ nRet = pCur->PrepareClose( bUI, bForBrowsing );
+ }
+
+ if ( nRet == RET_OK )
+ {
+ // if this frame has child frames, ask them too
+ for( USHORT nPos = GetChildFrameCount(); nRet == RET_OK && nPos--; )
+ nRet = pChildArr->GetObject( nPos )->PrepareClose_Impl( bUI, bForBrowsing );
+ }
+
+ pImp->bPrepClosing = sal_False;
+ }
+
+ if ( nRet == RET_OK && pImp->pWorkWin )
+ // if closing was accepted by the component the UI subframes must be asked also
+ nRet = pImp->pWorkWin->PrepareClose_Impl();
+
+ return nRet;
+}
+
+//--------------------------------------------------------------------
+
+SfxFrame* SfxFrame::GetChildFrame( sal_uInt16 nPos ) const
+{
+ if ( pChildArr && pChildArr->Count() > nPos )
+ {
+ DBG_ASSERT( nPos < pChildArr->Count(), "Falscher Index!")
+ return (*pChildArr)[nPos];
+ }
+
+ return 0L;
+}
+
+void SfxFrame::InsertChildFrame_Impl( SfxFrame* pFrame, sal_uInt16 nPos )
+{
+ if ( !pChildArr )
+ pChildArr = new SfxFrameArr_Impl;
+ pChildArr->Insert( pFrame, nPos );
+ pFrame->pParentFrame = this;
+}
+
+void SfxFrame::RemoveChildFrame_Impl( sal_uInt16 nPos )
+{
+ DBG_ASSERT( pChildArr, "Unbekannter Frame!");
+ pChildArr->Remove( nPos );
+};
+
+void SfxFrame::RemoveChildFrame_Impl( SfxFrame* pFrame )
+{
+ DBG_ASSERT( pChildArr, "Unbekannter Frame!");
+ sal_uInt16 nPos = pChildArr->GetPos(pFrame);
+ RemoveChildFrame_Impl( nPos );
+};
+
+sal_Bool SfxFrame::CloseChildFrames()
+{
+ sal_Bool bRet = sal_True;
+ if ( pChildArr )
+ {
+ // Childs closen
+ sal_uInt16 nCount = pChildArr->Count();
+ for ( sal_uInt16 n=nCount; n>0; n--)
+ {
+ SfxFrame* pFrame = (*pChildArr)[n-1];
+ // pFrame removed sich selbst
+ bRet = pFrame->DoClose();
+ if ( !bRet )
+ break;
+ }
+ }
+
+ return bRet;
+}
+
+SfxFrame* SfxFrame::SearchChildrenForName_Impl(
+ const String& rName, sal_Bool bDeep ) const
+{
+ if ( pChildArr )
+ {
+ sal_uInt16 nCount = pChildArr->Count();
+ for ( sal_uInt16 n=nCount; n>0; n--)
+ {
+ SfxFrame* pFrame = (*pChildArr)[n-1];
+ if ( rName.CompareIgnoreCaseToAscii( pFrame->GetFrameName() ) == COMPARE_EQUAL )
+ return pFrame;
+ if( bDeep )
+ {
+ pFrame = pFrame->SearchChildrenForName_Impl( rName );
+ if ( pFrame )
+ return pFrame;
+ }
+ }
+ }
+
+ return NULL;
+}
+
+SfxFrame* SfxFrame::GetTopFrame() const
+{
+ SfxFrame *pParent = (SfxFrame*) this;
+ while ( pParent->pParentFrame )
+ pParent = pParent->pParentFrame;
+ return pParent;
+}
+
+SfxFrame* SfxFrame::SearchFrame( const String& rName, SfxMedium* pMedium )
+{
+ // Weil Netscape f"uhrende BLANKS "uberliest, m"ussen wir das wohl auch
+ // Sollte besser auch bei den FrameNames gemacht werden!
+ String aName( rName );
+ aName.EraseLeadingChars();
+
+ SfxFrame *pFrame = this;
+ if( !aName.Len() || aName.CompareIgnoreCaseToAscii("_self") == COMPARE_EQUAL )
+ {
+ return pFrame;
+ }
+ else if ( aName.CompareIgnoreCaseToAscii("_smartself") == COMPARE_EQUAL )
+ {
+ DBG_ERROR("Not supported!");
+ return pFrame;
+ }
+ else if ( aName.CompareIgnoreCaseToAscii( GetFrameName() ) == COMPARE_EQUAL)
+ {
+ // Eigener Name, kein Name oder Selbstbezug
+ return pFrame;
+ }
+ else if ( aName.CompareIgnoreCaseToAscii("_parent") == COMPARE_EQUAL )
+ {
+ // Gesucht ist das Parent Frameset
+ return pParentFrame ? pParentFrame : this;
+ }
+ else if ( aName.CompareIgnoreCaseToAscii("_blank") == COMPARE_EQUAL )
+ {
+ return NULL;
+ }
+ else if ( aName.CompareIgnoreCaseToAscii("_top") == COMPARE_EQUAL )
+ {
+ while ( pFrame->GetParentFrame() )
+ pFrame = pFrame->GetParentFrame();
+ return pFrame;
+ }
+ else
+ {
+ // Zuerst unterhalb dieses Frames absuchen
+ pFrame = SearchChildrenForName_Impl( aName );
+ }
+
+ if ( !pFrame && GetParentFrame() )
+ {
+ // Noch nichts gefunden, nach oben weitergehen
+ // Eigentlich m"u\sten Frames, die schon abgesucht wurden, aus
+ // Performance-Gr"unden markiert werden
+ SfxFrame *pParent = GetParentFrame();
+ do
+ {
+ // Ist es der Parent ?
+ if ( aName.CompareIgnoreCaseToAscii( pParent->GetFrameName() ) == COMPARE_EQUAL )
+ return pParent;
+
+ if ( pParent->pImp->pDescr->GetFrameSet() )
+ {
+ // Wenn es ein Parent Frameset gibt, dort suchen
+ pFrame = pParent->SearchChildrenForName_Impl( aName );
+ if ( pFrame )
+ return pFrame;
+ }
+
+ // Weiter nach oben
+ pParent = pParent->GetParentFrame();
+ }
+ while ( pParent );
+ }
+
+ if( !pFrame )
+ {
+ SfxFrameArr_Impl& rArr = *SFX_APP()->Get_Impl()->pTopFrames;
+ // keinen Frame im MDI-Fenster gefunden. Jetzt die anderen
+ // Toplevel Frames checken.
+ SfxFrame *pTop = GetTopFrame();
+ for( sal_uInt16 nPos = rArr.Count(); nPos--; )
+ {
+ // Unser Topframe wurde bereits durchsucht
+ SfxFrame* pCurFrame = rArr[ nPos ];
+ if( pCurFrame != pTop )
+ {
+ if( aName.CompareIgnoreCaseToAscii( pCurFrame->GetFrameName() ) ==
+ COMPARE_EQUAL )
+ return pCurFrame;
+ else
+ {
+ if( pFrame =
+ pCurFrame->SearchChildrenForName_Impl( aName ) )
+ return pFrame;
+ }
+ }
+ }
+ }
+
+ return pFrame;
+}
+
+sal_Bool SfxFrame::IsClosing_Impl() const
+{
+ return pImp->bClosing;
+}
+
+void SfxFrame::DocumentInserted( SfxObjectShell* pDoc )
+{
+}
+
+sal_uInt16 SfxFrame::GetChildFrameCount() const
+{
+ return pChildArr ? pChildArr->Count() : 0;
+}
+
+sal_Bool SfxFrame::InsertDocument( SfxObjectShell *pDoc )
+/* [Beschreibung]
+
+ Mu\s von abgeleiteten Klassen gerufen werden, liefert ggf. auch sal_False!
+ */
+
+ {
+ // am drucken oder so?
+ if ( IsLocked_Impl() )
+ return sal_False;
+
+ // Falls die aktuelle ::com::sun::star::sdbcx::View oder die TopFrame-::com::sun::star::sdbcx::View parent eines
+ // ModalDialogs ist, darf sie nicht entfernt werden
+ SfxObjectShell* pCur = GetCurrentDocument();
+ if ( pCur && ( pCur->IsInModalMode() || pCur->IsInPrepareClose() ) )
+ return sal_False;
+ DocumentInserted( pDoc );
+ return sal_True;
+ }
+
+void SfxFrame::SetLoadEnvironment_Impl( LoadEnvironment_Impl* pEnv )
+{
+ if ( pImp->pLoadEnv )
+ pImp->pLoadEnv->EndListening( *pImp );
+
+ pImp->pLoadEnv = pEnv;
+
+ if ( pImp->pLoadEnv && !pImp->pLoadEnv->IsListening( *pImp ) )
+ pImp->pLoadEnv->StartListening( *pImp );
+}
+
+LoadEnvironment_Impl* SfxFrame::GetLoadEnvironment_Impl() const
+{
+ return pImp->pLoadEnv;
+}
+
+void SfxFrame::CancelTransfers( sal_Bool bCancelLoadEnv )
+{
+ if( !pImp->bInCancelTransfers )
+ {
+ pImp->bInCancelTransfers = sal_True;
+#if SUPD<582
+ SfxJS* pJS = GetJavaScript( sal_False );
+ if( pJS )
+ {
+ JScriptDocumentManager * pDM = pJS->GetDocumentManager( sal_False );
+ if( pDM ) pDM->StopNoneRecursiveCalls();
+ }
+#endif
+ SfxObjectShell* pObj = GetCurrentDocument();
+ if( pObj ) //&& !( pObj->Get_Impl()->nLoadedFlags & SFX_LOADED_ALL ))
+ {
+ SfxViewFrame* pFrm;
+ for( pFrm = SfxViewFrame::GetFirst( pObj );
+ pFrm && pFrm->GetFrame() == this;
+ pFrm = SfxViewFrame::GetNext( *pFrm, pObj ) );
+ // Keine anderer Frame mehr auf Doc -> Cancel
+ if( !pFrm ) pObj->CancelTransfers();
+ }
+
+ // zuerst Nachladende Frames stoppen
+ SfxURLFrame* pURLFrame = PTR_CAST( SfxURLFrame, this );
+ if( pURLFrame )
+ pURLFrame->CancelActivate_Impl();
+ sal_uInt16 nCount = GetChildFrameCount();
+ for( sal_uInt16 n = 0; n<nCount; n++ )
+ GetChildFrame( n )->CancelTransfers();
+
+ // ggf. StarOne-Loader canceln
+ SfxFrameWeak wFrame( this );
+ if( wFrame.Is() && pImp->pLoadEnv && bCancelLoadEnv )
+ pImp->pLoadEnv->CancelTransfers();
+
+ if (wFrame.Is())
+ pImp->bInCancelTransfers = sal_False;
+ }
+}
+
+SfxViewFrame* SfxFrame::GetCurrentViewFrame() const
+{
+ return pImp->pCurrentViewFrame;
+}
+
+SfxDispatcher* SfxFrame::GetDispatcher_Impl() const
+{
+ if ( pImp->pCurrentViewFrame )
+ return pImp->pCurrentViewFrame->GetDispatcher();
+ return GetParentFrame()->GetDispatcher_Impl();
+}
+
+SfxObjectShell* SfxFrame::GetCurrentDocument() const
+{
+ return pImp->pCurrentViewFrame ?
+ pImp->pCurrentViewFrame->GetObjectShell() :
+ pImp->pCurrentObjectShell;
+}
+
+void SfxFrame::SetCurrentDocument_Impl( SfxObjectShell *pDoc )
+{
+ pImp->pCurrentObjectShell = pDoc;
+}
+
+void SfxFrame::SetCurrentViewFrame_Impl( SfxViewFrame *pFrame )
+{
+ pImp->pCurrentViewFrame = pFrame;
+}
+
+sal_uInt32 SfxFrame::GetFrameType() const
+{
+ return pImp->nType;
+}
+
+void SfxFrame::SetFrameType_Impl( sal_uInt32 n )
+{
+ pImp->nType = n;
+}
+
+sal_Bool SfxFrame::ExecuteHistoryMenu_Impl( sal_uInt16 nWhich, const Rectangle& rRect,
+ sal_uInt16 nFlags )
+{
+ SfxFrameHistory_Impl* pHistory = pImp->pHistory;
+ if ( !pHistory || !pHistory->Count() )
+ return sal_False;
+
+ PopupMenu *pMenu = new PopupMenu;
+ long nPos = (long) pHistory->GetCurPos();
+ if ( nWhich == SID_BROWSE_FORWARD )
+ {
+ for ( long n=nPos+1; n<(long)pHistory->Count(); n++ )
+ {
+ SfxFramePickEntry_Impl *pEntry = pHistory->GetObject( n );
+ String aEntry( n-nPos-1 );
+ aEntry += ' ';
+ aEntry += pEntry->aName;
+ pMenu->InsertItem( n+1, aEntry );
+ }
+ }
+ else
+ {
+ for ( long n=nPos-1; n>=0; n-- )
+ {
+ SfxFramePickEntry_Impl *pEntry = pHistory->GetObject( n );
+ String aEntry( nPos-n-1 );
+ aEntry += ' ';
+ aEntry += pEntry->aName;
+ pMenu->InsertItem( n+1, aEntry );
+ }
+ }
+
+ sal_uInt16 nRet = pMenu->Execute( &GetWindow(), rRect, nFlags ) - 1;
+ if ( nRet != MENU_ITEM_NOTFOUND )
+ Browse( nWhich == SID_BROWSE_FORWARD,
+ (sal_uInt16) ( nRet > nPos ? nRet-nPos : nPos - nRet ) );
+ return sal_True;
+}
+
+sal_Bool SfxFrame::Browse( sal_Bool bForward, sal_uInt16 nSteps, sal_Bool bNewFrame )
+{
+ SfxFrameHistory_Impl* pHistory = pImp->pHistory;
+ if ( !pHistory || !pHistory->Count() )
+ {
+ // Die Undo-History wird immer am TopLevel-Frame gef"uhrt; hier mu\s
+ // noch definiert werden, was "BackInFrame" bedeuten soll (eigene Methode)
+ return sal_False;
+ }
+
+ if ( bNewFrame )
+ return sal_False;
+
+ long nPos = (long) pHistory->GetCurPos();
+ long nCount = (long) pHistory->Count();
+ long nNextPos = nPos + ( bForward ? (long) nSteps : - (long) nSteps );
+ sal_uInt16 nMode = bForward ? BROWSE_FORWARD : BROWSE_BACKWARD;
+ nMode += ( nSteps << 4 );
+ if ( nSteps && nNextPos >= 0L && nNextPos < nCount )
+ {
+ SfxFrame *pFrame = this;
+ if ( bNewFrame )
+ {
+ SfxFrame* pNew = SfxTopFrame::Create();
+
+ // Die History komplett kopieren
+ pNew->pImp->pHistory = new SfxFrameHistory_Impl;
+ SfxFrameHistory_Impl& rTarget = *pNew->pImp->pHistory;
+ sal_uInt32 nCount = pHistory->Count();
+ SfxFramePickEntry_Impl* pActEntry = pHistory->GetCurObject();
+ if( pActEntry )
+ {
+ pFrame->GetDescriptor()->GetArgs()->ClearItem( SID_VIEW_DATA );
+ pActEntry->Update( pFrame );
+ }
+
+ for ( sal_uInt32 n=0; n<nCount; n++ )
+ {
+ SfxFramePickEntry_Impl *pEntry = pHistory->GetObject(n);
+ if ( pEntry->aName.Len() )
+ rTarget.Insert( pEntry->Clone(), n );
+ }
+
+ rTarget.Seek( pHistory->GetCurPos() );
+ pFrame = pNew;
+ }
+
+ SfxFramePickEntry_Impl *pEntry = pFrame->pImp->pHistory->GetObject( nNextPos );
+ pFrame->ActivatePickEntry_Impl( pEntry, nMode );
+ return sal_True;
+ }
+
+ return sal_False;
+}
+
+void SfxFrame::UpdatePickEntries()
+{
+
+ SfxFrame *pParent = this;
+ while ( pParent->pParentFrame )
+ pParent = pParent->pParentFrame;
+
+ // ViewData clearen, damit sie neu geholt wird
+ GetDescriptor()->GetArgs()->ClearItem( SID_VIEW_DATA );
+ SfxFrameHistory_Impl* pParentHistory = pParent->pImp->pHistory;
+ if( pParentHistory )
+ {
+ SfxFramePickEntry_Impl* pActEntry = pParentHistory->GetCurObject();
+ if( pActEntry )
+ {
+ Deactivate_Impl();
+ pActEntry->Update( GetTopFrame() );
+ }
+ }
+
+ SfxObjectShell *pDoc = GetCurrentDocument();
+ if ( !pDoc )
+ return;
+
+ SfxFrameHistory_Impl& rHistory = pImp->aHistory;
+ SfxFramePickEntry_Impl* pActEntry = pImp->aHistory.GetCurObject();
+ if( pActEntry )
+ pActEntry->Update( this );
+}
+
+void SfxFrame::UpdatePickEntries( const ::com::sun::star::uno::Any& rValue )
+{
+ SfxFrame *pParent = this;
+ while ( pParent->pParentFrame )
+ pParent = pParent->pParentFrame;
+
+ // ViewData setzen, nicht mehr holen
+ SfxPoolItem *pItem = new SfxUsrAnyItem( SID_VIEW_DATA, rValue );
+ SfxFrameHistory_Impl* pParentHistory = pParent->pImp->pHistory;
+ if( pParentHistory )
+ {
+ SfxFramePickEntry_Impl* pActEntry = pParentHistory->GetCurObject();
+ if( pActEntry )
+ {
+ Deactivate_Impl();
+ pActEntry->Update( GetTopFrame(), pItem );
+ }
+ }
+
+ SfxObjectShell *pDoc = GetCurrentDocument();
+ if ( !pDoc )
+ return;
+
+ SfxFrameHistory_Impl& rHistory = pImp->aHistory;
+ SfxFramePickEntry_Impl* pActEntry = pImp->aHistory.GetCurObject();
+ if( pActEntry )
+ pActEntry->Update( this, pItem );
+
+ delete pItem;
+}
+
+void SfxFrame::UpdateUndoHistory_Impl( SfxObjectShell *pDocSh, const String* pNew, const String* pTitle )
+{
+ if ( pDocSh->GetCreateMode() != SFX_CREATE_MODE_STANDARD )
+ // Keine OLE-Objekte etc.
+ return;
+
+ SfxItemSet* pSet = pDocSh->GetMedium()->GetItemSet();
+ String aNew;
+ if( pNew )
+ aNew = *pNew;
+ else
+ aNew = pDocSh->GetMedium()->GetOrigURL();
+
+ // Die Undo-History wird immer am TopLevel-Frame gef"uhrt
+ // Zusaetzlich wird pro Frame eine History gefuehrt
+ SfxFrame *pParent = this;
+ while ( pParent->pParentFrame )
+ pParent = pParent->pParentFrame;
+
+ sal_uInt16 nBrowseMode = BROWSE_NORMAL;
+ if( pSet )
+ {
+ SFX_ITEMSET_ARG( pSet, pBrowseMode, SfxUInt16Item, SID_BROWSEMODE, sal_False );
+ if( pBrowseMode )
+ nBrowseMode = pBrowseMode->GetValue();
+ }
+
+ if( nBrowseMode != NO_BROWSE )
+ {
+ SfxObjectShell *pDoc = GetCurrentDocument();
+ SfxFrameHistory_Impl*& pParentHistory = pParent->pImp->pHistory;
+ if( !pParentHistory )
+ {
+ pParentHistory = new SfxFrameHistory_Impl;
+ nBrowseMode = BROWSE_NORMAL;
+ }
+
+ sal_uInt16 nSteps = nBrowseMode >> 4;
+ nBrowseMode &= 0x000F;
+
+ if ( nBrowseMode != BROWSE_BACKWARD && nBrowseMode != BROWSE_FORWARD )
+ {
+ // Nur Entry anlegen, wenn bisher leer, oder kein NoName-Dokument
+ // und entweder neue DocShell oder neuer lokaler Sprung
+ if ( !pDoc || pDoc->HasName() &&
+ ( pDoc != pDocSh || pDoc->GetMedium()->GetOrigURL() != aNew ) )
+ {
+ SfxFramePickEntry_Impl* pNewEntry =
+ new SfxFramePickEntry_Impl;
+ pNewEntry->Initialize( GetTopFrame(), sal_False, pDocSh, pNew, pTitle );
+ pParent->pImp->AppendPickEntry( pNewEntry );
+ pParentHistory->Seek( pParentHistory->Count() - 1 );
+
+ pImp->nHasBrowser = SFX_BEAMER_OFF;
+ SFX_ITEMSET_ARG( pSet, pBrowserItem, SfxUInt16Item,
+ SID_BROWSER, sal_False);
+ if ( pBrowserItem )
+ pImp->nHasBrowser = pBrowserItem->GetValue();
+ }
+ }
+ else
+ {
+ pParentHistory->Seek(
+ pParentHistory->GetCurPos() +
+ ( nBrowseMode == BROWSE_FORWARD ? (long) nSteps : - (long) nSteps ));
+
+ SfxFramePickEntry_Impl* pEntry = pParentHistory->GetCurObject();
+
+ DBG_ASSERT( pEntry, "Kein History-Entry!?" );
+ }
+
+ SfxViewFrame* pViewFrame = pParent->GetCurrentViewFrame();
+ if( pViewFrame )
+ {
+ SfxBindings& rBindings = pViewFrame->GetBindings();
+ rBindings.Invalidate( SID_BROWSE_FORWARD );
+ rBindings.Invalidate( SID_BROWSE_BACKWARD );
+ }
+ }
+}
+
+void SfxFrame::UpdateCurrentHistory_Impl( SfxObjectShell *pDocSh, const String* pNew )
+{
+ if ( pDocSh->GetCreateMode() != SFX_CREATE_MODE_STANDARD )
+ // Keine OLE-Objekte etc.
+ return;
+
+ String aNew;
+ if( pNew )
+ aNew = *pNew;
+ else
+ aNew = pDocSh->GetMedium()->GetOrigURL();
+
+ // Die Undo-History wird immer am TopLevel-Frame gef"uhrt
+ // Zusaetzlich wird pro Frame eine History gefuehrt
+ SfxFrame *pParent = this;
+ while ( pParent->pParentFrame )
+ pParent = pParent->pParentFrame;
+
+ SfxObjectShell *pDoc = GetCurrentDocument();
+ sal_uInt16 nBrowseMode = BROWSE_NORMAL;
+ SFX_ITEMSET_ARG( pDocSh->GetMedium()->GetItemSet(), pBrowseMode,
+ SfxUInt16Item, SID_BROWSEMODE, sal_False );
+ if( pBrowseMode )
+ nBrowseMode = pBrowseMode->GetValue();
+
+ if( nBrowseMode != BROWSE_FRAME )
+ {
+ // Nur Entry anlegen, wenn bisher leer, oder kein NoName-Dokument
+ // und entweder neue DocShell oder neuer lokaler Sprung
+ if ( !pDoc || pDoc->HasName() &&
+ ( pDoc != pDocSh || pDoc->GetMedium()->GetOrigURL() != aNew ) )
+ {
+ SfxFrameHistory_Impl& rHistory = pImp->aHistory;
+ sal_uInt32 nCurHisEntry = rHistory.GetCurPos();
+ SfxFramePickEntry_Impl* pNewPickEntry =
+ new SfxFramePickEntry_Impl;
+ pNewPickEntry->Initialize( this, sal_False, pDocSh, pNew );
+
+ // Anzahl beschr"anken
+ if ( rHistory.Count() == PICKLIST_MAXSIZE )
+ delete rHistory.Remove( rHistory.Count() - 1 );
+
+ // Eintraege ueber dem aktuellen Eintrag werden geloescht
+ if ( LIST_ENTRY_NOTFOUND != nCurHisEntry )
+ {
+ for ( sal_uInt32 nEntry = 0; nEntry < nCurHisEntry; ++nEntry )
+ delete rHistory.Remove( 0UL );
+ }
+
+ // den neuen einf"ugen
+ rHistory.Insert( pNewPickEntry, 0UL );
+ rHistory.Seek( 0UL );
+ nCurHisEntry = 0;
+ }
+ }
+
+ if ( nBrowseMode != BROWSE_BACKWARD &&
+ nBrowseMode != BROWSE_FORWARD &&
+ nBrowseMode != NO_BROWSE)
+ {
+ if ( pParent == this )
+ SfxPickList_Impl::Get()->InsertToHistory( pDocSh );
+ }
+}
+
+void SfxFrame::UpdateHistory( SfxObjectShell *pDocSh, const String* pNew )
+{
+ String aNew;
+ if( pNew )
+ aNew = *pNew;
+ else
+ aNew = pDocSh->GetMedium()->GetOrigURL();
+
+ UpdateUndoHistory_Impl( pDocSh, &aNew );
+ UpdateCurrentHistory_Impl( pDocSh, &aNew );
+}
+
+void SfxFrame::UpdateHistory( const ::rtl::OUString& aURL, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArgs, const ::rtl::OUString& rTitle )
+{
+ String aStr( aURL );
+ String aTitle( rTitle );
+ SfxObjectShell *pDoc = GetCurrentDocument();
+ if ( pDoc )
+ {
+ pDoc->GetMedium()->GetItemSet()->ClearItem( SID_BROWSEMODE );
+ UpdateUndoHistory_Impl( pDoc, &aStr, &aTitle );
+ }
+}
+
+void SfxFrame::GetViewData_Impl()
+{
+ // Alle zwischen Laden und Entfernen "anderbaren Daten aktualisieren; die
+ // festen Daten werden nur einmal ( nach InsertDocument in UpdateDescriptor )
+ // geholt, um Zeit zu sparen.
+ SfxViewFrame* pViewFrame = GetCurrentViewFrame();
+ if( pViewFrame && pViewFrame->GetViewShell() )
+ {
+ const SfxMedium *pMed = GetCurrentDocument()->GetMedium();
+ sal_Bool bReadOnly = pMed->GetOpenMode() == SFX_STREAM_READONLY;
+ GetDescriptor()->SetReadOnly( bReadOnly );
+
+ String aUserData;
+ pViewFrame->GetViewShell()->WriteUserData( aUserData, sal_True );
+ SfxItemSet *pSet = GetDescriptor()->GetArgs();
+ pSet->Put( SfxStringItem( SID_USER_DATA, aUserData ));
+ sal_Bool bGetViewData = sal_False;
+ if ( GetController().is() && pSet->GetItemState( SID_VIEW_DATA ) != SFX_ITEM_SET )
+ {
+ ::com::sun::star::uno::Any aData = GetController()->getViewData();
+ pSet->Put( SfxUsrAnyItem( SID_VIEW_DATA, aData ) );
+ bGetViewData = sal_True;
+ }
+
+ if ( pViewFrame->GetCurViewId() )
+ pSet->Put( SfxUInt16Item( SID_VIEW_ID, pViewFrame->GetCurViewId() ) );
+ if ( pChildArr )
+ {
+ // Bei Framesets m"ussen auch die Daten der ChildViews geholt werden
+ sal_uInt16 nCount = pChildArr->Count();
+ for ( sal_uInt16 n=nCount; n>0; n--)
+ {
+ SfxFrame* pFrame = (*pChildArr)[n-1];
+ if ( bGetViewData )
+ pFrame->GetDescriptor()->GetArgs()->ClearItem( SID_VIEW_DATA );
+ pFrame->GetViewData_Impl();
+ }
+ }
+ }
+}
+
+void SfxFrame::UpdateDescriptor( SfxObjectShell *pDoc )
+{
+ // Beim InsertDocument wird der Descriptor des Frames aktualisiert
+ // und sein ItemSet neu initialisiert. Alle Daten, die f"ur ein sp"ateres
+ // Restaurieren der ::com::sun::star::sdbcx::View n"otig sind, sind damit festgehalten.
+ // Soll das Dokument ersetzt werden, wird durch GetViewData_Impl (s.o.)
+ // die neueste Information hinzugef"ugt. Alles zusammen wird dann in der
+ // Browse-History gesichert. Beim Aktivieren eines solchen FramePickEntry
+ // wird das komplette ItemSet und der Descriptor im OpenDoc mitgeschickt.
+ // Hier werden nur die festen Eigenschaften gesichert; die "anderbaren werden
+ // durch GetViewData geholt ( spart Zeit ).
+ DBG_ASSERT( pDoc, "NULL-Document inserted ?!" );
+
+ SfxFrame *pParent = GetParentFrame();
+ const SfxMedium *pMed = pDoc->GetMedium();
+ GetDescriptor()->SetActualURL( pMed->GetOrigURL() );
+
+ SFX_ITEMSET_ARG( pMed->GetItemSet(), pItem, SfxBoolItem, SID_EDITDOC, sal_False );
+ sal_Bool bEditable = ( !pItem || pItem->GetValue() );
+
+ GetDescriptor()->SetEditable( bEditable );
+
+ // FileOpen-Parameter merken
+ SfxItemSet* pItemSet = pMed->GetItemSet();
+ String aName( pMed->GetName() );
+ SFX_ITEMSET_ARG( pItemSet, pPostItem, SfxStringItem, SID_POSTSTRING, sal_False );
+ String aPost;
+ if( pPostItem )
+ aPost = pPostItem->GetValue();
+
+ const SfxFilter* pFilter = pMed->GetOrigFilter();
+ String aFilter;
+ if ( pFilter )
+ aFilter = pFilter->GetName();
+
+ SFX_ITEMSET_ARG( pItemSet, pRefererItem, SfxStringItem, SID_REFERER, sal_False);
+ SFX_ITEMSET_ARG( pItemSet, pOptionsItem, SfxStringItem, SID_FILE_FILTEROPTIONS, sal_False);
+ SFX_ITEMSET_ARG( pItemSet, pTitle1Item, SfxStringItem, SID_DOCINFO_TITLE, sal_False);
+ SFX_ITEMSET_ARG( pItemSet, pTitle2Item, SfxStringItem, SID_FILE_LONGNAME, sal_False);
+
+ SfxItemSet *pSet = GetDescriptor()->GetArgs();
+
+ // Alle alten Items l"oschen
+ pSet->ClearItem();
+
+ if ( pRefererItem )
+ pSet->Put( *pRefererItem );
+ else
+ pSet->Put( SfxStringItem( SID_REFERER, String() ) );
+
+ if ( pPostItem )
+ pSet->Put( *pPostItem );
+
+ if ( pOptionsItem )
+ pSet->Put( *pOptionsItem );
+
+ if ( pTitle1Item )
+ pSet->Put( *pTitle1Item );
+
+ if ( pTitle2Item )
+ pSet->Put( *pTitle2Item );
+
+ pSet->Put( SfxStringItem( SID_FILTER_NAME, aFilter ));
+}
+
+//-------------------------------------------------------------------------
+
+sal_Bool SfxFrame::CanBrowseBackward() const
+{
+ SfxFrameHistory_Impl* pHistory = pImp->pHistory;
+ return pHistory && pHistory->Count() && pHistory->GetCurPos() > 0;
+}
+
+//-------------------------------------------------------------------------
+
+sal_Bool SfxFrame::CanBrowseForward() const
+{
+ SfxFrameHistory_Impl* pHistory = pImp->pHistory;
+ return pHistory && pHistory->Count() && pHistory->GetCurPos() <
+ pHistory->Count() - 1l;
+}
+
+//-------------------------------------------------------------------------
+
+void SfxFrame::SetDescriptor( SfxFrameDescriptor *pD )
+{
+ DBG_ASSERT( pD, "Kein Descriptor!" );
+ DBG_ASSERT( pD != pImp->pDescr, "Descriptor ist schon gesetzt!" );
+
+ if ( pImp->pDescr )
+ {
+ sal_uInt16 nPos = pImp->pDescr->GetItemPos();
+ SfxFrameSetDescriptor *pSet = pImp->pDescr->GetParent();
+
+ // Nur TopLevel-Frames verwalten ihren Descriptor selbst, bei den
+ // anderen tut es das Frameset
+ if ( !pParentFrame )
+ delete pImp->pDescr;
+ if ( pSet && !pD->GetParent() )
+ {
+ pSet->RemoveFrame( pImp->pDescr );
+ pSet->InsertFrame( pD, nPos );
+ }
+ }
+ pImp->pDescr = pD;
+}
+
+//-------------------------------------------------------------------------
+
+SfxFrameDescriptor* SfxFrame::GetDescriptor() const
+{
+ // On Demand einen FrameDescriptor anlegen; wenn es kein TopLevel-Frame
+ // ist, f"uhrt es zu Fehlern, da keine g"ulige Verkettung hergestellt wird
+
+ if ( !pImp->pDescr )
+ {
+ DBG_ASSERT( !GetParentFrame(), "Kein TopLevel-Frame, aber kein Descriptor!" );
+ pImp->pDescr = new SfxFrameDescriptor( NULL );
+ if ( GetCurrentDocument() )
+ pImp->pDescr->SetURL( GetCurrentDocument()->GetMedium()->GetOrigURL() );
+ }
+ return pImp->pDescr;
+}
+
+sal_Bool SfxFrame::TransferForReplaceInProgress() const
+{
+ return pImp->pLoadEnv && pImp->pLoadEnv->GetObjectShell() !=
+ GetCurrentDocument();
+}
+
+//-------------------------------------------------------------------------
+
+void SfxFrame::GetTargetList( TargetList& rList ) const
+{
+ if ( !GetParentFrame() )
+ {
+ // Einen Leerstring f"ur 'Kein Target'
+ rList.Insert( new String() );
+ rList.Insert( new String( DEFINE_CONST_UNICODE( "_top" ) ) );
+ rList.Insert( new String( DEFINE_CONST_UNICODE( "_parent" ) ) );
+ rList.Insert( new String( DEFINE_CONST_UNICODE( "_blank" ) ) );
+ rList.Insert( new String( DEFINE_CONST_UNICODE( "_self" ) ) );
+ }
+
+ SfxViewFrame* pView = GetCurrentViewFrame();
+ if( pView && pView->GetViewShell() && !pView->GetViewShell()->IsImplementedAsFrameset_Impl() && pChildArr )
+ {
+ sal_uInt16 nCount = pChildArr->Count();
+ for ( sal_uInt16 n=0; n<nCount; n++)
+ {
+ SfxFrame* pFrame = (*pChildArr)[n];
+ if ( pFrame->GetFrameName().Len() )
+ rList.Insert( new String (pFrame->GetFrameName()) );
+ pFrame->GetTargetList( rList );
+ }
+ }
+}
+
+//-------------------------------------------------------------------------
+
+void SfxFrame::SetFrameId_Impl( sal_uInt16 nId )
+{
+ pImp->nFrameId = nId;
+ if ( GetCurrentViewFrame() )
+ GetCurrentViewFrame()->UpdateTitle();
+}
+
+sal_uInt16 SfxFrame::GetFrameId_Impl() const
+{
+ return pImp->nFrameId;
+}
+
+void SfxFrame::SetFrameIdName_Impl( const String& rName )
+{
+ pImp->aFrameIdName = rName;
+}
+
+//-------------------------------------------------------------------------
+
+SfxFrame* SfxFrame::SearchFrame_Impl( sal_uInt16 nId, sal_Bool bDeep )
+{
+ if ( pImp->nFrameId == nId )
+ return this;
+
+ if ( pChildArr )
+ {
+ sal_uInt16 nCount = pChildArr->Count();
+ for ( sal_uInt16 n=0; n<nCount; n++)
+ {
+ SfxFrame* pFrame = (*pChildArr)[n];
+ if ( pFrame->pImp->nFrameId == nId )
+ return pFrame;
+ if ( bDeep )
+ {
+ pFrame = pFrame->SearchFrame_Impl( nId, sal_True );
+ if ( pFrame )
+ return pFrame;
+ }
+ }
+ }
+
+ return NULL;
+}
+
+SfxFrame* SfxFrame::SearchFrame_Impl( const String& rName, sal_Bool bDeep )
+{
+ if ( pImp->aFrameIdName == rName )
+ return this;
+
+ if ( pChildArr )
+ {
+ sal_uInt16 nCount = pChildArr->Count();
+ for ( sal_uInt16 n=0; n<nCount; n++)
+ {
+ SfxFrame* pFrame = (*pChildArr)[n];
+ if ( pFrame->pImp->aFrameIdName == rName )
+ return pFrame;
+ if ( bDeep )
+ {
+ pFrame = pFrame->SearchFrame_Impl( rName );
+ if ( pFrame )
+ return pFrame;
+ }
+ }
+ }
+
+ return NULL;
+}
+
+//-------------------------------------------------------------------------
+
+SfxViewFrame* SfxFrame::ActivateChildFrame_Impl()
+{
+ // Irgendeinen ChildFrame suchen, der aktiviert werden kann
+ BOOL bSetFocus = GetCurrentViewFrame() && GetCurrentViewFrame()->GetViewShell()->GetWindow()->HasChildPathFocus( TRUE );
+ for ( sal_uInt16 n=0; n<GetChildFrameCount(); n++ )
+ {
+ // Wenn es ein ViewFrame ohne FrameSet ist, aktivieren
+ SfxFrame *pAct = GetChildFrame(n);
+ SfxViewFrame *pViewFrm = pAct->GetCurrentViewFrame();
+ if ( pViewFrm && !( pAct->GetFrameType() & SFXFRAME_FRAMESET ) &&
+ pViewFrm->GetObjectShell() )
+ pViewFrm->MakeActive_Impl( bSetFocus );
+ else
+ pViewFrm = pAct->ActivateChildFrame_Impl();
+ if ( pViewFrm )
+ return pViewFrm;
+ }
+
+ return NULL;
+}
+
+//-------------------------------------------------------------------------
+
+void SfxFrame::Activate_Impl( sal_Bool bBeamerOn )
+
+/* [Description]
+
+ Internal Activate-Handler, called from derived classes which supports
+ Activate-Handling.
+*/
+
+{
+ if ( GetParentFrame() )
+ GetParentFrame()->Activate_Impl( bBeamerOn );
+}
+
+SfxBroadcaster& SfxFrame::GetBroadcaster() const
+{
+ return *pImp;
+}
+
+//-------------------------------------------------------------------------
+
+void SfxFrame::Deactivate_Impl()
+
+/* [Description]
+
+ Internal Deactivate-Handler, called from derived classes which supports
+ Activate-Handling.
+*/
+
+{
+ if( GetParentFrame() )
+ GetParentFrame()->Deactivate_Impl();
+}
+
+String SfxFrame::GetContent() const
+{
+ SfxObjectShell *pObj = GetCurrentDocument();
+ if ( !pObj || !pObj->GetMedium() )
+ return String();
+ else
+ return pObj->GetMedium()->GetName();
+}
+
+sal_Bool SfxFrame::CheckContentForLoad_Impl()
+{
+ if ( GetCurrentDocument() )
+ {
+ SfxMedium* pMedium = GetCurrentDocument()->GetMedium();
+ SfxItemSet* pSet = pMedium->GetItemSet();
+ SfxItemSet* pNew = GetDescriptor()->GetArgs();
+
+ // Falls URLs nicht uebereinstimmen
+ if ( INetURLObject( GetDescriptor()->GetActualURL() ) !=
+ INetURLObject( pMedium->GetOrigURL() ) )
+ return sal_True;
+
+ // Falls die Filter nicht uebereinstimmen
+ SFX_ITEMSET_ARG( pNew, pFilterItem, SfxStringItem, SID_FILTER_NAME, sal_False );
+ if( pMedium->GetOrigFilter() && pFilterItem &&
+ pFilterItem->GetValue() != pMedium->GetOrigFilter()->GetName() )
+ return sal_True;
+
+ // Falls die Poststrings nicht uebereinstimmen
+ SFX_ITEMSET_ARG( pSet, pPostItem, SfxStringItem, SID_POSTSTRING, sal_False );
+ SFX_ITEMSET_ARG( pNew, pNewPostItem, SfxStringItem, SID_POSTSTRING, sal_False );
+ SFX_ITEMSET_ARG( pSet, pPost2Item, SfxRefItem, SID_POSTLOCKBYTES, sal_False );
+ SFX_ITEMSET_ARG( pNew, pNewPost2Item, SfxRefItem, SID_POSTLOCKBYTES, sal_False );
+ if( pPost2Item || pNewPost2Item || (
+ pPostItem && pNewPostItem && pNewPostItem->GetValue() != pPostItem->GetValue() ||
+ !pPostItem && pNewPostItem || pPostItem && !pNewPostItem ) )
+ return sal_True;
+
+ return sal_False;
+ }
+
+ return (GetDescriptor()->GetActualURL().GetMainURL().Len() != 0);
+}
+
+sal_Bool SfxFrame::IsParent( SfxFrame *pFrame ) const
+{
+ SfxFrame *pParent = pParentFrame;
+ while ( pParent )
+ {
+ if ( pParent == pFrame )
+ return sal_True;
+ pParent = pParent->pParentFrame;
+ }
+
+ return sal_False;
+}
+
+void SfxFrame::InsertTopFrame_Impl( SfxFrame* pFrame )
+{
+ SfxFrameArr_Impl& rArr = *SFX_APP()->Get_Impl()->pTopFrames;
+ rArr.Insert( pFrame, rArr.Count() );
+}
+
+void SfxFrame::RemoveTopFrame_Impl( SfxFrame* pFrame )
+{
+ SfxFrameArr_Impl& rArr = *SFX_APP()->Get_Impl()->pTopFrames;
+ rArr.Remove( rArr.GetPos( pFrame ) );
+}
+
+//========================================================================
+
+SfxFramePickEntry_Impl::SfxFramePickEntry_Impl()
+: pDescriptor( NULL ),
+ pBrowserCfg( 0 ),
+ nHasBrowser( SFX_BEAMER_OFF )
+{
+}
+
+//-------------------------------------------------------------------------
+void SfxFrame::ActivatePickEntry_Impl( SfxFramePickEntry_Impl* pEntry,
+ sal_uInt16 nMode, SfxFrameDescriptor *pDesc )
+{
+ SfxAllItemSet aSet( SFX_APP()->GetPool() );
+
+ // Die vollst"andige FrameSet-Beschreibung zur Verf"ugung stellen
+ if ( !pDesc )
+ pDesc = pEntry->pDescriptor->Clone();
+
+ // Parameter zusammenstellen; Achtung: ActivatePickEntry mu\s an dem Frame
+ // aufgerufen werden, in den geladen werden soll!
+ aSet.Put( *pEntry->pDescriptor->GetArgs() );
+ aSet.Put( SfxStringItem( SID_FILE_NAME, pDesc->GetActualURL().GetMainURL() ) );
+ aSet.Put( SfxFrameItem( SID_DOCFRAME, this ) );
+ aSet.Put( SfxUInt16Item( SID_BROWSEMODE, nMode ));
+ aSet.Put( SfxFrameDescriptorItem( pDesc, SID_FRAMEDESCRIPTOR ) );
+
+ pImp->pCurrentViewFrame->GetDispatcher()->Execute( SID_OPENDOC, SFX_CALLMODE_RECORD, aSet );
+ delete pDesc;
+}
+
+void SfxFramePickEntry_Impl::Initialize( SfxFrame* pFrameP, sal_Bool bBrowserCfg,
+ const SfxObjectShell *pDocShell, const String* pURL, const String* pTitle )
+{
+ if ( pTitle )
+ aName = *pTitle;
+ else
+ {
+ aName = pURL ? *pURL : pDocShell->GetMedium()->GetOrigURL();
+ }
+
+ String aMark( pDocShell->GetLastMark_Impl() );
+ if ( aMark.Len() )
+ {
+ aName += '#';
+ aName += aMark;
+ }
+
+ pDescriptor = pFrameP->GetDescriptor()->Clone();
+ SfxItemSet *pSet = pDescriptor->GetArgs();
+ pSet->Put( SfxStringItem( SID_DOCINFO_TITLE, pDocShell->GetTitle( SFX_TITLE_CAPTION ) ) );
+}
+
+void SfxFramePickEntry_Impl::Update( SfxFrame* pFrame, const SfxPoolItem* pItem )
+{
+ // Zuerst den Descriptor des Frames auf den Stand bringen;
+ SfxFrameDescriptor *pD = pFrame->GetDescriptor();
+ SfxObjectShell *pDoc = pFrame->GetCurrentDocument();
+ if ( pDoc )
+ {
+ pFrame->UpdateDescriptor( pDoc );
+ if ( pItem )
+ pFrame->GetDescriptor()->GetArgs()->Put( *pItem );
+ else
+ pFrame->GetViewData_Impl();
+ }
+
+ // Dann den Descriptor kopieren
+ delete pDescriptor;
+ pDescriptor = pFrame->GetDescriptor()->Clone();
+}
+
+SfxFramePickEntry_Impl* SfxFramePickEntry_Impl::Clone() const
+{
+ // Achtung: Browser-Config kann momentan nicht kopiert werden!
+ SfxFramePickEntry_Impl* pEntry = new SfxFramePickEntry_Impl;
+ pEntry->aName = aName;
+ if ( pDescriptor )
+ pEntry->pDescriptor = pDescriptor->Clone();
+ return pEntry;
+}
+
+//-------------------------------------------------------------------------
+
+SfxFramePickEntry_Impl::~SfxFramePickEntry_Impl()
+{
+ delete pDescriptor;
+}
+
+
+SfxFrameItem::SfxFrameItem( sal_uInt16 nWhich, SfxViewFrame *p )
+ : SfxPoolItem( nWhich ), pFrame( p ? p->GetFrame() : NULL )
+{
+ wFrame = pFrame;
+}
+
+int SfxFrameItem::operator==( const SfxPoolItem &rItem ) const
+{
+ return ((SfxFrameItem&)rItem).pFrame == pFrame &&
+ ((SfxFrameItem&)rItem).wFrame == wFrame;
+}
+
+//--------------------------------------------------------------------
+
+String SfxFrameItem::GetValueText() const
+{
+ return String();
+}
+
+
+
+SfxPoolItem* SfxFrameItem::Clone( SfxItemPool *) const
+{
+ SfxFrameItem* pNew = new SfxFrameItem( wFrame);
+ pNew->SetFramePtr_Impl( pFrame );
+ return pNew;
+}
+
+SfxUsrAnyItem::SfxUsrAnyItem( sal_uInt16 nWhich, const ::com::sun::star::uno::Any& rAny )
+ : SfxPoolItem( nWhich )
+{
+ aValue = rAny;
+}
+
+int SfxUsrAnyItem::operator==( const SfxPoolItem &rItem ) const
+{
+// return rItem.ISA( SfxUsrAnyItem ) && ((SfxUsrAnyItem&)rItem).aValue == aValue;
+ return sal_False;
+}
+
+String SfxUsrAnyItem::GetValueText() const
+{
+ return String();
+}
+
+SfxPoolItem* SfxUsrAnyItem::Clone( SfxItemPool *) const
+{
+ return new SfxUsrAnyItem( Which(), aValue );
+}
+
+sal_Bool SfxFrame::BrowseInFrame( int nDelta )
+{
+ SfxFrameHistory_Impl& rHistory = pImp->aHistory;
+ int nPos = (int) rHistory.GetCurPos() - nDelta;
+ if( nPos >= 0 && nPos < (int) rHistory.Count() )
+ {
+ rHistory.Seek( nPos );
+ SfxFramePickEntry_Impl *pEntry = rHistory.GetCurObject();
+
+ ActivatePickEntry_Impl( pEntry, BROWSE_FRAME );
+ return sal_True;
+ }
+ return sal_False;
+}
+
+SfxFrameIterator::SfxFrameIterator( const SfxFrame& rFrame, sal_Bool bRecur )
+ : pFrame( &rFrame )
+ , bRecursive( bRecur )
+{}
+
+SfxFrame* SfxFrameIterator::FirstFrame()
+{
+ // GetFirst beginnt die Iteration beim ersten ChildFrame
+ return pFrame->GetChildFrame( 0 );
+}
+
+SfxFrame* SfxFrameIterator::NextFrame( SfxFrame& rPrev )
+{
+ // Zuerst auf Kinder testen, wenn Rekursion erw"unscht
+ SfxFrame *pRet = NULL;
+ if ( bRecursive )
+ pRet = rPrev.GetChildFrame( 0 );
+ if ( !pRet )
+ {
+ // Anderenfalls mit den Geschwistern von rPrev weitermachen
+ pRet = NextSibling_Impl( rPrev );
+ }
+
+ return pRet;
+}
+
+
+SfxFrame* SfxFrameIterator::NextSibling_Impl( SfxFrame& rPrev )
+{
+ SfxFrame *pRet = NULL;
+ if ( &rPrev != pFrame )
+ {
+ SfxFrameArr_Impl& rArr = *rPrev.pParentFrame->pChildArr;
+ sal_uInt16 nPos = rArr.GetPos( &rPrev );
+ if ( nPos+1 < rArr.Count() )
+ pRet = rArr[nPos+1];
+
+ if ( !pRet && rPrev.pParentFrame->pParentFrame )
+ pRet = NextSibling_Impl( *rPrev.pParentFrame );
+ }
+
+ return pRet;
+}
+
+void SfxFrame::SetFrameName( const String& rName )
+{
+ if ( pImp->pDescr )
+ pImp->pDescr->SetName( rName );
+ aName = rName;
+ if ( pImp->pCurrentViewFrame )
+ pImp->pCurrentViewFrame->UpdateTitle();
+ if ( GetFrameInterface().is() )
+ GetFrameInterface()->setName( rName );
+}
+
+void SfxFrame::BeamerSwitched_Impl( sal_Bool bOn )
+{
+}
+
+void SfxFrame::BeamerSet_Impl()
+{
+}
+
+void SfxFrame::LoadFinished_Impl()
+{
+ SfxURLFrame *pURL = PTR_CAST( SfxURLFrame, this );
+ if ( pURL )
+ pURL->LoadFinished_Impl();
+}
+
+SfxFrame* SfxFrame::findFrame(const ::rtl::OUString& aTargetframename, sal_Int32 nSearchFlags)
+{
+ // Weil Netscape f"uhrende BLANKS "uberliest, m"ussen wir das wohl auch
+ // Sollte besser auch bei den FrameNames gemacht werden!
+ String aName( aTargetframename );
+ aName.EraseLeadingChars();
+
+ SfxFrame *pFrame = this;
+
+ if ( !aName.Len() && GetParentFrame() && GetParentFrame()->GetCurrentViewFrame()->GetViewShell()->IsImplementedAsFrameset_Impl() )
+ return GetParentFrame();
+
+ if( !aName.Len() || aName.CompareIgnoreCaseToAscii("_self") == COMPARE_EQUAL )
+ return pFrame;
+
+ if ( aName.CompareIgnoreCaseToAscii("_smartself") == COMPARE_EQUAL )
+ {
+ DBG_ERROR("Not supported!");
+ return pFrame;
+ }
+
+ if ( aName.CompareIgnoreCaseToAscii("_parent") == COMPARE_EQUAL )
+ {
+ // Gesucht ist das Parent Frameset
+ return pFrame->GetParentFrame();
+ }
+ else if ( aName.CompareIgnoreCaseToAscii("_blank") == COMPARE_EQUAL )
+ {
+ return NULL;
+
+ }
+ else if ( aName.CompareIgnoreCaseToAscii("_top") == COMPARE_EQUAL )
+ {
+ while ( pFrame->GetParentFrame() )
+ pFrame = pFrame->GetParentFrame();
+ return pFrame;
+ }
+
+ if ( ( nSearchFlags & FRAME_SEARCH_SELF ) && aName.CompareIgnoreCaseToAscii( GetFrameName() ) == COMPARE_EQUAL )
+ {
+ // Eigener Name
+ return pFrame;
+ }
+
+ if ( nSearchFlags & FRAME_SEARCH_CHILDREN )
+ {
+ // Zuerst unterhalb dieses Frames absuchen
+ pFrame = SearchChildrenForName_Impl( aName );
+ }
+
+ if ( ( nSearchFlags & FRAME_SEARCH_CHILDREN ) && !pFrame && GetParentFrame() )
+ {
+ // Noch nichts gefunden, nach oben weitergehen
+ // Eigentlich m"u\sten Frames, die schon abgesucht wurden, aus
+ // Performance-Gr"unden markiert werden
+ SfxFrame *pParent = GetParentFrame();
+ do
+ {
+ // Ist es der Parent ?
+ if ( aName.CompareIgnoreCaseToAscii( pParent->GetFrameName() ) == COMPARE_EQUAL )
+ return pParent;
+
+ if ( pParent->pImp->pDescr->GetFrameSet() )
+ {
+ // Wenn es ein Parent Frameset gibt, dort suchen
+ pFrame = pParent->SearchChildrenForName_Impl( aName );
+ if ( pFrame )
+ return pFrame;
+ }
+
+ // Weiter nach oben
+ pParent = pParent->GetParentFrame();
+ }
+ while ( pParent );
+ }
+
+ if( !pFrame )
+ {
+ SfxFrameArr_Impl& rArr = *SFX_APP()->Get_Impl()->pTopFrames;
+ // keinen Frame im MDI-Fenster gefunden. Jetzt die anderen
+ // Toplevel Frames checken.
+ SfxFrame *pTop = GetTopFrame();
+ for( sal_uInt16 nPos = rArr.Count(); nPos--; )
+ {
+ // Unser Topframe wurde bereits durchsucht
+ SfxFrame* pCurFrame = rArr[ nPos ];
+ if( pCurFrame != pTop )
+ {
+ if( aName.CompareIgnoreCaseToAscii( pCurFrame->GetFrameName() ) == COMPARE_EQUAL )
+ return pCurFrame;
+ else
+ {
+ if( pFrame =
+ pCurFrame->SearchChildrenForName_Impl( aName ) )
+ return pFrame;
+ }
+ }
+ }
+ }
+
+ return pFrame;
+}
+
+sal_Bool SfxFrame::IsTop() const
+{
+ return GetFrameInterface().is() ? GetFrameInterface()->isTop() : sal_False;
+}
+
+sal_Bool SfxFrame::HasComponent() const
+{
+ return sal_False;
+}
+
+::com::sun::star::uno::Reference< ::com::sun::star::frame::XController > SfxFrame::GetController() const
+{
+ if ( pImp->pCurrentViewFrame && pImp->pCurrentViewFrame->GetViewShell() )
+ return pImp->pCurrentViewFrame->GetViewShell()->GetController();
+ else
+ return ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController > ();
+}
+
+::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > SfxFrame::GetFrameInterface() const
+{
+ return pImp->xFrame;
+}
+
+void SfxFrame::SetFrameInterface_Impl( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame )
+{
+ pImp->xFrame = rFrame;
+}
+
+void SfxFrame::SetItemSet_Impl( const SfxItemSet* pSet )
+{
+ pImp->pSet = pSet;
+}
+
+const SfxItemSet* SfxFrame::GetItemSet_Impl()
+{
+ return pImp->pSet;
+}
+
+void SfxFrame::Appear()
+{
+ if ( GetCurrentViewFrame() )
+ {
+ GetCurrentViewFrame()->Show();
+ GetWindow().Show();
+ pImp->xFrame->getContainerWindow()->setVisible( sal_True );
+ if ( pParentFrame )
+ pParentFrame->Appear();
+ }
+}
+
+sal_uInt16 SfxFrame::GetBeamerState_Impl() const
+{
+ return pImp->nHasBrowser;
+}
+
+void SfxFrame::SetOwnsBindings_Impl( sal_Bool bSet )
+{
+ pImp->bOwnsBindings = bSet;
+}
+
+sal_Bool SfxFrame::OwnsBindings_Impl() const
+{
+ return pImp->bOwnsBindings;
+}
+
+void SfxFrame::SetToolSpaceBorderPixel_Impl( const SvBorder& rBorder )
+{
+ pImp->aBorder = rBorder;
+ SfxViewFrame *pF = GetCurrentViewFrame();
+ if ( pF )
+ {
+ Point aPos ( rBorder.Left(), rBorder.Top() );
+ Size aSize( GetWindow().GetOutputSizePixel() );
+ aSize.Width() -= ( rBorder.Left() + rBorder.Right() );
+ aSize.Height() -= ( rBorder.Top() + rBorder.Bottom() );
+
+ if ( GetParentFrame() )
+ {
+ sal_Bool bHasTools = rBorder.Left() != rBorder.Right() || rBorder.Top() != rBorder.Bottom();
+ pF->GetWindow().SetBorderStyle( bHasTools ? WINDOW_BORDER_NORMAL : WINDOW_BORDER_NOBORDER );
+ }
+
+ pF->GetWindow().SetPosSizePixel( aPos, aSize );
+ }
+}
+
+Rectangle SfxFrame::GetTopOuterRectPixel_Impl() const
+{
+ Size aSize( GetWindow().GetOutputSizePixel() );
+ Point aPoint;
+ return ( Rectangle ( aPoint, aSize ) );
+}
+
+SfxWorkWindow* SfxFrame::GetWorkWindow_Impl() const
+{
+ if ( pImp->pWorkWin )
+ return pImp->pWorkWin;
+ else if ( pParentFrame )
+ return pParentFrame->GetWorkWindow_Impl();
+ else
+ {
+ return SFX_APP()->GetWorkWindow_Impl( pImp->pCurrentViewFrame );
+ }
+}
+
+void SfxFrame::CreateWorkWindow_Impl()
+{
+ pImp->pWorkWin = new SfxFrameWorkWin_Impl( &GetWindow(), this );
+}
+
+const SvBorder& SfxFrame::GetBorder_Impl() const
+{
+ return pImp->aBorder;
+}
+
+void SfxFrame::GrabFocusOnComponent_Impl()
+{
+ if ( pImp->bReleasingComponent )
+ {
+ GetWindow().GrabFocus();
+ return;
+ }
+
+ Window* pWindow = &GetWindow();
+ if ( GetCurrentViewFrame() && GetCurrentViewFrame()->GetViewShell() && GetCurrentViewFrame()->GetViewShell()->GetWindow() )
+ pWindow = GetCurrentViewFrame()->GetViewShell()->GetWindow();
+
+ if( !pWindow->HasChildPathFocus() )
+ pWindow->GrabFocus();
+}
+
+void SfxFrame::ReFill_Impl( const SfxFrameSetDescriptor* pSet )
+{
+ SfxFrameSetViewShell *pView = PTR_CAST( SfxFrameSetViewShell, GetCurrentViewFrame()->GetViewShell() );
+ if ( pView )
+ pView->ReFill( pSet );
+ else
+ {
+ SfxFrameSetDescriptor *pOld = pImp->pDescr->GetFrameSet();
+ SfxFrameSetDescriptor *pNew = pSet->Clone();
+ pImp->pDescr->SetFrameSet( pNew );
+ for ( sal_uInt16 n=0; n<pSet->GetFrameCount(); n++ )
+ {
+ SfxFrameDescriptor* pD = pNew->GetFrame(n);
+ SfxURLFrame* pFrame = PTR_CAST( SfxURLFrame, SearchChildrenForName_Impl( pD->GetName() ) );
+ if ( pFrame )
+ pFrame->Update( pD );
+ if ( pD->GetFrameSet() )
+ pFrame->ReFill_Impl( pD->GetFrameSet() );
+ }
+
+ delete pOld;
+ }
+}
+
+sal_Bool SfxFrame::ActivateNextChildWindow_Impl( sal_Bool bForward )
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > xDisp;
+ ::com::sun::star::util::URL aTargetURL;
+ String aCmd( DEFINE_CONST_UNICODE( ".uno:" ) );
+ aCmd += String::CreateFromAscii( SFX_SLOTPOOL().GetUnoSlot( bForward ? SID_NEXTWINDOW : SID_PREVWINDOW )->GetUnoName() );
+ aTargetURL.Complete = aCmd;
+ Reference < XURLTransformer > xTrans( ::utl::getProcessServiceFactory()->createInstance( rtl::OUString::createFromAscii("com.sun.star.util.URLTransformer" )), UNO_QUERY );
+ xTrans->parseStrict( aTargetURL );
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > aTmpRef( GetFrameInterface() );
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > xProv( aTmpRef, ::com::sun::star::uno::UNO_QUERY );
+ if ( xProv.is() )
+ xDisp = xProv->queryDispatch( aTargetURL, String(), 0 );
+
+ if ( xDisp.is() )
+ {
+ // Der Controller kann es selbst
+ xDisp->dispatch( aTargetURL, ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue>() );
+ return sal_True;
+ }
+ else if ( ( pImp->nType & SFXFRAME_FRAMESET ) && pChildArr->Count() )
+ {
+ // ansonsten versuchen wir es mit dem SFX
+ SfxViewFrame *pAct = pImp->pCurrentViewFrame->GetActiveChildFrame_Impl();
+ if ( !GetWindow().HasChildPathFocus( sal_True ) )
+ {
+ pAct = ( bForward ? (*pChildArr)[0] : (*pChildArr)[pChildArr->Count()-1] )->GetCurrentViewFrame();
+ }
+ else if ( pAct )
+ {
+ sal_uInt16 nPos = (*pChildArr).GetPos( pAct->GetFrame() );
+ if ( bForward && ++nPos<pChildArr->Count() )
+ {
+ pAct = (*pChildArr)[nPos]->GetCurrentViewFrame();
+ }
+ else if ( !bForward && nPos > 0 )
+ {
+ pAct = (*pChildArr)[--nPos]->GetCurrentViewFrame();
+ }
+ else
+ pAct = NULL;
+ }
+
+ if ( pAct )
+ {
+ pAct->MakeActive_Impl( TRUE );
+ return sal_True;
+ }
+ }
+
+ return sal_False;
+}
+
+const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProviderInterceptor > SfxFrame::GetInterceptor_Impl()
+{
+//(mba)/compview: hier fehlt der Zugriff auf den Interceptor !!!!!
+ return ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProviderInterceptor > ();
+}
+
+void SfxFrame::ReleasingComponent_Impl( sal_Bool bSet )
+{
+ pImp->bReleasingComponent = bSet;
+}
+
+sal_Bool SfxFrame::LoadSfxComponent( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > & aFrame, const ::rtl::OUString& aURL, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArgs, const SfxObjectFactory *pFact )
+{
+ // get Implementation of xComponents ...
+ DBG_ERROR( "Should not be called anymore!" );
+ return sal_False;
+}
+
+void SfxFrame::LockFocus_Impl( sal_Bool bLock )
+{
+ if ( pChildArr && pChildArr->Count() )
+ {
+ sal_uInt16 nCount = pChildArr->Count();
+ for ( sal_uInt16 n=0; n<nCount; n++ )
+ {
+ SfxFrame* pFrame = (*pChildArr)[n];
+ pFrame->pImp->bFocusLocked = bLock;
+ pFrame->LockFocus_Impl( bLock );
+ }
+ }
+}
+
+sal_Bool SfxFrame::IsFocusLocked_Impl() const
+{
+ return pImp->bFocusLocked;
+}
+/*
+sal_Bool SfxFrame::IsPlugin_Impl() const
+{
+// Reference < XPluginInstance > xPlugin ( pImp->xFrame, UNO_QUERY );
+// return xPlugin.is();
+
+ // Set default return value if method failed.
+ sal_Bool bReturn = sal_False;
+ // Get Desktop to get a list of all current tasks on it.
+ Reference< XTasksSupplier > xDesktop( ::utl::getProcessServiceFactory()->createInstance( OUSTRING(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Desktop")) ), UNO_QUERY );
+ DBG_ASSERT( !(xDesktop.is()==sal_False), "SfxFrame::IsPlugin_Impl()Can't get reference to desktop service!\n" );
+ Reference< XEnumeration > xList = xDesktop->getTasks()->createEnumeration();
+ while( xList->hasMoreElements() == sal_True )
+ {
+ Reference< XTask > xTask;
+ xList->nextElement() >>= xTask;
+ Reference< XPluginInstance > xPlugIn( xTask, UNO_QUERY );
+ if( xPlugIn.is() == sal_True )
+ {
+ bReturn = sal_True;
+ break;
+ }
+ }
+ return bReturn;
+}*/
+
+void SfxFrame::Resize()
+{
+ if ( OwnsBindings_Impl() )
+ {
+ SfxWorkWindow *pWork = GetWorkWindow_Impl();
+ pWork->ArrangeChilds_Impl();
+ pWork->ShowChilds_Impl();
+
+ // problem in presence of UIActive object: when the window is resized, but the toolspace border
+ // remains the same, setting the toolspace border at the ContainerEnvironment doesn't force a
+ // resize on the IPEnvironment; without that no resize is called for the SfxViewFrame. So always
+ // set the window size of the SfxViewFrame explicit.
+ SetToolSpaceBorderPixel_Impl( pImp->aBorder );
+ }
+ else if ( pImp->pCurrentViewFrame )
+ {
+ pImp->pCurrentViewFrame->GetWindow().SetSizePixel( GetWindow().GetOutputSizePixel() );
+ }
+
+}
+
+SfxFrame* SfxFrame::GetFirst()
+{
+ if ( !pFramesArr_Impl )
+ return 0;
+ return pFramesArr_Impl->Count() ? pFramesArr_Impl->GetObject(0) : 0;
+}
+
+SfxFrame* SfxFrame::GetNext( SfxFrame& rFrame )
+{
+ USHORT nPos = pFramesArr_Impl->GetPos( &rFrame );
+ if ( nPos+1 < pFramesArr_Impl->Count() )
+ return pFramesArr_Impl->GetObject(nPos+1);
+ else
+ return NULL;
+}
+
+
diff --git a/sfx2/source/view/frmload.cxx b/sfx2/source/view/frmload.cxx
new file mode 100644
index 000000000000..d585ef45b319
--- /dev/null
+++ b/sfx2/source/view/frmload.cxx
@@ -0,0 +1,436 @@
+/*************************************************************************
+ *
+ * $RCSfile: frmload.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:36 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include "frmload.hxx"
+
+#ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_
+#include <com/sun/star/beans/PropertyValue.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XLOADEVENTLISTENER_HPP_
+#include <com/sun/star/frame/XLoadEventListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XFRAME_HPP_
+#include <com/sun/star/frame/XFrame.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_XWINDOW_HPP_
+#include <com/sun/star/awt/XWindow.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LANG_XUNOTUNNEL_HPP_
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+#endif
+
+#ifndef _TOOLKIT_UNOHLP_HXX
+#include <toolkit/helper/vclunohelper.hxx>
+#endif
+
+#include <rtl/ustring.h>
+#include <svtools/itemset.hxx>
+#include <vcl/window.hxx>
+#include <svtools/eitem.hxx>
+#include <svtools/stritem.hxx>
+#include <tools/urlobj.hxx>
+#include <vos/mutex.hxx>
+
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::frame;
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::lang;
+using namespace ::rtl;
+
+#include "app.hxx"
+#include "request.hxx"
+#include "sfxsids.hrc"
+#include "dispatch.hxx"
+#include "sfxuno.hxx"
+#include "viewfrm.hxx"
+#include "topfrm.hxx"
+#include "frame.hxx"
+#include "docfac.hxx"
+#include "fcontnr.hxx"
+#include "loadenv.hxx"
+#include "docfile.hxx"
+
+void SAL_CALL SfxFrameLoader::load( const Reference < XFrame >& rFrame, const OUString& rURL,
+ const Sequence < PropertyValue >& rArgs,
+ const Reference < XLoadEventListener > & rListener) throw ( RuntimeException )
+{
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+
+ xFrame = rFrame;
+ xListener = rListener;
+
+ // Achtung: beim Abrumen der Objekte kann die SfxApp destruiert werden, vorher noch Deinitialize_Impl rufen
+ SfxApplication* pApp = SFX_APP();
+
+ SfxAllItemSet aSet( pApp->GetPool() );
+ TransformParameters( SID_OPENDOC, rArgs, aSet );
+
+ SFX_ITEMSET_ARG( &aSet, pRefererItem, SfxStringItem, SID_REFERER, FALSE );
+ if ( !pRefererItem )
+ aSet.Put( SfxStringItem( SID_REFERER, String() ) );
+
+ SfxFrame* pFrame=0;
+ for ( pFrame = SfxFrame::GetFirst(); pFrame; pFrame = SfxFrame::GetNext( *pFrame ) )
+ {
+ if ( pFrame->GetFrameInterface() == xFrame )
+ break;
+ }
+
+ if ( !pFrame )
+ pFrame = SfxTopFrame::Create( rFrame );
+
+ BOOL bFactoryURL = FALSE;
+ const SfxObjectFactory* pFactory = 0;
+ String aFact( rURL );
+ String aPrefix = String::CreateFromAscii( "private:factory/" );
+ String aParam;
+ if ( aPrefix.Len() == aFact.Match( aPrefix ) )
+ {
+ bFactoryURL = TRUE;
+ aFact.Erase( 0, aPrefix.Len() );
+ USHORT nPos = aFact.Search( '?' );
+ if ( nPos != STRING_NOTFOUND )
+ {
+ aParam = aFact.Copy( nPos, aFact.Len() );
+ aFact.Erase( nPos, aFact.Len() );
+ aParam.Erase(0,1);
+ }
+ }
+ else
+ aFact = aFilterName.GetToken( 0, ':' );
+
+ WildCard aSearchedFac( aFact.EraseAllChars('4').ToUpperAscii() );
+ for( USHORT n = SfxObjectFactory::GetObjectFactoryCount_Impl(); !pFactory && n--; )
+ {
+ pFactory = &SfxObjectFactory::GetObjectFactory_Impl( n );
+ if( !aSearchedFac.Matches( String::CreateFromAscii( pFactory->GetShortName() ).ToUpperAscii() ) )
+ pFactory = 0;
+ }
+
+ if ( bFactoryURL && pFactory )
+ {
+ INetURLObject aObj( rURL );
+ if ( aParam.Len() )
+ {
+ sal_uInt16 nSlotId = aParam.ToInt32();
+ SfxModule* pMod = pFactory->GetModule()->Load();
+ SfxRequest aReq( nSlotId, SFX_CALLMODE_SYNCHRON, pMod->GetPool() );
+ aReq.AppendItem( SfxStringItem ( SID_FILE_NAME, rURL ) );
+ const SfxPoolItem* pRet = pMod->ExecuteSlot( aReq );
+ if ( xListener.is() )
+ {
+ if ( pRet )
+ xListener->loadFinished( this );
+ else
+ {
+ if ( !pFrame->GetCurrentDocument() )
+ {
+ pFrame->SetFrameInterface_Impl( Reference < XFrame >() );
+ pFrame->DoClose();
+ }
+ xListener->loadCancelled( this );
+ }
+ }
+
+ return;
+ }
+
+ String aPathName( aObj.GetMainURL() );
+ if( pFactory->GetStandardTemplate().Len() )
+ {
+ aSet.Put( SfxStringItem ( SID_FILE_NAME, pFactory->GetStandardTemplate() ) );
+ aSet.Put( SfxBoolItem( SID_TEMPLATE, sal_True ) );
+ }
+ else
+ {
+ SfxViewShell *pView = pFrame->GetCurrentViewFrame() ? pFrame->GetCurrentViewFrame()->GetViewShell() : NULL;
+ SfxRequest aReq( SID_NEWDOCDIRECT, SFX_CALLMODE_SYNCHRON, aSet );
+ aReq.AppendItem( SfxFrameItem( SID_DOCFRAME, pFrame ) );
+ aReq.AppendItem( SfxStringItem( SID_NEWDOCDIRECT, String::CreateFromAscii(pFactory->GetShortName()) ) );
+ const SfxPoolItem* pRet = pApp->ExecuteSlot( aReq );
+ if ( pFrame->GetCurrentViewFrame() && pView != pFrame->GetCurrentViewFrame()->GetViewShell() )
+ {
+ if ( xListener.is() )
+ xListener->loadFinished( this );
+ }
+ else if ( xListener.is() )
+ {
+ if ( !pFrame->GetCurrentDocument() )
+ {
+ pFrame->SetFrameInterface_Impl( Reference < XFrame >() );
+ pFrame->DoClose();
+ }
+ xListener->loadCancelled( this );
+ }
+
+ xFrame = Reference < XFrame >();
+ xListener = Reference < XLoadEventListener >();
+ return;
+ }
+ }
+ else
+ {
+ aSet.Put( SfxStringItem ( SID_FILE_NAME, rURL ) );
+ }
+
+ aSet.Put( SfxFrameItem( SID_DOCFRAME, pFrame ) );
+ aSet.Put( SfxStringItem( SID_FILTER_NAME, aFilterName ) );
+ pLoader = LoadEnvironment_Impl::Create( aSet );
+ pLoader->AddRef();
+ pLoader->SetDoneLink( LINK( this, SfxFrameLoader, LoadDone_Impl ) );
+ if ( pFactory )
+ pMatcher = new SfxFilterMatcher( pFactory->GetFilterContainer() );
+ pLoader->SetFilterMatcher( pMatcher );
+ pLoader->Start();
+}
+
+void SfxFrameLoader::cancel() throw( RUNTIME_EXCEPTION )
+{
+ if ( pLoader )
+ pLoader->CancelTransfers();
+}
+
+SfxFrameLoader::SfxFrameLoader( const REFERENCE < ::com::sun::star::lang::XMultiServiceFactory >& xFactory )
+ : pMatcher( 0 )
+ , pLoader( 0 )
+{
+}
+
+SfxFrameLoader::~SfxFrameLoader()
+{
+ if ( pLoader )
+ pLoader->ReleaseRef();
+ delete pMatcher;
+}
+
+IMPL_LINK( SfxFrameLoader, LoadDone_Impl, void*, pVoid )
+{
+ DBG_ASSERT( pLoader, "No Loader created, but LoadDone ?!" );
+
+ Reference< XFrameLoader > xTHIS( static_cast< XFrameLoader* >( this ), UNO_QUERY );
+
+ if ( pLoader->GetError() )
+ {
+ SfxFrame* pFrame = pLoader->GetFrame();
+ if ( pFrame && !pFrame->GetCurrentDocument() )
+ {
+ pFrame->SetFrameInterface_Impl( Reference < XFrame >() );
+ pFrame->DoClose();
+ }
+ if ( xListener.is() )
+ xListener->loadCancelled( this );
+ }
+ else
+ {
+ if ( xListener.is() )
+ xListener->loadFinished( this );
+ }
+
+ xFrame = Reference < XFrame >();
+ xListener = Reference < XLoadEventListener >();
+ return NULL;
+}
+
+Reference< XInterface > SAL_CALL SfxFrameLoaderFactory::createInstance(void) throw(Exception, RuntimeException)
+{
+ Reference < XFrameLoader > xLoader( pCreateFunction( xSMgr ), UNO_QUERY );
+ SfxFrameLoader* pLoader = (SfxFrameLoader*) xLoader.get();
+ pLoader->SetFilterName( aImplementationName );
+ return xLoader;
+}
+
+Reference< XInterface > SAL_CALL SfxFrameLoaderFactory::createInstanceWithArguments(const Sequence<Any>& Arguments) throw(Exception, RuntimeException)
+{
+ return createInstance();
+}
+
+::rtl::OUString SAL_CALL SfxFrameLoaderFactory::getImplementationName() throw(RuntimeException)
+{
+ return aImplementationName;
+}
+
+sal_Bool SAL_CALL SfxFrameLoaderFactory::supportsService(const ::rtl::OUString& ServiceName) throw(RuntimeException)
+{
+ if ( ServiceName.compareToAscii("com.sun.star.frame.FrameLoader") == COMPARE_EQUAL )
+ return sal_True;
+ else
+ return sal_False;
+}
+
+Sequence< ::rtl::OUString > SAL_CALL SfxFrameLoaderFactory::getSupportedServiceNames(void) throw(RuntimeException)
+{
+ Sequence< ::rtl::OUString > aRet(1);
+ *aRet.getArray() = ::rtl::OUString::createFromAscii("com.sun.star.frame.FrameLoader");
+ return aRet;
+}
+
+void SAL_CALL SfxFrameLoader::initialize( const Sequence< Any >& aArguments ) throw( Exception, RuntimeException )
+{
+ sal_Int32 nLen = aArguments.getLength();
+ for ( sal_Int32 n=0; n<nLen; n++ )
+ {
+ PropertyValue aValue;
+ if ( ( aArguments[n] >>= aValue ) && aValue.Name.compareToAscii("FilterName") == COMPARE_EQUAL )
+ {
+ ::rtl::OUString aTmp;
+ aValue.Value >>= aTmp;
+ aFilterName = aTmp;
+ }
+ }
+}
+
+SFX_IMPL_XINTERFACE_0( SfxFrameLoader_Impl, SfxFrameLoader )
+SFX_IMPL_XSERVICEINFO( SfxFrameLoader_Impl, "com.sun.star.frame.FrameLoader", "com.sun.star.comp.office.FrameLoader" )
+SFX_IMPL_SINGLEFACTORY( SfxFrameLoader_Impl )
+
+SfxFrameLoader_Impl::SfxFrameLoader_Impl( const Reference < XMultiServiceFactory >& xFactory )
+ : SfxFrameLoader( xFactory )
+{
+}
+
+SfxObjectFactory& SfxFrameLoader_Impl::GetFactory()
+{
+ SfxObjectFactory* pFactory = 0;
+ String aFact = GetFilterName().GetToken( ':', 0 );
+ WildCard aSearchedFac( aFact.EraseAllChars('4').ToUpperAscii() );
+ for( USHORT n = SfxObjectFactory::GetObjectFactoryCount_Impl(); !pFactory && n--; )
+ {
+ pFactory = (SfxObjectFactory*) &SfxObjectFactory::GetObjectFactory_Impl( n );
+ if( !aSearchedFac.Matches( String::CreateFromAscii( pFactory->GetShortName() ).ToUpperAscii() ) )
+ pFactory = 0;
+ }
+
+ return *pFactory;
+}
+
+SFX_IMPL_XSERVICEINFO( SfxFilterDetect_Impl, "com.sun.star.frame.ExtendedFilterDetect", "com.sun.star.comp.office.FilterDetect" )
+SFX_IMPL_SINGLEFACTORY( SfxFilterDetect_Impl )
+
+SfxFilterDetect_Impl::SfxFilterDetect_Impl( const REFERENCE < ::com::sun::star::lang::XMultiServiceFactory >& xFactory )
+{
+}
+
+void SAL_CALL SfxFilterDetect_Impl::initialize( const Sequence< Any >& aArguments ) throw( Exception, RuntimeException )
+{
+ sal_Int32 nLen = aArguments.getLength();
+ for ( sal_Int32 n=0; n<nLen; n++ )
+ {
+ PropertyValue aValue;
+ if ( ( aArguments[n] >>= aValue ) && aValue.Name.compareToAscii("FilterName") == COMPARE_EQUAL )
+ {
+ ::rtl::OUString aTmp;
+ aValue.Value >>= aTmp;
+ aFilterName = aTmp;
+ }
+ }
+}
+
+::rtl::OUString SAL_CALL SfxFilterDetect_Impl::detect( const ::rtl::OUString& sURL,
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArgumentlist ) throw(::com::sun::star::uno::RuntimeException)
+{
+ String aFact( sURL );
+ String aPrefix = String::CreateFromAscii( "private:factory/" );
+ if ( aPrefix.Len() == aFact.Match( aPrefix ) )
+ return aFilterName;
+
+ SfxFilterMatcher& rMatcher = SFX_APP()->GetFilterMatcher();
+ const SfxFilter* pFilter = rMatcher.GetFilter( aFilterName );
+
+ if ( pFilter )
+ {
+ const SfxFilter* pNew = NULL;
+
+ SfxApplication* pApp = SFX_APP();
+ SfxAllItemSet *pSet = new SfxAllItemSet( pApp->GetPool() );
+ TransformParameters( SID_OPENDOC, aArgumentlist, *pSet );
+
+ SfxMedium aMedium( sURL, (STREAM_READ | STREAM_SHARE_DENYNONE), sal_False,
+ sal_True, NULL, pSet );
+/* String aMime;
+ aMedium.GetMIMEAndRedirect( aMime );
+ if( aMime.Len() )
+ pFilter = rMatcher.GetFilter4Mime( aMime );
+ else */
+ if ( aMedium.IsStorage() )
+ {
+ SvStorageRef aStor = aMedium.GetStorage();
+ pNew = rMatcher.GetFilter4ClipBoardId( aStor->GetFormat() );
+ }
+
+ if ( pNew )
+ pFilter = pNew;
+
+ ErrCode nErr = pFilter->GetFilterContainer()->GetFilter4Content( aMedium, &pFilter );
+ if ( !pFilter )
+ nErr = rMatcher.GetFilter4Content( aMedium, &pFilter );
+ if ( pFilter )
+ pFilter = rMatcher.ResolveRedirection( pFilter, aMedium );
+ }
+
+ if ( !pFilter )
+ return ::rtl::OUString();
+ else
+ return pFilter->GetName();
+}
+
diff --git a/sfx2/source/view/impframe.cxx b/sfx2/source/view/impframe.cxx
new file mode 100644
index 000000000000..aeec0629dd38
--- /dev/null
+++ b/sfx2/source/view/impframe.cxx
@@ -0,0 +1,271 @@
+/*************************************************************************
+ *
+ * $RCSfile: impframe.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:36 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#pragma hdrstop
+
+#include "impframe.hxx"
+
+#ifndef _CPPUHELPER_INTERFACECONTAINER_HXX_
+#include <cppuhelper/interfacecontainer.hxx>
+#endif
+
+#include "frame.hxx"
+#include "arrdecl.hxx"
+#include <urlframe.hxx>
+#include <bindings.hxx>
+#include <app.hxx>
+#include <appdata.hxx>
+#include <appuno.hxx>
+#include <childwin.hxx>
+#include <viewfrm.hxx>
+
+#include <osl/mutex.hxx>
+#include "sfxuno.hxx"
+
+using namespace vos;
+
+class SfxDummyCtrl_Impl : public ::com::sun::star::frame::XFrameActionListener,
+ public ::com::sun::star::lang::XTypeProvider,
+ public ::cppu::OWeakObject
+{
+public:
+ ::osl::Mutex aMutex;
+ ::cppu::OMultiTypeInterfaceContainerHelper aLC;
+
+ SfxDummyController_Impl* pController;
+
+ SFX_DECL_XINTERFACE_XTYPEPROVIDER
+
+
+ SfxDummyCtrl_Impl()
+ : aLC( aMutex )
+ , pController(0)
+ {}
+
+ ~SfxDummyCtrl_Impl();
+
+ virtual void SAL_CALL frameAction(const ::com::sun::star::frame::FrameActionEvent& aEvent) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw( ::com::sun::star::uno::RuntimeException );
+};
+
+SFX_IMPL_XINTERFACE_2( SfxDummyCtrl_Impl, OWeakObject, ::com::sun::star::frame::XFrameActionListener, ::com::sun::star::lang::XEventListener )
+SFX_IMPL_XTYPEPROVIDER_2( SfxDummyCtrl_Impl, ::com::sun::star::frame::XFrameActionListener, ::com::sun::star::lang::XEventListener )
+
+SfxDummyCtrl_Impl::~SfxDummyCtrl_Impl()
+{
+}
+
+void SAL_CALL SfxDummyCtrl_Impl::frameAction(const ::com::sun::star::frame::FrameActionEvent& aEvent) throw( ::com::sun::star::uno::RuntimeException )
+{
+ if ( pController && aEvent.Frame == pController->getFrame() && aEvent.Action == ::com::sun::star::frame::FrameAction_FRAME_ACTIVATED && pController->xWindow.is() )
+ pController->xWindow->setFocus();
+}
+
+void SAL_CALL SfxDummyCtrl_Impl::disposing( const ::com::sun::star::lang::EventObject& Source ) throw( ::com::sun::star::uno::RuntimeException )
+{
+ if ( pController )
+ pController->getFrame()->removeFrameActionListener( this );
+}
+
+SfxDummyController_Impl::SfxDummyController_Impl( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > & xComponent )
+ : xWindow( xComponent )
+{
+ pImp = new SfxDummyCtrl_Impl;
+ pImp->pController = this;
+ pImp->acquire();
+}
+
+SfxDummyController_Impl::~SfxDummyController_Impl()
+{
+ pImp->pController = NULL;
+ pImp->release();
+}
+
+SFX_IMPL_XINTERFACE_2( SfxDummyController_Impl, OWeakObject,::com::sun::star::frame::XController,::com::sun::star::lang::XComponent )
+SFX_IMPL_XTYPEPROVIDER_2( SfxDummyController_Impl, ::com::sun::star::frame::XController,::com::sun::star::lang::XComponent )
+
+void SAL_CALL SfxDummyController_Impl::attachFrame( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > & xArg ) throw( ::com::sun::star::uno::RuntimeException )
+{
+ xFrame = xArg;
+ xFrame->addFrameActionListener( pImp );
+}
+
+sal_Bool SAL_CALL SfxDummyController_Impl::attachModel( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > & xModel ) throw( ::com::sun::star::uno::RuntimeException )
+{
+ return sal_False;
+}
+
+sal_Bool SAL_CALL SfxDummyController_Impl::suspend( sal_Bool bSuspend ) throw( ::com::sun::star::uno::RuntimeException )
+{
+ if ( bSuspend )
+ getFrame()->removeFrameActionListener( pImp );
+ else
+ getFrame()->addFrameActionListener( pImp );
+ return sal_True;
+}
+
+::com::sun::star::uno::Any SAL_CALL SfxDummyController_Impl::getViewData() throw( ::com::sun::star::uno::RuntimeException )
+{
+ return ::com::sun::star::uno::Any();
+}
+
+void SAL_CALL SfxDummyController_Impl::restoreViewData( const ::com::sun::star::uno::Any& Value ) throw( ::com::sun::star::uno::RuntimeException )
+{
+}
+
+::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > SAL_CALL SfxDummyController_Impl::getFrame() throw( ::com::sun::star::uno::RuntimeException )
+{
+ return xFrame;
+}
+
+::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > SAL_CALL SfxDummyController_Impl::getModel() throw( ::com::sun::star::uno::RuntimeException )
+{
+ return ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > ();
+}
+
+void SAL_CALL SfxDummyController_Impl::dispose() throw( ::com::sun::star::uno::RuntimeException )
+{
+ ::com::sun::star::lang::EventObject aObject;
+ aObject.Source = (::com::sun::star::frame::XController*)this;
+ pImp->aLC.disposeAndClear(aObject);
+}
+
+void SAL_CALL SfxDummyController_Impl::addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener ) throw( ::com::sun::star::uno::RuntimeException )
+{
+ pImp->aLC.addInterface( ::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >*)0), aListener );
+}
+
+void SAL_CALL SfxDummyController_Impl::removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener ) throw( ::com::sun::star::uno::RuntimeException )
+{
+ pImp->aLC.removeInterface( ::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >*)0), aListener );
+}
+
+void SfxFrame_Impl::AppendPickEntry( SfxFramePickEntry_Impl* pEntry )
+{
+#ifdef DBG_UTIL
+ ByteString aStr( "BrowseHistory : " );
+ ByteString aTrace;
+#endif
+ if ( !pHistory )
+ pHistory = new SfxFrameHistory_Impl;
+
+ // Sind schon Eintr"age drin ?
+ sal_uInt32 nCount = pHistory->Count();
+#ifdef DBG_UTIL
+ aTrace = aStr;
+ aTrace += ByteString("Count = ");
+ aTrace += ByteString::CreateFromInt32( nCount );
+ DBG_TRACE( aTrace.GetBuffer() );
+#endif
+ if ( nCount )
+ {
+ sal_uInt32 nCurHisEntry = pHistory->GetCurPos();
+#ifdef DBG_UTIL
+ aTrace = aStr;
+ aTrace += ByteString("Current position = ");
+ aTrace += ByteString::CreateFromInt32( nCurHisEntry );
+ DBG_TRACE( aTrace.GetBuffer() );
+#endif
+ if ( LIST_ENTRY_NOTFOUND != nCurHisEntry )
+ {
+ // UndoEntries ueber dem aktuellen Eintrag werden geloescht
+ for ( sal_uInt32 nEntry = pHistory->Count();
+ nEntry-- > nCurHisEntry + 1; )
+ {
+#ifdef DBG_UTIL
+ aTrace = aStr;
+ aTrace += ByteString("deleting #");
+ aTrace += ByteString::CreateFromInt32( nEntry );
+ DBG_TRACE( aTrace.GetBuffer() );
+#endif
+ delete pHistory->Remove( nEntry );
+ }
+ }
+
+ nCount = pHistory->Count();
+ if ( nCount == HISTORY_MAXSIZE )
+ delete pHistory->Remove( 0UL );
+ nCurHisEntry = pHistory->GetCurPos();
+ }
+
+#ifdef DBG_UTIL
+ aTrace = aStr;
+ aTrace += ByteString("Inserting ");
+ aTrace += ByteString( U2S( pEntry->pDescriptor->GetActualURL().GetMainURL() ) );
+ DBG_TRACE( aTrace.GetBuffer() );
+#endif
+ pHistory->Insert( pEntry, pHistory->Count() );
+}
+
+void SfxFrame_Impl::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
+{
+ SfxSimpleHint* pHint = PTR_CAST( SfxSimpleHint, &rHint );
+ if( pHint && pHint->GetId() == SFX_HINT_CANCELLABLE && pCurrentViewFrame )
+ {
+ // vom Cancel-Manager
+ SfxBindings &rBind = pCurrentViewFrame->GetBindings();
+ rBind.Invalidate( SID_BROWSE_STOP );
+ if ( !rBind.IsInRegistrations() )
+ rBind.Update( SID_BROWSE_STOP );
+ rBind.Invalidate( SID_BROWSE_STOP );
+ }
+}
+
diff --git a/sfx2/source/view/impframe.hxx b/sfx2/source/view/impframe.hxx
new file mode 100644
index 000000000000..6d8936500611
--- /dev/null
+++ b/sfx2/source/view/impframe.hxx
@@ -0,0 +1,221 @@
+/*************************************************************************
+ *
+ * $RCSfile: impframe.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:36 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _SFX_IMPFRAME_HXX
+#define _SFX_IMPFRAME_HXX
+
+#ifndef _SFXCANCEL_HXX //autogen
+#include <svtools/cancel.hxx>
+#endif
+
+#pragma hdrstop
+
+#include "frame.hxx"
+#include "loadenv.hxx"
+#include "picklist.hxx"
+
+class SfxViewFrame;
+class SfxObjectShell;
+class SfxExplorerBrowserConfig;
+
+#ifndef _COM_SUN_STAR_FRAME_XCONTROLLER_HPP_
+#include <com/sun/star/frame/XController.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_XTOPWINDOW_HPP_
+#include <com/sun/star/awt/XTopWindow.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_XWINDOW_HPP_
+#include <com/sun/star/awt/XWindow.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_POSSIZE_HPP_
+#include <com/sun/star/awt/PosSize.hpp>
+#endif
+#ifndef _CPPUHELPER_WEAK_HXX_
+#include <cppuhelper/weak.hxx>
+#endif
+
+#include <viewsh.hxx>
+#include <sfxuno.hxx>
+
+#ifndef FRAME_SEARCH_PARENT
+#define FRAME_SEARCH_PARENT 0x00000001
+#define FRAME_SEARCH_SELF 0x00000002
+#define FRAME_SEARCH_CHILDREN 0x00000004
+#define FRAME_SEARCH_CREATE 0x00000008
+#endif
+
+class SfxDummyController_Impl : public ::com::sun::star::frame::XController, public ::com::sun::star::lang::XTypeProvider, public ::cppu::OWeakObject
+{
+friend class SfxDummyCtrl_Impl;
+ SfxDummyCtrl_Impl* pImp;
+
+private:
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > xWindow;
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > xFrame;
+
+public:
+ SfxDummyController_Impl( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > & xComponent );
+ ~SfxDummyController_Impl();
+
+ SFX_DECL_XINTERFACE_XTYPEPROVIDER
+
+ // ::com::sun::star::frame::XController
+ virtual void SAL_CALL attachFrame( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > & xFrame ) throw ( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL attachModel( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > & xModel ) throw ( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL suspend( sal_Bool bSuspend ) throw ( ::com::sun::star::uno::RuntimeException );
+ ::com::sun::star::uno::Any SAL_CALL getViewData() throw ( ::com::sun::star::uno::RuntimeException );
+ void SAL_CALL restoreViewData( const ::com::sun::star::uno::Any& Value ) throw ( ::com::sun::star::uno::RuntimeException );
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > SAL_CALL getFrame() throw ( ::com::sun::star::uno::RuntimeException );
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > SAL_CALL getModel() throw ( ::com::sun::star::uno::RuntimeException );
+
+ // ::com::sun::star::lang::XComponent
+ virtual void SAL_CALL dispose() throw ( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener ) throw ( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener ) throw ( ::com::sun::star::uno::RuntimeException );
+};
+
+struct SfxFramePickEntry_Impl
+{
+ String aName; // schneller Zugriff JScript
+ SfxFrameDescriptor* pDescriptor;
+ SfxExplorerBrowserConfig* pBrowserCfg;
+ sal_uInt16 nHasBrowser;
+
+ SfxFramePickEntry_Impl();
+ ~SfxFramePickEntry_Impl();
+ SfxFramePickEntry_Impl* Clone() const;
+ void Update( SfxFrame*, const SfxPoolItem* pViewData = NULL );
+ void Initialize( SfxFrame* pFrame, sal_Bool bBrowserCfg,
+ const SfxObjectShell*, const String* pURL = 0, const String* pTitle = 0 );
+};
+
+DECLARE_LIST(SfxFrameHistory_Impl,SfxFramePickEntry_Impl*);
+
+class SfxFrame_Impl : public SfxBroadcaster, public SvCompatWeakBase,
+ public SfxListener
+{
+friend class SfxFrame;
+friend class SfxUnoFrame;
+friend struct SfxFramePickEntry_Impl;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > xFrame;
+ String aFrameIdName;
+ sal_uInt32 nType;
+ sal_uInt32 nHistoryPos;
+ SfxViewFrame* pCurrentViewFrame;
+ SfxObjectShell* pCurrentObjectShell;
+ LoadEnvironment_Impl* pLoadEnv;
+ SfxFrameHistory_Impl* pHistory;
+ SfxFrameHistory_Impl aHistory;
+ SfxFrameDescriptor* pDescr;
+ SfxExplorerBrowserConfig* pBrowserCfg;
+ sal_uInt16 nFrameId;
+ sal_uInt16 nLocks;
+ sal_Bool bCloseOnUnlock : 1;
+ sal_Bool bClosing : 1;
+ sal_Bool bPrepClosing : 1;
+ sal_Bool bInCancelTransfers : 1;
+ sal_Bool bOwnsBindings : 1;
+ sal_Bool bReleasingComponent : 1;
+ sal_Bool bFocusLocked : 1;
+ sal_uInt16 nHasBrowser;
+ SfxCancelManager* pCancelMgr;
+ SfxCancellable* pLoadCancellable;
+ SfxFrame* pFrame;
+ const SfxItemSet* pSet;
+ SfxWorkWindow* pWorkWin;
+ SvBorder aBorder;
+
+ SfxFrame_Impl( SfxFrame* pAntiImplP ) :
+ SvCompatWeakBase( pAntiImplP ),
+ pFrame( pAntiImplP ),
+ bClosing(sal_False),
+ bPrepClosing(sal_False),
+ nType( 0L ),
+ nHistoryPos( 0 ),
+ nFrameId( 0 ),
+ pLoadEnv( NULL ),
+ pCurrentObjectShell( NULL ),
+ pCurrentViewFrame( NULL ),
+ pHistory( NULL ),
+ bInCancelTransfers( sal_False ),
+ bCloseOnUnlock( sal_False ),
+ bOwnsBindings( sal_False ),
+ bReleasingComponent( sal_False ),
+ bFocusLocked( sal_False ),
+ nLocks( 0 ),
+ pBrowserCfg( NULL ),
+ pDescr( NULL ),
+ nHasBrowser( SFX_BEAMER_OFF ),
+ pCancelMgr( 0 ),
+ pLoadCancellable( 0 ),
+ pSet( 0 ),
+ pWorkWin( 0 )
+ {}
+
+ ~SfxFrame_Impl() { delete pCancelMgr;
+ delete pLoadCancellable; }
+ void AppendPickEntry( SfxFramePickEntry_Impl* pEntry);
+ virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
+};
+
+#endif
+
diff --git a/sfx2/source/view/makefile.mk b/sfx2/source/view/makefile.mk
new file mode 100644
index 000000000000..11225793ce75
--- /dev/null
+++ b/sfx2/source/view/makefile.mk
@@ -0,0 +1,116 @@
+#*************************************************************************
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.1.1.1 $
+#
+# last change: $Author: hr $ $Date: 2000-09-18 16:52:36 $
+#
+# The Contents of this file are made available subject to the terms of
+# either of the following licenses
+#
+# - GNU Lesser General Public License Version 2.1
+# - Sun Industry Standards Source License Version 1.1
+#
+# Sun Microsystems Inc., October, 2000
+#
+# GNU Lesser General Public License Version 2.1
+# =============================================
+# Copyright 2000 by Sun Microsystems, Inc.
+# 901 San Antonio Road, Palo Alto, CA 94303, USA
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License version 2.1, as published by the Free Software Foundation.
+#
+# This library 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 for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+#
+# Sun Industry Standards Source License Version 1.1
+# =================================================
+# The contents of this file are subject to the Sun Industry Standards
+# Source License Version 1.1 (the "License"); You may not use this file
+# except in compliance with the License. You may obtain a copy of the
+# License at http://www.openoffice.org/license.html.
+#
+# Software provided under this License is provided on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+# See the License for the specific provisions governing your rights and
+# obligations concerning the Software.
+#
+# The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+#
+# Copyright: 2000 by Sun Microsystems, Inc.
+#
+# All Rights Reserved.
+#
+# Contributor(s): _______________________________________
+#
+#
+#
+#*************************************************************************
+
+PRJ=..$/..
+
+PRJNAME= sfx2
+TARGET= view
+ENABLE_EXCEPTIONS= TRUE
+
+.INCLUDE : $(PRJ)$/util$/makefile.pmk
+AUTOSEG=true
+
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : svpre.mk
+.INCLUDE : settings.mk
+.INCLUDE : sv.mk
+
+# --- Files --------------------------------------------------------
+
+SRCFILES = \
+ view.src \
+ fsetview.src \
+ framedlg.src
+
+# removed for unicode
+# $(SLO)$/winscoll.obj \
+
+
+SLOFILES = \
+ $(SLO)$/frmload.obj \
+ $(SLO)$/framedlg.obj \
+ $(SLO)$/fsetvwsh.obj \
+ $(SLO)$/fsetview.obj \
+ $(SLO)$/frame.obj \
+ $(SLO)$/urlframe.obj \
+ $(SLO)$/ipenv.obj \
+ $(SLO)$/contenv.obj \
+ $(SLO)$/printer.obj \
+ $(SLO)$/prnmon.obj \
+ $(SLO)$/viewsh.obj \
+ $(SLO)$/viewprn.obj \
+ $(SLO)$/ipfrm.obj \
+ $(SLO)$/viewfac.obj \
+ $(SLO)$/orgmgr.obj \
+ $(SLO)$/intfrm.obj \
+ $(SLO)$/viewfrm.obj \
+ $(SLO)$/tbedctrl.obj \
+ $(SLO)$/impframe.obj \
+ $(SLO)$/topfrm.obj \
+ $(SLO)$/sfxbasecontroller.obj
+
+# --- Targets -------------------------------------------------------
+
+.INCLUDE : target.mk
+
diff --git a/sfx2/source/view/orgmgr.cxx b/sfx2/source/view/orgmgr.cxx
new file mode 100644
index 000000000000..11bfe71d4c23
--- /dev/null
+++ b/sfx2/source/view/orgmgr.cxx
@@ -0,0 +1,824 @@
+/*************************************************************************
+ *
+ * $RCSfile: orgmgr.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:36 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _MSGBOX_HXX //autogen
+#include <vcl/msgbox.hxx>
+#endif
+#ifndef _INTN_HXX //autogen
+#include <tools/intn.hxx>
+#endif
+#ifndef _SVSTOR_HXX //autogen
+#include <so3/svstor.hxx>
+#endif
+#include <tools/urlobj.hxx>
+#pragma hdrstop
+
+#include "app.hxx"
+#include "objsh.hxx"
+#include "docfile.hxx"
+#include "docfac.hxx"
+#include "doctempl.hxx"
+#include "docvor.hxx"
+#include "orgmgr.hxx"
+#include "sfxtypes.hxx"
+#include "sfxresid.hxx"
+#include "view.hrc"
+#include "docfilt.hxx"
+#include "fltfnc.hxx"
+
+//=========================================================================
+
+/* [Beschreibung]
+
+ Implementierungsklasse; einzelner Eintrag in der Dateiansicht
+
+*/
+
+struct _FileListEntry
+{
+ String aFileName; // Dateiname mit komplettem Pfad
+ String aBaseName; // Dateiname
+ International aInter;
+ SfxObjectShellLock aDocShell; // ObjectShell als Ref-Klasse
+ SvStorageRef aStor; // Referenz auf Storage, wenn wir diesen geoeffnet haben
+ BOOL bFile; // als Datei auf Platte
+ // (!= unbenannt1, nicht als Dok. geladen;
+ // diese werden nicht gespeichert!)
+ BOOL bOwner; // selbst erzeugt
+ BOOL bNoName;
+
+ _FileListEntry( const String& rFileName,
+ const International& rInter, const String* pTitle = NULL );
+ ~_FileListEntry();
+
+ int operator==( const _FileListEntry &rCmp) const;
+ int operator< ( const _FileListEntry &rCmp) const;
+ BOOL DeleteObjectShell();
+};
+
+//-------------------------------------------------------------------------
+
+inline int _FileListEntry::operator==(const _FileListEntry &rCmp) const
+{
+ return COMPARE_EQUAL == aInter.Compare(aBaseName, rCmp.aBaseName);
+}
+
+//-------------------------------------------------------------------------
+
+inline int _FileListEntry::operator< (const _FileListEntry &rCmp) const
+{
+ return COMPARE_LESS == aInter.Compare(aBaseName, rCmp.aBaseName);
+}
+
+//-------------------------------------------------------------------------
+
+_FileListEntry::_FileListEntry( const String& rFileName,
+ const International& rInter, const String* pTitle ) :
+
+ aFileName ( rFileName ),
+ aInter ( rInter ),
+ bFile ( FALSE ),
+ bOwner ( FALSE ),
+ bNoName ( TRUE )
+
+{
+ if ( pTitle )
+ aBaseName = *pTitle;
+ else
+ {
+ INetURLObject aObj( rFileName, INET_PROT_FILE );
+ aBaseName = aObj.getName();
+ }
+}
+
+//-------------------------------------------------------------------------
+
+_FileListEntry::~_FileListEntry()
+{
+ DeleteObjectShell();
+}
+
+//-------------------------------------------------------------------------
+
+SV_IMPL_OP_PTRARR_SORT(_SfxObjectList, _FileListEntry*)
+
+//=========================================================================
+
+BOOL _FileListEntry::DeleteObjectShell()
+
+/* [Beschreibung]
+
+ Freigabe der DokumentShell
+
+ [Returnwert] TRUE: alles Ok
+ FALSE: es ist ein Fehler aufgetreten (das
+ Dokument konnte nicht gesichert werden)
+
+*/
+
+{
+ BOOL bRet = TRUE;
+ //Falls wir die Shell angelegt haben und sie veraendert wurde
+ if(bOwner && aDocShell.Is() && aDocShell->IsModified())
+ {
+ //Mussten wir konvertieren?
+ if(aStor.Is())
+ {
+ if(!aDocShell->Save() )
+ bRet = FALSE;
+ else
+ {
+ aStor->Commit();
+// aDocShell->SfxObjectShell::DoSaveCompleted();
+ }
+ }
+ else
+ {
+ // Falls konvertiert im eigenen Format speichern
+ INetURLObject aObj( aFileName );
+ bRet = aDocShell->PreDoSaveAs_Impl(
+ aObj.getName(), aDocShell->GetFactory().GetFilter(0)->GetName(), 0 );
+ }
+ }
+ if( bOwner)
+ {
+ aDocShell.Clear();
+ aStor.Clear();
+ }
+ return bRet;
+}
+
+//-------------------------------------------------------------------------
+
+SfxObjectList::SfxObjectList()
+{
+}
+
+//-------------------------------------------------------------------------
+
+SfxObjectList::~SfxObjectList()
+{
+ DeleteAndDestroy(0, Count());
+}
+
+//-------------------------------------------------------------------------
+
+const String &SfxObjectList::GetBaseName(USHORT i) const
+{
+ return (*this)[i]->aBaseName;
+}
+
+//-------------------------------------------------------------------------
+
+const String& SfxObjectList::GetFileName( USHORT i ) const
+{
+ return (*this)[i]->aFileName;
+}
+
+//-------------------------------------------------------------------------
+
+SfxOrganizeMgr::SfxOrganizeMgr( SfxOrganizeListBox_Impl *pLeft,
+ SfxOrganizeListBox_Impl *pRight,
+ SfxDocumentTemplates *pTempl) :
+ pLeftBox(pLeft),
+ pRightBox(pRight),
+ pTemplates(pTempl? pTempl: new SfxDocumentTemplates),
+ pDocList(new SfxObjectList),
+ bModified(0),
+ bDeleteTemplates(pTempl == 0)
+
+/* [Beschreibung]
+
+ Konstruktor
+
+ Das aktuelle Dokument wird in die Liste der Dokumente
+ aufgenommen.
+
+*/
+{
+ if ( bDeleteTemplates )
+ pTemplates->Construct();
+ const International aInter( GetpApp()->GetAppInternational() );
+ for ( SfxObjectShell* pTmp = SfxObjectShell::GetFirst(); pTmp; pTmp = SfxObjectShell::GetNext(*pTmp) )
+ {
+ if ( pTmp->GetCreateMode() != SFX_CREATE_MODE_STANDARD ||
+ !( pTmp->GetFlags() & SFXOBJECTSHELL_HASOPENDOC ) || !pTmp->GetStyleSheetPool() )
+ continue;
+ _FileListEntry* pNewEntry = NULL;
+ BOOL bHasLongName = pTmp->GetMedium()->GetLongName().Len() != 0;
+ String aTitle = pTmp->GetTitle( SFX_TITLE_TITLE );
+ pNewEntry = new _FileListEntry( pTmp->GetTitle( SFX_TITLE_FULLNAME ), aInter, &aTitle );
+ pNewEntry->aDocShell = pTmp;
+#if defined( SOLARIS )
+ pDocList->Insert( (_FileListEntry const *)pNewEntry );
+#else
+#if defined( WTC) || ( defined( IRIX ) && defined( C700 ) ) || defined( ICC ) || defined ( HPUX )
+ pDocList->Insert( (_FileListEntry const *&) pNewEntry );
+#else
+ pDocList->Insert( pNewEntry );
+#endif
+#endif
+ }
+}
+
+//-------------------------------------------------------------------------
+
+SfxOrganizeMgr::~SfxOrganizeMgr()
+{
+ if(bDeleteTemplates)
+ delete pTemplates;
+ delete pDocList;
+ pLeftBox = pRightBox = 0;
+}
+
+//-------------------------------------------------------------------------
+
+SfxObjectShellRef SfxOrganizeMgr::CreateObjectShell( USHORT nIdx )
+
+/* [Beschreibung]
+
+ Zugriff auf die DokumentShell an der Position nIdx
+
+ [Returnwert] Referenz auf die DokumentShell
+
+*/
+
+{
+ _FileListEntry* pEntry = (*pDocList)[nIdx];
+ // andernfalls Doc-Shell anlegen
+ if ( !pEntry->aDocShell.Is() )
+ {
+//(mba)/task SfxWaitCursor aWaitCursor;
+ INetURLObject aFileObj( pEntry->aFileName );
+ BOOL bDum = FALSE;
+ SfxApplication* pSfxApp = SFX_APP();
+ String aFilePath = aFileObj.PathToFileName();
+ pEntry->aDocShell = pSfxApp->DocAlreadyLoaded( aFilePath, FALSE, bDum );
+ if ( !pEntry->aDocShell.Is() )
+ {
+ pEntry->bOwner = TRUE;
+ SfxMedium* pMed = new SfxMedium(
+ aFilePath, ( STREAM_READ | STREAM_SHARE_DENYWRITE ), FALSE, TRUE, 0 );
+ const SfxFilter* pFilter = NULL;
+ if( pSfxApp->GetFilterMatcher().GuessFilter( *pMed, &pFilter, SFX_FILTER_TEMPLATE, 0 ) ||
+ pFilter && !pFilter->IsOwnFormat() ||
+ pFilter && !pFilter->UsesStorage() )
+ {
+ pSfxApp->LoadTemplate( pEntry->aDocShell, aFilePath );
+ pEntry->aStor = 0;
+ delete pMed;
+ if ( pEntry->aDocShell.Is() )
+ return (SfxObjectShellRef)(SfxObjectShell*)(pEntry->aDocShell);
+ }
+ else
+ {
+ delete pMed;
+ if ( pFilter )
+ {
+ pEntry->aDocShell = (SfxObjectShell *)
+ ((SfxFactoryFilterContainer*)pFilter->GetFilterContainer())
+ ->GetFactory().CreateObject(SFX_CREATE_MODE_ORGANIZER);
+ }
+
+#if SUPD<583 //(mba)
+ if ( !pEntry->aDocShell.Is() )
+ // Config-Files
+ pEntry->aDocShell = new SfxGenericObjectShell( SFX_CREATE_MODE_ORGANIZER );
+#else
+ if ( !pEntry->aDocShell.Is() )
+ return NULL;
+#endif
+ pEntry->aStor = new SvStorage( aFilePath,
+ STREAM_READWRITE |
+ STREAM_NOCREATE |
+ STREAM_SHARE_DENYALL,
+ STORAGE_TRANSACTED );
+ // kein Storage-File oder andere Fehler beim Oeffnen
+ if( SVSTREAM_OK == pEntry->aStor->GetError() )
+ {
+ if ( pEntry->aDocShell.Is() )
+ {
+ String aOldBaseURL = INetURLObject::GetBaseURL();
+ pEntry->aDocShell->DoInitNew(0);
+ INetURLObject::SetBaseURL( pEntry->aDocShell->GetMedium()->GetName() );
+ pEntry->aDocShell->LoadFrom(pEntry->aStor);
+ pEntry->aDocShell->DoHandsOff();
+ pEntry->aDocShell->DoSaveCompleted(pEntry->aStor);
+ INetURLObject::SetBaseURL( aOldBaseURL );
+ }
+ }
+ }
+ }
+ }
+ return ( SfxObjectShellRef )(SfxObjectShell*)(pEntry->aDocShell);
+}
+
+//-------------------------------------------------------------------------
+
+BOOL SfxOrganizeMgr::DeleteObjectShell(USHORT nIdx)
+
+/* [Beschreibung]
+
+ Freigabe der DokumentShell an der Position nIdx
+
+ [Returnwert] TRUE: alles Ok
+ FALSE: es ist ein Fehler aufgetreten (das
+ Dokument konnte nicht gesichert werden)
+
+*/
+{
+ return (*pDocList)[nIdx]->DeleteObjectShell();
+}
+
+//-------------------------------------------------------------------------
+
+SfxObjectShellRef SfxOrganizeMgr::CreateObjectShell(USHORT nRegion,
+ USHORT nIdx)
+/* [Beschreibung]
+
+ Zugriff auf die DokumentShell an der Position nIdx im Bereich
+ nRegion (Dokumentvorlage)
+
+ [Returnwert] Referenz auf die DokumentShell
+
+*/
+{
+//(mba)/task SfxWaitCursor aWaitCursor;
+ return pTemplates->CreateObjectShell(nRegion, nIdx);
+}
+
+//-------------------------------------------------------------------------
+
+BOOL SfxOrganizeMgr::DeleteObjectShell(USHORT nRegion, USHORT nIdx)
+
+/* [Beschreibung]
+
+ Freigabe der DokumentShell an der Position nIdx im Bereich
+ nRegion (Dokumentvorlage)
+
+ [Returnwert] TRUE: alles Ok
+ FALSE: es ist ein Fehler aufgetreten (das
+ Dokument konnte nicht gesichert werden)
+
+*/
+
+{
+ return pTemplates->DeleteObjectShell(nRegion, nIdx);
+}
+
+//-------------------------------------------------------------------------
+
+BOOL SfxOrganizeMgr::Copy(USHORT nTargetRegion,
+ USHORT nTargetIdx,
+ USHORT nSourceRegion,
+ USHORT nSourceIdx)
+
+/* [Beschreibung]
+
+ Kopieren einer Dokumentvorlage
+
+ [Parameter]
+
+ USHORT nTargetRegion Index des Zielbereiches
+ USHORT nTargetIdx Index Zielposition
+ USHORT nSourceRegion Index des Quellbereiches
+ USHORT nSourceIdx Index der zu kopierenden / z uverschiebenden
+ Dokumentvorlage
+
+ [R"uckgabewert] Erfolg (TRUE) oder Mi"serfolg (FALSE)
+
+
+ [Querverweise]
+
+ <SfxDocumentTemplates::Copy(USHORT nTargetRegion,
+ USHORT nTargetIdx,
+ USHORT nSourceRegion,
+ USHORT nSourceIdx)>
+
+*/
+
+{
+ if(nSourceIdx == USHRT_MAX) // keine Verzeichnisse kopieren
+ return FALSE ;
+ const BOOL bOk = pTemplates->Copy(nTargetRegion, nTargetIdx,
+ nSourceRegion, nSourceIdx);
+ if(bOk)
+ bModified = 1;
+ return bOk;
+}
+
+//-------------------------------------------------------------------------
+
+BOOL SfxOrganizeMgr::Move(USHORT nTargetRegion,
+ USHORT nTargetIdx,
+ USHORT nSourceRegion,
+ USHORT nSourceIdx)
+
+/* [Beschreibung]
+
+ Verschieben einer Dokumentvorlage
+
+ [Parameter]
+
+ USHORT nTargetRegion Index des Zielbereiches
+ USHORT nTargetIdx Index Zielposition
+ USHORT nSourceRegion Index des Quellbereiches
+ USHORT nSourceIdx Index der zu kopierenden / z uverschiebenden
+ Dokumentvorlage
+
+ [R"uckgabewert] Erfolg (TRUE) oder Mi"serfolg (FALSE)
+
+
+ [Querverweise]
+
+ <SfxDocumentTemplates::Move(USHORT nTargetRegion,
+ USHORT nTargetIdx,
+ USHORT nSourceRegion,
+ USHORT nSourceIdx)>
+
+*/
+
+{
+ if(nSourceIdx == USHRT_MAX) // keine Verzeichnisse verschieben
+ return FALSE ;
+ const BOOL bOk = pTemplates->Move(nTargetRegion, nTargetIdx,
+ nSourceRegion, nSourceIdx);
+ if(bOk)
+ bModified = 1;
+ return bOk;
+}
+
+//-------------------------------------------------------------------------
+
+BOOL SfxOrganizeMgr::Delete(SfxOrganizeListBox_Impl *pCaller,
+ USHORT nRegion, USHORT nIdx)
+
+/* [Beschreibung]
+
+ "oschen einer Dokumentvorlage
+
+ [Parameter]
+
+ SfxOrganizeListBox *pCaller rufende ListBox; da dieses
+ Event durch das Men"u oder
+ durch das Keyboard angetriggert wird,
+ mu"s das Model der ListBox anschlie"send
+ aktualisiert werden.
+ USHORT nRegion Index des Bereiches
+ USHORT nIdx Index der Dokumentvorlage
+
+ [R"uckgabewert] Erfolg (TRUE) oder Mi"serfolg (FALSE)
+
+
+ [Querverweise]
+
+ <SfxDocumentTemplates::Delete(USHORT nRegion, USHORT nIdx)>
+
+*/
+
+{
+ const BOOL bOk = pTemplates->Delete(nRegion, nIdx);
+ if(bOk)
+ {
+ bModified = 1;
+ // zu loeschender Eintrag
+ SvLBoxEntry *pEntryToDelete = USHRT_MAX == nIdx? // Verzeichnis
+ pCaller->SvLBox::GetEntry(nRegion):
+ pCaller->SvLBox::GetEntry(pCaller->SvLBox::GetEntry(nRegion), nIdx);
+
+ pCaller->GetModel()->Remove(pEntryToDelete);
+ }
+ return bOk;
+}
+
+//-------------------------------------------------------------------------
+
+BOOL SfxOrganizeMgr::InsertDir
+(
+ SfxOrganizeListBox_Impl* pCaller,/* rufende ListBox; da dieses Event
+ durch das Men"u oder durch das
+ Keyboard angetriggert wird,
+ mu\s das Model der ListBox
+ anschlie\send aktualisiert werden */
+ const String& rText, // logischer Name des Bereiches
+ USHORT nRegion // Index des Bereiches
+)
+
+/* [Beschreibung]
+
+ Einf"ugen eines Bereiches
+
+
+ [R"uckgabewert]
+
+ Erfolg (TRUE) oder Mi\serfolg (FALSE)
+
+
+ [Querverweise]
+
+ <SfxDocumentTemplates::InsertDir(const String &, USHORT nRegion)>
+*/
+
+{
+ const BOOL bOk = pTemplates->InsertDir(rText, nRegion);
+ if(bOk)
+ {
+ bModified = 1;
+ SvLBoxEntry *pEntry = pCaller->InsertEntry(rText,
+ pCaller->GetOpenedBmp(0),
+ pCaller->GetClosedBmp(0),
+ 0, TRUE, nRegion);
+ pCaller->Update();
+ pCaller->EditEntry(pEntry);
+ }
+ return bOk;
+}
+
+//-------------------------------------------------------------------------
+
+BOOL SfxOrganizeMgr::SetName(const String &rName,
+ USHORT nRegion, USHORT nIdx)
+
+/* [Beschreibung]
+
+ "Andern eines (logischen) Namens
+
+ [Parameter]
+
+ const String &rName der neue Name
+ USHORT nRegion Index des Bereiches
+ USHORT nIdx Index der Dokumentvorlage
+
+ [R"uckgabewert] Erfolg (TRUE) oder Mi"serfolg (FALSE)
+
+
+ [Querverweise]
+
+ <SfxDocumentTemplates::SetName(const String &, USHORT nRegion, USHORT nIdx)>
+
+*/
+
+{
+ const BOOL bOk = pTemplates->SetName(rName, nRegion, nIdx);
+ if(bOk)
+ bModified = 1;
+ return bOk;
+}
+
+//-------------------------------------------------------------------------
+
+BOOL SfxOrganizeMgr::CopyTo(USHORT nRegion, USHORT nIdx, const String &rName) const
+
+/* [Beschreibung]
+
+ Export einer Vorlage
+
+ [Parameter]
+
+ USHORT nRegion Index des Bereiches
+ USHORT nIdx Index der Dokumentvorlage
+ const String &rName Dateiname
+
+ [R"uckgabewert] Erfolg (TRUE) oder Mi"serfolg (FALSE)
+
+
+ [Querverweise]
+
+ <SfxDocumentTemplates::CopyTo( USHORT nRegion, USHORT nIdx, const String &)>
+
+*/
+
+{
+ return pTemplates->CopyTo(nRegion, nIdx, rName);
+}
+
+//-------------------------------------------------------------------------
+
+BOOL SfxOrganizeMgr::CopyFrom(SfxOrganizeListBox_Impl *pCaller,
+ USHORT nRegion, USHORT nIdx, String &rName)
+
+/* [Beschreibung]
+
+ Import einer Vorlage
+
+ [Parameter]
+
+ SfxOrganizeListBox *pCaller rufende ListBox; da dieses
+ Event durch das Men"u angetriggert wird,
+ mu"s das Model der ListBox anschlie"send
+ aktualisiert werden.
+ USHORT nRegion Index des Bereiches
+ USHORT nIdx Index der Dokumentvorlage
+ String &rName Dateiname
+
+ [R"uckgabewert] Erfolg (TRUE) oder Mi"serfolg (FALSE)
+
+
+ [Querverweise]
+
+ <SfxDocumentTemplates::CopyFrom( USHORT nRegion, USHORT nIdx, const String &)>
+
+*/
+
+{
+ SvLBoxEntry *pParent = pCaller->FirstSelected();
+ if(nIdx!=USHRT_MAX)
+ pParent=pCaller->GetParent(pParent);
+ if(pTemplates->CopyFrom(nRegion, nIdx, rName))
+ {
+ // pCaller aktualisieren
+ if( nIdx == USHRT_MAX )
+ nIdx = 0;
+ else nIdx++;
+ SvLBoxEntry *pEntry = pCaller->InsertEntry(rName,
+ pCaller->GetOpenedBmp(1),
+ pCaller->GetClosedBmp(1),
+ pParent, TRUE, nIdx);
+ pCaller->Update();
+ pCaller->EditEntry(pEntry);
+ bModified = TRUE;
+ return TRUE;
+ }
+ return FALSE;
+}
+
+//-------------------------------------------------------------------------
+
+BOOL SfxOrganizeMgr::InsertFile( SfxOrganizeListBox_Impl* pCaller, const String& rFileName )
+
+/* [Beschreibung]
+
+ Eine Datei in der Dateiansicht hinzuf"ugen
+
+ [Parameter]
+
+ SfxOrganizeListBox *pCaller rufende ListBox; da dieses
+ Event durch das Men"u angetriggert wird,
+ mu"s das Model der ListBox anschlie"send
+ aktualisiert werden.
+ const String &rFileName Name der hinzuf"ugenden Datei
+
+ [R"uckgabewert] Erfolg (TRUE) oder Mi"serfolg (FALSE)
+
+*/
+
+{
+ const International aInter( GetpApp()->GetAppInternational() );
+ _FileListEntry* pEntry = new _FileListEntry( rFileName, aInter );
+#if defined( SOLARIS )
+ if ( pDocList->Insert( (_FileListEntry const *)pEntry ) )
+#else
+#if defined( WTC ) || ( defined( IRIX ) && defined( C700 ) ) || defined( ICC ) || defined ( HPUX )
+ if ( pDocList->Insert( (_FileListEntry const *&)pEntry ) )
+#else
+ if ( pDocList->Insert( pEntry ) )
+#endif
+#endif
+ {
+ USHORT nPos = 0;
+ pDocList->Seek_Entry( pEntry, &nPos );
+ pCaller->InsertEntry( pEntry->aBaseName, pCaller->GetOpenedBmp(1),
+ pCaller->GetClosedBmp(1), 0, TRUE, nPos );
+ return TRUE;
+ }
+ return FALSE;
+}
+
+//-------------------------------------------------------------------------
+
+BOOL SfxOrganizeMgr::Rescan()
+
+/* [Beschreibung]
+
+ Aktualisieren der Datenbasis
+
+ [R"uckgabewert]
+
+ TRUE es bestanden Unterschiede
+ FALSE keine "Anderung
+
+ [Querverweise]
+
+ <SfxDocumentTemplates::Rescan()>
+*/
+
+{
+ if(pTemplates->Rescan())
+ {
+ bModified = TRUE;
+ return TRUE;
+ }
+ return FALSE;
+}
+
+//-------------------------------------------------------------------------
+
+void SfxOrganizeMgr::SaveAll(Window *pParent)
+
+/* [Beschreibung]
+
+ Schreiben aller ge"anderten Dokumente
+
+ [Parameter]
+
+ Window *pParent Parent der Boxen f"ur Fehlermeldungen
+
+*/
+
+{
+ USHORT nRangeCount = pTemplates->GetRegionCount();
+ USHORT i;
+ for(i = 0; i < nRangeCount; ++i)
+ {
+ if( pTemplates->IsRegionLoaded( i ))
+ {
+ const USHORT nCount = pTemplates->GetCount(i);
+ for(USHORT j = 0; j < nCount; ++j)
+ {
+ if(!pTemplates->DeleteObjectShell(i, j))
+ {
+ String aText = String(SfxResId(STR_ERROR_SAVE_TEMPLATE));
+ aText += pTemplates->GetName(i, j);
+ ErrorBox aBox(pParent,
+ WinBits(WB_OK_CANCEL | WB_DEF_CANCEL),
+ aText);
+ if(RET_CANCEL == aBox.Execute())
+ break;
+ }
+ }
+ }
+ }
+ nRangeCount = pDocList->Count();
+ for(i = 0; i < nRangeCount; ++i)
+ {
+ _FileListEntry *pEntry = (*pDocList)[i];
+ if(!pEntry->DeleteObjectShell())
+ {
+ String aText(SfxResId(STR_ERROR_SAVE_TEMPLATE));
+ aText += pEntry->aBaseName;
+ ErrorBox aBox(pParent, WinBits(WB_OK_CANCEL | WB_DEF_CANCEL), aText);
+ if(RET_CANCEL == aBox.Execute())
+ break;
+ }
+ }
+}
+
+
diff --git a/sfx2/source/view/printer.cxx b/sfx2/source/view/printer.cxx
new file mode 100644
index 000000000000..3165e549ae9c
--- /dev/null
+++ b/sfx2/source/view/printer.cxx
@@ -0,0 +1,556 @@
+/*************************************************************************
+ *
+ * $RCSfile: printer.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:36 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _SV_VIRDEV_HXX //autogen
+#include <vcl/virdev.hxx>
+#endif
+#ifndef _SV_METRIC_HXX //autogen
+#include <vcl/metric.hxx>
+#endif
+#ifndef _SV_MSGBOX_HXX //autogen
+#include <vcl/msgbox.hxx>
+#endif
+#ifndef _SV_PRINTDLG_HXX_ //autogen
+#include <svtools/printdlg.hxx>
+#endif
+#pragma hdrstop
+
+#include "printer.hxx"
+#include "sfxtypes.hxx"
+#include "prnmon.hxx"
+#include "viewsh.hxx"
+#include "tabdlg.hxx"
+#include "sfxresid.hxx"
+#include "view.hrc"
+
+#ifdef MSC
+// der ist buggy
+#define NEW_OBJECTS(Class, nCount) ((Class*) new char[ sizeof(Class) * (nCount) ])
+#else
+#define NEW_OBJECTS(Class, nCount) (new Class[nCount])
+#endif
+
+
+USHORT SfxFontSizeInfo::pStaticSizes[] =
+{
+#ifdef MAC
+ 90,
+#else
+ 60,
+ 80,
+#endif
+ 100,
+ 120,
+ 140,
+ 180,
+ 240,
+ 360,
+ 480,
+ 600,
+ 720
+};
+
+//--------------------------------------------------------------------
+
+SV_DECL_PTRARR_DEL(SfxFontArr_Impl,SfxFont*,10,5)
+
+// struct SfxPrinter_Impl ------------------------------------------------
+
+struct SfxPrinter_Impl
+{
+ SfxFontArr_Impl* mpFonts;
+ BOOL mbAll;
+ BOOL mbSelection;
+ BOOL mbFromTo;
+ BOOL mbRange;
+
+ SfxPrinter_Impl() :
+ mpFonts ( NULL ),
+ mbAll ( TRUE ),
+ mbSelection ( TRUE ),
+ mbFromTo ( TRUE ),
+ mbRange ( TRUE ) {}
+ ~SfxPrinter_Impl() { delete mpFonts; }
+};
+
+#define FONTS() pImpl->mpFonts
+
+//--------------------------------------------------------------------
+
+SfxFontSizeInfo::SfxFontSizeInfo( const SfxFont &rFont,
+ const OutputDevice &rDevice ) :
+
+ pSizes(0),
+ nSizes(0),
+ bScalable(TRUE)
+
+{
+ if ( 0 == rDevice.GetDevFontCount() )
+ bScalable = FALSE;
+ else
+ {
+ OutputDevice &rDev = (OutputDevice&) rDevice;
+ Font aFont(rFont.GetName(), Size(0,12));
+ aFont.SetFamily(rFont.GetFamily());
+ aFont.SetPitch(rFont.GetPitch());
+ aFont.SetCharSet(rFont.GetCharSet());
+
+ // verfuegbare Groessen in die Liste eintragen, Groesse in 10tel Punkt
+ USHORT nSizeCount = rDev.GetDevFontSizeCount(aFont);
+ pSizes = NEW_OBJECTS(Size, nSizeCount);
+ const MapMode aOldMapMode = rDev.GetMapMode();
+ MapMode aMap(aOldMapMode);
+ aMap.SetMapUnit(MAP_POINT);
+ const Fraction aTen(1, 10);
+ aMap.SetScaleX(aTen);
+ aMap.SetScaleY(aTen);
+ rDev.SetMapMode(aMap);
+
+ // Es gibt Fonts mit Bitmaps und skalierbaren Groessen
+ // In diesem Fall wird der Fonts als skalierbar behandelt.
+ BOOL bFoundScalable = FALSE;
+ for ( USHORT i = 0; i < nSizeCount; ++i )
+ {
+ const Size aSize( rDev.GetDevFontSize(aFont, i) );
+ if ( aSize.Height() != 0 )
+ pSizes[nSizes++] = aSize;
+ else
+ bFoundScalable |= TRUE;
+ }
+ if( !bFoundScalable )
+ bScalable = FALSE;
+ else
+ {
+ // statische Font-Sizes verwenden
+ __DELETE(nSizeCount) pSizes;
+ nSizes = 0;
+ }
+ rDev.SetMapMode(aOldMapMode);
+ }
+
+ if ( 0 == nSizes )
+ {
+ nSizes = sizeof(pStaticSizes) / sizeof(USHORT);
+ pSizes = NEW_OBJECTS(Size, nSizes);
+ for ( USHORT nPos = 0; nPos <nSizes; ++nPos )
+ pSizes[nPos] = Size( 0, pStaticSizes[nPos] );
+ }
+}
+
+//--------------------------------------------------------------------
+
+SfxFontSizeInfo::~SfxFontSizeInfo()
+{
+ __DELETE(nSizes) pSizes;
+}
+
+//--------------------------------------------------------------------
+
+BOOL SfxFontSizeInfo::HasSize(const Size &rSize) const
+{
+ if ( bScalable )
+ return TRUE;
+ for ( USHORT i = 0; i < nSizes; ++i)
+ if ( pSizes[i] == rSize )
+ return TRUE;
+ return FALSE;
+}
+
+//--------------------------------------------------------------------
+
+SfxFont::SfxFont( const FontFamily eFontFamily, const String& aFontName,
+ const FontPitch eFontPitch, const CharSet eFontCharSet ):
+ aName( aFontName ),
+ eFamily( eFontFamily ),
+ ePitch( eFontPitch ),
+ eCharSet( eFontCharSet )
+{
+}
+
+// class SfxPrinter ------------------------------------------------------
+
+SfxPrinter* SfxPrinter::Create( SvStream& rStream, SfxItemSet* pOptions )
+
+/* [Beschreibung]
+
+ Erzeugt einen <SfxPrinter> aus dem Stream. Geladen wird genaugenommen
+ nur ein JobSetup. Falls ein solcher Drucker auf dem System nicht
+ verf"augbar ist, wird das Original als Orig-JobSetup gemerkt und
+ ein "anhlicher exisitierender Drucker genommen.
+
+ Die 'pOptions' werden in den erzeugten SfxPrinter "ubernommen,
+ der Returnwert geh"ort dem Caller.
+*/
+
+{
+ // JobSetup laden
+ JobSetup aFileJobSetup;
+ rStream >> aFileJobSetup;
+
+ // Drucker erzeugen
+ SfxPrinter *pPrinter = new SfxPrinter( pOptions, aFileJobSetup );
+ return pPrinter;
+}
+
+//--------------------------------------------------------------------
+
+SvStream& SfxPrinter::Store( SvStream& rStream ) const
+
+/* [Beschreibung]
+
+ Speichert das verwendete JobSetup des <SfxPrinter>s.
+*/
+
+{
+ return ( rStream << GetJobSetup() );
+}
+
+//--------------------------------------------------------------------
+
+SfxPrinter::SfxPrinter( SfxItemSet* pTheOptions ) :
+
+/* [Beschreibung]
+
+ Dieser Ctor erzeugt einen Standard-Drucker.
+*/
+
+ pOptions( pTheOptions )
+
+{
+ pImpl = new SfxPrinter_Impl;
+}
+
+//--------------------------------------------------------------------
+
+SfxPrinter::SfxPrinter( SfxItemSet* pTheOptions,
+ const JobSetup& rTheOrigJobSetup ) :
+
+ Printer ( rTheOrigJobSetup.GetPrinterName() ),
+ pOptions ( pTheOptions )
+
+{
+ pImpl = new SfxPrinter_Impl;
+ bKnown = GetName() == rTheOrigJobSetup.GetPrinterName();
+
+ if ( bKnown )
+ SetJobSetup( rTheOrigJobSetup );
+}
+
+//--------------------------------------------------------------------
+
+SfxPrinter::SfxPrinter( SfxItemSet* pTheOptions,
+ const String& rPrinterName ) :
+
+ Printer ( rPrinterName ),
+ pOptions ( pTheOptions ),
+ bKnown ( GetName() == rPrinterName )
+
+{
+ pImpl = new SfxPrinter_Impl;
+}
+
+//--------------------------------------------------------------------
+
+SfxPrinter::SfxPrinter( const SfxPrinter& rPrinter ) :
+
+ Printer ( rPrinter.GetName() ),
+ pOptions( rPrinter.GetOptions().Clone() ),
+ bKnown ( rPrinter.IsKnown() )
+{
+ SetJobSetup( rPrinter.GetJobSetup() );
+ SetPrinterProps( &rPrinter );
+ SetMapMode( rPrinter.GetMapMode() );
+
+ pImpl = new SfxPrinter_Impl;
+ pImpl->mbAll = rPrinter.pImpl->mbAll;
+ pImpl->mbSelection = rPrinter.pImpl->mbSelection;
+ pImpl->mbFromTo = rPrinter.pImpl->mbFromTo;
+ pImpl->mbRange = rPrinter.pImpl->mbRange;
+}
+
+//--------------------------------------------------------------------
+
+SfxPrinter* SfxPrinter::Clone() const
+{
+ if ( IsDefPrinter() )
+ {
+ SfxPrinter *pNewPrinter;
+ pNewPrinter = new SfxPrinter( GetOptions().Clone() );
+ pNewPrinter->SetJobSetup( GetJobSetup() );
+ pNewPrinter->SetPrinterProps( this );
+ pNewPrinter->SetMapMode( GetMapMode() );
+ pNewPrinter->pImpl->mbAll = pImpl->mbAll;
+ pNewPrinter->pImpl->mbSelection =pImpl->mbSelection;
+ pNewPrinter->pImpl->mbFromTo = pImpl->mbFromTo;
+ pNewPrinter->pImpl->mbRange =pImpl->mbRange;
+ return pNewPrinter;
+ }
+ else
+ return new SfxPrinter( *this );
+}
+
+//--------------------------------------------------------------------
+
+SfxPrinter::~SfxPrinter()
+{
+ delete pOptions;
+ delete pImpl;
+}
+
+//--------------------------------------------------------------------
+
+void SfxPrinter::SetOptions( const SfxItemSet &rNewOptions )
+{
+ pOptions->Set(rNewOptions);
+}
+
+//--------------------------------------------------------------------
+
+void SfxPrinter::EnableRange( USHORT nRange )
+{
+ PrintDialogRange eRange = (PrintDialogRange)nRange;
+
+ if ( eRange == PRINTDIALOG_ALL )
+ pImpl->mbAll = TRUE;
+ else if ( eRange == PRINTDIALOG_SELECTION )
+ pImpl->mbSelection = TRUE;
+ else if ( eRange == PRINTDIALOG_FROMTO )
+ pImpl->mbFromTo = TRUE;
+ else if ( eRange == PRINTDIALOG_RANGE )
+ pImpl->mbRange = TRUE;
+}
+
+//--------------------------------------------------------------------
+
+void SfxPrinter::DisableRange( USHORT nRange )
+{
+ PrintDialogRange eRange = (PrintDialogRange)nRange;
+
+ if ( eRange == PRINTDIALOG_ALL )
+ pImpl->mbAll = FALSE;
+ else if ( eRange == PRINTDIALOG_SELECTION )
+ pImpl->mbSelection = FALSE;
+ else if ( eRange == PRINTDIALOG_FROMTO )
+ pImpl->mbFromTo = FALSE;
+ else if ( eRange == PRINTDIALOG_RANGE )
+ pImpl->mbRange = FALSE;
+}
+
+//--------------------------------------------------------------------
+
+BOOL SfxPrinter::IsRangeEnabled( USHORT nRange ) const
+{
+ PrintDialogRange eRange = (PrintDialogRange)nRange;
+ BOOL bRet = FALSE;
+
+ if ( eRange == PRINTDIALOG_ALL )
+ bRet = pImpl->mbAll;
+ else if ( eRange == PRINTDIALOG_SELECTION )
+ bRet = pImpl->mbSelection;
+ else if ( eRange == PRINTDIALOG_FROMTO )
+ bRet = pImpl->mbFromTo;
+ else if ( eRange == PRINTDIALOG_RANGE )
+ bRet = pImpl->mbRange;
+
+ return bRet;
+}
+
+//--------------------------------------------------------------------
+
+SV_IMPL_PTRARR(SfxFontArr_Impl,SfxFont*)
+
+//--------------------------------------------------------------------
+
+const SfxFont* SfxFindFont_Impl( const SfxFontArr_Impl& rArr,
+ const String& rName )
+{
+ const USHORT nCount = rArr.Count();
+ for ( USHORT i = 0; i < nCount; ++i )
+ {
+ const SfxFont *pFont = rArr[i];
+ if ( pFont->GetName() == rName )
+ return pFont;
+ }
+ return NULL;
+}
+
+//--------------------------------------------------------------------
+
+void SfxPrinter::UpdateFonts_Impl()
+{
+ VirtualDevice *pVirDev = 0;
+ const OutputDevice *pOut = this;
+
+ // falls kein Drucker gefunden werden konnte, ein
+ // temp. Device erzeugen fuer das Erfragen der Fonts
+ if( !IsValid() )
+ pOut = pVirDev = new VirtualDevice;
+
+ const USHORT nCount = pOut->GetDevFontCount();
+ FONTS() = new SfxFontArr_Impl((BYTE)nCount);
+ for(USHORT i = 0;i < nCount;++i)
+ {
+ Font aFont(pOut->GetDevFont(i));
+ if ( FONTS()->Count() == 0 ||
+ (*FONTS())[FONTS()->Count()-1]->GetName() != aFont.GetName() )
+ {
+ DBG_ASSERT(0 == SfxFindFont_Impl(*FONTS(), aFont.GetName()), "Doppelte Fonts vom SV-Device!");
+ SfxFont* pTmp = new SfxFont( aFont.GetFamily(), aFont.GetName(),
+ aFont.GetPitch(), aFont.GetCharSet() );
+ FONTS()->C40_INSERT(SfxFont, pTmp, FONTS()->Count());
+ }
+ }
+ delete pVirDev;
+}
+
+//--------------------------------------------------------------------
+
+USHORT SfxPrinter::GetFontCount()
+{
+ if ( !FONTS() )
+ UpdateFonts_Impl();
+ return FONTS()->Count();
+}
+
+//--------------------------------------------------------------------
+
+const SfxFont* SfxPrinter::GetFont( USHORT nNo ) const
+{
+ DBG_ASSERT( FONTS(), "bitte erst GetFontCount() abfragen!" );
+ return (*FONTS())[ nNo ];
+}
+
+//--------------------------------------------------------------------
+
+const SfxFont* SfxPrinter::GetFontByName( const String &rFontName )
+{
+ if ( !FONTS() )
+ UpdateFonts_Impl();
+ return SfxFindFont_Impl(*FONTS(), rFontName);
+}
+
+//--------------------------------------------------------------------
+
+SfxPrintOptionsDialog::SfxPrintOptionsDialog( Window *pParent,
+ SfxViewShell *pViewShell,
+ const SfxItemSet *pSet ):
+ ModalDialog( pParent, WinBits( WB_STDMODAL | WB_3DLOOK ) ),
+ aOkBtn( this ),
+ aCancelBtn( this ),
+ pViewSh( pViewShell ),
+ pOptions( pSet->Clone() ),
+ pPage( 0 )
+{
+ pHelpBtn = new HelpButton(this);
+ SetText( SfxResId( STR_PRINT_OPTIONS_TITLE ) );
+
+ // TabPage einh"angen
+ pPage = pViewSh->CreatePrintOptionsPage( this, *pOptions );
+ DBG_ASSERT( pPage, "CreatePrintOptions != SFX_VIEW_HAS_PRINTOPTIONS" );
+ pPage->Reset( *pOptions );
+ SetHelpId( pPage->GetHelpId() );
+ pPage->Show();
+
+ // Dialoggr"o\se bestimmen
+ Size aOutSz( pPage->GetSizePixel() );
+ aOutSz.Height() += 6;
+ aOutSz.Width() += 108;
+ if ( aOutSz.Height() < 90 )
+ // mindestens die H"ohe der 3 Buttons
+ aOutSz.Height() = 90;
+ SetOutputSizePixel( aOutSz );
+
+ // Buttons positionieren
+ aOkBtn.SetPosSizePixel( Point( aOutSz.Width()-102, 6 ), Size( 96, 24 ) );
+#ifdef MAC
+ aCancelBtn.SetPosSizePixel( Point( aOutSz.Width()-102, 37 ), Size( 96, 24 ) );
+ pHelpBtn->SetPosSizePixel( Point( aOutSz.Width()-102, 64 ), Size( 96, 24 ) );
+#else
+ aCancelBtn.SetPosSizePixel( Point( aOutSz.Width()-102, 33 ), Size( 96, 24 ) );
+ pHelpBtn->SetPosSizePixel( Point( aOutSz.Width()-102, 60 ), Size( 96, 24 ) );
+#endif
+ aCancelBtn.Show();
+ aOkBtn.Show();
+ pHelpBtn->Show();
+}
+
+//--------------------------------------------------------------------
+
+SfxPrintOptionsDialog::~SfxPrintOptionsDialog()
+{
+ delete pHelpBtn;
+ delete pPage;
+ delete pOptions;
+}
+
+//--------------------------------------------------------------------
+
+short SfxPrintOptionsDialog::Execute()
+{
+ short nRet = ModalDialog::Execute();
+ if ( nRet == RET_OK )
+ pPage->FillItemSet( *pOptions );
+ else
+ pPage->Reset( *pOptions );
+ return nRet;
+}
+
+
diff --git a/sfx2/source/view/prnmon.cxx b/sfx2/source/view/prnmon.cxx
new file mode 100644
index 000000000000..7f65ed096b48
--- /dev/null
+++ b/sfx2/source/view/prnmon.cxx
@@ -0,0 +1,401 @@
+/*************************************************************************
+ *
+ * $RCSfile: prnmon.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:36 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _SV_FIXED_HXX
+#include <vcl/fixed.hxx>
+#endif
+#ifndef _SV_MSGBOX_HXX
+#include <vcl/msgbox.hxx>
+#endif
+#pragma hdrstop
+
+#include "prnmon.hxx"
+#include "viewsh.hxx"
+#include "viewfrm.hxx"
+#include "objsh.hxx"
+#include "docfile.hxx"
+#include "sfxtypes.hxx"
+#include "progress.hxx"
+#include "desrupt.hxx"
+#include "bindings.hxx"
+#include "sfxresid.hxx"
+
+#include "view.hrc"
+
+//------------------------------------------------------------------------
+
+#define SFX_TITLE_MAXLEN_PRINTMONITOR 22
+
+//------------------------------------------------------------------------
+
+struct SfxPrintMonitor_Impl: public ModelessDialog
+{
+ SfxPrintMonitor_Impl( Window *pParent );
+
+ FixedText aDocName;
+ FixedText aPrinting;
+ FixedText aPrinter;
+ FixedText aPrintInfo;
+ CancelButton aCancel;
+};
+
+//-------------------------------------------------------------------------
+
+struct SfxPrintProgress_Impl
+{
+ SfxPrintMonitor_Impl* pMonitor;
+ SfxViewShell* pViewShell;
+ SfxPrinter* pPrinter;
+ SfxPrinter* pOldPrinter;
+ USHORT nLastPage;
+ BOOL bRunning;
+ BOOL bCancel;
+ BOOL bDeleteOnEndPrint;
+ BOOL bShow;
+ BOOL bCallbacks;
+ BOOL bOldEnablePrintFile;
+ AsynchronLink aDeleteLink;
+
+private:
+ DECL_LINK( CancelHdl, Button * );
+ DECL_STATIC_LINK( SfxPrintProgress_Impl, DeleteHdl, SfxPrintProgress * );
+
+public:
+ SfxPrintProgress_Impl( SfxViewShell* pTheViewShell, SfxPrinter* pThePrinter );
+ ~SfxPrintProgress_Impl();
+
+ void Delete( SfxPrintProgress* pAntiImpl ) { aDeleteLink.Call( pAntiImpl ); }
+ SfxViewShell* GetViewShell() const { return pViewShell; }
+ BOOL SetPage( USHORT nPage, const String &rPage );
+};
+
+//------------------------------------------------------------------------
+
+SfxPrintMonitor_Impl::SfxPrintMonitor_Impl( Window* pParent ) :
+
+ ModelessDialog( pParent, SfxResId( DLG_PRINTMONITOR ) ),
+
+ aDocName ( this, ResId( FT_DOCNAME ) ),
+ aPrinting ( this, ResId( FT_PRINTING ) ),
+ aPrinter ( this, ResId( FT_PRINTER ) ),
+ aPrintInfo ( this, ResId( FT_PRINTINFO ) ),
+ aCancel ( this, ResId( PB_CANCELPRNMON ) )
+
+{
+ FreeResource();
+}
+
+//------------------------------------------------------------------------
+
+IMPL_STATIC_LINK( SfxPrintProgress_Impl, DeleteHdl, SfxPrintProgress*, pAntiImpl )
+{
+ delete pAntiImpl;
+ return 0;
+}
+
+//------------------------------------------------------------------------
+
+SfxPrintProgress_Impl::SfxPrintProgress_Impl( SfxViewShell* pTheViewShell,
+ SfxPrinter* pThePrinter ) :
+
+ pViewShell ( pTheViewShell ),
+ pPrinter ( pThePrinter ),
+ pOldPrinter ( NULL ),
+ bRunning ( TRUE ),
+ bDeleteOnEndPrint ( FALSE ),
+ bCancel ( FALSE ),
+ bCallbacks ( FALSE ),
+ bOldEnablePrintFile ( FALSE ),
+ nLastPage ( 0 ),
+ aDeleteLink ( STATIC_LINK( this, SfxPrintProgress_Impl, DeleteHdl ) )
+
+{
+ Window* pParent =
+ pTheViewShell->GetWindow()->IsReallyVisible() ? pTheViewShell->GetWindow() : NULL;
+ pMonitor = new SfxPrintMonitor_Impl( pParent );
+ pMonitor->aDocName.SetText(
+ pViewShell->GetViewFrame()->GetObjectShell()->GetTitle( SFX_TITLE_MAXLEN_PRINTMONITOR ) );
+ pMonitor->aPrinter.SetText( pViewShell->GetPrinter()->GetName() );
+ pMonitor->aCancel.SetClickHdl( LINK( this, SfxPrintProgress_Impl, CancelHdl ) );
+}
+
+//------------------------------------------------------------------------
+
+SfxPrintProgress_Impl::~SfxPrintProgress_Impl()
+{
+ if ( pMonitor )
+ {
+ pMonitor->Hide(); // sieht optisch besser aus, wenn alles auf einmal verschwindet
+ delete pMonitor;
+ }
+}
+
+//------------------------------------------------------------------------
+
+BOOL SfxPrintProgress_Impl::SetPage( USHORT nPage, const String &rPage )
+{
+ // wurde der Druckauftrag abgebrochen?
+ if ( bCancel || !pMonitor )
+ return FALSE;
+
+ nLastPage = nPage;
+ String aStrPrintInfo = String( SfxResId( STR_PAGE ) );
+ if ( !rPage.Len() )
+ aStrPrintInfo += String::CreateFromInt32( nLastPage );
+ else
+ aStrPrintInfo += rPage;
+ pMonitor->aPrintInfo.SetText( aStrPrintInfo );
+ pMonitor->Update();
+ return TRUE;
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK_INLINE_START( SfxPrintProgress_Impl, CancelHdl, Button *, pButton )
+{
+ if ( pMonitor )
+ pMonitor->Hide();
+ pViewShell->GetPrinter()->AbortJob();
+ bCancel = TRUE;
+ return 0;
+}
+IMPL_LINK_INLINE_END( SfxPrintProgress_Impl, CancelHdl, Button *, pButton )
+
+//--------------------------------------------------------------------
+
+SfxPrintProgress::SfxPrintProgress( SfxViewShell* pViewSh, FASTBOOL bShow )
+: SfxProgress( pViewSh->GetViewFrame()->GetObjectShell(),
+ String(SfxResId(STR_PRINTING)), 1, FALSE ),
+ pImp( new SfxPrintProgress_Impl( pViewSh, pViewSh->GetPrinter() ) )
+{
+ // Callback fuer Fehler und EndPrint setzen
+ pImp->pPrinter->SetEndPrintHdl(
+ LINK( this, SfxPrintProgress, EndPrintNotify ));
+ pImp->pPrinter->SetErrorHdl(
+ LINK( this, SfxPrintProgress, PrintErrorNotify ));
+ pImp->bCallbacks = TRUE;
+
+ pImp->pViewShell->GetViewFrame()->GetFrame()->Lock_Impl(TRUE);
+ pImp->bShow = bShow;
+ Lock();
+}
+
+//--------------------------------------------------------------------
+
+SfxPrintProgress::~SfxPrintProgress()
+{
+ // k"onnte auch schon weg sein (in EndPrintNotify)
+ DELETEZ(pImp->pMonitor);
+
+ // ggf. Callbacks entfermen
+ if ( pImp->bCallbacks )
+ {
+ pImp->pPrinter->SetEndPrintHdl( Link() );
+ pImp->pPrinter->SetErrorHdl( Link() );
+ pImp->bCallbacks = FALSE;
+ }
+
+ // ggf. vorherigen Drucker wieder einsetzen
+ if ( pImp->pOldPrinter )
+ pImp->pViewShell->SetPrinter( pImp->pOldPrinter, SFX_PRINTER_PRINTER );
+ else
+ // ggf. vorherigen Print-To-File-Status zuruecksetzen
+ pImp->pViewShell->GetPrinter()->EnablePrintFile(
+ pImp->bOldEnablePrintFile );
+
+ // EndPrint-Notification an Frame
+ pImp->pViewShell->GetViewFrame()->GetFrame()->Lock_Impl(FALSE);
+
+ delete pImp;
+}
+
+//--------------------------------------------------------------------
+
+BOOL SfxPrintProgress::SetState( ULONG nVal, ULONG nNewRange )
+{
+#ifndef MAC
+ // auf dem MAC kommt einer vom Betriebssystem
+ if ( pImp->bShow )
+ {
+ pImp->bShow = FALSE;
+ pImp->pMonitor->Show();
+ pImp->pMonitor->Update();
+ }
+#endif
+
+ return pImp->SetPage( (USHORT)nVal, GetStateText_Impl() ) &&
+ SfxProgress::SetState( nVal, nNewRange );
+}
+
+//--------------------------------------------------------------------
+
+void SfxPrintProgress::SetText( const String& rText )
+{
+ if ( pImp->pMonitor )
+ {
+ pImp->pMonitor->SetText( rText );
+ pImp->pMonitor->Update();
+ }
+ SfxProgress::SetText( rText );
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK_INLINE_START( SfxPrintProgress, PrintErrorNotify, void *, pvoid )
+{
+ if ( pImp->pMonitor )
+ pImp->pMonitor->Hide();
+ pImp->pPrinter->AbortJob();
+ InfoBox( pImp->GetViewShell()->GetWindow(),
+ String( SfxResId(STR_ERROR_PRINT) ) ).Execute();
+ return 0;
+}
+IMPL_LINK_INLINE_END( SfxPrintProgress, PrintErrorNotify, void *, pvoid )
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SfxPrintProgress, EndPrintNotify, void *, pvoid )
+{
+ if ( pImp->pMonitor )
+ pImp->pMonitor->Hide();
+
+ // Slots enablen
+ pImp->pViewShell->Invalidate( SID_PRINTDOC );
+ pImp->pViewShell->Invalidate( SID_PRINTDOCDIRECT );
+ pImp->pViewShell->Invalidate( SID_SETUPPRINTER );
+
+ // . . . falls der Printer im System umgestellt wurde, hier Aenderung
+ // nachziehen.
+ //! if( pMDI->IsPrinterChanged() ) pMDI->Changed( 0L );
+
+ // Callbacks rausnehmen
+ pImp->pPrinter->SetEndPrintHdl( Link() );
+ pImp->pPrinter->SetErrorHdl( Link() );
+ pImp->bCallbacks = FALSE;
+
+ // ggf. alten Printer wieder einsetzen
+ if ( pImp->pOldPrinter )
+ {
+ // Fix #59613#: niemals den aktuellen Printer synchron abschiessen !
+ // Da sowieso immer bDeleteOnEndPrint gesetzt wird, wird der der Drucker im
+ // dtor vom Printprogress ( dann aber asynchron !! ) zur"uckgesetzt.
+/*
+ pImp->pViewShell->SetPrinter( pImp->pOldPrinter, SFX_PRINTER_PRINTER );
+ pImp->pOldPrinter = 0;
+ pImp->pPrinter = 0;
+ */
+ }
+ else
+ // ggf. vorherigen Print-To-File-Status zuruecksetzen
+ pImp->pViewShell->GetPrinter()->EnablePrintFile( pImp->bOldEnablePrintFile );
+
+ // lief der Drucker im Thread?
+ if ( pImp->bDeleteOnEndPrint )
+ {
+ // Dialog sofort l"oschen sonst wird ggf. das MDI vorher geschlossen
+ DELETEZ(pImp->pMonitor);
+
+ // Progress per PostMessage zerst"oren, nicht sofort sonst GPF
+ pImp->Delete( this );
+ }
+ else
+ {
+ DBG_ASSERT( !pImp->pOldPrinter, "Printer konnte nicht korrekt restauriert werden!" );
+ pImp->bRunning = FALSE;
+ }
+
+ return 0;
+}
+
+//------------------------------------------------------------------------
+
+void SfxPrintProgress::DeleteOnEndPrint()
+{
+ UnLock(); // jetzt schon, wg. Drucken im Thread
+#ifndef WIN
+ // da das Drucken im 'Thread' unter Windows zu undefiniert ist bleibt der
+ // Print-Monitor dort stehen, auf den anderen Plattformen kann man dann
+ // weiterarbeiten, also kommt das Teil weg
+ DELETEZ( pImp->pMonitor );
+#endif
+
+ pImp->bDeleteOnEndPrint = TRUE;
+ if ( !pImp->bRunning )
+ delete this;
+}
+
+//------------------------------------------------------------------------
+
+void SfxPrintProgress::RestoreOnEndPrint( SfxPrinter *pOldPrinter,
+ BOOL bOldEnablePrintFile )
+{
+ pImp->pOldPrinter = pOldPrinter;
+ pImp->bOldEnablePrintFile = bOldEnablePrintFile;
+}
+
+//------------------------------------------------------------------------
+
+void SfxPrintProgress::RestoreOnEndPrint( SfxPrinter *pOldPrinter )
+{
+ RestoreOnEndPrint( pOldPrinter, FALSE );
+}
+
+
diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx
new file mode 100644
index 000000000000..f5da9b128a62
--- /dev/null
+++ b/sfx2/source/view/sfxbasecontroller.cxx
@@ -0,0 +1,614 @@
+/*************************************************************************
+ *
+ * $RCSfile: sfxbasecontroller.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:36 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+//________________________________________________________________________________________________________
+// my own includes
+//________________________________________________________________________________________________________
+
+#ifndef _SFX_SFXBASECONTROLLER_HXX_
+#include <sfxbasecontroller.hxx>
+#endif
+
+//________________________________________________________________________________________________________
+// include of other projects
+//________________________________________________________________________________________________________
+
+#ifndef _CPPUHELPER_IMPLBASE1_HXX_
+#include <cppuhelper/implbase1.hxx>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_FRAMEACTIONEVENT_HPP_
+#include <com/sun/star/frame/FrameActionEvent.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_FRAMEACTION_HPP_
+#include <com/sun/star/frame/FrameAction.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LANG_EVENTOBJECT_HPP_
+#include <com/sun/star/lang/EventObject.hpp>
+#endif
+#ifndef _CPPUHELPER_INTERFACECONTAINER_HXX_
+#include <cppuhelper/interfacecontainer.hxx>
+#endif
+#ifndef _CPPUHELPER_TYPEPROVIDER_HXX_
+#include <cppuhelper/typeprovider.hxx>
+#endif
+
+#ifndef _UNO_MAPPING_HXX_
+#include <uno/mapping.hxx>
+#endif
+
+#ifndef _SFXVIEWSH_HXX
+#include <viewsh.hxx>
+#endif
+
+#ifndef _SFXVIEWFRM_HXX
+#include <viewfrm.hxx>
+#endif
+
+#ifndef _SFX_OBJSH_HXX
+#include <objsh.hxx>
+#endif
+
+#ifndef _SFXAPP_HXX
+#include <app.hxx>
+#endif
+
+#ifndef _SFXMSGPOOL_HXX
+#include <msgpool.hxx>
+#endif
+
+#ifndef _SFXDISPATCH_HXX
+#include <dispatch.hxx>
+#endif
+
+#include <viewimp.hxx>
+#ifndef _SFX_UNOCTITM_HXX
+#include <unoctitm.hxx>
+#endif
+
+#include <vos/mutex.hxx>
+#include <osl/mutex.hxx>
+
+#define OMULTITYPEINTERFACECONTAINERHELPER ::cppu::OMultiTypeInterfaceContainerHelper
+#define XFRAMEACTIONLISTENER ::com::sun::star::frame::XFrameActionListener
+#define FRAMEACTIONEVENT ::com::sun::star::frame::FrameActionEvent
+#define EVENTOBJECT ::com::sun::star::lang::EventObject
+#define OTYPECOLLECTION ::cppu::OTypeCollection
+#define OIMPLEMENTATIONID ::cppu::OImplementationId
+#define MUTEXGUARD ::osl::MutexGuard
+#define UNOQUERY ::com::sun::star::uno::UNO_QUERY
+#define MAPPING ::com::sun::star::uno::Mapping
+#define XINTERFACE ::com::sun::star::uno::XInterface
+
+//________________________________________________________________________________________________________
+//________________________________________________________________________________________________________
+// declaration IMPL_SfxBaseController_ListenerHelper
+//________________________________________________________________________________________________________
+
+class IMPL_SfxBaseController_ListenerHelper : public ::cppu::WeakImplHelper1< ::com::sun::star::frame::XFrameActionListener >
+{
+public:
+ IMPL_SfxBaseController_ListenerHelper( MUTEX& aMutex ,
+ SfxBaseController* pController ) ;
+ virtual ~IMPL_SfxBaseController_ListenerHelper() ;
+ virtual void SAL_CALL frameAction( const FRAMEACTIONEVENT& aEvent ) throw (RUNTIMEEXCEPTION) ;
+ virtual void SAL_CALL disposing( const EVENTOBJECT& aEvent ) throw (RUNTIMEEXCEPTION) ;
+
+private:
+
+ MUTEX& m_aMutex ;
+ SfxBaseController* m_pController ;
+
+} ; // class IMPL_SfxBaseController_ListenerContainer
+
+//________________________________________________________________________________________________________
+// declaration IMPL_SfxBaseController_DataContainer
+//________________________________________________________________________________________________________
+
+struct IMPL_SfxBaseController_DataContainer
+{
+ REFERENCE < XFRAME > m_xFrame;
+ REFERENCE < XFRAMEACTIONLISTENER > m_xListener ;
+ OMULTITYPEINTERFACECONTAINERHELPER m_aListenerContainer ;
+ SfxViewShell* m_pViewShell ;
+ SfxBaseController* m_pController ;
+ sal_Bool m_bDisposing ;
+
+ IMPL_SfxBaseController_DataContainer( MUTEX& aMutex ,
+ SfxViewShell* pViewShell ,
+ SfxBaseController* pController )
+ : m_xListener ( new IMPL_SfxBaseController_ListenerHelper( aMutex, pController ) )
+ , m_aListenerContainer ( aMutex )
+ , m_pViewShell ( pViewShell )
+ , m_pController ( pController )
+ , m_bDisposing ( sal_False )
+ {
+ }
+
+} ; // struct IMPL_SfxBaseController_DataContainer
+
+//________________________________________________________________________________________________________
+// IMPL_SfxBaseController_ListenerHelper constructor
+//________________________________________________________________________________________________________
+
+IMPL_SfxBaseController_ListenerHelper::IMPL_SfxBaseController_ListenerHelper( MUTEX& aMutex ,
+ SfxBaseController* pController )
+ : m_aMutex ( aMutex )
+ , m_pController ( pController )
+{
+}
+
+//________________________________________________________________________________________________________
+// IMPL_SfxBaseController_ListenerHelper destructor
+//________________________________________________________________________________________________________
+
+IMPL_SfxBaseController_ListenerHelper::~IMPL_SfxBaseController_ListenerHelper()
+{
+}
+
+void SAL_CALL IMPL_SfxBaseController_ListenerHelper::frameAction( const FRAMEACTIONEVENT& aEvent ) throw( RUNTIMEEXCEPTION )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ if (
+ ( m_pController != NULL ) &&
+ ( aEvent.Frame == m_pController->getFrame() ) &&
+ ( aEvent.Action == ::com::sun::star::frame::FrameAction_FRAME_ACTIVATED ) &&
+ ( m_pController->GetViewShell_Impl() && m_pController->GetViewShell_Impl()->GetWindow() != NULL )
+ )
+ {
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ m_pController->GetViewShell_Impl()->GetViewFrame()->MakeActive_Impl( FALSE );
+ }
+}
+
+//________________________________________________________________________________________________________
+// IMPL_SfxBaseController_ListenerHelper -> XEventListener
+//________________________________________________________________________________________________________
+
+void SAL_CALL IMPL_SfxBaseController_ListenerHelper::disposing( const EVENTOBJECT& aEvent ) throw( ::com::sun::star::uno::RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ if ( m_pController )
+ m_pController->getFrame()->removeFrameActionListener( this ) ;
+}
+
+//________________________________________________________________________________________________________
+// SfxBaseController -> constructor
+//________________________________________________________________________________________________________
+
+SfxBaseController::SfxBaseController( SfxViewShell* pViewShell )
+ : IMPL_SfxBaseController_MutexContainer ( )
+ , m_pData ( new IMPL_SfxBaseController_DataContainer( m_aMutex, pViewShell, this ))
+{
+ m_pData->m_pViewShell->SetController( this );
+}
+
+//________________________________________________________________________________________________________
+// SfxBaseController -> destructor
+//________________________________________________________________________________________________________
+
+SfxBaseController::~SfxBaseController()
+{
+}
+
+//________________________________________________________________________________________________________
+// SfxBaseController -> XInterface
+//________________________________________________________________________________________________________
+ANY SAL_CALL SfxBaseController::queryInterface( const UNOTYPE& rType ) throw( RUNTIMEEXCEPTION )
+{
+ // Attention:
+ // Don't use mutex or guard in this method!!! Is a method of XInterface.
+
+ // Ask for my own supported interfaces ...
+ ANY aReturn( ::cppu::queryInterface( rType ,
+ static_cast< XTYPEPROVIDER* > ( this ) ,
+ static_cast< XCONTROLLER* > ( this ) ,
+ static_cast< XDISPATCHPROVIDER* > ( this ) ) ) ;
+
+ // If searched interface supported by this class ...
+ if ( aReturn.hasValue() == sal_True )
+ {
+ // ... return this information.
+ return aReturn ;
+ }
+ else
+ {
+ // Else; ... ask baseclass for interfaces!
+ return OWeakObject::queryInterface( rType ) ;
+ }
+}
+
+//________________________________________________________________________________________________________
+// SfxBaseController -> XInterface
+//________________________________________________________________________________________________________
+
+void SAL_CALL SfxBaseController::acquire() throw( RUNTIMEEXCEPTION )
+{
+ // Attention:
+ // Don't use mutex or guard in this method!!! Is a method of XInterface.
+
+ // Forward to baseclass
+ OWeakObject::acquire() ;
+}
+
+//________________________________________________________________________________________________________
+// SfxBaseController -> XInterface
+//________________________________________________________________________________________________________
+
+void SAL_CALL SfxBaseController::release() throw( RUNTIMEEXCEPTION )
+{
+ // Attention:
+ // Don't use mutex or guard in this method!!! Is a method of XInterface.
+
+ // Forward to baseclass
+ OWeakObject::release() ;
+}
+
+//________________________________________________________________________________________________________
+// SfxBaseController -> XTypeProvider
+//________________________________________________________________________________________________________
+
+SEQUENCE< UNOTYPE > SAL_CALL SfxBaseController::getTypes() throw( RUNTIMEEXCEPTION )
+{
+ // Optimize this method !
+ // We initialize a static variable only one time. And we don't must use a mutex at every call!
+ // For the first call; pTypeCollection is NULL - for the second call pTypeCollection is different from NULL!
+ static OTYPECOLLECTION* pTypeCollection = NULL ;
+
+ if ( pTypeCollection == NULL )
+ {
+ // Ready for multithreading; get global mutex for first call of this method only! see before
+ MUTEXGUARD aGuard( MUTEX::getGlobalMutex() ) ;
+
+ // Control these pointer again ... it can be, that another instance will be faster then these!
+ if ( pTypeCollection == NULL )
+ {
+ // Create a static typecollection ...
+ static OTYPECOLLECTION aTypeCollection( ::getCppuType(( const REFERENCE< XTYPEPROVIDER >*)NULL ) ,
+ ::getCppuType(( const REFERENCE< XCONTROLLER >*)NULL ) ,
+ ::getCppuType(( const REFERENCE< XDISPATCHPROVIDER >*)NULL ) ) ;
+ // ... and set his address to static pointer!
+ pTypeCollection = &aTypeCollection ;
+ }
+ }
+
+ return pTypeCollection->getTypes() ;
+}
+
+//________________________________________________________________________________________________________
+// SfxBaseController -> XTypeProvider
+//________________________________________________________________________________________________________
+
+SEQUENCE< sal_Int8 > SAL_CALL SfxBaseController::getImplementationId() throw( RUNTIMEEXCEPTION )
+{
+ // Create one Id for all instances of this class.
+ // Use ethernet address to do this! (sal_True)
+
+ // Optimize this method
+ // We initialize a static variable only one time. And we don't must use a mutex at every call!
+ // For the first call; pID is NULL - for the second call pID is different from NULL!
+ static OIMPLEMENTATIONID* pID = NULL ;
+
+ if ( pID == NULL )
+ {
+ // Ready for multithreading; get global mutex for first call of this method only! see before
+ MUTEXGUARD aGuard( MUTEX::getGlobalMutex() ) ;
+
+ // Control these pointer again ... it can be, that another instance will be faster then these!
+ if ( pID == NULL )
+ {
+ // Create a new static ID ...
+ static OIMPLEMENTATIONID aID( sal_False ) ;
+ // ... and set his address to static pointer!
+ pID = &aID ;
+ }
+ }
+
+ return pID->getImplementationId() ;
+}
+
+//________________________________________________________________________________________________________
+// SfxBaseController -> XController
+//________________________________________________________________________________________________________
+
+void SAL_CALL SfxBaseController::attachFrame( const REFERENCE< XFRAME >& xFrame ) throw( ::com::sun::star::uno::RuntimeException )
+{
+ REFERENCE< XFRAME > xTemp( getFrame() ) ;
+
+ ::osl::MutexGuard aGuard( m_aMutex );
+ if ( xTemp.is() )
+ xTemp->removeFrameActionListener( m_pData->m_xListener ) ;
+
+ m_pData->m_xFrame = xFrame;
+
+ if ( xFrame.is() )
+ xFrame->addFrameActionListener( m_pData->m_xListener ) ;
+}
+
+//________________________________________________________________________________________________________
+// SfxBaseController -> XController
+//________________________________________________________________________________________________________
+
+sal_Bool SAL_CALL SfxBaseController::attachModel( const REFERENCE< XMODEL >& xModel ) throw( ::com::sun::star::uno::RuntimeException )
+{
+ return sal_False ;
+}
+
+//________________________________________________________________________________________________________
+// SfxBaseController -> XController
+//________________________________________________________________________________________________________
+
+sal_Bool SAL_CALL SfxBaseController::suspend( sal_Bool bSuspend ) throw( ::com::sun::star::uno::RuntimeException )
+{
+ if ( bSuspend == sal_True )
+ {
+ ::osl::MutexGuard aMutexGuard( m_aMutex );
+ if ( !m_pData->m_pViewShell )
+ return sal_True;
+
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ if ( m_pData->m_pViewShell->PrepareClose() )
+ {
+ getFrame()->removeFrameActionListener( m_pData->m_xListener ) ;
+ SfxViewFrame* pActFrame = m_pData->m_pViewShell->GetFrame() ;
+
+ // weitere View auf dasselbe Doc?
+ SfxObjectShell* pDocShell = m_pData->m_pViewShell->GetObjectShell() ;
+ sal_Bool bOther = sal_False ;
+
+ for ( const SfxViewFrame* pFrame = SfxViewFrame::GetFirst( pDocShell ); !bOther && pFrame; pFrame = SfxViewFrame::GetNext( *pFrame, pDocShell ) )
+ {
+ bOther = (pFrame != pActFrame);
+ }
+
+ // Doc braucht nur gefragt zu werden, wenn keine weitere ::com::sun::star::sdbcx::View
+ return ( bOther || pDocShell->PrepareClose() ) ;
+ }
+ else
+ {
+ return sal_False ;
+ }
+ }
+ else
+ {
+ getFrame()->addFrameActionListener( m_pData->m_xListener ) ;
+ return sal_True ;
+ }
+}
+
+//________________________________________________________________________________________________________
+// SfxBaseController -> XController
+//________________________________________________________________________________________________________
+
+ANY SfxBaseController::getViewData() throw( ::com::sun::star::uno::RuntimeException )
+{
+ ANY aAny;
+ String sData1;
+ ::osl::MutexGuard aGuard( m_aMutex );
+ if ( m_pData->m_pViewShell )
+ {
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ m_pData->m_pViewShell->WriteUserData( sData1 ) ;
+ OUSTRING sData( sData1 );
+ aAny <<= sData ;
+ }
+
+ return aAny ;
+}
+
+//________________________________________________________________________________________________________
+// SfxBaseController -> XController
+//________________________________________________________________________________________________________
+
+void SAL_CALL SfxBaseController::restoreViewData( const ANY& aValue ) throw( ::com::sun::star::uno::RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ if ( m_pData->m_pViewShell )
+ {
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ OUSTRING sData;
+ aValue >>= sData ;
+ m_pData->m_pViewShell->ReadUserData( sData ) ;
+ }
+}
+
+//________________________________________________________________________________________________________
+// SfxBaseController -> XController
+//________________________________________________________________________________________________________
+
+REFERENCE< XFRAME > SAL_CALL SfxBaseController::getFrame() throw( ::com::sun::star::uno::RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ return m_pData->m_xFrame;
+}
+
+//________________________________________________________________________________________________________
+// SfxBaseController -> XController
+//________________________________________________________________________________________________________
+
+REFERENCE< XMODEL > SAL_CALL SfxBaseController::getModel() throw( ::com::sun::star::uno::RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ return m_pData->m_pViewShell ? m_pData->m_pViewShell->GetObjectShell()->GetModel() : REFERENCE < XMODEL > () ;
+}
+
+//________________________________________________________________________________________________________
+// SfxBaseController -> XDispatchProvider
+//________________________________________________________________________________________________________
+
+REFERENCE< XDISPATCH > SAL_CALL SfxBaseController::queryDispatch( const UNOURL& aURL ,
+ const OUSTRING& sTargetFrameName,
+ sal_Int32 eSearchFlags ) throw( RUNTIMEEXCEPTION )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ REFERENCE< XDISPATCH > xDisp;
+ if ( m_pData->m_pViewShell )
+ {
+ SfxViewFrame* pAct = m_pData->m_pViewShell->GetViewFrame() ;
+ if ( !m_pData->m_bDisposing )
+ {
+ sal_uInt16 nId = 0;
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ if ( aURL.Protocol.compareToAscii( ".uno:" ) == COMPARE_EQUAL )
+ {
+ SfxSlotPool& rPool = SFX_APP()->GetSlotPool( pAct );
+ const SfxSlot* pSlot = rPool.GetUnoSlot( aURL.Path );
+ if ( pSlot )
+ nId = pSlot->GetSlotId();
+ }
+ else if ( aURL.Protocol.compareToAscii( "slot:" ) == COMPARE_EQUAL )
+ {
+ nId = aURL.Path.toInt32();
+ }
+
+ if ( nId && pAct->GetDispatcher()->HasSlot_Impl( nId ) )
+ xDisp = new SfxOfficeDispatch( pAct->GetBindings(), pAct->GetDispatcher(), nId, aURL) ;
+ }
+ }
+
+ return xDisp;
+}
+
+//________________________________________________________________________________________________________
+// SfxBaseController -> XDispatchProvider
+//________________________________________________________________________________________________________
+
+SEQUENCE< REFERENCE< XDISPATCH > > SAL_CALL SfxBaseController::queryDispatches( const SEQUENCE< DISPATCHDESCRIPTOR >& seqDescripts ) throw( ::com::sun::star::uno::RuntimeException )
+{
+ return SEQUENCE< REFERENCE< XDISPATCH > >() ;
+}
+
+//________________________________________________________________________________________________________
+// SfxBaseController -> XComponent
+//________________________________________________________________________________________________________
+
+void SAL_CALL SfxBaseController::dispose() throw( ::com::sun::star::uno::RuntimeException )
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ REFERENCE < XCONTROLLER > xTmp( this );
+ m_pData->m_bDisposing = sal_True ;
+
+ EVENTOBJECT aObject ;
+ aObject.Source = (XCONTROLLER*)this ;
+ m_pData->m_aListenerContainer.disposeAndClear( aObject ) ;
+
+ if ( m_pData->m_pController )
+ m_pData->m_pController->getFrame()->removeFrameActionListener( m_pData->m_xListener ) ;
+
+ if ( m_pData->m_pViewShell )
+ {
+ SfxViewFrame* pFrame = m_pData->m_pViewShell->GetViewFrame() ;
+ m_pData->m_pViewShell->pImp->bControllerSet = sal_False ;
+ if ( pFrame )
+ {
+ EVENTOBJECT aObject;
+ aObject.Source = (OWEAKOBJECT*)this ;
+
+ // Bei Reload hat die alte ViewShell keinen Frame!
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ SfxObjectShell* pDoc = pFrame->GetObjectShell() ;
+ REFERENCE< XMODEL > xModel = pDoc->GetModel();
+ if ( xModel.is() )
+ {
+ REFERENCE< XEVENTLISTENER > xRef( xModel, UNOQUERY );
+ if ( xRef.is() )
+ xRef->disposing( aObject );
+ }
+
+ m_pData->m_xListener->disposing( aObject );
+ SfxViewShell *pShell = m_pData->m_pViewShell;
+ m_pData->m_pViewShell = NULL;
+ if ( pFrame->GetViewShell() == pShell )
+ {
+ pFrame->GetFrame()->SetFrameInterface_Impl( REFERENCE < XFRAME >() );
+ pFrame->GetFrame()->DoClose();
+ }
+ }
+ }
+}
+
+//________________________________________________________________________________________________________
+// SfxBaseController -> XComponent
+//________________________________________________________________________________________________________
+
+void SAL_CALL SfxBaseController::addEventListener( const REFERENCE< XEVENTLISTENER >& aListener ) throw( ::com::sun::star::uno::RuntimeException )
+{
+ m_pData->m_aListenerContainer.addInterface( ::getCppuType((const REFERENCE< XEVENTLISTENER >*)0), aListener );
+}
+
+//________________________________________________________________________________________________________
+// SfxBaseController -> XComponent
+//________________________________________________________________________________________________________
+
+void SAL_CALL SfxBaseController::removeEventListener( const REFERENCE< XEVENTLISTENER >& aListener ) throw( ::com::sun::star::uno::RuntimeException )
+{
+ m_pData->m_aListenerContainer.removeInterface( ::getCppuType((const REFERENCE< XEVENTLISTENER >*)0), aListener );
+}
+
+void SfxBaseController::ReleaseShell_Impl()
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ m_pData->m_pViewShell = 0;
+}
+
+SfxViewShell* SfxBaseController::GetViewShell_Impl() const
+{
+ return m_pData->m_pViewShell;
+}
diff --git a/sfx2/source/view/topfrm.cxx b/sfx2/source/view/topfrm.cxx
new file mode 100644
index 000000000000..0def9e864c06
--- /dev/null
+++ b/sfx2/source/view/topfrm.cxx
@@ -0,0 +1,1111 @@
+/*************************************************************************
+ *
+ * $RCSfile: topfrm.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:36 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#pragma hdrstop
+
+#include "topfrm.hxx"
+
+#ifndef _COM_SUN_STAR_UNO_REFERENCE_H_
+#include <com/sun/star/uno/Reference.h>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XFRAME_HPP_
+#include <com/sun/star/frame/XFrame.hpp>
+#endif
+#ifndef _UNOTOOLS_PROCESSFACTORY_HXX
+#include <unotools/processfactory.hxx>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XFRAMESSUPPLIER_HPP_
+#include <com/sun/star/frame/XFramesSupplier.hpp>
+#endif
+#ifndef _TOOLKIT_UNOHLP_HXX
+#include <toolkit/helper/vclunohelper.hxx>
+#endif
+#ifndef _UNO_COM_SUN_STAR_AWT_POSSIZE_HPP_
+#include <com/sun/star/awt/PosSize.hpp>
+#endif
+
+#ifndef _SV_MENU_HXX
+#include <vcl/menu.hxx>
+#endif
+#ifndef _SFXRECTITEM_HXX //autogen
+#include <svtools/rectitem.hxx>
+#endif
+#ifndef _SFXINTITEM_HXX //autogen
+#include <svtools/intitem.hxx>
+#endif
+#ifndef _SFXENUMITEM_HXX //autogen
+#include <svtools/eitem.hxx>
+#endif
+#ifndef _SFXSTRITEM_HXX //autogen
+#include <svtools/stritem.hxx>
+#endif
+#ifndef _IPENV_HXX //autogen
+#include <so3/ipenv.hxx>
+#endif
+#ifndef _SFXECODE_HXX
+#include <svtools/sfxecode.hxx>
+#endif
+#include <vcl/dialog.hxx>
+#include <svtools/urihelper.hxx>
+
+#include "sfx.hrc"
+#include "objsh.hxx"
+#include "docfile.hxx"
+#include "viewsh.hxx"
+#include "bindings.hxx"
+#include "dispatch.hxx"
+#include "request.hxx"
+#include "sfxdir.hxx"
+#include "fsetobsh.hxx"
+#include "objitem.hxx"
+#include "objface.hxx"
+#include "msg.hxx"
+#include "interno.hxx"
+#include "objshimp.hxx"
+#include "workwin.hxx"
+#include "sfxtypes.hxx"
+#include "splitwin.hxx"
+#include "appdata.hxx"
+#include "arrdecl.hxx"
+
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::frame;
+
+//------------------------------------------------------------------------
+
+#define SfxTopViewFrame
+#include "sfxslots.hxx"
+
+DBG_NAME(SfxTopViewFrame);
+
+class SfxAsyncQuit_Impl
+{
+ Timer aTimer;
+ DECL_LINK( TimerHdl, Timer*);
+
+public:
+
+ SfxAsyncQuit_Impl();
+};
+
+SfxAsyncQuit_Impl::SfxAsyncQuit_Impl()
+{
+ aTimer.SetTimeoutHdl( LINK(this, SfxAsyncQuit_Impl, TimerHdl) );
+ aTimer.SetTimeout( 5000 );
+ aTimer.Start();
+}
+
+IMPL_LINK(SfxAsyncQuit_Impl, TimerHdl, Timer*, pTimer)
+{
+ aTimer.Stop();
+ SfxFrameArr_Impl& rArr = *SFX_APP()->Get_Impl()->pTopFrames;
+ if ( !rArr.Count() )
+ SFX_APP()->GetAppDispatcher_Impl()->Execute( SID_QUITAPP, SFX_CALLMODE_ASYNCHRON );
+ delete this;
+ return 0L;
+}
+
+class SfxTopFrame_Impl
+{
+public:
+ Window* pWindow; // maybe external
+ BOOL bHidden;
+ BOOL bLockResize;
+};
+
+class SfxTopWindow_Impl : public Window
+{
+public:
+ SfxTopFrame* pFrame;
+ Dialog* pModalDialog;
+
+ SfxTopWindow_Impl( SfxTopFrame* pF );
+// : Window( pF->pImp->pWindow, WB_CLIPCHILDREN | WB_NODIALOGCONTROL | WB_3DLOOK )
+// , pFrame( pF )
+// , pModalDialog( 0 )
+// { SetBackground(); }
+ ~SfxTopWindow_Impl( );
+
+ virtual void StateChanged( StateChangedType nStateChange );
+ virtual long PreNotify( NotifyEvent& rNEvt );
+ virtual long Notify( NotifyEvent& rEvt );
+ virtual void Resize();
+ virtual void GetFocus();
+ void DoResize();
+};
+
+SfxTopWindow_Impl::SfxTopWindow_Impl( SfxTopFrame* pF )
+ : Window( pF->pImp->pWindow, WB_CLIPCHILDREN | WB_NODIALOGCONTROL | WB_3DLOOK )
+ , pFrame( pF )
+ , pModalDialog( 0 )
+{
+ SetBackground();
+}
+
+SfxTopWindow_Impl::~SfxTopWindow_Impl( )
+{
+}
+
+long SfxTopWindow_Impl::Notify( NotifyEvent& rNEvt )
+{
+ if ( pFrame->IsClosing_Impl() )
+ return sal_False;
+
+ if ( rNEvt.GetType() == EVENT_GETFOCUS )
+ {
+ SfxViewFrame* pView = pFrame->GetCurrentViewFrame();
+ SfxViewFrame* pCurrent = SfxViewFrame::Current();
+ SfxViewFrame* pContainer = pCurrent ? pCurrent->GetParentViewFrame_Impl() : NULL;
+ if ( !pContainer )
+ pContainer = pCurrent;
+ if ( pView && pView != pContainer )
+ pView->MakeActive_Impl( FALSE );
+ return sal_True;
+ }
+
+ if ( rNEvt.GetType() == EVENT_EXECUTEDIALOG )
+ {
+ pModalDialog = (Dialog*) rNEvt.GetWindow();
+ pFrame->GetCurrentViewFrame()->SetModalMode( sal_True );
+ return sal_True;
+ }
+ else if ( rNEvt.GetType() == EVENT_ENDEXECUTEDIALOG )
+ {
+ pModalDialog = NULL;
+ EnableInput( sal_True, sal_True );
+ pFrame->GetCurrentViewFrame()->SetModalMode( sal_False );
+ return sal_True;
+ }
+
+ return Window::Notify( rNEvt );
+}
+
+long SfxTopWindow_Impl::PreNotify( NotifyEvent& rNEvt )
+{
+ if ( rNEvt.GetType() == EVENT_MOUSEBUTTONDOWN )
+ SfxSplitWindow::EndAutoShow_Impl();
+
+ return Window::PreNotify( rNEvt );
+}
+
+void SfxTopWindow_Impl::GetFocus()
+{
+ if ( !pFrame->IsClosing_Impl() && pFrame && pFrame->GetCurrentViewFrame() )
+ pFrame->GetCurrentViewFrame()->MakeActive_Impl( TRUE );
+}
+
+void SfxTopWindow_Impl::Resize()
+{
+ if ( IsReallyVisible() || IsReallyShown() )
+ DoResize();
+}
+
+void SfxTopWindow_Impl::StateChanged( StateChangedType nStateChange )
+{
+ if ( nStateChange == STATE_CHANGE_INITSHOW )
+ {
+ SetSizePixel( GetParent()->GetOutputSizePixel() );
+ DoResize();
+ }
+ else
+ Window::StateChanged( nStateChange );
+}
+
+void SfxTopWindow_Impl::DoResize()
+{
+ if ( !pFrame->pImp->bLockResize )
+ pFrame->Resize();
+}
+
+class SfxTopViewWin_Impl : public Window
+{
+friend class SfxInternalFrame;
+
+ BOOL bActive;
+ SfxTopViewFrame* pFrame;
+
+public:
+ SfxTopViewWin_Impl( SfxTopViewFrame* p,
+ Window *pParent, WinBits nBits=0 ) :
+ Window( pParent, nBits | WB_BORDER | WB_CLIPCHILDREN ),
+ pFrame( p ),
+ bActive( FALSE )
+ {
+// SetBorderStyle( WINDOW_BORDER_NOBORDER );
+ }
+
+ virtual void Resize();
+ virtual void StateChanged( StateChangedType nStateChange );
+};
+
+//--------------------------------------------------------------------
+void SfxTopViewWin_Impl::StateChanged( StateChangedType nStateChange )
+{
+ if ( nStateChange == STATE_CHANGE_INITSHOW )
+ pFrame->Resize();
+ else
+ Window::StateChanged( nStateChange );
+}
+
+void SfxTopViewWin_Impl::Resize()
+{
+ if ( IsReallyVisible() || IsReallyShown() )
+ pFrame->Resize();
+}
+
+class SfxTopViewFrame_Impl
+{
+public:
+ sal_Bool bActive;
+ Window* pWindow;
+
+ SfxTopViewFrame_Impl()
+ : bActive( sal_False )
+ , pWindow( 0 )
+ {}
+};
+
+static AsynchronLink* pPendingCloser = 0;
+
+SfxTopFrame* SfxTopFrame::Create( SfxObjectShell* pDoc, USHORT nViewId, BOOL bHidden, const SfxItemSet* pSet )
+{
+ Reference < XFrame > xDesktop ( ::utl::getProcessServiceFactory()->createInstance( DEFINE_CONST_UNICODE("com.sun.star.frame.Desktop") ), UNO_QUERY );
+ Reference < XFrame > xFrame = xDesktop->findFrame( DEFINE_CONST_UNICODE("_blank"), 0 );
+ SfxTopFrame *pFrame = Create( xFrame );
+ pFrame->pImp->bHidden = bHidden;
+
+ pFrame->SetItemSet_Impl( pSet );
+ if ( pDoc )
+ {
+ if ( nViewId )
+ pDoc->GetMedium()->GetItemSet()->Put( SfxUInt16Item( SID_VIEW_ID, nViewId ) );
+ pFrame->InsertDocument( pDoc );
+ }
+
+ return pFrame;
+}
+
+
+SfxTopFrame* SfxTopFrame::Create( Reference < XFrame > xFrame )
+{
+ // create a new TopFrame to an external XFrame object ( wrap controller )
+ if ( !xFrame.is() )
+ DBG_ERROR( "Wrong parameter!" );
+
+ Window* pWindow = VCLUnoHelper::GetWindow( xFrame->getContainerWindow() );
+ SfxTopFrame* pFrame = new SfxTopFrame( pWindow );
+ pFrame->SetFrameInterface_Impl( xFrame );
+ return pFrame;
+}
+
+SfxTopFrame::SfxTopFrame( Window* pExternal, sal_Bool bHidden )
+ : SfxFrame( NULL )
+ , pWindow( NULL )
+{
+ pImp = new SfxTopFrame_Impl;
+ pImp->bHidden = bHidden;
+ pImp->bLockResize = FALSE;
+ InsertTopFrame_Impl( this );
+ if ( pExternal )
+ {
+ pImp->pWindow = pExternal;
+ }
+ else
+ {
+ DBG_ERROR( "TopFrame without window created!" );
+/*
+ pImp->pWindow = new SfxTopFrameWindow_Impl( this );
+ pImp->pWindow->SetActivateMode( ACTIVATE_MODE_GRABFOCUS );
+ pImp->pWindow->SetPosSizePixel( Point( 20,20 ), Size( 800,600 ) );
+ if ( GetFrameInterface().is() )
+ GetFrameInterface()->initialize( VCLUnoHelper::GetInterface( pImp->pWindow ) );
+ pImp->pWindow->Show();
+ */
+ }
+
+ pWindow = new SfxTopWindow_Impl( this );
+ pWindow->Show();
+}
+
+SfxTopFrame::~SfxTopFrame()
+{
+ RemoveTopFrame_Impl( this );
+ DELETEZ( pWindow );
+
+ SfxFrameArr_Impl& rArr = *SFX_APP()->Get_Impl()->pTopFrames;
+ if ( !rArr.Count() )
+ // don't shutdown immediately because it is possible that opening a new task is underway!
+ new SfxAsyncQuit_Impl();
+ delete pImp;
+}
+
+SystemWindow* SfxTopFrame::GetTopWindow_Impl() const
+{
+ if ( pImp->pWindow->IsSystemWindow() )
+ return (SystemWindow*) pImp->pWindow;
+ else
+ return NULL;
+}
+
+Window& SfxTopFrame::GetWindow() const
+{
+ return *pWindow;
+}
+
+sal_Bool SfxTopFrame::Close()
+{
+ delete this;
+ return sal_True;
+}
+
+void SfxTopFrame::LockResize_Impl( BOOL bLock )
+{
+ pImp->bLockResize = bLock;
+}
+
+void SfxTopFrame::SetMenuBar_Impl( MenuBar *pMenu )
+{
+ SystemWindow *pWin = GetTopWindow_Impl();
+ if ( pWin && pWin->GetMenuBar() != pMenu )
+ {
+//(mba/task): WindowMenu-Hdl fehlt, dito PickMenu-Handling
+ pWin->SetMenuBar( pMenu );
+ }
+}
+
+MenuBar* SfxTopFrame::GetMenuBar_Impl() const
+{
+ SystemWindow *pWin = GetTopWindow_Impl();
+ return pWin ? pWin->GetMenuBar() : NULL;
+}
+
+String SfxTopFrame::GetWindowData()
+{
+ String aActWinData;
+ char cToken = SfxIniManager::GetToken();
+
+ SfxViewFrame *pActFrame = SfxViewFrame::Current();
+ SfxViewFrame *pFrame = GetCurrentViewFrame();
+ const sal_Bool bActWin = ( pActFrame->GetTopViewFrame() == pFrame );
+
+ // ::com::sun::star::sdbcx::User-Daten der ViewShell
+ String aUserData;
+ pFrame->GetViewShell()->WriteUserData(aUserData);
+
+ // assemble ini-data
+ String aWinData;
+ aWinData += String::CreateFromInt32( pFrame->GetCurViewId() );
+ aWinData += cToken;
+
+ aWinData += '1'; // former attribute "isfloating"
+ aWinData += cToken;
+
+ aWinData += SfxIniManager::GetString( pImp->pWindow->GetPosPixel(), pImp->pWindow->GetSizePixel() );
+
+ // aktives kennzeichnen
+ aWinData += cToken;
+ aWinData += bActWin ? '1' : '0';
+
+ aWinData += cToken;
+ aWinData += aUserData;
+
+ return aWinData;
+}
+
+sal_Bool SfxTopFrame::InsertDocument( SfxObjectShell* pDoc )
+/* [Beschreibung]
+ */
+{
+ // Spezielle Bedingungen testen: nicht im ModalMode!
+ if ( !SfxFrame::InsertDocument( pDoc ) )
+ return sal_False;
+
+ SfxObjectShell *pOld = GetCurrentDocument();
+
+ // Position und Groesse testen
+ // Wenn diese schon gesetzt sind, soll offensichtlich nicht noch
+ // LoadWindows_Impl aufgerufen werden ( z.B. weil dieses ein CreateFrame()
+ // an einer Task aufgerufen hat! )
+ const SfxItemSet* pSet = GetItemSet_Impl();
+ if ( !pSet )
+ pSet = pDoc->GetMedium()->GetItemSet();
+ SetItemSet_Impl(0);
+
+ // Position und Gr"o\se
+ SFX_ITEMSET_ARG(
+ pSet, pAreaItem, SfxRectangleItem, SID_VIEW_POS_SIZE, sal_False );
+ // ::com::sun::star::sdbcx::View-Id
+ SFX_ITEMSET_ARG(
+ pSet, pViewIdItem, SfxUInt16Item, SID_VIEW_ID, sal_False );
+ // Zoom
+ SFX_ITEMSET_ARG(
+ pSet, pModeItem, SfxUInt16Item, SID_VIEW_ZOOM_MODE, sal_False );
+ // Hidden
+ SFX_ITEMSET_ARG(
+ pSet, pHidItem, SfxBoolItem, SID_HIDDEN, sal_False);
+ // ViewDaten
+ SFX_ITEMSET_ARG(
+ pSet, pViewDataItem, SfxStringItem, SID_USER_DATA, sal_False );
+
+ if ( pHidItem )
+ pImp->bHidden = pHidItem->GetValue();
+
+ if( !pImp->bHidden )
+ pDoc->OwnerLock( sal_True );
+
+ // Wenn z.B. eine Fenstergr"o\se gesetzt wurde, soll keine Fensterinformation
+ // aus den Dokument geladen werden, z.B. weil InsertDocument seinerseits
+ // aus LoadWindows_Impl aufgerufen wurde!
+ if ( pDoc && !pAreaItem && !pViewIdItem && !pModeItem &&
+ !pImp->bHidden && pDoc->LoadWindows_Impl( this ) )
+ {
+ pDoc->OwnerLock( sal_False );
+ return sal_True;
+ }
+
+ if ( pDoc )
+ {
+ UpdateHistory( pDoc );
+ UpdateDescriptor( pDoc );
+ }
+
+ SfxFrameSetObjectShell *pFDoc = PTR_CAST( SfxFrameSetObjectShell, pDoc );
+ if ( pFDoc )
+ SetFrameType_Impl( GetFrameType() | SFXFRAME_FRAMESET );
+ else
+ SetFrameType_Impl( GetFrameType() & ~SFXFRAME_FRAMESET );
+
+ sal_Bool bBrowsing = sal_True;
+ BOOL bSetFocus = GetWindow().HasChildPathFocus( TRUE );
+ SfxViewFrame *pFrame = GetCurrentViewFrame();
+ if ( pFrame )
+ {
+ sal_Bool bChildActivated = sal_False;
+ if ( pFrame->GetActiveChildFrame_Impl() && pFrame->GetActiveChildFrame_Impl() == SfxViewFrame::Current() )
+ {
+// ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFramesSupplier > xFrames( GetFrameInterface(), ::com::sun::star::uno::UNO_QUERY );
+// if ( xFrames.is() )
+// xFrames->setActiveFrame( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > () );
+ pFrame->SetActiveChildFrame_Impl(0);
+ SFX_APP()->SetViewFrame( pFrame );
+ bChildActivated = sal_True;
+ }
+
+ if ( pFrame->GetObjectShell() )
+ pFrame->ReleaseObjectShell_Impl( sal_False );
+ if ( pViewIdItem )
+ pFrame->SetViewData_Impl( pViewIdItem->GetValue(), String() );
+ if ( pDoc )
+ pFrame->SetObjectShell_Impl( *pDoc );
+ }
+ else
+ {
+ bBrowsing = sal_False;
+ pFrame = new SfxTopViewFrame( this, pDoc, pViewIdItem ? pViewIdItem->GetValue() : 0 );
+ }
+
+ if ( pViewDataItem )
+ {
+ if ( pDoc->Get_Impl()->nLoadedFlags & SFX_LOADED_MAINDOCUMENT )
+ pFrame->GetViewShell()->ReadUserData( pViewDataItem->GetValue(), sal_True );
+ else
+ {
+ // Daten setzen, die in FinishedLoading ausgewertet werden
+ MarkData_Impl*& rpMark = pDoc->Get_Impl()->pMarkData;
+ if (!rpMark)
+ rpMark = new MarkData_Impl;
+ rpMark->pFrame = pFrame;
+ rpMark->aUserData = pViewDataItem->GetValue();
+ }
+ }
+
+ // Position und Groesse setzen
+ sal_uInt16 nWinMode = pModeItem ? pModeItem->GetValue() : 1;
+ if ( pAreaItem && !pOld )
+ {
+ Window *pWin = pImp->pWindow;
+
+ // Groesse setzen
+ const Rectangle aWinRect( pAreaItem->GetValue() );
+ const Size aAppWindow( pImp->pWindow->GetDesktopRectPixel().GetSize() );
+ Point aPos( aWinRect.TopLeft() );
+ Size aSz(aWinRect.GetSize());
+ if ( aSz.Width() && aSz.Height() )
+ {
+ aPos.X() = Min(aPos.X(),
+ long(aAppWindow.Width() - aSz.Width() + aSz.Width() / 2) );
+ aPos.Y() = Min(aPos.Y(),
+ long( aAppWindow.Height() - aSz.Height() + aSz.Height() / 2) );
+ if ( aPos.X() + aSz.Width() <
+ aAppWindow.Width() + aSz.Width() / 2 &&
+ aPos.Y() + aSz.Height() <
+ aAppWindow.Height() + aSz.Height() / 2 )
+ {
+ pWin->SetPosPixel( aPos );
+ pWin->SetOutputSizePixel( aSz );
+ }
+ }
+ }
+
+ if ( !pImp->bHidden )
+ {
+ pFrame->Show();
+ GetWindow().Show();
+ pFrame->MakeActive_Impl( TRUE );
+ pDoc->OwnerLock( sal_False );
+ GetFrameInterface()->getContainerWindow()->setVisible( sal_True );
+ if( GetTopWindow_Impl()->HasFocus() )
+ pFrame->MakeActive_Impl( TRUE );
+ }
+
+ if ( bSetFocus )
+ // if the old component had the focus when it was destroyed, the focus has been transferred to
+ // the ViewFrameWindow
+ GrabFocusOnComponent_Impl();
+
+ // Jetzt UpdateTitle, hidden TopFrames haben sonst keinen Namen!
+ pFrame->UpdateTitle();
+ return sal_True;
+}
+
+
+//========================================================================
+
+long SfxViewFrameClose_Impl( void* pObj, void* pArg )
+{
+ ((SfxViewFrame*)pArg)->GetFrame()->DoClose();
+ return 0;
+}
+
+TYPEINIT1(SfxTopViewFrame, SfxViewFrame);
+
+//--------------------------------------------------------------------
+SFX_IMPL_INTERFACE(SfxTopViewFrame,SfxViewFrame,ResId(0,0))
+{
+}
+
+//--------------------------------------------------------------------
+String SfxTopViewFrame::UpdateTitle()
+
+/* [Beschreibung]
+
+ Mit dieser Methode kann der SfxTopViewFrame gezwungen werden, sich sofort
+ den neuen Titel vom der <SfxObjectShell> zu besorgen.
+
+ [Anmerkung]
+
+ Dies ist z.B. dann notwendig, wenn man der SfxObjectShell als SfxListener
+ zuh"ort und dort auf den <SfxSimpleHint> SFX_HINT_TITLECHANGED reagieren
+ m"ochte, um dann die Titel seiner Views abzufragen. Diese Views (SfxTopViewFrames)
+ jedoch sind ebenfalls SfxListener und da die Reihenfolge der Benachrichtigung
+ nicht feststeht, mu\s deren Titel-Update vorab erzwungen werden.
+
+
+ [Beispiel]
+
+ void SwDocShell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
+ {
+ if ( rHint.IsA(TYPE(SfxSimpleHint)) )
+ {
+ switch( ( (SfxSimpleHint&) rHint ).GetId() )
+ {
+ case SFX_HINT_TITLECHANGED:
+ for ( SfxTopViewFrame *pTop = (SfxTopViewFrame*)
+ SfxViewFrame::GetFirst(this, TYPE(SfxTopViewFrame));
+ pTop;
+ pTop = (SfxTopViewFrame*)
+ SfxViewFrame::GetNext(this, TYPE(SfxTopViewFrame));
+ {
+ pTop->UpdateTitle();
+ ... pTop->GetName() ...
+ }
+ break;
+ ...
+ }
+ }
+ }
+*/
+
+{
+ DBG_CHKTHIS(SfxTopViewFrame, 0);
+
+ String aTitle = SfxViewFrame::UpdateTitle();
+ aTitle += String::CreateFromAscii( " - " );
+ aTitle += Application::GetDisplayName();
+
+ if ( GetFrame()->GetWindow().GetText() != aTitle )
+ {
+ GetFrame()->GetWindow().SetText( aTitle );
+ if ( GetTopFrame_Impl()->GetTopWindow_Impl() )
+ GetTopFrame_Impl()->GetTopWindow_Impl()->SetText( aTitle );
+ }
+
+ return aTitle;
+}
+
+//--------------------------------------------------------------------
+void SfxTopViewFrame::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
+{
+ {DBG_CHKTHIS(SfxTopViewFrame, 0);}
+
+ if( IsDowning_Impl())
+ return;
+ // we know only SimpleHints
+ if ( rHint.IsA(TYPE(SfxSimpleHint)) )
+ {
+ switch( ( (SfxSimpleHint&) rHint ).GetId() )
+ {
+ case SFX_HINT_MODECHANGED:
+ case SFX_HINT_TITLECHANGED:
+ // when the document changes its title, change views too
+ UpdateTitle();
+ break;
+
+ case SFX_HINT_DYING:
+ // on all other changes force repaint
+ GetFrame()->DoClose();
+ return;
+ break;
+
+ }
+ }
+
+ SfxViewFrame::SFX_NOTIFY( rBC, rBCType, rHint, rHintType );
+}
+
+//--------------------------------------------------------------------
+sal_Bool SfxTopViewFrame::Close()
+{
+ {DBG_CHKTHIS(SfxTopViewFrame, 0);}
+
+ // Modaler Dialog oben ??
+// if ( pImp->GetModalDialog() )
+// return sal_False;
+
+ // eigentliches Schlie\sen
+ if ( SfxViewFrame::Close() )
+ {
+ SfxApplication *pSfxApp = SFX_APP();
+ if (pSfxApp->GetViewFrame() == this)
+ pSfxApp->SetViewFrame(0);
+
+ // Da der Dispatcher leer ger"aumt wird, kann man ihn auch nicht mehr
+ // vern"unftig verwenden - also besser still legen
+ GetDispatcher()->Lock(sal_True);
+ delete this;
+ return sal_True;
+ }
+
+ return sal_False;
+}
+
+SfxTopViewFrame::SfxTopViewFrame
+(
+ SfxFrame* pFrame,
+ SfxObjectShell* pObjShell,
+ sal_uInt16 nViewId
+)
+
+/* [Beschreibung]
+
+ Ctor des SfxTopViewFrame f"ur eine <SfxObjectShell> aus der Ressource.
+ Die 'nViewId' der zu erzeugenden <SfxViewShell> kann angegeben werden
+ (default ist die zuerst registrierte SfxViewShell-Subklasse).
+*/
+
+ : SfxViewFrame( *(new SfxBindings), pFrame, pObjShell, SFXFRAME_HASTITLE )
+{
+ DBG_CTOR(SfxTopViewFrame, 0);
+
+ pCloser = 0;
+ pImp = new SfxTopViewFrame_Impl;
+
+//(mba)/task if ( !pFrame->GetTask() )
+ {
+ pImp->pWindow = new SfxTopViewWin_Impl( this, &pFrame->GetWindow() );
+ pImp->pWindow->SetSizePixel( pFrame->GetWindow().GetOutputSizePixel() );
+ SetWindow_Impl( pImp->pWindow );
+ pFrame->SetOwnsBindings_Impl( sal_True );
+ pFrame->CreateWorkWindow_Impl();
+ }
+
+ sal_uInt32 nType = SFXFRAME_OWNSDOCUMENT | SFXFRAME_HASTITLE;
+ if ( pObjShell && pObjShell->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED )
+ nType |= SFXFRAME_EXTERNAL;
+ GetFrame()->SetFrameType_Impl( GetFrame()->GetFrameType() | nType );
+
+ // ViewShell erzeugen
+ if ( pObjShell )
+ SwitchToViewShell_Impl( nViewId );
+
+ // initiale Gr"o\se festlegen
+ if ( GetViewShell()->UseObjectSize() )
+ {
+ // Zuerst die logischen Koordinaten von IP-Objekt und EditWindow
+ // ber"ucksichtigen
+ SfxInPlaceObject *pIPObj = GetObjectShell()->GetInPlaceObject();
+ DBG_ASSERT( pIPObj, "UseObjectSize aber kein IP-Object" );
+ Window *pWindow = GetViewShell()->GetWindow();
+
+ // Da in den Applikationen bei der R"ucktransformation immer die
+ // Eckpunkte tranformiert werden und nicht die Size (um die Ecken
+ // alignen zu k"onnen), transformieren wir hier auch die Punkte, um
+ // m"oglichst wenig Rundungsfehler zu erhalten.
+ /*
+ Rectangle aRect = pWindow->LogicToLogic( pIPObj->GetVisArea(),
+ pIPObj->GetMapUnit(),
+ pWindow->GetMapMode() );
+ aRect = pWindow->LogicToPixel( aRect );
+ */
+ Rectangle aRect = pWindow->LogicToPixel( pIPObj->GetVisArea() );
+ Size aSize = aRect.GetSize();
+ GetViewShell()->GetWindow()->SetSizePixel( aSize );
+ DoAdjustPosSizePixel(GetViewShell(), Point(), aSize );
+ }
+}
+
+//------------------------------------------------------------------------
+SfxTopViewFrame::~SfxTopViewFrame()
+{
+ DBG_DTOR(SfxTopViewFrame, 0);
+
+ SetDowning_Impl();
+
+ SfxApplication *pApp = SFX_APP();
+ if ( pApp->GetViewFrame() == this )
+ pApp->SetViewFrame(NULL);
+
+ ReleaseObjectShell_Impl();
+ if ( pPendingCloser == pCloser )
+ pPendingCloser = 0;
+ delete pCloser;
+ if ( GetFrame()->OwnsBindings_Impl() )
+ // Die Bindings l"oscht der Frame!
+ KillDispatcher_Impl();
+
+ delete pImp->pWindow;
+ delete pImp;
+}
+
+//------------------------------------------------------------------------
+void SfxTopViewFrame::InvalidateBorderImpl
+(
+ const SfxViewShell*
+)
+{
+ if ( GetViewShell() && GetWindow().IsVisible() )
+ {
+ if ( GetViewShell()->UseObjectSize() )
+ {
+ // Zun"achst die Gr"o\se des MDI-Fensters berechnen
+
+ DoAdjustPosSizePixel( GetViewShell(), Point(),
+ GetViewShell()->GetWindow()->GetSizePixel() );
+
+ // Da nach einem InnerResize die Position des EditFensters und
+ // damit auch der Tools nocht stimmt, mu\s nun noch einmal von
+ // au\sen resized werden !
+
+ ForceOuterResize_Impl(sal_True);
+ }
+
+ DoAdjustPosSizePixel( (SfxViewShell *) GetViewShell(), Point(),
+ GetWindow().GetOutputSizePixel() );
+ if ( GetViewShell()->UseObjectSize() )
+ ForceOuterResize_Impl(sal_False);
+ }
+}
+
+//------------------------------------------------------------------------
+sal_Bool SfxTopViewFrame::SetBorderPixelImpl( const SfxViewShell *pVSh, const SvBorder &rBorder )
+{
+ if( SfxViewFrame::SetBorderPixelImpl( GetViewShell(), rBorder ) )
+ {
+ if ( IsResizeInToOut_Impl() )
+ {
+ Size aSize = pVSh->GetWindow()->GetOutputSizePixel();
+ aSize.Width() += rBorder.Left() + rBorder.Right();
+ aSize.Height() += rBorder.Top() + rBorder.Bottom();
+ GetWindow().SetOutputSizePixel( aSize );
+ }
+ else
+ {
+ Point aPoint;
+ Rectangle aEditArea( aPoint, GetWindow().GetOutputSizePixel() );
+ aEditArea.Left() += rBorder.Left();
+ aEditArea.Right() -= rBorder.Right();
+ aEditArea.Top() += rBorder.Top();
+ aEditArea.Bottom() -= rBorder.Bottom();
+ pVSh->GetWindow()->SetPosSizePixel( aEditArea.TopLeft(), aEditArea.GetSize() );
+ }
+ return sal_True;
+
+ }
+ return sal_False;
+}
+
+void SfxTopViewFrame::Exec_Impl(SfxRequest &rReq )
+{
+ // Wenn gerade die Shells ausgetauscht werden...
+ if ( !GetObjectShell() || !GetViewShell() )
+ return;
+
+ switch ( rReq.GetSlot() )
+ {
+ case SID_ACTIVATE:
+ {
+ MakeActive_Impl( TRUE );
+ rReq.SetReturnValue( SfxObjectItem( 0, this ) );
+ break;
+ }
+
+ case SID_OPTIMIZEWIN:
+ case SID_WIN_MINIMIZED:
+ case SID_RESTOREWIN:
+ case SID_WIN_MAXIMIZED:
+ case SID_WIN_POSSIZE:
+ break;
+
+ case SID_CLOSEWIN:
+ {
+ if ( GetViewShell()->PrepareClose() )
+ {
+ // weitere ::com::sun::star::sdbcx::View auf dasselbe Doc?
+ SfxObjectShell *pDocSh = GetObjectShell();
+ int bOther = sal_False;
+ for ( const SfxTopViewFrame *pFrame =
+ (SfxTopViewFrame *)SfxViewFrame::GetFirst( pDocSh, TYPE(SfxTopViewFrame) );
+ !bOther && pFrame;
+ pFrame = (SfxTopViewFrame *)SfxViewFrame::GetNext( *pFrame, pDocSh, TYPE(SfxTopViewFrame) ) )
+ bOther = (pFrame != this);
+
+ // Doc braucht nur gefragt zu werden, wenn keine weitere ::com::sun::star::sdbcx::View
+ sal_Bool bClosed = sal_False;
+ if ( ( bOther || pDocSh->PrepareClose() ) )
+ {
+ rReq.Done(); // unbedingt vor Close() rufen!
+ if ( rReq.IsAPI() )
+ {
+ if( !pCloser )
+ {
+ if ( pPendingCloser )
+ pPendingCloser->ForcePendingCall();
+ pCloser = new AsynchronLink(
+ Link( 0, SfxViewFrameClose_Impl ) );
+ pCloser->Call( this );
+ pPendingCloser = pCloser;
+ }
+ bClosed = sal_True;
+ }
+ else
+ bClosed = GetFrame()->DoClose();
+ }
+
+ rReq.SetReturnValue( SfxBoolItem( rReq.GetSlot(), bClosed ));
+ }
+ return;
+ }
+ }
+
+ rReq.Done();
+}
+
+void SfxTopViewFrame::GetState_Impl( SfxItemSet &rSet )
+{
+ SfxObjectShell *pDocSh = GetObjectShell();
+
+ if ( !pDocSh )
+ return;
+
+ const sal_uInt16 *pRanges = rSet.GetRanges();
+ DBG_ASSERT(pRanges, "Set ohne Bereich");
+ while ( *pRanges )
+ {
+ for ( sal_uInt16 nWhich = *pRanges++; nWhich <= *pRanges; ++nWhich )
+ {
+ switch(nWhich)
+ {
+ case SID_OPTIMIZEWIN:
+ case SID_NEWWINDOW:
+ rSet.DisableItem(nWhich);
+ break;
+
+ case SID_CLOSEWIN:
+ break;
+
+ case SID_RESTOREWIN:
+ rSet.DisableItem(nWhich);
+ break;
+
+ case SID_WIN_MINIMIZED:
+ rSet.DisableItem( nWhich );
+ break;
+
+ case SID_WIN_MAXIMIZED:
+ rSet.DisableItem( nWhich );
+ break;
+
+ case SID_WIN_POSSIZE:
+ {
+ rSet.Put( SfxRectangleItem( nWhich, Rectangle(
+ GetWindow().GetPosPixel(), GetWindow().GetSizePixel() ) ) );
+ break;
+ }
+
+ default:
+ DBG_ERROR( "invalid message-id" );
+ }
+ }
+ ++pRanges;
+ }
+}
+
+void SfxTopViewFrame::INetExecute_Impl( SfxRequest &rRequest )
+{
+ sal_uInt16 nSlotId = rRequest.GetSlot();
+ SfxApplication* pApp = SFX_APP();
+ SfxIniManager* pIniMgr = pApp->GetIniManager();
+
+ switch( nSlotId )
+ {
+ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ case SID_BROWSE_FORWARD:
+ case SID_BROWSE_BACKWARD:
+ {
+ // Anzeige der n"achsten oder vorherigen Seite aus der History
+ SFX_REQUEST_ARG( rRequest, pSteps, SfxUInt16Item, nSlotId, sal_False );
+ GetFrame()->Browse( nSlotId == SID_BROWSE_FORWARD, pSteps ? pSteps->GetValue() : 1,
+ (rRequest.GetModifier() & KEY_MOD1) != 0 );
+ break;
+ }
+
+ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ case SID_BROWSE_HOME:
+ {
+ // Anzeige Homepage
+ String aHome = pIniMgr->Get( SFX_KEY_INET_HOME );
+ if( aHome.Len() )
+ {
+ SfxStringItem aUrl( SID_FILE_NAME,
+ URIHelper::SmartRelToAbs( aHome ) );
+ SfxFrameItem aView( SID_DOCFRAME, this );
+ SfxBoolItem aBrowsing( SID_BROWSING, sal_True );
+ SfxStringItem aTarget( SID_TARGETNAME, DEFINE_CONST_UNICODE( "_blank" ) );
+ SfxStringItem aReferer( SID_REFERER, DEFINE_CONST_UNICODE( "private:user" ) );
+ GetDispatcher()->Execute( SID_OPENURL, SFX_CALLMODE_RECORD,
+ &aUrl, &aView, &aBrowsing, &aReferer,
+ ( rRequest.GetModifier() & KEY_MOD1 ) ? &aTarget : 0L,
+ 0L );
+ }
+ break;
+ }
+
+ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ case SID_CREATELINK:
+ {
+/*! (pb) we need new implementation to create a link
+*/
+ break;
+ }
+ }
+ // Recording
+ rRequest.Done();
+}
+
+void SfxTopViewFrame::INetState_Impl( SfxItemSet &rItemSet )
+{
+ if ( !GetFrame()->CanBrowseForward() )
+ rItemSet.DisableItem( SID_BROWSE_FORWARD );
+
+ if ( !GetFrame()->CanBrowseBackward() )
+ rItemSet.DisableItem( SID_BROWSE_BACKWARD );
+
+ // Add/SaveTo-::com::sun::star::text::Bookmark bei BASIC-IDE, QUERY-EDITOR etc. disablen
+ SfxObjectShell *pDocSh = GetObjectShell();
+ sal_Bool bPseudo = pDocSh &&
+ !( pDocSh->GetFactory().GetFlags() & SFXOBJECTSHELL_HASOPENDOC );
+ sal_Bool bEmbedded = pDocSh &&
+ pDocSh->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED;
+ if ( !pDocSh || bPseudo || bEmbedded || !pDocSh->HasName() )
+ rItemSet.DisableItem( SID_CREATELINK );
+}
+
+void SfxTopViewFrame::SetZoomFactor( const Fraction &rZoomX, const Fraction &rZoomY )
+{
+ GetViewShell()->SetZoomFactor( rZoomX, rZoomY );
+}
+
+void SfxTopViewFrame::Activate( sal_Bool bMDI )
+{
+ DBG_ASSERT(GetViewShell(), "Keine Shell");
+ if ( bMDI && !pImp->bActive )
+ pImp->bActive = sal_True;
+//(mba): hier evtl. wie in Beanframe NotifyEvent ?!
+}
+
+void SfxTopViewFrame::Deactivate( sal_Bool bMDI )
+{
+ DBG_ASSERT(GetViewShell(), "Keine Shell");
+ if ( bMDI && pImp->bActive )
+ pImp->bActive = sal_False;
+//(mba): hier evtl. wie in Beanframe NotifyEvent ?!
+}
+
diff --git a/sfx2/source/view/view.hrc b/sfx2/source/view/view.hrc
new file mode 100644
index 000000000000..e136159f4a38
--- /dev/null
+++ b/sfx2/source/view/view.hrc
@@ -0,0 +1,196 @@
+/*************************************************************************
+ *
+ * $RCSfile: view.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:37 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SFX_VIEW_HRC
+#define _SFX_VIEW_HRC
+
+#include "sfx.hrc"
+
+// #defines *****************************************************************
+
+#define STR_NODEFPRINTER (RID_SFX_VIEW_START+ 0)
+#define STR_PRINTER_NOTAVAIL (RID_SFX_VIEW_START+ 1)
+
+#define STR_PRINT_OPTIONS (RID_SFX_VIEW_START+ 6)
+#define STR_PRINT_OPTIONS_TITLE (RID_SFX_VIEW_START+ 7)
+#define STR_ERROR_PRINTER_BUSY (RID_SFX_VIEW_START+ 8)
+#define STR_NOSTARTPRINTER (RID_SFX_VIEW_START+ 9)
+#define STR_PRINTING (RID_SFX_VIEW_START+10)
+
+#ifndef STR_UNDO
+#define STR_UNDO (RID_SFX_VIEW_START+11)
+#define STR_REDO (RID_SFX_VIEW_START+12)
+#define STR_REPEAT (RID_SFX_VIEW_START+13)
+#endif
+
+#define STR_PLUGINVIEW (RID_SFX_VIEW_START+14)
+#define STR_FRAMESETVIEW (RID_SFX_VIEW_START+15)
+#define RID_FRAMESET_MENU (RID_SFX_VIEW_START+16)
+#define STR_GENERICVIEW (RID_SFX_VIEW_START+17)
+#define STR_FRAMESIZE (RID_SFX_VIEW_START+18)
+
+#define DLG_PRINTMONITOR (RID_SFX_VIEW_START)
+#define FT_DOCNAME 1
+#define FT_PRINTING 2
+#define FT_PRINTER 3
+#define FT_PRINTINFO 4
+#define PB_CANCELPRNMON 5
+#define STR_PAGE (RID_SFX_VIEW_START+20)
+#define STR_ERROR_PRINT (RID_SFX_VIEW_START+21)
+#define STR_PRINT_NEWORI (RID_SFX_VIEW_START+22)
+#define STR_PRINT_NEWSIZE (RID_SFX_VIEW_START+23)
+#define STR_PRINT_NEWORISIZE (RID_SFX_VIEW_START+24)
+
+#define STR_PREVIEW_DOCINFO (RID_SFX_VIEW_START+25)
+#define STR_PREVIEW_NODOCINFO (RID_SFX_VIEW_START+26)
+
+#define RID_MAILATTACHDOC_DLG (RID_SFX_VIEW_START+30)
+#define FT_DOC 10
+#define BTN_ATTACH 11
+#define BTN_SAVE_AND_ATTACH 12
+#define BTN_MAILBODY 13
+#define BTN_SAVE_AND_MAILBODY 14
+#define BTN_SELECTION 15
+#define BTN_NO_ATTACH 16
+#define GB_DOC 17
+#define BTN_OK 18
+#define BTN_CANCEL 19
+#define BTN_HELP 20
+
+
+#define MSG_ERROR_SEND_MAIL (RID_SFX_VIEW_START+31)
+
+#define STR_MDIFRAME_INTERFACE (RID_SFX_VIEW_START+32)
+#define STR_ERROR_SAVE_TEMPLATE (RID_SFX_VIEW_START+33)
+#define STR_READONLY (RID_SFX_VIEW_START+34)
+
+#define MSG_QUERY_OPENASTEMPLATE (RID_SFX_VIEW_START+41)
+#define MSG_CANT_CLOSE (RID_SFX_VIEW_START+42)
+
+#define RID_FRAMEDLG (RID_SFX_VIEW_START+43)
+#define TP_FRAMEPROPERTIES (RID_SFX_VIEW_START+44)
+#define TP_FRAMESIZE (RID_SFX_VIEW_START+45)
+#define TP_FRAMESPACING (RID_SFX_VIEW_START+46)
+
+#define FT_FRAMENAME 3
+#define ED_FRAMENAME 4
+#define FT_URL 5
+#define ED_URL 6
+#define BT_FILEOPEN 7
+#define NM_MARGINHEIGHT 8
+#define FT_MARGINHEIGHT 9
+#define NM_MARGINWIDTH 10
+#define FT_MARGINWIDTH 11
+#define GB_MARGIN 12
+#define RB_SCROLLINGON 13
+#define RB_SCROLLINGOFF 14
+#define RB_SCROLLINGAUTO 15
+#define GB_SCROLLING 16
+#define GB_BORDER 17
+#define RB_FRMBORDER_ON 18
+#define RB_FRMBORDER_INHERIT 19
+#define RB_FRMBORDER_OFF 20
+#define CB_MARGINWIDTHDEFAULT 21
+#define CB_MARGINHEIGHTDEFAULT 22
+
+#define GB_WIDTH 23
+#define GB_HEIGHT 24
+#define RB_PIXELWIDTH 25
+#define RB_PERCENTWIDTH 26
+#define RB_RELATIVEWIDTH 27
+#define RB_PIXELHEIGHT 28
+#define RB_PERCENTHEIGHT 29
+#define RB_RELATIVEHEIGHT 30
+#define FT_WIDTHCOMMENT 31
+#define FT_HEIGHTCOMMENT 32
+#define FT_WIDTH 33
+#define NM_WIDTH 34
+#define CB_WIDTHFIXED 35
+#define CB_HEIGHTFIXED 36
+#define FT_HEIGHT 37
+#define NM_HEIGHT 38
+
+#define FT_FRAMESPACING 39
+#define NM_FRAMESPACING 40
+#define CB_FRAMESPACING_INHERIT 41
+#define FT_FRAMESPACINGCOLOR 42
+#define ED_FRAMESPACINGCOLOR 43
+#define CB_FRAMESPACINGCOLOR_INHERIT 44
+#define GB_FRAMESET 45
+
+#define STR_FRAME_FILEDLG (RID_SFX_VIEW_START+46)
+#define STR_SAVE_FRAMESET (RID_SFX_VIEW_START+47)
+#define STR_SAVE_FRAMESETAS (RID_SFX_VIEW_START+48)
+#define STR_FRAME_DEFAULT (RID_SFX_VIEW_START+49)
+
+#define MSG_QUERY_INCOMPLETEFRAME (RID_SFX_VIEW_START+50)
+#define STR_URL_CHANGED (RID_SFX_VIEW_START+51)
+
+#define RID_EXPLORERTOOLSTOOLBOX (RID_SFX_VIEW_START+52)
+#define RID_EXPLOREROBJECTTOOLBOX (RID_SFX_VIEW_START+53)
+#define RID_FRAMESETEDIT_TOOLBOX (RID_SFX_VIEW_START+54)
+#define STR_EXPLORERVIEW (RID_SFX_VIEW_START+55)
+#define STR_SOURCEMODIFIED (RID_SFX_VIEW_START+56)
+#define STR_FRAMESETVIEWSHELL (RID_SFX_VIEW_START+57)
+#define STR_FORWARDMAIL (RID_SFX_VIEW_START+58)
+
+
+#endif
+
diff --git a/sfx2/source/view/view.hxx b/sfx2/source/view/view.hxx
new file mode 100644
index 000000000000..9b1d46a33509
--- /dev/null
+++ b/sfx2/source/view/view.hxx
@@ -0,0 +1,61 @@
+/*************************************************************************
+ *
+ * $RCSfile: view.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:37 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
diff --git a/sfx2/source/view/view.src b/sfx2/source/view/view.src
new file mode 100644
index 000000000000..0f98a9ce221c
--- /dev/null
+++ b/sfx2/source/view/view.src
@@ -0,0 +1,1265 @@
+/*************************************************************************
+ *
+ * $RCSfile: view.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:37 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+ // include ---------------------------------------------------------------
+#include "view.hrc"
+#include "sfx.hrc"
+#include "helpid.hrc"
+#include "sfxlocal.hrc"
+
+ // Strings ---------------------------------------------------------------
+String STR_NODEFPRINTER
+{
+ TEXT = "Kein Standarddrucker gefunden.\nBitte whlen Sie einen Drucker aus und versuchen Sie es noch einmal." ;
+ TEXT [ English ] = "No default printer found.\nPlease choose a printer and try again." ;
+ TEXT [ norwegian ] = "Ingen standardskriver funnet.\nVelg en skriver og prv igjen." ;
+ TEXT [ italian ] = "Stampante predefinita non trovata.\nScegliere una stampante e riprovare." ;
+ TEXT [ portuguese_brazilian ] = "Nenhuma impressora padr o encontrada.\nEscolha uma impressora e tente novamente." ;
+ TEXT [ portuguese ] = "Nenhuma impressora padro encontrada.\nEscolha uma impressora e tente novamente." ;
+ TEXT [ finnish ] = "Oletuskirjoitinta ei lydy.\nValitse kirjoitin ja yrit uudelleen." ;
+ TEXT [ danish ] = "Der blev ikke fundet nogen standardprinter.\nVlg venligst en printer og prv igen." ;
+ TEXT [ french ] = "Impossible de dtecter l'imprimante par dfaut.\nVeuillez slectionner une imprimante et recommencer." ;
+ TEXT [ swedish ] = "Ingen standardskrivare hittades.\nVlj en skrivare och frsk igen." ;
+ TEXT [ dutch ] = "Geen standaardprinter gevonden.\nKies een printer en probeer nogmaals." ;
+ TEXT [ spanish ] = "No se encontr ninguna impresora predeterminada.\nSeleccione por favor una impresora e intntelo nuevamente." ;
+ TEXT [ english_us ] = "No default printer found.\nPlease choose a printer and try again." ;
+ TEXT[ chinese_simplified ] = "ûҵĬϴӡ\nѡһӡȻԴӡ";
+ TEXT[ russian ] = " .\n, , .";
+ TEXT[ polish ] = "Nie znaleziono drukarki domylnej.\nProsz wybra drukark i sprbowa jeszcze raz.";
+ TEXT[ japanese ] = "W‚܂łB\nI ēx݂ĂB";
+ TEXT[ chinese_traditional ] = "Sq{LC\nпܤ@ӦLMMAզCLC";
+ TEXT[ language_user1 ] = " ";
+ TEXT[ greek ] = " .\n .";
+ TEXT[ korean ] = "⺻ ͸ ã ߽ϴ. \n͸ Ͽ õϽʽÿ.";
+ TEXT[ arabic ] = " . ";
+ TEXT[ turkish ] = "Standart yazc bulunamad.\nBir yazc seip yeniden deneyin.";
+};
+String STR_NOSTARTPRINTER
+{
+ TEXT = "Der Drucker konnte nicht gestartet werden.\nBitte berprfen Sie Ihre Druckerkonfiguration." ;
+ TEXT [ English ] = "Could not start printer.\nPlease check your printer configuration." ;
+ TEXT [ norwegian ] = "Kan ikke starte skriver.\nKontroller skriverkonfigurasjonen" ;
+ TEXT [ italian ] = "Impossibile avviare la stampante.\nVerificare la configurazione della stampante." ;
+ TEXT [ portuguese_brazilian ] = "No consegui iniciar a impressora.\nVerifique a configurao da impressora." ;
+ TEXT [ portuguese ] = "Foi impossvel iniciar a impressora.\nPor favor, verifique a configurao da impressora." ;
+ TEXT [ finnish ] = "Kirjoitinta ei voi kynnist.\nTarkista kirjoittimen asetukset." ;
+ TEXT [ danish ] = "Det var ikke muligt at starte printeren.\nKontroller venligst din printerkonfiguration." ;
+ TEXT [ french ] = "Dmarrage de l'imprimante impossible.\nVeuillez contrler le branchement de l'imprimante." ;
+ TEXT [ swedish ] = "Det gick inte att starta skrivaren.\nKontrollera skrivarkonfigurationen." ;
+ TEXT [ dutch ] = "Printer kon niet worden gestart.\nControleer de configuratie van uw printer." ;
+ TEXT [ spanish ] = "No se puede iniciar la impresora.\nPor favor verifique la configuracin de su impresora." ;
+ TEXT [ english_us ] = "Could not start printer.\nPlease check your printer configuration." ;
+ TEXT[ chinese_simplified ] = "޷ӡ\nӡá";
+ TEXT[ russian ] = " .\n, , .";
+ TEXT[ polish ] = "Drukarki nie mona byo uruchomi.\nSprawd prosz konfiguracj drukarki.";
+ TEXT[ japanese ] = "͈Jnł܂łB\nհްݒĉB";
+ TEXT[ chinese_traditional ] = "LkҰʦLC\nˬdLtmC";
+ TEXT[ greek ] = " .\n .";
+ TEXT[ korean ] = "Ͱ õ ߽ϴ.\nͱ ʽÿ.";
+ TEXT[ arabic ] = " . \n .";
+ TEXT[ turkish ] = "Yazc altrlamad.\nYazc konfigrasyonunu kontrol edin.";
+ TEXT[ language_user1 ] = " ";
+};
+String STR_PRINTER_NOTAVAIL
+{
+ TEXT = "Das Dokument wurde fr den Drucker $1 formatiert. Der Drucker ist nicht vorhanden.\nSoll der Standarddrucker $2 verwendet werden?" ;
+ TEXT [ ENGLISH ] = "This document was previously formatted for the printer $1, but that printer is not available.\nUse default printer $2?" ;
+ TEXT [ norwegian ] = "Dette dokumentet ble formatert for skriveren " ;
+ TEXT [ italian ] = "Questo documento era stato formattato in precedenza per la stampante $1. La stampante, per, non esiste.\nUsare la stampante predefinita $2?" ;
+ TEXT [ portuguese_brazilian ] = "Este documento foi formatado anterior para a impressora" ;
+ TEXT [ portuguese ] = "O documento foi formatado para a impressora $1. A impressora no est disponvel.\nUsar a impressora padro $2?" ;
+ TEXT [ finnish ] = "Tm asiakirja on aiemmin muotoiltu kirjoittimelle " ;
+ TEXT [ danish ] = "Dette dokument er formateret til printeren $1. Denne printer er ikke tilgngelig.\nVil du bruge standardprinteren $2?" ;
+ TEXT [ french ] = "Ce document a t mis en page pour l'imprimante $1. L'imprimante n'est pas disponible.\nUtiliser $2 comme imprimante par dfaut ?" ;
+ TEXT [ swedish ] = "Dokumentet har formaterats fr skrivaren $1. Denna skrivare r inte tillgnglig.\nSkall standardskrivaren $2 anvndas?" ;
+ TEXT [ dutch ] = "Dit document is opgemaakt voor printer $1. Deze printer is niet voorhanden.\nWilt u de standaardprinter $2 gebruiken?" ;
+ TEXT [ spanish ] = "Este documento se ha formateado para la impresora $1, pero esta no est disponible.\nDesea usar la impresora predeterminada $2?" ;
+ TEXT [ english_us ] = "This document has been formatted for the printer $1. The specified printer is not available. \nDo you want to use the standard printer $2 ?" ;
+ TEXT[ chinese_simplified ] = "ĵʽרΪӡ $1 趨ġ\nӡڡҪʹĬϴӡ $2 ";
+ TEXT[ russian ] = " $1. .\n $2?";
+ TEXT[ polish ] = "Dokument zosta sformatowany dla drukarki $1. Drukarki tego typu brak.\nUy drukarki domylnej $2?";
+ TEXT[ japanese ] = "޷Ă $1pɏݒ肳܂B͂܂B\nW $2gpĂ낵ł傤?";
+ TEXT[ chinese_traditional ] = "oӤ榡OML $1 ]wC\nOoӦLsbCznϥq{L $2 H";
+ TEXT[ greek ] = " $1. \n. $2 ;";
+ TEXT[ korean ] = " $1 ˵Ǿϴ. Ͱ ϴ. \n⺻ $2 Ͻðڽϱ?";
+ TEXT[ arabic ] = " $1. .\n $2";
+ TEXT[ turkish ] = "Belge, $1 yazcs iin formatland. Belirtilen yazc bulunamad.\nStandart yazc $2 kullanlsn m?";
+ TEXT[ language_user1 ] = " ";
+};
+String STR_MENU_NEWMAIL
+{
+ Text = "N~eue Nachricht" ;
+ Text [ English ] = "New ~Mail" ;
+ Text [ dutch ] = "Nieuw ~bericht" ;
+ Text [ english_us ] = "New ~Mail" ;
+ Text [ italian ] = "Nuovo ~messaggio" ;
+ Text [ spanish ] = "Nuevo ~mensaje" ;
+ Text [ french ] = "Nouveau ~message" ;
+ Text [ swedish ] = "Nytt m~eddelande" ;
+ Text [ danish ] = "Ny meddelelse" ;
+ Text [ portuguese ] = "No~va mensagem" ;
+ Text [ portuguese_brazilian ] = "N~eue Nachricht" ;
+ Text[ chinese_simplified ] = "½ʼ(~M)";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Nowa wiadomo";
+ Text[ japanese ] = "Vү(~M)";
+ Text[ chinese_traditional ] = "sqll(~M)";
+ Text[ greek ] = " ";
+ Text[ korean ] = " (~M)";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "Y~eni ileti";
+ Text[ language_user1 ] = " ";
+};
+String STR_PRINT_OPTIONS
+{
+ Text = "Zustze..." ;
+ Text [ ENGLISH ] = "Options..." ;
+ Text [ norwegian ] = "Valg..." ;
+ Text [ italian ] = "Opzioni..." ;
+ Text [ portuguese_brazilian ] = "Opes..." ;
+ Text [ portuguese ] = "Opes..." ;
+ Text [ finnish ] = "Mritykset..." ;
+ Text [ danish ] = "Flere..." ;
+ Text [ french ] = "Options..." ;
+ Text [ swedish ] = "Fler..." ;
+ Text [ dutch ] = "Overige..." ;
+ Text [ spanish ] = "Opciones..." ;
+ Text [ english_us ] = "Options..." ;
+ Text[ chinese_simplified ] = "...";
+ Text[ russian ] = "...";
+ Text[ polish ] = "Dodatki";
+ Text[ japanese ] = "߼...";
+ Text[ chinese_traditional ] = "L...";
+ Text[ greek ] = "...";
+ Text[ korean ] = "ɼ...";
+ Text[ arabic ] = "...";
+ Text[ turkish ] = "Seenekler...";
+ Text[ language_user1 ] = " ";
+};
+String STR_PRINT_OPTIONS_TITLE
+{
+ Text = "Drucker Zustze" ;
+ Text [ ENGLISH ] = "Printer Options" ;
+ Text [ norwegian ] = "Skriveralternativer" ;
+ Text [ italian ] = "Opzioni stampante" ;
+ Text [ portuguese_brazilian ] = "Opes de Impressora" ;
+ Text [ portuguese ] = "Opes de impresso" ;
+ Text [ finnish ] = "Kirjoittimen asetukset" ;
+ Text [ danish ] = "Printerindstillinger" ;
+ Text [ french ] = "Options d'impression" ;
+ Text [ swedish ] = "Skrivaralternativ" ;
+ Text [ dutch ] = "Printeropties" ;
+ Text [ spanish ] = "Opciones de impresin" ;
+ Text [ english_us ] = "Printer Options" ;
+ Text[ chinese_simplified ] = "ӡ ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Opcje drukarki";
+ Text[ japanese ] = "̵߼";
+ Text[ chinese_traditional ] = "L L";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ɼ";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "Yazc seenekleri";
+ Text[ language_user1 ] = " ";
+};
+String STR_ERROR_PRINTER_BUSY
+{
+ Text = "Drucker bereits in Betrieb" ;
+ Text [ ENGLISH ] = "Printer busy" ;
+ Text [ norwegian ] = "Skriver opptatt" ;
+ Text [ italian ] = "stampante occupata" ;
+ Text [ portuguese_brazilian ] = "Impressora ocupada" ;
+ Text [ portuguese ] = "Impressora ocupada" ;
+ Text [ finnish ] = "Kirjoitin varattu" ;
+ Text [ danish ] = "Printeren er optaget" ;
+ Text [ french ] = "Imprimante occupe" ;
+ Text [ swedish ] = "Skrivaren r upptagen" ;
+ Text [ dutch ] = "Printer bezig" ;
+ Text [ spanish ] = "Impresora ocupada" ;
+ Text [ english_us ] = "Printer busy" ;
+ Text[ chinese_simplified ] = "ӡæµ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Drukarka ju pracuje";
+ Text[ japanese ] = "͋NłB";
+ Text[ chinese_traditional ] = "LwgB@";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ̹ ۵";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "Yazc u an kullanlyor";
+ Text[ language_user1 ] = " ";
+};
+String STR_ERROR_PRINT
+{
+ Text = "Fehler beim Drucken" ;
+ Text [ ENGLISH ] = "Error while printing" ;
+ Text [ norwegian ] = "Feil ved utskrift" ;
+ Text [ italian ] = "Errore durante la stampa" ;
+ Text [ portuguese_brazilian ] = "Erro ao imprimir" ;
+ Text [ portuguese ] = "Erro ao imprimir" ;
+ Text [ finnish ] = "Tulostusvirhe" ;
+ Text [ danish ] = "Fejl ved udskrivning" ;
+ Text [ french ] = "Erreur lors de l'impression" ;
+ Text [ swedish ] = "Fel vid utskrift" ;
+ Text [ dutch ] = "Fout bij afdrukken" ;
+ Text [ spanish ] = "Error al imprimir" ;
+ Text [ english_us ] = "Error while printing" ;
+ Text[ chinese_simplified ] = "ӡ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Bd podczas drukowania";
+ Text[ japanese ] = "ɴװ܂B";
+ Text[ chinese_traditional ] = "CL~";
+ Text[ greek ] = " ";
+ Text[ korean ] = "μ ߻";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "Yazdrma hatas";
+ Text[ language_user1 ] = " ";
+};
+String STR_PRINTING
+{
+ Text = "Drucke" ;
+ Text [ ENGLISH ] = "Printing" ;
+ Text [ norwegian ] = "Printing" ;
+ Text [ italian ] = "Stampa" ;
+ Text [ portuguese_brazilian ] = "Impresso" ;
+ Text [ portuguese ] = "A imprimir" ;
+ Text [ finnish ] = "Tulostus" ;
+ Text [ danish ] = "Udskriver" ;
+ Text [ french ] = "Impression en cours" ;
+ Text [ swedish ] = "Skriver ut" ;
+ Text [ dutch ] = "Bezig met afdrukken" ;
+ Text [ spanish ] = "Imprimiendo" ;
+ Text [ english_us ] = "Printing" ;
+ Text[ chinese_simplified ] = "ڴӡ";
+ Text[ russian ] = "";
+ Text[ polish ] = "Drukuj";
+ Text[ japanese ] = "";
+ Text[ chinese_traditional ] = "bCL";
+ Text[ greek ] = "";
+ Text[ korean ] = "μ";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "Yazdr";
+ Text[ language_user1 ] = " ";
+};
+String STR_PAGE
+{
+ Text = "Seite " ;
+ Text [ English ] = "Page " ;
+ Text [ norwegian ] = "Side " ;
+ Text [ italian ] = "Pagina " ;
+ Text [ portuguese_brazilian ] = "Pgina " ;
+ Text [ portuguese ] = "Pgina " ;
+ Text [ finnish ] = "Sivu " ;
+ Text [ danish ] = "Side " ;
+ Text [ french ] = "Page " ;
+ Text [ swedish ] = "Sida " ;
+ Text [ dutch ] = "Pagina " ;
+ Text [ spanish ] = "Pgina " ;
+ Text [ english_us ] = "Page " ;
+ Text[ chinese_simplified ] = "ҳ ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Strona ";
+ Text[ japanese ] = "߰ ";
+ Text[ chinese_traditional ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "Sayfa ";
+ Text[ language_user1 ] = " ";
+};
+String STR_MDIFRAME_INTERFACE
+{
+ Text = "MDI-Fenster" ;
+ Text [ English ] = "MDI Window" ;
+ Text [ norwegian ] = "MDI Window" ;
+ Text [ italian ] = "Finestra MDI" ;
+ Text [ portuguese_brazilian ] = "Janela MDI" ;
+ Text [ portuguese ] = "Janela MDI" ;
+ Text [ finnish ] = "MDI-ikkuna" ;
+ Text [ danish ] = "MDI-vindue" ;
+ Text [ french ] = "Fentre MDI" ;
+ Text [ swedish ] = "MDI-fnster" ;
+ Text [ dutch ] = "MDI-venster" ;
+ Text [ spanish ] = "Ventana MDI" ;
+ Text [ english_us ] = "MDI Window" ;
+ Text[ chinese_simplified ] = "MDI-Ӵ";
+ Text[ russian ] = " MDI";
+ Text[ polish ] = "Okno MDI";
+ Text[ japanese ] = "MDI ޳";
+ Text[ chinese_traditional ] = "MDI ";
+ Text[ greek ] = " MDI";
+ Text[ korean ] = "MDI â";
+ Text[ arabic ] = " MDI";
+ Text[ turkish ] = "MDI penceresi";
+ Text[ language_user1 ] = " ";
+};
+String STR_ERROR_SAVE_TEMPLATE
+{
+ Text = "Fehler beim Schreiben der Vorlage " ;
+ Text [ English ] = "Error writing template " ;
+ Text [ norwegian ] = "Feil ved skriving av mal " ;
+ Text [ italian ] = "Errore durante la scrittura del modello " ;
+ Text [ portuguese_brazilian ] = "Erro ao gravar o modelo " ;
+ Text [ portuguese ] = "Erro ao gravar o modelo " ;
+ Text [ finnish ] = "Virhe kirjoitettaessa mallia " ;
+ Text [ danish ] = "Fejl under skrivning af skabelon " ;
+ Text [ french ] = "Erreur lors de l'criture du modle " ;
+ Text [ swedish ] = "Fel vid skrivning av mall " ;
+ Text [ dutch ] = "Fout bij schrijven van sjabloon " ;
+ Text [ spanish ] = "Error al grabar la plantilla " ;
+ Text [ english_us ] = "Error saving template " ;
+ Text[ chinese_simplified ] = "дʽʱ ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Bd przy zapisywaniu szablonu ";
+ Text[ japanese ] = "ڰĂ̏ݎ̴װ ";
+ Text[ chinese_traditional ] = "gJ˦ɵoͤ@ӿ~ ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ⿡ ߻ ";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "ablon hazrlamada hata ";
+ Text[ language_user1 ] = " ";
+};
+String STR_READONLY
+{
+ Text = " (schreibgeschtzt)" ;
+ Text [ English ] = " (read only)" ;
+ Text [ norwegian ] = " (skrivebeskyttet)" ;
+ Text [ italian ] = "(sola lettura)" ;
+ Text [ portuguese_brazilian ] = "(s leitura)" ;
+ Text [ portuguese ] = "(s leitura)" ;
+ Text [ finnish ] = " (vain luku)" ;
+ Text [ danish ] = "(skrivebeskyttet)" ;
+ Text [ french ] = "(en lecture seule)" ;
+ Text [ swedish ] = "(skrivskyddad)" ;
+ Text [ dutch ] = "(alleen lezen)" ;
+ Text [ spanish ] = "(solo lectura)" ;
+ Text [ english_us ] = "(read only)" ;
+ Text[ chinese_simplified ] = "(д)";
+ Text[ russian ] = "( )";
+ Text[ polish ] = "(tylko do odczytu)";
+ Text[ japanese ] = "(ǂݎp)";
+ Text[ chinese_traditional ] = "(Ū)";
+ Text[ greek ] = "( )";
+ Text[ korean ] = "( ȣ)";
+ Text[ arabic ] = "( )";
+ Text[ turkish ] = "(salt okunur)";
+ Text[ language_user1 ] = " ";
+};
+String STR_PRINT_NEWORI
+{
+ Text = "Sie haben die Seitenorientierungseinstellung gendert.\nSollen die genderten Einstellungen in das Dokument\nbernommen werden?" ;
+ Text [ English ] = "You have changed the page orientation.\nWould you like your changes to be saved\nin the document?" ;
+ Text [ dutch ] = "U heeft de instelling van de pagina-orintatie veranderd.\nWilt u de nieuwe instellingen overnemen in uw document?" ;
+ Text [ english_us ] = "The page orientation has been modified.\nShould the new settings be saved \nin the active document?" ;
+ Text [ italian ] = " stata cambiata l'orientazione della pagina.\nTrasferire le impostazioni cambiate nel documento?" ;
+ Text [ spanish ] = "La orientacin de la pgina ha sido modificada.\nDesea aplicar las modificaciones al documento\n actual?" ;
+ Text [ french ] = "Vous avez modifi l'orientation de page.\nVoulez-vous enregistrer\n les modifications de paramtres pour le document ?" ;
+ Text [ swedish ] = "Du har ndrat instllningen av sidorienteringen.\nSka de ndrade instllningarna\nvertas till dokumentet?" ;
+ Text [ danish ] = "Indstillingerne for sideretningen er blevet ndret.\nSkal ndringerne overtages i dokumentet?" ;
+ Text [ portuguese_brazilian ] = "Sie haben die Seitenorientierungseinstellung gendert.\nSollen die genderten Einstellungen in das Dokument\nbernommen werden?" ;
+ Text [ portuguese ] = "Voc modificou a orientao da pgina.\nDeseja aplicar as novas definies\nao documento activo?" ;
+ Text[ chinese_simplified ] = "ҳ趨\nĵҪոĵ趨";
+ Text[ russian ] = " .\n \n ?";
+ Text[ polish ] = "Zmienie ustawienia strony.\nCzy te zmienione ustawienia maj zosta \nzapisane w dokumencie?";
+ Text[ japanese ] = "߰ޕ̐ݒ肪ύXĂ܂B\nύXꂽݒ݂޷Ă\nKp܂?";
+ Text[ chinese_traditional ] = "zF]wC\noӤɭn諸]wܡS";
+ Text[ greek ] = " .\n \n ;";
+ Text[ korean ] = " ⼳ Ǿϴ.\n Ͻðڽϱ?";
+ Text[ arabic ] = " .\n \n Ͽ";
+ Text[ turkish ] = "Sayfa duru ayarn deitirdiniz.\nDeitirilen ayar\nbelgede kullanlsn m?";
+ Text[ language_user1 ] = " ";
+};
+String STR_PRINT_NEWSIZE
+{
+ Text = "Sie haben die Seitengre gendert.\nSollen die genderten Einstellungen in das\nDokument bernommen werden?" ;
+ Text [ English ] = "You have changed the page size.\nWould you like your changes to be saved\nin the document?" ;
+ Text [ english_us ] = "The page size has been modified.\nShould the new settings be saved\nin the active document?" ;
+ Text [ italian ] = "Sono state modificate le dimensioni della pagina.\nTrasferire le impostazioni cambiate nel documento?" ;
+ Text [ spanish ] = "El tamao de la pgina se ha modificado.\nDesea aplicar las modificaciones al documento\nactual?" ;
+ Text [ french ] = "Vous avez modifi le format de la page.\nVoulez-vous enregistrer les paramtres modifis dans le \ndocument?" ;
+ Text [ dutch ] = "U heeft het paginaformaat veranderd.\nWilt u deze verandering in uw\ndocument overnemen?" ;
+ Text [ swedish ] = "Du har ndrat sidstorleken.\nSka de ndrade instllningarna\nvertas till dokumentet?" ;
+ Text [ danish ] = "Sidestrrelsen er blevet ndret.\nSkal ndringerne overtages i dokumentet?" ;
+ Text [ portuguese_brazilian ] = "Sie haben die Seitengre gendert.\nSollen die genderten Einstellungen in das\nDokument bernommen werden?" ;
+ Text [ portuguese ] = "Voc modificou o tamanho da pgina.\n Deseja aplicar as novas definies \nao documento activo?" ;
+ Text[ chinese_simplified ] = "ѾҳС\nĵҪ趨";
+ Text[ russian ] = " .\n \n ?";
+ Text[ polish ] = "Zmienie rozmiar strony. \nCzy zmiany maj zosta zapisane \nw aktywnym dokumencie?";
+ Text[ japanese ] = "߰ ނύXĂ܂B\nύXꂽݒ݂޷Ă\nKp܂?";
+ Text[ chinese_traditional ] = "zwgﭶjpC\nznĥγoӳ]wH";
+ Text[ greek ] = " .\n \n ;";
+ Text[ korean ] = " ũⰡ Ǿϴ.\n Ͻðڽϱ?";
+ Text[ arabic ] = " .\n Ͽ";
+ Text[ turkish ] = "Sayfa boyutunu deitirdiniz.\nDeitirilen ayarlar\nbelgede kullanlsn m?";
+ Text[ language_user1 ] = " ";
+};
+String STR_PRINT_NEWORISIZE
+{
+ Text = "Sie haben die Seitengre und die\nSeitenorientierung gendert. Sollen\ndie genderten Einstellungen in das\nDokument bernommen werden?" ;
+ Text [ English ] = "You have changed the page size. and\nthe page orientation. Would you like\nyour changes to be saved in the document?" ;
+ Text [ dutch ] = "U heeft het paginaformaat en de\npagina-orintering veranderd. Wilt u\nde veranderingen in het\ndocument overnemen?" ;
+ Text [ english_us ] = "The page size and orientation have been modified\n. Would you like to save the new settings in the\nactive document?" ;
+ Text [ italian ] = "Sia le dimensioni della pagina che l'orientamento sono stati cambiati.\nTrasferire le impostazioni\ncambiate nel documento?" ;
+ Text [ spanish ] = "El tamao y orientacin de la pgina se han modificado\n. Desea aplicar las modificaciones al\ndocumento actual?" ;
+ Text [ french ] = "Vous avez chang le format et l'\norientation\n de la page. Voulez-vous enregistrer les paramtres modifis\n dans le \ndocument?" ;
+ Text [ swedish ] = "Du har ndrat sidstorleken och\nsidorienteringen.Ska\nde ndrade instllningarna vertas\ntill dokumentet?" ;
+ Text [ danish ] = "Sidestrrelsen og sideretningen er blevet ndret.\nSkal ndringerne overtages i dokumentet?" ;
+ Text [ portuguese_brazilian ] = "Sie haben die Seitengre und die\nSeitenorientierung gendert. Sollen\ndie genderten Einstellungen in das\nDokument bernommen werden?" ;
+ Text [ portuguese ] = "Voc modificou o tamanho e a orientao da pgina.\n Deseja aplicar as novas definies\nao documento activo?" ;
+ Text[ chinese_simplified ] = "ѾҳСҳ淽\nĵҪЩ";
+ Text[ russian ] = " \n. \n \n ?";
+ Text[ polish ] = "Zmienie rozmiar strony i \norientacj strony. Czy nowe ustawienia \nmaj zosta zapisane \nw aktywnym dokumencie?";
+ Text[ japanese ] = "߰ ނ\n߰ޕύXĂ܂\nύXꂽݒ݂޷Ă\nKp܂?";
+ Text[ chinese_traditional ] = "zwgܧ󭶭jpMVC\nznĥγoܧH";
+ Text[ greek ] = " \n .\n \n ;";
+ Text[ korean ] = " ũ \n Ǿϴ. Ͻðڽϱ?";
+ Text[ arabic ] = " .\n Ͽ";
+ Text[ turkish ] = "Sayfa boyutunu ve sayfa duruunu deitirdiniz. Deitirilen\n ayarlar\nbelgede kullanlsn m?";
+ Text[ language_user1 ] = " ";
+};
+String STR_PLUGINVIEW
+{
+ Text = "PlugInView" ;
+};
+String STR_FRAMESETVIEW
+{
+ Text = "FrameSetView" ;
+};
+String STR_GENERICVIEW
+{
+ Text = "GenericView" ;
+};
+String RID_EXPLORERTOOLSTOOLBOX
+{
+ Text = "Desktopwerkzeugleiste" ;
+ Text [ English ] = "Desktop Toolbar" ;
+ Text [ English_US ] = "Desktop Toolbar" ;
+ Text [ portuguese ] = "Barra de ferramentas do Desktop" ;
+ Text [ portuguese_brazilian ] = "Desktopwerkzeugleiste" ;
+ Text [ swedish ] = "Desktopverktygslist" ;
+ Text [ danish ] = "Desktop-vrktjslinje" ;
+ Text [ italian ] = "Barra degli strumenti del desktop" ;
+ Text [ spanish ] = "Barra de herramientas del escritorio" ;
+ Text [ french ] = "Barre d'instruments Desktop" ;
+ Text [ dutch ] = "Werktuigbalk Desktop" ;
+ Text[ chinese_simplified ] = "湤";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Pasek narzdzi pulpitu";
+ Text[ japanese ] = "޽į߂̕W°ް";
+ Text[ chinese_traditional ] = "ୱuC";
+ Text[ greek ] = " Desktop";
+ Text[ korean ] = "ȭ ";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "Masast ara ubuu";
+ Text[ language_user1 ] = " ";
+};
+String STR_PREVIEW_DOCINFO
+{
+ Text = "<html><body BGCOLOR=\"#c0c0c0\"><font FACE=\"Arial\"><dl><dt><b>Titel:</b><dd>$(TITEL)<dt><b>Thema:</b><dd>$(THEME)<dt><b>Schl&uuml;sselworte:</b><dd>$(KEYWORDS)<dt><b>Beschreibung:</b><dd>$(TEXT)</dl></font></body></html>" ;
+ Text [ English ] = "<html><body BGCOLOR=\"#c0c0c0\"><font FACE=\"Arial\"><dl><dt><b>Title:</b><dd>$(TITEL)<dt><b>Theme:</b><dd>$(THEME)<dt><b>Keywords:</b><dd>$(KEYWORDS)<dt><b>Description:</b><dd>$(TEXT)</dl></font></body></html>" ;
+ Text [ english_us ] = "<html><body BGCOLOR=\"#c0c0c0\"><font FACE=\"Arial\"><dl><dt><b>Title:</b><dd>$(TITEL)<dt><b>Subject:</b><dd>$(THEME)<dt><b>Keywords:</b><dd>$(KEYWORDS)<dt><b>Description:</b><dd>$(TEXT)</dl></font></body></html>" ;
+ Text [ swedish ] = "<html><body BGCOLOR=\"#c0c0c0\"><font FACE=\"Arial\"><dl><dt><b>Titel:</b><dd>$(TITEL)<dt><b>Tema:</b><dd>$(THEME)<dt><b>Nyckelord:</b><dd>$(KEYWORDS)<dt><b>Beskrivning:</b><dd>$(TEXT)</dl></font></body></html>" ;
+ Text [ danish ] = "<html><body BGCOLOR=\"#c0c0c0\"><font FACE=\"Arial\"><dl><dt><b>Titel:</b><dd>$(TITEL)<dt><b>Emne:</b><dd>$(THEME)<dt><b>Ngleord:</b><dd>$(KEYWORDS)<dt><b>Beskrivelse:</b><dd>$(TEXT)</dl></font></body></html>" ;
+ Text [ italian ] = "<html><body BGCOLOR=\"#c0c0c0\"><font FACE=\"Arial\"><dl><dt><b>Titolo:</b><dd>$(TITEL)<dt><b>Argomento:</b><dd>$(THEME)<dt><b>Parole chiavee:</b><dd>$(KEYWORDS)<dt><b>Beschreibung:</b><dd>$(TEXT)</dl></font></body></html>" ;
+ Text [ spanish ] = "<html><body BGCOLOR=\"#c0c0c0\"><font FACE=\"Arial\"><dl><dt><b>Ttulo:</b><dd>$(TITULO)<dt><b>Tema:</b><dd>$(THEME)<dt><b>Contraseas:</b><dd>$(KEYWORDS)<dt><b>Descripcin:</b><dd>$(TEXT)</dl></font></body></html>" ;
+ Text [ french ] = "<html><body BGCOLOR=\"#c0c0c0\"><font FACE=\"Arial\"><dl><dt><b>Titre :</b><dd>$(TITEL)<dt><b>Objet :</b><dd>$(THEME)<dt><b>Mots-cls :</b><dd>$(KEYWORDS)<dt><b>Description : </b><dd>$(TEXT)</dl></font></body></html>" ;
+ Text [ dutch ] = "<html><body BGCOLOR=\"#c0c0c0\"><font FACE=\"Arial\"><dl><dt><b>Titel:</b><dd>$(TITEL)<dt><b>Onderwerp:</b><dd>$(THEME)<dt><b>Sl&uuml;telwoorden:</b><dd>$(KEYWORDS)<dt><b>Beschrijving:</b><dd>$(TEXT)</dl></font></body></html>" ;
+ Text [ portuguese_brazilian ] = "<html><body BGCOLOR=\"#c0c0c0\"><font FACE=\"Arial\"><dl><dt><b>Titel:</b><dd>$(TITEL)<dt><b>Thema:</b><dd>$(THEME)<dt><b>Schl&uuml;sselworte:</b><dd>$(KEYWORDS)<dt><b>Beschreibung:</b><dd>$(TEXT)</dl></font></body></html>" ;
+ Text [ portuguese ] = "<html><body BGCOLOR=\"#c0c0c0\"><font FACE=\"Arial\"><dl><dt><b>Ttulo:</b><dd>$(TITLE)<dt><b>Tema:</b><dd>$(THEME)<dt><b>Palavras-chave:</b><dd>$(KEYWORDS)<dt><b>Descrio:</b><dd>$(TEXT)</dl></font></body></html>" ;
+ Text[ chinese_simplified ] = "<html><body BGCOLOR=\"#c0c0c0\"><font FACE=\"Arial\"><dl><dt><b>:</b><dd>$(TITEL)<dt><b>:</b><dd>$(THEME)<dt><b>ؼ:</b><dd>$(KEYWORDS)<dt><b>˵:</b><dd>$(TEXT)</dl></font></body></html>";
+ Text[ russian ] = "<html><body BGCOLOR=\"#c0c0c0\"><font FACE=\"Arial\"><dl><dt><b>:</b><dd>$(TITEL)<dt><b>:</b><dd>$(THEME)<dt><b> :</b><dd>$(KEYWORDS)<dt><b>:</b><dd>$(TEXT)</dl></font></body></html>";
+ Text[ polish ] = "<html><body BGCOLOR=\"#c0c0c0\"><czcionka FACE=\"Arial\"><dl><dt><b>Tytu:</b><dd>$(TITEL)<dt><b>Temat:</b><dd>$(THEME)<dt><b>Sowa kluczowe:</b><dd>$(KEYWORDS)<dt><b>Opis:</b><dd>$(TEXT)</dl></font></body></html>";
+ Text[ japanese ] = "<html><body BGCOLOR=\"#c0c0c0\"><font FACE=\"Arial\"><dl><dt><b>Titel:</b><dd>$(TITEL)<dt><b>ð:</b><dd>$(THEME)<dt><b>ܰ:</b><dd>$(KEYWORDS)<dt><b>:</b><dd>$(TEXT)</dl></font></body></html>";
+ Text[ chinese_traditional ] = "html><body BGCOLOR=\"#c0c0c0\"><font FACE=\"Arial\"><dl><dt><b>DG</b><dd>$(TITEL)<dt><b>DDG</b><dd>$(THEME)<dt><b>rG</b><dd>$(KEYWORDS)<dt><b>yzG</b><dd>$(TEXT)</dl></font></body></html>";
+ Text[ greek ] = "<html><body BGCOLOR=\"#c0c0c0\"><font FACE=\"Arial\"><dl><dt><b>:</b><dd>$(TITEL)<dt><b>:</b><dd>$(THEME)<dt><b>-:</b><dd>$(KEYWORDS)<dt><b>:</b><dd>$(TEXT)</dl></font></body></html>";
+ Text[ korean ] = "<html><body BGCOLOR=\"#c0c0c0\"><foFACE=\"Arial\"><dl><dt><b>:</b><dd>$(TIdt><b>Subject:</b><dd>$(THEME)<dt><b>Keywords:</b><dd>$(KEYWORDS)<dt><b>Description:</b><dd>$(TEXT)</dl></font></body></html>";
+ Text[ arabic ] = "<html><body BGCOLOR=\"#c0c0c0\"><font FACE=\"Arial\"><dl><dt><b>Title:</b><dd>$(TITEL)<dt><b>Subject:</b><dd>$(THEME)<dt><b>Keywords:</b><dd>$(KEYWORDS)<dt><b>Description:</b><dd>$(TEXT)</dl></font></body></html>";
+ Text[ turkish ] = "<html><body BGCOLOR=\"#c0c0c0\"><font FACE=\"Arial\"><dl><dt><b>Titel:</b><dd>$(TITEL)<dt><b>Konu:</b><dd>$(THEME)<dt><b>Anahtar szck:</b><dd>$(KEYWORDS)<dt><b>Tanm:</b><dd>$(TEXT)</dl></font></body></html>";
+ Text[ language_user1 ] = " ";
+};
+String STR_PREVIEW_NODOCINFO
+{
+ Text = "<HTML><BODY BGCOLOR=\"#c0c0c0\"><BR><BR><P><FONT FACE=\"Arial\"><B>Keine Dokumenteigenschaften vorhanden.</B></FONT></P></BODY></HTML>" ;
+ Text [ English ] = "<HTML><BODY BGCOLOR=\"#c0c0c0\"><BR><BR><P><FONT FACE=\"Arial\"><B>No Documentproperties found.</B></FONT></P></BODY></HTML>" ;
+ Text [ english_us ] = "<HTML><BODY BGCOLOR=\"#c0c0c0\"><BR><BR><P><FONT FACE=\"Arial\"><B>No document properties found.</B></FONT></P></BODY></HTML>" ;
+ Text [ swedish ] = "<HTML><BODY BGCOLOR=\"#c0c0c0\"><BR><BR><P><FONT FACE=\"Arial\"><B>Inga dokumentegenskaper funna.</B></FONT></P></BODY></HTML>" ;
+ Text [ danish ] = "<HTML><BODY BGCOLOR=\"#c0c0c0\"><BR><BR><P><FONT FACE=\"Arial\"><B>Der blev ikke fundet nogen dokumentegenskaber.</B></FONT></P></BODY></HTML>" ;
+ Text [ italian ] = "<HTML><BODY BGCOLOR=\"#c0c0c0\"><BR><BR><P><FONT FACE=\"Arial\"><B>nessuna propriet di documento.</B></FONT></P></BODY></HTML>" ;
+ Text [ spanish ] = "<HTML><BODY BGCOLOR=\"#c0c0c0\"><BR><BR><P><FONT FACE=\"Arial\"><B>No se encontraron propiedades de documentos.</B></FONT></P></BODY></HTML>" ;
+ Text [ french ] = "<HTML><BODY BGCOLOR=\"#c0c0c0\"><BR><BR><P><FONT FACE=\"Arial\"><B>Propri&eacute;t&eacute;s de document introuvables.</B></FONT></P></BODY></HTML>" ;
+ Text [ dutch ] = "<HTML><BODY BGCOLOR=\"#c0c0c0\"><BR><BR><P><FONT FACE=\"Arial\"><B>Geen documenteigenschappen voorhanden.</B></FONT></P></BODY></HTML>" ;
+ Text [ portuguese_brazilian ] = "<HTML><BODY BGCOLOR=\"#c0c0c0\"><BR><BR><P><FONT FACE=\"Arial\"><B>Keine Dokumenteigenschaften vorhanden.</B></FONT></P></BODY></HTML>" ;
+ Text [ portuguese ] = "<HTML><BODY BGCOLOR=\"#c0c0c0\"><BR><BR><P><FONT FACE=\"Arial\"><B>Propriedades do documento no foram encontradas.</B></FONT></P></BODY></HTML>" ;
+ Text[ chinese_simplified ] = "<HTML><BODY BGCOLOR=\"#c0c0c0\"><BR><BR><P><FONT FACE=\"Arial\"><B>ĵԲڡ</B></FONT></P></BODY></HTML>";
+ Text[ russian ] = "<HTML><BODY BGCOLOR=\"#c0c0c0\"><BR><BR><P><FONT FACE=\"Arial\"><B> .</B></FONT></P></BODY></HTML>";
+ Text[ polish ] = "<HTML><BODY BGCOLOR=\"#c0c0c0\"><BR><BR><P><FONT FACE=\"Arial\"><B>Brak waciwoci dokumentw.</B></FONT></P></BODY></HTML>";
+ Text[ japanese ] = "<HTML><BODY BGCOLOR=\"#c0c0c0\"><BR><BR><P><FONT FACE=\"Arial\"><B>޷Ă̑͂܂B</B></FONT></P></BODY></HTML>";
+ Text[ chinese_traditional ] = "<HTML><BODY BGCOLOR=\"#c0c0c0\"><BR><BR><P><FONT FACE=\"Arial\"><B>ݩʤsbC</B></FONT></P></BODY></HTML>";
+ Text[ greek ] = "<HTML><BODY BGCOLOR=\"#c0c0c0\"><BR><BR><P><FONT FACE=\"Arial\"><B> .</B></FONT></P></BODY></HTML>";
+ Text[ korean ] = "<HTML><BODY BGCOLOR=\"#c0c0c0\"><BR><BR><P><FONT FACE=\"Arial\"><B> ϴ.</B></FONT></P></BODY></HTML>";
+ Text[ arabic ] = "<HTML><BODY BGCOLOR=\"#c0c0c0\"><BR><BR><P><FONT FACE=\"Arial\"><B>No document properties found.</B></FONT></P></BODY></HTML>";
+ Text[ turkish ] = "<HTML><BODY BGCOLOR=\"#c0c0c0\"><BR><BR><P><FONT FACE=\"Arial\"><B>Belge zellikleri bulunamad.</B></FONT></P></BODY></HTML>";
+ Text[ language_user1 ] = " ";
+};
+String STR_EXPLORERVIEW
+{
+ Text = "Explorer" ;
+ Text [ ENGLISH ] = "Explorer" ;
+ Text [ english_us ] = "Explorer" ;
+ Text [ portuguese_brazilian ] = "Explorer" ;
+ Text [ swedish ] = "Explorer" ;
+ Text [ danish ] = "Explorer" ;
+ Text [ italian ] = "Explorer" ;
+ Text [ spanish ] = "Explorador" ;
+ Text [ french ] = "Explorer" ;
+ Text [ dutch ] = "Explorer" ;
+ Text [ portuguese ] = "Explorer" ;
+ Text[ chinese_simplified ] = "Դ";
+ Text[ russian ] = "";
+ Text[ polish ] = "Eksplorator";
+ Text[ japanese ] = "۰";
+ Text[ chinese_traditional ] = "ɮ`";
+ Text[ greek ] = "Explorer";
+ Text[ korean ] = "ͽ÷η";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "Explorer";
+ Text[ language_user1 ] = " ";
+};
+ // -----------------------------------------------------------------------
+MessBox MSG_CANT_CLOSE
+{
+ Message = "Das Dokument kann zur Zeit nicht geschlossen werden,\nda noch ein Druckauftrag luft." ;
+ Message [ English ] = "Can't close the document,\na print job is running." ;
+ Message [ english_us ] = "The document cannot be closed, because a\n print job is running." ;
+ Message [ italian ] = "Non possibile chiudere il documento poich,\nc' una stampa in corso." ;
+ Message [ spanish ] = "El documento no se puede cerrar por ahora\nya que todava se est imprimiendo." ;
+ Message [ french ] = "Impossible de fermer le document \nparce que l'imprimante est active." ;
+ Message [ dutch ] = "Het document kan op het moment niet worden gesloten,\ndaarer nog een afdrukopdracht wordt uitgevoerd." ;
+ Message [ swedish ] = "Dokumentet kan inte stngas fr tillfllet\neftersom ett utskriftsuppdrag fortfarande utfrs." ;
+ Message [ danish ] = "Det er for tiden ikke muligt at afslutte programmet,\nfordi et udskriftsjob udfres." ;
+ Message [ portuguese_brazilian ] = "Das Dokument kann zur Zeit nicht geschlossen werden,\nda noch ein Druckauftrag luft." ;
+ Message [ portuguese ] = "De momento impossvel fechar o documento,\n por ainda estar a ser impresso." ;
+ Message[ chinese_simplified ] = "Ŀǰ޷رļ\nΪִһӡ";
+ Message[ russian ] = " ,\n.. .";
+ Message[ polish ] = "Dokumentu nie mona teraz zamkn,\nponiewa wykonywane s zadania wydruku.";
+ Message[ japanese ] = "̂\n޷Â邱Ƃ͂ł܂B";
+ Message[ chinese_traditional ] = "b@ӦCLu@A\nLkoӤC";
+ Message[ greek ] = " \n .";
+ Message[ korean ] = "μ۾ ̱ \n ϴ.";
+ Message[ arabic ] = " \n .";
+ Message[ turkish ] = "Belge, devam eden bir yazdrma ii nedeniyle\nu an kapatlamyor.";
+ Message[ language_user1 ] = " ";
+};
+ // DLG_PRINTMONITOR ------------------------------------------------------
+
+#define DLG_PRINTMONITOR_TEXT \
+ Text = "Druckmonitor" ; \
+ Text [ english ] = "Print Monitor" ; \
+ Text [ dutch ] = "Afdrukmonitor" ; \
+ Text [ english_us ] = "Print Monitor" ; \
+ Text [ italian ] = "Controllo stampa" ; \
+ Text [ spanish ] = "Monitor de impresin" ; \
+ Text [ french ] = "Moniteur d'impression" ; \
+ Text [ swedish ] = "Utskriftsmonitor" ; \
+ Text [ danish ] = "Udskriftsskrm" ; \
+ Text [ portuguese_brazilian ] = "O monitor de impresso" ; \
+ Text [ portuguese ] = "Monitor de impresso" ; \
+ TEXT [ finnish ] = "Tulostuksen tarkkailu" ; \
+ TEXT[ chinese_simplified ] = "ӡ"; \
+ TEXT[ russian ] = " "; \
+ TEXT[ polish ] = "Monitor wydruku"; \
+ TEXT[ japanese ] = ""; \
+ TEXT[ chinese_traditional ] = "CLʵ"; \
+ TEXT[ greek ] = " "; \
+ TEXT[ korean ] = "μ "; \
+ TEXT[ arabic ] = " "; \
+ TEXT[ turkish ] = "Yazc penceresi";
+
+ModelessDialog DLG_PRINTMONITOR
+{
+ HelpID = HID_PRINTMONITOR ;
+ OutputSize = TRUE ;
+ SVLook = TRUE ;
+ Hide = TRUE ;
+ Moveable = TRUE;
+ Size = MAP_APPFONT ( 112 , 81 ) ;
+ DLG_PRINTMONITOR_TEXT
+ FixedText FT_DOCNAME
+ {
+ Pos = MAP_APPFONT ( 6 , 6 ) ;
+ Size = MAP_APPFONT ( 100 , 10 ) ;
+ Center = TRUE ;
+ };
+ FixedText FT_PRINTING
+ {
+ Pos = MAP_APPFONT ( 6 , 19 ) ;
+ Size = MAP_APPFONT ( 100 , 10 ) ;
+ Center = TRUE ;
+ TEXT = "wird ausgegeben auf" ;
+ TEXT [ English ] = "is being printed on" ;
+ TEXT [ italian ] = "viene stampato su" ;
+ TEXT [ portuguese_brazilian ] = "est sendo impresso na" ;
+ TEXT [ portuguese ] = "est a ser impresso na" ;
+ TEXT [ finnish ] = "tulostetaan laitteella " ;
+ TEXT [ danish ] = "udskrives p" ;
+ TEXT [ french ] = "en cours d'impression sur" ;
+ TEXT [ swedish ] = "skrivs ut p" ;
+ TEXT [ dutch ] = "wordt afgedrukt op" ;
+ TEXT [ spanish ] = "se est imprimiendo en" ;
+ TEXT [ english_us ] = "is being printed on" ;
+ TEXT[ chinese_simplified ] = "Ĵӡ豸";
+ TEXT[ russian ] = " ";
+ TEXT[ polish ] = "bdzie przedstawiony jako";
+ TEXT[ japanese ] = "";
+ TEXT[ chinese_traditional ] = "CL]ƬO";
+ TEXT[ greek ] = " ";
+ TEXT[ korean ] = "µ ";
+ TEXT[ arabic ] = " ";
+ TEXT[ turkish ] = "ktnn alnd yer";
+ TEXT[ language_user1 ] = " ";
+ };
+ FixedText FT_PRINTER
+ {
+ Pos = MAP_APPFONT ( 6 , 32 ) ;
+ Size = MAP_APPFONT ( 100 , 10 ) ;
+ Center = TRUE ;
+ };
+ FixedText FT_PRINTINFO
+ {
+ Pos = MAP_APPFONT ( 6 , 45 ) ;
+ Size = MAP_APPFONT ( 100 , 10 ) ;
+ Center = TRUE ;
+ };
+ CancelButton PB_CANCELPRNMON
+ {
+ Pos = MAP_APPFONT ( 31 , 61 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ };
+};
+
+ // MSG_ERROR_SEND_MAIL ---------------------------------------------------
+
+InfoBox MSG_ERROR_SEND_MAIL
+{
+ BUTTONS = WB_OK ;
+ DEFBUTTON = WB_DEF_OK ;
+ MESSAGE = "Fehler beim Versenden der Nachricht." ;
+ MESSAGE [ English ] = "Error while sending mail." ;
+ MESSAGE [ norwegian ] = "Feil ved sending av mail." ;
+ MESSAGE [ italian ] = "Errore durante l'invio di un messaggio." ;
+ MESSAGE [ portuguese_brazilian ] = "Erro ao enviar correio." ;
+ MESSAGE [ portuguese ] = "Erro ao enviar correio." ;
+ MESSAGE [ finnish ] = "Virhe shkpostia lhetettess." ;
+ MESSAGE [ danish ] = "Fejl ved afsendelse af meddelelsen." ;
+ MESSAGE [ french ] = "Erreur lors de l'envoi du message." ;
+ MESSAGE [ swedish ] = "Fel vid sndning av meddelande." ;
+ MESSAGE [ dutch ] = "Fout bij het verzenden van het bericht." ;
+ MESSAGE [ spanish ] = "Error al enviar el mensaje." ;
+ MESSAGE [ english_us ] = "Error sending mail." ;
+ MESSAGE[ chinese_simplified ] = "ڼķʼʱһ";
+ MESSAGE[ russian ] = " .";
+ MESSAGE[ polish ] = "Bd przy przesyaniu wiadomoci.";
+ MESSAGE[ japanese ] = "үނ̑M̴װ";
+ MESSAGE[ chinese_traditional ] = "bǰeoӤɵoͤ@ӿ~C";
+ MESSAGE[ greek ] = " .";
+ MESSAGE[ korean ] = "޽ ߻";
+ MESSAGE[ arabic ] = " ";
+ MESSAGE[ turkish ] = "Posta gnderirken hata olutu.";
+ MESSAGE[ language_user1 ] = " ";
+};
+
+ // DLG_MAILDIALOG --------------------------------------------------------
+
+ModalDialog RID_MAILATTACHDOC_DLG
+{
+ HelpID = SID_MAIL_SENDDOC ;
+ OutputSize = TRUE ;
+ SVLook = TRUE ;
+ Size = MAP_APPFONT ( 248 , 88 ) ;
+ Text = "Nachricht senden" ;
+ Text [ ENGLISH ] = "Send mail" ;
+ Text [ dutch ] = "Bericht sturen" ;
+ Text [ english_us ] = "Send Mail" ;
+ Text [ swedish ] = "Skicka meddelande" ;
+ Text [ danish ] = "Send meddelelse" ;
+ Text [ italian ] = "Invia messaggio" ;
+ Text [ spanish ] = "Enviar mensaje" ;
+ Text [ french ] = "Envoyer le message" ;
+ Text [ portuguese ] = "Enviar correio" ;
+ Text [ portuguese_brazilian ] = "Nachricht senden" ;
+ Moveable = TRUE ;
+ FixedText FT_DOC
+ {
+ Pos = MAP_APPFONT ( 12 , 14 ) ;
+ Size = MAP_APPFONT ( 168 , 10 ) ;
+ };
+ RadioButton BTN_ATTACH
+ {
+ Pos = MAP_APPFONT ( 12 , 27 ) ;
+ Size = MAP_APPFONT ( 168 , 10 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? ~Anhngen : ~Anhngen */
+ Text = "~Anhngen" ;
+ Text [ English ] = "~Attach" ;
+ Text [ english_us ] = "~Attach" ;
+ Text [ swedish ] = "Bifog~a" ;
+ Text [ danish ] = "Vedhft" ;
+ Text [ italian ] = "~Allega" ;
+ Text [ spanish ] = "~Adjuntar" ;
+ Text [ french ] = "~Joindre" ;
+ Text [ dutch ] = "~Toevoegen" ;
+ Text [ portuguese_brazilian ] = "~Anhngen" ;
+ Text [ portuguese ] = "A~nexar" ;
+ Text[ chinese_simplified ] = "(~A)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Zacz";
+ Text[ japanese ] = "Yt(~A)";
+ Text[ chinese_traditional ] = "[(~A)";
+ Text[ greek ] = "~";
+ Text[ korean ] = "÷(~A)";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "~Ekle";
+ Text[ language_user1 ] = " ";
+ };
+ Text[ chinese_simplified ] = "ķʼ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Wylij wiadomo";
+ Text[ japanese ] = "үނ̑M";
+ Text[ chinese_traditional ] = "ǰeqll";
+ RadioButton BTN_SAVE_AND_ATTACH
+ {
+ Hide = TRUE ;
+ Pos = MAP_APPFONT ( 12 , 27 ) ;
+ Size = MAP_APPFONT ( 168 , 10 ) ;
+ Text = "~Speichern und anhngen" ;
+ Text [ English ] = "~Save and attach" ;
+ Text [ english_us ] = "~Save and attach" ;
+ Text [ swedish ] = "~Spara och bifoga" ;
+ Text [ danish ] = "Gem og vedhft" ;
+ Text [ italian ] = "~Salva e allega" ;
+ Text [ spanish ] = "~Guardar y adjuntar" ;
+ Text [ french ] = "En~registrer et joindre" ;
+ Text [ dutch ] = "~Opslaan en toevoegen" ;
+ Text [ portuguese_brazilian ] = "~Speichern und anhngen" ;
+ Text [ portuguese ] = "~Guardar e anexar" ;
+ Text[ chinese_simplified ] = "̺ͼӸ(~S)";
+ Text[ russian ] = " ";
+ Text[ polish ] = "~Zapisz i zacz";
+ Text[ japanese ] = "ۑēYt(~S)";
+ Text[ chinese_traditional ] = "xsM[(~S)";
+ Text[ greek ] = "~ ";
+ Text[ korean ] = "ϰ ÷ϱ(~S)";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "~Kaydet ve ilitir";
+ };
+ RadioButton BTN_MAILBODY
+ {
+ Pos = MAP_APPFONT ( 12 , 40 ) ;
+ Size = MAP_APPFONT ( 168 , 10 ) ;
+ Text = "A~ls Nachrichteninhalt verwenden" ;
+ Text [ English ] = "Use as ~mailbody" ;
+ Text [ english_us ] = "As ~mail content" ;
+ Text [ portuguese_brazilian ] = "A~ls Nachrichteninhalt verwenden" ;
+ Text [ swedish ] = "Anvnd som medde~landeinnehll" ;
+ Text [ danish ] = "Brug som meddelelsesindhold" ;
+ Text [ italian ] = "Usa come ~contenuto messaggio " ;
+ Text [ spanish ] = "~Como contenido del mensaje" ;
+ Text [ french ] = "Utiliser comme c~ontenu de message" ;
+ Text [ dutch ] = "A~ls mailinhoud gebruiken" ;
+ Text [ portuguese ] = "~Como contedo de mensagens" ;
+ Text[ chinese_simplified ] = "ʼ(~M)";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Zastosuj jako tre wiadomoci";
+ Text[ japanese ] = "үނ̓eƂĎgp(~M)";
+ Text[ chinese_traditional ] = "@l󤺮eϥ(~M)";
+ Text[ greek ] = " ";
+ Text[ korean ] = " (~M)";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "Posta ierii olarak kullan";
+ Text[ language_user1 ] = " ";
+ };
+ RadioButton BTN_SAVE_AND_MAILBODY
+ {
+ Hide = TRUE ;
+ Pos = MAP_APPFONT ( 12 , 40 ) ;
+ Size = MAP_APPFONT ( 168 , 10 ) ;
+ Text = "S~peichern und als Nachrichteninhalt verwenden" ;
+ Text [ English ] = "Sa~ve and use as mailbody" ;
+ Text [ portuguese_brazilian ] = "S~peichern und als Nachrichteninhalt verwenden" ;
+ Text [ swedish ] = "S~para och anvnd som meddelandeinnehll" ;
+ Text [ danish ] = "Gem og brug som meddelelsesindhold" ;
+ Text [ italian ] = "~Salva e usa come contenuto di messaggio" ;
+ Text [ spanish ] = "Gu~ardar y usar como contenido del mensaje" ;
+ Text [ french ] = "En~registrer et utiliser en tant que contenu de message" ;
+ Text [ dutch ] = "Opslaan en als ~mailinhoud gebruiken" ;
+ Text [ portuguese ] = "~Guardar e usar como contedo de mensagem" ;
+ Text [ english_us ] = "Sa~ve and use as mail content" ;
+ Text[ chinese_simplified ] = "̲ҵʼʹ(~V)";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Zapisz i uyj jako zawartoci wiadomoci";
+ Text[ japanese ] = "ۑүޓeƂĎgp(~V)";
+ Text[ chinese_traditional ] = "xsM@qll󤺮eϥ(~V)";
+ Text[ greek ] = " ~ ";
+ Text[ korean ] = "ϰ (~V)";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "Kaydet ve ileti ierii olarak kullan";
+ };
+ RadioButton BTN_SELECTION
+ {
+ Pos = MAP_APPFONT ( 12 , 53 ) ;
+ Size = MAP_APPFONT ( 168 , 10 ) ;
+ Text = "A~uswahl verwenden" ;
+ Text [ English ] = "~Use selection" ;
+ Text [ english_us ] = "~Use selection" ;
+ Text [ portuguese_brazilian ] = "A~uswahl verwenden" ;
+ Text [ swedish ] = "Anvnd ~urval" ;
+ Text [ danish ] = "Anvend udvalg" ;
+ Text [ italian ] = "Usa selezione" ;
+ Text [ spanish ] = "Utilizar la ~seleccin" ;
+ Text [ french ] = "Utiliser uniquement la ~slection" ;
+ Text [ dutch ] = "~Selectie gebruiken" ;
+ Text [ portuguese ] = "Usar s~eleco" ;
+ Text[ chinese_simplified ] = "ʹѡе(~U)";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Zastosuj wybr";
+ Text[ japanese ] = "I̎gp(~U)";
+ Text[ chinese_traditional ] = "ϥοe(~U)";
+ Text[ greek ] = "~ ";
+ Text[ korean ] = " ϱ(~U)";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "Seimi kullan";
+ Text[ language_user1 ] = " ";
+ };
+ RadioButton BTN_NO_ATTACH
+ {
+ Pos = MAP_APPFONT ( 12 , 66 ) ;
+ Size = MAP_APPFONT ( 168 , 10 ) ;
+ Text = "~Nicht verwenden" ;
+ Text [ English ] = "~Do not use" ;
+ Text [ english_us ] = "~Do not use" ;
+ Text [ portuguese_brazilian ] = "~Nicht verwenden" ;
+ Text [ swedish ] = "Anvnd i~nte" ;
+ Text [ danish ] = "Anvend ikke" ;
+ Text [ italian ] = "~Non usare" ;
+ Text [ spanish ] = "~No usar" ;
+ Text [ french ] = "~Ne pas utiliser" ;
+ Text [ dutch ] = "~Niet gebruiken" ;
+ Text [ portuguese ] = "~No usar" ;
+ Text[ chinese_simplified ] = "(~D)";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Nie uywaj";
+ Text[ japanese ] = "gpȂ(~D)";
+ Text[ chinese_traditional ] = "nϥ(~D)";
+ Text[ greek ] = "~ ";
+ Text[ korean ] = " ʱ(~D)";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "Kullanma";
+ Text[ language_user1 ] = " ";
+ };
+ GroupBox GB_DOC
+ {
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 180 , 79 ) ;
+ Text = "Dokument" ;
+ Text [ English ] = "Document" ;
+ Text [ english_us ] = "Document" ;
+ Text [ swedish ] = "Dokument" ;
+ Text [ danish ] = "Dokument" ;
+ Text [ italian ] = "Documento" ;
+ Text [ spanish ] = "Documento" ;
+ Text [ french ] = "Document" ;
+ Text [ dutch ] = "Document" ;
+ Text [ portuguese_brazilian ] = "Dokument" ;
+ Text [ portuguese ] = "Documento" ;
+ Text[ chinese_simplified ] = "ļ";
+ Text[ russian ] = "";
+ Text[ polish ] = "Dokument";
+ Text[ japanese ] = "޷";
+ Text[ chinese_traditional ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "Belge";
+ Text[ language_user1 ] = " ";
+ };
+ OKButton BTN_OK
+ {
+ Pos = MAP_APPFONT ( 192 , 6 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ DefButton = TRUE ;
+ };
+ CancelButton BTN_CANCEL
+ {
+ Pos = MAP_APPFONT ( 192 , 23 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ };
+ HelpButton BTN_HELP
+ {
+ Pos = MAP_APPFONT ( 192 , 43 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ };
+ Text[ greek ] = " ";
+ Text[ korean ] = " ";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "Posta gnder";
+ Text[ language_user1 ] = " ";
+};
+ // ErrorBox --------------------------------------------------------------
+ErrorBox ERRBOX_SFX_INVALID_MERGEOPT
+{
+ BUTTONS = WB_OK ;
+ DEFBUTTON = WB_DEF_OK ;
+ /* ### ACHTUNG: Neuer Text in Resource? Um eine Nachricht ber das Internet zu verschicken,\nwird Ihre Email-Adresse und ein SMTP-Server zum Versand bentigt.\nBitte tragen Sie diese Einstellungen unter\n\"Extras\\Optionen\\Allgemein...\\Benutzerdaten\\Email\" und\n\"Extras\\Optionen\\Internet\\Mail/News\\Nachrichtenversand\" ein,\nbevor Sie erneut eine Nachricht verschicken wollen. : Um eine Nachricht ber das Internet zu verschicken,\nwird Ihre Email-Adresse und ein SMTP-Server zum Versand bentigt.\nBitte tragen Sie diese Einstellungen unter\n\"Extras\\Optionen\\Allgemein...\\Allgemeines\\Email\" und\n\"Extras\\Optionen\\Internet\\Mail/News\\Nachrichtenversand\" ein,\nbevor Sie erneut eine Nachricht verschicken wollen. */
+ /* ### ACHTUNG: Neuer Text in Resource? Um eine Nachricht ber das Internet zu verschicken,\nwird Ihre Email-Adresse und ein SMTP-Server zum Versand bentigt.\nBitte tragen Sie diese Einstellungen unter\n\"Extras\\Optionen\\Allgemein...\\Benutzerdaten\\Email\" und\n\"Extras\\Optionen\\Internet\\Mail/News\\Nachrichtenversand\" ein,\nbevor Sie erneut eine Nachricht verschicken wollen. : Um eine Nachricht ber das Internet zu verschicken,\nwird Ihre Email-Adresse und ein SMTP-Server zum Versand bentigt.\nBitte tragen Sie diese Einstellungen unter\n\"Extras\\Optionen\\Allgemein...\\Benutzerdaten\\Email\" und\n\"Extras\\Optionen\\Internet\\Mail/News\\Nachrichtenversand\" ein,\nbevor Sie erneut eine Nachricht verschicken wollen. */
+ Message = "Um eine Nachricht ber das Internet zu verschicken,\nwird Ihre E-Mail-Adresse und ein SMTP-Server zum Versand bentigt.\nBitte tragen Sie diese Einstellungen unter\n\"Extras\\Optionen\\Allgemein...\\Benutzerdaten\\E-Mail\" und\n\"Extras\\Optionen\\Internet\\Mail/News\\Nachrichtenversand\" ein,\nbevor Sie erneut eine Nachricht verschicken wollen." ;
+ Message [ English ] = "Before sending mail or news messages, you must\nspecify your email address and a SMTP server.\nPlease write your address down in\n\"Extras\\Options\\General...\\User Data\\Email\" and\n\"Extras\\Options\\Internet\\Mail/News\\Message dispatch\".\nThen try again sending this message." ;
+ Message [ english_us ] = "Before sending mail or news messages, you must\nspecify your e-mail address and an SMTP server.\nPlease enter the required settings under \n\"Tools\\Options\\General...\\User Data\\E-Mail\" and\n\"Tools\\Options\\Internet\\Mail/News\\Outgoing Mail\".\nThen try sending this message again." ;
+ Message [ portuguese_brazilian ] = "Um eine Nachricht ber das Internet zu verschicken,\nwird Ihre Email-Adresse und ein SMTP-Server zum Versand bentigt.\nBitte tragen Sie diese Einstellungen unter\n\"Extras\\\\Optionen\\\\Allgemein...\\\\Allgemeines\\\\Email\" und\n\"Extras\\\\Optionen\\\\Internet\\\\Mail/News\\\\Nachrichtenversand\" ein,\nbevor Sie erneut eine Nachricht verschicken wollen." ;
+ Message [ swedish ] = "Fr att ett meddelande skall kunna skickas via Internet,\nbehvs Din e-postadress och en SMTP-server.\nVar vnlig och fr in dessa instllningar under\n\"Verktyg\\Alternativ\\Allmnt...\\Anvndardata\\E-post\" och\n\"Verktyg\\Alternativ\\Internet\\E-post/Nyheter\\Meddelandesndning\"\ninnan Du skickar ett meddelande igen." ;
+ Message [ danish ] = "For at kunne sende en meddelelse over Internet\nkrves din e-mail-adresse og en SMTP-server.\nIndtast disse indstillinger under\n\"Funktioner\\Indstillinger\\Generelt...\\Brugerdata\\E-mail\" og\n\"Funktioner\\Indstillinger\\Internet\\E-mail/Nyheder/Nyhedsafsendelse\",\nfr du igen sender en meddelelse." ;
+ Message [ italian ] = "Per poter inviare un messaggio tramite Internet,\n necessario un indirizzo di eMail e un server SMTP.\nSpecificate queste impostazioni in\n\"Strumenti\\Opzioni\\Generale...\\Dati utente\\eMail\" e in\n\"Strumenti\\Opzioni\\Internet\\Mail/News\\\\Invio messaggi\",\nprima di inviare nuovamente un messaggio." ;
+ Message [ spanish ] = "Para enviar un mensaje a travs de Internet\nse necesitan su direccin de correo electrnico y un servidor SMTP para el envo.\nAntes de enviar el prximo mensaje, introduzca por favor estas informaciones en\n\"Herramientas\\Opciones\\Generales...\\Datos de usuario\\E-mail y en\n\"Herramientas\\Opciones\\Internet\\Correo/Noticias\\Correo saliente\"." ;
+ Message [ french ] = "Pour envoyer un message via Internet \nle programme ncessite une adresse e-mail et un serveur SMTP.\nVeuillez indiquer ces paramtres sous \n\"Outils\\Options\\Gnral...\\Identit\\E-mail\" et \"Outils\\Options\\Internet\\Mail/News\\Envoi de messages\" \n avant de refaire une tentative d'envoi de message." ;
+ Message [ dutch ] = "Om een bericht via Internet te versturen,\nwordt uw e-mail adres en een SMTP server benodigd.\nVermeld deze onder \n\"Extra\\Opties\\Algemeen...\\Gebruikersgegevens\\E-mail\" en\n\"Extra\\Opties\\Internet\\Mail/Nieuws\\Berichten versturen\",\nvoordat u opnieuw een bericht stuurt." ;
+ Message [ portuguese ] = "Para o envio de uma mensagem via Internet so necessrios\\ o seu endereo electrnico e um servidor SMTP. Digite o seu endereo em\n\"Ferramentas\\\\Opes\\\\Geral...\\\\Dados do utilizador\\\\e-mail\" e\n\"Ferramentas\\\\Opes\\\\Internet\\\\Correio/Notcias\"\nantes de reenviar a mensagem." ;
+ Message[ chinese_simplified ] = "ʻķʼʱ\nҪĵʼַһSMTP\nڼķʼ֮ǰ˵\n\\ѡ...\\\\û\\ʼ\n͡\\ѡ\\ʻ\\ʼ/\\ķʼй趨ݡ";
+ Message[ russian ] = " ,\n SMTP .\n, , \n\"\\\\...\\ \\. \" \n\"\\\\\\/\\ \",\n .";
+ Message[ polish ] = "Aby wysa wiadomo via Internet,\nwymagany jest twj adres e-mail i serwer SMTP.\nProsz wprowad te ustawienia w \n\"Narzdzia\\\\Opcje\\\\Oglne...\\\\Dane uytkownika\\\\e-mail\" i\n\"Narzdzia\\\\Opcje\\\\Internet\\\\Poczta/Wiadomoci\\\\Wysyanie wiadomoci\",\nzanim ponownie wylesz wiadomo.";
+ Message[ japanese ] = "ȯĂүނ𑗐Mɂ\nE-mailڽSMTP ްKvłB\nүނđMO\n̐ݒ\n[°\\߼\\S...\\հްް \\E-mail]\n[°\\߼\\ȯ\\Ұ/ƭ\\үޑM]ɓo^ĉB";
+ Message[ chinese_traditional ] = "zL Internet ǰeqll\nݭnzqlla}M@ SMTP AC\nЦbsǰeqll󤧫eb\nu\\ﶵ\\@...\\ϥΪ̸ơMu\\ﶵ\\Internet\\qll/sD\\ǰeqll󡨳B@]wC";
+ Message[ greek ] = " Internet\n E-mail SMTP.\n \n\"\\\\...\\ \\E-Mail\" \n\"\\\\Internet\\/\\ \".\n .";
+ Message[ korean ] = "޽ ͳ \nE-Mail ּҿ SMTP ʿմϴ. \n ޽ \n\"\\ɼ\\Ϲ...\\ \\E-Mail\" \n\"\\ɼ\\ͳ\\/\\޽ \" Ͽ ԷϽʽÿ.";
+ Message[ arabic ] = " ʡ\n SMTP.\n \n\"//.../ / \" \n\"/// \\ / \"\n .";
+ Message[ language_user1 ] = " ";
+ Message[ turkish ] = "Internet zerinden ileti gnderebilmek iin nce\n e-posta adresinizi ve bir SMTP sunucusu belirtmeniz gerekiyor.\nleti gndermeden nce bu ayarlar iin,\n\"Aralar\\Seenekler\\Genel...\\Kullanc\\E-Posta\" ve\n\"Aralar\\Seenekler\\Internet\\E-Posta/Haber Grubu\\Giden Posta\" \nalanlarna girin.";
+};
+ErrorBox ERRBOX_SFX_NO_OUTBOX
+{
+ BUTTONS = WB_OK ;
+ DEFBUTTON = WB_DEF_OK ;
+ Message = "Fr die von Ihnen gewhlte Aktion wird ein Ausgangskorb bentigt.\nBitte legen Sie einen Ausgangskorb an, bevor Sie diese Aktion erneut ausfhren." ;
+ Message [ English ] = "You need an outbox for this aktion.\nPlease create an outbox, before trying again." ;
+ Message [ english_us ] = "To perform this action an outbox is required.\nPlease create an outbox prior to executing this action again." ;
+ Message [ portuguese_brazilian ] = "Fr die von Ihnen gewhlte Aktion wird ein Ausgangskorb bentigt.\nBitte legen Sie einen Ausgangskorb an, bevor Sie diese Aktion erneut ausfhren." ;
+ Message [ swedish ] = "Du behver en utkorg fr tgrden som Du har valt.\nVar vnlig och skapa en utkorg innan Du utfr den hr tgrden igen." ;
+ Message [ danish ] = "Du har brug for en udbakke for at kunne udfre denne handling.\nOpret venligst en udbakke, fr du gentager denne handling." ;
+ Message [ italian ] = "Per effettuare l'operazione scelta dall'utente, si necessita della posta in uscita.\nPrima di provare a rieffettuare tale operazione creare una posta in uscita." ;
+ Message [ spanish ] = "Se necesitar una carpeta de salida para ejecutar esta accin.\nPor favor cree una carpeta de salida antes de reiniciar la accin." ;
+ Message [ french ] = "Une bote d'envoi est ncessaire pour excuter cette action.\nCrez une bote d'envoi avant de ressayer." ;
+ Message [ dutch ] = "Voor de door u verlangde activiteit is een postvak UIT nodig.\nMaak een postvak UIT voordat u deze opdracht opnieuw selecteert." ;
+ Message [ portuguese ] = " necessria uma caixa de envio para executar esta aco.\nCrie primeiro uma caixa de envio e tente novamente." ;
+ Message[ chinese_simplified ] = "ִǰѾһ䡣\nڽһִ֮";
+ Message[ russian ] = " \"\".\n , , , \"\".";
+ Message[ polish ] = "Dla wybranej przez ciebie akcji potrzebna jest skrzynka nadawcza.\nProsz utwrz skrzynk nadawcz, zanim wykonasz ponownie t akcj.";
+ Message[ japanese ] = "Iꂽ݂ŝɑMڲKvłB\ṉ݂ĎsOɁAMڲi[ĉB";
+ Message[ chinese_traditional ] = "oӾާ@nDztm@ӱHXC\nбzإߤ@ӱHXAMZbsoөROC";
+ Message[ greek ] = " ''\n .";
+ Message[ korean ] = " ۾ ʿմϴ. \n ۾ ϱ ʽÿ.";
+ Message[ arabic ] = " .\n ʡ .";
+ Message[ turkish ] = "Setiiniz ilem iin giden kutusu gerekiyor.\nBu ilemi yeniden yrtmeden nce giden kutusunu oluturun.";
+ Message[ language_user1 ] = " ";
+};
+ // QueryBoxen ------------------------------------------------------------
+QueryBox MSG_QUERY_OPENASTEMPLATE
+{
+ Buttons = WB_YES_NO ;
+ DefButton = WB_DEF_NO ;
+ /* ### ACHTUNG: Neuer Text in Resource? Das Dokument kann (z.B. aufgrund fehlender Rechte)\nnicht zum Bearbeiten geffnet werden. Soll es als Vorlage\nfr ein neues Dokument verwendet werden? : Das Dokument kann (z.B. aufgrund fehlernder Rechte)\nnicht zum bearbeiten geffnet werden. Soll es als Vorlage\nfr ein neues Dokument verwendet werden? */
+ /* ### ACHTUNG: Neuer Text in Resource? Das Dokument kann (z.B. aufgrund fehlender Rechte)\nnicht zum Bearbeiten geffnet werden. Soll es als Vorlage\nfr ein neues Dokument verwendet werden? : Das Dokument kann (z.B. aufgrund fehlernder Rechte)\nnicht zum bearbeiten geffnet werden. Soll es als Vorlage\nfr ein neues Dokument verwendet werden? */
+ /* ### ACHTUNG: Neuer Text in Resource? Das Dokument kann (z.B. aufgrund fehlender Rechte)\nnicht zum Bearbeiten geffnet werden. Soll es als Vorlage\nfr ein neues Dokument verwendet werden? : Das Dokument kann (z.B. aufgrund fehlender Rechte)\nnicht zum Bearbeiten geffnet werden. Soll es als Vorlage\nfr ein neues Dokument verwendet werden? */
+ Message = "Das Dokument kann (z.B. aufgrund fehlender Rechte)\nnicht zum Bearbeiten geffnet werden. Soll es als Vorlage\nfr ein neues Dokument verwendet werden?" ;
+ Message [ English ] = "Can't open the document for edit, possibly due to\nmissing access rights. Should be used as template\nfor a new document?" ;
+ Message [ portuguese ] = "O documento no pode ser aberto para edio (por ex. devido \n falta de direitos de acesso). Deseja us-lo como modelo\npara abrir um novo documento?" ;
+ Message [ english_us ] = "Document cannot be opened for editing, possibly due to\nmissing access rights. Do you want to use it as a template\nfor a new document?" ;
+ Message [ portuguese_brazilian ] = "Das Dokument kann (z.B. aufgrund fehlernder Rechte)\nnicht zum bearbeiten geffnet werden. Soll es als Vorlage\nfr ein neues Dokument verwendet werden?" ;
+ Message [ swedish ] = "Dokumentet kan inte ppnas fr redigering\n(t ex drfr att rttigheter saknas). Skall det anvndas\n som mall fr ett nytt dokument?" ;
+ Message [ danish ] = "Det er ikke muligt at bne dokumentet til redigering\n(muligvis har du ingen adgangsrettigheder). Skal det\nanvendes som skabelon for et nyt dokument?" ;
+ Message [ italian ] = "Il documento (ad esempio per la mancanza di diritti)\nnon pu essere aperto per la modifica. Lo si vuole usare come modello \nper un nuovo documento?" ;
+ Message [ spanish ] = "No es posible abrir el documento \npara la edicin (p.ej. por falta de derechos). Desea usarlo como plantilla \npara un nuevo documento?" ;
+ Message [ french ] = "Impossible de charger le document en mode d'criture\n(droits d'accs insuffisants). Souhaitez-vous l'utiliser comme\nmodle pour crer un nouveau document ?" ;
+ Message [ dutch ] = "Het document kan (b.v. vanwege ontbrekende rechten)\nniet geopend worden ter bewerking. Wilt u het als sjabloon\nvoor een nieuw document gebruiken?" ;
+ Message[ chinese_simplified ] = "ļܱ򿪱༭(ûûʹȨ)\nҪʹʽ\nһļ";
+ Message[ russian ] = " \n( - ). \n ?";
+ Message[ polish ] = "Dokumentu nie mona (n.p. z powodu brakujcych praw)\notworzy do edycji. Czy uy tego dokumentu jako szablonu \ndla nowego dokumentu?";
+ Message[ japanese ] = "޷Ă(ȂȂǂ)\nҏWpɊJ܂BV޷ėp\nڰĂƂĎg܂?";
+ Message[ chinese_traditional ] = "Lk}ҽsoӤ(ʤŪvO)C\nznϥγoӼ˦ӫإߤ@ӷsH";
+ Message[ greek ] = " \n (.. ). \n ;";
+ Message[ korean ] = " ( ׼ )\n ϴ. Ϸ Ͻðڽϱ?";
+ Message[ arabic ] = " ( \n ). \n Ͽ";
+ Message[ turkish ] = "Belge (muhtemelen eriim hakk olmamas nedeniyle)\n dzenleme iin alamyor. Belgeyi yeni bir\nbelge iin ablon olarak kullanmak istiyor musunuz?";
+ Message[ language_user1 ] = " ";
+};
+String STR_FRAMESIZE
+{
+ Text = "Frame-Gre" ;
+ Text [ english_us ] = "Frame Size" ;
+ Text [ portuguese_brazilian ] = "Frame-Gre" ;
+ Text [ swedish ] = "Ramstorlek" ;
+ Text [ danish ] = "Frame-strrelse" ;
+ Text [ italian ] = "Dimensione frame" ;
+ Text [ spanish ] = "Tamao del frame" ;
+ Text [ french ] = "Taille du Frame" ;
+ Text [ dutch ] = "Kadergrootte" ;
+ Text [ portuguese ] = "Tamanho da moldura" ;
+ Text[ chinese_simplified ] = "С";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Wielko ramki";
+ Text[ japanese ] = "ڰ ";
+ Text[ chinese_traditional ] = "Tؤjp";
+ Text[ greek ] = " Frame";
+ Text[ korean ] = " ũ";
+ Text[ arabic ] = " Frame";
+ Text[ turkish ] = "Frame boyutu";
+ Text[ language_user1 ] = " ";
+};
+String RID_EXTERNALFRAME_TOOLBOX
+{
+ TEXT = "Funktionsleiste" ;
+ TEXT [ english ] = "Function bar" ;
+ Text [ dutch ] = "Werkbalk" ;
+ Text [ english_us ] = "Function Bar" ;
+ Text [ italian ] = "Barra delle funzioni" ;
+ Text [ spanish ] = "Barra de funciones" ;
+ Text [ french ] = "Barre de fonctions" ;
+ Text [ swedish ] = "Funktionslist" ;
+ Text [ danish ] = "Funktionslinje" ;
+ Text [ portuguese_brazilian ] = "Funktionsleiste" ;
+ Text [ portuguese ] = "Barra de funes" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Pasek funkcji";
+ Text[ japanese ] = "̧ݸ ް";
+ Text[ chinese_traditional ] = "uC";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "Ara ubuu";
+ Text[ language_user1 ] = " ";
+};
+ToolBox RID_EXTERNALFRAME_TOOLBOX
+{
+ HelpId = RID_EXTERNALFRAME_TOOLBOX ;
+ ButtonType = BUTTON_SYMBOL ;
+ LineSpacing = TRUE ;
+ Border = TRUE ;
+ Scroll = TRUE ;
+ SVLook = TRUE ;
+ Dockable = TRUE ;
+ Moveable = TRUE ;
+ Sizeable = TRUE ;
+ Closeable = TRUE ;
+ Zoomable = TRUE ;
+ Customize = TRUE ;
+ FloatingMode = FALSE ;
+ Hide = TRUE ;
+ HideWhenDeactivate = TRUE ;
+ Align = BOXALIGN_TOP ;
+ ItemList =
+ {
+ ToolBoxItem
+ {
+ Identifier = SID_TOPDOC ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_OPENURL ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SEPARATOR ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_BROWSE_BACKWARD ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_BROWSE_FORWARD ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_BROWSE_STOP ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_BROWSE_HOME ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SEPARATOR ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_RELOAD ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_EDITDOC ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SEPARATOR ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_OPENDOC ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_SAVEDOC ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_MAIL_SEND ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_PRINTDOCDIRECT ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SEPARATOR ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_CUT ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_COPY ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_PASTE ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SEPARATOR ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_UNDO ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_REDO ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SEPARATOR ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_EXPLORER ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_BROWSER ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_NAVIGATOR ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_STYLE_DESIGNER ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_HELP_PI ;
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SEPARATOR ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_INTERNET_ONLINE ;
+ };
+ ToolBoxItem
+ {
+ Identifier = SID_CLOSEDOC ;
+ };
+ };
+};
+
+String STR_FORWARDMAIL
+{
+ Text = "Per Regel weitergeleitete Nachricht.\nDie Originalnachricht als Anhang." ;
+ Text[English] = "Per Regel weitergeleitete Nachricht.\nDie Originalnachricht als Anhang." ;
+ Text[ english_us ] = "Message forwarded by a rule.\nThe original message as attachment.";
+ Text[ portuguese ] = "Mensagem transmitida por regra.\nMensagem original como anexo.";
+ Text[ russian ] = " .\n .";
+ Text[ greek ] = " .\n .";
+ Text[ dutch ] = "Per regel doorgegeven bericht.\nHet originele bericht als aanhangsel.";
+ Text[ french ] = "Message transmis par rgle.\nMessage d'origine en tant que fichier joint.";
+ Text[ spanish ] = "Mensaje transmitido por regla.\nEl mensaje original como anexo.";
+ Text[ italian ] = "Messaggio inoltrato secondo una regola.\nMessaggio originale come allegato.";
+ Text[ danish ] = "Meddelelse som er blevet videresendt iflge en regel.\nDen oprindelige meddelelse er vedhftet.";
+ Text[ swedish ] = "Meddelande som vidarebefordrats per regel.\nOriginalmeddelandet som bilaga.";
+ Text[ polish ] = "Wiadomo przesana dalej wedug reguy.\nOrygina wiadomoci jako zacznik.";
+ Text[ portuguese_brazilian ] = "Per Regel weitergeleitete Nachricht.\nDie Originalnachricht als Anhang.";
+ Text[ japanese ] = "ٰقœ]ꂽүށB\nؼقүނ͓YtƂāB";
+ Text[ korean ] = "Ģ ޵ ޽. \n ޼ ÷η.";
+ Text[ chinese_simplified ] = "תĵĵʼ\nʼԭΪ";
+ Text[ chinese_traditional ] = "zLWhHqllC\nqll@[C";
+ Text[ arabic ] = " .\n .";
+ Text[ turkish ] = "Kurala gre aktarlan ileti.\nEk olarak zgn ileti.";
+};
+
+
diff --git a/sfx2/source/view/viewfac.cxx b/sfx2/source/view/viewfac.cxx
new file mode 100644
index 000000000000..41fa3424bfe2
--- /dev/null
+++ b/sfx2/source/view/viewfac.cxx
@@ -0,0 +1,103 @@
+/*************************************************************************
+ *
+ * $RCSfile: viewfac.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:37 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+// INCLUDE ---------------------------------------------------------------
+
+#pragma hdrstop
+
+#include "app.hxx"
+#include "viewfac.hxx"
+
+// STATIC DATA -----------------------------------------------------------
+
+DBG_NAME(SfxViewFactory);
+
+SfxViewShell *SfxViewFactory::CreateInstance(SfxViewFrame *pFrame, SfxViewShell *pOldSh )
+{
+ DBG_CHKTHIS(SfxViewFactory, 0);
+ return (*fnCreate)(pFrame, pOldSh);
+}
+
+void SfxViewFactory::InitFactory()
+{
+ DBG_CHKTHIS(SfxViewFactory, 0);
+ (*fnInit)();
+}
+
+// CTOR / DTOR -----------------------------------------------------------
+
+SfxViewFactory::SfxViewFactory( SfxViewCtor fnC, SfxViewInit fnI,
+ USHORT nOrdinal, const ResId& aDescrResId ):
+ fnCreate(fnC),
+ fnInit(fnI),
+ nOrd(nOrdinal),
+ aDescription(aDescrResId.GetId(), aDescrResId.GetResMgr())
+{
+ aDescription.SetRT(aDescrResId.GetRT());
+ DBG_CTOR(SfxViewFactory, 0);
+// SFX_APP()->RegisterViewFactory_Impl(*this);
+}
+
+SfxViewFactory::~SfxViewFactory()
+{
+ DBG_DTOR(SfxViewFactory, 0);
+}
+
+
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
new file mode 100644
index 000000000000..9e8a1f1002bc
--- /dev/null
+++ b/sfx2/source/view/viewfrm.cxx
@@ -0,0 +1,3489 @@
+/*************************************************************************
+ *
+ * $RCSfile: viewfrm.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:37 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include "viewfrm.hxx"
+
+#ifndef _IPENV_HXX //autogen
+#include <so3/ipenv.hxx>
+#endif
+#ifndef _SPLITWIN_HXX //autogen
+#include <vcl/splitwin.hxx>
+#endif
+#ifndef _SFXINTITEM_HXX //autogen
+#include <svtools/intitem.hxx>
+#endif
+#ifndef _SFXSTRITEM_HXX //autogen
+#include <svtools/stritem.hxx>
+#endif
+#ifndef _SFXENUMITEM_HXX //autogen
+#include <svtools/eitem.hxx>
+#endif
+#ifndef _SFXSLSTITM_HXX //autogen
+#include <svtools/slstitm.hxx>
+#endif
+#ifndef _SFX_WHITER_HXX //autogen
+#include <svtools/whiter.hxx>
+#endif
+#ifndef _UNDO_HXX //autogen
+#include <svtools/undo.hxx>
+#endif
+#ifndef _MSGBOX_HXX //autogen
+#include <vcl/msgbox.hxx>
+#endif
+#ifndef _SFXECODE_HXX
+#include <svtools/sfxecode.hxx>
+#endif
+#ifndef _EHDL_HXX
+#include <svtools/ehdl.hxx>
+#endif
+#ifndef _XCEPTION_HXX_
+#include <vos/xception.hxx>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XFRAMESSUPPLIER_HPP_
+#include <com/sun/star/frame/XFramesSupplier.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_FRAMESEARCHFLAG_HPP_
+#include <com/sun/star/frame/FrameSearchFlag.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XFRAME_HPP_
+#include <com/sun/star/frame/XFrame.hpp>
+#endif
+#ifndef _COM_SUN_STAR_AWT_XWINDOW_HPP_
+#include <com/sun/star/awt/XWindow.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XCONTROLLER_HPP_
+#include <com/sun/star/frame/XController.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XMODEL_HPP_
+#include <com/sun/star/frame/XModel.hpp>
+#endif
+
+#include <com/sun/star/uno/Reference.h>
+#include <com/sun/star/ucb/XContent.hpp>
+
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::ucb;
+using namespace ::com::sun::star::frame;
+
+#pragma hdrstop
+
+#include "picklist.hxx"
+#include "openflag.hxx"
+#include "objshimp.hxx"
+#include "viewsh.hxx"
+#include "objsh.hxx"
+#include "bindings.hxx"
+#include "dispatch.hxx"
+#include "loadenv.hxx"
+#include "arrdecl.hxx"
+#include "sfxtypes.hxx"
+#include "newhdl.hxx"
+#include "request.hxx"
+#include "docfac.hxx"
+#include "ipfrm.hxx"
+#include "sfxresid.hxx"
+#include "cfgmgr.hxx"
+#include "appbas.hxx"
+#include "objitem.hxx"
+#include "viewfac.hxx"
+#include "stbmgr.hxx"
+#include "event.hxx"
+#include "fltfnc.hxx"
+#include "fsetvwsh.hxx"
+#include "fsetobsh.hxx"
+#include "docfile.hxx"
+#include "interno.hxx"
+#include "module.hxx"
+#include "msgpool.hxx"
+#include "topfrm.hxx"
+#include "urlframe.hxx"
+#include "fsetvwsh.hxx"
+#include "viewimp.hxx"
+#include "sfxbasecontroller.hxx"
+#include "sfx.hrc"
+#include "view.hrc"
+#include <intfrm.hxx>
+#include <frmdescr.hxx>
+#include "appdata.hxx"
+#include "sfxuno.hxx"
+#include "ucbhelp.hxx"
+#include "progress.hxx"
+#include "workwin.hxx"
+#include "helper.hxx"
+#include "tbxconf.hxx"
+
+//-------------------------------------------------------------------------
+DBG_NAME(SfxViewFrame);
+
+#define SfxViewFrame
+#include "sfxslots.hxx"
+
+//-------------------------------------------------------------------------
+
+SFX_IMPL_INTERFACE(SfxViewFrame,SfxShell,SfxResId(0))
+{
+ SFX_CHILDWINDOW_REGISTRATION( SID_PARTWIN );
+}
+
+TYPEINIT2(SfxViewFrame,SfxShell,SfxListener);
+TYPEINIT1(SfxViewFrameItem, SfxPoolItem);
+
+//=========================================================================
+
+struct SfxViewFrame_Impl
+{
+ SvBorder aBorder;
+ Size aMargin;
+ Size aSize;
+ String aViewData;
+ String aFrameTitle;
+ TypeId aLastType;
+ String aActualURL;
+ String aActualPresentationURL;
+ SfxFrame* pFrame;
+ SfxCancelManager* pCancelMgr;
+ AsynchronLink* pReloader;
+ SfxInPlaceFrame* pIPFrame;
+ Window* pWindow;
+ SfxViewFrame* pActiveChild;
+ SfxViewFrame* pParentViewFrame;
+ SfxObjectShell* pImportShell;
+ Window* pFocusWin;
+ sal_uInt16 nDocViewNo;
+ sal_uInt16 nCurViewId;
+ sal_Bool bResizeInToOut:1;
+ sal_Bool bObjLocked:1;
+ sal_Bool bRestoreView:1;
+ sal_Bool bSetViewFrameLocked:1;
+ sal_Bool bReloading:1;
+ sal_Bool bIsDowning:1;
+ sal_Bool bInCtor:1;
+ sal_Bool bModal:1;
+ sal_Bool bEnabled:1;
+
+ SfxViewFrame_Impl()
+ : pReloader(0 )
+ {}
+
+ ~SfxViewFrame_Impl()
+ {
+ delete pReloader;
+ delete pCancelMgr;
+ }
+};
+
+//-------------------------------------------------------------------------
+void SfxViewFrame::SetDowning_Impl()
+{
+ pImp->bIsDowning = sal_True;
+}
+
+//-------------------------------------------------------------------------
+sal_Bool SfxViewFrame::IsDowning_Impl() const
+{
+ return pImp->bIsDowning;
+}
+
+
+//-------------------------------------------------------------------------
+void SfxViewFrame::SetSetViewFrameAllowed_Impl( sal_Bool bSet )
+{
+ pImp->bSetViewFrameLocked = !bSet;
+};
+
+//-------------------------------------------------------------------------
+sal_Bool SfxViewFrame::IsSetViewFrameAllowed_Impl() const
+{
+ return !pImp->bSetViewFrameLocked;
+}
+
+//-------------------------------------------------------------------------
+void SfxViewFrame::SetImportingObjectShell_Impl( SfxObjectShell* pSh )
+{
+ pImp->pImportShell = pSh;
+}
+
+//--------------------------------------------------------------------
+SfxObjectShell* SfxViewFrame::GetImportingObjectShell_Impl() const
+{
+ return pImp->pImportShell;
+}
+
+
+class SfxViewNotificatedFrameList_Impl :
+ public SfxListener, public SfxViewFrameArr_Impl
+{
+public:
+
+ void InsertViewFrame( SfxViewFrame* pFrame )
+ {
+ StartListening( *pFrame );
+ C40_INSERT( SfxViewFrame, pFrame, Count() );
+ }
+ void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
+};
+
+//-------------------------------------------------------------------------
+void SfxViewNotificatedFrameList_Impl::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
+{
+ if ( rHint.IsA(TYPE(SfxSimpleHint)) )
+ {
+ switch( ( (SfxSimpleHint&) rHint ).GetId() )
+ {
+ case SFX_HINT_DYING:
+ SfxViewFrame* pFrame = (SfxViewFrame*) &rBC;
+ if( pFrame )
+ {
+ sal_uInt16 nPos = C40_GETPOS( SfxViewFrame, pFrame );
+ if( nPos != USHRT_MAX )
+ Remove( nPos );
+ }
+ break;
+ }
+ }
+}
+
+//-------------------------------------------------------------------------
+
+long ReloadDecouple_Impl( void* pObj, void* pArg )
+{
+ ((SfxViewFrame*) pObj)->ExecReload_Impl( *(SfxRequest*)pArg );
+ return 0;
+}
+
+void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq, sal_Bool bAsync )
+{
+ if( bAsync )
+ {
+ if( !pImp->pReloader )
+ pImp->pReloader = new AsynchronLink(
+ Link( this, ReloadDecouple_Impl ) );
+ pImp->pReloader->Call( new SfxRequest( rReq ) );
+ }
+ else ExecReload_Impl( rReq );
+}
+
+void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
+{
+ SfxFrame *pParent = GetFrame()->GetParentFrame();
+ if ( rReq.GetSlot() == SID_RELOAD )
+ {
+ if ( pParent )
+ {
+ SfxViewShell *pShell = pParent->GetCurrentViewFrame()->GetViewShell();
+ if( pShell->IsImplementedAsFrameset_Impl() &&
+ pShell->GetInterface()->GetSlot( rReq.GetSlot() ) )
+ {
+ // Hack f"ur Explorer: Reload wird an der ViewShell ausgef"uhrt
+ pShell->ExecuteSlot( rReq );
+ return;
+ }
+ }
+
+ SFX_REQUEST_ARG(rReq, pBoolItem, SfxBoolItem, SID_RELOAD, sal_False);
+ if ( pBoolItem && pBoolItem->GetValue() &&
+ pParent && !(rReq.GetModifier() & KEY_MOD1) )
+ {
+ // Reload "uber UI geht immer "uber TopFrame
+ GetTopViewFrame()->ExecReload_Impl( rReq );
+ return;
+ }
+
+ // Components m"ussen das Reload selbst implementieren
+ if ( GetFrame()->HasComponent() )
+ return;
+
+ // Bei CTRL-Reload den aktiven Frame reloaden
+ SfxViewFrame* pActFrame = this;
+ while ( pActFrame )
+ pActFrame = pActFrame->GetActiveChildFrame_Impl();
+
+ if ( pActFrame )
+ {
+ sal_uInt16 nModifier = rReq.GetModifier();
+ if ( nModifier & KEY_MOD1 )
+ {
+ pActFrame->ExecReload_Impl( rReq );
+ return;
+ }
+ }
+
+ // Wenn nur ein Reload der Graphiken eines oder mehrerer ChildFrames
+ // gemacht werden soll
+ SfxFrame *pFrame = GetFrame();
+ if ( pParent == pFrame && pFrame->GetChildFrameCount() )
+ {
+ sal_Bool bReloadAvailable = sal_False;
+ SfxFrameIterator aIter( *pFrame, sal_False );
+ SfxFrame *pChild = aIter.FirstFrame();
+ while ( pChild )
+ {
+ SfxFrame *pNext = aIter.NextFrame( *pChild );
+ SfxObjectShell *pShell = pChild->GetCurrentDocument();
+ if( pShell && pShell->Get_Impl()->bReloadAvailable )
+ {
+ bReloadAvailable = sal_True;
+ pChild->GetCurrentViewFrame()->ExecuteSlot( rReq );
+ }
+ pChild = pNext;
+ }
+
+ // Der TopLevel-Frame selbst het keine Graphiken!
+ if ( bReloadAvailable )
+ return;
+ }
+ }
+ else
+ {
+ // Bei CTRL-Edit den TopFrame bearbeiten
+ sal_uInt16 nModifier = rReq.GetModifier();
+
+ if ( ( nModifier & KEY_MOD1 ) && pParent )
+ {
+ SfxViewFrame *pTop = GetTopViewFrame();
+ pTop->ExecReload_Impl( rReq );
+ return;
+ }
+ }
+
+ SfxObjectShell* pSh = GetObjectShell();
+ sal_Bool bWasReadonly = pSh->IsReadOnly();
+
+ switch ( rReq.GetSlot() )
+ {
+ case SID_EDITDOC:
+ {
+ if ( GetFrame()->HasComponent() )
+ break;
+
+ // Wg. Doppeltbelegung in Toolboxen (mit/ohne Ctrl) ist es auch
+ // m"oglich, da\s der Slot zwar enabled ist, aber Ctrl-Click
+ // trotzdem nicht geht!
+ if( !pSh || !pSh->HasName() ||
+ !(pSh->Get_Impl()->nLoadedFlags & SFX_LOADED_MAINDOCUMENT ))
+ break;
+
+ SFX_ITEMSET_ARG(
+ pSh->GetMedium()->GetItemSet(), pItem, SfxBoolItem,
+ SID_EDITDOC, sal_False );
+ if ( pItem && !pItem->GetValue() )
+ break;
+
+ sal_uInt16 nOpenMode;
+ sal_Bool bNeedsReload = sal_False;
+ if ( !pSh->IsReadOnly() )
+ {
+ // Speichern und Readonly Reloaden
+ if( pSh->IsModified() )
+ {
+ if ( !pSh->PrepareClose() )
+ {
+ rReq.SetReturnValue( SfxBoolItem( rReq.GetSlot(), sal_False ) );
+ return;
+ }
+ else bNeedsReload = sal_True;
+ }
+ nOpenMode = SFX_STREAM_READONLY;
+ }
+ else
+ nOpenMode = SFX_STREAM_READWRITE;
+
+ // Parameter auswerten
+ sal_Bool bReload = sal_True;
+ if ( rReq.IsAPI() )
+ {
+ // per API steuern ob r/w oder r/o
+ SFX_REQUEST_ARG(rReq, pEditItem, SfxBoolItem, SID_EDITDOC, sal_False);
+ if ( pEditItem )
+ nOpenMode = pEditItem->GetValue() ? SFX_STREAM_READWRITE : SFX_STREAM_READONLY;
+ }
+ else
+ {
+ // sonst Reaload abschaltbar
+ HACK(SID_EDITDOC ist hier falsch verwendet)
+ SFX_REQUEST_ARG(rReq, pReloadItem, SfxBoolItem, SID_EDITDOC, sal_False);
+ if ( pReloadItem )
+ bReload = pReloadItem->GetValue();
+ }
+
+ // doing
+ if( pSh )
+ {
+ SfxMedium* pMed = pSh->GetMedium();
+ INetURLObject aPhysObj( pMed->GetPhysicalName(), INET_PROT_FILE );
+ SFX_ITEMSET_ARG( pSh->GetMedium()->GetItemSet(),
+ pVersionItem, SfxInt16Item, SID_VERSION, sal_False );
+
+ if ( ( !bNeedsReload &&
+ ( pMed->GetURLObject().GetProtocol() == INET_PROT_FILE
+ && INetURLObject( pMed->GetName(), INET_PROT_FILE ) == aPhysObj
+ && !SfxContentHelper::IsYounger( aPhysObj.GetMainURL(),
+ pMed->GetURLObject().GetMainURL() )
+ || pMed->IsRemote()
+ )
+ ) || pVersionItem )
+ {
+ sal_Bool bOK = sal_False;
+ if ( !pVersionItem )
+ {
+ // Umschalten ohne Reload ist moeglich
+ pSh->DoHandsOff();
+ pMed->Close();
+ pMed->GetItemSet()->ClearItem( SID_DOC_READONLY );
+ pMed->SetOpenMode( nOpenMode, pMed->IsDirect() );
+ if ( nOpenMode == SFX_STREAM_READONLY )
+ pMed->CheckOpenMode_Impl(sal_False,sal_True);
+ pMed->ReOpen();
+ if ( !pMed->GetErrorCode() )
+ bOK = sal_True;
+ }
+
+ if( !bOK )
+ {
+ ErrCode nErr = pMed->GetErrorCode();
+ if ( pVersionItem )
+ nErr = ERRCODE_IO_ACCESSDENIED;
+ else
+ {
+ pMed->ResetError();
+ pMed->SetOpenMode( SFX_STREAM_READONLY, pMed->IsDirect() );
+ pMed->ReOpen();
+ pSh->DoSaveCompleted( pMed );
+ }
+
+ // r/o-Doc kann nicht in Editmode geschaltet werden?
+ rReq.Done( sal_False );
+
+ SFX_REQUEST_ARG( rReq, pFSetItem, SfxBoolItem, SID_EDIT_FRAMESET, sal_False);
+ if ( nOpenMode == SFX_STREAM_READWRITE && !rReq.IsAPI() )
+ {
+ // dem ::com::sun::star::sdbcx::User anbieten, als Vorlage zu oeffnen
+ QueryBox aBox( &GetWindow(), SfxResId(MSG_QUERY_OPENASTEMPLATE) );
+ if ( !pFSetItem && RET_YES == aBox.Execute() )
+ {
+ SfxApplication* pApp = SFX_APP();
+ SfxAllItemSet aSet( pApp->GetPool() );
+ aSet.Put( SfxStringItem( SID_FILE_NAME, pMed->GetName() ) );
+ SFX_ITEMSET_ARG( pMed->GetItemSet(), pReferer,
+ SfxStringItem, SID_REFERER, sal_False );
+ if ( pReferer )
+ aSet.Put( *pReferer );
+ aSet.Put( SfxBoolItem( SID_TEMPLATE, sal_True ) );
+ if ( pVersionItem )
+ aSet.Put( *pVersionItem );
+
+ if( pMed->GetFilter() )
+ {
+ aSet.Put( SfxStringItem( SID_FILTER_NAME,
+ pMed->GetFilter()->GetName() ) );
+ SFX_ITEMSET_ARG( pMed->GetItemSet(), pOptions,
+ SfxStringItem, SID_FILE_FILTEROPTIONS, sal_False );
+ if ( pOptions )
+ aSet.Put( *pOptions );
+ }
+
+ //MI: im selben Frame => er macht gar nix !?!
+ //SfxFrameItem aFrameItem( SID_DOCFRAME, GetFrame() );
+ GetDispatcher()->Execute( SID_OPENDOC, SFX_CALLMODE_ASYNCHRON, aSet );
+ return;
+ }
+ else
+ nErr = 0;
+ }
+
+ ErrorHandler::HandleError( nErr );
+ rReq.SetReturnValue(
+ SfxBoolItem( rReq.GetSlot(), sal_False ) );
+ return;
+ }
+ else
+ {
+ pSh->DoSaveCompleted( pMed );
+ pSh->Broadcast( SfxSimpleHint(SFX_HINT_MODECHANGED) );
+ rReq.SetReturnValue( SfxBoolItem( rReq.GetSlot(), sal_True ) );
+ rReq.Done( sal_True );
+ if( nOpenMode == SFX_STREAM_READONLY )
+ pMed->Close();
+
+ // ReloadForEdit bei Framesets schaltet auch FramesetEditmode
+ sal_Bool bIsReadonly = GetObjectShell()->IsReadOnly();
+ if ( bIsReadonly != bWasReadonly && !GetFrame()->GetParentFrame() )
+ {
+ SfxBoolItem aItem( SID_EDIT_FRAMESET, !bIsReadonly );
+ GetDispatcher()->Execute( SID_EDIT_FRAMESET,
+ SFX_CALLMODE_RECORD, &aItem, 0L );
+ }
+ return;
+ }
+ }
+
+ if ( !bReload )
+ {
+ // Es soll nicht reloaded werden
+ SfxErrorContext aEc( ERRCODE_SFX_NODOCRELOAD );
+ ErrorHandler::HandleError( ERRCODE_SFX_NODOCRELOAD );
+ rReq.SetReturnValue(
+ SfxBoolItem( rReq.GetSlot(), sal_False ) );
+ return;
+ }
+
+ // Ansonsten ( lokal und arbeiten auf Kopie ) muss gereloaded
+ // werden.
+ }
+ SfxItemSet* pSet = pSh->GetMedium()->GetItemSet();
+ pSet->Put( SfxBoolItem(
+ SID_DOC_READONLY, nOpenMode != SFX_STREAM_READWRITE ) );
+ rReq.AppendItem( SfxBoolItem( SID_FORCERELOAD, sal_True) );
+ rReq.AppendItem( SfxBoolItem( SID_SILENT, sal_True ));
+ }
+
+ case SID_RELOAD:
+ {
+ // Wg. Doppeltbelegung in Toolboxen (mit/ohne Ctrl) ist es auch
+ // m"oglich, da\s der Slot zwar enabled ist, aber Ctrl-Click
+ // trotzdem nicht geht!
+ if ( !pSh || !pSh->CanReload_Impl() )
+ break;
+ sal_uInt32 nErr = 0;
+ SfxApplication* pApp = SFX_APP();
+ SFX_REQUEST_ARG(rReq, pForceReloadItem, SfxBoolItem,
+ SID_FORCERELOAD, sal_False);
+ if( pForceReloadItem && !pForceReloadItem->GetValue() &&
+ !pSh->GetMedium()->IsExpired() )
+ return;
+ if( pImp->bReloading || pSh->IsInModalMode() )
+ return;
+
+ // AutoLoad ist ggf. verboten
+ SFX_REQUEST_ARG(rReq, pAutoLoadItem, SfxBoolItem, SID_AUTOLOAD, sal_False);
+ if ( pAutoLoadItem && pAutoLoadItem->GetValue() &&
+ GetFrame()->IsAutoLoadLocked_Impl() )
+ return;
+
+ SfxObjectShellLock xOldObj( pSh );
+ pImp->bReloading = sal_True;
+ SFX_REQUEST_ARG(rReq, pURLItem, SfxStringItem,
+ SID_FILE_NAME, sal_False);
+ // editierbar "offnen?
+ sal_Bool bForEdit = !pSh->IsReadOnly();
+ if ( rReq.GetSlot() == SID_EDITDOC )
+ bForEdit = !bForEdit;
+
+ // ggf. beim ::com::sun::star::sdbcx::User nachfragen
+ sal_Bool bDo = sal_True;
+ SFX_REQUEST_ARG(rReq, pSilentItem, SfxBoolItem,
+ SID_SILENT, sal_False);
+ if ( GetFrame()->DocIsModified_Impl() &&
+ !rReq.IsAPI() && ( !pSilentItem || !pSilentItem->GetValue() ) )
+ {
+ QueryBox aBox( &GetWindow(), ResId(MSG_QUERY_LASTVERSION) );
+ bDo = ( RET_YES == aBox.Execute() );
+ }
+
+ if ( bDo )
+ {
+ SfxMedium *pMedium = xOldObj->GetMedium();
+
+ // Frameset abziehen, bevor FramesetView evtl. verschwindet
+ SFX_REQUEST_ARG(rReq, pNoCacheItem, SfxBoolItem, SID_NOCACHE, sal_False);
+ String aURL = pURLItem ? pURLItem->GetValue() :
+ pMedium->GetName();
+
+ sal_uInt16 nModifier = rReq.GetModifier();
+ SfxFrameDescriptor* pDesc = NULL;
+ if ( !( nModifier & KEY_SHIFT ) && !pURLItem &&
+ GetFrame()->GetDescriptor()->GetFrameSet() )
+ pDesc = GetFrame()->GetDescriptor()->Clone();
+
+ sal_Bool bHandsOff =
+ pMedium->GetURLObject().GetProtocol() == INET_PROT_FILE;
+
+ // Files schliessen, damit wir Reloaden koennen.
+ if( bHandsOff )
+ xOldObj->DoHandsOff();
+
+ // bestehende SfxMDIFrames f"ur dieses Doc leeren
+ // eigenes Format oder R/O jetzt editierbar "offnen?
+ SfxViewNotificatedFrameList_Impl aFrames;
+ SfxViewFrame *pView = GetFirst(xOldObj);
+ SfxObjectShellLock xNewObj;
+ sal_Bool bRestoreView = ( pURLItem == NULL );
+ TypeId aOldType = xOldObj->Type();
+
+ while(pView)
+ {
+ if( bHandsOff )
+ pView->GetDispatcher()->LockUI_Impl(sal_True);
+ aFrames.InsertViewFrame( pView );
+ pView->GetBindings().ENTERREGISTRATIONS();
+
+ // RestoreView nur wenn keine neue Datei geladen
+ // (Client-Pull-Reloading)
+ if( bHandsOff )
+ pView->ReleaseObjectShell_Impl( bRestoreView );
+ pView = bHandsOff ? (SfxTopViewFrame*) GetFirst(
+ xOldObj, TYPE(SfxTopViewFrame) ) :
+ (SfxTopViewFrame*)GetNext( *pView, xOldObj,
+ TYPE( SfxTopViewFrame ) );
+ }
+
+ MemCache_Impl& rCache = SfxPickList_Impl::Get()->GetMemCache();
+ if( !pNoCacheItem || pNoCacheItem->GetValue() )
+ {
+ SfxObjectShell* pSh = xOldObj;
+ if ( pURLItem )
+ pSh = rCache.Find( aURL, String() );
+ if( pSh )
+ {
+ pSh->PrepareReload();
+ rCache.RemoveObject( pSh );
+ }
+ }
+ DELETEZ( xOldObj->Get_Impl()->pReloadTimer );
+
+ // Medium mit angepa\stem Open-Mode
+ StreamMode nMode = bForEdit ? SFX_STREAM_READWRITE
+ : SFX_STREAM_READONLY;
+
+ SfxMedium *pNewMedium;
+ SfxItemSet* pNewSet = 0;
+ if( !pURLItem )
+ {
+ pNewSet = new SfxAllItemSet( *pMedium->GetItemSet() );
+ pNewSet->ClearItem( SID_VIEW_ID );
+ pNewSet->ClearItem( SID_USER_DATA );
+ }
+
+ const SfxObjectFactory* pFactory = 0;
+
+ // Wenn OrigURL mitkam nicht Filter verwenden, denn dann
+ // kann es sich um die sba Geschichten handeln.
+ SFX_ITEMSET_ARG( pNewSet, pOrigURL, SfxStringItem, SID_ORIGURL, sal_False);
+ sal_Bool bUseFilter = !pOrigURL && !pURLItem;
+
+ // Falls eine salvagede Datei vorliegt, nicht nochmals die
+ // OrigURL mitschicken, denn die Tempdate ist nach Reload
+ // ungueltig
+ SFX_ITEMSET_ARG( pNewSet, pSalvageItem, SfxStringItem, SID_DOC_SALVAGE, sal_False);
+
+ if( pSalvageItem && pOrigURL )
+ {
+ if( !pURLItem ) aURL = pOrigURL->GetValue();
+ pNewSet->ClearItem( SID_ORIGURL );
+ pNewSet->ClearItem( SID_DOC_SALVAGE );
+ }
+
+ pNewMedium = new SfxMedium(
+ aURL,
+ nMode, pMedium->IsDirect(), sal_True,
+ bUseFilter ? pMedium->GetFilter() : 0, pNewSet );
+
+ if ( pURLItem )
+ {
+ pNewSet = pNewMedium->GetItemSet();
+ pNewSet->Put( SfxStringItem( SID_REFERER, pMedium->GetName() ) );
+ }
+
+ SFX_REQUEST_ARG( rReq, pBindingItem, SfxRefItem, SID_BINDING, sal_False);
+ if( pBindingItem )
+ {
+ DBG_ERROR( "Not implemented!" );
+ }
+
+ xOldObj->CancelTransfers();
+ pNewMedium->GetItemSet()->Put(
+ SfxUInt32Item( SID_FLAGS,
+ xOldObj->GetFlags() & (
+ SFXOBJECTSHELL_DONTREPLACE |
+ SFXOBJECTSHELL_DONTCLOSE ) ) );
+ pNewMedium->SetUsesCache(
+ xOldObj->Get_Impl()->bReloadAvailable ||
+ pNoCacheItem && !pNoCacheItem->GetValue() );
+
+ // eigentliches Reload
+ if ( pDesc )
+ pNewMedium->GetItemSet()->Put(
+ SfxFrameDescriptorItem( pDesc, SID_FRAMEDESCRIPTOR ) );
+ pNewMedium->GetItemSet()->Put( SfxUInt16Item( SID_BROWSEMODE, NO_BROWSE ) );
+ pNewMedium->GetItemSet()->Put( SfxBoolItem( SID_RELOAD, sal_True ) );
+ pNewMedium->GetItemSet()->Put( SfxFrameItem ( SID_DOCFRAME, GetFrame() ) );
+
+ LoadEnvironment_ImplRef xLoader =
+ new LoadEnvironment_Impl(
+ pNewMedium, GetFrame(),
+ LEI_DETECTFILTER | LEI_LOAD | LEI_CREATEVIEW, sal_False, sal_False );
+ xOldObj->SetModified( sal_False );
+ // Altes Dok nicht cachen! Gilt nicht, wenn anderes
+ // Doc geladen wird.
+ if( !pURLItem || pURLItem->GetValue() ==
+ xOldObj->GetMedium()->GetName() )
+ xOldObj->Get_Impl()->bForbidCaching = sal_True;
+ xLoader->Start();
+ while( xLoader->GetState() != LoadEnvironment_Impl::DONE )
+ Application::Yield();
+
+ // hat reload nicht geklappt?
+ xNewObj = xLoader->GetObjectShell();
+ if( !xNewObj.Is() )
+ {
+ pNewMedium = xLoader->GetMedium();
+ if( pNewMedium ) pNewMedium->Close();
+
+ // wieder auf das alte Medium zurueck
+ const SfxFilter* pOldFilter = xOldObj->GetMedium()->GetFilter();
+ if( bHandsOff )
+ xOldObj->DoSaveCompleted( xOldObj->GetMedium() );
+
+ // r/o-Doc kann nicht in Editmode geschaltet werden?
+ if ( bForEdit && SID_EDITDOC == rReq.GetSlot() )
+ {
+ // dem ::com::sun::star::sdbcx::User anbieten, als Vorlage zu oeffnen
+ QueryBox aBox( &GetWindow(), SfxResId(MSG_QUERY_OPENASTEMPLATE) );
+ if ( RET_YES == aBox.Execute() )
+ {
+ SfxAllItemSet aSet( pApp->GetPool() );
+ aSet.Put( SfxStringItem( SID_FILE_NAME, pNewMedium->GetName() ) );
+ SFX_ITEMSET_ARG( pNewMedium->GetItemSet(), pOptions,
+ SfxStringItem, SID_FILE_FILTEROPTIONS, sal_False);
+ if ( pOptions )
+ aSet.Put( *pOptions );
+ SFX_ITEMSET_ARG( pNewMedium->GetItemSet(), pReferer,
+ SfxStringItem, SID_REFERER, sal_False);
+ if ( pReferer )
+ aSet.Put( *pReferer );
+ aSet.Put( SfxBoolItem( SID_TEMPLATE, sal_True ) );
+ if( pNewMedium->GetFilter() )
+ aSet.Put( SfxStringItem( SID_FILTER_NAME,
+ pNewMedium->GetFilter()->GetName() ) );
+
+ //MI: im selben Frame => er macht gar nix !?!
+ //SfxFrameItem aFrameItem( SID_DOCFRAME, GetFrame() );
+ GetDispatcher()->Execute( SID_OPENDOC, SFX_CALLMODE_ASYNCHRON, aSet );
+ }
+ }
+ }
+ else
+ xNewObj->GetMedium()->GetItemSet()->ClearItem( SID_RELOAD );
+
+ SfxViewFrame* pThis = (SfxViewFrame*)this;
+ sal_Bool bDeleted = aFrames.C40_GETPOS( SfxViewFrame, pThis ) == USHRT_MAX;
+
+ if( !bDeleted )
+ {
+/* if( GetFrame()->GetLoadEnvironment_Impl() == &xLoader )
+ GetFrame()->SetLoadEnvironment_Impl( 0 );*/
+
+ GetBindings().Invalidate( SID_RELOAD );
+ pImp->bReloading = sal_False;
+ }
+
+ // neues Doc in die bestehenden SfxMDIFrames einsetzen; wenn
+ // das Reload geklappt hat, mu\s in diesem Frame kein Dokument
+ // eingesetzt werden, weil das schon vom LoadEnvironment
+ // gemacht wurde
+ if ( xNewObj.Is() && xNewObj->Type() != aOldType )
+ // RestoreView nur, wenn gleicher Dokumenttyp
+ bRestoreView = sal_False;
+
+ const sal_uInt16 nCount = aFrames.Count();
+ for(sal_uInt16 i = 0; i < nCount; ++i)
+ {
+ SfxViewFrame *pView = aFrames.GetObject( i );
+ if( !bHandsOff && this != pView )
+ pView->ReleaseObjectShell_Impl( bRestoreView );
+ pView->SetRestoreView_Impl( bRestoreView );
+ if( pView != this || !xNewObj.Is() )
+ {
+ SfxFrame *pFrame = pView->GetFrame();
+ pFrame->InsertDocument(xNewObj.Is() ? xNewObj : xOldObj );
+ }
+
+ pView->GetBindings().LEAVEREGISTRATIONS();
+ pView->GetDispatcher()->LockUI_Impl( sal_False );
+ }
+
+ // als erledigt recorden
+ rReq.Done( sal_True );
+ rReq.SetReturnValue(SfxBoolItem(rReq.GetSlot(), sal_True));
+ if( !bDeleted )
+ {
+ Notify( *GetObjectShell(), SfxSimpleHint(
+ SFX_HINT_TITLECHANGED ));
+
+ // ReloadForEdit bei Framesets schaltet auch FramesetEditmode
+ sal_Bool bIsReadonly = GetObjectShell()->IsReadOnly();
+ if ( bIsReadonly != bWasReadonly &&
+ rReq.GetSlot() == SID_EDITDOC && !GetFrame()->GetParentFrame() )
+ {
+ SfxBoolItem aItem( SID_EDIT_FRAMESET, !bIsReadonly );
+ GetDispatcher()->Execute( SID_EDIT_FRAMESET,
+ SFX_CALLMODE_RECORD, &aItem, 0L );
+ }
+ }
+ return;
+ }
+ else
+ {
+ // als nicht erledigt recorden
+ rReq.Done();
+ rReq.SetReturnValue(SfxBoolItem(rReq.GetSlot(), sal_False));
+ pImp->bReloading = sal_False;
+ return;
+ }
+ }
+ }
+}
+
+//-------------------------------------------------------------------------
+void SfxViewFrame::StateReload_Impl( SfxItemSet& rSet )
+{
+ SfxObjectShell* pSh = GetObjectShell();
+ if ( !pSh )
+ // Ich bin gerade am Reloaden und Yielde so vor mich hin ...
+ return;
+
+ SfxFrame *pParent = GetFrame()->GetParentFrame();
+ SfxWhichIter aIter( rSet );
+ for ( sal_uInt16 nWhich = aIter.FirstWhich(); nWhich; nWhich = aIter.NextWhich() )
+ {
+ if ( GetFrame()->HasComponent() )
+ {
+ // Wenn die Komponente es nicht selbst dispatched, dann
+ // macht es auch keinen Sinn!
+ rSet.DisableItem( nWhich );
+ continue;
+ }
+
+ switch ( nWhich )
+ {
+ case SID_EDITDOC:
+ {
+ if ( !pSh || !pSh->HasName() ||
+ !( pSh->Get_Impl()->nLoadedFlags & SFX_LOADED_MAINDOCUMENT ) )
+ rSet.DisableItem( SID_EDITDOC );
+ else
+ {
+ SFX_ITEMSET_ARG( pSh->GetMedium()->GetItemSet(), pItem,
+ SfxBoolItem, SID_EDITDOC, sal_False );
+ if ( pItem && !pItem->GetValue() )
+ rSet.DisableItem( SID_EDITDOC );
+ else
+ rSet.Put( SfxBoolItem( nWhich, !pSh->IsReadOnly() ) );
+ }
+
+ break;
+ }
+
+ case SID_RELOAD:
+ {
+ SfxFrame* pFrame = GetTopFrame();
+ SfxViewFrame *pView = pFrame->GetCurrentViewFrame();
+ if ( pView && pView->GetViewShell() &&
+ pView->GetViewShell()->IsImplementedAsFrameset_Impl() &&
+ pView->GetViewShell()->GetInterface()->GetSlot( nWhich ) )
+ {
+ // Hack f"ur Explorer: Reload wird an der ViewShell ausgef"uhrt
+ pView->GetViewShell()->GetSlotState( nWhich, 0, &rSet );
+ break;
+ }
+
+ // Wenn irgendein ChildFrame reloadable ist, wird der Slot
+ // enabled, damit man CTRL-Reload machen kann
+ sal_Bool bReloadAvailable = sal_False;
+ SfxFrameIterator aIter( *pFrame, sal_True );
+ for( SfxFrame* pNextFrame = aIter.FirstFrame();
+ pFrame;
+ pNextFrame = pNextFrame ?
+ aIter.NextFrame( *pNextFrame ) : 0 )
+ {
+ SfxObjectShell *pShell = pFrame->GetCurrentDocument();
+ if( pShell && pShell->Get_Impl()->bReloadAvailable )
+ {
+ bReloadAvailable = sal_True;
+ break;
+ }
+ pFrame = pNextFrame;
+ }
+
+ if ( !pSh || !pSh->CanReload_Impl() )
+ rSet.DisableItem(nWhich);
+ else
+ rSet.Put( SfxBoolItem( nWhich, bReloadAvailable));
+
+ break;
+ }
+ }
+ }
+}
+
+
+//--------------------------------------------------------------------
+void SfxViewFrame::ExecHistory_Impl( SfxRequest &rReq )
+{
+ // gibt es an der obersten Shell einen Undo-Manager?
+ SfxShell *pSh = GetDispatcher()->GetShell(0);
+ SfxUndoManager *pUndoMgr = pSh->GetUndoManager();
+ sal_Bool bOK = sal_False;
+ if ( pUndoMgr )
+ {
+ switch ( rReq.GetSlot() )
+ {
+ case SID_CLEARHISTORY:
+ pUndoMgr->Clear();
+ bOK = sal_True;
+ break;
+
+ case SID_UNDO:
+ pUndoMgr->Undo(0);
+ GetBindings().InvalidateAll(sal_False);
+ bOK = sal_True;
+ break;
+
+ case SID_REDO:
+ pUndoMgr->Redo(0);
+ GetBindings().InvalidateAll(sal_False);
+ bOK = sal_True;
+ break;
+
+ case SID_REPEAT:
+ if ( pSh->GetRepeatTarget() )
+ pUndoMgr->Repeat( *pSh->GetRepeatTarget(), 0);
+ bOK = sal_True;
+ break;
+ }
+ }
+ else if ( GetViewShell() )
+ {
+ // der SW hat eigenes Undo an der ::com::sun::star::sdbcx::View
+ const SfxPoolItem *pRet = GetViewShell()->ExecuteSlot( rReq );
+ if ( pRet )
+ bOK = ((SfxBoolItem*)pRet)->GetValue();
+ }
+
+ rReq.SetReturnValue( SfxBoolItem( rReq.GetSlot(), bOK ) );
+ rReq.Done();
+}
+
+//--------------------------------------------------------------------
+void SfxViewFrame::StateHistory_Impl( SfxItemSet &rSet )
+{
+ // Undo-Manager suchen
+ SfxShell *pSh = GetDispatcher()->GetShell(0);
+ if ( !pSh )
+ // Ich bin gerade am Reloaden und Yielde so vor mich hin ...
+ return;
+
+ SfxUndoManager *pUndoMgr = pSh->GetUndoManager();
+ if ( !pUndoMgr )
+ {
+ // der SW hat eigenes Undo an der ::com::sun::star::sdbcx::View
+ SfxWhichIter aIter( rSet );
+ SfxViewShell *pViewSh = GetViewShell();
+ if( !pViewSh ) return;
+ for ( sal_uInt16 nSID = aIter.FirstWhich(); nSID; nSID = aIter.NextWhich() )
+ pViewSh->GetSlotState( nSID, 0, &rSet );
+ return;
+ }
+
+ if ( pUndoMgr->GetUndoActionCount() == 0 &&
+ pUndoMgr->GetRedoActionCount() == 0 &&
+ pUndoMgr->GetRepeatActionCount() == 0 )
+ rSet.DisableItem( SID_CLEARHISTORY );
+
+ if ( pUndoMgr && pUndoMgr->GetUndoActionCount() )
+ {
+ String aTmp( SfxResId( STR_UNDO ) );
+ aTmp += pUndoMgr->GetUndoActionComment(0);
+ rSet.Put( SfxStringItem( SID_UNDO, aTmp ) );
+ }
+ else
+ rSet.DisableItem( SID_UNDO );
+
+ if ( pUndoMgr && pUndoMgr->GetRedoActionCount() )
+ {
+ String aTmp( SfxResId(STR_REDO) );
+ aTmp += pUndoMgr->GetRedoActionComment(0);
+ rSet.Put( SfxStringItem( SID_REDO, aTmp ) );
+ }
+ else
+ rSet.DisableItem( SID_REDO );
+ SfxRepeatTarget *pTarget = pSh->GetRepeatTarget();
+ if ( pUndoMgr && pTarget && pUndoMgr->GetRepeatActionCount() &&
+ pUndoMgr->CanRepeat(*pTarget, 0) )
+ {
+ String aTmp( SfxResId(STR_REPEAT) );
+ aTmp += pUndoMgr->GetRepeatActionComment(*pTarget, 0);
+ rSet.Put( SfxStringItem( SID_REPEAT, aTmp ) );
+ }
+ else
+ rSet.DisableItem( SID_REPEAT );
+}
+
+//--------------------------------------------------------------------
+
+void SfxViewFrame::PropState_Impl( SfxItemSet &rSet )
+{
+ GetDispatcher()->Flush();
+ const sal_uInt16 *pRanges = rSet.GetRanges();
+ DBG_ASSERT(pRanges, "Set ohne Bereich");
+ while ( *pRanges )
+ {
+ for ( sal_uInt16 nWhich = *pRanges++; nWhich <= *pRanges; ++nWhich )
+ {
+ switch(nWhich)
+ {
+ case SID_SELECTION:
+ break;
+ case SID_TOPWINDOW:
+ rSet.Put( SfxObjectItem( SID_TOPWINDOW, GetTopViewFrame() ) );
+ break;
+ case SID_PARENTFRAME:
+ rSet.Put( SfxObjectItem( nWhich, GetParentViewFrame() ) );
+ break;
+ case SID_DOCUMENT:
+ if ( GetObjectShell() )
+ rSet.Put( SfxObjectItem( SID_DOCUMENT, GetObjectShell() ) );
+ break;
+ case SID_ACTIVEWINDOW:
+ {
+ SfxViewFrame* pActFrame = this;
+ while ( pActFrame->GetActiveChildFrame_Impl() )
+ pActFrame = pActFrame->GetActiveChildFrame_Impl();
+ rSet.Put( SfxObjectItem( SID_ACTIVEWINDOW, pActFrame ) );
+ break;
+ }
+ case SID_FRAMECOUNT:
+ rSet.Put( SfxUInt16Item( SID_FRAMECOUNT, GetFrame()->GetChildFrameCount() ) );
+ break;
+ case SID_ISTOP:
+ rSet.Put( SfxBoolItem( SID_ISTOP, GetFrame()->GetTopFrame() == GetFrame() ) );
+ break;
+ }
+ }
+ ++pRanges;
+ }
+}
+
+//--------------------------------------------------------------------
+void SfxViewFrame::SetObjectShell_Impl
+(
+ SfxObjectShell& rObjSh, // eine initialisierte SfxObjectShell,
+ FASTBOOL bDefaultView // sal_True: nicht restaurieren
+)
+
+/* [Beschreibung]
+
+ Diese Methode setzt eine <SfxObjectShell> in den SfxViewFrame ein.
+
+ Zuvor mu\s die vorherige SfxObjectShell, insofern schein eine gesetzt
+ wurde, mit der Methode ReleaseObjectShell() entfernt worden sein. Somit
+ kann durch Aufruf von ReleaseObjectShell() und SetObjectShell() die
+ SfxObjectShell ausgetauscht werden.
+
+
+ [Querverweise]
+
+ <SfxViewFrame::ReleaseObjectShell()>
+*/
+
+{
+ DBG_CHKTHIS(SfxViewFrame, 0);
+ DBG_ASSERT( !xObjSh.Is(), "old feature used: only one Object per View!" );
+
+ GetFrame()->ReleasingComponent_Impl( sal_False );
+
+ // Doc einsetzen
+ xObjSh = &rObjSh;
+ if ( xObjSh.Is() && xObjSh->IsPreview() )
+ SetQuietMode_Impl( sal_True );
+
+ if ( rObjSh.IsA( TYPE( SfxFrameSetObjectShell ) ) )
+ GetFrame()->SetFrameType_Impl( GetFrameType() | SFXFRAME_FRAMESET );
+ else
+ GetFrame()->SetFrameType_Impl( GetFrameType() & ~SFXFRAME_FRAMESET );
+
+ // Modulshell einf"ugen
+ SfxModule* pModule = xObjSh->GetModule();
+ if( pModule )
+ pDispatcher->InsertShell_Impl( *pModule, 0 );
+
+ pDispatcher->Push( rObjSh );
+ pDispatcher->Flush();
+ StartListening( rObjSh );
+
+ rObjSh.ViewAssigned();
+ pDispatcher->SetReadOnly_Impl( rObjSh.IsReadOnly() );
+
+ const SfxMedium *pMedium = GetObjectShell()->GetMedium();
+ SFX_ITEMSET_ARG(
+ pMedium->GetItemSet(), pHiddenItem, SfxBoolItem, SID_HIDDEN, sal_False );
+ if ( !pHiddenItem || !pHiddenItem->GetValue() )
+ {
+ LockObjectShell_Impl(sal_True);
+ GetDocNumber_Impl();
+ }
+
+ // ::com::sun::star::sdbcx::View erzeugen
+ if ( bDefaultView )
+ SetRestoreView_Impl( sal_False );
+
+// So darf man es nicht machen, da LaodWindows hierueber laeuft. Kann meiner Meinung nach
+// auch nur beim Reload mit Dokumenttypwechsel passieren.
+/* if ( xObjSh->Type() != pImp->aLastType )
+ SetRestoreView_Impl( sal_False ); */
+
+ SwitchToViewShell_Impl( !IsRestoreView_Impl() ? (sal_uInt16) 0 : GetCurViewId() );
+
+ // was so in Activate passiert w"are
+ SfxObjectShell *pDocSh = GetObjectShell();
+ if ( SfxViewFrame::Current() == this )
+ {
+ // ggf. Config-Manager aktivieren
+ SfxConfigManager *pCfgMgr = rObjSh.GetConfigManager();
+ if ( pCfgMgr )
+ pCfgMgr->Activate( SFX_CFGMANAGER() );
+ }
+
+ if ( !rObjSh.IsLoading() )
+ rObjSh.PostActivateEvent_Impl();
+
+ Notify( rObjSh, SfxSimpleHint(SFX_HINT_TITLECHANGED) );
+ Notify( rObjSh, SfxSimpleHint(SFX_HINT_DOCCHANGED) );
+
+ // Zur Sicherheit, aber eigentlich sollte jetzt nichts mehr passieren
+ // ( kein erzwungenes Update )
+ if ( SfxViewFrame::Current() == this )
+ GetDispatcher()->Update_Impl();
+}
+
+//--------------------------------------------------------------------
+void SfxViewFrame::ReleaseObjectShell_Impl( sal_Bool bStoreView )
+
+/* [Beschreibung]
+
+ Diese Methode entleert den SfxViewFrame, d.h. nimmt die <SfxObjectShell>
+ vom Dispatcher und beendet seine <SfxListener>-Beziehung zu dieser
+ SfxObjectShell (wodurch sie sich ggf. selbst zerst"ort).
+
+ Somit kann durch Aufruf von ReleaseObjectShell() und SetObjectShell()
+ die SfxObjectShell ausgetauscht werden.
+
+ Zwischen RealeaseObjectShell() und SetObjectShell() darf die Kontrolle
+ nicht an das ::com::sun::star::chaos::System abgegeben werden.
+
+
+ [Querverweise]
+
+ <SfxViewFrame::SetObjectShell(SfxObjectShell&)>
+*/
+{
+ DBG_CHKTHIS(SfxViewFrame, 0);
+ DBG_ASSERT( xObjSh.Is(), "no SfxObjectShell to release!" );
+
+ GetFrame()->ReleasingComponent_Impl( sal_True );
+ SfxViewShell *pDyingViewSh = GetViewShell();
+ pImp->aLastType = xObjSh->Type();
+
+ HACK(MI weiss nicht wie !pSh sein kann - nach PlugIns isses aber so)
+ if ( pDyingViewSh )
+ {
+ // Gibt es noch andere Views auf mein Doc?
+ SfxViewFrame *pView = GetFirst(xObjSh);
+ while( pView )
+ {
+ if ( pView != this )
+ break;
+ pView = GetNext( *pView, xObjSh );
+ }
+
+ if ( !pView )
+ {
+ // Ich bin die letzte ::com::sun::star::sdbcx::View
+ SfxObjectFactory *pFactory = &xObjSh->GetFactory();
+ if ( pFactory && pFactory->GetFlags() & SFXOBJECTSHELL_HASOPENDOC )
+ {
+ // Event nur bei echten Dokumenten
+ xObjSh->Get_Impl()->bInCloseEvent = sal_True;
+ SFX_APP()->NotifyEvent( SfxEventHint(SFX_EVENT_CLOSEDOC, xObjSh) );
+ xObjSh->Get_Impl()->bInCloseEvent = sal_False;
+ }
+ }
+
+ SetRestoreView_Impl( bStoreView );
+ if ( bStoreView )
+ pDyingViewSh->WriteUserData( GetViewData_Impl(), sal_True );
+
+ // Falls es SubFrames gibt, m"ussen diese deleted werden, solange noch
+ // die FramesetViewShell da ist, sonst gibt es Probleme.
+ // Um Flackern bei den Objectbars zu vermeiden, werden die SubFrames
+ // zerst"ort, solange die FrameSetView noch da ist.
+ if ( pDyingViewSh->IsA( TYPE(SfxFrameSetViewShell) ) )
+ {
+ Window *pWindow = pDyingViewSh->GetWindow();
+ if ( pWindow )
+ pWindow->Hide();
+ GetFrame()->CloseChildFrames();
+ }
+
+ // Jetzt alle SubShells wechhauen
+ pDyingViewSh->PushSubShells_Impl( sal_False );
+ sal_uInt16 nLevel = pDispatcher->GetShellLevel( *pDyingViewSh );
+ if ( nLevel )
+ {
+ // Es gibt immer nocht SubShells
+ SfxShell *pSubShell = pDispatcher->GetShell( nLevel-1 );
+ if ( pSubShell == pDyingViewSh->GetSubShell() )
+ //"Echte" Subshells nicht deleten
+ pDispatcher->Pop( *pSubShell, SFX_SHELL_POP_UNTIL );
+ else
+ pDispatcher->Pop( *pSubShell, SFX_SHELL_POP_UNTIL | SFX_SHELL_POP_DELETE );
+ }
+ pDispatcher->Pop( *pDyingViewSh );
+ }
+#ifdef DBG_UTIL
+ else
+ DBG_ERROR("Keine Shell");
+#endif
+
+ GetDispatcher()->Flush();
+
+ if ( GetWindow().HasChildPathFocus( sal_True ) )
+ {
+ DBG_ASSERT( !GetActiveChildFrame_Impl(), "Wrong active child frame!" );
+ GetWindow().GrabFocus();
+ }
+
+ pDyingViewSh->DisconnectClients_Impl( NULL );
+ SetViewShell_Impl(0);
+ delete pDyingViewSh;
+
+ pDispatcher->Pop( *xObjSh );
+ SfxModule* pModule = xObjSh->GetModule();
+ if( pModule )
+ pDispatcher->RemoveShell_Impl( *pModule );
+
+ pDispatcher->Flush();
+ EndListening( *xObjSh );
+ SFX_NOTIFY( *xObjSh, xObjSh->Type(),
+ SfxSimpleHint(SFX_HINT_TITLECHANGED),
+ TYPE(SfxSimpleHint) );
+
+ SFX_NOTIFY( *xObjSh, xObjSh->Type(),
+ SfxSimpleHint(SFX_HINT_DOCCHANGED),
+ TYPE(SfxSimpleHint) );
+
+ // Damit ::com::sun::star::script::JavaScript Objekte das ::com::sun::star::script::JavaScript ueber
+ // Frame->ViewFrame->DocShell->Medium bei CloseEvents besorgen koennen
+ if ( 1 == xObjSh->GetOwnerLockCount() && pImp->bObjLocked )
+ xObjSh->DoClose();
+ SfxObjectShellRef xDyingObjSh = xObjSh;
+ xObjSh.Clear();
+ if( ( GetFrameType() & SFXFRAME_HASTITLE ))
+ xDyingObjSh->GetNoSet_Impl().ReleaseIndex(pImp->nDocViewNo-1);
+ if ( pImp->bObjLocked )
+ {
+ xDyingObjSh->OwnerLock( sal_False );
+ pImp->bObjLocked = sal_False;
+ }
+
+ GetDispatcher()->SetDisableFlags( 0 );
+}
+
+//-------------------------------------------------------------------------
+
+String SfxViewFrame::UpdateTitle()
+
+/* [Beschreibung]
+
+ Mit dieser Methode kann der SfxMDIFrame gezwungen werden, sich sofort
+ den neuen Titel vom der <SfxObjectShell> zu besorgen.
+
+ [Anmerkung]
+
+ Dies ist z.B. dann notwendig, wenn man der SfxObjectShell als SfxListener
+ zuh"ort und dort auf den <SfxSimpleHint> SFX_HINT_TITLECHANGED reagieren
+ m"ochte, um dann die Titel seiner Views abzufragen. Diese Views (SfxMDIFrames)
+ jedoch sind ebenfalls SfxListener und da die Reihenfolge der Benachrichtigung
+ nicht feststeht, mu\s deren Titel-Update vorab erzwungen werden.
+
+
+ [Beispiel]
+
+ void SwDocShell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
+ {
+ if ( rHint.IsA(TYPE(SfxSimpleHint)) )
+ {
+ switch( ( (SfxSimpleHint&) rHint ).GetId() )
+ {
+ case SFX_HINT_TITLECHANGED:
+ for ( SfxMDIFrame *pMDI = (SfxMDIFrame*)
+ SfxViewFrame::GetFirst(this, TYPE(SfxMDIFrame));
+ pMDI;
+ pMDI = (SfxMDIFrame*)
+ SfxViewFrame::GetNext(this, TYPE(SfxMDIFrame));
+ {
+ pMDI->UpdateTitle();
+ ... pMDI->GetName() ...
+ }
+ break;
+ ...
+ }
+ }
+ }
+*/
+
+{
+ SfxObjectShell *pObjSh = GetObjectShell();
+
+ if ( !pObjSh )
+ return String( DEFINE_CONST_UNICODE( "UNO-Component" ) );
+
+ if ( pObjSh->GetInPlaceObject() && pObjSh->GetInPlaceObject()->GetProtocol().IsEmbed() )
+ // kein UpdateTitle mit Embedded-ObjectShell
+ return String();
+
+ // Bei jedem Namenswechsel einen ::com::sun::star::chaos::Anchor anlegen und GETDATA putten,
+ // damit das nicht bei jeder Anforderung ans Chaos immer wieder gemacht
+ // werden mu\s ( Images !! )
+ const SfxMedium *pMedium = pObjSh->GetMedium();
+ String aURL;
+ SfxFrame *pFrm = GetFrame();
+ if ( pObjSh->HasName() )
+ {
+ aURL = pMedium->GetURLObject().GetURLNoPass();
+ }
+
+ // Erstmal den alten Anchor ignorieren
+//(dv) if ( pImp->xAnchor.Is() )
+//(dv) EndListening( *pImp->xAnchor );
+
+ if ( aURL != pImp->aActualURL )
+ // ::com::sun::star::util::URL hat sich ge"andert
+ pImp->aActualURL = aURL;
+
+ // Selbst wenn die URL sich nicht ge"andert hat, vielleicht ja der Anchor !!
+#if 0 //(dv)
+ pImp->xAnchor = pMedium->GetAnchor( sal_True );
+ if ( pImp->xAnchor.Is() )
+ {
+ // PresentationURL aktualisieren
+ pImp->aActualPresentationURL = pImp->xAnchor->GetPresentationURL();
+
+ // Am neuen (?) ::com::sun::star::chaos::Anchor horchen
+ StartListening( *pImp->xAnchor );
+ }
+#endif //(dv)
+
+ // Titel des Fensters
+ String aName( pObjSh->GetTitle(SFX_TITLE_CAPTION) );
+ String aTitle(aName);
+ String aOldTitle(aName);
+ aName += ':';
+ aName += String::CreateFromInt32(pImp->nDocViewNo);
+
+ // gibt es "uberhaupt noch eine weitere ::com::sun::star::sdbcx::View?
+ sal_uInt16 nViews=0;
+ for ( SfxViewFrame *pView= GetFirst(pObjSh);
+ pView && nViews<2;
+ pView = GetNext(*pView,pObjSh) )
+ if ( ( pView->GetFrameType() & SFXFRAME_HASTITLE ) &&
+ !IsDowning_Impl())
+ nViews++;
+ if ( nViews == 2 || pImp->nDocViewNo > 1 )
+ // nur dann die Nummer dranh"angen
+ aTitle = aName;
+
+ if ( pObjSh->IsReadOnly() )
+ aTitle += String( SfxResId(STR_READONLY) );
+
+ // Name des SbxObjects
+ String aSbxName = pObjSh->SfxShell::GetName();
+ if ( IsVisible() )
+ {
+ aSbxName += ':';
+ aSbxName += String::CreateFromInt32(pImp->nDocViewNo);
+ }
+ SetName( aSbxName );
+ pImp->aFrameTitle = aTitle;
+ GetBindings().Invalidate( SID_FRAMETITLE );
+ GetBindings().Invalidate( SID_CURRENT_URL );
+
+ return aTitle;
+}
+
+
+//--------------------------------------------------------------------
+sal_Bool SfxViewFrame::Close()
+{
+ DBG_CHKTHIS(SfxViewFrame, 0);
+
+ DBG_ASSERT( GetFrame()->IsClosing_Impl(), "Niemals den ViewFrame vor dem Frame closen!" );
+
+ // Wenn bis jetzt noch nicht gespeichert wurde, sollen eingebettete Objekte
+ // auch nicht mehr automatisch gespeichert werden!
+ if ( GetViewShell() )
+ GetViewShell()->DiscardClients_Impl();
+ Broadcast( SfxSimpleHint(SFX_HINT_DYING) );
+
+ return sal_True;
+}
+
+//--------------------------------------------------------------------
+
+void SfxViewFrame::DoActivate( sal_Bool bUI, SfxViewFrame* pOldFrame )
+{
+ DBG_CHKTHIS(SfxViewFrame, 0);
+ SfxApplication *pSfxApp = SFX_APP();
+
+#ifdef WIN
+ pSfxApp->TestFreeResources_Impl();
+#endif
+
+ pDispatcher->DoActivate_Impl( bUI );
+
+ // Wenn ich einen parent habe und dieser ist kein parent des alten
+ // ViewFrames, erh"alt er ein ParentActivate
+ if ( bUI )
+ {
+/*
+ SfxMedium* pMed = GetObjectShell() ? GetObjectShell()->GetMedium() : NULL;
+ if( pMed )
+ {
+ SFX_ITEMSET_ARG(
+ pMed->GetItemSet(), pInterceptorItem, SfxSlotInterceptorItem,
+ SID_INTERCEPTOR, sal_False );
+ if( pInterceptorItem )
+ {
+ SfxSlotInterceptor* pInter = pInterceptorItem->GetValue();
+ if( !pInter->GetBindings() )
+ pInter->SetBindings( &GetBindings() );
+ pInter->Activate( sal_True );
+ }
+ }
+ */
+ SfxViewFrame *pFrame = GetParentViewFrame();
+ while ( pFrame )
+ {
+ if ( !pOldFrame || !pOldFrame->GetFrame()->IsParent( pFrame->GetFrame() ) )
+ pFrame->pDispatcher->DoParentActivate_Impl();
+ pFrame = pFrame->GetParentViewFrame();
+ }
+ }
+}
+
+//--------------------------------------------------------------------
+void SfxViewFrame::DoDeactivate(sal_Bool bUI, SfxViewFrame* pNewFrame )
+{
+ DBG_CHKTHIS(SfxViewFrame, 0);
+ SfxApplication *pSfxApp = SFX_APP();
+ pDispatcher->DoDeactivate_Impl( bUI );
+
+ // Wenn ich einen parent habe und dieser ist kein parent des neuen
+ // ViewFrames, erh"alt er ein ParentDeactivate
+ if ( bUI )
+ {
+/*
+ SfxMedium* pMed = GetObjectShell() ? GetObjectShell()->GetMedium() : NULL;
+ if( pMed )
+ {
+ SFX_ITEMSET_ARG(
+ pMed->GetItemSet(), pInterceptorItem, SfxSlotInterceptorItem,
+ SID_INTERCEPTOR, sal_False );
+ if( pInterceptorItem )
+ pInterceptorItem->GetValue()->Activate( sal_False );
+ }
+*/
+ SfxViewFrame *pFrame = GetParentViewFrame();
+ while ( pFrame )
+ {
+ if ( !pNewFrame || !pNewFrame->GetFrame()->IsParent( pFrame->GetFrame() ) )
+ pFrame->pDispatcher->DoParentDeactivate_Impl();
+ pFrame = pFrame->GetParentViewFrame();
+ }
+ }
+#ifdef WIN
+ pSfxApp->TestFreeResources_Impl();
+#endif
+}
+
+//------------------------------------------------------------------------
+void SfxViewFrame::InvalidateBorderImpl
+(
+ const SfxViewShell* pSh
+)
+
+{
+ if( pSh && !nAdjustPosPixelLock )
+ {
+ //! Hack
+ if ( ISA(SfxInPlaceFrame) )
+ ((SfxInPlaceFrame*)this)->InvalidateBorderImpl( pSh );
+ else if ( ISA(SfxTopViewFrame) )
+ ((SfxTopViewFrame*)this)->InvalidateBorderImpl( pSh );
+ else
+ ((SfxInternalFrame*)this)->InvalidateBorderImpl( pSh );
+ }
+}
+
+//------------------------------------------------------------------------
+sal_Bool SfxViewFrame::SetBorderPixelImpl
+(
+ const SfxViewShell* pSh,
+ const SvBorder& rBorder
+)
+
+{
+ pImp->aBorder = rBorder;
+ return sal_True;
+}
+
+//------------------------------------------------------------------------
+const SvBorder& SfxViewFrame::GetBorderPixelImpl
+(
+ const SfxViewShell* pSh
+) const
+
+{
+ return pImp->aBorder;
+}
+
+//--------------------------------------------------------------------
+void SfxViewFrame::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
+{
+ {DBG_CHKTHIS(SfxViewFrame, 0);}
+ if ( !xObjSh.Is() )
+ return;
+
+ if ( rHint.IsA(TYPE(SfxSimpleHint)) )
+ {
+ switch( ( (SfxSimpleHint&) rHint ).GetId() )
+ {
+ case SFX_HINT_MODECHANGED:
+ {
+ // r/o Umschaltung?
+ SfxDispatcher *pDispat = GetDispatcher();
+ sal_Bool bWasReadOnly = pDispat->GetReadOnly_Impl();
+ sal_Bool bIsReadOnly = xObjSh->IsReadOnly();
+ if ( !bWasReadOnly != !bIsReadOnly )
+ {
+ // Dann auch TITLE_CHANGED
+ UpdateTitle();
+ GetBindings().Invalidate( SID_FILE_NAME );
+ GetBindings().Invalidate( SID_DOCINFO_TITLE );
+
+ pDispat->GetBindings()->InvalidateAll(sal_True);
+ pDispat->SetReadOnly_Impl( bIsReadOnly );
+
+ // Dispatcher-Update nur erzwingen, wenn es nicht sowieso
+ // demn"achst kommt, anderenfalls ist Zappelei oder gar
+ // GPF m"oglich, da Writer z.B. gerne mal im Resize irgendwelche
+ // Aktionen t"atigt, die ein SetReadOnlyUI am Dispatcher zur
+ // Folge haben!
+ if ( pDispat->IsUpdated_Impl() )
+ pDispat->Update_Impl(sal_True);
+ }
+
+ Enable( !xObjSh->IsInModalMode() );
+ break;
+ }
+
+ case SFX_HINT_TITLECHANGED:
+ {
+ UpdateTitle();
+ GetBindings().Invalidate( SID_FILE_NAME );
+ GetBindings().Invalidate( SID_DOCINFO_TITLE );
+ break;
+ }
+
+ case SFX_HINT_DYING:
+ // when the Object is being deleted, destroy the view too
+ if ( xObjSh.Is() )
+ ReleaseObjectShell_Impl();
+ else
+ GetFrame()->DoClose();
+ break;
+
+ }
+ }
+ else if ( rHint.IsA(TYPE(SfxEventHint)) )
+ {
+ // Wenn das Document asynchron geladen wurde, wurde der Dispatcher
+ // auf ReadOnly gesetzt, was zur"ckgenommen werden mu\s, wenn
+ // das Document selbst nicht ReadOnly ist und das Laden fertig ist.
+ switch ( ((SfxEventHint&)rHint).GetEventId() )
+ {
+ case SFX_EVENT_MODIFYCHANGED:
+ {
+ SfxBindings& rBind = GetBindings();
+ rBind.Invalidate( SID_DOC_MODIFIED );
+ rBind.Invalidate( SID_SAVEDOC );
+ rBind.Invalidate( SID_RELOAD );
+ break;
+ }
+
+ case SFX_EVENT_OPENDOC:
+ case SFX_EVENT_CREATEDOC:
+ {
+ if ( !xObjSh->IsReadOnly() )
+ {
+ // Im Gegensatz zu oben (TITLE_CHANGED) mu\s das UI nicht
+ // upgedated werden, da es nicht gehidet war!
+ GetDispatcher()->GetBindings()->InvalidateAll(sal_True);
+ }
+
+ break;
+ }
+
+ case SFX_EVENT_LOADFINISHED:
+ {
+ // Ein fertig geladenes Dokument kann das Event nicht selbst ausl"osen,
+ // weil es nicht wei\s, ob schon eine ::com::sun::star::sdbcx::View erzeugt wurde
+ xObjSh->PostActivateEvent_Impl();
+ break;
+ }
+
+ case SFX_EVENT_TOGGLEFULLSCREENMODE:
+ {
+ if ( GetFrame()->OwnsBindings_Impl() )
+ GetBindings().GetDispatcher_Impl()->Update_Impl( sal_True );
+ break;
+ }
+ }
+ }
+#if 0 // (dv)
+ else if ( &rBC == (SfxBroadcaster*) (CntAnchor*) pImp->xAnchor )
+ {
+ CntAnchorHint* pCHint = PTR_CAST(CntAnchorHint, &rHint);
+ if ( pCHint )
+ {
+ CntAction eAction = pCHint->GetAction();
+ switch( eAction )
+ {
+ case CNT_ACTION_EXCHANGED :
+ {
+ SfxMedium* pMedium = GetObjectShell()->GetMedium();
+ pMedium->RefreshName_Impl();
+ Reference< XController > xController =
+ GetFrame()->GetFrameInterface()->getController();
+ Reference< XModel > xModel = xController->getModel();
+ if ( xModel.is() )
+ xModel->attachResource( S2U( pMedium->GetName() ), xModel->getArgs() );
+ UpdateTitle();
+ pBindings->Invalidate( SID_CURRENT_URL, sal_True, sal_False );
+ pBindings->Update( SID_CURRENT_URL );
+ break;
+ }
+ }
+ }
+ }
+#endif // (dv)
+}
+
+//------------------------------------------------------------------------
+void SfxViewFrame::Construct_Impl( SfxObjectShell *pObjSh )
+{
+ pImp->pFrame->DocumentInserted( pObjSh );
+ pImp->bInCtor = sal_True;
+ pImp->pParentViewFrame = 0;
+ pImp->bResizeInToOut = sal_True;
+ pImp->pImportShell = 0;
+ pImp->bObjLocked = sal_False;
+ pImp->pFocusWin = 0;
+ pImp->pActiveChild = NULL;
+ pImp->bRestoreView = sal_False;
+ pImp->nCurViewId = 0;
+ pImp->bSetViewFrameLocked = sal_False;
+ pImp->bReloading = sal_False;
+ pImp->bIsDowning = sal_False;
+ pImp->bModal = sal_False;
+ pImp->bEnabled = sal_True;
+ pImp->nDocViewNo = 0;
+ pImp->aMargin = Size( -1, -1 );
+ pImp->pCancelMgr = 0;
+ pImp->pWindow = 0;
+ pImp->pIPFrame = 0;
+
+ SetPool( &SFX_APP()->GetPool() );
+ pDispatcher = new SfxDispatcher(this);
+
+ xObjSh = pObjSh;
+ if ( xObjSh.Is() && xObjSh->IsPreview() )
+ SetQuietMode_Impl( sal_True );
+
+ if ( pObjSh && pObjSh->IsA( TYPE( SfxFrameSetObjectShell ) ) )
+ GetFrame()->SetFrameType_Impl( GetFrameType() | SFXFRAME_FRAMESET );
+ else
+ GetFrame()->SetFrameType_Impl( GetFrameType() & ~SFXFRAME_FRAMESET );
+
+ if ( pObjSh )
+ {
+ pDispatcher->Push( *SFX_APP() );
+ SfxModule* pModule = xObjSh->GetModule();
+ if( pModule )
+ pDispatcher->Push( *pModule );
+ pDispatcher->Push( *this );
+ pDispatcher->Push( *pObjSh );
+ pDispatcher->Flush();
+ StartListening( *pObjSh );
+ pObjSh->ViewAssigned();
+ Notify( *pObjSh, SfxSimpleHint(SFX_HINT_TITLECHANGED) );
+ Notify( *pObjSh, SfxSimpleHint(SFX_HINT_DOCCHANGED) );
+ pDispatcher->SetReadOnly_Impl( pObjSh->IsReadOnly() );
+ }
+ else
+ {
+ pDispatcher->Push( *SFX_APP() );
+ pDispatcher->Push( *this );
+ pDispatcher->Flush();
+ }
+
+ SfxViewFrame *pThis = this; // wegen der kranken Array-Syntax
+ SfxViewFrameArr_Impl &rViewArr = SFX_APP()->GetViewFrames_Impl();
+ rViewArr.C40_INSERT(SfxViewFrame, pThis, rViewArr.Count() );
+
+ pImp->bInCtor = sal_False;
+}
+
+//------------------------------------------------------------------------
+SfxViewFrame::SfxViewFrame( SfxObjectShell &rObjShell, SfxBindings &rBindings,
+ SfxFrame* pParent, sal_uInt32 nType )
+:
+ pImp( new SfxViewFrame_Impl ),
+ pDispatcher(0),
+ pBindings(&rBindings),
+ nAdjustPosPixelLock( 0 )
+{
+ DBG_CTOR(SfxViewFrame, 0);
+
+ SetFrame_Impl( pParent );
+ pImp->pFrame->SetCurrentViewFrame_Impl( this );
+ GetFrame()->SetFrameType_Impl( GetFrameType() | nType );
+ Construct_Impl( &rObjShell );
+}
+
+//------------------------------------------------------------------------
+SfxViewFrame::SfxViewFrame(const SfxViewFrame &rCopy, SfxBindings &rBindings,
+ SfxFrame *pFrame )
+:
+ pImp( new SfxViewFrame_Impl ),
+ pDispatcher(0),
+ pBindings(&rBindings),
+ nAdjustPosPixelLock( 0 )
+{
+ DBG_CTOR(SfxViewFrame, 0);
+
+ SetFrame_Impl( pFrame );
+ pImp->pFrame->SetCurrentViewFrame_Impl( this );
+ GetFrame()->SetFrameType_Impl( rCopy.GetFrameType() );
+ Construct_Impl( rCopy.GetObjectShell() );
+}
+
+SfxViewFrame::SfxViewFrame( SfxBindings& rBindings, SfxFrame *pFrame,
+ SfxObjectShell *pDoc, sal_uInt32 nType )
+ : pImp( new SfxViewFrame_Impl )
+ , pDispatcher(0)
+ , pBindings(&rBindings)
+ , nAdjustPosPixelLock( 0 )
+{
+ DBG_CTOR(SfxViewFrame, 0);
+
+ SetFrame_Impl( pFrame );
+ pImp->pFrame->SetCurrentViewFrame_Impl( this );
+ GetFrame()->SetFrameType_Impl( GetFrameType() | nType );
+ Construct_Impl( pDoc);
+}
+
+//------------------------------------------------------------------------
+SfxViewFrame::~SfxViewFrame()
+{
+ DBG_DTOR(SfxViewFrame, 0);
+
+ if ( GetFrame() && GetFrame()->GetCurrentViewFrame() == this )
+ GetFrame()->SetCurrentViewFrame_Impl( NULL );
+
+ SfxObjectShell* pSh = pImp->pImportShell;
+ if( pSh )
+ pSh->AbortImport();
+
+ // von Frame-Liste abmelden
+ SfxApplication *pSfxApp = SFX_APP();
+ SfxViewFrameArr_Impl &rFrames = pSfxApp->GetViewFrames_Impl();
+ const SfxViewFrame *pThis = this;
+ rFrames.Remove( rFrames.GetPos(pThis) );
+
+ // Member l"oschen
+ KillDispatcher_Impl();
+
+ SfxNewHdl::Get()->TryAllocBuffer();
+ delete pImp;
+}
+
+//------------------------------------------------------------------------
+void SfxViewFrame::KillDispatcher_Impl()
+
+// Dispatcher abr"aumen und l"oschen
+
+{
+ DBG_CHKTHIS(SfxViewFrame, 0);
+
+ SfxModule* pModule = xObjSh.Is() ? xObjSh->GetModule() : 0;
+ if ( xObjSh.Is() )
+ ReleaseObjectShell_Impl();
+ if ( pDispatcher )
+ {
+ if( pModule )
+ pDispatcher->Pop( *pModule, SFX_SHELL_POP_UNTIL );
+ else
+ pDispatcher->Pop( *this );
+ DELETEZ(pDispatcher);
+ }
+}
+
+//------------------------------------------------------------------------
+SfxViewFrame* SfxViewFrame::Current()
+{
+ return SFX_APP() ? SFX_APP()->GetViewFrame() : NULL;
+}
+
+//--------------------------------------------------------------------
+sal_uInt16 SfxViewFrame::Count(TypeId aType)
+
+/* [Beschreibung]
+
+ Liefert die Anzahl der sichtbaren <SfxViewFrame>-Instanzen vom Typ
+ 'aType' bzw. aller sichtbaren, falls 'aType==0' (default).
+*/
+
+{
+ SfxApplication *pSfxApp = SFX_APP();
+ SfxViewFrameArr_Impl& rFrames = pSfxApp->GetViewFrames_Impl();
+ const sal_uInt16 nCount = rFrames.Count();
+ sal_uInt16 nFound = 0;
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
+ {
+ SfxViewFrame *pFrame = rFrames[i];
+ if ( ( !aType || pFrame->IsA(aType) ) &&
+ pFrame->IsVisible() )
+ ++nFound;
+ }
+ return nFound;
+}
+
+//--------------------------------------------------------------------
+// returns the first window of spec. type viewing the specified doc.
+SfxViewFrame* SfxViewFrame::GetFirst
+(
+ const SfxObjectShell* pDoc,
+ TypeId aType,
+ sal_Bool bOnlyIfVisible
+)
+{
+ SfxApplication *pSfxApp = SFX_APP();
+ SfxViewFrameArr_Impl &rFrames = pSfxApp->GetViewFrames_Impl();
+
+ // search for a SfxDocument of the specified type
+ for ( sal_uInt16 nPos = 0; nPos < rFrames.Count(); ++nPos )
+ {
+ SfxViewFrame *pFrame = rFrames.GetObject(nPos);
+ if ( ( !pDoc || pDoc == pFrame->GetObjectShell() ) &&
+ ( !aType || pFrame->IsA(aType) ) &&
+ ( !bOnlyIfVisible || pFrame->IsVisible()) )
+ return pFrame;
+ }
+
+ return 0;
+}
+//--------------------------------------------------------------------
+
+// returns thenext window of spec. type viewing the specified doc.
+SfxViewFrame* SfxViewFrame::GetNext
+(
+ const SfxViewFrame& rPrev,
+ const SfxObjectShell* pDoc,
+ TypeId aType,
+ sal_Bool bOnlyIfVisible
+)
+{
+ SfxApplication *pSfxApp = SFX_APP();
+ SfxViewFrameArr_Impl &rFrames = pSfxApp->GetViewFrames_Impl();
+
+ // refind the specified predecessor
+ sal_uInt16 nPos;
+ for ( nPos = 0; nPos < rFrames.Count(); ++nPos )
+ if ( rFrames.GetObject(nPos) == &rPrev )
+ break;
+
+ // search for a Frame of the specified type
+ for ( ++nPos; nPos < rFrames.Count(); ++nPos )
+ {
+ SfxViewFrame *pFrame = rFrames.GetObject(nPos);
+ if ( ( !pDoc || pDoc == pFrame->GetObjectShell() ) &&
+ ( !aType || pFrame->IsA(aType) ) &&
+ ( !bOnlyIfVisible || pFrame->IsVisible()) )
+ return pFrame;
+ }
+ return 0;
+}
+
+void SfxViewFrame::CloseHiddenFrames_Impl()
+{
+ SfxApplication *pSfxApp = SFX_APP();
+ SfxViewFrameArr_Impl &rFrames = pSfxApp->GetViewFrames_Impl();
+ for ( sal_uInt16 nPos=0; nPos<rFrames.Count(); )
+ {
+ SfxViewFrame *pFrame = rFrames.GetObject(nPos);
+ if ( !pFrame->IsVisible() )
+ pFrame->DoClose();
+ else
+ nPos++;
+ }
+}
+
+//--------------------------------------------------------------------
+SfxProgress* SfxViewFrame::GetProgress() const
+{
+ SfxObjectShell *pObjSh = GetObjectShell();
+ return pObjSh ? pObjSh->GetProgress() : 0;
+}
+
+//--------------------------------------------------------------------
+void SfxViewFrame::ShowStatusText( const String& rText)
+{
+ SfxWorkWindow* pWorkWin = GetFrame()->GetWorkWindow_Impl();
+ SfxStatusBarManager *pMgr = pWorkWin->GetStatusBarManager_Impl();
+ if ( pMgr )
+ {
+ pMgr->GetStatusBar()->HideItems();
+ pMgr->GetStatusBar()->SetText( rText );
+ }
+}
+
+//--------------------------------------------------------------------
+void SfxViewFrame::HideStatusText()
+{
+ SfxWorkWindow* pWorkWin = GetFrame()->GetWorkWindow_Impl();
+ SfxStatusBarManager *pMgr = pWorkWin->GetStatusBarManager_Impl();
+ if ( pMgr )
+ pMgr->GetStatusBar()->ShowItems();
+}
+
+
+//--------------------------------------------------------------------
+SfxIniManager* SfxViewFrame::GetIniManager() const
+{
+/* SfxIniManager *pIniMgr = GetObjectShell()
+ ? GetObjectShell()->GetFactory().GetIniManager()
+ : 0;
+ if ( !pIniMgr )*/ //!
+ return SFX_APP()->GetAppIniManager();
+// return pIniMgr;
+}
+
+//--------------------------------------------------------------------
+void SfxViewFrame::DoAdjustPosSizePixel //! teilen in Inner.../Outer...
+(
+ SfxViewShell* pSh,
+ const Point& rPos,
+ const Size& rSize
+)
+{
+ DBG_CHKTHIS(SfxViewFrame, 0);
+
+ // Components benutzen diese Methode nicht!
+ if( pSh && pSh->GetWindow() && !nAdjustPosPixelLock )
+ {
+ nAdjustPosPixelLock++;
+ if ( pImp->bResizeInToOut )
+ pSh->InnerResizePixel( rPos, rSize );
+ else
+ pSh->OuterResizePixel( rPos, rSize );
+ nAdjustPosPixelLock--;
+ }
+}
+
+//========================================================================
+
+int SfxViewFrameItem::operator==( const SfxPoolItem &rItem ) const
+{
+ return PTR_CAST(SfxViewFrameItem, &rItem)->pFrame== pFrame;
+}
+
+//--------------------------------------------------------------------
+String SfxViewFrameItem::GetValueText() const
+{
+ return String();
+}
+
+//--------------------------------------------------------------------
+SfxPoolItem* SfxViewFrameItem::Clone( SfxItemPool *) const
+{
+ return new SfxViewFrameItem( pFrame);
+}
+
+//--------------------------------------------------------------------
+void SfxViewFrame::SetViewShell_Impl( SfxViewShell *pVSh )
+
+/* [Beschreibung]
+
+ Interne Methode zum setzen der jeweils aktuellen <SfxViewShell>-Instanz,
+ die in diesem SfxViewFrame aktiv ist.
+*/
+
+{
+ SfxShell::SetViewShell_Impl( pVSh );
+ if ( pVSh && !IsA(TYPE(SfxInPlaceFrame)) && !pVSh->UseObjectSize() )
+ pImp->bResizeInToOut = sal_False;
+}
+
+#if SUPD<604
+//--------------------------------------------------------------------
+SfxViewShell* SfxViewFrame::GetViewShell() const
+
+/* [Beschreibung]
+
+ Liefert, sofern existent, die zur Zeit in diesem SfxViewFrame aktive
+ <SfxViewShell>. Dieser kann sich bei speziellen Multi-::com::sun::star::sdbcx::View-Frames
+ von Zeit zu Zeit "ndern. Der R"uckgabewert ist nur im aktuellen
+ Stack-Frame g"ultig.
+*/
+
+{
+ return SfxShell::GetViewShell();
+}
+#endif
+
+//--------------------------------------------------------------------
+/*
+ Beschreibung:
+ Der ParentViewFrame ist der ViewFrame des Containers bei internem InPlace
+*/
+
+void SfxViewFrame::SetParentViewFrame_Impl(SfxViewFrame *pFrame)
+{
+ pImp->pParentViewFrame = pFrame;
+}
+
+//--------------------------------------------------------------------
+/*
+ Beschreibung:
+ Der ParentViewFrame ist der ViewFrame des Containers bei internem InPlace
+*/
+
+SfxViewFrame* SfxViewFrame::GetParentViewFrame_Impl() const
+{
+ return pImp->pParentViewFrame;
+}
+
+//--------------------------------------------------------------------
+void SfxViewFrame::ForceOuterResize_Impl(sal_Bool bOn)
+{
+ pImp->bResizeInToOut = !bOn;
+}
+
+//--------------------------------------------------------------------
+sal_Bool SfxViewFrame::IsResizeInToOut_Impl() const
+{
+ return pImp->bResizeInToOut;
+}
+//--------------------------------------------------------------------
+void SfxViewFrame::DoAdjustPosSize( SfxViewShell *pSh,
+ const Point rPos, const Size &rSize )
+{
+ DBG_CHKTHIS(SfxViewFrame, 0);
+ if( pSh && !nAdjustPosPixelLock && pSh->UseObjectSize())
+ {
+ Window *pWindow = pSh->GetWindow();
+ Point aPos = pWindow->LogicToPixel(rPos);
+ Size aSize = pWindow->LogicToPixel(rSize);
+ DoAdjustPosSizePixel(pSh, aPos, aSize);
+ }
+}
+
+//--------------------------------------------------------------------
+void SfxViewFrame::GetDocNumber_Impl()
+{
+ DBG_ASSERT( GetObjectShell(), "Kein Dokument!" );
+ GetObjectShell()->SetNamedVisibility_Impl();
+ pImp->nDocViewNo = GetObjectShell()->GetNoSet_Impl().GetFreeIndex()+1;
+}
+
+//--------------------------------------------------------------------
+
+void SfxViewFrame::Enable( sal_Bool bEnable )
+{
+ if ( bEnable != pImp->bEnabled )
+ {
+ pImp->bEnabled = bEnable;
+
+ // e.g. InPlace-Frames have a parent...
+ SfxViewFrame *pParent = GetParentViewFrame_Impl();
+ if ( pParent )
+ {
+ pParent->Enable( bEnable );
+ }
+ else
+ {
+ Window *pWindow = &GetFrame()->GetTopFrame()->GetWindow();
+ while ( !pWindow->IsSystemWindow() )
+ pWindow = pWindow->GetParent();
+ pWindow->EnableInput( bEnable, TRUE );
+ }
+
+ // cursor and focus
+ SfxViewShell* pViewSh = GetViewShell();
+ if ( bEnable )
+ {
+ // show cursor
+ if ( pViewSh )
+ pViewSh->ShowCursor();
+ }
+ else
+ {
+ // hide cursor
+ if ( pViewSh )
+ pViewSh->ShowCursor(sal_False);
+ }
+/*
+ if ( !bEnable )
+ GetBindings().ENTERREGISTRATIONS();
+ GetDispatcher()->Lock( !bEnable );
+ if ( bEnable )
+ GetBindings().LEAVEREGISTRATIONS();
+*/
+ }
+}
+
+//--------------------------------------------------------------------
+void SfxViewFrame::Show()
+
+/* [Beschreibung]
+
+ Diese Methode macht das Frame-Window sichtbar und ermittelt vorher
+ den Fenstername. Au\serdem wird das Dokument festgehalten. Man darf
+ i.d.R. nie das Window direkt showen!
+*/
+
+{
+ // zuerst locken damit in UpdateTitle() gilt: IsVisible() == sal_True (:#)
+ if ( xObjSh.Is() )
+ {
+ if ( !pImp->bObjLocked )
+ LockObjectShell_Impl( sal_True );
+
+ // Doc-Shell Titel-Nummer anpassen, get unique view-no
+ if ( 0 == pImp->nDocViewNo && !(GetFrameType() & SFXFRAME_PLUGIN ) )
+ {
+ GetDocNumber_Impl();
+ UpdateTitle();
+ }
+ }
+ else
+ UpdateTitle();
+
+ // Anchor auf gelesen setzen
+ Reference < XContent > xContent( GetObjectShell()->GetMedium()->GetContent() );
+ if ( xContent.is() )
+ {
+ Any aAny( UCB_Helper::GetProperty( xContent, WID_FLAG_IS_FOLDER ) );
+ sal_Bool bIsFolder = FALSE;
+ if ( !( aAny >>= bIsFolder ) || !bIsFolder )
+ {
+ Any aSet;
+ aSet <<= sal_True;
+ UCB_Helper::SetProperty( xContent, WID_IS_READ, aSet );
+ }
+ }
+
+ // Frame-Window anzeigen, aber nur wenn der ViewFrame kein eigenes Window
+ // hat oder wenn er keine Component enth"alt
+ if ( &GetWindow() == &GetFrame()->GetWindow() || !GetFrame()->HasComponent() )
+ GetWindow().Show();
+}
+
+//--------------------------------------------------------------------
+sal_Bool SfxViewFrame::IsVisible() const
+{
+ Window *pWin = pImp->bInCtor ? 0 : &GetWindow();
+ return GetFrame()->HasComponent() || pImp->bObjLocked || ( pWin && pWin->IsVisible() );
+}
+
+//--------------------------------------------------------------------
+void SfxViewFrame::Hide()
+{
+ GetWindow().Hide();
+ if ( pImp->bObjLocked )
+ LockObjectShell_Impl( sal_False );
+}
+
+//--------------------------------------------------------------------
+void SfxViewFrame::LockObjectShell_Impl( sal_Bool bLock )
+{
+ DBG_ASSERT( pImp->bObjLocked != bLock, "Falscher Locked-Status!" );
+
+ DBG_ASSERT( GetObjectShell(), "Kein Dokument!" );
+ GetObjectShell()->OwnerLock(bLock);
+ pImp->bObjLocked = bLock;
+}
+
+//--------------------------------------------------------------------
+void SfxViewFrame::MakeActive_Impl( BOOL bGrabFocus )
+{
+ if ( GetViewShell() && !GetFrame()->IsClosing_Impl() )
+ {
+ if ( IsVisible() )
+ {
+ if ( GetViewShell() )
+ {
+ SfxApplication *pSfxApp = SFX_APP();
+ SfxViewFrame* pParent = GetParentViewFrame();
+ if ( pParent )
+ pParent->SetActiveChildFrame_Impl( this );
+
+ SfxViewFrame* pCurrent = SfxViewFrame::Current();
+ if ( !pCurrent || bGrabFocus || GetFrame()->GetFrameInterface()->isActive() )
+ {
+ pSfxApp->SetViewFrame( this );
+ if ( bGrabFocus )
+ {
+ SvInPlaceClient *pCli = GetViewShell()->GetIPClient();
+ if ( ( !pCli || !pCli->GetProtocol().IsUIActive() ) &&
+ ( !pCurrent || pCurrent->GetParentViewFrame_Impl() != this ) )
+ GetFrame()->GrabFocusOnComponent_Impl();
+ }
+ }
+ else
+ {
+ GetBindings().SetDispatcher( GetDispatcher() );
+ GetBindings().SetActiveFrame( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > () );
+ GetDispatcher()->Update_Impl( TRUE );
+ }
+ }
+ }
+ }
+}
+
+//--------------------------------------------------------------------
+
+SfxViewShell* SfxViewFrame::CreateView_Impl( sal_uInt16 nViewId )
+
+/* [Beschreibung]
+
+ Erzeugt eine SfxViewShell f"ur diesen SfxViewFrame. Wird auch aus
+ <SfxObjectShell::LoadWindows_Impl()>
+ gerufen.
+*/
+
+{
+ DBG_ASSERT( GetObjectShell(), "Kein Dokument!" );
+
+ LockAdjustPosSizePixel();
+
+ // passende ::com::sun::star::sdbcx::View-Factory suchen
+ SfxObjectFactory &rDocFact = GetObjectShell()->GetFactory();
+ sal_uInt16 nNewNo = nViewId ? USHRT_MAX : 0;
+ for ( sal_uInt16 nNo = 0;
+ nNo < rDocFact.GetViewFactoryCount();
+ ++nNo )
+ {
+ sal_uInt16 nFoundId = rDocFact.GetViewFactory(nNo).GetOrdinal();
+ if ( nNewNo == USHRT_MAX )
+ {
+ if ( nViewId == nFoundId )
+ nNewNo = nNo;
+ }
+ }
+
+ // per Factory erzeugen
+ GetBindings().ENTERREGISTRATIONS();
+ SfxViewFactory &rViewFactory = rDocFact.GetViewFactory( nNewNo );
+ SfxViewShell *pViewShell = rViewFactory.CreateInstance(this, 0);
+ SetViewShell_Impl(pViewShell);
+ UnlockAdjustPosSizePixel();
+
+ if ( GetWindow().IsReallyVisible() )
+ DoAdjustPosSizePixel(pViewShell, Point(), GetWindow().GetOutputSizePixel());
+
+ // erste jetzt anzeigen (ausser wenn MTs BASIC-IDE mal wieder keins hat)
+ Window *pViewWin = pViewShell->GetWindow();
+ if ( pViewWin && pViewShell->IsShowView_Impl() )
+ pViewWin->Show();
+
+ // Dispatcher
+ GetDispatcher()->Push( *pViewShell );
+ if ( pViewShell->GetSubShell() )
+ GetDispatcher()->Push( *pViewShell->GetSubShell() );
+ pViewShell->PushSubShells_Impl();
+
+#if defined SFX_HINT_VIEWCREATED
+ GetObjectShell()->Broadcast( SfxSimpleHint( SFX_HINT_VIEWCREATED ) );
+#endif
+
+ GetBindings().LEAVEREGISTRATIONS();
+ return pViewShell;
+}
+
+//-------------------------------------------------------------------------
+SfxViewFrame* SfxViewFrame::SearchViewFrame( SfxViewFrame *pViewFrame,
+ const String& rName )
+{
+ if ( !pViewFrame )
+ pViewFrame = SfxViewFrame::Current();
+ if ( !pViewFrame )
+ return NULL;
+ SfxFrame *pFrame = pViewFrame->GetFrame()->SearchFrame( rName );
+ if ( !pFrame )
+ return NULL;
+
+ // Der Frame ist selbst ein ViewFrame oder enth"alt einen
+/*
+ pViewFrame = PTR_CAST( SfxViewFrame, pFrame );
+ if ( !pViewFrame && pFrame->GetChildFrameCount() )
+ pViewFrame = PTR_CAST( SfxViewFrame, pFrame->GetChildFrame(0) );
+*/
+ return pFrame->GetCurrentViewFrame();
+}
+
+//-------------------------------------------------------------------------
+
+void SfxViewFrame::SetQuietMode_Impl( sal_Bool bOn )
+{
+ GetDispatcher()->SetQuietMode_Impl( bOn );
+}
+
+//-------------------------------------------------------------------------
+
+SfxObjectShell* SfxViewFrame::GetObjectShell()
+{
+ return xObjSh;
+}
+
+void SfxViewFrame::SetMargin_Impl( const Size& rMargin )
+{
+ pImp->aMargin = rMargin;
+}
+
+const Size& SfxViewFrame::GetMargin_Impl() const
+{
+ return pImp->aMargin;
+}
+
+void SfxViewFrame::SetActiveChildFrame_Impl( SfxViewFrame *pViewFrame )
+{
+ if ( pViewFrame != pImp->pActiveChild )
+ {
+ if ( !pViewFrame )
+ {
+ //! if ( GetChildFrame(0) && GetViewShell() && GetViewShell()->IsA( TYPE(SfxFrameSetViewShell) ) )
+ //! GetDispatcher()->LockUI_Impl();
+ }
+ else if ( !pImp->pActiveChild )
+ {
+ GetDispatcher()->LockUI_Impl( sal_False );
+ }
+
+ pImp->pActiveChild = pViewFrame;
+
+ Reference< XFramesSupplier > xFrame( GetFrame()->GetFrameInterface(), UNO_QUERY );
+ Reference< XFrame > xActive;
+ if ( pViewFrame )
+ xActive = pViewFrame->GetFrame()->GetFrameInterface();
+
+ if ( xFrame.is() ) // PB: #74432# xFrame cann be NULL
+ xFrame->setActiveFrame( xActive );
+
+ if ( pViewFrame )
+ {
+ // Das n"achsth"ohere Frameset suchen, falls ich nicht selbst schon
+ // eines enthalte( der InternalFrame k"onnte auch zu einem FloatingFrame
+ // geh"oren ) und dort den Frame aktivieren, der letztlich pViewFrame
+ // enth"alt.
+ SfxFrame *pFrame = GetFrame();
+ do
+ {
+ SfxURLFrame *pURLFrame = PTR_CAST( SfxURLFrame, pFrame );
+ if ( pURLFrame && pURLFrame->GetFrameSet() )
+ {
+ pURLFrame->GetFrameSet()->SetActiveFrame( pURLFrame );
+ break;
+ }
+ pFrame = pFrame->GetParentFrame();
+ }
+ while ( pFrame );
+ }
+ }
+}
+
+SfxViewFrame* SfxViewFrame::GetActiveChildFrame_Impl() const
+{
+ SfxViewFrame *pViewFrame = pImp->pActiveChild;
+/*
+ if ( !pViewFrame )
+ {
+ // Wenn es keinen aktiven ChildFrame gibt, irgendeinen nehmen
+ for ( sal_uInt16 n=0; n<GetChildFrameCount(); n++ )
+ {
+ pViewFrame =
+ PTR_CAST( SfxViewFrame, GetChildFrame(n)->GetChildFrame(0) );
+ if ( pViewFrame )
+ break;
+ }
+ }
+
+ pImp->pActiveChild = pViewFrame;
+*/
+ return pViewFrame;
+}
+
+//--------------------------------------------------------------------
+
+sal_Bool SfxViewFrame::SwitchToViewShell_Impl
+(
+ sal_uInt16 nViewId, /* > 0
+ Registrierungs-Id der ::com::sun::star::sdbcx::View, auf die umge-
+ schaltet werden soll, bzw. die erstmalig
+ erzeugt werden soll.
+
+ == 0
+ Es soll die Default-::com::sun::star::sdbcx::View verwendet werden. */
+
+ sal_Bool bIsIndex /* sal_True
+ 'nViewId' ist keine Registrations-Id sondern
+ ein ::com::sun::star::sdbcx::Index in die f"ur die in diesem
+ <SfxViewFrame> dargestellte <SfxObjectShell>.
+ */
+)
+
+/* [Beschreibung]
+
+ Interne Methode zum Umschalten auf eine andere <SfxViewShell>-Subklasse,
+ die in diesem SfxMDIFrame erzeugt werden soll. Existiert noch
+ keine SfxViewShell in diesem SfxMDIFrame, so wird erstmalig eine
+ erzeugt.
+
+
+ [R"uckgabewert]
+
+ sal_Bool sal_True
+ die angeforderte SfxViewShell wurde erzeugt
+ und eine ggf. bestehende gel"oscht
+
+ sal_False
+ die angeforderte SfxViewShell konnte nicht
+ erzeugt werden, die bestehende SfxViewShell
+ existiert daher weiterhin
+*/
+
+{
+ DBG_ASSERT( GetObjectShell(), "Kein Dokument!" );
+
+ SfxObjectFactory &rDocFact = GetObjectShell()->GetFactory();
+
+ // die Indizes der neuen und alten ::com::sun::star::sdbcx::View-Shell finden
+ sal_uInt16 nOldNo = USHRT_MAX, nNewNo = USHRT_MAX;
+ bIsIndex |= 0 == nViewId;
+ for ( sal_uInt16 nNo = 0; nNo < rDocFact.GetViewFactoryCount(); ++nNo )
+ {
+ sal_uInt16 nFoundId = rDocFact.GetViewFactory(nNo).GetOrdinal();
+ if ( nNewNo == USHRT_MAX )
+ {
+ if ( bIsIndex && nViewId == nNo )
+ {
+ nNewNo = nNo;
+ nViewId = nFoundId; // fuer nViewId == 0
+ }
+ else if ( !bIsIndex && nViewId == nFoundId )
+ nNewNo = nNo;
+ }
+ if ( pImp->nCurViewId == nFoundId )
+ nOldNo = nNo;
+ }
+
+ if ( nNewNo == USHRT_MAX )
+ {
+ // Bei unbekannter Id die Dafault-Id nehmen
+ sal_uInt16 nFoundId = rDocFact.GetViewFactory(0).GetOrdinal();
+ nNewNo = 0;
+ nViewId = nFoundId;
+ if ( pImp->nCurViewId == nFoundId )
+ nOldNo = 0;
+ }
+
+ SfxViewShell *pSh = GetViewShell();
+
+ DBG_ASSERT( !pSh || nOldNo != USHRT_MAX, "old shell id not found" );
+
+ // existiert schon eine ViewShell?
+ sal_Bool bHasFocus = sal_False;
+ SfxViewShell *pOldSh = pSh;
+ if ( pOldSh )
+ {
+ if ( !bHasFocus )
+ bHasFocus = pOldSh->GetWindow() && pOldSh->GetWindow()->HasChildPathFocus( sal_True );
+
+ // dann diese schlie\sen
+ if ( !pOldSh->PrepareClose() )
+ return sal_False;
+
+ // Jetzt alle SubShells wechhauen
+ pOldSh->PushSubShells_Impl( sal_False );
+ sal_uInt16 nLevel = pDispatcher->GetShellLevel( *pOldSh );
+ if ( nLevel )
+ {
+ // Es gibt SubShells
+ SfxShell *pSubShell = pDispatcher->GetShell( nLevel-1 );
+ if ( pSubShell == pOldSh->GetSubShell() )
+ //"Echte" Subshells nicht deleten
+ pDispatcher->Pop( *pSubShell, SFX_SHELL_POP_UNTIL );
+ else
+ pDispatcher->Pop( *pSubShell, SFX_SHELL_POP_UNTIL | SFX_SHELL_POP_DELETE );
+ }
+ pDispatcher->Pop( *pOldSh );
+ GetBindings().Invalidate( nOldNo + SID_VIEWSHELL0 );
+ }
+
+ // Id der neuen ViewShell eintragen
+ pImp->nCurViewId = nViewId;
+ GetBindings().Invalidate( nNewNo + SID_VIEWSHELL0 );
+
+ // neue ViewShell erzeugen
+ SfxViewFactory &rViewFactory = rDocFact.GetViewFactory( nNewNo );
+ LockAdjustPosSizePixel();
+
+ GetBindings().ENTERREGISTRATIONS();
+ pSh = rViewFactory.CreateInstance(this, pOldSh);
+ Window *pEditWin = pSh->GetWindow();
+ DBG_ASSERT( !pEditWin || !pEditWin->IsReallyVisible(), "don`t show your ViewShell`s Window by yourself!" );
+
+ // neue ViewShell in Frame einsetzen
+ GetDispatcher()->SetDisableFlags( 0 );
+ SetViewShell_Impl(pSh);
+
+// if( !pSh->pImp->bControllerSet )
+ {
+ Reference < ::com::sun::star::awt::XWindow > xWindow(
+ GetFrame()->GetWindow().GetComponentInterface(), UNO_QUERY );
+ Reference < XFrame > xFrame( GetFrame()->GetFrameInterface() );
+ if ( !pSh->GetController().is() )
+ pSh->SetController( new SfxBaseController( pSh ) );
+ Reference < XController > xController( pSh->GetController() );
+ xFrame->setComponent( xWindow, xController );
+ xController->attachFrame( xFrame );
+ Reference < XModel > xModel( GetObjectShell()->GetModel() );
+ if ( xModel.is() )
+ {
+ xController->attachModel( xModel );
+ xModel->setCurrentController( xController );
+ }
+ }
+
+ GetDispatcher()->Push( *pSh );
+ if ( pSh->GetSubShell() )
+ GetDispatcher()->Push( *pSh->GetSubShell() );
+ pSh->PushSubShells_Impl();
+ GetDispatcher()->Flush();
+
+ // ggf. UserData restaurieren
+ if ( pImp->bRestoreView && pImp->aViewData.Len() )
+ {
+ pSh->ReadUserData( pImp->aViewData, sal_True );
+ pImp->bRestoreView = sal_False;
+ }
+
+ // Tools anordnen, bevor die Gr"os\se gesetzt wird
+ if ( SfxViewFrame::Current() == this )
+ GetDispatcher()->Update_Impl( sal_True );
+
+ // ggf. Resize ausl"osen
+ UnlockAdjustPosSizePixel();
+
+ Window* pFrameWin = &GetWindow();
+ if ( pFrameWin != &GetFrame()->GetWindow() )
+ pFrameWin->Show();
+
+ if ( GetWindow().IsReallyVisible() )
+ DoAdjustPosSizePixel( pSh, Point(), GetWindow().GetOutputSizePixel() );
+
+ if ( pEditWin && pSh->IsShowView_Impl() )
+ {
+ SfxFrameSetViewShell *pFrSh = PTR_CAST( SfxFrameSetViewShell, pSh );
+ if ( pFrSh )
+ pFrSh->GetSplitWindow()->Show();
+ else
+ pEditWin->Show();
+ if ( bHasFocus )
+ GetFrame()->GrabFocusOnComponent_Impl();
+ }
+
+ GetBindings().LEAVEREGISTRATIONS();
+ delete pOldSh;
+ return sal_True;
+}
+//--------------------------------------------------------------------
+
+void SfxViewFrame::SetViewData_Impl( sal_uInt16 nViewId, const String &rViewData )
+{
+ pImp->bRestoreView = sal_True;
+ pImp->nCurViewId = nViewId;
+ pImp->aViewData = rViewData;
+}
+
+//-------------------------------------------------------------------------
+String& SfxViewFrame::GetViewData_Impl()
+{
+ return pImp->aViewData;
+}
+
+//-------------------------------------------------------------------------
+sal_Bool SfxViewFrame::IsRestoreView_Impl() const
+{
+ return pImp->bRestoreView;
+}
+
+//-------------------------------------------------------------------------
+void SfxViewFrame::SetRestoreView_Impl( sal_Bool bOn )
+{
+ pImp->bRestoreView = bOn;
+}
+
+//-------------------------------------------------------------------------
+sal_uInt16 SfxViewFrame::GetCurViewId() const
+{
+ return pImp->nCurViewId;
+}
+
+//-------------------------------------------------------------------------
+void SfxViewFrame::ExecView_Impl
+(
+ SfxRequest& rReq // der auszuf"uhrende <SfxRequest>
+)
+
+/* [Beschreibung]
+
+ Interne Methode zum Ausf"uhren der f"ur die <SfxShell> Subklasse
+ SfxViewFrame in der <SVIDL> beschriebenen Slots.
+*/
+
+{
+ DBG_CHKTHIS(SfxViewFrame, 0);
+
+ // Wenn gerade die Shells ausgetauscht werden...
+ if ( !GetObjectShell() || !GetViewShell() )
+ return;
+
+ switch ( rReq.GetSlot() )
+ {
+#ifdef BASIC_HACKS
+ case SID_HELP_STRING:
+ {
+ SFX_REQUEST_ARG( rReq, pItem, SfxUInt16Item, SID_CONFIGITEMID, sal_False );
+ if ( pItem )
+ {
+ sal_uInt16 nId = pItem->GetValue();
+ SfxModule *pMod = GetObjectShell()->GetModule();
+ SfxSlotPool* pPool = pMod ? pMod->GetSlotPool() : NULL;
+ if ( !pPool )
+ pPool = &SFX_APP()->GetSlotPool();
+ rReq.SetReturnValue( SfxStringItem( SID_HELP_STRING, pPool->GetSlotHelpText_Impl( nId ) ) );
+ }
+ break;
+ }
+
+ case SID_METHODNAME:
+ {
+ SFX_REQUEST_ARG( rReq, pItem, SfxUInt16Item, SID_CONFIGITEMID, sal_False );
+ if ( pItem )
+ {
+ sal_uInt16 nId = pItem->GetValue();
+ SfxModule *pMod = GetObjectShell()->GetModule();
+ SfxSlotPool* pPool = pMod ? pMod->GetSlotPool() : NULL;
+ if ( !pPool )
+ pPool = &SFX_APP()->GetSlotPool();
+ rReq.SetReturnValue( SfxStringItem( SID_METHODNAME, pPool->GetSlotName_Impl( nId ) ) );
+ }
+ break;
+ }
+
+ case SID_CONFIGITEMID:
+ {
+ SFX_REQUEST_ARG( rReq, pItem, SfxUInt16Item, SID_CONFIGITEMID, sal_False );
+ if ( pItem )
+ {
+ sal_uInt16 nId = pItem->GetValue();
+ SfxModule *pMod = GetObjectShell()->GetModule();
+/*
+ SfxSlotPool* pPool = pMod ? pMod->GetSlotPool() : NULL;
+ if ( !pPool )
+ pPool = &SFX_APP()->GetSlotPool();
+ const SfxSlot *pSlot = pPool->GetSlot( nId );
+ sal_Bool bRet = pSlot ? pSlot->IsMode( SFX_SLOT_TOOLBOXCONFIG ) : sal_False;
+ */
+ SFX_IMAGEMANAGER()->StartCustomize();
+ Image aImage = SFX_IMAGEMANAGER()->GetImageFromModule_Impl( nId, pMod );
+ sal_Bool bRet = aImage.GetSizePixel().Width() != 0;
+ rReq.SetReturnValue( SfxBoolItem( SID_CONFIGITEMID, bRet ) );
+ }
+ break;
+ }
+#endif
+
+ case SID_FILLFRAME:
+ {
+ // Bei Mail etc. k"onnen die Frames nicht angesprochen werden
+ SfxFrame *pParent = GetFrame()->GetParentFrame();
+ if ( pParent && pParent->GetCurrentViewFrame()->
+ GetViewShell()->IsImplementedAsFrameset_Impl() )
+ break;
+
+ SfxViewFrame *pRet = NULL;
+ SFX_REQUEST_ARG(
+ rReq, pItem, SfxStringItem, SID_FILLFRAME, sal_False );
+ if ( pItem )
+ {
+ String aName( pItem->GetValue() );
+ sal_uInt16 nFrame = (sal_uInt16) aName.ToInt32();
+ if ( nFrame == 0 )
+ nFrame = USHRT_MAX;
+
+ SfxFrameIterator aIter( *GetFrame(), sal_False );
+ SfxFrame *pFrame = aIter.FirstFrame();
+ sal_uInt16 nActFrame = 1;
+ while ( pFrame )
+ {
+ SfxViewFrame *pView = pFrame->GetCurrentViewFrame();
+ if ( nActFrame == nFrame || pView &&
+ aName.CompareIgnoreCaseToAscii( pView->SfxShell::GetName() ) == COMPARE_EQUAL )
+ {
+ pRet = pView;
+ break;
+ }
+
+ pFrame = aIter.NextFrame( *pFrame );
+ nActFrame++;
+ }
+ }
+
+ rReq.SetReturnValue( SfxObjectItem( SID_DOCFRAME, pRet ) );
+ break;
+ }
+
+ case SID_VIEWSHELL:
+ {
+ const SfxPoolItem *pItem = 0;
+ if ( rReq.GetArgs() &&
+ SFX_ITEM_SET == rReq.GetArgs()->GetItemState( SID_VIEWSHELL, sal_False, &pItem ) )
+ rReq.SetReturnValue( SfxBoolItem(0, SwitchToViewShell_Impl(
+ (sal_uInt16)((const SfxUInt16Item*) pItem)->GetValue()) ));
+ break;
+ }
+
+ case SID_VIEWSHELL0:
+ case SID_VIEWSHELL1:
+ case SID_VIEWSHELL2:
+ case SID_VIEWSHELL3:
+ case SID_VIEWSHELL4:
+ {
+ rReq.SetReturnValue( SfxBoolItem(0,
+ SwitchToViewShell_Impl( rReq.GetSlot() - SID_VIEWSHELL0, sal_True ) ) );
+ break;
+ }
+
+ case SID_NEWWINDOW:
+ {
+ // Hack. demnaechst virtuelle Funktion
+ if ( !GetViewShell()->NewWindowAllowed() && !GetObjectShell()->HasName() )
+ return;
+
+ // ViewData bei FrameSets rekursiv holen
+ GetFrame()->GetViewData_Impl();
+ SfxMedium *pMed = GetObjectShell()->GetMedium();
+ String aUserData;
+ GetViewShell()->WriteUserData( aUserData, sal_True );
+ if ( !GetViewShell()->NewWindowAllowed() )
+ {
+ SfxFrame *pFrame = SfxTopFrame::Create();
+ SfxApplication* pApp = SFX_APP();
+ SfxAllItemSet aSet( pApp->GetPool() );
+
+ SFX_ITEMSET_ARG( pMed->GetItemSet(), pRefererItem, SfxStringItem, SID_REFERER, sal_False );
+ SfxStringItem aReferer( SID_REFERER, DEFINE_CONST_UNICODE( "private:user" ) );
+ if ( !pRefererItem )
+ pRefererItem = &aReferer;
+
+ aSet.Put( SfxStringItem( SID_FILE_NAME, pMed->GetName() ) );
+ aSet.Put( SfxFrameDescriptorItem( pFrame->GetDescriptor(), SID_FRAMEDESCRIPTOR ) );
+ aSet.Put( SfxStringItem( SID_USER_DATA, aUserData ) );
+ aSet.Put( SfxUInt16Item( SID_VIEW_ID, GetCurViewId() ) );
+ aSet.Put( *pRefererItem );
+ if( pMed->GetFilter() )
+ aSet.Put( SfxStringItem( SID_FILTER_NAME, pMed->GetFilter()->GetName()) );
+ aSet.Put( SfxFrameItem ( SID_DOCFRAME, pFrame ) );
+ GetDispatcher()->Execute( SID_OPENDOC, SFX_CALLMODE_ASYNCHRON, aSet );
+ }
+ else
+ {
+ pMed->GetItemSet()->Put( SfxStringItem( SID_USER_DATA, aUserData ) );
+ pMed->GetItemSet()->Put( SfxFrameDescriptorItem(
+ GetFrame()->GetDescriptor(), SID_FRAMEDESCRIPTOR ) );
+ SfxFrame *pNew = SfxTopFrame::Create( GetObjectShell(), GetCurViewId() );
+ }
+
+ rReq.Done();
+ break;
+ }
+ }
+}
+
+//-------------------------------------------------------------------------
+void SfxViewFrame::StateView_Impl
+(
+ SfxItemSet& rSet /* leeres <SfxItemSet> mit <Which-Ranges>,
+ welche die Ids der zu erfragenden
+ Slots beschreiben. */
+)
+
+/* [Beschreibung]
+
+ Diese interne Methode liefert in 'rSet' die Status der f"ur die
+ <SfxShell> Subklasse SfxViewFrame in der <SVIDL> beschriebenen <Slots>.
+
+ In 'rSet' sind dabei genau die vom SFx als ung"ultig erkannten
+ Slot-Ids als Which-ranges enthalten. Falls der an dieser Shell gesetzte
+ <SfxItemPool> f"ur einzelne Slot-Ids ein Mapping hat, werden die
+ entsprechenden Which-Ids verwendet, so da\s Items ggf. direkt mit
+ einer mit Which-Ids arbeitenden Core-::com::sun::star::script::Engine ausgetauscht werden
+ k"onnen.
+*/
+
+{
+ DBG_CHKTHIS(SfxViewFrame, 0);
+
+ SfxObjectShell *pDocSh = GetObjectShell();
+
+ if ( !pDocSh )
+ // Ich bin gerade am Reloaden und Yielde so vor mich hin ...
+ return;
+
+ const sal_uInt16 *pRanges = rSet.GetRanges();
+ DBG_ASSERT(pRanges, "Set ohne Bereich");
+ while ( *pRanges )
+ {
+ for ( sal_uInt16 nWhich = *pRanges++; nWhich <= *pRanges; ++nWhich )
+ {
+ switch(nWhich)
+ {
+ case SID_VIEWSHELL:
+ {
+ rSet.Put( SfxUInt16Item( nWhich, pImp->nCurViewId ) );
+ break;
+ }
+
+ case SID_VIEWSHELL0:
+ case SID_VIEWSHELL1:
+ case SID_VIEWSHELL2:
+ case SID_VIEWSHELL3:
+ case SID_VIEWSHELL4:
+ {
+ sal_uInt16 nViewNo = nWhich - SID_VIEWSHELL0;
+ if ( GetObjectShell()->GetFactory().GetViewFactoryCount() >
+ nViewNo && !IsA( TYPE(SfxInPlaceFrame) ) )
+ {
+ SfxViewFactory &rViewFactory =
+ GetObjectShell()->GetFactory().GetViewFactory(nViewNo);
+ rSet.Put( SfxBoolItem(
+ nWhich, pImp->nCurViewId == rViewFactory.GetOrdinal() ) );
+ }
+ else
+ rSet.DisableItem( nWhich );
+ break;
+ }
+ case SID_FRAMETITLE:
+ {
+ if( GetFrameType() & SFXFRAME_HASTITLE )
+ rSet.Put( SfxStringItem(
+ SID_FRAMETITLE, pImp->aFrameTitle) );
+ else
+ rSet.DisableItem( nWhich );
+ break;
+ }
+
+ case SID_NEWWINDOW:
+ {
+ if ( !GetViewShell()->NewWindowAllowed() && !pDocSh->HasName() )
+ rSet.DisableItem( nWhich );
+ break;
+ }
+ }
+ }
+ }
+}
+
+//-------------------------------------------------------------------------
+void SfxViewFrame::GetState_Impl( SfxItemSet &rSet )
+{
+ if ( GetViewShell() && GetViewShell()->GetVerbs() && !ISA( SfxInPlaceFrame ) )
+ rSet.Put(SfxStringListItem(SID_OBJECT));
+ else
+ rSet.DisableItem( SID_OBJECT );
+}
+
+//-------------------------------------------------------------------------
+void SfxViewFrame::ToTop()
+{
+ GetFrame()->Appear();
+}
+
+//-------------------------------------------------------------------------
+SfxViewFrame* SfxViewFrame::GetParentViewFrame() const
+/*
+ Beschreibung:
+ Der ParentViewFrame ist der ViewFrame des ParentFrames
+*/
+{
+ SfxFrame *pFrame = GetFrame()->GetParentFrame();
+ return pFrame ? pFrame->GetCurrentViewFrame() : NULL;
+}
+
+//-------------------------------------------------------------------------
+SfxFrame* SfxViewFrame::GetFrame() const
+/*
+ Beschreibung:
+ GetFrame liefert den Frame, in dem sich der ViewFrame befindet
+*/
+{
+ return pImp->pFrame;
+}
+
+//-------------------------------------------------------------------------
+void SfxViewFrame::SetFrame_Impl( SfxFrame *pFrame )
+{
+ pImp->pFrame = pFrame;
+}
+
+//-------------------------------------------------------------------------
+SfxViewFrame* SfxViewFrame::GetTopViewFrame() const
+{
+ return GetFrame()->GetTopFrame()->GetCurrentViewFrame();
+}
+
+//-------------------------------------------------------------------------
+String SfxViewFrame::GetHelpFile_Impl()
+{
+ String aHelpFileName = GetObjectShell()->GetFactory().GetHelpFile();
+#ifndef TF_NEWDESKTOP
+ DBG_ASSERT( GetObjectShell(), "Kein Dokument!" );
+ Reference< XController > xController = GetFrame()->GetController();
+ if ( 0 == aHelpFileName.Len() && xController.is() )
+ {
+ if ( GetFrame()->GetFrameInterface()->findFrame(
+ DEFINE_CONST_UNICODE( "StructureView" ), FrameSearchFlag::ALL ).is() )
+ aHelpFileName = DEFINE_CONST_UNICODE( "desktop.hlp" );
+ else
+ {
+ Reference< ::com::sun::star::beans::XPropertySet > xProp( xController, UNO_QUERY );
+ if ( xProp.is() )
+ {
+ TRY
+ {
+ Any aAny = xProp->getPropertyValue( ::rtl::OUString::createFromAscii( "HelpFileName" ) );
+ ::rtl::OUString sTemp ;
+ aAny >>= sTemp ;
+ aHelpFileName = String( sTemp );
+ return aHelpFileName;
+ }
+ CATCH_ALL()
+ {
+ }
+ END_CATCH;
+ }
+
+ aHelpFileName = DEFINE_CONST_UNICODE( "schedule.hlp" );
+ }
+ }
+#endif
+
+ return aHelpFileName;
+}
+
+//-------------------------------------------------------------------------
+
+SfxCancelManager *SfxViewFrame::GetCancelManager() const
+
+/* <H3>Description</H3>
+
+ Returns a pointer to the <SfxCancelManager> of the top-view-frame of
+ this view-frame.
+*/
+
+{
+ return GetTopViewFrame()->GetFrame()->GetCancelManager();
+}
+
+void SfxViewFrame::SetWindow_Impl( Window *pWin )
+{
+ pImp->pWindow = pWin;
+}
+
+Window& SfxViewFrame::GetWindow() const
+{
+ return pImp->pWindow ? *pImp->pWindow : GetFrame()->GetWindow();
+}
+
+sal_Bool SfxViewFrame::DoClose()
+{
+ return GetFrame()->DoClose();
+}
+
+void SfxViewFrame::SetIPFrame_Impl( SfxInPlaceFrame *pIPFrame )
+{
+ pImp->pIPFrame = pIPFrame;
+}
+
+SfxInPlaceFrame* SfxViewFrame::GetIPFrame_Impl() const
+{
+ return pImp->pIPFrame;
+}
+
+String SfxViewFrame::GetActualPresentationURL_Impl() const
+{
+ return pImp->aActualPresentationURL;
+}
+
+void SfxViewFrame::SetModalMode( sal_Bool bModal )
+{
+ pImp->bModal = bModal;
+ if ( xObjSh.Is() )
+ {
+ for ( SfxViewFrame* pFrame = SfxViewFrame::GetFirst( xObjSh );
+ !bModal && pFrame; pFrame = SfxViewFrame::GetNext( *pFrame, xObjSh ) )
+ bModal = pFrame->pImp->bModal;
+ xObjSh->SetModalMode_Impl( bModal );
+ }
+}
+
+BOOL SfxViewFrame::IsInModalMode() const
+{
+ return pImp->bModal;
+}
+
+void SfxViewFrame::Resize()
+{
+ Size aSize = GetWindow().GetOutputSizePixel();
+ if ( aSize != pImp->aSize )
+ {
+ pImp->aSize = aSize;
+ SfxViewShell *pShell = GetViewShell();
+ if ( pShell )
+ {
+ if ( pShell->UseObjectSize() )
+ ForceOuterResize_Impl(TRUE);
+ DoAdjustPosSizePixel( pShell, Point(), GetWindow().GetOutputSizePixel() );
+ if ( pShell->UseObjectSize() )
+ ForceOuterResize_Impl(FALSE);
+
+ SfxViewFrame* pActFrame = this;
+ while ( pActFrame->GetActiveChildFrame_Impl() )
+ pActFrame = pActFrame->GetActiveChildFrame_Impl();
+ SvInPlaceClient *pCli = pActFrame->GetViewShell()->GetIPClient();
+ if ( pCli && pCli->GetProtocol().IsUIActive() )
+ {
+ if ( !GetParentViewFrame() )
+ pCli->GetEnv()->GetIPEnv()->DoTopWinResize();
+ pCli->GetEnv()->GetIPEnv()->DoDocWinResize();
+ }
+ }
+ }
+}
+
+void SfxViewFrame::MiscExec_Impl( SfxRequest& rReq )
+{
+ DBG_MEMTEST();
+ FASTBOOL bDone = FALSE;
+ switch ( rReq.GetSlot() )
+ {
+ case SID_NEXTWINDOW :
+ case SID_PREVWINDOW :
+ {
+ SfxWorkWindow *pWork = GetFrame()->GetWorkWindow_Impl();
+ pWork->ActivateNextChild_Impl( rReq.GetSlot() == SID_NEXTWINDOW ? TRUE :FALSE );
+ rReq.Done();
+ break;
+ }
+
+ case SID_TOGGLESTATUSBAR:
+ {
+ SfxToolBoxConfig *pTbxCfg = SfxToolBoxConfig::GetOrCreate();
+
+ // Parameter auswerten
+ SFX_REQUEST_ARG(rReq, pShowItem, SfxBoolItem, rReq.GetSlot(), FALSE);
+ BOOL bShow = pShowItem ? pShowItem->GetValue()
+ : !pTbxCfg->IsStatusBarVisible();
+ pTbxCfg->SetStatusBarVisible( bShow );
+ GetFrame()->GetWorkWindow_Impl()->UpdateObjectBars_Impl();
+ rReq.Done();
+ break;
+ }
+
+ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ case SID_WIN_FULLSCREEN:
+ {
+ SFX_REQUEST_ARG(rReq, pItem, SfxBoolItem, rReq.GetSlot(), FALSE);
+ SfxTopViewFrame *pTop= PTR_CAST( SfxTopViewFrame, GetTopViewFrame() );
+ if ( pTop )
+ {
+ WorkWindow* pWork = (WorkWindow*) pTop->GetTopFrame_Impl()->GetTopWindow_Impl();
+ BOOL bNewFullScreenMode = pItem ? pItem->GetValue() : !pWork->IsFullScreenMode();
+ pWork->ShowFullScreenMode( bNewFullScreenMode );
+ pWork->SetMenuBarMode( bNewFullScreenMode ? MENUBAR_MODE_HIDE : MENUBAR_MODE_NORMAL );
+ }
+
+ GetDispatcher()->Update_Impl( TRUE );
+ break;
+ }
+ }
+
+ if ( bDone )
+ rReq.Done();
+}
+
+void SfxViewFrame::MiscState_Impl(SfxItemSet &rSet)
+{
+ DBG_MEMTEST();
+
+ int bSearchedMDI = FALSE;
+ int bFoundNormMDI = FALSE;
+ int bFoundMiniMDI = FALSE;
+ int bFoundNonDesktopMDI = FALSE;
+
+ const USHORT *pRanges = rSet.GetRanges();
+ DBG_ASSERT(pRanges && *pRanges, "Set ohne Bereich");
+ while ( *pRanges )
+ {
+ for(USHORT nWhich = *pRanges++; nWhich <= *pRanges; ++nWhich)
+ {
+ switch(nWhich)
+ {
+ case SID_TOGGLESTATUSBAR:
+ {
+ rSet.Put( SfxBoolItem( nWhich, SfxToolBoxConfig::GetOrCreate()->IsStatusBarVisible() ) );
+ break;
+ }
+
+ case SID_WIN_FULLSCREEN:
+ {
+ SfxTopViewFrame *pTop= PTR_CAST( SfxTopViewFrame, GetTopViewFrame() );
+ if ( pTop )
+ {
+ WorkWindow* pWork = (WorkWindow*) pTop->GetTopFrame_Impl()->GetTopWindow_Impl();
+ rSet.Put( SfxBoolItem( nWhich, pWork->IsFullScreenMode() ) );
+ }
+ else
+ rSet.DisableItem( nWhich );
+ break;
+ }
+
+ default:
+ //! DBG_ASSERT(FALSE, "Falscher Server fuer GetState");
+ break;
+ }
+ }
+
+ ++pRanges;
+ }
+}
+
+void SfxViewFrame::ChildWindowExecute( SfxRequest &rReq )
+
+/* [Beschreibung]
+
+ Diese Methode kann in der Execute-Methode f"ur das ein- und ausschalten
+ von Child-Windows eingesetzt werden, um dieses inkl. API-Anbindung zu
+ implementieren.
+
+ Einfach in der IDL als 'ExecuteMethod' eintragen.
+*/
+
+{
+ // Parameter auswerten
+ USHORT nSID = rReq.GetSlot();
+
+ SFX_REQUEST_ARG(rReq, pShowItem, SfxBoolItem, nSID, FALSE);
+ BOOL bShow = FALSE;
+ BOOL bHasChild = HasChildWindow(nSID);
+ bShow = pShowItem ? pShowItem->GetValue() : !bHasChild;
+
+ // ausf"uhren
+ if ( !pShowItem || bShow != bHasChild )
+ ToggleChildWindow( nSID );
+
+ GetBindings().Invalidate( nSID );
+ GetDispatcher()->Update_Impl( TRUE );
+
+ if ( bShow && ( nSID == SID_HELP_PI ) )
+ GetpApp()->FocusChanged(); // Hilfe passend zum FocusWindow...
+
+ // ggf. recorden
+ if ( !rReq.IsAPI() )
+ rReq.AppendItem( SfxBoolItem( nSID, bShow ) );
+
+ rReq.Done();
+}
+
+//--------------------------------------------------------------------
+
+void SfxViewFrame::ChildWindowState( SfxItemSet& rState )
+
+/* [Beschreibung]
+
+ Diese Methode kann in der Status-Methode f"ur das Ein- und Ausschalt-
+ Zustand von Child-Windows eingesetzt werden, um dieses zu implementieren.
+
+ Einfach in der IDL als 'StateMethod' eintragen.
+*/
+
+{
+ SfxWhichIter aIter( rState );
+ for ( USHORT nSID = aIter.FirstWhich(); nSID; nSID = aIter.NextWhich() )
+ {
+ if ( nSID == SID_HYPERLINK_DIALOG )
+ {
+ const SfxPoolItem* pDummy = NULL;
+ SfxItemState eState = GetDispatcher()->QueryState( SID_HYPERLINK_SETLINK, pDummy );
+ if ( SFX_ITEM_DISABLED == eState )
+ rState.DisableItem(nSID);
+ else
+ {
+ if ( KnowsChildWindow(nSID) )
+ rState.Put( SfxBoolItem( nSID, HasChildWindow(nSID)) );
+ else
+ rState.DisableItem(nSID);
+ }
+ }
+ else if ( nSID == SID_MAIL_CHILDWIN )
+//! (pb) temporary till the implementation is finished
+ rState.DisableItem(nSID);
+ else if ( nSID == SID_HELP_PI )
+//! (pb) what about help?
+ rState.DisableItem(nSID);
+ else if ( KnowsChildWindow(nSID) )
+ rState.Put( SfxBoolItem( nSID, HasChildWindow(nSID) ) );
+ else
+ rState.DisableItem(nSID);
+ }
+}
+
+void SfxViewFrame::ToolboxExec_Impl( SfxRequest &rReq )
+{
+ // Object-Bar-Id ermitteln
+ sal_uInt16 nSID = rReq.GetSlot(), nTbxID;
+ switch ( nSID )
+ {
+ case SID_TOGGLEFUNCTIONBAR: nTbxID = SFX_OBJECTBAR_APPLICATION; break;
+ case SID_TOGGLEOBJECTBAR: nTbxID = SFX_OBJECTBAR_OBJECT; break;
+ case SID_TOGGLETOOLBAR: nTbxID = SFX_OBJECTBAR_TOOLS; break;
+ case SID_TOGGLEMACROBAR: nTbxID = SFX_OBJECTBAR_MACRO; break;
+ case SID_TOGGLEOPTIONBAR: nTbxID = SFX_OBJECTBAR_OPTIONS; break;
+ case SID_TOGGLECOMMONTASKBAR: nTbxID = SFX_OBJECTBAR_COMMONTASK; break;
+ case SID_TOGGLENAVBAR: nTbxID = SFX_OBJECTBAR_NAVIGATION; break;
+ //case SID_TOGGLERECORDINGBAR: nTbxID = SFX_OBJECTBAR_RECORDING; break;
+ //case SID_TOGGLEFULLSCREENBAR: nTbxID = SFX_OBJECTBAR_FULLSCREEN; break;
+ default:
+ DBG_ERROR( "invalid ObjectBar`s SID" );
+ }
+
+ // Parameter auswerten
+ SfxToolBoxConfig *pTbxConfig = SfxToolBoxConfig::GetOrCreate();
+ SFX_REQUEST_ARG(rReq, pShowItem, SfxBoolItem, nSID, sal_False);
+ sal_Bool bShow = pShowItem ? pShowItem->GetValue() : !pTbxConfig->IsToolBoxPositionVisible(nTbxID);
+
+ // ausfuehren
+ pTbxConfig->SetToolBoxPositionVisible(nTbxID, bShow);
+ GetBindings().Invalidate( nSID );
+
+ SfxViewFrame* pViewFrame = SfxViewFrame::GetFirst();
+ while ( pViewFrame )
+ {
+ // update all "final" dispatchers
+ if ( !pViewFrame->GetActiveChildFrame_Impl() )
+ pViewFrame->GetDispatcher()->Update_Impl(sal_True);
+ pViewFrame = SfxViewFrame::GetNext(*pViewFrame);
+ }
+
+ // ggf. recorden
+ if ( !rReq.IsAPI() )
+ rReq.AppendItem( SfxBoolItem( nSID, bShow ) );
+ rReq.Done();
+}
+
+//------------------------------------------------------------------------
+
+
+void SfxViewFrame::ToolboxState_Impl( SfxItemSet &rSet )
+{
+ SfxWhichIter aIter(rSet);
+ for ( sal_uInt16 nSID = aIter.FirstWhich(); nSID; nSID = aIter.NextWhich() )
+ {
+ SfxToolBoxConfig *pTbxConfig = SfxToolBoxConfig::GetOrCreate();
+ switch ( nSID )
+ {
+ case SID_TOGGLEFUNCTIONBAR:
+ rSet.Put( SfxBoolItem( nSID, pTbxConfig->
+ IsToolBoxPositionVisible(SFX_OBJECTBAR_APPLICATION)));
+ break;
+
+ case SID_TOGGLEOBJECTBAR:
+ rSet.Put( SfxBoolItem( nSID, pTbxConfig->
+ IsToolBoxPositionVisible(SFX_OBJECTBAR_OBJECT)));
+ break;
+
+ case SID_TOGGLEOPTIONBAR:
+ rSet.Put( SfxBoolItem( nSID, pTbxConfig->
+ IsToolBoxPositionVisible(SFX_OBJECTBAR_OPTIONS)));
+ break;
+
+ case SID_TOGGLETOOLBAR:
+ rSet.Put( SfxBoolItem( nSID, pTbxConfig->
+ IsToolBoxPositionVisible(SFX_OBJECTBAR_TOOLS)));
+ break;
+
+ case SID_TOGGLEMACROBAR:
+ rSet.Put( SfxBoolItem( nSID, pTbxConfig->
+ IsToolBoxPositionVisible(SFX_OBJECTBAR_MACRO)));
+ break;
+
+ case SID_TOGGLECOMMONTASKBAR:
+ rSet.Put( SfxBoolItem( nSID, pTbxConfig->
+ IsToolBoxPositionVisible(SFX_OBJECTBAR_COMMONTASK)));
+ break;
+
+ case SID_TOGGLENAVBAR:
+ rSet.Put( SfxBoolItem( nSID, pTbxConfig->
+ IsToolBoxPositionVisible(SFX_OBJECTBAR_NAVIGATION)));
+ break;
+
+ default:
+ DBG_ERROR( "invalid ObjectBar`s SID" );
+ }
+ }
+}
+
+//--------------------------------------------------------------------
+SfxWorkWindow* SfxViewFrame::GetWorkWindow_Impl( USHORT nId )
+{
+ SfxWorkWindow* pWork = GetFrame()->GetWorkWindow_Impl();
+ if ( IsA( TYPE(SfxInPlaceFrame) ) )
+ {
+ SfxShell* pShell;
+ const SfxSlot* pSlot;
+ if( !GetDispatcher()->GetShellAndSlot_Impl( nId, &pShell, &pSlot, FALSE, TRUE ) )
+ // Containerslot !
+ pWork = GetParentViewFrame_Impl()->GetFrame()->GetWorkWindow_Impl();
+ }
+
+ return pWork;
+}
+
+void SfxViewFrame::SetChildWindow(USHORT nId, BOOL bOn)
+{
+ SfxWorkWindow* pWork = GetWorkWindow_Impl( nId );
+ pWork->SetChildWindow_Impl( nId, bOn );
+}
+
+//--------------------------------------------------------------------
+
+void SfxViewFrame::ToggleChildWindow(USHORT nId)
+{
+ SfxWorkWindow* pWork = GetWorkWindow_Impl( nId );
+ pWork->ToggleChildWindow_Impl( nId );
+}
+
+//--------------------------------------------------------------------
+
+BOOL SfxViewFrame::HasChildWindow( USHORT nId )
+{
+ SfxWorkWindow* pWork = GetWorkWindow_Impl( nId );
+ return pWork->HasChildWindow_Impl(nId);
+}
+
+//--------------------------------------------------------------------
+
+BOOL SfxViewFrame::KnowsChildWindow( USHORT nId )
+{
+ SfxWorkWindow* pWork = GetWorkWindow_Impl( nId );
+ return pWork->KnowsChildWindow_Impl(nId);
+}
+
+//--------------------------------------------------------------------
+
+void SfxViewFrame::ShowChildWindow( USHORT nId, BOOL bVisible )
+{
+ SfxWorkWindow* pWork = GetWorkWindow_Impl( nId );
+ pWork->ShowChildWindow_Impl(nId, bVisible);
+}
+
+//--------------------------------------------------------------------
+
+SfxChildWindow* SfxViewFrame::GetChildWindow(USHORT nId)
+{
+ SfxWorkWindow* pWork = GetWorkWindow_Impl( nId );
+ return pWork->GetChildWindow_Impl(nId);
+}
+
+
diff --git a/sfx2/source/view/viewimp.hxx b/sfx2/source/view/viewimp.hxx
new file mode 100644
index 000000000000..2d3921007356
--- /dev/null
+++ b/sfx2/source/view/viewimp.hxx
@@ -0,0 +1,115 @@
+/*************************************************************************
+ *
+ * $RCSfile: viewimp.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:37 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _VIEWIMP_HXX
+#define _VIEWIMP_HXX
+
+// include ---------------------------------------------------------------
+
+#ifndef __SBX_SBXOBJ_HXX
+#include <svtools/sbxobj.hxx>
+#endif
+#include "viewsh.hxx"
+
+// forward ---------------------------------------------------------------
+
+class SfxFrameSetDescriptor;
+class SfxMenuBarManager;
+class SfxAcceleratorManager;
+class SfxOfficeDispatch;
+class SfxBaseController;
+
+typedef SfxShell* SfxShellPtr_Impl;
+SV_DECL_PTRARR( SfxShellArr_Impl, SfxShellPtr_Impl, 4, 4 );
+
+typedef SfxOfficeDispatch* SfxOffDispPtr_Impl;
+SV_DECL_PTRARR( SfxOffDispArr_Impl, SfxOffDispPtr_Impl, 4, 4 );
+
+// struct SfxViewShell_Impl ----------------------------------------------
+
+struct SfxViewShell_Impl
+{
+ BOOL bControllerSet;
+ SfxShellArr_Impl aArr;
+ SbxObjectRef xSelectionObj;
+ SvBorder aBorder;
+ Size aOptimalSize;
+ SfxFrameSetDescriptor* pSetDescr;
+ Size aMargin;
+ USHORT nPrinterLocks;
+ BOOL bUseObjectSize;
+ BOOL bCanPrint;
+ BOOL bHasPrintOptions;
+ BOOL bPlugInsActive;
+ BOOL bIsShowView;
+ BOOL bFrameSetImpl;
+ SfxScrollingMode eScroll;
+ ResId* pMenuBarResId;
+ SfxMenuBarManager* pMenu;
+ ResId* pAccelResId;
+ SfxAcceleratorManager* pAccel;
+ USHORT nFamily;
+ SfxBaseController* pController;
+};
+
+
+#endif
+
diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx
new file mode 100644
index 000000000000..6e401cb7542b
--- /dev/null
+++ b/sfx2/source/view/viewprn.cxx
@@ -0,0 +1,870 @@
+/*************************************************************************
+ *
+ * $RCSfile: viewprn.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:37 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifdef OS2
+#include <vcl/sysdep.hxx>
+#endif
+
+#ifndef _SFXITEMPOOL_HXX //autogen
+#include <svtools/itempool.hxx>
+#endif
+#ifndef _MSGBOX_HXX //autogen
+#include <vcl/msgbox.hxx>
+#endif
+#ifndef VCL
+#ifndef _PRNDLG_HXX //autogen
+#include <vcl/prndlg.hxx>
+#endif
+#else
+#ifndef _SV_PRINTDLG_HXX //autogen
+#include <svtools/printdlg.hxx>
+#endif
+#ifndef _SV_PRNSETUP_HXX //autogen
+#include <svtools/prnsetup.hxx>
+#endif
+#endif
+#ifndef _SFXINIMGR_HXX //autogen
+#include <svtools/iniman.hxx>
+#endif
+#ifndef _SFXFLAGITEM_HXX //autogen
+#include <svtools/flagitem.hxx>
+#endif
+#ifndef _SFXSTRITEM_HXX //autogen
+#include <svtools/stritem.hxx>
+#endif
+#ifndef _SFXINTITEM_HXX //autogen
+#include <svtools/intitem.hxx>
+#endif
+#ifndef _SFXENUMITEM_HXX //autogen
+#include <svtools/eitem.hxx>
+#endif
+#pragma hdrstop
+
+#include "viewsh.hxx"
+#include "viewimp.hxx"
+#include "viewfrm.hxx"
+#include "prnmon.hxx"
+#include "sfxresid.hxx"
+#include "request.hxx"
+#include "objsh.hxx"
+#include "inimgr.hxx"
+#include "sfxtypes.hxx"
+#include "docinf.hxx"
+#include "event.hxx"
+
+#include "view.hrc"
+#include "helpid.hrc"
+
+// -----------------------------------------------------------------------
+
+void DisableRanges( PrintDialog& rDlg, SfxPrinter* pPrinter )
+
+/* [Beschreibung]
+
+ Mit dieser Funktion werden die nicht verf"ugbaren Ranges
+ vom Printer zum PrintDialog geforwarded.
+*/
+
+{
+ if ( !pPrinter )
+ return;
+
+ if ( !pPrinter->IsRangeEnabled( PRINTDIALOG_ALL ) )
+ rDlg.DisableRange( PRINTDIALOG_ALL );
+ if ( !pPrinter->IsRangeEnabled( PRINTDIALOG_SELECTION ) )
+ rDlg.DisableRange( PRINTDIALOG_SELECTION );
+ if ( !pPrinter->IsRangeEnabled( PRINTDIALOG_FROMTO ) )
+ rDlg.DisableRange( PRINTDIALOG_FROMTO );
+ if ( !pPrinter->IsRangeEnabled( PRINTDIALOG_RANGE ) )
+ rDlg.DisableRange( PRINTDIALOG_RANGE );
+}
+
+//====================================================================
+
+class SfxDialogExecutor_Impl
+
+/* [Beschreibung]
+
+ Eine Instanz dieser Klasse wird f"ur die Laufzeit des Printer-Dialogs
+ erzeugt, um im dessen Click-Handler f"ur die Zus"atze den per
+ virtueller Methode von der abgeleiteten SfxViewShell erzeugten
+ Print-Options-Dialog zu erzeugen und die dort eingestellten Optionen
+ als SfxItemSet zu zwischenzuspeichern.
+*/
+
+{
+ SfxViewShell* _pViewSh;
+ PrintDialog* _pParent;
+ SfxItemSet* _pOptions;
+ BOOL _bModified;
+
+private:
+ DECL_LINK( Execute, void * );
+
+public:
+ SfxDialogExecutor_Impl( SfxViewShell* pViewSh,
+ PrintDialog* pParent );
+ ~SfxDialogExecutor_Impl()
+ { delete _pOptions; }
+
+ Link GetLink() const
+ { return LINK( this, SfxDialogExecutor_Impl, Execute); }
+
+ const SfxItemSet* GetOptions() const
+ { return _pOptions; }
+};
+
+//--------------------------------------------------------------------
+
+SfxDialogExecutor_Impl::SfxDialogExecutor_Impl( SfxViewShell *pViewSh,
+ PrintDialog* pParent )
+: _pViewSh( pViewSh ),
+ _pParent( pParent ),
+ _pOptions( 0 )
+{
+}
+
+//--------------------------------------------------------------------
+
+IMPL_LINK( SfxDialogExecutor_Impl, Execute, void *, pVoidCaller )
+{
+ // Options lokal merken
+ if ( !_pOptions )
+ _pOptions = ((SfxPrinter*)_pParent->GetPrinter())->GetOptions().Clone();
+
+ // Dialog ausf"uhren
+ SfxPrintOptionsDialog *pDlg =
+ new SfxPrintOptionsDialog( _pParent, _pViewSh, _pOptions );
+ if ( pDlg->Execute() == RET_OK )
+ {
+ delete _pOptions;
+ _pOptions = pDlg->GetOptions().Clone();
+ }
+ delete pDlg;
+ return 0;
+}
+
+//-------------------------------------------------------------------------
+
+BOOL UseStandardPrinter_Impl( Window *pParent, SfxPrinter *pDocPrinter )
+{
+ // Optionen abfragen, ob gewarnt werden soll (Doc uebersteuert App)
+ BOOL bWarn = FALSE;
+ SfxApplication *pSfxApp = SFX_APP();
+/*
+ // Das Iten gibt es gar nicht !!
+ SfxItemSet aOpt( pSfxApp->GetPool(),
+ SID_PRINTER_NOTFOUND_WARN, SID_PRINTER_NOTFOUND_WARN );
+ if ( pSfxApp->GetOptions( aOpt ) )
+ {
+ SFX_ITEMSET_GET( aOpt, pWarnItem, SfxBoolItem, SID_PRINTER_NOTFOUND_WARN, TRUE );
+ if ( pWarnItem )
+ bWarn = pWarnItem->GetValue();
+ }
+ */
+ const SfxItemSet *pDocOptions = &pDocPrinter->GetOptions();
+ if ( pDocOptions )
+ {
+ USHORT nWhich =
+ pDocOptions->GetPool()->GetWhich(SID_PRINTER_NOTFOUND_WARN);
+ const SfxBoolItem *pBoolItem = 0;
+ pDocPrinter->GetOptions().GetItemState( nWhich, FALSE,
+ (const SfxPoolItem**) &pBoolItem );
+ if ( pBoolItem )
+ bWarn = pBoolItem->GetValue();
+ }
+
+/*
+ // ggf. den User fragen
+ if ( bWarn )
+ {
+ // Geht nicht mehr ohne OrigJobSetup!
+ String aTmp( SfxResId( STR_PRINTER_NOTAVAIL ) );
+#if SUPD<532
+ aTmp.SearchAndReplace( "$1",
+ pDocPrinter->GetOrigJobSetup().GetPrinterName() );
+ aTmp.SearchAndReplace( "$2", pDocPrinter->GetName() );
+#endif
+ QueryBox aBox( pParent, WB_OK_CANCEL | WB_DEF_OK, aTmp );
+ return RET_OK == aBox.Execute();
+ }
+*/
+ // nicht gewarnt => einfach so den StandardDrucker nehmen
+ return TRUE;
+}
+//-------------------------------------------------------------------------
+
+SfxPrinter* SfxViewShell::SetPrinter_Impl( SfxPrinter *pNewPrinter )
+
+/* Interne Methode zum Setzen der Unterschiede von 'pNewPrinter' zum
+ aktuellen Printer. pNewPrinter wird entweder "ubernommen oder gel"oscht.
+*/
+
+{
+ // aktuellen Printer holen
+ SfxPrinter *pDocPrinter = GetPrinter();
+
+ // Printer-Options auswerten
+ FASTBOOL bOriToDoc = FALSE;
+ FASTBOOL bSizeToDoc = FALSE;
+ if ( &pDocPrinter->GetOptions() )
+ {
+ USHORT nWhich = GetPool().GetWhich(SID_PRINTER_CHANGESTODOC);
+ const SfxFlagItem *pFlagItem = 0;
+ pDocPrinter->GetOptions().GetItemState( nWhich, FALSE,
+ (const SfxPoolItem**) &pFlagItem );
+ bOriToDoc = pFlagItem
+ ? (pFlagItem->GetValue() & SFX_PRINTER_CHG_ORIENTATION)
+ : FALSE;
+ bSizeToDoc = pFlagItem
+ ? (pFlagItem->GetValue() & SFX_PRINTER_CHG_SIZE)
+ : FALSE;
+ }
+
+ // vorheriges Format und Size feststellen
+ Orientation eOldOri = pDocPrinter->GetOrientation();
+ Size aOldPgSz = pDocPrinter->GetPaperSizePixel();
+
+ // neues Format und Size feststellen
+ Orientation eNewOri = pNewPrinter->GetOrientation();
+ Size aNewPgSz = pNewPrinter->GetPaperSizePixel();
+
+ // "Anderungen am Seitenformat feststellen
+ BOOL bOriChg = (eOldOri != eNewOri) && bOriToDoc;
+ BOOL bPgSzChg = ( aOldPgSz.Height() !=
+ ( bOriChg ? aNewPgSz.Width() : aNewPgSz.Height() ) ||
+ aOldPgSz.Width() !=
+ ( bOriChg ? aNewPgSz.Height() : aNewPgSz.Width() ) ) &&
+ bSizeToDoc;
+
+ // Message und Flags f"ur Seitenformat-"Anderung zusammenstellen
+ String aMsg;
+ USHORT nNewOpt=0;
+ if( bOriChg && bPgSzChg )
+ {
+ aMsg = String(SfxResId(STR_PRINT_NEWORISIZE));
+ nNewOpt = SFX_PRINTER_CHG_ORIENTATION | SFX_PRINTER_CHG_SIZE;
+ }
+ else if (bOriChg )
+ {
+ aMsg = String(SfxResId(STR_PRINT_NEWORI));
+ nNewOpt = SFX_PRINTER_CHG_ORIENTATION;
+ }
+ else if (bPgSzChg)
+ {
+ aMsg = String(SfxResId(STR_PRINT_NEWSIZE));
+ nNewOpt = SFX_PRINTER_CHG_SIZE;
+ }
+
+ // in dieser Variable sammeln, was sich so ge"aendert hat
+ USHORT nChangedFlags = 0;
+
+ // ggf. Nachfrage, ob Seitenformat vom Drucker "ubernommen werden soll
+ if ( ( bOriChg || bPgSzChg ) &&
+ RET_YES == QueryBox(0, WB_YES_NO | WB_DEF_OK, aMsg).Execute() )
+ // Flags mit "Anderungen f"ur <SetPrinter(SfxPrinter*)> mitpflegen
+ nChangedFlags |= nNewOpt;
+
+ // fuer den MAC sein "temporary of class String" im naechsten if()
+ String aTempPrtName = pNewPrinter->GetName();
+ String aDocPrtName = pDocPrinter->GetName();
+
+ // Wurde der Drucker gewechselt oder von Default auf Specific
+ // oder umgekehrt geaendert?
+ if ( (aTempPrtName != aDocPrtName) ||
+ (pDocPrinter->IsDefPrinter() != pNewPrinter->IsDefPrinter()) )
+ {
+ // neuen Printer "ubernehmen
+ // pNewPrinter->SetOrigJobSetup( pNewPrinter->GetJobSetup() );
+ nChangedFlags |= SFX_PRINTER_PRINTER|SFX_PRINTER_JOBSETUP;
+ pDocPrinter = pNewPrinter;
+ }
+ else
+ {
+ // Extra-Optionen vergleichen
+ if ( ! (pNewPrinter->GetOptions() == pDocPrinter->GetOptions()) )
+ {
+ // Options haben sich geaendert
+ pDocPrinter->SetOptions( pNewPrinter->GetOptions() );
+ nChangedFlags |= SFX_PRINTER_OPTIONS;
+ }
+
+ // JobSetups vergleichen
+ JobSetup aNewJobSetup = pNewPrinter->GetJobSetup();
+ JobSetup aOldJobSetup = pDocPrinter->GetJobSetup();
+ if ( aNewJobSetup != aOldJobSetup )
+ {
+ // JobSetup hat sich geaendert (=> App mu\s neu formatieren)
+ // pDocPrinter->SetOrigJobSetup( aNewJobSetup );
+ nChangedFlags |= SFX_PRINTER_JOBSETUP;
+ }
+
+ // alten, ver"anderten Printer behalten
+ pDocPrinter->SetPrinterProps( pNewPrinter );
+ delete pNewPrinter;
+ }
+
+ if ( 0 != nChangedFlags )
+ SetPrinter( pDocPrinter, nChangedFlags );
+ return pDocPrinter;
+}
+
+//-------------------------------------------------------------------------
+// Unter WIN32 tritt leider das Problem auf, dass nichts gedruckt
+// wird, wenn SID_PRINTDOCDIRECT auflaueft; bisher bekannte,
+// einzige Abhilfe ist in diesem Fall das Abschalten der Optimierungen
+// (KA 17.12.95)
+#ifdef WNT
+#pragma optimize ( "", off )
+#endif
+
+void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq )
+{
+ USHORT nCopies=1, nPaperBin = 0, nDialogRet = RET_CANCEL;
+ BOOL bCollate=FALSE;
+ SfxPrinter* pPrinter = 0;
+ PrintDialog* pPrintDlg = 0;
+ PrinterSetupDialog* pPrintSetupDlg = 0;
+ SfxDialogExecutor_Impl* pExecutor = 0;
+ PushButton* pOptBtn = 0;
+ FASTBOOL bWarn = TRUE;
+ //! FASTBOOL bUseThread = FALSE;
+ FASTBOOL bSilent = FALSE;
+
+ const USHORT nId = rReq.GetSlot();
+ switch( nId )
+ {
+ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+ case SID_PRINTDOC:
+ case SID_SETUPPRINTER:
+ case SID_PRINTER_NAME:
+ {
+ if(!GetViewFrame()->GetObjectShell()->ISA(SfxObjectShell))
+ return;
+
+ // stiller Modus (z.B. per AppEvent)?
+ SFX_REQUEST_ARG(rReq, pSilentItem, SfxBoolItem, SID_SILENT, FALSE);
+ bSilent = pSilentItem ? pSilentItem->GetValue() : FALSE;
+
+ // Drucker und Einstellungen vom Dokument holen
+ SfxPrinter *pDocPrinter = GetPrinter(TRUE);
+
+ // Printername per Parameter?
+ SFX_REQUEST_ARG(rReq, pPrinterItem, SfxStringItem, SID_PRINTER_NAME, FALSE);
+ if ( pPrinterItem )
+ {
+ // zum Namen passenden Printer erzeugen
+ pPrinter = new SfxPrinter( pDocPrinter->GetOptions().Clone(),
+ ((const SfxStringItem*) pPrinterItem)->GetValue() );
+
+ // ein unknown Printer wuerde sowieso gleich nochmal umgesetzt
+ if ( !pPrinter->IsOriginal() )
+ DELETEZ(pPrinter);
+
+ // Printer wurde per API umgesetzt?
+ if ( SID_PRINTER_NAME == nId )
+ {
+ if ( pPrinter )
+ SetPrinter( pPrinter, SFX_PRINTER_PRINTER );
+ return;
+ }
+ }
+
+ if ( !pPrinter )
+ pPrinter = pDocPrinter;
+
+ // kein Printer oder ung"ultig
+ if( !pPrinter->IsValid() )
+ {
+ if ( !rReq.IsAPI() )
+ ErrorBox( NULL, WB_OK | WB_DEF_OK,
+ String( SfxResId( STR_NODEFPRINTER ) ) ).Execute();
+ rReq.SetReturnValue(SfxBoolItem(0,FALSE));
+ return;
+ }
+
+#if 0
+ // au\ser unter Windows ggf. im Thread drucken lassen
+ nWhich = GetPool().GetWhich(SID_PRINTER_USETHREAD);
+ pPrinter->GetOptions().GetItemState( nWhich, FALSE,
+ (const SfxPoolItem**) &pBoolItem );
+ bUseThread = pBoolItem ? pBoolItem->GetValue() : TRUE;
+#endif
+
+ // Drucker nicht vorhanden?
+ if ( !pPrinter->IsOriginal() && bWarn && rReq.GetArgs() &&
+ !UseStandardPrinter_Impl( NULL, pPrinter ) )
+ {
+ rReq.SetReturnValue(SfxBoolItem(0,FALSE));
+ return;
+ }
+
+ // busy?
+ if( pPrinter->IsPrinting() )
+ {
+ if ( !rReq.IsAPI() )
+ InfoBox( NULL, String( SfxResId( STR_ERROR_PRINTER_BUSY ) ) ).Execute();
+ rReq.SetReturnValue(SfxBoolItem(0,FALSE));
+ return;
+ }
+
+ // brauchen wir den Dialog?
+ if ( !rReq.GetArgs() && !bSilent && !rReq.IsAPI() )
+ {
+ // Printer-Dialog braucht tempor"aren Printer
+ SfxPrinter* pDlgPrinter = pPrinter->Clone();
+
+ // Print bwz. Print-Options Dialog ausf"urhren
+ nDialogRet = 0;
+ if ( SID_PRINTDOC == nId )
+ {
+ // Print-Dialog
+ pPrintDlg = CreatePrintDialog( NULL );
+
+ // Zusaetze Button und Dialog?
+ if ( pImp->bHasPrintOptions )
+ {
+ pExecutor = new SfxDialogExecutor_Impl( this, pPrintDlg );
+ pPrintDlg->SetOptionsHdl( pExecutor->GetLink() );
+ pPrintDlg->ShowOptionsButton();
+ }
+
+ // Drucker setzen
+ pPrintDlg->SetPrinter( pDlgPrinter );
+ ::DisableRanges( *pPrintDlg, pDlgPrinter );
+
+ // Dialog ausf"uhren
+ nDialogRet = pPrintDlg->Execute();
+ if ( pExecutor && pExecutor->GetOptions() )
+ {
+ if ( nDialogRet == RET_OK )
+ pDlgPrinter->SetOptions( *pExecutor->GetOptions() );
+ else
+ {
+ pPrinter->SetOptions( *pExecutor->GetOptions() );
+ SetPrinter( pPrinter, SFX_PRINTER_OPTIONS );
+ }
+ }
+ DELETEX(pExecutor);
+ }
+ else
+ {
+ // Printer-Setup-Dialog
+ pPrintSetupDlg = new PrinterSetupDialog( NULL );
+ pPrintSetupDlg->SetPrinter( pDlgPrinter );
+ nDialogRet = pPrintSetupDlg->Execute();
+ }
+
+ if ( nDialogRet == RET_OK )
+ {
+ // "Anderungen feststellen und Drucker setzen
+ pPrinter = SetPrinter_Impl( pDlgPrinter );
+
+ if ( SID_PRINTDOC == nId )
+ {
+ // bei Collate mu\s die Subklasse die Kopien selbst
+ // handlen, sonst kann das der Druckertreiber
+ DBG_ASSERT( pPrintDlg, "der PrintDlg ist weg" );
+ nCopies = pPrintDlg->GetCopyCount();
+ bCollate = pPrintDlg->IsCollateChecked();
+ if( bCollate )
+ pPrinter->SetCopyCount( 1 );
+ else
+ pPrinter->SetCopyCount(nCopies);
+ }
+ }
+ else
+ // Abbruch => Einstellungen werden nicht ben"otigt
+ DELETEX(pDlgPrinter);
+
+ // Printer-Setup-Dialog abr"aumen
+ DELETEX(pOptBtn);
+ #ifndef VCL
+ if ( pPrintDlg )
+ pPrintDlg->SetSetupDialog(0);
+ #endif
+ DELETEX(pPrintSetupDlg);
+
+ // nur f"urs tats"achliche Drucken den Druck-Dialog behalten
+ if ( SID_PRINTDOC != nId || nDialogRet == RET_CANCEL )
+ {
+ DELETEZ(pPrintDlg);
+ if ( nDialogRet == RET_CANCEL )
+ rReq.Ignore();
+ else if ( SID_PRINTER_NAME != nId )
+ rReq.SetReturnValue(SfxBoolItem(0,FALSE));
+ break;
+ }
+ }
+ else if ( rReq.GetArgs() )
+ {
+ // zum transportieren brauchen wir einen Dialog
+ pPrintDlg = CreatePrintDialog( GetWindow() );
+ pPrintDlg->SetPrinter( pPrinter );
+ ::DisableRanges( *pPrintDlg, pPrinter );
+
+ // PrintFile
+ SFX_REQUEST_ARG(rReq, pFileItem, SfxStringItem, SID_FILE_NAME, FALSE);
+ if ( pFileItem )
+ {
+ pPrinter->EnablePrintFile(TRUE);
+ pPrinter->SetPrintFile( pFileItem->GetValue() );
+ }
+
+ // Pages (as String)
+ SFX_REQUEST_ARG(rReq, pPagesItem, SfxStringItem, SID_PRINT_PAGES, FALSE);
+
+ // FirstPage
+ SFX_REQUEST_ARG(rReq, pFirstPgItem, SfxInt16Item, SID_PRINT_FIRST_PAGE, FALSE);
+ USHORT nFrom = 1;
+ if ( pFirstPgItem )
+ nFrom = pFirstPgItem->GetValue();
+
+ // LastPage
+ SFX_REQUEST_ARG(rReq, pLastPgItem, SfxInt16Item, SID_PRINT_LAST_PAGE, FALSE);
+ USHORT nTo = 9999;
+ if ( pLastPgItem )
+ nTo = pLastPgItem->GetValue();
+
+ // Copy-Count
+ SFX_REQUEST_ARG(rReq, pCopyItem, SfxInt16Item, SID_PRINT_COPIES, FALSE);
+ if ( pCopyItem )
+ {
+ nCopies = pCopyItem->GetValue();
+ pPrintDlg->SetCopyCount( nCopies );
+ }
+
+ // arbeitet die abgeleitete View mit einem Range?
+ if ( pPagesItem ||
+ pPrintDlg->IsRangeEnabled(PRINTDIALOG_RANGE) )
+ {
+ // auf Range schalten
+ pPrintDlg->CheckRange(PRINTDIALOG_RANGE);
+
+ // Range-Text setzen
+ if ( pPagesItem )
+ pPrintDlg->SetRangeText( pPagesItem->GetValue() );
+ else
+ {
+ String aRange = String::CreateFromInt32( nFrom );
+ aRange += '-';
+ aRange += String::CreateFromInt32( nTo );
+ pPrintDlg->SetRangeText( aRange );
+ }
+ }
+ else
+ {
+ // auf von-bis schalten
+ pPrintDlg->CheckRange(PRINTDIALOG_FROMTO);
+
+ // von-bis eintragen
+ pPrintDlg->SetFirstPage( nFrom );
+ pPrintDlg->SetLastPage( nTo );
+ }
+ }
+ }
+
+ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+ // SID_PRINTDOC:
+ case SID_PRINTDOCDIRECT:
+ {
+ // falls der nicht zuvor eingestellt wurde
+ if ( !pPrinter )
+ pPrinter = GetPrinter(TRUE);
+ //! ??? pPrn->SetJobSetup(pSh->GetJob());
+ // . . . gfs. Druckerschacht umschalten
+ //! ??? if( nPaperBin != USE_DEFAULT_PAPERBIN )
+ //! ??? pPrn->SetPaperBin(nPaperBin);
+
+ // Drucker nicht vorhanden? (bei SID_PRINTDOC wurde schon gefragt)
+ if ( SID_PRINTDOCDIRECT == nId &&
+ !pPrinter->IsOriginal() && bWarn &&
+ !UseStandardPrinter_Impl( NULL, pPrinter ) )
+ {
+ rReq.SetReturnValue(SfxBoolItem(0,FALSE));
+ return;
+ }
+
+ if( bCollate )
+ pPrinter->SetCopyCount(1);
+ else
+ pPrinter->SetCopyCount(nCopies);
+
+ // Drucker in Thread-Mode setzen
+ // unter Windows mu\s das so, weil sonst kein Querdruck funkt,
+ // unter OS/2 sollte man das nutzen - Apps kommen aber nicht klar
+ // WP: 07.12.95: SV macht das jetzt richtig
+ SfxIniManager *pIniMgr = SFX_INIMANAGER();
+ String aPages( pIniMgr->Get(SFX_KEY_PAGEQUEUESIZE) );
+ pPrinter->SetPageQueueSize( aPages.Len() ? (int) aPages.ToInt32() : 1 );
+
+#ifdef OS2
+ HACK(die PrintThreadPrio erstmal nur fuer OS/2)
+ String aPrio( pIniMgr->Get(SFX_KEY_PRINTTHREADPRIO) );
+ if ( aPrio.Len() && aPrio.IsNumeric() )
+ Sysdepen::SetPrintThreadPrio( (USHORT) aPrio );
+ String aMeta( pIniMgr->Get(SFX_KEY_METAFILEPRINT) );
+ if ( aMeta.Len() && aMeta.IsNumeric() )
+ Sysdepen::EnableMetafilePrint( 0 != USHORT(aMeta) );
+#endif
+ SfxObjectShell *pObjSh = GetObjectShell();
+ SfxDocumentInfo *pInfo = &pObjSh->GetDocInfo();
+ SfxStamp aOldStamp = pInfo->GetPrinted();
+ // Abfrage, ob die Benutzerdaten
+ // f"ur die Eigenschaften verwendet werden sollen
+ String aUserName = pIniMgr->GetUserFullName();
+
+ if ( !pInfo->IsUseUserData() )
+ aUserName.Erase();
+
+ pInfo->SetPrinted( aUserName );
+ pObjSh->Broadcast( SfxDocumentInfoHint( pInfo ) );
+
+ ErrCode nError = DoPrint( pPrinter, pPrintDlg, bSilent );
+ if ( nError == PRINTER_OK )
+ {
+ pObjSh->FlushDocInfo();
+
+ Invalidate( SID_PRINTDOC );
+ Invalidate( SID_PRINTDOCDIRECT );
+ Invalidate( SID_SETUPPRINTER );
+ rReq.SetReturnValue(SfxBoolItem(0,TRUE));
+ SFX_REQUEST_ARG(rReq, pAsyncItem, SfxBoolItem, SID_ASYNCHRON, FALSE);
+ if ( pAsyncItem && !pAsyncItem->GetValue() )
+ {
+ while ( pPrinter->IsPrinting())
+ Application::Yield();
+ }
+ }
+ else
+ {
+ pInfo->SetPrinted(aOldStamp);
+ pObjSh->Broadcast( SfxDocumentInfoHint( pInfo ) );
+
+ if ( nError != PRINTER_ABORT )
+ {
+ // Printer konnte nicht gestartet werden
+ String aMsg( SfxResId( STR_NOSTARTPRINTER ) );
+ if ( !rReq.IsAPI() )
+ ErrorBox( NULL, WB_OK | WB_DEF_OK, aMsg ).Execute();
+ rReq.SetReturnValue(SfxBoolItem(0,FALSE));
+ }
+ else
+ {
+ // Benutzer hat abgebrochen
+ rReq.Ignore();
+ }
+ }
+
+ delete pPrintDlg;
+ break;
+ }
+ }
+}
+
+// Optimierungen wieder einschalten
+#ifdef WNT
+#pragma optimize ( "", on )
+#endif
+
+//--------------------------------------------------------------------
+
+PrintDialog* SfxViewShell::CreatePrintDialog( Window* pParent )
+
+/* [Beschreibung]
+
+ Diese Methode kann "uberladen werden, um einen speziellen PrintDialog
+ zu erzeugen. Dies ist z.B. notwendig wenn spezielle <StarView> Features
+ wie drucken von Seitenbereichen.
+*/
+
+{
+ PrintDialog *pDlg = new PrintDialog( pParent );
+ pDlg->SetFirstPage( 1 );
+ pDlg->SetLastPage( 9999 );
+ pDlg->EnableCollate();
+ return pDlg;
+}
+
+//--------------------------------------------------------------------
+
+void SfxViewShell::PreparePrint( PrintDialog * )
+{
+}
+
+//--------------------------------------------------------------------
+
+
+ErrCode SfxViewShell::DoPrint( SfxPrinter *pPrinter,
+ PrintDialog *pPrintDlg,
+ BOOL bSilent )
+{
+ // Printer-Dialogbox waehrend des Ausdrucks mu\s schon vor
+ // StartJob erzeugt werden, da SV bei einem Quit-Event h"angt
+ SfxPrintProgress *pProgress = new SfxPrintProgress( this, !bSilent );
+ SfxPrinter *pDocPrinter = GetPrinter(TRUE);
+ if ( !pPrinter )
+ pPrinter = pDocPrinter;
+ else if ( pDocPrinter != pPrinter )
+ {
+ pProgress->RestoreOnEndPrint( pDocPrinter->Clone() );
+ SetPrinter( pPrinter, SFX_PRINTER_PRINTER );
+ }
+ pProgress->SetWaitMode(FALSE);
+
+ // Drucker starten
+ PreparePrint( pPrintDlg );
+ SfxObjectShell *pObjShell = GetViewFrame()->GetObjectShell();
+ if ( pPrinter->StartJob(pObjShell->GetTitle(0)) )
+ {
+ // Drucken
+ Print( *pProgress, pPrintDlg );
+ pProgress->Stop();
+ pProgress->DeleteOnEndPrint();
+ pPrinter->EndJob();
+ }
+ else
+ {
+ // Printer konnte nicht gestartet werden
+ delete pProgress;
+ return ERRCODE_IO_ABORT;
+ }
+
+ return pPrinter->GetError();
+}
+
+//--------------------------------------------------------------------
+
+BOOL SfxViewShell::IsPrinterLocked() const
+{
+ return pImp->nPrinterLocks > 0;
+}
+
+//--------------------------------------------------------------------
+
+void SfxViewShell::LockPrinter( BOOL bLock)
+{
+ BOOL bChanged = FALSE;
+ if ( bLock )
+ bChanged = 1 == ++pImp->nPrinterLocks;
+ else
+ bChanged = 0 == --pImp->nPrinterLocks;
+
+ if ( bChanged )
+ {
+ Invalidate( SID_PRINTDOC );
+ Invalidate( SID_PRINTDOCDIRECT );
+ Invalidate( SID_SETUPPRINTER );
+ }
+}
+
+//--------------------------------------------------------------------
+
+USHORT SfxViewShell::Print( SfxProgress &rProgress, PrintDialog * )
+{
+ SfxObjectShell *pObjShell = GetViewFrame()->GetObjectShell();
+ SFX_APP()->NotifyEvent(SfxEventHint(SFX_EVENT_PRINTDOC, pObjShell));
+ return 0;
+}
+
+//--------------------------------------------------------------------
+
+SfxPrinter* SfxViewShell::GetPrinter( BOOL bCreate )
+{
+ return 0;
+}
+
+//--------------------------------------------------------------------
+
+USHORT SfxViewShell::SetPrinter( SfxPrinter *pNewPrinter, USHORT nDiffFlags )
+{
+ return 0;
+}
+
+//--------------------------------------------------------------------
+
+SfxTabPage* SfxViewShell::CreatePrintOptionsPage
+(
+ Window* pParent,
+ const SfxItemSet& rOptions
+)
+
+/* [Beschreibung]
+
+ Diese Factory-Methode wird vom SFx verwendet, um die TabPage mit den
+ Print-Optionen, welche "uber das <SfxItemSet> am <SfxPrinter>
+ transportiert werden, zu erzeugen.
+
+ Abgeleitete Klassen k"onnen diese Methode also "uberladen um die zu
+ ihren SfxPrinter passenden Einstellungen vorzunehmen. Dieses sollte
+ genau die <SfxTabPage> sein, die auch unter Extras/Einstellungen
+ verwendet wird.
+
+ Die Basisimplementierung liefert einen 0-Pointer.
+*/
+
+{
+ return 0;
+}
+
+
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
new file mode 100644
index 000000000000..91769b488c92
--- /dev/null
+++ b/sfx2/source/view/viewsh.cxx
@@ -0,0 +1,1723 @@
+/*************************************************************************
+ *
+ * $RCSfile: viewsh.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:37 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _PLUGIN_HXX //autogen
+#include <so3/plugin.hxx>
+#endif
+#ifndef _APPLET_HXX //autogen
+#include <so3/applet.hxx>
+#endif
+#ifndef _SFXSTRITEM_HXX //autogen
+#include <svtools/stritem.hxx>
+#endif
+#ifndef _SFXENUMITEM_HXX //autogen
+#include <svtools/eitem.hxx>
+#endif
+#ifndef _SFX_WHITER_HXX //autogen
+#include <svtools/whiter.hxx>
+#endif
+#ifndef _SFXINIMGR_HXX //autogen
+#include <svtools/iniman.hxx>
+#endif
+#ifndef _MSGBOX_HXX //autogen
+#include <vcl/msgbox.hxx>
+#endif
+#ifndef _SOERR_HXX //autogen
+#include <so3/soerr.hxx>
+#endif
+#ifndef _SFXINTITEM_HXX //autogen
+#include <svtools/intitem.hxx>
+#endif
+#ifndef _SFXECODE_HXX
+#include <svtools/sfxecode.hxx>
+#endif
+#ifndef _EHDL_HXX
+#include <svtools/ehdl.hxx>
+#endif
+
+#pragma hdrstop
+
+#include "viewsh.hxx"
+#include "viewimp.hxx"
+
+#include "sfxresid.hxx"
+#include "request.hxx"
+#include "templdlg.hxx"
+#include "interno.hxx"
+#include "printer.hxx"
+#include "docfile.hxx"
+#include "dispatch.hxx"
+#include "arrdecl.hxx"
+#include "ipenv.hxx"
+#include "accmgr.hxx"
+#include "intfrm.hxx"
+#include "docfac.hxx"
+#include "view.hrc"
+#include "mnumgr.hxx"
+#include "virtmenu.hxx"
+#include "objuno.hxx"
+#include "sfxlocal.hrc"
+#include "frameobj.hxx"
+#include "sfxbasecontroller.hxx"
+#include "topfrm.hxx"
+
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::frame;
+
+//=========================================================================
+DBG_NAME(SfxViewShell);
+
+#define SfxViewShell
+#include "sfxslots.hxx"
+
+//=========================================================================
+
+SFX_IMPL_INTERFACE(SfxViewShell,SfxShell,SfxResId(0))
+{
+ SFX_CHILDWINDOW_REGISTRATION( SID_MAIL_CHILDWIN );
+}
+
+TYPEINIT2(SfxViewShell,SfxShell,SfxListener);
+
+//--------------------------------------------------------------------
+
+void SfxViewShell::SetMenu_Impl( SfxMenuBarManager* pMenu )
+{
+}
+
+//--------------------------------------------------------------------
+
+SfxMenuBarManager* SfxViewShell::GetMenu_Impl() const
+{
+ return NULL;
+}
+
+//--------------------------------------------------------------------
+
+ErrCode SfxViewShell::DirectLoad( SfxFrame* pFrame, SfxMedium& rMedium )
+{
+ return ERRCODE_SFX_FORCEDOCLOAD;
+}
+
+//--------------------------------------------------------------------
+
+void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
+{
+ const USHORT nId = rReq.GetSlot();
+ switch( nId )
+ {
+ case SID_STYLE_FAMILY :
+ {
+ SFX_REQUEST_ARG(rReq, pItem, SfxUInt16Item, nId, FALSE);
+ if (pItem)
+ pImp->nFamily = pItem->GetValue();
+ break;
+ }
+
+ case SID_STYLE_CATALOG:
+ {
+ SfxTemplateCatalog aCatalog(
+ SFX_APP()->GetTopWindow(), &GetViewFrame()->GetBindings());
+ aCatalog.Execute();
+ break;
+ }
+
+ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+ case SID_MAIL_SENDDOC:
+ GetViewFrame()->SetChildWindow( SID_MAIL_CHILDWIN, TRUE );
+ break;
+
+ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+ case SID_PLUGINS_ACTIVE:
+ {
+ SFX_REQUEST_ARG(rReq, pShowItem, SfxBoolItem, nId, FALSE);
+ BOOL bActive = pShowItem ? pShowItem->GetValue() : !pImp->bPlugInsActive;
+ // ggf. recorden
+ if ( !rReq.IsAPI() )
+ rReq.AppendItem( SfxBoolItem( nId, bActive ) );
+
+ // Jetzt schon DONE aufrufen, da die Argumente evtl. einen Pool
+ // benutzen, der demn"achst weg ist
+ rReq.Done(TRUE);
+
+ // ausfuehren
+ if ( !pShowItem || bActive != pImp->bPlugInsActive )
+ {
+ SfxFrame *pFrame = GetFrame()->GetTopFrame();
+ if ( pFrame != GetFrame()->GetFrame() )
+ {
+ // FramesetDocument
+ SfxViewShell *pShell = pFrame->GetCurrentViewFrame()->GetViewShell();
+ if ( pShell->GetInterface()->GetSlot( nId ) )
+ pShell->ExecuteSlot( rReq );
+ break;
+ }
+
+ SfxFrameIterator aIter( *pFrame );
+ while ( pFrame )
+ {
+ if ( pFrame->GetCurrentViewFrame() )
+ {
+ SfxViewShell *pView = pFrame->GetCurrentViewFrame()->GetViewShell();
+ if ( pView )
+ {
+ pView->pImp->bPlugInsActive = bActive;
+ SfxInPlaceObject *pObj =
+ pFrame->GetCurrentDocument()->GetInPlaceObject();
+ if ( pObj )
+ {
+ Rectangle aVisArea = pObj->GetVisArea();
+ VisAreaChanged(aVisArea);
+ }
+ }
+ }
+
+ if ( !pFrame->GetParentFrame() )
+ pFrame = aIter.FirstFrame();
+ else
+ pFrame = aIter.NextFrame( *pFrame );
+ }
+ }
+
+ break;
+ }
+ }
+}
+
+//--------------------------------------------------------------------
+
+void SfxViewShell::GetState_Impl( SfxItemSet &rSet )
+{
+ DBG_CHKTHIS(SfxViewShell, 0);
+
+ SfxWhichIter aIter( rSet );
+ for ( USHORT nSID = aIter.FirstWhich(); nSID; nSID = aIter.NextWhich() )
+ {
+ switch ( nSID )
+ {
+ case SID_STYLE_CATALOG:
+ {
+ if ( !GetViewFrame()->KnowsChildWindow( SID_STYLE_DESIGNER ) )
+ rSet.DisableItem( nSID );
+ break;
+ }
+
+ // Printer-Property
+ case SID_PRINTER_NAME:
+ {
+ SfxPrinter *pPrinter = GetPrinter(TRUE);
+ if ( pPrinter )
+ rSet.Put( SfxStringItem( SID_PRINTER_NAME, pPrinter->GetName() ) );
+ break;
+ }
+
+ // Printer-Funktionen
+ case SID_PRINTDOC:
+ case SID_PRINTDOCDIRECT:
+ case SID_SETUPPRINTER:
+ {
+ BOOL bEnabled = pImp->bCanPrint && !pImp->nPrinterLocks;
+ if ( bEnabled )
+ {
+ SfxPrinter *pPrinter = GetPrinter(FALSE);
+ bEnabled = !pPrinter || !pPrinter->IsPrinting();
+ }
+ if ( !bEnabled )
+ {
+ rSet.DisableItem( SID_PRINTDOC );
+ rSet.DisableItem( SID_PRINTDOCDIRECT );
+ rSet.DisableItem( SID_SETUPPRINTER );
+ }
+ break;
+ }
+
+ // Mail-Funktionen
+ case SID_MAIL_SENDDOC:
+ {
+ BOOL bEnable = !GetViewFrame()->HasChildWindow( SID_MAIL_CHILDWIN );
+ if ( !bEnable )
+ rSet.DisableItem( nSID );
+ break;
+ }
+
+ // PlugIns running
+ case SID_PLUGINS_ACTIVE:
+ {
+ rSet.Put( SfxBoolItem( SID_PLUGINS_ACTIVE, !pImp->bPlugInsActive) );
+ break;
+ }
+
+ // SelectionText
+ case SID_SELECTION_TEXT:
+ {
+ rSet.Put( SfxStringItem( SID_SELECTION_TEXT, GetSelectionText() ) );
+ break;
+ }
+
+ // SelectionTextExt
+ case SID_SELECTION_TEXT_EXT:
+ {
+ rSet.Put( SfxStringItem( SID_SELECTION_TEXT_EXT, GetSelectionText(TRUE) ) );
+ break;
+ }
+
+ case SID_STYLE_FAMILY :
+ {
+ rSet.Put( SfxUInt16Item( SID_STYLE_FAMILY, pImp->nFamily ) );
+ break;
+ }
+ }
+ }
+}
+
+//--------------------------------------------------------------------
+
+void SfxViewShell::SetZoomFactor( const Fraction &rZoomX,
+ const Fraction &rZoomY )
+{
+ DBG_ASSERT( GetWindow(), "no window" );
+ MapMode aMap( GetWindow()->GetMapMode() );
+ aMap.SetScaleX( rZoomX );
+ aMap.SetScaleY( rZoomY );
+ GetWindow()->SetMapMode( aMap );
+}
+
+//--------------------------------------------------------------------
+
+SfxInPlaceClient* SfxViewShell::CreateIPClient
+(
+ WorkWindow* pTop,
+ WorkWindow* pDoc,
+ Window* pDraw
+)
+
+/* [Beschreibung]
+
+ "Uber diese Factory-Methode erzeugt der SFx spezielle SfxShell-Instanzen,
+ die als Stellvertreter f"ur InPlace-Objekte dienen. Solle auf Callbacks
+ dieser Stellvertreter reagiert werden, die dieses "uber eine eigene
+ SfxInPlaceClient-Subklasse zu realisieren und diese Factory zu "uberladen.
+*/
+
+{
+ HACK(kann raus)
+ return new SfxInPlaceClient( this, pDraw );
+}
+
+//--------------------------------------------------------------------
+
+void SfxViewShell::UIActivate
+(
+ SvInPlaceObject* pObj // das Objekt, welched deaktiv wurde
+)
+
+/* [Beschreibung]
+
+ Dieser Handler wird gerufen, wenn ein mit der Methode
+ <SfxViewShell::DoVerb()> angesteuertes Objekt aktiviert
+ wurde.
+
+ Die Basisimplementation braucht nicht gerufen zu werden.
+
+
+ [Querverweise]
+ <SfxViewShell::UIDeactivate(SvInPlaceObject)>
+*/
+
+{
+}
+
+//--------------------------------------------------------------------
+
+void SfxViewShell::UIDeactivate
+(
+ SvInPlaceObject* pObj // das Objekt, welched deaktiv wurde
+)
+
+/* [Beschreibung]
+
+ Dieser Handler wird gerufen, wenn ein mit der Methode
+ <SfxViewShell::DoVerb()> aktiviertes Objekt deaktiviert
+ wurde. Dies kann von der Server-Applikation oder durch die Client-
+ Applikation hervorgerufen worden sein.
+
+ Die Basisimplementation braucht nicht gerufen zu werden.
+
+
+ [Querverweise]
+ <SfxViewShell::UIDeactivate(SvInPlaceObject)>
+*/
+
+{
+}
+
+//--------------------------------------------------------------------
+
+ErrCode SfxViewShell::DoVerb
+(
+ SfxInPlaceClient* pIPClient, // zu aktivierender <SfxInPlaceClient>
+ long nVerb // auszuf"uhrendes Verb (default = 0)
+)
+
+/* [Beschreibung]
+
+ [Beispiel]
+
+ ErrCode SwView::DoVerb( SwSoNode *pSoNode, long nVerb )
+ {
+ SwIPClientRef xIPCli = (SwIPClient*)
+ pViewSh->FindIPClient( pSoNode->GetObject() );
+ if ( !xIPCli.Is() )
+ xIPCli = new SwIPClient( pViewSh, pEditWin, .... );
+ pSoNode->GetObject()->DoConnect( xIPCli );
+ xIPCli->GetEnv()->SetObjArea( Rectangle( ... ) );
+ ...
+ return DoVerb( xIPCli, nVerb );
+ }
+*/
+
+{
+ DBG_ASSERT( pIPClient->GetEmbedObj(), "DoVerb aber nicht connected?!" );
+
+ // falls neu, in Liste eintragen
+ // Passiert jetzt schon im Connect !
+// if ( LIST_ENTRY_NOTFOUND == aIPClientList.GetPos( pIPClient ) )
+// aIPClientList.Insert(pIPClient);
+
+ // und ab gehts (kein SetModified rufen, das mach das Obj schon selbst)
+ SfxErrorContext aEc( ERRCTX_SO_DOVERB, GetWindow(), RID_SO_ERRCTX );
+ ErrCode nErr = pIPClient->GetEmbedObj()->DoVerb( nVerb );
+ if( nErr )
+ ErrorHandler::HandleError( nErr );
+ return nErr;
+}
+
+//--------------------------------------------------------------------
+
+SfxInPlaceClient* SfxViewShell::FindIPClient
+(
+ SvEmbeddedObject* pObj, /* <SfxInPlaceClient> f"ur dieses
+ <SvEmbeddedObject> suchen */
+ Window* pObjParentWin /* SfxInPlaceClient, der in diesem
+ Window dargestellt wird */
+) const
+
+/* [Beschreibung]
+
+ Sucht nach einem exisitierenden SfxInPlaceClient f"ur das angegebene
+ Objekt/Window-Paar.
+
+ Wird keins gefunden, wird 0 zur"uckgegeben.
+
+
+ [Querverweise]
+
+ <SfxViewShell::DoVerb(SfxInPlaceClient*,long)>
+*/
+
+{
+ SvInPlaceClientMemberList *pClients = GetIPClientList_Impl(FALSE);
+ if ( !pClients )
+ return 0;
+
+ if( !pObjParentWin )
+ pObjParentWin = GetWindow();
+ for (USHORT n=0; n < pClients->Count(); n++)
+ {
+ SfxInPlaceClient *pIPClient = (SfxInPlaceClient*) pClients->GetObject(n);
+ if ( pIPClient->GetEmbedObj() == pObj &&
+ pIPClient->GetEnv()->GetEditWin() == pObjParentWin )
+ return pIPClient;
+ }
+
+ return 0;
+}
+
+//--------------------------------------------------------------------
+
+SfxInPlaceClient* SfxViewShell::GetIPClient() const
+{
+ return GetUIActiveClient();
+}
+
+//--------------------------------------------------------------------
+
+SfxInPlaceClient* SfxViewShell::GetUIActiveClient() const
+{
+ SvInPlaceClientMemberList *pClients = GetIPClientList_Impl(FALSE);
+ if ( !pClients )
+ return 0;
+
+ SvInPlaceClient *pIPClient=0;
+ SvInPlaceClientRef aIPClient;
+
+ for (USHORT n=0; n < pClients->Count(); n++)
+ {
+ aIPClient = pClients->GetObject(n);
+ if( aIPClient.Is() )
+ {
+ if (aIPClient->GetProtocol().IsUIActive())
+ {
+ pIPClient = aIPClient;
+ break;
+ }
+ }
+ }
+
+ return (SfxInPlaceClient*) pIPClient;
+}
+
+//--------------------------------------------------------------------
+
+void SfxViewShell::Activate( BOOL bMDI )
+{
+ DBG_CHKTHIS(SfxViewShell, 0);
+ if ( bMDI )
+ {
+ SfxObjectShell *pSh = GetViewFrame()->GetObjectShell();
+ if ( pSh->GetModel().is() )
+ pSh->GetModel()->setCurrentController( GetViewFrame()->GetFrame()->GetController() );
+ if ( pSh && pSh->GetMedium() && pSh->GetMedium()->GetName().Len() )
+ INetURLObject::SetBaseURL( pSh->GetBaseURL() );
+ else
+ {
+ INetURLObject aObject( SFX_INIMANAGER()->Get( SFX_KEY_WORK_PATH ), INET_PROT_FILE );
+ aObject.setFinalSlash();
+ INetURLObject::SetBaseURL( aObject.GetMainURL() );
+ }
+ }
+}
+
+//--------------------------------------------------------------------
+
+void SfxViewShell::Deactivate(BOOL bMDI)
+{
+ DBG_CHKTHIS(SfxViewShell, 0);
+}
+
+//--------------------------------------------------------------------
+
+void SfxViewShell::AdjustPosSizePixel
+(
+ const Point& rToolOffset,// linke obere Ecke der Tools im Frame-Window
+ const Size& rSize // gesamte zur Verf"ugung stehende Gr"o\se
+)
+
+{
+ DBG_CHKTHIS(SfxViewShell, 0);
+}
+
+//--------------------------------------------------------------------
+
+void SfxViewShell::Move()
+
+/* [Beschreibung]
+
+ Diese virtuelle Methode wird gerufen, wenn das Fenster, in dem die
+ SfxViewShell dargestellt wird eine StarView-Move() Nachricht erh"alt.
+
+ Die Basisimplementierung braucht nicht gerufen zu werden.
+
+
+ [Anmerkung]
+
+ Diese Methode kann dazu verwendet werden, eine Selektion abzubrechen,
+ um durch das Moven des Fensters erzeugte Maus-Bewegungen anzufangen.
+
+ Zur Zeit funktioniert die Benachrichtigung nicht In-Place.
+*/
+
+{
+}
+
+//--------------------------------------------------------------------
+
+void SfxViewShell::OuterResizePixel
+(
+ const Point& rToolOffset,// linke obere Ecke der Tools im Frame-Window
+ const Size& rSize // gesamte zur Verf"ugung stehende Gr"o\se
+)
+
+/* [Beschreibung]
+
+ Diese Methode mu berladen werden, um auf "Anderungen der Gre
+ der View zu reagieren. Dabei definieren wir die View als das Edit-Window
+ zuz"uglich der um das Edit-Window angeordnenten Tools (z.B. Lineale).
+
+ Das Edit-Window darf weder in Gr"o\se noch Position ver"andert werden.
+
+ Die Vis-Area der SfxObjectShell, dessen Skalierung und Position
+ d"urfen hier ver"andert werden. Der Hauptanwendungsfall ist dabei,
+ das Ver"andern der Gr"o\se der Vis-Area.
+
+ "Andert sich durch die neue Berechnung der Border, so mu\s dieser
+ mit <SfxViewShell::SetBorderPixel(const SvBorder&)> gesetzt werden.
+ Erst nach Aufruf von 'SetBorderPixel' ist das Positionieren von
+ Tools erlaubt.
+
+
+ [Beispiel]
+
+ void AppViewSh::OuterViewResizePixel( const Point &rOfs, const Size &rSz )
+ {
+ // Tool-Positionen und Gr"o\sen von au\sen berechnen, NICHT setzen!
+ // (wegen folgender Border-Berechnung)
+ Point aHLinPos...; Size aHLinSz...;
+ ...
+
+ // Border f"ur Tools passend zu rSize berechnen und setzen
+ SvBorder aBorder...
+ SetBorderPixel( aBorder ); // ab jetzt sind Positionierungen erlaubt
+
+ // Tools anordnen
+ pHLin->SetPosSizePixel( aHLinPos, aHLinSz );
+ ...
+ }
+
+
+ [Querverweise]
+
+ <SfxViewShell::InnerResizePixel(const Point&,const Size& rSize)>
+*/
+
+{
+ DBG_CHKTHIS(SfxViewShell, 0);
+ SetBorderPixel( SvBorder() );
+}
+
+//--------------------------------------------------------------------
+
+void SfxViewShell::InnerResizePixel
+(
+ const Point& rToolOffset,// linke obere Ecke der Tools im Frame-Window
+ const Size& rSize // dem Edit-Win zur Verf"ugung stehende Gr"o\se
+)
+
+/* [Beschreibung]
+
+ Diese Methode mu berladen werden, um auf "Anderungen der Gre
+ des Edit-Windows zu reagieren.
+
+ Das Edit-Window darf weder in Gr"o\se noch Position ver"andert werden.
+ Weder die Vis-Area der SfxObjectShell noch dessen Skalierung oder
+ Position d"urfen ver"andert werden.
+
+ "Andert sich durch die neue Berechnung der Border, so mu\s dieser
+ mit <SfxViewShell::SetBorderPixel(const SvBorder&)> gesetzt werden.
+ Erst nach Aufruf von 'SetBorderPixel' ist das Positionieren von
+ Tools erlaubt.
+
+
+ [Beispiel]
+
+ void AppViewSh::InnerViewResizePixel( const Point &rOfs, const Size &rSz )
+ {
+ // Tool-Positionen und Gr"o\sen von innen berechnen, NICHT setzen!
+ // (wegen folgender Border-Berechnung)
+ Point aHLinPos...; Size aHLinSz...;
+ ...
+
+ // Border f"ur Tools passend zu rSz berechnen und setzen
+ SvBorder aBorder...
+ SetBorderPixel( aBorder ); // ab jetzt sind Positionierungen erlaubt
+
+ // Tools anordnen
+ pHLin->SetPosSizePixel( aHLinPos, aHLinSz );
+ ...
+ }
+
+
+ [Querverweise]
+
+ <SfxViewShell::OuterResizePixel(const Point&,const Size& rSize)>
+*/
+
+{
+ DBG_CHKTHIS(SfxViewShell, 0);
+ SetBorderPixel( SvBorder() );
+}
+
+//--------------------------------------------------------------------
+
+void SfxViewShell::InvalidateBorder()
+{
+ DBG_CHKTHIS(SfxViewShell, 0);
+ DBG_ASSERT( GetViewFrame(), "SfxViewShell without SfxViewFrame" );
+
+ GetViewFrame()->InvalidateBorderImpl( this );
+}
+
+//--------------------------------------------------------------------
+
+void SfxViewShell::SetBorderPixel( const SvBorder &rBorder )
+{
+ DBG_CHKTHIS(SfxViewShell, 0);
+ DBG_ASSERT( GetViewFrame(), "SfxViewShell without SfxViewFrame" );
+
+ GetViewFrame()->SetBorderPixelImpl( this, rBorder );
+}
+
+//--------------------------------------------------------------------
+
+const SvBorder& SfxViewShell::GetBorderPixel() const
+{
+ DBG_CHKTHIS(SfxViewShell, 0);
+ DBG_ASSERT( GetViewFrame(), "SfxViewShell without SfxViewFrame" );
+
+ return GetViewFrame()->GetBorderPixelImpl( this );
+}
+
+//--------------------------------------------------------------------
+
+void SfxViewShell::SetWindow
+(
+ Window* pViewPort // Pointer auf das Datenfenster bzw. 0 im Destruktor
+)
+
+/* [Beschreibung]
+
+ Mit dieser Methode wird der SfxViewShell das Datenfenster mitgeteilt.
+ Dieses wird f"ur den In-Place-Container und f"ur das korrekte
+ Wiederherstellen des Focus ben"otigt.
+
+ Selbst In-Place-aktiv ist das Umsetzen des ViewPort-Windows verboten.
+*/
+
+{
+ if( pWindow == pViewPort )
+ return;
+
+ // ggf. vorhandene IP-Clients disconnecten
+ SvInPlaceClientMemberList *pClients = GetIPClientList_Impl(FALSE);
+ if ( pClients )
+ {
+ SvInPlaceClientRef aIPClient;
+ USHORT nCount = (USHORT)pClients->Count();
+ for (USHORT n=0; n<nCount; n++)
+ {
+ // Da beim DisConnect der Client immer aus der Liste entfernt wird,
+ // immer das 0-te Element holen
+ aIPClient = pClients->GetObject(0);
+ if( aIPClient.Is() )
+ {
+ if (aIPClient->GetIPObj())
+ {
+ aIPClient->DoDisconnect();
+ aIPClient.Clear();
+ }
+ }
+ }
+ }
+
+ // View-Port austauschen
+ BOOL bHadFocus = pWindow ? pWindow->HasChildPathFocus( TRUE ) : FALSE;
+ pWindow = pViewPort;
+ if ( bHadFocus && pWindow )
+ SFX_APP()->GrabFocus( pWindow );
+}
+
+//--------------------------------------------------------------------
+
+Size SfxViewShell::GetOptimalSizePixel() const
+{
+ DBG_CHKTHIS(SfxViewShell, 0);
+ DBG_ASSERT(pWindow, "Kein Fenster");
+/*
+ Rectangle aAppWinRect ( SfxApplicationWindow::Get()->GetClientAreaPixel() );
+ if ( aAppWinRect.IsEmpty() )
+ // Bei Hochfahren der Applikation ist die ClientArea noch
+ // nicht berechnet worden, wenn das erste Dokument erzeugt
+ // wird
+ aAppWinRect = Rectangle(Point(), Application::GetAppWindow()->GetOutputSizePixel());
+ else
+ aAppWinRect.Move( -aAppWinRect.Left(), -aAppWinRect.Top() );
+ Point aPoint( aAppWinRect.BottomRight() );
+ */
+
+ DBG_ERROR( "Useless call!" );
+ return Size();
+}
+
+//------------------------------------------------------------------------
+
+SfxViewShell::SfxViewShell
+(
+ SfxViewFrame* pViewFrame, /* <SfxViewFrame>, in dem diese View
+ dargestellt wird */
+ USHORT nFlags /* siehe <SfxViewShell-Flags> */
+)
+
+: SfxShell(this),
+ pImp( new SfxViewShell_Impl ),
+#if !SFX_VIEWSH_INCLUDES_CLIENTSH_HXX
+ pIPClientList( 0 ),
+#endif
+ pWindow(0),
+ pFrame(pViewFrame),
+ pSubShell(0),
+ bOptimizeEach(0 != (nFlags & SFX_VIEW_OPTIMIZE_EACH)),
+ bMaximizeFirst( 0 != (nFlags & SFX_VIEW_MAXIMIZE_FIRST) )
+ ,bNoNewWindow( 0 != (nFlags & SFX_VIEW_NO_NEWWINDOW) )
+{
+ DBG_CTOR(SfxViewShell, 0);
+
+ pImp->pController = 0;
+ pImp->bIsShowView =
+ !(SFX_VIEW_NO_SHOW == (nFlags & SFX_VIEW_NO_SHOW));
+ pImp->bUseObjectSize =
+ SFX_CREATE_MODE_EMBEDDED==pFrame->GetObjectShell()->GetCreateMode() &&
+ SFX_VIEW_OBJECTSIZE_EMBEDDED == (nFlags & SFX_VIEW_OBJECTSIZE_EMBEDDED);
+ pImp->bCanPrint = SFX_VIEW_CAN_PRINT == (nFlags & SFX_VIEW_CAN_PRINT);
+ pImp->bFrameSetImpl = nFlags & SFX_VIEW_IMPLEMENTED_AS_FRAMESET;
+ pImp->bHasPrintOptions =
+ SFX_VIEW_HAS_PRINTOPTIONS == (nFlags & SFX_VIEW_HAS_PRINTOPTIONS);
+ pImp->bPlugInsActive = TRUE;
+ if ( pFrame->GetParentViewFrame() )
+ pImp->bPlugInsActive = pFrame->GetParentViewFrame()->GetViewShell()->pImp->bPlugInsActive;
+ pImp->eScroll = SCROLLING_DEFAULT;
+ pImp->pSetDescr = NULL;
+ pImp->nPrinterLocks = 0;
+ pImp->pMenuBarResId = 0;
+ pImp->pAccelResId = 0;
+ pImp->pAccel = 0;
+ pImp->pMenu = 0;
+ pImp->bControllerSet = FALSE;
+ pImp->nFamily = 0xFFFF; // undefined, default set by TemplateDialog
+ SetMargin( pFrame->GetMargin_Impl() );
+
+ SetPool( &pViewFrame->GetObjectShell()->GetPool() );
+ StartListening(*SFX_APP());
+
+ // in Liste eintragen
+ const SfxViewShell *pThis = this; // wegen der kranken Array-Syntax
+ SfxViewShellArr_Impl &rViewArr = SFX_APP()->GetViewShells_Impl();
+ rViewArr.Insert(pThis, rViewArr.Count() );
+}
+
+//--------------------------------------------------------------------
+
+SfxViewShell::~SfxViewShell()
+{
+ DBG_DTOR(SfxViewShell, 0);
+
+ // aus Liste austragen
+ const SfxViewShell *pThis = this;
+ SfxViewShellArr_Impl &rViewArr = SFX_APP()->GetViewShells_Impl();
+ rViewArr.Remove( rViewArr.GetPos(pThis) );
+// if ( GetViewFrame()->GetFrame()->GetFrameSet_Impl() == pImp->pSetDescr )
+// GetViewFrame()->GetFrame()->SetFrameSet_Impl( NULL );
+// delete pImp->pSetDescr;
+
+ if ( pImp->pMenu )
+ {
+ SfxTopViewFrame* pTopView = PTR_CAST( SfxTopViewFrame, GetViewFrame()->GetTopViewFrame() );
+ SfxTopFrame *pTop = pTopView ? pTopView->GetTopFrame_Impl() : NULL;
+ if ( pTop )
+ {
+ Menu* pMenu = pImp->pMenu->GetMenu()->GetSVMenu();
+ if ( pMenu == pTop->GetMenuBar_Impl() )
+ pTop->SetMenuBar_Impl( 0 );
+ }
+
+ delete pImp->pMenu;
+ }
+
+ if ( pImp->pController )
+ {
+ pImp->pController->ReleaseShell_Impl();
+ pImp->pController->release();
+ }
+
+ delete pImp->pMenuBarResId;
+ delete pImp;
+
+#if !SFX_VIEWSH_INCLUDES_CLIENTSH_HXX
+ delete pIPClientList;
+#endif
+}
+
+//--------------------------------------------------------------------
+
+USHORT SfxViewShell::PrepareClose
+(
+ BOOL bUI, // TRUE: Dialoge etc. erlaubt, FALSE: silent-mode
+ BOOL bForBrowsing
+)
+{
+ SfxPrinter *pPrinter = GetPrinter();
+ if ( pPrinter && pPrinter->IsPrinting() )
+ {
+ if ( bUI )
+ {
+ MessBox aInfoBox( &GetViewFrame()->GetWindow(), SfxResId(MSG_CANT_CLOSE) );
+
+//(mba) if ( bForBrowsing && GetViewFrame()->GetFrame()->GetTask() )
+// aInfoBox.AddButton( String( SfxResId( RID_STR_NEW_TASK ) ), RET_NEWTASK, BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_FOCUSBUTTON );
+
+ USHORT nRet = aInfoBox.Execute();
+ if ( nRet == RET_NEWTASK )
+ return nRet;
+ }
+
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+//--------------------------------------------------------------------
+
+SfxViewShell* SfxViewShell::Current()
+{
+ SfxViewFrame *pCurrent = SfxViewFrame::Current();
+ return pCurrent ? pCurrent->GetViewShell() : NULL;
+}
+
+//--------------------------------------------------------------------
+
+SdrView* SfxViewShell::GetDrawView() const
+
+/* [Beschreibung]
+
+ Diese virtuelle Methode mu\s von den Subklassen "uberladen werden, wenn
+ der Property-Editor zur Verf"ugung stehen soll.
+
+ Die Default-Implementierung liefert immer 0.
+*/
+
+{
+ return 0;
+}
+
+//--------------------------------------------------------------------
+
+String SfxViewShell::GetSelectionText
+(
+ BOOL bCompleteWords /* FALSE (default)
+ Nur der tats"achlich selektierte Text wird
+ zur"uckgegeben.
+
+ TRUE
+ Der selektierte Text wird soweit erweitert,
+ da\s nur ganze W"orter zur"uckgegeben werden.
+ Als Worttrenner gelten White-Spaces und die
+ Satzzeichen .,; sowie einfache und doppelte
+ Anf"uhrungszeichen.
+ */
+)
+
+/* [Beschreibung]
+
+ Diese Methode kann von Anwendungsprogrammierer "uberladen werden,
+ um einen Text zur"uckzuliefern, der in der aktuellen Selektion
+ steht. Dieser wird z.B. beim Versenden (email) verwendet.
+
+ Mit bCompleteWords == TRUE ger"ufen, reicht z.B. auch der Cursor,
+ der in einer URL steht, um die gesamte URL zu liefern.
+*/
+
+{
+ return String();
+}
+
+//--------------------------------------------------------------------
+
+BOOL SfxViewShell::HasSelection( BOOL ) const
+
+/* [Beschreibung]
+
+ Mit dieser virtuellen Methode kann z.B. ein Dialog abfragen, ob in der
+ aktuellen View etwas selektiert ist. Wenn der Parameter <BOOL> TRUE ist,
+ wird abgefragt, ob Text selektiert ist.
+*/
+
+{
+ return FALSE;
+}
+
+//--------------------------------------------------------------------
+
+void SfxViewShell::SetSubShell( SfxShell *pShell )
+
+/* [Beschreibung]
+
+ Mit dieser Methode kann eine Selektions- oder Cursor-Shell angemeldet
+ werden, die automatisch unmittelbar nach der SfxViewShell auf den
+ SfxDispatcher gepusht wird, und automatisch umittelbar vor ihr
+ gepoppt wird.
+
+ Ist die SfxViewShell-Instanz bereits gepusht, dann wird pShell
+ sofort ebenfalls gepusht. Wird mit SetSubShell eine andere SfxShell
+ Instanz angemeldet, als vorher angemeldet war, wird die zuvor angemeldete
+ ggf. automatisch gepoppt. Mit pShell==0 kann daher die aktuelle
+ Sub-Shell abgemeldet werden.
+*/
+
+{
+ // ist diese ViewShell "uberhaupt aktiv?
+ SfxDispatcher *pDisp = pFrame->GetDispatcher();
+ if ( pDisp->IsActive(*this) )
+ {
+ // Dispatcher updaten
+ if ( pSubShell )
+ pDisp->Pop(*pSubShell);
+ if ( pShell )
+ pDisp->Push(*pShell);
+ pDisp->Flush();
+ }
+
+ pSubShell = pShell;
+}
+
+void SfxViewShell::AddSubShell( SfxShell& rShell )
+{
+ pImp->aArr.Insert( &rShell, pImp->aArr.Count() );
+ SfxDispatcher *pDisp = pFrame->GetDispatcher();
+ if ( pDisp->IsActive(*this) )
+ {
+ pDisp->Push(rShell);
+ pDisp->Flush();
+ }
+}
+
+void SfxViewShell::RemoveSubShell( SfxShell* pShell )
+{
+ SfxDispatcher *pDisp = pFrame->GetDispatcher();
+ if ( !pShell )
+ {
+ USHORT nCount = pImp->aArr.Count();
+ if ( pDisp->IsActive(*this) )
+ {
+ for ( USHORT n=nCount; n>0; n-- )
+ pDisp->Pop( *pImp->aArr[n-1] );
+ pDisp->Flush();
+ }
+
+ pImp->aArr.Remove(0, nCount);
+ }
+ else
+ {
+ USHORT nPos = pImp->aArr.GetPos( pShell );
+ if ( nPos != 0xFFFF )
+ {
+ pImp->aArr.Remove( nPos );
+ if ( pDisp->IsActive(*this) )
+ {
+ pDisp->RemoveShell_Impl( *pShell );
+ pDisp->Flush();
+ }
+ }
+ }
+}
+
+SfxShell* SfxViewShell::GetSubShell( USHORT nNo )
+{
+ USHORT nCount = pImp->aArr.Count();
+ if ( nNo<nCount )
+ return pImp->aArr[nCount-nNo-1];
+ return NULL;
+}
+
+void SfxViewShell::PushSubShells_Impl( BOOL bPush )
+{
+ USHORT nCount = pImp->aArr.Count();
+ SfxDispatcher *pDisp = pFrame->GetDispatcher();
+ if ( bPush )
+ {
+ for ( USHORT n=0; n<nCount; n++ )
+ pDisp->Push( *pImp->aArr[n] );
+
+// HACK(evtl. PushSubShells fuer SW virtuell machen oder im SW umbauen)
+// Notify( *this, SfxSimpleHint( SFX_HINT_RESERVED4 ) );
+ }
+ else if ( nCount )
+ {
+ pDisp->Pop( *pImp->aArr[0], SFX_SHELL_POP_UNTIL );
+
+// HACK(evtl. PushSubShells fuer SW virtuell machen oder im SW umbauen)
+// Notify( *this, SfxSimpleHint( SFX_HINT_RESERVED3 ) );
+ }
+
+ pDisp->Flush();
+}
+
+//--------------------------------------------------------------------
+
+void SfxViewShell::WriteUserData( String &, BOOL bBrowse )
+{
+}
+
+//--------------------------------------------------------------------
+
+void SfxViewShell::ReadUserData(const String &, BOOL bBrowse )
+{
+}
+
+//--------------------------------------------------------------------
+// returns the first shell of spec. type viewing the specified doc.
+
+SfxViewShell* SfxViewShell::GetFirst
+(
+ const TypeId* pType,
+ BOOL bOnlyVisible
+)
+{
+ SfxViewShellArr_Impl &rShells = SFX_APP()->GetViewShells_Impl();
+
+ // search for a SfxViewShell of the specified type
+ for ( USHORT nPos = 0; nPos < rShells.Count(); ++nPos )
+ {
+ SfxViewShell *pShell = rShells.GetObject(nPos);
+ if ( !pType || pShell->IsA(*pType) )
+ return pShell;
+ }
+
+ return 0;
+}
+
+//--------------------------------------------------------------------
+// returns the next shell of spec. type viewing the specified doc.
+
+SfxViewShell* SfxViewShell::GetNext
+(
+ const SfxViewShell& rPrev,
+ const TypeId* pType,
+ BOOL bOnlyVisible
+)
+{
+ SfxViewShellArr_Impl &rShells = SFX_APP()->GetViewShells_Impl();
+
+ // refind the specified predecessor
+ USHORT nPos;
+ for ( nPos = 0; nPos < rShells.Count(); ++nPos )
+ if ( rShells.GetObject(nPos) == &rPrev )
+ break;
+
+ // search for a Frame of the specified type
+ for ( ++nPos; nPos < rShells.Count(); ++nPos )
+ {
+ SfxViewShell *pShell = rShells.GetObject(nPos);
+ if ( !pType || pShell->IsA(*pType) )
+ return pShell;
+ }
+ return 0;
+}
+
+//--------------------------------------------------------------------
+
+void SfxViewShell::SFX_NOTIFY( SfxBroadcaster& rBC,
+ const TypeId& rBCType,
+ const SfxHint& rHint,
+ const TypeId& rHintType )
+{
+//! (pb) do we need here new implementation?
+#ifndef NOOLDSV
+ if ( rHint.ISA(SfxSysChangeHint) && SETTINGS_CHANGE_PRINTER ==
+ ( (const SfxSysChangeHint &)rHint ).GetChangeType() )
+ {
+ SfxPrinter *pPrinter = GetPrinter();
+ if ( pPrinter && pPrinter->IsDefPrinter() )
+ SetPrinter_Impl( new SfxPrinter(pPrinter->GetOptions().Clone()) );
+ }
+#endif
+}
+
+//--------------------------------------------------------------------
+
+FASTBOOL SfxViewShell::KeyInput( const KeyEvent &rKeyEvent )
+
+/* [Beschreibung]
+
+ Diese Methode f"uhrt das KeyEvent 'rKeyEvent' "uber die an dieser
+ SfxViewShell direkt oder indirekt (z.B. via Applikation) konfigurierten
+ Tasten (Accelerator) aus.
+
+
+ [R"uckgabewert]
+
+ FASTBOOL TRUE
+ die Taste ist konfiguriert, der betreffende
+ Handler wurde gerufen
+
+ FALSE
+ die Taste ist nicht konfiguriert, es konnte
+ also kein Handler gerufen werden
+
+
+ [Querverweise]
+ <SfxApplication::KeyInput(const KeyEvent&)>
+*/
+{
+ // sonst an einem der Accelerator-Mgr
+ SfxAcceleratorManager* pAccMgr = GetAccMgr_Impl();
+ if ( pAccMgr && pAccMgr->Call( rKeyEvent, GetViewFrame()->GetBindings() ) )
+ return TRUE;
+
+ return SFX_APP()->KeyInput( rKeyEvent );
+}
+
+FASTBOOL SfxViewShell::GlobalKeyInput_Impl( const KeyEvent &rKeyEvent )
+{
+ // sonst an einem der Accelerator-Mgr
+ SfxAcceleratorManager* pAccMgr = NULL;
+ pAccMgr = GetAccMgr_Impl();
+ if ( pAccMgr && pAccMgr->Call( rKeyEvent, pFrame->GetBindings(), TRUE ) )
+ return TRUE;
+
+ return SFX_APP()->KeyInput( rKeyEvent );
+}
+
+//--------------------------------------------------------------------
+
+void SfxViewShell::ShowCursor( FASTBOOL bOn )
+
+/* [Beschreibung]
+
+ Diese Methode mu\s von Subklassen "uberladen werden, damit vom SFx
+ aus der Cursor ein- und ausgeschaltet werden kann. Dies geschieht
+ z.B. bei laufendem <SfxProgress>.
+*/
+
+{
+}
+
+//--------------------------------------------------------------------
+
+void SfxViewShell::GotFocus() const
+
+/* [Beschreibung]
+
+ Diese Methode mu\s vom Applikationsentwickler gerufen werden, wenn
+ das Edit-Window den Focus erhalten hat. Der SFx hat so z.B. die
+ M"oglichkeit, den Accelerator einzuschalten.
+
+
+ [Anmerkung]
+
+ <StarView> liefert leider keine M"oglichkeit, solche Events
+ 'von der Seite' einzuh"angen.
+*/
+
+{
+}
+
+//--------------------------------------------------------------------
+
+ErrCode SfxViewShell::DoVerb(long nVerb)
+
+/* [Beschreibung]
+
+ Virtuelle Methode, um am selektierten Objekt ein Verb auszuf"uhren.
+ Da dieses Objekt nur den abgeleiteten Klassen bekannt ist, mu DoVerb
+ dort "uberlschrieben werden.
+
+*/
+
+{
+ return ERRCODE_SO_NOVERBS;
+}
+
+//--------------------------------------------------------------------
+
+void SfxViewShell::DisconnectClients_Impl(SvInPlaceClient *pIP)
+
+/* [Beschreibung]
+
+ Diese Methode dient dazu, bei UI-Aktivierung eins IPClients alle anderen
+ noch bestehenden Verbindungen zu trennen.
+
+*/
+
+{
+
+ // SO2 stellt sicher, da\s nur ein Object gleichzeitig UI-aktiv ist.
+ // Aus Speicherplatzgr"unden werden aber alle Objekte, die nicht aktiv
+ // sind oder sein m"ussen, disconnected.
+
+ SvInPlaceClientMemberList *pClients = GetIPClientList_Impl(FALSE);
+ if ( !pClients )
+ return;
+
+ SvInPlaceClientRef aIPClient;
+ for ( USHORT n=0; n < pClients->Count(); )
+ {
+ aIPClient = pClients->GetObject(n);
+ if( aIPClient.Is() && aIPClient != pIP && aIPClient->GetIPObj() &&
+ !(aIPClient->GetIPObj()->GetMiscStatus() & SVOBJ_MISCSTATUS_ACTIVATEWHENVISIBLE) )
+ aIPClient->DoDisconnect();
+ else
+ n++;
+ }
+}
+
+//--------------------------------------------------------------------
+
+void SfxViewShell::DisconnectAllClients()
+{
+ SvInPlaceClientMemberList *pClients = GetIPClientList_Impl(FALSE);
+ if ( !pClients )
+ return;
+
+ SvInPlaceClientRef aIPClient;
+ for ( USHORT n=0; n<pClients->Count(); )
+ {
+ aIPClient = pClients->GetObject(n);
+ if( aIPClient.Is() && aIPClient->GetIPObj() )
+ aIPClient->DoDisconnect();
+ else
+ n++;
+ }
+}
+
+//--------------------------------------------------------------------
+
+BOOL SfxViewShell::UseObjectSize() const
+{
+ return pImp->bUseObjectSize;
+}
+
+//--------------------------------------------------------------------
+
+void SfxViewShell::QueryObjAreaPixel( Rectangle& ) const
+{
+}
+
+//--------------------------------------------------------------------
+
+void SfxViewShell::AdjustVisArea(const Rectangle& rRect)
+{
+ DBG_ASSERT (pFrame, "Kein Frame?");
+
+ SfxInPlaceObject *pObj = pFrame->GetObjectShell()->GetInPlaceObject();
+ if ( !pObj )
+ return;
+
+ if ( UseObjectSize() )
+ {
+ Point aPos = rRect.TopLeft();
+ Size aSize = pObj->GetVisArea().GetSize();
+ pObj->SetVisArea( Rectangle(aPos, aSize) );
+ }
+ else
+ pObj->SetVisArea( rRect );
+}
+
+//--------------------------------------------------------------------
+
+void SfxViewShell::VisAreaChanged(const Rectangle& rVisArea)
+{
+ SvInPlaceClientMemberList *pClients = GetIPClientList_Impl(FALSE);
+ if ( !pClients )
+ return;
+
+ SvInPlaceClientRef aIPClient;
+ for (USHORT n=0; n < pClients->Count(); n++)
+ {
+ // Die Liste enth"alt alle connected clients
+ aIPClient = pClients->GetObject(n);
+ if( aIPClient.Is() )
+ CheckIPClient_Impl( aIPClient, rVisArea );
+ }
+}
+
+
+//--------------------------------------------------------------------
+
+void SfxViewShell::CheckIPClient_Impl( SvInPlaceClient *pIPClient,
+ const Rectangle& rVisArea )
+{
+ if ( GetObjectShell()->IsInClose() )
+ return;
+
+ SfxIniManager* pIniMgr = SFX_INIMANAGER();
+ BOOL bApplets = pIniMgr->IsAppletsEnabled();
+ BOOL bActive = pIPClient->IsInPlaceActive();
+ BOOL bPlugIn = FALSE;
+#ifdef SOLAR_PLUGIN
+ bPlugIn = Application::IsRemoteServer() ? FALSE : (USHORT)pIniMgr->Get( SFX_KEY_INET_EXE_PLUGIN ).ToInt32();
+#endif
+
+ SvAppletObjectRef aAppRef = pIPClient->GetIPObj();
+ SvPlugInObjectRef aPlugRef = pIPClient->GetIPObj();
+ SfxFrameObjectRef aFrameRef = pIPClient->GetIPObj();
+
+ if ( !pImp->bPlugInsActive && ( aPlugRef.Is() || aAppRef.Is() || aFrameRef.Is() ) )
+ {
+ if ( bActive )
+ pIPClient->GetProtocol().Reset2Open();
+ return;
+ }
+
+ BOOL bAlwaysActive = ( pIPClient->GetIPObj()->GetMiscStatus() == SVOBJ_MISCSTATUS_ALWAYSACTIVATE );
+
+ if ( bAlwaysActive || rVisArea.IsOver( pIPClient->GetClientData()->GetObjArea()) )
+ {
+ // Der Client ist connected und sichtbar.
+ if ( bActive )
+ {
+ // Wenn er aktiv ist, mu\s er benachrichtigt werden.
+ pIPClient->GetEnv()->OutDevScaleChanged();
+
+ if ( aPlugRef.Is() )
+ {
+ // Plugins sind nur sichtbar, wenn das entsprechende
+ // flag auch angeschaltet ist
+ if ( !bPlugIn )
+ {
+ pIPClient->GetProtocol().Reset2Open();
+ }
+ else if ( aPlugRef->GetPlugInMode() == PLUGIN_FULL )
+ {
+ SetBorderPixel(SvBorder());
+ Window *pWin = GetWindow();
+ Size aSize = pWin->GetOutputSizePixel();
+ aSize = pWin->PixelToLogic(aSize);
+ Rectangle aRect = Rectangle ( pWin->PixelToLogic(Point()), aSize);
+ pIPClient->GetClientData()->SetObjArea(aRect);
+ }
+ }
+ else if ( aAppRef.Is() && !bApplets )
+ {
+ // Java-Applets sind nicht aktiv, wenn Java in den
+ // Options ausgeschaltet wurde
+ pIPClient->GetProtocol().Reset2Open();
+ }
+ }
+ else
+ {
+ // Ist er es nicht, aber da\s Object soll aktiv sein,
+ // wenn es sichtbar ist, mu\s das Object aktiviert werden;
+ // bei Plugins und Applets sind noch die Flags auszuwerten
+ if ( pIPClient->GetIPObj()->GetMiscStatus() &
+ SVOBJ_MISCSTATUS_ACTIVATEWHENVISIBLE )
+ {
+ BOOL bActivate = TRUE;
+ if ( aPlugRef.Is() )
+ bActivate = bPlugIn;
+ else if ( aAppRef.Is() )
+ bActivate = bApplets;
+ if ( bActivate )
+ pIPClient->GetIPObj()->DoVerb(0);
+ }
+ }
+ }
+ else if ( bActive )
+ {
+ // Wenn er aktiv ist, mu\s er benachrichtigt werden.
+ pIPClient->GetEnv()->OutDevScaleChanged();
+
+ // Ein nicht sichtbarer client soll disconnected werden, wenn
+ // er (nur) aktiv ist, wenn er sichtbar ist.
+ // Wenn er dann wieder sichtbar wird, mu\s die Applikation
+ // ihn connecten, damit er in der client list erscheint!
+
+ // Auf Wunsch von MB erst mal entfernt !!
+// if ( pIPClient->GetIPObj()->GetMiscStatus() &
+// SVOBJ_MISCSTATUS_ACTIVATEWHENVISIBLE )
+// pIPClient->DoDisconnect();
+ }
+}
+
+//--------------------------------------------------------------------
+
+BOOL SfxViewShell::PlugInsActive() const
+{
+ return pImp->bPlugInsActive;
+}
+
+//--------------------------------------------------------------------
+
+void SfxViewShell::DiscardClients_Impl()
+
+/* [Beschreibung]
+
+ Diese Methode dient dazu, vor dem Schlie\sen eines Dokuments das
+ Speichern der Objekte zu verhindern, wenn der Benutzer Schlie\en ohne
+ Speichern gew"ahlt hatte.
+*/
+
+{
+ SvInPlaceClientMemberList *pClients = GetIPClientList_Impl(FALSE);
+ if ( !pClients )
+ return;
+
+ SvInPlaceClientRef aIPClient;
+ for (USHORT n=0; n < pClients->Count(); n++)
+ {
+ aIPClient = pClients->GetObject(n);
+ if( aIPClient.Is() )
+ {
+ if (aIPClient->GetIPObj())
+ {
+ aIPClient->GetIPObj()->SetAutoSave(FALSE);
+ aIPClient->DoDisconnect();
+ aIPClient.Clear();
+ }
+ }
+ }
+}
+
+//--------------------------------------------------------------------
+
+SfxScrollingMode SfxViewShell::GetScrollingMode() const
+{
+ return pImp->eScroll;
+}
+
+//--------------------------------------------------------------------
+
+void SfxViewShell::SetScrollingMode( SfxScrollingMode eMode )
+{
+ pImp->eScroll = eMode;
+}
+
+//--------------------------------------------------------------------
+
+SfxFrameSetDescriptor* SfxViewShell::GetFrameSet_Impl() const
+{
+ return pImp->pSetDescr;
+}
+
+//--------------------------------------------------------------------
+
+void SfxViewShell::SetFrameSet_Impl( SfxFrameSetDescriptor* pD )
+{
+// delete pImp->pSetDescr;
+ pImp->pSetDescr = pD;
+}
+
+//--------------------------------------------------------------------
+
+SfxObjectShell* SfxViewShell::GetObjectShell()
+{
+ return GetViewFrame()->GetObjectShell();
+}
+
+//--------------------------------------------------------------------
+
+const Size& SfxViewShell::GetMargin() const
+{
+ return pImp->aMargin;
+}
+
+//--------------------------------------------------------------------
+
+void SfxViewShell::SetMargin( const Size& rSize )
+{
+ // Der default-Margin wurde "geeicht" mit www.apple.com !!
+ Size aMargin = rSize;
+ if ( aMargin.Width() == -1 )
+ aMargin.Width() = DEFAULT_MARGIN_WIDTH;
+ if ( aMargin.Height() == -1 )
+ aMargin.Height() = DEFAULT_MARGIN_HEIGHT;
+
+ if ( aMargin != pImp->aMargin )
+ {
+ pImp->aMargin = aMargin;
+ MarginChanged();
+ }
+}
+
+//--------------------------------------------------------------------
+
+void SfxViewShell::MarginChanged()
+{
+}
+
+//--------------------------------------------------------------------
+
+BOOL SfxViewShell::IsShowView_Impl() const
+{
+ return pImp->bIsShowView;
+}
+
+//--------------------------------------------------------------------
+
+SfxFrame* SfxViewShell::GetSmartSelf( SfxFrame* pSelf, SfxMedium& rMedium )
+{
+ return pSelf;
+}
+
+//--------------------------------------------------------------------
+
+BOOL SfxViewShell::IsImplementedAsFrameset_Impl( ) const
+{
+ return pImp->bFrameSetImpl;
+}
+
+//------------------------------------------------------------------------
+
+void SfxViewShell::JumpToMark( const String& rMark )
+{
+ SfxStringItem aMarkItem( SID_JUMPTOMARK, rMark );
+ GetViewFrame()->GetDispatcher()->Execute(
+ SID_JUMPTOMARK,
+ SFX_CALLMODE_SYNCHRON|SFX_CALLMODE_RECORD,
+ &aMarkItem, 0L );
+}
+
+//------------------------------------------------------------------------
+
+#if !SFX_VIEWSH_INCLUDES_CLIENTSH_HXX
+
+void SfxViewShell::NewIPClient_Impl( SfxInPlaceClient *pIPClient )
+{
+ SvInPlaceClientMemberList *pClients = GetIPClientList_Impl(TRUE);
+ pClients->Insert(pIPClient);
+}
+
+void SfxViewShell::IPClientGone_Impl( SfxInPlaceClient *pIPClient )
+{
+ SvInPlaceClientMemberList *pClients = GetIPClientList_Impl(TRUE);
+ pClients->Remove(pIPClient);
+}
+
+SvInPlaceClientMemberList* SfxViewShell::GetIPClientList_Impl( BOOL bCreate ) const
+{
+ if ( !pIPClientList && bCreate )
+ ( (SfxViewShell*) this )->pIPClientList = new SvInPlaceClientMemberList;
+ return pIPClientList;
+}
+
+#endif
+
+SfxMenuBarManager* SfxViewShell::GetMenuBar_Impl( BOOL bPlugin )
+{
+ // F"ur das Menu wird auch ein Accelerator gebraucht
+ GetAccMgr_Impl();
+ SfxBindings& rBindings = GetViewFrame()->GetBindings();
+
+ // Wenn keine eigenen Bindings, dann kann MenuBarManager der Factory
+ // verwendet werden, der an den AppBindings h"angt
+// SfxMenuBarManager *pMgr = GetObjectShell()->GetFactory().GetMenuBar_Impl();
+// if ( pMgr && &rBindings == &pMgr->GetBindings() )
+// return pMgr;
+
+ if ( !pImp->pMenu )
+ {
+ sal_Bool bCheckPlugin = SfxApplication::IsPlugin();
+ if ( !pImp->pMenuBarResId )
+ {
+ const ResId* pId = bCheckPlugin ? GetObjectShell()->GetFactory().GetPluginMenuBarId()
+ : GetObjectShell()->GetFactory().GetMenuBarId();
+ if ( pId )
+ pImp->pMenuBarResId = new ResId( pId->GetId(), pId->GetResMgr() );
+ }
+
+ if ( pImp->pMenuBarResId && pImp->pMenuBarResId->GetId() )
+ pImp->pMenu = new SfxMenuBarManager( *pImp->pMenuBarResId, rBindings );
+ else
+ pImp->pMenu = new SfxMenuBarManager( rBindings, bCheckPlugin );
+ pImp->pMenu->Initialize( GetViewFrame()->ISA( SfxInPlaceFrame ) );
+ }
+
+ return pImp->pMenu;
+}
+
+SfxAcceleratorManager* SfxViewShell::GetAccMgr_Impl()
+{
+ return GetObjectShell()->GetFactory().GetAccMgr_Impl();
+}
+
+void SfxViewShell::SetMenuBar_Impl( const ResId& rId )
+{
+ if ( !pImp->pMenuBarResId ||
+ rId.GetId() != pImp->pMenuBarResId->GetId() ||
+ rId.GetResMgr() != pImp->pMenuBarResId->GetResMgr() )
+ {
+ DELETEZ( pImp->pMenuBarResId );
+
+ if ( pImp->pMenu )
+ {
+ SfxTopViewFrame* pTopView = PTR_CAST( SfxTopViewFrame, GetViewFrame()->GetTopViewFrame() );
+ SfxTopFrame *pTop = pTopView ? pTopView->GetTopFrame_Impl() : NULL;
+ if ( pTop )
+ {
+ Menu* pMenu = pImp->pMenu->GetMenu()->GetSVMenu();
+ if ( pMenu == pTop->GetMenuBar_Impl() )
+ pTop->SetMenuBar_Impl( 0 );
+ }
+
+ DELETEZ( pImp->pMenu );
+ }
+
+ if ( rId.GetId() )
+ pImp->pMenuBarResId = new ResId(rId);
+ }
+}
+
+void SfxViewShell::SetController( SfxBaseController* pController )
+{
+ pImp->pController = pController;
+ pImp->pController->acquire();
+ pImp->bControllerSet = TRUE;
+}
+
+Reference < XController > SfxViewShell::GetController()
+{
+ if ( !pImp->pController )
+ new SfxBaseController( this );
+ return pImp->pController;
+}
+
+
diff --git a/sfx2/util/hidother.src b/sfx2/util/hidother.src
new file mode 100644
index 000000000000..f38f62478b96
--- /dev/null
+++ b/sfx2/util/hidother.src
@@ -0,0 +1,232 @@
+/*************************************************************************
+ *
+ * $RCSfile: hidother.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:52:37 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#include "../source/inc/helpid.hrc" // HID_XXX
+#include "../inc/sfxsids.hrc" // SID_XXX
+#include "../inc/sfx.hrc"
+#include "../source/expchaos/cntexp.hrc"
+
+hidspecial HID_APP_WIN { HelpID = HID_APP_WIN; };
+hidspecial HID_DESKTOP { HelpID = HID_DESKTOP; };
+hidspecial HID_DOCINFO_FRAME { HelpID = HID_DOCINFO_FRAME; };
+hidspecial HID_EXPLORER_FRAME { HelpID = HID_EXPLORER_FRAME; };
+hidspecial HID_FILEDLG_FILE { HelpID = HID_FILEDLG_FILE; };
+hidspecial HID_FILEDLG_MANAGER { HelpID = HID_FILEDLG_MANAGER; };
+hidspecial HID_FILEDLG_READ_ONLY { HelpID = HID_FILEDLG_READ_ONLY; };
+hidspecial HID_FILEDLG_STANDARD { HelpID = HID_FILEDLG_STANDARD; };
+hidspecial HID_FILEDLG_URL { HelpID = HID_FILEDLG_URL; };
+hidspecial HID_FILEDLG_USE_PASSWD { HelpID = HID_FILEDLG_USE_PASSWD; };
+hidspecial HID_INTERFACE_SFXMAILVIEW { HelpID = HID_INTERFACE_SFXMAILVIEW; };
+hidspecial HID_INTERFACE_SFXEXPLVIEWSH { HelpID = HID_INTERFACE_SFXEXPLVIEWSH; };
+hidspecial HID_INTERFACE_SFXFRAMESETVIEW { HelpID = HID_INTERFACE_SFXFRAMESETVIEW; };
+hidspecial HID_INTERFACE_SFXFRAMESETSOURCEVIEW { HelpID = HID_INTERFACE_SFXFRAMESETSOURCEVIEW; };
+hidspecial HID_INTERFACE_SFXHELP_VIEWSH { HelpID = HID_INTERFACE_SFXHELP_VIEWSH; };
+hidspecial HID_PREVIEW_FRAME { HelpID = HID_PREVIEW_FRAME; };
+hidspecial HID_PRINT_OPTIONS { HelpID = HID_PRINT_OPTIONS; };
+hidspecial HID_TEMPLATE_FILTER { HelpID = HID_TEMPLATE_FILTER; };
+hidspecial HID_TEMPLATE_FMT { HelpID = HID_TEMPLATE_FMT; };
+hidspecial HID_SEARCH_DLG_TABLB { HelpID = HID_SEARCH_DLG_TABLB; };
+hidspecial SID_STYLE_FAMILY1 { HelpID = SID_STYLE_FAMILY1; };
+hidspecial SID_STYLE_FAMILY2 { HelpID = SID_STYLE_FAMILY2; };
+hidspecial SID_STYLE_FAMILY3 { HelpID = SID_STYLE_FAMILY3; };
+hidspecial SID_STYLE_FAMILY4 { HelpID = SID_STYLE_FAMILY4; };
+hidspecial SID_STYLE_FAMILY5 { HelpID = SID_STYLE_FAMILY5; };
+hidspecial SID_FILTER_NAME { HelpID = SID_FILTER_NAME; };
+hidspecial HID_NAVIGATOR_WINDOW { HelpID = HID_NAVIGATOR_WINDOW; };
+hidspecial SID_EXPLORERCONTENT_OPEN { HelpId = SID_EXPLORERCONTENT_OPEN; };
+hidspecial SID_EXPLORERCONTENT_OPEN_FOLDER { HelpId = SID_EXPLORERCONTENT_OPEN_FOLDER; };
+hidspecial SID_EXPLORERCONTENT_OPEN_TEMPLATE { HelpId = SID_EXPLORERCONTENT_OPEN_TEMPLATE; };
+hidspecial SID_EXPLORERCONTENT_OPEN_DOCUMENT { HelpId = SID_EXPLORERCONTENT_OPEN_DOCUMENT; };
+hidspecial SID_EXPLORERCONTENT_OPEN_OBJECT { HelpId = SID_EXPLORERCONTENT_OPEN_OBJECT; };
+hidspecial HID_HELPAGENT_TIP_BOX { HelpId = HID_HELPAGENT_TIP_BOX; };
+hidspecial SID_EXPLORER_SEARCH_DLG { HelpId = SID_EXPLORER_SEARCH_DLG; };
+hidspecial SID_TRASH_RECOVER { HelpId = SID_TRASH_RECOVER; };
+hidspecial SID_TRASH_AUTOEMPTY { HelpId = SID_TRASH_AUTOEMPTY; };
+hidspecial SID_TRASH_EMPTY { HelpId = SID_TRASH_EMPTY; };
+hidspecial SID_EXPLORERCONTENT_NEW { HelpId = SID_EXPLORERCONTENT_NEW; };
+hidspecial SID_EXPLORERCONTENT_DESTROY { HelpId = SID_EXPLORERCONTENT_DESTROY; };
+hidspecial SID_EXPLORERCONTENT_RENAME { HelpId = SID_EXPLORERCONTENT_RENAME; };
+hidspecial SID_EXPLORERCONTENT_COPY { HelpId = SID_EXPLORERCONTENT_COPY; };
+hidspecial SID_EXPLORERCONTENT_PASTE { HelpId = SID_EXPLORERCONTENT_PASTE; };
+hidspecial SID_EXPLORERCONTENT_CREATELINK { HelpId = SID_EXPLORERCONTENT_CREATELINK; };
+hidspecial SID_EXPLORERCONTENT_MAKEROOT { HelpId = SID_EXPLORERCONTENT_MAKEROOT; };
+hidspecial SID_EXPLORERCONTENT_DEFAULTTEMPLATE { HelpId = SID_EXPLORERCONTENT_DEFAULTTEMPLATE; };
+hidspecial SID_PROPERTIES { HelpId = SID_PROPERTIES; };
+hidspecial SID_EXPLORER_BOOKMARKDIR { HelpId = SID_EXPLORER_BOOKMARKDIR; };
+hidspecial SID_EXPLORER_SEARCHORIG { HelpId = SID_EXPLORER_SEARCHORIG; };
+hidspecial HID_TEMPLDLG_TOOLBOX_LEFT { HelpId = HID_TEMPLDLG_TOOLBOX_LEFT;};
+hidspecial HID_EXPLORER_SRCH_COUNT { HelpId = HID_EXPLORER_SRCH_COUNT;};
+hidspecial SID_EXPLORER_PASTE_ASLINK { HelpId = SID_EXPLORER_PASTE_ASLINK;};
+hidspecial HID_INTERFACE_SFXPLUGINVIEW { HelpID = HID_INTERFACE_SFXPLUGINVIEW; };
+hidspecial HID_TABDLG_RESET_BTN { HelpID = HID_TABDLG_RESET_BTN; };
+hidspecial HID_TABDLG_STANDARD_BTN { HelpID = HID_TABDLG_STANDARD_BTN; };
+hidspecial SID_EXPLORER_RESETURL { HelpID = SID_EXPLORER_RESETURL; };
+hidspecial SID_ORIG_PROPERTIES { HelpID = SID_ORIG_PROPERTIES; };
+hidspecial HID_CONFIG_EVENT_OFFICE_BASED { HelpID = HID_CONFIG_EVENT_OFFICE_BASED; };
+hidspecial HID_CONFIG_EVENT_DOCUMENT_BASED { HelpID = HID_CONFIG_EVENT_DOCUMENT_BASED; };
+hidspecial HID_EXPLORER_SRCH_LATEST_COUNT { HelpID = HID_EXPLORER_SRCH_LATEST_COUNT; };
+hidspecial HID_EXPLORERMENU_ARRANGEICONS { HelpID = HID_EXPLORERMENU_ARRANGEICONS; };
+hidspecial HID_EXPLORERMENU_STDTEMPLATE { HelpID = HID_EXPLORERMENU_STDTEMPLATE; };
+hidspecial HID_EXPLORER_DOCVIEW_ICON { HelpID = HID_EXPLORER_DOCVIEW_ICON; };
+hidspecial HID_EXPLORER_DOCVIEW_DETAILS { HelpID = HID_EXPLORER_DOCVIEW_DETAILS; };
+hidspecial HID_CHAOSDOC_WIN { HelpID = HID_CHAOSDOC_WIN; };
+hidspecial HID_CHAOSDOC_WIN_HEADER { HelpID = HID_CHAOSDOC_WIN_HEADER; };
+hidspecial HID_CHAOSDOC_WIN_PARTS { HelpID = HID_CHAOSDOC_WIN_PARTS; };
+hidspecial HID_CHAOSDOC_WIN_BODY { HelpID = HID_CHAOSDOC_WIN_BODY; };
+hidspecial HID_CNT_PAGE_PRECV_1 { HelpID = HID_CNT_PAGE_PRECV_1; };
+hidspecial HID_CNT_PAGE_PRECV_2 { HelpID = HID_CNT_PAGE_PRECV_2; };
+hidspecial HID_CNT_PAGE_PRECV_3 { HelpID = HID_CNT_PAGE_PRECV_3; };
+hidspecial HID_CNT_PAGE_PRECV_4 { HelpID = HID_CNT_PAGE_PRECV_4; };
+hidspecial HID_CNT_PAGE_PRECV_5 { HelpID = HID_CNT_PAGE_PRECV_5; };
+hidspecial HID_CNT_PAGE_PRECV_6 { HelpID = HID_CNT_PAGE_PRECV_6; };
+hidspecial HID_CNT_PAGE_PRECV_7 { HelpID = HID_CNT_PAGE_PRECV_7; };
+hidspecial HID_CNT_PAGE_PRECV_8 { HelpID = HID_CNT_PAGE_PRECV_8; };
+hidspecial HID_CNT_PAGE_PRECV_9 { HelpID = HID_CNT_PAGE_PRECV_9; };
+hidspecial HID_CNT_PAGE_PSEND_1 { HelpID = HID_CNT_PAGE_PSEND_1; };
+hidspecial HID_CNT_PAGE_PSEND_2 { HelpID = HID_CNT_PAGE_PSEND_2; };
+hidspecial HID_CNT_PAGE_PSEND_3 { HelpID = HID_CNT_PAGE_PSEND_3; };
+hidspecial HID_CNT_PAGE_PSEND_4 { HelpID = HID_CNT_PAGE_PSEND_4; };
+hidspecial HID_CNT_PAGE_PSEND_5 { HelpID = HID_CNT_PAGE_PSEND_5; };
+hidspecial HID_CNT_PAGE_PSEND_6 { HelpID = HID_CNT_PAGE_PSEND_6; };
+hidspecial HID_CNT_PAGE_PSEND_7 { HelpID = HID_CNT_PAGE_PSEND_7; };
+hidspecial HID_CNT_PAGE_PSEND_8 { HelpID = HID_CNT_PAGE_PSEND_8; };
+hidspecial HID_CNT_PAGE_PSEND_9 { HelpID = HID_CNT_PAGE_PSEND_9; };
+hidspecial SID_CHAOSDOC_LAYOUT1 { HelpID = SID_CHAOSDOC_LAYOUT1; };
+hidspecial SID_CHAOSDOC_LAYOUT2 { HelpID = SID_CHAOSDOC_LAYOUT2; };
+hidspecial SID_CHAOSDOC_LAYOUT3 { HelpID = SID_CHAOSDOC_LAYOUT3; };
+hidspecial SID_CHAOSDOC_LAYOUT4 { HelpID = SID_CHAOSDOC_LAYOUT4; };
+hidspecial HID_BRWBOX_HEADERBAR { HelpID = HID_BRWBOX_HEADERBAR; };
+hidspecial HID_TASKBAR { HelpID = HID_TASKBAR; };
+hidspecial HID_TASKBUTTONBAR { HelpID = HID_TASKBUTTONBAR; };
+hidspecial HID_TASKTOOLBAR { HelpID = HID_TASKTOOLBAR; };
+hidspecial HID_CHAOS_NEW_IMAP_BOX { HelpID = HID_CHAOS_NEW_IMAP_BOX; };
+hidspecial HID_CHAOS_NEW_IMAP_MSG { HelpID = HID_CHAOS_NEW_IMAP_MSG; };
+hidspecial HID_CHAOS_NEW_IMAP_FLD { HelpID = HID_CHAOS_NEW_IMAP_FLD; };
+hidspecial HID_CHAOS_NEW_NEWS_BOX { HelpID = HID_CHAOS_NEW_NEWS_BOX; };
+hidspecial HID_CHAOS_NEW_NEWS_MSG { HelpID = HID_CHAOS_NEW_NEWS_MSG; };
+hidspecial HID_CHAOS_NEW_IMAP_BOX { HelpID = HID_CHAOS_NEW_IMAP_BOX; };
+hidspecial HID_CHAOS_NEW_FSYS_FLD { HelpID = HID_CHAOS_NEW_FSYS_FLD; };
+hidspecial HID_CHAOS_NEW_FSYS_LNK { HelpID = HID_CHAOS_NEW_FSYS_LNK; };
+hidspecial HID_CHAOS_NEW_FTP_BOX { HelpID = HID_CHAOS_NEW_FTP_BOX; };
+hidspecial HID_CHAOS_NEW_FTP_FLD { HelpID = HID_CHAOS_NEW_FTP_FLD; };
+hidspecial HID_CHAOS_NEW_OUT_BOX { HelpID = HID_CHAOS_NEW_OUT_BOX; };
+hidspecial HID_CHAOS_NEW_OUT_MSG { HelpID = HID_CHAOS_NEW_OUT_MSG; };
+hidspecial HID_CHAOS_NEW_POP3_BOX { HelpID = HID_CHAOS_NEW_POP3_BOX; };
+hidspecial HID_CHAOS_NEW_POP3_MSG { HelpID = HID_CHAOS_NEW_POP3_MSG; };
+hidspecial HID_CHAOS_NEW_SEARCH { HelpID = HID_CHAOS_NEW_SEARCH; };
+hidspecial HID_CHAOS_NEW_VIM_BOX { HelpID = HID_CHAOS_NEW_VIM_BOX; };
+hidspecial HID_CHAOS_NEW_VIM_MSG { HelpID = HID_CHAOS_NEW_VIM_MSG; };
+hidspecial HID_CHAOS_NEW_SUBSCR_BOX { HelpID = HID_CHAOS_NEW_SUBSCR_BOX; };
+hidspecial HID_CHAOS_NEW_BOOKMARK { HelpID = HID_CHAOS_NEW_BOOKMARK; };
+hidspecial HID_CHAOS_NEW_PUB_BOX { HelpID = HID_CHAOS_NEW_PUB_BOX; };
+hidspecial HID_UUI_END { HelpID = HID_UUI_END; }; // aka HID_CHAOS_NEW_DATABASE
+hidspecial SID_EXPLORER_SHOWEXTENSION { HelpID = SID_EXPLORER_SHOWEXTENSION; };
+hidspecial SID_EXPLORER_MAIL_HEADER { HelpID = SID_EXPLORER_MAIL_HEADER; };
+hidspecial SID_EXPLORER_MAIL_BODY { HelpID = SID_EXPLORER_MAIL_BODY; };
+hidspecial HID_CNT_DLG_SEARCH_BT_SHOW { HelpID = HID_CNT_DLG_SEARCH_BT_SHOW; };
+hidspecial HID_CNT_DLG_SEARCH_BT_UPDATE { HelpID = HID_CNT_DLG_SEARCH_BT_UPDATE; };
+hidspecial HID_CNT_DLG_SEARCH_BT_SYNCHRONIZE { HelpID = HID_CNT_DLG_SEARCH_BT_SYNCHRONIZE; };
+hidspecial HID_CNT_DLG_SEARCH_BT_STOP { HelpID = HID_CNT_DLG_SEARCH_BT_STOP; };
+hidspecial HID_CNT_PAGE_HEADER { HelpID = HID_CNT_PAGE_HEADER; };
+hidspecial HID_CNT_PAGE_DESCRIPTION { HelpID = HID_CNT_PAGE_DESCRIPTION; };
+hidspecial HID_CNT_LB_HEADER { HelpID = HID_CNT_LB_HEADER; };
+hidspecial HID_CNT_LB_DESCRIPTION { HelpID = HID_CNT_LB_DESCRIPTION; };
+hidspecial SID_GROUPVIEW { HelpID = SID_GROUPVIEW; };
+hidspecial HID_GROUPVIEW_CONTENT_BIG { HelpID = HID_GROUPVIEW_CONTENT_BIG; };
+hidspecial HID_GROUPVIEW_CONTENT_SMALL { HelpID = HID_GROUPVIEW_CONTENT_SMALL; };
+hidspecial HID_GROUPVIEW_CONTENT_TREE { HelpID = HID_GROUPVIEW_CONTENT_TREE; };
+hidspecial HID_FILEDLG_AUTOCOMPLETEBOX { HelpID = HID_FILEDLG_AUTOCOMPLETEBOX; };
+hidspecial HID_FILEDLG_SAVE_BTN { HelpID = HID_FILEDLG_SAVE_BTN; };
+hidspecial HID_FILEDLG_SAVE_FILENAME { HelpID = HID_FILEDLG_SAVE_FILENAME; };
+hidspecial HID_FILEDLG_SAVE_FILETYPE { HelpID = HID_FILEDLG_SAVE_FILETYPE; };
+hidspecial HID_FILEDLG_INSERT_BTN { HelpID = HID_FILEDLG_INSERT_BTN; };
+hidspecial HID_FILEDLG_PATH_BTN { HelpID = HID_FILEDLG_PATH_BTN; };
+hidspecial HID_FILEDLG_PATH_FILENAME { HelpID = HID_FILEDLG_PATH_FILENAME; };
+hidspecial HID_FILEDLG_FOLDER_BTN { HelpID = HID_FILEDLG_FOLDER_BTN; };
+hidspecial HID_FILEDLG_FOLDER_FILENAME { HelpID = HID_FILEDLG_FOLDER_FILENAME; };
+hidspecial HID_FILEDLG_SRCHFOLDER_BTN { HelpID = HID_FILEDLG_SRCHFOLDER_BTN; };
+hidspecial HID_CNT_PAGE_WEBVIEW { HelpID = HID_CNT_PAGE_WEBVIEW; };
+hidspecial HID_FILEDLG_EDIT_FAVORITES_LISTBOX { HelpID = HID_FILEDLG_EDIT_FAVORITES_LISTBOX; };
+hidspecial HID_FILEDLG_EDIT_FAVORITES_HEADERBAR { HelpID = HID_FILEDLG_EDIT_FAVORITES_HEADERBAR; };
+hidspecial HID_BROWSERCONTROL { HelpID = HID_BROWSERCONTROL; };
+hidspecial HID_STATUSBAR { HelpID = HID_STATUSBAR; };
+hidspecial HID_TASKSTATUSBAR { HelpID = HID_TASKSTATUSBAR; };
+hidspecial HID_CNT_PAGE_HEADER_TABBAR { HelpID = HID_CNT_PAGE_HEADER_TABBAR; };
+hidspecial HID_CNT_PAGE_SUBSCR_TABBAR { HelpID = HID_CNT_PAGE_SUBSCR_TABBAR; };
+hidspecial HID_STATUSINDICATOR_TEXT { HelpID = HID_STATUSINDICATOR_TEXT; };
+hidspecial HID_STATUSINDICATOR_PROGRESS { HelpID = HID_STATUSINDICATOR_PROGRESS );
+hidspecial HID_CNT_VALUE_ADDED_NONE { HelpID = HID_CNT_VALUE_ADDED_NONE );
+hidspecial HID_CNT_VALUE_ADDED_DOCINFO { HelpID = HID_CNT_VALUE_ADDED_DOCINFO );
+hidspecial HID_CNT_VALUE_ADDED_FULL { HelpID = HID_CNT_VALUE_ADDED_FULL );
+hidspecial HID_CNT_MESSAGE_STOREMODE_REMOTE { HelpID = HID_CNT_MESSAGE_STOREMODE_REMOTE );
+hidspecial HID_CNT_MESSAGE_STOREMODE_LOCAL { HelpID = HID_CNT_MESSAGE_STOREMODE_LOCAL );
+hidspecial HID_CNT_VIEW_ALL_ARTICLES { HelpID = HID_CNT_VIEW_ALL_ARTICLES );
+hidspecial HID_CNT_VIEW_UNREAD_ARTICLES { HelpID = HID_CNT_VIEW_UNREAD_ARTICLES );
+hidspecial HID_CNT_VIEW_READ_ARTICLES { HelpID = HID_CNT_VIEW_READ_ARTICLES );
+hidspecial HID_CNT_VIEW_MARKED_ARTICLES { HelpID = HID_CNT_VIEW_MARKED_ARTICLES );
+hidspecial HID_CNT_VIEW_MARKED_AND_UNREAD_ARTICLES { HelpID = HID_CNT_VIEW_MARKED_AND_UNREAD_ARTICLES );
+hidspecial HID_CNT_VIEW_ALL_FOLDERS { HelpID = HID_CNT_VIEW_ALL_FOLDERS );
+hidspecial HID_CNT_VIEW_SUBSCRIBED_FOLDERS { HelpID = HID_CNT_VIEW_SUBSCRIBED_FOLDERS );
+hidspecial HID_CNT_VIEW_ACTIVE_FOLDERS { HelpID = HID_CNT_VIEW_ACTIVE_FOLDERS );
+hidspecial HID_CNT_SENT_VIEW_ALL_ARTICLES { HelpID = HID_CNT_SENT_VIEW_ALL_ARTICLES );
+hidspecial HID_CNT_SENT_VIEW_SENT_ARTICLES { HelpID = HID_CNT_SENT_VIEW_SENT_ARTICLES );
+hidspecial HID_CNT_SENT_VIEW_UNSENT_ARTICLES { HelpID = HID_CNT_SENT_VIEW_UNSENT_ARTICLES );
+hidspecial HID_CNT_SENT_VIEW_MARKED_ARTICLES { HelpID = HID_CNT_SENT_VIEW_MARKED_ARTICLES );
+
diff --git a/sfx2/util/make_tco.btm b/sfx2/util/make_tco.btm
new file mode 100644
index 000000000000..d25dad24a692
--- /dev/null
+++ b/sfx2/util/make_tco.btm
@@ -0,0 +1 @@
+nmake product=full TCV_CORE=t
diff --git a/sfx2/util/makefile.mk b/sfx2/util/makefile.mk
new file mode 100644
index 000000000000..b692fa43e52d
--- /dev/null
+++ b/sfx2/util/makefile.mk
@@ -0,0 +1,482 @@
+#*************************************************************************
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.1.1.1 $
+#
+# last change: $Author: hr $ $Date: 2000-09-18 16:52:37 $
+#
+# The Contents of this file are made available subject to the terms of
+# either of the following licenses
+#
+# - GNU Lesser General Public License Version 2.1
+# - Sun Industry Standards Source License Version 1.1
+#
+# Sun Microsystems Inc., October, 2000
+#
+# GNU Lesser General Public License Version 2.1
+# =============================================
+# Copyright 2000 by Sun Microsystems, Inc.
+# 901 San Antonio Road, Palo Alto, CA 94303, USA
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License version 2.1, as published by the Free Software Foundation.
+#
+# This library 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 for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+#
+# Sun Industry Standards Source License Version 1.1
+# =================================================
+# The contents of this file are subject to the Sun Industry Standards
+# Source License Version 1.1 (the "License"); You may not use this file
+# except in compliance with the License. You may obtain a copy of the
+# License at http://www.openoffice.org/license.html.
+#
+# Software provided under this License is provided on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+# See the License for the specific provisions governing your rights and
+# obligations concerning the Software.
+#
+# The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+#
+# Copyright: 2000 by Sun Microsystems, Inc.
+#
+# All Rights Reserved.
+#
+# Contributor(s): _______________________________________
+#
+#
+#
+#*************************************************************************
+
+PRJ=..
+
+# ---- LDump2 laeuft auf tlx Rechner nicht
+USE_LDUMP2=TRUE
+
+ENABLE_EXCEPTIONS=TRUE
+PRJNAME=sfx2
+TARGET=sfx
+.INCLUDE : $(PRJ)$/util$/makefile.pmk
+AUTOSEG=true
+#sfx.hid generieren
+.IF "$(header)" == ""
+GEN_HID=TRUE
+.ENDIF
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : svpre.mk
+.INCLUDE : settings.mk
+.INCLUDE : sv.mk
+
+# --- Allgemein ----------------------------------------------------
+
+.IF "$(COM)"=="ICC"
+LINKFLAGS+=/SEGMENTS:512 /PACKD:32768
+.ENDIF
+
+.IF "$(header)" == ""
+CXXFILES = $(PROJECTPCHSOURCE).cxx
+.ENDIF
+
+
+.IF "$(header)" == ""
+
+LIB1TARGET= $(SLB)$/$(TARGET).lib
+LIB1FILES= $(SLB)$/appl.lib \
+ $(SLB)$/explorer.lib \
+ $(SLB)$/doc.lib \
+ $(SLB)$/view.lib \
+ $(SLB)$/control.lib \
+ $(SLB)$/notify.lib \
+ $(SLB)$/menu.lib \
+ $(SLB)$/inet.lib \
+ $(SLB)$/accel.lib \
+ $(SLB)$/toolbox.lib \
+ $(SLB)$/statbar.lib \
+ $(SLB)$/dialog.lib \
+ $(SLB)$/bastyp.lib \
+ $(SLB)$/config.lib
+
+HELPIDFILES=\
+ ..\inc\sfxsids.hrc \
+ ..\source\inc\helpid.hrc
+
+.IF "$(GUI)"!="UNX"
+LIB2TARGET= $(LB)$/$(TARGET).lib
+LIB2FILES= $(LB)$/appl.lib \
+ $(LB)$/isfx.lib
+.ENDIF
+
+SHL1TARGET= sfx$(UPD)$(DLLPOSTFIX)
+SHL1IMPLIB= isfx
+
+# $(ONELIB) \
+# $(UNOLIB) \
+
+
+SHL1STDLIBS+=\
+ $(AUTOMATIONLIB) \
+ $(BASICLIB) \
+ $(VOSLIB) \
+ $(SALLIB) \
+ $(CHANELLIB) \
+ $(SO2LIB) \
+ $(INETLIBSH) \
+ $(SVTOOLLIB) \
+ $(SVLLIB) \
+ $(SVLIB) \
+ $(TOOLSLIB) \
+ $(HELPLIB) \
+ $(SVMEMLIB) \
+ $(GOODIESLIB) \
+ $(TKLIB) \
+ $(SOTLIB) \
+ $(SETUPLIB) \
+ $(RTLLIB) \
+ $(CPPULIB) \
+ $(CPPUHELPERLIB) \
+ $(UNOTOOLSLIB) \
+ $(UCBHELPERLIB)
+
+.IF "$(TF_UCB)" == ""
+SHL1STDLIBS+=\
+ $(CHAOSLIB)
+.ELSE
+SHL1STDLIBS+=\
+ $(CPPULIB) \
+ $(CPPUHELPERLIB)
+.ENDIF
+
+.IF "$(SOLAR_JAVA)" != ""
+SHL1STDLIBS+=\
+ $(SJLIB)
+.ENDIF
+
+.IF "$(GUI)"=="WNT"
+SHL1STDLIBS+=\
+ advapi32.lib
+.ENDIF
+
+
+.IF "$(GUI)"!="MAC"
+SHL1DEPN += $(shell $(FIND) $(SLO) -type f -name "*.OBJ" -print)
+.ENDIF
+
+.IF "$(SOLAR_JAVA)" != ""
+SHL1DEPN+= \
+ $(L)$/sj.lib
+.ENDIF
+
+SHL1LIBS= $(LIB1TARGET)
+
+SHL1OBJS= $(SLO)$/sfxdll.obj
+
+SHL1DEF= $(MISC)$/$(SHL1TARGET).def
+
+DEF1NAME =$(SHL1TARGET)
+DEF1DEPN =$(MISC)$/$(SHL1TARGET).flt \
+ $(HXX1FILES) \
+ $(HXX2FILES) \
+ $(HXX3FILES) \
+ $(HXX4FILES) \
+ $(HXX5FILES) \
+ $(HXX6FILES) \
+ $(HXX7FILES) \
+ $(HXX8FILES) \
+ $(HXX9FILES) \
+ $(HXX10FILES)
+DEFLIB1NAME =sfx
+DEF1DES =Sfx
+
+.IF "$(GUI)"=="WNT"
+DEF1EXPORT6 = component_writeInfo
+DEF1EXPORT7 = component_getFactory
+.ELSE
+.IF "$(GUI)"=="OS2"
+.IF "$(COM)"=="ICC"
+DEF1EXPORT6 = component_writeInfo
+DEF1EXPORT7 = component_getFactory
+.ELSE
+.IF "$(COM)"=="WTC"
+DEF1EXPORT6 = component_writeInfo
+DEF1EXPORT7 = component_getFactory
+.ELSE
+DEF1EXPORT6 = _component_writeInfo
+DEF1EXPORT7 = _component_getFactory
+.ENDIF
+.ENDIF
+.ENDIF
+.ENDIF
+
+# --- Targets ------------------------------------------------------
+
+.IF "$(depend)" == ""
+
+ALL:\
+ $(LIB1TARGET) \
+ $(MISC)$/linkinc.ls \
+ $(SRS)$/hidother.hid \
+ ALLTAR
+
+# --- SFX-Filter-Datei ---
+
+$(MISC)$/$(SHL1TARGET).flt:
+ @echo ------------------------------
+ @echo Making: $@
+ @echo _Impl > $@
+ @echo IMP >> $@
+ @echo Dbg >> $@
+ @echo DLL >> $@
+ @echo AVL_Tree >> $@
+ @echo BinaryGlobalLoader >> $@
+ @echo BinaryResLoader >> $@
+ @echo BitSet >> $@
+ @echo CntBoxOpenJob >> $@
+ @echo CntContentPropertiesTabPage >> $@
+ @echo CntCoreDataComplex_Impl >> $@
+ @echo CntCoreDataSimple_Impl >> $@
+ @echo CntDirectory >> $@
+ @echo CntDirEntry >> $@
+ @echo CntDirtyItemSet >> $@
+ @echo CntExplorerFileContent >> $@
+ @echo CntFTPServerTabPage >> $@
+ @echo CntGeneralTabPage >> $@
+ @echo CntHash >> $@
+ @echo CntIMAPFolderInfoItem >> $@
+ @echo CntIMAPFolderNode >> $@
+ @echo CntIMAPRootNode >> $@
+ @echo CntInterface >> $@
+ @echo CntItemPool >> $@
+ @echo CntLazyDelete >> $@
+ @echo CntLazyWriter >> $@
+ @echo CntMessageBodyItemImp >> $@
+ @echo CntMessageNode >> $@
+ @echo CntNewMessagesControl >> $@
+ @echo CntNewsBoxGetListJob >> $@
+ @echo CntNewsBoxNode >> $@
+ @echo CntNewsBoxNodeImp >> $@
+ @echo CntNewsBoxOpenJob >> $@
+ @echo CntNewsBoxPutListJob >> $@
+ @echo CntNewsGroupNode >> $@
+ @echo CntNewsGroupOpenJob >> $@
+ @echo CntNewsGroupMarkJob >> $@
+ @echo CntNewsMsgOpenJob >> $@
+ @echo CntCrossReferenceItem >> $@
+ @echo CntNode >> $@
+ @echo CntNodeFactory >> $@
+ @echo CntNodeHint >> $@
+ @echo CntNodeJob >> $@
+ @echo CntOutMsgExternalStateItem >> $@
+ @echo CntOutMsgInternalStateItem >> $@
+ @echo CntOutTrayNode >> $@
+ @echo CntPopupMenu >> $@
+ @echo CntProgress >> $@
+ @echo CntPOP3Node >> $@
+ @echo CntPOP3Box >> $@
+ @echo CntPOP3Msg >> $@
+ @echo CntPropertyDialog >> $@
+ @echo CntPropertyTabPage >> $@
+ @echo CntRangesItem >> $@
+ @echo CntRecipientInfo >> $@
+ @echo CntRecipientListItem >> $@
+ @echo CntRecipientStateTabPage >> $@
+ @echo CntRootNodeMgr >> $@
+ @echo CntRootStorageNode >> $@
+ @echo CntRulesTabPage >> $@
+ @echo CntSeenStatusItem >> $@
+ @echo CntServerSettingsTabPage >> $@
+ @echo CntSortingInfoArr >> $@
+ @echo CntSortingItem >> $@
+ @echo CntSubscribeTabPage >> $@
+ @echo CntThreadData >> $@
+ @echo CntThreadingInfoArr >> $@
+ @echo CntThreadingItem >> $@
+ @echo CntUI >> $@
+ @echo CntUpdateHint >> $@
+ @echo CntUpdateInitTimer >> $@
+ @echo CntUShortListItem >> $@
+ @echo CntViewDescriptionItem >> $@
+ @echo DocManager >> $@
+ @echo FileHeader >> $@
+ @echo IdPool >> $@
+ @echo ImportParser_Impl >> $@
+ @echo ItemListData >> $@
+ @echo MapEntry >> $@
+ @echo NotesLibrary >> $@
+ @echo QueryFolderNameDialog >> $@
+ @echo SbxArrayRef >> $@
+ @echo SbxObjectRef >> $@
+ @echo SfxAccelerator >> $@
+ @echo SfxConfigDialog >> $@
+ @echo SfxConfigManager >> $@
+ @echo SfxContextMenuData >> $@
+ @echo SfxCustomizeToolBox >> $@
+ @echo SfxDirEntryHint >> $@
+ @echo SfxDocumentsCollection >> $@
+ @echo SfxDocumentTemplateDlg >> $@
+ @echo SfxEnumMenu >> $@
+ @echo SfxEventConfigPage >> $@
+ @echo SfxExecuteItem >> $@
+ @echo SfxExplorerBookmark >> $@
+ @echo SfxExplorerBrowserConfig >> $@
+ @echo SfxExplorerContentHint >> $@
+ @echo SfxExplorerFolderSearchCriteriaTabPage >> $@
+ @echo SfxExplorerFolderSearchDlg >> $@
+ @echo SfxExplorerFolderSearchPlaceTabPage >> $@
+ @echo SfxExplorerFolderSearchWrapper >> $@
+ @echo SfxExplorerIterator >> $@
+ @echo SfxExplorerMenuView >> $@
+ @echo SfxExplorerObjectShell >> $@
+ @echo SfxExplorerSearchFolder >> $@
+ @echo SfxExtDirEntryHint >> $@
+ @echo SfxFilterDialog >> $@
+ @echo SfxFilterFunc >> $@
+ @echo SfxFrameProperties >> $@
+ @echo SfxGenericObjectShell >> $@
+ @echo SfxGenericViewShell >> $@
+ @echo SfxHelpTextCache >> $@
+ @echo SfxHelpViewShell >> $@
+ @echo SfxIPCServer >> $@
+ @echo SfxIPCService >> $@
+ @echo SfxJobQueue >> $@
+ @echo SfxMailBroadcaster >> $@
+ @echo SfxMenuBarManager >> $@
+ @echo SfxMenuManager >> $@
+ @echo SfxMenuConfig >> $@
+ @echo SfxMessageServer >> $@
+ @echo SfxNewHdl >> $@
+ @echo SfxObjectBarConfigPage >> $@
+ @echo SfxObjectBarListBox >> $@
+ @echo SfxObjectList >> $@
+ @echo SfxObjectVerbsControl >> $@
+ @echo SfxOfflineURLManager >> $@
+ @echo SfxPlugInFrame >> $@
+ @echo SfxPlugInObjectShell >> $@
+ @echo SfxPlugInViewShell >> $@
+ @echo SfxPopupMenuManager >> $@
+ @echo SfxResId >> $@
+ @echo SfxSlotInfo >> $@
+ @echo SfxSplitWindow >> $@
+ @echo SfxSrchDlgBrowseBox >> $@
+ @echo SfxStateCache >> $@
+ @echo SfxStatusBarConfigListBox >> $@
+ @echo SfxStatusBarConfigPage >> $@
+ @echo SfxStringHint >> $@
+ @echo SfxTaskBar >> $@
+ @echo SfxTaskBarWrapper >> $@
+ @echo SfxTaskButtonBar >> $@
+ @echo SfxTaskToolBox >> $@
+ @echo SfxTemplateControllerItem >> $@
+ @echo SfxTemplateDir >> $@
+ @echo SfxTemplateDirEntry >> $@
+ @echo SfxTemplateOrganizeDlg >> $@
+ @echo SfxToolbox >> $@
+ @echo SfxToolBoxConfig >> $@
+ @echo SfxToolboxCustomizer >> $@
+ @echo SfxToolboxCustomWindow >> $@
+ @echo SfxToolBoxOptions >> $@
+ @echo SfxURLFrame >> $@
+ @echo SfxVirtualMenu >> $@
+ @echo SfxWindowsCollection >> $@
+ @echo SfxWorkWindow >> $@
+ @echo SortedULONGs_SAR >> $@
+ @echo solver >> $@
+ @echo _FileListEntry >> $@
+ @echo InitHelp >> $@
+ @echo InitTpl >> $@
+.IF "$(OLD_CHAOS)" != ""
+.IF "$(VCL)" != ""
+ @echo CntExtendedHash >> $@
+ @echo CntStore >> $@
+ @echo CntFldr >> $@
+.ENDIF
+.ENDIF
+.IF "$(GUI)"=="WNT" || "$(GUI)"=="WIN"
+ @echo WEP>>$@
+.ENDIF
+ @echo CntSearchLocationsTabPage>>$@
+ @echo CntSearchDialog>>$@
+.IF "$(COM)"=="MSC"
+ @echo ??_5>>$@
+ @echo ??_7>>$@
+ @echo ??_8>>$@
+ @echo ??_9>>$@
+ @echo ??_C>>$@
+ @echo ??_E>>$@
+ @echo ??_F>>$@
+ @echo ??_G>>$@
+ @echo ??_H>>$@
+ @echo ??_I>>$@
+ @echo ?CreateImpl@>>$@
+ @echo ?GetGlobalClassName@>>$@
+ @echo ?GetSvFactory@>>$@
+ @echo ?LinkStub>>$@
+ @echo ?nClassId@>>$@
+ @echo ?RegisterInterface@>>$@
+ @echo ::UsrException>>$@
+ @echo ::IllegalArg>>$@
+ @echo AVIllegalArg>>$@
+ @echo ::Exception>>$@
+ @echo NoSuchElementException>>$@
+ @echo __CT>>$@
+.ENDIF
+.IF "$(GUI)"=="WNT"
+ @echo ?CreateType@>>$@
+.ENDIF
+.IF "$(COM)"=="ICC"
+ @echo __dt__14SfxApplicationFv>>$@
+ @echo __dt__14MDIApplicationFv>>$@
+ @echo __dt__11ApplicationFv>>$@
+ @echo __dt__17PlugInApplicationFv>>$@
+ @echo __ct__4ORefXT7OSpeech_FP7OSpeech>>$@
+ @echo __ct__4ORefXT7OSpeech_FRC4ORefXT7OSpeech_>>$@
+ @echo m_pLoader__>>$@
+.ENDIF
+
+SFXSRSLIST=\
+ $(SRS)$/accel.srs \
+ $(SRS)$/appl.srs \
+ $(SRS)$/doc.srs \
+ $(SRS)$/view.srs \
+ $(SRS)$/config.srs \
+ $(SRS)$/menu.srs \
+ $(SRS)$/statbar.srs \
+ $(SRS)$/toolbox.srs \
+ $(SRS)$/dialog.srs \
+ $(SRS)$/bastyp.srs \
+ $(SRS)$/explorer.srs
+
+.IF "$(GUI)"=="WIN"
+RESLIBSPLIT1NAME=$(TARGET)
+RESLIBSPLIT1SRSFILES=$(SFXSRSLIST)
+.ELSE
+RESLIB1NAME=$(TARGET)
+RESLIB1SRSFILES=$(SFXSRSLIST)
+.ENDIF
+
+$(SRS)$/hidother.hid: hidother.src
+.IF "$(GUI)$(CPU)"=="WNTI"
+ @+echo no hids
+ @+-mhids hidother.src ..\$(INPATH)$/srs sfx2 hidother
+.ELSE
+ @echo nix
+.ENDIF
+
+.ENDIF
+.ENDIF
+
+.INCLUDE : target.mk
+
diff --git a/sfx2/util/makefile.pmk b/sfx2/util/makefile.pmk
new file mode 100644
index 000000000000..2a7863918b3d
--- /dev/null
+++ b/sfx2/util/makefile.pmk
@@ -0,0 +1,65 @@
+#*************************************************************************
+#
+# $RCSfile: makefile.pmk,v $
+#
+# $Revision: 1.1.1.1 $
+#
+# last change: $Author: hr $ $Date: 2000-09-18 16:52:37 $
+#
+# The Contents of this file are made available subject to the terms of
+# either of the following licenses
+#
+# - GNU Lesser General Public License Version 2.1
+# - Sun Industry Standards Source License Version 1.1
+#
+# Sun Microsystems Inc., October, 2000
+#
+# GNU Lesser General Public License Version 2.1
+# =============================================
+# Copyright 2000 by Sun Microsystems, Inc.
+# 901 San Antonio Road, Palo Alto, CA 94303, USA
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License version 2.1, as published by the Free Software Foundation.
+#
+# This library 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 for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+#
+# Sun Industry Standards Source License Version 1.1
+# =================================================
+# The contents of this file are subject to the Sun Industry Standards
+# Source License Version 1.1 (the "License"); You may not use this file
+# except in compliance with the License. You may obtain a copy of the
+# License at http://www.openoffice.org/license.html.
+#
+# Software provided under this License is provided on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+# See the License for the specific provisions governing your rights and
+# obligations concerning the Software.
+#
+# The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+#
+# Copyright: 2000 by Sun Microsystems, Inc.
+#
+# All Rights Reserved.
+#
+# Contributor(s): _______________________________________
+#
+#
+#
+#*************************************************************************
+PROJECTPCH4DLL=TRUE
+PROJECTPCH=sfxpch
+PROJECTPCHSOURCE=$(PRJ)$/util$/sfxpch
+PDBTARGET=sfx2
diff --git a/sfx2/util/mkdemo.pl b/sfx2/util/mkdemo.pl
new file mode 100644
index 000000000000..fd4a2d9cecbe
--- /dev/null
+++ b/sfx2/util/mkdemo.pl
@@ -0,0 +1,7 @@
+binmode stdin;
+binmode stdout;
+while(<>)
+{
+ s/t(lxsayshere)/\x0\1/;
+ print $_;
+}
diff --git a/sfx2/win/res/expdesk.ico b/sfx2/win/res/expdesk.ico
new file mode 100644
index 000000000000..06fb6e712e89
--- /dev/null
+++ b/sfx2/win/res/expdesk.ico
Binary files differ
diff --git a/sfx2/win/res/expexp.ico b/sfx2/win/res/expexp.ico
new file mode 100644
index 000000000000..e0643765f605
--- /dev/null
+++ b/sfx2/win/res/expexp.ico
Binary files differ
diff --git a/sfx2/win/res/expfld.ico b/sfx2/win/res/expfld.ico
new file mode 100644
index 000000000000..aeefecbdad51
--- /dev/null
+++ b/sfx2/win/res/expfld.ico
Binary files differ
diff --git a/sfx2/win/res/expftp.ico b/sfx2/win/res/expftp.ico
new file mode 100644
index 000000000000..e1a442067d35
--- /dev/null
+++ b/sfx2/win/res/expftp.ico
Binary files differ
diff --git a/sfx2/win/res/exptrash.ico b/sfx2/win/res/exptrash.ico
new file mode 100644
index 000000000000..5c3e956863c3
--- /dev/null
+++ b/sfx2/win/res/exptrash.ico
Binary files differ
diff --git a/sfx2/win/res/expwork.ico b/sfx2/win/res/expwork.ico
new file mode 100644
index 000000000000..93fe39c7a492
--- /dev/null
+++ b/sfx2/win/res/expwork.ico
Binary files differ
diff --git a/sfx2/win/res/frameset.ico b/sfx2/win/res/frameset.ico
new file mode 100644
index 000000000000..c9546f1e4d40
--- /dev/null
+++ b/sfx2/win/res/frameset.ico
Binary files differ
diff --git a/sfx2/win/res/search.ico b/sfx2/win/res/search.ico
new file mode 100644
index 000000000000..13e96131e3b8
--- /dev/null
+++ b/sfx2/win/res/search.ico
Binary files differ
diff --git a/sj2/doc/Todo.txt b/sj2/doc/Todo.txt
new file mode 100644
index 000000000000..6520abaa10a8
--- /dev/null
+++ b/sj2/doc/Todo.txt
@@ -0,0 +1,108 @@
+Erkenntnisse aus sj/sj1, die in sj2 beachtet werden mssen
+
+
+- Call von C++
+"javascript: ..." nicht wie event behandeln, insbesondere werden
+this und document nicht implizit als Search-Objekte gesetzt.
+
+
+- prototype Eigenschaft von Objekten:
+Manipuliert Klassen-Informationen, falls an einem beliebigen Objekt
+eine Property mit gleichem Namen angelegt wird, so gilt dieses
+Ueberschreiben jedoch nur fuer dieses eine Objekt !!!
+Im Sj/Sj1 Projekt ist dies jedoch nicht erfuellt !
+
+Beispiel:
+function Ctor() { ... }
+
+obj1 = new Ctor(); // obj1 obj2
+obj2 = new Ctor(); //-------------------------
+Ctor.prototype.toString = myToString; // myToString myToString
+obj1.toString = myToString2; // myToString2 myToString
+Ctor.prototype.toString = myToString3; // myToString2 myToString3
+
+
+- toString() und valueOf() Behandlung des BaseObj bei Type-Konversion
+
+========================================================================
+
+Bemerkungen zur Suchreihenfolge und zum Ueberladen von Funktionen:
+
+* fuer jede 'Klasse' (z.B. Math, Date, String) gibt es ein Konstruktor-
+ Objekt in der JavaScript-Umgebung.
+ In dem Konstruktor-Objekt werden die Properties der Klasse angelegt,
+ z.B. sin, cos.
+ Der Konstruktor setzt seine Properties an jedem neu erzeugten
+ Objekt. Daher hat z.B. jedes Date-Objekt eine (default-behandelte)
+ Property setMonth.
+ Zum Setzten der Properties des Konstruktor an das neu erzeugte
+ Objekt sollte die initProp()-Methode noch einen Bereich der zu
+ kopierenden Properties bekommen, damit nicht alle nachtraeglich
+ am Konstruktor-Objekt angelegten Properties auch am Objekt gesetzt
+ werden.
+
+* jedes Objekt haelt eine Referenz auf seinen Konstruktor (entweder die
+ vordefinierten Klassen wie Math, Date oder die Funktion mit der das
+ Objekt erzeugt wurde).
+
+* fuer die Suchreihenfolge gibt es folgende drei Moeglichkeiten:
+
+ - Default-behandelte Property:
+ aStrg = new String( "gulp" );
+ aStrg.toString() // --> verwendet toString-Property am
+ // String-Konstruktor (default-Behandlung)
+
+ - Default-Behandlung ueberladen am Konstruktor:
+ aStrg = new String( "gulp" );
+ String.prototype.toString = myToString; // UEBERLADEN !
+ aStrg.toString() // --> verwendet myToString-Funktion.
+ // Das prototype-Objekt wird am String-Ctor.
+ // angelegt und ueberschreibt daher die
+ // default-behandelte Property am Objekt !!!
+ // Der Interpreter muss dann noch an einem
+ // ggf. vorhandenen prototype-Objekt am
+ // Konstruktor nach der Property suchen.
+
+ - ueberladen am Objekt:
+ aStrg = new String( "gulp" );
+ String.prototype.toString = myToString; // am Ctor. ueberladen
+ aStrg.toString = myToString2;
+ aStrg.toString() // --> verwendet myToString2-Funktion.
+ // Die Property toString wird am Objekt
+ // ueberschrieben und somit das Flag, dass
+ // die default-Behandlung anzeigt, zurueck
+ // gesetzt. D.h. der Interpreter muss das
+ // prototype-Objekt des Konstruktors NICHT
+ // durchsuchen.
+
+
+========================================================================
+
+DEMNAECHST:
+
+Die Properties der Standard-Objekte (z.B. setSeconds() am Date)
+werden am prototype-Objekt des Konstruktors (z.B. DateCtor) angelegt.
+Bei der Suche nach Properties an einem beliebigen Objekt wird erst
+das Objekt durchsucht und anschliessend das prototype-Objekt des
+Konstruktors fuer das Objekt durchsucht. Dieses Verhalten gleicht
+dem Netscape-Verhalten (Stand 2.7.1997).
+
+ACHTUNG, AB 11.8:
+Das ist so nicht korrekt, da die entsprechenden Properties direkt
+am prototype-Objekt nicht bekannt sind. Die an den Objekten als
+Default geflagten Properties bilden daher das Netscape-Verhalten
+besser ab.
+
+
+========================================================================
+
+WEITERE OFFENE PROBLEME:
+------------------------
+
+ * this auf der Wiese funktioniert noch nicht korrekt
+
+ * Konversion von Typen ?
+
+
+
+
diff --git a/sj2/doc/concepts.html b/sj2/doc/concepts.html
new file mode 100644
index 000000000000..49f336b131d8
--- /dev/null
+++ b/sj2/doc/concepts.html
@@ -0,0 +1,844 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<HTML>
+<HEAD>
+ <TITLE></TITLE>
+ <META NAME="GENERATOR" CONTENT="StarOffice/4.0 (WinNT/Win95)">
+ <META NAME="AUTHOR" CONTENT=" ">
+ <META NAME="CREATED" CONTENT="19970401;13233926">
+ <META NAME="CHANGEDBY" CONTENT=" ">
+ <META NAME="CHANGED" CONTENT="19970529;8045806">
+</HEAD>
+<BODY>
+<H1>Stardivision erweiterte Java Grundkonzepte</H1>
+<H2><A NAME="Exceptions"></A>Exceptions:</H2>
+<P>Die Grundidee von Exceptions ist es einen Fehlerkontext
+aufzuspannen, der erst n&auml;her betrachtet werden mu&szlig;, wenn
+man Fehler korrigieren will. Der Programmcode sollte durch die
+Behandlung von Fehlern nicht undurchsichtig und unleserlich werden.
+Meiner Meinung nach sollten Exceptions deswegen auch nicht als
+zweiter Returnwert vergewaltigt werden.<BR><B>Ziel:</B> Nach dem
+Auftreten einer Exception sollte es m&ouml;glichst einfach sein das
+System in einen definierten arbeitsf&auml;higen Zustand zu
+versetzen.<BR>Es gibt grunds&auml;tzlich drei verschiedenen Arten von
+Exceptions. Diese unterscheiden sich durch den Zustand in dem sie das
+Objekt hinterlassen.</P>
+<OL>
+ <LI><P><A NAME="Undefined Exception"></A>Die von der Methode
+ benutzten Objekte sind in einem undefinierten Zustand. Jede auf dem
+ Objekt aufgerufene Methode mu&szlig; nach einer solchen Exception
+ nicht mehr ihre Spezifikation einhalten. Diese Exception wird im
+ folgenden mit &#132;Undefined Exception&#147; benannt. Dabei ist zu
+ beachten, da&szlig; keine weiteren <A HREF="#Resourcen">Resourcen</A>,
+ au&szlig;er die angegebenen, benutzt werden. Au&szlig;erdem werden
+ &#132;ReadOnly&#147; Resourcen nicht modifiziert.</P>
+ <LI><P><A NAME="Defined Exception"></A>Die von der Methode benutzten
+ Objekte sind in einem genau definierten Zustand, der aber von der
+ Zusicherung der Methode abweicht. Diese Exception wird im folgenden
+ mit &#132;Defined Exception&#147; benannt. Dabei ist zu beachten,
+ da&szlig; keine weiteren <A HREF="#Resourcen">Resourcen</A>, au&szlig;er
+ die angegebenen, benutzt werden. Au&szlig;erdem werden &#132;ReadOnly&#147;
+ Resourcen nicht modifiziert.</P>
+ <LI><P><A NAME="Transacted Exception"></A>Die von der Methode
+ benutzten Objekte sind in ihrem vorherigen Zustand, der aber von der
+ Zusicherung der Methode abweicht. Diese Exception wird im folgenden
+ mit &#132;Transacted Exception&#147; benannt. Dabei ist zu beachten,
+ da&szlig; keine weiteren <A HREF="#Resourcen">Resourcen</A>, au&szlig;er
+ die angegebenen, benutzt werden. Au&szlig;erdem werden &#132;ReadOnly&#147;
+ Resourcen nicht modifiziert. Diese Spezifikation trifft auch auf
+ &#132;Defined Exception&#147; zu, wegen ihrer Bedeutung f&uuml;hre
+ ich sie extra auf.</P>
+</OL>
+<P>Die Benutzbarkeit eines Objektes, nachdem eine Exception
+aufgetreten ist, ist vom obigen Typ der Exception abh&auml;ngig.</P>
+<P><FONT COLOR="#ff0000">Satz 1.1: Nachdem eine &#132;Undefined
+Exception&#147; aufgetreten ist, kann mit dem Objekt sowie allen
+&#132;ReadWrite&#147; Resourcen nicht mehr weiter gearbeitet werden.</FONT></P>
+<P><FONT COLOR="#ff0000">Satz 1.2: Nachdem eine &#132;Defined
+Exception&#147; aufgetreten ist, kann aufgrund des genau definierten
+Zustandes weiter gearbeitet werden.</FONT></P>
+<P><FONT COLOR="#ff0000">Satz 1.3: Nach einer &#132;Transacted
+Exception&#147; ist der gleiche Zustand wie vor dem Aufruf
+wiederhergestellt.</FONT></P>
+<P>Es sollten m&ouml;glichst nur &#132;Transacted Exception&#147;
+ausgel&ouml;st werden. Bei komplizierten Methoden l&auml;&szlig;t
+sich aber eine &#132;Defined Exception&#147; nicht immer vermeiden.
+Eine &#132;Undefined Exception&#147; deutet immer auf eine
+Programmierfehler hin. Der Typ der Exeption kann nur in Zusammenhang
+mit der Methode in der sie Auftritt ermittelt werden.</P>
+<P><FONT COLOR="#ff0000">Satz 1.4: Durch die Klasse der Exception
+kann niemals alleine der Typ (undefined, defined oder transacted)
+entschieden werden.</FONT></P>
+<H2><A NAME="Resourcen"></A>Resourcen (under construction)</H2>
+<P>Die Grundidee von Resourcen ist die Aufteilung eines Gebildes in
+weitere Einheiten. Auf diesen k&ouml;nnen dann verschiedene Auftr&auml;ge
+gleichzeitig arbeiten, wenn sie nicht dieselben Resourcen benutzen.
+Z.B. kann man in einer Textverarbeitung die einzelnen Dokumente als
+Einheiten betrachten. Auftr&auml;ge, die sich nur auf ein Dokument
+beziehen, k&ouml;nnen parallel zu anderen Dokumenten bearbeitet
+werden.<BR>Mit Resourcen sind im System bzw. der Applikation
+vorhandene Objekte, Services, Kan&auml;le ... gemeint, die zur Zeit
+nur von einem Thread benutzt werden k&ouml;nnen. Als Konsequenz
+m&uuml;ssen Resourcen einem Thread zugeordnet werden, bevor dieser
+sie benutzt.<BR><B>Ziel:</B> Es mu&szlig; m&ouml;glich sein, 1.
+Auftr&auml;ge parallel abzuarbeiten, 2. die Frage &#132;Warum k&ouml;nnen
+zwei Auftr&auml;ge nicht parallel arbeiten?&#147; beantwortet zu
+k&ouml;nnen.<BR>Es gibt verschiedene M&ouml;glichkeiten diese
+Zuordnung vorzunehmen. Zwei stelle ich kurz vor.</P>
+<OL>
+ <LI><P><A NAME="Prealloc Resource Konzept"></A>Eine Art der
+ Zuordnung ist das vorherige Anfordern aller f&uuml;r den Auftrag
+ ben&ouml;tigten Resourcen. Ist dies m&ouml;glich, kann der Auftrag
+ ohne weitere St&ouml;rungen ablaufen. Die Resourcen d&uuml;rfen
+ freigegeben werden, bevor der Auftrag beendet ist. Dies gilt
+ nat&uuml;rlich nur f&uuml;r nicht mehr verwendete Resourcen. Es darf
+ ebenfalls das Zuordnungsrecht von lesend und schreibend auf lesend
+ zur&uuml;ckgenommen werden. Diese Zuornungsart wird im weiteren mit
+ &#132;Prealloc Resource Konzept&#147; bezeichnet.</P>
+ <LI><P><A NAME="Ondemand Resource Konzept"></A>Eine andere Art der
+ Zuordnung ist das Anfordern der Resourcen, wenn sie ben&ouml;tigt
+ werden. Dabei kann es zu St&ouml;rungen kommen, wenn sich
+ verschiedene Auftr&auml;ge um die gleiche Resource bewerben. Die
+ Resourcen d&uuml;rfen freigegeben werden, bevor der Auftrag beendet
+ ist. Dies gilt nat&uuml;rlich nur f&uuml;r nicht mehr verwendete
+ Resourcen. Es darf ebenfalls das Zuordnungsrecht von lesend und
+ schreibend auf lesend zur&uuml;ckgenommen werden. Diese Zuornungsart
+ wird im weiteren mit &#132;Ondemand Resource Konzept&#147;
+ bezeichnet.</P>
+</OL>
+<P>Es gibt noch weitere M&ouml;glichkeiten Auftr&auml;ge zu
+bearbeiten, die die gleichen Resourcen benutzen. H&auml;ufig findet
+man solche L&ouml;sungen bei Datenbankanwendungen.<BR>In der
+folgenden Tabelle stehen sich die beiden Konzepte mit ihren Vor- und
+Nachteilen und ihren Anforderungen gegen&uuml;ber.</P>
+<TABLE WIDTH=100% BORDER=1 CELLPADDING=5 FRAME=BOX RULES=ALL>
+ <COLGROUP>
+ <COL WIDTH=85*>
+ <COL WIDTH=85*>
+ <COL WIDTH=85*>
+ </COLGROUP>
+ <THEAD>
+ <TR>
+ <TH WIDTH=33% VALIGN=TOP>
+ <P><BR></TH>
+ <TD WIDTH=33% VALIGN=TOP><DL>
+ <DD>Prealloc Resource Konzept </DD>
+ </DL>
+ </TD>
+ <TD WIDTH=33% VALIGN=TOP>
+ <DL>
+ <DD>Ondemand Resource Konzept </DD>
+ </DL>
+ </TD>
+ </TR>
+ </THEAD>
+ <TBODY>
+ <TR>
+ <TD VALIGN=TOP>
+ <P>Alle Resourcen m&uuml;ssen vor der Auftragsausf&uuml;hrung
+ bekannt sein.</TD>
+ <TD VALIGN=TOP>
+ <P>Ja</TD>
+ <TD VALIGN=TOP>
+ <P>Nein</TD>
+ </TR>
+ <TR>
+ <TD VALIGN=TOP>
+ <P>Nicht mehr ben&ouml;tigte Resourcen d&uuml;rfen freigegeben
+ werden.</TD>
+ <TD VALIGN=TOP>
+ <P>Ja</TD>
+ <TD VALIGN=TOP>
+ <P>Ja</TD>
+ </TR>
+ <TR>
+ <TD VALIGN=TOP>
+ <P>Es kann zu Verklemmungen oder &#132;Races&#147; kommen.</TD>
+ <TD VALIGN=TOP>
+ <P>Nein</TD>
+ <TD VALIGN=TOP>
+ <P>Ja</TD>
+ </TR>
+ <TR>
+ <TD VALIGN=TOP>
+ <P>In Bearbeitung befindliche Auftr&auml;ge m&uuml;ssen, aufgrund
+ fehlender Resourcen, abgebrochen werden.</TD>
+ <TD VALIGN=TOP>
+ <P>Nein</TD>
+ <TD VALIGN=TOP>
+ <P>Ja</TD>
+ </TR>
+ <TR>
+ <TD VALIGN=TOP>
+ <P>Der Zustand der Resourcen ist zu jedem Zeitpunkt der
+ Auftragsabarbeitung bekannt.</TD>
+ <TD VALIGN=TOP>
+ <P>Ja</TD>
+ <TD VALIGN=TOP>
+ <P>Nein</TD>
+ </TR>
+ <TR>
+ <TD VALIGN=TOP>
+ <P>Algorithmus zur Resourcevergabe.</TD>
+ <TD VALIGN=TOP>
+ <P>Einfach, da nur &uuml;berpr&uuml;ft werden mu&szlig;, ob alle
+ ben&ouml;tigten Resourcen verf&uuml;gbar sind.</TD>
+ <TD VALIGN=TOP>
+ <P>Komplex, da neben dem Anfordern von Resourcen auch noch
+ &uuml;berpr&uuml;ft werden mu&szlig;, ob das System <A HREF="#lebendig">lebendig</A>
+ ist.</TD>
+ </TR>
+ <TR>
+ <TD VALIGN=TOP>
+ <P>Parallelit&auml;t</TD>
+ <TD VALIGN=TOP>
+ <P>Hoch, da unabh&auml;ngige Auftr&auml;ge meistens nur lesend
+ auf gemeinsame Resourcen zugreifen.</TD>
+ <TD VALIGN=TOP>
+ <P>Sehr hoch, da die ben&ouml;tigten Resourcen erst angefordert
+ werden, wenn man sie braucht.</TD>
+ </TR>
+ </TBODY>
+</TABLE>
+<P ALIGN=LEFT>Meiner Meinung nach ist nur das &#132;Prealloc Resource
+Konzept&#147; ohne richtige Programmierwerkzeuge zur Entwicklung
+paralleler Algorithmen (z.B. Netzprogrammierung) wenigstens ein
+bi&szlig;chen beherschbar.</P>
+<P ALIGN=LEFT>Es stellt sich die Frage wie das &#132;Prealloc
+Resource Konzept&#147; in einem Komponenten-Modell und in einem
+Objekt-Environment integriert werden kann. Ein Objekt-Environment ist
+ein mehr oder weniger dynamische Menge von Objekten die miteinander
+in Verbindung stehen. Aus dem obigen Beispiel k&ouml;nnte man die
+Verbindung der Textverarbeitung zu ihren Dokumenten als
+Objekt-Environment bezeichnen. Ein Objekt in diesem Environment kann
+nun &uuml;ber seine Verbindungen mit anderen Objekten kommunizieren.
+Die Schnittstellen mit denen &uuml;ber die Verbindung kommuniziert
+wird nennt man Komponenten-Modell. Die Idee des Objekt-Environments
+ist es weitere Objekte m&ouml;glichst einfach zu integrieren. So
+k&ouml;nnten in unserem Beispiel weitere Dokumenttypen wie ein
+HTML-Dokument eingebunden werden. Die Schittstellen m&uuml;&szlig;ten
+nur dem, von der Textverarbeitung geforderten, Komponenten-Modell
+gen&uuml;gen. Liefert aber das Modell, wie heute &uuml;blich, keine
+Information &uuml;ber die ben&ouml;tigten Resourcen bei Benutzung der
+Schnittstellen, dann k&ouml;nnen Verklemmungen bzw. Inkonsistenzen
+nicht vermieden werden. Aus diesem Grunde ist es notwendig, das
+Resource-Konzept in das Komponenten-Modell zu integrieren.<BR><B>Ziel:</B>
+Es mu&szlig; ein Kompromi&szlig; zwischen hoher Nebenl&auml;ufigkeit
+und der damit verbundenen Komplexit&auml;t, sowie einfacher
+Programmierung und geringer Nebenl&auml;ufigkeit gefunden
+werden.<BR><B>Folgen:</B> In einem Objekt-Environment m&uuml;ssen die
+einzelnen Objekte also dynamisch auf Verbindungen zu Objekten mit
+hoher oder geringer Nebenl&auml;ufigkeit reagieren. Die Komplexit&auml;t
+dieser Aufgabe darf aber nicht in die Objekte verlagert werden, da
+von einem seriellen Objekt (bzw. dessen Programmierer) nicht die
+Steuerung nebenl&auml;ufiger Auftr&auml;ge verlangt werden
+kann.<BR><B>L&ouml;sungsansatz:</B> Die Behandlung der
+Nebenl&auml;ufigkeit wird nicht in einer einfachen Komponente
+implementiert. Das bedeutet sie mu&szlig; mit einer
+Default-Behandlung zufrieden sein, die minimale Nebel&auml;ufigkeit
+nach sich zieht. Eine Komponente kann sich aber in die Vergabe der
+Resourcen einmischen. So kann sie ihren Grad der Nebenl&auml;ufigkeit
+erh&ouml;hen. Dies ist dann aber auch mit erh&ouml;htem
+Implementationsaufwand zu bezahlen. Auf der anderen Seite macht es
+aber keinen Sinn serielle oder Komponenten mit zu gro&szlig;em
+Resourcebedarf einzubinden, wenn das Objekt-Environment danach
+praktisch nicht mehr lauff&auml;hig ist. Das bedeutet, da&szlig; das
+Objekt-Environment auch Forderungen bez&uuml;glich des Resourcebedarf
+an die Komponenten stellen darf.</P>
+<H3>Anforderungen</H3>
+<OL>
+ <LI><P ALIGN=LEFT>Es mu&szlig; ein Modell geben, in dem alle
+ vorhandenen Resourcen und deren Beziehung zueinander eingetragen
+ werden. Dadurch kann abgesch&auml;tzt werden, welchen Resourcebedarf
+ eine Komponente hat. Das &#132;Sch&auml;tzen&#147; ist w&ouml;rtlich
+ zu nehmen. (Im Zusammenhang mit <A HREF="#Security">Security</A>
+ wird man aber auch noch sehen, da&szlig; der Zugriff auf bestimmte
+ Resourcen nicht m&ouml;glich ist.) F&uuml;r das &#132;Prealloc
+ Resource Konzept&#147; gilt, es m&uuml;ssen mindestens die
+ ben&ouml;tigten Resourcen verf&uuml;gbar sein. Zur Not sind diese
+ alle.</P>
+ <LI><P ALIGN=LEFT>Eine nebenl&auml;ufige Komponente mu&szlig; in
+ jeder ihrer von au&szlig;en erreichbaren Methoden kontrollieren, ob
+ die entsprechenden Resourcen f&uuml;r sie angefordert wurden. Damit
+ serielle Komponenten diese Methoden nutzen k&ouml;nnen, k&ouml;nnen
+ die ben&ouml;tigten Resourcen angefordert werden, wenn vorher noch
+ <B>keine einzige</B> durch den ausf&uuml;hrenden Auftrag belegt war.
+ Zur Erl&auml;uterung: Serielle Komponenten belegen keine Resourcen.
+ Damit w&uuml;rde jeder Aufruf einer nebenl&auml;ufigen Komponente
+ scheitern. Um dies zu vermeiden, werden die Resourcen in der
+ nebenl&auml;ufigen Komponente angefordert.</P>
+ <LI><P ALIGN=LEFT>Serielle Komponenten m&uuml;ssen also damit
+ rechnen eine Fehlermeldung &uuml;ber nicht verf&uuml;gbare Resourcen
+ zu bekommen.</P>
+</OL>
+<H3>Szenarien</H3>
+<P>Von unserem bisherigen Beispiel ausgehend, gibt es eine
+Applikation in der sich drei Dokumente befinden. Ein serielles
+Textdokument, ein nebenl&auml;ufiges Tabellendokument und ein
+nebenl&auml;ufiges Pr&auml;sentationsdokument. Die Applikation selbst
+ist nebenl&auml;ufig. Die Relationen gehen von der Applikation zu den
+Dokumenten und umgekehrt. Die Dokumente kennen sich nicht.</P>
+<P>Fall 1:<BR>In das serielle Textdokument soll eine Zeichenfolge
+eingef&uuml;gt werden. Da es sich um eine serielle Komponente
+handelt, kann dieses Einf&uuml;gen nicht von selbst ausgel&ouml;st
+werden, es mu&szlig; von einer nebenl&auml;ufigen Komponente, hier
+die Applikation, angesto&szlig;en werden. Die Applikation ist aber
+verpflichtet die Resourcen vorher zu reservieren. F&uuml;r diese
+Absch&auml;tzung gibt es drei realistische M&ouml;glichkeiten. 1. Sie
+reserviert nur das Textdokument selbst. Das bedeutet, das
+Textdokument kann mit keinem anderen Objekt, auch nicht mit der
+Applikation, kommunizieren. 2. Die Applikation und das Textdokument
+wird reserviert. Es ist also nur der Zugriff auf die anderen
+Dokumente verwehrt. 3. Alle Objekte werden reserviert. Geht es nach
+dem &#132;Prealloc Resource Konzept&#147; mu&szlig; 3. gew&auml;hlt
+werden. Aufgrund von Sicherheitsbeschr&auml;nkungen werden wir aber
+noch sehen, das serielle Komponenten in ihrer Auftragsbearbeitung
+gestoppt werden k&ouml;nnen. Wenn der Abbruch eines Auftrags m&ouml;glich
+ist, spielt es aber keine Rolle durch wen (Resourcen oder <A HREF="#Security">Security</A>)
+dies geschehen ist.</P>
+<P>Fall 2:<BR>In das nebenl&auml;ufige Tabellendokument soll eine
+Zeichenfolge eingef&uuml;gt werden. Dieser Auftrag kann von der
+Applikation oder der Komponente selbst ausgel&ouml;st werden. In
+jedem Fall m&uuml;ssen die Resourcen vor der Auftragsbearbeitung
+reserviert werden. Man kann dies auch der Komponente &uuml;berlassen
+(siehe Anforderung 2.), aber man scheitert, wenn zwei Auftr&auml;ge
+zu einem Auftrag zusammengefa&szlig;t werden sollen. Dies passiert
+z.B., wenn der Auftrag &#132;Text ersetzen&#147; aus den Auftr&auml;gen
+&#132;L&ouml;schen&#147; und &#132;Einf&uuml;gen&#147; besteht. Auf
+jeden Fall wird nur das Tabellendokument selbst reserviert, da das
+Einf&uuml;gen keine Auswirkung auf andere Komponenten hat.</P>
+<P>Fall 3:<BR>In das nebenl&auml;ufige Tabellendokument wird der
+Applikationsname aus der Applikation eingef&uuml;gt. Dazu fragt das
+Tabellendokument nach den ben&ouml;tigten Resourcen, um den Namen zu
+holen und ihn einzuf&uuml;gen. Zum Holen wird die Applikation
+ben&ouml;tigt und zum Einf&uuml;gen das Tabellendokument. Beide
+m&uuml;ssen vor der Auftragsausf&uuml;hrung reserviert werden.</P>
+<P>Fall 4:<BR>Das nebenl&auml;ufige Tabellendokument f&uuml;gt
+selektierten Text aus dem seriellen Textdokument ein. Da das
+Textdokument seinen Resourcebedarf nicht mitteilt, wird einer aus
+Fall eins abgesch&auml;tzte Bedarf genommen. Man kann sehen, da&szlig;
+der Auftrag f&uuml;r alle drei M&ouml;glichkeiten erteilt werden
+kann. Seine Nebenl&auml;ufigkeit wird dann durch die Absch&auml;tzung
+eingeschr&auml;nkt. Zus&auml;tzlich m&uuml;ssen nat&uuml;rlich die
+ben&ouml;tigten Resourcen f&uuml;r das Einf&uuml;gen geholt werden.
+Alle m&uuml;ssen vor der Auftragsausf&uuml;hrung reserviert werden.</P>
+<H3>Programmierkonzepte</H3>
+<P>Welche Konzepte k&ouml;nnen in einer objektorientierten Sprache
+wie c++ oder Java oder einer prozeduralen Sprache wie Fortran oder
+&#132;c&#147; eingesetzt werden, um Nebenl&auml;ufigkeit zu
+erreichen. </P>
+<OL>
+ <LI><P>Es gibt zwei M&ouml;glichkeiten eine Resource zu belegen. Das
+ ist Exclusive (lesen, schreiben) und &#132;ReadOnly&#147;. Eine
+ Resource kann von mehreren Auftr&auml;gen benutzt werden, wenn diese
+ nur &#132;ReadOnly&#147; ben&ouml;tigen.</P>
+ <LI><P>Es gibt Resourcen f&uuml;r die man die Resourceverteilung
+ optimieren kann. Ein Objekt welches nicht ge&auml;ndert werden kann
+ und das w&auml;hrend der Auftragsausf&uuml;hrung immer konsistent
+ ist kann die Anforderung &#132;Exclusiv&#147; automatisch auf
+ &#132;ReadOnly&#147; abschw&auml;chen. Dies lohnt sich, wenn man
+ serielle Komponenten hat, die nichts &uuml;ber die
+ Resourceanforderungen mitteilen. Als Beispiel m&ouml;chte ich eine
+ Instanz der Klasse String in Java nennen. Ein weitere Art von
+ Resourcen fordern bei Auftr&auml;gen an sie 1. keine weiteren
+ Auftr&auml;ge an, 2. beenden sie die Auftr&auml;ge schnell und 3.
+ die Reihenfolge der &Auml;nderung an ihnen ist f&uuml;r andere nicht
+ wichtig. Dies ist zum Beispiel bei der Speicherverwaltung in c der
+ Fall. Diese Art der Resource darf zu einem sp&auml;teren Zeitpunkt
+ angefordert werden. Sie mu&szlig; sofort benutzt und wieder
+ freigegeben werden. Aus diesem Grund erledigen solche Resourcen das
+ Anfordern und Freigeben selbst.</P>
+ <LI><P>Bevor ein Auftrag ausgef&uuml;hrt werden kann, m&uuml;ssen
+ alle von ihm ben&ouml;tigten Resourcen reserviert werden. Dies ist
+ f&uuml;r einen Auftrag, der aus mehreren Teilauftr&auml;gen besteht,
+ aufwendig. Eine Optimierung kann darin bestehen die Teilauftr&auml;ge
+ asynchron auszuf&uuml;hren. Allerdings dringt diese Verhaltensweise
+ nach au&szlig;en. Z.B. m&uuml;ssen Auftr&auml;ge, die diesen dann
+ asynchronen Auftrag nutzen, dann auch asynchron sein. Eine weitere
+ Optimierung in der Autragsvergabe gibt es, wenn ein Autrag die
+ Resourcervergabe nicht &auml;ndert. Es ist dann m&ouml;glich mehr
+ Auftr&auml;ge vorzuziehen.</P>
+ <LI><P>Es mu&szlig; eine Queue geben, in die Auftr&auml;ge eingef&uuml;gt
+ werden k&ouml;nnen. Konfliktfreie Auftr&auml;ge k&ouml;nnen parallel
+ ausgef&uuml;hrt werden. <B>Achtung:</B> Der Resourcebedarf eines
+ Auftrages kann nur bestimmt werden, wenn alle ben&ouml;tigten
+ Resourcen &#132;ReadOnly&#147; reserviert werden k&ouml;nnen, es sei
+ denn kein vor ihm laufender Auftrag &auml;ndert die Resourcevergabe.
+ Warum ist das so? Ein Auftrag kann eine Resource dahingehend &auml;ndern,
+ da&szlig; danach andere Resourcen ben&ouml;tigt werden als vorher.
+ Der vorher bestimmte Bedarf ist dann falsch.</P>
+ <LI><P>Das Modell der Resourcen kann vergr&ouml;bert oder verfeinert
+ werden. In einem Tabellendokument k&ouml;nnte man jede einzelne
+ Zelle zu einer Resource machen. Um die Komplexit&auml;t der
+ Resourcemodells zu vereinfachen kann man aber weiter alle Zellen der
+ Dokument-Resource zuordnen. Wird also aus einer anderen Komponente
+ die Zelle angefordert, wird automatisch das ganze Dokument
+ reserviert. Daraus ergeben sich zwei Vorteile: 1. F&uuml;r den
+ Auftraggeber ist die Vergr&ouml;berung transparent und 2. Kann die
+ Resource an dem Objekt reserviert werden, das man ohnehin kennt.</P>
+ <LI><P>Das Resource-Modell ist hierarchisch. Eine Resource kann nur
+ einer Vergr&ouml;berung zugeordnet werden. Die Tabellenzellen d&uuml;rfen
+ also nur dem Tabellendokument zugeordnet werden. Daraus ergibt sich,
+ da&szlig; innerhalb einer solchen Hierarchie nebenl&auml;ufig
+ gearbeitet werden kann. Es d&uuml;rfen dann aber keine Resourcen
+ au&szlig;erhalb der Hierarchie benutzt werden, selbst wenn diese
+ reserviert sind.</P>
+</OL>
+<H3>Probleme und L&ouml;sungen</H3>
+<P>&Uuml;ber den Benutzer m&uuml;ssen Daten abgefragt werden, die
+&uuml;ber die Benutzung von Resourcen entscheidet (z.B.
+Dateiname):<BR>Ein solcher Auftrag mu&szlig; in zwei Teilauftr&auml;ge
+unterteilt werden. Der erste erledigt die Abfrage. Danach werden alle
+Resourcen freigegeben und dann fordert der zweite seine Resourcen und
+wird bearbeitet. Eventuell kann ein solcher Auftrag den vorherigen
+ersetzten, um zu verhindern das andere abh&auml;ngige Auftr&auml;ge
+vor dem Aufgeteilten bearbeitet werden.</P>
+<P>Ich habe mich bei einem Objekt als Listener angemeldet:<BR>Es gibt
+zwei Arten von Benachrichtigungen die ich erhalte. 1. Aufgrund der
+Ausf&uuml;hrung eines Auftrages und 2. einen Event von einer
+nebenl&auml;ufigen Komponente. Im ersten Fall &uuml;berpr&uuml;fe ich
+den Resourcebedarf und f&uuml;hre dann den Auftrag aus. Im zweiten
+Fall reserviere ich die ben&ouml;tigten Resourcen und f&uuml;hren den
+Auftrag aus. Sind Resourcen reserviert, ist dies Fall eins, sonst
+Fall zwei.</P>
+<P>Ich bin Broadcaster:<BR>Broadcaste ich aufgrund eines Auftrags tue
+ich nichts weiter. L&ouml;se ich den Broadcast ohne Auftrag aus, mu&szlig;
+ich die Resourcen f&uuml;r die Listener bestimmen und sie vor dem
+Aufruf reservieren. Die einzelnen Listener werden als unabh&auml;ngig
+betrachtet. Im Detail findet folgender Ablauf statt. 1. Die Liste der
+Listener wird kopiert. 2. F&uuml;r den ersten Listener wird der
+Resourcebedarf ermittelt.</P>
+<H3>Implementation</H3>
+<P>Die Basis f&uuml;r die Implementation des Resourcekonzeptes legen
+die Klassen <A HREF="stardiv.resource.Resource.html#Resource">Resource</A>,
+<A HREF="stardiv.resource.ResourceList.html#ResourceList">ResourceList</A>,
+<A HREF="stardiv.resource.ResourceLockException.html#ResourceLockException">ResourceLockException</A>,
+<A HREF="stardiv.resource.Task.html#Task">Task</A>, <A HREF="stardiv.resource.TaskManager.html#TaskManager">TaskManager</A>,
+<A HREF="stardiv.resource.TaskThread.html#Task">TaskThread</A>,
+<A HREF="stardiv.resource.ThreadData.html#ThreadData">ThreadData</A>
+und das Interface <A HREF="stardiv.resource.Resourceable.html#Resourceable">Resourceable</A>
+fest. Um ein Objekt in das Resourcekonzept einbinden zu k&ouml;nnen
+sind folgende Schritte notwendig:<BR>1. Das Resourceable Interface
+mu&szlig; implementiert werden. 2. Ein Konstruktor mit der dem
+Objekte zugewiesenen Resource. 3. Jede public Methode bekommt eine
+*_Resource(...) Methode zur Seite, mit der der Resourcebedarf
+ermittelt werden kann. 4. Innerhalb der public Methode wird der
+Resourcebedarf ermittelt. 5. Mit dieser Information die als
+ResourceListe vorliegt, wird eine Auftrag (Task) erzeugt. 6. Dieser
+Auftrag wird beim TaskManager angemeldet. 7. Nach der Zuteilung durch
+den TaskManager wird der Auftrag ausgef&uuml;hrt. 8. Alle Resourcen
+und der Auftrag werden wieder freigegeben.<BR>Diese Liste ist
+detailliert aber nicht <B>vollst&auml;ndig</B>. In der Klasse
+Resource steht imm eine Beispiel, welches aktuell sein sollte.</P>
+<P>Folgende Programmierrichtlinien gibt es, um das &#132;Prealloc
+Resource Konzept&#147; in Java zu integrieren:</P>
+<OL>
+ <LI><P ALIGN=LEFT>Es mu&szlig; das Interface <A HREF="stardiv.resource.Resourceable.html#Resourceable">Resourceable</A>
+ implementiert werden. Mit Hilfe dieses Interfaces kann der
+ Resourcebedarf eines Objektes erfragt werden. Diese Richtlinien
+ gelten dann auch f&uuml;r die Superklasse.</P>
+ <LI><P ALIGN=LEFT>???Es mu&szlig; das Interface <A HREF="stardiv.concepts.ModifyTestable.html#ModifyTestable">ModifyTestable</A>
+ implementiert werden. Damit kann &uuml;berpr&uuml;ft werden, ob an
+ den Resourcen Ver&auml;nderungen vorgenommen wurden.</P>
+ <LI><P ALIGN=LEFT>Nur Methoden die &uuml;ber die Lebensdauer des
+ Objektes keine ver&auml;nderten Werte liefern d&uuml;rfen immer
+ gerufen werden. Das sind zum Beispiel alle Methoden der Klasse
+ java.lang.Object.</P>
+ <LI><P ALIGN=LEFT>Um den Resourcebedarf einzelner Methoden genauer
+ zu ermitteln kann eine Methode mit dem, um _Resource( ResourceList
+ aRL, boolean bCheck, ... ) erweiterten Namen, gerufen werden. Ein
+ Beispiel befindet sich in der Klasse <A HREF="stardiv.resource.Resource.html#Resource">Resource</A>.</P>
+</OL>
+<H2><A NAME="Security"></A>Security</H2>
+<H2><A NAME="Data Requests"></A>Data Requests</H2>
+<P>Diese Schnittstelle soll das Anfordern von Daten vereinheitlichen.
+Das Problem, welches zu diesem Ansatz f&uuml;hrte, ist das Lesen von
+Daten &uuml;ber einen &#132;langsamen&#147; Internet-Stream. Das
+bedeutet es werden Daten ben&ouml;tigt, die erst noch &uuml;bertragen
+werden m&uuml;ssen. Da das Pull-Modell immer einen eigenen Thread
+vorraussetzt, um die restliche Anwendung nicht zu blockieren, habe
+ich das Push-Modell gew&auml;hlt.<BR><B>Ziel:</B> F&uuml;r die
+Implementation sollte es m&ouml;glichst transparent sein, wie die
+Daten herangeschafft werden. Als zweites soll die Schnittstelle f&uuml;r
+denjenigen einfach sein, der alle Daten sofort bereith&auml;lt.<BR><B>L&ouml;sung:</B>
+Der Datenverarbeiter ist passiv. Das bedeutet, beim Entgegennehmen
+der Daten beginnt er nicht sie zu verarbeiten. Dies mu&szlig; extra
+angesto&szlig;en werden. Zweitens, der Datenverarbeiter h&auml;lt den
+Status des Datenlieferanten. Dies k&ouml;nnen EOF, f&uuml;r alle
+Daten gelesen, READY, f&uuml;r sind Daten da, PENDING, es kommen noch
+weitere Daten und NO_SOURCE, es wurden nicht alle Daten verarbeitet
+und es kommen keine weiteren Daten mehr. <B>Achtung</B> der Status
+ist nur zu bestimmten Zeitpunkten g&uuml;ltig. Der Datenverarbeiter
+darf nur im Zustand PENDING Daten bekommen. Diese Annahme sch&uuml;tzt
+ihn vor der Implementation eines Puffers. Das <A HREF="stardiv.concepts.QueryData.html#QueryData">QueryData</A>
+- Interface ist die Spezifikation f&uuml;r dieses Verhalten.</P>
+<H2><A NAME="Modify"></A>Modify</H2>
+<P>Das Ziel ist nur eine Schnittstelle zu erstellen, mit der ein
+Objekt auf &Auml;nderungen &uuml;berpr&uuml;ft werden kann. Da es f&uuml;r
+ein Objekt verschiedene M&ouml;glichkeiten gibt &Auml;nderungen an
+sich zu pr&uuml;fen (z.B. &Auml;nderungsz&auml;hler, Kopie), mu&szlig;
+die Schnittstelle m&ouml;glichst flexibel sein, um vielen
+Implementationen gerecht zu werden. Die L&ouml;sung sind zwei
+Methoden. Mit der einen (getModifyHandle()) kann der Zeitpunkt
+festgemacht werden, zu dem m&ouml;gliche &Auml;nderungen &uuml;berpr&uuml;ft
+werden sollen. Der R&uuml;ckgabewert ist eine beliebiges Objekt, so
+da&szlig; in ihm die ben&ouml;tigte &Uuml;berpr&uuml;fungsinformation
+(z.B. der &Auml;nderungsz&auml;hler) untergebracht werden kann.
+Danach kann mit der zweiten Methode (isModified(Object)) &uuml;berpr&uuml;ft
+werden, ob eine &Auml;nderung stattgefunden hat. Das Interface f&uuml;r
+dieses Konzept hei&szlig;t <A HREF="stardiv.concepts.ModifyTestable.html#ModifyTestable">ModifyTestable</A>
+.</P>
+<H2><A NAME="LifeConnect"></A>LifeConnect</H2>
+<P>LifeConnect ist die Kommunikation zwischen PlugIns, Applets und
+JavaScript. Die Kommunikation kann in beide Richtungen erfolgen.Unter
+JavaScript kann auf alle Systemklassen zugegriffen werden. Die
+Abbildung der JavaScript-Aufrufe nach Java ist die Aufgabe der Klasse
+<A HREF="stardiv.js.ip.CallJava.html#CallJava">CallJava</A>. Dazu
+wird das in Java 1.1 implementierte Package java.lang.reflect
+benutzt. Da JavaScript eine nicht typisierte Sprache ist, werden die
+Werte nach JavaScript-Regeln in die entsprechenden Javatypen
+umgesetzt. Bez&uuml;glich der Sicherheit wird ein JavaScript-Programm
+auf die gleiche Stufe wie ein Applet gestellt. Um den Zugriff der
+Applets auf JavaScript zu gestatten, mu&szlig; das HTML-Tag MYSCRIPT
+angegeben werden. Auf die Java-Klassen kann in JavaScript mit dem
+Prefix &#132;Package&#147; zugegriffen werden (sun, java und netscape
+ben&ouml;tigen keinen Prefix). Die Klassen netscape.plugin.Plugin,
+netscape.javascript.JSObject und netscape.javascript.JSException
+dienen zur Kommunikation von Java mit JavaScript.</P>
+<P>Konvertierungstabelle anhand der Spezifikation &#132;JavaScript
+Language Specifications&#147; 3.1.2 TypeConversion</P>
+<TABLE WIDTH=100% BORDER=1 CELLPADDING=5 CELLSPACING=0 FRAME=HSIDES RULES=ALL>
+ <COLGROUP>
+ <COL WIDTH=26*>
+ <COL WIDTH=40*>
+ <COL WIDTH=47*>
+ <COL WIDTH=47*>
+ <COL WIDTH=47*>
+ <COL WIDTH=47*>
+ </COLGROUP>
+ <THEAD>
+ <TR>
+ <TH WIDTH=10% VALIGN=TOP>
+ <P><BR></TH>
+ <TH WIDTH=16% VALIGN=TOP>
+ <P><I>byte</I></TH>
+ <TH WIDTH=19% VALIGN=TOP>
+ <P><I>short</I></TH>
+ <TH WIDTH=19% VALIGN=TOP>
+ <P><I>char</I></TH>
+ <TH WIDTH=19% VALIGN=TOP>
+ <P><I>int</I></TH>
+ <TH WIDTH=19% VALIGN=TOP>
+ <P><I>long</I></TH>
+ </TR>
+ </THEAD>
+ <TBODY>
+ <TR>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>Undef.</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>Fehler</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>Fehler</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>Fehler</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>Fehler</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>Fehler</TD>
+ </TR>
+ <TR>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>Function</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>(10) valueOf/error</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>(11) valueOf/error</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>(11) valueOf/error</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>(12) valueOf/error</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>(13) valueOf/error</TD>
+ </TR>
+ <TR>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>Object</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>(10) valueOf/error</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>(11) valueOf/error</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>(11) valueOf/error</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>(12) valueOf/error</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>(13) valueOf/error</TD>
+ </TR>
+ <TR>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>Object (null)</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>(10) 0</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>(11) 0</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>(11) 0</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>(12) 0</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>(13) 0</TD>
+ </TR>
+ <TR>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>double</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>(10) Zahl oder Fehler, wenn Bereichs-&uuml;berschreitung</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>(11) Zahl oder Fehler, wenn Bereichs-&uuml;berschreitung</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>(11) Zahl oder Fehler, wenn Bereichs-&uuml;berschreitung</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>(12) Zahl oder Fehler, wenn Bereichs-&uuml;berschreitung</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>(13) Zahl oder Fehler, wenn Bereichs-&uuml;berschreitung</TD>
+ </TR>
+ <TR>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>boolean</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>(15) 0/1</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>(15) 0/1</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>(15) 0/1</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>(15) 0/1</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>(15) 0/1</TD>
+ </TR>
+ <TR>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>Leer String</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>error</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>error</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>error</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>error</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>error</TD>
+ </TR>
+ <TR>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>String</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>(10) error/ Zahl</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>(11) error/ Zahl</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>(11) error/ Zahl</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>(12) error/ Zahl</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>(13) error/ Zahl</TD>
+ </TR>
+ </TBODY>
+</TABLE><DL>
+ <DT><BR></DT>
+</DL>
+<TABLE WIDTH=100% BORDER=1 CELLPADDING=5 CELLSPACING=0 FRAME=BOX RULES=ALL>
+ <COLGROUP>
+ <COL WIDTH=27*>
+ <COL WIDTH=59*>
+ <COL WIDTH=44*>
+ <COL WIDTH=35*>
+ <COL WIDTH=36*>
+ <COL WIDTH=55*>
+ </COLGROUP>
+ <THEAD>
+ <TR>
+ <TH WIDTH=10% VALIGN=TOP>
+ <P><BR></TH>
+ <TH WIDTH=23% VALIGN=TOP>
+ <P><I>float</I></TH>
+ <TH WIDTH=17% VALIGN=TOP>
+ <P><I>double</I></TH>
+ <TH WIDTH=14% VALIGN=TOP>
+ <P><I>boolean</I></TH>
+ <TH WIDTH=14% VALIGN=TOP>
+ <P><I>String</I></TH>
+ <TH WIDTH=22% VALIGN=TOP>
+ <P><I>Object</I></TH>
+ </TR>
+ </THEAD>
+ <TBODY>
+ <TR>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>Undef.</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>Fehler</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>Fehler</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>false</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>&#132;undefined&#147;</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>null</TD>
+ </TR>
+ <TR>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>Function</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>(14) valueOf/error</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>(15) valueOf/error</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>(15) valueOf/ true</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>(15) JS-Code der Funktion</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>(30) netscape .javascript. JSObject</TD>
+ </TR>
+ <TR>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>Object</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>(14) valueOf/error</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>(15) valueOf/error</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>(15) valueOf/ true</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>(15) valueOf / toString
+ </TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>(30) Java-Cast/ error</TD>
+ </TR>
+ <TR>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>Object (null)</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>(14) 0</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>(15) 0</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>(15) false</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>(15) &#132;null&#147;</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>(30) null</TD>
+ </TR>
+ <TR>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>double</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>(14) Zahl oder Fehler, wenn Bereichs-&uuml;berschreitung</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>(30) Zahl</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>(7) 0, NaN -&gt; false !0, -+Infinite -&gt; true</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>(8) Zahl, NaN, Infinity oder -Infinity</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>(9) Number/ error
+ </TD>
+ </TR>
+ <TR>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>boolean</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>(15) 0/1</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>(15) 0/1</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>(30) boolean</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>(15) &#132;false&#147;/ &#147;true&#147;</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>(15) Boolean/ error</TD>
+ </TR>
+ <TR>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>Leer String</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>error</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>error</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>(15) false</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>(30) String</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>(15) String/ error</TD>
+ </TR>
+ <TR>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>String</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>(14) error/ Zahl</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>(15) error/ Zahl</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>(15) true</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>(30) String</TD>
+ <TD VALIGN=TOP>
+ <P ALIGN=LEFT>(15) String/ error</TD>
+ </TR>
+ </TBODY>
+</TABLE>
+<P><BR></P>
+<P>Der Algorithmus zum mappen der polymorphen Methoden in Java:<BR>1.
+Die Anzahl der Parameter mu&szlig; &uuml;bereinstimmen.<BR>2. Die
+Parameter m&uuml;ssen, nach der obigen Tabelle, konvertiert werden
+k&ouml;nnen.<BR>3. Es gibt ein Punktesystem, nach dem die Methode
+ausgew&auml;hlt wird. Die Punkte stehen in Klammern in den
+Tabelleneintr&auml;gen. Die Konvertierungspunkte f&uuml;r Zahlen sind
+typabh&auml;ngig und nicht wertabh&auml;ngig. Dadurch ist
+sichergestellt, das nicht unterschiedliche Methoden bei sich
+&auml;ndernden Werten gerufen werden. Kommt es allerdings zu einem
+Konvertierungsfehler (&Uuml;berlauf), dann wird versucht eine andere
+Methode zu finden.<BR>4. Es wird vorausgesetzt, da&szlig; die
+Methoden &#132;valueOf&#147; und &#132;toString&#147; keine
+Seiteneffekte haben. Sie d&uuml;rfen also beliebig oft aufgerufen
+werden.<BR>5. Es wird nur null auf eine Java-Array abgebildet.</P>
+<H2><A NAME="Testen"></A>Testen</H2>
+<P>Das Ziel dieses Abschnitts ist es Vorgehensweisen zu entwickeln,
+mit denen sich die Java Grundkonzepte testen lassen. Folgende
+Checkliste ist f&uuml;r jede Methode abzuarbeiten.</P>
+<OL>
+ <LI><P>Zu jeder Klasse gibt es eine entsprechende Testklasse. Diese
+ steht im Package &#132;test&#147;.... Der Name der Klasse wird mit
+ &#132;Test&#147; erweitert. Beispiel: stardiv.memory.BitArray wird
+ zu test.memory.BitArrayTest. Jede dieser Klassen hat eine Methode
+ &#132;public static void main( String [] )&#147;. Diese Methode wird
+ aufgerufen, um den Test aller Methoden anzusto&szlig;en. Der Test
+ ist nicht interaktiv. Wird ein Fehler festgestellt, wird das
+ Programm mit exit( -1 ) verlassen.</P>
+ <LI><P>Jede Methode mu&szlig; unabh&auml;ngig von ihren Environment
+ getestet werden. Alle Resourcen f&uuml;r die Methode werden als
+ Dummy f&uuml;r den Test implementiert. Diese Forderung f&uuml;hrt zu
+ sauberen Schnittstellen, da ansonsten f&uuml;r den Test ja ganze
+ Objekte implementiert werden m&uuml;ssen.</P>
+ <LI><P>Das Testprotokoll protokolliert mit &#132;System.out.println&#147;.
+ Vor dem Test der einzelnen Methoden wird in einer Zeile kurz &uuml;ber
+ den Test informiert. Scheitert der Test, dann wird eine
+ Fehlermeldung ausgegeben in der &#132;failed&#147; enthalten sein
+ mu&szlig;. </P>
+ <LI><P>Um <A HREF="#Defined Exception">Defined Exception</A> und
+ <A HREF="#Transacted Exception">Transacted Exception</A> testen zu
+ k&ouml;nnen, sollten die <A HREF="stardiv.concepts.Resource.html#Resource">Resource</A>
+ und <A HREF="stardiv.concepts.ModifyTestable.html#ModifyTestable">ModifyTestable</A>
+ Interfaces implementiert werden. Es kann damit automatisch gepr&uuml;ft
+ werden, ob sich eine Resource unerlaubter Weise ge&auml;ndert hat.</P>
+</OL>
+<H2>Begriffe</H2>
+<P><A NAME="lebendig"></A>Lebendig: Ein System wird als lebendig
+bezeichnet, wenn alle in ihm befindlichen Auftr&auml;ge
+fertiggestellt werden k&ouml;nnen. Sie sich also nicht in einer
+Verklemmung oder einem &#132;Race&#147; befinden.</P>
+</BODY>
+</HTML> \ No newline at end of file
diff --git a/sj2/inc/sjapplet.hxx b/sj2/inc/sjapplet.hxx
new file mode 100644
index 000000000000..6f7a5ec7012a
--- /dev/null
+++ b/sj2/inc/sjapplet.hxx
@@ -0,0 +1,120 @@
+/*************************************************************************
+ *
+ * $RCSfile: sjapplet.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:54:02 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _SJ_SJAPPLET_HXX
+#define _SJ_SJAPPLET_HXX
+
+#include <tools/string.hxx>
+
+// **************************************************************
+//class stardiv_applet_AppletViewerPanel;
+// class stardiv_applet_AppletExecutionContext;
+// class java_awt_Frame;
+// class com_sun_star_comp_jawt_peer_EmbeddedFrame;
+// class java_awt_Window;
+// class XubString;
+// class SjJSbxObject;
+
+//#include <jni.h>
+
+class INetURLObject;
+class Size;
+class SjJScriptAppletObject;
+class SvCommandList;
+class Window;
+
+struct SjApplet2ImplStruct;
+
+enum SjNetAccess
+{
+ NET_UNRESTRICTED, NET_NONE, NET_HOST
+};
+
+class SjApplet2
+{
+ Window * _pParentWin;
+ SjApplet2ImplStruct * _pImpl;
+
+public:
+ static void settingsChanged(void);
+
+ SjApplet2();
+ ~SjApplet2();
+ void Init(Window * pParentWin, const INetURLObject & rDocBase, const SvCommandList & rCmdList);
+ void setSizePixel( const Size & );
+ void appletRestart();
+ void appletReload();
+ void appletStart();
+ void appletStop();
+ void appletClose();
+
+ // Fuer SO3, Wrapper fuer Applet liefern
+ SjJScriptAppletObject * GetJScriptApplet();
+
+ virtual void appletResize( const Size & ) = 0;
+ virtual void showDocument( const INetURLObject &, const XubString & ) = 0;
+ virtual void showStatus( const XubString & ) = 0;
+// virtual SjJSbxObject * getJScriptWindowObj() = 0;
+};
+
+
+
+#endif // _REF_HXX
diff --git a/sj2/prj/d.lst b/sj2/prj/d.lst
new file mode 100644
index 000000000000..e0246462b8b8
--- /dev/null
+++ b/sj2/prj/d.lst
@@ -0,0 +1,15 @@
+dos: mkdir %_DEST%\inc%_EXT%\sj2
+..\%__SRC%\class\classes.jar %_DEST%\bin%_EXT%\classes.jar
+hedabu: ..\inc\sjapplet.hxx %_DEST%\inc%_EXT%\sj2\sjapplet.hxx
+
+..\%__SRC%\lib\sj.lib %_DEST%\lib%_EXT%\sj.lib
+..\%__SRC%\lib\*.so %_DEST%\lib%_EXT%\*.so
+..\%__SRC%\slb\sj.lib %_DEST%\lib%_EXT%\xsj.lib
+..\%__SRC%\bin\j%UPD%*_g.dll %_DEST%\bin%_EXT%\j%UPD%*_g.dll
+
+dos: if "%GUI%" == "WIN" attrib -r %_DEST%\bin%_EXT%\sj%UPD%*.map
+dos: if "%GUI%" == "WIN" copy ..\%__SRC%\misc\sj%UPD%*.map %_DEST%\bin%_EXT%\sj2%UPD%*.map
+dos: if "%GUI%" == "WIN" attrib +r %_DEST%\bin%_EXT%\sj2%UPD%*.map
+dos: if "%GUI%" == "OS2" attrib -r %_DEST%\bin%_EXT%\sj2%UPD%*.map
+dos: if "%GUI%" == "OS2" copy ..\%__SRC%\misc\sj%UPD%*.map %_DEST%\bin%_EXT%\sj2%UPD%*.map
+dos: if "%GUI%" == "OS2" attrib +r %_DEST%\bin%_EXT%\sj2%UPD%*.map
diff --git a/sj2/source/inc/java_lang_object.hxx b/sj2/source/inc/java_lang_object.hxx
new file mode 100644
index 000000000000..b9c39252aeba
--- /dev/null
+++ b/sj2/source/inc/java_lang_object.hxx
@@ -0,0 +1,125 @@
+/*************************************************************************
+ *
+ * $RCSfile: java_lang_object.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:54:03 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#include <jni.h>
+#ifdef OS2
+#include <typedefs.h>
+#endif
+
+#ifndef _SJ_JAVA_LANG_OBJECT_HXX
+#define _SJ_JAVA_LANG_OBJECT_HXX
+
+#include <tools/string.hxx>
+
+
+#ifdef HAVE_64BIT_POINTERS
+#error "no 64 bit pointer"
+#else
+#ifdef OS2
+#define INT64_TO_PVOID(x) (void *)x.lo
+inline jlong Make_Os2_Int64( INT32 hi, INT32 lo ) {jlong x = CONST64( hi, lo ); return x; }
+#define PVOID_TO_INT64(x) Make_Os2_Int64( 0, (INT32)x )
+#else //OS2
+#define PVOID_TO_INT64(x) (jlong)(INT32)x
+#define INT64_TO_PVOID(x) (void *)x
+#endif //Os2
+#endif
+
+//=====================================================================
+class java_lang_Class;
+class java_lang_Object
+{
+ // Zuweisungsoperator und Copy Konstruktor sind verboten
+ java_lang_Object& operator = (java_lang_Object&) { return *this;};
+ java_lang_Object(java_lang_Object&) {};
+
+ static jclass getMyClass();
+ // nur zum Zerstoeren des C++ Pointers in vom JSbxObject
+ // abgeleiteten Java Objekten
+ //static jclass getJSbxObjectClass();
+
+protected:
+ // der JAVA Handle zu dieser Klasse
+ jobject object;
+ // Klassendefinition
+
+ // neu in SJ2:
+ static jclass theClass; // die Klasse braucht nur einmal angefordert werden !
+ static jclass theJSbxObjectClass; // die Klasse braucht nur einmal angefordert werden !
+ static ULONG nObjCount; // Zaehler fuer die Anzahl der Instanzen
+
+public:
+ // der Konstruktor, der fuer die abgeleiteten Klassen verwendet
+ // werden soll.
+ java_lang_Object( JNIEnv * pEnv, jobject myObj );
+ // der eigentliche Konstruktor
+ java_lang_Object();
+
+ virtual ~java_lang_Object();
+
+ void saveRef( JNIEnv * pEnv, jobject myObj );
+ jobject getJavaObject() const { return object; }
+ java_lang_Object * GetWrapper() { return this; }
+
+ java_lang_Class * getClass();
+
+};
+
+#endif
diff --git a/sj2/source/jscpp/makefile.mk b/sj2/source/jscpp/makefile.mk
new file mode 100644
index 000000000000..9b2d65e9ea44
--- /dev/null
+++ b/sj2/source/jscpp/makefile.mk
@@ -0,0 +1,103 @@
+#*************************************************************************
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.1.1.1 $
+#
+# last change: $Author: hr $ $Date: 2000-09-18 16:54:03 $
+#
+# The Contents of this file are made available subject to the terms of
+# either of the following licenses
+#
+# - GNU Lesser General Public License Version 2.1
+# - Sun Industry Standards Source License Version 1.1
+#
+# Sun Microsystems Inc., October, 2000
+#
+# GNU Lesser General Public License Version 2.1
+# =============================================
+# Copyright 2000 by Sun Microsystems, Inc.
+# 901 San Antonio Road, Palo Alto, CA 94303, USA
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License version 2.1, as published by the Free Software Foundation.
+#
+# This library 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 for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+#
+# Sun Industry Standards Source License Version 1.1
+# =================================================
+# The contents of this file are subject to the Sun Industry Standards
+# Source License Version 1.1 (the "License"); You may not use this file
+# except in compliance with the License. You may obtain a copy of the
+# License at http://www.openoffice.org/license.html.
+#
+# Software provided under this License is provided on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+# See the License for the specific provisions governing your rights and
+# obligations concerning the Software.
+#
+# The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+#
+# Copyright: 2000 by Sun Microsystems, Inc.
+#
+# All Rights Reserved.
+#
+# Contributor(s): _______________________________________
+#
+#
+#
+#*************************************************************************
+
+PRJ=..$/..
+
+PRJNAME=sj2
+TARGET=jscpp
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : $(PRJ)$/util$/makefile.pmk
+
+UNOUCRDEP=$(SOLARBINDIR)$/applicat.rdb
+UNOUCRRDB=$(SOLARBINDIR)$/applicat.rdb
+UNOUCROUT=$(OUT)$/inc
+
+# --- Files --------------------------------------------------------
+
+UNOTYPES= \
+ com.sun.star.uno.Exception \
+ com.sun.star.uno.XInterface \
+ com.sun.star.uno.TypeClass \
+ com.sun.star.awt.XControl \
+ com.sun.star.lang.XMultiServiceFactory \
+ com.sun.star.java.XJavaVM \
+ com.sun.star.java.XJavaThreadRegister_11
+
+
+CXXFILES= \
+ sjapplet.cxx \
+
+
+SLOFILES= \
+ $(SLO)$/sjapplet.obj \
+
+# .IF "$(GUI)"=="WNT"
+# SLOFILES += $(SLO)$/sun_awt_windows_package.obj
+# .ENDIF
+
+# --- Targets ------------------------------------------------------
+
+.INCLUDE : target.mk
+
+.INCLUDE : $(PRJ)$/util$/target.pmk
+
diff --git a/sj2/source/jscpp/sjapplet.cxx b/sj2/source/jscpp/sjapplet.cxx
new file mode 100644
index 000000000000..2df01d049958
--- /dev/null
+++ b/sj2/source/jscpp/sjapplet.cxx
@@ -0,0 +1,601 @@
+/*************************************************************************
+ *
+ * $RCSfile: sjapplet.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:54:03 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include <jnihelp.hxx>
+
+#include <sjapplet.hxx>
+
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+
+#include <unotools/processfactory.hxx>
+#include <rtl/ustring>
+
+#include <rtl/process.h>
+
+#include <jni.h>
+
+using namespace ::rtl;
+using namespace ::com::sun::star::lang;
+using namespace ::utl;
+
+#include <tools/urlobj.hxx>
+#include <tools/debug.hxx>
+#include <svtools/ownlist.hxx>
+#include <vcl/svapp.hxx>
+#include <vcl/window.hxx>
+#include <vcl/wrkwin.hxx>
+#include <vcl/syschild.hxx>
+
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::java;
+using namespace ::sj2;
+
+#include <com/sun/star/java/XJavaVM.hpp>
+
+struct SjApplet2ImplStruct {
+ JavaVM * _pJVM;
+ jobject _joAppletExecutionContext;
+ jobject _joFrame;
+ jclass _jcAppletExecutionContext;
+
+ Reference<XJavaVM> _xJavaVM;
+ Reference<XJavaThreadRegister_11> _xJavaThreadRegister_11;
+};
+
+SjApplet2::SjApplet2()
+ : _pParentWin(NULL),
+ _pImpl( new SjApplet2ImplStruct() )
+{
+}
+
+SjApplet2::~SjApplet2()
+{
+ if (_pImpl->_joAppletExecutionContext)
+ {
+ TKTThreadAttach jenv( _pImpl->_pJVM,
+ _pImpl->_xJavaThreadRegister_11.get()
+ );
+
+ jenv.pEnv->DeleteGlobalRef( _pImpl->_joAppletExecutionContext );
+ jenv.pEnv->DeleteGlobalRef( _pImpl->_joFrame );
+ jenv.pEnv->DeleteGlobalRef( _pImpl->_jcAppletExecutionContext );
+ }
+
+ delete _pImpl;
+}
+
+//=========================================================================
+void SjApplet2::Init( Window * pParentWin, const INetURLObject & rDocBase, const SvCommandList & rCmdList )
+{
+ Reference<XMultiServiceFactory> serviceManager(getProcessServiceFactory());
+
+ _pImpl->_xJavaVM = Reference<XJavaVM> (serviceManager->createInstance(OUString::createFromAscii("com.sun.star.java.JavaVirtualMachine")), UNO_QUERY);
+ _pImpl->_xJavaThreadRegister_11 = Reference<XJavaThreadRegister_11>(_pImpl->_xJavaVM, UNO_QUERY);
+
+ Sequence<sal_Int8> processID(16);
+ rtl_getGlobalProcessId((sal_uInt8 *)processID.getArray());
+ Any aVMPtr = _pImpl->_xJavaVM->getJavaVM(processID);
+ if( sizeof( _pImpl->_pJVM ) == sizeof( sal_Int32 ) )
+ {
+ // 32 bit system
+ sal_Int32 nP = 0;
+ aVMPtr >>= nP;
+ _pImpl->_pJVM = (JavaVM*)nP;
+ }
+ else if( sizeof( _pImpl->_pJVM ) == sizeof( sal_Int64 ) )
+ {
+ // 64 bit system
+ sal_Int64 nP = 0;
+ aVMPtr >>= nP;
+ _pImpl->_pJVM = (JavaVM*)nP;
+ }
+
+ TKTThreadAttach jenv(_pImpl->_pJVM, _pImpl->_xJavaThreadRegister_11.get());
+
+ // Java URL erzeugen
+ String aURL = rDocBase.GetMainURL();
+ if ( aURL.Len() )
+ {
+ //WorkAround, weil Java mit dem | nicht zurecht kommt
+ if( rDocBase.GetProtocol() == INET_PROT_FILE
+ && aURL.GetChar( (xub_StrLen)9 ) == INET_ENC_DELIM_TOKEN )
+ aURL = aURL.Insert( INET_DELIM_TOKEN, (xub_StrLen)9 );
+ }
+
+ jclass jcURL = jenv.pEnv->FindClass("java/net/URL");
+ jmethodID jmURL_rinit = jenv.pEnv->GetMethodID(jcURL, "<init>", "(Ljava/lang/String;)V");
+ jobject joDocBase = jenv.pEnv->AllocObject(jcURL);
+ jstring jsURL = jenv.pEnv->NewString( aURL.GetBuffer(), aURL.Len() );
+ jenv.pEnv->CallVoidMethod(joDocBase, jmURL_rinit, jsURL);
+
+ jclass jcHashtable = jenv.pEnv->FindClass("java/util/Hashtable");
+ jmethodID jmHashtable_rinit = jenv.pEnv->GetMethodID(jcHashtable, "<init>", "()V");
+ jmethodID jmHashtable_put = jenv.pEnv->GetMethodID(jcHashtable, "put", "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;");
+ jobject joParameters = jenv.pEnv->AllocObject(jcHashtable);
+ jenv.pEnv->CallVoidMethod(joParameters, jmHashtable_rinit);
+
+ for( ULONG i = 0; i < rCmdList.Count(); i++ ) {
+ const SvCommand & rCmd = rCmdList[i];
+ String aCmd = rCmd.GetCommand();
+ String aLoweredCmd = aCmd.ToLowerAscii();
+ jstring jsCommand = jenv.pEnv->NewString( aLoweredCmd.GetBuffer(), aLoweredCmd.Len() );
+ jstring jsArg = jenv.pEnv->NewString( rCmd.GetArgument().GetBuffer(), rCmd.GetArgument().Len() );
+ jenv.pEnv->CallVoidMethod(joParameters, jmHashtable_put, jsCommand, jsArg);
+ }
+
+
+ _pParentWin = pParentWin;
+
+#if defined(WNT) && defined(blblblblblblb)
+ if (WINDOW_SYSTEMCHILDWINDOW == pParentWin->GetType())
+ {
+ const SystemChildData* pCD = ((SystemChildWindow*) pParentWin)->GetSystemData();
+ if ( pCD )
+ // hier wird das C++-Wrapper-Objekt fuer ein Java-Objekt erzeugt
+ pWindow = new sun_awt_windows_WEmbeddedFrame((INT32)pCD->hWnd);
+ }
+ if (!pWindow)
+ pWindow = new sun_awt_windows_WEmbeddedFrame();
+#else
+ jclass jcFrame = jenv.pEnv->FindClass("java/awt/Frame");
+ jmethodID jmFrame_rinit = jenv.pEnv->GetMethodID(jcFrame, "<init>", "()V");
+ _pImpl->_joFrame = jenv.pEnv->AllocObject(jcFrame);
+ _pImpl->_joFrame = jenv.pEnv->NewGlobalRef(_pImpl->_joFrame);
+ jenv.pEnv->CallVoidMethod(_pImpl->_joFrame, jmFrame_rinit);
+#endif
+
+ jmethodID jmFrame_show = jenv.pEnv->GetMethodID(jcFrame, "show", "()V");
+ jenv.pEnv->CallVoidMethod(_pImpl->_joFrame, jmFrame_show);
+
+ _pImpl->_jcAppletExecutionContext = jenv.pEnv->FindClass("stardiv/applet/AppletExecutionContext");
+ _pImpl->_jcAppletExecutionContext = (jclass)jenv.pEnv->NewGlobalRef( _pImpl->_jcAppletExecutionContext );
+ jmethodID jmAppletExecutionContext_rinit = jenv.pEnv->GetMethodID(_pImpl->_jcAppletExecutionContext, "<init>", "(Ljava/net/URL;Ljava/util/Hashtable;Ljava/awt/Container;J)V");
+ jmethodID jmAppletExecutionContext_init = jenv.pEnv->GetMethodID(_pImpl->_jcAppletExecutionContext, "init", "()V");
+ jmethodID jmAppletExecutionContext_startUp = jenv.pEnv->GetMethodID(_pImpl->_jcAppletExecutionContext, "startUp", "()V");
+
+ _pImpl->_joAppletExecutionContext = jenv.pEnv->AllocObject(_pImpl->_jcAppletExecutionContext);
+ _pImpl->_joAppletExecutionContext = jenv.pEnv->NewGlobalRef(_pImpl->_joAppletExecutionContext);
+ jenv.pEnv->CallVoidMethod(_pImpl->_joAppletExecutionContext, jmAppletExecutionContext_rinit, joDocBase, joParameters, _pImpl->_joFrame, (jlong)0);
+ jenv.pEnv->CallVoidMethod(_pImpl->_joAppletExecutionContext, jmAppletExecutionContext_init);
+ jenv.pEnv->CallVoidMethod(_pImpl->_joAppletExecutionContext, jmAppletExecutionContext_startUp);
+
+// pWindow->setVisible(TRUE);
+
+// pAppletExecutionContext = new stardiv_applet_AppletExecutionContext_Impl(&aDocBase, &aHashtable, pWindow, this);
+// pAppletExecutionContext->init();
+
+// pAppletExecutionContext->startUp();
+}
+
+//=========================================================================
+void SjApplet2::setSizePixel( const Size & rSize )
+{
+// pWindow->setSize(rSize.Width(), rSize.Height());
+}
+
+void SjApplet2::appletRestart()
+{
+ TKTThreadAttach jenv(_pImpl->_pJVM, _pImpl->_xJavaThreadRegister_11.get());
+ jmethodID jmAppletExecutionContext_restart = jenv.pEnv->GetMethodID(_pImpl->_jcAppletExecutionContext, "restart", "()V");
+ jenv.pEnv->CallVoidMethod(_pImpl->_joAppletExecutionContext, jmAppletExecutionContext_restart);
+}
+
+void SjApplet2::appletReload()
+{
+ TKTThreadAttach jenv(_pImpl->_pJVM, _pImpl->_xJavaThreadRegister_11.get());
+ jmethodID jmAppletExecutionContext_reload = jenv.pEnv->GetMethodID(_pImpl->_jcAppletExecutionContext, "reload", "()V");
+ jenv.pEnv->CallVoidMethod(_pImpl->_joAppletExecutionContext, jmAppletExecutionContext_reload);
+}
+
+void SjApplet2::appletStart()
+{
+ TKTThreadAttach jenv(_pImpl->_pJVM, _pImpl->_xJavaThreadRegister_11.get());
+ jmethodID jmAppletExecutionContext_sendStart = jenv.pEnv->GetMethodID(_pImpl->_jcAppletExecutionContext, "sendStart", "()V");
+ jenv.pEnv->CallVoidMethod(_pImpl->_joAppletExecutionContext, jmAppletExecutionContext_sendStart);
+}
+
+void SjApplet2::appletStop()
+{
+ TKTThreadAttach jenv(_pImpl->_pJVM, _pImpl->_xJavaThreadRegister_11.get());
+ jmethodID jmAppletExecutionContext_sendStop = jenv.pEnv->GetMethodID(_pImpl->_jcAppletExecutionContext, "sendStop", "()V");
+ jenv.pEnv->CallVoidMethod(_pImpl->_joAppletExecutionContext, jmAppletExecutionContext_sendStop);
+}
+
+void SjApplet2::appletClose()
+{
+ if(_pImpl->_joAppletExecutionContext)
+ {
+ TKTThreadAttach jenv(_pImpl->_pJVM, _pImpl->_xJavaThreadRegister_11.get());
+ jmethodID jmAppletExecutionContext_shutdown = jenv.pEnv->GetMethodID(_pImpl->_jcAppletExecutionContext, "shutdown", "()V");
+ jenv.pEnv->CallVoidMethod(_pImpl->_joAppletExecutionContext, jmAppletExecutionContext_shutdown);
+ }
+
+// pWindow->dispose();
+
+ if( _pParentWin )
+ {
+ WorkWindow* pAppWin = Application::GetAppWindow();
+ if(pAppWin)
+ {
+ while(_pParentWin->GetChildCount())
+ {
+ Window* pChild = _pParentWin->GetChild(0);
+ pChild->Show( FALSE );
+ pChild->SetParent( pAppWin );
+ }
+ }
+ }
+
+// delete pWindow;
+// pWindow = NULL;
+}
+
+// Fuer SO3, Wrapper fuer Applet liefern
+SjJScriptAppletObject * SjApplet2::GetJScriptApplet()
+{
+ return NULL;
+}
+
+#ifdef _OLD_FEATURE
+class SjINetSettings : public ApplicationProperty
+/* [Beschreibung]
+
+ Diese Klasse repr"asentiert die Internet Einstellungen von Java.
+ Beim Initialisieren von Java werden, "uber die Methode
+ <Application::Property(...)>, die Einstellungen abgefragt.
+*/
+{
+ String aHttpProxy;
+ int nHttpProxyPort;
+ String aFtpProxy;
+ int nFtpProxyPort;
+ String aFirewallProxy;
+ int nFirewallProxyPort;
+public:
+ TYPEINFO();
+ SjINetSettings();
+
+ void SetHttpProxy( const String & rStr )
+ { aHttpProxy = rStr; }
+ const String & GetHttpProxy() const { return aHttpProxy; }
+ void SetHttpProxyPort( int n )
+ { nHttpProxyPort = n; }
+ int GetHttpProxyPort() const { return nHttpProxyPort; }
+
+ void SetFtpProxy( const String & rStr )
+ { aFtpProxy = rStr; }
+ const String & GetFtpProxy() const { return aFtpProxy; }
+ void SetFtpProxyPort( int n )
+ { nFtpProxyPort = n; }
+ int GetFtpProxyPort() const { return nFtpProxyPort; }
+
+ void SetFirewallProxy( const String & rStr )
+ { aFirewallProxy = rStr; }
+ const String & GetFirewallProxy() const { return aFirewallProxy; }
+ void SetFirewallProxyPort( int n )
+ { nFirewallProxyPort = n; }
+ int GetFirewallProxyPort() const { return nFirewallProxyPort; }
+};
+
+class SjJavaSettings : public ApplicationProperty
+/* [Beschreibung]
+
+ Diese Klasse repr"asentiert die allgemeinen Java Einstellungen.
+ Beim Initialisieren von Java werden, "uber die Methode
+ <Application::Property(...)>, die Einstellungen abgefragt.
+
+ JavaHomeDir ist das Installationsverzeichnis von Java.
+*/
+{
+ String aClassPath;
+ String aJavaHomeDir;
+ SjNetAccess eNetAccess;
+ UINT32 nNativeStackSize; // Stack size for native threads
+ UINT32 nJavaStackSize; // Stack size for Java threads
+ UINT32 nMinHeapSize; // Minimum heap size (default 0 -> Java-Default)
+ UINT32 nMaxHeapSize; // Maximum heap size (default 0 -> JavaDefault)
+
+ UINT32 nVerifyMode; // controls whether Java byte code should be verified:
+ // 0 -- none,
+ // 1 -- remotely loaded code,
+ // 2 -- all code.
+
+ BOOL bEnableClassGC; // default set to TRUE
+ BOOL bEnableVerboseGC; // default set to FALSE
+ BOOL bEnableAsyncGC; // default set to TRUE
+ BOOL bVerbose; // Switch the verbose mode of the VM
+ BOOL bDebugging; // Enables or disable the debugging VM
+ UINT32 nDebugPort; // Set the debug port. Only valid with bDebugging = TRUE
+ BOOL bSecurity; // TRUE, sandbox security enabled. FALSE, no security. Default set to TRUE.
+
+public:
+
+ TYPEINFO();
+ SjJavaSettings();
+
+ void SetClassPath( const String & rStr )
+ { aClassPath = rStr; }
+ const String & GetClassPath() const { return aClassPath; }
+
+ void SetJavaHomeDir( const String & rStr )
+ { aJavaHomeDir = rStr; }
+ const String & GetJavaHomeDir() const { return aJavaHomeDir; }
+
+ void SetNetAccess( SjNetAccess eAcc )
+ { eNetAccess = eAcc; }
+ SjNetAccess GetNetAccess() const { return eNetAccess; }
+
+ // nSize == 0 -> Systemdefault
+ void SetMinHeapSize( UINT32 nSize )
+ { nMinHeapSize = nSize; }
+ UINT32 GetMinHeapSize() const { return nMinHeapSize; }
+
+ // nSize == 0 -> Systemdefault
+ void SetMaxHeapSize( UINT32 nSize )
+ { nMaxHeapSize = nSize; }
+ UINT32 GetMaxHeapSize() const { return nMaxHeapSize; }
+
+ // nSize == 0 -> Systemdefault
+ void SetNativeStackSize( UINT32 nSize )
+ { nNativeStackSize = nSize; }
+ UINT32 GetNativeStackSize() const { return nNativeStackSize; }
+
+ // nSize == 0 -> Systemdefault
+ void SetJavaStackSize( UINT32 nSize )
+ { nJavaStackSize = nSize; }
+ UINT32 GetJavaStackSize() const { return nJavaStackSize; }
+
+ // default = 2 -> remotely loaded code
+ void SetVerifyMode( UINT32 nSize )
+ { nVerifyMode = nSize; }
+ UINT32 GetVerifyMode() const { return nVerifyMode; }
+
+ void EnableClassGC( BOOL bEnable )
+ { bEnableClassGC = bEnable; }
+ UINT32 IsClassGCEnabled() const { return bEnableClassGC; }
+
+ void EnableVerboseGC( BOOL bEnable )
+ { bEnableVerboseGC = bEnable; }
+ UINT32 IsVerboseGCEnabled() const { return bEnableVerboseGC; }
+
+ void EnableAsyncGC( BOOL bEnable )
+ { bEnableAsyncGC = bEnable; }
+ UINT32 IsAsyncGCEnabled() const { return bEnableAsyncGC; }
+
+ void EnableVerboseVM( BOOL bEnable )
+ { bVerbose = bEnable; }
+ UINT32 IsVerboseVMEnabled() const { return bVerbose; }
+
+ void EnableDebugging( BOOL bEnable )
+ { bDebugging = bEnable; }
+ UINT32 IsDebuggingEnabled() const { return bDebugging; }
+
+ void SetDebugPort( UINT32 nPort )
+ { nDebugPort = nPort; }
+ UINT32 GetDebugPort() const { return nDebugPort; }
+
+
+ void EnableSecurity( BOOL bEnable )
+ { bSecurity = bEnable; }
+ BOOL IsSecurityEnabled() const { return bSecurity; }
+
+};
+
+
+TYPEINIT1( SjJavaSettings, ApplicationProperty )
+SjJavaSettings::SjJavaSettings()
+/* [Beschreibung]
+
+ Im Konstruktor werden die Einstellungen des Classpath und JavaHome
+ auf die Environment Variablen "classpath" und "java_home" initialisiert.
+*/
+ : eNetAccess( NET_HOST )
+ , nNativeStackSize( 0 )
+ , nJavaStackSize( 0 )
+ , nMinHeapSize( 0 )
+ , nMaxHeapSize( 0 )
+ , nVerifyMode( 1 )
+ , bEnableClassGC( TRUE )
+ , bEnableVerboseGC( FALSE )
+ , bEnableAsyncGC( TRUE )
+ , bDebugging( FALSE )
+ , nDebugPort( 0 )
+ , bSecurity( TRUE )
+{
+}
+
+//=========================================================================
+//=========================================================================
+//=========================================================================
+TYPEINIT1( SjINetSettings, ApplicationProperty )
+SjINetSettings::SjINetSettings()
+/* [Beschreibung]
+
+ Die Proxy-Servernamen werden auf "" und die Port auf 0 initialisiert.
+*/
+ : nHttpProxyPort( 0 )
+ , nFtpProxyPort( 0 )
+ , nFirewallProxyPort( 0 )
+{
+}
+#endif // _OLD_FEATURE
+
+
+/*
+ * Java init function to invoke Java runtime using JNI invocation API.
+ */
+
+void JRE_PropertyChanged( JNIEnv * env, const SvCommandList & rCmdList )
+{
+ jclass pClass = env->FindClass("java/util/Properties");
+ if( !pClass )
+ return;
+
+ jmethodID mCtor = env->GetMethodID( pClass, "<init>", "()V" );
+ jobject pProps = env->NewObject( pClass, mCtor, NULL );
+
+ char * pSignature = "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;";
+ char * pMethodName = "put";
+ jmethodID mPut = env->GetMethodID( pClass, pMethodName, pSignature );
+ env->DeleteLocalRef( pClass );
+
+ if( !mCtor || !pProps || ! mPut )
+ return;
+
+ for( ULONG i = 0; i < rCmdList.Count(); i++ )
+ {
+ const SvCommand & rCmd = rCmdList[i];
+ jstring pCommand = env->NewString( rCmd.GetCommand().GetBuffer(), rCmd.GetCommand().Len() );
+ jstring pArg = env->NewString( rCmd.GetArgument().GetBuffer(), rCmd.GetArgument().Len() );
+
+ jobject hTmp = env->CallObjectMethod( pProps, mPut, pCommand, pArg );
+ env->DeleteLocalRef( hTmp );
+ env->DeleteLocalRef( pCommand );
+ env->DeleteLocalRef( pArg );
+ }
+
+ pClass = env->FindClass("stardiv/controller/SjSettings");
+
+ if( !pClass )
+ return;
+
+ jmethodID mid = env->GetStaticMethodID( pClass , "changeProperties", "(Ljava/util/Properties;)V");
+ if( !mid )
+ return;
+
+ env->CallStaticVoidMethod( pClass, mid, pProps );
+ env->DeleteLocalRef( pProps );
+ env->DeleteLocalRef( pClass );
+}
+
+
+void SjApplet2::settingsChanged(void)
+{
+ Reference<XMultiServiceFactory> serviceManager(getProcessServiceFactory());
+
+ Reference<XJavaVM> xJavaVM(serviceManager->createInstance(OUString::createFromAscii("com.sun.star.java.JavaVirtualMachine")), UNO_QUERY);
+
+ if(xJavaVM->isVMStarted())
+ {
+ Reference<XJavaThreadRegister_11> xJavaThreadRegister_11(xJavaVM, UNO_QUERY);
+
+ Sequence<sal_Int8> processID(16);
+ rtl_getGlobalProcessId((sal_uInt8 *)processID.getArray());
+ JavaVM * pJVM = (JavaVM *)xJavaVM->getJavaVM(processID).getValue();
+ TKTThreadAttach jenv(pJVM, xJavaThreadRegister_11.get());
+
+ if( jenv.pEnv)
+ {
+ DBG_ERROR( "SjApplet2::settingsChanged not implemented" );
+#ifdef _OLD_FEATURE
+
+ SjINetSettings aINetSettings;
+ GetpApp()->Property(aINetSettings);
+ SjJavaSettings aJSettings;
+ GetpApp()->Property(aJSettings);
+
+ SvCommandList aCmdList;
+ // Security Settings
+ switch ( aJSettings.GetNetAccess() )
+ {
+ case NET_UNRESTRICTED:
+ aCmdList.Append( String::CreateFromAscii("appletviewer.security.mode"),
+ String::CreateFromAscii("unrestricted") );
+ break;
+
+ case NET_NONE:
+ aCmdList.Append( String::CreateFromAscii("appletviewer.security.mode"),
+ String::CreateFromAscii("none") );
+ break;
+
+ case NET_HOST:
+ aCmdList.Append( String::CreateFromAscii("appletviewer.security.mode"),
+ String::CreateFromAscii("host") );
+ break;
+ }
+ if ( aJSettings.IsSecurityEnabled() )
+ aCmdList.Append( String::CreateFromAscii("stardiv.security.disableSecurity"),
+ String::CreateFromAscii("false") );
+ else
+ aCmdList.Append( String::CreateFromAscii("stardiv.security.disableSecurity"),
+ String::CreateFromAscii("true") );
+
+ // HTTP settings
+ aCmdList.Append( String::CreateFromAscii("http.proxyHost"),
+ aINetSettings.GetHttpProxy());
+ aCmdList.Append( String::CreateFromAscii("http.proxyPort"),
+ aINetSettings.GetHttpProxyPort());
+
+ // Ftp settings
+ if( aINetSettings.GetFtpProxy().Len() )
+ aCmdList.Append( String::CreateFromAscii("ftpProxySet"), String::CreateFromAscii("true") );
+ else
+ aCmdList.Append( String::CreateFromAscii("ftpProxySet"), String::CreateFromAscii("false") );
+
+ aCmdList.Append( String::CreateFromAscii("ftpProxyHost"), aINetSettings.GetFtpProxy());
+ aCmdList.Append( String::CreateFromAscii("ftpProxyPort"), aINetSettings.GetFtpProxyPort());
+
+ JRE_PropertyChanged(jenv.pEnv, aCmdList);
+#endif //_OLD_FEATURE
+ }
+ }
+}
+
diff --git a/sj2/stardiv/app/AppletMessageHandler.java b/sj2/stardiv/app/AppletMessageHandler.java
new file mode 100644
index 000000000000..401a8332f5f7
--- /dev/null
+++ b/sj2/stardiv/app/AppletMessageHandler.java
@@ -0,0 +1,148 @@
+/*************************************************************************
+ *
+ * $RCSfile: AppletMessageHandler.java,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:54:03 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+package stardiv.app;
+
+import java.util.ResourceBundle;
+import java.util.MissingResourceException;
+import java.text.MessageFormat;
+
+/**
+ * An hanlder of localized messages.
+ *
+ * @version 1.8, 03/03/97
+ * @author Koji Uno
+ */
+public class AppletMessageHandler {
+ private static ResourceBundle rb;
+ private String baseKey = null;
+
+ static {
+ try {
+ rb = ResourceBundle.getBundle("stardiv.app.MsgAppletViewer");
+ } catch (MissingResourceException e) {
+ System.out.println(e.getMessage());
+ }
+ };
+
+ public AppletMessageHandler(String baseKey) {
+ this.baseKey = baseKey;
+ }
+
+ public String getMessage(String key) {
+ return (String)rb.getString(getQualifiedKey(key));
+ }
+
+ public String getMessage(String key, Object arg){
+ String basemsgfmt = (String)rb.getString(getQualifiedKey(key));
+ MessageFormat msgfmt = new MessageFormat(basemsgfmt);
+ Object msgobj[] = new Object[1];
+ if (arg == null) {
+ arg = "null"; // mimic java.io.PrintStream.print(String)
+ }
+ msgobj[0] = arg;
+ return msgfmt.format(msgobj);
+ }
+
+ public String getMessage(String key, Object arg1, Object arg2) {
+ String basemsgfmt = (String)rb.getString(getQualifiedKey(key));
+ MessageFormat msgfmt = new MessageFormat(basemsgfmt);
+ Object msgobj[] = new Object[2];
+ if (arg1 == null) {
+ arg1 = "null";
+ }
+ if (arg2 == null) {
+ arg2 = "null";
+ }
+ msgobj[0] = arg1;
+ msgobj[1] = arg2;
+ return msgfmt.format(msgobj);
+ }
+
+ public String getMessage(String key, Object arg1, Object arg2, Object arg3) {
+ String basemsgfmt = (String)rb.getString(getQualifiedKey(key));
+ MessageFormat msgfmt = new MessageFormat(basemsgfmt);
+ Object msgobj[] = new Object[3];
+ if (arg1 == null) {
+ arg1 = "null";
+ }
+ if (arg2 == null) {
+ arg2 = "null";
+ }
+ if (arg3 == null) {
+ arg3 = "null";
+ }
+ msgobj[0] = arg1;
+ msgobj[1] = arg2;
+ msgobj[2] = arg3;
+ return msgfmt.format(msgobj);
+ }
+
+ public String getMessage(String key, Object arg[]) {
+ String basemsgfmt = (String)rb.getString(getQualifiedKey(key));
+ MessageFormat msgfmt = new MessageFormat(basemsgfmt);
+ return msgfmt.format(arg);
+ }
+
+ public String getQualifiedKey(String subKey) {
+ return baseKey + "." + subKey;
+ }
+}
diff --git a/sj2/stardiv/app/AppletProps.java b/sj2/stardiv/app/AppletProps.java
new file mode 100644
index 000000000000..5b13d4febe76
--- /dev/null
+++ b/sj2/stardiv/app/AppletProps.java
@@ -0,0 +1,221 @@
+/*************************************************************************
+ *
+ * $RCSfile: AppletProps.java,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:54:03 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+package stardiv.app;
+
+import stardiv.app.AppletMessageHandler;
+import stardiv.applet.AppletExecutionContext;
+
+import java.awt.*;
+import java.io.*;
+import java.util.Properties;
+import sun.net.www.http.HttpClient;
+import sun.net.ftp.FtpClient;
+
+public class AppletProps extends Frame {
+ TextField proxyHost;
+ TextField proxyPort;
+ Choice networkMode;
+ Choice accessMode;
+ Choice unsignedMode;
+
+ AppletExecutionContext appletExecutionContext;
+
+ AppletProps(AppletExecutionContext appletExecutionContext) {
+ this.appletExecutionContext = appletExecutionContext;
+
+ setTitle(amh.getMessage("title"));
+ Panel p = new Panel();
+ p.setLayout(new GridLayout(0, 2));
+
+ p.add(new Label(amh.getMessage("label.http.server", "Http proxy server:")));
+ p.add(proxyHost = new TextField());
+
+ p.add(new Label(amh.getMessage("label.http.proxy")));
+ p.add(proxyPort = new TextField());
+
+ p.add(new Label(amh.getMessage("label.network")));
+ p.add(networkMode = new Choice());
+ networkMode.addItem(amh.getMessage("choice.network.item.none"));
+ networkMode.addItem(amh.getMessage("choice.network.item.applethost"));
+ networkMode.addItem(amh.getMessage("choice.network.item.unrestricted"));
+
+ String securityMode = System.getProperty("appletviewer.security.mode");
+ securityMode = (securityMode == null) ? "none" : securityMode;
+ securityMode = securityMode.equals("host") ? "applethost" : securityMode;
+ networkMode.select(amh.getMessage("choice.network.item." + securityMode));
+
+ p.add(new Label(amh.getMessage("label.class")));
+ p.add(accessMode = new Choice());
+ accessMode.addItem(amh.getMessage("choice.class.item.restricted"));
+ accessMode.addItem(amh.getMessage("choice.class.item.unrestricted"));
+
+ accessMode.select(Boolean.getBoolean("package.restrict.access.sun")
+ ? amh.getMessage("choice.class.item.restricted")
+ : amh.getMessage("choice.class.item.unrestricted"));
+
+ p.add(new Label(amh.getMessage("label.unsignedapplet")));
+ p.add(unsignedMode = new Choice());
+ unsignedMode.addItem(amh.getMessage("choice.unsignedapplet.no"));
+ unsignedMode.addItem(amh.getMessage("choice.unsignedapplet.yes"));
+
+ add("Center", p);
+ p = new Panel();
+ p.add(new Button(amh.getMessage("button.apply")));
+ p.add(new Button(amh.getMessage("button.reset")));
+ p.add(new Button(amh.getMessage("button.cancel")));
+ add("South", p);
+ setLocation(200, 150);
+ pack();
+ reset();
+ }
+
+ void reset() {
+ // if (Boolean.getBoolean("package.restrict.access.sun")) {
+ // accessMode.select(amh.getMessage("choice.class.item.restricted"));
+ // } else {
+ // accessMode.select(amh.getMessage("choice.class.item.unrestricted"));
+ // }
+
+ if (System.getProperty("http.proxyHost") != null) {
+ proxyHost.setText(System.getProperty("http.proxyHost"));
+ proxyPort.setText(System.getProperty("http.proxyPort"));
+ HttpClient.proxyPort = Integer.valueOf(System.getProperty("http.proxyPort")).intValue();
+ }
+ else {
+ proxyHost.setText("");
+ proxyPort.setText("");
+ }
+
+ // if (Boolean.getBoolean("appletviewer.security.allowUnsigned")) {
+ // unsignedMode.select(amh.getMessage("choice.unsignedapplet.yes"));
+ // } else {
+ // unsignedMode.select(amh.getMessage("choice.unsignedapplet.no"));
+ // }
+ }
+
+ void apply() {
+ // Get properties, set version
+ Properties props = System.getProperties();
+ if (proxyHost.getText().length() > 0) {
+ props.put("http.proxyHost", proxyHost.getText().trim());
+ props.put("http.proxyPort", proxyPort.getText().trim());
+ } else {
+ props.remove("http.proxyHost");
+ }
+ if ("None".equals(networkMode.getSelectedItem())) {
+ props.put("appletviewer.security.mode", "none");
+ } else if ("Unrestricted".equals(networkMode.getSelectedItem())) {
+ props.put("appletviewer.security.mode", "unrestricted");
+ } else {
+ props.put("appletviewer.security.mode", "host");
+ }
+
+ if ("Restricted".equals(accessMode.getSelectedItem())) {
+ props.put("package.restrict.access.sun", "true");
+ props.put("package.restrict.access.netscape", "true");
+ props.put("package.restrict.access.stardiv", "true");
+ } else {
+ props.put("package.restrict.access.sun", "false");
+ props.put("package.restrict.access.netscape", "false");
+ props.put("package.restrict.access.stardiv", "false");
+ }
+
+ if ("Yes".equals(unsignedMode.getSelectedItem())) {
+ props.put("appletviewer.security.allowUnsigned", "true");
+ } else {
+ props.put("appletviewer.security.allowUnsigned", "false");
+ }
+
+ // Save properties
+ try {
+ reset();
+
+ FileOutputStream out = new FileOutputStream(AppletViewer.theUserPropertiesFile);
+ props.save(out, "AppletViewer");
+ out.close();
+ setVisible( false );
+ } catch (IOException e) {
+ System.out.println(amh.getMessage("apply.exception", e));
+ e.printStackTrace();
+ reset();
+ }
+ }
+
+ public boolean action(Event evt, Object obj) {
+ if (amh.getMessage("button.apply").equals(obj)) {
+ apply();
+ return true;
+ }
+ if (amh.getMessage("button.reset").equals(obj)) {
+ reset();
+ return true;
+ }
+ if (amh.getMessage("button.cancel").equals(obj)) {
+ setVisible( false );
+ return true;
+ }
+ return false;
+ }
+
+ private static AppletMessageHandler amh = new AppletMessageHandler("appletprops");
+
+}
diff --git a/sj2/stardiv/app/AppletViewer.java b/sj2/stardiv/app/AppletViewer.java
new file mode 100644
index 000000000000..0104eebdc5de
--- /dev/null
+++ b/sj2/stardiv/app/AppletViewer.java
@@ -0,0 +1,1025 @@
+/*************************************************************************
+ *
+ * $RCSfile: AppletViewer.java,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:54:03 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+package stardiv.app;
+
+import java.awt.Toolkit;
+
+import java.net.InetAddress;
+
+//import stardiv.applet.AppletMessageHandler;
+import stardiv.applet.AppletExecutionContext;
+import stardiv.applet.DocumentProxy;
+
+//import stardiv.js.ip.RootTaskManager;
+//import stardiv.js.ip.BaseObj;
+//import stardiv.js.ide.Ide;
+//import stardiv.js.ne.RunTime;
+//import stardiv.js.base.IdentifierPool;
+//import stardiv.js.base.Identifier;
+//import stardiv.memory.AtomUnion;
+//import stardiv.js.ip.Ctor;
+import stardiv.controller.SjSettings;
+
+import java.util.*;
+import java.io.*;
+import java.awt.*;
+import java.awt.event.*;
+import java.applet.*;
+import java.net.URL;
+import java.net.MalformedURLException;
+
+
+/**
+ * A frame to show the applet tag in.
+ */
+class TextFrame extends Frame {
+ /**
+ * Create the tag frame.
+ */
+ TextFrame(int x, int y, String title, String text) {
+ setTitle(title);
+ TextArea txt = new TextArea(20, 60);
+ txt.setText(text);
+ txt.setEditable(false);
+
+ add("Center", txt);
+
+ Panel p = new Panel();
+ add("South", p);
+ Button b = new Button(amh.getMessage("button.dismiss", "Dismiss"));
+ p.add(b);
+
+ class ActionEventListener implements ActionListener {
+ public void actionPerformed(ActionEvent evt) {
+ dispose();
+ }
+ }
+ b.addActionListener(new ActionEventListener());
+
+ pack();
+ setLocation(x, y);
+ setVisible(true);
+
+ WindowListener windowEventListener = new WindowAdapter() {
+
+ public void windowClosing(WindowEvent evt) {
+ dispose();
+ }
+ };
+
+ addWindowListener(windowEventListener);
+ }
+ private static AppletMessageHandler amh = new AppletMessageHandler("textframe");
+
+}
+
+/**
+ * The toplevel applet viewer.
+ */
+public class AppletViewer extends Frame implements Observer {
+ com.sun.star.lib.sandbox.ResourceViewer resourceViewer;
+
+ /**
+ * Some constants...
+ */
+ private static String defaultSaveFile = "Applet.ser";
+
+ /**
+ * Look here for the properties file
+ */
+ public static File theUserPropertiesFile;
+ public static File theAppletViewerPropsFile;
+
+ //private Ide aIde;
+ //private RootTaskManager aRTM;
+ //private BaseObj aRootObj;
+
+ private AppletExecutionContext appletExecutionContext = null;
+ Hashtable atts = null;
+
+ static DocumentProxy documentViewer = null;
+
+ /**
+ * The status line.
+ */
+ Label label;
+
+ /**
+ * output status messages to this stream
+ */
+
+ PrintStream statusMsgStream;
+
+ static Vector contexts = new Vector();
+
+ private final class UserActionListener implements ActionListener {
+ public void actionPerformed(ActionEvent evt) {
+ processUserAction(evt);
+ }
+ }
+
+ static {
+ String sep = File.separator;
+
+ File userHome = new File(System.getProperty("user.home"));
+
+ File AVHome = new File(userHome, ".hotjava");
+ // ensure the props folder can be made
+ AVHome.mkdirs();
+
+ theUserPropertiesFile = new File(AVHome, "properties");
+ File JH = new File(System.getProperty("java.home"));
+ theAppletViewerPropsFile = new File(JH, "lib" + sep + "appletviewer.properties");
+ };
+
+ /**
+ * Create the applet viewer
+ */
+ public AppletViewer(int x, int y, URL doc, Hashtable atts, PrintStream statusMsgStream) {
+// resourceViewer = new stardiv.util.ResourceViewer();
+// resourceViewer.show();
+ System.err.println("#*#*#*:" + sun.awt.ScreenUpdater.updater);
+ this.statusMsgStream = statusMsgStream;
+ this.atts = atts;
+
+ setTitle(amh.getMessage("tool.title", atts.get("code")));
+
+ MenuBar mb = new MenuBar();
+
+ Menu m = new Menu(amh.getMessage("menu.applet"));
+
+ addMenuItem(m, "menuitem.restart");
+ addMenuItem(m, "menuitem.reload");
+ addMenuItem(m, "menuitem.stop");
+ addMenuItem(m, "menuitem.save");
+ addMenuItem(m, "menuitem.start");
+ addMenuItem(m, "menuitem.clone");
+ m.add(new MenuItem("-"));
+ addMenuItem(m, "menuitem.tag");
+ addMenuItem(m, "menuitem.info");
+ addMenuItem(m, "menuitem.edit").setEnabled( false );
+ addMenuItem(m, "menuitem.encoding");
+ m.add(new MenuItem("-"));
+ addMenuItem(m, "menuitem.print");
+ m.add(new MenuItem("-"));
+ addMenuItem(m, "menuitem.props");
+ m.add(new MenuItem("-"));
+ addMenuItem(m, "menuitem.close");
+ // if (factory.isStandalone()) {
+ addMenuItem(m, "menuitem.quit");
+ // }
+
+ mb.add(m);
+
+ setMenuBar(mb);
+
+ addWindowListener(new WindowAdapter() {
+ public void windowClosing(WindowEvent evt) {
+ appletExecutionContext.shutdown();
+ }
+
+ public void windowIconified(WindowEvent evt) {
+ appletExecutionContext.sendLoad();
+ }
+
+ public void windowDeiconified(WindowEvent evt) {
+ appletExecutionContext.sendStart();
+ }
+ });
+
+ add("South", label = new Label(amh.getMessage("label.hello")));
+
+ appletExecutionContext = new AppletExecutionContext(doc, atts, this, 0);
+ appletExecutionContext.init();
+
+ appletExecutionContext.addObserver(this);
+ contexts.addElement(appletExecutionContext);
+
+ pack();
+ setVisible(true);
+
+// appletExecutionContext.send();
+ appletExecutionContext.startUp();
+
+/*
+ if( atts.get( "mayscript" ) != null ) {
+ aIde = new Ide();
+ aRTM = aIde.getActRootTaskManager();
+ aRootObj = new BaseObj( aRTM );
+ //Ctor aCtor = new AppletCtor( aRTM, "Window" );
+ //aRootObj.initProperties( aCtor, aCtor.getStaticPropCount(), aCtor.getBasePropCount() );
+ //aRootObj.setCtor( aCtor );
+ aRTM.setRootObj( aRootObj );
+ RunTime aRT = new RunTime( aRootObj, aRTM );
+ aIde.setRootObj( aRootObj );
+
+ AtomUnion aAU = new AtomUnion();
+ BaseObj aDocument = new BaseObj( aRTM );
+ aAU.setObject( aDocument );
+ Identifier aId = IdentifierPool.aGlobalPool.addIdentifier( "RootObject" );
+ aRootObj.newProperty( aId, aAU );
+ IdentifierPool.aGlobalPool.releaseIdentifier( aId );
+
+ String pName = (String)atts.get( "name" );
+ if( pName != null ) {
+ BaseObj aApplet = new BaseObj( aRTM );
+ aAU.setObject( aApplet );
+ aId = IdentifierPool.aGlobalPool.addIdentifier( pName );
+ aDocument.newProperty( aId, aAU );
+ IdentifierPool.aGlobalPool.releaseIdentifier( aId );
+ }
+ }
+ */
+ }
+
+ public MenuItem addMenuItem(Menu m, String s) {
+ MenuItem mItem = new MenuItem(amh.getMessage(s));
+ mItem.addActionListener(new UserActionListener());
+ return m.add(mItem);
+ }
+
+ /**
+ * Ignore.
+ */
+ public void showDocument(URL url) {
+ }
+
+ /**
+ * Ignore.
+ */
+ public void showDocument(URL url, String target) {
+ }
+
+ /**
+ * Show status.
+ */
+ public void showStatus(String status) {
+ label.setText(status);
+ }
+
+ public void update(Observable observable, Object status) {
+ showStatus((String)status);
+ }
+
+ public Object getJavaScriptJSObjectWindow() {
+ //if( aRootObj != null )
+ // return aRootObj.getJSObject();
+ return null;
+ }
+
+
+ /**
+ * System parameters.
+ */
+ static Hashtable systemParam = new Hashtable();
+
+ static {
+ systemParam.put("codebase", "codebase");
+ systemParam.put("code", "code");
+ systemParam.put("alt", "alt");
+ systemParam.put("width", "width");
+ systemParam.put("height", "height");
+ systemParam.put("align", "align");
+ systemParam.put("vspace", "vspace");
+ systemParam.put("hspace", "hspace");
+ }
+
+ /**
+ * Print the HTML tag.
+ */
+ public static void printTag(PrintStream out, Hashtable atts) {
+ out.print("<applet");
+
+ String v = (String)atts.get("codebase");
+ if (v != null) {
+ out.print(" codebase=\"" + v + "\"");
+ }
+
+ v = (String)atts.get("code");
+ if (v == null) {
+ v = "applet.class";
+ }
+ out.print(" code=\"" + v + "\"");
+ v = (String)atts.get("width");
+ if (v == null) {
+ v = "150";
+ }
+ out.print(" width=" + v);
+
+ v = (String)atts.get("height");
+ if (v == null) {
+ v = "100";
+ }
+ out.print(" height=" + v);
+
+ v = (String)atts.get("name");
+ if (v != null) {
+ out.print(" name=\"" + v + "\"");
+ }
+ out.println(">");
+
+ // A very slow sorting algorithm
+ int len = atts.size();
+ String params[] = new String[len];
+ len = 0;
+ for (Enumeration e = atts.keys() ; e.hasMoreElements() ;) {
+ String param = (String)e.nextElement();
+ int i = 0;
+ for (; i < len ; i++) {
+ if (params[i].compareTo(param) >= 0) {
+ break;
+ }
+ }
+ System.arraycopy(params, i, params, i + 1, len - i);
+ params[i] = param;
+ len++;
+ }
+
+ for (int i = 0 ; i < len ; i++) {
+ String param = params[i];
+ if (systemParam.get(param) == null) {
+ out.println("<param name=" + param +
+ " value=\"" + atts.get(param) + "\">");
+ }
+ }
+ out.println("</applet>");
+ }
+
+ /**
+ * Make sure the atrributes are uptodate.
+ */
+ public void updateAtts() {
+ Dimension d = getSize();
+ Insets in = getInsets();
+ atts.put("width", new Integer(d.width - (in.left + in.right)).toString());
+ atts.put("height", new Integer(d.height - (in.top + in.bottom)).toString());
+ }
+
+ /**
+ * Save the applet to a well known file (for now) as a serialized object
+ */
+ void appletSave() {
+ // REMIND -- should check that the applet has really stopped
+ FileDialog fd = new FileDialog(this, "Serialize Applet into File", FileDialog.SAVE);
+ // needed for a bug under Solaris...
+ fd.setDirectory(System.getProperty("user.dir"));
+ fd.setFile(defaultSaveFile);
+ fd.show();
+ String fname = fd.getFile();
+ if (fname == null) {
+ return; // cancelled
+ }
+ String dname = fd.getDirectory();
+ File file = new File(dname, fname);
+
+ try {
+ OutputStream s = new FileOutputStream(file);
+ ObjectOutputStream os = new ObjectOutputStream(s);
+ showStatus(amh.getMessage("appletsave.err1",
+ appletExecutionContext.getApplet().toString(), file.toString()));
+ os.writeObject(appletExecutionContext.getApplet());
+ } catch (IOException ex) {
+ System.err.println(amh.getMessage("appletsave.err2", ex));
+ }
+ }
+
+ /**
+ * Clone the viewer and the applet.
+ */
+ void appletClone() {
+ Point p = getLocation();
+ updateAtts();
+ // factory.createAppletViewer(p.x + 30, p.y + 10,
+ // pHelper.panel.documentURL, (Hashtable)pHelper.panel.atts.clone());
+ }
+
+ /**
+ * Show the applet tag.
+ */
+ void appletTag() {
+ ByteArrayOutputStream out = new ByteArrayOutputStream();
+ updateAtts();
+ printTag(new PrintStream(out), atts);
+ showStatus(amh.getMessage("applettag"));
+
+ Point p = getLocation();
+ new TextFrame(p.x + 50, p.y + 20, amh.getMessage("applettag.textframe"), out.toString());
+ }
+
+ /**
+ * Show the applet info.
+ */
+ void appletInfo() {
+ String str = appletExecutionContext.getApplet().getAppletInfo();
+ if (str == null) {
+ str = amh.getMessage("appletinfo.applet");
+ }
+ str += "\n\n";
+
+ String atts[][] = appletExecutionContext.getApplet().getParameterInfo();
+ if (atts != null) {
+ for (int i = 0 ; i < atts.length ; i++) {
+ str += atts[i][0] + " -- " + atts[i][1] + " -- " + atts[i][2] + "\n";
+ }
+ } else {
+ str += amh.getMessage("appletinfo.param");
+ }
+
+ Point p = getLocation();
+ new TextFrame(p.x + 50, p.y + 20, amh.getMessage("appletinfo.textframe"), str);
+
+ }
+
+ /**
+ * Show character encoding type
+ */
+ void appletCharacterEncoding() {
+ showStatus(amh.getMessage("appletencoding", encoding));
+ }
+
+ /**
+ * Edit the applet.
+ */
+ void appletEdit() {
+ }
+
+ /**
+ * Print the applet.
+ */
+ void appletPrint() {
+ PrintJob pj = Toolkit.getDefaultToolkit().
+ getPrintJob(this, amh.getMessage("appletprint.printjob"), (Properties)null);
+
+
+ if (pj != null) {
+ Dimension pageDim = pj.getPageDimension();
+ int pageRes = pj.getPageResolution();
+ boolean lastFirst = pj.lastPageFirst();
+
+ Graphics g = pj.getGraphics();
+ if (g != null) {
+ appletExecutionContext.getApplet().printComponents(g);
+ g.dispose();
+ } else {
+ statusMsgStream.println(amh.getMessage("appletprint.fail"));
+ }
+ statusMsgStream.println(amh.getMessage("appletprint.finish"));
+ pj.end();
+
+ } else {
+ statusMsgStream.println(amh.getMessage("appletprint.cancel"));
+ }
+ }
+
+ /**
+ * Properties.
+ */
+ AppletProps props;
+ public synchronized void networkProperties() {
+ if (props == null) {
+ props = new AppletProps(appletExecutionContext);
+ }
+ props.addNotify();
+ props.setVisible(true);
+ }
+
+ /**
+ * Close this viewer.
+ * Stop, Destroy, Dispose and Quit an AppletView, then
+ * reclaim resources and exit the program if this is
+ * the last applet.
+ */
+ public void appletClose() {
+ appletExecutionContext.shutdown();
+ contexts.removeElement(this);
+
+ if (contexts.size() == 0) {
+ appletSystemExit();
+ }
+ }
+
+
+// public static void writeClasses() {
+// try {
+// java.io.FileOutputStream file = new FileOutputStream("classes.txt");
+// java.io.PrintStream printStream = new java.io.PrintStream(file);
+
+// printStream.println("- .* .*");
+// Enumeration elements = stardiv.util.HardClassContext.classList.elements();
+// while(elements.hasMoreElements()) {
+// String string = (String)elements.nextElement();
+
+// String packageName = "";
+// String className = string;
+
+// int lastIndex = string.lastIndexOf('.');
+// if(lastIndex > -1) {
+// packageName = string.substring(0, lastIndex);
+// className = string.substring(lastIndex + 1);
+// }
+
+// printStream.print("+ ");
+// int index;
+// while((index = packageName.indexOf('.')) > -1) {
+// printStream.print(packageName.substring(0, index) + "\\\\");
+// packageName = packageName.substring(index + 1);
+// }
+// printStream.print(packageName + " ");
+
+// while((index = className.indexOf('$')) > -1) {
+// printStream.print(className.substring(0, index) + "\\$");
+// className = className.substring(index + 1);
+// }
+// printStream.println(className + "\\.class");
+// }
+// file.close();
+// }
+// catch(java.io.IOException eio) {
+// System.err.println("IOException:" + eio);
+// }
+// }
+
+ /**
+ * Exit the program.
+ * Exit from the program (if not stand alone) - do no clean-up
+ */
+ private void appletSystemExit() {
+ // if (factory.isStandalone())
+ System.exit(0);
+ }
+
+ /**
+ * Quit all viewers.
+ * Shutdown all viewers properly then
+ * exit from the program (if not stand alone)
+ */
+ protected void appletQuit() {
+ appletExecutionContext.shutdown();
+ appletSystemExit();
+ }
+
+ /**
+ * Handle events.
+ */
+ public void processUserAction(ActionEvent evt) {
+
+ String label = ((MenuItem)evt.getSource()).getLabel();
+
+ if (amh.getMessage("menuitem.restart").equals(label)) {
+ appletExecutionContext.restart();
+ return;
+ }
+
+ if (amh.getMessage("menuitem.reload").equals(label)) {
+ appletExecutionContext.reload();
+ return;
+ }
+
+ if (amh.getMessage("menuitem.clone").equals(label)) {
+ appletClone();
+ return;
+ }
+
+ if (amh.getMessage("menuitem.stop").equals(label)) {
+ appletExecutionContext.sendStop();
+ return;
+ }
+
+ if (amh.getMessage("menuitem.save").equals(label)) {
+ appletSave();
+ return;
+ }
+
+ if (amh.getMessage("menuitem.start").equals(label)) {
+ appletExecutionContext.sendStart();
+ return;
+ }
+
+ if (amh.getMessage("menuitem.tag").equals(label)) {
+ appletTag();
+ return;
+ }
+
+ if (amh.getMessage("menuitem.info").equals(label)) {
+ appletInfo();
+ return;
+ }
+
+ if (amh.getMessage("menuitem.encoding").equals(label)) {
+ appletCharacterEncoding();
+ return;
+ }
+
+ if (amh.getMessage("menuitem.edit").equals(label)) {
+ appletEdit();
+ return;
+ }
+
+ if (amh.getMessage("menuitem.print").equals(label)) {
+ appletPrint();
+ return;
+ }
+
+ if (amh.getMessage("menuitem.props").equals(label)) {
+ networkProperties();
+ return;
+ }
+
+ if (amh.getMessage("menuitem.close").equals(label)) {
+ appletClose();
+ return;
+ }
+
+ if (/*factory.isStandalone() && */amh.getMessage("menuitem.quit").equals(label)) {
+ appletQuit();
+ return;
+ }
+ //statusMsgStream.println("evt = " + evt);
+ }
+
+ /**
+ * Prepare the enviroment for executing applets.
+ */
+ public static void init() {
+ Properties props = new Properties();
+ props.put( "http.proxyHost", "wwwproxy" );
+ props.put( "http.proxyPort", "3128" );
+ props.put( "ftpProxySet", "true" );
+ props.put( "ftpProxyHost", "wwwproxy" );
+ props.put( "ftpProxyPort", "3128" );
+ props.put( "ftpProxyPort", "3128" );
+ props.put( "stardiv.debug.trace", "window" );
+ props.put( "stardiv.debug.warning", "window" );
+ props.put( "stardiv.debug.error", "window" );
+ props.put( "stardiv.security.defaultSecurityManager", "true" );
+
+ // Try loading the appletviewer properties file to get messages, etc.
+// try {
+// FileInputStream in = new FileInputStream(theAppletViewerPropsFile);
+// props.load(new BufferedInputStream(in));
+// in.close();
+// } catch (Exception e) {
+// System.out.println(amh.getMessage("init.err"));
+// }
+
+ // Try loading the saved user properties file to override some
+ // of the above defaults.
+ try {
+ FileInputStream in = new FileInputStream(theUserPropertiesFile);
+ props.load(new BufferedInputStream(in));
+ in.close();
+ } catch (Exception e) {
+ /* is it really necessary to say this?
+ This is always the case the first time we run..
+ System.out.println("[no properties loaded, using defaults]"); */
+ }
+
+ // Install a property list.
+
+ SjSettings.changeProperties(props);
+ }
+
+ /**
+ * The current character.
+ */
+ static int c;
+
+ /**
+ * Scan spaces.
+ */
+ public static void skipSpace(Reader in) throws IOException {
+ while ((c >= 0) && ((c == ' ') || (c == '\t') || (c == '\n') || (c == '\r'))) {
+ c = in.read();
+ }
+ }
+
+ /**
+ * Scan identifier
+ */
+ public static String scanIdentifier(Reader in) throws IOException {
+ StringBuffer buf = new StringBuffer();
+ while (true) {
+ if (((c >= 'a') && (c <= 'z')) ||
+ ((c >= 'A') && (c <= 'Z')) ||
+ ((c >= '0') && (c <= '9')) || (c == '_')) {
+ buf.append((char)c);
+ c = in.read();
+ } else {
+ return buf.toString();
+ }
+ }
+ }
+
+ /**
+ * Scan tag
+ */
+ public static Hashtable scanTag(Reader in) throws IOException {
+ Hashtable atts = new Hashtable();
+ skipSpace(in);
+ while (c >= 0 && c != '>') {
+ String att = scanIdentifier(in);
+ String val = "";
+ skipSpace(in);
+ if (c == '=') {
+ int quote = -1;
+ c = in.read();
+ skipSpace(in);
+ if ((c == '\'') || (c == '\"')) {
+ quote = c;
+ c = in.read();
+ }
+ StringBuffer buf = new StringBuffer();
+ while ((c > 0) &&
+ (((quote < 0) && (c != ' ') && (c != '\t') &&
+ (c != '\n') && (c != '\r') && (c != '>'))
+ || ((quote >= 0) && (c != quote)))) {
+ buf.append((char)c);
+ c = in.read();
+ }
+ if (c == quote) {
+ c = in.read();
+ }
+ skipSpace(in);
+ val = buf.toString();
+ }
+ //statusMsgStream.println("PUT " + att + " = '" + val + "'");
+ atts.put(att.toLowerCase(), val);
+ skipSpace(in);
+ }
+ return atts;
+ }
+
+ static int x = 100;
+ static int y = 50;
+
+ static String encoding = null;
+
+ static private Reader makeReader(InputStream is) {
+ if (encoding != null) {
+ try {
+ return new BufferedReader(new InputStreamReader(is, encoding));
+ } catch (IOException x) { }
+ }
+ InputStreamReader r = new InputStreamReader(is);
+ encoding = r.getEncoding();
+ return new BufferedReader(r);
+ }
+
+ /**
+ * Scan an html file for <applet> tags
+ */
+ public static void parse(URL url) throws IOException {
+ parse(url, System.out);
+ }
+
+ public static void parse(URL url, PrintStream statusMsgStream) throws IOException {
+
+ // warning messages
+ String requiresNameWarning = amh.getMessage("parse.warning.requiresname");
+ String paramOutsideWarning = amh.getMessage("parse.warning.paramoutside");
+ String requiresCodeWarning = amh.getMessage("parse.warning.requirescode");
+ String requiresHeightWarning = amh.getMessage("parse.warning.requiresheight");
+ String requiresWidthWarning = amh.getMessage("parse.warning.requireswidth");
+ String appNotLongerSupportedWarning = amh.getMessage("parse.warning.appnotLongersupported");
+
+ java.net.URLConnection conn = url.openConnection();
+ Reader in = makeReader(conn.getInputStream());
+ /* The original URL may have been redirected - this
+ * sets it to whatever URL/codebase we ended up getting
+ */
+ url = conn.getURL();
+
+ Hashtable atts = null;
+ while(true) {
+ c = in.read();
+ if (c == -1)
+ break;
+
+ if (c == '<') {
+ c = in.read();
+ if (c == '/') {
+ c = in.read();
+ String nm = scanIdentifier(in);
+ if (nm.equalsIgnoreCase("applet")) {
+ if (atts != null) {
+ new AppletViewer(x, y, url, atts, System.out);
+ x += 50;
+ y += 20;
+ // make sure we don't go too far!
+ Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
+ if (x > d.width - 30)
+ x = 100;
+ if (y > d.height - 30)
+ y = 50;
+ }
+ atts = null;
+ }
+ }
+ else {
+ String nm = scanIdentifier(in);
+ if (nm.equalsIgnoreCase("param")) {
+ Hashtable t = scanTag(in);
+ String att = (String)t.get("name");
+ if (att == null) {
+ statusMsgStream.println(requiresNameWarning);
+ } else {
+ String val = (String)t.get("value");
+ if (val == null) {
+ statusMsgStream.println(requiresNameWarning);
+ } else if (atts != null) {
+ atts.put(att.toLowerCase(), val);
+ } else {
+ statusMsgStream.println(paramOutsideWarning);
+ }
+ }
+ }
+ else if (nm.equalsIgnoreCase("applet")) {
+ atts = scanTag(in);
+ if (atts.get("code") == null && atts.get("object") == null) {
+ statusMsgStream.println(requiresCodeWarning);
+ atts = null;
+ } else if (atts.get("width") == null) {
+ statusMsgStream.println(requiresWidthWarning);
+ atts = null;
+ } else if (atts.get("height") == null) {
+ statusMsgStream.println(requiresHeightWarning);
+ atts = null;
+ }
+ }
+ else if (nm.equalsIgnoreCase("app")) {
+ statusMsgStream.println(appNotLongerSupportedWarning);
+ Hashtable atts2 = scanTag(in);
+ nm = (String)atts2.get("class");
+ if (nm != null) {
+ atts2.remove("class");
+ atts2.put("code", nm + ".class");
+ }
+ nm = (String)atts2.get("src");
+ if (nm != null) {
+ atts2.remove("src");
+ atts2.put("codebase", nm);
+ }
+ if (atts2.get("width") == null) {
+ atts2.put("width", "100");
+ }
+ if (atts2.get("height") == null) {
+ atts2.put("height", "100");
+ }
+ printTag(statusMsgStream, atts2);
+ statusMsgStream.println();
+ }
+ }
+ }
+ }
+ in.close();
+ }
+
+ /**
+ * Print usage
+ */
+ static void usage() {
+ System.out.println(amh.getMessage("usage"));
+ }
+
+ static boolean didInitialize = false;
+
+ /**
+ * mainInit can be called by direct clients
+ */
+ public static void mainInit() {
+ if (! didInitialize) {
+ didInitialize = true;
+
+ init();
+
+ }
+ }
+
+ /**
+ * Main
+ */
+ public static void main(String argv[]) {
+ mainInit();
+
+ // Parse arguments
+ if (argv.length == 0) {
+ System.out.println(amh.getMessage("main.err.inputfile"));
+ usage();
+ return;
+ }
+
+ // Parse the documents
+ for (int i = 0 ; i < argv.length ; i++) {
+ try {
+ URL url = null;
+
+ if (argv[i].equals("-encoding")) {
+ if(i + 1 < argv.length) {
+ i++;
+ encoding = argv[i];
+ continue;
+ } else {
+ usage();
+ System.exit(1);
+ }
+ }
+ else
+ if (argv[i].indexOf(':') <= 1) {
+ String userDir = System.getProperty("user.dir");
+ String prot;
+ // prepend native separator to path iff not present
+ if (userDir.charAt(0) == '/' ||
+ userDir.charAt(0) == java.io.File.separatorChar) {
+ prot = "file:";
+ } else {
+ prot = "file:/";
+ }
+ url = new URL(prot + userDir.replace(File.separatorChar, '/')
+ + "/");
+ url = new URL(url, argv[i]);
+ } else {
+ url = new URL(argv[i]);
+ }
+
+ parse(url);
+ documentViewer = DocumentProxy.getDocumentProxy(url, Toolkit.getDefaultToolkit());
+ } catch (MalformedURLException e) {
+ System.out.println(amh.getMessage("main.err.badurl", argv[i], e.getMessage()));
+ System.exit(1);
+ } catch (IOException e) {
+ System.out.println(amh.getMessage("main.err.io", e.getMessage()));
+ if (argv[i].indexOf(':') < 0) {
+ System.out.println(amh.getMessage("main.err.readablefile", argv[i]));
+ } else {
+ System.out.println(amh.getMessage("main.err.correcturl", argv[i]));
+ }
+ System.exit(1);
+ }
+ }
+ /*
+ if (documentViewer.countApplets() == 0) {
+ System.out.println(amh.getMessage("main.warning"));
+ usage();
+ System.exit(1);
+ }*/
+ }
+ private static AppletMessageHandler amh = new AppletMessageHandler("appletviewer");
+}
diff --git a/sj2/stardiv/app/AppletViewerFactory.java b/sj2/stardiv/app/AppletViewerFactory.java
new file mode 100644
index 000000000000..c2019046be71
--- /dev/null
+++ b/sj2/stardiv/app/AppletViewerFactory.java
@@ -0,0 +1,77 @@
+/*************************************************************************
+ *
+ * $RCSfile: AppletViewerFactory.java,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:54:03 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+/*
+ * AppletViewerFactory.java
+ */
+
+package stardiv.app;
+
+import java.util.Hashtable;
+import java.net.URL;
+import java.awt.MenuBar;
+
+public
+interface AppletViewerFactory {
+ public AppletViewer createAppletViewer(int x, int y, URL doc, Hashtable atts);
+ public MenuBar getBaseMenuBar();
+ public boolean isStandalone();
+}
diff --git a/sj2/stardiv/app/MsgAppletViewer.java b/sj2/stardiv/app/MsgAppletViewer.java
new file mode 100644
index 000000000000..e37d74f724ab
--- /dev/null
+++ b/sj2/stardiv/app/MsgAppletViewer.java
@@ -0,0 +1,220 @@
+/*************************************************************************
+ *
+ * $RCSfile: MsgAppletViewer.java,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:54:03 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+package stardiv.app;
+
+import java.util.ListResourceBundle;
+
+public class MsgAppletViewer extends ListResourceBundle {
+
+ public Object[][] getContents() {
+ return contents;
+ }
+
+ static final Object[][] contents = {
+ {"textframe.button.dismiss", "Dismiss"},
+ {"appletviewer.tool.title", "Applet Viewer: {0}"},
+ {"appletviewer.menu.applet", "Applet"},
+ {"appletviewer.menuitem.restart", "Restart"},
+ {"appletviewer.menuitem.reload", "Reload"},
+ {"appletviewer.menuitem.stop", "Stop"},
+ {"appletviewer.menuitem.save", "Save..."},
+ {"appletviewer.menuitem.start", "Start"},
+ {"appletviewer.menuitem.clone", "Clone..."},
+ {"appletviewer.menuitem.tag", "Tag..."},
+ {"appletviewer.menuitem.info", "Info..."},
+ {"appletviewer.menuitem.edit", "Edit"},
+ {"appletviewer.menuitem.encoding", "Character Encoding"},
+ {"appletviewer.menuitem.print", "Print..."},
+ {"appletviewer.menuitem.props", "Properties..."},
+ {"appletviewer.menuitem.close", "Close"},
+ {"appletviewer.menuitem.quit", "Quit"},
+ {"appletviewer.label.hello", "Hello..."},
+ {"appletviewer.status.start", "starting applet..."},
+ {"appletviewer.appletsave.err1", "serializing an {0} to {1}"},
+ {"appletviewer.appletsave.err2", "in appletSave: {0}"},
+ {"appletviewer.applettag", "Tag shown"},
+ {"appletviewer.applettag.textframe", "Applet HTML Tag"},
+ {"appletviewer.appletinfo.applet", "-- no applet info --"},
+ {"appletviewer.appletinfo.param", "-- no parameter info --"},
+ {"appletviewer.appletinfo.textframe", "Applet Info"},
+ {"appletviewer.appletprint.printjob", "Print Applet"},
+ {"appletviewer.appletprint.fail", "Printing failed."},
+ {"appletviewer.appletprint.finish", "Finished printing."},
+ {"appletviewer.appletprint.cancel", "Printing cancelled."},
+ {"appletviewer.appletencoding", "Character Encoding: {0}"},
+ {"appletviewer.init.err", "[no appletviewer.properties file found!]"},
+ {"appletviewer.parse.warning.requiresname", "Warning: <param name=... value=...> tag requires name attribute."},
+ {"appletviewer.parse.warning.paramoutside", "Warning: <param> tag outside <applet> ... </applet>."},
+ {"appletviewer.parse.warning.requirescode", "Warning: <applet> tag requires code attribute."},
+ {"appletviewer.parse.warning.requiresheight", "Warning: <applet> tag requires height attribute."},
+ {"appletviewer.parse.warning.requireswidth", "Warning: <applet> tag requires width attribute."},
+ {"appletviewer.parse.warning.appnotLongersupported", "Warning: <app> tag no longer supported, use <applet> instead:"},
+ {"appletviewer.usage", "usage: appletviewer [-debug] [-J<javaflag>] [-encoding <character encoding type> ] url|file ..."},
+ {"appletviewer.main.err.inputfile", "No input files specified."},
+ {"appletviewer.main.err.badurl", "Bad URL: {0} ( {1} )"},
+ {"appletviewer.main.err.io", "I/O exception while reading: {0}"},
+ {"appletviewer.main.err.readablefile", "Make sure that {0} is a file and is readable."},
+ {"appletviewer.main.err.correcturl", "Is {0} the correct URL?"},
+ {"appletviewer.main.warning", "Warning: No Applets were started. Make sure the input contains an <applet> tag."},
+ {"appletioexception.loadclass.throw.interrupted", "class loading interrupted: {0}"},
+ {"appletioexception.loadclass.throw.notloaded", "class not loaded: {0}"},
+ {"appletclassloader.loadcode.verbose", "Opening stream to: {0} to get {1}"},
+ {"appletclassloader.filenotfound", "File not found when looking for: {0}"},
+ {"appletclassloader.fileformat", "File format exception when loading: {0}"},
+ {"appletclassloader.fileioexception", "I/O exception when loading: {0}"},
+ {"appletclassloader.fileexception", "{0} exception when loading: {1}"},
+ {"appletclassloader.filedeath", "{0} killed when loading: {1}"},
+ {"appletclassloader.fileerror", "{0} error when loading: {1}"},
+ {"appletclassloader.findclass.verbose.findclass", "{0} find class {1}"},
+ {"appletclassloader.findclass.verbose.openstream", "Opening stream to: {0} to get {1}"},
+ {"appletclassloader.getresource.verbose.forname", "AppletClassLoader.getResource for name: {0}"},
+ {"appletclassloader.getresource.verbose.found", "Found resource: {0} as a system resource"},
+ {"appletclassloader.getresourceasstream.verbose", "Found resource: {0} as a system resource"},
+ {"appletcopyright.title", "Copyright Notice"},
+ {"appletcopyright.button.accept", "Accept"},
+ {"appletcopyright.button.reject", "Reject"},
+ {"appletcopyright.defaultcontent", "Copyright (c) 1995, 1996, 1997 Sun Microsystems, Inc."},
+ {"appletcopyright.copyrightfile", "COPYRIGHT"},
+ {"appletcopyright.copyrightencoding", "8859_1"},
+ {"appletpanel.runloader.err", "Either object or code parameter!"},
+ {"appletpanel.runloader.exception", "exception while deserializing {0}"},
+ {"appletpanel.destroyed", "Applet destroyed."},
+ {"appletpanel.loaded", "Applet loaded."},
+ {"appletpanel.started", "Applet started."},
+ {"appletpanel.inited", "Applet initialized."},
+ {"appletpanel.stopped", "Applet stopped."},
+ {"appletpanel.disposed", "Applet disposed."},
+ {"appletpanel.nocode", "APPLET tag missing CODE parameter."},
+ {"appletpanel.notfound", "load: class {0} not found."},
+ {"appletpanel.nocreate", "load: {0} can''t be instantiated."},
+ {"appletpanel.noconstruct", "load: {0} is not public or has no public constructor."},
+ {"appletpanel.death", "killed"},
+ {"appletpanel.exception", "exception: {0}."},
+ {"appletpanel.exception2", "exception: {0}: {1}."},
+ {"appletpanel.error", "error: {0}."},
+ {"appletpanel.error2", "error: {0}: {1}."},
+ {"appletpanel.notloaded", "Init: applet not loaded."},
+ {"appletpanel.notinited", "Start: applet not initialized."},
+ {"appletpanel.notstarted", "Stop: applet not started."},
+ {"appletpanel.notstopped", "Destroy: applet not stopped."},
+ {"appletpanel.notdestroyed", "Dispose: applet not destroyed."},
+ {"appletpanel.notdisposed", "Load: applet not disposed."},
+ {"appletpanel.bail", "Interrupted: bailing out."},
+ {"appletpanel.filenotfound", "File not found when looking for: {0}"},
+ {"appletpanel.fileformat", "File format exception when loading: {0}"},
+ {"appletpanel.fileioexception", "I/O exception when loading: {0}"},
+ {"appletpanel.fileexception", "{0} exception when loading: {1}"},
+ {"appletpanel.filedeath", "{0} killed when loading: {1}"},
+ {"appletpanel.fileerror", "{0} error when loading: {1}"},
+ {"appletillegalargumentexception.objectinputstream", "AppletObjectInputStream requires non-null loader"},
+ {"appletprops.title", "AppletViewer Properties"},
+ {"appletprops.label.http.server", "Http proxy server:"},
+ {"appletprops.label.http.proxy", "Http proxy port:"},
+ {"appletprops.label.network", "Network access:"},
+ {"appletprops.choice.network.item.none", "None"},
+ {"appletprops.choice.network.item.applethost", "Applet Host"},
+ {"appletprops.choice.network.item.unrestricted", "Unrestricted"},
+ {"appletprops.label.class", "Class access:"},
+ {"appletprops.choice.class.item.restricted", "Restricted"},
+ {"appletprops.choice.class.item.unrestricted", "Unrestricted"},
+ {"appletprops.label.unsignedapplet", "Allow unsigned applets:"},
+ {"appletprops.choice.unsignedapplet.no", "No"},
+ {"appletprops.choice.unsignedapplet.yes", "Yes"},
+ {"appletprops.button.apply", "Apply"},
+ {"appletprops.button.cancel", "Cancel"},
+ {"appletprops.button.reset", "Reset"},
+ {"appletprops.apply.exception", "Failed to save properties: {0}"},
+ {"appletsecurityexception.checkcreateclassloader", "Security Exception: classloader"},
+ {"appletsecurityexception.checkaccess.thread", "Security Exception: thread"},
+ {"appletsecurityexception.checkaccess.threadgroup", "Security Exception: threadgroup: {0}"},
+ {"appletsecurityexception.checkexit", "Security Exception: exit: {0}"},
+ {"appletsecurityexception.checkexec", "Security Exception: exec: {0}"},
+ {"appletsecurityexception.checklink", "Security Exception: link: {0}"},
+ {"appletsecurityexception.checkpropsaccess", "Security Exception: properties"},
+ {"appletsecurityexception.checkpropsaccess.key", "Security Exception: properties access {0}"},
+ {"appletsecurityexception.checkread.exception1", "Security Exception: {0}, {1}"},
+ {"appletsecurityexception.checkread.exception2", "Security Exception: file.read: {0}"},
+ {"appletsecurityexception.checkread", "Security Exception: file.read: {0} == {1}"},
+ {"appletsecurityexception.checkwrite.exception", "Security Exception: {0}, {1}"},
+ {"appletsecurityexception.checkwrite", "Security Exception: file.write: {0} == {1}"},
+ {"appletsecurityexception.checkread.fd", "Security Exception: fd.read"},
+ {"appletsecurityexception.checkwrite.fd", "Security Exception: fd.write"},
+ {"appletsecurityexception.checklisten", "Security Exception: socket.listen: {0}"},
+ {"appletsecurityexception.checkaccept", "Security Exception: socket.accept: {0}:{1}"},
+ {"appletsecurityexception.checkconnect.networknone", "Security Exception: socket.connect: {0}->{1}"},
+ {"appletsecurityexception.checkconnect.networkhost1", "Security Exception: Couldn''t connect to {0} with origin from {1}."},
+ {"appletsecurityexception.checkconnect.networkhost2", "Security Exception: Couldn''t resolve IP for host {0} or for {1}. "},
+ {"appletsecurityexception.checkconnect.networkhost3", "Security Exception: Could not resolve IP for host {0}. See the trustProxy property."},
+ {"appletsecurityexception.checkconnect", "Security Exception: connect: {0}->{1}"},
+ {"appletsecurityexception.checkpackageaccess", "Security Exception: cannot access package: {0}"},
+ {"appletsecurityexception.checkpackagedefinition", "Security Exception: cannot define package: {0}"},
+ {"appletsecurityexception.cannotsetfactory", "Security Exception: cannot set factory"},
+ {"appletsecurityexception.checkmemberaccess", "Security Exception: check member access"},
+ {"appletsecurityexception.checkgetprintjob", "Security Exception: getPrintJob"},
+ {"appletsecurityexception.checksystemclipboardaccess", "Security Exception: getSystemClipboard"},
+ {"appletsecurityexception.checkawteventqueueaccess", "Security Exception: getEventQueue"},
+ {"appletsecurityexception.checksecurityaccess", "Security Exception: security operation: {0}"},
+ {"appletsecurityexception.getsecuritycontext.unknown", "unknown class loader type. unable to check for getContext"},
+ {"appletsecurityexception.checkread.unknown", "unknown class loader type. unable to check for checking read {0}"},
+ {"appletsecurityexception.checkconnect.unknown", "unknown class loader type. unable to check for checking connect"},
+ {"appletsecurityexception.getresource.noclassaccess", "Cannot use getResource to access .class file: {0} in JDK1.1"},
+ };
+}
diff --git a/sj2/stardiv/app/makefile.mk b/sj2/stardiv/app/makefile.mk
new file mode 100644
index 000000000000..aa0f441c0e73
--- /dev/null
+++ b/sj2/stardiv/app/makefile.mk
@@ -0,0 +1,95 @@
+#*************************************************************************
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.1.1.1 $
+#
+# last change: $Author: hr $ $Date: 2000-09-18 16:54:03 $
+#
+# The Contents of this file are made available subject to the terms of
+# either of the following licenses
+#
+# - GNU Lesser General Public License Version 2.1
+# - Sun Industry Standards Source License Version 1.1
+#
+# Sun Microsystems Inc., October, 2000
+#
+# GNU Lesser General Public License Version 2.1
+# =============================================
+# Copyright 2000 by Sun Microsystems, Inc.
+# 901 San Antonio Road, Palo Alto, CA 94303, USA
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License version 2.1, as published by the Free Software Foundation.
+#
+# This library 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 for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+#
+# Sun Industry Standards Source License Version 1.1
+# =================================================
+# The contents of this file are subject to the Sun Industry Standards
+# Source License Version 1.1 (the "License"); You may not use this file
+# except in compliance with the License. You may obtain a copy of the
+# License at http://www.openoffice.org/license.html.
+#
+# Software provided under this License is provided on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+# See the License for the specific provisions governing your rights and
+# obligations concerning the Software.
+#
+# The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+#
+# Copyright: 2000 by Sun Microsystems, Inc.
+#
+# All Rights Reserved.
+#
+# Contributor(s): _______________________________________
+#
+#
+#
+#*************************************************************************
+
+PRJ=..$/..
+
+PRJNAME=sj2
+TARGET=app
+
+PACKAGE=stardiv$/app
+JARFILES=sandbox.jar
+
+.INCLUDE : $(PRJ)$/util$/makefile.pmk
+
+# --- Files --------------------------------------------------------
+
+JAVAFILES= \
+ AppletViewer.java \
+ AppletViewerFactory.java \
+ AppletProps.java \
+ AppletMessageHandler.java \
+ MsgAppletViewer.java
+
+JAVACLASSFILES= \
+ $(CLASSDIR)$/$(PACKAGE)$/AppletViewer.class \
+ $(CLASSDIR)$/$(PACKAGE)$/AppletViewerFactory.class \
+ $(CLASSDIR)$/$(PACKAGE)$/AppletProps.class \
+ $(CLASSDIR)$/$(PACKAGE)$/AppletMessageHandler.class \
+ $(CLASSDIR)$/$(PACKAGE)$/MsgAppletViewer.class
+
+
+# --- Targets ------------------------------------------------------
+
+.INCLUDE : target.mk
+
+.INCLUDE : $(PRJ)$/util$/target.pmk
+
diff --git a/sj2/stardiv/applet/AppletExecutionContext.java b/sj2/stardiv/applet/AppletExecutionContext.java
new file mode 100644
index 000000000000..faf36b0a9262
--- /dev/null
+++ b/sj2/stardiv/applet/AppletExecutionContext.java
@@ -0,0 +1,415 @@
+/*************************************************************************
+ *
+ * $RCSfile: AppletExecutionContext.java,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:54:03 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+package stardiv.applet;
+
+import java.applet.Applet;
+import java.applet.AppletStub;
+import java.applet.AppletContext;
+import java.applet.AudioClip;
+
+import java.awt.BorderLayout;
+import java.awt.Container;
+import java.awt.Dimension;
+import java.awt.Panel;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+
+import java.net.URL;
+import java.net.MalformedURLException;
+
+import java.util.Hashtable;
+import java.util.Vector;
+
+import sun.misc.Queue;
+
+import com.sun.star.lib.sandbox.ClassContextProxy;
+import com.sun.star.lib.sandbox.ExecutionContext;
+import com.sun.star.lib.sandbox.JarEntry;
+import com.sun.star.lib.sandbox.ResourceProxy;
+
+import com.sun.star.lib.sandbox.CodeSource;
+import com.sun.star.lib.sandbox.PermissionCollection;
+import com.sun.star.lib.sandbox.ProtectionDomain;
+import com.sun.star.lib.sandbox.RuntimePermission;
+import com.sun.star.lib.sandbox.FilePermission;
+import com.sun.star.lib.sandbox.SocketPermission;
+
+
+public final class AppletExecutionContext extends ExecutionContext
+ implements AppletStub, LiveConnectable
+{
+ private static final boolean DEBUG = false; // Enable / disable debug output
+
+ private Applet applet;
+ private Container container;
+
+ private DocumentProxy documentProxy;
+ private Hashtable parameters;
+
+ private String className;
+ private Vector jarResourceProxys = new Vector();
+
+ private URL documentURL = null;
+ private URL baseURL = null;
+
+ private ProtectionDomain protectionDomain;
+ private PermissionCollection permissionCollection;
+
+ private java.awt.Toolkit toolkit;
+
+ //************** C++ WRAPPER ******************
+ private long pCppJSbxObject;
+
+ synchronized public void ClearNativeHandle() {
+ pCppJSbxObject = 0;
+ if(DEBUG)System.err.println("### AppletExecutionContext.ClearNativeHandle");
+ }
+
+ public AppletExecutionContext(long pCppJSbxObject) {
+ this.pCppJSbxObject = pCppJSbxObject;
+ }
+ //************** C++ WRAPPER ******************
+
+ public AppletExecutionContext( URL documentURL,
+ Hashtable parameters,
+ Container container,
+ long pCppJSbxObject)
+ {
+ this(pCppJSbxObject);
+
+ if(DEBUG) System.err.println("#### AppletExecutionContext.<init>:" + documentURL + " " + parameters + " " + container + " " + pCppJSbxObject);
+ this.documentURL = documentURL;
+ this.parameters = parameters;
+ this.container = container;
+
+ toolkit = container.getToolkit();
+
+ documentProxy = DocumentProxy.getDocumentProxy(documentURL, toolkit);
+ addObserver(documentProxy);
+ }
+
+ public void init() {
+ baseURL = null;
+
+ try {
+ String codeBase = getParameter("codebase");
+
+ if (!codeBase.endsWith("/")) {
+ codeBase += "/";
+ }
+ baseURL = new URL(documentURL, codeBase);
+ }
+ catch (Exception e) {
+ try {
+ String file = documentURL.getFile();
+ int i = file.lastIndexOf('/');
+
+ if (i > 0 && i < file.length() - 1) {
+ baseURL = new URL(documentURL, file.substring(0, i + 1));
+ }
+ }
+ catch (Exception e2) {
+ baseURL = documentURL;
+ }
+ }
+
+ if(baseURL == null)
+ baseURL = documentURL;
+
+ className = getParameter("code");
+ String defaultExtension = ".class";
+ String oldExtension = ".java";
+
+ int extensionIndex = className.lastIndexOf('.');
+ String extension = "";
+
+ if (extensionIndex != -1) {
+ extension = className.substring(extensionIndex);
+
+ if(!extension.equals(defaultExtension) && !extension.equals(oldExtension)) {
+ extension = defaultExtension;
+ }
+ else
+ className = className.substring(0, extensionIndex);
+ }
+
+ String nm = "applet-" + className;
+
+ documentProxy.addExecutionContext(this, className);
+
+ permissionCollection = new PermissionCollection();
+ protectionDomain = new ProtectionDomain(new CodeSource(baseURL, null), permissionCollection);
+
+ super.init(nm, ClassContextProxy.create(baseURL, protectionDomain, null));
+
+ permissionCollection.add(new RuntimePermission("modifyThreadGroup", getThreadGroup()));
+ permissionCollection.add(new SocketPermission(SocketPermission.NETWORK_APPLET, baseURL.getHost()));
+
+ try {
+ if(baseURL.getProtocol().equals("file")) // allow read acces for applet directory
+ permissionCollection.add(new FilePermission(new File(baseURL.getFile()).getCanonicalPath(), "read"));
+ }
+ catch(IOException eio) {
+ }
+ }
+
+ void sDispose(long timeout) {
+ if(DEBUG) System.err.println("#### AppletExecutionContext.sDispose");
+
+ container = null;
+ jarResourceProxys = null;
+
+ super.dispose(timeout);
+ }
+
+ public void dispose(long timeout) {
+ sDispose(timeout); // call direct
+
+/* Deadlock with TKT
+ class DisposeEvent extends java.awt.AWTEvent
+ implements java.awt.peer.ActiveEvent,
+ java.awt.ActiveEvent
+ {
+ private AppletExecutionContext executionContext;
+ private long timeout;
+
+ public DisposeEvent(AppletExecutionContext executionContext, long timeout) {
+ super(executionContext, 0);
+
+ this.executionContext = executionContext;
+ this.timeout = timeout;
+ }
+
+ public void dispatch() {
+ executionContext.sDispose(timeout);
+ }
+ }
+
+ toolkit.getSystemEventQueue().postEvent(new DisposeEvent(this, timeout));
+*/
+ }
+
+ protected int getIntParameter(String name) {
+ int value = 0;
+ String string = getParameter(name);
+ if(string != null)
+ value = Integer.valueOf(string).intValue();
+
+ return value;
+ }
+
+ protected void xload()
+ throws ClassNotFoundException,
+ InstantiationException,
+ IllegalAccessException
+ {
+ String archives = getParameter("archive");
+
+ try {
+ if(archives != null) {
+ int index = archives.indexOf(",");
+ while(index > -1) {
+ try { // try to load archive
+ loadArchive(archives.substring(0, index));
+ }
+ catch(MalformedURLException malformedURLException) {
+ System.err.println("#### can't load archive:" + archives.substring(0, index));
+ }
+ catch(IOException ioException) {
+ System.err.println("#### can't load archive:" + archives.substring(0, index) + " reason:" + ioException);
+ }
+
+ archives = archives.substring(index + 1).trim();
+
+ index = archives.indexOf(",");
+ }
+ if(archives.length() > 0) loadArchive(archives);
+ }
+
+ Class appletClass = classContext.loadClass(className);
+ synchronized(className) {
+ applet = (Applet)appletClass.newInstance();
+ applet.setStub(this);
+ className.notifyAll();
+ }
+ }
+ catch(IOException eio) {
+ throw new ClassNotFoundException(eio.getMessage());
+ }
+ }
+
+ protected void xinit() {
+ java.awt.Dimension size = new Dimension(getIntParameter("width"), getIntParameter("height"));
+
+ container.setLayout(null);
+ container.setVisible(true);
+ container.setSize(size);
+ container.add(applet);
+
+ applet.setVisible(false);
+ applet.setSize(size);
+
+ container.validate();
+
+ applet.init();
+ }
+
+ protected void xstart() {
+ applet.setVisible(true);
+ container.validate();
+
+ applet.start();
+ }
+
+ protected void xstop() {
+ applet.stop();
+ }
+
+ protected void xdestroy() {
+ applet.destroy();
+ applet.setVisible(false);
+ applet.setStub(null);
+
+ documentProxy.removeExecutionContext(applet.getClass().getName());
+ }
+
+ protected void xdispose() {
+ if(container != null)
+ container.remove(applet);
+
+ applet = null;
+ }
+
+ private void loadArchive(String archive) throws MalformedURLException, IOException {
+ ResourceProxy jarResourceProxy = ResourceProxy.load(new URL(baseURL, archive), protectionDomain);
+ jarResourceProxy.loadJar(baseURL);
+ jarResourceProxys.addElement(jarResourceProxy);
+ }
+
+ public Applet getApplet() {
+ synchronized(className) {
+ if(applet == null) {
+ if(DEBUG)System.err.println("#### AppletExecutionContext.getApplet - waiting for applet");
+ try {
+ className.wait();
+ }
+ catch(InterruptedException interruptedException) {
+ System.err.println("#### AppletExecutionContext.getApplet:" + interruptedException);
+ }
+ if(DEBUG)System.err.println("#### AppletExecutionContext.getApplet - got it");
+ }
+ }
+ return applet;
+ }
+
+ /*
+ * Methods for AppletStub interface
+ */
+ public void appletResize(int width, int height) {
+ applet.setSize(new java.awt.Dimension(width, height));
+ }
+
+ public AppletContext getAppletContext() {
+ return documentProxy;
+ }
+
+ public URL getCodeBase() {
+ return classContext.getBase();
+ }
+
+ public URL getDocumentBase() {
+ return documentProxy.getDocumentBase();
+ }
+
+ public String getParameter(String name) {
+ String string = (String)parameters.get(name.toLowerCase());
+ if(string != null)
+ string = string.trim();
+
+ return string;
+ }
+
+ public boolean isActive() {
+ return getStatus() == STARTED && pCppJSbxObject != 0;
+ }
+
+ public void finalize() {
+ if(DEBUG) System.err.println("#### AppletExecutionContext finalized");
+ }
+
+ // sollte eigentlich im DocumentProxy sein, geht aber nicht
+ private native void xshowStatus(String status);
+ private native void xshowDocument(URL url, String aTarget);
+
+ void printStatus(String status) {
+ if(pCppJSbxObject != 0) xshowStatus(status);
+ }
+
+ void printDocument(URL url, String aTarget) {
+ if(pCppJSbxObject != 0) xshowDocument(url, aTarget);
+ }
+
+ native public Object getJavaScriptJSObjectWindow();
+}
diff --git a/sj2/stardiv/applet/Document.java b/sj2/stardiv/applet/Document.java
new file mode 100644
index 000000000000..7264a5420c80
--- /dev/null
+++ b/sj2/stardiv/applet/Document.java
@@ -0,0 +1,182 @@
+/*************************************************************************
+ *
+ * $RCSfile: Document.java,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:54:03 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+package stardiv.applet;
+
+import java.awt.Image;
+
+// import java.applet.Applet;
+// import java.applet.AppletContext;
+// import java.applet.AudioClip;
+
+
+import java.io.IOException;
+
+import java.util.Enumeration;
+import java.util.Hashtable;
+import java.util.Observer;
+import java.util.Observable;
+
+import java.net.URL;
+
+import java.applet.Applet;
+import java.applet.AppletContext;
+import java.applet.AudioClip;
+
+import com.sun.star.lib.sandbox.ExecutionContext;
+import com.sun.star.lib.sandbox.ResourceProxy;
+
+class Document implements LiveConnectable {
+ private Hashtable executionContexts = new Hashtable();
+ private URL documentBase = null;
+ private java.awt.Toolkit toolkit;
+
+ Document(URL url, java.awt.Toolkit toolkit) {
+ documentBase = url;
+ this.toolkit = toolkit;
+ }
+
+ void addExecutionContext(ExecutionContext executionContext, String name) {
+ executionContexts.put(name, executionContext);
+ }
+
+ void removeExecutionContext(String name) {
+ executionContexts.remove(name);
+ }
+
+ Enumeration getExecutionContexts() {
+ return executionContexts.elements();
+ }
+
+ URL getDocumentBase() {
+ return documentBase;
+ }
+
+ ExecutionContext getExecutionContext(String name) {
+ return (ExecutionContext)executionContexts.get(name);
+ }
+
+ Enumeration getExcutionContexts() {
+ return executionContexts.elements();
+ }
+
+ /**
+ * Get the javascript environment for this applet.
+ */
+ /*
+ public native Object getJavaScriptJSObjectWindow();
+ public native void appletResize( int width, int height );
+ public native void showDocument( URL url, String aTarget );
+ public native void showStatus( String status );
+ */
+
+ public AudioClip getAudioClip(URL url) {
+ ResourceProxy resourceProxy = ResourceProxy.load(url, null);
+ AudioClip audioClip = resourceProxy.getAudioClip();
+
+ return audioClip;
+ }
+
+ public Image getImage(URL url) {
+ ResourceProxy resourceProxy = ResourceProxy.load(url, null);
+ Image image = toolkit.createImage(resourceProxy.getImageProducer());
+
+ return image;
+ }
+
+ AppletExecutionContext getAppletExecutionContext() {
+ AppletExecutionContext appletExecutionContext = null;
+
+ for(Enumeration e = executionContexts.elements(); e.hasMoreElements();) {
+ Object object = e.nextElement();
+ if(object instanceof AppletExecutionContext) {
+ appletExecutionContext = (AppletExecutionContext)object;
+ }
+ }
+ return appletExecutionContext;
+ }
+
+
+ void showDocument(URL url, String aTarget) {
+ AppletExecutionContext appletExecutionContext = getAppletExecutionContext();
+ if(appletExecutionContext != null) appletExecutionContext.printDocument(url, aTarget);
+ }
+
+ public void showDocument(URL url) {
+ showDocument(url, "_top");
+ }
+
+ void showStatus(String status) {
+ status = (status == null) ? "" : status;
+
+ AppletExecutionContext appletExecutionContext = getAppletExecutionContext();
+ if(appletExecutionContext != null) appletExecutionContext.printStatus(status);
+ }
+
+ public Object getJavaScriptJSObjectWindow() {
+ Object object = null;
+
+ AppletExecutionContext appletExecutionContext = getAppletExecutionContext();
+ if(appletExecutionContext != null)
+ object = appletExecutionContext.getJavaScriptJSObjectWindow();
+
+ return object;
+ }
+}
diff --git a/sj2/stardiv/applet/DocumentProxy.java b/sj2/stardiv/applet/DocumentProxy.java
new file mode 100644
index 000000000000..6ef4d5055c7e
--- /dev/null
+++ b/sj2/stardiv/applet/DocumentProxy.java
@@ -0,0 +1,207 @@
+/*************************************************************************
+ *
+ * $RCSfile: DocumentProxy.java,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:54:03 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+package stardiv.applet;
+
+import java.awt.Toolkit;
+import java.awt.Image;
+
+import java.applet.Applet;
+import java.applet.AppletContext;
+import java.applet.AudioClip;
+
+import java.io.IOException;
+
+import java.util.Enumeration;
+import java.util.Hashtable;
+import java.util.Observer;
+import java.util.Observable;
+
+import java.net.URL;
+
+import com.sun.star.lib.sandbox.Cachable;
+import com.sun.star.lib.sandbox.ExecutionContext;
+import com.sun.star.lib.sandbox.WeakRef;
+import com.sun.star.lib.sandbox.WeakTable;
+import com.sun.star.lib.sandbox.ResourceProxy;
+
+public class DocumentProxy implements AppletContext, Cachable, Observer, LiveConnectable {
+ static private int instances;
+
+ synchronized static public DocumentProxy getDocumentProxy(URL url, Toolkit toolkit) {
+ DocumentProxy documentProxy = (DocumentProxy)WeakTable.get("Document: " + url);
+
+ if(documentProxy == null) {
+ documentProxy = new DocumentProxy(url, toolkit);
+ WeakTable.put("Document: " + url, documentProxy);
+ }
+
+ return documentProxy;
+ }
+
+
+ /*
+ ** interface cachable methods
+ */
+ private Document document;
+ private WeakRef weakRef;
+
+ public DocumentProxy() {
+ instances ++;
+ }
+
+ public Object getHardObject() {
+ return document;
+ }
+
+ public void setWeakRef(WeakRef weakRef) {
+ document = (Document)weakRef.getRef();
+
+ weakRef.incRefCnt();
+ this.weakRef = weakRef;
+ }
+
+ public void finalize() {
+ weakRef.decRefCnt();
+ instances --;
+ }
+
+ /*
+ ** DocumentProxy methods
+ */
+ private Toolkit toolkit;
+
+ private DocumentProxy(URL url, Toolkit toolkit) {
+ this();
+ document = new Document(url, toolkit);
+ }
+
+ void addExecutionContext(ExecutionContext executionContext, String name) {
+ document.addExecutionContext(executionContext, name);
+ }
+
+ void removeExecutionContext(String name) {
+ document.removeExecutionContext(name);
+ }
+
+ public URL getDocumentBase() {
+ return document.getDocumentBase();
+ }
+
+ /*
+ ** AppletContext interface methods
+ */
+ public Applet getApplet(String name) {
+ return ((AppletExecutionContext)document.getExecutionContext(name)).getApplet();
+ }
+
+ public Enumeration getApplets() {
+ return new Enumeration() {
+ Enumeration contexts = document.getExecutionContexts();
+
+ public boolean hasMoreElements() {
+ return contexts.hasMoreElements();
+ }
+
+ public Object nextElement() {
+ return ((AppletExecutionContext)contexts.nextElement()).getApplet();
+ }
+ };
+ }
+
+ public AudioClip getAudioClip(URL url) {
+ return document.getAudioClip(url);
+ }
+
+ public Image getImage(URL url) {
+ return document.getImage(url);
+ }
+
+ public void showDocument(URL url) {
+ document.showDocument(url);
+ }
+
+ /**
+ * Get the javascript environment for this applet.
+ */
+ /*
+ public native Object getJavaScriptJSObjectWindow();
+ public native void appletResize( int width, int height );
+ public native void showDocument( URL url, String aTarget );
+ public native void showStatus( String status );
+ */
+
+ public void showDocument(URL url, String aTarget) {
+ document.showDocument(url, aTarget);
+ }
+
+ public void showStatus(String status) {
+ document.showStatus(status);
+ }
+
+ public void update(Observable observable, Object object) {
+ showStatus((String)object);
+ }
+
+ public Object getJavaScriptJSObjectWindow() {
+ return document.getJavaScriptJSObjectWindow();
+ }
+}
+
diff --git a/sj2/stardiv/applet/LiveConnectable.java b/sj2/stardiv/applet/LiveConnectable.java
new file mode 100644
index 000000000000..9c33c09633c9
--- /dev/null
+++ b/sj2/stardiv/applet/LiveConnectable.java
@@ -0,0 +1,76 @@
+/*************************************************************************
+ *
+ * $RCSfile: LiveConnectable.java,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:54:03 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+package stardiv.applet;
+
+/**
+ * LiveConnectable interface .
+ *
+ * @version 1.0, 21/04/98
+ * @author Markus Meyer
+ */
+
+public interface LiveConnectable
+{
+ public Object getJavaScriptJSObjectWindow();
+}
+
+
diff --git a/sj2/stardiv/applet/makefile.mk b/sj2/stardiv/applet/makefile.mk
new file mode 100644
index 000000000000..6adfa52db4e7
--- /dev/null
+++ b/sj2/stardiv/applet/makefile.mk
@@ -0,0 +1,110 @@
+#*************************************************************************
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.1.1.1 $
+#
+# last change: $Author: hr $ $Date: 2000-09-18 16:54:03 $
+#
+# The Contents of this file are made available subject to the terms of
+# either of the following licenses
+#
+# - GNU Lesser General Public License Version 2.1
+# - Sun Industry Standards Source License Version 1.1
+#
+# Sun Microsystems Inc., October, 2000
+#
+# GNU Lesser General Public License Version 2.1
+# =============================================
+# Copyright 2000 by Sun Microsystems, Inc.
+# 901 San Antonio Road, Palo Alto, CA 94303, USA
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License version 2.1, as published by the Free Software Foundation.
+#
+# This library 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 for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+#
+# Sun Industry Standards Source License Version 1.1
+# =================================================
+# The contents of this file are subject to the Sun Industry Standards
+# Source License Version 1.1 (the "License"); You may not use this file
+# except in compliance with the License. You may obtain a copy of the
+# License at http://www.openoffice.org/license.html.
+#
+# Software provided under this License is provided on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+# See the License for the specific provisions governing your rights and
+# obligations concerning the Software.
+#
+# The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+#
+# Copyright: 2000 by Sun Microsystems, Inc.
+#
+# All Rights Reserved.
+#
+# Contributor(s): _______________________________________
+#
+#
+#
+#*************************************************************************
+
+PRJ=..$/..
+
+PRJNAME=sj2
+TARGET=applet
+
+PACKAGE=stardiv$/applet
+
+.INCLUDE : $(PRJ)$/util$/makefile.pmk
+
+# --- Files --------------------------------------------------------
+
+JARFILES= \
+ sandbox.jar
+
+JAVAFILES=\
+ AppletExecutionContext.java \
+ Document.java \
+ DocumentProxy.java \
+ LiveConnectable.java
+
+#.IF "$(GUI)"=="WNT"
+#JAVAFILES += WNativeAppletViewerFrame.java
+#.ENDIF
+
+JAVACLASSFILES= \
+ $(CLASSDIR)$/$(PACKAGE)$/DocumentProxy.class \
+ $(CLASSDIR)$/$(PACKAGE)$/Document.class \
+ $(CLASSDIR)$/$(PACKAGE)$/LiveConnectable.class \
+ $(CLASSDIR)$/$(PACKAGE)$/AppletExecutionContext.class
+
+
+#.IF "$(GUI)"=="WNT"
+#JAVACLASSFILES += $(CLASSDIR)$/stardiv$/applet$/WNativeAppletViewerFrame.class
+#.ENDIF
+
+
+# --- Targets ------------------------------------------------------
+
+.INCLUDE : target.mk
+
+.INCLUDE : $(PRJ)$/util$/target.pmk
+
+
+
+
+
+
+
diff --git a/sj2/stardiv/applet/resources/MsgAppletViewer.java b/sj2/stardiv/applet/resources/MsgAppletViewer.java
new file mode 100644
index 000000000000..d7e24350f63d
--- /dev/null
+++ b/sj2/stardiv/applet/resources/MsgAppletViewer.java
@@ -0,0 +1,166 @@
+/*************************************************************************
+ *
+ * $RCSfile: MsgAppletViewer.java,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:54:03 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+package stardiv.applet.resources;
+
+import java.util.ListResourceBundle;
+
+public class MsgAppletViewer extends ListResourceBundle {
+
+ public Object[][] getContents() {
+ return contents;
+ }
+
+ static final Object[][] contents = {
+ {"textframe.button.dismiss", "Dismiss"},
+ {"appletviewer.tool.title", "Applet Viewer: {0}"},
+ {"appletviewer.menu.applet", "Applet"},
+ {"appletviewer.menuitem.restart", "Restart"},
+ {"appletviewer.menuitem.reload", "Reload"},
+ {"appletviewer.menuitem.stop", "Stop"},
+ {"appletviewer.menuitem.save", "Save..."},
+ {"appletviewer.menuitem.start", "Start"},
+ {"appletviewer.menuitem.clone", "Clone..."},
+ {"appletviewer.menuitem.tag", "Tag..."},
+ {"appletviewer.menuitem.info", "Info..."},
+ {"appletviewer.menuitem.edit", "Edit"},
+ {"appletviewer.menuitem.encoding", "Character Encoding"},
+ {"appletviewer.menuitem.print", "Print..."},
+ {"appletviewer.menuitem.props", "Properties..."},
+ {"appletviewer.menuitem.close", "Close"},
+ {"appletviewer.menuitem.quit", "Quit"},
+ {"appletviewer.label.hello", "Hello..."},
+ {"appletviewer.status.start", "starting applet..."},
+ {"appletviewer.appletsave.err1", "serializing an {0} to {1}"},
+ {"appletviewer.appletsave.err2", "in appletSave: {0}"},
+ {"appletviewer.applettag", "Tag shown"},
+ {"appletviewer.applettag.textframe", "Applet HTML Tag"},
+ {"appletviewer.appletinfo.applet", "-- no applet info --"},
+ {"appletviewer.appletinfo.param", "-- no parameter info --"},
+ {"appletviewer.appletinfo.textframe", "Applet Info"},
+ {"appletviewer.appletprint.printjob", "Print Applet"},
+ {"appletviewer.appletprint.fail", "Printing failed."},
+ {"appletviewer.appletprint.finish", "Finished printing."},
+ {"appletviewer.appletprint.cancel", "Printing cancelled."},
+ {"appletviewer.appletencoding", "Character Encoding: {0}"},
+ {"appletviewer.init.err", "[no appletviewer.properties file found!]"},
+ {"appletviewer.parse.warning.requiresname", "Warning: <param name=... value=...> tag requires name attribute."},
+ {"appletviewer.parse.warning.paramoutside", "Warning: <param> tag outside <applet> ... </applet>."},
+ {"appletviewer.parse.warning.requirescode", "Warning: <applet> tag requires code attribute."},
+ {"appletviewer.parse.warning.requiresheight", "Warning: <applet> tag requires height attribute."},
+ {"appletviewer.parse.warning.requireswidth", "Warning: <applet> tag requires width attribute."},
+ {"appletviewer.parse.warning.appnotLongersupported", "Warning: <app> tag no longer supported, use <applet> instead:"},
+ {"appletviewer.usage", "usage: appletviewer [-debug] [-J<javaflag>] [-encoding <character encoding type> ] url|file ..."},
+ {"appletviewer.main.err.inputfile", "No input files specified."},
+ {"appletviewer.main.err.badurl", "Bad URL: {0} ( {1} )"},
+ {"appletviewer.main.err.io", "I/O exception while reading: {0}"},
+ {"appletviewer.main.err.readablefile", "Make sure that {0} is a file and is readable."},
+ {"appletviewer.main.err.correcturl", "Is {0} the correct URL?"},
+ {"appletviewer.main.warning", "Warning: No Applets were started. Make sure the input contains an <applet> tag."},
+ {"appletpanel.runloader.err", "Either object or code parameter!"},
+ {"appletpanel.runloader.exception", "exception while deserializing {0}"},
+ {"appletpanel.destroyed", "Applet destroyed."},
+ {"appletpanel.loaded", "Applet loaded."},
+ {"appletpanel.started", "Applet started."},
+ {"appletpanel.inited", "Applet initialized."},
+ {"appletpanel.stopped", "Applet stopped."},
+ {"appletpanel.disposed", "Applet disposed."},
+ {"appletpanel.nocode", "APPLET tag missing CODE parameter."},
+ {"appletpanel.notfound", "load: class {0} not found."},
+ {"appletpanel.nocreate", "load: {0} can''t be instantiated."},
+ {"appletpanel.noconstruct", "load: {0} is not public or has no public constructor."},
+ {"appletpanel.death", "killed"},
+ {"appletpanel.exception", "exception: {0}."},
+ {"appletpanel.exception2", "exception: {0}: {1}."},
+ {"appletpanel.error", "error: {0}."},
+ {"appletpanel.error2", "error: {0}: {1}."},
+ {"appletpanel.notloaded", "Init: applet not loaded."},
+ {"appletpanel.notinited", "Start: applet not initialized."},
+ {"appletpanel.notstarted", "Stop: applet not started."},
+ {"appletpanel.notstopped", "Destroy: applet not stopped."},
+ {"appletpanel.notdestroyed", "Dispose: applet not destroyed."},
+ {"appletpanel.notdisposed", "Load: applet not disposed."},
+ {"appletpanel.bail", "Interrupted: bailing out."},
+ {"appletpanel.filenotfound", "File not found when looking for: {0}"},
+ {"appletpanel.fileformat", "File format exception when loading: {0}"},
+ {"appletpanel.fileioexception", "I/O exception when loading: {0}"},
+ {"appletpanel.fileexception", "{0} exception when loading: {1}"},
+ {"appletpanel.filedeath", "{0} killed when loading: {1}"},
+ {"appletpanel.fileerror", "{0} error when loading: {1}"},
+ {"appletillegalargumentexception.objectinputstream", "AppletObjectInputStream requires non-null loader"},
+ {"appletprops.title", "AppletViewer Properties"},
+ {"appletprops.label.http.server", "Http proxy server:"},
+ {"appletprops.label.http.proxy", "Http proxy port:"},
+ {"appletprops.label.network", "Network access:"},
+ {"appletprops.choice.network.item.none", "None"},
+ {"appletprops.choice.network.item.applethost", "Applet Host"},
+ {"appletprops.choice.network.item.unrestricted", "Unrestricted"},
+ {"appletprops.label.class", "Class access:"},
+ {"appletprops.choice.class.item.restricted", "Restricted"},
+ {"appletprops.choice.class.item.unrestricted", "Unrestricted"},
+ {"appletprops.label.unsignedapplet", "Allow unsigned applets:"},
+ {"appletprops.choice.unsignedapplet.no", "No"},
+ {"appletprops.choice.unsignedapplet.yes", "Yes"},
+ {"appletprops.button.apply", "Apply"},
+ {"appletprops.button.cancel", "Cancel"},
+ {"appletprops.button.reset", "Reset"},
+ {"appletprops.apply.exception", "Failed to save properties: {0}"},
+ };
+}
diff --git a/sj2/stardiv/applet/resources/makefile.mk b/sj2/stardiv/applet/resources/makefile.mk
new file mode 100644
index 000000000000..bb272aa5d201
--- /dev/null
+++ b/sj2/stardiv/applet/resources/makefile.mk
@@ -0,0 +1,85 @@
+#*************************************************************************
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.1.1.1 $
+#
+# last change: $Author: hr $ $Date: 2000-09-18 16:54:03 $
+#
+# The Contents of this file are made available subject to the terms of
+# either of the following licenses
+#
+# - GNU Lesser General Public License Version 2.1
+# - Sun Industry Standards Source License Version 1.1
+#
+# Sun Microsystems Inc., October, 2000
+#
+# GNU Lesser General Public License Version 2.1
+# =============================================
+# Copyright 2000 by Sun Microsystems, Inc.
+# 901 San Antonio Road, Palo Alto, CA 94303, USA
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License version 2.1, as published by the Free Software Foundation.
+#
+# This library 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 for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+#
+# Sun Industry Standards Source License Version 1.1
+# =================================================
+# The contents of this file are subject to the Sun Industry Standards
+# Source License Version 1.1 (the "License"); You may not use this file
+# except in compliance with the License. You may obtain a copy of the
+# License at http://www.openoffice.org/license.html.
+#
+# Software provided under this License is provided on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+# See the License for the specific provisions governing your rights and
+# obligations concerning the Software.
+#
+# The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+#
+# Copyright: 2000 by Sun Microsystems, Inc.
+#
+# All Rights Reserved.
+#
+# Contributor(s): _______________________________________
+#
+#
+#
+#*************************************************************************
+
+PRJ=..$/..$/..
+
+PRJNAME=sj2
+TARGET=applet_resource
+
+PACKAGE=stardiv$/applet$/resources
+
+.INCLUDE : $(PRJ)$/util$/makefile.pmk
+
+# --- Files --------------------------------------------------------
+
+JAVAFILES=\
+ MsgAppletViewer.java
+
+JAVACLASSFILES=\
+ $(CLASSDIR)$/$(PACKAGE)$/MsgAppletViewer.class
+
+# --- Targets ------------------------------------------------------
+
+.INCLUDE : target.mk
+
+.INCLUDE : $(PRJ)$/util$/target.pmk
+
diff --git a/sj2/stardiv/controller/SjSettings.java b/sj2/stardiv/controller/SjSettings.java
new file mode 100644
index 000000000000..c5ab72b3d51d
--- /dev/null
+++ b/sj2/stardiv/controller/SjSettings.java
@@ -0,0 +1,261 @@
+/*************************************************************************
+ *
+ * $RCSfile: SjSettings.java,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:54:03 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+package stardiv.controller;
+
+import java.util.Properties;
+import java.util.Hashtable;
+import java.util.Enumeration;
+
+import com.sun.star.lib.sandbox.SandboxSecurity;
+
+/**
+ * ber diese Klasse werden alle globalen Einstellungen, die fr das Sj Projekt
+ * wichtig sind, dokumentiert und modifiziert.
+ *
+ * @version $Version: 1.0 $
+ * @author Markus Meyer
+ *
+ */
+public final class SjSettings {
+ /**
+ * The following properties are used to setup the environment for
+ * the stardiv packages.<BR>
+ * "appletviewer.security.mode"="unrestricted" | "host" | "none": Set the
+ * security level of the default SecurityManager. The default is "host".<BR>
+ * "stardiv.security.defaultSecurityManager"="true" | "false": Create and set
+ * the stardiv.security.AppletSecurity, if the property is "true". This occures
+ * only in the first call.<BR>
+ * "stardiv.security.noExit"="true" | "false": no exit is allowed. Use this property
+ * if you are running more than one java application in the virtual machine. This occures
+ * only in the first call.<BR>
+ * "stardiv.security.disableSecurity"="true" | "false": disable security checking. Only usefull
+ * if a SecurityManager is installed. The default is "false".<BR>
+ * if you are running more than one java application in the virtual machine. This occures
+ * only in the first call.<BR>
+ * "stardiv.controller.installConsole"="true" | "false": pipe the stdout and stderr
+ * through a console. Show the console with stardiv.controller.Console.showConsole( true ).
+ * This occures only in the first call.<BR>
+ * "stardiv.js.debugOnError"="true" | "false": Start the javascript ide, if an error
+ * occures. The default is "false".<BR>
+ * "stardiv.js.debugImmediate"="true" | "false": Start the javascript ide, if a script
+ * starts. The default is "false".<BR>
+ * "stardiv.debug.trace"="messageBox" | "window" | "file" | "none": The trace pipe is
+ * set to one of the four mediums. The Default is "none".<BR>
+ * "stardiv.debug.error"="messageBox" | "window" | "file" | "none": The error pipe is
+ * set to one of the four mediums. The Default is "none".<BR>
+ * "stardiv.debug.warning"="messageBox" | "window" | "file" | "none": The warning pipe is
+ * set to one of the four mediums. The Default is "none".<BR>
+ * If the properties http.proxyHost, http.proxyPort, http.maxConnections,
+ * http.keepAlive or http.nonProxyHosts are changed, the method
+ * sun.net.www.http.HttpClient.resetProperties() is called.<BR>
+ * If the properties ftpProxySet, ftpProxyHost or ftpProxyPort are changed,
+ * the static variables useFtpProxy, ftpProxyHost and ftpProxyPort in the class
+ * sun.net.ftp.FtpClient are set.<BR>
+ * <B>If you are writing your own SecurityManager and ClassLoader, please implement the
+ * interfaces stardiv.security.ClassLoaderExtension and
+ * stardiv.security.SecurityManagerExtension. Be shure to set the
+ * stardiv.security.ClassLoaderFactory, to enable dynamic class loading, otherwise
+ * the stardiv.security.AppletClassLoader is used. Set the factory with
+ * SjSettings.setClassLoaderFactory().</B>
+ */
+ static public synchronized void changeProperties( Properties pChangeProps )
+ {
+ SecurityManager pSM = System.getSecurityManager();
+ if( pSM != null )
+ pSM.checkPropertiesAccess();
+ Properties props = new Properties( System.getProperties() );
+ boolean bInited = Boolean.getBoolean( "stardiv.controller.SjSettings.inited" );
+
+
+ if( !bInited )
+ {
+ // check the awt.toolkit property: if none is set use com.sun.star.comp.jawt.peer.Toolkit
+ //if ( props.getProperty("awt.toolkit") == null )
+ // props.put("awt.toolkit", "com.sun.star.comp.jawt.peer.Toolkit");
+
+ // Define a number of standard properties
+ props.put("acl.read", "+");
+ props.put("acl.read.default", "");
+ props.put("acl.write", "+");
+ props.put("acl.write.default", "");
+
+ // Standard browser properties
+ props.put("browser", "stardiv.applet.AppletViewerFrame");
+ props.put("browser.version", "4.02");
+ props.put("browser.vendor", "Sun Microsystems, Inc.");
+ props.put("http.agent", "JDK/1.1");
+
+ // Define which packages can be accessed by applets
+ props.put("package.restrict.access.sun", "true");
+ props.put("package.restrict.access.netscape", "true");
+ props.put("package.restrict.access.stardiv", "true");
+
+ // Define which packages can be extended by applets
+ props.put("package.restrict.definition.java", "true");
+ props.put("package.restrict.definition.sun", "true");
+ props.put("package.restrict.definition.netscape", "true");
+ props.put("package.restrict.definition.stardiv", "true");
+
+ // Define which properties can be read by applets.
+ // A property named by "key" can be read only when its twin
+ // property "key.applet" is true. The following ten properties
+ // are open by default. Any other property can be explicitly
+ // opened up by the browser user setting key.applet=true in
+ // ~/.hotjava/properties. Or vice versa, any of the following can
+ // be overridden by the user's properties.
+ props.put("java.version.applet", "true");
+ props.put("java.vendor.applet", "true");
+ props.put("java.vendor.url.applet", "true");
+ props.put("java.class.version.applet", "true");
+ props.put("os.name.applet", "true");
+ props.put("os.version.applet", "true");
+ props.put("os.arch.applet", "true");
+ props.put("file.separator.applet", "true");
+ props.put("path.separator.applet", "true");
+ props.put("line.separator.applet", "true");
+
+ // das appletresourceprotokol
+ props.put("java.protocol.handler.pkgs", "stardiv.net.protocol");
+ }
+
+ boolean bHttpClientChanged = false;
+ boolean bFtpClientChanged = false;
+ boolean bSecurityChanged = false;
+ // detect changes
+ if( pChangeProps != null )
+ {
+ bHttpClientChanged =
+ !equalsImpl( props.get( "http.proxyHost" ), pChangeProps.get( "http.proxyHost" ) )
+ || !equalsImpl( props.get( "http.proxyPort" ), pChangeProps.get( "http.proxyPort" ) )
+ || !equalsImpl( props.get( "http.maxConnections" ), pChangeProps.get( "http.maxConnections" ) )
+ || !equalsImpl( props.get( "http.keepAlive" ), pChangeProps.get( "http.keepAlive" ) )
+ || !equalsImpl( props.get( "http.nonProxyHosts" ), pChangeProps.get( "http.nonProxyHosts" ) );
+ bFtpClientChanged =
+ !equalsImpl( props.get( "ftpProxySet" ), pChangeProps.get( "ftpProxySet" ) )
+ || !equalsImpl( props.get( "ftpProxyHost" ), pChangeProps.get( "ftpProxyHost" ) )
+ || !equalsImpl( props.get( "ftpProxyPort" ), pChangeProps.get( "ftpProxyPort" ) );
+ bSecurityChanged =
+ !equalsImpl( props.get( "appletviewer.security.mode" ), pChangeProps.get( "appletviewer.security.mode" ) )
+ || !equalsImpl( props.get( "stardiv.security.disableSecurity" ), pChangeProps.get( "stardiv.security.disableSecurity" ) );
+ }
+
+ // put new and changed properties to the property table
+ if( pChangeProps != null )
+ {
+ Enumeration aEnum = pChangeProps.propertyNames();
+ while( aEnum.hasMoreElements() )
+ {
+ String aKey = (String)aEnum.nextElement();
+ props.put( aKey, pChangeProps.getProperty( aKey ) );
+ }
+ }
+
+ // Install a property list.
+ if( !bInited )
+ props.put( "stardiv.controller.SjSettings.inited", "true" );
+ System.setProperties(props);
+ if( !bInited )
+ {
+ // Security Manager setzten
+ if( Boolean.getBoolean( "stardiv.security.defaultSecurityManager" ) )
+ {
+ boolean bNoExit = Boolean.getBoolean( "stardiv.security.noExit" );
+ //Create and install the security manager
+ System.setSecurityManager(new SandboxSecurity(bNoExit));
+ }
+ if( Boolean.getBoolean("stardiv.controller.installConsole") )
+ Console.installConsole();
+
+ }
+ // Not Documented, setting a try catch, for IncompatibleClassChangeException.
+ try
+ {
+ if( bHttpClientChanged )
+ sun.net.www.http.HttpClient.resetProperties();
+ if( bFtpClientChanged )
+ {
+ sun.net.ftp.FtpClient.useFtpProxy = Boolean.getBoolean("ftpProxySet");
+ sun.net.ftp.FtpClient.ftpProxyHost = System.getProperty("ftpProxyHost");
+ sun.net.ftp.FtpClient.ftpProxyPort = Integer.getInteger("ftpProxyPort", 80).intValue();
+ }
+ }
+ catch( Throwable e )
+ {
+ }
+ if( bSecurityChanged )
+ {
+ pSM = System.getSecurityManager();
+ if( pSM instanceof SandboxSecurity )
+ {
+ ((SandboxSecurity)pSM).reset();
+ }
+ }
+ }
+
+ private static boolean equalsImpl( Object p1, Object p2 )
+ {
+ return p1 == p2 || (p1 != null && p2 != null && p1.equals( p2 ) );
+ }
+}
+
+
+
diff --git a/sj2/stardiv/controller/makefile.mk b/sj2/stardiv/controller/makefile.mk
new file mode 100644
index 000000000000..6a2b2402cf1a
--- /dev/null
+++ b/sj2/stardiv/controller/makefile.mk
@@ -0,0 +1,102 @@
+#*************************************************************************
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.1.1.1 $
+#
+# last change: $Author: hr $ $Date: 2000-09-18 16:54:04 $
+#
+# The Contents of this file are made available subject to the terms of
+# either of the following licenses
+#
+# - GNU Lesser General Public License Version 2.1
+# - Sun Industry Standards Source License Version 1.1
+#
+# Sun Microsystems Inc., October, 2000
+#
+# GNU Lesser General Public License Version 2.1
+# =============================================
+# Copyright 2000 by Sun Microsystems, Inc.
+# 901 San Antonio Road, Palo Alto, CA 94303, USA
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License version 2.1, as published by the Free Software Foundation.
+#
+# This library 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 for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+#
+# Sun Industry Standards Source License Version 1.1
+# =================================================
+# The contents of this file are subject to the Sun Industry Standards
+# Source License Version 1.1 (the "License"); You may not use this file
+# except in compliance with the License. You may obtain a copy of the
+# License at http://www.openoffice.org/license.html.
+#
+# Software provided under this License is provided on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+# See the License for the specific provisions governing your rights and
+# obligations concerning the Software.
+#
+# The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+#
+# Copyright: 2000 by Sun Microsystems, Inc.
+#
+# All Rights Reserved.
+#
+# Contributor(s): _______________________________________
+#
+#
+#
+#*************************************************************************
+
+PRJ=..$/..
+
+PRJNAME=sj2
+TARGET=controller
+
+PACKAGE=stardiv$/controller
+JARFILES=sandbox.jar tkt.jar
+
+.INCLUDE : $(PRJ)$/util$/makefile.pmk
+
+# --- Files --------------------------------------------------------
+
+JAVAFILES= \
+ SjSettings.java \
+ StreamObserver.java \
+ NativeStreamObserver.java \
+ AppStarter.java \
+ AppStarterStatus.java \
+ AppStarterStatusNative.java \
+ JavaSystemMonitor.java \
+ Console.java \
+ PropertyEditor.java
+
+JAVACLASSFILES= \
+ $(CLASSDIR)$/$(PACKAGE)$/SjSettings.class \
+ $(CLASSDIR)$/$(PACKAGE)$/StreamObserver.class \
+ $(CLASSDIR)$/$(PACKAGE)$/NativeStreamObserver.class \
+ $(CLASSDIR)$/$(PACKAGE)$/AppStarter.class \
+ $(CLASSDIR)$/$(PACKAGE)$/AppStarterStatus.class \
+ $(CLASSDIR)$/$(PACKAGE)$/AppStarterStatusNative.class \
+ $(CLASSDIR)$/$(PACKAGE)$/Console.class \
+ $(CLASSDIR)$/$(PACKAGE)$/JavaSystemMonitor.class \
+ $(CLASSDIR)$/$(PACKAGE)$/PropertyEditor.class
+
+# --- Targets ------------------------------------------------------
+
+.INCLUDE : target.mk
+
+.INCLUDE : $(PRJ)$/util$/target.pmk
+
diff --git a/sj2/stardiv/security/resources/MsgAppletViewer.java b/sj2/stardiv/security/resources/MsgAppletViewer.java
new file mode 100644
index 000000000000..d02ce8184216
--- /dev/null
+++ b/sj2/stardiv/security/resources/MsgAppletViewer.java
@@ -0,0 +1,122 @@
+/*************************************************************************
+ *
+ * $RCSfile: MsgAppletViewer.java,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 16:54:04 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+package stardiv.security.resources;
+
+import java.util.ListResourceBundle;
+
+/* Alle Resourcen aus AppletClassLoader, Applet und AppletSecurityException.
+*/
+public class MsgAppletViewer extends ListResourceBundle {
+
+ public Object[][] getContents() {
+ return contents;
+ }
+
+ static final Object[][] contents = {
+ {"appletclassloader.loadcode.verbose", "Opening stream to: {0} to get {1}"},
+ {"appletclassloader.filenotfound", "File not found when looking for: {0}"},
+ {"appletclassloader.fileformat", "File format exception when loading: {0}"},
+ {"appletclassloader.fileioexception", "I/O exception when loading: {0}"},
+ {"appletclassloader.fileexception", "{0} exception when loading: {1}"},
+ {"appletclassloader.filedeath", "{0} killed when loading: {1}"},
+ {"appletclassloader.fileerror", "{0} error when loading: {1}"},
+ {"appletclassloader.findclass.verbose.findclass", "{0} find class {1}"},
+ {"appletclassloader.findclass.verbose.openstream", "Opening stream to: {0} to get {1}"},
+ {"appletclassloader.getresource.verbose.forname", "AppletClassLoader.getResource for name: {0}"},
+ {"appletclassloader.getresource.verbose.found", "Found resource: {0} as a system resource"},
+ {"appletclassloader.getresourceasstream.verbose", "Found resource: {0} as a system resource"},
+ {"appletioexception.loadclass.throw.interrupted", "class loading interrupted: {0}"},
+ {"appletioexception.loadclass.throw.notloaded", "class not loaded: {0}"},
+ {"appletsecurityexception.checkcreateclassloader", "Security Exception: classloader"},
+ {"appletsecurityexception.checkaccess.thread", "Security Exception: thread"},
+ {"appletsecurityexception.checkaccess.threadgroup", "Security Exception: threadgroup: {0}"},
+ {"appletsecurityexception.checkexit", "Security Exception: exit: {0}"},
+ {"appletsecurityexception.checkexec", "Security Exception: exec: {0}"},
+ {"appletsecurityexception.checklink", "Security Exception: link: {0}"},
+ {"appletsecurityexception.checkpropsaccess", "Security Exception: properties"},
+ {"appletsecurityexception.checkpropsaccess.key", "Security Exception: properties access {0}"},
+ {"appletsecurityexception.checkread.exception1", "Security Exception: {0}, {1}"},
+ {"appletsecurityexception.checkread.exception2", "Security Exception: file.read: {0}"},
+ {"appletsecurityexception.checkread", "Security Exception: file.read: {0} == {1}"},
+ {"appletsecurityexception.checkwrite.exception", "Security Exception: {0}, {1}"},
+ {"appletsecurityexception.checkwrite", "Security Exception: file.write: {0} == {1}"},
+ {"appletsecurityexception.checkread.fd", "Security Exception: fd.read"},
+ {"appletsecurityexception.checkwrite.fd", "Security Exception: fd.write"},
+ {"appletsecurityexception.checklisten", "Security Exception: socket.listen: {0}"},
+ {"appletsecurityexception.checkaccept", "Security Exception: socket.accept: {0}:{1}"},
+ {"appletsecurityexception.checkconnect.networknone", "Security Exception: socket.connect: {0}->{1}"},
+ {"appletsecurityexception.checkconnect.networkhost1", "Security Exception: Couldn''t connect to {0} with origin from {1}."},
+ {"appletsecurityexception.checkconnect.networkhost2", "Security Exception: Couldn''t resolve IP for host {0} or for {1}. "},
+ {"appletsecurityexception.checkconnect.networkhost3", "Security Exception: Could not resolve IP for host {0}. See the trustProxy property."},
+ {"appletsecurityexception.checkconnect", "Security Exception: connect: {0}->{1}"},
+ {"appletsecurityexception.checkpackageaccess", "Security Exception: cannot access package: {0}"},
+ {"appletsecurityexception.checkpackagedefinition", "Security Exception: cannot define package: {0}"},
+ {"appletsecurityexception.cannotsetfactory", "Security Exception: cannot set factory"},
+ {"appletsecurityexception.checkmemberaccess", "Security Exception: check member access"},
+ {"appletsecurityexception.checkgetprintjob", "Security Exception: getPrintJob"},
+ {"appletsecurityexception.checksystemclipboardaccess", "Security Exception: getSystemClipboard"},
+ {"appletsecurityexception.checkawteventqueueaccess", "Security Exception: getEventQueue"},
+ {"appletsecurityexception.checksecurityaccess", "Security Exception: security operation: {0}"},
+ {"appletsecurityexception.getsecuritycontext.unknown", "unknown class loader type. unable to check for getContext"},
+ {"appletsecurityexception.checkread.unknown", "unknown class loader type. unable to check for checking read {0}"},
+ {"appletsecurityexception.checkconnect.unknown", "unknown class loader type. unable to check for checking connect"},
+ };
+}
diff --git a/sj2/stardiv/security/resources/makefile.mk b/sj2/stardiv/security/resources/makefile.mk
new file mode 100644
index 000000000000..44bfeb2ec5a0
--- /dev/null
+++ b/sj2/stardiv/security/resources/makefile.mk
@@ -0,0 +1,85 @@
+#*************************************************************************
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.1.1.1 $
+#
+# last change: $Author: hr $ $Date: 2000-09-18 16:54:04 $
+#
+# The Contents of this file are made available subject to the terms of
+# either of the following licenses
+#
+# - GNU Lesser General Public License Version 2.1
+# - Sun Industry Standards Source License Version 1.1
+#
+# Sun Microsystems Inc., October, 2000
+#
+# GNU Lesser General Public License Version 2.1
+# =============================================
+# Copyright 2000 by Sun Microsystems, Inc.
+# 901 San Antonio Road, Palo Alto, CA 94303, USA
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License version 2.1, as published by the Free Software Foundation.
+#
+# This library 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 for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+#
+# Sun Industry Standards Source License Version 1.1
+# =================================================
+# The contents of this file are subject to the Sun Industry Standards
+# Source License Version 1.1 (the "License"); You may not use this file
+# except in compliance with the License. You may obtain a copy of the
+# License at http://www.openoffice.org/license.html.
+#
+# Software provided under this License is provided on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+# See the License for the specific provisions governing your rights and
+# obligations concerning the Software.
+#
+# The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+#
+# Copyright: 2000 by Sun Microsystems, Inc.
+#
+# All Rights Reserved.
+#
+# Contributor(s): _______________________________________
+#
+#
+#
+#*************************************************************************
+
+PRJ=..$/..$/..
+
+PRJNAME=sj2
+TARGET=security_resource
+
+PACKAGE=stardiv$/security$/resources
+
+.INCLUDE : $(PRJ)$/util$/makefile.pmk
+
+# --- Files --------------------------------------------------------
+
+JAVAFILES=\
+ MsgAppletViewer.java
+
+JAVACLASSFILES=\
+ $(CLASSDIR)$/stardiv$/security$/resources$/MsgAppletViewer.class
+
+# --- Targets ------------------------------------------------------
+
+.INCLUDE : target.mk
+
+.INCLUDE : $(PRJ)$/util$/target.pmk
+
diff --git a/sj2/util/makefile.mk b/sj2/util/makefile.mk
new file mode 100644
index 000000000000..14d238d98eb1
--- /dev/null
+++ b/sj2/util/makefile.mk
@@ -0,0 +1,138 @@
+#*************************************************************************
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.1.1.1 $
+#
+# last change: $Author: hr $ $Date: 2000-09-18 16:54:04 $
+#
+# The Contents of this file are made available subject to the terms of
+# either of the following licenses
+#
+# - GNU Lesser General Public License Version 2.1
+# - Sun Industry Standards Source License Version 1.1
+#
+# Sun Microsystems Inc., October, 2000
+#
+# GNU Lesser General Public License Version 2.1
+# =============================================
+# Copyright 2000 by Sun Microsystems, Inc.
+# 901 San Antonio Road, Palo Alto, CA 94303, USA
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License version 2.1, as published by the Free Software Foundation.
+#
+# This library 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 for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+#
+# Sun Industry Standards Source License Version 1.1
+# =================================================
+# The contents of this file are subject to the Sun Industry Standards
+# Source License Version 1.1 (the "License"); You may not use this file
+# except in compliance with the License. You may obtain a copy of the
+# License at http://www.openoffice.org/license.html.
+#
+# Software provided under this License is provided on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+# See the License for the specific provisions governing your rights and
+# obligations concerning the Software.
+#
+# The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+#
+# Copyright: 2000 by Sun Microsystems, Inc.
+#
+# All Rights Reserved.
+#
+# Contributor(s): _______________________________________
+#
+#
+#
+#*************************************************************************
+
+PRJ=..
+
+PRJNAME=sj2
+TARGET=sj
+USE_LDUMP2=TRUE
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : svpre.mk
+.INCLUDE : settings.mk
+.INCLUDE : sv.mk
+
+LDUMP2=LDUMP3
+
+# ------------------------------------------------------------------
+
+.IF "$(header)" == ""
+
+LIB1TARGET= $(SLB)$/$(TARGET).lib
+LIB1FILES= \
+ $(SLB)$/java.lib \
+ $(SLB)$/jscpp.lib
+
+SHL1DEPN= $(L)$/itools.lib $(SVLIBDEPEND) $(L)$/svtool.lib $(LIB1TARGET)
+
+SHL1TARGET= j$(UPD)$(DLLPOSTFIX)_g
+SHL1IMPLIB= $(TARGET)
+
+SHL1STDLIBS= \
+ $(SVTOOLLIB) \
+ $(SVLLIB) \
+ $(TKLIB) \
+ $(VCLLIB) \
+ $(TOOLSLIB) \
+ $(VOSLIB) \
+ $(SALLIB) \
+ $(RTLLIB) \
+ $(CPPULIB) \
+ $(UNOTOOLSLIB)
+
+SHL1LIBS= $(SLB)$/$(TARGET).lib
+SHL1DEF= $(MISC)$/$(SHL1TARGET).def
+
+DEF1NAME =$(SHL1TARGET)
+DEF1DEPN =$(MISC)$/$(SHL1TARGET).flt
+DEFLIB1NAME =$(TARGET)
+DEF1DES =JavaCPP
+DEF1CEXP =Java
+.ENDIF
+
+JARTARGET=classes.jar
+JARCLASSDIRS=stardiv
+
+# --- Targets ------------------------------------------------------
+
+.INCLUDE : target.mk
+.INCLUDE : target.pmk
+
+$(MISC)$/$(SHL1TARGET).flt: makefile.mk
+ @echo ------------------------------
+ @echo Making: $@
+ @echo WEP>$@
+ @echo LIBMAIN>>$@
+ @echo LibMain>>$@
+ @echo bad_alloc::bad_alloc>>$@
+ @echo exception::exception>>$@
+.IF "$(COM)"=="MSC"
+ @echo __CT>>$@
+.ENDIF
+.IF "$(COM)"=="ICC"
+ @echo __lower_bound>>$@
+ @echo __stl_prime>>$@
+ @echo __alloc>>$@
+ @echo __malloc>>$@
+.ENDIF
+
diff --git a/sj2/util/makefile.pmk b/sj2/util/makefile.pmk
new file mode 100644
index 000000000000..f36e7c0312de
--- /dev/null
+++ b/sj2/util/makefile.pmk
@@ -0,0 +1,85 @@
+#*************************************************************************
+#
+# $RCSfile: makefile.pmk,v $
+#
+# $Revision: 1.1.1.1 $
+#
+# last change: $Author: hr $ $Date: 2000-09-18 16:54:04 $
+#
+# The Contents of this file are made available subject to the terms of
+# either of the following licenses
+#
+# - GNU Lesser General Public License Version 2.1
+# - Sun Industry Standards Source License Version 1.1
+#
+# Sun Microsystems Inc., October, 2000
+#
+# GNU Lesser General Public License Version 2.1
+# =============================================
+# Copyright 2000 by Sun Microsystems, Inc.
+# 901 San Antonio Road, Palo Alto, CA 94303, USA
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License version 2.1, as published by the Free Software Foundation.
+#
+# This library 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 for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+#
+# Sun Industry Standards Source License Version 1.1
+# =================================================
+# The contents of this file are subject to the Sun Industry Standards
+# Source License Version 1.1 (the "License"); You may not use this file
+# except in compliance with the License. You may obtain a copy of the
+# License at http://www.openoffice.org/license.html.
+#
+# Software provided under this License is provided on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+# See the License for the specific provisions governing your rights and
+# obligations concerning the Software.
+#
+# The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+#
+# Copyright: 2000 by Sun Microsystems, Inc.
+#
+# All Rights Reserved.
+#
+# Contributor(s): _______________________________________
+#
+#
+#
+#*************************************************************************
+
+#PROJECTPCH4DLL=TRUE
+#PROJECTPCH=sjpch
+#PROJECTPCHSOURCE=$(PRJ)$/util\sjpch
+#PDBTARGET=sj
+PRJPCH=
+
+JAVAPREPRO=
+.IF "$(JDK_VERSION)" == "110"
+JAVAPREPRO=-jdk11
+.ENDIF
+.IF "$(PRODUCT)" != ""
+JAVAPREPRO=$(JAVAPREPRO) + " -product"
+.ENDIF
+
+ENABLE_EXCEPTIONS=TRUE
+
+JARFILES=sandbox.jar tkt.jar
+
+# --- Settings -----------------------------------------------------
+.INCLUDE : svpre.mk
+.INCLUDE : settings.mk
+.INCLUDE : sv.mk
+
diff --git a/sj2/util/target.pmk b/sj2/util/target.pmk
new file mode 100644
index 000000000000..af6cc99902a7
--- /dev/null
+++ b/sj2/util/target.pmk
@@ -0,0 +1,73 @@
+#*************************************************************************
+#
+# $RCSfile: target.pmk,v $
+#
+# $Revision: 1.1.1.1 $
+#
+# last change: $Author: hr $ $Date: 2000-09-18 16:54:04 $
+#
+# The Contents of this file are made available subject to the terms of
+# either of the following licenses
+#
+# - GNU Lesser General Public License Version 2.1
+# - Sun Industry Standards Source License Version 1.1
+#
+# Sun Microsystems Inc., October, 2000
+#
+# GNU Lesser General Public License Version 2.1
+# =============================================
+# Copyright 2000 by Sun Microsystems, Inc.
+# 901 San Antonio Road, Palo Alto, CA 94303, USA
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License version 2.1, as published by the Free Software Foundation.
+#
+# This library 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 for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+#
+# Sun Industry Standards Source License Version 1.1
+# =================================================
+# The contents of this file are subject to the Sun Industry Standards
+# Source License Version 1.1 (the "License"); You may not use this file
+# except in compliance with the License. You may obtain a copy of the
+# License at http://www.openoffice.org/license.html.
+#
+# Software provided under this License is provided on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+# See the License for the specific provisions governing your rights and
+# obligations concerning the Software.
+#
+# The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+#
+# Copyright: 2000 by Sun Microsystems, Inc.
+#
+# All Rights Reserved.
+#
+# Contributor(s): _______________________________________
+#
+#
+#
+#*************************************************************************
+.IF "$(depend)" == ""
+ONLYZIP: $(SLOFILES)
+ cd $(PRJ)$/util
+ nmake debug=t
+
+TEST:
+
+DOC:
+
+PREPRO:
+ $(JAVAI) $(JAVACPS) $(CLASSPATH) stardiv.app.Javac $(JAVAPREPRO) $(JAVAFILES)
+.ENDIF
diff --git a/svx/inc/anchorid.hxx b/svx/inc/anchorid.hxx
new file mode 100644
index 000000000000..4279af35877d
--- /dev/null
+++ b/svx/inc/anchorid.hxx
@@ -0,0 +1,77 @@
+/*************************************************************************
+ *
+ * $RCSfile: anchorid.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:00:54 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SVX_ANCHORID_HXX
+#define _SVX_ANCHORID_HXX
+
+
+enum SvxAnchorIds
+{
+ SVX_OBJ_AT_CNTNT = 0x01, //Absatzgebundener Rahmen
+ SVX_OBJ_IN_CNTNT = 0x02, //Zeichengebundener Rahmen
+ SVX_OBJ_PAGE = 0x04, //Seitengebundener Rahmen
+ SVX_OBJ_AT_FLY = 0x08 //Rahmengebundener Rahmen
+// SVX_OBJ_AUTO_CNTNT = 0x10 //Automatisch positionierter, absatzgebundener Rahmen
+};
+
+
+
+#endif
+
diff --git a/svx/inc/bolnitem.hxx b/svx/inc/bolnitem.hxx
new file mode 100644
index 000000000000..80f59da41bda
--- /dev/null
+++ b/svx/inc/bolnitem.hxx
@@ -0,0 +1,117 @@
+/*************************************************************************
+ *
+ * $RCSfile: bolnitem.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:00:54 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SVX_BOLNITEM_HXX
+#define _SVX_BOLNITEM_HXX
+
+// include ---------------------------------------------------------------
+
+
+
+#ifndef _SFXPOOLITEM_HXX //autogen
+#include <svtools/poolitem.hxx>
+#endif
+
+
+
+// class SvxLineItem -----------------------------------------------------
+
+
+/*
+[Beschreibung]
+Dieses Item transportiert eine SvxBorderLine.
+*/
+
+class SvxBorderLine;
+
+class SvxLineItem : public SfxPoolItem
+{
+public:
+ TYPEINFO();
+
+ SvxLineItem( const USHORT nId = ITEMID_LINE );
+ SvxLineItem( const SvxLineItem& rCpy );
+ ~SvxLineItem();
+ SvxLineItem &operator=( const SvxLineItem& rLine );
+
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText, const International * = 0 ) const;
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxPoolItem* Create(SvStream &, USHORT) const;
+ virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const;
+ virtual int ScaleMetrics( long nMult, long nDiv );
+ virtual int HasMetrics() const;
+
+ const SvxBorderLine* GetLine () const { return pLine; }
+ void SetLine ( const SvxBorderLine *pNew );
+
+private:
+ SvxBorderLine* pLine;
+};
+
+
+
+
+#endif
+
diff --git a/svx/inc/bulitem.hxx b/svx/inc/bulitem.hxx
new file mode 100644
index 000000000000..092bdafac68e
--- /dev/null
+++ b/svx/inc/bulitem.hxx
@@ -0,0 +1,204 @@
+/*************************************************************************
+ *
+ * $RCSfile: bulitem.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:00:54 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SVX_BULITEM_HXX
+#define _SVX_BULITEM_HXX
+
+// include ---------------------------------------------------------------
+
+
+// define ----------------------------------------------------------------
+
+// Styles
+#define BS_ABC_BIG 0
+#define BS_ABC_SMALL 1
+#define BS_ROMAN_BIG 2
+#define BS_ROMAN_SMALL 3
+#define BS_123 4
+#define BS_NONE 5
+#define BS_BULLET 6
+#define BS_BMP 128
+
+// Justification
+#define BJ_HLEFT 0x01
+#define BJ_HRIGHT 0x02
+#define BJ_HCENTER 0x04
+#define BJ_VTOP 0x08
+#define BJ_VBOTTOM 0x10
+#define BJ_VCENTER 0x20
+
+// Valid-Bits
+// Erstmal nur die Werte, die vom Dialog geaendert werden...
+#define VALID_FONTCOLOR 0x0001
+#define VALID_FONTNAME 0x0002
+#define VALID_SYMBOL 0x0004
+#define VALID_BITMAP 0x0008
+#define VALID_SCALE 0x0010
+#define VALID_START 0x0020
+#define VALID_STYLE 0x0040
+#define VALID_PREVTEXT 0x0080
+#define VALID_FOLLOWTEXT 0x0100
+
+#ifndef _SFXPOOLITEM_HXX //autogen
+#include <svtools/poolitem.hxx>
+#endif
+
+#ifndef _VCL_FONT_HXX //autogen
+#include <vcl/font.hxx>
+#endif
+
+#ifndef _GRFMGR_HXX //autogen
+#include <goodies/grfmgr.hxx>
+#endif
+
+
+
+// class SvxBulletItem ---------------------------------------------------
+
+class SvxBulletItem : public SfxPoolItem
+{
+ Font aFont;
+ GraphicObject aGraphicObject;
+ String aPrevText;
+ String aFollowText;
+ USHORT nStart;
+ USHORT nStyle;
+ long nWidth;
+ USHORT nScale;
+ sal_Unicode cSymbol;
+ BYTE nJustify;
+
+ USHORT nValidMask; // Nur temporaer fuer GetAttribs/SetAttribs, wegen des grossen Bullets
+
+#ifdef _SVX_BULITEM_CXX
+ void SetDefaultFont_Impl();
+ void SetDefaults_Impl();
+#endif
+
+public:
+ TYPEINFO();
+
+ SvxBulletItem( USHORT nWhich = 0 );
+ SvxBulletItem( BYTE nStyle, const Font& rFont, USHORT nStart = 0,
+ USHORT nWhich = 0 );
+ SvxBulletItem( const Font& rFont, sal_Unicode cSymbol, USHORT nWhich=0 );
+ SvxBulletItem( const Bitmap&, USHORT nWhich = 0 );
+ SvxBulletItem( const GraphicObject&, USHORT nWhich = 0 );
+ SvxBulletItem( SvStream& rStrm, USHORT nWhich = 0 );
+ SvxBulletItem( const SvxBulletItem& );
+ ~SvxBulletItem() {}
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxPoolItem* Create( SvStream&, USHORT nVersion ) const;
+ virtual SvStream& Store( SvStream & , USHORT nItemVersion ) const;
+
+ String GetFullText() const;
+ sal_Unicode GetSymbol() const { return cSymbol; }
+ String GetPrevText() const { return aPrevText; }
+ String GetFollowText() const { return aFollowText; }
+
+ USHORT GetStart() const { return nStart; }
+ long GetWidth() const { return nWidth; }
+ USHORT GetStyle() const { return nStyle; }
+ BYTE GetJustification() const { return nJustify; }
+ Font GetFont() const { return aFont; }
+ USHORT GetScale() const { return nScale; }
+ Bitmap GetBitmap() const { return aGraphicObject.GetGraphic().GetBitmap(); }
+ const GraphicObject& GetGraphicObject() const { return aGraphicObject; }
+
+ void SetSymbol( sal_Unicode c) { cSymbol = c; }
+ void SetPrevText( const String& rStr) { aPrevText = rStr;}
+ void SetFollowText(const String& rStr) { aFollowText=rStr;}
+
+ void SetStart( USHORT nNew ) { nStart = nNew; }
+ void SetWidth( long nNew ) { nWidth = nNew; }
+ void SetStyle( USHORT nNew ) { nStyle = nNew; }
+ void SetJustification( BYTE nNew ) { nJustify = nNew; }
+ void SetFont( const Font& rNew) { aFont = rNew; }
+ void SetScale( USHORT nNew ) { nScale = nNew; }
+ void SetBitmap( const Bitmap& rBmp ) { aGraphicObject.SetGraphic( rBmp ); }
+ void SetGraphicObject( const GraphicObject& rGraphicObject ) { aGraphicObject = rGraphicObject; }
+
+ virtual USHORT GetVersion(USHORT nFileVersion) const;
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText, const International * = 0 ) const;
+
+ static void StoreFont( SvStream&, const Font& );
+ static Font CreateFont( SvStream&, USHORT nVer );
+
+ USHORT& GetValidMask() { return nValidMask; }
+ USHORT GetValidMask() const { return nValidMask; }
+ USHORT IsValid( USHORT nFlag ) const { return nValidMask & nFlag; }
+ void SetValid( USHORT nFlag, BOOL bValid )
+ {
+ if ( bValid )
+ nValidMask |= nFlag;
+ else
+ nValidMask &= ~nFlag;
+ }
+ void CopyValidProperties( const SvxBulletItem& rCopyFrom );
+};
+
+
+#endif
+
diff --git a/svx/inc/chrtitem.hxx b/svx/inc/chrtitem.hxx
new file mode 100644
index 000000000000..38b37dd4f402
--- /dev/null
+++ b/svx/inc/chrtitem.hxx
@@ -0,0 +1,451 @@
+/*************************************************************************
+ *
+ * $RCSfile: chrtitem.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:00:55 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SVX_CHRTITEM_HXX
+#define _SVX_CHRTITEM_HXX
+
+// include ---------------------------------------------------------------
+
+#ifndef _SFXENUMITEM_HXX //autogen
+#include <svtools/eitem.hxx>
+#endif
+
+//------------------------------------------------------------------------
+
+enum SvxChartStyle
+{
+ CHSTYLE_2D_LINE,
+ CHSTYLE_2D_STACKEDLINE,
+ CHSTYLE_2D_PERCENTLINE,
+ CHSTYLE_2D_COLUMN,
+ CHSTYLE_2D_STACKEDCOLUMN,
+ CHSTYLE_2D_PERCENTCOLUMN,
+ CHSTYLE_2D_BAR,
+ CHSTYLE_2D_STACKEDBAR,
+ CHSTYLE_2D_PERCENTBAR,
+ CHSTYLE_2D_AREA,
+ CHSTYLE_2D_STACKEDAREA,
+ CHSTYLE_2D_PERCENTAREA,
+ CHSTYLE_2D_PIE,
+ CHSTYLE_3D_STRIPE,
+ CHSTYLE_3D_COLUMN,
+ CHSTYLE_3D_FLATCOLUMN,
+ CHSTYLE_3D_STACKEDFLATCOLUMN,
+ CHSTYLE_3D_PERCENTFLATCOLUMN,
+ CHSTYLE_3D_AREA,
+ CHSTYLE_3D_STACKEDAREA,
+ CHSTYLE_3D_PERCENTAREA,
+ CHSTYLE_3D_SURFACE,
+ CHSTYLE_3D_PIE,
+ CHSTYLE_2D_XY,
+ CHSTYLE_3D_XYZ,
+ CHSTYLE_2D_LINESYMBOLS,
+ CHSTYLE_2D_STACKEDLINESYM,
+ CHSTYLE_2D_PERCENTLINESYM,
+ CHSTYLE_2D_XYSYMBOLS,
+ CHSTYLE_3D_XYZSYMBOLS,
+ CHSTYLE_2D_DONUT1,
+ CHSTYLE_2D_DONUT2,
+ CHSTYLE_3D_BAR,
+ CHSTYLE_3D_FLATBAR,
+ CHSTYLE_3D_STACKEDFLATBAR,
+ CHSTYLE_3D_PERCENTFLATBAR,
+ CHSTYLE_2D_PIE_SEGOF1,
+ CHSTYLE_2D_PIE_SEGOFALL,
+ CHSTYLE_2D_NET,
+ CHSTYLE_2D_NET_SYMBOLS,
+ CHSTYLE_2D_NET_STACK,
+ CHSTYLE_2D_NET_SYMBOLS_STACK,
+ CHSTYLE_2D_NET_PERCENT,
+ CHSTYLE_2D_NET_SYMBOLS_PERCENT,
+ CHSTYLE_2D_CUBIC_SPLINE,
+ CHSTYLE_2D_CUBIC_SPLINE_SYMBOL,
+ CHSTYLE_2D_B_SPLINE,
+ CHSTYLE_2D_B_SPLINE_SYMBOL,
+ CHSTYLE_2D_CUBIC_SPLINE_XY,
+ CHSTYLE_2D_CUBIC_SPLINE_SYMBOL_XY,
+ CHSTYLE_2D_B_SPLINE_XY,
+ CHSTYLE_2D_B_SPLINE_SYMBOL_XY,
+ CHSTYLE_2D_XY_LINE,
+ CHSTYLE_2D_LINE_COLUMN,
+ CHSTYLE_2D_LINE_STACKEDCOLUMN,
+ CHSTYLE_2D_STOCK_1,
+ CHSTYLE_2D_STOCK_2,
+ CHSTYLE_2D_STOCK_3,
+ CHSTYLE_2D_STOCK_4
+};
+
+#define CHSTYLE_COUNT (CHSTYLE_2D_LINE_COLUMN + 1)
+
+enum SvxChartDataDescr
+{
+ CHDESCR_NONE,
+ CHDESCR_VALUE,
+ CHDESCR_PERCENT,
+ CHDESCR_TEXT,
+ CHDESCR_TEXTANDPERCENT,
+ CHDESCR_NUMFORMAT_PERCENT,
+ CHDESCR_NUMFORMAT_VALUE,
+ CHDESCR_TEXTANDVALUE
+};
+
+#define CHDESCR_COUNT (CHDESCR_TEXTANDPERCENT + 1)
+
+enum SvxChartLegendPos
+{
+ CHLEGEND_NONE,
+ CHLEGEND_LEFT,
+ CHLEGEND_TOP,
+ CHLEGEND_RIGHT,
+ CHLEGEND_BOTTOM,
+ CHLEGEND_NONE_TOP,
+ CHLEGEND_NONE_LEFT,
+ CHLEGEND_NONE_RIGHT,
+ CHLEGEND_NONE_BOTTOM
+};
+
+#define CHLEGEND_COUNT (CHLEGEND_BOTTOM + 1)
+
+enum SvxChartTextOrder
+{
+ CHTXTORDER_SIDEBYSIDE,
+ CHTXTORDER_UPDOWN,
+ CHTXTORDER_DOWNUP,
+ CHTXTORDER_AUTO
+};
+
+#define CHTXTORDER_COUNT (CHTXTORDER_AUTO + 1)
+
+enum SvxChartTextOrient
+{
+ CHTXTORIENT_AUTOMATIC,
+ CHTXTORIENT_STANDARD,
+ CHTXTORIENT_BOTTOMTOP,
+ CHTXTORIENT_STACKED,
+ CHTXTORIENT_TOPBOTTOM
+};
+
+#define CHTXTORIENT_COUNT (CHTXTORIENT_TOPBOTTOM + 1)
+
+enum SvxChartKindError
+{
+ CHERROR_NONE,
+ CHERROR_VARIANT,
+ CHERROR_SIGMA,
+ CHERROR_PERCENT,
+ CHERROR_BIGERROR,
+ CHERROR_CONST
+};
+
+#define CHERROR_COUNT (CHERROR_CONST + 1)
+
+enum SvxChartIndicate
+{
+ CHINDICATE_NONE,
+ CHINDICATE_BOTH,
+ CHINDICATE_UP,
+ CHINDICATE_DOWN
+};
+
+#define CHINDICATE_COUNT (CHINDICATE_DOWN + 1)
+
+enum SvxChartRegress
+{
+ CHREGRESS_NONE,
+ CHREGRESS_LINEAR,
+ CHREGRESS_LOG,
+ CHREGRESS_EXP,
+ CHREGRESS_POWER
+};
+
+#define CHREGRESS_COUNT (CHREGRESS_POWER + 1)
+
+//------------------------------------------------------------------
+
+#ifdef ITEMID_CHARTSTYLE
+
+class SvxChartStyleItem : public SfxEnumItem
+{
+public:
+ TYPEINFO();
+ SvxChartStyleItem(SvxChartStyle eStyle = CHSTYLE_2D_LINE,
+ USHORT nId = ITEMID_CHARTSTYLE);
+ SvxChartStyleItem(SvStream& rIn, USHORT nId = ITEMID_CHARTSTYLE);
+
+ virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const;
+ virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const;
+
+ USHORT GetValueCount() const { return CHSTYLE_COUNT; }
+ SvxChartStyle GetValue() const
+ { return (SvxChartStyle)SfxEnumItem::GetValue(); }
+};
+
+#endif
+
+//------------------------------------------------------------------
+
+#ifdef ITEMID_CHARTREGRESS
+
+class SvxChartRegressItem : public SfxEnumItem
+{
+public:
+ TYPEINFO();
+ SvxChartRegressItem(SvxChartRegress eRegress = CHREGRESS_LINEAR,
+ USHORT nId = ITEMID_CHARTREGRESS);
+ SvxChartRegressItem(SvStream& rIn, USHORT nId = ITEMID_CHARTREGRESS);
+
+ virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const;
+ virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const;
+
+ USHORT GetValueCount() const { return CHREGRESS_COUNT; }
+ SvxChartRegress GetValue() const
+ { return (SvxChartRegress)SfxEnumItem::GetValue(); }
+ USHORT GetVersion (USHORT nFileFormatVersion) const;
+};
+
+#endif
+
+//------------------------------------------------------------------
+
+#ifdef ITEMID_CHARTDATADESCR
+
+class SvxChartDataDescrItem : public SfxEnumItem
+{
+public:
+ TYPEINFO();
+ SvxChartDataDescrItem(SvxChartDataDescr eDataDescr = CHDESCR_NONE,
+ USHORT nId = ITEMID_CHARTDATADESCR);
+ SvxChartDataDescrItem(SvStream& rIn,
+ USHORT nId = ITEMID_CHARTDATADESCR);
+
+ virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const;
+ virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const;
+
+ USHORT GetValueCount() const { return CHDESCR_COUNT; }
+ SvxChartDataDescr GetValue() const
+ { return (SvxChartDataDescr)SfxEnumItem::GetValue(); }
+};
+
+#endif
+
+//------------------------------------------------------------------
+
+#ifdef ITEMID_CHARTLEGENDPOS
+
+class SvxChartLegendPosItem : public SfxEnumItem
+{
+public:
+ TYPEINFO();
+ SvxChartLegendPosItem(SvxChartLegendPos eLegendPos = CHLEGEND_NONE,
+ USHORT nId = ITEMID_CHARTLEGENDPOS);
+ SvxChartLegendPosItem(SvStream& rIn,
+ USHORT nId = ITEMID_CHARTLEGENDPOS);
+
+ virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const;
+ virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const;
+
+ USHORT GetValueCount() const { return CHLEGEND_COUNT; }
+ SvxChartLegendPos GetValue() const
+ { return (SvxChartLegendPos)SfxEnumItem::GetValue(); }
+};
+
+#endif
+
+//------------------------------------------------------------------
+
+#ifdef ITEMID_CHARTTEXTORDER
+
+class SvxChartTextOrderItem : public SfxEnumItem
+{
+public:
+ TYPEINFO();
+ SvxChartTextOrderItem(SvxChartTextOrder eOrder = CHTXTORDER_SIDEBYSIDE,
+ USHORT nId = ITEMID_CHARTTEXTORDER);
+ SvxChartTextOrderItem(SvStream& rIn,
+ USHORT nId = ITEMID_CHARTTEXTORDER);
+
+ virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const;
+ virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const;
+
+ USHORT GetValueCount() const { return CHTXTORDER_COUNT; }
+ SvxChartTextOrder GetValue() const
+ { return (SvxChartTextOrder)SfxEnumItem::GetValue(); }
+};
+
+#endif
+
+//------------------------------------------------------------------
+
+#ifdef ITEMID_CHARTTEXTORIENT
+
+class SvxChartTextOrientItem : public SfxEnumItem
+{
+public:
+ TYPEINFO();
+ SvxChartTextOrientItem(SvxChartTextOrient eOrient = CHTXTORIENT_STANDARD,
+ USHORT nId = ITEMID_CHARTTEXTORIENT);
+ SvxChartTextOrientItem(SvStream& rIn,
+ USHORT nId = ITEMID_CHARTTEXTORIENT);
+
+ virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const;
+ virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const;
+
+ USHORT GetValueCount() const { return CHTXTORDER_COUNT; }
+ SvxChartTextOrient GetValue() const
+ { return (SvxChartTextOrient)SfxEnumItem::GetValue(); }
+};
+
+#endif
+
+//------------------------------------------------------------------
+
+#ifdef ITEMID_CHARTKINDERROR
+
+class SvxChartKindErrorItem : public SfxEnumItem
+{
+public:
+ TYPEINFO();
+ SvxChartKindErrorItem(SvxChartKindError eOrient = CHERROR_NONE,
+ USHORT nId = ITEMID_CHARTKINDERROR);
+ SvxChartKindErrorItem(SvStream& rIn,
+ USHORT nId = ITEMID_CHARTKINDERROR);
+
+ virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const;
+ virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const;
+
+ USHORT GetValueCount() const { return CHERROR_COUNT; }
+ SvxChartKindError GetValue() const
+ { return (SvxChartKindError)SfxEnumItem::GetValue(); }
+
+ USHORT GetVersion (USHORT nFileFormatVersion) const;
+};
+
+#endif
+
+//------------------------------------------------------------------
+
+#ifdef ITEMID_CHARTINDICATE
+
+class SvxChartIndicateItem : public SfxEnumItem
+{
+public:
+ TYPEINFO();
+ SvxChartIndicateItem(SvxChartIndicate eOrient = CHINDICATE_NONE,
+ USHORT nId = ITEMID_CHARTINDICATE);
+ SvxChartIndicateItem(SvStream& rIn,
+ USHORT nId = ITEMID_CHARTINDICATE);
+
+ virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const;
+ virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const;
+
+ USHORT GetValueCount() const { return CHINDICATE_COUNT; }
+ SvxChartIndicate GetValue() const
+ { return (SvxChartIndicate)SfxEnumItem::GetValue(); }
+
+ USHORT GetVersion (USHORT nFileFormatVersion) const;
+};
+
+#endif
+
+//------------------------------------------------------------------
+
+#ifdef ITEMID_DOUBLE
+
+class SvxDoubleItem : public SfxPoolItem
+{
+ double fVal;
+
+public:
+ TYPEINFO();
+ SvxDoubleItem(double fValue = 0.0, USHORT nId = ITEMID_DOUBLE);
+ SvxDoubleItem(SvStream& rIn, USHORT nId = ITEMID_DOUBLE);
+ SvxDoubleItem(const SvxDoubleItem& rItem);
+
+
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+
+
+
+ virtual String GetValueText() const;
+ virtual SfxItemPresentation GetPresentation(SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText, const International * = 0) const;
+
+ virtual int operator == (const SfxPoolItem&) const;
+ virtual SfxPoolItem* Clone(SfxItemPool *pPool = NULL) const;
+ virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVersion) const;
+ virtual SvStream& Store(SvStream& rOut, USHORT nItemVersion ) const;
+
+ virtual double GetMin() const;
+ virtual double GetMax() const;
+
+ virtual SfxFieldUnit GetUnit() const;
+
+ double GetValue() const { return fVal; }
+ void SetValue(double fNewVal) { fVal = fNewVal; }
+};
+
+#endif
+
+
+#endif // _SVX_CHRTITEM_HXX
+
diff --git a/svx/inc/connctrl.hxx b/svx/inc/connctrl.hxx
new file mode 100644
index 000000000000..99bdcce21add
--- /dev/null
+++ b/svx/inc/connctrl.hxx
@@ -0,0 +1,109 @@
+/*************************************************************************
+ *
+ * $RCSfile: connctrl.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:00:55 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SVX_CONNCTRL_HXX
+#define _SVX_CONNCTRL_HXX
+
+// include ---------------------------------------------------------------
+
+#ifndef _CTRL_HXX //autogen
+#include <vcl/ctrl.hxx>
+#endif
+
+class SfxItemSet;
+
+class ExtOutputDevice;
+class SdrEdgeObj;
+class SdrView;
+class SdrObjList;
+/*************************************************************************
+|*
+|* SvxXConnectionPreview
+|*
+\************************************************************************/
+class SvxXConnectionPreview : public Control
+{
+ friend class SvxConnectionPage;
+
+private:
+ const SfxItemSet& rAttrs;
+ ExtOutputDevice* pExtOutDev;
+ SdrEdgeObj* pEdgeObj;
+ SdrObjList* pObjList;
+ const SdrView* pView;
+
+public:
+ SvxXConnectionPreview( Window* pParent, const ResId& rResId,
+ const SfxItemSet& rInAttrs );
+ ~SvxXConnectionPreview();
+
+ virtual void Paint( const Rectangle& rRect );
+ virtual void MouseButtonDown( const MouseEvent& rMEvt );
+
+ void SetAttributes( const SfxItemSet& rInAttrs );
+ USHORT GetLineDeltaAnz();
+
+ void Construct();
+ void SetView( const SdrView* pSdrView ) { pView = pSdrView; }
+};
+
+
+#endif // _SVX_CONNCTRL_HXX
+
diff --git a/svx/inc/connect.hrc b/svx/inc/connect.hrc
new file mode 100644
index 000000000000..45e929c545b5
--- /dev/null
+++ b/svx/inc/connect.hrc
@@ -0,0 +1,80 @@
+/*************************************************************************
+ *
+ * $RCSfile: connect.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:00:55 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define GRP_DISTANCE 1
+#define GRP_PREVIEW 3
+#define GRP_DELTA 2
+#define FT_LINE_1 1
+#define FT_LINE_2 2
+#define FT_LINE_3 3
+#define MTR_FLD_LINE_1 1
+#define MTR_FLD_LINE_2 2
+#define MTR_FLD_LINE_3 3
+#define FT_HORZ_1 4
+#define FT_HORZ_2 5
+#define MTR_FLD_HORZ_1 4
+#define MTR_FLD_HORZ_2 5
+#define MTR_FLD_VERT_1 6
+#define MTR_FLD_VERT_2 7
+#define FT_VERT_2 7
+#define FT_VERT_1 6
+#define FT_TYPE 8
+#define LB_TYPE 1
+#define CTL_PREVIEW 1
diff --git a/svx/inc/dbexch.hrc b/svx/inc/dbexch.hrc
new file mode 100644
index 000000000000..7976793f5364
--- /dev/null
+++ b/svx/inc/dbexch.hrc
@@ -0,0 +1,91 @@
+/*************************************************************************
+ *
+ * $RCSfile: dbexch.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:00:55 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SVX_DBEXCH_HRC
+#define _SVX_DBEXCH_HRC
+
+// Format zum Uebertragen von Daten aus dem DatenbankBrowser
+// Format: "Datenbankname";"Tabellen/QueryName"; 1/0(fuer Tabelle/Abfrage); SQL-Statement;Selektionsliste
+// Name der Tabelle kann leer sein
+// Feldtrenner ist "ASCII 11" !!!!
+// Selektionsliste:"" // alle selektiert
+// | "1;2;...n" // Selektierte Saetze, Start bei 1
+#define SBA_DATAEXCHANGE_FORMAT "SBA-DATAFORMAT"
+
+// Feldtrenner ist "ASCII 11" !!!!
+// Format zum Uebertragen von Feldname aus dem DatenbankBrowser
+// "Datenbankname";"Tabellen/QueryName";0(Tabelle) / 1(Abfrage) / 2(SQL) / 3(NATIVE_SQL);"Feldname"
+#define SBA_FIELDEXCHANGE_FORMAT "SBA-FIELDFORMAT"
+
+// Feldtrenner ist "ASCII 11" !!!!
+// Format zum Uebertragen von Feldinhalten aus dem DatenbankBrowser
+// "Datenbankname";"Tabellen/QueryName";1/0(fuer Tabelle/Abfrage);"Feldname";"FeldInhalt"
+#define SBA_FIELDDATAEXCHANGE_FORMAT "SBA-FIELDDATAFORMAT"
+
+// Office-internes Format (entspricht der private-URL )
+// Wird vom Writer und Calc benutzt, wenn Explorer-Contents gedraggt werden
+#define SBA_PRIVATEURL_EXCHANGE_FORMAT "SBA-PRIVATEURLFORMAT"
+
+// SBA-internes Format fuer das erzeugen von Joins in der RelationsShell
+#define SBA_JOIN_EXCHANGE_FORMAT "SBA-JOINFORMAT"
+
+
+#endif // _SVX_DBEXCH_HRC
+
diff --git a/svx/inc/dgdefs_.hxx b/svx/inc/dgdefs_.hxx
new file mode 100644
index 000000000000..be568f9c1246
--- /dev/null
+++ b/svx/inc/dgdefs_.hxx
@@ -0,0 +1,375 @@
+/*************************************************************************
+ *
+ * $RCSfile: dgdefs_.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:00:55 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define optlingu_0a SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE)
+#define insctrl_01 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE)
+#define insctrl_03 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE)
+#define insctrl_06 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE)
+#define zoomctrl_03 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE)
+#define zoomctrl_05 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE)
+#define pszctrl_01 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE)
+#define selctrl_01 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE)
+#define selctrl_02 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE)
+#define selctrl_05 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE)
+#define modctrl_01 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE)
+#define tbcontrl_02 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE)
+#define tbcontrl_08 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE)
+#define tbcontrl_09 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE)
+#define tbcontrl_0a SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE)
+#define tbcontrl_11 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE)
+#define tbcontrl_12 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE)
+#define tbcontrl_13 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE)
+#define tbcontrl_35 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE)
+#define tbcontrl_37 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE)
+#define tbcontrl_38 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE)
+#define tbcontrl_39 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE)
+#define tbcontrl_3a SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE)
+#define tbcontrl_3c SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE)
+#define tbcontrl_3d SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE)
+#define tbcontrl_3e SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE)
+#define tbcontrl_3f SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE)
+#define tbcontrl_40 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE)
+#define tbcontrl_41 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE)
+#define tbcontrl_42 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE)
+#define tbcontrl_43 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE)
+#define tbcontrl_44 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE)
+#define tbcontrl_45 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE)
+#define tbcontrl_46 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE)
+#define tbcontrl_47 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE)
+#define tbcontrl_48 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE)
+#define tbcontrl_49 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE)
+#define tbcontrl_4a SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE)
+#define tbcontrl_4e SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE)
+#define tbcontrl_4f SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE)
+#define tbcontrl_53 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE)
+#define tbcontrl_54 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE)
+#define tbcontrl_58 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE)
+#define tbcontrl_59 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE)
+#define tbcontrl_5c SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE)
+#define tbcontrl_5f SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE)
+#define tbcontrl_63 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE)
+#define tbcontrl_64 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE)
+#define tbcontrl_65 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE)
+#define tbcontrl_66 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE)
+#define linectrl_01 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE)
+#define linectrl_03 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE)
+#define linectrl_04 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE)
+#define linectrl_05 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE)
+#define linectrl_06 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE)
+#define linectrl_08 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE)
+#define linectrl_09 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE)
+#define linectrl_0a SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE)
+#define linectrl_0e SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE)
+#define fillctrl_01 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE)
+#define fillctrl_03 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE)
+#define fillctrl_05 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE)
+#define fillctrl_06 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE)
+#define fillctrl_08 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE)
+#define itemwin_01 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE)
+#define itemwin_08 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE)
+#define itemwin_10 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE)
+#define itemwin_12 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE)
+#define itemwin_19 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE)
+#define itemwin_1f SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE)
+#define layctrl_09 SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE)
+#define layctrl_0d SEG_SEGCLASS(STARTING_SEG000,STARTING_CODE)
+#define pszctrl_03 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE)
+#define tcovmain_01 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE)
+#define pszctrl_04 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE)
+#define pszctrl_05 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE)
+#define tcovidle_01 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE)
+#define optgrid_02 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE)
+#define optgrid_17 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE)
+#define optgrid_16 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE)
+#define optgrid_01 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE)
+#define optgrid_18 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE)
+#define optgrid_15 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE)
+#define modctrl_02 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE)
+#define modctrl_04 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE)
+#define adritem_07 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE)
+#define adritem_28 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE)
+#define optgrid_12 SEG_SEGCLASS(STARTWORK_SEG000,STARTWORK_CODE)
+#define optpath_01 SEG_SEGCLASS(STARTSLICE_SEG000,STARTSLICE_CODE)
+#define optpath_02 SEG_SEGCLASS(STARTSLICE_SEG000,STARTSLICE_CODE)
+#define optpath_04 SEG_SEGCLASS(STARTSLICE_SEG000,STARTSLICE_CODE)
+#define optitems_01 SEG_SEGCLASS(STARTSLICE_SEG001,STARTSLICE_CODE)
+#define optitems_02 SEG_SEGCLASS(STARTSLICE_SEG001,STARTSLICE_CODE)
+#define optitems_04 SEG_SEGCLASS(STARTSLICE_SEG001,STARTSLICE_CODE)
+#define optgenrl_01 SEG_SEGCLASS(STARTSLICE_SEG001,STARTSLICE_CODE)
+#define optgenrl_02 SEG_SEGCLASS(STARTSLICE_SEG001,STARTSLICE_CODE)
+#define optgenrl_04 SEG_SEGCLASS(STARTSLICE_SEG002,STARTSLICE_CODE)
+#define optgenrl_06 SEG_SEGCLASS(STARTSLICE_SEG002,STARTSLICE_CODE)
+#define optgenrl_08 SEG_SEGCLASS(STARTSLICE_SEG002,STARTSLICE_CODE)
+#define adritem_25 SEG_SEGCLASS(STARTSLICE_SEG002,STARTSLICE_CODE)
+#define optgenrl_0b SEG_SEGCLASS(STARTSLICE_SEG003,STARTSLICE_CODE)
+#define adritem_04 SEG_SEGCLASS(STARTSLICE_SEG003,STARTSLICE_CODE)
+#define opttypes_01 SEG_SEGCLASS(STARTSLICE_SEG003,STARTSLICE_CODE)
+#define optlingu_01 SEG_SEGCLASS(STARTSLICE_SEG003,STARTSLICE_CODE)
+#define optlingu_03 SEG_SEGCLASS(STARTSLICE_SEG003,STARTSLICE_CODE)
+#define optlingu_05 SEG_SEGCLASS(STARTSLICE_SEG004,STARTSLICE_CODE)
+#define optlingu_09 SEG_SEGCLASS(STARTSLICE_SEG004,STARTSLICE_CODE)
+#define optgrid_03 SEG_SEGCLASS(STARTSLICE_SEG005,STARTSLICE_CODE)
+#define optgrid_07 SEG_SEGCLASS(STARTSLICE_SEG005,STARTSLICE_CODE)
+#define optgrid_08 SEG_SEGCLASS(STARTSLICE_SEG005,STARTSLICE_CODE)
+#define optgrid_0a SEG_SEGCLASS(STARTSLICE_SEG006,STARTSLICE_CODE)
+#define linectrl_0c SEG_SEGCLASS(STARTSLICE_SEG006,STARTSLICE_CODE)
+#define itemwin_0a SEG_SEGCLASS(STARTSLICE_SEG006,STARTSLICE_CODE)
+#define linectrl_0d SEG_SEGCLASS(STARTSLICE_SEG006,STARTSLICE_CODE)
+#define fillctrl_04 SEG_SEGCLASS(STARTSLICE_SEG007,STARTSLICE_CODE)
+#define optpath_07 SEG_SEGCLASS(CALLOPT_SEG000,CALLOPT_CODE)
+#define optitems_06 SEG_SEGCLASS(CALLOPT_SEG000,CALLOPT_CODE)
+#define optitems_07 SEG_SEGCLASS(CALLOPT_SEG000,CALLOPT_CODE)
+#define optitems_0b SEG_SEGCLASS(CALLOPT_SEG000,CALLOPT_CODE)
+#define optgenrl_03 SEG_SEGCLASS(CALLOPT_SEG000,CALLOPT_CODE)
+#define optgrid_09 SEG_SEGCLASS(CALLOPT_SEG000,CALLOPT_CODE)
+#define tbcontrl_36 SEG_SEGCLASS(CALLOPT_SEG000,CALLOPT_CODE)
+#define fillctrl_07 SEG_SEGCLASS(CALLOPT_SEG000,CALLOPT_CODE)
+#define optpath_03 SEG_SEGCLASS(SLICES_SEG000,SLICES_CODE)
+#define optlingu_04 SEG_SEGCLASS(SLICES_SEG000,SLICES_CODE)
+#define pszctrl_02 SEG_SEGCLASS(SLICES_SEG001,SLICES_CODE)
+#define tbcontrl_3b SEG_SEGCLASS(SLICES_SEG001,SLICES_CODE)
+#define optgenrl_07 SEG_SEGCLASS(SLICES_SEG001,SLICES_CODE)
+#define optgenrl_0a SEG_SEGCLASS(SLICES_SEG002,SLICES_CODE)
+#define adritem_06 SEG_SEGCLASS(SLICES_SEG002,SLICES_CODE)
+#define adritem_29 SEG_SEGCLASS(SLICES_SEG002,SLICES_CODE)
+#define optgrid_11 SEG_SEGCLASS(SLICES_SEG002,SLICES_CODE)
+#define optgrid_13 SEG_SEGCLASS(SLICES_SEG002,SLICES_CODE)
+#define insctrl_02 SEG_SEGCLASS(SLICES_SEG002,SLICES_CODE)
+#define tbcontrl_4b SEG_SEGCLASS(SLICES_SEG002,SLICES_CODE)
+#define tbcontrl_50 SEG_SEGCLASS(SLICES_SEG002,SLICES_CODE)
+#define tbcontrl_55 SEG_SEGCLASS(SLICES_SEG002,SLICES_CODE)
+#define linectrl_02 SEG_SEGCLASS(SLICES_SEG003,SLICES_CODE)
+#define linectrl_07 SEG_SEGCLASS(SLICES_SEG003,SLICES_CODE)
+#define linectrl_0b SEG_SEGCLASS(SLICES_SEG003,SLICES_CODE)
+#define fillctrl_02 SEG_SEGCLASS(SLICES_SEG003,SLICES_CODE)
+#define itemwin_02 SEG_SEGCLASS(SLICES_SEG003,SLICES_CODE)
+#define itemwin_09 SEG_SEGCLASS(SLICES_SEG003,SLICES_CODE)
+#define itemwin_11 SEG_SEGCLASS(SLICES_SEG003,SLICES_CODE)
+#define itemwin_1a SEG_SEGCLASS(SLICES_SEG003,SLICES_CODE)
+#define itemwin_20 SEG_SEGCLASS(SLICES_SEG003,SLICES_CODE)
+#define layctrl_0a SEG_SEGCLASS(SLICES_SEG003,SLICES_CODE)
+#define layctrl_0e SEG_SEGCLASS(SLICES_SEG003,SLICES_CODE)
+#define fntctl_01 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE)
+#define fntctl_02 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE)
+#define fntctl_03 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE)
+#define fntctl_04 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE)
+#define fntctl_05 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE)
+#define fntctl_06 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE)
+#define fntctl_07 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE)
+#define fntszctl_01 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE)
+#define fntszctl_02 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE)
+#define fntszctl_03 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE)
+#define fntszctl_04 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE)
+#define fntszctl_05 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE)
+#define optpath_05 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE)
+#define optpath_06 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE)
+#define optdict_01 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE)
+#define optdict_02 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE)
+#define optdict_03 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE)
+#define optdict_04 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE)
+#define optdict_05 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE)
+#define optdict_06 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE)
+#define optdict_07 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE)
+#define optdict_08 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE)
+#define optdict_09 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE)
+#define optdict_0a SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE)
+#define optdict_0b SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE)
+#define optitems_03 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE)
+#define optitems_05 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE)
+#define optitems_08 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE)
+#define optitems_09 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE)
+#define optitems_0a SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE)
+#define optitems_0c SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE)
+#define optitems_0d SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE)
+#define optitems_0e SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE)
+#define optspell_01 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE)
+#define optspell_02 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE)
+#define optspell_03 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE)
+#define optspell_04 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE)
+#define optspell_05 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE)
+#define optspell_06 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE)
+#define optspell_07 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE)
+#define optgenrl_05 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE)
+#define optgenrl_09 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE)
+#define adritem_01 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE)
+#define adritem_26 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE)
+#define adritem_27 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE)
+#define adritem_2a SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE)
+#define opttypes_02 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE)
+#define optlingu_02 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE)
+#define optlingu_06 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE)
+#define optlingu_07 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE)
+#define optlingu_08 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE)
+#define optgrid_04 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE)
+#define optgrid_05 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE)
+#define optgrid_06 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE)
+#define optgrid_0b SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE)
+#define optgrid_0c SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE)
+#define optgrid_0d SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE)
+#define optgrid_0e SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE)
+#define optgrid_0f SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE)
+#define optgrid_10 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE)
+#define optgrid_14 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE)
+#define insctrl_04 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE)
+#define insctrl_05 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE)
+#define zoomctrl_01 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE)
+#define zoomctrl_02 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE)
+#define zoomctrl_06 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE)
+#define zoomctrl_07 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE)
+#define selctrl_03 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE)
+#define selctrl_04 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE)
+#define modctrl_03 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE)
+#define tbcontrl_01 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE)
+#define tbcontrl_03 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE)
+#define tbcontrl_04 SEG_SEGCLASS(UNUSED_SEG000,UNUSED_CODE)
+#define tbcontrl_05 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE)
+#define tbcontrl_06 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE)
+#define tbcontrl_07 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE)
+#define tbcontrl_0b SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE)
+#define tbcontrl_0c SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE)
+#define tbcontrl_0d SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE)
+#define tbcontrl_0e SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE)
+#define tbcontrl_0f SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE)
+#define tbcontrl_10 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE)
+#define tbcontrl_14 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE)
+#define tbcontrl_15 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE)
+#define tbcontrl_16 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE)
+#define tbcontrl_17 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE)
+#define tbcontrl_18 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE)
+#define tbcontrl_19 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE)
+#define tbcontrl_1a SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE)
+#define tbcontrl_1b SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE)
+#define tbcontrl_1c SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE)
+#define tbcontrl_1d SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE)
+#define tbcontrl_1e SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE)
+#define tbcontrl_1f SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE)
+#define tbcontrl_20 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE)
+#define tbcontrl_21 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE)
+#define tbcontrl_22 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE)
+#define tbcontrl_23 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE)
+#define tbcontrl_24 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE)
+#define tbcontrl_25 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE)
+#define tbcontrl_26 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE)
+#define tbcontrl_27 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE)
+#define tbcontrl_28 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE)
+#define tbcontrl_29 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE)
+#define tbcontrl_2a SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE)
+#define tbcontrl_2b SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE)
+#define tbcontrl_2c SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE)
+#define tbcontrl_2d SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE)
+#define tbcontrl_2e SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE)
+#define tbcontrl_2f SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE)
+#define tbcontrl_30 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE)
+#define tbcontrl_31 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE)
+#define tbcontrl_32 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE)
+#define tbcontrl_33 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE)
+#define tbcontrl_34 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE)
+#define tbcontrl_4c SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE)
+#define tbcontrl_4d SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE)
+#define tbcontrl_51 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE)
+#define tbcontrl_52 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE)
+#define tbcontrl_56 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE)
+#define tbcontrl_57 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE)
+#define tbcontrl_5a SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE)
+#define tbcontrl_5b SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE)
+#define tbcontrl_5d SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE)
+#define tbcontrl_5e SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE)
+#define tbcontrl_60 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE)
+#define tbcontrl_61 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE)
+#define tbcontrl_62 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE)
+#define fillctrl_09 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE)
+#define itemwin_03 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE)
+#define itemwin_04 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE)
+#define itemwin_05 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE)
+#define itemwin_06 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE)
+#define itemwin_07 SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE)
+#define itemwin_0b SEG_SEGCLASS(UNUSED_SEG001,UNUSED_CODE)
+#define itemwin_0c SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE)
+#define itemwin_0d SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE)
+#define itemwin_0e SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE)
+#define itemwin_0f SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE)
+#define itemwin_13 SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE)
+#define itemwin_14 SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE)
+#define itemwin_15 SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE)
+#define itemwin_16 SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE)
+#define itemwin_17 SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE)
+#define itemwin_18 SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE)
+#define itemwin_1b SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE)
+#define itemwin_1c SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE)
+#define itemwin_1d SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE)
+#define itemwin_1e SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE)
+#define itemwin_21 SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE)
+#define itemwin_22 SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE)
+#define itemwin_23 SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE)
+#define itemwin_24 SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE)
+#define itemwin_25 SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE)
+#define itemwin_26 SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE)
+#define layctrl_01 SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE)
+#define layctrl_02 SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE)
+#define layctrl_03 SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE)
+#define layctrl_04 SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE)
+#define layctrl_05 SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE)
+#define layctrl_06 SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE)
+#define layctrl_07 SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE)
+#define layctrl_08 SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE)
+#define layctrl_0b SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE)
+#define layctrl_0c SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE)
+#define layctrl_0f SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE)
+#define layctrl_10 SEG_SEGCLASS(UNUSED_SEG002,UNUSED_CODE)
diff --git a/svx/inc/dialdll.hxx b/svx/inc/dialdll.hxx
new file mode 100644
index 000000000000..4ee82aeedaac
--- /dev/null
+++ b/svx/inc/dialdll.hxx
@@ -0,0 +1,89 @@
+/*************************************************************************
+ *
+ * $RCSfile: dialdll.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:00:55 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SVX_DIALDLL_HXX
+#define _SVX_DIALDLL_HXX
+
+// class SvxDialogDll ----------------------------------------------------
+
+class SvxDialogDll
+{
+public:
+ SvxDialogDll();
+ ~SvxDialogDll();
+
+ static void ResetResMgr();
+};
+
+// class SvxGrfLinkCacheDll ----------------------------------------------
+
+class SvxGrfLinkData_Impl;
+
+class SvxGrfLinkCacheDll
+{
+ SvxGrfLinkData_Impl* pData;
+public:
+ SvxGrfLinkCacheDll();
+ ~SvxGrfLinkCacheDll();
+};
+
+
+#endif
+
diff --git a/svx/inc/dlgutil.hxx b/svx/inc/dlgutil.hxx
new file mode 100644
index 000000000000..c9cbc8321c1d
--- /dev/null
+++ b/svx/inc/dlgutil.hxx
@@ -0,0 +1,173 @@
+/*************************************************************************
+ *
+ * $RCSfile: dlgutil.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:00:55 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SVX_DLGUTIL_HXX
+#define _SVX_DLGUTIL_HXX
+
+// include ---------------------------------------------------------------
+#ifndef _FIELD_HXX
+#include <vcl/field.hxx>
+#endif
+#ifndef _SFXPOOLITEM_HXX
+#include <svtools/poolitem.hxx>
+#endif
+#ifndef _SFXINTITEM_HXX //autogen
+#include <svtools/intitem.hxx>
+#endif
+
+// macro -----------------------------------------------------------------
+
+#define GET_MODULE_FIELDUNIT( eFieldUnit ) \
+{ \
+ SfxApplication* pSfxApp = SFX_APP(); \
+ eFieldUnit = pSfxApp->GetOptions().GetMetric(); \
+ SfxModule* pModule = pSfxApp->GetActiveModule(); \
+ \
+ if ( pModule ) \
+ { \
+ const SfxPoolItem* pItem = pModule->GetItem( SID_ATTR_METRIC ); \
+ \
+ if ( pItem ) \
+ eFieldUnit = (FieldUnit)( (SfxUInt16Item*)pItem )->GetValue(); \
+ } \
+}
+
+// typedef ---------------------------------------------------------------
+
+typedef long (*FUNC_CONVERT)(long);
+
+// Functions -------------------------------------------------------------
+
+// HM- und LanguageStrings aus der Resource laden
+String GetLanguageString( LanguageType eType );
+String GetDicInfoStr( const String& rName, const USHORT nLang,
+ const BOOL bNeg );
+
+// FieldUnit im MetricField oder -Box umsetzen
+void SetFieldUnit( MetricField& rCtrl,
+ FieldUnit eUnit, BOOL bAll = FALSE );
+void SetFieldUnit( MetricBox& rCtrl,
+ FieldUnit eUnit, BOOL bAll = FALSE );
+
+// Metriken umrechnen
+long CalcToUnit( float nIn, SfxMapUnit eUnit );
+long CalcToPoint( long nIn, SfxMapUnit eUnit, USHORT nFaktor );
+
+long ItemToControl( long nIn, SfxMapUnit eItem, SfxFieldUnit eCtrl );
+long ControlToItem( long nIn, SfxFieldUnit eCtrl, SfxMapUnit eItem );
+
+FieldUnit MapToFieldUnit( const SfxMapUnit eUnit );
+MapUnit FieldToMapUnit( const SfxFieldUnit eUnit );
+
+long ConvertValueToMap( long nVal, SfxMapUnit eUnit );
+long ConvertValueToUnit( long nVal, SfxMapUnit eUnit );
+
+void SetMetricValue( MetricField& rField,
+ long lCoreValue, SfxMapUnit eUnit );
+long GetCoreValue( const MetricField& rField, SfxMapUnit eUnit );
+
+// to Twips
+long CMToTwips( long nIn );
+long MMToTwips( long nIn );
+long InchToTwips( long nIn );
+long PointToTwips( long nIn );
+long PicaToTwips( long nIn );
+
+// to CM
+long TwipsToCM( long nIn );
+long InchToCM( long nIn );
+long MMToCM( long nIn );
+long PointToCM( long nIn );
+long PicaToCM( long nIn );
+
+// to MM
+long TwipsToMM( long nIn );
+long CMToMM( long nIn );
+long InchToMM( long nIn );
+long PointToMM( long nIn );
+long PicaToMM( long nIn );
+
+// to Inch
+long TwipsToInch(long nIn );
+long CMToInch(long nIn );
+long MMToInch(long nIn );
+long PointToInch(long nIn );
+long PicaToInch(long nIn );
+
+// to Point
+long TwipsToPoint(long nIn );
+long InchToPoint(long nIn );
+long CMToPoint(long nIn );
+long MMToPoint(long nIn );
+long PicaToPoint(long nIn );
+
+// To Pica
+long TwipsToPica(long nIn );
+long InchToPica(long nIn );
+long PointToPica(long nIn );
+long CMToPica(long nIn );
+long MMToPica(long nIn );
+
+// generische Wandlung
+long TransformMetric( long nVal, FieldUnit aOld, FieldUnit aNew );
+
+
+#endif
+
diff --git a/svx/inc/dragmt3d.hxx b/svx/inc/dragmt3d.hxx
new file mode 100644
index 000000000000..6d5b40f3ce50
--- /dev/null
+++ b/svx/inc/dragmt3d.hxx
@@ -0,0 +1,203 @@
+/*************************************************************************
+ *
+ * $RCSfile: dragmt3d.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:00:55 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _E3D_DRAGMT3D_HXX
+#define _E3D_DRAGMT3D_HXX
+
+#ifndef _SVDDRGMT_HXX
+#include "svddrgmt.hxx"
+#endif
+
+#ifndef _E3D_VIEW3D_HXX
+#include "view3d.hxx"
+#endif
+
+#ifndef _POLY3D_HXX
+#include "poly3d.hxx"
+#endif
+
+#ifndef _SV_TIMER_HXX
+#include <vcl/timer.hxx>
+#endif
+
+class E3dScene;
+
+/*************************************************************************
+|*
+|* Parameter fuer Interaktion eines 3D-Objektes
+|*
+\************************************************************************/
+
+class E3dDragMethodUnit
+{
+public:
+ E3dObject* p3DObj;
+ Polygon3D aWireframePoly;
+ Matrix4D aDisplayTransform;
+ Matrix4D aInvDisplayTransform;
+ Matrix4D aInitTransform;
+ Matrix4D aTransform;
+ INT32 nStartAngle;
+ INT32 nLastAngle;
+
+ // TimingVars
+ UINT8 nOrigQuality;
+
+ E3dDragMethodUnit() {}
+};
+
+/*************************************************************************
+|*
+|* Parameter fuer Interaktion eines 3D-Objektes
+|*
+\************************************************************************/
+
+SV_DECL_PTRARR_DEL(E3dDragMethodUnitGroup, E3dDragMethodUnit*, 1, 3);
+
+/*************************************************************************
+|*
+|* Ableitung von SdrDragMethod fuer 3D-Objekte
+|*
+\************************************************************************/
+
+class E3dDragMethod : public SdrDragMethod
+{
+protected:
+ E3dDragMethodUnitGroup aGrp;
+ E3dDragConstraint eConstraint;
+ E3dDragDetail eDragDetail;
+ Point aLastPos;
+ Rectangle aFullBound;
+ BOOL bMoveFull;
+ BOOL bMovedAtAll;
+ Timer aCallbackTimer;
+
+public:
+ TYPEINFO();
+ E3dDragMethod(SdrDragView &rView,
+ const SdrMarkList& rMark,
+ E3dDragDetail eDetail,
+ E3dDragConstraint eConstr = E3DDRAG_CONSTR_XYZ,
+ BOOL bFull=FALSE);
+
+ virtual void TakeComment(String& rStr) const;
+
+ virtual FASTBOOL Beg();
+ virtual void Mov(const Point& rPnt);
+ virtual void Brk();
+ virtual FASTBOOL End(FASTBOOL bCopy);
+
+ virtual void DrawXor(ExtOutputDevice& rXOut, FASTBOOL bFull) const;
+ E3dView& Get3DView() { return (E3dView&)rView; }
+
+ DECL_LINK(TimerInterruptHdl, void*);
+};
+
+
+/*************************************************************************
+|*
+|* Ableitung von SdrDragMethod zum Drehen von 3D-Objekten
+|*
+\************************************************************************/
+
+class E3dDragRotate : public E3dDragMethod
+{
+ Vector3D aGlobalCenter;
+
+public:
+ TYPEINFO();
+ E3dDragRotate(SdrDragView &rView,
+ const SdrMarkList& rMark,
+ E3dDragDetail eDetail,
+ E3dDragConstraint eConstr = E3DDRAG_CONSTR_XYZ,
+ BOOL bFull=FALSE);
+
+ virtual void Mov(const Point& rPnt);
+ virtual Pointer GetPointer() const;
+};
+
+
+/*************************************************************************
+|*
+|* Ableitung von SdrDragMethod zum Verschieben von 3D-Subobjekten
+|*
+\************************************************************************/
+
+class E3dDragMove : public E3dDragMethod
+{
+ SdrHdlKind eWhatDragHdl;
+ Point aScaleFixPos;
+
+public:
+ TYPEINFO();
+ E3dDragMove(SdrDragView &rView,
+ const SdrMarkList& rMark,
+ E3dDragDetail eDetail,
+ SdrHdlKind eDrgHdl = HDL_MOVE,
+ E3dDragConstraint eConstr = E3DDRAG_CONSTR_XYZ,
+ BOOL bFull=FALSE);
+
+ virtual void Mov(const Point& rPnt);
+ virtual Pointer GetPointer() const;
+};
+
+
+#endif // _E3D_DRAGMT3D_HXX
diff --git a/svx/inc/drawitem.hxx b/svx/inc/drawitem.hxx
new file mode 100644
index 000000000000..4b58b1b45b72
--- /dev/null
+++ b/svx/inc/drawitem.hxx
@@ -0,0 +1,270 @@
+/*************************************************************************
+ *
+ * $RCSfile: drawitem.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:00:55 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SVX_DRAWITEM_HXX
+#define _SVX_DRAWITEM_HXX
+
+// include ---------------------------------------------------------------
+
+#ifndef _SFXPOOLITEM_HXX //autogen
+#include <svtools/poolitem.hxx>
+#endif
+
+//==================================================================
+// SvxColorTableItem
+//==================================================================
+
+#ifdef ITEMID_COLOR_TABLE
+class XColorTable;
+
+class SvxColorTableItem: public SfxPoolItem
+{
+ XColorTable* pColorTable;
+
+public:
+ TYPEINFO();
+ SvxColorTableItem();
+ SvxColorTableItem( XColorTable* pTable,
+ USHORT nWhich = ITEMID_COLOR_TABLE );
+ SvxColorTableItem( const SvxColorTableItem& );
+
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText, const International * = 0 ) const;
+
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+
+ XColorTable* GetColorTable() const { return pColorTable; }
+ void SetColorTable( XColorTable* pTable ) {
+ pColorTable = pTable; }
+};
+
+#endif
+
+//==================================================================
+// SvxGradientListItem
+//==================================================================
+
+#ifdef ITEMID_GRADIENT_LIST
+class XGradientList;
+
+class SvxGradientListItem: public SfxPoolItem
+{
+ XGradientList* pGradientList;
+
+public:
+ TYPEINFO();
+ SvxGradientListItem();
+ SvxGradientListItem( XGradientList* pList,
+ USHORT nWhich = ITEMID_GRADIENT_LIST );
+ SvxGradientListItem( const SvxGradientListItem& );
+
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText, const International * = 0 ) const;
+
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+
+ XGradientList* GetGradientList() const { return pGradientList; }
+ void SetGradientList( XGradientList* pList ) {
+ pGradientList = pList; }
+};
+
+#endif
+
+//==================================================================
+// SvxHatchListItem
+//==================================================================
+
+#ifdef ITEMID_HATCH_LIST
+class XHatchList;
+
+class SvxHatchListItem: public SfxPoolItem
+{
+ XHatchList* pHatchList;
+
+public:
+ TYPEINFO();
+ SvxHatchListItem();
+ SvxHatchListItem( XHatchList* pList,
+ USHORT nWhich = ITEMID_HATCH_LIST );
+ SvxHatchListItem( const SvxHatchListItem& );
+
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText, const International * = 0 ) const;
+
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+
+ XHatchList* GetHatchList() const { return pHatchList; }
+ void SetHatchList( XHatchList* pList ) {
+ pHatchList = pList; }
+};
+
+#endif
+
+//==================================================================
+// SvxBitmapListItem
+//==================================================================
+
+#ifdef ITEMID_BITMAP_LIST
+class XBitmapList;
+
+class SvxBitmapListItem: public SfxPoolItem
+{
+ XBitmapList* pBitmapList;
+
+public:
+ TYPEINFO();
+ SvxBitmapListItem();
+ SvxBitmapListItem( XBitmapList* pBL,
+ USHORT nWhich = ITEMID_BITMAP_LIST );
+ SvxBitmapListItem( const SvxBitmapListItem& );
+
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText, const International * = 0 ) const;
+
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+
+ XBitmapList* GetBitmapList() const { return pBitmapList; }
+ void SetBitmapList( XBitmapList* pList ) {
+ pBitmapList = pList; }
+};
+
+#endif
+
+//==================================================================
+// SvxDashListItem
+//==================================================================
+
+#ifdef ITEMID_DASH_LIST
+class XDashList;
+
+class SvxDashListItem: public SfxPoolItem
+{
+ XDashList* pDashList;
+
+public:
+ TYPEINFO();
+ SvxDashListItem();
+ SvxDashListItem( XDashList* pList,
+ USHORT nWhich = ITEMID_DASH_LIST );
+ SvxDashListItem( const SvxDashListItem& );
+
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText, const International * = 0 ) const;
+
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+
+ XDashList* GetDashList() const { return pDashList; }
+ void SetDashList( XDashList* pList ) {
+ pDashList = pList; }
+};
+
+#endif
+
+//==================================================================
+// SvxLineEndListItem
+//==================================================================
+
+#ifdef ITEMID_LINEEND_LIST
+class XLineEndList;
+
+class SvxLineEndListItem: public SfxPoolItem
+{
+ XLineEndList* pLineEndList;
+
+public:
+ TYPEINFO();
+ SvxLineEndListItem();
+ SvxLineEndListItem( XLineEndList* pList,
+ USHORT nWhich = ITEMID_LINEEND_LIST );
+ SvxLineEndListItem( const SvxLineEndListItem& );
+
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText, const International * = 0 ) const;
+
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+
+ XLineEndList* GetLineEndList() const { return pLineEndList; }
+ void SetLineEndList( XLineEndList* pList ) {
+ pLineEndList = pList; }
+};
+
+#endif
+
+
+#endif
+
diff --git a/svx/inc/drawuiks.hxx b/svx/inc/drawuiks.hxx
new file mode 100644
index 000000000000..32a6d8e7f928
--- /dev/null
+++ b/svx/inc/drawuiks.hxx
@@ -0,0 +1,107 @@
+/*************************************************************************
+ *
+ * $RCSfile: drawuiks.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:00:55 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SDUIKS_HXX
+#define _SDUIKS_HXX
+
+#include <usr/uiks.hxx>
+
+#define UIK_SHAPEFACTORY UIK_DRAWING(00)
+#define UIK_POLYGONFACTORY UIK_DRAWING(01)
+#define UIK_TEXTSHAPEFACTORY UIK_DRAWING(02)
+#define UIK_SNAPFACTORY UIK_DRAWING(03)
+
+#define UIK_DRAWPAGES UIK_DRAWING(10)
+#define UIK_DRAWPAGESUMMARIZER UIK_DRAWING(11)
+#define UIK_DRAWPAGEXPANDER UIK_DRAWING(12)
+
+#define UIK_XSHAPEDESCRIPTOR UIK_DRAWING(20)
+#define UIK_XSHAPE UIK_DRAWING(21)
+#define UIK_XSHAPECONNECTOR UIK_DRAWING(22)
+#define UIK_XCONNECTABLESHAPE UIK_DRAWING(23)
+#define UIK_XSHAPE3D UIK_DRAWING(24)
+#define UIK_XSHAPEGROUP UIK_DRAWING(25)
+#define UIK_XSHAPEMIRROR UIK_DRAWING(26)
+#define UIK_XSHAPEALIGNER UIK_DRAWING(27)
+#define UIK_XSHAPEARRANGER UIK_DRAWING(28)
+#define UIK_XCONVERTABLESHAPE UIK_DRAWING(29)
+#define UIK_XANIMATEDSHAPEFACTORY UIK_DRAWING(2a)
+
+#define UIK_DRAWPAGE UIK_DRAWING(30)
+#define UIK_SHAPES UIK_DRAWING(31)
+#define UIK_XSHAPEGROUPER UIK_DRAWING(35)
+#define UIK_XSHAPECOMBINER UIK_DRAWING(36)
+#define UIK_SHAPEBINDER UIK_DRAWING(37)
+#define UIK_DRAWLAYER UIK_DRAWING(38)
+
+#define SD_UIK_PRESENTATION UIK_DRAWING(40)
+#define SD_UIK_PRESENTATION_NAVIGATION UIK_DRAWING(41)
+#define SD_UIK_CUSTOM_PRESENTATION UIK_DRAWING(42)
+#define SD_UIK_CUSTOM_PRESENTATIONS UIK_DRAWING(43)
+//#define SD_UIK_CUSTOM_PRESENTATIONS UIK_DRAWING(44)
+
+#define SD_UIK_ZOOM UIK_DRAWING(50)
+#define SD_UIK_DRAW_VIEW UIK_DRAWING(51)
+#define SD_UIK_OUTLINE_VIEW UIK_DRAWING(52)
+#define SD_UIK_SLIDE_VIEW UIK_DRAWING(53)
+
+#define SD_UIK_PRESENTATION_STYLES UIK_DRAWING(60)
+
+#endif
diff --git a/svx/inc/editstat.hxx b/svx/inc/editstat.hxx
new file mode 100644
index 000000000000..7ceaee6ec72e
--- /dev/null
+++ b/svx/inc/editstat.hxx
@@ -0,0 +1,174 @@
+/*************************************************************************
+ *
+ * $RCSfile: editstat.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:00:55 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _EDITSTAT_HXX
+#define _EDITSTAT_HXX
+
+#ifndef _STRING_HXX
+#include <tools/string.hxx>
+#endif
+
+#define EE_CNTRL_USECHARATTRIBS 0x00000001 // Verwendung harter ZeichenAttr.
+#define EE_CNTRL_USEPARAATTRIBS 0x00000002 // Verwendung von AbsatzAttr.
+#define EE_CNTRL_CRSRLEFTPARA 0x00000004 // Cursor ist in einen anderen Absatz gewandert
+#define EE_CNTRL_DOIDLEFORMAT 0x00000008 // Idle-Formatierung
+#define EE_CNTRL_PASTESPECIAL 0x00000010 // Allow PasteSpecial
+#define EE_CNTRL_AUTOINDENTING 0x00000020 // Automatisches einruecken
+#define EE_CNTRL_UNDOATTRIBS 0x00000040 // Undo fuer Attribute....
+#define EE_CNTRL_ONECHARPERLINE 0x00000080 // Ein Zeichen pro Zeile
+#define EE_CNTRL_NOCOLORS 0x00000100 // Engine: Keine Farben
+#define EE_CNTRL_OUTLINER 0x00000200 // Sonderbehandlung Outliner/Gliederungsmodus
+#define EE_CNTRL_OUTLINER2 0x00000400 // Sonderbehandlung Outliner/Seite
+#define EE_CNTRL_ALLOWBIGOBJS 0x00000800 // PortionInfo in Textobjekten
+#define EE_CNTRL_ONLINESPELLING 0x00001000 // Waehrend des editieren Spelling
+#define EE_CNTRL_STRETCHING 0x00002000 // Stretch-Modus
+#define EE_CNTRL_MARKFIELDS 0x00004000 // Felder farblich hinterlegen
+#define EE_CNTRL_URLSFXEXECUTE 0x00008000 // !!!OLD!!!: SFX-URL-Execute.
+#define EE_CNTRL_RESTOREFONT 0x00010000 // Font im OutDev restaurieren
+#define EE_CNTRL_RTFSTYLESHEETS 0x00020000 // Stylesheets bei Import verwenden
+#define EE_CNTRL_NOREDLINES 0x00040000 // Keine RedLines bei OnlineSpellError
+#define EE_CNTRL_AUTOCORRECT 0x00080000 // AutoKorrektur
+#define EE_CNTRL_AUTOCOMPLETE 0x00100000 // AutoComplete
+#define EE_CNTRL_AUTOPAGESIZEX 0x00200000 // Papierbreite an Text anpassen
+#define EE_CNTRL_AUTOPAGESIZEY 0x00400000 // Papierhoehe an Text anpassen
+#define EE_CNTRL_AUTOPAGESIZE (EE_CNTRL_AUTOPAGESIZEX|EE_CNTRL_AUTOPAGESIZEY)
+#define EE_CNTRL_TABINDENTING 0x00800000 // Einruecken mit Tab
+#define EE_CNTRL_FORMAT100 0x01000000 // Immer nach 100% formatieren
+#define EE_CNTRL_ULSPACESUMMATION 0x02000000 // MS Compat: SA und SB aufsummieren, nicht maximalwert
+#define EE_CNTRL_ULSPACEFIRSTPARA 0x04000000 // MS Compat: SB auch beim ersten Absatz auswerten
+
+#define EV_CNTRL_AUTOSCROLL 0x00000001 // Autom. Scrollen horiz.
+#define EV_CNTRL_BIGSCROLL 0x00000002 // Weiter Scrollen, als nur zum Cursor
+#define EV_CNTRL_ENABLEPASTE 0x00000004 // Paste erlauben
+#define EV_CNTRL_SINGLELINEPASTE 0x00000008 // View: Paste in Eingabezeile...
+#define EV_CNTRL_OVERWRITE 0x00000010 // Ueberschreibmodus
+#define EV_CNTRL_INVONEMORE 0x00000020 // Ein Pixel mehr invalidieren
+#define EV_CNTRL_AUTOSIZEX 0x00000040 // Automatisch an Textbreite anpassen
+#define EV_CNTRL_AUTOSIZEY 0x00000080 // Automatisch an Texthoehe anpassen
+#define EV_CNTRL_AUTOSIZE (EV_CNTRL_AUTOSIZEX|EV_CNTRL_AUTOSIZEY)
+
+#define EE_STAT_HSCROLL 0x00000001
+#define EE_STAT_VSCROLL 0x00000002
+#define EE_STAT_CURSOROUT 0x00000004
+#define EE_STAT_CRSRMOVEFAIL 0x00000008
+#define EE_STAT_CRSRLEFTPARA 0x00000010
+#define EE_STAT_TEXTWIDTHCHANGED 0x00000020
+#define EE_STAT_TEXTHEIGHTCHANGED 0x00000040
+#define EE_STAT_WRONGWORDCHANGED 0x00000080
+// #define EE_STAT_MODIFIED 0x00000100
+
+// Nur fuer Update:
+#define EE_CNTRL_AUTOCENTER EE_CNTRL_AUTOPAGESIZE
+#define EE_STAT_GROWY EE_STAT_TEXTHEIGHTCHANGED
+
+/*
+ EE_STAT_CRSRLEFTPARA zur Zeit bei Cursorbewegungen und Return.
+*/
+
+inline void SetFlags( ULONG& rBits, const ULONG nMask, FASTBOOL bOn )
+{
+ if ( bOn )
+ rBits |= nMask;
+ else
+ rBits &= ~nMask;
+}
+
+class EditStatus
+{
+protected:
+ ULONG nStatusBits;
+ ULONG nControlBits;
+ USHORT nPrevPara; // fuer EE_STAT_CRSRLEFTPARA
+
+public:
+ EditStatus() { nStatusBits = 0; nControlBits = 0; nPrevPara = 0xFFFF; }
+
+ void Clear() { nStatusBits = 0; }
+ void SetControlBits( ULONG nMask, FASTBOOL bOn )
+ { SetFlags( nControlBits, nMask, bOn ); }
+
+ ULONG GetStatusWord() const { return nStatusBits; }
+ ULONG& GetStatusWord() { return nStatusBits; }
+
+ ULONG GetControlWord() const { return nControlBits; }
+ ULONG& GetControlWord() { return nControlBits; }
+
+ USHORT GetPrevParagraph() const { return nPrevPara; }
+ USHORT& GetPrevParagraph() { return nPrevPara; }
+};
+
+#define SPELLCMD_IGNOREWORD 0x0001
+#define SPELLCMD_STARTSPELLDLG 0x0002
+
+struct SpellCallbackInfo
+{
+ USHORT nCommand;
+ String aWord;
+
+ SpellCallbackInfo( USHORT nCMD, const String& rWord )
+ : aWord( rWord )
+ {
+ nCommand = nCMD;
+ }
+};
+
+#endif // _EDITSTAT_HXX
+
diff --git a/svx/inc/editund2.hxx b/svx/inc/editund2.hxx
new file mode 100644
index 000000000000..5c59d0cea1f1
--- /dev/null
+++ b/svx/inc/editund2.hxx
@@ -0,0 +1,111 @@
+/*************************************************************************
+ *
+ * $RCSfile: editund2.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:00:55 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _EDITUND2_HXX
+#define _EDITUND2_HXX
+
+//#include <tools.hxx>
+
+#ifndef _UNDO_HXX
+#include <svtools/undo.hxx>
+#endif
+
+class ImpEditEngine;
+
+class EditUndoManager : public SfxUndoManager
+{
+private:
+ ImpEditEngine* pImpEE;
+public:
+ EditUndoManager( ImpEditEngine* pImpEE );
+
+ virtual BOOL Undo( USHORT nCount=1 );
+ virtual BOOL Redo( USHORT nCount=1 );
+};
+
+// -----------------------------------------------------------------------
+// EditUndo
+// ------------------------------------------------------------------------
+class EditUndo : public SfxUndoAction
+{
+private:
+ USHORT nId;
+ ImpEditEngine* pImpEE;
+
+public:
+ TYPEINFO();
+ EditUndo( USHORT nI, ImpEditEngine* pImpEE );
+ virtual ~EditUndo();
+
+ ImpEditEngine* GetImpEditEngine() const { return pImpEE; }
+
+ virtual void Undo() = 0;
+ virtual void Redo() = 0;
+ virtual void Repeat() = 0;
+
+ virtual BOOL CanRepeat(SfxRepeatTarget&) const;
+ virtual String GetComment() const;
+ virtual USHORT GetId() const;
+};
+
+#endif // _EDITUND2_HXX
+
+
diff --git a/svx/inc/edtspell.hxx b/svx/inc/edtspell.hxx
new file mode 100644
index 000000000000..2c43642ee9d5
--- /dev/null
+++ b/svx/inc/edtspell.hxx
@@ -0,0 +1,231 @@
+/*************************************************************************
+ *
+ * $RCSfile: edtspell.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:00:55 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _EDTSPELL_HXX
+#define _EDTSPELL_HXX
+
+#include <svxbox.hxx>
+#include <svxenum.hxx>
+#include <splwrap.hxx>
+#include <svxacorr.hxx>
+
+#ifndef _COM_SUN_STAR_UNO_REFERENCE_H_
+#include <com/sun/star/uno/Reference.h>
+#endif
+namespace com { namespace sun { namespace star { namespace linguistic {
+ class XSpellChecker1;
+}}}}
+
+
+class EditView;
+class ImpEditEngine;
+class ContentNode;
+
+class EditSpellWrapper : public SvxSpellWrapper
+{
+private:
+ EditView* pEditView;
+ void CheckSpellTo();
+
+protected:
+ virtual void SpellStart( SvxSpellArea eArea );
+ virtual BOOL SpellContinue(); // Bereich pruefen
+ virtual void ReplaceAll( const String &rNewText, INT16 nLanguage );
+ virtual void SpellEnd();
+// virtual BOOL CanRestart();
+ virtual BOOL SpellMore();
+ virtual BOOL HasOtherCnt();
+ virtual void ScrollArea();
+#ifndef ENABLEUNICODE
+ virtual void ChangeWord( const String& rNewWord, const USHORT nLang );
+ virtual void ChangeThesWord( const String& rNewWord );
+// virtual void ChangeAll( const String& rNewWord );
+ virtual void AutoCorrect( const String& rOldWord, const String& rNewWord );
+
+// virtual String GetCurrentWord() const;
+#else
+ virtual void ChangeWord( const UniString& rNewWord, const USHORT nLang );
+ virtual void ChangeThesWord( const UniString& rNewWord );
+// virtual void ChangeAll( const UniString& rNewWord );
+ virtual void AutoCorrect( const UniString& rOldWord, const UniString& rNewWord );
+
+// virtual UniString GetCurrentWord() const;
+#endif
+
+public:
+ EditSpellWrapper( Window* pWin,
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic::XSpellChecker1 > &xChecker,
+ BOOL bIsStart,
+ BOOL bIsAllRight, EditView* pView );
+
+ static BOOL IsSpellReverse();
+};
+
+
+struct WrongRange
+{
+ USHORT nStart;
+ USHORT nEnd;
+
+ WrongRange( USHORT nS, USHORT nE ) { nStart = nS; nEnd = nE; }
+};
+
+SV_DECL_VARARR( WrongRanges, WrongRange, 4, 4 );
+#define NOT_INVALID 0xFFFF
+
+class WrongList : private WrongRanges
+{
+private:
+ USHORT nInvalidStart;
+ USHORT nInvalidEnd;
+
+ BOOL DbgIsBuggy() const;
+
+public:
+ WrongList();
+ ~WrongList();
+
+ BOOL IsInvalid() const { return nInvalidStart != NOT_INVALID; }
+ void SetValid() { nInvalidStart = NOT_INVALID; nInvalidEnd = 0; }
+ void MarkInvalid( USHORT nS, USHORT nE )
+ {
+ if ( ( nInvalidStart == NOT_INVALID ) || ( nInvalidStart > nS ) )
+ nInvalidStart = nS;
+ if ( nInvalidEnd < nE )
+ nInvalidEnd = nE;
+ }
+
+ USHORT Count() const { return WrongRanges::Count(); }
+
+ // Wenn man weiss was man tut:
+ WrongRange& GetObject( USHORT n ) const { return WrongRanges::GetObject( n ); }
+ void InsertWrong( const WrongRange& rWrong, USHORT nPos );
+
+ USHORT GetInvalidStart() const { return nInvalidStart; }
+ USHORT& GetInvalidStart() { return nInvalidStart; }
+
+ USHORT GetInvalidEnd() const { return nInvalidEnd; }
+ USHORT& GetInvalidEnd() { return nInvalidEnd; }
+
+ void TextInserted( USHORT nPos, USHORT nChars, BOOL bPosIsSep );
+ void TextDeleted( USHORT nPos, USHORT nChars );
+
+ void ResetRanges() { Remove( 0, Count() ); }
+ BOOL HasWrongs() const { return Count() != 0; }
+ void InsertWrong( USHORT nStart, USHORT nEnd, BOOL bClearRange );
+ BOOL NextWrong( USHORT& rnStart, USHORT& rnEnd ) const;
+ BOOL HasWrong( USHORT nStart, USHORT nEnd ) const;
+ BOOL HasAnyWrong( USHORT nStart, USHORT nEnd ) const;
+ void ClearWrongs( USHORT nStart, USHORT nEnd, const ContentNode* pNode );
+ void MarkWrongsInvalid();
+
+ WrongList* Clone() const;
+};
+
+inline void WrongList::InsertWrong( const WrongRange& rWrong, USHORT nPos )
+{
+ WrongRanges::Insert( rWrong, nPos );
+#ifdef DBG_UTIL
+ DBG_ASSERT( !DbgIsBuggy(), "Insert: WrongList kaputt!" );
+#endif
+}
+
+
+
+class EdtAutoCorrDoc : public SvxAutoCorrDoc
+{
+ ImpEditEngine* pImpEE;
+ ContentNode* pCurNode;
+ USHORT nCursor;
+
+ BOOL bAllowUndoAction;
+ BOOL bUndoAction;
+
+protected:
+ void ImplStartUndoAction();
+
+public:
+ EdtAutoCorrDoc( ImpEditEngine* pImpEE, ContentNode* pCurNode, USHORT nCrsr, xub_Unicode cIns );
+ ~EdtAutoCorrDoc();
+
+ virtual BOOL Delete( USHORT nStt, USHORT nEnd );
+ virtual BOOL Insert( USHORT nPos, const String& rTxt );
+ virtual BOOL Replace( USHORT nPos, const String& rTxt );
+
+ virtual BOOL SetAttr( USHORT nStt, USHORT nEnd, USHORT nSlotId, SfxPoolItem& );
+ virtual BOOL SetINetAttr( USHORT nStt, USHORT nEnd, const String& rURL );
+
+ virtual BOOL HasSymbolChars( USHORT nStt, USHORT nEnd );
+
+ virtual const String* GetPrevPara( BOOL bAtNormalPos );
+
+ virtual BOOL ChgAutoCorrWord( USHORT& rSttPos, USHORT nEndPos,
+ SvxAutoCorrect& rACorrect, const String** ppPara );
+
+ virtual LanguageType GetLanguage( USHORT nPos, BOOL bPrevPara = FALSE ) const;
+
+ USHORT GetCursor() const { return nCursor; }
+
+};
+
+#endif // EDTSPELL
+
diff --git a/svx/inc/eerdll.hxx b/svx/inc/eerdll.hxx
new file mode 100644
index 000000000000..dc352a762cec
--- /dev/null
+++ b/svx/inc/eerdll.hxx
@@ -0,0 +1,96 @@
+/*************************************************************************
+ *
+ * $RCSfile: eerdll.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:00:55 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _EERDLL_HXX
+#define _EERDLL_HXX
+
+class GlobalEditData;
+
+#ifndef _TOOLS_RESID_HXX //autogen
+#include <tools/resid.hxx>
+#endif
+
+#ifndef _SHL_HXX
+#include <tools/shl.hxx>
+#endif
+
+class EditResId: public ResId
+{
+public:
+ EditResId( USHORT nId );
+};
+
+class EditDLL
+{
+ ResMgr* pResMgr;
+ GlobalEditData* pGlobalData;
+
+public:
+ EditDLL();
+ ~EditDLL();
+
+ ResMgr* GetResMgr() const { return pResMgr; }
+ GlobalEditData* GetGlobalData() const { return pGlobalData; }
+};
+
+#define EE_DLL() (*(EditDLL**)GetAppData( SHL_EDIT ) )
+
+#endif //_EERDLL_HXX
diff --git a/svx/inc/float3d.hrc b/svx/inc/float3d.hrc
new file mode 100644
index 000000000000..117cd0e22d6b
--- /dev/null
+++ b/svx/inc/float3d.hrc
@@ -0,0 +1,198 @@
+/*************************************************************************
+ *
+ * $RCSfile: float3d.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:00:56 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#include "dialogs.hrc"
+
+//#define FLT_WIN_3D 827
+
+#define BTN_FAVORITES 1
+#define BTN_GEO 2
+#define BTN_REPRESENTATION 3
+#define BTN_LIGHT 4
+#define BTN_TEXTURE 5
+#define BTN_MATERIAL 6
+#define BTN_UPDATE 7
+#define BTN_ASSIGN 8
+
+// Unterer Teil
+#define BTN_PERSPECTIVE 9
+#define BTN_CHANGE_TO_3D 10
+#define BTN_LATHE_OBJ 11
+#define CTL_PREVIEW 12
+#define CTL_LIGHT_PREVIEW 13
+#define GRP_PREVIEW 14
+
+// Favoriten
+#define CTL_FAVORITES 20
+#define GRP_FAVORITES 21
+#define BTN_ONLY_3D 22
+#define BTN_ALL_ATTRIBUTES 23
+
+// Geometrie
+#define FT_HORIZONTAL 24
+#define NUM_HORIZONTAL 25
+#define FT_VERTICAL 26
+#define NUM_VERTICAL 27
+#define GRP_SEGMENTS 28
+#define FT_PERCENT_DIAGONAL 29
+#define MTR_PERCENT_DIAGONAL 30
+#define FT_BACKSCALE 31
+#define MTR_BACKSCALE 32
+#define FT_END_ANGLE 33
+#define MTR_END_ANGLE 34
+#define FT_DEPTH 35
+#define MTR_DEPTH 36
+#define GRP_GEOMETRIE 37
+
+#define BTN_NORMALS_OBJ 38
+#define BTN_NORMALS_FLAT 39
+#define BTN_NORMALS_SPHERE 40
+#define BTN_TWO_SIDED_LIGHTING 41
+#define BTN_NORMALS_INVERT 42
+#define GRP_NORMALS 43
+
+#define BTN_DOUBLE_SIDED 44
+
+// Darstellung
+#define FT_SHADEMODE 45
+#define LB_SHADEMODE 46
+#define BTN_SHADOW_3D 47
+#define FT_SLANT 48
+#define MTR_SLANT 49
+#define GRP_SHADOW 50
+#define FT_DISTANCE 51
+#define MTR_DISTANCE 52
+#define FT_FOCAL_LENGTH 53
+#define MTR_FOCAL_LENGTH 54
+#define GRP_CAMERA 55
+#define GRP_REPRESENTATION 56
+
+// Beleuchtung
+#define BTN_LIGHT_1 60
+#define BTN_LIGHT_2 61
+#define BTN_LIGHT_3 62
+#define BTN_LIGHT_4 63
+#define BTN_LIGHT_5 64
+#define BTN_LIGHT_6 65
+#define BTN_LIGHT_7 66
+#define BTN_LIGHT_8 67
+#define LB_LIGHT_1 68
+#define LB_LIGHT_2 69
+#define LB_LIGHT_3 70
+#define LB_LIGHT_4 71
+#define LB_LIGHT_5 72
+#define LB_LIGHT_6 73
+#define LB_LIGHT_7 74
+#define LB_LIGHT_8 75
+#define BTN_LIGHT_COLOR 76
+#define GRP_LIGHTSOURCE 77
+#define LB_AMBIENTLIGHT 78
+#define BTN_AMBIENT_COLOR 79
+#define GRP_AMBIENTLIGHT 80
+#define GRP_LIGHT 81
+#define FT_LIGHT_X 82
+#define FT_LIGHT_Y 83
+#define FT_LIGHT_Z 84
+#define GRP_LIGHT_INFO 85
+
+// Texturen
+#define FT_TEX_KIND 90
+#define BTN_TEX_LUMINANCE 91
+#define BTN_TEX_COLOR 92
+#define FT_TEX_MODE 93
+#define BTN_TEX_REPLACE 94
+#define BTN_TEX_MODULATE 95
+#define BTN_TEX_BLEND 96
+#define FT_TEX_PROJECTION_X 97
+#define BTN_TEX_PARALLEL_X 98
+#define BTN_TEX_CIRCLE_X 99
+#define BTN_TEX_OBJECT_X 100
+#define FT_TEX_PROJECTION_Y 101
+#define BTN_TEX_PARALLEL_Y 102
+#define BTN_TEX_CIRCLE_Y 103
+#define BTN_TEX_OBJECT_Y 104
+#define FT_TEX_FILTER 105
+#define BTN_TEX_FILTER 106
+#define GRP_TEXTURE 107
+
+// Material
+//#define CTL_MATERIAL 110
+#define GRP_MATERIAL 111
+
+#define FT_MAT_COLOR 112
+#define LB_MAT_COLOR 113
+#define BTN_MAT_COLOR 114
+#define FT_MAT_EMISSION 115
+#define LB_MAT_EMISSION 116
+#define BTN_EMISSION_COLOR 117
+#define FT_MAT_SPECULAR 118
+#define LB_MAT_SPECULAR 119
+#define BTN_SPECULAR_COLOR 120
+#define FT_MAT_SPECULAR_INTENSITY 121
+#define MTR_MAT_SPECULAR_INTENSITY 122
+#define GRP_MAT_SPECULAR 123
+#define FT_MAT_FAVORITES 124
+#define LB_MAT_FAVORITES 125
+
+
+//#define BTN_MAT_FAVORITES 125
+//#define BTN_MAT_EDITOR 126
+
+
diff --git a/svx/inc/flstitem.hxx b/svx/inc/flstitem.hxx
new file mode 100644
index 000000000000..2739e27dc9f0
--- /dev/null
+++ b/svx/inc/flstitem.hxx
@@ -0,0 +1,112 @@
+/*************************************************************************
+ *
+ * $RCSfile: flstitem.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:00:56 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SVX_FLSTITEM_HXX
+#define _SVX_FLSTITEM_HXX
+
+// include ---------------------------------------------------------------
+
+#ifndef _SFXPOOLITEM_HXX //autogen
+#include <svtools/poolitem.hxx>
+#endif
+#ifndef ITEMID_FONTLIST
+#define ITEMID_FONTLIST 0
+#endif
+
+// class SvxFontListItem -------------------------------------------------
+
+class FontList;
+
+/*
+ [Beschreibung]
+
+ Dieses Item dient als Transport-Medium fuer eine FontListe.
+ Die Fontliste wird nicht kopiert und nicht geloescht!
+*/
+
+class SvxFontListItem : public SfxPoolItem
+{
+private:
+ const FontList* pFontList;
+
+public:
+ TYPEINFO();
+
+ SvxFontListItem( const FontList* pFontLst,
+ const USHORT nId = ITEMID_FONTLIST );
+ SvxFontListItem( const SvxFontListItem& rItem );
+
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText, const International * = 0 ) const;
+
+ const FontList* GetFontList() const { return pFontList; }
+};
+
+
+
+
+#endif
+
+
diff --git a/svx/inc/fmgridif.hxx b/svx/inc/fmgridif.hxx
new file mode 100644
index 000000000000..bc6befafac9b
--- /dev/null
+++ b/svx/inc/fmgridif.hxx
@@ -0,0 +1,532 @@
+/*************************************************************************
+ *
+ * $RCSfile: fmgridif.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:00:56 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SVX_FMGRIDIF_HXX
+#define _SVX_FMGRIDIF_HXX
+
+#ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CONTAINER_XENUMERATIONACCESS_HPP_
+#include <com/sun/star/container/XEnumerationAccess.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CONTAINER_XCONTAINER_HPP_
+#include <com/sun/star/container/XContainer.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CONTAINER_XCONTAINERLISTENER_HPP_
+#include <com/sun/star/container/XContainerListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDBC_XROWSETLISTENER_HPP_
+#include <com/sun/star/sdbc/XRowSetListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_SDB_XROWSETSUPPLIER_HPP_
+#include <com/sun/star/sdb/XRowSetSupplier.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FORM_XRESET_HPP_
+#include <com/sun/star/form/XReset.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FORM_XBOUNDCOMPONENT_HPP_
+#include <com/sun/star/form/XBoundComponent.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FORM_XLOADLISTENER_HPP_
+#include <com/sun/star/form/XLoadListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FORM_XGRID_HPP_
+#include <com/sun/star/form/XGrid.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FORM_XGRIDPEER_HPP_
+#include <com/sun/star/form/XGridPeer.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FORM_XGRIDFIELDDATASUPPLIER_HPP_
+#include <com/sun/star/form/XGridFieldDataSupplier.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XDISPATCHPROVIDER_HPP_
+#include <com/sun/star/frame/XDispatchProvider.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XSTATUSLISTENER_HPP_
+#include <com/sun/star/frame/XStatusListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XDISPATCHPROVIDERINTERCEPTION_HPP_
+#include <com/sun/star/frame/XDispatchProviderInterception.hpp>
+#endif
+#ifndef _COM_SUN_STAR_VIEW_XSELECTIONCHANGELISTENER_HPP_
+#include <com/sun/star/view/XSelectionChangeListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UTIL_XMODESELECTOR_HPP_
+#include <com/sun/star/util/XModeSelector.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UTIL_XMODIFYLISTENER_HPP_
+#include <com/sun/star/util/XModifyListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UTIL_XMODIFYBROADCASTER_HPP_
+#include <com/sun/star/util/XModifyBroadcaster.hpp>
+#endif
+
+#ifndef _TOOLKIT_CONTROLS_UNOCONTROL_HXX_
+#include <toolkit/controls/unocontrol.hxx>
+#endif
+#ifndef _TOOLKIT_AWT_VCLXWINDOW_HXX_
+#include <toolkit/awt/vclxwindow.hxx>
+#endif
+
+#ifndef _UTL_UNO3_HXX_
+#include <unotools/uno3.hxx>
+#endif
+
+class DbGridColumn;
+
+class OWeakSubObject : public ::cppu::OWeakObject
+{
+protected:
+ ::cppu::OWeakObject& m_rParent;
+
+public:
+ OWeakSubObject(::cppu::OWeakObject& rParent) : m_rParent(rParent) { }
+
+ virtual void SAL_CALL acquire() throw(::com::sun::star::uno::RuntimeException) { m_rParent.acquire(); }
+ virtual void SAL_CALL release() throw(::com::sun::star::uno::RuntimeException) { m_rParent.release(); }
+};
+
+//==================================================================
+// FmXModifyMultiplexer
+//==================================================================
+class FmXModifyMultiplexer :public OWeakSubObject
+ ,public ::cppu::OInterfaceContainerHelper
+ ,public ::com::sun::star::util::XModifyListener
+{
+public:
+ FmXModifyMultiplexer( ::cppu::OWeakObject& rSource, ::osl::Mutex& rMutex );
+ DECLARE_UNO3_DEFAULTS(FmXModifyMultiplexer,OWeakSubObject);
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(const ::com::sun::star::uno::Type& _rType) throw (::com::sun::star::uno::RuntimeException);
+
+// ::com::sun::star::lang::XEventListener
+ virtual void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& Source) throw(::com::sun::star::uno::RuntimeException);
+
+// ::com::sun::star::util::XModifyListener
+ virtual void SAL_CALL modified(const ::com::sun::star::lang::EventObject& Source);
+
+// resolve ambiguity : both OWeakObject and OInterfaceContainerHelper have these memory operators
+ void * SAL_CALL operator new( size_t size ) throw() { return OWeakSubObject::operator new(size); }
+ void SAL_CALL operator delete( void * p ) throw() { OWeakSubObject::operator delete(p); }
+};
+
+//==================================================================
+// FmXUpdateMultiplexer
+//==================================================================
+class FmXUpdateMultiplexer : public OWeakSubObject,
+ public ::cppu::OInterfaceContainerHelper,
+ public ::com::sun::star::form::XUpdateListener
+{
+public:
+ FmXUpdateMultiplexer( ::cppu::OWeakObject& rSource, ::osl::Mutex& rMutex );
+ DECLARE_UNO3_DEFAULTS(FmXUpdateMultiplexer,OWeakSubObject);
+
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(const ::com::sun::star::uno::Type& _rType) throw (::com::sun::star::uno::RuntimeException);
+
+// ::com::sun::star::lang::XEventListener
+ virtual void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& Source) throw(::com::sun::star::uno::RuntimeException);
+
+// ::com::sun::star::form::XUpdateListener
+ virtual sal_Bool SAL_CALL approveUpdate(const ::com::sun::star::lang::EventObject &);
+ virtual void SAL_CALL updated(const ::com::sun::star::lang::EventObject &);
+
+// resolve ambiguity : both OWeakObject and OInterfaceContainerHelper have these memory operators
+ void * SAL_CALL operator new( size_t size ) throw() { return OWeakSubObject::operator new(size); }
+ void SAL_CALL operator delete( void * p ) throw() { OWeakSubObject::operator delete(p); }
+};
+
+//==================================================================
+// FmXContainerMultiplexer
+//==================================================================
+class FmXContainerMultiplexer : public OWeakSubObject,
+ public ::cppu::OInterfaceContainerHelper,
+ public ::com::sun::star::container::XContainerListener
+{
+public:
+ FmXContainerMultiplexer( ::cppu::OWeakObject& rSource, ::osl::Mutex& rMutex);
+ DECLARE_UNO3_DEFAULTS(FmXContainerMultiplexer,OWeakSubObject);
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(const ::com::sun::star::uno::Type& _rType) throw (::com::sun::star::uno::RuntimeException);
+
+// ::com::sun::star::lang::XEventListener
+ virtual void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& Source) throw(::com::sun::star::uno::RuntimeException);
+
+// ::com::sun::star::container::XContainerListener
+ virtual void SAL_CALL elementInserted(const ::com::sun::star::container::ContainerEvent& Event);
+ virtual void SAL_CALL elementRemoved(const ::com::sun::star::container::ContainerEvent& Event);
+ virtual void SAL_CALL elementReplaced(const ::com::sun::star::container::ContainerEvent& Event);
+
+// resolve ambiguity : both OWeakObject and OInterfaceContainerHelper have these memory operators
+ void * SAL_CALL operator new( size_t size ) throw() { return OWeakSubObject::operator new(size); }
+ void SAL_CALL operator delete( void * p ) throw() { OWeakSubObject::operator delete(p); }
+};
+
+//==================================================================
+// FmXGridControl
+//==================================================================
+class FmXGridPeer;
+class FmXGridControl :public UnoControl
+ ,public ::com::sun::star::form::XBoundComponent
+ ,public ::com::sun::star::form::XGrid
+ ,public ::com::sun::star::util::XModifyBroadcaster
+ ,public ::com::sun::star::form::XGridFieldDataSupplier
+ ,public ::com::sun::star::container::XIndexAccess
+ ,public ::com::sun::star::container::XEnumerationAccess
+ ,public ::com::sun::star::util::XModeSelector
+ ,public ::com::sun::star::container::XContainer
+ ,public ::com::sun::star::frame::XDispatchProvider
+ ,public ::com::sun::star::frame::XDispatchProviderInterception
+{
+ FmXModifyMultiplexer m_aModifyListeners;
+ FmXUpdateMultiplexer m_aUpdateListeners;
+ FmXContainerMultiplexer m_aContainerListeners;
+
+protected:
+ sal_uInt16 m_nPeerCreationLevel;
+ sal_Bool m_bInDraw;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xServiceFactory;
+
+public:
+ FmXGridControl(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >&);
+ virtual ~FmXGridControl();
+
+ // UNO Anbindung
+ DECLARE_UNO3_AGG_DEFAULTS(FmXGridControl, UnoControl);
+ virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation(const ::com::sun::star::uno::Type& _rType) throw (::com::sun::star::uno::RuntimeException);
+
+// XTypeProvider
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence<sal_Int8> SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException);
+
+// ::com::sun::star::lang::XComponent
+ virtual void SAL_CALL dispose() throw(::com::sun::star::uno::RuntimeException);
+
+// ::com::sun::star::lang::XServiceInfo
+ virtual sal_Bool SAL_CALL supportsService(const ::rtl::OUString& ServiceName) throw();
+ virtual ::rtl::OUString SAL_CALL getImplementationName() throw();
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw();
+
+// ::com::sun::star::awt::XControl
+ virtual void SAL_CALL createPeer(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit >& _rToolkit, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& Parent) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL setModel(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& Model);
+ virtual void SAL_CALL setDesignMode(sal_Bool bOn);
+
+// ::com::sun::star::awt::XView
+ virtual void SAL_CALL draw( long x, long y );
+
+// ::com::sun::star::form::XBoundComponent
+ virtual void SAL_CALL addUpdateListener(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XUpdateListener >& l);
+ virtual void SAL_CALL removeUpdateListener(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XUpdateListener >& l);
+ virtual sal_Bool SAL_CALL commit();
+
+// ::com::sun::star::container::XElementAccess
+ virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException);
+
+// ::com::sun::star::container::XEnumerationAccess
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createEnumeration() throw(::com::sun::star::uno::RuntimeException);
+
+// ::com::sun::star::container::XIndexAccess
+ virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getByIndex(sal_Int32 _rIndex) throw(::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+// ::com::sun::star::form::XGrid
+ virtual sal_Int16 SAL_CALL getCurrentColumnPosition();
+ virtual void SAL_CALL setCurrentColumnPosition(sal_Int16 nPos);
+
+// UnoControl
+ virtual ::rtl::OUString GetComponentServiceName();
+
+// ::com::sun::star::util::XModifyBroadcaster
+ virtual void SAL_CALL addModifyListener(const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& l);
+ virtual void SAL_CALL removeModifyListener(const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& l);
+
+// ::com::sun::star::form::XGridFieldDataSupplier
+ virtual ::com::sun::star::uno::Sequence< sal_Bool > SAL_CALL queryFieldDataType( const ::com::sun::star::uno::Type& xType ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL queryFieldData( sal_Int32 nRow, const ::com::sun::star::uno::Type& xType ) throw(::com::sun::star::uno::RuntimeException);
+
+// ::com::sun::star::util::XModeSelector
+ virtual void SAL_CALL setMode(const ::rtl::OUString& Mode) throw(::com::sun::star::lang::NoSupportException, ::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getMode() throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL getSupportedModes() throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL supportsMode(const ::rtl::OUString& Mode) throw(::com::sun::star::uno::RuntimeException);
+
+// ::com::sun::star::container::XContainer
+ virtual void SAL_CALL addContainerListener(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerListener >& l) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeContainerListener(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerListener >& l) throw(::com::sun::star::uno::RuntimeException);
+
+// ::com::sun::star::frame::XDispatchProvider
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > SAL_CALL queryDispatch(const ::com::sun::star::util::URL& aURL, const ::rtl::OUString& aTargetFrameName, sal_Int32 nSearchFlags) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > > SAL_CALL queryDispatches(const ::com::sun::star::uno::Sequence< ::com::sun::star::frame::DispatchDescriptor >& aDescripts) throw(::com::sun::star::uno::RuntimeException);
+
+// ::com::sun::star::frame::XDispatchProviderInterception
+ virtual void SAL_CALL registerDispatchProviderInterceptor(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProviderInterceptor >& xInterceptor) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL releaseDispatchProviderInterceptor(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProviderInterceptor >& xInterceptor) throw(::com::sun::star::uno::RuntimeException);
+
+protected:
+ virtual FmXGridPeer* imp_CreatePeer(Window* pParent);
+ // ImplCreatePeer waere besser ;) geht aber nicht, da dann nicht exportiert
+
+};
+
+//==================================================================
+// FmXGridPeer -> Peer fuers Gridcontrol
+//==================================================================
+class FmGridControl;
+class FmXGridPeer :public VCLXWindow
+ ,public ::com::sun::star::form::XGridPeer
+ ,public ::com::sun::star::form::XBoundComponent
+ ,public ::com::sun::star::form::XGrid
+ ,public ::com::sun::star::sdb::XRowSetSupplier
+ ,public ::com::sun::star::util::XModifyBroadcaster
+ ,public ::com::sun::star::beans::XPropertyChangeListener
+ ,public ::com::sun::star::container::XContainerListener
+ ,public ::com::sun::star::sdbc::XRowSetListener
+ ,public ::com::sun::star::form::XLoadListener
+ ,public ::com::sun::star::view::XSelectionChangeListener
+ ,public ::com::sun::star::form::XGridFieldDataSupplier
+ ,public ::com::sun::star::container::XIndexAccess
+ ,public ::com::sun::star::container::XEnumerationAccess
+ ,public ::com::sun::star::util::XModeSelector
+ ,public ::com::sun::star::container::XContainer
+ ,public ::com::sun::star::frame::XStatusListener
+ ,public ::com::sun::star::frame::XDispatchProvider
+ ,public ::com::sun::star::frame::XDispatchProviderInterception
+ ,public ::com::sun::star::form::XResetListener
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > m_xColumns;
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > m_xCursor;
+ ::cppu::OInterfaceContainerHelper m_aModifyListeners,
+ m_aUpdateListeners,
+ m_aContainerListeners;
+ ::rtl::OUString m_aMode;
+ sal_Int32 m_nCursorListening;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProviderInterceptor > m_xFirstDispatchInterceptor;
+
+ sal_Bool m_bInterceptingDispatch;
+
+ sal_Bool* m_pStateCache;
+ // one bool for each supported url
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > * m_pDispatchers;
+ // one dispatcher for each supported url
+ // (I would like to have a vector here but including the stl in an exported file seems
+ // very risky to me ....)
+
+protected:
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xServiceFactory;
+ ::osl::Mutex m_aMutex;
+
+public:
+ FmXGridPeer(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >&);
+ ~FmXGridPeer();
+
+ // spaeter Constructor, immer nach dem realen Constructor zu rufen !
+ void Create(Window* pParent, WinBits nStyle);
+
+// UNO Anbindung
+ DECLARE_UNO3_DEFAULTS(FmXGridPeer, VCLXWindow);
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(const ::com::sun::star::uno::Type& _rType) throw (::com::sun::star::uno::RuntimeException);
+
+// XTypeProvider
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence<sal_Int8> SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException);
+
+// ::com::sun::star::lang::XUnoTunnel
+ static const ::com::sun::star::uno::Sequence< sal_Int8 >& getUnoTunnelImplementationId() throw();
+ static FmXGridPeer* getImplementation( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxIFace ) throw();
+ sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& _rIdentifier ) throw(::com::sun::star::uno::RuntimeException);
+
+// ::com::sun::star::form::XGridPeer
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > SAL_CALL getColumns( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setColumns( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer >& aColumns ) throw(::com::sun::star::uno::RuntimeException);
+
+// ::com::sun::star::lang::XComponent
+ virtual void SAL_CALL dispose() throw(::com::sun::star::uno::RuntimeException);
+
+// ::com::sun::star::lang::XEventListener
+ virtual void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& Source) throw(::com::sun::star::uno::RuntimeException);
+
+// ::com::sun::star::form::XBoundComponent
+ virtual void SAL_CALL addUpdateListener(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XUpdateListener >& l);
+ virtual void SAL_CALL removeUpdateListener(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XUpdateListener >& l);
+ virtual sal_Bool SAL_CALL commit();
+
+// ::com::sun::star::container::XElementAccess
+ virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException);
+
+// ::com::sun::star::container::XEnumerationAccess
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createEnumeration() throw(::com::sun::star::uno::RuntimeException);
+
+// ::com::sun::star::container::XIndexAccess
+ virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getByIndex(sal_Int32 _rIndex) throw(::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+// ::com::sun::star::beans::XPropertyChangeListener
+ virtual void SAL_CALL SAL_CALL propertyChange(const ::com::sun::star::beans::PropertyChangeEvent& evt);
+
+// ::com::sun::star::form::XLoadListener
+ virtual void SAL_CALL loaded(const ::com::sun::star::lang::EventObject& rEvent);
+ virtual void SAL_CALL unloaded(const ::com::sun::star::lang::EventObject& rEvent);
+ virtual void SAL_CALL unloading(const ::com::sun::star::lang::EventObject& aEvent) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL reloading(const ::com::sun::star::lang::EventObject& aEvent) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL reloaded(const ::com::sun::star::lang::EventObject& aEvent) throw(::com::sun::star::uno::RuntimeException);
+
+// ::com::sun::star::sdbc::XRowSetListener
+ virtual void SAL_CALL cursorMoved(const ::com::sun::star::lang::EventObject& event) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL rowChanged(const ::com::sun::star::lang::EventObject& event) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL rowSetChanged(const ::com::sun::star::lang::EventObject& event) throw(::com::sun::star::uno::RuntimeException);
+
+// ::com::sun::star::container::XContainerListener
+ virtual void SAL_CALL elementInserted(const ::com::sun::star::container::ContainerEvent& Event);
+ virtual void SAL_CALL elementRemoved(const ::com::sun::star::container::ContainerEvent& Event);
+ virtual void SAL_CALL elementReplaced(const ::com::sun::star::container::ContainerEvent& Event);
+
+// VCLXWindow
+ virtual void SAL_CALL setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getProperty( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException);
+
+// ::com::sun::star::form::XGrid
+ virtual sal_Int16 SAL_CALL getCurrentColumnPosition();
+ virtual void SAL_CALL setCurrentColumnPosition(sal_Int16 nPos);
+
+// ::com::sun::star::sdb::XRowSetSupplier
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > SAL_CALL getRowSet() throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setRowSet(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet >& xDataSource) throw(::com::sun::star::uno::RuntimeException);
+
+// ::com::sun::star::util::XModifyBroadcaster
+ virtual void SAL_CALL addModifyListener(const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& l);
+ virtual void SAL_CALL removeModifyListener(const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& l);
+
+// UnoControl
+ virtual void SAL_CALL SAL_CALL setDesignMode(sal_Bool bOn);
+ virtual sal_Bool SAL_CALL isDesignMode();
+
+// ::com::sun::star::view::XSelectionChangeListener
+ virtual void SAL_CALL selectionChanged(const ::com::sun::star::lang::EventObject& aEvent);
+
+ void CellModified();
+
+// PropertyListening
+ void updateGrid(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet >& _rDatabaseCursor);
+ void startCursorListening();
+ void stopCursorListening();
+
+// ::com::sun::star::form::XGridFieldDataSupplier
+ virtual ::com::sun::star::uno::Sequence< sal_Bool > SAL_CALL queryFieldDataType( const ::com::sun::star::uno::Type& xType ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL queryFieldData( sal_Int32 nRow, const ::com::sun::star::uno::Type& xType ) throw(::com::sun::star::uno::RuntimeException);
+
+// ::com::sun::star::util::XModeSelector
+ virtual void SAL_CALL setMode(const ::rtl::OUString& Mode) throw(::com::sun::star::lang::NoSupportException, ::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getMode() throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedModes() throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL supportsMode(const ::rtl::OUString& Mode) throw(::com::sun::star::uno::RuntimeException);
+
+// ::com::sun::star::container::XContainer
+ virtual void SAL_CALL addContainerListener(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerListener >& l) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeContainerListener(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerListener >& l) throw(::com::sun::star::uno::RuntimeException);
+
+ void columnVisible(DbGridColumn* pColumn);
+ void columnHidden(DbGridColumn* pColumn);
+
+// ::com::sun::star::awt::XView
+ virtual void SAL_CALL draw( long x, long y );
+
+// ::com::sun::star::frame::XDispatchProvider
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > SAL_CALL queryDispatch(const ::com::sun::star::util::URL& aURL, const ::rtl::OUString& aTargetFrameName, sal_Int32 nSearchFlags) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > > SAL_CALL queryDispatches(const ::com::sun::star::uno::Sequence< ::com::sun::star::frame::DispatchDescriptor >& aDescripts) throw(::com::sun::star::uno::RuntimeException);
+
+// ::com::sun::star::frame::XDispatchProviderInterception
+ virtual void SAL_CALL registerDispatchProviderInterceptor(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProviderInterceptor >& xInterceptor) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL releaseDispatchProviderInterceptor(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProviderInterceptor >& xInterceptor) throw(::com::sun::star::uno::RuntimeException);
+
+// ::com::sun::star::frame::XStatusListener
+ virtual void SAL_CALL statusChanged(const ::com::sun::star::frame::FeatureStateEvent& Event) throw(::com::sun::star::uno::RuntimeException);
+
+// ::com::sun::star::form::XResetListener
+ virtual sal_Bool SAL_CALL approveReset(const ::com::sun::star::lang::EventObject& rEvent) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL resetted(const ::com::sun::star::lang::EventObject& rEvent) throw(::com::sun::star::uno::RuntimeException);
+
+protected:
+ virtual FmGridControl* imp_CreateControl(Window* pParent, WinBits nStyle);
+
+ static ::com::sun::star::uno::Sequence< ::com::sun::star::util::URL>& getSupportedURLs();
+ static ::com::sun::star::uno::Sequence<sal_uInt16>& getSupportedGridSlots();
+ void ConnectToDispatcher();
+ void DisConnectFromDispatcher();
+ void UpdateDispatches(); // will connect if not already connected and just update else
+
+ /** If a derived class wants to listen at some column properties, it doesn't have
+ to overload all methods affecting columns (setColumns, elementInserted, elementRemoved ...)
+ Instead it may use addColumnListeners and removeColumnListeners which are called in all
+ the cases.
+ */
+ virtual void addColumnListeners(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xCol);
+ virtual void removeColumnListeners(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xCol);
+
+ DECL_LINK(OnQueryGridSlotState, void*);
+ DECL_LINK(OnExecuteGridSlot, void*);
+};
+
+
+
+#endif // _SVX_FMGRID_HXX
+
diff --git a/svx/inc/fmhelp.hrc b/svx/inc/fmhelp.hrc
new file mode 100644
index 000000000000..a82535e5c4d6
--- /dev/null
+++ b/svx/inc/fmhelp.hrc
@@ -0,0 +1,322 @@
+/*************************************************************************
+ *
+ * $RCSfile: fmhelp.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:00:56 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SVX_FMHELP_HRC
+#define _SVX_FMHELP_HRC
+
+// include -----------------------------------------------------------
+#include <svtools/solar.hrc>
+
+// in solar.hrc
+//#define HID_FORMS_START (HID_LIB_START+4000)
+//#define HID_FORMS_END (HID_LIB_START+4999)
+
+// Help-Ids --------------------------------------------------------------
+
+// insgesamt 200
+#define HID_DLG_DBINFO (HID_FORMS_START + 0)
+#define HID_DLG_DBMSG (HID_FORMS_START + 1)
+
+#define HID_PROP_GROUPBOX (HID_FORMS_START + 2)
+#define HID_PROP_CONTROLSOURCE (HID_FORMS_START + 3)
+#define HID_PROP_NAME (HID_FORMS_START + 4)
+#define HID_PROP_TABINDEX (HID_FORMS_START + 5)
+#define HID_PROP_MASTERFIELDS (HID_FORMS_START + 6)
+#define HID_PROP_SLAVEFIELDS (HID_FORMS_START + 7)
+#define HID_PROP_DATASOURCE (HID_FORMS_START + 8)
+#define HID_PROP_CURSORSOURCE (HID_FORMS_START + 9)
+#define HID_PROP_CURSORSOURCETYPE (HID_FORMS_START + 10)
+#define HID_PROP_CURSORTYPE (HID_FORMS_START + 11)
+#define HID_PROP_READONLY (HID_FORMS_START + 12)
+#define HID_PROP_DATAENTRY (HID_FORMS_START + 13)
+#define HID_PROP_NAVIGATION (HID_FORMS_START + 14)
+#define HID_PROP_CYCLE (HID_FORMS_START + 15)
+#define HID_PROP_ALLOW_ADDITIONS (HID_FORMS_START + 16)
+#define HID_PROP_ALLOW_EDITS (HID_FORMS_START + 17)
+#define HID_PROP_ALLOW_DELETIONS (HID_FORMS_START + 18)
+#define HID_PROP_DIRTY (HID_FORMS_START + 19)
+#define HID_PROP_OLDVALUE (HID_FORMS_START + 20)
+#define HID_PROP_VALUE (HID_FORMS_START + 21)
+#define HID_PROP_LOCKED (HID_FORMS_START + 22)
+#define HID_PROP_FORMATKEY (HID_FORMS_START + 23)
+#define HID_PROP_REQUIRED (HID_FORMS_START + 24)
+#define HID_PROP_SCALE (HID_FORMS_START + 25)
+#define HID_PROP_SIZE (HID_FORMS_START + 26)
+#define HID_PROP_UNIQUE (HID_FORMS_START + 27)
+#define HID_PROP_CLASSID (HID_FORMS_START + 28)
+#define HID_PROP_LEFT (HID_FORMS_START + 29)
+#define HID_PROP_RIGHT (HID_FORMS_START + 30)
+#define HID_PROP_HEIGHT (HID_FORMS_START + 31)
+#define HID_PROP_WIDTH (HID_FORMS_START + 32)
+#define HID_PROP_BOUNDCOLUMN (HID_FORMS_START + 33)
+#define HID_PROP_LISTSOURCETYPE (HID_FORMS_START + 34)
+#define HID_PROP_LISTSOURCE (HID_FORMS_START + 35)
+#define HID_PROP_LISTINDEX (HID_FORMS_START + 36)
+#define HID_PROP_TEXT (HID_FORMS_START + 37)
+#define HID_PROP_LABEL (HID_FORMS_START + 38)
+#define HID_PROP_STRINGITEMLIST (HID_FORMS_START + 39)
+#define HID_PROP_SEARCHING (HID_FORMS_START + 40)
+#define HID_PROP_FONT (HID_FORMS_START + 41)
+#define HID_PROP_ROWHEIGHT (HID_FORMS_START + 42)
+#define HID_PROP_BACKGROUNDCOLOR (HID_FORMS_START + 43)
+#define HID_PROP_FILLCOLOR (HID_FORMS_START + 44)
+#define HID_PROP_TEXTCOLOR (HID_FORMS_START + 45)
+#define HID_PROP_LINECOLOR (HID_FORMS_START + 46)
+#define HID_PROP_BORDER (HID_FORMS_START + 47)
+#define HID_PROP_ALIGN (HID_FORMS_START + 48)
+#define HID_PROP_DROPDOWN (HID_FORMS_START + 49)
+#define HID_PROP_MULTILINE (HID_FORMS_START + 50)
+#define HID_PROP_HSCROLL (HID_FORMS_START + 51)
+#define HID_PROP_VSCROLL (HID_FORMS_START + 52)
+#define HID_PROP_TABSTOP (HID_FORMS_START + 53)
+#define HID_PROP_REFVALUE (HID_FORMS_START + 54)
+#define HID_PROP_BUTTONTYPE (HID_FORMS_START + 55)
+#define HID_PROP_SUBMIT_ACTION (HID_FORMS_START + 56)
+#define HID_PROP_SUBMIT_METHOD (HID_FORMS_START + 57)
+#define HID_PROP_SUBMIT_ENCODING (HID_FORMS_START + 58)
+#define HID_PROP_DEFAULTVALUE (HID_FORMS_START + 59)
+#define HID_PROP_SUBMIT_TARGET (HID_FORMS_START + 60)
+#define HID_PROP_DEFAULT_CHECKED (HID_FORMS_START + 61)
+#define HID_PROP_IMAGE_URL (HID_FORMS_START + 62)
+#define HID_PROP_DEFAULT_SELECT_SEQ (HID_FORMS_START + 63)
+#define HID_PROP_MULTISELECTION (HID_FORMS_START + 64)
+
+#define HID_PROP_DATE (HID_FORMS_START + 65)
+#define HID_PROP_DATEMIN (HID_FORMS_START + 66)
+#define HID_PROP_DATEMAX (HID_FORMS_START + 67)
+#define HID_PROP_DATEFORMAT (HID_FORMS_START + 68)
+#define HID_PROP_TIME (HID_FORMS_START + 69)
+#define HID_PROP_TIMEMIN (HID_FORMS_START + 70)
+#define HID_PROP_TIMEMAX (HID_FORMS_START + 71)
+#define HID_PROP_TIMEFORMAT (HID_FORMS_START + 72)
+#define HID_PROP_VALUEMIN (HID_FORMS_START + 73)
+#define HID_PROP_VALUEMAX (HID_FORMS_START + 74)
+#define HID_PROP_VALUESTEP (HID_FORMS_START + 75)
+#define HID_PROP_CURRENCYSYMBOL (HID_FORMS_START + 76)
+#define HID_PROP_EDITMASK (HID_FORMS_START + 77)
+#define HID_PROP_LITERALMASK (HID_FORMS_START + 78)
+#define HID_PROP_ENABLED (HID_FORMS_START + 79)
+#define HID_PROP_AUTOCOMPLETE (HID_FORMS_START + 80)
+#define HID_PROP_LINECOUNT (HID_FORMS_START + 81)
+#define HID_PROP_MAXTEXTLEN (HID_FORMS_START + 82)
+#define HID_PROP_SPIN (HID_FORMS_START + 83)
+#define HID_PROP_STRICTFORMAT (HID_FORMS_START + 84)
+#define HID_PROP_SHOWTHOUSANDSEP (HID_FORMS_START + 85)
+#define HID_PROP_HARDLINEBREAKS (HID_FORMS_START + 86)
+#define HID_PROP_PRINTABLE (HID_FORMS_START + 87)
+#define HID_PROP_TARGET_URL (HID_FORMS_START + 88)
+#define HID_PROP_TARGET_FRAME (HID_FORMS_START + 89)
+#define HID_PROP_TAG (HID_FORMS_START + 90)
+#define HID_PROP_ECHO_CHAR (HID_FORMS_START + 91)
+#define HID_PROP_EMPTY_IS_NULL (HID_FORMS_START + 92)
+#define HID_PROP_DECIMAL_ACCURACY (HID_FORMS_START + 93)
+#define HID_PROP_DATE_SHOW_CENTURY (HID_FORMS_START + 94)
+#define HID_PROP_DEFAULT_BUTTON (HID_FORMS_START + 95)
+#define HID_PROP_HIDDEN_VALUE (HID_FORMS_START + 96)
+#define HID_PROP_TRISTATE (HID_FORMS_START + 97)
+#define HID_PROP_NAVIGATIONBAR (HID_FORMS_START + 98)
+#define HID_PROP_FILTER_CRITERIA (HID_FORMS_START + 99)
+#define HID_PROP_SORT_CRITERIA (HID_FORMS_START + 100)
+#define HID_PROP_DEFAULT_LONG_VALUE (HID_FORMS_START + 101)
+#define HID_PROP_DEFAULT_TIME (HID_FORMS_START + 102)
+#define HID_PROP_DEFAULT_DATE (HID_FORMS_START + 103)
+#define HID_PROP_HELPTEXT (HID_FORMS_START + 104)
+#define HID_PROP_HELPURL (HID_FORMS_START + 105)
+#define HID_PROP_RECORDMARKER (HID_FORMS_START + 106)
+#define HID_PROP_FILTERPROPOSAL (HID_FORMS_START + 107)
+#define HID_PROP_EFFECTIVEMIN (HID_FORMS_START + 108)
+#define HID_PROP_EFFECTIVEMAX (HID_FORMS_START + 109)
+#define HID_PROP_EFFECTIVEDEFAULT (HID_FORMS_START + 110)
+#define HID_PROP_CONTROLLABEL (HID_FORMS_START + 111)
+#define HID_PROP_CURRSYM_POSITION (HID_FORMS_START + 112)
+
+//Unique Id's fuer Dialoge im Property-Editor
+#define UID_PROP_DLG (HID_FORMS_START + 180)
+#define UID_PROP_DLG_FONT_TYPE (UID_PROP_DLG + 0)
+#define UID_PROP_DLG_IMAGE_URL (UID_PROP_DLG + 1)
+#define UID_PROP_DLG_BACKGROUNDCOLOR (UID_PROP_DLG + 2)
+#define UID_PROP_DLG_GRAPHIC_IMPORT (UID_PROP_DLG + 3)
+#define UID_PROP_DLG_ATTR_DATASOURCE (UID_PROP_DLG + 4)
+#define UID_PROP_DLG_ATTR_TARGET_URL (UID_PROP_DLG + 5)
+#define UID_PROP_DLG_NUMBER_FORMAT (UID_PROP_DLG + 6)
+#define UID_PROP_DLG_CONTROLLABEL (UID_PROP_DLG + 7)
+
+// Events
+#define HID_EVT_START (HID_FORMS_START + 200)
+
+// insgesamt 100
+#define HID_EVT_ACTIONPERFORMED (HID_EVT_START + 0)
+#define HID_EVT_AFTERDELETE (HID_EVT_START + 1)
+#define HID_EVT_AFTERINSERT (HID_EVT_START + 2)
+#define HID_EVT_AFTERUPDATE (HID_EVT_START + 3)
+#define HID_EVT_BEFOREDELETE (HID_EVT_START + 4)
+#define HID_EVT_BEFOREINSERT (HID_EVT_START + 5)
+#define HID_EVT_BEFOREUPDATE (HID_EVT_START + 6)
+#define HID_EVT_COMPONENTHIDDEN (HID_EVT_START + 7)
+#define HID_EVT_COMPONENTMOVED (HID_EVT_START + 8)
+#define HID_EVT_COMPONENTPAINT (HID_EVT_START + 9)
+#define HID_EVT_COMPONENTRESIZED (HID_EVT_START + 10)
+#define HID_EVT_COMPONENTSHOWN (HID_EVT_START + 11)
+#define HID_EVT_CONFIRMDELETE (HID_EVT_START + 12)
+#define HID_EVT_ELEMENTINSERTED (HID_EVT_START + 13)
+#define HID_EVT_ELEMENTREMOVED (HID_EVT_START + 14)
+#define HID_EVT_ELEMENTREPLACED (HID_EVT_START + 15)
+#define HID_EVT_ERROROCCURED (HID_EVT_START + 16)
+#define HID_EVT_FIRING (HID_EVT_START + 17)
+#define HID_EVT_FOCUSGAINED (HID_EVT_START + 18)
+#define HID_EVT_FOCUSLOST (HID_EVT_START + 19)
+#define HID_EVT_ITEMSTATECHANGED (HID_EVT_START + 20)
+#define HID_EVT_KEYTYPED (HID_EVT_START + 21)
+#define HID_EVT_LOADED (HID_EVT_START + 22)
+#define HID_EVT_MOUSEDRAGGED (HID_EVT_START + 23)
+#define HID_EVT_MOUSEENTERED (HID_EVT_START + 24)
+#define HID_EVT_MOUSEEXITED (HID_EVT_START + 25)
+#define HID_EVT_MOUSEMOVED (HID_EVT_START + 26)
+#define HID_EVT_MOUSEPRESSED (HID_EVT_START + 27)
+#define HID_EVT_MOUSERELEASED (HID_EVT_START + 28)
+#define HID_EVT_POSITIONED (HID_EVT_START + 29)
+#define HID_EVT_PROPERTIESCHANGE (HID_EVT_START + 30)
+#define HID_EVT_PROPERTYCHANGE (HID_EVT_START + 31)
+#define HID_EVT_PROPERTYSTATECHANGE (HID_EVT_START + 32)
+#define HID_EVT_RESETTED (HID_EVT_START + 33)
+#define HID_EVT_SUBMITTED (HID_EVT_START + 34)
+#define HID_EVT_TEXTCHANGED (HID_EVT_START + 35)
+#define HID_EVT_UNLOADED (HID_EVT_START + 36)
+#define HID_EVT_UPDATECANCELED (HID_EVT_START + 37)
+#define HID_EVT_VETOABLECHANGE (HID_EVT_START + 38)
+#define HID_EVT_CHANGED (HID_EVT_START + 39)
+
+#define HID_EVT_APPROVEACTIONPERFORMED (HID_EVT_START + 40)
+#define HID_EVT_APPROVERESETTED (HID_EVT_START + 41)
+#define HID_EVT_KEYUP (HID_EVT_START + 42)
+#define HID_EVT_APPROVEPARAMETER (HID_EVT_START + 43)
+#define HID_EVT_POSITIONING (HID_EVT_START + 44)
+#define HID_EVT_RELOADED (HID_EVT_START + 45)
+#define HID_EVT_APPROVEROWCHANGE (HID_EVT_START + 46)
+#define HID_EVT_ROWCHANGE (HID_EVT_START + 47)
+
+// Fuer den Button "Makro zuweisen"- Dialog im Property-Editor
+#define UID_EVT_MACRODLG (HID_EVT_START + 99)
+
+#define HID_FM_OTHER_START (HID_FORMS_START + 300)
+#define HID_FORM_NAVIGATOR (HID_FM_OTHER_START + 0)
+#define HID_FORM_NAVIGATOR_WIN (HID_FM_OTHER_START + 1)
+#define HID_FIELD_SEL (HID_FM_OTHER_START + 2)
+#define HID_FIELD_SEL_WIN (HID_FM_OTHER_START + 3)
+#define HID_FILTER_NAVIGATOR (HID_FM_OTHER_START + 4)
+#define HID_FILTER_NAVIGATOR_WIN (HID_FM_OTHER_START + 5)
+
+#define HID_FORM_DLG_START (HID_FORMS_START + 400)
+#define HID_FM_DLG_PROP_FORM (HID_FORM_DLG_START + 0)
+#define HID_FM_DLG_PROP_CONTROL (HID_FORM_DLG_START + 1)
+#define HID_FM_DLG_PROP_GRIDCTR (HID_FORM_DLG_START + 2)
+#define HID_FM_PROPDLG_WINDOW (HID_FORM_DLG_START + 3)
+#define HID_FM_PROPDLG_CONTAINER (HID_FORM_DLG_START + 4)
+#define HID_FM_PROPDLG_TABCTR (HID_FORM_DLG_START + 5)
+#define HID_FM_PROPDLG_TAB_GENERAL (HID_FORM_DLG_START + 6)
+#define HID_FM_PROPDLG_TAB_DATA (HID_FORM_DLG_START + 7)
+#define HID_FM_PROPDLG_TAB_EVT (HID_FORM_DLG_START + 8)
+#define HID_FM_DLG_SEARCH (HID_FORM_DLG_START + 9)
+
+#define HID_SEARCH_TEXT (HID_FORM_DLG_START + 10)
+#define HID_SEARCH_ALLFIELDS (HID_FORM_DLG_START + 11)
+#define HID_SEARCH_SINGLEFIELD (HID_FORM_DLG_START + 12)
+#define HID_SEARCH_FIELDSELECTION (HID_FORM_DLG_START + 13)
+#define HID_SEARCH_POSITION (HID_FORM_DLG_START + 14)
+#define HID_SEARCH_FORMATTER (HID_FORM_DLG_START + 15)
+#define HID_SEARCH_CASE (HID_FORM_DLG_START + 16)
+#define HID_SEARCH_BACKWARD (HID_FORM_DLG_START + 17)
+#define HID_SEARCH_STARTOVER (HID_FORM_DLG_START + 18)
+#define HID_SEARCH_WILDCARD (HID_FORM_DLG_START + 19)
+#define HID_SEARCH_REGULAR (HID_FORM_DLG_START + 20)
+#define HID_SEARCH_APPROX (HID_FORM_DLG_START + 21)
+#define HID_SEARCH_APPROXSETTINGS (HID_FORM_DLG_START + 22)
+#define HID_SEARCH_BTN_SEARCH (HID_FORM_DLG_START + 23)
+#define HID_SEARCH_BTN_CLOSE (HID_FORM_DLG_START + 24)
+
+#define HID_TABORDER_CONTROLS (HID_FORM_DLG_START + 25)
+
+#define HID_CONTROLS_DATE_N_TIME (HID_FORM_DLG_START + 26)
+#define HID_FM_DLG_PARAM (HID_FORM_DLG_START + 27)
+
+#define HID_GRID_TRAVEL_FIRST (HID_FORM_DLG_START + 28)
+#define HID_GRID_TRAVEL_PREV (HID_FORM_DLG_START + 29)
+#define HID_GRID_TRAVEL_NEXT (HID_FORM_DLG_START + 30)
+#define HID_GRID_TRAVEL_LAST (HID_FORM_DLG_START + 31)
+#define HID_GRID_TRAVEL_NEW (HID_FORM_DLG_START + 32)
+#define HID_GRID_TRAVEL_ABSOLUTE (HID_FORM_DLG_START + 33)
+#define HID_GRID_NUMBEROFRECORDS (HID_FORM_DLG_START + 34)
+
+#define UID_SEARCH_RECORDSTATUS (HID_FORM_DLG_START + 35)
+#define UID_SQLERROR_BUTTONMORE (HID_FORM_DLG_START + 36)
+
+// -----------------------------------------------------------------------
+// "Uberlaufpr"ufung -----------------------------------------------------
+// -----------------------------------------------------------------------
+
+#define ACT_SVX_HID_END HID_GRID_NUMBEROFRECORDS
+
+#if ACT_SVX_HID_END > HID_FORMS_END
+#error Resource-Ueberlauf in #line, #file
+#endif
+
+
+#endif
+
diff --git a/svx/inc/fmobjfac.hxx b/svx/inc/fmobjfac.hxx
new file mode 100644
index 000000000000..2505575272cd
--- /dev/null
+++ b/svx/inc/fmobjfac.hxx
@@ -0,0 +1,86 @@
+/*************************************************************************
+ *
+ * $RCSfile: fmobjfac.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:00:56 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _SVX_FMOBJFAC_HXX
+#define _SVX_FMOBJFAC_HXX
+
+#ifndef _LINK_HXX //autogen
+#include <tools/link.hxx>
+#endif
+
+class SdrObjFactory;
+
+
+
+class FmFormObjFactory
+{
+public:
+ FmFormObjFactory();
+ ~FmFormObjFactory();
+
+ DECL_LINK(MakeObject, SdrObjFactory*);
+};
+
+
+
+
+#endif // _FM_FMOBJFAC_HXX
+
diff --git a/svx/inc/fontitem.hxx b/svx/inc/fontitem.hxx
new file mode 100644
index 000000000000..96654f04ca71
--- /dev/null
+++ b/svx/inc/fontitem.hxx
@@ -0,0 +1,157 @@
+/*************************************************************************
+ *
+ * $RCSfile: fontitem.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:00:56 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SVX_FONTITEM_HXX
+#define _SVX_FONTITEM_HXX
+
+// include ---------------------------------------------------------------
+
+#ifndef _SFXPOOLITEM_HXX //autogen
+#include <svtools/poolitem.hxx>
+#endif
+#ifndef _STRING_HXX //autogen
+#include <tools/string.hxx>
+#endif
+#ifndef _FONT_HXX //autogen
+#include <vcl/font.hxx>
+#endif
+
+class SvXMLUnitConverter;
+#ifdef _USE_NAMESPACE
+namespace rtl
+{
+#endif
+ class OUString;
+#ifdef _USE_NAMESPACE
+}
+#endif
+
+// class SvxFontItem -----------------------------------------------------
+
+/*
+ [Beschreibung]
+ Dieses Item beschreibt einen Font.
+*/
+
+class SvxFontItem : public SfxPoolItem
+{
+ String aFamilyName;
+ String aStyleName;
+ FontFamily eFamily;
+ FontPitch ePitch;
+ rtl_TextEncoding eTextEncoding;
+
+public:
+ TYPEINFO();
+
+ SvxFontItem( const USHORT nId = ITEMID_FONT );
+ SvxFontItem( const FontFamily eFam, const String& rFamilyName,
+ const String& rStyleName,
+ const FontPitch eFontPitch = PITCH_DONTKNOW,
+ const rtl_TextEncoding eFontTextEncoding = RTL_TEXTENCODING_DONTKNOW,
+ const USHORT nId = ITEMID_FONT );
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxPoolItem* Create(SvStream &, USHORT) const;
+ virtual SvStream& Store(SvStream &, USHORT nItemVersion) const;
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+
+ virtual BOOL importXML( const NAMESPACE_RTL(OUString)& rValue, USHORT nMemberId, const SvXMLUnitConverter& rUnitConverter );
+ virtual BOOL exportXML( NAMESPACE_RTL(OUString)& rValue, USHORT nMemberId, const SvXMLUnitConverter& rUnitConverter ) const;
+
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText, const International * = 0 ) const;
+
+ // ZugriffsMethoden:
+ inline String &GetFamilyName() { return aFamilyName; }
+ inline const String &GetFamilyName() const { return aFamilyName; }
+
+ inline String &GetStyleName() { return aStyleName; }
+ inline const String &GetStyleName() const { return aStyleName; }
+
+ inline FontFamily &GetFamily() { return eFamily; }
+ inline FontFamily GetFamily() const { return eFamily; }
+
+ inline FontPitch &GetPitch() { return ePitch; }
+ inline FontPitch GetPitch() const { return ePitch; }
+
+ inline rtl_TextEncoding &GetCharSet() { return eTextEncoding; }
+ inline rtl_TextEncoding GetCharSet() const { return eTextEncoding; }
+
+ inline SvxFontItem& operator=(const SvxFontItem& rFont)
+ {
+ aFamilyName = rFont.GetFamilyName();
+ aStyleName = rFont.GetStyleName();
+ eFamily = rFont.GetFamily();
+ ePitch = rFont.GetPitch();
+ eTextEncoding = rFont.GetCharSet();
+ return *this;
+ }
+
+};
+
+#endif // #ifndef _SVX_FONTITEM_HXX
+
+
diff --git a/svx/inc/fontlb.hxx b/svx/inc/fontlb.hxx
new file mode 100644
index 000000000000..67e5ef9a4b8e
--- /dev/null
+++ b/svx/inc/fontlb.hxx
@@ -0,0 +1,122 @@
+/*************************************************************************
+ *
+ * $RCSfile: fontlb.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:00:56 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef SVX_FONTLB_HXX
+#define SVX_FONTLB_HXX
+
+#ifndef _SVTABBX_HXX //autogen
+#include <svtools/svtabbx.hxx>
+#endif
+
+#ifndef _SV_VIRDEV_HXX //autogen
+#include <vcl/virdev.hxx>
+#endif
+
+
+// Klasse fuer die Darstellung von schriftabhaengigen Strings
+class SvLBoxFontString : public SvLBoxString
+{
+ private:
+
+ Font aPrivatFont;
+
+public:
+ SvLBoxFontString( SvLBoxEntry*,USHORT nFlags,const XubString& rStr,
+ const Font& aFont);
+ SvLBoxFontString();
+ ~SvLBoxFontString();
+
+ void InitViewData( SvLBox*,SvLBoxEntry*,SvViewDataItem* );
+ void Paint( const Point&, SvLBox& rDev, USHORT nFlags,SvLBoxEntry* );
+ SvLBoxItem* Create() const;
+};
+
+// Listbox mit schriftabhaengiger Darstellung
+
+class SvxFontListBox : public SvTabListBox
+{
+ private:
+
+ VirtualDevice *pPrivatVDev;
+ Font aStandardFont;
+ Font aEntryFont;
+ BOOL bSettingFont;
+
+ protected:
+
+ virtual void InitEntry(SvLBoxEntry*, const XubString&,const Image&,const Image&);
+
+ public:
+
+ SvxFontListBox(Window* pParent,const ResId& aResID);
+ ~SvxFontListBox();
+
+ void InsertFontEntry( const String& rString, Font aActorFont);
+
+ void SelectEntryPos( USHORT nPos, BOOL bSelect=TRUE);
+ ULONG GetSelectEntryPos();
+ XubString GetSelectEntry();
+ void SetNoSelection();
+
+};
+
+
+#endif
diff --git a/svx/inc/fwdtitem.hxx b/svx/inc/fwdtitem.hxx
new file mode 100644
index 000000000000..0602807bd40e
--- /dev/null
+++ b/svx/inc/fwdtitem.hxx
@@ -0,0 +1,147 @@
+/*************************************************************************
+ *
+ * $RCSfile: fwdtitem.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:00:56 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SVX_FWDTITEM_HXX
+#define _SVX_FWDTITEM_HXX
+
+// include ---------------------------------------------------------------
+
+
+#ifndef _SFXPOOLITEM_HXX //autogen
+#include <svtools/poolitem.hxx>
+#endif
+#ifndef ITEMID_FONTWIDTH
+#define ITEMID_FONTWIDTH 0
+#endif
+
+
+// class SvxFontWidthItem -----------------------------------------------
+
+
+/* [Beschreibung]
+
+ Dieses Item beschreibt die Font-Breite.
+*/
+
+class SvxFontWidthItem : public SfxPoolItem
+{
+ UINT16 nWidth; // 0 = default
+ USHORT nProp; // default 100%
+public:
+ TYPEINFO();
+
+ SvxFontWidthItem( const USHORT nSz = 0,
+ const USHORT nPropWidth = 100,
+ const USHORT nId = ITEMID_FONTWIDTH );
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText, const International * = 0 ) const;
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxPoolItem* Create(SvStream &, USHORT) const;
+ virtual SvStream& Store(SvStream &, USHORT nItemVersion) const;
+ virtual int ScaleMetrics( long nMult, long nDiv );
+ virtual int HasMetrics() const;
+
+ inline SvxFontWidthItem& operator=(const SvxFontWidthItem& rItem )
+ {
+ SetWidthValue( rItem.GetWidth() );
+ SetProp( rItem.GetProp() );
+ return *this;
+ }
+
+ void SetWidth( UINT16 nNewWidth, const USHORT nNewProp = 100 )
+ {
+ DBG_ASSERT( GetRef() == 0, "SetValue() with pooled item" );
+ nWidth = UINT16(( (UINT32)nNewWidth * nNewProp ) / 100 );
+ nProp = nNewProp;
+ }
+
+ UINT16 GetWidth() const { return nWidth; }
+
+ void SetWidthValue( UINT16 nNewWidth )
+ {
+ DBG_ASSERT( GetRef() == 0, "SetValue() with pooled item" );
+ nWidth = nNewWidth;
+ }
+
+ void SetProp( const USHORT nNewProp )
+ {
+ DBG_ASSERT( GetRef() == 0, "SetValue() with pooled item" );
+ nProp = nNewProp;
+ }
+
+ USHORT GetProp() const { return nProp; }
+};
+
+
+
+
+
+#endif
+
+
diff --git a/svx/inc/galbrws.hxx b/svx/inc/galbrws.hxx
new file mode 100644
index 000000000000..e763b52585e8
--- /dev/null
+++ b/svx/inc/galbrws.hxx
@@ -0,0 +1,144 @@
+/*************************************************************************
+ *
+ * $RCSfile: galbrws.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:00:56 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _SVX_GALBRWS_HXX_
+#define _SVX_GALBRWS_HXX_
+
+#ifndef _SFXCTRLITEM_HXX
+#include <sfx2/ctrlitem.hxx>
+#endif
+#ifndef _SFXDOCKWIN_HXX
+#include <sfx2/dockwin.hxx>
+#endif
+
+// -----------
+// - Defines -
+// -----------
+
+#define GALLERYBROWSER() ((GalleryBrowser*)( SfxViewFrame::Current()->GetChildWindow(GalleryChildWindow::GetChildWindowId())->GetWindow()))
+
+// -------------------------
+// - SvxGalleryChildWindow -
+// -------------------------
+
+class GalleryChildWindow : public SfxChildWindow
+{
+public:
+ GalleryChildWindow( Window*, USHORT, SfxBindings*, SfxChildWinInfo* );
+ ~GalleryChildWindow();
+
+ SFX_DECL_CHILDWINDOW( GalleryChildWindow );
+};
+
+// ------------------
+// - FormModel -
+// ------------------
+
+class FmFormModel;
+
+// ------------------
+// - GalleryBrowser -
+// ------------------
+
+class GalleryBrowser1;
+class GalleryBrowser2;
+class Splitter;
+class Gallery;
+
+class GalleryBrowser : public SfxDockingWindow
+{
+ friend class GalleryBrowser1;
+ friend class GalleryBrowser2;
+
+private:
+
+ Size maLastSize;
+ Splitter* mpSplitter;
+ GalleryBrowser1* mpBrowser1;
+ GalleryBrowser2* mpBrowser2;
+ Gallery* mpGallery;
+ long mnDummy1;
+ long mnDummy2;
+ long mnDummy3;
+
+ virtual BOOL Close();
+ virtual void Resize();
+
+ DECL_LINK( SplitHdl, void* );
+
+protected:
+
+ void ThemeSelectionHasChanged();
+
+public:
+
+ GalleryBrowser( SfxBindings* pBindings, SfxChildWindow* pCW,
+ Window* pParent, const ResId& rResId );
+ ~GalleryBrowser();
+
+ INetURLObject GetURL() const;
+ String GetFilterName() const;
+ Graphic GetGraphic() const;
+ BOOL GetVCDrawModel( FmFormModel& rModel ) const;
+ BOOL IsLinkage() const;
+};
+
+#endif // _SVX_GALBRWS_HXX_
diff --git a/svx/inc/gallery.hxx b/svx/inc/gallery.hxx
new file mode 100644
index 000000000000..11569d949c9b
--- /dev/null
+++ b/svx/inc/gallery.hxx
@@ -0,0 +1,190 @@
+/*************************************************************************
+ *
+ * $RCSfile: gallery.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:00:56 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _GALLERY_HXX_
+#define _GALLERY_HXX_
+
+#ifndef _SOLAR_H
+#include <tools/solar.h>
+#endif
+#ifndef _STRING_HXX
+#include <tools/string.hxx>
+#endif
+#ifndef _URLOBJ_HXX
+#include <tools/urlobj.hxx>
+#endif
+
+// -----------
+// - Defines -
+// -----------
+
+#define SGA_FORMAT_NONE 0x00000000L
+#define SGA_FORMAT_STRING 0x00000001L
+#define SGA_FORMAT_GRAPHIC 0x00000010L
+#define SGA_FORMAT_SOUND 0x00000100L
+#define SGA_FORMAT_OLE 0x00001000L
+#define SGA_FORMAT_SVDRAW 0x00010000L
+#define SGA_FORMAT_ALL 0xFFFFFFFFL
+
+#define SVX_GALLERY() (GalleryExplorer::GetGallery())
+
+// Defines for preinstalled themes
+#define GALLERY_THEME_3D 1
+#define GALLERY_THEME_ANIMATIONS 2
+#define GALLERY_THEME_BULLETS 3
+#define GALLERY_THEME_CLIPARTS 4
+#define GALLERY_THEME_FLAGS 5
+#define GALLERY_THEME_FLOWCHARTS 6
+#define GALLERY_THEME_FORMS 7
+#define GALLERY_THEME_PHOTOS 8
+#define GALLERY_THEME_BACKGROUNDS 9
+#define GALLERY_THEME_HOMEPAGE 10
+#define GALLERY_THEME_INTERACTION 11
+#define GALLERY_THEME_MAPS 12
+#define GALLERY_THEME_FURNITURE 13
+#define GALLERY_THEME_SURFACES 14
+#define GALLERY_THEME_HTMLBUTTONS 15
+#define GALLERY_THEME_POWERPOINT 16
+#define GALLERY_THEME_RULERS 17
+#define GALLERY_THEME_SOUNDS 18
+#define GALLERY_THEME_SYMBOLS 19
+
+#define GALLERY_THEME_DUMMY1 20
+#define GALLERY_THEME_DUMMY2 21
+#define GALLERY_THEME_DUMMY3 22
+#define GALLERY_THEME_DUMMY4 23
+#define GALLERY_THEME_DUMMY5 24
+
+// -------------------
+// - GalleryExplorer -
+// -------------------
+
+class List;
+class Gallery;
+class VCDrawModel;
+class FmFormModel;
+class Graphic;
+class FmFormModel;
+class Bitmap;
+
+class GalleryExplorer
+{
+private:
+
+ static Gallery* ImplGetGallery();
+
+public:
+
+ static GalleryExplorer* GetGallery();
+
+public:
+
+ INetURLObject GetURL() const;
+ String GetFilterName() const;
+ Graphic GetGraphic() const;
+ BOOL GetVCDrawModel( FmFormModel& rModel ) const;
+ BOOL IsLinkage() const;
+
+ static BOOL FillThemeList( List& rThemeList );
+
+ static BOOL FillObjList( const String& rThemeName, List& rObjList );
+ static BOOL FillObjList( ULONG nThemeId, List& rObjList );
+
+ static BOOL InsertURL( const String& rThemeName, const String& rURL );
+ static BOOL InsertURL( ULONG nThemeId, const String& rURL );
+
+ static BOOL InsertURL( const String& rThemeName, const String& rURL,
+ const ULONG nSgaFormat /* = SGA_FORMAT_ALL */ );
+ static BOOL InsertURL( ULONG nThemeId, const String& rURL,
+ const ULONG nSgaFormat /* = SGA_FORMAT_ALL */ );
+
+ static ULONG GetObjCount( const String& rThemeName );
+ static ULONG GetObjCount( ULONG nThemeId );
+
+ static BOOL GetGraphicObj( const String& rThemeName, ULONG nPos,
+ Graphic* pGraphic = NULL, Bitmap* pThumb = NULL,
+ BOOL bProgess = FALSE );
+ static BOOL GetGraphicObj( ULONG nThemeId, ULONG nPos,
+ Graphic* pGraphic = NULL, Bitmap* pThumb = NULL,
+ BOOL bProgess = FALSE );
+
+ static BOOL InsertGraphicObj( const String& rThemeName, const Graphic& rGraphic );
+ static BOOL InsertGraphicObj( ULONG nThemeId, const Graphic& rGraphic );
+
+ static ULONG GetSdrObjCount( const String& rThemeName );
+ static ULONG GetSdrObjCount( ULONG nThemeId );
+
+ static BOOL GetSdrObj( const String& rThemeName, ULONG nSdrModelPos,
+ FmFormModel* pModel = NULL, Bitmap* pThumb = NULL );
+ static BOOL GetSdrObj( ULONG nThemeId, ULONG nSdrModelPos,
+ FmFormModel* pModel = NULL, Bitmap* pThumb = NULL );
+
+ static BOOL InsertSdrObj( const String& rThemeName, FmFormModel& rModel );
+ static BOOL InsertSdrObj( ULONG nThemeId, FmFormModel& rModel );
+
+ static BOOL BeginLocking( const String& rThemeName );
+ static BOOL BeginLocking( ULONG nThemeId );
+
+ static BOOL EndLocking( const String& rThemeName );
+ static BOOL EndLocking( ULONG nThemeId );
+};
+
+#endif // _GALLERY_HXX_
diff --git a/svx/inc/globl3d.hxx b/svx/inc/globl3d.hxx
new file mode 100644
index 000000000000..c889785ac51d
--- /dev/null
+++ b/svx/inc/globl3d.hxx
@@ -0,0 +1,97 @@
+/*************************************************************************
+ *
+ * $RCSfile: globl3d.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:00:56 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _E3D_GLOBL3D_HXX
+#define _E3D_GLOBL3D_HXX
+
+#include <tools/solar.h>
+
+//#define ESODEBUG
+#define E3D_STREAMING
+
+const double PrecisionLimit = 1.0e-14;
+
+const UINT32 E3dInventor = UINT32('E')*0x00000001+
+ UINT32('3')*0x00000100+
+ UINT32('D')*0x00010000+
+ UINT32('1')*0x01000000;
+
+const UINT16 E3D_DISPLAYOBJ_ID = 1;
+const UINT16 E3D_SCENE_ID = 2;
+const UINT16 E3D_POLYSCENE_ID = 3;
+const UINT16 E3D_LIGHT_ID = 5;
+const UINT16 E3D_DISTLIGHT_ID = 6;
+const UINT16 E3D_POINTLIGHT_ID = 7;
+const UINT16 E3D_SPOTLIGHT_ID = 8;
+const UINT16 E3D_OBJECT_ID = 10;
+const UINT16 E3D_POLYOBJ_ID = 11;
+const UINT16 E3D_CUBEOBJ_ID = 12;
+const UINT16 E3D_SPHEREOBJ_ID = 13;
+const UINT16 E3D_POINTOBJ_ID = 14;
+const UINT16 E3D_EXTRUDEOBJ_ID = 15;
+const UINT16 E3D_LATHEOBJ_ID = 16;
+const UINT16 E3D_LABELOBJ_ID = 20;
+const UINT16 E3D_COMPOUNDOBJ_ID = 21;
+const UINT16 E3D_POLYGONOBJ_ID = 22;
+
+
+
+#endif // _E3D_GLOBL3D_HXX
diff --git a/svx/inc/globlac.hrc b/svx/inc/globlac.hrc
new file mode 100644
index 000000000000..cefc86ea4d0c
--- /dev/null
+++ b/svx/inc/globlac.hrc
@@ -0,0 +1,245 @@
+/*************************************************************************
+ *
+ * $RCSfile: globlac.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:00:56 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _GLOBALACC_SRC
+#define _GLOBALACC_SRC
+
+#define ACC_CODE( Id, c, bSh, bM1, bM2 ) \
+ AcceleratorItem { Identifier = Id; \
+ Key = KeyCode { Code = c ; \
+ Shift = bSh ; Modifier1 = bM1 ; Modifier2 = bM2 ; }; };
+
+#define ACC_FUNC( Id, f ) \
+ AcceleratorItem { Identifier = Id; \
+ Key = KeyCode { Function = f ; }; };
+
+#define ACC_KEY( language, c, bSh, bM1, bM2 ) \
+ Key[ language ] = KeyCode { Code = c ; \
+ Shift = bSh ; Modifier1 = bM1 ; Modifier2 = bM2 ; };
+
+#define ACC_DEF_KEY( c, bSh, bM1, bM2 ) \
+ Key = KeyCode { Code = c ; \
+ Shift = bSh ; Modifier1 = bM1 ; Modifier2 = bM2 ; };
+
+
+#define AI_HELPINDEX ACC_CODE( SID_HELPINDEX, KEY_F1, FALSE, TRUE, FALSE )
+
+#define AI_ATTR_CHAR ACC_CODE( SID_ATTR_CHAR, KEY_F2, FALSE, FALSE, FALSE )
+#define AI_PRESENTATION ACC_CODE( SID_PRESENTATION, KEY_F2, FALSE, TRUE, FALSE )
+#define AI_ENTER_GROUP ACC_CODE( SID_ENTER_GROUP, KEY_F3, FALSE, FALSE, FALSE )
+#define AI_COPYOBJECTS ACC_CODE( SID_COPYOBJECTS, KEY_F3, TRUE, FALSE, FALSE )
+#define AI_LEAVE_GROUP ACC_CODE( SID_LEAVE_GROUP, KEY_F3, FALSE, TRUE, FALSE )
+#define AI_ATTR_TRANSFORM ACC_CODE( SID_ATTR_TRANSFORM, KEY_F4, FALSE, FALSE, FALSE )
+#define AI_NAVIGATOR ACC_CODE( SID_NAVIGATOR, KEY_F5, FALSE, FALSE, FALSE )
+#define AI_SPELLING ACC_CODE( SID_SPELLING, KEY_F7, FALSE, FALSE, FALSE )
+#define AI_THESAURUS ACC_CODE( SID_THESAURUS, KEY_F7, FALSE, TRUE, FALSE )
+#define AI_BEZIER_EDIT ACC_CODE( SID_BEZIER_EDIT, KEY_F8, FALSE, FALSE, FALSE )
+#define AI_ATTR_TEXT_FITTOSIZE ACC_CODE( SID_ATTR_TEXT_FITTOSIZE, KEY_F8, TRUE, TRUE, FALSE )
+#define AI_STYLE_DESIGNER ACC_CODE( SID_STYLE_DESIGNER, KEY_F11, FALSE, FALSE, FALSE )
+#define AI_OUTLINEMODE ACC_CODE( SID_OUTLINEMODE, KEY_F12, FALSE, FALSE, FALSE )
+#define AI_DRAWINGMODE ACC_CODE( SID_DRAWINGMODE, KEY_F12, FALSE, TRUE, FALSE )
+
+#define AI_ATTR_PARA_LINESPACE_10 ACC_CODE( SID_ATTR_PARA_LINESPACE_10, KEY_1, FALSE, TRUE, FALSE )
+#define AI_ATTR_PARA_LINESPACE_20 ACC_CODE( SID_ATTR_PARA_LINESPACE_20, KEY_2, FALSE, TRUE, FALSE )
+#define AI_ATTR_PARA_LINESPACE_15 ACC_CODE( SID_ATTR_PARA_LINESPACE_15, KEY_5, FALSE, TRUE, FALSE )
+#define AI_SHOW_ITEMBROWSER ACC_CODE( SID_SHOW_ITEMBROWSER, KEY_9, TRUE, TRUE, TRUE )
+
+#define AI_ATTR_PARA_ADJUST_BLOCK AcceleratorItem { Identifier = SID_ATTR_PARA_ADJUST_BLOCK;\
+ ACC_DEF_KEY( KEY_B, FALSE, TRUE, FALSE ) \
+ ACC_KEY( English_us, KEY_J, FALSE, TRUE, FALSE ) \
+ ACC_KEY( Italian, KEY_F, FALSE, TRUE, FALSE ) \
+ ACC_KEY( Spanish, KEY_J, FALSE, TRUE, FALSE ) \
+ ACC_KEY( French, KEY_J, FALSE, TRUE, FALSE ) \
+ ACC_KEY( Dutch, KEY_J, FALSE, TRUE, FALSE ) \
+ ACC_KEY( polish, KEY_J, FALSE, TRUE, FALSE ) \
+ ACC_KEY( russian, KEY_J, FALSE, TRUE, FALSE ) };
+
+#define AI_ATTR_PARA_ADJUST_CENTER AcceleratorItem { Identifier = SID_ATTR_PARA_ADJUST_CENTER;\
+ ACC_DEF_KEY( KEY_E, FALSE, TRUE, FALSE ) \
+ ACC_KEY( English_us, KEY_E, FALSE, TRUE, FALSE ) \
+ ACC_KEY( Italian, KEY_E, FALSE, TRUE, FALSE ) \
+ ACC_KEY( Spanish, KEY_E, FALSE, TRUE, FALSE ) \
+ ACC_KEY( French, KEY_C, TRUE, TRUE, FALSE ) \
+ ACC_KEY( Dutch, KEY_J, FALSE, TRUE, FALSE ) };
+
+#define AI_ATTR_CHAR_WEIGHT AcceleratorItem { Identifier = SID_ATTR_CHAR_WEIGHT;\
+ ACC_DEF_KEY( KEY_F, FALSE, TRUE, FALSE ) \
+ ACC_KEY( English_us, KEY_B, FALSE, TRUE, FALSE ) \
+ ACC_KEY( Italian, KEY_G, FALSE, TRUE, FALSE ) \
+ ACC_KEY( Spanish, KEY_N, FALSE, TRUE, FALSE ) \
+ ACC_KEY( French, KEY_G, FALSE, TRUE, FALSE ) \
+ ACC_KEY( Dutch, KEY_B, FALSE, TRUE, FALSE ) \
+ ACC_KEY( danish, KEY_F, FALSE, TRUE, FALSE ) \
+ ACC_KEY( polish, KEY_B, FALSE, TRUE, FALSE ) \
+ ACC_KEY( russian, KEY_B, FALSE, TRUE, FALSE ) };
+
+#define AI_SEARCH_DLG AcceleratorItem { Identifier = SID_SEARCH_DLG;\
+ ACC_DEF_KEY( KEY_G, FALSE, TRUE, FALSE ) \
+ ACC_KEY( English_us, KEY_F, FALSE, TRUE, FALSE ) \
+ ACC_KEY( Italian, KEY_B, FALSE, TRUE, FALSE ) \
+ ACC_KEY( Spanish, KEY_G, FALSE, TRUE, FALSE ) \
+ ACC_KEY( French, KEY_F, FALSE, TRUE, FALSE ) \
+ ACC_KEY( Dutch, KEY_F, FALSE, TRUE, FALSE ) };
+
+#define AI_GROUP ACC_CODE( SID_GROUP, KEY_G, TRUE, TRUE, FALSE )
+#define AI_UNGROUP ACC_CODE( SID_UNGROUP, KEY_G, TRUE, TRUE, TRUE )
+
+// Weitersuchen ...
+#define AI_SET_SUPER_SCRIPT AcceleratorItem { Identifier = SID_SET_SUPER_SCRIPT;\
+ ACC_DEF_KEY( KEY_H, FALSE, TRUE, FALSE ) \
+ ACC_KEY( English_us, KEY_P, TRUE, TRUE, FALSE ) \
+ ACC_KEY( Italian, KEY_H, FALSE, TRUE, FALSE ) \
+ ACC_KEY( Spanish, KEY_H, FALSE, TRUE, FALSE ) \
+ ACC_KEY( French, KEY_H, FALSE, TRUE, FALSE ) \
+ ACC_KEY( Dutch, KEY_H, FALSE, TRUE, FALSE ) };
+
+#define AI_ATTR_CHAR_POSTURE AcceleratorItem { Identifier = SID_ATTR_CHAR_POSTURE;\
+ ACC_DEF_KEY( KEY_K, FALSE, TRUE, FALSE ) \
+ ACC_KEY( English_us, KEY_I, FALSE, TRUE, FALSE ) \
+ ACC_KEY( Italian, KEY_I, FALSE, TRUE, FALSE ) \
+ ACC_KEY( Spanish, KEY_K, FALSE, TRUE, FALSE ) \
+ ACC_KEY( French, KEY_I, FALSE, TRUE, FALSE ) \
+ ACC_KEY( Dutch, KEY_I, FALSE, TRUE, FALSE ) \
+ ACC_KEY( danish, KEY_K, FALSE, TRUE, FALSE ) \
+ ACC_KEY( polish, KEY_I, FALSE, TRUE, FALSE ) \
+ ACC_KEY( russian, KEY_I, FALSE, TRUE, FALSE ) };
+
+#define AI_COMBINE ACC_CODE( SID_COMBINE, KEY_K, TRUE, TRUE, FALSE )
+#define AI_DISMANTLE ACC_CODE( SID_DISMANTLE, KEY_K, TRUE, TRUE, TRUE )
+#define AI_ATTR_PARA_ADJUST_LEFT AcceleratorItem { Identifier = SID_ATTR_PARA_ADJUST_LEFT;\
+ ACC_DEF_KEY( KEY_L, FALSE, TRUE, FALSE ) \
+ ACC_KEY( English_us, KEY_L, FALSE, TRUE, FALSE ) \
+ ACC_KEY( Italian, KEY_T, FALSE, TRUE, FALSE ) \
+ ACC_KEY( Spanish, KEY_I, FALSE, TRUE, FALSE ) \
+ ACC_KEY( French, KEY_G, TRUE, TRUE, FALSE ) \
+ ACC_KEY( Dutch, KEY_L, FALSE, TRUE, FALSE ) };
+
+#define AI_ATTR_PARA_ADJUST_RIGHT AcceleratorItem { Identifier = SID_ATTR_PARA_ADJUST_RIGHT;\
+ ACC_DEF_KEY( KEY_R, FALSE, TRUE, FALSE ) \
+ ACC_KEY( English_us, KEY_R, FALSE, TRUE, FALSE ) \
+ ACC_KEY( Italian, KEY_R, FALSE, TRUE, FALSE ) \
+ ACC_KEY( Spanish, KEY_D, FALSE, TRUE, FALSE ) \
+ ACC_KEY( French, KEY_D, TRUE, TRUE, FALSE ) \
+ ACC_KEY( Dutch, KEY_R, FALSE, TRUE, FALSE ) };
+
+#define AI_SET_SUB_SCRIPT AcceleratorItem { Identifier = SID_SET_SUB_SCRIPT;\
+ ACC_DEF_KEY( KEY_T, FALSE, TRUE, FALSE ) \
+ ACC_KEY( English_us, KEY_B, TRUE, TRUE, FALSE ) \
+ ACC_KEY( Italian, KEY_B, TRUE, TRUE, FALSE ) \
+ ACC_KEY( Spanish, KEY_T, FALSE, TRUE, FALSE ) \
+ ACC_KEY( French, KEY_T, FALSE, TRUE, FALSE ) \
+ ACC_KEY( Dutch, KEY_P, TRUE, TRUE, FALSE ) };
+
+#define AI_ATTR_CHAR_UNDERLINE AcceleratorItem { Identifier = SID_ATTR_CHAR_UNDERLINE;\
+ ACC_DEF_KEY( KEY_U, FALSE, TRUE, FALSE ) \
+ ACC_KEY( English_us, KEY_U, FALSE, TRUE, FALSE ) \
+ ACC_KEY( Italian, KEY_U, FALSE, TRUE, FALSE ) \
+ ACC_KEY( Spanish, KEY_U, FALSE, TRUE, FALSE ) \
+ ACC_KEY( French, KEY_U, FALSE, TRUE, FALSE ) \
+ ACC_KEY( Dutch, KEY_U, FALSE, TRUE, FALSE ) \
+ ACC_KEY( danish, KEY_U, FALSE, TRUE, FALSE ) \
+ ACC_KEY( polish, KEY_U, FALSE, TRUE, FALSE ) \
+ ACC_KEY( russian, KEY_U, FALSE, TRUE, FALSE ) };
+
+#define AI_STYLE_CATALOG ACC_CODE( SID_STYLE_CATALOG, KEY_Y, FALSE, TRUE, FALSE )
+#define AI_WIN_FULLSCREEN ACC_CODE( SID_WIN_FULLSCREEN, KEY_J, TRUE, TRUE, FALSE )
+#define AI_DESKTOPMODE ACC_CODE( SID_DESKTOPMODE, KEY_I, TRUE, TRUE, FALSE )
+#define AI_FOCUSURLBOX ACC_CODE( SID_FOCUSURLBOX, KEY_O, TRUE, TRUE, FALSE )
+#define AI_SELECTALL ACC_CODE( SID_SELECTALL, KEY_A, FALSE, TRUE, FALSE )
+
+// Anordnung
+#define AI_FRAME_TO_TOP ACC_CODE( SID_FRAME_TO_TOP, KEY_ADD, TRUE, TRUE, FALSE )
+#define AI_MOREFRONT ACC_CODE( SID_MOREFRONT, KEY_ADD, FALSE, TRUE, FALSE )
+#define AI_FRAME_TO_BOTTOM ACC_CODE( SID_FRAME_TO_BOTTOM, KEY_SUBTRACT, TRUE, TRUE, FALSE )
+#define AI_MOREBACK ACC_CODE( SID_MOREBACK, KEY_SUBTRACT, FALSE, TRUE, FALSE )
+
+// Explorer / Beamer
+#define AI_FOCUS_EXPLORER ACC_CODE( SID_FOCUS_EXPLORER, KEY_E, TRUE, TRUE, FALSE )
+#define AI_FOCUS_BEAMER ACC_CODE( SID_FOCUS_BEAMER, KEY_B, TRUE, TRUE, FALSE )
+
+// sonstige Acceleratoren
+#define AI_NEWDOC ACC_FUNC( SID_NEWDOC, KEYFUNC_NEW )
+#define AI_OPENDOC ACC_FUNC( SID_OPENDOC, KEYFUNC_OPEN )
+
+// Mac
+#define AI_CLOSEWIN ACC_FUNC( SID_CLOSEWIN, KEYFUNC_CLOSE )
+
+#define AI_SAVEDOC ACC_FUNC( SID_SAVEDOC, KEYFUNC_SAVE )
+#define AI_SAVEASDOC ACC_FUNC( SID_SAVEASDOC, KEYFUNC_SAVEAS )
+#define AI_PRINTDOC ACC_FUNC( SID_PRINTDOC, KEYFUNC_PRINT )
+#define AI_QUITAPP ACC_FUNC( SID_QUITAPP, KEYFUNC_QUIT )
+#define AI_CUT ACC_FUNC( SID_CUT, KEYFUNC_CUT )
+#define AI_COPY ACC_FUNC( SID_COPY, KEYFUNC_COPY )
+#define AI_PASTE ACC_FUNC( SID_PASTE, KEYFUNC_PASTE )
+#define AI_UNDO ACC_FUNC( SID_UNDO, KEYFUNC_UNDO )
+#define AI_REDO ACC_FUNC( SID_REDO, KEYFUNC_REDO )
+#define AI_REPEAT ACC_FUNC( SID_REPEAT, KEYFUNC_REPEAT )
+#define AI_DELETE ACC_FUNC( SID_DELETE, KEYFUNC_DELETE )
+
+// Non Product
+#define AI_PIXELMODE ACC_CODE( SID_PIXELMODE, KEY_P, TRUE, TRUE, TRUE )
+#define AI_ANIMATIONMODE ACC_CODE( SID_ANIMATIONMODE, KEY_A, TRUE, TRUE, TRUE )
+
+#endif // _GLOBLACC_SRC
+
+
+
+
diff --git a/svx/inc/grafctrl.hxx b/svx/inc/grafctrl.hxx
new file mode 100644
index 000000000000..70e97bb929e1
--- /dev/null
+++ b/svx/inc/grafctrl.hxx
@@ -0,0 +1,185 @@
+/*************************************************************************
+ *
+ * $RCSfile: grafctrl.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:00:56 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _SVX_GRAFCTRL_HXX
+#define _SVX_GRAFCTRL_HXX
+
+#ifndef _SFXLSTNER_HXX //autogen
+#include <svtools/lstner.hxx>
+#endif
+#ifndef _SFXTBXCTRL_HXX //autogen
+#include <sfx2/tbxctrl.hxx>
+#endif
+
+// -------------------------
+// - SvxGrafToolBoxControl -
+// -------------------------
+
+class SvxGrafToolBoxControl : public SfxToolBoxControl, public SfxListener
+{
+public:
+
+ SFX_DECL_TOOLBOX_CONTROL();
+ SvxGrafToolBoxControl( USHORT nId, ToolBox& rTbx, SfxBindings& rBind );
+ ~SvxGrafToolBoxControl();
+
+ virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState );
+ virtual Window* CreateItemWindow( Window *pParent );
+ virtual void SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
+ const SfxHint& rHint, const TypeId& rHintType );
+};
+
+// ----------------------------
+// - SvxGrafRedToolBoxControl -
+// ----------------------------
+
+class SvxGrafRedToolBoxControl : public SvxGrafToolBoxControl
+{
+public:
+ SFX_DECL_TOOLBOX_CONTROL();
+ SvxGrafRedToolBoxControl( USHORT nId, ToolBox& rTbx, SfxBindings& rBind );
+};
+
+// ------------------------------
+// - SvxGrafGreenToolBoxControl -
+// ------------------------------
+
+class SvxGrafGreenToolBoxControl : public SvxGrafToolBoxControl
+{
+public:
+ SFX_DECL_TOOLBOX_CONTROL();
+ SvxGrafGreenToolBoxControl( USHORT nId, ToolBox& rTbx, SfxBindings& rBind );
+};
+
+// -----------------------------
+// - SvxGrafBlueToolBoxControl -
+// -----------------------------
+
+class SvxGrafBlueToolBoxControl : public SvxGrafToolBoxControl
+{
+public:
+ SFX_DECL_TOOLBOX_CONTROL();
+ SvxGrafBlueToolBoxControl( USHORT nId, ToolBox& rTbx, SfxBindings& rBind );
+};
+
+// ----------------------------------
+// - SvxGrafLuminanceToolBoxControl -
+// ----------------------------------
+
+class SvxGrafLuminanceToolBoxControl : public SvxGrafToolBoxControl
+{
+public:
+ SFX_DECL_TOOLBOX_CONTROL();
+ SvxGrafLuminanceToolBoxControl( USHORT nId, ToolBox& rTbx, SfxBindings& rBind );
+};
+
+// ---------------------------------
+// - SvxGrafContrastToolBoxControl -
+// ---------------------------------
+
+class SvxGrafContrastToolBoxControl : public SvxGrafToolBoxControl
+{
+public:
+ SFX_DECL_TOOLBOX_CONTROL();
+ SvxGrafContrastToolBoxControl( USHORT nId, ToolBox& rTbx, SfxBindings& rBind );
+};
+
+// ------------------------------
+// - SvxGrafGammaToolBoxControl -
+// ------------------------------
+
+class SvxGrafGammaToolBoxControl : public SvxGrafToolBoxControl
+{
+public:
+ SFX_DECL_TOOLBOX_CONTROL();
+ SvxGrafGammaToolBoxControl( USHORT nId, ToolBox& rTbx, SfxBindings& rBind );
+};
+
+// -------------------------------------
+// - SvxGrafTransparenceToolBoxControl -
+// -------------------------------------
+
+class SvxGrafTransparenceToolBoxControl : public SvxGrafToolBoxControl
+{
+public:
+ SFX_DECL_TOOLBOX_CONTROL();
+ SvxGrafTransparenceToolBoxControl( USHORT nId, ToolBox& rTbx, SfxBindings& rBind );
+};
+
+// -----------------------------
+// - SvxGrafModeToolBoxControl -
+// -----------------------------
+
+class SvxGrafModeToolBoxControl : public SfxToolBoxControl, public SfxListener
+{
+public:
+ SFX_DECL_TOOLBOX_CONTROL();
+ SvxGrafModeToolBoxControl( USHORT nId, ToolBox& rTbx, SfxBindings& rBind );
+ ~SvxGrafModeToolBoxControl();
+
+ virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState );
+ virtual Window* CreateItemWindow( Window *pParent );
+ virtual void SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
+ const SfxHint& rHint, const TypeId& rHintType );
+};
+
+
+#endif // _SVX_GRAFCTRL_HXX
diff --git a/svx/inc/helpid.hrc b/svx/inc/helpid.hrc
new file mode 100644
index 000000000000..48ce8540bd00
--- /dev/null
+++ b/svx/inc/helpid.hrc
@@ -0,0 +1,461 @@
+/*************************************************************************
+ *
+ * $RCSfile: helpid.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:00:56 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SVX_HELPID_HRC
+#define _SVX_HELPID_HRC
+
+// include ---------------------------------------------------------------
+
+#include <svtools/solar.hrc>
+
+// Help-Ids --------------------------------------------------------------
+
+#define HID_GALLERY_BROWSER (HID_SVX_START + 0)
+#define HID_GALLERY_THEME (HID_SVX_START + 1)
+#define HID_GALLERY_NEW_THEME (HID_SVX_START + 2)
+#define HID_GALLERY_RENAME_THEME (HID_SVX_START + 3)
+#define HID_GALLERY_SEARCH (HID_SVX_START + 4)
+#define HID_GALLERY_APPLY (HID_SVX_START + 5)
+#define HID_GALLERY_ACTUALIZE (HID_SVX_START + 6)
+#define HID_GALLERY_WINDOW (HID_SVX_START + 7)
+#define HID_GALLERY_RENAME (HID_SVX_START + 8)
+#define HID_GALLERY_PROPERTIES (HID_SVX_START + 9)
+
+#define HID_TRANS_POSITION (HID_SVX_START + 10)
+#define HID_TRANS_SIZE (HID_SVX_START + 11)
+#define HID_TRANS_ANGLE (HID_SVX_START + 12)
+#define HID_TRANS_SLANT (HID_SVX_START + 13)
+
+#define HID_TABULATOR (HID_SVX_START + 14)
+#define HID_BORDER (HID_SVX_START + 15)
+#define HID_BACKGROUND (HID_SVX_START + 16)
+#define HID_ALIGNMENT (HID_SVX_START + 17)
+#define HID_NUMBERFORMAT (HID_SVX_START + 18)
+#define HID_CAPTION (HID_SVX_START + 19)
+
+#define HID_FORMAT_PAGE (HID_SVX_START + 20)
+#define HID_FORMAT_HEADER (HID_SVX_START + 21)
+#define HID_FORMAT_FOOTER (HID_SVX_START + 22)
+#define HID_FORMAT_CHAR_STD (HID_SVX_START + 23)
+#define HID_FORMAT_CHAR_EXT (HID_SVX_START + 24)
+#define HID_FORMAT_PARAGRAPH_STD (HID_SVX_START + 25)
+#define HID_FORMAT_PARAGRAPH_EXT (HID_SVX_START + 26)
+#define HID_FORMAT_PARAGRAPH_ALIGN (HID_SVX_START + 27)
+
+#define HID_AREA_AREA (HID_SVX_START + 30)
+#define HID_AREA_HATCH (HID_SVX_START + 31)
+#define HID_AREA_BITMAP (HID_SVX_START + 32)
+#define HID_AREA_GRADIENT (HID_SVX_START + 33)
+#define HID_LINE_LINE (HID_SVX_START + 34)
+#define HID_LINE_DEF (HID_SVX_START + 35)
+#define HID_LINE_ENDDEF (HID_SVX_START + 36)
+#define HID_AREA_SHADOW (HID_SVX_START + 37)
+#define HID_AREA_TRANSPARENCE (HID_SVX_START + 38)
+
+#define HID_OPTIONS_COLOR (HID_SVX_START + 40)
+#define HID_OPTIONS_SAVE (HID_SVX_START + 41)
+#define HID_OPTIONS_PATH (HID_SVX_START + 42)
+#define HID_OPTIONS_GENERAL (HID_SVX_START + 43)
+#define HID_OPTIONS_LINGU (HID_SVX_START + 44)
+#define HID_OPTIONS_SPELL (HID_SVX_START + 45)
+#define HID_OPTIONS_DICT_NEW (HID_SVX_START + 46)
+#define HID_OPTIONS_DICT_EDIT (HID_SVX_START + 47)
+#define HID_OPTIONS_GRID (HID_SVX_START + 48)
+#define HID_OPTIONS_INET (HID_SVX_START + 49)
+
+#define HID_DLG_NAME (HID_SVX_START + 50)
+#define HID_DLG_MESSBOX (HID_SVX_START + 51)
+#define HID_SEARCHATTR (HID_SVX_START + 52)
+#define HID_HYPHENATE (HID_SVX_START + 53)
+#define HID_SPELLCHECK (HID_SVX_START + 54)
+#define HID_SEARCHSIMILARITY (HID_SVX_START + 55)
+#define HID_PASSWORD (HID_SVX_START + 56)
+#define HID_MULTIPATH (HID_SVX_START + 57)
+
+//#define HID_BASICIDE_TOOLBOX (HID_SVX_START + 58)
+//#define HID_BASICIDE_OBJECTS (HID_SVX_START + 59)
+//#define HID_MACRO_OPTIONS (HID_SVX_START + 60)
+//#define HID_BASICIDE_BRKPNTS (HID_SVX_START + 61)
+//#define HID_BASICIDE_MODULS (HID_SVX_START + 62)
+//#define HID_BASICIDE_LIBS_TP (HID_SVX_START + 63)
+//#define HID_BASICIDE_LIBS_DLG (HID_SVX_START + 64)
+//#define HID_BASICIDE_CONTROLS (HID_SVX_START + 65)
+//#define HID_BASICIDE_MACROS (HID_SVX_START + 66)
+//#define HID_BASICIDE_LIBS (HID_SVX_START + 67)
+//#define HID_BASICIDE_ORG_TC (HID_SVX_START + 68)
+
+#define HID_POPUP_COLOR (HID_SVX_START + 70)
+#define HID_POPUP_BRUSH (HID_SVX_START + 71)
+#define HID_POPUP_FRAME (HID_SVX_START + 72)
+#define HID_POPUP_LINE (HID_SVX_START + 73)
+
+#define HID_OPTIONS_MAIL (HID_SVX_START + 74)
+#define HID_THES_LANGUAGE (HID_SVX_START + 75)
+
+#define HID_OPTIONS_PROXY (HID_SVX_START + 76)
+#define HID_OPTIONS_CACHE (HID_SVX_START + 77)
+#define HID_OPTIONS_TYPE (HID_SVX_START + 78)
+#define HID_OPTIONS_SEARCH (HID_SVX_START + 79)
+
+//#define HID_BASICIDE_MODULES_TREE (HID_SVX_START + 80)
+//#define HID_BASICIDE_LIBS_TREE (HID_SVX_START + 81)
+//#define HID_BASICIDE_LIBSDLG_TREE (HID_SVX_START + 82)
+//#define HID_BASICIDE_OBJECTCAT (HID_SVX_START + 83)
+
+#define HID_PAGE_LIGHT3D (HID_SVX_START + 84)
+#define HID_PAGE_MEASURE (HID_SVX_START + 85)
+#define HID_PAGE_TEXTATTR (HID_SVX_START + 86)
+#define HID_PAGE_3DATTR (HID_SVX_START + 87)
+#define HID_CTRL_COLOR (HID_SVX_START + 88)
+#define HID_PAGE_CONNECTION (HID_SVX_START + 89)
+#define HID_PAGE_CONNECTION_CTL_PREVIEW (HID_SVX_START + 90)
+#define HID_PAGE_DISTRIBUTE (HID_SVX_START + 91)
+
+#define HID_BACKGROUND_CTL_BGDCOLORSET (HID_SVX_START + 100)
+#define HID_BACKGROUND_CTL_PATTERNSET (HID_SVX_START + 101)
+#define HID_BACKGROUND_CTL_PATCOLORSET (HID_SVX_START + 102)
+#define HID_BACKGROUND_CTL_POSITION (HID_SVX_START + 103)
+#define HID_BMPMASK_CTL_QCOL_1 (HID_SVX_START + 104)
+#define HID_BMPMASK_CTL_PIPETTE (HID_SVX_START + 105)
+#define HID_BORDER_CTL_PRESETS (HID_SVX_START + 106)
+#define HID_BORDER_CTL_SHADOWS (HID_SVX_START + 107)
+#define HID_CHARMAP_CTL_SHOWSET (HID_SVX_START + 108)
+#define HID_CHARMAP_CTL_SHOWTEXT (HID_SVX_START + 109)
+#define HID_CHARMAP_CTL_SHOWCHAR (HID_SVX_START + 110)
+#define HID_FONTWORK_CTL_FORMS (HID_SVX_START + 111)
+#define HID_LIGHT3D_CTL_LIGHT (HID_SVX_START + 112)
+#define HID_MEASURE_CTL_POSITION (HID_SVX_START + 113)
+#define HID_MEASURE_CTL_PREVIEW (HID_SVX_START + 114)
+#define HID_SEARCHATTR_CTL_ATTR (HID_SVX_START + 115)
+#define HID_TEXTATTR_CTL_POSITION (HID_SVX_START + 116)
+#define HID_3DATTR_CTL_DISTANCE (HID_SVX_START + 117)
+#define HID_3DATTR_CTL_FOCALLENGTH (HID_SVX_START + 118)
+#define HID_COLOR_CTL_COLORS (HID_SVX_START + 119)
+#define HID_OPTPATH_CTL_PATH (HID_SVX_START + 120)
+#define HID_OPTLINGU_CTL_DICTS (HID_SVX_START + 121)
+#define HID_OPTINET2_CTL_TYPES (HID_SVX_START + 122)
+#define HID_OPTIONS_DICT_DELETE (HID_SVX_START + 123)
+
+#define HID_TPCOLOR_RGB_1 (HID_SVX_START + 124)
+#define HID_TPCOLOR_RGB_2 (HID_SVX_START + 125)
+#define HID_TPCOLOR_RGB_3 (HID_SVX_START + 126)
+#define HID_TPCOLOR_CMYK_1 (HID_SVX_START + 127)
+#define HID_TPCOLOR_CMYK_2 (HID_SVX_START + 128)
+#define HID_TPCOLOR_CMYK_3 (HID_SVX_START + 129)
+
+#define HID_BMPMASK_TBI_PIPETTE (HID_SVX_START + 130)
+//#define HID_BASICIDE_PROP_BROWSER (HID_SVX_START + 131)
+#define HID_STYLE_LISTBOX (HID_SVX_START + 132)
+
+#define HID_FONTWORK_TBI_STYLE_OFF (HID_SVX_START + 133)
+#define HID_FONTWORK_TBI_STYLE_ROTATE (HID_SVX_START + 134)
+#define HID_FONTWORK_TBI_STYLE_UPRIGHT (HID_SVX_START + 135)
+#define HID_FONTWORK_TBI_STYLE_SLANTX (HID_SVX_START + 136)
+#define HID_FONTWORK_TBI_STYLE_SLANTY (HID_SVX_START + 137)
+#define HID_FONTWORK_TBI_ADJUST_MIRROR (HID_SVX_START + 138)
+#define HID_FONTWORK_TBI_ADJUST_LEFT (HID_SVX_START + 139)
+#define HID_FONTWORK_TBI_ADJUST_CENTER (HID_SVX_START + 140)
+#define HID_FONTWORK_TBI_ADJUST_RIGHT (HID_SVX_START + 141)
+#define HID_FONTWORK_TBI_ADJUST_AUTOSIZE (HID_SVX_START + 142)
+#define HID_FONTWORK_TBI_SHOWFORM (HID_SVX_START + 143)
+#define HID_FONTWORK_TBI_OUTLINE (HID_SVX_START + 144)
+#define HID_FONTWORK_TBI_SHADOW_OFF (HID_SVX_START + 145)
+#define HID_FONTWORK_TBI_SHADOW_NORMAL (HID_SVX_START + 146)
+#define HID_FONTWORK_TBI_SHADOW_SLANT (HID_SVX_START + 147)
+
+#define HID_NUMBERFORMAT_TBI_ADD (HID_SVX_START + 148)
+#define HID_NUMBERFORMAT_TBI_REMOVE (HID_SVX_START + 149)
+
+#define HID_CONTDLG_APPLY (HID_SVX_START + 150)
+#define HID_CONTDLG_WORKPLACE (HID_SVX_START + 151)
+#define HID_CONTDLG_SELECT (HID_SVX_START + 152)
+#define HID_CONTDLG_RECT (HID_SVX_START + 153)
+#define HID_CONTDLG_CIRCLE (HID_SVX_START + 154)
+#define HID_CONTDLG_POLY (HID_SVX_START + 155)
+#define HID_CONTDLG_FREEPOLY (HID_SVX_START + 156)
+#define HID_CONTDLG_POLYEDIT (HID_SVX_START + 157)
+#define HID_CONTDLG_POLYMOVE (HID_SVX_START + 158)
+#define HID_CONTDLG_POLYINSERT (HID_SVX_START + 159)
+#define HID_CONTDLG_POLYDELETE (HID_SVX_START + 160)
+#define HID_CONTDLG_UNDO (HID_SVX_START + 161)
+#define HID_CONTDLG_REDO (HID_SVX_START + 162)
+#define HID_CONTDLG_AUTOCONTOUR (HID_SVX_START + 163)
+#define HID_CONTDLG_PIPETTE (HID_SVX_START + 164)
+
+//#define HID_BASICIDE_PROP_BROWSER_LBOX (HID_SVX_START + 165)
+#define HID_DRAWTOOL_TBX (HID_SVX_START + 166)
+#define HID_ALIGN_TBX (HID_SVX_START + 167)
+
+#define HID_IMAPDLG_APPLY (HID_SVX_START + 168)
+#define HID_IMAPDLG_OPEN (HID_SVX_START + 169)
+#define HID_IMAPDLG_SAVEAS (HID_SVX_START + 170)
+#define HID_IMAPDLG_SELECT (HID_SVX_START + 171)
+#define HID_IMAPDLG_RECT (HID_SVX_START + 172)
+#define HID_IMAPDLG_CIRCLE (HID_SVX_START + 173)
+#define HID_IMAPDLG_POLY (HID_SVX_START + 174)
+#define HID_IMAPDLG_FREEPOLY (HID_SVX_START + 175)
+#define HID_IMAPDLG_POLYEDIT (HID_SVX_START + 176)
+#define HID_IMAPDLG_POLYMOVE (HID_SVX_START + 177)
+#define HID_IMAPDLG_POLYINSERT (HID_SVX_START + 178)
+#define HID_IMAPDLG_POLYDELETE (HID_SVX_START + 179)
+#define HID_IMAPDLG_UNDO (HID_SVX_START + 180)
+#define HID_IMAPDLG_REDO (HID_SVX_START + 181)
+#define HID_IMAPDLG_ACTIVE (HID_SVX_START + 182)
+#define HID_IMAPDLG_MACRO (HID_SVX_START + 183)
+#define HID_IMAPDLG_PROPERTY (HID_SVX_START + 184)
+
+#define HID_SVXTBX_ALIGNMENT (HID_SVX_START + 185)
+#define HID_SVXTBX_DRAW (HID_SVX_START + 186)
+
+#define HID_GALLERY_MN_ADDMENU (HID_SVX_START + 187)
+#define HID_GALLERY_MN_ADD (HID_SVX_START + 188)
+#define HID_GALLERY_MN_ADD_LINK (HID_SVX_START + 189)
+#define HID_GALLERY_MN_BACKGROUND (HID_SVX_START + 190)
+#define HID_GALLERY_MN_PREVIEW (HID_SVX_START + 191)
+#define HID_GALLERY_MN_DELETE (HID_SVX_START + 192)
+#define HID_GALLERY_TITLE (HID_SVX_START + 193)
+
+//#define HID_BASICIDE_OBJCAT_SHOW (HID_SVX_START + 195)
+//#define HID_BASICIDE_OBJCAT_PROPS (HID_SVX_START + 196)
+//#define HID_BASICIDE_OBJCAT_HELP (HID_SVX_START + 197)
+
+#define HID_IMPGRF_BTN_STANDARD (HID_SVX_START + 198)
+#define HID_IMPGRF_BTN_INTERNET (HID_SVX_START + 199)
+#define HID_IMPGRF_BTN_PROPERTIES (HID_SVX_START + 200)
+#define HID_IMPGRF_BTN_FILTER (HID_SVX_START + 201)
+#define HID_IMPGRF_CB_LINK (HID_SVX_START + 202)
+#define HID_IMPGRF_CB_PREVIEW (HID_SVX_START + 203)
+
+//#define HID_BASICIDE_BRKDLG (HID_SVX_START + 204)
+//#define HID_BASICIDE_ACTIV (HID_SVX_START + 205)
+//#define HID_BASICIDE_BRKPROPS (HID_SVX_START + 206)
+//#define HID_BASICIDE_REMOVEWATCH (HID_SVX_START + 207)
+//#define HID_BASICIDE_GOTOALL (HID_SVX_START + 208)
+
+#define HID_SVX_OPT_EXT_LINGU (HID_SVX_START + 209)
+#define HID_CACHE_EXTRA_DLG (HID_SVX_START + 210)
+
+#define HID_CONTDLG_TOOLBOX (HID_SVX_START + 211)
+#define HID_CONTDLG_GRAPHWND (HID_SVX_START + 212)
+
+#define HID_IMAPDLG_TOOLBOX (HID_SVX_START + 213)
+#define HID_IMAPDLG_GRAPHWND (HID_SVX_START + 214)
+
+#define HID_OPTLINGU_TOOLBOX (HID_SVX_START + 215)
+
+#define HID_OPTLDAP_SERVERLIST (HID_SVX_START + 216)
+#define HID_OPTLDAP_EDITSERVER (HID_SVX_START + 217)
+
+#define HID_SPELLDLG_EXTRAS_AUDIT (HID_SVX_START + 218)
+#define HID_SPELLDLG_EXTRAS_AUTOCORR (HID_SVX_START + 219)
+#define HID_SPELLDLG_EXTRAS_THESAURUS (HID_SVX_START + 220)
+#define HID_SPELLDLG_EXTRAS_OPTIONS (HID_SVX_START + 221)
+
+#define HID_TPSHADOW_CTRL (HID_SVX_START + 222)
+#define HID_TPHATCH_CTRL (HID_SVX_START + 223)
+#define HID_TPPOSITION_CTRL (HID_SVX_START + 224)
+#define HID_TPSIZE_CTRL (HID_SVX_START + 225)
+#define HID_TPROTATION_CTRL1 (HID_SVX_START + 226)
+#define HID_TPROTATION_CTRL2 (HID_SVX_START + 227)
+
+#define HID_OPTIONS_SSLSITE (HID_SVX_START + 228)
+#define HID_OPTIONS_SSLPERSONAL (HID_SVX_START + 229)
+#define HID_OPTIONS_COOKIES (HID_SVX_START + 230)
+#define HID_OPTINET2_CTL_COOKIES (HID_SVX_START + 231)
+#define HID_OPTIONS_CHANNELS (HID_SVX_START + 232)
+#define HID_OPTINET2_CTL_CHANNELS (HID_SVX_START + 233)
+
+#define HID_CAPTION_CTL_TYPE (HID_SVX_START + 234)
+
+#define HID_NUMBERFORMAT_TBI_INFO (HID_SVX_START + 235)
+#define HID_NUMBERFORMAT_LB_FORMAT (HID_SVX_START + 236)
+
+#define HID_ALIGNMENT_CTR_DIAL (HID_SVX_START + 237)
+#define HID_ALIGNMENT_CTR_BORDER_LOCK (HID_SVX_START + 238)
+
+#define HID_REDLINING_FILTER_PAGE (HID_SVX_START + 239)
+#define HID_REDLINING_FILTER_CB_DATE (HID_SVX_START + 240)
+#define HID_REDLINING_FILTER_LB_DATE (HID_SVX_START + 241)
+#define HID_REDLINING_FILTER_DF_DATE (HID_SVX_START + 242)
+#define HID_REDLINING_FILTER_TF_DATE (HID_SVX_START + 243)
+#define HID_REDLINING_FILTER_IB_CLOCK (HID_SVX_START + 244)
+#define HID_REDLINING_FILTER_DF_DATE2 (HID_SVX_START + 245)
+#define HID_REDLINING_FILTER_TF_DATE2 (HID_SVX_START + 246)
+#define HID_REDLINING_FILTER_IB_CLOCK2 (HID_SVX_START + 247)
+#define HID_REDLINING_FILTER_CB_AUTOR (HID_SVX_START + 248)
+#define HID_REDLINING_FILTER_LB_AUTOR (HID_SVX_START + 249)
+#define HID_REDLINING_FILTER_CB_RANGE (HID_SVX_START + 250)
+#define HID_REDLINING_FILTER_ED_RANGE (HID_SVX_START + 251)
+#define HID_REDLINING_FILTER_LB_ACTION (HID_SVX_START + 252)
+#define HID_REDLINING_FILTER_BTN_REF (HID_SVX_START + 253)
+
+#define HID_REDLINING_VIEW_PAGE (HID_SVX_START + 254)
+#define HID_REDLINING_VIEW_DG_VIEW (HID_SVX_START + 255)
+#define HID_REDLINING_VIEW_PB_ACCEPT (HID_SVX_START + 256)
+#define HID_REDLINING_VIEW_PB_ACCEPTALL (HID_SVX_START + 257)
+#define HID_REDLINING_VIEW_PB_REJECT (HID_SVX_START + 258)
+#define HID_REDLINING_VIEW_PB_REJECTALL (HID_SVX_START + 259)
+
+#define HID_MNU_ZOOM_200 (HID_SVX_START + 260)
+#define HID_MNU_ZOOM_150 (HID_SVX_START + 261)
+#define HID_MNU_ZOOM_100 (HID_SVX_START + 262)
+#define HID_MNU_ZOOM_75 (HID_SVX_START + 263)
+#define HID_MNU_ZOOM_50 (HID_SVX_START + 264)
+#define HID_MNU_ZOOM_OPTIMAL (HID_SVX_START + 265)
+#define HID_MNU_ZOOM_PAGE_WIDTH (HID_SVX_START + 266)
+#define HID_MNU_ZOOM_WHOLE_PAGE (HID_SVX_START + 267)
+
+#define HID_MNU_FUNC_AVG (HID_SVX_START + 268)
+#define HID_MNU_FUNC_COUNT2 (HID_SVX_START + 269)
+#define HID_MNU_FUNC_COUNT (HID_SVX_START + 270)
+#define HID_MNU_FUNC_MAX (HID_SVX_START + 271)
+#define HID_MNU_FUNC_MIN (HID_SVX_START + 272)
+#define HID_MNU_FUNC_SUM (HID_SVX_START + 273)
+#define HID_MNU_FUNC_NONE (HID_SVX_START + 274)
+#define HID_REDLINING_FILTER_CB_ACTION (HID_SVX_START + 275)
+
+#define HID_REDLINING_DLG (HID_SVX_START + 276)
+#define HID_REDLINING_EDIT (HID_SVX_START + 277)
+#define HID_REDLINING_PREV (HID_SVX_START + 278)
+#define HID_REDLINING_NEXT (HID_SVX_START + 279)
+#define HID_REDLINING_TABCONTROL (HID_SVX_START + 280)
+
+#define HID_VALUESET_SINGLENUM (HID_SVX_START + 281)
+#define HID_VALUESET_BULLET (HID_SVX_START + 282)
+#define HID_VALUESET_NUM (HID_SVX_START + 283)
+#define HID_VALUESET_NUMBMP (HID_SVX_START + 284)
+#define HID_SVXPAGE_PICK_NUM (HID_SVX_START + 285)
+#define HID_SVXPAGE_PICK_SINGLE_NUM (HID_SVX_START + 286)
+#define HID_SVXPAGE_PICK_BMP (HID_SVX_START + 287)
+#define HID_SVXPAGE_PICK_BULLET (HID_SVX_START + 288)
+#define HID_SVXPAGE_NUM_OPTIONS (HID_SVX_START + 289)
+#define HID_SVXPAGE_NUM_POSITION (HID_SVX_START + 290)
+
+//#define HID_BASICIDE_MODULWINDOW (HID_SVX_START + 291)
+//#define HID_BASICIDE_DIALOGWINDOW (HID_SVX_START + 292)
+
+#define HID_REDLINING_FILTER_CB_COMMENT (HID_SVX_START + 293)
+#define HID_REDLINING_FILTER_ED_COMMENT (HID_SVX_START + 294)
+#define HID_REDLINING_VIEW_PB_UNDO (HID_SVX_START + 295)
+
+#define HID_OPTIONS_EXTERN_BROWSER (HID_SVX_START + 296)
+
+#define HID_EDITENG_SPELLER_START (HID_SVX_START + 297)
+#define HID_EDITENG_SPELLER_ADDWORD (HID_SVX_START + 298)
+#define HID_EDITENG_SPELLER_IGNORE (HID_SVX_START + 299)
+#define HID_EDITENG_SPELLER_AUTOCORRECT (HID_SVX_START + 300)
+
+#define HID_OPTPATH_HEADERBAR (HID_SVX_START + 301)
+#define HID_OPTCOOKIES_HEADERBAR (HID_SVX_START + 302)
+
+#define HID_TPPAGE_FULLSIZE (HID_SVX_START + 303)
+
+#define HID_POPUP_LINEEND (HID_SVX_START + 304)
+#define HID_POPUP_LINEEND_CTRL (HID_SVX_START + 305)
+
+#define HID_SPELLDLG_SETWORD (HID_SVX_START + 306)
+
+#define HID_BORDER_DISTANCE_DLG (HID_SVX_START + 307)
+#define HID_BORDER_DISTANCE_DLG_LEFT (HID_SVX_START + 308)
+#define HID_BORDER_DISTANCE_DLG_RIGHT (HID_SVX_START + 309)
+#define HID_BORDER_DISTANCE_DLG_TOP (HID_SVX_START + 310)
+#define HID_BORDER_DISTANCE_DLG_BOTTOM (HID_SVX_START + 311)
+#define HID_BORDER_DISTANCE_DLG_HELP_PB (HID_SVX_START + 312)
+#define HID_BORDER_DISTANCE_DLG_SYNC_CB (HID_SVX_START + 313)
+#define HID_BORDER_DISTANCE_DLG_EXAMPLE (HID_SVX_START + 314)
+
+#define HID_HYPERLINK_INTERNET (HID_SVX_START + 315)
+#define HID_HYPERLINK_MAIL (HID_SVX_START + 316)
+#define HID_HYPERLINK_DOCUMENT (HID_SVX_START + 317)
+#define HID_HYPERLINK_NEWDOCUMENT (HID_SVX_START + 318)
+#define HID_HYPERLINK_MARKWND (HID_SVX_START + 319)
+
+#define HID_ICCDIALOG_RESET_BTN (HID_SVX_START + 320)
+#define HID_ICCDIALOG_CHOICECTRL (HID_SVX_START + 321)
+
+#define HID_HYPERDLG_INET_PATH (HID_SVX_START + 322)
+#define HID_HYPERDLG_MAIL_PATH (HID_SVX_START + 323)
+#define HID_HYPERDLG_DOC_PATH (HID_SVX_START + 324)
+#define HID_ICCDIALOG_OK_BTN (HID_SVX_START + 325)
+#define HID_ICCDIALOG_CANCEL_BTN (HID_SVX_START + 326)
+
+#define HID_HYPERLINK_MARKWND_APPLY (HID_SVX_START + 327)
+#define HID_HYPERLINK_MARKWND_CLOSE (HID_SVX_START + 328)
+#define HID_HYPERLINK_MARKWND_TREE (HID_SVX_START + 329)
+#define HID_OPTIONS_EXTERNAL_LINGU (HID_SVX_START + 330)
+
+#define HID_AUTOCORR_HELP_START (HID_SVX_START + 331)
+#define HID_AUTOCORR_HELP_END (HID_SVX_START + 350)
+
+#define HID_SVXPAGE_GRFCROP (HID_SVX_START + 355)
+
+// -----------------------------------------------------------------------
+// "Uberlaufpr"ufung -----------------------------------------------------
+// -----------------------------------------------------------------------
+
+#define ACT_SVX_HID_END HID_SVXPAGE_GRFCROP
+
+#if ACT_SVX_HID_END > HID_SVX_END
+#error Resource-Ueberlauf in #line, #file
+#endif
+
+
+#endif
+
diff --git a/svx/inc/hlnkitem.hxx b/svx/inc/hlnkitem.hxx
new file mode 100644
index 000000000000..c864da7dafb1
--- /dev/null
+++ b/svx/inc/hlnkitem.hxx
@@ -0,0 +1,150 @@
+/*************************************************************************
+ *
+ * $RCSfile: hlnkitem.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:00:56 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SVX_HLNKITEM_HXX
+#define _SVX_HLNKITEM_HXX
+
+#ifndef _STRING_HXX
+#include <tools/string.hxx>
+#endif
+#ifndef _SFXPOOLITEM_HXX
+#include <svtools/poolitem.hxx>
+#endif
+#ifndef _SFXSIDS_HRC
+#include <sfx2/sfxsids.hrc>
+#endif
+
+#ifndef _SFXMACITEM_HXX
+#include <svtools/macitem.hxx>
+#endif
+
+#define HYPERDLG_EVENT_MOUSEOVER_OBJECT 0x0001
+#define HYPERDLG_EVENT_MOUSECLICK_OBJECT 0x0002
+#define HYPERDLG_EVENT_MOUSEOUT_OBJECT 0x0004
+
+enum SvxLinkInsertMode
+{
+ HLINK_DEFAULT,
+ HLINK_FIELD,
+ HLINK_BUTTON,
+ HLINK_HTMLMODE = 0x0080
+};
+
+class SvxHyperlinkItem : public SfxPoolItem
+{
+ String sName;
+ String sURL;
+ String sTarget;
+ SvxLinkInsertMode eType;
+
+ String sIntName;
+ SvxMacroTableDtor* pMacroTable;
+
+ USHORT nMacroEvents;
+
+public:
+ TYPEINFO();
+
+ SvxHyperlinkItem( USHORT nWhich = SID_HYPERLINK_GETLINK ):
+ SfxPoolItem(nWhich), pMacroTable(NULL) { eType = HLINK_DEFAULT; nMacroEvents=0; };
+ SvxHyperlinkItem( const SvxHyperlinkItem& rHyperlinkItem );
+ SvxHyperlinkItem( USHORT nWhich, String& rName, String& rURL,
+ String& rTarget, String& rIntName,
+ SvxLinkInsertMode eTyp = HLINK_FIELD,
+ USHORT nEvents = 0,
+ SvxMacroTableDtor *pMacroTbl =NULL );
+ virtual ~SvxHyperlinkItem () { delete pMacroTable; }
+
+ inline SvxHyperlinkItem& operator=( const SvxHyperlinkItem &rItem );
+
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+
+ const String& GetName() const { return sName; }
+ void SetName(const String& rName) { sName = rName; }
+
+ const String& GetURL() const { return sURL; }
+ void SetURL(const String& rURL) { sURL = rURL; }
+
+ const String& GetIntName () const { return sIntName; }
+ void SetIntName(const String& rIntName) { sIntName = rIntName; }
+
+ const String& GetTargetFrame() const { return sTarget; }
+ void SetTargetFrame(const String& rTarget) { sTarget = rTarget; }
+
+ SvxLinkInsertMode GetInsertMode() const { return eType; }
+ void SetInsertMode( SvxLinkInsertMode eNew ) { eType = eNew; }
+
+ void SetMacro( USHORT nEvent, const SvxMacro& rMacro );
+
+ void SetMacroTable( const SvxMacroTableDtor& rTbl );
+ const SvxMacroTableDtor* GetMacroTbl() const { return pMacroTable; }
+
+ void SetMacroEvents (const USHORT nEvents) { nMacroEvents = nEvents; }
+ const USHORT GetMacroEvents() const { return nMacroEvents; }
+
+ virtual SvStream& Store( SvStream &, USHORT nItemVersion ) const;
+ virtual SfxPoolItem* Create( SvStream &, USHORT nVer ) const;
+
+};
+
+#endif
+
+
diff --git a/svx/inc/htmlmode.hxx b/svx/inc/htmlmode.hxx
new file mode 100644
index 000000000000..afafa25ab2ae
--- /dev/null
+++ b/svx/inc/htmlmode.hxx
@@ -0,0 +1,106 @@
+/*************************************************************************
+ *
+ * $RCSfile: htmlmode.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:00:56 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SVX_HTMLMODE_HXX
+#define _SVX_HTMLMODE_HXX
+
+// include ---------------------------------------------------------------
+
+// define ----------------------------------------------------------------
+
+#define HTMLMODE_ON 0x0001
+#define HTMLMODE_PARA_BORDER 0x0002 /* Absatzumrandungen */
+#define HTMLMODE_PARA_DISTANCE 0x0004 /* bestimmte Absatzabstaende */
+#define HTMLMODE_SMALL_CAPS 0x0008 /* Kapitaelchen */
+#define HTMLMODE_FRM_COLUMNS 0x0010 /* spaltige Rahmen */
+#define HTMLMODE_SOME_STYLES 0x0020 /* mind. MS IE */
+#define HTMLMODE_FULL_STYLES 0x0040 /* == SW */
+#define HTMLMODE_BLINK 0x0080 /* blinkende Zeichen*/
+#define HTMLMODE_PARA_BLOCK 0x0100 /* Blocksatz */
+#define HTMLMODE_DROPCAPS 0x0200 /* Initialen*/
+#define HTMLMODE_FIRSTLINE 0x0400 /* Erstzeileneinzug mit Spacer == NS 3.0 */
+#define HTMLMODE_GRAPH_POS 0x0800 /* Grafikpositionen Hintergrund */
+#define HTMLMODE_FULL_ABS_POS 0x1000 /* abs. Rahmenpositionierung */
+#define HTMLMODE_SOME_ABS_POS 0x2000 /* abs. Rahmenpositionierung vollst.*/
+#define HTMLMODE_RESERVED1 0x4000
+#define HTMLMODE_RESERVED0 0x8000
+
+
+
+#endif
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/svx/inc/hyperdlg.hxx b/svx/inc/hyperdlg.hxx
new file mode 100644
index 000000000000..f389b0535846
--- /dev/null
+++ b/svx/inc/hyperdlg.hxx
@@ -0,0 +1,156 @@
+/*************************************************************************
+ *
+ * $RCSfile: hyperdlg.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:00:56 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _SVX_TAB_HYPERLINK_HXX
+#define _SVX_TAB_HYPERLINK_HXX
+
+// include ---------------------------------------------------------------
+
+#ifndef _SVX_HLNKITEM_HXX
+#include <hlnkitem.hxx>
+#endif
+#ifndef _SFX_CHILDWIN_HXX
+#include <sfx2/childwin.hxx>
+#endif
+#ifndef _SFXCTRLITEM_HXX
+#include <sfx2/ctrlitem.hxx>
+#endif
+#ifndef _SFX_BINDINGS_HXX
+#include <sfx2/bindings.hxx>
+#endif
+
+#ifndef _SV_IMAGE_HXX
+#include <vcl/image.hxx>
+#endif
+
+#include "iconcdlg.hxx"
+
+/*************************************************************************
+|*
+|* Hyperlink-Dialog
+|*
+\************************************************************************/
+
+class SvxHpLinkDlg;
+class SvxHlinkCtrl : public SfxControllerItem
+{
+private :
+ SvxHpLinkDlg *pParent;
+
+ SfxStatusForwarder aForwarder;
+
+public :
+ SvxHlinkCtrl( USHORT nId, SfxBindings & rBindings, SvxHpLinkDlg* pDlg);
+
+ virtual void StateChanged( USHORT nSID, SfxItemState eState,
+ const SfxPoolItem* pState );
+};
+
+/*************************************************************************
+|*
+|* Hyperlink-Dialog
+|*
+\************************************************************************/
+
+class SvxHlinkDlgWrapper : public SfxChildWindow
+{
+public:
+ SvxHlinkDlgWrapper( Window*pParent, USHORT nId,
+ SfxBindings* pBindings, SfxChildWinInfo* pInfo );
+
+ SFX_DECL_CHILDWINDOW(SvxHlinkDlgWrapper);
+};
+
+/*************************************************************************
+|*
+|* Hyperlink-Dialog
+|*
+\************************************************************************/
+
+class SvxHpLinkDlg : public IconChoiceDialog
+{
+private:
+ SvxHlinkCtrl maCtrl; // Controler
+ SfxBindings* mpBindings;
+ SfxItemSet* mpItemSet;
+
+ BOOL mbIsHTMLDoc;
+
+ DECL_LINK (ClickApplyHdl_Impl, void * );
+ DECL_LINK (ClickCloseHdl_Impl, void * );
+
+protected:
+ virtual BOOL Close();
+ virtual void Move();
+
+public:
+ SvxHpLinkDlg (Window* pParent, SfxBindings* pBindings );
+ ~SvxHpLinkDlg ();
+
+ USHORT SetPage( SvxHyperlinkItem* pItem );
+ void EnableInetBrowse( BOOL bEnable = TRUE );
+ const BOOL IsHTMLDoc() const { return mbIsHTMLDoc; }
+
+ SfxDispatcher* GetDispatcher() const { return mpBindings->GetDispatcher(); }
+};
+
+
+#endif // _SVX_TAB_HYPERLINK_HXX
diff --git a/svx/inc/imapdlg.hxx b/svx/inc/imapdlg.hxx
new file mode 100644
index 000000000000..23fdebb3bd11
--- /dev/null
+++ b/svx/inc/imapdlg.hxx
@@ -0,0 +1,239 @@
+/*************************************************************************
+ *
+ * $RCSfile: imapdlg.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:00:57 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+
+#ifndef _IMAPDLG_HXX_
+#define _IMAPDLG_HXX_
+
+#ifndef _SFX_CHILDWIN_HXX //autogen
+#include <sfx2/childwin.hxx>
+#endif
+
+#ifndef _SFXCTRLITEM_HXX //autogen
+#include <sfx2/ctrlitem.hxx>
+#endif
+
+#ifndef _BASEDLGS_HXX //autogen
+#include <sfx2/basedlgs.hxx>
+#endif
+
+#ifndef _FIXED_HXX //autogen
+#include <vcl/fixed.hxx>
+#endif
+
+#ifndef _COMBOBOX_HXX //autogen
+#include <vcl/combobox.hxx>
+#endif
+
+#ifndef _EDIT_HXX //autogen
+#include <vcl/edit.hxx>
+#endif
+
+#ifndef _TOOLBOX_HXX //autogen
+#include <vcl/toolbox.hxx>
+#endif
+
+#ifndef _STATUS_HXX //autogen
+#include <vcl/status.hxx>
+#endif
+
+
+#ifndef _GOMISC_HXX
+class ImageMap;
+#endif
+
+
+/*************************************************************************
+|*
+|* Ableitung vom SfxChildWindow als "Behaelter" fuer Float
+|*
+\************************************************************************/
+
+class Graphic;
+class TargetList;
+
+class SvxIMapDlgChildWindow : public SfxChildWindow
+{
+ public:
+
+ SvxIMapDlgChildWindow( Window*, USHORT, SfxBindings*, SfxChildWinInfo* );
+
+ SFX_DECL_CHILDWINDOW( SvxIMapDlgChildWindow );
+
+ static void UpdateIMapDlg( const Graphic& rGraphic, const ImageMap* pImageMap = NULL,
+ const TargetList* pTargetList = NULL, void* pEditingObj = NULL );
+};
+
+
+#ifndef _REDUCED_IMAPDLG_HXX_
+#define _REDUCED_IMAPDLG_HXX_
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+class SvxIMapDlg;
+
+class SvxIMapDlgItem : public SfxControllerItem
+{
+ SvxIMapDlg& rIMap;
+
+
+protected:
+
+ virtual void StateChanged( USHORT nSID, SfxItemState eState,
+ const SfxPoolItem* pState );
+
+
+public:
+
+ SvxIMapDlgItem( USHORT nId, SvxIMapDlg& rIMapDlg, SfxBindings& rBindings );
+};
+
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+class IMapOwnData;
+
+class SvxIMapDlg : public SfxFloatingWindow
+{
+ friend class IMapOwnData;
+ friend class IMapWindow;
+
+ Size aLastSize;
+ IMapWindow* pIMapWnd;
+ IMapOwnData* pOwnData;
+ void* pCheckObj;
+ SvxIMapDlgItem aIMapItem;
+
+ ToolBox aTbxIMapDlg1;
+ StatusBar aStbStatus;
+ FixedText aFtURL;
+ FixedText aFtText;
+ ComboBox aCbbURL;
+ Edit aEdtText;
+
+ virtual void Resize();
+ virtual BOOL Close();
+
+#ifdef _IMAPDLG_PRIVATE
+
+ DECL_LINK( TbxClickHdl, ToolBox* );
+ DECL_LINK( InfoHdl, IMapWindow* );
+ DECL_LINK( MousePosHdl, IMapWindow* );
+ DECL_LINK( GraphSizeHdl, IMapWindow* );
+ DECL_LINK( URLModifyHdl, void* );
+ DECL_LINK( URLLoseFocusHdl, void* );
+ DECL_LINK( UpdateHdl, Timer* );
+ DECL_LINK( TbxUpdateHdl, Timer* );
+ DECL_LINK( StateHdl, IMapWindow* );
+
+ void DoOpen();
+ BOOL DoSave();
+
+#endif
+
+
+public:
+
+ SvxIMapDlg( SfxBindings *pBindings, SfxChildWindow *pCW,
+ Window* pParent, const ResId& rResId );
+ ~SvxIMapDlg();
+
+ void SetExecState( BOOL bEnable );
+
+ void SetGraphic( const Graphic& rGraphic );
+
+ void SetEditingObject( void* pObj ) { pCheckObj = pObj; }
+ const void* GetEditingObject() const { return pCheckObj; }
+
+ void SetImageMap( const ImageMap& rImageMap );
+ const ImageMap& GetImageMap() const;
+
+ void SetTargetList( const TargetList& rTargetList );
+ const TargetList& GetTargetList() const;
+
+ void Update( const Graphic& rGraphic, const ImageMap* pImageMap = NULL,
+ const TargetList* pTargetList = NULL, void* pEditingObj = NULL );
+};
+
+
+/*************************************************************************
+|*
+|* Defines
+|*
+\************************************************************************/
+
+#define SVXIMAPDLG() ( (SvxIMapDlg*) ( SfxViewFrame::Current()->GetChildWindow( \
+ SvxIMapDlgChildWindow::GetChildWindowId() )-> \
+ GetWindow() ) )
+
+
+#endif // _REDUCED_IMAPDLG_HXX_
+#endif // _IMAPDLG_HXX_
+
+
diff --git a/svx/inc/impgrf.hxx b/svx/inc/impgrf.hxx
new file mode 100644
index 000000000000..fc5de057ceff
--- /dev/null
+++ b/svx/inc/impgrf.hxx
@@ -0,0 +1,179 @@
+/*************************************************************************
+ *
+ * $RCSfile: impgrf.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:00:57 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SVX_IMPGRF_HXX
+#define _SVX_IMPGRF_HXX
+
+// include ---------------------------------------------------------------
+
+#ifndef _FILTER_HXX //autogen
+#include <svtools/filter.hxx>
+#endif
+
+#ifndef _BUTTON_HXX //autogen
+#include <vcl/button.hxx>
+#endif
+
+#ifndef _IODLG_HXX
+#include <sfx2/iodlg.hxx>
+#endif
+
+// forward ---------------------------------------------------------------
+
+class SvxGraphicHdl_Impl;
+class SfxObjectShell;
+struct SvxImportGraphicRes_Impl;
+class SvxGraphicPrevWin_Impl;
+class SfxMedium;
+
+// Funktionen ------------------------------------------------------------
+
+// returnt einen static Graphic-Filter, wird einmalig angelegt,
+// steht immer zur Verfuegung, DARF NIE geloescht werden!!!!
+GraphicFilter* GetGrfFilter();
+USHORT FillFilter( GraphicFilter& rFilter );
+int LoadGraphic( const String& rPath, const String& rFilter,
+ Graphic& rGraphic,
+ GraphicFilter* pFilter = NULL,
+ USHORT* pDeterminedFormat = NULL );
+
+// class SvxImportGraphicDialog ------------------------------------------
+#ifndef SV_NODIALOG
+
+#define ENABLE_STANDARD ((USHORT)0x0001) // Standard-Button
+#define ENABLE_LINK ((USHORT)0x0002) // Verkn"upfungs-Box
+#define ENABLE_STD_AND_LINK (ENABLE_STANDARD | ENABLE_LINK)
+#define ENABLE_PROPERTY ((USHORT)0x0004) // Eigenschaften-Button
+#define ENABLE_ALL ((USHORT)0x0007) // alle
+#define ENABLE_PROP_WITHOUTLINK ((USHORT)0x0008) // Eigenschaften ohne Link
+#define ENABLE_EMPTY_FILENAMES ((USHORT)0x0010) // Leere Dateinamen zulassen
+
+class SvxImportGraphicDialog : public SfxFileDialog
+{
+public:
+ SvxImportGraphicDialog( Window* pParent,
+ const String& rTitle,
+ const USHORT nEnable = ENABLE_STANDARD,
+ WinBits nWinBits = WB_OPEN | WB_3DLOOK );
+ ~SvxImportGraphicDialog();
+
+ short Execute();
+ void SetPath( const String& rPath, BOOL bDir,
+ BOOL bLink = FALSE );
+
+ BOOL IsURL() const;
+ BOOL AsLink() const
+ { return pLinkBox && pLinkBox->IsChecked(); }
+ GraphicFilter& GetFilter() { return *GetGrfFilter(); }
+ SvxGraphicPrevWin_Impl& GetPreviewWindow() { return *pPrevWin; }
+
+ void SetPreviewing( BOOL bPrev );
+ BOOL IsPreviewing() const { return bPreviewing; }
+
+ Link GetPropertyHdl() const { return aPropertyLink; }
+ void SetPropertyHdl( const Link& rLink )
+ { aPropertyLink = rLink; }
+
+ Graphic* GetGraphic() const;
+ String GetPath() const;
+
+private:
+friend class SvxGraphicPrevWin_Impl;
+
+ SvxImportGraphicRes_Impl* pResImpl;
+ SvxGraphicPrevWin_Impl* pPrevWin;
+
+ SfxMedium* pMedium;
+
+ PushButton* pStandardButton;
+ PushButton* pInternetButton;
+ PushButton* pPropertiesButton;
+ PushButton* pFilterButton;
+ CheckBox* pLinkBox;
+ CheckBox* pPreviewBox;
+
+ Link aPropertyLink;
+ String aStartPath;
+ String aCurrPath;
+ Timer aPrevTimer;
+ BOOL bPreviewing;
+ void FileSelect();
+ long OK();
+ void SetPath( const String& ); // just to make private
+
+#ifdef _SVX_IMPGRF_CXX
+ void Construct_Impl( const String &rTitle,
+ USHORT nEnable );
+
+ DECL_LINK( StandardHdl_Impl, Button * );
+ DECL_LINK( PropertiesHdl_Impl, Button * );
+ DECL_LINK( FilterHdl_Impl, Button * );
+ DECL_LINK( PreviewHdl_Impl, Button * );
+ DECL_LINK( TimeOutHdl_Impl, Timer * );
+ DECL_LINK( FilterSelectHdl_Impl, void * );
+ DECL_LINK( FileSelectHdl_Impl, void * );
+#endif
+};
+
+#endif // SV_NODIALOG
+
+
+#endif
+
diff --git a/svx/inc/insctrl.hxx b/svx/inc/insctrl.hxx
new file mode 100644
index 000000000000..8af21c793d91
--- /dev/null
+++ b/svx/inc/insctrl.hxx
@@ -0,0 +1,97 @@
+/*************************************************************************
+ *
+ * $RCSfile: insctrl.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:00:57 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SVX_INSCTRL_HXX
+#define _SVX_INSCTRL_HXX
+
+// include ---------------------------------------------------------------
+
+#ifndef _SFXSTBITEM_HXX //autogen
+#include <sfx2/stbitem.hxx>
+#endif
+
+// class SvxInsertToolBoxControl -----------------------------------------
+
+class SvxInsertStatusBarControl : public SfxStatusBarControl
+{
+public:
+ virtual void StateChanged( USHORT nSID, SfxItemState eState,
+ const SfxPoolItem* pState );
+ virtual void Click();
+ virtual void Paint( const UserDrawEvent& rEvt );
+
+ SFX_DECL_STATUSBAR_CONTROL();
+
+ SvxInsertStatusBarControl( USHORT nId, StatusBar& rStb, SfxBindings& rBind );
+ ~SvxInsertStatusBarControl();
+
+ static ULONG GetDefItemWidth(const StatusBar& rStb);
+
+private:
+ BOOL bInsert;
+
+#ifdef _SVX_INSCTRL_CXX
+ void DrawItemText_Impl();
+#endif
+};
+
+
+#endif
+
diff --git a/svx/inc/layctrl.hxx b/svx/inc/layctrl.hxx
new file mode 100644
index 000000000000..a8d2267ed804
--- /dev/null
+++ b/svx/inc/layctrl.hxx
@@ -0,0 +1,113 @@
+/*************************************************************************
+ *
+ * $RCSfile: layctrl.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:00:57 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SVX_LAYCTRL_HXX
+#define _SVX_LAYCTRL_HXX
+
+// include ---------------------------------------------------------------
+
+
+#ifndef _SFXTBXCTRL_HXX //autogen
+#include <sfx2/tbxctrl.hxx>
+#endif
+// class SvxTableToolBoxControl ------------------------------------------
+
+class SvxTableToolBoxControl : public SfxToolBoxControl
+{
+private:
+ FASTBOOL bEnabled;
+
+public:
+ virtual SfxPopupWindowType GetPopupWindowType() const;
+ virtual SfxPopupWindow* CreatePopupWindow();
+ virtual SfxPopupWindow* CreatePopupWindowCascading();
+ virtual void StateChanged( USHORT nSID,
+ SfxItemState eState,
+ const SfxPoolItem* pState );
+
+ SFX_DECL_TOOLBOX_CONTROL();
+
+ SvxTableToolBoxControl( USHORT nId, ToolBox& rTbx, SfxBindings& rBind );
+ ~SvxTableToolBoxControl();
+};
+
+// class SvxColumnsToolBoxControl ----------------------------------------
+
+class SvxColumnsToolBoxControl : public SfxToolBoxControl
+{
+ FASTBOOL bEnabled;
+public:
+ virtual SfxPopupWindowType GetPopupWindowType() const;
+ virtual SfxPopupWindow* CreatePopupWindow();
+ virtual SfxPopupWindow* CreatePopupWindowCascading();
+
+ SFX_DECL_TOOLBOX_CONTROL();
+
+ SvxColumnsToolBoxControl( USHORT nId, ToolBox& rTbx, SfxBindings& rBind );
+ ~SvxColumnsToolBoxControl();
+
+ virtual void StateChanged( USHORT nSID,
+ SfxItemState eState,
+ const SfxPoolItem* pState );
+};
+
+
+#endif
+
diff --git a/svx/inc/lightdlg.hxx b/svx/inc/lightdlg.hxx
new file mode 100644
index 000000000000..f3e5deac607e
--- /dev/null
+++ b/svx/inc/lightdlg.hxx
@@ -0,0 +1,183 @@
+/*************************************************************************
+ *
+ * $RCSfile: lightdlg.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:00:57 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+
+#ifndef _SVX_LIGHT3D_HXX_
+#define _SVX_LIGHT3D_HXX_
+
+#include "dlgctl3d.hxx"
+
+#ifndef _SV_FIXED_HXX //autogen
+#include <vcl/fixed.hxx>
+#endif
+
+#ifndef _SV_GROUP_HXX //autogen
+#include <vcl/group.hxx>
+#endif
+
+#ifndef _SFXTABDLG_HXX //autogen
+#include <sfx2/tabdlg.hxx>
+#endif
+
+#ifndef _BASEDLGS_HXX //autogen
+#include <sfx2/basedlgs.hxx>
+#endif
+
+#ifndef _FIELD_HXX //autogen
+#include <vcl/field.hxx>
+#endif
+
+#ifndef _SVX_DLG_CTRL_HXX //autogen
+#include "dlgctrl.hxx"
+#endif
+
+class Vector3D;
+
+/*************************************************************************
+|*
+|* Dialog
+|*
+\************************************************************************/
+/*
+class SvxLight3DDlg : public ModalDialog
+{
+private:
+ SvxRectCtl3D aCtlLight;
+ FixedText aFtIntensity;
+ MetricField aMtrFldIntensity;
+ OKButton aBtnOK;
+ CancelButton aBtnCancel;
+ HelpButton aBtnHelp;
+
+public:
+ SvxLight3DDlg(Window* pWindow);
+ virtual ~SvxLight3DDlg();
+
+ Vector3D GetVector();
+ void SetLight( Vector3D aVect );
+ double GetIntensity();
+ void SetIntensity( double fIntens );
+};
+*/
+/*************************************************************************
+|*
+|* 3D-Tab-Dialog
+|*
+\************************************************************************/
+
+class Svx3DTabDialog : public SfxTabDialog
+{
+private:
+ const SfxItemSet& rOutAttrs;
+
+public:
+ Svx3DTabDialog( Window* pParent, const SfxItemSet* pAttr );
+ ~Svx3DTabDialog();
+};
+
+/*************************************************************************
+|*
+|* 3D-SingleTab-Dialog
+|*
+\************************************************************************/
+class Svx3DSingleTabDialog : public SfxSingleTabDialog
+{
+private:
+ const SfxItemSet& rOutAttrs;
+
+public:
+ Svx3DSingleTabDialog( Window* pParent, const SfxItemSet* pAttr );
+ ~Svx3DSingleTabDialog();
+};
+
+/*************************************************************************
+|*
+|* Light-Tab-Page
+|*
+\************************************************************************/
+class SvxLight3DTabPage : public SfxTabPage
+{
+private:
+ SvxRectCtl3D aCtlLight;
+ FixedText aFtLightIntensity;
+ MetricField aMtrFldLightIntensity;
+ FixedText aFtLightColor;
+ ColorLB aLbLightColor;
+ GroupBox aGrpLight;
+ FixedText aFtIntensity;
+ MetricField aMtrFldIntensity;
+ FixedText aFtColor;
+ ColorLB aLbColor;
+ GroupBox aGrpAmbient;
+ const SfxItemSet& rOutAttrs;
+
+public:
+ SvxLight3DTabPage( Window* pParent, const SfxItemSet& rInAttrs );
+
+ static SfxTabPage* Create( Window*, const SfxItemSet& );
+ static USHORT* GetRanges();
+
+ virtual BOOL FillItemSet( SfxItemSet& );
+ virtual void Reset( const SfxItemSet & );
+};
+
+#endif // _SVX_LIGHT3D_HXX_
+
diff --git a/svx/inc/linectrl.hxx b/svx/inc/linectrl.hxx
new file mode 100644
index 000000000000..5a735a8b845b
--- /dev/null
+++ b/svx/inc/linectrl.hxx
@@ -0,0 +1,201 @@
+/*************************************************************************
+ *
+ * $RCSfile: linectrl.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:00:57 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SVX_LINECTRL_HXX
+#define _SVX_LINECTRL_HXX
+
+
+#ifndef _VALUESET_HXX //autogen
+#include <svtools/valueset.hxx>
+#endif
+#ifndef _SFXLSTNER_HXX //autogen
+#include <svtools/lstner.hxx>
+#endif
+#ifndef _SFXTBXCTRL_HXX //autogen
+#include <sfx2/tbxctrl.hxx>
+#endif
+class XLineStyleItem;
+class XLineDashItem;
+class SvxLineBox;
+class SvxMetricField;
+class SvxColorBox;
+class XLineEndList;
+
+//========================================================================
+// SvxLineStyleController:
+//========================================================================
+
+class SvxLineStyleToolBoxControl : public SfxToolBoxControl, public SfxListener
+{
+private:
+ XLineStyleItem* pStyleItem;
+ XLineDashItem* pDashItem;
+
+ SfxStatusForwarder aDashForwarder;
+ BOOL bUpdate;
+
+public:
+ SFX_DECL_TOOLBOX_CONTROL();
+
+ SvxLineStyleToolBoxControl( USHORT nId, ToolBox& rTbx, SfxBindings& rBind );
+ ~SvxLineStyleToolBoxControl();
+
+ virtual void StateChanged( USHORT nSID, SfxItemState eState,
+ const SfxPoolItem* pState );
+ virtual void SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
+ const SfxHint& rHint, const TypeId& rHintType );
+ virtual Window* CreateItemWindow( Window *pParent );
+};
+
+//========================================================================
+// SvxLineWidthController:
+//========================================================================
+
+class SvxLineWidthToolBoxControl : public SfxToolBoxControl, public SfxListener
+{
+public:
+ SFX_DECL_TOOLBOX_CONTROL();
+
+ SvxLineWidthToolBoxControl( USHORT nId, ToolBox& rTbx, SfxBindings& rBind );
+ ~SvxLineWidthToolBoxControl();
+
+ virtual void StateChanged( USHORT nSID, SfxItemState eState,
+ const SfxPoolItem* pState );
+ virtual void SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
+ const SfxHint& rHint, const TypeId& rHintType );
+ virtual Window* CreateItemWindow( Window *pParent );
+};
+
+//========================================================================
+// SvxLineColorController:
+//========================================================================
+
+class SvxLineColorToolBoxControl : public SfxToolBoxControl, public SfxListener
+{
+public:
+ SFX_DECL_TOOLBOX_CONTROL();
+
+ SvxLineColorToolBoxControl( USHORT nId, ToolBox& rTbx, SfxBindings& rBind );
+ ~SvxLineColorToolBoxControl();
+
+ virtual void StateChanged( USHORT nSID, SfxItemState eState,
+ const SfxPoolItem* pState );
+ virtual void SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
+ const SfxHint& rHint, const TypeId& rHintType );
+ virtual Window* CreateItemWindow( Window *pParent );
+};
+
+//========================================================================
+// class SvxLineEndWindow
+//========================================================================
+class SvxLineEndWindow : public SfxPopupWindow, public SfxListener
+{
+private:
+ XLineEndList* pLineEndList;
+ ValueSet aLineEndSet;
+ USHORT nCols;
+ USHORT nLines;
+ ULONG nLineEndWidth;
+ Size aBmpSize;
+ BOOL bPopupMode;
+
+ DECL_LINK( SelectHdl, void * );
+ void FillValueSet();
+ void SetSize();
+
+protected:
+ virtual void Resizing( Size& rSize );
+ virtual void Resize();
+ virtual BOOL Close();
+ virtual void PopupModeEnd();
+
+public:
+ SvxLineEndWindow( USHORT nId, const String& rWndTitle,
+ SfxBindings& rBindings );
+ ~SvxLineEndWindow();
+
+ void StartSelection();
+
+ virtual void SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType,
+ const SfxHint& rHint, const TypeId& rHintType );
+ virtual SfxPopupWindow* Clone() const;
+};
+
+//========================================================================
+// class SvxColorToolBoxControl
+//========================================================================
+
+class SvxLineEndToolBoxControl : public SfxToolBoxControl
+{
+public:
+ SFX_DECL_TOOLBOX_CONTROL();
+ SvxLineEndToolBoxControl( USHORT nId, ToolBox& rTbx, SfxBindings& rBindings );
+ ~SvxLineEndToolBoxControl();
+
+ virtual void StateChanged( USHORT nSID, SfxItemState eState,
+ const SfxPoolItem* pState );
+ virtual SfxPopupWindowType GetPopupWindowType() const;
+ virtual SfxPopupWindow* CreatePopupWindow();
+};
+
+
+
+#endif
+
diff --git a/svx/inc/linkmgr.hxx b/svx/inc/linkmgr.hxx
new file mode 100644
index 000000000000..c9a0262430ef
--- /dev/null
+++ b/svx/inc/linkmgr.hxx
@@ -0,0 +1,135 @@
+/*************************************************************************
+ *
+ * $RCSfile: linkmgr.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:00:57 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SVXLINKMGR_HXX
+#define _SVXLINKMGR_HXX
+
+
+#ifndef _LINKMGR_HXX //autogen
+#include <so3/linkmgr.hxx>
+#endif
+
+class Graphic;
+class Size;
+
+// Damit der Link ueber den Status der zu ladenen Grafik informierten werden
+// verschickt das FileObject ein SvData, mit der FormatId
+// "RegisterStatusInfoId" und ein einem String als Datentraeger. Dieser
+// enthaelt den folgenden enum.
+enum LinkState
+{
+ STATE_LOAD_OK,
+ STATE_LOAD_ERROR,
+ STATE_LOAD_ABORT
+};
+
+class SvxLinkManager : public SvLinkManager
+{
+ SvxLinkManager( const SvLinkManager& );
+ SvxLinkManager& operator=( const SvLinkManager& );
+
+public:
+ SvxLinkManager( SvPersist * pCacheCont );
+
+ // den Link mit einem PseudoObject verbinden und in die Liste eintragen
+ BOOL InsertFileLink( SvBaseLink&,
+ USHORT nFileType,
+ const String& rTxt,
+ const String* pFilterNm = 0,
+ const String* pRange = 0 );
+
+ // falls am Link schon alles eingestellt ist !
+ BOOL InsertFileLink( SvBaseLink& );
+
+ // erfrage die Strings fuer den Dialog
+ virtual BOOL GetDisplayNames( const SvBaseLink&,
+ String* pType,
+ String* pFile = 0,
+ String* pLink = 0,
+ String* pFilter = 0 ) const;
+
+ virtual SvPseudoObjectRef CreateObj( SvBaseLink & );
+
+ // eine Uebertragung wird abgebrochen, also alle DownloadMedien canceln
+ // (ist zur Zeit nur fuer die FileLinks interressant!)
+ void CancelTransfers();
+
+ static void SetTransferPriority( SvBaseLink& rLink, USHORT nPrio );
+
+ // PrepareReload - alle FileObjects des LinksManagers oder den spz.
+ // aus dem Cache entfernen.
+ virtual void PrepareReload( SvBaseLink* pLnk = 0 );
+
+ // um Status Informationen aus dem FileObject an den BaseLink zu
+ // senden, gibt es eine eigene ClipBoardId. Das SvData-Object hat
+ // dann die entsprechenden Informationen als String.
+ // Wird zur Zeit fuer FileObject in Verbindung mit JavaScript benoetigt
+ // - das braucht Informationen ueber Load/Abort/Error
+ static ULONG RegisterStatusInfoId();
+};
+
+
+// siehe im Cache nach, ob diese Graphic schon existiert
+BOOL GetCacheGraphic( const String& rName, Graphic* pGrf, Size* pSize );
+
+
+
+#endif
+
diff --git a/svx/inc/measctrl.hxx b/svx/inc/measctrl.hxx
new file mode 100644
index 000000000000..815fcee644d2
--- /dev/null
+++ b/svx/inc/measctrl.hxx
@@ -0,0 +1,104 @@
+/*************************************************************************
+ *
+ * $RCSfile: measctrl.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:00:57 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SVX_MEASCTRL_HXX
+#define _SVX_MEASCTRL_HXX
+
+// include ---------------------------------------------------------------
+
+#ifndef _CTRL_HXX //autogen
+#include <vcl/ctrl.hxx>
+#endif
+
+
+class SfxItemSet;
+
+class ExtOutputDevice;
+class SdrMeasureObj;
+class SdrModel;
+
+/*************************************************************************
+|*
+|* SvxXMeasurePreview
+|*
+\************************************************************************/
+class SvxXMeasurePreview : public Control
+{
+ friend class SvxMeasurePage;
+
+private:
+ const SfxItemSet& rAttrs;
+ ExtOutputDevice* pExtOutDev;
+ SdrMeasureObj* pMeasureObj;
+ SdrModel* pModel;
+
+public:
+ SvxXMeasurePreview( Window* pParent, const ResId& rResId,
+ const SfxItemSet& rInAttrs );
+ ~SvxXMeasurePreview();
+
+ virtual void Paint( const Rectangle& rRect );
+ virtual void MouseButtonDown( const MouseEvent& rMEvt );
+
+ void SetAttributes( const SfxItemSet& rInAttrs );
+};
+
+#endif
+
diff --git a/svx/inc/modctrl.hxx b/svx/inc/modctrl.hxx
new file mode 100644
index 000000000000..e2f5f524c693
--- /dev/null
+++ b/svx/inc/modctrl.hxx
@@ -0,0 +1,95 @@
+/*************************************************************************
+ *
+ * $RCSfile: modctrl.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:00:57 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SVX_MODCTRL_HXX
+#define _SVX_MODCTRL_HXX
+
+// include ---------------------------------------------------------------
+
+#ifndef _SFXSTBITEM_HXX //autogen
+#include <sfx2/stbitem.hxx>
+#endif
+
+// class SvxModifyControl ------------------------------------------------
+
+class SvxModifyControl : public SfxStatusBarControl
+{
+public:
+ virtual void StateChanged( USHORT nSID, SfxItemState eState,
+ const SfxPoolItem* pState );
+ virtual void Paint( const UserDrawEvent& rEvt );
+
+ SFX_DECL_STATUSBAR_CONTROL();
+
+ SvxModifyControl( USHORT nId, StatusBar& rStb, SfxBindings& rBind );
+
+ static ULONG GetDefItemWidth(const StatusBar& rStb);
+
+private:
+ BOOL bState;
+
+#ifdef _SVX_MODCTRL_CXX
+ void DrawItemText_Impl();
+#endif
+};
+
+
+#endif
+
diff --git a/svx/inc/msoleexp.hxx b/svx/inc/msoleexp.hxx
new file mode 100644
index 000000000000..0d793dc5199c
--- /dev/null
+++ b/svx/inc/msoleexp.hxx
@@ -0,0 +1,89 @@
+/*************************************************************************
+ *
+ * $RCSfile: msoleexp.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:00:57 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _MSOLEEXP_HXX
+#define _MSOLEEXP_HXX
+
+// for the CreateSdrOLEFromStorage we need the information, how we handle
+// convert able OLE-Objects - this ist stored in
+#define OLE_STARMATH_2_MATHTYPE 0x0001
+#define OLE_STARWRITER_2_WINWORD 0x0002
+#define OLE_STARCALC_2_EXCEL 0x0004
+#define OLE_STARIMPRESS_2_POWERPOINT 0x0008
+
+class SvInPlaceObject;
+class SvStorage;
+
+class SvxMSExportOLEObjects
+{
+ UINT32 nConvertFlags;
+public:
+ SvxMSExportOLEObjects( UINT32 nCnvrtFlgs ) : nConvertFlags(nCnvrtFlgs) {}
+
+ void SetFlags( UINT32 n ) { nConvertFlags = n; }
+ UINT32 GetFlags() const { return nConvertFlags; }
+
+ void ExportOLEObject( SvInPlaceObject& rObj, SvStorage& rDestStg );
+};
+
+
+
+#endif
+
diff --git a/svx/inc/nlbkitem.hxx b/svx/inc/nlbkitem.hxx
new file mode 100644
index 000000000000..40dcc459c3f9
--- /dev/null
+++ b/svx/inc/nlbkitem.hxx
@@ -0,0 +1,108 @@
+/*************************************************************************
+ *
+ * $RCSfile: nlbkitem.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:00:57 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SVX_NLBKITEM_HXX
+#define _SVX_NLBKITEM_HXX
+
+// include ---------------------------------------------------------------
+
+
+#ifndef _SFXENUMITEM_HXX //autogen
+#include <svtools/eitem.hxx>
+#endif
+
+// class SvxNoLinebreakItem ----------------------------------------------
+
+
+/* [Beschreibung]
+
+ PB: ???
+*/
+
+class SvxNoLinebreakItem : public SfxBoolItem
+{
+public:
+ TYPEINFO();
+
+ SvxNoLinebreakItem( const BOOL bBreak = TRUE,
+ const USHORT nId = ITEMID_NOLINEBREAK );
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxPoolItem* Create(SvStream &, USHORT) const;
+ virtual SvStream& Store(SvStream &, USHORT nItemVersion) const;
+
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText, const International * = 0 ) const;
+
+ inline SvxNoLinebreakItem& operator=(const SvxNoLinebreakItem& rLB)
+ {
+ SetValue( rLB.GetValue() );
+ return *this;
+ }
+};
+
+
+
+#endif
+
+
diff --git a/svx/inc/numvset.hxx b/svx/inc/numvset.hxx
new file mode 100644
index 000000000000..19e6b77b9f16
--- /dev/null
+++ b/svx/inc/numvset.hxx
@@ -0,0 +1,170 @@
+/*************************************************************************
+ *
+ * $RCSfile: numvset.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:00:57 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SVX_NUMVSET_HXX
+#define _SVX_NUMVSET_HXX
+
+
+// include ---------------------------------------------------------------
+
+
+#ifndef _VALUESET_HXX //autogen
+#include <svtools/valueset.hxx>
+#endif
+#include <limits.h>
+class SvxBrushItem;
+class SvxNumRule;
+/*-----------------13.02.97 14.02-------------------
+
+--------------------------------------------------*/
+
+struct SvxBmpItemInfo
+{
+ SvxBrushItem* pBrushItem;
+ USHORT nItemId;
+};
+
+/*-----------------09/09/97 01:05pm-----------------
+
+--------------------------------------------------*/
+class SvxNumValueSet : public ValueSet
+{
+ Color aLineColor;
+ USHORT nPageType;
+ BOOL bHTMLMode;
+ Rectangle aOrgRect;
+ VirtualDevice* pVDev;
+ public:
+ SvxNumValueSet( Window* pParent, const ResId& rResId, USHORT nType );
+ ~SvxNumValueSet();
+
+ virtual void UserDraw( const UserDrawEvent& rUDEvt );
+
+ void SetHTMLMode(BOOL bSet) {bHTMLMode = bSet;}
+
+};
+
+/*-----------------13.02.97 09.32-------------------
+
+--------------------------------------------------*/
+
+class SvxBmpNumValueSet : public SvxNumValueSet
+{
+ const List& rStrList;
+ List aGrfBrushItems;
+ Timer aFormatTimer;
+ BOOL bGrfNotFound;
+
+ protected:
+ DECL_STATIC_LINK(SvxBmpNumValueSet, GraphicArrivedHdl_Impl, SvxBrushItem*);
+ DECL_LINK(FormatHdl_Impl, Timer*);
+
+ void SetGrfNotFound(BOOL bSet) {bGrfNotFound = bSet;}
+ BOOL IsGrfNotFound()const {return bGrfNotFound;}
+
+ const List& GetStringList(){return rStrList;}
+ List& GetGrfBrushItems() {return aGrfBrushItems;}
+
+ Timer& GetFormatTimer() {return aFormatTimer;}
+
+ public:
+ SvxBmpNumValueSet( Window* pParent, const ResId& rResId, const List& rStrNames);
+ ~SvxBmpNumValueSet();
+
+ SvxBmpItemInfo* FindInfo(USHORT nInfo);
+ virtual void UserDraw( const UserDrawEvent& rUDEvt );
+
+};
+/*-----------------02.12.97 10:31-------------------
+
+--------------------------------------------------*/
+
+class SvxNumberingPreview : public Window
+{
+ const SvxNumRule* pActNum;
+ Font aStdFont;
+ long nPageWidth;
+ const String* pOutlineNames;
+ BOOL bPosition;
+ UINT16 nActLevel;
+
+ protected:
+ virtual void Paint( const Rectangle& rRect );
+
+ public:
+ SvxNumberingPreview(Window* pParent, const ResId& rResId ) :
+ Window(pParent, rResId),
+ pActNum(0),nPageWidth(0), pOutlineNames(0), bPosition(FALSE), nActLevel(USHRT_MAX) {}
+
+ void SetNumRule(const SvxNumRule* pNum)
+ {pActNum = pNum; Invalidate();};
+ void SetPageWidth(long nPgWidth)
+ {nPageWidth = nPgWidth;}
+ void SetOutlineNames(const String* pNames)
+ {pOutlineNames = pNames;}
+ void SetPositionMode()
+ { bPosition = TRUE;}
+ void SetLevel(USHORT nSet) {nActLevel = nSet;}
+
+};
+
+
+#endif
+
diff --git a/svx/inc/objfac3d.hxx b/svx/inc/objfac3d.hxx
new file mode 100644
index 000000000000..a863adab7594
--- /dev/null
+++ b/svx/inc/objfac3d.hxx
@@ -0,0 +1,90 @@
+/*************************************************************************
+ *
+ * $RCSfile: objfac3d.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:00:57 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _OBJFAC3D_HXX
+#define _OBJFAC3D_HXX
+
+
+/*************************************************************************
+|*
+|* Factory fuer Chart-spezifische Objekte
+|*
+\************************************************************************/
+
+class SdrObjFactory;
+
+
+#ifndef _LINK_HXX //autogen
+#include <tools/link.hxx>
+#endif
+
+class E3dObjFactory
+{
+public:
+ E3dObjFactory();
+ ~E3dObjFactory();
+
+ DECL_LINK(MakeObject, SdrObjFactory*);
+};
+
+
+
+#endif // _OBJFAC3D_HXX
diff --git a/svx/inc/opaqitem.hxx b/svx/inc/opaqitem.hxx
new file mode 100644
index 000000000000..5bb39c0bce91
--- /dev/null
+++ b/svx/inc/opaqitem.hxx
@@ -0,0 +1,123 @@
+/*************************************************************************
+ *
+ * $RCSfile: opaqitem.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:00:57 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SVX_OPAQITEM_HXX
+#define _SVX_OPAQITEM_HXX
+
+// include ---------------------------------------------------------------
+
+#ifndef _SFXENUMITEM_HXX //autogen
+#include <svtools/eitem.hxx>
+#endif
+
+class SvXMLUnitConverter;
+#ifdef _USE_NAMESPACE
+namespace rtl
+{
+#endif
+ class OUString;
+#ifdef _USE_NAMESPACE
+}
+#endif
+
+// class SvxOpaqueItem ---------------------------------------------------
+
+
+/*
+[Beschreibung]
+Dieses Item beschreibt eine logische Variable "Undurchsichtig ja oder nein".
+*/
+
+class SvxOpaqueItem : public SfxBoolItem
+{
+public:
+ TYPEINFO();
+
+ SvxOpaqueItem( const USHORT nId = ITEMID_OPAQUE, const BOOL bOpa = TRUE );
+ inline SvxOpaqueItem &operator=( const SvxOpaqueItem &rCpy );
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxPoolItem* Create(SvStream &, USHORT) const;
+ virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const;
+
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText, const International * = 0 ) const;
+
+ virtual BOOL importXML( const NAMESPACE_RTL(OUString)& rValue, USHORT nMemberId, const SvXMLUnitConverter& rUnitConverter );
+ virtual BOOL exportXML( NAMESPACE_RTL(OUString)& rValue, USHORT nMemberId, const SvXMLUnitConverter& rUnitConverter ) const;
+};
+
+inline SvxOpaqueItem::SvxOpaqueItem( const USHORT nId, const BOOL bOpa )
+ : SfxBoolItem( nId, bOpa )
+{}
+
+inline SvxOpaqueItem &SvxOpaqueItem::operator=( const SvxOpaqueItem &rCpy )
+{
+ SetValue( rCpy.GetValue() );
+ return *this;
+}
+
+
+
+#endif
+
diff --git a/svx/inc/optgenrl.hxx b/svx/inc/optgenrl.hxx
new file mode 100644
index 000000000000..cee8c657acd4
--- /dev/null
+++ b/svx/inc/optgenrl.hxx
@@ -0,0 +1,169 @@
+/*************************************************************************
+ *
+ * $RCSfile: optgenrl.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:00:58 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SVX_OPTGENRL_HXX
+#define _SVX_OPTGENRL_HXX
+
+// include ---------------------------------------------------------------
+
+#ifndef _SFXTABDLG_HXX //autogen
+#include <sfx2/tabdlg.hxx>
+#endif
+#ifndef _FIXED_HXX //autogen
+#include <vcl/fixed.hxx>
+#endif
+#ifndef _EDIT_HXX //autogen
+#include <vcl/edit.hxx>
+#endif
+#ifndef _GROUP_HXX //autogen
+#include <vcl/group.hxx>
+#endif
+
+// forward ---------------------------------------------------------------
+
+class SvxAddressItem;
+struct GeneralTabPage_Impl;
+
+// define ----------------------------------------------------------------
+
+#define SfxGeneralTabPage SvxGeneralTabPage
+
+// defines um von Aussen "uber einen Slot einem bestimmten Edit
+// den Fokus zu setzen.
+#define UNKNOWN_EDIT ((USHORT)0)
+#define COMPANY_EDIT ((USHORT)1)
+#define FIRSTNAME_EDIT ((USHORT)2)
+#define LASTNAME_EDIT ((USHORT)3)
+#define STREET_EDIT ((USHORT)4)
+#define COUNTRY_EDIT ((USHORT)5)
+#define PLZ_EDIT ((USHORT)6)
+#define CITY_EDIT ((USHORT)7)
+#define STATE_EDIT ((USHORT)8)
+#define TITLE_EDIT ((USHORT)9)
+#define POSITION_EDIT ((USHORT)10)
+#define SHORTNAME_EDIT ((USHORT)11)
+#define TELPRIV_EDIT ((USHORT)12)
+#define TELCOMPANY_EDIT ((USHORT)13)
+#define FAX_EDIT ((USHORT)14)
+#define EMAIL_EDIT ((USHORT)15)
+
+// class SvxGeneralTabPage -----------------------------------------------
+
+class SvxGeneralTabPage : public SfxTabPage
+{
+private:
+ FixedText aCompanyLbl;
+ Edit aCompanyEdit;
+ FixedText aNameLbl;
+ FixedText aNameLblRuss;
+ Edit aFatherName;
+ Edit aFirstName;
+ Edit aName;
+ Edit aShortName;
+ FixedText aStreetLbl;
+ FixedText aStreetLblRuss;
+ Edit aStreetEdit;
+ Edit aApartmentNrEdit;
+ FixedText aCityLbl;
+ Edit aPLZEdit;
+ Edit aCityEdit;
+ Edit aUsCityEdit;
+ Edit aUsStateEdit;
+ Edit aUsZipEdit;
+ FixedText aCountryLbl;
+ Edit aCountryEdit;
+ FixedText aTitlePosLbl;
+ Edit aTitleEdit;
+ Edit aPositionEdit;
+ FixedText aPhoneLbl;
+ Edit aTelPrivEdit;
+ Edit aTelCompanyEdit;
+ FixedText aFaxMailLbl;
+ Edit aFaxEdit;
+ Edit aEmailEdit;
+ GroupBox aAddrFrm;
+ CheckBox aUseDataCB;
+
+ GeneralTabPage_Impl* pImpl;
+
+
+#ifdef _SVX_OPTGENRL_CXX
+ DECL_LINK( ModifyHdl_Impl, Edit * );
+
+ String GetAddress_Impl();
+ void SetAddress_Impl( const SvxAddressItem& rAddress );
+#endif
+
+protected:
+ virtual int DeactivatePage( SfxItemSet* pSet );
+
+public:
+ SvxGeneralTabPage( Window* pParent, const SfxItemSet& rSet );
+ ~SvxGeneralTabPage();
+
+ static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet );
+
+ virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual void Reset( const SfxItemSet& rSet );
+};
+
+#endif // #ifndef _SVX_OPTGENRL_HXX
+
+
diff --git a/svx/inc/optgrid.hxx b/svx/inc/optgrid.hxx
new file mode 100644
index 000000000000..8999361daae8
--- /dev/null
+++ b/svx/inc/optgrid.hxx
@@ -0,0 +1,208 @@
+/*************************************************************************
+ *
+ * $RCSfile: optgrid.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:00:58 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SVX_OPTGRID_HXX
+#define _SVX_OPTGRID_HXX
+
+// include ---------------------------------------------------------------
+
+#ifndef _SFXTABDLG_HXX //autogen
+#include <sfx2/tabdlg.hxx>
+#endif
+#ifndef _SFXENUMITEM_HXX //autogen
+#include <svtools/eitem.hxx>
+#endif
+#ifndef _SV_GROUP_HXX //autogen
+#include <vcl/group.hxx>
+#endif
+#ifndef _SV_FIXED_HXX //autogen
+#include <vcl/fixed.hxx>
+#endif
+#ifndef _SV_FIELD_HXX //autogen
+#include <vcl/field.hxx>
+#endif
+
+class SvxGridTabPage;
+
+// class SvxOptionsGrid --------------------------------------------------
+
+class SvxOptionsGrid
+{
+protected:
+ UINT32 nFldDrawX;
+ UINT32 nFldDivisionX;
+ UINT32 nFldDrawY;
+ UINT32 nFldDivisionY;
+ UINT32 nFldSnapX;
+ UINT32 nFldSnapY;
+ BOOL bUseGridsnap:1;
+ BOOL bSynchronize:1;
+ BOOL bGridVisible:1;
+ BOOL bEqualGrid: 1;
+
+public:
+ SvxOptionsGrid();
+ ~SvxOptionsGrid();
+
+ void SetFldDrawX( UINT32 nSet){nFldDrawX = nSet;}
+ void SetFldDivisionX(UINT32 nSet){nFldDivisionX = nSet;}
+ void SetFldDrawY ( UINT32 nSet){nFldDrawY = nSet;}
+ void SetFldDivisionY(UINT32 nSet){nFldDivisionY = nSet;}
+ void SetFldSnapX( UINT32 nSet){nFldSnapX = nSet;}
+ void SetFldSnapY ( UINT32 nSet){nFldSnapY = nSet;}
+ void SetUseGridSnap( BOOL bSet ) {bUseGridsnap = bSet;}
+ void SetSynchronize( BOOL bSet ) {bSynchronize = bSet;}
+ void SetGridVisible( BOOL bSet ) {bGridVisible = bSet;}
+ void SetEqualGrid( BOOL bSet ) {bEqualGrid = bSet;}
+
+ UINT32 GetFldDrawX( ) const { return nFldDrawX; }
+ UINT32 GetFldDivisionX() const { return nFldDivisionX;}
+ UINT32 GetFldDrawY ( ) const { return nFldDrawY; }
+ UINT32 GetFldDivisionY() const { return nFldDivisionY;}
+ UINT32 GetFldSnapX( ) const { return nFldSnapX; }
+ UINT32 GetFldSnapY ( ) const { return nFldSnapY; }
+ BOOL GetUseGridSnap( ) const { return bUseGridsnap; }
+ BOOL GetSynchronize( ) const { return bSynchronize; }
+ BOOL GetGridVisible( ) const { return bGridVisible; }
+ BOOL GetEqualGrid() const { return bEqualGrid; }
+};
+
+// class SvxGridItem -----------------------------------------------------
+
+class SvxGridItem : public SvxOptionsGrid, public SfxPoolItem
+{
+ friend SvxGridTabPage;
+
+public:
+ SvxGridItem( USHORT nWhich) : SfxPoolItem(nWhich){};
+ SvxGridItem( const SvxGridItem& pTestItem );
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual int operator==( const SfxPoolItem& ) const;
+
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText, const International * = 0 ) const;
+
+};
+
+// class SvxGridTabPage --------------------------------------------------
+
+class SvxGridTabPage : public SfxTabPage
+{
+public:
+ SvxGridTabPage( Window* pParent, const SfxItemSet& rSet );
+
+ static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet );
+
+ virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual void Reset( const SfxItemSet& rSet );
+
+ virtual void ActivatePage( const SfxItemSet& rSet );
+ virtual int DeactivatePage( SfxItemSet* pSet );
+
+ void HideSnapGrid();
+
+private:
+ CheckBox aCbxUseGridsnap;
+ CheckBox aCbxGridVisible;
+ CheckBox aCbxSynchronize;
+ GroupBox aGrpOptions; // Neu
+
+ FixedText aFtResolution;
+ FixedText aFtDrawX;
+ MetricField aMtrFldDrawX;
+ FixedText aFtDrawY;
+ MetricField aMtrFldDrawY;
+ FixedText aFtDivision;
+ MetricField aMtrFldDivisionX;
+ MetricField aMtrFldDivisionY;
+ GroupBox aGrpDrawGrid; // Neu
+
+ CheckBox aCbxEqualGrid; // Neu
+ FixedText aFtSnapX; // Neu
+ MetricField aMtrFldSnapX; // Neu
+ FixedText aFtSnapY; // Neu
+ MetricField aMtrFldSnapY; // Neu
+ GroupBox aGrpSnapGrid; // Neu
+
+ BOOL bAttrModified;
+ BOOL bEqualGrid; // Neu
+
+#ifdef _SVX_OPTGRID_CXX
+ DECL_LINK( ChangeDrawXHdl_Impl, void * );
+ DECL_LINK( ChangeDrawYHdl_Impl, void * );
+ DECL_LINK( ChangeSnapXHdl_Impl, void * );
+ DECL_LINK( ChangeSnapYHdl_Impl, void * );
+ DECL_LINK( ChangeGridsnapHdl_Impl, void * );
+ DECL_LINK( ChangeEqualGridHdl_Impl, void * );
+ DECL_LINK( ChangeDivisionXHdl_Impl, void * );
+ DECL_LINK( ChangeDivisionYHdl_Impl, void * );
+
+ //void Init();
+ //void AutoClickHdl(CheckBox* pBox);
+ //void ModifyHdl(Edit* );
+#endif
+};
+
+
+#endif
+
diff --git a/svx/inc/optitems.hxx b/svx/inc/optitems.hxx
new file mode 100644
index 000000000000..a4a07ed575b2
--- /dev/null
+++ b/svx/inc/optitems.hxx
@@ -0,0 +1,168 @@
+/*************************************************************************
+ *
+ * $RCSfile: optitems.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:00:58 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SVX_OPTITEMS_HXX
+#define _SVX_OPTITEMS_HXX
+
+// include ---------------------------------------------------------------
+
+#ifndef _SFXPOOLITEM_HXX //autogen
+#include <svtools/poolitem.hxx>
+#endif
+
+//#ifndef _COM_SUN_STAR_LINGUISTIC_XSPELLALTERNATIVES_HPP_
+//#include <com/sun/star/linguistic/XSpellAlternatives.hpp>
+//#endif
+//#ifndef _COM_SUN_STAR_LINGUISTIC_SPELLFAILURE_HPP_
+//#include <com/sun/star/linguistic/SpellFailure.hpp>
+//#endif
+//#ifndef _COM_SUN_STAR_LINGUISTIC_XSPELLCHECKER_HPP_
+//#include <com/sun/star/linguistic/XSpellChecker.hpp>
+//#endif
+//#ifndef _COM_SUN_STAR_LINGUISTIC_XSPELLCHECKER1_HPP_
+//#include <com/sun/star/linguistic/XSpellChecker1.hpp>
+//#endif
+#ifndef _COM_SUN_STAR_UNO_REFERENCE_HXX_
+#include <com/sun/star/uno/Reference.hxx>
+#endif
+
+// forward ---------------------------------------------------------------
+namespace com{namespace sun{namespace star{
+namespace beans{
+// class XPropertySet;
+}
+namespace linguistic{
+// class XDictionary;
+ class XSpellChecker1;
+// class XOtherLingu;
+ }}}}
+
+
+// class SfxSpellCheckItem -----------------------------------------------
+
+#ifdef ITEMID_SPELLCHECK
+
+class SfxSpellCheckItem: public SfxPoolItem
+{
+public:
+ TYPEINFO();
+
+ SfxSpellCheckItem( ::com::sun::star::uno::Reference< ::com::sun::star::linguistic::XSpellChecker1 > &xChecker,
+ sal_uInt16 nWhich = ITEMID_SPELLCHECK );
+ SfxSpellCheckItem( const SfxSpellCheckItem& rItem );
+
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText, const International * = 0 ) const;
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual int operator==( const SfxPoolItem& ) const;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::linguistic::XSpellChecker1 > GetXSpellChecker() const { return xSpellCheck; }
+
+private:
+ ::com::sun::star::uno::Reference< ::com::sun::star::linguistic::XSpellChecker1 > xSpellCheck;
+};
+#endif
+
+// class SfxHyphenRegionItem ---------------------------------------------
+
+#ifdef ITEMID_HYPHENREGION
+
+class SfxHyphenRegionItem: public SfxPoolItem
+{
+ sal_uInt8 nMinLead;
+ sal_uInt8 nMinTrail;
+
+public:
+ TYPEINFO();
+
+ SfxHyphenRegionItem( const sal_uInt16 nId = ITEMID_HYPHENREGION );
+ SfxHyphenRegionItem( const SfxHyphenRegionItem& rItem );
+
+ virtual int operator==( const SfxPoolItem& ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText, const International * = 0 ) const;
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxPoolItem* Create( SvStream& rStrm, sal_uInt16 nVer ) const;
+ virtual SvStream& Store( SvStream& rStrm, sal_uInt16 ) const;
+
+ inline sal_uInt8 &GetMinLead() { return nMinLead; }
+ inline sal_uInt8 GetMinLead() const { return nMinLead; }
+
+ inline sal_uInt8 &GetMinTrail() { return nMinTrail; }
+ inline sal_uInt8 GetMinTrail() const { return nMinTrail; }
+
+ inline SfxHyphenRegionItem& operator=( const SfxHyphenRegionItem& rNew )
+ {
+ nMinLead = rNew.GetMinLead();
+ nMinTrail = rNew.GetMinTrail();
+ return *this;
+ }
+};
+#endif
+
+
+#endif
+
diff --git a/svx/inc/passwd.hxx b/svx/inc/passwd.hxx
new file mode 100644
index 000000000000..0c1c2509c92f
--- /dev/null
+++ b/svx/inc/passwd.hxx
@@ -0,0 +1,127 @@
+/*************************************************************************
+ *
+ * $RCSfile: passwd.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:00:58 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SVX_PASSWD_HXX
+#define _SVX_PASSWD_HXX
+
+// include ---------------------------------------------------------------
+
+#ifndef _BASEDLGS_HXX //autogen
+#include <sfx2/basedlgs.hxx>
+#endif
+
+#ifndef _FIXED_HXX //autogen
+#include <vcl/fixed.hxx>
+#endif
+
+#ifndef _EDIT_HXX //autogen
+#include <vcl/edit.hxx>
+#endif
+
+#ifndef _GROUP_HXX //autogen
+#include <vcl/group.hxx>
+#endif
+
+#ifndef _BUTTON_HXX //autogen
+#include <vcl/button.hxx>
+#endif
+
+// class SvxPasswordDialog -----------------------------------------------
+
+class SvxPasswordDialog : public SfxModalDialog
+{
+private:
+ FixedText aOldPasswdFT;
+ Edit aOldPasswdED;
+ GroupBox aOldGB;
+ FixedText aNewPasswdFT;
+ Edit aNewPasswdED;
+ FixedText aRepeatPasswdFT;
+ Edit aRepeatPasswdED;
+ GroupBox aNewGB;
+ OKButton aOKBtn;
+ CancelButton aEscBtn;
+ HelpButton aHelpBtn;
+
+ String aOldPassword;
+ String aOldPasswdErrStr;
+ String aRepeatPasswdErrStr;
+
+ FASTBOOL bVerify;
+ FASTBOOL bEmpty;
+
+#ifdef _SVX_PASSWD_CXX
+ DECL_LINK( OKHdl_Impl, OKButton * );
+ DECL_LINK( ModifyHdl_Impl, Edit * );
+#endif
+
+public:
+ SvxPasswordDialog( Window* pParent,
+ FASTBOOL bAllowEmptyPasswords = FALSE );
+ ~SvxPasswordDialog();
+
+ String GetOldPassword() const { return aOldPasswdED.GetText(); }
+ void SetOldPassword( const String& rOld );
+ String GetNewPassword() const { return aNewPasswdED.GetText(); }
+};
+
+
+#endif
+
diff --git a/svx/inc/pfiledlg.hxx b/svx/inc/pfiledlg.hxx
new file mode 100644
index 000000000000..37f7bee29352
--- /dev/null
+++ b/svx/inc/pfiledlg.hxx
@@ -0,0 +1,89 @@
+/*************************************************************************
+ *
+ * $RCSfile: pfiledlg.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:00:58 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SVX_PFILEDLG_HXX
+#define _SVX_PFILEDLG_HXX
+
+// include ---------------------------------------------------------------
+
+#include <sfx2/iodlg.hxx>
+
+/*************************************************************************
+|*
+|* Filedialog to insert Plugin-Fileformats
+|*
+\************************************************************************/
+
+class SvxPluginFileDlg : public SfxFileDialog
+{
+private:
+
+public:
+ // with nKind = SID_INSERT_SOUND or
+ // nKind = SID_INSERT_VIDEO
+ SvxPluginFileDlg (Window *pParent, USHORT nKind );
+ ~SvxPluginFileDlg ();
+
+ static BOOL IsAvailable (USHORT nKind);
+};
+
+#endif // _SVX_PFILEDLG_HXX
+
+
diff --git a/svx/inc/postattr.hxx b/svx/inc/postattr.hxx
new file mode 100644
index 000000000000..550618e17d91
--- /dev/null
+++ b/svx/inc/postattr.hxx
@@ -0,0 +1,168 @@
+/*************************************************************************
+ *
+ * $RCSfile: postattr.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:00:58 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SVX_POSTATTR_HXX
+#define _SVX_POSTATTR_HXX
+
+// include ---------------------------------------------------------------
+
+#ifndef _SFXSTRITEM_HXX //autogen
+#include <svtools/stritem.hxx>
+#endif
+
+// class SvxPostItAuthorItem ---------------------------------------------
+
+#ifdef ITEMID_AUTHOR
+
+/*
+[Beschreibung]
+Dieses Item beschreibt das Autoren-Kuerzel eines Notizzettels.
+*/
+
+class SvxPostItAuthorItem: public SfxStringItem
+{
+public:
+ TYPEINFO();
+
+ SvxPostItAuthorItem( USHORT nWhich = ITEMID_AUTHOR );
+
+ SvxPostItAuthorItem( const String& rAuthor, USHORT nWhich = ITEMID_AUTHOR );
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText, const International * = 0 ) const;
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+
+ inline SvxPostItAuthorItem& operator=( const SvxPostItAuthorItem& rAuthor )
+ {
+ SetValue( rAuthor.GetValue() );
+ return *this;
+ }
+};
+#endif
+
+// class SvxPostItDateItem -----------------------------------------------
+
+#ifdef ITEMID_DATE
+
+/*
+[Beschreibung]
+Dieses Item beschreibt das Datum eines Notizzettels.
+*/
+
+class SvxPostItDateItem: public SfxStringItem
+{
+public:
+ TYPEINFO();
+
+ SvxPostItDateItem( USHORT nWhich = ITEMID_DATE );
+
+ SvxPostItDateItem( const String& rDate, USHORT nWhich = ITEMID_DATE );
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText, const International * = 0 ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+
+ inline SvxPostItDateItem& operator=( const SvxPostItDateItem& rDate )
+ {
+ SetValue( rDate.GetValue() );
+ return *this;
+ }
+};
+#endif
+
+// class SvxPostItTextItem -----------------------------------------------
+
+#ifdef ITEMID_TEXT
+
+/*
+[Beschreibung]
+Dieses Item beschreibt den Text eines Notizzettels.
+*/
+
+class SvxPostItTextItem: public SfxStringItem
+{
+public:
+ TYPEINFO();
+
+ SvxPostItTextItem( USHORT nWhich = ITEMID_TEXT );
+
+ SvxPostItTextItem( const String& rText, USHORT nWhich = ITEMID_TEXT );
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText, const International * = 0 ) const;
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+
+ inline SvxPostItTextItem& operator=( const SvxPostItTextItem& rText )
+ {
+ SetValue( rText.GetValue() );
+ return *this;
+ }
+};
+#endif
+
+
+#endif
+
diff --git a/svx/inc/prntitem.hxx b/svx/inc/prntitem.hxx
new file mode 100644
index 000000000000..a4b3b58911bc
--- /dev/null
+++ b/svx/inc/prntitem.hxx
@@ -0,0 +1,117 @@
+/*************************************************************************
+ *
+ * $RCSfile: prntitem.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:00:58 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SVX_PRNTITEM_HXX
+#define _SVX_PRNTITEM_HXX
+
+// include ---------------------------------------------------------------
+
+#ifndef _SFXENUMITEM_HXX //autogen
+#include <svtools/eitem.hxx>
+#endif
+
+
+
+// class SvxPrintItem ----------------------------------------------------
+
+
+/*
+[Beschreibung]
+Dieses Item beschreibt eine logische Variable "Drucken ja oder nein".
+*/
+
+
+class SvxPrintItem : public SfxBoolItem
+{
+public:
+ TYPEINFO();
+
+ SvxPrintItem( const USHORT nId = ITEMID_PRINT, const BOOL bPrt = TRUE );
+ inline SvxPrintItem &operator=( const SvxPrintItem &rCpy );
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxPoolItem* Create(SvStream &, USHORT) const;
+ virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const;
+
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText, const International * = 0 ) const;
+
+ BOOL importXML( const NAMESPACE_RTL(OUString)& rValue, USHORT nMemberId, const SvXMLUnitConverter& rUnitConverter );
+ BOOL exportXML( NAMESPACE_RTL(OUString)& rValue, USHORT nMemberId, const SvXMLUnitConverter& rUnitConverter ) const;
+};
+
+inline SvxPrintItem::SvxPrintItem( const USHORT nId, const BOOL bPrt )
+ : SfxBoolItem( nId, bPrt )
+{}
+
+inline SvxPrintItem &SvxPrintItem::operator=( const SvxPrintItem &rCpy )
+{
+ SetValue( rCpy.GetValue() );
+ return *this;
+}
+
+
+
+
+#endif
+
diff --git a/svx/inc/protitem.hxx b/svx/inc/protitem.hxx
new file mode 100644
index 000000000000..65606f3480d9
--- /dev/null
+++ b/svx/inc/protitem.hxx
@@ -0,0 +1,147 @@
+/*************************************************************************
+ *
+ * $RCSfile: protitem.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:00:58 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SVX_PROTITEM_HXX
+#define _SVX_PROTITEM_HXX
+
+// include ---------------------------------------------------------------
+
+
+#ifndef _SFXPOOLITEM_HXX //autogen
+#include <svtools/poolitem.hxx>
+#endif
+
+class SvXMLUnitConverter;
+#ifdef _USE_NAMESPACE
+namespace rtl
+{
+#endif
+ class OUString;
+#ifdef _USE_NAMESPACE
+}
+#endif
+
+// class SvxProtectItem --------------------------------------------------
+
+
+/*
+[Beschreibung]
+Dieses Item beschreibt, ob Inhalt, Groesse oder Position geschuetzt werden
+sollen.
+*/
+
+class SvxProtectItem : public SfxPoolItem
+{
+ BOOL bCntnt :1; //Inhalt geschuetzt
+ BOOL bSize :1; //Groesse geschuetzt
+ BOOL bPos :1; //Position geschuetzt
+
+public:
+ TYPEINFO();
+
+ inline SvxProtectItem( const USHORT nId = ITEMID_PROTECT );
+ inline SvxProtectItem &operator=( const SvxProtectItem &rCpy );
+
+ // "pure virtual Methoden" vom SfxPoolItem
+ virtual int operator==( const SfxPoolItem& ) const;
+
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText, const International * = 0 ) const;
+
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxPoolItem* Create(SvStream &, USHORT) const;
+ virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const;
+
+ BOOL IsCntntProtected() const { return bCntnt; }
+ BOOL IsSizeProtected() const { return bSize; }
+ BOOL IsPosProtected() const { return bPos; }
+ void SetCntntProtect( BOOL bNew ) { bCntnt = bNew; }
+ void SetSizeProtect ( BOOL bNew ) { bSize = bNew; }
+ void SetPosProtect ( BOOL bNew ) { bPos = bNew; }
+
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+
+ virtual BOOL importXML( const NAMESPACE_RTL(OUString)& rValue, USHORT nMemberId, const SvXMLUnitConverter& rUnitConverter );
+ virtual BOOL exportXML( NAMESPACE_RTL(OUString)& rValue, USHORT nMemberId, const SvXMLUnitConverter& rUnitConverter ) const;
+};
+
+inline SvxProtectItem::SvxProtectItem( const USHORT nId )
+ : SfxPoolItem( nId )
+{
+ bCntnt = bSize = bPos = FALSE;
+}
+
+inline SvxProtectItem &SvxProtectItem::operator=( const SvxProtectItem &rCpy )
+{
+ bCntnt = rCpy.IsCntntProtected();
+ bSize = rCpy.IsSizeProtected();
+ bPos = rCpy.IsPosProtected();
+ return *this;
+}
+
+
+
+
+#endif
+
diff --git a/svx/inc/prtqry.hxx b/svx/inc/prtqry.hxx
new file mode 100644
index 000000000000..e37e54945f3d
--- /dev/null
+++ b/svx/inc/prtqry.hxx
@@ -0,0 +1,75 @@
+/*************************************************************************
+ *
+ * $RCSfile: prtqry.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:00:58 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SVX_PRTQRY_HXX
+#define _SVX_PRTQRY_HXX
+
+#ifndef _SV_MSGBOX_HXX
+#include <vcl/msgbox.hxx>
+#endif
+
+class SvxPrtQryBox : public MessBox
+{
+public:
+ SvxPrtQryBox(Window* pParent);
+ ~SvxPrtQryBox();
+};
+
+#endif
diff --git a/svx/inc/pszctrl.hxx b/svx/inc/pszctrl.hxx
new file mode 100644
index 000000000000..6e2a84d98f6c
--- /dev/null
+++ b/svx/inc/pszctrl.hxx
@@ -0,0 +1,101 @@
+/*************************************************************************
+ *
+ * $RCSfile: pszctrl.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:00:58 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SVX_PSZCTRL_HXX
+#define _SVX_PSZCTRL_HXX
+
+// include ---------------------------------------------------------------
+
+#ifndef _SFXSTBITEM_HXX //autogen
+#include <sfx2/stbitem.hxx>
+#endif
+
+// forward ---------------------------------------------------------------
+
+class SvxSizeItem;
+struct SvxPosSizeStatusBarControl_Impl;
+
+// class SvxPosSizeToolBoxControl ----------------------------------------
+
+class SvxPosSizeStatusBarControl : public SfxStatusBarControl
+{
+private:
+ SvxPosSizeStatusBarControl_Impl* pImp;
+
+ SfxStatusForwarder aPosForwarder;
+ SfxStatusForwarder aTableForwarder;
+ SfxStatusForwarder aFuncForwarder;
+
+public:
+ SFX_DECL_STATUSBAR_CONTROL();
+
+ SvxPosSizeStatusBarControl( USHORT nId, StatusBar& rStb, SfxBindings& rBind );
+ ~SvxPosSizeStatusBarControl();
+
+ virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState );
+ virtual void Paint( const UserDrawEvent& rEvt );
+ virtual void Command( const CommandEvent& rCEvt );
+
+ static ULONG GetDefItemWidth( const StatusBar& rStb );
+};
+
+
+#endif
+
diff --git a/svx/inc/relfld.hxx b/svx/inc/relfld.hxx
new file mode 100644
index 000000000000..45230e83e73d
--- /dev/null
+++ b/svx/inc/relfld.hxx
@@ -0,0 +1,105 @@
+/*************************************************************************
+ *
+ * $RCSfile: relfld.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:00:58 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SVX_RELFLD_HXX
+#define _SVX_RELFLD_HXX
+
+// include ---------------------------------------------------------------
+
+#ifndef _FIELD_HXX //autogen
+#include <vcl/field.hxx>
+#endif
+
+
+
+// class SvxRelativeField ------------------------------------------------
+/*
+ [Beschreibung]
+
+ "Ahnlich der Klasse FontSizeBox. Abgeleitet von der Klasse MetricField.
+ Zus"atzliche Funktionalit"at: relative Angaben.
+*/
+
+class SvxRelativeField : public MetricField
+{
+private:
+ USHORT nRelMin;
+ USHORT nRelMax;
+ USHORT nRelStep;
+ BOOL bRelativeMode;
+ BOOL bRelative;
+
+protected:
+ void Modify();
+
+public:
+ SvxRelativeField( Window* pParent, WinBits nWinStyle = 0 );
+ SvxRelativeField( Window* pParent, const ResId& rResId );
+
+ void EnableRelativeMode( USHORT nMin = 50, USHORT nMax = 150,
+ USHORT nStep = 5 );
+ BOOL IsRelativeMode() const { return bRelativeMode; }
+ void SetRelative( BOOL bRelative = FALSE );
+ BOOL IsRelative() const { return bRelative; }
+};
+
+
+#endif
+
diff --git a/svx/inc/rotmodit.hxx b/svx/inc/rotmodit.hxx
new file mode 100644
index 000000000000..2c563926d47c
--- /dev/null
+++ b/svx/inc/rotmodit.hxx
@@ -0,0 +1,104 @@
+/*************************************************************************
+ *
+ * $RCSfile: rotmodit.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:00:58 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _SVX_ROTMODIT_HXX
+#define _SVX_ROTMODIT_HXX
+
+#ifndef _SFXENUMITEM_HXX //autogen
+#include <svtools/eitem.hxx>
+#endif
+
+//----------------------------------------------------------------------------
+// Ausrichtung bei gedrehtem Text
+
+enum SvxRotateMode
+{
+ SVX_ROTATE_MODE_STANDARD,
+ SVX_ROTATE_MODE_TOP,
+ SVX_ROTATE_MODE_CENTER,
+ SVX_ROTATE_MODE_BOTTOM
+};
+
+class SvxRotateModeItem: public SfxEnumItem
+{
+public:
+ TYPEINFO();
+
+ SvxRotateModeItem( SvxRotateMode eMode, USHORT nWhich);
+ SvxRotateModeItem( const SvxRotateModeItem& rItem );
+ ~SvxRotateModeItem();
+
+ virtual USHORT GetValueCount() const;
+ virtual String GetValueText( USHORT nVal ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+ virtual SfxPoolItem* Create(SvStream &, USHORT) const;
+ virtual USHORT GetVersion( USHORT nFileVersion ) const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String& rText, const International * = 0 ) const;
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+};
+
+
+#endif
+
diff --git a/svx/inc/rulritem.hxx b/svx/inc/rulritem.hxx
new file mode 100644
index 000000000000..0b3c0ddbcd81
--- /dev/null
+++ b/svx/inc/rulritem.hxx
@@ -0,0 +1,306 @@
+/*************************************************************************
+ *
+ * $RCSfile: rulritem.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:00:58 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SVX_RULRITEM_HXX
+#define _SVX_RULRITEM_HXX
+
+// include ---------------------------------------------------------------
+
+
+#ifndef _GEN_HXX //autogen
+#include <tools/gen.hxx>
+#endif
+#ifndef _SFXPOOLITEM_HXX //autogen
+#include <svtools/poolitem.hxx>
+#endif
+
+// class SvxLongLRSpaceItem ----------------------------------------------
+
+class SvxLongLRSpaceItem : public SfxPoolItem
+{
+ long lLeft; // nLeft oder der neg. Erstzeileneinzug
+ long lRight; // der unproblematische rechte Rand
+
+ protected:
+
+ virtual int operator==( const SfxPoolItem& ) const;
+
+ virtual String GetValueText() const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText, const International * = 0 ) const;
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+
+private:
+ const SvxLongLRSpaceItem& operator=(const SvxLongLRSpaceItem &); // n.i.
+
+public:
+ TYPEINFO();
+ SvxLongLRSpaceItem(long lLeft, long lRight, USHORT nId);
+ SvxLongLRSpaceItem(const SvxLongLRSpaceItem &);
+
+ long GetLeft() const { return lLeft; }
+ long GetRight() const { return lRight; }
+ void SetLeft(long lArgLeft) {lLeft=lArgLeft;}
+ void SetRight(long lArgRight) {lRight=lArgRight;}
+};
+
+// class SvxLongULSpaceItem ----------------------------------------------
+
+class SvxLongULSpaceItem : public SfxPoolItem
+{
+ long lLeft; // nLeft oder der neg. Erstzeileneinzug
+ long lRight; // der unproblematische rechte Rand
+
+ protected:
+
+ virtual int operator==( const SfxPoolItem& ) const;
+
+ virtual String GetValueText() const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText, const International * = 0 ) const;
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+
+private:
+ const SvxLongULSpaceItem& operator=(const SvxLongULSpaceItem &); // n.i.
+
+public:
+ TYPEINFO();
+ SvxLongULSpaceItem(long lUpper, long lLower, USHORT nId);
+ SvxLongULSpaceItem(const SvxLongULSpaceItem &);
+
+ long GetUpper() const { return lLeft; }
+ long GetLower() const { return lRight; }
+ void SetUpper(long lArgLeft) {lLeft=lArgLeft;}
+ void SetLower(long lArgRight) {lRight=lArgRight;}
+};
+
+// class SvxPagePosSizeItem ----------------------------------------------
+
+class SvxPagePosSizeItem : public SfxPoolItem
+{
+ Point aPos;
+ long lWidth;
+ long lHeight;
+protected:
+ virtual int operator==( const SfxPoolItem& ) const;
+
+ virtual String GetValueText() const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText, const International * = 0 ) const;
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+
+private:
+ const SvxPagePosSizeItem& operator=(const SvxPagePosSizeItem &); // n.i.
+public:
+ TYPEINFO();
+ SvxPagePosSizeItem(const Point &rPos, long lWidth, long lHeight);
+ SvxPagePosSizeItem(const SvxPagePosSizeItem &);
+
+ const Point &GetPos() const { return aPos; }
+ long GetWidth() const { return lWidth; }
+ long GetHeight() const { return lHeight; }
+};
+
+// struct SvxColumnDescription -------------------------------------------
+
+struct SvxColumnDescription
+{
+ USHORT nStart; /* Spaltenbeginn */
+ USHORT nEnd; /* Spaltenende */
+ BOOL bVisible; /* Sichtbarkeit */
+ SvxColumnDescription():
+ nStart(0), nEnd(0), bVisible(TRUE) {}
+ SvxColumnDescription(const SvxColumnDescription &rCopy) :
+ nStart(rCopy.nStart), nEnd(rCopy.nEnd), bVisible(rCopy.bVisible) {}
+ SvxColumnDescription(USHORT start, USHORT end, BOOL bVis = TRUE):
+ nStart(start), nEnd(end), bVisible(bVis) {}
+ int operator==(const SvxColumnDescription &rCmp) const {
+ return nStart == rCmp.nStart &&
+ bVisible == rCmp.bVisible &&
+ nEnd == rCmp.nEnd;
+ }
+ int operator!=(const SvxColumnDescription &rCmp) const {
+ return !operator==(rCmp);
+ }
+ USHORT GetWidth() const { return nEnd - nStart; }
+};
+
+// class SvxColumnItem ---------------------------------------------------
+
+typedef SvPtrarr SvxColumns;
+
+class SvxColumnItem : public SfxPoolItem
+{
+ SvxColumns aColumns;// Spaltenarray
+ long nLeft, // Linker Rand bei Tabelle
+ nRight; // Rechter Rand bei Tabelle; bei Spalten immer gleich
+ // zum umgebenden Rahmen
+ USHORT nActColumn; // die aktuelle Spalte
+ BOOL bTable; // Tabelle?
+ BOOL bOrtho; // Gleichverteilte Spalten
+
+ void DeleteAndDestroyColumns();
+
+protected:
+ virtual int operator==( const SfxPoolItem& ) const;
+
+ virtual String GetValueText() const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText, const International * = 0 ) const;
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+public:
+ TYPEINFO();
+ // rechter Rand des umgebenden Rahmens
+ // nLeft, nRight jeweils der Abstand zum umgebenden Rahmen
+ SvxColumnItem(USHORT nAct = 0); // Spalten
+ SvxColumnItem(USHORT nActCol,
+ USHORT nLeft, USHORT nRight = 0); // Tabelle mit Raendern
+ SvxColumnItem(const SvxColumnItem &);
+ ~SvxColumnItem();
+
+ const SvxColumnItem &operator=(const SvxColumnItem &);
+
+ USHORT Count() const { return aColumns.Count(); }
+ SvxColumnDescription &operator[](USHORT i)
+ { return *(SvxColumnDescription*)aColumns[i]; }
+ const SvxColumnDescription &operator[](USHORT i) const
+ { return *(SvxColumnDescription*)aColumns[i]; }
+ void Insert(const SvxColumnDescription &rDesc, USHORT nPos) {
+ SvxColumnDescription* pDesc = new SvxColumnDescription(rDesc);
+ aColumns.Insert(pDesc, nPos);
+ }
+ void Append(const SvxColumnDescription &rDesc) { Insert(rDesc, Count()); }
+ void SetLeft(long left) { nLeft = left; }
+ void SetRight(long right) { nRight = right; }
+ void SetActColumn(USHORT nCol) { nActColumn = nCol; }
+
+ USHORT GetActColumn() const { return nActColumn; }
+ BOOL IsFirstAct() const { return nActColumn == 0; }
+ BOOL IsLastAct() const { return nActColumn == Count()-1; }
+ long GetLeft() { return nLeft; }
+ long GetRight() { return nRight; }
+
+ BOOL IsTable() const { return bTable; }
+
+ BOOL CalcOrtho() const;
+ void SetOrtho(BOOL bVal) { bOrtho = bVal; }
+ BOOL IsOrtho () const { return FALSE ; }
+
+ BOOL IsConsistent() const { return nActColumn < aColumns.Count(); }
+ long GetVisibleRight() const;// rechter sichtbare Rand der aktuellen Spalte
+};
+
+// class SvxObjectItem ---------------------------------------------------
+
+class SvxObjectItem : public SfxPoolItem
+{
+private:
+ long nStartX; /* Beginn in X-Richtung */
+ long nEndX; /* Ende in X-Richtung */
+ long nStartY; /* Beginn in Y-Richtung */
+ long nEndY; /* Ende in Y-Richtung */
+ BOOL bLimits; /* Grenzwertkontrolle durch die Applikation */
+protected:
+ virtual int operator==( const SfxPoolItem& ) const;
+
+ virtual String GetValueText() const;
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresMetric,
+ String &rText, const International * = 0 ) const;
+
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
+private:
+ const SvxObjectItem &operator=(const SvxObjectItem &); // n.i.
+public:
+ TYPEINFO();
+ SvxObjectItem(long nStartX, long nEndX,
+ long nStartY, long nEndY,
+ BOOL bLimits = FALSE);
+ SvxObjectItem(const SvxObjectItem &);
+
+ BOOL HasLimits() const { return bLimits; }
+
+ long GetStartX() const { return nStartX; }
+ long GetEndX() const { return nEndX; }
+ long GetStartY() const { return nStartY; }
+ long GetEndY() const { return nEndY; }
+
+ void SetStartX(long l) { nStartX = l; }
+ void SetEndX(long l) { nEndX = l; }
+ void SetStartY(long l) { nStartY = l; }
+ void SetEndY(long l) { nEndY = l; }
+};
+
+
+#endif
+
diff --git a/svx/inc/selctrl.hxx b/svx/inc/selctrl.hxx
new file mode 100644
index 000000000000..16ea59bbf307
--- /dev/null
+++ b/svx/inc/selctrl.hxx
@@ -0,0 +1,96 @@
+/*************************************************************************
+ *
+ * $RCSfile: selctrl.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:00:59 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SVX_SELCTRL_HXX
+#define _SVX_SELCTRL_HXX
+
+// include ---------------------------------------------------------------
+
+#ifndef _SFXSTBITEM_HXX //autogen
+#include <sfx2/stbitem.hxx>
+#endif
+
+// class SvxSelModeControl -----------------------------------------------
+
+class SvxSelectionModeControl : public SfxStatusBarControl
+{
+public:
+ virtual void StateChanged( USHORT nSID, SfxItemState eState,
+ const SfxPoolItem* pState );
+ virtual void Click();
+ virtual void Paint( const UserDrawEvent& rEvt );
+
+ SFX_DECL_STATUSBAR_CONTROL();
+
+ SvxSelectionModeControl( USHORT nId, StatusBar& rStb, SfxBindings& rBind );
+
+ static ULONG GetDefItemWidth(const StatusBar& rStb);
+
+private:
+ USHORT nState;
+
+#ifdef _SVX_SELCTRL_CXX
+ void DrawItemText_Impl();
+#endif
+};
+
+
+#endif
+
diff --git a/svx/inc/sjctrl.hxx b/svx/inc/sjctrl.hxx
new file mode 100644
index 000000000000..3f86a043a662
--- /dev/null
+++ b/svx/inc/sjctrl.hxx
@@ -0,0 +1,682 @@
+/*************************************************************************
+ *
+ * $RCSfile: sjctrl.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:00:59 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifdef SOLAR_JAVA
+
+#ifndef _SFXSFXJS_HXX
+#include <sfx2/sfxjs.hxx>
+#endif
+
+class VCControl;
+class VCForm;
+class VCManager;
+class VCRadioManager;
+
+
+// Basis-Klasse aller VCControl-Wrapper-Klassen
+// Haelt Verweis auf das Control und handelt einige gemeinsame Properties
+class ImpSjJScriptControlBase
+{
+ protected:
+ VCControl* pControl;
+
+ public:
+ // Beibehalten bis zum Vollupdate
+ /*
+ String getName() const;
+ void setName( const String & aStrg );
+ String getValue() const;
+ String getType() const;
+ */
+
+ // Methoden von Java --> C++ (f"ur Properties)
+ //--------------------------------------------
+ String ImpGetName() const;
+ void ImpSetName( const String & aStrg );
+ String ImpGetValue() const;
+ void ImpSetValue( const String & aStrg );
+ String ImpGetType() const;
+
+ // Konstruktor
+ ImpSjJScriptControlBase::ImpSjJScriptControlBase( VCControl* _pControl );
+};
+
+//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+// Button-Control
+class ImpSjJScriptButtonObject : public SjJScriptButtonObject, ImpSjJScriptControlBase
+{
+ public:
+ // Methoden von Java --> C++ (f"ur Properties)
+ //--------------------------------------------
+ // Basisklassen-Properties, werden an ImpSjJScriptControlBase durchgereicht
+ virtual String getName() const;
+ virtual void setName( const String & aStrg );
+ virtual String getValue() const;
+ virtual void setValue( const String & aStrg );
+ virtual String getType() const;
+
+ // Methoden des Objektes
+ virtual void click();
+
+ // Events (C++ --> Java)
+ //----------------------
+#if SUPD > 356 || defined(AB_EVENT_TEST)
+ // Neue Event-Schnittstelle mit Function-Objekten
+ virtual SjJScriptFunctionObject* getOnClick_Fct() const;
+ virtual void setOnClick_Fct( SjJScriptFunctionObject* pFunctionObject );
+#endif
+ virtual String getOnClick() const;
+ virtual void setOnClick( const String & aSourceStrg );
+ void onClick();
+
+ // Konstruktor
+ ImpSjJScriptButtonObject( VCControl* _pControl, SjJSbxObject * p );
+};
+
+//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+// PasswordControl (Edit-Control zur Password-Eingabe)
+class ImpSjJScriptPasswordObject : public SjJScriptPasswordObject, ImpSjJScriptControlBase
+{
+ public:
+ // Methoden von Java --> C++ (f"ur Properties)
+ //--------------------------------------------
+ // Basisklassen-Properties, werden an ImpSjJScriptControlBase durchgereicht
+ virtual String getName() const;
+ virtual void setName( const String & aStrg );
+ virtual String getValue() const;
+ virtual String getType() const;
+
+ virtual String getDefaultValue() const;
+ virtual void setDefaultValue( const String & aStrg );
+ virtual void setValue( const String & aStrg );
+
+ // Methoden des Objektes
+ virtual void focus();
+ virtual void blur();
+ virtual void select();
+
+ // Events (C++ --> Java)
+ //----------------------
+ // keine !
+
+ // Konstruktor
+ ImpSjJScriptPasswordObject( VCControl* _pControl, SjJSbxObject * p );
+};
+
+//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+class ImpSjJScriptCheckboxObject : public SjJScriptCheckboxObject, ImpSjJScriptControlBase
+{
+ public:
+ // Methoden von Java --> C++ (f"ur Properties)
+ //--------------------------------------------
+ // Basisklassen-Properties, werden an ImpSjJScriptControlBase durchgereicht
+ virtual String getName() const;
+ virtual void setName( const String & aStrg );
+ virtual String getValue() const;
+ virtual String getType() const;
+
+ virtual BOOL getChecked() const;
+ virtual void setChecked( BOOL bCheck );
+ virtual BOOL getDefaultChecked() const;
+ virtual void setDefaultChecked( BOOL bCheck );
+ // getValue() wird in der Basisklasse definiert
+ virtual void setValue( const String & aStrg );
+
+ // Methoden des Objektes
+ virtual void click();
+
+ // Events (C++ --> Java)
+ //----------------------
+#if SUPD > 356 || defined(AB_EVENT_TEST)
+ // Neue Event-Schnittstelle mit Function-Objekten
+ virtual SjJScriptFunctionObject* getOnClick_Fct() const;
+ virtual void setOnClick_Fct( SjJScriptFunctionObject* pFunctionObject );
+#endif
+ virtual String getOnClick() const;
+ virtual void setOnClick( const String & aSourceStrg );
+ void onClick();
+
+ // Konstruktor
+ ImpSjJScriptCheckboxObject( VCControl* _pControl, SjJSbxObject * p );
+};
+
+//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+// Wrapper-Klasse fuer RadioArray
+class ImpSjJScriptRadioArray: public SjJSbxArrayObject
+{
+ VCRadioManager* pMgr;
+public:
+ INT32 ImpSjJScriptRadioArray::getLength() const;
+ SjJSbxObject* ImpSjJScriptRadioArray::getElement( INT32 nIndex ) const;
+ SjJSbxObject* ImpSjJScriptRadioArray::getElement_String( const String & aName ) const;
+
+ // Konstruktor
+ ImpSjJScriptRadioArray::ImpSjJScriptRadioArray( VCRadioManager* _pMgr, SjJSbxObject * p );
+};
+
+//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+class ImpSjJScriptRadioObject : public SjJScriptRadioObject, ImpSjJScriptControlBase
+{
+ public:
+ // Methoden von Java --> C++ (f"ur Properties)
+ //--------------------------------------------
+ // Basisklassen-Properties, werden an ImpSjJScriptControlBase durchgereicht
+ virtual String getName() const;
+ virtual void setName( const String & aStrg );
+ virtual String getValue() const;
+ virtual String getType() const;
+
+ // Properties von SjJScriptCheckboxObject
+ virtual BOOL getChecked() const;
+ virtual void setChecked( BOOL bCheck );
+ virtual BOOL getDefaultChecked() const;
+ virtual void setDefaultChecked( BOOL bCheck );
+ // getValue() wird in der Basisklasse definiert
+ virtual void setValue( const String & aStrg );
+
+ // yyy Raus zum inkompatiblen
+ //virtual INT32 getLength();
+
+ // Methoden des Objektes
+ virtual void click();
+
+ // Events (C++ --> Java)
+#if SUPD > 356 || defined(AB_EVENT_TEST)
+ // Neue Event-Schnittstelle mit Function-Objekten
+ virtual SjJScriptFunctionObject* getOnClick_Fct() const;
+ virtual void setOnClick_Fct( SjJScriptFunctionObject* pFunctionObject );
+#endif
+ virtual String getOnClick() const;
+ virtual void setOnClick( const String & aSourceStrg );
+ void onClick();
+
+ // Konstruktor
+ ImpSjJScriptRadioObject( VCControl* _pControl, SjJSbxObject * p );
+};
+
+//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+class ImpSjJScriptSelectObject : public SjJScriptSelectObject, ImpSjJScriptControlBase
+{
+ public:
+ // Methoden von Java --> C++ (f"ur Properties)
+ //--------------------------------------------
+ // Basisklassen-Properties, werden an ImpSjJScriptControlBase durchgereicht
+ virtual String getName() const;
+ virtual void setName( const String & aStrg );
+ virtual String getValue() const;
+ virtual String getType() const;
+
+ virtual INT32 getLength();
+ virtual INT32 getSelectedIndex() const;
+ virtual void setSelectedIndex( INT32 nNo );
+
+ // liefert eine Array von Option-Objekten
+ //yyy Raus zum inkompatiblen
+ //virtual SjJSbxArrayObject * getOptions();
+
+ // Methoden des Objektes
+ virtual void focus();
+ virtual void blur();
+
+ // Events (C++ --> Java)
+ //----------------------
+#if SUPD > 356 || defined(AB_EVENT_TEST)
+ // Neue Event-Schnittstelle mit Function-Objekten
+ virtual SjJScriptFunctionObject* getOnBlur_Fct() const;
+ virtual void setOnBlur_Fct( SjJScriptFunctionObject* pFunctionObject );
+ virtual SjJScriptFunctionObject* getOnChange_Fct() const;
+ virtual void setOnChange_Fct( SjJScriptFunctionObject* pFunctionObject );
+ virtual SjJScriptFunctionObject* getOnFocus_Fct() const;
+ virtual void setOnFocus_Fct( SjJScriptFunctionObject* pFunctionObject );
+#endif
+ virtual String getOnBlur() const;
+ virtual void setOnBlur( const String & aSourceStrg );
+ void onBlur();
+ virtual String getOnChange() const;
+ virtual void setOnChange( const String & aSourceStrg );
+ void onChange();
+ virtual String getOnFocus() const;
+ virtual void setOnFocus( const String & aSourceStrg );
+ void onFocus();
+
+ // SjJSbxArrayObject-Methoden
+ virtual INT32 getLength() const;
+ // Zugriff "uber den Index
+ virtual SjJSbxObject * getElement( INT32 nIndex ) const;
+ // Zugriff "uber den Namen
+ // native Java-Methoden k"onnen (noch) nicht "uberladen werden
+ //virtual SjJSbxObject * getElement_String( const String & aName ) const;
+
+ // Konstruktor
+ ImpSjJScriptSelectObject( VCControl* _pControl, SjJSbxObject * p );
+
+ // zum Setzen von Eintr"agen am Objket (zum Aufruf von Java aus) 15.1.1997
+ virtual void setOption( INT32 nIndex, const String & aOptionText,
+ const String & aOptionValue,
+ BOOL bDefaultSelected, BOOL bSelected );
+
+ // Schnittstelle fuer die Properties der Option-Objekte
+ virtual BOOL getOptionDefaultSelected( INT32 nIndex ) const;
+ virtual void setOptionDefaultSelected( BOOL bSelected, INT32 nIndex );
+ virtual BOOL getOptionSelected( INT32 nIndex ) const;
+ virtual void setOptionSelected( BOOL bSelected, INT32 nIndex );
+ virtual String getOptionText( INT32 nIndex ) const;
+ virtual void setOptionText( const String & sText, INT32 nIndex );
+ virtual void setOptionValue( const String & sText, INT32 nIndex );
+ virtual String getOptionValue( INT32 nIndex ) const;
+};
+
+//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+// Wieso von Controlbase abgeleitet?
+
+class ImpSjJScriptOptionObject : public SjJScriptOptionObject, ImpSjJScriptControlBase
+{
+ USHORT nListBoxIndex;
+ public:
+ // Methoden von Java --> C++ (f"ur Properties)
+ //--------------------------------------------
+ virtual BOOL getdefaultSelected() const;
+ virtual void setdefaultSelected( BOOL bSelected );
+ virtual INT32 getIndex() const;
+ virtual BOOL getSelected() const;
+ virtual void setSelected( BOOL bSelected );
+
+
+ //yyy Zum Vollupdate raus:
+ /*
+ virtual INT32 getSelectedIndex() const;
+ virtual void setSelectedIndex( INT32 nNo );
+ */
+
+
+ virtual String getText() const;
+ virtual void setText( const String & sText );
+ // getValue() wird in der Basisklasse definiert
+ virtual String getValue() const;
+ virtual void setValue( const String & aStrg );
+
+
+ // DUMMY-Methoden
+ virtual String getName() const { return "";}
+ virtual void setName( const String &s) { }
+ virtual String getType() const { return "";}
+ // Methoden des Objektes
+ // keine !
+
+ // Events (C++ --> Java)
+ //----------------------
+ // keine !
+
+ // Konstruktor
+ ImpSjJScriptOptionObject( VCControl* _pControl, SjJSbxObject * p, USHORT _nListBoxIndex );
+};
+
+//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+// Eigene Klasse fuer forms-Array anlegen
+class SjJSbxFormsArray: public SfxJSArray
+{
+ VCManager* pManager;
+
+ public:
+ // SjJSbxArrayObject-Methoden
+ virtual INT32 getLength() const;
+ // Zugriff "uber den Index
+ virtual SjJSbxObject * getElement( INT32 nIndex ) const;
+ // Zugriff "uber den Namen
+ // native Java-Methoden k"onnen (noch) nicht "uberladen werden
+ virtual SjJSbxObject * getElement_String( const String & aName ) const;
+
+ // Konstruktor
+ SjJSbxFormsArray( VCManager * _pManager, SjJSbxObject * p );
+};
+
+//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+class ImpSjJScriptTextObject : public SjJScriptTextObject, ImpSjJScriptControlBase
+{
+ public:
+ // Methoden von Java --> C++ (f"ur Properties)
+ //--------------------------------------------
+ // Basisklassen-Properties, werden an ImpSjJScriptControlBase durchgereicht
+ virtual String getName() const;
+ virtual void setName( const String & aStrg );
+ virtual String getValue() const;
+ virtual String getType() const;
+
+ virtual String getDefaultValue() const;
+ virtual void setDefaultValue( const String & aStrg );
+ // getValue() wird in der Basisklasse definiert
+ virtual void setValue( const String & aStrg );
+
+ // Methoden des Objektes
+ virtual void focus();
+ virtual void blur();
+ virtual void select();
+
+ // Events (C++ --> Java)
+ //----------------------
+#if SUPD > 356 || defined(AB_EVENT_TEST)
+ // Neue Event-Schnittstelle mit Function-Objekten
+ virtual SjJScriptFunctionObject* getOnBlur_Fct() const;
+ virtual void setOnBlur_Fct( SjJScriptFunctionObject* pFunctionObject );
+ virtual SjJScriptFunctionObject* getOnChange_Fct() const;
+ virtual void setOnChange_Fct( SjJScriptFunctionObject* pFunctionObject );
+ virtual SjJScriptFunctionObject* getOnFocus_Fct() const;
+ virtual void setOnFocus_Fct( SjJScriptFunctionObject* pFunctionObject );
+ virtual SjJScriptFunctionObject* getOnSelect_Fct() const;
+ virtual void setOnSelect_Fct( SjJScriptFunctionObject* pFunctionObject );
+#endif
+ virtual String getOnBlur() const;
+ virtual void setOnBlur( const String & aSourceStrg );
+ void onBlur();
+ virtual String getOnChange() const;
+ virtual void setOnChange( const String & aSourceStrg );
+ void onChange();
+ virtual String getOnFocus() const;
+ virtual void setOnFocus( const String & aSourceStrg );
+ void onFocus();
+ virtual String getOnSelect() const;
+ virtual void setOnSelect( const String & aSourceStrg );
+ void onSelect();
+
+ // Konstruktor
+ ImpSjJScriptTextObject( VCControl* _pControl, SjJSbxObject * p );
+};
+
+//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+class ImpSjJScriptTextareaObject : public SjJScriptTextareaObject, ImpSjJScriptControlBase
+{
+ public:
+ // Methoden von Java --> C++ (f"ur Properties)
+ //--------------------------------------------
+ // Basisklassen-Properties, werden an ImpSjJScriptControlBase durchgereicht
+ virtual String getName() const;
+ virtual void setName( const String & aStrg );
+ virtual String getValue() const;
+ virtual String getType() const;
+
+ virtual String getDefaultValue() const;
+ virtual void setDefaultValue( const String & aStrg );
+ // getValue() wird in der Basisklasse definiert
+ virtual void setValue( const String & aStrg );
+
+ // Methoden des Objektes
+ virtual void focus();
+ virtual void blur();
+ virtual void select();
+
+ // Events (C++ --> Java)
+ //----------------------
+#if SUPD > 356 || defined(AB_EVENT_TEST)
+ // Neue Event-Schnittstelle mit Function-Objekten
+ virtual SjJScriptFunctionObject* getOnBlur_Fct() const;
+ virtual void setOnBlur_Fct( SjJScriptFunctionObject* pFunctionObject );
+ virtual SjJScriptFunctionObject* getOnChange_Fct() const;
+ virtual void setOnChange_Fct( SjJScriptFunctionObject* pFunctionObject );
+ virtual SjJScriptFunctionObject* getOnFocus_Fct() const;
+ virtual void setOnFocus_Fct( SjJScriptFunctionObject* pFunctionObject );
+ virtual SjJScriptFunctionObject* getOnSelect_Fct() const;
+ virtual void setOnSelect_Fct( SjJScriptFunctionObject* pFunctionObject );
+#endif
+ virtual String getOnBlur() const;
+ virtual void setOnBlur( const String & aSourceStrg );
+ void onBlur();
+ virtual String getOnChange() const;
+ virtual void setOnChange( const String & aSourceStrg );
+ void onChange();
+ virtual String getOnFocus() const;
+ virtual void setOnFocus( const String & aSourceStrg );
+ void onFocus();
+ virtual String getOnSelect() const;
+ virtual void setOnSelect( const String & aSourceStrg );
+ void onSelect();
+
+ // Konstruktor
+ ImpSjJScriptTextareaObject( VCControl* _pControl, SjJSbxObject * p );
+};
+
+//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+class ImpSjJScriptSubmitObject : public SjJScriptSubmitObject, ImpSjJScriptControlBase
+{
+ // Identisch mit ButtonObject
+ public:
+ // Methoden von Java --> C++ (f"ur Properties)
+ //--------------------------------------------
+ // Basisklassen-Properties, werden an ImpSjJScriptControlBase durchgereicht
+ virtual String getName() const;
+ virtual void setName( const String & aStrg );
+ virtual String getValue() const;
+ virtual void setValue( const String & aStrg );
+ virtual String getType() const;
+
+ // Methoden des Objektes
+ virtual void click();
+
+ // Events (C++ --> Java)
+ //----------------------
+#if SUPD > 356 || defined(AB_EVENT_TEST)
+ // Neue Event-Schnittstelle mit Function-Objekten
+ virtual SjJScriptFunctionObject* getOnClick_Fct() const;
+ virtual void setOnClick_Fct( SjJScriptFunctionObject* pFunctionObject );
+#endif
+ virtual String getOnClick() const;
+ virtual void setOnClick( const String & aSourceStrg );
+ void onClick();
+
+ // Konstruktor
+ ImpSjJScriptSubmitObject( VCControl* _pControl, SjJSbxObject * p );
+};
+
+//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+class ImpSjJScriptResetObject : public SjJScriptResetObject, ImpSjJScriptControlBase
+{
+ // Identisch mit ButtonObject
+ public:
+ // Methoden von Java --> C++ (f"ur Properties)
+ //--------------------------------------------
+ // Basisklassen-Properties, werden an ImpSjJScriptControlBase durchgereicht
+ virtual String getName() const;
+ virtual void setName( const String & aStrg );
+ virtual String getValue() const;
+ virtual void setValue( const String & aStrg );
+ virtual String getType() const;
+
+ // Methoden des Objektes
+ virtual void click();
+
+ // Events (C++ --> Java)
+ //----------------------
+#if SUPD > 356 || defined(AB_EVENT_TEST)
+ // Neue Event-Schnittstelle mit Function-Objekten
+ virtual SjJScriptFunctionObject* getOnClick_Fct() const;
+ virtual void setOnClick_Fct( SjJScriptFunctionObject* pFunctionObject );
+#endif
+ virtual String getOnClick() const;
+ virtual void setOnClick( const String & aSourceStrg );
+ void onClick();
+
+ // Konstruktor
+ ImpSjJScriptResetObject( VCControl* _pControl, SjJSbxObject * p );
+};
+
+//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+class ImpSjJScriptHiddenObject : public SjJScriptHiddenObject, ImpSjJScriptControlBase
+{
+ public:
+ // Methoden von Java --> C++ (f"ur Properties)
+ //--------------------------------------------
+ // Basisklassen-Properties, werden an ImpSjJScriptControlBase durchgereicht
+ virtual String getName() const;
+ virtual void setName( const String & aStrg );
+ virtual String getValue() const;
+ virtual String getType() const;
+
+ // getValue() wird in der Basisklasse definiert
+ virtual void setValue( const String & aStrg );
+
+ // Methoden des Objektes
+ // keine !
+
+ // Events (C++ --> Java)
+ //----------------------
+ // keine !
+
+ // Konstruktor
+ ImpSjJScriptHiddenObject( VCControl* _pControl, SjJSbxObject * p );
+};
+
+//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+class ImpSjJScriptFileUploadObject : public SjJScriptFileUploadObject, ImpSjJScriptControlBase
+{
+ public:
+ // Methoden von Java --> C++ (f"ur Properties)
+ //--------------------------------------------
+ // Basisklassen-Properties, werden an ImpSjJScriptControlBase durchgereicht
+ virtual String getName() const;
+ virtual void setName( const String & aStrg );
+ virtual String getValue() const;
+ virtual String getType() const;
+
+ // Methoden des Objektes
+ // keine !
+
+ // Events (C++ --> Java)
+ //----------------------
+ // keine !
+
+ // Konstruktor
+ ImpSjJScriptFileUploadObject( VCControl* _pControl, SjJSbxObject * p );
+};
+
+//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+class ImpSjJScriptFormObject : public SjJScriptFormObject
+{
+ VCForm* pVCForm;
+
+ public:
+ // Methoden von Java --> C++ (f"ur Properties)
+ //--------------------------------------------
+ virtual String getName() const;
+ virtual void setName( const String & aStrg );
+ virtual String getValue() const;
+ virtual String getType() const;
+
+ virtual String getAction() const;
+ virtual void setAction( const String & sValue );
+ virtual String getEncoding() const;
+ virtual void setEncoding( const String & sValue );
+ virtual String getMethod() const;
+ virtual void setMethod( const String & sValue );
+ virtual String getTarget() const;
+ virtual void setTarget( const String & sValue );
+
+ // SjJSbxArrayObject-Methoden
+ INT32 getLength() const;
+ SjJSbxObject* getElement( INT32 nIndex ) const;
+ SjJSbxObject* getElement_String( const String & aName ) const;
+
+ // liefert ein Array-Objekt mit Elementen vom Typ JScriptAbstractControlsObject
+ // yyy Raus zum inkompatiblen
+ //virtual SjJSbxArrayObject * getElements();
+
+ // Zugriff ueber den Namen eines Controls (falls ein Name zugeordnet ist)
+ // yyy Raus zum inkompatiblen
+ //virtual SjJSbxObject * getElement( const String & aName );
+
+ // Methoden des Objektes
+ virtual void submit();
+ virtual void reset();
+
+ // Events (C++ --> Java)
+ //----------------------
+#if SUPD > 356 || defined(AB_EVENT_TEST)
+ // Neue Event-Schnittstelle mit Function-Objekten
+ virtual SjJScriptFunctionObject* getOnSubmit_Fct() const;
+ virtual void setOnSubmit_Fct( SjJScriptFunctionObject* pFunctionObject );
+ virtual SjJScriptFunctionObject* getOnReset_Fct() const;
+ virtual void setOnReset_Fct( SjJScriptFunctionObject* pFunctionObject );
+#endif
+ virtual String getOnSubmit() const;
+ virtual void setOnSubmit( const String & aSourceStrg );
+ void onSubmit();
+ virtual String getOnReset() const;
+ virtual void setOnReset( const String & aSourceStrg );
+ void onReset();
+
+ // Konstruktor
+ ImpSjJScriptFormObject( VCForm* _pVCForm, SjJSbxObject * p );
+};
+
+#endif
diff --git a/svx/inc/srchdlg.hxx b/svx/inc/srchdlg.hxx
new file mode 100644
index 000000000000..92efdddca1b3
--- /dev/null
+++ b/svx/inc/srchdlg.hxx
@@ -0,0 +1,340 @@
+/*************************************************************************
+ *
+ * $RCSfile: srchdlg.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:00:59 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SVX_SRCHDLG_HXX
+#define _SVX_SRCHDLG_HXX
+
+// include ---------------------------------------------------------------
+
+
+#ifndef _STDCTRL_HXX //autogen
+#include <svtools/stdctrl.hxx>
+#endif
+#ifndef _COMBOBOX_HXX //autogen
+#include <vcl/combobox.hxx>
+#endif
+#ifndef _EDIT_HXX //autogen
+#include <vcl/edit.hxx>
+#endif
+#ifndef _LSTBOX_HXX //autogen
+#include <vcl/lstbox.hxx>
+#endif
+#ifndef _BUTTON_HXX //autogen
+#include <vcl/button.hxx>
+#endif
+#ifndef _GROUP_HXX //autogen
+#include <vcl/group.hxx>
+#endif
+#ifndef _FIXED_HXX //autogen
+#include <vcl/fixed.hxx>
+#endif
+#ifndef _DIALOG_HXX //autogen
+#include <vcl/dialog.hxx>
+#endif
+#ifndef _SFX_CHILDWIN_HXX //autogen
+#include <sfx2/childwin.hxx>
+#endif
+#ifndef _SVARRAY_HXX //autogen
+#include <svtools/svarray.hxx>
+#endif
+#define _SVSTDARR_STRINGSDTOR
+#include <svtools/svstdarr.hxx>
+
+#ifndef _SVEDIT_HXX //autogen
+#include <svtools/svmedit.hxx>
+#endif
+
+// defines ---------------------------------------------------------------
+
+#define SEARCH_OPTIONS_SEARCH ((USHORT)0x0001)
+#define SEARCH_OPTIONS_SEARCH_ALL ((USHORT)0x0002)
+#define SEARCH_OPTIONS_REPLACE ((USHORT)0x0004)
+#define SEARCH_OPTIONS_REPLACE_ALL ((USHORT)0x0008)
+#define SEARCH_OPTIONS_WHOLE_WORDS ((USHORT)0x0010)
+#define SEARCH_OPTIONS_BACKWARDS ((USHORT)0x0020)
+#define SEARCH_OPTIONS_REG_EXP ((USHORT)0x0040)
+#define SEARCH_OPTIONS_EXACT ((USHORT)0x0080)
+#define SEARCH_OPTIONS_SELECTION ((USHORT)0x0100)
+#define SEARCH_OPTIONS_FAMILIES ((USHORT)0x0200)
+#define SEARCH_OPTIONS_FORMAT ((USHORT)0x0400)
+#define SEARCH_OPTIONS_MORE ((USHORT)0x0800)
+#define SEARCH_OPTIONS_SIMILARITY ((USHORT)0x1000)
+#define SEARCH_OPTIONS_CONTENT ((USHORT)0x2000)
+
+// forward ---------------------------------------------------------------
+
+class SvxSearchItem;
+class MoreButton;
+class SfxStyleSheetBasePool;
+struct SearchDlg_Impl;
+
+#ifndef NO_SVX_SEARCH
+
+// struct SearchAttrItem -------------------------------------------------
+
+struct SearchAttrItem
+{
+ USHORT nSlot;
+ SfxPoolItem* pItem;
+};
+
+// class SearchAttrItemList ----------------------------------------------
+
+SV_DECL_VARARR(SrchAttrItemList, SearchAttrItem, 8, 8);
+
+class SearchAttrItemList : private SrchAttrItemList
+{
+public:
+ SearchAttrItemList() {}
+ SearchAttrItemList( const SearchAttrItemList& rList );
+ ~SearchAttrItemList();
+
+ void Put( const SfxItemSet& rSet );
+ SfxItemSet& Get( SfxItemSet& rSet );
+ void Clear();
+ USHORT Count() const { return SrchAttrItemList::Count(); }
+ SearchAttrItem& operator[](USHORT nPos) const
+ { return SrchAttrItemList::operator[]( nPos ); }
+ SearchAttrItem& GetObject( USHORT nPos ) const
+ { return SrchAttrItemList::GetObject( nPos ); }
+
+ // der Pointer auf das Item wird nicht kopiert!!! (also nicht l"oschen)
+ void Insert( const SearchAttrItem& rItem )
+ { SrchAttrItemList::Insert( rItem, SrchAttrItemList::Count() ); }
+ // l"oscht die Pointer auf die Items
+ void Remove( USHORT nPos, USHORT nLen = 1 );
+};
+
+#ifndef SV_NODIALOG
+
+// class SvxSearchDialogWrapper ------------------------------------------
+
+class SvxSearchDialogWrapper : public SfxChildWindow
+{
+public:
+ SvxSearchDialogWrapper( Window*pParent, USHORT nId,
+ SfxBindings* pBindings, SfxChildWinInfo* pInfo );
+
+ SFX_DECL_CHILDWINDOW(SvxSearchDialogWrapper);
+};
+
+// class SvxSearchDialog -------------------------------------------------
+
+/*
+ {k:\svx\prototyp\dialog\srchdlg.hxx}
+
+ [Beschreibung]
+ In diesem Modeless-Dialog werden die Attribute einer Suche eingestellt
+ und damit eine Suche gestartet. Es sind mehrere Sucharten
+ ( Suchen, Alle suchen, Ersetzen, Alle ersetzen ) m"oglich.
+
+ [Items]
+ <SvxSearchItem><SID_ATTR_SEARCH>
+*/
+
+class SvxSearchDialog : public ModelessDialog
+{
+ friend class SvxSearchController;
+ friend class SvxSearchDialogWrapper;
+
+public:
+ SvxSearchDialog( Window* pParent, SfxBindings& rBind );
+ ~SvxSearchDialog();
+
+ virtual BOOL Close();
+
+ void GetSearchItems( SfxItemSet& rSet );
+ void GetReplaceItems( SfxItemSet& rSet );
+
+ const SearchAttrItemList* GetSearchItemList() const
+ { return pSearchList; }
+ const SearchAttrItemList* GetReplaceItemList() const
+ { return pReplaceList; }
+
+ inline BOOL HasSearchAttributes() const;
+ inline BOOL HasReplaceAttributes() const;
+
+ PushButton& GetReplaceBtn() { return aReplaceBtn; }
+
+private:
+ FixedText aSearchText;
+ ComboBox aSearchLB;
+ ListBox aSearchTmplLB;
+ FixedInfo aSearchAttrText;
+ MultiLineEdit aSearchFormatsED;
+ GroupBox aSearchAttrBox;
+
+ FixedText aReplaceText;
+ ComboBox aReplaceLB;
+ ListBox aReplaceTmplLB;
+ FixedInfo aReplaceAttrText;
+ MultiLineEdit aReplaceFormatsED;
+ GroupBox aReplaceAttrBox;
+
+ PushButton aSearchAllBtn;
+ PushButton aSearchBtn;
+ PushButton aReplaceAllBtn;
+ PushButton aReplaceBtn;
+ PushButton aAttributeBtn;
+ CancelButton aCloseBtn;
+ PushButton aFormatBtn;
+ HelpButton aHelpBtn;
+ PushButton aNoFormatBtn;
+ MoreButton* pMoreBtn;
+
+ CheckBox aWordBtn;
+ CheckBox aExactBtn;
+ CheckBox aBackwardsBtn;
+ CheckBox aSelectionBtn;
+ CheckBox aRegExpBtn;
+ CheckBox aLayoutBtn;
+ // "Ahnlichkeitssuche
+ CheckBox aSimilarityBox;
+ PushButton aSimilarityBtn;
+ GroupBox aOptionsBox;
+
+ // nur f"ur Calc
+ RadioButton aFormulasBtn;
+ RadioButton aValuesBtn;
+ RadioButton aNotesBtn;
+ GroupBox aSearchBox;
+
+ RadioButton aRowsBtn;
+ RadioButton aColumnsBtn;
+ GroupBox aSearchDirBox;
+
+ CheckBox aAllTablesCB;
+ GroupBox aCalcExtrasBox;
+
+ SfxBindings& rBindings;
+ BOOL bWriter;
+ BOOL bSearch;
+ BOOL bFormat;
+ USHORT nOptions;
+ FASTBOOL bSet;
+ FASTBOOL bReadOnly;
+ FASTBOOL bConstruct;
+ ULONG nModifyFlag;
+ String aStylesStr;
+ String aLayoutStr;
+ String aCalcStr;
+
+ SvStringsDtor aSearchStrings;
+ SvStringsDtor aReplaceStrings;
+
+ SearchDlg_Impl* pImpl;
+ SearchAttrItemList* pSearchList;
+ SearchAttrItemList* pReplaceList;
+ SvxSearchItem* pSearchItem;
+
+ SvxSearchController* pSearchController;
+ SvxSearchController* pOptionsController;
+ SvxSearchController* pFamilyController;
+ SvxSearchController* pSearchSetController;
+ SvxSearchController* pReplaceSetController;
+
+#ifdef _SVX_SRCHDLG_CXX
+ DECL_LINK( ModifyHdl_Impl, ComboBox* pEdit );
+ DECL_LINK( FlagHdl_Impl, Button* pBtn );
+ DECL_LINK( CommandHdl_Impl, Button* pBtn );
+ DECL_LINK( TemplateHdl_Impl, Button* );
+ DECL_LINK( FocusHdl_Impl, Control* );
+ DECL_LINK( LoseFocusHdl_Impl, Control* );
+ DECL_LINK( FormatHdl_Impl, Button* );
+ DECL_LINK( NoFormatHdl_Impl, Button* );
+ DECL_LINK( AttributeHdl_Impl, Button* );
+ DECL_LINK( TimeoutHdl_Impl, Timer* );
+
+ void InitControls_Impl();
+ void Init_Impl( int bHasItemSet );
+ void InitAttrList_Impl( const SfxItemSet* pSSet,
+ const SfxItemSet* pRSet );
+ void Remember_Impl( const String &rStr,BOOL bSearch );
+ void PaintAttrText_Impl();
+ String& BuildAttrText_Impl( String& rStr, BOOL bSrchFlag ) const;
+
+ void TemplatesChanged_Impl( SfxStyleSheetBasePool& rPool );
+ void EnableControls_Impl( const USHORT nFlags );
+ void EnableControl_Impl( Control* pCtrl );
+ void SetItem_Impl( const SvxSearchItem* pItem );
+
+ void SetModifyFlag_Impl( const Control* pCtrl );
+ void SaveToModule_Impl();
+#endif
+};
+
+inline BOOL SvxSearchDialog::HasSearchAttributes() const
+{
+ int bLen = aSearchAttrText.GetText().Len();
+ return ( aSearchAttrText.IsEnabled() && bLen );
+}
+
+inline BOOL SvxSearchDialog::HasReplaceAttributes() const
+{
+ int bLen = aReplaceAttrText.GetText().Len();
+ return ( aReplaceAttrText.IsEnabled() && bLen );
+}
+
+#endif // SV_NODIALOG
+#endif // NO_SVX_SEARCH
+
+
+#endif
+
diff --git a/svx/inc/srchitem.hxx b/svx/inc/srchitem.hxx
new file mode 100644
index 000000000000..15049fc639ee
--- /dev/null
+++ b/svx/inc/srchitem.hxx
@@ -0,0 +1,68 @@
+/*************************************************************************
+ *
+ * $RCSfile: srchitem.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:00:59 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SVX_SRCHITEM_HXX
+#define _SVX_SRCHITEM_HXX
+
+#include <sfx2/srchitem.hxx>
+
+#endif
+
+
diff --git a/svx/inc/svdglob.hxx b/svx/inc/svdglob.hxx
new file mode 100644
index 000000000000..6883e2001ea0
--- /dev/null
+++ b/svx/inc/svdglob.hxx
@@ -0,0 +1,108 @@
+/*************************************************************************
+ *
+ * $RCSfile: svdglob.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:00 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _SVDGLOB_HXX
+#define _SVDGLOB_HXX
+
+#ifndef _CONTNR_HXX //autogen
+#include <tools/contnr.hxx>
+#endif
+
+#ifndef _RESID_HXX //autogen
+#include <vcl/resid.hxx>
+#endif
+
+#ifndef _STRING_HXX
+#include <tools/string.hxx>
+#endif
+
+//************************************************************
+// Vorausdeklarationen
+//************************************************************
+
+class Link;
+class ResMgr;
+class SdrEngineDefaults;
+class ImpSdrStrCache;
+
+//************************************************************
+// Defines
+//************************************************************
+
+// Den zur App passenden Resourcemanager holen
+ResMgr* ImpGetResMgr();
+
+class SdrResId: ResId {
+public:
+ SdrResId(USHORT nId): ResId(nId,ImpGetResMgr()) {}
+};
+
+// ResourceCache fuer haeuffig benoetigte Strings
+// gecachet werden globale String-Resourcen mit den
+// IDs von SDR_StringCacheBegin (256) bis
+// SDR_StringCacheEnd (weiss ich grad' nicht).
+// Hierzu siehe auch SvdStr.Hrc
+const String& ImpGetResStr(USHORT nResID);
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+#endif //_SVDGLOB_HXX
+
diff --git a/svx/inc/svdibrow.hxx b/svx/inc/svdibrow.hxx
new file mode 100644
index 000000000000..45ed2ced90e6
--- /dev/null
+++ b/svx/inc/svdibrow.hxx
@@ -0,0 +1,177 @@
+/*************************************************************************
+ *
+ * $RCSfile: svdibrow.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:00 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _SVDIBROW_HXX
+#define _SVDIBROW_HXX
+
+#ifndef _SVX_BRWBOX_HXX //autogen
+#include <svtools/brwbox.hxx>
+#endif
+
+#ifndef _SV_EDIT_HXX //autogen
+#include <vcl/edit.hxx>
+#endif
+
+#ifndef _SV_FLOATWIN_HXX //autogen
+#include <vcl/floatwin.hxx>
+#endif
+
+class SfxItemSet;
+class ImpItemListRow;
+class BrowserMouseEvent;
+
+class _SdrItemBrowserControl: public BrowseBox
+{
+friend class ImpItemEdit;
+ Container aList;
+ long nAktPaintRow;
+ Edit* pEditControl;
+ XubString aWNamMerk;
+ Link aEntryChangedHdl;
+ Link aSetDirtyHdl;
+ ImpItemListRow* pAktChangeEntry;
+ long nLastWhichOfs;
+ USHORT nLastWhich;
+ USHORT nLastWhichOben;
+ USHORT nLastWhichUnten;
+ FASTBOOL bWhichesButNames;
+ FASTBOOL bDontHideIneffectiveItems;
+ FASTBOOL bDontSortItems;
+ FASTBOOL bShowWhichIds;
+ FASTBOOL bShowRealValues;
+private:
+#if __PRIVATE
+ void ImpCtor();
+ void ImpSetEntry(const ImpItemListRow& rEntry, ULONG nEntryNum);
+ ImpItemListRow* ImpGetEntry(ULONG nPos) const { return (ImpItemListRow*)aList.GetObject(nPos); }
+ void ImpSaveWhich();
+ void ImpRestoreWhich();
+#endif // __PRIVATE
+protected:
+ virtual long GetRowCount() const;
+ virtual BOOL SeekRow(long nRow);
+ virtual void PaintField(OutputDevice& rDev, const Rectangle& rRect, USHORT nColumnId) const;
+#if SUPD >= 345
+ virtual void DoubleClick(const BrowserMouseEvent&);
+#else
+ virtual void DoubleClick();
+#endif
+ virtual void KeyInput(const KeyEvent& rEvt);
+ virtual void Select();
+ virtual void SetDirty(); // wird z.B. bei Modusumschaltungen gerufen
+public:
+ _SdrItemBrowserControl(Window* pParent, WinBits nBits=WB_3DLOOK|WB_BORDER|WB_TABSTOP);
+ virtual ~_SdrItemBrowserControl();
+ void Clear();
+ void SetAttributes(const SfxItemSet* pAttr, const SfxItemSet* p2ndSet=NULL);
+ ULONG GetCurrentPos() const;
+ USHORT GetCurrentWhich() const;
+ virtual FASTBOOL BegChangeEntry(ULONG nPos);
+ virtual FASTBOOL EndChangeEntry();
+ virtual void BrkChangeEntry();
+ const ImpItemListRow* GetAktChangeEntry() const { return pAktChangeEntry; }
+ XubString GetNewEntryValue() const { return pEditControl->GetText(); }
+ void SetEntryChangedHdl(const Link& rLink) { aEntryChangedHdl=rLink; }
+ const Link& GetEntryChangedHdl() const { return aEntryChangedHdl; }
+ void SetSetDirtyHdl(const Link& rLink) { aSetDirtyHdl=rLink; }
+ const Link& GetSetDirtyHdl() const { return aSetDirtyHdl; }
+};
+
+#define WB_STDSIZEABLEDOCKWIN (WB_STDDOCKWIN|WB_3DLOOK|WB_CLOSEABLE|WB_SIZEMOVE)
+#define WB_STDSIZEABLEFLOATWIN (WB_STDFLOATWIN|WB_3DLOOK|WB_CLOSEABLE|WB_SIZEMOVE)
+
+class _SdrItemBrowserWindow: public FloatingWindow {
+ _SdrItemBrowserControl aBrowse;
+public:
+ _SdrItemBrowserWindow(Window* pParent, WinBits nBits=WB_STDSIZEABLEDOCKWIN);
+ virtual ~_SdrItemBrowserWindow();
+ virtual void Resize();
+ virtual void GetFocus();
+ void Clear() { aBrowse.Clear(); }
+ void SetAttributes(const SfxItemSet* pAttr, const SfxItemSet* p2ndSet=NULL) { aBrowse.SetAttributes(pAttr,p2ndSet); }
+ void SetFloatingMode(FASTBOOL bOn) {}
+ const _SdrItemBrowserControl& GetBrowserControl() const { return aBrowse; }
+ _SdrItemBrowserControl& GetBrowserControl() { return aBrowse; }
+};
+
+class SdrView;
+
+class SdrItemBrowser: public _SdrItemBrowserWindow {
+ Timer aIdleTimer;
+ SdrView* pView;
+ FASTBOOL bDirty;
+private:
+ static Window* ImpGetViewWin(SdrView& rView);
+ DECL_LINK(IdleHdl,Timer*);
+ DECL_LINK(ChangedHdl,_SdrItemBrowserControl*);
+ DECL_LINK(SetDirtyHdl,_SdrItemBrowserControl*);
+public:
+ SdrItemBrowser(SdrView& rView);
+ void ForceParent();
+ void SetView(SdrView& rView) { pView=&rView; ForceParent(); SetDirty(); }
+ void SetDirty();
+ void Undirty();
+ void ForceUndirty() { if (bDirty) Undirty(); }
+};
+
+#endif //_SVDIBROW_HXX
+
+
diff --git a/svx/inc/svditer.hxx b/svx/inc/svditer.hxx
new file mode 100644
index 000000000000..3bed82d4c00a
--- /dev/null
+++ b/svx/inc/svditer.hxx
@@ -0,0 +1,124 @@
+/*************************************************************************
+ *
+ * $RCSfile: svditer.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:00 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _SVDITER_HXX
+#define _SVDITER_HXX
+
+#ifndef _SOLAR_H
+#include <tools/solar.h>
+#endif
+
+/* Iterieren ueber eine Objektliste:
+ SdrObjListIter aIter(pPage);
+ while (aIter.IsMore()) Next()->...;
+
+ SdrIterMode:
+ IM_FLAT: Die Suche erfolgt flach entlang der uebergebenen Liste. Next()
+ liefert also nacheinander alle Objekte die direkt in der Liste
+ verankert sind.
+ Der HitTest() bei einem Mausklick erfolgt z.B. in diesem Modus.
+ IM_DEEPWITHGROUPS: Stoesst Next() bei der Suche auf ein Gruppenobjekt, ein
+ Zeiger auf dieses Gruppenobjekt zuruekgegeben (wie IM_Flat). Das
+ naechste Next() sucht allerdings nicht in der selben Liste weiter,
+ sondern durchsucht zunaechst die Unterliste des Gruppenobjekts. Wird
+ in dieser Unterliste wieder ein Gruppenobjekt gefunden, dann wird
+ spaeter auch dessen Unterliste durchsucht, ... .
+ Dieser Modus wird benoetigt, wenn man Zugriff auf alle Einzelobjekte
+ inkl. der Gruppenobjekte benoetigt.
+ IM_DEEPNOGROUPS: Die Suche erfolgt nach aehnlichem Muster wie im Modus
+ IM_DEEPWITHGROUPS. Die einzige Ausnahme ist, da Gruppenobjekte
+ selbst uebersprungen werden. Sobald Next() auf ein Gruppenobjekt
+ stoesst liefert es sofort das erste Objekt dessen Unterliste, ohne
+ zuvor einen Zeiger auf das Gruppenobjekt zu liefern.
+ Dieser Modus z.B. beim Repaint verwendet, da SdrObjGroup.Paint()
+ ja sonst die gesamte Unterliste der Gruppe painten wuerde, ohne
+ eine Unterbrechung durch einen Event zuzulassen.
+ Die Rueckwaertssuche ist derzeit nur fuer den Modus IM_FLAT implementiert.
+*/
+
+enum SdrIterMode {IM_FLAT, // Flach ueber die Liste
+ IM_DEEPWITHGROUPS, // Mit rekursivem Abstieg, Next() liefert auch Gruppenobjekte
+ IM_DEEPNOGROUPS}; // Mit rekursivem Abstieg, Next() liefert keine Gruppenobjekte
+
+class SdrObject;
+class SdrObjList;
+
+class SdrObjListIter {
+protected:
+ const SdrObjList* pMainList; // zu durchsuchende Liste
+ const SdrObjList* pAktList; // Aktuelle (Sub-)Liste
+ const SdrObject* pAktGroup; // Aktuelles Gruppenobjekt
+ const SdrObject* pNextObj; //
+ ULONG nAktNum; // Objektnummer in aktueller (Sub-)Liste
+ ULONG nObjAnz; // Anzahl der Objekte in der Hauptliste
+ FASTBOOL bReverse; // rueckwaerts durchsuchen
+ FASTBOOL bRecurse; // In Gruppen hinabsteigen
+ FASTBOOL bSkipGrp; // Gruppenobjekte ueberspringen ?
+public:
+ SdrObjListIter(const SdrObjList& rObjList, SdrIterMode eMode=IM_DEEPNOGROUPS, FASTBOOL bRevSearch=FALSE);
+ SdrObjListIter(const SdrObject& rGroup, SdrIterMode eMode=IM_DEEPNOGROUPS, FASTBOOL bRevSearch=FALSE);
+ void Reset();
+ FASTBOOL IsMore() const { return pNextObj!=NULL; }
+ SdrObject* Next();
+};
+
+#endif //_SVDITER_HXX
+
diff --git a/svx/inc/svdpomv.hxx b/svx/inc/svdpomv.hxx
new file mode 100644
index 000000000000..6b81c5153764
--- /dev/null
+++ b/svx/inc/svdpomv.hxx
@@ -0,0 +1,95 @@
+/*************************************************************************
+ *
+ * $RCSfile: svdpomv.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:01 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#error dieser Header entfaellt nun!
+
+#ifndef _SVDPOMV_HXX
+#define _SVDPOMV_HXX
+
+#ifndef _SVDMRKV_HXX
+#include "svdmrkv.hxx"
+#endif
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+//
+// @@@@@ @@@@ @@ @@ @@ @@ @@ @@@@ @@@@@ @@ @@ @@ @@ @@ @@@@@ @@ @@
+// @@ @@ @@ @@ @@ @@ @@ @@@ @@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @ @@
+// @@@@@ @@ @@ @@ @@@@ @@@@@@@ @@@@@@ @@@@@ @@@@ @@@@@ @@ @@@@ @@@@@@@
+// @@ @@ @@ @@ @@ @@ @ @@ @@ @@ @@ @@ @@ @@ @@@ @@ @@ @@@ @@@
+// @@ @@@@ @@@@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @ @@ @@@@@ @@ @@
+//
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+class SdrPolyMarkView: public SdrMarkView {
+private:
+#ifndef _SVDRAW_HXX
+ void ImpClearVars();
+#endif
+public:
+ SdrPolyMarkView(SdrModel* pModel1, OutputDevice* pOut);
+ SdrPolyMarkView(SdrModel* pModel1, ExtOutputDevice* pXOut);
+ ~SdrPolyMarkView();
+};
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+#endif //_SVDPOMV_HXX
+
diff --git a/svx/inc/svdshort.hxx b/svx/inc/svdshort.hxx
new file mode 100644
index 000000000000..e8e584053726
--- /dev/null
+++ b/svx/inc/svdshort.hxx
@@ -0,0 +1,131 @@
+/*************************************************************************
+ *
+ * $RCSfile: svdshort.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:01 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#error svdshort wird nicht mehr verwendet!
+
+#ifndef _SVDSHORT_HXX
+#define _SVDSHORT_HXX
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+#ifdef Weg_Mit_Den_Doofen_Abkuerzungen
+ // Statistik - Stand 02-03-1995
+ // Haeufigkeit Ersparnis
+#define SdrObjSurrogate SdrSU
+#define SdrHelpLineKind SdrFLK /* HL ist schon besetzt */
+#define SdrHelpLineList SdrFLL /* HL ist schon besetzt */
+#define SdrHelpLine SdrFL /* HL ist schon besetzt */
+#define SdrMasterPageDescriptorList SdrMPL
+#define SdrMasterPageDescriptor SdrMP
+#define SdrObjTransformInfoRec SdrTI
+#define SdrDragCrook SdrDC
+#define SdrDragMirror SdrDI
+#define SdrDragMovHdl SdrDH
+#define SdrDragResize SdrDZ
+#define SdrDragRotate SdrDR
+#define SdrDragShear SdrDE
+#define SdrDragMove SdrDM
+#define SdrCreateCmd SdrCC
+#define SdrUndoAttrObj SdrAU
+#define SdrObjKind SdrOK
+#define SdrUndoGroup SdrUG
+#define SdrUndoAction SdrUA
+#define SdrAttrObj SdrAO
+#define SdrGrafObj SdrGO
+#define SdrMarkList SdrML
+#define SdrHdlList SdrHL
+#define SdrLayerAdmin SdrLA
+//#define SdrObjEditRec SdrER
+#define SdrObjIOHeader SdrOH
+#define SdrObjUserCall SdrUC
+#define SdrObjUnknown SdrUO
+#define SdrExchangeView SdrXV
+#define SdrCreateView SdrCV
+#define SdrOle2Obj SdrOO
+#define SdrObjGeoData SdrGD
+#define SdrDragView SdrDV
+#define SdrSnapView SdrSV
+#define SdrObjList SdrOL
+#define SdrEdgeObj SdrEO
+#define SdrCircObj SdrCO
+#define SdrObjGroup SdrOG
+#define SdrPage SdrPg
+#define SdrObjEditView SdrOV
+#define SdrModel SdrMD
+#define ExtOutputDevice SdrXO
+#define SdrEditView SdrEV
+#define SdrPaintView SdrNV
+#define SdrPolyObj SdrPO
+#define SdrRectObj SdrRO
+#define SdrTextObj SdrTO
+#define SdrMarkView SdrMV
+#define SdrPathObj SdrBO
+#define SdrPageView SdrPV
+#define SdrDragStat SdrDS
+#define SdrVirtObj SdrVO
+#define SdrObject SdrO
+
+#endif
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+#endif //_SVDSHORT_HXX
+
diff --git a/svx/inc/svdstr.hrc b/svx/inc/svdstr.hrc
new file mode 100644
index 000000000000..54df4b23383b
--- /dev/null
+++ b/svx/inc/svdstr.hrc
@@ -0,0 +1,779 @@
+/*************************************************************************
+ *
+ * $RCSfile: svdstr.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:01 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#define SDR_ResourceBegin 2560
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// Achtung: Alle Strings zwischen SDR_StringCacheBegin und
+// SDR_StringCacheEnd muessen buendig aneinander liegen.
+#define SDR_StringCacheBegin (SDR_ResourceBegin)
+
+#define STR_ObjNameBegin (SDR_ResourceBegin)
+#define STR_ObjNameSingulNONE (STR_ObjNameBegin + 0)
+#define STR_ObjNamePluralNONE (STR_ObjNameBegin + 1)
+#define STR_ObjNameSingulGRUP (STR_ObjNameBegin + 2)
+#define STR_ObjNamePluralGRUP (STR_ObjNameBegin + 3)
+#define STR_ObjNameSingulGRUPEMPTY (STR_ObjNameBegin + 4)
+#define STR_ObjNamePluralGRUPEMPTY (STR_ObjNameBegin + 5)
+#define STR_ObjNameSingulGRUPLNK (STR_ObjNameBegin + 6)
+#define STR_ObjNamePluralGRUPLNK (STR_ObjNameBegin + 7)
+#define STR_ObjNameSingulLINE (STR_ObjNameBegin + 8)
+#define STR_ObjNameSingulLINE_Hori (STR_ObjNameBegin + 9)
+#define STR_ObjNameSingulLINE_Vert (STR_ObjNameBegin + 10)
+#define STR_ObjNameSingulLINE_Diag (STR_ObjNameBegin + 11)
+#define STR_ObjNamePluralLINE (STR_ObjNameBegin + 12)
+#define STR_ObjNameSingulRECT (STR_ObjNameBegin + 13)
+#define STR_ObjNamePluralRECT (STR_ObjNameBegin + 14)
+#define STR_ObjNameSingulQUAD (STR_ObjNameBegin + 15)
+#define STR_ObjNamePluralQUAD (STR_ObjNameBegin + 16)
+#define STR_ObjNameSingulPARAL (STR_ObjNameBegin + 17)
+#define STR_ObjNamePluralPARAL (STR_ObjNameBegin + 18)
+#define STR_ObjNameSingulRAUTE (STR_ObjNameBegin + 19)
+#define STR_ObjNamePluralRAUTE (STR_ObjNameBegin + 20)
+#define STR_ObjNameSingulRECTRND (STR_ObjNameBegin + 21)
+#define STR_ObjNamePluralRECTRND (STR_ObjNameBegin + 22)
+#define STR_ObjNameSingulQUADRND (STR_ObjNameBegin + 23)
+#define STR_ObjNamePluralQUADRND (STR_ObjNameBegin + 24)
+#define STR_ObjNameSingulPARALRND (STR_ObjNameBegin + 25)
+#define STR_ObjNamePluralPARALRND (STR_ObjNameBegin + 26)
+#define STR_ObjNameSingulRAUTERND (STR_ObjNameBegin + 27)
+#define STR_ObjNamePluralRAUTERND (STR_ObjNameBegin + 28)
+#define STR_ObjNameSingulCIRC (STR_ObjNameBegin + 29)
+#define STR_ObjNamePluralCIRC (STR_ObjNameBegin + 30)
+#define STR_ObjNameSingulSECT (STR_ObjNameBegin + 31)
+#define STR_ObjNamePluralSECT (STR_ObjNameBegin + 32)
+#define STR_ObjNameSingulCARC (STR_ObjNameBegin + 33)
+#define STR_ObjNamePluralCARC (STR_ObjNameBegin + 34)
+#define STR_ObjNameSingulCCUT (STR_ObjNameBegin + 35)
+#define STR_ObjNamePluralCCUT (STR_ObjNameBegin + 36)
+#define STR_ObjNameSingulCIRCE (STR_ObjNameBegin + 37)
+#define STR_ObjNamePluralCIRCE (STR_ObjNameBegin + 38)
+#define STR_ObjNameSingulSECTE (STR_ObjNameBegin + 39)
+#define STR_ObjNamePluralSECTE (STR_ObjNameBegin + 40)
+#define STR_ObjNameSingulCARCE (STR_ObjNameBegin + 41)
+#define STR_ObjNamePluralCARCE (STR_ObjNameBegin + 42)
+#define STR_ObjNameSingulCCUTE (STR_ObjNameBegin + 43)
+#define STR_ObjNamePluralCCUTE (STR_ObjNameBegin + 44)
+#define STR_ObjNameSingulPOLY (STR_ObjNameBegin + 45)
+#define STR_ObjNameSingulPOLY_PntAnz (STR_ObjNameBegin + 46)
+#define STR_ObjNamePluralPOLY (STR_ObjNameBegin + 47)
+#define STR_ObjNameSingulPLIN (STR_ObjNameBegin + 48)
+#define STR_ObjNameSingulPLIN_PntAnz (STR_ObjNameBegin + 49)
+#define STR_ObjNamePluralPLIN (STR_ObjNameBegin + 50)
+#define STR_ObjNameSingulPATHLINE (STR_ObjNameBegin + 51)
+#define STR_ObjNamePluralPATHLINE (STR_ObjNameBegin + 52)
+#define STR_ObjNameSingulPATHFILL (STR_ObjNameBegin + 53)
+#define STR_ObjNamePluralPATHFILL (STR_ObjNameBegin + 54)
+#define STR_ObjNameSingulFREELINE (STR_ObjNameBegin + 55)
+#define STR_ObjNamePluralFREELINE (STR_ObjNameBegin + 56)
+#define STR_ObjNameSingulFREEFILL (STR_ObjNameBegin + 57)
+#define STR_ObjNamePluralFREEFILL (STR_ObjNameBegin + 58)
+#define STR_ObjNameSingulCOMBLINE (STR_ObjNameBegin + 59)
+#define STR_ObjNamePluralCOMBLINE (STR_ObjNameBegin + 60)
+#define STR_ObjNameSingulCOMBFILL (STR_ObjNameBegin + 61)
+#define STR_ObjNamePluralCOMBFILL (STR_ObjNameBegin + 62)
+#define STR_ObjNameSingulNATSPLN (STR_ObjNameBegin + 63)
+#define STR_ObjNamePluralNATSPLN (STR_ObjNameBegin + 64)
+#define STR_ObjNameSingulPERSPLN (STR_ObjNameBegin + 65)
+#define STR_ObjNamePluralPERSPLN (STR_ObjNameBegin + 66)
+#define STR_ObjNameSingulTEXT (STR_ObjNameBegin + 67)
+#define STR_ObjNamePluralTEXT (STR_ObjNameBegin + 68)
+#define STR_ObjNameSingulTEXTLNK (STR_ObjNameBegin + 69)
+#define STR_ObjNamePluralTEXTLNK (STR_ObjNameBegin + 70)
+#define STR_ObjNameSingulFITTEXT (STR_ObjNameBegin + 71)
+#define STR_ObjNamePluralFITTEXT (STR_ObjNameBegin + 72)
+#define STR_ObjNameSingulFITALLTEXT (STR_ObjNameBegin + 73)
+#define STR_ObjNamePluralFITALLTEXT (STR_ObjNameBegin + 74)
+#define STR_ObjNameSingulTITLETEXT (STR_ObjNameBegin + 75)
+#define STR_ObjNamePluralTITLETEXT (STR_ObjNameBegin + 76)
+#define STR_ObjNameSingulOUTLINETEXT (STR_ObjNameBegin + 77)
+#define STR_ObjNamePluralOUTLINETEXT (STR_ObjNameBegin + 78)
+#define STR_ObjNameSingulGRAF (STR_ObjNameBegin + 79)
+#define STR_ObjNamePluralGRAF (STR_ObjNameBegin + 80)
+#define STR_ObjNameSingulGRAFLNK (STR_ObjNameBegin + 81)
+#define STR_ObjNamePluralGRAFLNK (STR_ObjNameBegin + 82)
+#define STR_ObjNameSingulGRAFNONE (STR_ObjNameBegin + 83)
+#define STR_ObjNamePluralGRAFNONE (STR_ObjNameBegin + 84)
+#define STR_ObjNameSingulGRAFNONELNK (STR_ObjNameBegin + 85)
+#define STR_ObjNamePluralGRAFNONELNK (STR_ObjNameBegin + 86)
+#define STR_ObjNameSingulGRAFMTF (STR_ObjNameBegin + 87)
+#define STR_ObjNamePluralGRAFMTF (STR_ObjNameBegin + 88)
+#define STR_ObjNameSingulGRAFMTFLNK (STR_ObjNameBegin + 89)
+#define STR_ObjNamePluralGRAFMTFLNK (STR_ObjNameBegin + 90)
+#define STR_ObjNameSingulGRAFBMP (STR_ObjNameBegin + 91)
+#define STR_ObjNamePluralGRAFBMP (STR_ObjNameBegin + 92)
+#define STR_ObjNameSingulGRAFBMPLNK (STR_ObjNameBegin + 93)
+#define STR_ObjNamePluralGRAFBMPLNK (STR_ObjNameBegin + 94)
+#define STR_ObjNameSingulGRAFMAC (STR_ObjNameBegin + 95)
+#define STR_ObjNamePluralGRAFMAC (STR_ObjNameBegin + 96)
+#define STR_ObjNameSingulGRAFMACLNK (STR_ObjNameBegin + 97)
+#define STR_ObjNamePluralGRAFMACLNK (STR_ObjNameBegin + 98)
+#define STR_ObjNameSingulOLE2 (STR_ObjNameBegin + 99)
+#define STR_ObjNamePluralOLE2 (STR_ObjNameBegin +100)
+#define STR_ObjNameSingulOLE2LNK (STR_ObjNameBegin +101)
+#define STR_ObjNamePluralOLE2LNK (STR_ObjNameBegin +102)
+#define STR_ObjOLE2NamePrefix (STR_ObjNameBegin +103)
+#define STR_ObjNameSingulFrame (STR_ObjNameBegin +104)
+#define STR_ObjNamePluralFrame (STR_ObjNameBegin +105)
+#define STR_ObjFrameNamePrefix (STR_ObjNameBegin +106)
+#define STR_ObjNameSingulEDGE (STR_ObjNameBegin +107)
+#define STR_ObjNamePluralEDGE (STR_ObjNameBegin +108)
+#define STR_ObjNameSingulCAPTION (STR_ObjNameBegin +109)
+#define STR_ObjNamePluralCAPTION (STR_ObjNameBegin +110)
+#define STR_ObjNameSingulPAGE (STR_ObjNameBegin +111)
+#define STR_ObjNamePluralPAGE (STR_ObjNameBegin +112)
+#define STR_ObjNameSingulMEASURE (STR_ObjNameBegin +113)
+#define STR_ObjNamePluralMEASURE (STR_ObjNameBegin +114)
+#define STR_ObjNamePlural (STR_ObjNameBegin +115)
+#define STR_ObjNameNoObj (STR_ObjNameBegin +116)
+#define STR_ObjNameAnd (STR_ObjNameBegin +117)
+#define STR_ObjNameSingulPlural (STR_ObjNameBegin +118)
+#define STR_ObjNameSingulUno (STR_ObjNameBegin +119)
+#define STR_ObjNamePluralUno (STR_ObjNameBegin +120)
+
+// Neu ab 537: Namen fuer 3D-Objekte
+#define STR_ObjNameSingulCube3d (STR_ObjNameBegin + 121)
+#define STR_ObjNamePluralCube3d (STR_ObjNameBegin + 122)
+#define STR_ObjNameSingulExtrude3d (STR_ObjNameBegin + 123)
+#define STR_ObjNamePluralExtrude3d (STR_ObjNameBegin + 124)
+#define STR_ObjNameSingulLabel3d (STR_ObjNameBegin + 125)
+#define STR_ObjNamePluralLabel3d (STR_ObjNameBegin + 126)
+#define STR_ObjNameSingulLathe3d (STR_ObjNameBegin + 127)
+#define STR_ObjNamePluralLathe3d (STR_ObjNameBegin + 128)
+#define STR_ObjNameSingulObj3d (STR_ObjNameBegin + 129)
+#define STR_ObjNamePluralObj3d (STR_ObjNameBegin + 130)
+#define STR_ObjNameSingulPoly3d (STR_ObjNameBegin + 131)
+#define STR_ObjNamePluralPoly3d (STR_ObjNameBegin + 132)
+#define STR_ObjNameSingulScene3d (STR_ObjNameBegin + 133)
+#define STR_ObjNamePluralScene3d (STR_ObjNameBegin + 134)
+#define STR_ObjNameSingulSphere3d (STR_ObjNameBegin + 135)
+#define STR_ObjNamePluralSphere3d (STR_ObjNameBegin + 136)
+
+#define STR_ObjNameEnd (STR_ObjNamePluralSphere3d)
+
+#define STR_EditBegin (STR_ObjNameEnd+1)
+#define STR_EditWithCopy (STR_EditBegin + 0)
+#define STR_EditPosSize (STR_EditBegin + 1)
+#define STR_EditDelete (STR_EditBegin + 2)
+#define STR_EditMovToTop (STR_EditBegin + 3)
+#define STR_EditMovToBtm (STR_EditBegin + 4)
+#define STR_EditPutToTop (STR_EditBegin + 5)
+#define STR_EditPutToBtm (STR_EditBegin + 6)
+#define STR_EditRevOrder (STR_EditBegin + 7)
+#define STR_EditMove (STR_EditBegin + 8)
+#define STR_EditResize (STR_EditBegin + 9)
+#define STR_EditRotate (STR_EditBegin + 10)
+#define STR_EditMirrorHori (STR_EditBegin + 11)
+#define STR_EditMirrorVert (STR_EditBegin + 12)
+#define STR_EditMirrorDiag (STR_EditBegin + 13)
+#define STR_EditMirrorFree (STR_EditBegin + 14)
+#define STR_EditShear (STR_EditBegin + 15)
+#define STR_EditCrook (STR_EditBegin + 16)
+#define STR_EditCrookContortion (STR_EditBegin + 17)
+#define STR_EditDistort (STR_EditBegin + 18)
+#define STR_EditRipUp (STR_EditBegin + 19)
+#define STR_EditSetPointsSmooth (STR_EditBegin + 20)
+#define STR_EditSetSegmentsKind (STR_EditBegin + 21)
+#define STR_EditShut (STR_EditBegin + 22)
+#define STR_EditSetGlueEscDir (STR_EditBegin + 23)
+#define STR_EditSetGluePercent (STR_EditBegin + 24)
+#define STR_EditSetGlueAlign (STR_EditBegin + 25)
+#define STR_EditGroup (STR_EditBegin + 26)
+#define STR_EditUngroup (STR_EditBegin + 27)
+#define STR_EditSetAttributes (STR_EditBegin + 28)
+#define STR_EditSetStylesheet (STR_EditBegin + 29)
+#define STR_EditDelStylesheet (STR_EditBegin + 30)
+#define STR_EditConvToPoly (STR_EditBegin + 31)
+#define STR_EditConvToPolys (STR_EditBegin + 32)
+#define STR_EditConvToCurve (STR_EditBegin + 33)
+#define STR_EditConvToCurves (STR_EditBegin + 34)
+#define STR_EditAlign (STR_EditBegin + 35)
+#define STR_EditAlignVTop (STR_EditBegin + 36)
+#define STR_EditAlignVBottom (STR_EditBegin + 37)
+#define STR_EditAlignVCenter (STR_EditBegin + 38)
+#define STR_EditAlignHLeft (STR_EditBegin + 39)
+#define STR_EditAlignHRight (STR_EditBegin + 40)
+#define STR_EditAlignHCenter (STR_EditBegin + 41)
+#define STR_EditAlignCenter (STR_EditBegin + 42)
+#define STR_EditTransform (STR_EditBegin + 43)
+#define STR_EditCombine_PolyPoly (STR_EditBegin + 44)
+#define STR_EditCombine_OnePoly (STR_EditBegin + 45)
+#define STR_EditDismantle_Polys (STR_EditBegin + 46)
+#define STR_EditDismantle_Lines (STR_EditBegin + 47)
+#define STR_EditImportMtf (STR_EditBegin + 48)
+#define STR_EditImportSGV (STR_EditBegin + 49)
+#define STR_EditImportHPGL (STR_EditBegin + 50)
+#define STR_EditImportDXF (STR_EditBegin + 51)
+#define STR_EditConvToContour (STR_EditBegin + 52)
+#define STR_EditConvToContours (STR_EditBegin + 53)
+#define STR_EditMergeMergePoly (STR_EditBegin + 54)
+#define STR_EditMergeSubstractPoly (STR_EditBegin + 55)
+#define STR_EditMergeIntersectPoly (STR_EditBegin + 56)
+#define STR_DistributeMarkedObjects (STR_EditBegin + 57)
+#define STR_EditEnd (STR_DistributeMarkedObjects)
+
+#define STR_ExchangeBegin (STR_EditEnd+1)
+#define STR_ExchangePaste (STR_ExchangeBegin +0)
+#define STR_ExchangeClpCut (STR_ExchangeBegin +1)
+#define STR_ExchangeClpPaste (STR_ExchangeBegin +2)
+#define STR_ExchangeDD (STR_ExchangeBegin +3)
+#define STR_ExchangeDDPaste (STR_ExchangeBegin +4)
+#define STR_ExchangeEnd (STR_ExchangeDDPaste)
+
+#define STR_DragBegin (STR_ExchangeEnd+1)
+#define STR_DragInsertPoint (STR_DragBegin + 0)
+#define STR_DragInsertGluePoint (STR_DragBegin + 1)
+#define STR_DragMethMovHdl (STR_DragBegin + 2)
+#define STR_DragMethObjOwn (STR_DragBegin + 3)
+#define STR_DragMethMove (STR_DragBegin + 4)
+#define STR_DragMethResize (STR_DragBegin + 5)
+#define STR_DragMethRotate (STR_DragBegin + 6)
+#define STR_DragMethMirrorHori (STR_DragBegin + 7)
+#define STR_DragMethMirrorVert (STR_DragBegin + 8)
+#define STR_DragMethMirrorDiag (STR_DragBegin + 9)
+#define STR_DragMethMirrorFree (STR_DragBegin +10)
+#define STR_DragMethShear (STR_DragBegin +11)
+#define STR_DragMethCrook (STR_DragBegin +12)
+#define STR_DragMethCrookContortion (STR_DragBegin +13)
+#define STR_DragMethDistort (STR_DragBegin +14)
+#define STR_DragRectEckRad (STR_DragBegin +15)
+#define STR_DragPathObj (STR_DragBegin +16)
+#define STR_DragRectResize (STR_DragBegin +17)
+#define STR_DragCaptFram (STR_DragBegin +18)
+#define STR_DragCaptTail (STR_DragBegin +19)
+#define STR_DragCircAngle (STR_DragBegin +20)
+#define STR_DragEdgeTail (STR_DragBegin +21)
+#define STR_DragMethGradient (STR_DragBegin +22)
+#define STR_DragMethTransparence (STR_DragBegin +23)
+#define STR_DragEnd (STR_DragMethTransparence)
+
+#define STR_ViewBegin (STR_DragEnd+1)
+#define STR_ViewTextEdit (STR_ViewBegin + 0)
+#define STR_ViewMarked (STR_ViewBegin + 1)
+#define STR_ViewMarkedPoint (STR_ViewBegin + 2)
+#define STR_ViewMarkedPoints (STR_ViewBegin + 3)
+#define STR_ViewMarkedGluePoint (STR_ViewBegin + 4)
+#define STR_ViewMarkedGluePoints (STR_ViewBegin + 5)
+#define STR_ViewMarkObjs (STR_ViewBegin + 6)
+#define STR_ViewMarkMoreObjs (STR_ViewBegin + 7)
+#define STR_ViewMarkPoints (STR_ViewBegin + 8)
+#define STR_ViewMarkMorePoints (STR_ViewBegin + 9)
+#define STR_ViewMarkGluePoints (STR_ViewBegin +10)
+#define STR_ViewMarkMoreGluePoints (STR_ViewBegin +11)
+#define STR_ViewCreateObj (STR_ViewBegin +12)
+#define STR_ViewEnd (STR_ViewCreateObj)
+
+#define STR_UndoBegin (STR_ViewEnd+1)
+#define STR_UndoInsertObj (STR_UndoBegin + 0)
+#define STR_UndoCopyObj (STR_UndoBegin + 1)
+#define STR_UndoObjOrdNum (STR_UndoBegin + 2)
+#define STR_UndoObjSetText (STR_UndoBegin + 3)
+
+#define STR_UndoNewPage (STR_UndoBegin + 4)
+#define STR_UndoDelPage (STR_UndoBegin + 5)
+#define STR_UndoCopPage (STR_UndoBegin + 6)
+#define STR_UndoMovPage (STR_UndoBegin + 7)
+
+#define STR_UndoNewPageMasterDscr (STR_UndoBegin + 8)
+#define STR_UndoDelPageMasterDscr (STR_UndoBegin + 9)
+#define STR_UndoMovPageMasterDscr (STR_UndoBegin +10)
+#define STR_UndoChgPageMasterDscr (STR_UndoBegin +11)
+
+#define STR_UndoMergeModel (STR_UndoBegin +12)
+
+#define STR_UndoNewLayer (STR_UndoBegin +13)
+#define STR_UndoDelLayer (STR_UndoBegin +14)
+#define STR_UndoMovLayer (STR_UndoBegin +15)
+#define STR_UndoEnd (STR_UndoMovLayer)
+
+
+#define STR_LayerBegin (STR_UndoEnd+1)
+#define STR_StandardLayerName (STR_LayerBegin +0)
+#define STR_LayerEnd (STR_StandardLayerName)
+
+
+#define STR_ItemBegin (STR_LayerEnd+1)
+#define STR_ItemValBegin (STR_ItemBegin)
+#define STR_ItemValON (STR_ItemValBegin + 0)
+#define STR_ItemValOFF (STR_ItemValBegin + 1)
+#define STR_ItemValYES (STR_ItemValBegin + 2)
+#define STR_ItemValNO (STR_ItemValBegin + 3)
+#define STR_ItemValCAPTIONTYPE1 (STR_ItemValBegin + 4)
+#define STR_ItemValCAPTIONTYPE2 (STR_ItemValBegin + 5)
+#define STR_ItemValCAPTIONTYPE3 (STR_ItemValBegin + 6)
+#define STR_ItemValCAPTIONTYPE4 (STR_ItemValBegin + 7)
+#define STR_ItemValCAPTIONESCHORI (STR_ItemValBegin + 8)
+#define STR_ItemValCAPTIONESCVERT (STR_ItemValBegin + 9)
+#define STR_ItemValCAPTIONESCBESTFIT (STR_ItemValBegin + 10)
+#define STR_ItemValFITTOSIZENONE (STR_ItemValBegin + 11)
+#define STR_ItemValFITTOSIZEPROP (STR_ItemValBegin + 12)
+#define STR_ItemValFITTOSIZEALLLINES (STR_ItemValBegin + 13)
+#define STR_ItemValFITTOSIZERESIZEAT (STR_ItemValBegin + 14)
+#define STR_ItemValTEXTVADJTOP (STR_ItemValBegin + 15)
+#define STR_ItemValTEXTVADJCENTER (STR_ItemValBegin + 16)
+#define STR_ItemValTEXTVADJBOTTOM (STR_ItemValBegin + 17)
+#define STR_ItemValTEXTVADJBLOCK (STR_ItemValBegin + 18)
+#define STR_ItemValTEXTVADJSTRETCH (STR_ItemValBegin + 19)
+#define STR_ItemValTEXTHADJLEFT (STR_ItemValBegin + 20)
+#define STR_ItemValTEXTHADJCENTER (STR_ItemValBegin + 21)
+#define STR_ItemValTEXTHADJRIGHT (STR_ItemValBegin + 22)
+#define STR_ItemValTEXTHADJBLOCK (STR_ItemValBegin + 23)
+#define STR_ItemValTEXTHADJSTRETCH (STR_ItemValBegin + 24)
+#define STR_ItemValTEXTANI_NONE (STR_ItemValBegin + 25)
+#define STR_ItemValTEXTANI_BLINK (STR_ItemValBegin + 26)
+#define STR_ItemValTEXTANI_SCROLL (STR_ItemValBegin + 27)
+#define STR_ItemValTEXTANI_ALTERNATE (STR_ItemValBegin + 28)
+#define STR_ItemValTEXTANI_SLIDE (STR_ItemValBegin + 29)
+#define STR_ItemValTEXTANI_LEFT (STR_ItemValBegin + 30)
+#define STR_ItemValTEXTANI_RIGHT (STR_ItemValBegin + 31)
+#define STR_ItemValTEXTANI_UP (STR_ItemValBegin + 32)
+#define STR_ItemValTEXTANI_DOWN (STR_ItemValBegin + 33)
+#define STR_ItemValEDGE_ORTHOLINES (STR_ItemValBegin + 34)
+#define STR_ItemValEDGE_THREELINES (STR_ItemValBegin + 35)
+#define STR_ItemValEDGE_ONELINE (STR_ItemValBegin + 36)
+#define STR_ItemValEDGE_BEZIER (STR_ItemValBegin + 37)
+#define STR_ItemValMEASURE_STD (STR_ItemValBegin + 38)
+#define STR_ItemValMEASURE_RADIUS (STR_ItemValBegin + 39)
+#define STR_ItemValMEASURE_TEXTHAUTO (STR_ItemValBegin + 40)
+#define STR_ItemValMEASURE_TEXTLEFTOUTSIDE (STR_ItemValBegin + 41)
+#define STR_ItemValMEASURE_TEXTINSIDE (STR_ItemValBegin + 42)
+#define STR_ItemValMEASURE_TEXTRIGHTOUTSID (STR_ItemValBegin + 43)
+#define STR_ItemValMEASURE_TEXTVAUTO (STR_ItemValBegin + 44)
+#define STR_ItemValMEASURE_ABOVE (STR_ItemValBegin + 45)
+#define STR_ItemValMEASURETEXT_BREAKEDLINE (STR_ItemValBegin + 46)
+#define STR_ItemValMEASURE_BELOW (STR_ItemValBegin + 47)
+#define STR_ItemValMEASURETEXT_VERTICALCEN (STR_ItemValBegin + 48)
+#define STR_ItemValCIRC_FULL (STR_ItemValBegin + 49)
+#define STR_ItemValCIRC_SECT (STR_ItemValBegin + 50)
+#define STR_ItemValCIRC_CUT (STR_ItemValBegin + 51)
+#define STR_ItemValCIRC_ARC (STR_ItemValBegin + 52)
+#define STR_ItemValEnd (STR_ItemValCIRC_ARC)
+
+#define STR_ItemNamBegin (STR_ItemValEnd+1)
+#define STR_ItemNam_SHADOW (STR_ItemNamBegin + 0)
+#define STR_ItemNam_SHADOWCOLOR (STR_ItemNamBegin + 1)
+#define STR_ItemNam_SHADOWXDIST (STR_ItemNamBegin + 2)
+#define STR_ItemNam_SHADOWYDIST (STR_ItemNamBegin + 3)
+#define STR_ItemNam_SHADOWTRANSPARENCE (STR_ItemNamBegin + 4)
+#define STR_ItemNam_SHADOW3D (STR_ItemNamBegin + 5)
+#define STR_ItemNam_SHADOWPERSP (STR_ItemNamBegin + 6)
+#define STR_ItemNam_SHADOWRESERVE1 (STR_ItemNamBegin + 7)
+#define STR_ItemNam_SHADOWRESERVE2 (STR_ItemNamBegin + 8)
+#define STR_ItemNam_SHADOWRESERVE3 (STR_ItemNamBegin + 9)
+#define STR_ItemNam_SHADOWRESERVE4 (STR_ItemNamBegin + 10)
+#define STR_ItemNam_SHADOWRESERVE5 (STR_ItemNamBegin + 11)
+#define STR_ItemNamSET_SHADOW (STR_ItemNamBegin + 12)
+#define STR_ItemNam_CAPTIONTYPE (STR_ItemNamBegin + 13)
+#define STR_ItemNam_CAPTIONFIXEDANGLE (STR_ItemNamBegin + 14)
+#define STR_ItemNam_CAPTIONANGLE (STR_ItemNamBegin + 15)
+#define STR_ItemNam_CAPTIONGAP (STR_ItemNamBegin + 16)
+#define STR_ItemNam_CAPTIONESCDIR (STR_ItemNamBegin + 17)
+#define STR_ItemNam_CAPTIONESCISREL (STR_ItemNamBegin + 18)
+#define STR_ItemNam_CAPTIONESCREL (STR_ItemNamBegin + 19)
+#define STR_ItemNam_CAPTIONESCABS (STR_ItemNamBegin + 20)
+#define STR_ItemNam_CAPTIONLINELEN (STR_ItemNamBegin + 21)
+#define STR_ItemNam_CAPTIONFITLINELEN (STR_ItemNamBegin + 22)
+#define STR_ItemNam_CAPTIONRESERVE1 (STR_ItemNamBegin + 23)
+#define STR_ItemNam_CAPTIONRESERVE2 (STR_ItemNamBegin + 24)
+#define STR_ItemNam_CAPTIONRESERVE3 (STR_ItemNamBegin + 25)
+#define STR_ItemNam_CAPTIONRESERVE4 (STR_ItemNamBegin + 26)
+#define STR_ItemNam_CAPTIONRESERVE5 (STR_ItemNamBegin + 27)
+#define STR_ItemNamSET_CAPTION (STR_ItemNamBegin + 28)
+#define STR_ItemNamSET_OUTLINER (STR_ItemNamBegin + 29)
+
+#define STR_ItemNam_ECKENRADIUS (STR_ItemNamBegin + 30)
+#define STR_ItemNam_TEXT_LEFTDIST (STR_ItemNamBegin + 31)
+#define STR_ItemNam_TEXT_RIGHTDIST (STR_ItemNamBegin + 32)
+#define STR_ItemNam_TEXT_UPPERDIST (STR_ItemNamBegin + 33)
+#define STR_ItemNam_TEXT_LOWERDIST (STR_ItemNamBegin + 34)
+#define STR_ItemNam_TEXT_AUTOGROWHEIGHT (STR_ItemNamBegin + 35)
+#define STR_ItemNam_TEXT_MINFRAMEHEIGHT (STR_ItemNamBegin + 36)
+#define STR_ItemNam_TEXT_MAXFRAMEHEIGHT (STR_ItemNamBegin + 37)
+#define STR_ItemNam_TEXT_AUTOGROWWIDTH (STR_ItemNamBegin + 38)
+#define STR_ItemNam_TEXT_MINFRAMEWIDTH (STR_ItemNamBegin + 39)
+#define STR_ItemNam_TEXT_MAXFRAMEWIDTH (STR_ItemNamBegin + 40)
+#define STR_ItemNam_TEXT_VERTADJUST (STR_ItemNamBegin + 41)
+#define STR_ItemNam_TEXT_HORZADJUST (STR_ItemNamBegin + 42)
+#define STR_ItemNam_TEXT_FITTOSIZE (STR_ItemNamBegin + 43)
+#define STR_ItemNam_GRAFRED (STR_ItemNamBegin + 44)
+#define STR_ItemNam_GRAFGREEN (STR_ItemNamBegin + 45)
+#define STR_ItemNam_GRAFBLUE (STR_ItemNamBegin + 46)
+#define STR_ItemNam_GRAFLUMINANCE (STR_ItemNamBegin + 47)
+#define STR_ItemNam_GRAFCONTRAST (STR_ItemNamBegin + 48)
+#define STR_ItemNam_GRAFGAMMA (STR_ItemNamBegin + 49)
+#define STR_ItemNam_GRAFTRANSPARENCE (STR_ItemNamBegin + 50)
+#define STR_ItemNam_GRAFINVERT (STR_ItemNamBegin + 51)
+#define STR_ItemNam_GRAFMODE (STR_ItemNamBegin + 52)
+#define STR_ItemNam_GRAFRESERVE2 (STR_ItemNamBegin + 53)
+#define STR_ItemNam_GRAFRESERVE3 (STR_ItemNamBegin + 54)
+#define STR_ItemNam_GRAFRESERVE4 (STR_ItemNamBegin + 55)
+#define STR_ItemNam_GRAFRESERVE5 (STR_ItemNamBegin + 56)
+#define STR_ItemNam_GRAFRESERVE6 (STR_ItemNamBegin + 57)
+#define STR_ItemNam_RESERVE19 (STR_ItemNamBegin + 58)
+#define STR_ItemNamSET_MISC (STR_ItemNamBegin + 59)
+#define STR_ItemNam_OBJMOVEPROTECT (STR_ItemNamBegin + 60)
+#define STR_ItemNam_OBJSIZEPROTECT (STR_ItemNamBegin + 61)
+#define STR_ItemNam_OBJPRINTABLE (STR_ItemNamBegin + 62)
+#define STR_ItemNam_LAYERID (STR_ItemNamBegin + 63)
+#define STR_ItemNam_LAYERNAME (STR_ItemNamBegin + 64)
+#define STR_ItemNam_OBJECTNAME (STR_ItemNamBegin + 65)
+#define STR_ItemNam_STARTANGLE (STR_ItemNamBegin + 66)
+#define STR_ItemNam_ENDANGLE (STR_ItemNamBegin + 67)
+#define STR_ItemNam_POSITIONX (STR_ItemNamBegin + 68)
+#define STR_ItemNam_POSITIONY (STR_ItemNamBegin + 69)
+#define STR_ItemNam_SIZEWIDTH (STR_ItemNamBegin + 70)
+#define STR_ItemNam_SIZEHEIGHT (STR_ItemNamBegin + 71)
+#define STR_ItemNam_ROTATEANGLE (STR_ItemNamBegin + 72)
+#define STR_ItemNam_SHEARANGLE (STR_ItemNamBegin + 73)
+#define STR_ItemNamEnd (STR_ItemNam_SHEARANGLE)
+#define STR_ItemEnd STR_ItemNamEnd
+
+// 64 Resource-Id's reserviert fuer kompatible Erweiterungen
+#define STR_SvDraw_CacheReserve_Begin (STR_ItemEnd+1)
+#define STR_SvDraw_CacheReserve_End (STR_SvDraw_CacheReserve_Begin+63)
+#define SDR_StringCacheEnd (STR_SvDraw_CacheReserve_Begin-1)
+
+#define STR_ErrorBegin (STR_SvDraw_CacheReserve_End+1)
+#define STR_SvDraw_ErrorReserve_Begin (STR_ErrorBegin + 2)
+// hier ist Platz fuer 30 Eintraege
+#define STR_SvDraw_ErrorReserve_End (STR_SvDraw_ErrorReserve_Begin + 29)
+#define STR_ErrorEnd STR_SvDraw_ErrorReserve_End
+
+// 22-05-98: 2 Eintraege fuer die Bitmaps von der StrErrorReserve abgeknapst
+#define BMAP_Begin (STR_ErrorEnd+1)
+#define BMAP_GrafikEi (BMAP_Begin +0)
+#define BMAP_GrafikDe (BMAP_Begin +1)
+#define BMAP_End (BMAP_Begin +1)
+
+// Strings fuer den Vorlagen-Dialog
+#define SIP_Begin (BMAP_End)
+
+#define SIP_UNKNOWN_ATTR (SIP_Begin + 0)
+#define SIP_XA_LINESTYLE (SIP_Begin + 1)
+#define SIP_XA_LINEDASH (SIP_Begin + 2)
+#define SIP_XA_LINEWIDTH (SIP_Begin + 3)
+#define SIP_XA_LINECOLOR (SIP_Begin + 4)
+#define SIP_XA_LINESTART (SIP_Begin + 5)
+#define SIP_XA_LINEEND (SIP_Begin + 6)
+#define SIP_XA_LINESTARTWIDTH (SIP_Begin + 7)
+#define SIP_XA_LINEENDWIDTH (SIP_Begin + 8)
+#define SIP_XA_LINESTARTCENTER (SIP_Begin + 9)
+#define SIP_XA_LINEENDCENTER (SIP_Begin + 10)
+#define SIP_XA_LINETRANSPARENCE (SIP_Begin + 11)
+#define SIP_XA_LINEJOINT (SIP_Begin + 12)
+#define SIP_XA_LINERESERVED2 (SIP_Begin + 13)
+#define SIP_XA_LINERESERVED3 (SIP_Begin + 14)
+#define SIP_XA_LINERESERVED4 (SIP_Begin + 15)
+#define SIP_XA_LINERESERVED5 (SIP_Begin + 16)
+#define SIP_XA_LINERESERVED_LAST (SIP_Begin + 17)
+#define SIP_XATTRSET_LINE (SIP_Begin + 18)
+#define SIP_XA_FILLSTYLE (SIP_Begin + 19)
+#define SIP_XA_FILLCOLOR (SIP_Begin + 20)
+#define SIP_XA_FILLGRADIENT (SIP_Begin + 21)
+#define SIP_XA_FILLHATCH (SIP_Begin + 22)
+#define SIP_XA_FILLBITMAP (SIP_Begin + 23)
+#define SIP_XA_FILLTRANSPARENCE (SIP_Begin + 24)
+#define SIP_XA_GRADIENTSTEPCOUNT (SIP_Begin + 25)
+#define SIP_XA_FILLBMP_TILE (SIP_Begin + 26)
+#define SIP_XA_FILLBMP_POS (SIP_Begin + 27)
+#define SIP_XA_FILLBMP_SIZEX (SIP_Begin + 28)
+#define SIP_XA_FILLBMP_SIZEY (SIP_Begin + 29)
+#define SIP_XA_FILLFLOATTRANSPARENCE (SIP_Begin + 30)
+#define SIP_XA_FILLRESERVED2 (SIP_Begin + 31)
+#define SIP_XA_FILLBMP_SIZELOG (SIP_Begin + 32)
+#define SIP_XA_FILLBMP_TILEOFFSETX (SIP_Begin + 33)
+#define SIP_XA_FILLBMP_TILEOFFSETY (SIP_Begin + 34)
+#define SIP_XA_FILLBMP_STRETCH (SIP_Begin + 35)
+#define SIP_XA_FILLRESERVED3 (SIP_Begin + 36)
+#define SIP_XA_FILLRESERVED4 (SIP_Begin + 37)
+#define SIP_XA_FILLRESERVED5 (SIP_Begin + 38)
+#define SIP_XA_FILLRESERVED6 (SIP_Begin + 39)
+#define SIP_XA_FILLRESERVED7 (SIP_Begin + 40)
+#define SIP_XA_FILLRESERVED8 (SIP_Begin + 41)
+#define SIP_XA_FILLBMP_POSOFFSETX (SIP_Begin + 42)
+#define SIP_XA_FILLBMP_POSOFFSETY (SIP_Begin + 43)
+#define SIP_XA_FILLBACKGROUND (SIP_Begin + 44)
+#define SIP_XA_FILLRESERVED10 (SIP_Begin + 45)
+#define SIP_XA_FILLRESERVED11 (SIP_Begin + 46)
+#define SIP_XA_FILLRESERVED_LAST (SIP_Begin + 47)
+#define SIP_XATTRSET_FILL (SIP_Begin + 48)
+#define SIP_XA_FORMTXTSTYLE (SIP_Begin + 49)
+#define SIP_XA_FORMTXTADJUST (SIP_Begin + 50)
+#define SIP_XA_FORMTXTDISTANCE (SIP_Begin + 51)
+#define SIP_XA_FORMTXTSTART (SIP_Begin + 52)
+#define SIP_XA_FORMTXTMIRROR (SIP_Begin + 53)
+#define SIP_XA_FORMTXTOUTLINE (SIP_Begin + 54)
+#define SIP_XA_FORMTXTSHADOW (SIP_Begin + 55)
+#define SIP_XA_FORMTXTSHDWCOLOR (SIP_Begin + 56)
+#define SIP_XA_FORMTXTSHDWXVAL (SIP_Begin + 57)
+#define SIP_XA_FORMTXTSHDWYVAL (SIP_Begin + 58)
+#define SIP_XA_FORMTXTSTDFORM (SIP_Begin + 59)
+#define SIP_XA_FORMTXTHIDEFORM (SIP_Begin + 60)
+#define SIP_XA_FORMTXTSHDWTRANSP (SIP_Begin + 61)
+#define SIP_XA_FTRESERVED2 (SIP_Begin + 62)
+#define SIP_XA_FTRESERVED3 (SIP_Begin + 63)
+#define SIP_XA_FTRESERVED4 (SIP_Begin + 64)
+#define SIP_XA_FTRESERVED5 (SIP_Begin + 65)
+#define SIP_XA_FTRESERVED_LAST (SIP_Begin + 66)
+#define SIP_XATTRSET_TEXT (SIP_Begin + 67)
+#define SIP_SA_SHADOW (SIP_Begin + 68)
+#define SIP_SA_SHADOWCOLOR (SIP_Begin + 69)
+#define SIP_SA_SHADOWXDIST (SIP_Begin + 70)
+#define SIP_SA_SHADOWYDIST (SIP_Begin + 71)
+#define SIP_SA_SHADOWTRANSPARENCE (SIP_Begin + 72)
+#define SIP_SA_SHADOW3D (SIP_Begin + 73)
+#define SIP_SA_SHADOWPERSP (SIP_Begin + 74)
+#define SIP_SA_SHADOWRESERVE1 (SIP_Begin + 75)
+#define SIP_SA_SHADOWRESERVE2 (SIP_Begin + 76)
+#define SIP_SA_SHADOWRESERVE3 (SIP_Begin + 77)
+#define SIP_SA_SHADOWRESERVE4 (SIP_Begin + 78)
+#define SIP_SA_SHADOWRESERVE5 (SIP_Begin + 79)
+#define SIP_SDRATTRSET_SHADOW (SIP_Begin + 80)
+#define SIP_SA_CAPTIONTYPE (SIP_Begin + 81)
+#define SIP_SA_CAPTIONFIXEDANGLE (SIP_Begin + 82)
+#define SIP_SA_CAPTIONANGLE (SIP_Begin + 83)
+#define SIP_SA_CAPTIONGAP (SIP_Begin + 84)
+#define SIP_SA_CAPTIONESCDIR (SIP_Begin + 85)
+#define SIP_SA_CAPTIONESCISREL (SIP_Begin + 86)
+#define SIP_SA_CAPTIONESCREL (SIP_Begin + 87)
+#define SIP_SA_CAPTIONESCABS (SIP_Begin + 88)
+#define SIP_SA_CAPTIONLINELEN (SIP_Begin + 89)
+#define SIP_SA_CAPTIONFITLINELEN (SIP_Begin + 90)
+#define SIP_SA_CAPTIONRESERVE1 (SIP_Begin + 91)
+#define SIP_SA_CAPTIONRESERVE2 (SIP_Begin + 92)
+#define SIP_SA_CAPTIONRESERVE3 (SIP_Begin + 93)
+#define SIP_SA_CAPTIONRESERVE4 (SIP_Begin + 94)
+#define SIP_SA_CAPTIONRESERVE5 (SIP_Begin + 95)
+#define SIP_SDRATTRSET_CAPTION (SIP_Begin + 96)
+#define SIP_SDRATTRSET_OUTLINER (SIP_Begin + 97)
+#define SIP_SA_ECKENRADIUS (SIP_Begin + 98)
+#define SIP_SA_TEXT_MINFRAMEHEIGHT (SIP_Begin + 99)
+#define SIP_SA_TEXT_AUTOGROWHEIGHT (SIP_Begin + 100)
+#define SIP_SA_TEXT_FITTOSIZE (SIP_Begin + 101)
+#define SIP_SA_TEXT_LEFTDIST (SIP_Begin + 102)
+#define SIP_SA_TEXT_RIGHTDIST (SIP_Begin + 103)
+#define SIP_SA_TEXT_UPPERDIST (SIP_Begin + 104)
+#define SIP_SA_TEXT_LOWERDIST (SIP_Begin + 105)
+#define SIP_SA_TEXT_VERTADJUST (SIP_Begin + 106)
+#define SIP_SA_TEXT_MAXFRAMEHEIGHT (SIP_Begin + 107)
+#define SIP_SA_TEXT_MINFRAMEWIDTH (SIP_Begin + 108)
+#define SIP_SA_TEXT_MAXFRAMEWIDTH (SIP_Begin + 109)
+#define SIP_SA_TEXT_AUTOGROWWIDTH (SIP_Begin + 110)
+#define SIP_SA_TEXT_HORZADJUST (SIP_Begin + 111)
+#define SIP_SA_TEXT_ANIKIND (SIP_Begin + 112)
+#define SIP_SA_TEXT_ANIDIRECTION (SIP_Begin + 113)
+#define SIP_SA_TEXT_ANISTARTINSIDE (SIP_Begin + 114)
+#define SIP_SA_TEXT_ANISTOPINSIDE (SIP_Begin + 115)
+#define SIP_SA_TEXT_ANICOUNT (SIP_Begin + 116)
+#define SIP_SA_TEXT_ANIDELAY (SIP_Begin + 117)
+#define SIP_SA_TEXT_ANIAMOUNT (SIP_Begin + 118)
+#define SIP_SA_TEXT_CONTOURFRAME (SIP_Begin + 119)
+#define SIP_SA_AUTOSHAPE_ADJUSTMENT (SIP_Begin + 120)
+#define SIP_SA_RESERVE14 (SIP_Begin + 121)
+#define SIP_SA_RESERVE15 (SIP_Begin + 122)
+#define SIP_SA_RESERVE16 (SIP_Begin + 123)
+#define SIP_SA_RESERVE17 (SIP_Begin + 124)
+#define SIP_SA_RESERVE18 (SIP_Begin + 125)
+#define SIP_SA_RESERVE19 (SIP_Begin + 126)
+#define SIP_SDRATTRSET_MISC (SIP_Begin + 127)
+#define SIP_SA_EDGEKIND (SIP_Begin + 128)
+#define SIP_SA_EDGENODE1HORZDIST (SIP_Begin + 129)
+#define SIP_SA_EDGENODE1VERTDIST (SIP_Begin + 130)
+#define SIP_SA_EDGENODE2HORZDIST (SIP_Begin + 131)
+#define SIP_SA_EDGENODE2VERTDIST (SIP_Begin + 132)
+#define SIP_SA_EDGENODE1GLUEDIST (SIP_Begin + 133)
+#define SIP_SA_EDGENODE2GLUEDIST (SIP_Begin + 134)
+#define SIP_SA_EDGELINEDELTAANZ (SIP_Begin + 135)
+#define SIP_SA_EDGELINE1DELTA (SIP_Begin + 136)
+#define SIP_SA_EDGELINE2DELTA (SIP_Begin + 137)
+#define SIP_SA_EDGELINE3DELTA (SIP_Begin + 138)
+#define SIP_SA_EDGERESERVE02 (SIP_Begin + 139)
+#define SIP_SA_EDGERESERVE03 (SIP_Begin + 140)
+#define SIP_SA_EDGERESERVE04 (SIP_Begin + 141)
+#define SIP_SA_EDGERESERVE05 (SIP_Begin + 142)
+#define SIP_SA_EDGERESERVE06 (SIP_Begin + 143)
+#define SIP_SA_EDGERESERVE07 (SIP_Begin + 144)
+#define SIP_SA_EDGERESERVE08 (SIP_Begin + 145)
+#define SIP_SA_EDGERESERVE09 (SIP_Begin + 146)
+#define SIP_SDRATTRSET_EDGE (SIP_Begin + 147)
+#define SIP_SA_MEASUREKIND (SIP_Begin + 148)
+#define SIP_SA_MEASURETEXTHPOS (SIP_Begin + 149)
+#define SIP_SA_MEASURETEXTVPOS (SIP_Begin + 150)
+#define SIP_SA_MEASURELINEDIST (SIP_Begin + 151)
+#define SIP_SA_MEASUREHELPLINEOVERHANG (SIP_Begin + 152)
+#define SIP_SA_MEASUREHELPLINEDIST (SIP_Begin + 153)
+#define SIP_SA_MEASUREHELPLINE1LEN (SIP_Begin + 154)
+#define SIP_SA_MEASUREHELPLINE2LEN (SIP_Begin + 155)
+#define SIP_SA_MEASUREBELOWREFEDGE (SIP_Begin + 156)
+#define SIP_SA_MEASURETEXTROTA90 (SIP_Begin + 157)
+#define SIP_SA_MEASURETEXTUPSIDEDOWN (SIP_Begin + 158)
+#define SIP_SA_MEASUREOVERHANG (SIP_Begin + 159)
+#define SIP_SA_MEASUREUNIT (SIP_Begin + 160)
+#define SIP_SA_MEASURESCALE (SIP_Begin + 161)
+#define SIP_SA_MEASURESHOWUNIT (SIP_Begin + 162)
+#define SIP_SA_MEASUREFORMATSTRING (SIP_Begin + 163)
+#define SIP_SA_MEASURETEXTAUTOANGLE (SIP_Begin + 164)
+#define SIP_SA_MEASURETEXTAUTOANGLEVIEW (SIP_Begin + 165)
+#define SIP_SA_MEASURETEXTISFIXEDANGLE (SIP_Begin + 166)
+#define SIP_SA_MEASURETEXTFIXEDANGLE (SIP_Begin + 167)
+#define SIP_SA_MEASURERESERVE04 (SIP_Begin + 168)
+#define SIP_SA_MEASURERESERVE05 (SIP_Begin + 169)
+#define SIP_SA_MEASURERESERVE06 (SIP_Begin + 170)
+#define SIP_SA_MEASURERESERVE07 (SIP_Begin + 171)
+#define SIP_SDRATTRSET_MEASURE (SIP_Begin + 172)
+#define SIP_SA_CIRCKIND (SIP_Begin + 173)
+#define SIP_SA_CIRCSTARTANGLE (SIP_Begin + 174)
+#define SIP_SA_CIRCENDANGLE (SIP_Begin + 175)
+#define SIP_SA_CIRCRESERVE0 (SIP_Begin + 176)
+#define SIP_SA_CIRCRESERVE1 (SIP_Begin + 177)
+#define SIP_SA_CIRCRESERVE2 (SIP_Begin + 178)
+#define SIP_SA_CIRCRESERVE3 (SIP_Begin + 179)
+#define SIP_SDRATTRSET_CIRC (SIP_Begin + 180)
+#define SIP_SA_OBJMOVEPROTECT (SIP_Begin + 181)
+#define SIP_SA_OBJSIZEPROTECT (SIP_Begin + 182)
+#define SIP_SA_OBJPRINTABLE (SIP_Begin + 183)
+#define SIP_SA_LAYERID (SIP_Begin + 184)
+#define SIP_SA_LAYERNAME (SIP_Begin + 185)
+#define SIP_SA_OBJECTNAME (SIP_Begin + 186)
+#define SIP_SA_ALLPOSITIONX (SIP_Begin + 187)
+#define SIP_SA_ALLPOSITIONY (SIP_Begin + 188)
+#define SIP_SA_ALLSIZEWIDTH (SIP_Begin + 189)
+#define SIP_SA_ALLSIZEHEIGHT (SIP_Begin + 190)
+#define SIP_SA_ONEPOSITIONX (SIP_Begin + 191)
+#define SIP_SA_ONEPOSITIONY (SIP_Begin + 192)
+#define SIP_SA_ONESIZEWIDTH (SIP_Begin + 193)
+#define SIP_SA_ONESIZEHEIGHT (SIP_Begin + 194)
+#define SIP_SA_LOGICSIZEWIDTH (SIP_Begin + 195)
+#define SIP_SA_LOGICSIZEHEIGHT (SIP_Begin + 196)
+#define SIP_SA_ROTATEANGLE (SIP_Begin + 197)
+#define SIP_SA_SHEARANGLE (SIP_Begin + 198)
+#define SIP_SA_MOVEX (SIP_Begin + 199)
+#define SIP_SA_MOVEY (SIP_Begin + 200)
+#define SIP_SA_RESIZEXONE (SIP_Begin + 201)
+#define SIP_SA_RESIZEYONE (SIP_Begin + 202)
+#define SIP_SA_ROTATEONE (SIP_Begin + 203)
+#define SIP_SA_HORZSHEARONE (SIP_Begin + 204)
+#define SIP_SA_VERTSHEARONE (SIP_Begin + 205)
+#define SIP_SA_RESIZEXALL (SIP_Begin + 206)
+#define SIP_SA_RESIZEYALL (SIP_Begin + 207)
+#define SIP_SA_ROTATEALL (SIP_Begin + 208)
+#define SIP_SA_HORZSHEARALL (SIP_Begin + 209)
+#define SIP_SA_VERTSHEARALL (SIP_Begin + 210)
+#define SIP_SA_TRANSFORMREF1X (SIP_Begin + 211)
+#define SIP_SA_TRANSFORMREF1Y (SIP_Begin + 212)
+#define SIP_SA_TRANSFORMREF2X (SIP_Begin + 213)
+#define SIP_SA_TRANSFORMREF2Y (SIP_Begin + 214)
+#define SIP_EE_PARA_HYPHENATE (SIP_Begin + 215)
+#define SIP_EE_PARA_BULLETSTATE (SIP_Begin + 216)
+#define SIP_EE_PARA_OUTLLRSPACE (SIP_Begin + 217)
+#define SIP_EE_PARA_OUTLLEVEL (SIP_Begin + 218)
+#define SIP_EE_PARA_BULLET (SIP_Begin + 219)
+#define SIP_EE_PARA_LRSPACE (SIP_Begin + 220)
+#define SIP_EE_PARA_ULSPACE (SIP_Begin + 221)
+#define SIP_EE_PARA_SBL (SIP_Begin + 222)
+#define SIP_EE_PARA_JUST (SIP_Begin + 223)
+#define SIP_EE_PARA_TABS (SIP_Begin + 224)
+#define SIP_EE_CHAR_COLOR (SIP_Begin + 225)
+#define SIP_EE_CHAR_FONTINFO (SIP_Begin + 226)
+#define SIP_EE_CHAR_FONTHEIGHT (SIP_Begin + 227)
+#define SIP_EE_CHAR_FONTWIDTH (SIP_Begin + 228)
+#define SIP_EE_CHAR_WEIGHT (SIP_Begin + 229)
+#define SIP_EE_CHAR_UNDERLINE (SIP_Begin + 230)
+#define SIP_EE_CHAR_STRIKEOUT (SIP_Begin + 231)
+#define SIP_EE_CHAR_ITALIC (SIP_Begin + 232)
+#define SIP_EE_CHAR_OUTLINE (SIP_Begin + 233)
+#define SIP_EE_CHAR_SHADOW (SIP_Begin + 234)
+#define SIP_EE_CHAR_ESCAPEMENT (SIP_Begin + 235)
+#define SIP_EE_CHAR_PAIRKERNING (SIP_Begin + 236)
+#define SIP_EE_CHAR_KERNING (SIP_Begin + 237)
+#define SIP_EE_CHAR_WLM (SIP_Begin + 238)
+#define SIP_EE_FEATURE_TAB (SIP_Begin + 239)
+#define SIP_EE_FEATURE_LINEBR (SIP_Begin + 240)
+#define SIP_EE_FEATURE_NOTCONV (SIP_Begin + 241)
+#define SIP_EE_FEATURE_FIELD (SIP_Begin + 242)
+
+#define SIP_SA_GRAFRED (SIP_Begin + 243)
+#define SIP_SA_GRAFGREEN (SIP_Begin + 244)
+#define SIP_SA_GRAFBLUE (SIP_Begin + 245)
+#define SIP_SA_GRAFLUMINANCE (SIP_Begin + 246)
+#define SIP_SA_GRAFCONTRAST (SIP_Begin + 247)
+#define SIP_SA_GRAFGAMMA (SIP_Begin + 248)
+#define SIP_SA_GRAFTRANSPARENCE (SIP_Begin + 249)
+#define SIP_SA_GRAFINVERT (SIP_Begin + 250)
+#define SIP_SA_GRAFMODE (SIP_Begin + 251)
+#define SIP_SA_GRAFRESERVE2 (SIP_Begin + 252)
+#define SIP_SA_GRAFRESERVE3 (SIP_Begin + 253)
+#define SIP_SA_GRAFRESERVE4 (SIP_Begin + 254)
+#define SIP_SA_GRAFRESERVE5 (SIP_Begin + 255)
+#define SIP_SA_GRAFRESERVE6 (SIP_Begin + 256)
+#define SIP_SDRATTRSET_GRAF (SIP_Begin + 257)
+
+#define SIP_SA_MARKERS (SIP_Begin + 258)
+#define SIP_SA_FINE_MARKERS (SIP_Begin + 259)
+
+#define SIP_End (SIP_SA_FINE_MARKERS)
+
+#define SDR_ResourceEnd (SIP_End)
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
diff --git a/svx/inc/svdtouch.hxx b/svx/inc/svdtouch.hxx
new file mode 100644
index 000000000000..3c26ee5807bd
--- /dev/null
+++ b/svx/inc/svdtouch.hxx
@@ -0,0 +1,98 @@
+/*************************************************************************
+ *
+ * $RCSfile: svdtouch.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:01 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _SVDTOUCH_HXX
+#define _SVDTOUCH_HXX
+
+#ifndef _SOLAR_H
+#include <tools/solar.h>
+#endif
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+class Point;
+class Polygon;
+class PolyPolygon;
+class XPolygon;
+class XPolyPolygon;
+class Rectangle;
+class OutputDevice;
+
+FASTBOOL IsPointInsidePoly(const Polygon& rPoly, const Point& rHit);
+FASTBOOL IsPointInsidePoly(const PolyPolygon& rPoly, const Point& rHit);
+FASTBOOL IsPointInsidePoly(const XPolygon& rPoly, const Point& rHit, OutputDevice* pOut=NULL);
+FASTBOOL IsPointInsidePoly(const XPolyPolygon& rPoly, const Point& rHit, OutputDevice* pOut=NULL);
+
+FASTBOOL IsRectTouchesPoly(const Polygon& rPoly, const Rectangle& rHit);
+FASTBOOL IsRectTouchesPoly(const PolyPolygon& rPoly, const Rectangle& rHit);
+FASTBOOL IsRectTouchesPoly(const XPolygon& rPoly, const Rectangle& rHit, OutputDevice* pOut=NULL);
+FASTBOOL IsRectTouchesPoly(const XPolyPolygon& rPoly, const Rectangle& rHit, OutputDevice* pOut=NULL);
+
+FASTBOOL IsRectTouchesLine(const Point& rPt1, const Point& rPt2, const Rectangle& rHit);
+FASTBOOL IsRectTouchesLine(const Polygon& rLine, const Rectangle& rHit);
+FASTBOOL IsRectTouchesLine(const PolyPolygon& rLine, const Rectangle& rHit);
+FASTBOOL IsRectTouchesLine(const XPolygon& rLine, const Rectangle& rHit, OutputDevice* pOut=NULL);
+FASTBOOL IsRectTouchesLine(const XPolyPolygon& rLine, const Rectangle& rHit, OutputDevice* pOut=NULL);
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+#endif //_SVDTOUCH_HXX
+
diff --git a/svx/inc/svdviter.hxx b/svx/inc/svdviter.hxx
new file mode 100644
index 000000000000..b5efda013293
--- /dev/null
+++ b/svx/inc/svdviter.hxx
@@ -0,0 +1,150 @@
+/*************************************************************************
+ *
+ * $RCSfile: svdviter.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:01 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _SVDVITER_HXX
+#define _SVDVITER_HXX
+
+#ifndef _SOLAR_H
+#include <tools/solar.h>
+#endif
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+class OutputDevice;
+class Window;
+class SdrView;
+class SdrPageView;
+class SdrModel;
+class SdrPage;
+class SdrObject;
+class SetOfByte;
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+class SdrViewIter {
+ const SdrModel* pModel;
+ const SdrPage* pPage;
+ const SdrObject* pObject;
+ SdrView* pAktView;
+ FASTBOOL bNoMasterPage;
+ USHORT nListenerNum;
+ USHORT nPageViewNum;
+ USHORT nOutDevNum;
+private:
+ void ImpInitVars();
+ SdrView* ImpFindView();
+ SdrPageView* ImpFindPageView();
+ OutputDevice* ImpFindOutDev();
+ Window* ImpFindWindow();
+ FASTBOOL ImpCheckPageView(SdrPageView* pPV) const;
+public:
+ SdrViewIter(const SdrModel* pModel);
+ SdrViewIter(const SdrPage* pPage, FASTBOOL bNoMasterPage=FALSE);
+ SdrViewIter(const SdrObject* pObject, FASTBOOL bNoMasterPage=FALSE);
+ SdrView* FirstView();
+ SdrView* NextView();
+ SdrPageView* FirstPageView();
+ SdrPageView* NextPageView();
+ OutputDevice* FirstOutDev();
+ OutputDevice* NextOutDev();
+ Window* FirstWindow();
+ Window* NextWindow();
+};
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+#ifdef _JUST_DESCRIPTION
+
+Mit dieser Klasse kann man rausbekommen:
+- SdrView* First/NextView()
+ - Alle Views in denen ein Models dargestellt wird
+ - Alle Views in denen eine bestimme Page sichtbar ist (ww. auch als MasterPage)
+ - Alle Views in denen ein bestimmes Objekt sichtbar ist (ww. auch auf MasterPage)
+- SdrPageView* First/NextPageView()
+ - Alle PageViews in denen ein Models dargestellt wird
+ - Alle PageViews in denen eine bestimme Page sichtbar ist (ww. auch als MasterPage)
+ - Alle PageViews in denen ein bestimmes Objekt sichtbar ist (ww. auch auf MasterPage)
+- OutputDevice* First/NextOutDev()
+ - Alle OutputDevices in denen ein Models dargestellt wird
+ - Alle OutputDevices in denen eine bestimme Page sichtbar ist (ww. auch als MasterPage)
+ - Alle OutputDevices in denen ein bestimmes Objekt sichtbar ist (ww. auch auf MasterPage)
+- Window* First/NextWindow()
+ - Alle Windows in denen ein Models dargestellt wird
+ - Alle Windows in denen eine bestimme Page sichtbar ist (auch als MasterPage)
+ - Alle Windows in denen ein bestimmes Objekt sichtbar ist (auch auf MasterPage)
+Ob die Auswahl auf ein(e) bestimmte(s) Page/Objekt beschraenkt wird, bestimmt man
+durch die Wahl des Konstruktors.
+
+Es werden u.a. auch berueksichtigt:
+- Layer Sichtbarkeitsstatus
+- Visible Layer von MasterPages
+- Mehrfachlayer bei Gruppenobjekten
+
+Es wird nicht berueksichtigt:
+- Ob die Pages/Objekte wirklich schon gepaintet wurden oder noch ein Invalidate ansteht, ...
+- Ob die Pages/Objekte in einem Window im sichtbaren Bereich liegen
+
+#endif // _JUST_DESCRIPTION
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+#endif //_SVDVITER_HXX
+
diff --git a/svx/inc/svimbase.hxx b/svx/inc/svimbase.hxx
new file mode 100644
index 000000000000..d13dbfbc5172
--- /dev/null
+++ b/svx/inc/svimbase.hxx
@@ -0,0 +1,556 @@
+/*************************************************************************
+ *
+ * $RCSfile: svimbase.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:01 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _SVIMBASE_HXX
+#define _SVIMBASE_HXX
+
+#ifdef VCL
+
+#ifndef _SV_BITMAP_HXX //autogen
+#include <vcl/bitmap.hxx>
+#endif
+#ifndef _SV_SALBTYPE_HXX //autogen
+#include <vcl/salbtype.hxx>
+#endif
+
+
+// -----------
+// - Defines -
+// -----------
+
+#ifdef WIN
+#define _SVHUGE huge
+#else
+#define _SVHUGE
+#endif
+
+// ----------------
+// - SimDepthType -
+// ----------------
+
+enum SimDepthType
+{
+ SIM_DEPTH_1,
+ SIM_DEPTH_4,
+ SIM_DEPTH_8,
+ SIM_DEPTH_24
+};
+
+// ------------
+// - SimColor -
+// ------------
+
+struct SimColor
+{
+ BYTE cBlue;
+ BYTE cGreen;
+ BYTE cRed;
+};
+
+// ------------------------------------------------------------------------
+
+inline BOOL operator==( const SimColor& rCol1, const SimColor& rCol2 )
+{
+ return ( ( rCol1.cRed == rCol2.cRed ) &&
+ ( rCol1.cGreen == rCol2.cGreen ) &&
+ ( rCol1.cBlue == rCol2.cBlue ) );
+}
+
+// --------------
+// - SimPalette -
+// --------------
+
+struct SimPalette
+{
+ ULONG nColors;
+ SimColor aColorArray[ 256 ];
+};
+
+// ---------------
+// - SvImageBase -
+// ---------------
+
+class SfxViewFrame;
+class SfxProgress;
+
+class SvImageBase
+{
+private:
+
+ Bitmap aOutBitmap;
+ HPBYTE pArray1;
+ HPBYTE pArray2;
+ HPBYTE pArray3;
+ HPBYTE pArray4;
+ HPBYTE pOrgArray;
+ HPBYTE pDestArray;
+ SimPalette* pPal1;
+ SimPalette* pPal2;
+ SimPalette* pPal3;
+ SimPalette* pPal4;
+ ULONG nWidth1;
+ ULONG nWidth2;
+ ULONG nWidth3;
+ ULONG nWidth4;
+ ULONG nHeight1;
+ ULONG nHeight2;
+ ULONG nHeight3;
+ ULONG nHeight4;
+ ULONG nAlignedWidth1;
+ ULONG nAlignedWidth2;
+ ULONG nAlignedWidth3;
+ ULONG nAlignedWidth4;
+ ULONG nWhichOrg;
+ SimDepthType eOrgDepth;
+ SimDepthType eUndoDepth;
+ SimDepthType eRedoDepth;
+ BOOL bIsUndo;
+ BOOL bIsRedo;
+ BOOL bCreateUndo;
+ BOOL bValid;
+ BOOL bDitherAll;
+
+ HPBYTE BitmapToArray24( const Bitmap& rBitmap, ULONG* pWidth,
+ ULONG* pHeight, ULONG* pAlignedWidth,
+ SfxViewFrame *pFrame = NULL );
+ BOOL Array24ToBitmap( HPBYTE pArray, Bitmap &rBitmap,
+ const ULONG nWidth, const ULONG nHeight,
+ const ULONG nColorCount = 256,
+ ULONG nLast = 0, SfxProgress* pProgress = NULL );
+
+ Bitmap CreateSaveBitmap( const SimDepthType eDepth, SfxViewFrame *pFrame = NULL );
+
+ HPBYTE CreateArray24( ULONG nWidth, ULONG nHeight );
+ void DeleteArray( HPBYTE pArray );
+
+ SvImageBase(const SvImageBase& rSvImageBase);
+ const SvImageBase& operator=(const SvImageBase& rSvImageBase);
+
+public:
+
+ SvImageBase();
+ SvImageBase( const Bitmap& rBitmap,
+ const ULONG nColorCount = 256,
+ ULONG nLast = 0, SfxProgress* pProgress = NULL );
+ ~SvImageBase();
+
+ BOOL IsValid() { return bValid; }
+
+ ULONG GetOrgWidth() const { return nWhichOrg == 1 ? nWidth1 : nWidth2; }
+ ULONG GetDestWidth() const { return nWhichOrg == 1 ? nWidth2 : nWidth1; }
+
+ ULONG GetOrgHeight() const { return nWhichOrg == 1 ? nHeight1 : nHeight2; }
+ ULONG GetDestHeight() const { return nWhichOrg == 1 ? nHeight2 : nHeight1; }
+
+ ULONG GetOrgAlignedWidth() const { return nWhichOrg == 1 ? nAlignedWidth1 : nAlignedWidth2; }
+ ULONG GetDestAlignedWidth() const { return nWhichOrg == 1 ? nAlignedWidth2 : nAlignedWidth1; }
+
+ ULONG GetOrgAlignedSize() const { return GetOrgAlignedWidth() * GetOrgHeight(); }
+ ULONG GetDestAlignedSize() const { return GetDestAlignedWidth() * GetDestHeight(); }
+
+ // Farbtiefe des Ausgangsbildes ermitteln und setzen
+ SimDepthType GetDepth() const { return eOrgDepth; }
+ void SetDepth( const SimDepthType eDepth ) { eOrgDepth = eDepth; }
+
+ // Farbtiefen nach Undo und Redo ermitteln und setzen
+ SimDepthType GetUndoDepth() const { return eUndoDepth; }
+ void SetUndoDepth(const SimDepthType eDepth) { eUndoDepth = eDepth; }
+
+ SimDepthType GetRedoDepth() const { return eRedoDepth; }
+ void SetRedoDepth(const SimDepthType eDepth) { eRedoDepth = eDepth; }
+
+ // Vor- und Ruecklauf der Bildverarbeitung
+ BOOL BeginProcessing( BOOL bUndo = TRUE );
+ void EndProcessing();
+
+ BOOL BeginProcessingExt(ULONG nWidth, ULONG nHeight, BOOL bUndo = TRUE);
+ void EndProcessingExt() { EndProcessing(); }
+
+ // Zeiger auf Arrays zur Verfuegung stellen
+ HPBYTE GetOrgPointer() { return pOrgArray; }
+ HPBYTE GetDestPointer() { return pDestArray; }
+
+ // DIB-Erzeugung fuer Anzeige
+ BOOL CreateOutBitmap( const ULONG nColorCount = 256, ULONG nLast = 0,
+ SfxProgress* pProgress = NULL );
+
+ // Undo-Verwaltung
+ BOOL DoUndo( SfxProgress* pProgress = NULL );
+ BOOL DoRedo( SfxProgress* pProgress = NULL );
+
+ // DIB-Rueckgabe fuer Anzeige
+ const Bitmap& GetOutBitmap() const;
+
+ // DIB-Rueckgabe fuer Speicherung
+ Bitmap GetSaveBitmap();
+
+ // Palette besorgen
+ SimPalette* GetOrgPalette() const { return nWhichOrg == 1 ? pPal1 : pPal2; }
+ SimPalette* GetDestPalette() const { return nWhichOrg == 1 ? pPal2 : pPal1; }
+};
+
+// ----------------
+// - DitherBitmap -
+// ----------------
+
+BOOL DitherBitmap( Bitmap& rBitmap, BOOL bDitherAlways = FALSE );
+
+#else // VCL
+
+#ifndef _BITMAP_HXX //autogen
+#include <vcl/bitmap.hxx>
+#endif
+#ifndef _PAL_HXX
+#include <vcl/pal.hxx>
+#endif
+#ifndef _SVWIN_H
+#include <tools/svwin.h>
+#endif
+
+
+#undef GetPrinter
+#undef SetPrinter
+
+#ifndef _SVHUGE
+#ifdef WIN
+#define _SVHUGE huge
+#else
+#define _SVHUGE
+#endif // WIN
+#endif // _SVHUGE
+
+
+class SfxViewFrame;
+class SfxProgress;
+
+
+/******************************************************************************/
+
+
+enum SimDepthType
+{
+ SIM_DEPTH_1,
+ SIM_DEPTH_4,
+ SIM_DEPTH_8,
+ SIM_DEPTH_24
+};
+
+
+/******************************************************************************/
+
+
+struct SimColor
+{
+ BYTE cBlue;
+ BYTE cGreen;
+ BYTE cRed;
+};
+
+
+BOOL operator==( const SimColor& rCol1, const SimColor& rCol2 );
+
+
+/******************************************************************************/
+
+
+struct SimPalette
+{
+ ULONG nColors;
+ SimColor aColorArray[ 256 ];
+};
+
+
+/******************************************************************************/
+
+
+class SvImageBase
+{
+#if defined(WIN) || defined(WNT)
+
+ HGLOBAL hArray1;
+ HGLOBAL hArray2;
+ HGLOBAL hArray3;
+ HGLOBAL hArray4;
+
+
+protected:
+
+ HGLOBAL BitmapToArray24(const Bitmap& rBitmap, ULONG* pWidth,
+ ULONG* pHeight, ULONG* pAlignedWidth,
+ SfxViewFrame* pFrame = NULL);
+ BOOL Array24ToBitmap(HGLOBAL hArray, Bitmap &rBitmap,
+ const ULONG nWidth, const ULONG nHeight,
+ const ULONG nColorCount = 256,
+ ULONG nLast = 0,
+ SfxProgress* pProgress = NULL);
+
+ HGLOBAL CreateArray24(ULONG nWidth, ULONG nHeight);
+ void DeleteArray(HGLOBAL hArray);
+
+ // DIB-Funktionen, die noch nicht frei in SV zur Verfuegung stehen
+ HBITMAP DDBtoDIB(HBITMAP hBitmap, HPALETTE hPalette);
+ ULONG PaletteSize(void* p);
+
+ // RLE-Dekomprimierung
+ BOOL DecompressRLE4(BYTE _SVHUGE* pSrc, BYTE _SVHUGE* pDst,
+ ULONG nWidth, BITMAPINFO* pBMI);
+
+ BOOL DecompressRLE8(BYTE _SVHUGE* pSrc, BYTE _SVHUGE* pDst,
+ ULONG nWidth, BITMAPINFO* pBMI);
+
+#endif // WIN || WNT
+
+
+/******************************************************************************/
+
+
+#if defined(OS2) || defined(UNX) || defined(MAC)
+
+ BYTE _SVHUGE* pArray1;
+ BYTE _SVHUGE* pArray2;
+ BYTE _SVHUGE* pArray3;
+ BYTE _SVHUGE* pArray4;
+
+
+protected:
+
+ BYTE _SVHUGE* BitmapToArray24(const Bitmap& rBitmap, ULONG* pWidth,
+ ULONG* pHeight, ULONG* pAlignedWidth,
+ SfxViewFrame *pFrame = NULL);
+ BOOL Array24ToBitmap(BYTE _SVHUGE*, Bitmap &rBitmap,
+ const ULONG nWidth, const ULONG nHeight,
+ const ULONG nColorCount = 256,
+ ULONG nLast = 0,
+ SfxProgress* pProgress = NULL);
+
+
+ BYTE _SVHUGE* CreateArray24(ULONG nWidth, ULONG nHeight);
+ void DeleteArray(BYTE _SVHUGE* pArray);
+
+#if defined OS2
+
+ // RLE-Dekomprimierung
+ BOOL DecompressRLE4(BYTE* pSrc, BYTE* pDst,
+ ULONG nWidth, BmpPaletteEntryOS2* pPal);
+
+ BOOL DecompressRLE8(BYTE* pSrc, BYTE* pDst,
+ ULONG nWidth, BmpPaletteEntryOS2* pPal);
+
+#endif // OS2
+
+#endif // OS2 || UNX || MAC
+
+
+/******************************************************************************/
+
+
+private:
+ Palette aDithPal;
+
+ BYTE _SVHUGE* pOrgArray;
+ BYTE _SVHUGE* pDestArray;
+ BYTE _SVHUGE* pUndoArray;
+ BYTE _SVHUGE* pMergeArray;
+
+ Bitmap* pOutBitmap;
+
+ SimPalette* pPal1;
+ SimPalette* pPal2;
+ SimPalette* pPal3;
+ SimPalette* pPal4;
+
+ long nDummy1;
+ long nDummy2;
+ long nDummy3;
+ long nDummy4;
+
+ ULONG nWidth1;
+ ULONG nWidth2;
+ ULONG nWidth3;
+ ULONG nWidth4;
+
+ ULONG nHeight1;
+ ULONG nHeight2;
+ ULONG nHeight3;
+ ULONG nHeight4;
+
+ ULONG nAlignedWidth1;
+ ULONG nAlignedWidth2;
+ ULONG nAlignedWidth3;
+ ULONG nAlignedWidth4;
+
+ USHORT nWhichOrg;
+ BOOL bIsUndo;
+ BOOL bIsRedo;
+ BOOL bCreateUndo;
+
+ SimDepthType eOrgDepth;
+ SimDepthType eUndoDepth;
+ SimDepthType eRedoDepth;
+
+ BOOL bValid;
+
+ BOOL bDitherAll;
+
+
+ // !!! steht nicht zur Verfuegung !!!
+ SvImageBase(const SvImageBase& rSvImageBase);
+ const SvImageBase& operator=(const SvImageBase& rSvImageBase);
+
+
+public:
+
+ SvImageBase();
+ SvImageBase(const Bitmap& rBitmap, const ULONG nColorCount = 256, ULONG nLast = 0, SfxProgress* pProgress = NULL);
+ ~SvImageBase();
+
+ // alles korrekt erzeugt?
+ BOOL IsValid() { return bValid; }
+
+ // Allgemeine Informationsfunktionen (Bildgroesse etc.)
+ ULONG GetOrgWidth() const { return nWhichOrg == 1 ? nWidth1 : nWidth2; }
+ ULONG GetDestWidth() const { return nWhichOrg == 1 ? nWidth2 : nWidth1; }
+ ULONG GetUndoWidth() const { return nWidth3; }
+ ULONG GetMergeWidth() const { return nWidth4; }
+
+ ULONG GetOrgHeight() const { return nWhichOrg == 1 ? nHeight1 : nHeight2; }
+ ULONG GetDestHeight() const { return nWhichOrg == 1 ? nHeight2 : nHeight1; }
+ ULONG GetUndoHeight() const { return nHeight3; }
+ ULONG GetMergeHeight() const { return nHeight4; }
+
+ ULONG GetOrgAlignedWidth() const { return nWhichOrg == 1 ? nAlignedWidth1 : nAlignedWidth2; }
+ ULONG GetDestAlignedWidth() const { return nWhichOrg == 1 ? nAlignedWidth2 : nAlignedWidth1; }
+ ULONG GetUndoAlignedWidth() const { return nAlignedWidth3; }
+ ULONG GetMergeAlignedWidth() const { return nAlignedWidth4; }
+
+ ULONG GetOrgAlignedSize() const { return GetOrgAlignedWidth() * GetOrgHeight(); }
+ ULONG GetDestAlignedSize() const { return GetDestAlignedWidth() * GetDestHeight(); }
+ ULONG GetUndoAlignedSize() const { return GetUndoAlignedWidth() * GetUndoHeight(); }
+ ULONG GetMergeAlignedSize() const { return GetMergeAlignedWidth() * GetMergeHeight(); }
+
+ // Farbtiefe des Ausgangsbildes ermitteln und setzen
+ SimDepthType GetDepth() const { return eOrgDepth; }
+ void SetDepth(const SimDepthType eDepth) { eOrgDepth = eDepth; }
+
+ // Farbtiefen nach Undo und Redo ermitteln und setzen
+ SimDepthType GetUndoDepth() const { return eUndoDepth; }
+ SimDepthType GetRedoDepth() const { return eRedoDepth; }
+ void SetUndoDepth(const SimDepthType eDepth) { eUndoDepth = eDepth; }
+ void SetRedoDepth(const SimDepthType eDepth) { eRedoDepth = eDepth; }
+
+ // Vor- und Ruecklauf der Bildverarbeitung
+ BOOL BeginProcessing(BOOL bUndo = TRUE);
+ void EndProcessing();
+
+ BOOL BeginProcessingExt(ULONG nWidth, ULONG nHeight, BOOL bUndo = TRUE);
+ void EndProcessingExt();
+
+ BOOL BeginProcessingMerge(BOOL bUndo = TRUE);
+ void EndProcessingMerge();
+
+ // Zeiger auf Arrays zur Verfuegung stellen
+ BYTE _SVHUGE* GetOrgPointer() { return pOrgArray; }
+ BYTE _SVHUGE* GetDestPointer() { return pDestArray; }
+ BYTE _SVHUGE* GetUndoPointer() { return pUndoArray; }
+ BYTE _SVHUGE* GetMergePointer() { return pMergeArray; }
+
+ // Zeiger auf Ursprungs-Array zur Verfuegung stellen,
+ // wenn dieses nicht veraendert werden soll
+#if defined(WIN) || defined(WNT)
+ HGLOBAL GetOrgPointerUnchanged() { return (nWhichOrg == 1 ? hArray1 : hArray2); }
+#endif // WIN || WNT
+
+#if defined(OS2) || defined(UNX) || defined(MAC)
+ BYTE _SVHUGE* GetOrgPointerUnchanged() { return (nWhichOrg == 1 ? pArray1 : pArray2); }
+#endif // OS2 || UNX || MAC
+
+ // Setzen des Ausgangs-DIB's
+ void SetOrgBitmap(const Bitmap& rBitmap) { pOutBitmap = new Bitmap(rBitmap); }
+
+ // DIB-Erzeugung fuer Anzeige
+ BOOL CreateOutBitmap(const ULONG nColorCount = 256, ULONG nLast = 0, SfxProgress* pProgress = NULL );
+
+ // DIB-Erzeugung fuer Speicherung
+ Bitmap CreateSaveBitmap(const SimDepthType eDepth, SfxViewFrame *pFrame = NULL );
+
+ // Undo-Verwaltung
+ BOOL DoUndo( SfxProgress* pProgress = NULL );
+ BOOL DoRedo( SfxProgress* pProgress = NULL );
+
+ // DIB-Rueckgabe fuer Anzeige
+ Bitmap& GetOutBitmap() const;
+
+ // DIB-Rueckgabe fuer Speicherung
+ Bitmap GetSaveBitmap() { return CreateSaveBitmap( eOrgDepth ); }
+
+ // Palette besorgen
+ SimPalette* GetOrgPalette() const { return nWhichOrg == 1 ? pPal1 : pPal2; }
+ SimPalette* GetDestPalette() const { return nWhichOrg == 1 ? pPal2 : pPal1; }
+};
+
+// ----------------
+// - DitherBitmap -
+// ----------------
+
+BOOL DitherBitmap( Bitmap& rBitmap );
+
+#endif // VCL
+#endif // _SVIMBASE_HXX
diff --git a/svx/inc/svxempty.hxx b/svx/inc/svxempty.hxx
new file mode 100644
index 000000000000..bdcd69c1bb6f
--- /dev/null
+++ b/svx/inc/svxempty.hxx
@@ -0,0 +1,81 @@
+/*************************************************************************
+ *
+ * $RCSfile: svxempty.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:01 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SVXEMPTY_HXX
+#define _SVXEMPTY_HXX
+
+
+#ifndef _STRING_HXX //autogen
+#include <tools/string.hxx>
+#endif
+
+#ifndef ICC
+extern XubString& rImplEmptyStr;
+inline const XubString& GetEmptyStr() { return rImplEmptyStr; }
+#define GetEmptySStr GetEmptyStr
+#else
+// CSET stellt rImplEmptyStr nicht in items.lib (?)
+const XubString& GetEmptyStr();
+#define GetEmptySStr GetEmptyStr
+#endif
+
+
+#endif
+
diff --git a/svx/inc/svxerr.hxx b/svx/inc/svxerr.hxx
new file mode 100644
index 000000000000..46eafae1fd76
--- /dev/null
+++ b/svx/inc/svxerr.hxx
@@ -0,0 +1,130 @@
+/*************************************************************************
+ *
+ * $RCSfile: svxerr.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:01 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SVXERR_HXX
+#define _SVXERR_HXX
+
+// include ---------------------------------------------------------------
+
+#ifndef _ERRCODE_HXX
+#include <tools/errcode.hxx>
+#endif
+
+// define ----------------------------------------------------------------
+
+#define ERRCODE_SVX_LINGU_THESAURUSNOTEXISTS (1UL | ERRCODE_AREA_SVX | \
+ ERRCODE_CLASS_NOTEXISTS)
+#define ERRCODE_SVX_LINGU_LANGUAGENOTEXISTS (2UL | ERRCODE_AREA_SVX | \
+ ERRCODE_CLASS_NOTEXISTS)
+#define ERRCODE_SVX_LINGU_LINGUNOTEXISTS (3UL | ERRCODE_AREA_SVX | \
+ ERRCODE_CLASS_NOTEXISTS )
+#define ERRCODE_SVX_LINGU_HYPHENNOTEXISTS (4UL | ERRCODE_AREA_SVX | \
+ ERRCODE_CLASS_NOTEXISTS )
+#define ERRCODE_SVX_LINGU_DICT_NOTREADABLE (5UL | ERRCODE_AREA_SVX | \
+ ERRCODE_CLASS_READ )
+#define ERRCODE_SVX_LINGU_DICT_NOTWRITEABLE (6UL | ERRCODE_AREA_SVX | \
+ ERRCODE_CLASS_WRITE )
+
+#define ERRCODE_SVX_GRAPHIC_NOTREADABLE (7UL | ERRCODE_AREA_SVX | \
+ ERRCODE_CLASS_READ )
+#define ERRCODE_SVX_GRAPHIC_WRONG_FILEFORMAT (8UL | ERRCODE_AREA_SVX | \
+ ERRCODE_CLASS_READ )
+#define ERRCODE_SVX_LINGU_NOLANGUAGE (9UL | ERRCODE_AREA_SVX | \
+ ERRCODE_CLASS_NOTEXISTS )
+#define ERRCODE_SVX_FORMS_NOIOSERVICES (10UL | ERRCODE_AREA_SVX )
+#define ERRCODE_SVX_FORMS_READWRITEFAILED (11UL | ERRCODE_AREA_SVX )
+
+#define ERRCODE_SVX_BULLETITEM_NOBULLET (12UL | ERRCODE_AREA_SVX )
+
+#define ERRCODE_SVX_MODIFIED_VBASIC_STORAGE (13UL | ERRCODE_AREA_SVX \
+ | ERRCODE_WARNING_MASK \
+ | ERRCODE_CLASS_WRITE )
+
+#define ERRCODE_SVX_VBASIC_STORAGE_EXIST (14UL | ERRCODE_AREA_SVX \
+ | ERRCODE_WARNING_MASK \
+ | ERRCODE_CLASS_WRITE )
+
+// both codes will be used twice : with ERRCODE_CLASS_READ- and ERRCODE_CLASS_WRITE-bits
+#define ERRCTX_SVX_LINGU_THESAURUS 1
+#define ERRCTX_SVX_LINGU_SPELLING 2
+#define ERRCTX_SVX_LINGU_HYPHENATION 3
+#define ERRCTX_SVX_LINGU_DICTIONARY 4
+#define ERRCTX_SVX_BACKGROUND 5
+#define ERRCTX_SVX_IMPORT_GRAPHIC 6
+
+// class SvxErrorHandler -------------------------------------------------
+
+#ifndef __RSC
+
+#ifndef _EHDL_HXX //autogen
+#include <svtools/ehdl.hxx>
+#endif
+
+class SvxErrorHandler : private SfxErrorHandler
+{
+ public:
+ SvxErrorHandler();
+};
+
+#endif
+
+
+#endif
+
diff --git a/svx/inc/svxmsbas.hxx b/svx/inc/svxmsbas.hxx
new file mode 100644
index 000000000000..6b35472f3efa
--- /dev/null
+++ b/svx/inc/svxmsbas.hxx
@@ -0,0 +1,128 @@
+/*************************************************************************
+ *
+ * $RCSfile: svxmsbas.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:01 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _SVXMSBAS_HXX
+#define _SVXMSBAS_HXX
+
+#ifndef _SOLAR_H
+#include <tools/solar.h>
+#endif
+
+#ifndef _SVSTOR_HXX
+#include <so3/svstor.hxx>
+#endif
+
+class SfxObjectShell;
+
+/* Construct with the root storage of the office document, with bImportCode
+ * set the visual basic code will be imported into the stardocument when Import * is called, with bCopyStorage set, the visual basic storage tree will be
+ * copied completely into staroffice, so that any future export to a msoffice
+ * format will retain the vba code, allowing a lossless roundtrip from
+ * msoffice to staroffice and back.
+ *
+ * Setting bAsComment to true in Import will import the visual basic as a
+ * starbasic comment. Which is currently necessary, as vb is not valid sb.
+ *
+ * Setting bStripped will remove the "Attribute" lines from the vb, msoffice
+ * does this itself when it shows the vb code in the vbeditor, so this is
+ * probably what the user expects to see when viewing the code
+ */
+
+class SvxImportMSVBasic
+{
+public:
+ SvxImportMSVBasic( SfxObjectShell &rDocS, SvStorage &rRoot,
+ BOOL bImportCode = TRUE, BOOL bCopyStorage = TRUE )
+ : xRoot(&rRoot), rDocSh(rDocS),
+ bImport(bImportCode), bCopy(bCopyStorage)
+ {}
+ // returns the status of import:
+ // 0 - nothing has done
+ // bit 0 = 1 -> any code is imported to the SO-Basic
+ // bit 1 = 1 -> the VBA - storage is copy to the ObjectShell storage
+ int Import( const String& rStorageName, const String &rSubStorageName,
+ BOOL bAsComment=TRUE, BOOL bStripped=TRUE );
+
+ // only for the export - copy or delete the saved VBA-macro-storage
+ // form the ObjectShell
+ // - returns a warning code if a modified basic exist, in all other
+ // cases return ERRCODE_NONE.
+ ULONG SaveOrDelMSVBAStorage( BOOL bSaveInto, const String& rStorageName );
+
+ // check if the MS-VBA-Storage exist in the RootStorage of the DocShell.
+ // If it exist, then return the WarningId for loosing the information.
+ static ULONG GetSaveWarningOfMSVBAStorage( SfxObjectShell &rDocS );
+
+ static String GetMSBasicStorageName();
+private:
+ SvStorageRef xRoot;
+ SfxObjectShell &rDocSh;
+ BOOL bImport;
+ BOOL bCopy;
+
+ BOOL ImportCode_Impl( const String& rStorageName,
+ const String &rSubStorageName,
+ BOOL bAsComment, BOOL bStripped);
+ BOOL CopyStorage_Impl( const String& rStorageName,
+ const String &rSubStorageName);
+};
+
+#endif
diff --git a/svx/inc/svxrtf.hxx b/svx/inc/svxrtf.hxx
new file mode 100644
index 000000000000..2c59cb874a43
--- /dev/null
+++ b/svx/inc/svxrtf.hxx
@@ -0,0 +1,514 @@
+/*************************************************************************
+ *
+ * $RCSfile: svxrtf.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:01 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _SVXRTF_HXX
+#define _SVXRTF_HXX
+
+#ifndef _TABLE_HXX //autogen
+#include <tools/table.hxx>
+#endif
+#ifndef _STRING_HXX //autogen
+#include <tools/string.hxx>
+#endif
+#ifndef _SFXITEMSET_HXX //autogen
+#include <svtools/itemset.hxx>
+#endif
+#ifndef _PARRTF_HXX //autogen
+#include <svtools/parrtf.hxx>
+#endif
+
+#define _SVSTDARR_USHORTS
+#include <svtools/svstdarr.hxx>
+
+
+class Font;
+class Color;
+class Graphic;
+class DateTime;
+struct SvxRTFStyleType;
+class SvxRTFItemStackType;
+class SvxRTFItemStackList;
+class SfxDocumentInfo;
+
+// Mapper-Klassen fuer die verschiedenen Anforderungen an Doc-Positionen
+// Swg - NodePosition ist ein SwIndex, der intern veraendert wird
+// EditEngine - ULONG auf Liste von Absaetzen
+// .....
+
+class SvxNodeIdx
+{
+public:
+ virtual ~SvxNodeIdx() {}
+ virtual ULONG GetIdx() const = 0;
+ virtual SvxNodeIdx* Clone() const = 0; // erzeuge von sich eine Kopie
+};
+
+class SvxPosition
+{
+public:
+ virtual ~SvxPosition() {}
+
+ virtual ULONG GetNodeIdx() const = 0;
+ virtual xub_StrLen GetCntIdx() const = 0;
+
+ virtual SvxPosition* Clone() const = 0; // erzeuge von sich eine Kopie
+ virtual SvxNodeIdx* MakeNodeIdx() const = 0; // erzeuge vom NodeIndex eine Kopie
+};
+
+
+typedef Color* ColorPtr;
+SV_DECL_PTRARR( SvxRTFColorTbl, ColorPtr, 16, 4 )
+DECLARE_TABLE( SvxRTFFontTbl, Font* )
+DECLARE_TABLE( SvxRTFStyleTbl, SvxRTFStyleType* )
+typedef SvxRTFItemStackType* SvxRTFItemStackTypePtr;
+SV_DECL_PTRARR_DEL( SvxRTFItemStackList, SvxRTFItemStackTypePtr, 1, 1 )
+SV_DECL_PTRARR_STACK( SvxRTFItemStack, SvxRTFItemStackTypePtr, 0, 1 )
+
+// einige Hilfsklassen fuer den RTF-Parser
+struct SvxRTFStyleType
+{
+ SfxItemSet aAttrSet; // die Attribute vom Style (+Ableitung!)
+ String sName;
+ USHORT nBasedOn, nNext;
+ BYTE nOutlineNo;
+ BOOL bIsCharFmt;
+
+ SvxRTFStyleType( SfxItemPool& rPool, const USHORT* pWhichRange );
+};
+
+
+// Bitmap - Mode
+
+struct SvxRTFPictureType
+{
+ // Format der Bitmap
+ enum RTF_BMPSTYLE
+ {
+ RTF_BITMAP, // Bitmap, die Planes sind in den Pict.Daten
+ WIN_METAFILE, // in den Pict.Daten steht ein Window-Metafile
+ MAC_QUICKDRAW, // in den Pict.Daten steht ein Mac-QuickDraw
+ OS2_METAFILE, // in den Pict.Daten steht ein OS2-Metafile
+ RTF_DI_BMP // Device Independent Bitmap,
+ } eStyle;
+
+ enum RTF_BMPMODE
+ {
+ BINARY_MODE,
+ HEX_MODE
+ } nMode;
+
+ USHORT nType;
+ USHORT uPicLen;
+ USHORT nWidth, nHeight;
+ USHORT nGoalWidth, nGoalHeight;
+ USHORT nBitsPerPixel;
+ USHORT nPlanes;
+ USHORT nWidthBytes;
+ USHORT nScalX, nScalY;
+ short nCropT, nCropB, nCropL, nCropR;
+
+ SvxRTFPictureType() { ResetValues(); }
+ // alle Werte auf default; wird nach einlesen der Bitmap aufgerufen !
+ void ResetValues();
+};
+
+// Hier sind die Ids fuer alle Charakter-Attribute, die vom SvxParser
+// erkannt und in einem SfxItemSet gesetzt werden koennen.
+// Die Ids werden ueber die SlotIds vom POOL richtig gesetzt.
+struct RTFPlainAttrMapIds
+{
+ USHORT nCaseMap,
+ nBgColor,
+ nColor,
+ nContour,
+ nCrossedOut,
+ nEscapement,
+ nFont,
+ nFontHeight,
+ nKering,
+ nLanguage,
+ nPosture,
+ nShadowed,
+ nUnderline,
+ nWeight,
+ nWordlineMode,
+ nAutoKerning
+ ;
+ RTFPlainAttrMapIds( const SfxItemPool& rPool );
+};
+
+// Hier sind die Ids fuer alle Paragraph-Attribute, die vom SvxParser
+// erkannt und in einem SfxItemSet gesetzt werden koennen.
+// Die Ids werden ueber die SlotIds vom POOL richtig gesetzt.
+struct RTFPardAttrMapIds
+{
+ USHORT nLinespacing,
+ nAdjust,
+ nTabStop,
+ nHyphenzone,
+ nLRSpace,
+ nULSpace,
+ nBrush,
+ nBox,
+ nShadow,
+ nOutlineLvl,
+ nSplit,
+ nKeep
+ ;
+ RTFPardAttrMapIds( const SfxItemPool& rPool );
+};
+
+
+
+// -----------------------------------------------------------------------
+
+
+class SvxRTFParser : public SvRTFParser
+{
+ SvxRTFColorTbl aColorTbl;
+ SvxRTFFontTbl aFontTbl;
+ SvxRTFStyleTbl aStyleTbl;
+ SvxRTFItemStack aAttrStack;
+ SvxRTFItemStackList aAttrSetList;
+
+ SvUShorts aPlainMap;
+ SvUShorts aPardMap;
+ SvUShorts aWhichMap;
+ String sBaseURL;
+
+ SvxPosition* pInsPos;
+ SfxItemPool* pAttrPool;
+ Color* pDfltColor;
+ Font* pDfltFont;
+ SfxDocumentInfo* pSfxInfo;
+
+ long nVersionNo;
+ int nDfltFont;
+
+ BOOL bNewDoc : 1; // FALSE - in ein bestehendes lesen
+ BOOL bNewGroup : 1; // TRUE - es gab eine oeffnende Klammer
+ BOOL bIsSetDfltTab : 1; // TRUE - DefTab wurde eingelesen
+ BOOL bChkStyleAttr : 1; // TRUE - StyleSheets werden ausgewertet
+ BOOL bCalcValue : 1; // TRUE - Twipwerte an APP anpassen
+ BOOL bPardTokenRead : 1; // TRUE - Token \pard wurde erkannt
+ BOOL bReadDocInfo : 1; // TRUE - DocInfo mit einlesen
+
+
+
+ void ClearColorTbl();
+ void ClearFontTbl();
+ void ClearStyleTbl();
+ void ClearAttrStack();
+
+ SvxRTFItemStackTypePtr _GetAttrSet( int bCopyAttr=FALSE ); // neue ItemStackType anlegen
+ void _ClearStyleAttr( SvxRTFItemStackType& rStkType );
+
+ // setzt alle Attribute, die unterschiedlich zum aktuellen sind
+ void SetAttrSet( SfxItemSet& rAttrSet, SvxPosition& rSttPos );
+ void SetAttrSet( SvxRTFItemStackType &rSet );
+ void SetDefault( int nToken, short nValue );
+
+ // pard / plain abarbeiten
+ void RTFPardPlain( int bPard, SfxItemSet** ppSet );
+
+ void BuildWhichTbl();
+
+protected:
+
+ String& DelCharAtEnd( String& rStr, const sal_Unicode cDel );
+
+ // wird fuer jedes Token gerufen, das in CallParser erkannt wird
+ virtual void NextToken( int nToken );
+
+ virtual void ReadBitmapData();
+ virtual void ReadOLEData();
+
+ void ReadStyleTable();
+ void ReadColorTable();
+ void ReadFontTable();
+ void ReadAttr( int nToken, SfxItemSet* pSet );
+ void ReadTabAttr( int nToken, SfxItemSet& rSet );
+
+ // Dokument-Info lesen
+ DateTime& GetDateTimeStamp( DateTime& rDT );
+ String& GetTextToEndGroup( String& rStr );
+ virtual void ReadInfo( const sal_Char* pChkForVerNo = 0 );
+
+ inline SfxItemSet& GetAttrSet();
+ // wurde noch kein Text eingefuegt ? (SttPos vom obersten StackEintrag!)
+ int IsAttrSttPos();
+ void AttrGroupEnd(); // den akt. Bearbeiten, vom Stack loeschen
+ void SetAllAttrOfStk(); // end all Attr. and set it into doc
+
+
+ virtual void InsertPara() = 0;
+ virtual void InsertText() = 0;
+ virtual void MovePos( int bForward = TRUE ) = 0;
+ virtual void SetEndPrevPara( SvxNodeIdx*& rpNodePos,
+ xub_StrLen& rCntPos )=0;
+ virtual void SetAttrInDoc( SvxRTFItemStackType &rSet );
+ // fuer Tokens, die im ReadAttr nicht ausgewertet werden
+ virtual void UnknownAttrToken( int nToken, SfxItemSet* pSet );
+
+ // falls jemand keine Twips haben moechte
+ virtual void CalcValue();
+
+ SvxRTFParser( SfxItemPool& rAttrPool,
+ SvStream& rIn,
+ int bReadNewDoc = TRUE );
+ virtual ~SvxRTFParser();
+
+ int IsNewDoc() const { return bNewDoc; }
+ void SetNewDoc( int bFlag ) { bNewDoc = bFlag; }
+ int IsNewGroup() const { return bNewGroup; }
+ void SetNewGroup( int bFlag ) { bNewGroup = bFlag; }
+ int IsChkStyleAttr() const { return bChkStyleAttr; }
+ void SetChkStyleAttr( int bFlag ) { bChkStyleAttr = bFlag; }
+ int IsCalcValue() const { return bCalcValue; }
+ void SetCalcValue( int bFlag ) { bCalcValue = bFlag; }
+ int IsPardTokenRead() const { return bPardTokenRead; }
+ void SetPardTokenRead( int bFlag ) { bPardTokenRead = bFlag; }
+ int IsReadDocInfo() const { return bReadDocInfo; }
+ void SetReadDocInfo( int bFlag ) { bReadDocInfo = bFlag; }
+
+ // erfrage/setze die aktuelle Einfuegeposition
+ SvxPosition& GetInsPos() const { return *pInsPos; }
+ void SetInsPos( const SvxPosition& rNew );
+
+ long GetVersionNo() const { return nVersionNo; }
+
+ // erfrage/setze die Mapping-Ids fuer die Pard/Plain Attribute
+ // (Set: es werden sich die Pointer gemerkt, also keine Kopie erzeugt!!! )
+ void AddPardAttr( USHORT nWhich ) { aPardMap.Insert( nWhich, aPardMap.Count() ); }
+ void AddPlainAttr( USHORT nWhich ) { aPlainMap.Insert( nWhich, aPlainMap.Count() ); }
+
+ SvxRTFStyleTbl& GetStyleTbl() { return aStyleTbl; }
+ SvxRTFItemStack& GetAttrStack() { return aAttrStack; }
+ SvxRTFColorTbl& GetColorTbl() { return aColorTbl; }
+ SvxRTFFontTbl& GetFontTbl() { return aFontTbl; }
+
+ SfxDocumentInfo* GetDocInfo() const { return pSfxInfo; }
+
+ const String& GetBaseURL() const { return sBaseURL; }
+
+ // lesen die GrafikDaten und fuelle damit die Grafik und die
+ // die PicDaten.
+ // Return - TRUE: die Grafik ist gueltig
+ BOOL ReadBmpData( Graphic& rGrf, SvxRTFPictureType& rPicType );
+ // wandel die ASCII-HexCodes in binaere Zeichen um. Werden
+ // ungueltige Daten gefunden (Zeichen ausser 0-9|a-f|A-F, so
+ // wird USHRT_MAX returnt, ansonsten die Anzahl der umgewandelten Ze.
+ xub_StrLen HexToBin( String& rToken );
+
+public:
+
+ virtual SvParserState CallParser(); // Aufruf des Parsers
+
+ inline const Color& GetColor( USHORT nId ) const;
+ const Font& GetFont( USHORT nId ); // aendert den dflt Font
+
+ virtual int IsEndPara( SvxNodeIdx* pNd, xub_StrLen nCnt ) const = 0;
+
+ // um einen anderen Attribut-Pool setzen zukoennen. Darf nur vorm
+ // CallParser erfolgen!! Die Maps werden nicht neu erzeugt!
+ void SetAttrPool( SfxItemPool* pNewPool ) { pAttrPool = pNewPool; }
+ // um andere WhichIds fuer einen anderen Pool zusetzen.
+ RTFPardAttrMapIds& GetPardMap()
+ { return (RTFPardAttrMapIds&)*aPardMap.GetData(); }
+ RTFPlainAttrMapIds& GetPlainMap()
+ { return (RTFPlainAttrMapIds&)*aPlainMap.GetData(); }
+ // um diese von aussen z.B. Tabellenzellen zuordnen zu koennen
+ void ReadBorderAttr( int nToken, SfxItemSet& rSet, int bTableDef=FALSE );
+ void ReadBackgroundAttr( int nToken, SfxItemSet& rSet, int bTableDef=FALSE );
+
+ // fuers asynchrone lesen aus dem SvStream
+// virtual void SaveState( int nToken );
+// virtual void RestoreState();
+ virtual void Continue( int nToken );
+};
+
+// der Stack fuer die Attribute:
+// diese Klasse darf nur vom SvxRTFParser benutzt werden!
+class SvxRTFItemStackType
+{
+ friend class SvxRTFParser;
+ friend class SvxRTFItemStackList;
+
+ SfxItemSet aAttrSet;
+ SvxNodeIdx *pSttNd, *pEndNd;
+ xub_StrLen nSttCnt, nEndCnt;
+ SvxRTFItemStackList* pChildList;
+ USHORT nStyleNo;
+
+ SvxRTFItemStackType( SfxItemPool&, const USHORT* pWhichRange,
+ const SvxPosition& );
+ ~SvxRTFItemStackType();
+
+ void Add( SvxRTFItemStackTypePtr );
+ void Compress( const SvxRTFParser& );
+
+public:
+ SvxRTFItemStackType( const SvxRTFItemStackType&, const SvxPosition&,
+ int bCopyAttr = FALSE );
+ void SetStartPos( const SvxPosition& rPos );
+
+ ULONG GetSttNodeIdx() const { return pSttNd->GetIdx(); }
+ ULONG GetEndNodeIdx() const { return pEndNd->GetIdx(); }
+
+ const SvxNodeIdx& GetSttNode() const { return *pSttNd; }
+ const SvxNodeIdx& GetEndNode() const { return *pEndNd; }
+
+ xub_StrLen GetSttCnt() const { return nSttCnt; }
+ xub_StrLen GetEndCnt() const { return nEndCnt; }
+
+ SfxItemSet& GetAttrSet() { return aAttrSet; }
+ const SfxItemSet& GetAttrSet() const { return aAttrSet; }
+
+ USHORT StyleNo() const { return nStyleNo; }
+};
+
+
+// ----------- Inline Implementierungen --------------
+
+inline const Color& SvxRTFParser::GetColor( USHORT nId ) const
+{
+ ColorPtr pColor = (ColorPtr)pDfltColor;
+ if( nId < aColorTbl.Count() )
+ pColor = aColorTbl[ nId ];
+ return *pColor;
+}
+
+inline SfxItemSet& SvxRTFParser::GetAttrSet()
+{
+ SvxRTFItemStackTypePtr pTmp;
+ if( bNewGroup || 0 == ( pTmp = aAttrStack.Top()) )
+ pTmp = _GetAttrSet();
+ return pTmp->aAttrSet;
+}
+
+
+/*************************************************************************
+
+ Source Code Control System - Header
+
+ $Header: /zpool/svn/migration/cvs_rep_09_09_08/code/svx/inc/svxrtf.hxx,v 1.1.1.1 2000-09-18 17:01:01 hr Exp $
+
+ Source Code Control System - Update
+
+ $Log: not supported by cvs2svn $
+ Revision 1.42 2000/09/18 12:41:51 willem.vandorp
+ OpenOffice header added.
+
+ Revision 1.41 2000/09/05 10:54:06 willem.vandorp
+ Header and footer replaced
+
+ Revision 1.40 2000/04/14 13:16:59 jp
+ Unicode changes
+
+ Revision 1.39 2000/04/13 16:02:58 jp
+ Unicode changes
+
+ Revision 1.38 2000/03/30 16:03:30 aw
+ UNICODE conversions
+
+ Revision 1.37 2000/02/10 19:38:13 hr
+ #70473# changes for unicode ( patched by automated patchtool )
+
+ Revision 1.36 1999/11/18 09:13:27 jp
+ read BaseURL from info-struct
+
+ Revision 1.35 1999/08/03 17:37:42 jp
+ Bug #68028#: new SetAllAttrOfStk
+
+ Revision 1.34 1999/04/15 15:17:04 JP
+ zu Bug #60140#: RTF-OLE-Objecte in laden
+
+
+ Rev 1.33 15 Apr 1999 17:17:04 JP
+ zu Bug #60140#: RTF-OLE-Objecte in laden
+
+ Rev 1.32 20 Apr 1998 10:19:10 JP
+ eCodeSet in die BasisKlasse verschoben
+
+ Rev 1.31 08 Apr 1998 19:24:04 JP
+ GetColorTbl/GetFontTbl exportiert
+
+ Rev 1.30 03 Apr 1998 18:53:48 JP
+ RTF-Parser um neue Tokens erweitert, nTokenValue wurde ein long
+
+ Rev 1.29 23 Feb 1998 17:33:52 TJ
+ include
+
+ Rev 1.28 26 Jan 1998 15:13:06 JP
+ Bug #46608# AttrGroupEnd - ungueltige Bereiche ueberspringen; ReadStyleTable: Zeichenvorlagen lesen
+
+ Rev 1.27 29 Nov 1997 17:21:24 MA
+ includes
+
+ Rev 1.26 20 Nov 1997 22:38:16 JP
+ HeaderFile Umstellung
+
+*************************************************************************/
+
+
+#endif
+ //_SVXRTF_HXX
+
diff --git a/svx/inc/tbxalign.hxx b/svx/inc/tbxalign.hxx
new file mode 100644
index 000000000000..ed87277c57bc
--- /dev/null
+++ b/svx/inc/tbxalign.hxx
@@ -0,0 +1,80 @@
+/*************************************************************************
+ *
+ * $RCSfile: tbxalign.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:03 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _TBXALIGN_HXX
+#define _TBXALIGN_HXX
+
+#ifndef _SFXTBXCTRL_HXX //autogen
+#include <sfx2/tbxctrl.hxx>
+#endif
+
+
+class SvxTbxCtlAlign: public SfxToolBoxControl
+{
+public:
+ virtual SfxPopupWindowType GetPopupWindowType() const;
+ virtual SfxPopupWindow* CreatePopupWindow();
+
+ SFX_DECL_TOOLBOX_CONTROL();
+
+ SvxTbxCtlAlign(USHORT nId, ToolBox& rTbx, SfxBindings&);
+ ~SvxTbxCtlAlign() {}
+};
+#endif
diff --git a/svx/inc/tbxctl.hxx b/svx/inc/tbxctl.hxx
new file mode 100644
index 000000000000..636e484be6d5
--- /dev/null
+++ b/svx/inc/tbxctl.hxx
@@ -0,0 +1,96 @@
+/*************************************************************************
+ *
+ * $RCSfile: tbxctl.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:02 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _TBXCTL_HXX
+#define _TBXCTL_HXX
+
+#ifndef _SFXTBXCTRL_HXX //autogen
+#include <sfx2/tbxctrl.hxx>
+#endif
+
+/*************************************************************************
+|*
+|* Klasse f"ur SwToolbox
+|*
+\************************************************************************/
+
+class SvxTbxCtlDraw : public SfxToolBoxControl
+{
+private:
+ USHORT nLastAction;
+
+public:
+ virtual void Select( BOOL bMod1 = FALSE );
+ virtual void StateChanged( USHORT nSID, SfxItemState eState,
+ const SfxPoolItem* pState );
+ virtual SfxPopupWindowType GetPopupWindowType() const;
+ virtual SfxPopupWindow* CreatePopupWindow();
+
+ SFX_DECL_TOOLBOX_CONTROL();
+
+ SvxTbxCtlDraw( USHORT nId, ToolBox& rTbx, SfxBindings& );
+ ~SvxTbxCtlDraw() {}
+
+ void SetLastAction( USHORT nAction ) { nLastAction = nAction; }
+};
+
+
+#endif
+
diff --git a/svx/inc/tbxdraw.hxx b/svx/inc/tbxdraw.hxx
new file mode 100644
index 000000000000..e33a991c76d6
--- /dev/null
+++ b/svx/inc/tbxdraw.hxx
@@ -0,0 +1,112 @@
+/*************************************************************************
+ *
+ * $RCSfile: tbxdraw.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:03 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _TBXDRAW_HXX
+#define _TBXDRAW_HXX
+
+// include ---------------------------------------------------------------
+
+#ifndef _SFXTBXMGR_HXX //autogen
+#include <sfx2/tbxmgr.hxx>
+#endif
+#ifndef _SFXTBXCTRL_HXX //autogen
+#include <sfx2/tbxctrl.hxx>
+#endif
+
+// class SvxPopupWindowTbxMgr --------------------------------------------
+
+class SvxPopupWindowTbxMgr : public SfxPopupWindow
+{
+ SfxToolBoxManager aTbx;
+ void* pNiemalsDenPointerAufDieErzeugendeToolBoxMerken; // MI!
+ ResId aRIdWinTemp;
+ ResId aRIdTbxTemp;
+
+ Link aTbxClickHdl;
+
+
+ DECL_LINK( TbxSelectHdl, ToolBox*);
+ DECL_LINK( TbxClickHdl, ToolBox*);
+
+public:
+ SvxPopupWindowTbxMgr( USHORT nId,
+ SfxToolBoxControl* pTbxCtl,
+ ResId aRIdWin,
+ ResId aRIdTbx,
+ SfxBindings& rBindings );
+ SvxPopupWindowTbxMgr( USHORT nId,
+ WindowAlign eAlign,
+ ResId aRIdWin,
+ ResId aRIdTbx,
+ SfxBindings& rBindings );
+ ~SvxPopupWindowTbxMgr();
+
+ virtual void StateChanged( USHORT nSID, SfxItemState eState,
+ const SfxPoolItem* pState);
+ virtual SfxPopupWindow* Clone() const;
+ virtual void PopupModeEnd();
+
+ void StartSelection();
+ inline SfxToolBoxManager& GetTbxMgr() { return aTbx; }
+};
+
+
+#endif // _TBX_DRAW_HXX
+
diff --git a/svx/inc/textconv.hxx b/svx/inc/textconv.hxx
new file mode 100644
index 000000000000..d1c789b4d68b
--- /dev/null
+++ b/svx/inc/textconv.hxx
@@ -0,0 +1,160 @@
+/*************************************************************************
+ *
+ * $RCSfile: textconv.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:03 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef ENABLEUNICODE // Keine Konvertierung bei Unicode
+
+#ifndef _TEXTCONV_HXX
+#define _TEXTCONV_HXX
+
+#ifndef _SOLAR_H
+#include <tools/solar.h>
+#endif
+#ifndef _STRING_HXX //autogen
+#include <tools/string.hxx>
+#endif
+#ifndef _SVARRAY_HXX //autogen
+#include <svtools/svarray.hxx>
+#endif
+
+class OutputDevice;
+class Font;
+
+#define INVPOS 0xFFFF
+
+// nStart und nEnd sind normale Char-Positionen, nicht wie Index vom PaM.
+
+struct AttribRange
+{
+ USHORT nStart;
+ USHORT nEnd;
+
+ AttribRange() { nStart = 0; nEnd = 0; }
+ AttribRange( USHORT nS, USHORT nE ) { nStart = nS; nEnd = nE; }
+
+ USHORT GetLen() const { return nEnd-nStart+1; }
+};
+
+SV_DECL_VARARR( NonConvChars, AttribRange, 0, 4 );
+
+class TextConverter
+{
+private:
+ CharSet eSourceCharSet;
+ CharSet eDestCharSet;
+ NonConvChars aNonConvblChars;
+ NonConvChars aNotConvertedChars;
+
+#ifdef _TEXTCONV_CXX
+ inline void GetNonConvblRange( USHORT nRange, USHORT& nStart, USHORT& nEnd );
+#endif
+
+public:
+ TextConverter();
+ TextConverter( CharSet eSource, CharSet eDest );
+
+ void SetSourceCharSet( CharSet eSource ) { eSourceCharSet = eSource; }
+ CharSet GetSourceCharSet() const { return eSourceCharSet; }
+
+ void SetDestCharSet( CharSet eDest ) { eDestCharSet = eDest; }
+ CharSet GetDestCharSet() const { return eDestCharSet; }
+
+ void SetNonConvblChars( const NonConvChars& rNonConvbl )
+ {
+ aNonConvblChars.Remove( 0, aNonConvblChars.Count() );
+ aNonConvblChars.Insert( &rNonConvbl, 0 );
+ }
+ NonConvChars& GetNonConvblChars()
+ { return aNonConvblChars; }
+ void ResetNonConvblChars()
+ { aNonConvblChars.Remove( 0, aNonConvblChars.Count() ); }
+
+ const NonConvChars& GetNotConvertedChars() const
+ { return aNotConvertedChars; }
+
+ void Convert( String& rText, BOOL bSmartReplace = TRUE );
+
+ static char GetReplaceChar( OutputDevice* pDev, char c, CharSet eCharSet, Font& rFont )
+ { return GetReplaceChar( pDev, String::ConvertToUnicode( c, eCharSet ), rFont ); }
+ static char GetReplaceChar( OutputDevice* pDev, sal_Unicode cUnicode, Font& rFont );
+};
+
+#ifdef _TEXTCONV_CXX
+
+inline void TextConverter::GetNonConvblRange( USHORT nRange, USHORT& nStart, USHORT& nEnd )
+{
+ if ( aNonConvblChars.Count() > nRange )
+ {
+ nStart = aNonConvblChars[nRange].nStart;
+ nEnd = aNonConvblChars[nRange].nEnd;
+ }
+ else
+ {
+ nStart = INVPOS;
+ nEnd = 0;
+ }
+}
+
+#endif // _TEXTCONV_CXX
+
+#endif // _TEXTCONV_HXX
+
+#endif // ENABLEUNICODE
+
diff --git a/svx/inc/txtrange.hxx b/svx/inc/txtrange.hxx
new file mode 100644
index 000000000000..a4fde89ff576
--- /dev/null
+++ b/svx/inc/txtrange.hxx
@@ -0,0 +1,148 @@
+/*************************************************************************
+ *
+ * $RCSfile: txtrange.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:03 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _MyTXTRANGE_HXX
+#define _MyTXTRANGE_HXX
+
+#ifndef _TXTRANGE_HXX
+#define _SVSTDARR_BOOLS
+#define _SVSTDARR_LONGS
+#include <svtools/svstdarr.hxx>
+#endif
+
+class PolyPolygon;
+class XPolyPolygon;
+class Range;
+class Rectangle;
+
+typedef SvLongs* SvLongsPtr;
+
+/*************************************************************************
+|*
+|* class TextRanger
+|*
+|* Beschreibung
+|* Ersterstellung 20.01.97
+|* Letzte Aenderung AMA 20.01.97
+|*
+*************************************************************************/
+class TextRanger
+{
+ Range *pRangeArr;
+ SvLongsPtr *pCache;
+ PolyPolygon *pPoly; // Flaechenpolygon
+ PolyPolygon *pLine; // Linienpolygon
+ Rectangle *pBound; // Umfassendes Rechteck
+ USHORT nCacheSize; // Cache-Size
+ USHORT nCacheIdx; // Cache-Index
+ USHORT nRight; // Abstand Kontur-Text
+ USHORT nLeft; // Abstand Text-Kontur
+ USHORT nUpper; // Abstand Kontur-Text
+ USHORT nLower; // Abstand Text-Kontur
+ USHORT nPointCount; // Anzahl der Polygonpunkte
+ BOOL bSimple : 1; // Nur Aussenkante
+ BOOL bInner : 1; // TRUE: Objekt beschriften (EditEngine);
+ // FALSE: Objekt umfliessen (StarWriter);
+ BOOL bFlag2 :1; // TestFlags fuer Umlaufexperimente
+ BOOL bFlag3 :1;
+ BOOL bFlag4 :1;
+ BOOL bFlag5 :1;
+ BOOL bFlag6 :1;
+ BOOL bFlag7 :1;
+ TextRanger( const TextRanger& ); // not implemented
+ const Rectangle& _GetBoundRect();
+public:
+ TextRanger( const XPolyPolygon& rXPoly, const XPolyPolygon* pXLine,
+ USHORT nCacheSize, USHORT nLeft, USHORT nRight,
+ BOOL bSimple, BOOL bInner );
+ ~TextRanger();
+ SvLongsPtr GetTextRanges( const Range& rRange );
+ USHORT GetRight() const { return nRight; }
+ USHORT GetLeft() const { return nLeft; }
+ USHORT GetUpper() const { return nUpper; }
+ USHORT GetLower() const { return nLower; }
+ USHORT GetPointCount() const { return nPointCount; }
+ BOOL IsSimple() const { return bSimple; }
+ BOOL IsInner() const { return bInner; }
+ BOOL HasBorder() const { return nRight || nLeft; }
+ const PolyPolygon& GetPolyPolygon() const { return *pPoly; }
+ const PolyPolygon* GetLinePolygon() const { return pLine; }
+ const Rectangle& GetBoundRect()
+ { return pBound ? *pBound : _GetBoundRect(); }
+ void SetUpper( USHORT nNew ){ nUpper = nNew; }
+ void SetLower( USHORT nNew ){ nLower = nNew; }
+ BOOL IsFlag2() const { return bFlag2; }
+ void SetFlag2( BOOL bNew ) { bFlag2 = bNew; }
+ BOOL IsFlag3() const { return bFlag3; }
+ void SetFlag3( BOOL bNew ) { bFlag3 = bNew; }
+ BOOL IsFlag4() const { return bFlag4; }
+ void SetFlag4( BOOL bNew ) { bFlag4 = bNew; }
+ BOOL IsFlag5() const { return bFlag5; }
+ void SetFlag5( BOOL bNew ) { bFlag5 = bNew; }
+ BOOL IsFlag6() const { return bFlag6; }
+ void SetFlag6( BOOL bNew ) { bFlag6 = bNew; }
+ BOOL IsFlag7() const { return bFlag7; }
+ void SetFlag7( BOOL bNew ) { bFlag7 = bNew; }
+};
+
+
+
+#endif // _TXTRANGE_HXX
diff --git a/svx/inc/uiks.hxx b/svx/inc/uiks.hxx
new file mode 100644
index 000000000000..8293903489d0
--- /dev/null
+++ b/svx/inc/uiks.hxx
@@ -0,0 +1,123 @@
+/*************************************************************************
+ *
+ * $RCSfile: uiks.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:03 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SVX_UIKS_HXX
+#define _SVX_UIKS_HXX
+
+#ifndef _USR_UIKS_HXX
+#include <usr/uiks.hxx>
+#endif
+
+// DBENGINE
+
+#define UIK_XDATABASEENGINE UIK_DATABASE(00)
+#define UIK_XDATABASEFAVORITES UIK_DATABASE(01)
+#define UIK_XDATABASE UIK_DATABASE(02)
+#define UIK_XDATABASECONNECTION UIK_DATABASE(03)
+#define UIK_XTRANSACTIONSUPPORT UIK_DATABASE(04)
+#define UIK_XDATABASECURSOR UIK_DATABASE(05)
+#define UIK_XDATABASETABLE UIK_DATABASE(06)
+#define UIK_XDATABASETABLES UIK_DATABASE(07)
+#define UIK_XDATABASEQUERY UIK_DATABASE(08)
+#define UIK_XDATABASEQUERIES UIK_DATABASE(09)
+#define UIK_XDATABASERELATION UIK_DATABASE(0a)
+#define UIK_XDATABASERELATIONS UIK_DATABASE(0b)
+#define UIK_XDATABASEFIELD UIK_DATABASE(0c)
+#define UIK_XDATABASEFIELDS UIK_DATABASE(0d)
+#define UIK_XDATABASEINDEX UIK_DATABASE(0e)
+#define UIK_XDATABASEINDEXES UIK_DATABASE(0f)
+#define UIK_XDATABASEDOCUMENT UIK_DATABASE(10)
+#define UIK_XDATABASEDOCUMENTS UIK_DATABASE(11)
+#define UIK_XDATABASEWORKSPACE UIK_DATABASE(12)
+#define UIK_XDATABASEWORKSPACES UIK_DATABASE(13)
+#define UIK_XDATABASEITERATOR UIK_DATABASE(14)
+#define UIK_XPREPAREDDATABASECURSOR UIK_DATABASE(15)
+
+
+// DBENGINE
+
+// FORMS
+
+#define UIK_XFORM UIK_FORMS(01)
+#define UIK_XFORMS UIK_FORMS(02)
+#define UIK_XFORMCONTROL UIK_FORMS(03)
+
+#define UIK_XHTMLFORM UIK_FORMS(05)
+#define UIK_XHTMLFORMLISTENER UIK_FORMS(06)
+#define UIK_XDATABASEFORM UIK_FORMS(07)
+#define UIK_XBOUNDCONTROL UIK_FORMS(08)
+#define UIK_XINSERTRECORDLISTENER UIK_FORMS(09)
+#define UIK_XUPDATERECORDLISTENER UIK_FORMS(0a)
+#define UIK_XDESTROYRECORDLISTENER UIK_FORMS(0b)
+#define UIK_XCURRENTRECORDLISTENER UIK_FORMS(0c)
+#define UIK_XBOUNDCONTROLLISTENER UIK_FORMS(0d)
+#define UIK_XLOADLISTENER UIK_FORMS(0e)
+#define UIK_XERRORLISTENER UIK_FORMS(0f)
+
+#define UIK_XFORMCONTROLFACTORY UIK_FORMS(10)
+#define UIK_XFORMCONTROLLER UIK_FORMS(11)
+#define UIK_XFORMCONTROLLERLISTENER UIK_FORMS(12)
+
+// FORMS
+
+
+
+#endif
+
diff --git a/svx/inc/unoapi.hxx b/svx/inc/unoapi.hxx
new file mode 100644
index 000000000000..f8cc3e2dc320
--- /dev/null
+++ b/svx/inc/unoapi.hxx
@@ -0,0 +1,91 @@
+/*************************************************************************
+ *
+ * $RCSfile: unoapi.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:03 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _SVX_UNOAPI_HXX_
+#define _SVX_UNOAPI_HXX_
+
+#ifndef _COM_SUN_STAR_DRAWING_XSHAPE_HPP_
+#include <com/sun/star/drawing/XShape.hpp>
+#endif
+
+#ifndef _GRFMGR_HXX
+#include <goodies/grfmgr.hxx>
+#endif
+
+class SvxShape;
+class SdrObject;
+
+/** creates a StarOffice API wrapper with the given type and inventor
+ Deprecated: This will be replaced with a function returning XShape.
+*/
+SvxShape* CreateSvxShapeByTypeAndInventor( sal_uInt16 nType, sal_uInt32 nInventor ) throw();
+
+/** returns a StarOffice API wrapper for the given SdrObject */
+::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > GetXShapeForSdrObject( SdrObject* pObj ) throw ();
+
+/** returns the SdrObject from the given StarOffice API wrapper */
+SdrObject* GetSdrObjectFromXShape( ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > xShape ) throw() ;
+
+/** returns a GraphicObject for this URL */
+GraphicObject CreateGraphicObjectFromURL( const ::rtl::OUString &rURL ) throw() ;
+
+#endif _SVX_UNOAPI_HXX_
+
diff --git a/svx/inc/unofdesc.hxx b/svx/inc/unofdesc.hxx
new file mode 100644
index 000000000000..e1c2c4da25b7
--- /dev/null
+++ b/svx/inc/unofdesc.hxx
@@ -0,0 +1,97 @@
+/*************************************************************************
+ *
+ * $RCSfile: unofdesc.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:03 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef SVX_UNOFDESC_HXX
+#define SVX_UNOFDESC_HXX
+
+#ifndef _COM_SUN_STAR_AWT_FONTDESCRIPTOR_HPP_
+#include <com/sun/star/awt/FontDescriptor.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_PROPERTYSTATE_HPP_
+#include <com/sun/star/beans/PropertyState.hpp>
+#endif
+
+#ifndef _SFXITEMSET_HXX //autogen
+#include <svtools/itemset.hxx>
+#endif
+
+#ifndef _SV_FONT_HXX //autogen
+#include <vcl/font.hxx>
+#endif
+
+class SvxUnoFontDescriptor
+{
+public:
+ static void ConvertToFont( const ::com::sun::star::awt::FontDescriptor& rDesc, Font& rFont );
+ static void ConvertFromFont( const Font& rFont, ::com::sun::star::awt::FontDescriptor& rDesc );
+
+ static void FillItemSet( const ::com::sun::star::awt::FontDescriptor& rDesc, SfxItemSet& rSet );
+ static void FillFromItemSet( const SfxItemSet& rSet, ::com::sun::star::awt::FontDescriptor& rDesc );
+
+ static com::sun::star::beans::PropertyState getPropertyState( const SfxItemSet& rSet );
+ static void setPropertyToDefault( SfxItemSet& rSet );
+ static ::com::sun::star::uno::Any getPropertyDefault( SfxItemPool* pPool );
+
+};
+
+
+#endif
+
diff --git a/svx/inc/unofill.hxx b/svx/inc/unofill.hxx
new file mode 100644
index 000000000000..4c7bf4c918e0
--- /dev/null
+++ b/svx/inc/unofill.hxx
@@ -0,0 +1,79 @@
+/*************************************************************************
+ *
+ * $RCSfile: unofill.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:03 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _SVX_UNOFILL_HXX_
+#define _SVX_UNOFILL_HXX_
+
+#ifndef _COM_SUN_STAR_UNO_XINTERFACE_HPP_
+#include <com/sun/star/uno/XInterface.hpp>
+#endif
+
+class SdrModel;
+
+::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL SvxUnoGradientTable_createInstance( SdrModel* pModel );
+::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL SvxUnoHatchTable_createInstance( SdrModel* pModel );
+::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL SvxUnoBitmapTable_createInstance( SdrModel* pModel );
+::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL SvxUnoTransGradientTable_createInstance( SdrModel* pModel );
+::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL SvxUnoMarkerTable_createInstance( SdrModel* pModel );
+::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL SvxUnoDashTable_createInstance( SdrModel* pModel );
+
+#endif _SVX_UNOFILL_HXX_
+
diff --git a/svx/inc/unolingu.hxx b/svx/inc/unolingu.hxx
new file mode 100644
index 000000000000..6c084688eda4
--- /dev/null
+++ b/svx/inc/unolingu.hxx
@@ -0,0 +1,297 @@
+/*************************************************************************
+ *
+ * $RCSfile: unolingu.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:03 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _UNO_LINGU_HXX
+#define _UNO_LINGU_HXX
+
+#ifndef _LANG_HXX
+#include <tools/lang.hxx>
+#endif
+#ifndef _STRING_HXX
+#include <tools/string.hxx>
+#endif
+#ifndef _VOS_REFERNCE_HXX_
+#include <vos/refernce.hxx>
+#endif
+
+#ifndef _COM_SUN_STAR_UTIL_LANGUAGE_HPP_
+#include <com/sun/star/util/Language.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LANG_LOCALE_HPP_
+#include <com/sun/star/lang/Locale.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LINGUISTIC_XSPELLCHECKER1_HPP_
+#include <com/sun/star/linguistic/XSpellChecker1.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LINGUISTIC_XHYPHENATOR_HPP_
+#include <com/sun/star/linguistic/XHyphenator.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LINGUISTIC_XTHESAURUS_HPP_
+#include <com/sun/star/linguistic/XThesaurus.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LINGUISTIC_XDICTIONARYLIST_HPP_
+#include <com/sun/star/linguistic/XDictionaryList.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
+#include <com/sun/star/beans/XPropertySet.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LINGUISTIC_XDICTIONARY1_HPP_
+#include <com/sun/star/linguistic/XDictionary1.hpp>
+#endif
+
+class LinguMgrExitLstnr;
+
+class Window;
+
+// SvxAddEntryToDic return values
+#define DIC_ERR_NONE 0
+#define DIC_ERR_FULL 1
+#define DIC_ERR_READONLY 2
+#define DIC_ERR_UNKNOWN 3
+#define DIC_ERR_NOT_EXISTS 4
+//#define DIC_ERR_ENTRY_EXISTS 5
+//#define DIC_ERR_ENTRY_NOTEXISTS 6
+
+///////////////////////////////////////////////////////////////////////////
+
+class LinguMgr
+{
+ friend class LinguMgrExitLstnr;
+
+ //static ::VOS::ORefCount aRefCount;
+
+ static ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic::XSpellChecker1 > xSpell;
+ static ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic::XHyphenator > xHyph;
+ static ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic::XThesaurus > xThes;
+ static ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic::XDictionaryList > xDicList;
+ static ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet > xProp;
+
+ static ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic::XDictionary1 > xIgnoreAll;
+ static ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic::XDictionary1 > xChangeAll;
+
+ static LinguMgrExitLstnr *pExitLstnr;
+ static sal_Bool bExiting;
+
+ static ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic::XSpellChecker1 > GetSpell();
+ static ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic::XHyphenator > GetHyph();
+ static ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic::XThesaurus > GetThes();
+ static ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic::XDictionaryList > GetDicList();
+ static ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet > GetProp();
+ static ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic::XDictionary1 > GetStandard();
+ static ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic::XDictionary1 > GetIgnoreAll();
+ static ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic::XDictionary1 > GetChangeAll();
+
+ // disallow access to copy-constructor and assignment-operator
+ LinguMgr(const LinguMgr &);
+ LinguMgr & operator = (const LinguMgr &);
+
+public:
+
+ static ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic::XSpellChecker1 > GetSpellChecker();
+ static ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic::XHyphenator > GetHyphenator();
+ static ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic::XThesaurus > GetThesaurus();
+ static ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic::XDictionaryList > GetDictionaryList();
+ static ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet > GetLinguPropertySet();
+
+ static ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic::XDictionary1 > GetStandardDic();
+ static ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic::XDictionary1 > GetIgnoreAllList();
+ static ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic::XDictionary1 > GetChangeAllList();
+};
+
+///////////////////////////////////////////////////////////////////////////
+
+#ifdef TL_NOTYET
+
+namespace com { namespace sun { namespace star { namespace linguistic2 {
+ class XHyphenatedWord;
+}}}};
+
+
+struct SvxAlternativeSpelling
+{
+ String aReplacement;
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic2::XHyphenatedWord > xHyphWord;
+ INT16 nChangedPos,
+ nChangedLength;
+ BOOL bIsAltSpelling;
+
+ inline SvxAlternativeSpelling();
+};
+
+inline SvxAlternativeSpelling::SvxAlternativeSpelling() :
+ nChangedPos(-1), nChangedLength(-1), bIsAltSpelling(FALSE)
+{
+}
+
+
+SvxAlternativeSpelling SvxGetAltSpelling(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic2::XHyphenatedWord > & rHyphWord );
+
+#endif //TL_NOTYET
+
+///////////////////////////////////////////////////////////////////////////
+
+class SvxDicListChgClamp
+{
+private:
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic::XDictionaryList > xDicList;
+
+ // disallow access to copy-constructor and assignment-operator
+ SvxDicListChgClamp(const SvxDicListChgClamp &);
+ SvxDicListChgClamp & operator = (const SvxDicListChgClamp &);
+
+public:
+ SvxDicListChgClamp( ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic::XDictionaryList > &rxDicList );
+ ~SvxDicListChgClamp();
+};
+
+///////////////////////////////////////////////////////////////////////////
+
+//TL:TODO: remove those functions or make them inline
+::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic::XSpellChecker1 > SvxGetSpellChecker();
+::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic::XHyphenator > SvxGetHyphenator();
+::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic::XThesaurus > SvxGetThesaurus();
+::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic::XDictionaryList > SvxGetDictionaryList();
+::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet > SvxGetLinguPropertySet();
+//TL:TODO: remove argument or provide SvxGetIgnoreAllList with the same one
+::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic::XDictionary1 > SvxGetOrCreatePosDic(
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic::XDictionaryList > xDicList );
+::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic::XDictionary1 > SvxGetIgnoreAllList();
+::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic::XDictionary1 > SvxGetChangeAllList();
+
+///////////////////////////////////////////////////////////////////////////
+// misc functions
+//
+
+LanguageType SvxLocaleToLanguage(
+ const ::com::sun::star::lang::Locale& rLocale );
+::com::sun::star::lang::Locale& SvxLanguageToLocale(
+ ::com::sun::star::lang::Locale& rLocale, LanguageType eLang );
+::com::sun::star::lang::Locale SvxCreateLocale( LanguageType eLang );
+
+// Sequence of non XSpellChecker, XHyphenator or XThesaurus specific
+// languages that are frequently used
+const ::com::sun::star::uno::Sequence<
+ ::com::sun::star::util::Language > & SvxGetSelectableLanguages();
+
+// returns position of language in sequence.
+// If not found a negative value will be returned.
+sal_Int32 SvxGetLanguagePos(
+ const ::com::sun::star::uno::Sequence<
+ ::com::sun::star::util::Language > &rSeq,
+ ::com::sun::star::util::Language nLang);
+
+String SvxGetDictionaryURL(const String &rDicName,
+ sal_Bool bIsUserDic = sal_True);
+
+//TL:TODO: soll mal den rictigen Rckgabetyp bekommen!
+sal_Bool SvxAddEntryToDic(
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic::XDictionary > &rxDic,
+ const ::rtl::OUString &rWord, sal_Bool bIsNeg,
+ const ::rtl::OUString &rRplcTxt, sal_Int16 nRplcLang,
+ sal_Bool bStripDot = sal_True );
+short SvxDicError( Window *pParent, sal_Int16 nError );
+
+sal_Bool SvxSaveDictionaries(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic::XDictionaryList > &xDicList );
+
+#endif
+
+
+
diff --git a/svx/inc/unomlstr.hxx b/svx/inc/unomlstr.hxx
new file mode 100644
index 000000000000..e340ec18f9e5
--- /dev/null
+++ b/svx/inc/unomlstr.hxx
@@ -0,0 +1,93 @@
+/*************************************************************************
+ *
+ * $RCSfile: unomlstr.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:03 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SVX_UNOMLSTR_HXX
+#define _SVX_UNOMLSTR_HXX
+
+#ifndef _COM_SUN_STAR_UTIL_XMODIFYLISTENER_HPP_
+#include <com/sun/star/util/XModifyListener.hpp>
+#endif
+
+#include <cppuhelper/implbase1.hxx>
+
+class SdrObject;
+
+class SvxUnoShapeModifyListener : public ::cppu::WeakAggImplHelper1< ::com::sun::star::util::XModifyListener >
+{
+ SdrObject* mpObj;
+
+public:
+ SvxUnoShapeModifyListener( SdrObject* pObj ) throw();
+ virtual ~SvxUnoShapeModifyListener() throw();
+
+ // ::com::sun::star::util::XModifyListener
+ virtual void SAL_CALL modified(const ::com::sun::star::lang::EventObject& aEvent) throw( ::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::lang::XEventListener
+ virtual void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& Source) throw( ::com::sun::star::uno::RuntimeException);
+
+ // internal
+ void invalidate() throw();
+};
+
+
+#endif
+
+
diff --git a/svx/inc/unonrule.hxx b/svx/inc/unonrule.hxx
new file mode 100644
index 000000000000..99b6b971e3eb
--- /dev/null
+++ b/svx/inc/unonrule.hxx
@@ -0,0 +1,182 @@
+/*************************************************************************
+ *
+ * $RCSfile: unonrule.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:03 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SVX_UNONRULE_HXX
+#define _SVX_UNONRULE_HXX
+
+#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUES_HPP_
+#include <com/sun/star/beans/PropertyValues.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
+#include <com/sun/star/beans/XPropertySet.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_
+#include <com/sun/star/beans/PropertyValue.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_PROPERTYSTATE_HPP_
+#include <com/sun/star/beans/PropertyState.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSETINFO_HPP_
+#include <com/sun/star/beans/XPropertySetInfo.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XMULTIPROPERTYSET_HPP_
+#include <com/sun/star/beans/XMultiPropertySet.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XFASTPROPERTYSET_HPP_
+#include <com/sun/star/beans/XFastPropertySet.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XVETOABLECHANGELISTENER_HPP_
+#include <com/sun/star/beans/XVetoableChangeListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSTATE_HPP_
+#include <com/sun/star/beans/XPropertyState.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSTATECHANGELISTENER_HPP_
+#include <com/sun/star/beans/XPropertyStateChangeListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HPP_
+#include <com/sun/star/beans/PropertyAttribute.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTIESCHANGELISTENER_HPP_
+#include <com/sun/star/beans/XPropertiesChangeListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYCHANGELISTENER_HPP_
+#include <com/sun/star/beans/XPropertyChangeListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYACCESS_HPP_
+#include <com/sun/star/beans/XPropertyAccess.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYCONTAINER_HPP_
+#include <com/sun/star/beans/XPropertyContainer.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_PROPERTYSTATECHANGEEVENT_HPP_
+#include <com/sun/star/beans/PropertyStateChangeEvent.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_PROPERTYCHANGEEVENT_HPP_
+#include <com/sun/star/beans/PropertyChangeEvent.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CONTAINER_XCONTAINER_HPP_
+#include <com/sun/star/container/XContainer.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CONTAINER_XINDEXCONTAINER_HPP_
+#include <com/sun/star/container/XIndexContainer.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CONTAINER_XNAMEREPLACE_HPP_
+#include <com/sun/star/container/XNameReplace.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CONTAINER_XCONTAINERLISTENER_HPP_
+#include <com/sun/star/container/XContainerListener.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CONTAINER_XSET_HPP_
+#include <com/sun/star/container/XSet.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CONTAINER_CONTAINEREVENT_HPP_
+#include <com/sun/star/container/ContainerEvent.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CONTAINER_XINDEXREPLACE_HPP_
+#include <com/sun/star/container/XIndexReplace.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_
+#include <com/sun/star/container/XNameContainer.hpp>
+#endif
+
+#include <unotools/servicehelper.hxx>
+
+#ifndef _SVX_NUMITEM_HXX //autogen
+#include <numitem.hxx>
+#endif
+
+#include <cppuhelper/implbase1.hxx>
+
+class SdrModel;
+
+class SvxUnoNumberingRules : public ::cppu::WeakAggImplHelper1< ::com::sun::star::container::XIndexReplace >
+{
+private:
+ SvxNumRule* pNumRule;
+
+public:
+ SvxUnoNumberingRules( SdrModel* pModel ) throw();
+ SvxUnoNumberingRules(const SvxNumRule& rRule) throw();
+ virtual ~SvxUnoNumberingRules() throw();
+
+ UNO3_GETIMPLEMENTATION_DECL( SvxUnoNumberingRules )
+
+ //XIndexReplace
+ virtual void SAL_CALL replaceByIndex( sal_Int32 Index, const ::com::sun::star::uno::Any& Element ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ //XIndexAccess
+ virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException) ;
+ virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index ) throw(::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ //XElementAccess
+ virtual ::com::sun::star::uno::Type SAL_CALL getElementType() throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException);
+
+ //Intern
+ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue> getNumberingRuleByIndex( sal_Int32 nIndex ) const throw();
+ void setNumberingRuleByIndex( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rProperties, sal_Int32 nIndex ) throw(::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::IllegalArgumentException );
+
+ const SvxNumRule* GetNumRule() const throw() { return pNumRule; }
+};
+
+#endif
+
+
diff --git a/svx/inc/unoshcol.hxx b/svx/inc/unoshcol.hxx
new file mode 100644
index 000000000000..4b7ec6b489d3
--- /dev/null
+++ b/svx/inc/unoshcol.hxx
@@ -0,0 +1,117 @@
+/*************************************************************************
+ *
+ * $RCSfile: unoshcol.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:03 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SVX_UNOSHGRP_HXX
+#define _SVX_UNOSHGRP_HXX
+
+#ifndef _COM_SUN_STAR_DRAWING_XSHAPES_HPP_
+#include <com/sun/star/drawing/XShapes.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#endif
+#ifndef _OSL_MUTEX_HXX_
+#include <osl/mutex.hxx>
+#endif
+#ifndef _CPPUHELPER_INTERFACECONTAINER_H_
+#include <cppuhelper/interfacecontainer.h>
+#endif
+
+#include <cppuhelper/implbase2.hxx>
+
+class XShapeList;
+
+/***********************************************************************
+* *
+***********************************************************************/
+class SvxShapeCollection : public ::cppu::WeakAggImplHelper2<
+ ::com::sun::star::drawing::XShapes,
+ ::com::sun::star::lang::XServiceInfo
+ >
+{
+private:
+ ::osl::Mutex maShapeContainerMutex;
+ ::cppu::OInterfaceContainerHelper maShapeContainer;
+
+public:
+ SvxShapeCollection() throw();
+ virtual ~SvxShapeCollection() throw();
+
+ // XIndexAccess
+ virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException) ;
+ virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index ) throw(::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ // XElementAccess
+ virtual ::com::sun::star::uno::Type SAL_CALL getElementType() throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException);
+
+ // XShapes
+ virtual void SAL_CALL add( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& xShape ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL remove( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& xShape ) throw(::com::sun::star::uno::RuntimeException);
+
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
+};
+
+#endif
+
+
diff --git a/svx/inc/xattr.hxx b/svx/inc/xattr.hxx
new file mode 100644
index 000000000000..7a0e48f00c63
--- /dev/null
+++ b/svx/inc/xattr.hxx
@@ -0,0 +1,101 @@
+/*************************************************************************
+ *
+ * $RCSfile: xattr.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:04 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _XATTR_HXX
+#define _XATTR_HXX
+
+// include ---------------------------------------------------------------
+
+#ifndef _XDEF_HXX
+//#include <xdef.hxx>
+#endif
+#ifndef _XENUM_HXX
+//#include <xenum.hxx>
+#endif
+#ifndef _XPOLY_HXX
+//#include <xpoly.hxx>
+#endif
+#ifndef _SVX_RECTENUM_HXX
+//#include <rectenum.hxx>
+#endif
+
+class XColorTable;
+class XDashTable;
+class XLineEndTable;
+class XHatchTable;
+class XBitmapTable;
+class XGradientTable;
+
+#include <xit.hxx>
+#include <xcolit.hxx>
+#include <xgrad.hxx>
+#include <xhatch.hxx>
+#include <xlineit.hxx>
+#include <xfillit.hxx>
+#include <xtextit.hxx>
+#include <xlineit0.hxx>
+#include <xfillit0.hxx>
+#include <xtextit0.hxx>
+#include <xsetit.hxx>
+#include <xlinjoit.hxx>
+
+
+#endif // _XATTR_HXX
+
diff --git a/svx/inc/xexch.hxx b/svx/inc/xexch.hxx
new file mode 100644
index 000000000000..a9860881ce65
--- /dev/null
+++ b/svx/inc/xexch.hxx
@@ -0,0 +1,110 @@
+/*************************************************************************
+ *
+ * $RCSfile: xexch.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:04 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _SVX_XEXCH_HXX
+#define _SVX_XEXCH_HXX
+
+
+#ifndef _STREAM_HXX
+#include <tools/stream.hxx>
+#endif
+
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+// Clipboard-Format fuer XOutDev-Fuellattribute
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+class XFillAttrSetItem;
+class SfxItemPool;
+
+
+
+class XFillExchangeData : public SvDataCopyStream
+{
+private:
+ XFillAttrSetItem* pXFillAttrSetItem;
+ SfxItemPool* pPool;
+
+protected:
+ // SvData-Methoden
+ virtual void Load( SvStream& );
+ virtual void Save( SvStream& );
+ virtual void Assign( const SvDataCopyStream& );
+
+public:
+ TYPEINFO();
+
+ XFillExchangeData();
+ XFillExchangeData(const XFillAttrSetItem rXFillAttrSetItem);
+ ~XFillExchangeData();
+
+ // Zuweisungsoperator
+ XFillExchangeData& operator=( const XFillExchangeData& rXFillExchangeData );
+
+ // Im-/Export
+ friend SvStream& operator<<( SvStream& rOStm, const XFillExchangeData& rXFillExchangeData );
+ friend SvStream& operator>>( SvStream& rIStm, XFillExchangeData& rXFillExchangeData );
+
+ static ULONG RegisterClipboardFormatName();
+ XFillAttrSetItem* GetXFillAttrSetItem() { return pXFillAttrSetItem; }
+};
+
+#endif // _SVX_XEXCH_HXX
+
diff --git a/svx/inc/xlinjoit.hxx b/svx/inc/xlinjoit.hxx
new file mode 100644
index 000000000000..08900c92967e
--- /dev/null
+++ b/svx/inc/xlinjoit.hxx
@@ -0,0 +1,97 @@
+/*************************************************************************
+ *
+ * $RCSfile: xlinjoit.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:05 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _SVX_XLINJOIT_HXX
+#define _SVX_XLINJOIT_HXX
+
+#ifndef _SFXENUMITEM_HXX //autogen
+#include <svtools/eitem.hxx>
+#endif
+#ifndef _XENUM_HXX
+#include "xenum.hxx"
+#endif
+
+//---------------------
+// class LineStyleItem
+//---------------------
+
+class XLineJointItem : public SfxEnumItem
+{
+public:
+ TYPEINFO();
+ XLineJointItem( XLineJoint eLineJoint = XLINEJOINT_ROUND );
+ XLineJointItem( SvStream& rIn );
+
+ virtual USHORT GetVersion( USHORT nFileFormatVersion ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
+ virtual SfxPoolItem* Create( SvStream& rIn, USHORT nVer ) const;
+
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric,
+ String &rText, const International * = 0 ) const;
+
+ virtual USHORT GetValueCount() const;
+ XLineJoint GetValue() const { return (XLineJoint) SfxEnumItem::GetValue(); }
+};
+
+#endif // _SVX_XLINJOIT_HXX
diff --git a/svx/inc/xoutbmp.hxx b/svx/inc/xoutbmp.hxx
new file mode 100644
index 000000000000..fc399824dbd9
--- /dev/null
+++ b/svx/inc/xoutbmp.hxx
@@ -0,0 +1,136 @@
+/*************************************************************************
+ *
+ * $RCSfile: xoutbmp.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:05 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _XOUTBMP_HXX
+#define _XOUTBMP_HXX
+
+#ifndef _SV_GRAPH_HXX
+#include <vcl/graph.hxx>
+#endif
+
+// -----------
+// - Defines -
+// -----------
+
+#define XOUTBMP_MIRROR_HORZ 0x00000001L
+#define XOUTBMP_MIRROR_VERT 0x00000010L
+
+#define XOUTBMP_CONTOUR_HORZ 0x00000001L
+#define XOUTBMP_CONTOUR_VERT 0x00000002L
+#define XOUTBMP_CONTOUR_EDGEDETECT 0x00000004L
+
+#define XOUTBMP_DONT_EXPAND_FILENAME 0x10000000L
+#define XOUTBMP_USE_GIF_IF_POSSIBLE 0x20000000L
+#define XOUTBMP_USE_GIF_IF_SENSIBLE 0x40000000L
+
+// --------------
+// - XOutBitmap -
+// --------------
+
+// !!!DirEntry
+class DirEntry;
+class GraphicFilter;
+class VirtualDevice;
+class INetURLObject;
+class Polygon;
+
+class XOutBitmap
+{
+public:
+
+ static GraphicFilter* pGrfFilter;
+
+ static BitmapEx CreateQuickDrawBitmapEx( const Graphic& rGraphic, const OutputDevice& rCompDev,
+ const MapMode& rMapMode, const Size& rLogSize,
+ const Point& rPoint, const Size& rSize );
+ static Graphic MirrorGraphic( const Graphic& rGraphic, const ULONG nMirrorFlags );
+ static Animation MirrorAnimation( const Animation& rAnimation, BOOL bHMirr, BOOL bVMirr );
+ static Bitmap GetBitmapFromGraphic( const Graphic& rGraphic );
+ static USHORT WriteGraphic( const Graphic& rGraphic, String& rFileName,
+ const String& rFilterName, const ULONG nFlags = 0L,
+ const Size* pMtfSize_100TH_MM = NULL );
+ static void DrawQuickDrawBitmapEx( OutputDevice* pOutDev, const Point& rPt,
+ const Size& rSize, const BitmapEx& rBmpEx );
+ static void DrawTiledBitmapEx( OutputDevice* pOutDev, const Point& rStartPt, const Size& rGrfSize,
+ const Rectangle& rTileRect, const BitmapEx& rBmpEx );
+
+ static USHORT ExportGraphic( const Graphic& rGraphic, const INetURLObject& rURL,
+ GraphicFilter& rFilter, const USHORT nFormat,
+ BOOL bIgnoreOptions );
+// !!!DirEntry
+ static USHORT ExportGraphic( const Graphic& rGraphic, const DirEntry& rPath,
+ GraphicFilter& rFilter, const USHORT nFormat,
+ BOOL bIgnoreOptions );
+
+ static Bitmap DetectEdges( const Bitmap& rBmp, const BYTE cThreshold );
+
+ static Polygon GetCountour( const Bitmap& rBmp, const ULONG nContourFlags,
+ const BYTE cEdgeDetectThreshold = 50,
+ const Rectangle* pWorkRect = NULL );
+};
+
+// ----------------
+// - DitherBitmap -
+// ----------------
+
+BOOL DitherBitmap( Bitmap& rBitmap );
+
+#endif // _XOUTBMP_HXX
diff --git a/svx/inc/xpolyimp.hxx b/svx/inc/xpolyimp.hxx
new file mode 100644
index 000000000000..8065b7f1a4bf
--- /dev/null
+++ b/svx/inc/xpolyimp.hxx
@@ -0,0 +1,141 @@
+/*************************************************************************
+ *
+ * $RCSfile: xpolyimp.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:05 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _XPOLYIMP_HXX
+#define _XPOLYIMP_HXX
+
+#ifndef _GEN_HXX
+#include <tools/gen.hxx>
+#endif
+#ifndef _XPOLY_HXX
+#include <xpoly.hxx>
+#endif
+
+#pragma hdrstop
+
+
+/*************************************************************************
+|*
+|* class ImpXPolygon
+|*
+|* Beschreibung
+|* Ersterstellung 08.11.94
+|* Letzte Aenderung Joe 26.09.95
+|*
+*************************************************************************/
+class ImpXPolygon
+{
+public:
+ Point* pPointAry;
+ BYTE* pFlagAry;
+ Point* pOldPointAry;
+ BOOL bDeleteOldPoints;
+ USHORT nSize;
+ USHORT nResize;
+ USHORT nPoints;
+ USHORT nRefCount;
+
+ ImpXPolygon( USHORT nInitSize = 16, USHORT nResize=16 );
+ ImpXPolygon( const ImpXPolygon& rImpXPoly );
+ ~ImpXPolygon();
+
+ FASTBOOL operator==(const ImpXPolygon& rImpXPoly) const;
+ FASTBOOL operator!=(const ImpXPolygon& rImpXPoly) const { return !operator==(rImpXPoly); }
+
+ void CheckPointDelete() { if ( bDeleteOldPoints )
+ { delete pOldPointAry;
+ bDeleteOldPoints = FALSE; } }
+ void Resize( USHORT nNewSize, BOOL bDeletePoints = TRUE );
+ void InsertSpace( USHORT nPos, USHORT nCount );
+ void Remove( USHORT nPos, USHORT nCount );
+};
+
+
+/*************************************************************************
+|*
+|* class ImpXPolyPolygon
+|*
+|* Beschreibung
+|* Ersterstellung 08.11.94
+|* Letzte Aenderung Joe 26-09-1995
+|*
+*************************************************************************/
+DECLARE_LIST( XPolygonList, XPolygon* );
+
+class ImpXPolyPolygon
+{
+public:
+ XPolygonList aXPolyList;
+ USHORT nRefCount;
+
+ ImpXPolyPolygon( USHORT nInitSize = 16, USHORT nResize = 16 ) :
+ aXPolyList( 1024, nInitSize, nResize )
+ { nRefCount = 1; }
+ ImpXPolyPolygon( const ImpXPolyPolygon& rImpXPolyPoly );
+ ~ImpXPolyPolygon();
+
+ FASTBOOL operator==(const ImpXPolyPolygon& rImpXPolyPoly) const;
+ FASTBOOL operator!=(const ImpXPolyPolygon& rImpXPolyPoly) const { return !operator==(rImpXPolyPoly); }
+};
+
+
+
+#endif // _XPOLYIMP_HXX
diff --git a/svx/inc/zoomctrl.hxx b/svx/inc/zoomctrl.hxx
new file mode 100644
index 000000000000..6697c4543828
--- /dev/null
+++ b/svx/inc/zoomctrl.hxx
@@ -0,0 +1,94 @@
+/*************************************************************************
+ *
+ * $RCSfile: zoomctrl.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:05 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SVX_ZOOMCTRL_HXX
+#define _SVX_ZOOMCTRL_HXX
+
+// include ---------------------------------------------------------------
+
+#ifndef _SFXSTBITEM_HXX //autogen
+#include <sfx2/stbitem.hxx>
+#endif
+
+// class SvxZoomToolBoxControl -------------------------------------------
+
+class SvxZoomStatusBarControl : public SfxStatusBarControl
+{
+private:
+ USHORT nZoom;
+ USHORT nValueSet;
+
+public:
+ virtual void StateChanged( USHORT nSID, SfxItemState eState,
+ const SfxPoolItem* pState );
+ virtual void Paint( const UserDrawEvent& rEvt );
+ virtual void Command( const CommandEvent& rCEvt );
+
+ SFX_DECL_STATUSBAR_CONTROL();
+
+ SvxZoomStatusBarControl( USHORT nId, StatusBar& rStb, SfxBindings& rBind );
+
+ static ULONG GetDefItemWidth(const StatusBar& rStb);
+
+};
+
+
+#endif
+
diff --git a/svx/prj/d.lst b/svx/prj/d.lst
new file mode 100644
index 000000000000..1eed6194dd0f
--- /dev/null
+++ b/svx/prj/d.lst
@@ -0,0 +1,568 @@
+touch: ..\inc\hid.lst %_DEST%\bin%_EXT%\hid.lst
+..\%__SRC%\misc\svxinter.c %_DEST%\odk\src%_EXT%\svxinter.c
+..\%__SRC%\misc\svx.hid %_DEST%\bin%_EXT%\svx.hid
+..\%__SRC%\inc\svxinter.h %_DEST%\odk\inc%_EXT%\svxinter.h
+..\%__SRC%\inc\svxslots.ilb %_DEST%\inc%_EXT%\svxslots.ilb
+..\%__SRC%\inc\fren\svxslots.ilb %_DEST%\inc%_EXT%\fren\svxslots.ilb
+..\%__SRC%\inc\dtch\svxslots.ilb %_DEST%\inc%_EXT%\dtch\svxslots.ilb
+..\%__SRC%\inc\span\svxslots.ilb %_DEST%\inc%_EXT%\span\svxslots.ilb
+..\%__SRC%\inc\port\svxslots.ilb %_DEST%\inc%_EXT%\port\svxslots.ilb
+..\%__SRC%\inc\ital\svxslots.ilb %_DEST%\inc%_EXT%\ital\svxslots.ilb
+..\%__SRC%\inc\enus\svxslots.ilb %_DEST%\inc%_EXT%\enus\svxslots.ilb
+..\%__SRC%\inc\swed\svxslots.ilb %_DEST%\inc%_EXT%\swed\svxslots.ilb
+..\%__SRC%\inc\dan\svxslots.ilb %_DEST%\inc%_EXT%\dan\svxslots.ilb
+..\%__SRC%\inc\chinsim\svxslots.ilb %_DEST%\inc%_EXT%\chinsim\svxslots.ilb
+..\%__SRC%\inc\japn\svxslots.ilb %_DEST%\inc%_EXT%\japn\svxslots.ilb
+..\%__SRC%\inc\russ\svxslots.ilb %_DEST%\inc%_EXT%\russ\svxslots.ilb
+..\%__SRC%\inc\pol\svxslots.ilb %_DEST%\inc%_EXT%\pol\svxslots.ilb
+..\%__SRC%\inc\svxlink.hxx %_DEST%\inc%_EXT%\svxlink.hxx
+..\%__SRC%\inc\\*.ilb* %_DEST%\inc%_EXT%\*.ilb*
+..\%__SRC%\lib\lib*.* %_DEST%\lib%_EXT%\lib*.*
+..\%__SRC%\lib\dl.lib %_DEST%\lib%_EXT%\dl.lib
+..\%__SRC%\slb\dg.lib %_DEST%\lib%_EXT%\xdg.lib
+..\%__SRC%\lib\svx.lib %_DEST%\lib%_EXT%\svx.lib
+..\%__SRC%\slb\svx.lib %_DEST%\lib%_EXT%\xsvx.lib
+..\%__SRC%\lib\svxinter.lib %_DEST%\odk\lib%_EXT%\svxinter.lib
+..\%__SRC%\lib\svl.lib %_DEST%\lib%_EXT%\svl.lib
+..\%__SRC%\lib\dl1.lib %_DEST%\lib%_EXT%\dl1.lib
+..\%__SRC%\lib\dl2.lib %_DEST%\lib%_EXT%\dl2.lib
+..\%__SRC%\lib\svx1.lib %_DEST%\lib%_EXT%\svx1.lib
+..\%__SRC%\lib\svx2.lib %_DEST%\lib%_EXT%\svx2.lib
+..\%__SRC%\slb\xdraw.lib %_DEST%\lib%_EXT%\svxsmrtd.lib
+..\%__SRC%\bin\svxslots.tlb %_DEST%\bin%_EXT%\svxslots.tlb
+..\%__SRC%\bin\dg*.dll %_DEST%\bin%_EXT%\dg*.dll
+..\%__SRC%\bin\dl*.dll %_DEST%\bin%_EXT%\dl*.dll
+..\%__SRC%\bin\dg*.sym %_DEST%\bin%_EXT%\dg*.sym
+..\%__SRC%\misc\dg*.map %_DEST%\bin%_EXT%\dg*.map
+..\%__SRC%\bin\svx*.dll %_DEST%\bin%_EXT%\svx*.dll
+..\%__SRC%\bin\svx*.res %_DEST%\bin%_EXT%\svx*.res
+..\%__SRC%\bin\gal*.res %_DEST%\bin%_EXT%\gal*.res
+..\%__SRC%\bin\svx*.sym %_DEST%\bin%_EXT%\svx*.sym
+..\%__SRC%\misc\svx*.map %_DEST%\bin%_EXT%\svx*.map
+..\%__SRC%\misc\svx.csv %_DEST%\inc%_EXT%\svx.csv
+..\%__SRC%\bin\svl*.dll %_DEST%\bin%_EXT%\svl*.dll
+..\%__SRC%\bin\svl*.sym %_DEST%\bin%_EXT%\svl*.sym
+..\%__SRC%\bin\svxslots.tlb %_DEST%\bin%_EXT%\svxslots.tlb
+..\%__SRC%\srs\svxslots.srs %_DEST%\res%_EXT%\svxslots.srs
+..\%__SRC%\lib\svxl.lib %_DEST%\lib%_EXT%\svxl.lib
+..\%__SRC%\lib\libsvxl.a %_DEST%\lib%_EXT%\libsvxl.a
+
+mkdir: %_DEST%\inc%_EXT%\svx
+hedabu: ..\%__SRC%\inc\svxslots.hxx %_DEST%\inc%_EXT%\svx\svxslots.hxx
+hedabu: ..\inc\dialdll.hxx %_DEST%\inc%_EXT%\svx\dialdll.hxx
+hedabu: ..\inc\svdfield.hxx %_DEST%\inc%_EXT%\svx\svdfield.hxx
+hedabu: ..\inc\svxitems.hrc %_DEST%\inc%_EXT%\svx\svxitems.hrc
+hedabu: ..\inc\multipat.hxx %_DEST%\inc%_EXT%\svx\multipat.hxx
+hedabu: ..\inc\fontlb.hxx %_DEST%\inc%_EXT%\svx\fontlb.hxx
+hedabu: ..\inc\optgrid.hxx %_DEST%\inc%_EXT%\svx\optgrid.hxx
+hedabu: ..\inc\svddef.hxx %_DEST%\inc%_EXT%\svx\svddef.hxx
+hedabu: ..\inc\svdfppt.hxx %_DEST%\inc%_EXT%\svx\svdfppt.hxx
+hedabu: ..\inc\svxifact.hxx %_DEST%\inc%_EXT%\svx\svxifact.hxx
+hedabu: ..\inc\linkmgr.hxx %_DEST%\inc%_EXT%\svx\linkmgr.hxx
+hedabu: ..\inc\svdsob.hxx %_DEST%\inc%_EXT%\svx\svdsob.hxx
+hedabu: ..\inc\svdlayer.hxx %_DEST%\inc%_EXT%\svx\svdlayer.hxx
+hedabu: ..\inc\adjitem.hxx %_DEST%\inc%_EXT%\svx\adjitem.hxx
+hedabu: ..\inc\adritem.hxx %_DEST%\inc%_EXT%\svx\adritem.hxx
+hedabu: ..\inc\akrnitem.hxx %_DEST%\inc%_EXT%\svx\akrnitem.hxx
+hedabu: ..\inc\algitem.hxx %_DEST%\inc%_EXT%\svx\algitem.hxx
+hedabu: ..\inc\align.hxx %_DEST%\inc%_EXT%\svx\align.hxx
+hedabu: ..\inc\simptabl.hxx %_DEST%\inc%_EXT%\svx\simptabl.hxx
+hedabu: ..\inc\ctredlin.hxx %_DEST%\inc%_EXT%\svx\ctredlin.hxx
+hedabu: ..\inc\backgrnd.hxx %_DEST%\inc%_EXT%\svx\backgrnd.hxx
+hedabu: ..\inc\bbdlg.hxx %_DEST%\inc%_EXT%\svx\bbdlg.hxx
+hedabu: ..\inc\blnkitem.hxx %_DEST%\inc%_EXT%\svx\blnkitem.hxx
+hedabu: ..\inc\bmpmask.hxx %_DEST%\inc%_EXT%\svx\bmpmask.hxx
+hedabu: ..\inc\bolnitem.hxx %_DEST%\inc%_EXT%\svx\bolnitem.hxx
+hedabu: ..\inc\border.hxx %_DEST%\inc%_EXT%\svx\border.hxx
+hedabu: ..\inc\boxitem.hxx %_DEST%\inc%_EXT%\svx\boxitem.hxx
+hedabu: ..\inc\brkitem.hxx %_DEST%\inc%_EXT%\svx\brkitem.hxx
+hedabu: ..\inc\brshitem.hxx %_DEST%\inc%_EXT%\svx\brshitem.hxx
+hedabu: ..\inc\camera3d.hxx %_DEST%\inc%_EXT%\svx\camera3d.hxx
+hedabu: ..\inc\chardlg.hxx %_DEST%\inc%_EXT%\svx\chardlg.hxx
+hedabu: ..\inc\charmap.hxx %_DEST%\inc%_EXT%\svx\charmap.hxx
+hedabu: ..\inc\checklbx.hxx %_DEST%\inc%_EXT%\svx\checklbx.hxx
+hedabu: ..\inc\chrtitem.hxx %_DEST%\inc%_EXT%\svx\chrtitem.hxx
+hedabu: ..\inc\class3d.hxx %_DEST%\inc%_EXT%\svx\class3d.hxx
+hedabu: ..\inc\cmapitem.hxx %_DEST%\inc%_EXT%\svx\cmapitem.hxx
+hedabu: ..\inc\cntritem.hxx %_DEST%\inc%_EXT%\svx\cntritem.hxx
+hedabu: ..\inc\colritem.hxx %_DEST%\inc%_EXT%\svx\colritem.hxx
+hedabu: ..\inc\connctrl.hxx %_DEST%\inc%_EXT%\svx\connctrl.hxx
+hedabu: ..\inc\connect.hxx %_DEST%\inc%_EXT%\svx\connect.hxx
+hedabu: ..\inc\contdlg.hxx %_DEST%\inc%_EXT%\svx\contdlg.hxx
+hedabu: ..\inc\crsditem.hxx %_DEST%\inc%_EXT%\svx\crsditem.hxx
+hedabu: ..\inc\ctrdial.hxx %_DEST%\inc%_EXT%\svx\ctrdial.hxx
+hedabu: ..\inc\cscoitem.hxx %_DEST%\inc%_EXT%\svx\cscoitem.hxx
+hedabu: ..\inc\colrctrl.hxx %_DEST%\inc%_EXT%\svx\colrctrl.hxx
+hedabu: ..\inc\cube3d.hxx %_DEST%\inc%_EXT%\svx\cube3d.hxx
+hedabu: ..\inc\polygn3d.hxx %_DEST%\inc%_EXT%\svx\polygn3d.hxx
+hedabu: ..\inc\lathe3d.hxx %_DEST%\inc%_EXT%\svx\lathe3d.hxx
+hedabu: ..\inc\dlight3d.hxx %_DEST%\inc%_EXT%\svx\dlight3d.hxx
+hedabu: ..\inc\e3ditem.hxx %_DEST%\inc%_EXT%\svx\e3ditem.hxx
+hedabu: ..\inc\def3d.hxx %_DEST%\inc%_EXT%\svx\def3d.hxx
+hedabu: ..\inc\svdtypes.hxx %_DEST%\inc%_EXT%\svx\svdtypes.hxx
+hedabu: ..\inc\volume3d.hxx %_DEST%\inc%_EXT%\svx\volume3d.hxx
+hedabu: ..\inc\xenum.hxx %_DEST%\inc%_EXT%\svx\xenum.hxx
+hedabu: ..\inc\dialmgr.hxx %_DEST%\inc%_EXT%\svx\dialmgr.hxx
+hedabu: ..\inc\dlgctl3d.hxx %_DEST%\inc%_EXT%\svx\dlgctl3d.hxx
+hedabu: ..\inc\dlgctrl.hxx %_DEST%\inc%_EXT%\svx\dlgctrl.hxx
+hedabu: ..\inc\dlgname.hxx %_DEST%\inc%_EXT%\svx\dlgname.hxx
+hedabu: ..\inc\dlgutil.hxx %_DEST%\inc%_EXT%\svx\dlgutil.hxx
+hedabu: ..\inc\drawitem.hxx %_DEST%\inc%_EXT%\svx\drawitem.hxx
+hedabu: ..\inc\dialogs.hrc %_DEST%\inc%_EXT%\svx\dialogs.hrc
+hedabu: ..\inc\escpitem.hxx %_DEST%\inc%_EXT%\svx\escpitem.hxx
+hedabu: ..\inc\extrud3d.hxx %_DEST%\inc%_EXT%\svx\extrud3d.hxx
+hedabu: ..\inc\escherex.hxx %_DEST%\inc%_EXT%\svx\escherex.hxx
+hedabu: ..\inc\f3dchild.hxx %_DEST%\inc%_EXT%\svx\f3dchild.hxx
+hedabu: ..\inc\fhgtitem.hxx %_DEST%\inc%_EXT%\svx\fhgtitem.hxx
+hedabu: ..\inc\fillctrl.hxx %_DEST%\inc%_EXT%\svx\fillctrl.hxx
+hedabu: ..\inc\float3d.hxx %_DEST%\inc%_EXT%\svx\float3d.hxx
+hedabu: ..\inc\flditem.hxx %_DEST%\inc%_EXT%\svx\flditem.hxx
+hedabu: ..\inc\flstitem.hxx %_DEST%\inc%_EXT%\svx\flstitem.hxx
+hedabu: ..\inc\fntctl.hxx %_DEST%\inc%_EXT%\svx\fntctl.hxx
+hedabu: ..\inc\fntctrl.hxx %_DEST%\inc%_EXT%\svx\fntctrl.hxx
+hedabu: ..\inc\fntszctl.hxx %_DEST%\inc%_EXT%\svx\fntszctl.hxx
+hedabu: ..\inc\fontitem.hxx %_DEST%\inc%_EXT%\svx\fontitem.hxx
+hedabu: ..\inc\fontwork.hxx %_DEST%\inc%_EXT%\svx\fontwork.hxx
+hedabu: ..\inc\frmitem.hxx %_DEST%\inc%_EXT%\svx\frmitem.hxx
+hedabu: ..\inc\frmsel.hxx %_DEST%\inc%_EXT%\svx\frmsel.hxx
+hedabu: ..\inc\fwdtitem.hxx %_DEST%\inc%_EXT%\svx\fwdtitem.hxx
+hedabu: ..\inc\gallery.hxx %_DEST%\inc%_EXT%\svx\gallery.hxx
+hedabu: ..\inc\galbrws.hxx %_DEST%\inc%_EXT%\svx\galbrws.hxx
+hedabu: ..\inc\globlmn.hrc %_DEST%\inc%_EXT%\svx\globlmn.hrc
+hedabu: ..\inc\globlac.hrc %_DEST%\inc%_EXT%\svx\globlac.hrc
+hedabu: ..\inc\globl3d.hxx %_DEST%\inc%_EXT%\svx\globl3d.hxx
+hedabu: ..\inc\grafctrl.hxx %_DEST%\inc%_EXT%\svx\grafctrl.hxx
+hedabu: ..\inc\graphctl.hxx %_DEST%\inc%_EXT%\svx\graphctl.hxx
+hedabu: ..\inc\hdft.hxx %_DEST%\inc%_EXT%\svx\hdft2.hxx
+hedabu: ..\inc\htmlmode.hxx %_DEST%\inc%_EXT%\svx\htmlmode.hxx
+hedabu: ..\inc\hyznitem.hxx %_DEST%\inc%_EXT%\svx\hyznitem.hxx
+hedabu: ..\inc\ifaceids.hxx %_DEST%\inc%_EXT%\svx\ifaceids.hxx
+hedabu: ..\inc\imapdlg.hxx %_DEST%\inc%_EXT%\svx\imapdlg.hxx
+hedabu: ..\inc\impgrf.hxx %_DEST%\inc%_EXT%\svx\impgrf.hxx
+hedabu: ..\inc\insctrl.hxx %_DEST%\inc%_EXT%\svx\insctrl.hxx
+hedabu: ..\inc\itemdata.hxx %_DEST%\inc%_EXT%\svx\itemdata.hxx
+hedabu: ..\inc\itemwin.hxx %_DEST%\inc%_EXT%\svx\itemwin.hxx
+hedabu: ..\inc\keepitem.hxx %_DEST%\inc%_EXT%\svx\keepitem.hxx
+hedabu: ..\inc\kernitem.hxx %_DEST%\inc%_EXT%\svx\kernitem.hxx
+hedabu: ..\inc\labdlg.hxx %_DEST%\inc%_EXT%\svx\labdlg.hxx
+hedabu: ..\inc\label3d.hxx %_DEST%\inc%_EXT%\svx\label3d.hxx
+hedabu: ..\inc\langbox.hxx %_DEST%\inc%_EXT%\svx\langbox.hxx
+hedabu: ..\inc\langitem.hxx %_DEST%\inc%_EXT%\svx\langitem.hxx
+hedabu: ..\inc\langtab.hxx %_DEST%\inc%_EXT%\svx\langtab.hxx
+hedabu: ..\inc\layctrl.hxx %_DEST%\inc%_EXT%\svx\layctrl.hxx
+hedabu: ..\inc\lcolitem.hxx %_DEST%\inc%_EXT%\svx\lcolitem.hxx
+hedabu: ..\inc\lgview3d.hxx %_DEST%\inc%_EXT%\svx\lgview3d.hxx
+hedabu: ..\inc\light3d.hxx %_DEST%\inc%_EXT%\svx\light3d.hxx
+hedabu: ..\inc\lightdlg.hxx %_DEST%\inc%_EXT%\svx\lightdlg.hxx
+hedabu: ..\inc\linectrl.hxx %_DEST%\inc%_EXT%\svx\linectrl.hxx
+hedabu: ..\inc\linelink.hxx %_DEST%\inc%_EXT%\svx\linelink.hxx
+hedabu: ..\inc\lrspitem.hxx %_DEST%\inc%_EXT%\svx\lrspitem.hxx
+hedabu: ..\inc\lspcitem.hxx %_DEST%\inc%_EXT%\svx\lspcitem.hxx
+hedabu: ..\inc\matrix3d.hxx %_DEST%\inc%_EXT%\svx\matrix3d.hxx
+hedabu: ..\inc\measctrl.hxx %_DEST%\inc%_EXT%\svx\measctrl.hxx
+hedabu: ..\inc\measure.hxx %_DEST%\inc%_EXT%\svx\measure.hxx
+hedabu: ..\inc\dstribut.hxx %_DEST%\inc%_EXT%\svx\dstribut.hxx
+hedabu: ..\inc\modctrl.hxx %_DEST%\inc%_EXT%\svx\modctrl.hxx
+hedabu: ..\inc\multifil.hxx %_DEST%\inc%_EXT%\svx\multifil.hxx
+hedabu: ..\inc\nhypitem.hxx %_DEST%\inc%_EXT%\svx\nhypitem.hxx
+hedabu: ..\inc\nlbkitem.hxx %_DEST%\inc%_EXT%\svx\nlbkitem.hxx
+hedabu: ..\inc\numfmt.hxx %_DEST%\inc%_EXT%\svx\numfmt.hxx
+hedabu: ..\inc\numinf.hxx %_DEST%\inc%_EXT%\svx\numinf.hxx
+hedabu: ..\inc\numfmtsh.hxx %_DEST%\inc%_EXT%\svx\numfmtsh.hxx
+hedabu: ..\inc\nforient.hxx %_DEST%\inc%_EXT%\svx\nforient.hxx
+hedabu: ..\inc\obj3d.hxx %_DEST%\inc%_EXT%\svx\obj3d.hxx
+hedabu: ..\inc\objfac3d.hxx %_DEST%\inc%_EXT%\svx\objfac3d.hxx
+hedabu: ..\inc\opaqitem.hxx %_DEST%\inc%_EXT%\svx\opaqitem.hxx
+hedabu: ..\inc\optgenrl.hxx %_DEST%\inc%_EXT%\svx\optgenrl.hxx
+hedabu: ..\inc\optitems.hxx %_DEST%\inc%_EXT%\svx\optitems.hxx
+hedabu: ..\inc\optlingu.hxx %_DEST%\inc%_EXT%\svx\optlingu.hxx
+hedabu: ..\inc\optpath.hxx %_DEST%\inc%_EXT%\svx\optpath.hxx
+hedabu: ..\inc\optsave.hxx %_DEST%\inc%_EXT%\svx\optsave.hxx
+hedabu: ..\inc\optspell.hxx %_DEST%\inc%_EXT%\svx\optspell.hxx
+hedabu: ..\inc\optinet2.hxx %_DEST%\inc%_EXT%\svx\optinet2.hxx
+hedabu: ..\inc\optmail.hxx %_DEST%\inc%_EXT%\svx\optmail.hxx
+hedabu: ..\inc\optldap.hxx %_DEST%\inc%_EXT%\svx\optldap.hxx
+hedabu: ..\inc\optextbr.hxx %_DEST%\inc%_EXT%\svx\optextbr.hxx
+hedabu: ..\inc\orphitem.hxx %_DEST%\inc%_EXT%\svx\orphitem.hxx
+hedabu: ..\inc\p2dobj3d.hxx %_DEST%\inc%_EXT%\svx\p2dobj3d.hxx
+hedabu: ..\inc\page.hxx %_DEST%\inc%_EXT%\svx\page.hxx
+hedabu: ..\inc\pagectrl.hxx %_DEST%\inc%_EXT%\svx\pagectrl.hxx
+hedabu: ..\inc\pageitem.hxx %_DEST%\inc%_EXT%\svx\pageitem.hxx
+hedabu: ..\inc\paperinf.hxx %_DEST%\inc%_EXT%\svx\paperinf.hxx
+hedabu: ..\inc\paragrph.hxx %_DEST%\inc%_EXT%\svx\paragrph.hxx
+hedabu: ..\inc\paraprev.hxx %_DEST%\inc%_EXT%\svx\paraprev.hxx
+hedabu: ..\inc\passwd.hxx %_DEST%\inc%_EXT%\svx\passwd.hxx
+hedabu: ..\inc\pbinitem.hxx %_DEST%\inc%_EXT%\svx\pbinitem.hxx
+hedabu: ..\inc\pmdlitem.hxx %_DEST%\inc%_EXT%\svx\pmdlitem.hxx
+hedabu: ..\inc\pntobj3d.hxx %_DEST%\inc%_EXT%\svx\pntobj3d.hxx
+hedabu: ..\inc\point3d.hxx %_DEST%\inc%_EXT%\svx\point3d.hxx
+hedabu: ..\inc\poly3d.hxx %_DEST%\inc%_EXT%\svx\poly3d.hxx
+hedabu: ..\inc\polyob3d.hxx %_DEST%\inc%_EXT%\svx\polyob3d.hxx
+hedabu: ..\inc\polysc3d.hxx %_DEST%\inc%_EXT%\svx\polysc3d.hxx
+hedabu: ..\inc\postattr.hxx %_DEST%\inc%_EXT%\svx\postattr.hxx
+hedabu: ..\inc\postdlg.hxx %_DEST%\inc%_EXT%\svx\postdlg.hxx
+hedabu: ..\inc\postitem.hxx %_DEST%\inc%_EXT%\svx\postitem.hxx
+hedabu: ..\inc\prntitem.hxx %_DEST%\inc%_EXT%\svx\prntitem.hxx
+hedabu: ..\inc\protitem.hxx %_DEST%\inc%_EXT%\svx\protitem.hxx
+hedabu: ..\inc\prszitem.hxx %_DEST%\inc%_EXT%\svx\prszitem.hxx
+hedabu: ..\inc\pszctrl.hxx %_DEST%\inc%_EXT%\svx\pszctrl.hxx
+hedabu: ..\inc\rectenum.hxx %_DEST%\inc%_EXT%\svx\rectenum.hxx
+hedabu: ..\inc\relfld.hxx %_DEST%\inc%_EXT%\svx\relfld.hxx
+hedabu: ..\inc\rotmodit.hxx %_DEST%\inc%_EXT%\svx\rotmodit.hxx
+hedabu: ..\inc\ruler.hxx %_DEST%\inc%_EXT%\svx\ruler.hxx
+hedabu: ..\inc\rulritem.hxx %_DEST%\inc%_EXT%\svx\rulritem.hxx
+hedabu: ..\inc\scene3d.hxx %_DEST%\inc%_EXT%\svx\scene3d.hxx
+hedabu: ..\inc\sdangitm.hxx %_DEST%\inc%_EXT%\svx\sdangitm.hxx
+hedabu: ..\inc\sderitm.hxx %_DEST%\inc%_EXT%\svx\sderitm.hxx
+hedabu: ..\inc\sdgcoitm.hxx %_DEST%\inc%_EXT%\svx\sdgcoitm.hxx
+hedabu: ..\inc\sdgrsitm.hxx %_DEST%\inc%_EXT%\svx\sdgrsitm.hxx
+hedabu: ..\inc\sdgluitm.hxx %_DEST%\inc%_EXT%\svx\sdgluitm.hxx
+hedabu: ..\inc\sdginitm.hxx %_DEST%\inc%_EXT%\svx\sdginitm.hxx
+hedabu: ..\inc\sdggaitm.hxx %_DEST%\inc%_EXT%\svx\sdggaitm.hxx
+hedabu: ..\inc\sdgmoitm.hxx %_DEST%\inc%_EXT%\svx\sdgmoitm.hxx
+hedabu: ..\inc\sdgtritm.hxx %_DEST%\inc%_EXT%\svx\sdgtritm.hxx
+hedabu: ..\inc\sdmetitm.hxx %_DEST%\inc%_EXT%\svx\sdmetitm.hxx
+hedabu: ..\inc\sdmsitm.hxx %_DEST%\inc%_EXT%\svx\sdmsitm.hxx
+hedabu: ..\inc\sdolsitm.hxx %_DEST%\inc%_EXT%\svx\sdolsitm.hxx
+hedabu: ..\inc\sdooitm.hxx %_DEST%\inc%_EXT%\svx\sdooitm.hxx
+hedabu: ..\inc\sdprcitm.hxx %_DEST%\inc%_EXT%\svx\sdprcitm.hxx
+hedabu: ..\inc\sdshcitm.hxx %_DEST%\inc%_EXT%\svx\sdshcitm.hxx
+hedabu: ..\inc\sdshitm.hxx %_DEST%\inc%_EXT%\svx\sdshitm.hxx
+hedabu: ..\inc\sdshsitm.hxx %_DEST%\inc%_EXT%\svx\sdshsitm.hxx
+hedabu: ..\inc\sdshtitm.hxx %_DEST%\inc%_EXT%\svx\sdshtitm.hxx
+hedabu: ..\inc\sdsxyitm.hxx %_DEST%\inc%_EXT%\svx\sdsxyitm.hxx
+hedabu: ..\inc\sdtaaitm.hxx %_DEST%\inc%_EXT%\svx\sdtaaitm.hxx
+hedabu: ..\inc\sdtacitm.hxx %_DEST%\inc%_EXT%\svx\sdtacitm.hxx
+hedabu: ..\inc\sdtaditm.hxx %_DEST%\inc%_EXT%\svx\sdtaditm.hxx
+hedabu: ..\inc\sdtagitm.hxx %_DEST%\inc%_EXT%\svx\sdtagitm.hxx
+hedabu: ..\inc\sdtaiitm.hxx %_DEST%\inc%_EXT%\svx\sdtaiitm.hxx
+hedabu: ..\inc\sdtaitm.hxx %_DEST%\inc%_EXT%\svx\sdtaitm.hxx
+hedabu: ..\inc\sdtakitm.hxx %_DEST%\inc%_EXT%\svx\sdtakitm.hxx
+hedabu: ..\inc\sdtayitm.hxx %_DEST%\inc%_EXT%\svx\sdtayitm.hxx
+hedabu: ..\inc\sdtcfitm.hxx %_DEST%\inc%_EXT%\svx\sdtcfitm.hxx
+hedabu: ..\inc\sdtditm.hxx %_DEST%\inc%_EXT%\svx\sdtditm.hxx
+hedabu: ..\inc\sdtfsitm.hxx %_DEST%\inc%_EXT%\svx\sdtfsitm.hxx
+hedabu: ..\inc\sdtmfitm.hxx %_DEST%\inc%_EXT%\svx\sdtmfitm.hxx
+hedabu: ..\inc\sdynitm.hxx %_DEST%\inc%_EXT%\svx\sdynitm.hxx
+hedabu: ..\inc\selctrl.hxx %_DEST%\inc%_EXT%\svx\selctrl.hxx
+hedabu: ..\inc\shaditem.hxx %_DEST%\inc%_EXT%\svx\shaditem.hxx
+hedabu: ..\inc\shdditem.hxx %_DEST%\inc%_EXT%\svx\shdditem.hxx
+hedabu: ..\inc\sizeitem.hxx %_DEST%\inc%_EXT%\svx\sizeitem.hxx
+hedabu: ..\inc\sphere3d.hxx %_DEST%\inc%_EXT%\svx\sphere3d.hxx
+hedabu: ..\inc\spldlg.hxx %_DEST%\inc%_EXT%\svx\spldlg.hxx
+hedabu: ..\inc\spltitem.hxx %_DEST%\inc%_EXT%\svx\spltitem.hxx
+hedabu: ..\inc\splwrap.hxx %_DEST%\inc%_EXT%\svx\splwrap.hxx
+hedabu: ..\inc\srchdlg.hxx %_DEST%\inc%_EXT%\svx\srchdlg.hxx
+hedabu: ..\inc\srchitem.hxx %_DEST%\inc%_EXT%\svx\srchitem.hxx
+hedabu: ..\inc\stddlg.hxx %_DEST%\inc%_EXT%\svx\stddlg.hxx
+hedabu: ..\inc\strarray.hxx %_DEST%\inc%_EXT%\svx\strarray.hxx
+hedabu: ..\inc\svdattr.hxx %_DEST%\inc%_EXT%\svx\svdattr.hxx
+hedabu: ..\inc\svdattrx.hxx %_DEST%\inc%_EXT%\svx\svdattrx.hxx
+hedabu: ..\inc\svdattrx.hxx %_DEST%\inc%_EXT%\svx\svdattrx.hxx
+hedabu: ..\inc\svdcrtv.hxx %_DEST%\inc%_EXT%\svx\svdcrtv.hxx
+hedabu: ..\inc\svddrag.hxx %_DEST%\inc%_EXT%\svx\svddrag.hxx
+hedabu: ..\inc\svddrgmt.hxx %_DEST%\inc%_EXT%\svx\svddrgmt.hxx
+hedabu: ..\inc\svddrgv.hxx %_DEST%\inc%_EXT%\svx\svddrgv.hxx
+hedabu: ..\inc\svdedtv.hxx %_DEST%\inc%_EXT%\svx\svdedtv.hxx
+hedabu: ..\inc\svdedxv.hxx %_DEST%\inc%_EXT%\svx\svdedxv.hxx
+hedabu: ..\inc\svdetc.hxx %_DEST%\inc%_EXT%\svx\svdetc.hxx
+hedabu: ..\inc\svdglev.hxx %_DEST%\inc%_EXT%\svx\svdglev.hxx
+hedabu: ..\inc\svdglue.hxx %_DEST%\inc%_EXT%\svx\svdglue.hxx
+hedabu: ..\inc\svdhdl.hxx %_DEST%\inc%_EXT%\svx\svdhdl.hxx
+hedabu: ..\inc\svdhlpln.hxx %_DEST%\inc%_EXT%\svx\svdhlpln.hxx
+hedabu: ..\inc\svdio.hxx %_DEST%\inc%_EXT%\svx\svdio.hxx
+hedabu: ..\inc\svditer.hxx %_DEST%\inc%_EXT%\svx\svditer.hxx
+hedabu: ..\inc\svdmark.hxx %_DEST%\inc%_EXT%\svx\svdmark.hxx
+hedabu: ..\inc\svdmodel.hxx %_DEST%\inc%_EXT%\svx\svdmodel.hxx
+hedabu: ..\inc\svdmrkv.hxx %_DEST%\inc%_EXT%\svx\svdmrkv.hxx
+hedabu: ..\inc\svdoattr.hxx %_DEST%\inc%_EXT%\svx\svdoattr.hxx
+hedabu: ..\inc\svdobj.hxx %_DEST%\inc%_EXT%\svx\svdobj.hxx
+hedabu: ..\inc\svdocapt.hxx %_DEST%\inc%_EXT%\svx\svdocapt.hxx
+hedabu: ..\inc\svdocirc.hxx %_DEST%\inc%_EXT%\svx\svdocirc.hxx
+hedabu: ..\inc\svdoedge.hxx %_DEST%\inc%_EXT%\svx\svdoedge.hxx
+hedabu: ..\inc\svdograf.hxx %_DEST%\inc%_EXT%\svx\svdograf.hxx
+hedabu: ..\inc\svdogrp.hxx %_DEST%\inc%_EXT%\svx\svdogrp.hxx
+hedabu: ..\inc\svdomeas.hxx %_DEST%\inc%_EXT%\svx\svdomeas.hxx
+hedabu: ..\inc\svdoole2.hxx %_DEST%\inc%_EXT%\svx\svdoole2.hxx
+hedabu: ..\inc\svdopage.hxx %_DEST%\inc%_EXT%\svx\svdopage.hxx
+hedabu: ..\inc\svdopath.hxx %_DEST%\inc%_EXT%\svx\svdopath.hxx
+hedabu: ..\inc\svdopoly.hxx %_DEST%\inc%_EXT%\svx\svdopoly.hxx
+hedabu: ..\inc\svdorect.hxx %_DEST%\inc%_EXT%\svx\svdorect.hxx
+hedabu: ..\inc\svdosmev.hxx %_DEST%\inc%_EXT%\svx\svdosmev.hxx
+hedabu: ..\inc\svdosmrt.hxx %_DEST%\inc%_EXT%\svx\svdosmrt.hxx
+hedabu: ..\inc\svdotext.hxx %_DEST%\inc%_EXT%\svx\svdotext.hxx
+hedabu: ..\inc\svdoukwn.hxx %_DEST%\inc%_EXT%\svx\svdoukwn.hxx
+hedabu: ..\inc\svdovirt.hxx %_DEST%\inc%_EXT%\svx\svdovirt.hxx
+hedabu: ..\inc\svdpage.hxx %_DEST%\inc%_EXT%\svx\svdpage.hxx
+hedabu: ..\inc\svdpagv.hxx %_DEST%\inc%_EXT%\svx\svdpagv.hxx
+hedabu: ..\inc\svdpntv.hxx %_DEST%\inc%_EXT%\svx\svdpntv.hxx
+hedabu: ..\inc\svdpoev.hxx %_DEST%\inc%_EXT%\svx\svdpoev.hxx
+hedabu: ..\inc\svdpool.hxx %_DEST%\inc%_EXT%\svx\svdpool.hxx
+hedabu: ..\inc\svdsnpv.hxx %_DEST%\inc%_EXT%\svx\svdsnpv.hxx
+hedabu: ..\inc\svdsuro.hxx %_DEST%\inc%_EXT%\svx\svdsuro.hxx
+hedabu: ..\inc\svdtouch.hxx %_DEST%\inc%_EXT%\svx\svdtouch.hxx
+hedabu: ..\inc\svdtrans.hxx %_DEST%\inc%_EXT%\svx\svdtrans.hxx
+hedabu: ..\inc\svdundo.hxx %_DEST%\inc%_EXT%\svx\svdundo.hxx
+hedabu: ..\inc\svdoutl.hxx %_DEST%\inc%_EXT%\svx\svdoutl.hxx
+hedabu: ..\inc\svdview.hxx %_DEST%\inc%_EXT%\svx\svdview.hxx
+hedabu: ..\inc\svdvmark.hxx %_DEST%\inc%_EXT%\svx\svdvmark.hxx
+hedabu: ..\inc\svdxcgv.hxx %_DEST%\inc%_EXT%\svx\svdxcgv.hxx
+hedabu: ..\inc\svimbase.hxx %_DEST%\inc%_EXT%\svx\svimbase.hxx
+hedabu: ..\inc\svxbox.hxx %_DEST%\inc%_EXT%\svx\svxbox.hxx
+hedabu: ..\inc\svxerr.hxx %_DEST%\inc%_EXT%\svx\svxerr.hxx
+hedabu: ..\inc\svxfont.hxx %_DEST%\inc%_EXT%\svx\svxfont.hxx
+hedabu: ..\inc\svxenum.hxx %_DEST%\inc%_EXT%\svx\svxenum.hxx
+hedabu: ..\inc\svxids.hrc %_DEST%\inc%_EXT%\svx\svxids.hrc
+hedabu: ..\inc\svxrtf.hxx %_DEST%\inc%_EXT%\svx\svxrtf.hxx
+hedabu: ..\inc\sxallitm.hxx %_DEST%\inc%_EXT%\svx\sxallitm.hxx
+hedabu: ..\inc\sxcaitm.hxx %_DEST%\inc%_EXT%\svx\sxcaitm.hxx
+hedabu: ..\inc\sxcecitm.hxx %_DEST%\inc%_EXT%\svx\sxcecitm.hxx
+hedabu: ..\inc\sxcgitm.hxx %_DEST%\inc%_EXT%\svx\sxcgitm.hxx
+hedabu: ..\inc\sxciaitm.hxx %_DEST%\inc%_EXT%\svx\sxciaitm.hxx
+hedabu: ..\inc\sxcikitm.hxx %_DEST%\inc%_EXT%\svx\sxcikitm.hxx
+hedabu: ..\inc\sxcisitm.hxx %_DEST%\inc%_EXT%\svx\sxcisitm.hxx
+hedabu: ..\inc\sxcllitm.hxx %_DEST%\inc%_EXT%\svx\sxcllitm.hxx
+hedabu: ..\inc\sxcsitm.hxx %_DEST%\inc%_EXT%\svx\sxcsitm.hxx
+hedabu: ..\inc\sxctitm.hxx %_DEST%\inc%_EXT%\svx\sxctitm.hxx
+hedabu: ..\inc\sxekitm.hxx %_DEST%\inc%_EXT%\svx\sxekitm.hxx
+hedabu: ..\inc\sxelditm.hxx %_DEST%\inc%_EXT%\svx\sxelditm.hxx
+hedabu: ..\inc\sxenditm.hxx %_DEST%\inc%_EXT%\svx\sxenditm.hxx
+hedabu: ..\inc\sxesitm.hxx %_DEST%\inc%_EXT%\svx\sxesitm.hxx
+hedabu: ..\inc\sxfiitm.hxx %_DEST%\inc%_EXT%\svx\sxfiitm.hxx
+hedabu: ..\inc\sxlayitm.hxx %_DEST%\inc%_EXT%\svx\sxlayitm.hxx
+hedabu: ..\inc\sxlogitm.hxx %_DEST%\inc%_EXT%\svx\sxlogitm.hxx
+hedabu: ..\inc\sxmbritm.hxx %_DEST%\inc%_EXT%\svx\sxmbritm.hxx
+hedabu: ..\inc\sxmfsitm.hxx %_DEST%\inc%_EXT%\svx\sxmfsitm.hxx
+hedabu: ..\inc\sxmkitm.hxx %_DEST%\inc%_EXT%\svx\sxmkitm.hxx
+hedabu: ..\inc\sxmlhitm.hxx %_DEST%\inc%_EXT%\svx\sxmlhitm.hxx
+hedabu: ..\inc\sxmoitm.hxx %_DEST%\inc%_EXT%\svx\sxmoitm.hxx
+hedabu: ..\inc\sxmovitm.hxx %_DEST%\inc%_EXT%\svx\sxmovitm.hxx
+hedabu: ..\inc\sxmseitm.hxx %_DEST%\inc%_EXT%\svx\sxmseitm.hxx
+hedabu: ..\inc\sxmsitm.hxx %_DEST%\inc%_EXT%\svx\sxmsitm.hxx
+hedabu: ..\inc\sxmspitm.hxx %_DEST%\inc%_EXT%\svx\sxmspitm.hxx
+hedabu: ..\inc\sxmsuitm.hxx %_DEST%\inc%_EXT%\svx\sxmsuitm.hxx
+hedabu: ..\inc\sxmtaitm.hxx %_DEST%\inc%_EXT%\svx\sxmtaitm.hxx
+hedabu: ..\inc\sxmtfitm.hxx %_DEST%\inc%_EXT%\svx\sxmtfitm.hxx
+hedabu: ..\inc\sxmtpitm.hxx %_DEST%\inc%_EXT%\svx\sxmtpitm.hxx
+hedabu: ..\inc\sxmtritm.hxx %_DEST%\inc%_EXT%\svx\sxmtritm.hxx
+hedabu: ..\inc\sxmuitm.hxx %_DEST%\inc%_EXT%\svx\sxmuitm.hxx
+hedabu: ..\inc\sxoneitm.hxx %_DEST%\inc%_EXT%\svx\sxoneitm.hxx
+hedabu: ..\inc\sxonitm.hxx %_DEST%\inc%_EXT%\svx\sxonitm.hxx
+hedabu: ..\inc\sxopitm.hxx %_DEST%\inc%_EXT%\svx\sxopitm.hxx
+hedabu: ..\inc\sxraitm.hxx %_DEST%\inc%_EXT%\svx\sxraitm.hxx
+hedabu: ..\inc\sxreaitm.hxx %_DEST%\inc%_EXT%\svx\sxreaitm.hxx
+hedabu: ..\inc\sxreoitm.hxx %_DEST%\inc%_EXT%\svx\sxreoitm.hxx
+hedabu: ..\inc\sxroaitm.hxx %_DEST%\inc%_EXT%\svx\sxroaitm.hxx
+hedabu: ..\inc\sxrooitm.hxx %_DEST%\inc%_EXT%\svx\sxrooitm.hxx
+hedabu: ..\inc\sxsaitm.hxx %_DEST%\inc%_EXT%\svx\sxsaitm.hxx
+hedabu: ..\inc\sxsalitm.hxx %_DEST%\inc%_EXT%\svx\sxsalitm.hxx
+hedabu: ..\inc\sxsiitm.hxx %_DEST%\inc%_EXT%\svx\sxsiitm.hxx
+hedabu: ..\inc\sxsoitm.hxx %_DEST%\inc%_EXT%\svx\sxsoitm.hxx
+hedabu: ..\inc\sxtraitm.hxx %_DEST%\inc%_EXT%\svx\sxtraitm.hxx
+hedabu: ..\inc\tabarea.hxx %_DEST%\inc%_EXT%\svx\tabarea.hxx
+hedabu: ..\inc\tabline.hxx %_DEST%\inc%_EXT%\svx\tabline.hxx
+hedabu: ..\inc\tabstpge.hxx %_DEST%\inc%_EXT%\svx\tabstpge.hxx
+hedabu: ..\inc\tbcontrl.hxx %_DEST%\inc%_EXT%\svx\tbcontrl.hxx
+hedabu: ..\inc\tbxalign.hxx %_DEST%\inc%_EXT%\svx\tbxalign.hxx
+hedabu: ..\inc\tbxctl.hxx %_DEST%\inc%_EXT%\svx\tbxctl.hxx
+hedabu: ..\inc\tbxdraw.hxx %_DEST%\inc%_EXT%\svx\tbxdraw.hxx
+hedabu: ..\inc\textanim.hxx %_DEST%\inc%_EXT%\svx\textanim.hxx
+hedabu: ..\inc\textattr.hxx %_DEST%\inc%_EXT%\svx\textattr.hxx
+hedabu: ..\inc\thesdlg.hxx %_DEST%\inc%_EXT%\svx\thesdlg.hxx
+hedabu: ..\inc\tp3dattr.hxx %_DEST%\inc%_EXT%\svx\tp3dattr.hxx
+hedabu: ..\inc\transfrm.hxx %_DEST%\inc%_EXT%\svx\transfrm.hxx
+hedabu: ..\inc\tstpitem.hxx %_DEST%\inc%_EXT%\svx\tstpitem.hxx
+hedabu: ..\inc\udlnitem.hxx %_DEST%\inc%_EXT%\svx\udlnitem.hxx
+hedabu: ..\inc\ulspitem.hxx %_DEST%\inc%_EXT%\svx\ulspitem.hxx
+hedabu: ..\inc\unolingu.hxx %_DEST%\inc%_EXT%\svx\unolingu.hxx
+hedabu: ..\inc\unomid.hxx %_DEST%\inc%_EXT%\svx\unomid.hxx
+hedabu: ..\inc\unopage.hxx %_DEST%\inc%_EXT%\svx\unopage.hxx
+hedabu: ..\inc\unoprnms.hxx %_DEST%\inc%_EXT%\svx\unoprnms.hxx
+hedabu: ..\inc\unoshape.hxx %_DEST%\inc%_EXT%\svx\unoshape.hxx
+hedabu: ..\inc\unoshcol.hxx %_DEST%\inc%_EXT%\svx\unoshcol.hxx
+hedabu: ..\inc\unoipset.hxx %_DEST%\inc%_EXT%\svx\unoipset.hxx
+hedabu: ..\inc\unoprov.hxx %_DEST%\inc%_EXT%\svx\unoprov.hxx
+hedabu: ..\inc\unomod.hxx %_DEST%\inc%_EXT%\svx\unomod.hxx
+hedabu: ..\inc\fmdpage.hxx %_DEST%\inc%_EXT%\svx\fmdpage.hxx
+hedabu: ..\inc\fmsearch.hxx %_DEST%\inc%_EXT%\svx\fmsearch.hxx
+hedabu: ..\inc\vcattr.hxx %_DEST%\inc%_EXT%\svx\vcattr.hxx
+hedabu: ..\inc\vcbrwwrp.hxx %_DEST%\inc%_EXT%\svx\vcbrwwrp.hxx
+hedabu: ..\inc\vcsbxdef.hxx %_DEST%\inc%_EXT%\svx\vcsbxdef.hxx
+hedabu: ..\inc\vector3d.hxx %_DEST%\inc%_EXT%\svx\vector3d.hxx
+hedabu: ..\inc\view3d.hxx %_DEST%\inc%_EXT%\svx\view3d.hxx
+hedabu: ..\inc\viewpt3d.hxx %_DEST%\inc%_EXT%\svx\viewpt3d.hxx
+hedabu: ..\inc\viewpt3d.hxx %_DEST%\inc%_EXT%\svx\viewpt3d.hxx
+hedabu: ..\inc\volmrk3d.hxx %_DEST%\inc%_EXT%\svx\volmrk3d.hxx
+hedabu: ..\inc\wghtitem.hxx %_DEST%\inc%_EXT%\svx\wghtitem.hxx
+hedabu: ..\inc\widwitem.hxx %_DEST%\inc%_EXT%\svx\widwitem.hxx
+hedabu: ..\inc\worient.hxx %_DEST%\inc%_EXT%\svx\worient.hxx
+hedabu: ..\inc\wrlmitem.hxx %_DEST%\inc%_EXT%\svx\wrlmitem.hxx
+hedabu: ..\inc\xbitmap.hxx %_DEST%\inc%_EXT%\svx\xbitmap.hxx
+hedabu: ..\inc\xbtmpit.hxx %_DEST%\inc%_EXT%\svx\xbtmpit.hxx
+hedabu: ..\inc\xcolit.hxx %_DEST%\inc%_EXT%\svx\xcolit.hxx
+hedabu: ..\inc\xcolit.hxx %_DEST%\inc%_EXT%\svx\xcolit.hxx
+hedabu: ..\inc\xdef.hxx %_DEST%\inc%_EXT%\svx\xdef.hxx
+hedabu: ..\inc\xdash.hxx %_DEST%\inc%_EXT%\svx\xdash.hxx
+hedabu: ..\inc\xfillit.hxx %_DEST%\inc%_EXT%\svx\xfillit.hxx
+hedabu: ..\inc\xfillit.hxx %_DEST%\inc%_EXT%\svx\xfillit.hxx
+hedabu: ..\inc\xfillit0.hxx %_DEST%\inc%_EXT%\svx\xfillit0.hxx
+hedabu: ..\inc\xfillit0.hxx %_DEST%\inc%_EXT%\svx\xfillit0.hxx
+hedabu: ..\inc\xflasit.hxx %_DEST%\inc%_EXT%\svx\xflasit.hxx
+hedabu: ..\inc\xflbckit.hxx %_DEST%\inc%_EXT%\svx\xflbckit.hxx
+hedabu: ..\inc\xflbmpit.hxx %_DEST%\inc%_EXT%\svx\xflbmpit.hxx
+hedabu: ..\inc\xflbmsli.hxx %_DEST%\inc%_EXT%\svx\xflbmsli.hxx
+hedabu: ..\inc\xflbmsxy.hxx %_DEST%\inc%_EXT%\svx\xflbmsxy.hxx
+hedabu: ..\inc\xflbmtit.hxx %_DEST%\inc%_EXT%\svx\xflbmtit.hxx
+hedabu: ..\inc\xflboxy.hxx %_DEST%\inc%_EXT%\svx\xflboxy.hxx
+hedabu: ..\inc\xflbstit.hxx %_DEST%\inc%_EXT%\svx\xflbstit.hxx
+hedabu: ..\inc\xflbtoxy.hxx %_DEST%\inc%_EXT%\svx\xflbtoxy.hxx
+hedabu: ..\inc\xflclit.hxx %_DEST%\inc%_EXT%\svx\xflclit.hxx
+hedabu: ..\inc\xflgrit.hxx %_DEST%\inc%_EXT%\svx\xflgrit.hxx
+hedabu: ..\inc\xflftrit.hxx %_DEST%\inc%_EXT%\svx\xflftrit.hxx
+hedabu: ..\inc\xflhtit.hxx %_DEST%\inc%_EXT%\svx\xflhtit.hxx
+hedabu: ..\inc\xflshtit.hxx %_DEST%\inc%_EXT%\svx\xflshtit.hxx
+hedabu: ..\inc\xfltrit.hxx %_DEST%\inc%_EXT%\svx\xfltrit.hxx
+hedabu: ..\inc\xftadit.hxx %_DEST%\inc%_EXT%\svx\xftadit.hxx
+hedabu: ..\inc\xftdiit.hxx %_DEST%\inc%_EXT%\svx\xftdiit.hxx
+hedabu: ..\inc\xftmrit.hxx %_DEST%\inc%_EXT%\svx\xftmrit.hxx
+hedabu: ..\inc\xftouit.hxx %_DEST%\inc%_EXT%\svx\xftouit.hxx
+hedabu: ..\inc\xftsfit.hxx %_DEST%\inc%_EXT%\svx\xftsfit.hxx
+hedabu: ..\inc\xftshcit.hxx %_DEST%\inc%_EXT%\svx\xftshcit.hxx
+hedabu: ..\inc\xftshit.hxx %_DEST%\inc%_EXT%\svx\xftshit.hxx
+hedabu: ..\inc\xftshtit.hxx %_DEST%\inc%_EXT%\svx\xftshtit.hxx
+hedabu: ..\inc\xftshxy.hxx %_DEST%\inc%_EXT%\svx\xftshxy.hxx
+hedabu: ..\inc\xftstit.hxx %_DEST%\inc%_EXT%\svx\xftstit.hxx
+hedabu: ..\inc\xgrad.hxx %_DEST%\inc%_EXT%\svx\xgrad.hxx
+hedabu: ..\inc\xgrscit.hxx %_DEST%\inc%_EXT%\svx\xgrscit.hxx
+hedabu: ..\inc\xhatch.hxx %_DEST%\inc%_EXT%\svx\xhatch.hxx
+hedabu: ..\inc\xhatch.hxx %_DEST%\inc%_EXT%\svx\xhatch.hxx
+hedabu: ..\inc\xit.hxx %_DEST%\inc%_EXT%\svx\xit.hxx
+hedabu: ..\inc\xit.hxx %_DEST%\inc%_EXT%\svx\xit.hxx
+hedabu: ..\inc\xlineit.hxx %_DEST%\inc%_EXT%\svx\xlineit.hxx
+hedabu: ..\inc\xlineit.hxx %_DEST%\inc%_EXT%\xlineit.hxx
+hedabu: ..\inc\xlineit0.hxx %_DEST%\inc%_EXT%\svx\xlineit0.hxx
+hedabu: ..\inc\xlineit0.hxx %_DEST%\inc%_EXT%\xlineit0.hxx
+hedabu: ..\inc\xlinjoit.hxx %_DEST%\inc%_EXT%\xlinjoit.hxx
+hedabu: ..\inc\xlnasit.hxx %_DEST%\inc%_EXT%\svx\xlnasit.hxx
+hedabu: ..\inc\xlnclit.hxx %_DEST%\inc%_EXT%\svx\xlnclit.hxx
+hedabu: ..\inc\xlndsit.hxx %_DEST%\inc%_EXT%\svx\xlndsit.hxx
+hedabu: ..\inc\xlnedcit.hxx %_DEST%\inc%_EXT%\svx\xlnedcit.hxx
+hedabu: ..\inc\xlnedit.hxx %_DEST%\inc%_EXT%\svx\xlnedit.hxx
+hedabu: ..\inc\xlnedwit.hxx %_DEST%\inc%_EXT%\svx\xlnedwit.hxx
+hedabu: ..\inc\xlnstcit.hxx %_DEST%\inc%_EXT%\svx\xlnstcit.hxx
+hedabu: ..\inc\xlnstit.hxx %_DEST%\inc%_EXT%\svx\xlnstit.hxx
+hedabu: ..\inc\xlnstwit.hxx %_DEST%\inc%_EXT%\svx\xlnstwit.hxx
+hedabu: ..\inc\xlntrit.hxx %_DEST%\inc%_EXT%\svx\xlntrit.hxx
+hedabu: ..\inc\xlnwtit.hxx %_DEST%\inc%_EXT%\svx\xlnwtit.hxx
+hedabu: ..\inc\xoutbmp.hxx %_DEST%\inc%_EXT%\svx\xoutbmp.hxx
+hedabu: ..\inc\xoutx.hxx %_DEST%\inc%_EXT%\svx\xoutx.hxx
+hedabu: ..\inc\xoutx.hxx %_DEST%\inc%_EXT%\svx\xoutx.hxx
+hedabu: ..\inc\xpoly.hxx %_DEST%\inc%_EXT%\svx\xpoly.hxx
+hedabu: ..\inc\xpoly.hxx %_DEST%\inc%_EXT%\svx\xpoly.hxx
+hedabu: ..\inc\xpool.hxx %_DEST%\inc%_EXT%\svx\xpool.hxx
+hedabu: ..\inc\xpool.hxx %_DEST%\inc%_EXT%\xpool.hxx
+hedabu: ..\inc\xsetit.hxx %_DEST%\inc%_EXT%\svx\xsetit.hxx
+hedabu: ..\inc\xsetit.hxx %_DEST%\inc%_EXT%\xsetit.hxx
+hedabu: ..\inc\xtable.hxx %_DEST%\inc%_EXT%\svx\xtable.hxx
+hedabu: ..\inc\xtable.hxx %_DEST%\inc%_EXT%\xtable.hxx
+hedabu: ..\inc\xtextit.hxx %_DEST%\inc%_EXT%\svx\xtextit.hxx
+hedabu: ..\inc\xtextit.hxx %_DEST%\inc%_EXT%\xtextit.hxx
+hedabu: ..\inc\xtextit0.hxx %_DEST%\inc%_EXT%\svx\xtextit0.hxx
+hedabu: ..\inc\xtextit0.hxx %_DEST%\inc%_EXT%\xtextit0.hxx
+hedabu: ..\inc\xtxasit.hxx %_DEST%\inc%_EXT%\svx\xtxasit.hxx
+hedabu: ..\inc\xexch.hxx %_DEST%\inc%_EXT%\svx\xexch.hxx
+hedabu: ..\inc\zoom.hxx %_DEST%\inc%_EXT%\svx\zoom.hxx
+hedabu: ..\inc\zoomctrl.hxx %_DEST%\inc%_EXT%\svx\zoomctrl.hxx
+hedabu: ..\inc\zoomitem.hxx %_DEST%\inc%_EXT%\svx\zoomitem.hxx
+hedabu: ..\source\items\boxobj.hxx %_DEST%\inc%_EXT%\svx\boxobj.hxx
+hedabu: ..\inc\itemtype.hxx %_DEST%\inc%_EXT%\svx\itemtype.hxx
+hedabu: ..\inc\outliner.hxx %_DEST%\inc%_EXT%\svx\outliner.hxx
+hedabu: ..\inc\outlobj.hxx %_DEST%\inc%_EXT%\svx\outlobj.hxx
+hedabu: ..\inc\editdata.hxx %_DEST%\inc%_EXT%\svx\editdata.hxx
+hedabu: ..\inc\editeng.hxx %_DEST%\inc%_EXT%\svx\editeng.hxx
+hedabu: ..\inc\editobj.hxx %_DEST%\inc%_EXT%\svx\editobj.hxx
+hedabu: ..\inc\editstat.hxx %_DEST%\inc%_EXT%\svx\editstat.hxx
+hedabu: ..\inc\editund2.hxx %_DEST%\inc%_EXT%\svx\editund2.hxx
+hedabu: ..\inc\editview.hxx %_DEST%\inc%_EXT%\svx\editview.hxx
+hedabu: ..\inc\eeitem.hxx %_DEST%\inc%_EXT%\svx\eeitem.hxx
+hedabu: ..\inc\eeitemid.hxx %_DEST%\inc%_EXT%\svx\eeitemid.hxx
+hedabu: ..\inc\eerdll.hxx %_DEST%\inc%_EXT%\svx\editdll.hxx
+hedabu: ..\inc\svxacorr.hxx %_DEST%\inc%_EXT%\svx\svxacorr.hxx
+hedabu: ..\inc\swafopt.hxx %_DEST%\inc%_EXT%\svx\swafopt.hxx
+hedabu: ..\inc\textconv.hxx %_DEST%\inc%_EXT%\svx\textconv.hxx
+hedabu: ..\inc\txtrange.hxx %_DEST%\inc%_EXT%\svx\txtrange.hxx
+hedabu: ..\inc\fmmodel.hxx %_DEST%\inc%_EXT%\svx\fmmodel.hxx
+hedabu: ..\inc\fmpage.hxx %_DEST%\inc%_EXT%\svx\fmpage.hxx
+hedabu: ..\inc\fmview.hxx %_DEST%\inc%_EXT%\svx\fmview.hxx
+hedabu: ..\inc\fmobjfac.hxx %_DEST%\inc%_EXT%\svx\fmobjfac.hxx
+hedabu: ..\inc\fmglob.hxx %_DEST%\inc%_EXT%\svx\fmglob.hxx
+hedabu: ..\inc\fmshell.hxx %_DEST%\inc%_EXT%\svx\fmshell.hxx
+hedabu: ..\source\inc\fmstream.hxx %_DEST%\inc%_EXT%\svx\fmstream.hxx
+hedabu: ..\inc\tbxform.hxx %_DEST%\inc%_EXT%\svx\tbxform.hxx
+hedabu: ..\inc\dbexch.hrc %_DEST%\inc%_EXT%\svx\dbexch.hrc
+hedabu: ..\inc\dbmsgbox.hrc %_DEST%\inc%_EXT%\svx\dbmsgbox.hrc
+hedabu: ..\inc\dbmsgbox.hxx %_DEST%\inc%_EXT%\svx\dbmsgbox.hxx
+hedabu: ..\inc\bulitem.hxx %_DEST%\inc%_EXT%\svx\bulitem.hxx
+hedabu: ..\inc\svdouno.hxx %_DEST%\inc%_EXT%\svx\svdouno.hxx
+hedabu: ..\inc\deflt3d.hxx %_DEST%\inc%_EXT%\svx\deflt3d.hxx
+hedabu: ..\inc\unotext.hxx %_DEST%\inc%_EXT%\svx\unotext.hxx
+hedabu: ..\inc\unoedsrc.hxx %_DEST%\inc%_EXT%\svx\unoedsrc.hxx
+hedabu: ..\inc\unofored.hxx %_DEST%\inc%_EXT%\svx\unofored.hxx
+hedabu: ..\inc\unoforou.hxx %_DEST%\inc%_EXT%\svx\unoforou.hxx
+hedabu: ..\inc\e3dundo.hxx %_DEST%\inc%_EXT%\svx\e3dundo.hxx
+hedabu: ..\inc\anchorid.hxx %_DEST%\inc%_EXT%\svx\anchorid.hxx
+hedabu: ..\inc\msdffimp.hxx %_DEST%\inc%_EXT%\svx\msdffimp.hxx
+hedabu: ..\inc\msdffdef.hxx %_DEST%\inc%_EXT%\svx\msdffdef.hxx
+hedabu: ..\inc\unoshtxt.hxx %_DEST%\inc%_EXT%\svx\unoshtxt.hxx
+hedabu: ..\inc\numitem.hxx %_DEST%\inc%_EXT%\svx\numitem.hxx
+hedabu: ..\inc\numpages.hxx %_DEST%\inc%_EXT%\svx\numpages.hxx
+hedabu: ..\inc\numdef.hxx %_DEST%\inc%_EXT%\svx\numdef.hxx
+hedabu: ..\inc\numvset.hxx %_DEST%\inc%_EXT%\svx\numvset.hxx
+hedabu: ..\inc\dbbrowse.hxx %_DEST%\inc%_EXT%\svx\dbbrowse.hxx
+hedabu: ..\inc\fmdmod.hxx %_DEST%\inc%_EXT%\svx\fmdmod.hxx
+hedabu: ..\inc\fmgridcl.hxx %_DEST%\inc%_EXT%\svx\fmgridcl.hxx
+hedabu: ..\inc\fmgridif.hxx %_DEST%\inc%_EXT%\svx\fmgridif.hxx
+hedabu: ..\inc\gridctrl.hxx %_DEST%\inc%_EXT%\svx\gridctrl.hxx
+hedabu: ..\inc\qryparam.hxx %_DEST%\inc%_EXT%\svx\qryparam.hxx
+hedabu: ..\inc\pfiledlg.hxx %_DEST%\inc%_EXT%\svx\pfiledlg.hxx
+hedabu: ..\inc\hyperdlg.hxx %_DEST%\inc%_EXT%\svx\hyperdlg.hxx
+hedabu: ..\inc\hlnkitem.hxx %_DEST%\inc%_EXT%\svx\hlnkitem.hxx
+hedabu: ..\inc\unofdesc.hxx %_DEST%\inc%_EXT%\svx\unofdesc.hxx
+hedabu: ..\source\xmlfilt\xmlnumi.hxx %_DEST%\inc%_EXT%\svx\xmlnumi.hxx
+hedabu: ..\source\xmlfilt\xmlnume.hxx %_DEST%\inc%_EXT%\svx\xmlnume.hxx
+hedabu: ..\inc\ivctrl.hxx %_DEST%\inc%_EXT%\svx\ivctrl.hxx
+hedabu: ..\inc\iconcdlg.hxx %_DEST%\inc%_EXT%\svx\iconcdlg.hxx
+hedabu: ..\source\xmlfilt\xmltabe.hxx %_DEST%\inc%_EXT%\svx\xmltabe.hxx
+hedabu: ..\source\xmlfilt\xmltabi.hxx %_DEST%\inc%_EXT%\svx\xmltabi.hxx
+hedabu: ..\source\xmlfilt\xmlbrshe.hxx %_DEST%\inc%_EXT%\svx\xmlbrshe.hxx
+hedabu: ..\source\xmlfilt\xmlbrshi.hxx %_DEST%\inc%_EXT%\svx\xmlbrshi.hxx
+hedabu: ..\inc\unoshprp.hxx %_DEST%\inc%_EXT%\svx\unoshprp.hxx
+hedabu: ..\inc\svxmsbas.hxx %_DEST%\inc%_EXT%\svx\svxmsbas.hxx
+hedabu: ..\inc\prtqry.hxx %_DEST%\inc%_EXT%\svx\prtqry.hxx
+hedabu: ..\inc\msoleexp.hxx %_DEST%\inc%_EXT%\svx\msoleexp.hxx
+hedabu: ..\inc\unoapi.hxx %_DEST%\inc%_EXT%\svx\unoapi.hxx
+hedabu: ..\inc\sdasaitm.hxx %_DEST%\inc%_EXT%\svx\sdasaitm.hxx
+hedabu: ..\inc\unofill.hxx %_DEST%\inc%_EXT%\svx\unofill.hxx
+hedabu: ..\source\dialog\grfpage.hxx %_DEST%\inc%_EXT%\svx\grfpage.hxx
+hedabu: ..\inc\grfcrop.hxx %_DEST%\inc%_EXT%\svx\grfcrop.hxx
+hedabu: ..\inc\unonrule.hxx %_DEST%\inc%_EXT%\svx\unonrule.hxx
+
+..\xml\SvxDrawPage.xml %_DEST%\xml%_EXT%\SvxDrawPage.xml
+..\xml\SvxGraphicObject.xml %_DEST%\xml%_EXT%\SvxGraphicObject.xml
+..\xml\SvxShape.xml %_DEST%\xml%_EXT%\SvxShape.xml
+..\xml\SvxShapeCircle.xml %_DEST%\xml%_EXT%\SvxShapeCircle.xml
+..\xml\SvxShapeCollection.xml %_DEST%\xml%_EXT%\SvxShapeCollection.xml
+..\xml\SvxShapeConnector.xml %_DEST%\xml%_EXT%\SvxShapeConnector.xml
+..\xml\SvxShapeControl.xml %_DEST%\xml%_EXT%\SvxShapeControl.xml
+..\xml\SvxShapeDimensioning.xml %_DEST%\xml%_EXT%\SvxShapeDimensioning.xml
+..\xml\SvxShapeGroup.xml %_DEST%\xml%_EXT%\SvxShapeGroup.xml
+..\xml\SvxShapePolyPolygon.xml %_DEST%\xml%_EXT%\SvxShapePolyPolygon.xml
+..\xml\SvxShapePolyPolygonBezier.xml %_DEST%\xml%_EXT%\SvxShapePolyPolygonBezier.xml
+..\xml\SvxUnoNumberingRules.xml %_DEST%\xml%_EXT%\SvxUnoNumberingRules.xml
+..\xml\SvxUnoText.xml %_DEST%\xml%_EXT%\SvxUnoText.xml
+..\xml\SvxUnoTextContent.xml %_DEST%\xml%_EXT%\SvxUnoTextContent.xml
+..\xml\SvxUnoTextContentEnum.xml %_DEST%\xml%_EXT%\SvxUnoTextContentEnum.xml
+..\xml\SvxUnoTextCursor.xml %_DEST%\xml%_EXT%\SvxUnoTextCursor.xml
+..\xml\SvxUnoTextField.xml %_DEST%\xml%_EXT%\SvxUnoTextField.xml
+..\xml\SvxUnoTextRange.xml %_DEST%\xml%_EXT%\SvxUnoTextRange.xml
+..\xml\SvxUnoTextRangeEnumeration.xml %_DEST%\xml%_EXT%\SvxUnoTextRangeEnumeration.xml
diff --git a/svx/sdi/fmslots.sdi b/svx/sdi/fmslots.sdi
new file mode 100644
index 000000000000..e14681d2e157
--- /dev/null
+++ b/svx/sdi/fmslots.sdi
@@ -0,0 +1,639 @@
+/*------------------------------------------------------------------------
+ $Workfile: FMSLOTS.SDI $
+ $Header: /zpool/svn/migration/cvs_rep_09_09_08/code/svx/sdi/fmslots.sdi,v 1.1.1.1 2000-09-18 17:01:06 hr Exp $
+ Beschreibung: IDL - File FormularShell
+
+ (c) Copyright 1989 - 2000, Star Division GmbH, Hamburg
+------------------------------------------------------------------------*/
+
+
+
+
+
+
+
+interface Form : Object
+[
+ uuid = "F38D29A3-9EDA-11d1-AAF5-00A0248A7FBC"
+]
+{
+ SID_FM_CONFIG // ole : no, status : ?
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ Export = FALSE ;
+ ]
+ SID_FM_PUSHBUTTON
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FM_RADIOBUTTON
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FM_CHECKBOX
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FM_FIXEDTEXT
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FM_GROUPBOX
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FM_LISTBOX
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FM_COMBOBOX
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FM_URLBUTTON
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FM_EDIT
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FM_DBGRID
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FM_IMAGEBUTTON
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FM_IMAGECONTROL
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FM_FILECONTROL
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FM_DATEFIELD
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FM_TIMEFIELD
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FM_NUMERICFIELD
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FM_CURRENCYFIELD
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FM_PATTERNFIELD
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FM_FORMATTEDFIELD
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FM_CTL_PROPERTIES
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FM_PROPERTIES
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FM_TAB_DIALOG
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FM_ADD_FIELD
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FM_DESIGN_MODE
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FM_OPEN_READONLY
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FM_USE_WIZARDS
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FM_SHOW_FMEXPLORER
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FM_SHOW_PROPERTY_BROWSER
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FM_RECORD_FIRST
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FM_RECORD_NEXT
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FM_RECORD_PREV
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FM_RECORD_LAST
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FM_RECORD_NEW
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FM_RECORD_DELETE
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FM_RECORD_ABSOLUTE
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FM_RECORD_TEXT
+ [
+ ]
+ SID_FM_RECORD_FROM_TEXT
+ [
+ ]
+ SID_FM_RECORD_TOTAL
+ [
+ StateMethod = GetState ;
+ ]
+ SID_FM_RECORD_SAVE
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FM_RECORD_UNDO
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FM_FORM_FILTERED
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FM_REMOVE_FILTER_SORT
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FM_SORTUP
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FM_SORTDOWN
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FM_ORDERCRIT
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FM_FILTER_START
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FM_AUTOFILTER
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FM_REFRESH
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FM_SEARCH
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FM_FILTER_NAVIGATOR
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FM_FILTER_EXIT
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FM_FILTER_EXECUTE
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ /*SID_FM_FILTER_REMOVE
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]*/
+ //--------------------------------------------------------------------------
+ SID_FM_FMEXPLORER_CONTROL
+ [
+ StateMethod = GetState ;
+ ]
+ //--------------------------------------------------------------------------
+ SID_FM_FIELDS_CONTROL
+ [
+ StateMethod = GetState ;
+ ]
+ //--------------------------------------------------------------------------
+ SID_FM_PROPERTY_CONTROL
+ [
+ StateMethod = GetState ;
+ ]
+ //--------------------------------------------------------------------------
+ SID_FM_FILTER_NAVIGATOR_CONTROL
+ [
+ StateMethod = GetState ;
+ ]
+ //--------------------------------------------------------------------------
+ SID_FM_SHOW_PROPERTIES
+ [
+ StateMethod = GetState ;
+ ExecMethod = Execute ;
+ ]
+
+ SID_FM_VIEW_AS_GRID
+ [
+ StateMethod = GetState ;
+ ExecMethod = Execute ;
+ ]
+}
+
+shell FmFormShell
+{
+ import Form [Automation];
+ SID_FM_CONFIG // ole : no, status : ?
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FM_LEAVE_CREATE
+ [
+ ExecMethod = Execute ;
+ ]
+ SID_FM_CHANGECONTROLTYPE
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FM_CONVERTTO_EDIT
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FM_CONVERTTO_BUTTON
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FM_CONVERTTO_FIXEDTEXT
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FM_CONVERTTO_LISTBOX
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FM_CONVERTTO_CHECKBOX
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FM_CONVERTTO_RADIOBUTTON
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FM_CONVERTTO_GROUPBOX
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FM_CONVERTTO_COMBOBOX
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FM_CONVERTTO_GRID
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FM_CONVERTTO_IMAGEBUTTON
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FM_CONVERTTO_FILECONTROL
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FM_CONVERTTO_DATE
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FM_CONVERTTO_TIME
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FM_CONVERTTO_NUMERIC
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FM_CONVERTTO_CURRENCY
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FM_CONVERTTO_PATTERN
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FM_CONVERTTO_IMAGECONTROL
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+ SID_FM_CONVERTTO_FORMATTED
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ ]
+}
+
+
+/*------------------------------------------------------------------------
+
+ $Log: not supported by cvs2svn $
+ Revision 1.58 1999/10/04 06:38:46 dg
+ #68564# Usage of Filters modified
+
+ Revision 1.57 1999/08/30 14:57:11 dg
+ FILTER_REMOVE notused
+
+ Revision 1.56 1999/08/30 13:33:41 dg
+ new slots
+
+ Revision 1.55 1999/08/09 07:28:49 fs
+ SID_FM_VIEW_AS_GRID
+
+ Revision 1.54 1999/06/14 09:20:16 DG
+ new Formslot
+
+
+ Rev 1.53 14 Jun 1999 11:20:16 DG
+ new Formslot
+
+ Rev 1.52 09 Jun 1999 08:54:36 DG
+ Neue Formularslots
+
+ Rev 1.51 31 May 1999 10:54:22 FS
+ #65629# FOrmShell verantwortlich fuer FormattedField-Slot
+
+ Rev 1.50 25 May 1999 15:10:06 FS
+ #66282# FmFormShell verantworklich fuer Control-Konvertierungs-Slots
+
+ Rev 1.49 15 Mar 1999 21:44:42 HJS
+ Merge SRC515: 15.03.99 - 21.44.24 (NoBranch)
+
+ Rev 1.48 12 Mar 1999 20:15:34 HJS
+ Merge SRC515: 12.03.99 - 20.15.18 (NoBranch)
+
+ Rev 1.47 11 Mar 1999 19:37:08 HJS
+ Merge SRC515: 11.03.99 - 19.36.51 (NoBranch)
+
+ Rev 1.46 10 Mar 1999 02:48:28 HJS
+ Merge SRC515: 10.03.99 - 02.48.05 (NoBranch)
+
+ Rev 1.45 04 Mar 1999 14:01:10 FS
+ #62286# Y2K-Verantwortlichkeit wieder entfernt
+
+ Rev 1.44 27 Feb 1999 00:25:34 HJS
+ Merge SRC514: 27.02.99 - 00.25.16 (NoBranch)
+
+ Rev 1.43 22 Feb 1999 22:21:10 HJS
+ Merge SRC514: 22.02.99 - 22.20.53 (NoBranch)
+
+ Rev 1.42 16 Feb 1999 16:47:30 FS
+ #61027# Y2K-Behandlung
+
+ Rev 1.41 10 Feb 1999 20:09:56 HJS
+ Merge SRC513: 10.02.99 - 20.09.29 (NoBranch)
+
+ Rev 1.40 09 Feb 1999 20:33:36 HJS
+ Merge SRC513: 09.02.99 - 20.33.17 (NoBranch)
+
+ Rev 1.39 18 Nov 1998 16:59:42 DG
+ #59280# CreateMode neu
+
+ Rev 1.38 16 Nov 1998 16:14:44 FS
+ #59472# zwei neue Slots fuer FormShell
+
+ Rev 1.37 03 Nov 1998 17:18:56 FS
+ #58826# neuer Slot SID_FM_SEARCH
+
+ Rev 1.36 02 Nov 1998 10:39:18 DG
+ #56606# Filternslots angepasst
+
+ Rev 1.35 28 Oct 1998 10:45:24 OJ
+ #58248# asserts und sid von offmgr transferiert
+
+ Rev 1.34 15 Oct 1998 11:49:36 FS
+ #57870# SID_FM_CONFIG jetzt ToolBoxConfig==TRUE
+
+ Rev 1.33 30 Sep 1998 14:16:50 HJS
+ merge prt505 new 30.09.98
+
+ Rev 1.32 29 Sep 1998 20:58:00 HJS
+ merge prt505 new 29.09.98
+
+ Rev 1.31 29 Sep 1998 14:51:46 HJS
+ merge prt505 new 29.09.98
+
+ Rev 1.30 29 Sep 1998 02:00:26 HJS
+ merge prt505 new 29.09.98
+
+ Rev 1.29 16 Sep 1998 16:32:18 DG
+ #56576# FmFormInfo erweitert
+
+ Rev 1.28 10 Sep 1998 18:12:42 HJS
+ merge prt504 new 10.09.98
+
+ Rev 1.27 08 Sep 1998 20:58:04 HJS
+ merge prt504 new 08.09.98
+
+ Rev 1.26 31 Aug 1998 21:32:58 HJS
+ merge prt503 old 31.08.98
+
+ Rev 1.25 12 Aug 1998 16:23:32 HJS
+ handmerge prt503
+
+ Rev 1.24 23 Jul 1998 16:00:34 MIB
+ #53239#: Deutsche Konfig-Namen
+
+ Rev 1.23 13 Jul 1998 14:00:20 AWO
+ #51529# SID_FM_SHOW_PROPERTY_BROWSER
+
+ Rev 1.22 07 Jul 1998 16:49:20 AWO
+ SID_FM_IMAGE_CONTROL
+
+ Rev 1.21 11 Jun 1998 12:10:42 AWO
+ Spezielle Edits
+
+ Rev 1.20 10 Jun 1998 18:58:14 MIB
+ FileControl
+
+ Rev 1.19 05 Jun 1998 10:26:46 MIB
+ Image-Button
+
+ Rev 1.18 24 Apr 1998 14:33:58 DG
+ neuer slotdie 2.
+
+ Rev 1.17 24 Apr 1998 14:23:04 DG
+ neuer slot
+
+ Rev 1.16 18 Mar 1998 13:42:38 DG
+ readonlydoc falsch
+
+ Rev 1.15 16 Mar 1998 12:10:52 DG
+ erweitert
+
+ Rev 1.14 14 Mar 1998 14:07:10 AWO
+ SID_FM_SHOW_FMEXPLORER
+
+ Rev 1.13 13 Mar 1998 23:38:06 DG
+ neuer slot
+
+ Rev 1.12 12 Mar 1998 12:53:06 AWO
+ Neu: SID_FM_SHOW_FMEXPLORER
+
+ Rev 1.11 10 Mar 1998 14:47:02 DG
+ erweitert
+
+ Rev 1.10 05 Mar 1998 15:06:24 AWO
+ SID_FM_DESIGN_MODE
+
+ Rev 1.9 02 Mar 1998 08:48:40 AWO
+ SID_FM_CREATE_CONTROL
+
+ Rev 1.8 27 Feb 1998 10:00:32 AWO
+ Control Slots wieder aufgenommen
+
+ Rev 1.7 23 Feb 1998 08:56:08 AWO
+ SID_FM_CTL_PROPERTIES
+
+ Rev 1.6 20 Feb 1998 09:31:36 AWO
+ Neue Slots fuer NavBar
+
+ Rev 1.5 17 Feb 1998 15:49:38 AWO
+ SID_FM_ADD_TABLE
+
+ Rev 1.4 16 Feb 1998 11:32:06 AWO
+ Neue Slots
+
+ Rev 1.3 12 Feb 1998 16:03:56 AWO
+ Neue Slots
+
+ Rev 1.2 09 Feb 1998 16:37:30 AWO
+ SID_FM_RECORD_ABSOLUTE
+
+ Rev 1.1 09 Feb 1998 10:27:00 AWO
+
+ Rev 1.0 06 Feb 1998 13:02:34 DG
+ Initial revision.
+
+------------------------------------------------------------------------*/
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/svx/sdi/makefile.mk b/svx/sdi/makefile.mk
new file mode 100644
index 000000000000..a77cba276c04
--- /dev/null
+++ b/svx/sdi/makefile.mk
@@ -0,0 +1,99 @@
+#*************************************************************************
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.1.1.1 $
+#
+# last change: $Author: hr $ $Date: 2000-09-18 17:01:06 $
+#
+# The Contents of this file are made available subject to the terms of
+# either of the following licenses
+#
+# - GNU Lesser General Public License Version 2.1
+# - Sun Industry Standards Source License Version 1.1
+#
+# Sun Microsystems Inc., October, 2000
+#
+# GNU Lesser General Public License Version 2.1
+# =============================================
+# Copyright 2000 by Sun Microsystems, Inc.
+# 901 San Antonio Road, Palo Alto, CA 94303, USA
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License version 2.1, as published by the Free Software Foundation.
+#
+# This library 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 for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+#
+# Sun Industry Standards Source License Version 1.1
+# =================================================
+# The contents of this file are subject to the Sun Industry Standards
+# Source License Version 1.1 (the "License"); You may not use this file
+# except in compliance with the License. You may obtain a copy of the
+# License at http://www.openoffice.org/license.html.
+#
+# Software provided under this License is provided on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+# See the License for the specific provisions governing your rights and
+# obligations concerning the Software.
+#
+# The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+#
+# Copyright: 2000 by Sun Microsystems, Inc.
+#
+# All Rights Reserved.
+#
+# Contributor(s): _______________________________________
+#
+#
+#
+#*************************************************************************
+
+
+PRJ=..
+
+PRJNAME=svx
+TARGET=svxslots
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : svpre.mk
+.INCLUDE : settings.mk
+.INCLUDE : sv.mk
+
+SDINAME=$(TARGET)
+#SDI1NAME=baside
+SDIEXPORT=svxnew
+
+# --- Files --------------------------------------------------------
+
+SRS1NAME=enumslot
+SRC1FILES=enumslot.src
+
+SVSDIDEPEND= \
+ svxitems.sdi \
+ fmslots.sdi \
+ svxnew.sdi \
+ svx.sdi \
+ $(SOLARINCXDIR)$/sfxslots.ilb \
+ xoitems.sdi \
+ svxitems.sdi
+
+SRCFILES = \
+ svxslots.src
+
+# --- Targets -------------------------------------------------------
+
+.INCLUDE : target.mk
+
diff --git a/svx/sdi/svx.sdi b/svx/sdi/svx.sdi
new file mode 100644
index 000000000000..3cc864b78844
--- /dev/null
+++ b/svx/sdi/svx.sdi
@@ -0,0 +1,8848 @@
+//--------------------------------------------------------------------------
+SfxVoidItem ShowDetail SID_OUTLINE_SHOW
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_DATA;
+]
+
+//--------------------------------------------------------------------------
+SvxChooseControlItem ChooseControls SID_CHOOSE_CONTROLS
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_CONTROLS;
+ PseudoSlots = TRUE;
+ PseudoPrefix = SID_INSERT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem Refresh SID_FM_REFRESH
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_TABLE;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem AlignMiddle SID_OBJECT_ALIGN_MIDDLE
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem OutlineCollapseAll SID_OUTLINE_COLLAPSE_ALL
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem BezierFill SID_DRAW_BEZIER_FILL
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DRAWING;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem OutlineCollapse SID_OUTLINE_COLLAPSE
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem Square_Rounded_Unfilled SID_DRAW_SQUARE_ROUND_NOFILL
+(SfxUInt32Item MouseStartX ID_VAL_MOUSESTART_X,SfxUInt32Item MouseStartY ID_VAL_MOUSESTART_Y,SfxUInt32Item MouseEndX ID_VAL_MOUSEEND_X,SfxUInt32Item MouseEndY ID_VAL_MOUSEEND_Y)
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* status: */
+ SlotType = SfxBoolItem
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DRAWING;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem RecText SID_FM_RECORD_TEXT
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* status: */
+ SlotType = SfxBoolItem
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem ShowFmExplorer SID_FM_SHOW_FMEXPLORER
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = TRUE,
+ Container = FALSE,
+ Asynchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem PrevRecord SID_FM_RECORD_PREV
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* status: */
+ SlotType = SfxBoolItem
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem Init3D SID_3D_INIT
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_OPTIONS;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem FormProperties SID_FM_PROPERTIES
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = TRUE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem SwEditOptions SID_SW_EDITOPTIONS
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_OPTIONS;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem SdEditOptions SID_SD_EDITOPTIONS
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_OPTIONS;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem ToggleObjectBezierMode SID_BEZIER_EDIT
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DRAWING;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem Line SID_DRAW_LINE
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DRAWING;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem SetHyperlink SID_HYPERLINK_SETLINK
+(SvxHyperlinkItem Hyperlink SID_HYPERLINK_SETLINK)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_INSERT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem OutlineExpand SID_OUTLINE_EXPAND
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+XFillHatchItem FillHatch SID_ATTR_FILL_HATCH
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_SPECIAL;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem Label SID_INSERT_FIXEDTEXT
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem Group SID_OUTLINE_MAKE
+(SfxStringItem RowOrCol SID_OUTLINE_MAKE)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DATA;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem BmpMaskPipette SID_BMPMASK_PIPETTE
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_DOCUMENT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem DeleteRecord SID_FM_RECORD_DELETE
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* status: */
+ SlotType = SfxBoolItem
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem Groupbox SID_INSERT_GROUPBOX
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem InsertApplet SID_INSERT_APPLET
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_INSERT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem SendToBack SID_FRAME_TO_BOTTOM
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem InsertMath SID_INSERT_MATH
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_INSERT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem CircleCut_Unfilled SID_DRAW_CIRCLECUT_NOFILL
+(SfxUInt32Item CenterX ID_VAL_CENTER_X,SfxUInt32Item CenterY ID_VAL_CENTER_Y,SfxUInt32Item AxisX ID_VAL_AXIS_X,SfxUInt32Item AxisY ID_VAL_AXIS_Y,SfxUInt32Item StartAngle ID_VAL_ANGLESTART,SfxUInt32Item EndAngle ID_VAL_ANGLEEND)
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* status: */
+ SlotType = SfxBoolItem
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DRAWING;
+]
+
+//--------------------------------------------------------------------------
+SfxInt16Item GrafBlue SID_ATTR_GRAF_BLUE
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxInt16Item GrafContrast SID_ATTR_GRAF_CONTRAST
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem FirstRecord SID_FM_RECORD_FIRST
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* status: */
+ SlotType = SfxBoolItem
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem InsertAnnotation SID_INSERT_POSTIT
+(SvxPostItAuthorItem Author SID_ATTR_POSTIT_AUTHOR,SvxPostItDateItem Date SID_ATTR_POSTIT_DATE,SvxPostItTextItem Text SID_ATTR_POSTIT_TEXT)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_INSERT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem SpellOnline SID_AUTOSPELL_CHECK
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = TRUE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_OPTIONS;
+]
+
+//--------------------------------------------------------------------------
+XLineDashItem LineDash SID_ATTR_LINE_DASH
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem Spinbutton SID_INSERT_SPINBUTTON
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem FormFilterExecute SID_FM_FILTER_EXECUTE
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_TABLE;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem BmpMask SID_BMPMASK
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DOCUMENT;
+]
+
+//--------------------------------------------------------------------------
+SvxAdjustItem Alignment SID_ATTR_PARA_ADJUST
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem ConvertToEdit SID_FM_CONVERTTO_EDIT
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SfxUInt16Item Config SID_FM_CONFIG
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_CONTROLS;
+ PseudoSlots = TRUE;
+ PseudoPrefix = SID_INSERT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem ListBox SID_FM_LISTBOX
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = TRUE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem ConvertToCheckBox SID_FM_CONVERTTO_CHECKBOX
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SfxUInt32Item GrafGamma SID_ATTR_GRAF_GAMMA
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem FormatArea SID_ATTRIBUTES_AREA
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem Line_Diagonal SID_DRAW_XLINE
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DRAWING;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem ConvertToGrid SID_FM_CONVERTTO_GRID
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SvxWidowsItem Widow SID_ATTR_PARA_WIDOWS
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SvxFontHeightItem FontHeight SID_ATTR_CHAR_FONTHEIGHT
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem OpenReadOnly SID_FM_OPEN_READONLY
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = TRUE,
+ Container = FALSE,
+ Asynchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem DateField SID_FM_DATEFIELD
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = TRUE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem CountAll SID_FM_COUNTALL
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_TABLE;
+]
+
+//--------------------------------------------------------------------------
+XFormTextAdjustItem FontWorkTextAdjust SID_FORMTEXT_ADJUST
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_SPECIAL;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem FileControl SID_FM_FILECONTROL
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = TRUE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem LeaveFMCreateMode SID_FM_LEAVE_CREATE
+(SfxBoolItem Leave SID_FM_LEAVE_CREATE)
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem Arc SID_DRAW_ARC
+(SfxUInt32Item CenterX ID_VAL_CENTER_X,SfxUInt32Item CenterY ID_VAL_CENTER_Y,SfxUInt32Item AxisX ID_VAL_AXIS_X,SfxUInt32Item AxisY ID_VAL_AXIS_Y,SfxUInt32Item StartAngle ID_VAL_ANGLESTART,SfxUInt32Item EndAngle ID_VAL_ANGLEEND)
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* status: */
+ SlotType = SfxBoolItem
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DRAWING;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem ShowPropertyBrowser SID_FM_SHOW_PROPERTY_BROWSER
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = TRUE,
+ Container = FALSE,
+ Synchron;
+
+ /* status: */
+ SlotType = SfxBoolItem
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem ControlProperties SID_FM_CTL_PROPERTIES
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = TRUE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem DefaultBullet FN_NUM_BULLET_ON
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* status: */
+ SlotType = SfxBoolItem
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_ENUMERATION;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem CircleCut SID_DRAW_CIRCLECUT
+(SfxUInt32Item CenterX ID_VAL_CENTER_X,SfxUInt32Item CenterY ID_VAL_CENTER_Y,SfxUInt32Item AxisX ID_VAL_AXIS_X,SfxUInt32Item AxisY ID_VAL_AXIS_Y,SfxUInt32Item StartAngle ID_VAL_ANGLESTART,SfxUInt32Item EndAngle ID_VAL_ANGLEEND)
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* status: */
+ SlotType = SfxBoolItem
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DRAWING;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem InsertVideo SID_INSERT_VIDEO
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_INSERT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem ColorControl SID_COLOR_CONTROL
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+XLineWidthItem LineWidth SID_ATTR_LINE_WIDTH
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem Combobox SID_INSERT_COMBOBOX
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SvxDrawToolItem DrawSelect SID_INSERT_DRAW
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DRAWING;
+ PseudoSlots = TRUE;
+ PseudoPrefix = SID_DRAW;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem SdGraphicOptions SID_SD_GRAPHIC_OPTIONS
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_OPTIONS;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem ZoomOptimal SID_SIZE_ALL
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem CheckBox SID_FM_CHECKBOX
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = TRUE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem NewJavaModule SID_BASICIDE_NEWJAVAMODULE
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_MACRO;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem EnterGroup SID_ENTER_GROUP
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem Insert SID_ENTER_STRING
+(SfxStringItem StringName SID_ENTER_STRING)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_INTERN;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem AddTable SID_FM_ADDTABLE
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_TABLE;
+]
+
+//--------------------------------------------------------------------------
+SvxTabStopItem Tabstops SID_ATTR_TABSTOP
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Asynchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem Grid SID_FM_DBGRID
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = TRUE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem OrderCrit SID_FM_ORDERCRIT
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_TABLE;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem CreateControl SID_FM_CREATE_CONTROL
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* status: */
+ SlotType = SfxBoolItem
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem SuperScript SID_SET_SUPER_SCRIPT
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem CurrencyField SID_FM_CURRENCYFIELD
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = TRUE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem Rect_Rounded SID_DRAW_RECT_ROUND
+(SfxUInt32Item MouseStartX ID_VAL_MOUSESTART_X,SfxUInt32Item MouseStartY ID_VAL_MOUSESTART_Y,SfxUInt32Item MouseEndX ID_VAL_MOUSEEND_X,SfxUInt32Item MouseEndY ID_VAL_MOUSEEND_Y)
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* status: */
+ SlotType = SfxBoolItem
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DRAWING;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem Rect_Rounded_Unfilled SID_DRAW_RECT_ROUND_NOFILL
+(SfxUInt32Item MouseStartX ID_VAL_MOUSESTART_X,SfxUInt32Item MouseStartY ID_VAL_MOUSESTART_Y,SfxUInt32Item MouseEndX ID_VAL_MOUSEEND_X,SfxUInt32Item MouseEndY ID_VAL_MOUSEEND_Y)
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* status: */
+ SlotType = SfxBoolItem
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DRAWING;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem Square SID_DRAW_SQUARE
+(SfxUInt32Item MouseStartX ID_VAL_MOUSESTART_X,SfxUInt32Item MouseStartY ID_VAL_MOUSESTART_Y,SfxUInt32Item MouseEndX ID_VAL_MOUSEEND_X,SfxUInt32Item MouseEndY ID_VAL_MOUSEEND_Y)
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* status: */
+ SlotType = SfxBoolItem
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DRAWING;
+]
+
+//--------------------------------------------------------------------------
+SvxBrushItem BackgroundPatternController SID_BACKGROUND_PATTERN
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem Polygon_Unfilled SID_DRAW_POLYGON_NOFILL
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DRAWING;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem Rect_Unfilled SID_DRAW_RECT_NOFILL
+(SfxUInt32Item MouseStartX ID_VAL_MOUSESTART_X,SfxUInt32Item MouseStartY ID_VAL_MOUSESTART_Y,SfxUInt32Item MouseEndX ID_VAL_MOUSEEND_X,SfxUInt32Item MouseEndY ID_VAL_MOUSEEND_Y)
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* status: */
+ SlotType = SfxBoolItem
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DRAWING;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem Text_Marquee SID_DRAW_TEXT_MARQUEE
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DRAWING;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem ToolSelect SID_OBJECT_SELECT
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem Polygon_Diagonal_Unfilled SID_DRAW_XPOLYGON_NOFILL
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DRAWING;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem Square_Unfilled SID_DRAW_SQUARE_NOFILL
+(SfxUInt32Item MouseStartX ID_VAL_MOUSESTART_X,SfxUInt32Item MouseStartY ID_VAL_MOUSESTART_Y,SfxUInt32Item MouseEndX ID_VAL_MOUSEEND_X,SfxUInt32Item MouseEndY ID_VAL_MOUSEEND_Y)
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* status: */
+ SlotType = SfxBoolItem
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DRAWING;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem Square_Rounded SID_DRAW_SQUARE_ROUND
+(SfxUInt32Item MouseStartX ID_VAL_MOUSESTART_X,SfxUInt32Item MouseStartY ID_VAL_MOUSESTART_Y,SfxUInt32Item MouseEndX ID_VAL_MOUSEEND_X,SfxUInt32Item MouseEndY ID_VAL_MOUSEEND_Y)
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* status: */
+ SlotType = SfxBoolItem
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DRAWING;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem Text SID_DRAW_TEXT
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* status: */
+ SlotType = SfxBoolItem
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DRAWING;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem LaunchStarImage SID_SIM_START
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_APPLICATION;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem PatternField SID_FM_PATTERNFIELD
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = TRUE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SvxColorItem Color SID_ATTR_CHAR_COLOR
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem Ungroup SID_OUTLINE_REMOVE
+(SfxStringItem RowOrCol SID_OUTLINE_REMOVE)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DATA;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem NumericField SID_FM_NUMERICFIELD
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = TRUE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem AbsoluteRecord SID_FM_RECORD_ABSOLUTE
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* status: */
+ SlotType = FmFormInfoItem
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem SearchOff FID_SEARCH_OFF
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem HelplinesMove SID_HELPLINES_MOVE
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = TRUE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem ShowHidden SID_SHOW_HIDDEN
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem Pushbutton SID_FM_PUSHBUTTON
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = TRUE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem RadioButton SID_FM_RADIOBUTTON
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = TRUE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem AutoFilter SID_FM_AUTOFILTER
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_TABLE;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem FilterCrit SID_FM_FILTERCRIT
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_TABLE;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem Label SID_FM_FIXEDTEXT
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = TRUE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem Edit SID_FM_EDIT
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = TRUE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem BringToFront SID_FRAME_TO_TOP
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxObjectItem FieldController SID_FM_FIELDS_CONTROL
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = ;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem ImageControl SID_FM_IMAGECONTROL
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = TRUE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SfxSetItem ReplaceSet FID_SEARCH_REPLACESET
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem SbaNativeSql SID_FM_NATIVESQL
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = TRUE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_TABLE;
+]
+
+//--------------------------------------------------------------------------
+SfxObjectItem FmExplorerController SID_FM_FMEXPLORER_CONTROL
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = ;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem GroupBox SID_FM_GROUPBOX
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = TRUE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem Imagebutton SID_FM_IMAGEBUTTON
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = TRUE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem BezierAppend SID_BEZIER_APPEND
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_DRAWING;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem BezierClose SID_BEZIER_CLOSE
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DRAWING;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem FormatLine SID_ATTRIBUTES_LINE
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem HideSpellMark SID_AUTOSPELL_MARKOFF
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = TRUE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SvxColorItem BackgroundColor SID_BACKGROUND_COLOR
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem BezierInsert SID_BEZIER_INSERT
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DRAWING;
+]
+
+//--------------------------------------------------------------------------
+SvxShadowedItem Shadowed SID_ATTR_CHAR_SHADOWED
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = TRUE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem BezierCutLine SID_BEZIER_CUTLINE
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DRAWING;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem BezierConvert SID_BEZIER_CONVERT
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DRAWING;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem Circle SID_DRAW_CIRCLE
+(SfxUInt32Item CenterX ID_VAL_CENTER_X,SfxUInt32Item CenterY ID_VAL_CENTER_Y,SfxUInt32Item AxisX ID_VAL_AXIS_X,SfxUInt32Item AxisY ID_VAL_AXIS_Y)
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* status: */
+ SlotType = SfxBoolItem
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DRAWING;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem SetObjectToBackground SID_OBJECT_HELL
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxPointItem Position SID_ATTR_POSITION
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem Window3D SID_3D_WIN
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_OPTIONS;
+]
+
+//--------------------------------------------------------------------------
+SvxSizeItem Size SID_ATTR_SIZE
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = TRUE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SvxOrphansItem Orphan SID_ATTR_PARA_ORPHANS
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SvxFmtBreakItem Pagebreak SID_ATTR_PARA_PAGEBREAK
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SvxFmtSplitItem ParaSplit SID_ATTR_PARA_SPLIT
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem TransformDialog SID_ATTR_TRANSFORM
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SvxULSpaceItem TopBottomMargin SID_ATTR_ULSPACE
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SvxContourItem OutlineFont SID_ATTR_CHAR_CONTOUR
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = TRUE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem TwainTransfer SID_TWAIN_TRANSFER
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Volatile,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Asynchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_INSERT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem InsertTable SID_ATTR_TABLE
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_INSERT;
+]
+
+//--------------------------------------------------------------------------
+SdrTextFitToSizeTypeItem TextFitToSize SID_ATTR_TEXT_FITTOSIZE
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = TRUE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem CircleArc SID_DRAW_CIRCLEARC
+(SfxUInt32Item CenterX ID_VAL_CENTER_X,SfxUInt32Item CenterY ID_VAL_CENTER_Y,SfxUInt32Item AxisX ID_VAL_AXIS_X,SfxUInt32Item AxisY ID_VAL_AXIS_Y,SfxUInt32Item StartAngle ID_VAL_ANGLESTART,SfxUInt32Item EndAngle ID_VAL_ANGLEEND)
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* status: */
+ SlotType = SfxBoolItem
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DRAWING;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem Ellipse SID_DRAW_ELLIPSE
+(SfxUInt32Item CenterX ID_VAL_CENTER_X,SfxUInt32Item CenterY ID_VAL_CENTER_Y,SfxUInt32Item AxisX ID_VAL_AXIS_X,SfxUInt32Item AxisY ID_VAL_AXIS_Y)
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* status: */
+ SlotType = SfxBoolItem
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DRAWING;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem Bezier_Unfilled SID_DRAW_BEZIER_NOFILL
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DRAWING;
+]
+
+//--------------------------------------------------------------------------
+XFormTextShadowYValItem FontWorkTextShadowYVal SID_FORMTEXT_SHDWYVAL
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_SPECIAL;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem Caption SID_DRAW_CAPTION
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DRAWING;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem Freeline_Unfilled SID_DRAW_FREELINE_NOFILL
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DRAWING;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem Pie SID_DRAW_PIE
+(SfxUInt32Item CenterX ID_VAL_CENTER_X,SfxUInt32Item CenterY ID_VAL_CENTER_Y,SfxUInt32Item AxisX ID_VAL_AXIS_X,SfxUInt32Item AxisY ID_VAL_AXIS_Y,SfxUInt32Item StartAngle ID_VAL_ANGLESTART,SfxUInt32Item EndAngle ID_VAL_ANGLEEND)
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* status: */
+ SlotType = SfxBoolItem
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DRAWING;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem Pie_Unfilled SID_DRAW_PIE_NOFILL
+(SfxUInt32Item CenterX ID_VAL_CENTER_X,SfxUInt32Item CenterY ID_VAL_CENTER_Y,SfxUInt32Item AxisX ID_VAL_AXIS_X,SfxUInt32Item AxisY ID_VAL_AXIS_Y,SfxUInt32Item StartAngle ID_VAL_ANGLESTART,SfxUInt32Item EndAngle ID_VAL_ANGLEEND)
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* status: */
+ SlotType = SfxBoolItem
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DRAWING;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem Ellipse_Unfilled SID_DRAW_ELLIPSE_NOFILL
+(SfxUInt32Item CenterX ID_VAL_CENTER_X,SfxUInt32Item CenterY ID_VAL_CENTER_Y,SfxUInt32Item AxisX ID_VAL_AXIS_X,SfxUInt32Item AxisY ID_VAL_AXIS_Y)
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* status: */
+ SlotType = SfxBoolItem
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DRAWING;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem EllipseCut_Unfilled SID_DRAW_ELLIPSECUT_NOFILL
+(SfxUInt32Item CenterX ID_VAL_CENTER_X,SfxUInt32Item CenterY ID_VAL_CENTER_Y,SfxUInt32Item AxisX ID_VAL_AXIS_X,SfxUInt32Item AxisY ID_VAL_AXIS_Y,SfxUInt32Item StartAngle ID_VAL_ANGLESTART,SfxUInt32Item EndAngle ID_VAL_ANGLEEND)
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* status: */
+ SlotType = SfxBoolItem
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DRAWING;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem Freeline SID_DRAW_FREELINE
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DRAWING;
+]
+
+//--------------------------------------------------------------------------
+SfxObjectItem Border SID_BORDER_OBJECT
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = TRUE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = ;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem FontDialog SID_CHAR_DLG
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem InsertSymbol SID_CHARMAP
+(SvxFontItem aFont SID_CHARMAP,SfxStringItem aString SID_ATTR_SPECIALCHAR)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_INSERT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem BezierSmooth SID_BEZIER_SMOOTH
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DRAWING;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem BezierTo SID_BEZIERTO
+(SfxUInt32Item MouseEndX ID_VAL_MOUSEEND_X,SfxUInt32Item MouseEndY ID_VAL_MOUSEEND_Y)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = ;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem BmpMaskExec SID_BMPMASK_EXEC
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_DOCUMENT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem Dash SID_DASH
+(SfxStringItem Name ID_VAL_INDEX,SfxUInt32Item Style ID_VAL_STYLE,SfxUInt32Item Dots ID_VAL_DOTS,SfxUInt32Item DotLen ID_VAL_DOTLEN,SfxUInt32Item Dashes ID_VAL_DASHES,SfxUInt32Item DashLen ID_VAL_DASHLEN,SfxUInt32Item Distance ID_VAL_DISTANCE)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_DOCUMENT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem TestMode SID_DIALOG_TESTMODE
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Asynchron;
+
+ /* status: */
+ SlotType = SfxBoolItem
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem BezierEliminatePoints SID_BEZIER_ELIMINATE_POINTS
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DRAWING;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem ChoosePolygon SID_CHOOSE_POLYGON
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DRAWING;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem ContourDialog SID_CONTOUR_DLG
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = TRUE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_GRAPHIC;
+]
+
+//--------------------------------------------------------------------------
+SvxKerningItem Spacing SID_ATTR_CHAR_KERNING
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem OutlineExpandAll SID_OUTLINE_EXPAND_ALL
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem OutlineDown SID_OUTLINE_DOWN
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem GridVisible SID_GRID_VISIBLE
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = TRUE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem BezierDelete SID_BEZIER_DELETE
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DRAWING;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem HideDetail SID_OUTLINE_HIDE
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_DATA;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem Polygon_Diagonal SID_DRAW_XPOLYGON
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DRAWING;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem ToggleObjectRotateMode SID_OBJECT_ROTATE
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DRAWING;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem InsertObject SID_INSERT_OBJECT
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_INSERT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem ClearOutline SID_OUTLINE_DELETEALL
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_DATA;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem SubScript SID_SET_SUB_SCRIPT
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem InPlaceObjectResize SID_OBJECTRESIZE
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_DOCUMENT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem SchEditOptions SID_SCH_EDITOPTIONS
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_OPTIONS;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem Scan SID_SCAN
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_INSERT;
+]
+
+//--------------------------------------------------------------------------
+SvxBrushItem BackgroundPattern SID_ATTR_BRUSH
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem UseWizards SID_FM_USE_WIZARDS
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = TRUE,
+ Container = FALSE,
+ Asynchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem Select SID_SELECT
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Volatile,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem GalleryEnableAddCopy SID_GALLERY_ENABLE_ADDCOPY
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_INSERT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem ParagraphDialog SID_PARA_DLG
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem OutlineUp SID_OUTLINE_UP
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem OutlineRight SID_OUTLINE_RIGHT
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxPointItem RulerNullOffset SID_RULER_NULL_OFFSET
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = ;
+]
+
+//--------------------------------------------------------------------------
+SfxRectangleItem HeaderFooterBorder SID_RULER_LR_MIN_MAX
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = ;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem Grid SID_GRID
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem InsertImage SID_INSERT_IMAGE
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_INSERT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem HScrollbar SID_INSERT_HSCROLLBAR
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem Pushbutton SID_INSERT_PUSHBUTTON
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem Preview SID_INSERT_PREVIEW
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem InsertPlugin SID_INSERT_PLUGIN
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_INSERT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem InsertObjectStarChart SID_INSERT_DIAGRAM
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_INSERT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem ImageMapExecute SID_IMAP_EXEC
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem InternetDialog SID_INET_DLG
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_OPTIONS;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem ImageMapDialog SID_IMAP
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = TRUE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_GRAPHIC;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem InsertTextFrame SID_INSERT_FRAME
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_INSERT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem Edit SID_INSERT_EDIT
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem AlignRight SID_OBJECT_ALIGN_RIGHT
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem AlignLeft SID_OBJECT_ALIGN_LEFT
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem AlignDown SID_OBJECT_ALIGN_DOWN
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem OutlineLeft SID_OUTLINE_LEFT
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem SetObjectToForeground SID_OBJECT_HEAVEN
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem AlignUp SID_OBJECT_ALIGN_UP
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem VScrollbar SID_INSERT_VSCROLLBAR
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem URLButton SID_INSERT_URLBUTTON
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem Radiobutton SID_INSERT_RADIOBUTTON
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem AlignCenter SID_OBJECT_ALIGN_CENTER
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SvxHyperlinkItem Hyperlink SID_HYPERLINK_GETLINK
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = TRUE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_INSERT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem LeaveGroup SID_LEAVE_GROUP
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+XFormTextDistanceItem FontWorkTextDistance SID_FORMTEXT_DISTANCE
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_SPECIAL;
+]
+
+//--------------------------------------------------------------------------
+XFormTextHideFormItem FormatFontWorkClose SID_FORMTEXT_HIDEFORM
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_SPECIAL;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem TabDialog SID_FM_TAB_DIALOG
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Asynchron;
+
+ /* status: */
+ SlotType = SfxBoolItem
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem Intersect SID_POLY_INTERSECT
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_MODIFY;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem UrlButton SID_FM_URLBUTTON
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = TRUE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+XFormTextShadowXValItem FontWorkTextShadowXVal SID_FORMTEXT_SHDWXVAL
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_SPECIAL;
+]
+
+//--------------------------------------------------------------------------
+XFormTextStartItem FontWorkTextStart SID_FORMTEXT_START
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_SPECIAL;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem ZoomObjects SID_SIZE_OPTIMAL
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+XFormTextMirrorItem FontWorkTextMirror SID_FORMTEXT_MIRROR
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_SPECIAL;
+]
+
+//--------------------------------------------------------------------------
+XFormTextShadowItem FontWorkTextShadow SID_FORMTEXT_SHADOW
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_SPECIAL;
+]
+
+//--------------------------------------------------------------------------
+XFormTextShadowColorItem FontWorkTextShadowColor SID_FORMTEXT_SHDWCOLOR
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_SPECIAL;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem OutlineFormat SID_OUTLINE_FORMAT
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem RecSave SID_FM_RECORD_SAVE
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* status: */
+ SlotType = SfxBoolItem
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SfxStringItem RecTotal SID_FM_RECORD_TOTAL
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* status: */
+ SlotType = SfxStringItem
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem RecFromText SID_FM_RECORD_FROM_TEXT
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* status: */
+ SlotType = SfxBoolItem
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem LastRecord SID_FM_RECORD_LAST
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* status: */
+ SlotType = SfxBoolItem
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem NextRecord SID_FM_RECORD_NEXT
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* status: */
+ SlotType = SfxBoolItem
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem ShowProperties SID_FM_SHOW_PROPERTIES
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Asynchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem SortDown SID_FM_SORTDOWN
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_TABLE;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem Sortup SID_FM_SORTUP
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_TABLE;
+]
+
+//--------------------------------------------------------------------------
+SdrShadowItem Shadow SID_ATTR_FILL_SHADOW
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = TRUE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DOCUMENT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem RecSearch SID_FM_SEARCH
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* status: */
+ SlotType = SfxVoidItem
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SvxDrawAlignItem ObjectAlign SID_OBJECT_ALIGN
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+ PseudoSlots = TRUE;
+ PseudoPrefix = SID_OBJECT_ALIGN;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem SbaExecuteSql SID_FM_EXECUTE
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_TABLE;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem ObjectForwardOne SID_FRAME_UP
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem ZoomVisArea SID_SIZE_VISAREA
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_DOCUMENT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem ZoomPageWidth SID_SIZE_PAGE_WIDTH
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem ZoomPage SID_SIZE_PAGE
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem ShowForms SID_SHOW_FORMS
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem Gallery SID_GALLERY
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_INSERT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem SetDefault SID_SET_DEFAULT
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem SimEditOptions SID_SIM_EDITOPTIONS
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_OPTIONS;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem ShowItemBrowser SID_SHOW_ITEMBROWSER
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem AddField SID_FM_ADD_FIELD
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Asynchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem ObjectBackOne SID_FRAME_DOWN
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem FormatUngroup SID_UNGROUP
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SvxColorItem LineColor SID_FRAME_LINECOLOR
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FRAME;
+]
+
+//--------------------------------------------------------------------------
+XFormTextStdFormItem FontWorkTextClearAttributes SID_FORMTEXT_STDFORM
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_SPECIAL;
+]
+
+//--------------------------------------------------------------------------
+XFormTextStyleItem FontWorkTextStyle SID_FORMTEXT_STYLE
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_SPECIAL;
+]
+
+//--------------------------------------------------------------------------
+SvxProtectItem RulerProtect SID_RULER_PROTECT
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem GridUse SID_GRID_USE
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = TRUE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SvxLineItem LineStyle SID_FRAME_LINESTYLE
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FRAME;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem SmEditOptions SID_SM_EDITOPTIONS
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_OPTIONS;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem TwainSelect SID_TWAIN_SELECT
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Volatile,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_INSERT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem Thesaurus SID_THESAURUS
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_OPTIONS;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem ToolEdit SID_TEXTEDIT
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_DOCUMENT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem ConvertToCurrency SID_FM_CONVERTTO_CURRENCY
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem FormFilter SID_FM_FILTER_START
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_TABLE;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem FormFilterExit SID_FM_FILTER_EXIT
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_TABLE;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem ConvertToPattern SID_FM_CONVERTTO_PATTERN
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem ConvertToFormatted SID_FM_CONVERTTO_FORMATTED
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem FormFilterNavigator SID_FM_FILTER_NAVIGATOR
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_TABLE;
+]
+
+//--------------------------------------------------------------------------
+SfxInt16Item GrafRed SID_ATTR_GRAF_RED
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem BezierSymmetric SID_BEZIER_SYMMTR
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DRAWING;
+]
+
+//--------------------------------------------------------------------------
+SfxObjectItem FmFilterNavigatorController SID_FM_FILTER_NAVIGATOR_CONTROL
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Volatile,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = ;
+]
+
+//--------------------------------------------------------------------------
+SfxInt16Item GrafLuminance SID_ATTR_GRAF_LUMINANCE
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem ConvertToList SID_FM_CONVERTTO_LISTBOX
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SvxWordLineModeItem WordMode SID_ATTR_CHAR_WORDLINEMODE
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem ConvertToCombo SID_FM_CONVERTTO_COMBOBOX
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem Rect SID_DRAW_RECT
+(SfxUInt32Item MouseStartX ID_VAL_MOUSESTART_X,SfxUInt32Item MouseStartY ID_VAL_MOUSESTART_Y,SfxUInt32Item MouseEndX ID_VAL_MOUSEEND_X,SfxUInt32Item MouseEndY ID_VAL_MOUSEEND_Y)
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* status: */
+ SlotType = SfxBoolItem
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DRAWING;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem ConvertToRadio SID_FM_CONVERTTO_RADIOBUTTON
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem ConvertToImageBtn SID_FM_CONVERTTO_IMAGEBUTTON
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem ConvertToNumeric SID_FM_CONVERTTO_NUMERIC
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+XFormTextOutlineItem FontWorkTextOutline SID_FORMTEXT_OUTLINE
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_SPECIAL;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem ConvertToFileControl SID_FM_CONVERTTO_FILECONTROL
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem ConvertToDate SID_FM_CONVERTTO_DATE
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SvxAddressItem _Address SID_ATTR_ADDRESS
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = ;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem Circle_Unfilled SID_DRAW_CIRCLE_NOFILL
+(SfxUInt32Item CenterX ID_VAL_CENTER_X,SfxUInt32Item CenterY ID_VAL_CENTER_Y,SfxUInt32Item AxisX ID_VAL_AXIS_X,SfxUInt32Item AxisY ID_VAL_AXIS_Y)
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* status: */
+ SlotType = SfxBoolItem
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DRAWING;
+]
+
+//--------------------------------------------------------------------------
+SfxUInt32Item State3D SID_3D_STATE
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_OPTIONS;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem Assign3D SID_3D_ASSIGN
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_OPTIONS;
+]
+
+//--------------------------------------------------------------------------
+SvxBoxInfoItem BorderInner SID_ATTR_BORDER_INNER
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SvxPagePosSizeItem RulerPagePos SID_RULER_PAGE_POS
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = ;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem Text SID_ATTR_CHAR
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DRAWING;
+]
+
+//--------------------------------------------------------------------------
+SvxBoxItem BorderOuter SID_ATTR_BORDER_OUTER
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SwShadowItem Shadow SID_ATTR_BORDER_SHADOW
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxInt16Item GrafGreen SID_ATTR_GRAF_GREEN
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxUInt16Item GrafMode SID_ATTR_GRAF_MODE
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem ConvertToTime SID_FM_CONVERTTO_TIME
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SfxUInt16Item GrafTransparence SID_ATTR_GRAF_TRANSPARENCE
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem GrafInvert SID_ATTR_GRAF_INVERT
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = TRUE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem SearchOn FID_SEARCH_ON
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem JustifyPara FN_SET_JUSTIFY_PARA
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem RemoveFilterSort SID_FM_REMOVE_FILTER_SORT
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_TABLE;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem SpacePara1 SID_ATTR_PARA_LINESPACE_10
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem InsertNumbering FN_NUM_NUMBERING_ON
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* status: */
+ SlotType = SfxBoolItem
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_ENUMERATION;
+]
+
+//--------------------------------------------------------------------------
+SfxUInt32Item InsertGalleryPic SID_GALLERY_FORMATS
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_INSERT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem ComboBox SID_FM_COMBOBOX
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = TRUE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem Zoom100Percent SID_SIZE_REAL
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem DrawSelect SID_DRAW_SELECT
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_DRAWING;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem NewRecord SID_FM_RECORD_NEW
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* status: */
+ SlotType = SfxBoolItem
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SvxLRSpaceItem LeftRightMargin SID_ATTR_LRSPACE
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+XFillStyleItem FillStyle SID_ATTR_FILL_STYLE
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem DistributeSelection SID_DISTRIBUTE_DLG
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_MODIFY;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem AutoFormat SID_AUTOFORMAT
+(SfxStringItem aFormatName SID_AUTOFORMAT)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem RightPara SID_ATTR_PARA_ADJUST_RIGHT
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem CirclePie SID_DRAW_CIRCLEPIE
+(SfxUInt32Item CenterX ID_VAL_CENTER_X,SfxUInt32Item CenterY ID_VAL_CENTER_Y,SfxUInt32Item AxisX ID_VAL_AXIS_X,SfxUInt32Item AxisY ID_VAL_AXIS_Y,SfxUInt32Item StartAngle ID_VAL_ANGLESTART,SfxUInt32Item EndAngle ID_VAL_ANGLEEND)
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* status: */
+ SlotType = SfxBoolItem
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DRAWING;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem InsertSound SID_INSERT_SOUND
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_INSERT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem ConvertToImageControl SID_FM_CONVERTTO_IMAGECONTROL
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SvxBoxItem BorderStyle SID_ATTR_BORDER
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem Listbox SID_INSERT_LISTBOX
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem InsertMode SID_ATTR_INSERT
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = TRUE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxSetItem SearchSet FID_SEARCH_SEARCHSET
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem Merge SID_POLY_MERGE
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_MODIFY;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem ContourExecute SID_CONTOUR_EXEC
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_EDIT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem FormFiltered SID_FM_FORM_FILTERED
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = TRUE,
+ Container = FALSE,
+ Synchron;
+
+ /* status: */
+ SlotType = SfxBoolItem
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem OutlineBullet SID_OUTLINE_BULLET
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Volatile,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem ViewFormAsGrid SID_FM_VIEW_AS_GRID
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* status: */
+ SlotType = SfxBoolItem
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem Substract SID_POLY_SUBSTRACT
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_MODIFY;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem TimeField SID_FM_TIMEFIELD
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = TRUE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem RemoveFilter SID_FM_FILTER_REMOVE
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_TABLE;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem ConvertToButton SID_FM_CONVERTTO_BUTTON
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem ConvertToFixed SID_FM_CONVERTTO_FIXEDTEXT
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem FormattedField SID_FM_FORMATTEDFIELD
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = TRUE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem ChangeControlType SID_FM_CHANGECONTROLTYPE
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = ;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem RecUndo SID_FM_RECORD_UNDO
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* status: */
+ SlotType = SfxBoolItem
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem Spelling SID_SPELLING
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_OPTIONS;
+]
+
+//--------------------------------------------------------------------------
+SwPageSizeItem PageSize SID_ATTR_PAGE_SIZE
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem CirclePie_Unfilled SID_DRAW_CIRCLEPIE_NOFILL
+(SfxUInt32Item CenterX ID_VAL_CENTER_X,SfxUInt32Item CenterY ID_VAL_CENTER_Y,SfxUInt32Item AxisX ID_VAL_AXIS_X,SfxUInt32Item AxisY ID_VAL_AXIS_Y,SfxUInt32Item StartAngle ID_VAL_ANGLESTART,SfxUInt32Item EndAngle ID_VAL_ANGLEEND)
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* status: */
+ SlotType = SfxBoolItem
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DRAWING;
+]
+
+//--------------------------------------------------------------------------
+SfxObjectItem PropertyController SID_FM_PROPERTY_CONTROL
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = ;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem ScEditOptions SID_SC_EDITOPTIONS
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = TRUE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_OPTIONS;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem BezierEdge SID_BEZIER_EDGE
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DRAWING;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem Checkbox SID_INSERT_CHECKBOX
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem FormatGroup SID_GROUP
+()
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SvxPageModelItem PageStyle SID_ATTR_PARA_MODEL
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+XLineStyleItem XLineStyle SID_ATTR_LINE_STYLE
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+XLineColorItem XLineColor SID_ATTR_LINE_COLOR
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem ConvertToGroup SID_FM_CONVERTTO_GROUPBOX
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem EllipseCut SID_DRAW_ELLIPSECUT
+(SfxUInt32Item CenterX ID_VAL_CENTER_X,SfxUInt32Item CenterY ID_VAL_CENTER_Y,SfxUInt32Item AxisX ID_VAL_AXIS_X,SfxUInt32Item AxisY ID_VAL_AXIS_Y,SfxUInt32Item StartAngle ID_VAL_ANGLESTART,SfxUInt32Item EndAngle ID_VAL_ANGLEEND)
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* status: */
+ SlotType = SfxBoolItem
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DRAWING;
+]
+
+//--------------------------------------------------------------------------
+SvxLongLRSpaceItem SetLongLeftRightMargin SID_ATTR_LONG_LRSPACE
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = ;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem LineEndStyle SID_ATTR_LINEEND_STYLE
+(XLineStartItem LineStart SID_ATTR_LINEEND_STYLE,XLineEndItem LineEnd FN_PARAM_2,SfxUInt32Item StartWidth FN_PARAM_3,SfxUInt32Item EndWidth FN_PARAM_4)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* status: */
+ SlotType = SfxBoolItem
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem InsertGraphic SID_INSERT_GRAPHIC
+(SfxStringItem FileName SID_INSERT_GRAPHIC,SfxStringItem FilterName FN_PARAM_FILTER,SfxBoolItem Link FN_PARAM_1)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_INSERT;
+]
+
+//--------------------------------------------------------------------------
+SvxWeightItem Bold SID_ATTR_CHAR_WEIGHT
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = TRUE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SvxUnderlineItem Underline SID_ATTR_CHAR_UNDERLINE
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = TRUE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem ShowRuler SID_RULER
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem Flash SID_ATTR_FLASH
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = TRUE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+XFillGradientItem FillGradient SID_ATTR_FILL_GRADIENT
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+XFillColorItem FillColor SID_ATTR_FILL_COLOR
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+XFillBitmapItem FillBitmap SID_ATTR_FILL_BITMAP
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_SPECIAL;
+]
+
+//--------------------------------------------------------------------------
+SvxLineSpacingItem LineSpacing SID_ATTR_PARA_LINESPACE
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SvxFmtKeepItem ParaKeepTogether SID_ATTR_PARA_KEEP
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SvxPaperBinItem PagePaperBin SID_ATTR_PAGE_PAPERBIN
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem LeftRightParaMargin SID_ATTR_PARA_LRSPACE
+(SvxLRSpaceItem LRSpace SID_ATTR_PARA_LRSPACE)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem PolyFormen SID_POLY_FORMEN
+()
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Asynchron;
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_MODIFY;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem SpacePara2 SID_ATTR_PARA_LINESPACE_20
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem SpacePara15 SID_ATTR_PARA_LINESPACE_15
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxVoidItem SetPageMaxSize SID_ATTR_PAGE_MAXSIZE
+(SvxSizeItem Size SID_ATTR_PAGE_MAXSIZE)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SvxPageItem PageStyle SID_ATTR_PAGE
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = TRUE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SvxLongULSpaceItem SetLongTopBottomMargin SID_ATTR_LONG_ULSPACE
+(SvxLongULSpaceItem Space SID_ATTR_LONG_ULSPACE)
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SvxHyphenZoneItem SetHyphenZone SID_ATTR_PARA_HYPHENZONE
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem LeftPara SID_ATTR_PARA_ADJUST_LEFT
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem CenterPara SID_ATTR_PARA_ADJUST_CENTER
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem JustifyPara SID_ATTR_PARA_ADJUST_BLOCK
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SvxPostureItem Italic SID_ATTR_CHAR_POSTURE
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = TRUE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SvxCaseMapItem CaseMap SID_ATTR_CHAR_CASEMAP
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem DesignMode SID_FM_DESIGN_MODE
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = TRUE,
+ Toggle = TRUE,
+ Container = FALSE,
+ Asynchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_CONTROLS;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem BezierMove SID_BEZIER_MOVE
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_DRAWING;
+]
+
+//--------------------------------------------------------------------------
+SvxLanguageItem Language SID_ATTR_CHAR_LANGUAGE
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SvxZoomItem Zoom SID_ATTR_ZOOM
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Asynchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = TRUE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SvxCrossedOutItem Strikeout SID_ATTR_CHAR_STRIKEOUT
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = TRUE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SvxColumnItem RulerBorders SID_RULER_BORDERS
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = TRUE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
+SvxAutoKernItem PairKerning SID_ATTR_CHAR_AUTOKERN
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SfxBoolItem FontWork SID_FONTWORK
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = TRUE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SvxEscapementItem Escapement SID_ATTR_CHAR_ESCAPEMENT
+
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_FORMAT;
+]
+
+//--------------------------------------------------------------------------
+SvxFontItem CharFontName SID_ATTR_CHAR_FONT
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ Synchron;
+
+ Readonly = FALSE,
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_FORMAT;
+]
+
diff --git a/svx/sdi/svxitems.sdi b/svx/sdi/svxitems.sdi
new file mode 100644
index 000000000000..49cce355a1cc
--- /dev/null
+++ b/svx/sdi/svxitems.sdi
@@ -0,0 +1,720 @@
+
+//-------------------------------------------------------------------------
+
+enum SvxAdjust
+{
+ SVX_ADJUST_LEFT,
+ SVX_ADJUST_RIGHT,
+ SVX_ADJUST_BLOCK,
+ SVX_ADJUST_CENTER,
+ SVX_ADJUST_BLOCKLINE,
+ SVX_ADJUST_END
+};
+item SvxAdjust SvxAdjustItem;
+
+//-------------------------------------------------------------------------
+
+enum SvxCaseMap
+{
+ SVX_CASEMAP_NOT_MAPPED,
+ SVX_CASEMAP_VERSALIEN,
+ SVX_CASEMAP_GEMEINE,
+ SVX_CASEMAP_TITEL,
+ SVX_CASEMAP_KAPITAELCHEN,
+ SVX_CASEMAP_END
+};
+item SvxCaseMap SvxCaseMapItem;
+
+//-------------------------------------------------------------------------
+
+enum CharSet
+{
+ CHARSET_DONTKNOW,
+ CHARSET_ANSI,
+ CHARSET_MAC,
+ CHARSET_IBMPC_437,
+ CHARSET_IBMPC_850,
+ CHARSET_IBMPC_860,
+ CHARSET_IBMPC_861,
+ CHARSET_IBMPC_863,
+ CHARSET_IBMPC_865,
+ CHARSET_SYSTEM,
+ CHARSET_SYMBOL
+};
+
+//-------------------------------------------------------------------------
+
+enum FontFamily
+{
+ FAMILY_DONTKNOW,
+ FAMILY_DECORATIVE,
+ FAMILY_MODERN,
+ FAMILY_ROMAN,
+ FAMILY_SCRIPT,
+ FAMILY_SWISS,
+ FAMILY_SYSTEM
+};
+
+//-------------------------------------------------------------------------
+
+enum FontPitch
+{
+ PITCH_DONTKNOW,
+ PITCH_FIXED,
+ PITCH_VARIABLE
+};
+
+//-------------------------------------------------------------------------
+
+struct SvxFont
+{
+ String StyleName MID_FONTSTYLE;
+ FontPitch Pitch MID_FONTPITCH;
+ CharSet CharSet MID_CHARSET;
+ FontFamily Family MID_FONTFAMILY;
+ String FamilyName MID_FONTFAMILYNAME;
+};
+item SvxFont SvxFontItem;
+
+//-------------------------------------------------------------------------
+
+enum FontWeight
+{
+ WEIGHT_DONTKNOW,
+ WEIGHT_THIN,
+ WEIGHT_ULTRALIGHT,
+ WEIGHT_LIGHT,
+ WEIGHT_SEMILIGHT,
+ WEIGHT_NORMAL,
+ WEIGHT_MEDIUM,
+ WEIGHT_SEMIBOLD,
+ WEIGHT_BOLD,
+ WEIGHT_ULTRABOLD,
+ WEIGHT_BLACK
+};
+item FontWeight SvxWeightItem;
+
+//-------------------------------------------------------------------------
+
+enum FontUnderline
+{
+ UNDERLINE_NONE,
+ UNDERLINE_SINGLE,
+ UNDERLINE_DOUBLE,
+ UNDERLINE_DOTTED
+};
+item FontUnderline SvxUnderlineItem;
+
+//-------------------------------------------------------------------------
+
+enum FontStrikeout
+{
+ STRIKEOUT_NONE,
+ STRIKEOUT_SINGLE,
+ STRIKEOUT_DOUBLE
+};
+item FontStrikeout SvxCrossedOutItem;
+
+//-------------------------------------------------------------------------
+
+enum FontItalic
+{
+ ITALIC_NONE,
+ ITALIC_OBLIQUE,
+ ITALIC_NORMAL
+};
+item FontItalic SvxPostureItem;
+
+//-------------------------------------------------------------------------
+
+enum SvxDbType
+{
+ DBTYPE_STARBASE,
+ DBTYPE_ODBC,
+ DBTYPE_WATCOM
+};
+item SvxDbType SvxDbTypeItem;
+
+//-------------------------------------------------------------------------
+
+enum SvxLineSpace
+{
+ SVX_LINE_SPACE_AUTO,
+ SVX_LINE_SPACE_MAX,
+ SVX_LINE_SPACE_MIN,
+ SVX_LINE_SPACE_END
+};
+item SvxLineSpace SvxLineSpaceItem;
+
+//-------------------------------------------------------------------------
+
+enum SvxInterLineSpace
+{
+ SVX_INTER_LINE_SPACE_OFF,
+ SVX_INTER_LINE_SPACE_PROP,
+ SVX_INTER_LINE_SPACE_FIX,
+ SVX_INTER_LINE_SPACE_END
+};
+item SvxInterLineSpace SvxInterLineSpaceItem;
+
+//-------------------------------------------------------------------------
+
+enum SvxBreak
+{
+ SVX_BREAK_NONE,
+ SVX_BREAK_COLUMN_BEFORE,
+ SVX_BREAK_COLUMN_AFTER,
+ SVX_BREAK_COLUMN_BOTH,
+ SVX_BREAK_PAGE_BEFORE,
+ SVX_BREAK_PAGE_AFTER,
+ SVX_BREAK_PAGE_BOTH,
+ SVX_BREAK_END
+};
+item SvxBreak SvxBreakItem;
+
+//-------------------------------------------------------------------------
+
+enum BrushStyle
+{
+ BRUSH_NULL,
+ BRUSH_SOLID,
+ BRUSH_HORZ,
+ BRUSH_VERT,
+ BRUSH_CROSS,
+ BRUSH_DIAGCROSS,
+ BRUSH_UPDIAG,
+ BRUSH_DOWNDIAG,
+ BRUSH_25,
+ BRUSH_50,
+ BRUSH_75,
+ BRUSH_BITMAP
+};
+item BrushStyle BrushStyleItem;
+
+//-------------------------------------------------------------------------
+
+enum SvxNumType
+{
+ SVX_CHARS_UPPER_LETTER,
+ SVX_CHARS_LOWER_LETTER,
+ SVX_ROMAN_UPPER,
+ SVX_ROMAN_LOWER,
+ SVX_ARABIC,
+ SVX_NUMBER_NONE,
+ SVX_CHAR_SPECIAL,
+ SVX_PAGEDESC
+};
+item SvxNumType SvxNumTypeItem;
+
+//-------------------------------------------------------------------------
+
+enum SvxShadowLocation
+{
+ SVX_SHADOW_NONE,
+ SVX_SHADOW_TOPLEFT,
+ SVX_SHADOW_TOPRIGHT,
+ SVX_SHADOW_BOTTOMLEFT,
+ SVX_SHADOW_BOTTOMRIGHT,
+ SVX_SHADOW_END
+};
+item SvxShadowLocation SvxShadowLocationItem;
+
+//-------------------------------------------------------------------------
+
+struct SvxBrush
+{
+ BrushStyle Style MID_BRUSHSTYLE;
+ BOOL Transparent MID_TRANSPARENT;
+ UINT32 BackColor MID_BG_COLOR;
+ UINT32 FillColor MID_FG_COLOR;
+ String GrfFilename MID_FILENAME;
+ String GrfFiltername MID_FILTERNAME;
+ UINT16 GrfPosition MID_POSITION;
+};
+item SvxBrush SvxBrushItem;
+
+//-------------------------------------------------------------------------
+
+struct SvxCharSetColor
+{
+ CharSet CharSet MID_CHARSET;
+ UINT32 Color MID_FG_COLOR;
+};
+item SvxCharSetColor SvxCharSetColorItem;
+
+//-------------------------------------------------------------------------
+
+item BOOL SvxAutoKernItem;
+item UINT32 SvxColorItem;
+item BOOL SvxContourItem;
+
+//-------------------------------------------------------------------------
+
+struct SvxEscapement
+{
+ INT16 Escapement MID_ESCAPEMENT;
+ BYTE RelativeSize MID_PROPORTIONAL;
+};
+item SvxEscapement SvxEscapementItem;
+
+//-------------------------------------------------------------------------
+
+struct SvxFmtBreak
+{
+ UINT16 Break MID_BREAKxxx;
+}
+item SvxFmtBreak SvxFmtBreakItem;
+
+//-------------------------------------------------------------------------
+
+item BOOL SvxFmtKeepItem;
+item BOOL SvxFmtSplitItem;
+
+struct SvxFontHeight
+{
+ UINT32 Size MID_HEIGHT;
+ BYTE Prop MID_PROPORTIONAL;
+};
+item SvxFontHeight SvxFontHeightItem;
+
+//-------------------------------------------------------------------------
+
+struct SvxHyphenZone
+{
+ BOOL Hyphen MID_HYPHEN;
+ BOOL PageEnd MID_PAGEEND;
+ BYTE MinLead MID_MINLEAD;
+ BYTE MinTrail MID_MINTRAIL;
+ BYTE MaxHyphens MID_MAXHYPHENS;
+};
+item SvxHyphenZone SvxHyphenZoneItem;
+
+//-------------------------------------------------------------------------
+
+item INT16 SvxKerningItem;
+
+//-------------------------------------------------------------------------
+
+struct SvxLine
+{
+ UINT32 LineFGColor MID_FG_COLOR;
+ UINT16 LineOutWidth MID_OUTER_WIDTH;
+ UINT16 LineInWidth MID_INNER_WIDTH;
+ UINT16 LineDistance MID_DISTANCE;
+};
+item SvxLine SvxLineItem;
+
+//-------------------------------------------------------------------------
+
+struct SvxLRSpace
+{
+ UINT16 LeftMargin MID_LEFT_MARGIN; // % or direct
+ INT16 IndentFirstLine MID_FIRSTLINE_OFFSET; // % or direct
+ UINT16 RightMargin MID_RIGHT_MARGIN; // % or direct
+};
+item SvxLRSpace SvxLRSpaceItem;
+
+//-------------------------------------------------------------------------
+
+item UINT16 SvxLanguageItem;
+
+struct SvxLineSpacing
+{
+ SvxLineSpace LineSpace MID_LINESPACE;
+ UINT16 LineHeight MID_HEIGHT;
+ UINT16 PropLineHeight MID_PROPORTIONAL; // % or direct
+ SvxInterLineSpace InterLineSpace MID_INTER_LINESPACE;
+ INT16 InterSpace MID_INTER_SPACE;
+};
+item SvxLineSpacing SvxLineSpacingItem;
+
+//-------------------------------------------------------------------------
+
+item BOOL SvxNoHyphenItem;
+item BOOL SvxNoLinebreakItem;
+item BOOL SvxOpaqueItem;
+item BYTE SvxOrphansItem;
+
+//-------------------------------------------------------------------------
+
+struct SvxPage
+{
+ String DescName MID_DESCNAMExxx;
+ BOOL Landscape MID_LANDSCAPE;
+ UINT16 Use MID_USExxx;
+ SvxNumType NumType MID_NUMTYPExxx;
+};
+item SvxPage SvxPageItem;
+
+//-------------------------------------------------------------------------
+
+item String SvxPageModelItem;
+
+//-------------------------------------------------------------------------
+
+struct SvxPagePosSize
+{
+ INT32 XPos MID_X;
+ INT32 YPos MID_Y;
+ INT32 Width MID_WIDTH;
+ INT32 Height MID_HEIGHT;
+};
+item SvxPagePosSize SvxPagePosSizeItem;
+
+//-------------------------------------------------------------------------
+
+item BYTE SvxPaperBinItem;
+
+//-------------------------------------------------------------------------
+
+item String SvxPostItAuthorItem;
+item String SvxPostItDateItem;
+item String SvxPostItTextItem;
+
+item FontItalic SvxPostureItem;
+
+item BOOL SvxPrintItem;
+
+item UINT16 SvxPropSizeItem;
+
+item String SvxProtectItem;
+
+item BOOL SvxShadowedItem;
+
+//-------------------------------------------------------------------------
+
+struct SvxSearch
+{
+ BOOL Backward MID_SEARCH_BACKWARD;
+ BOOL InSelection MID_SEARCH_INSELECTION;
+ BOOL CaseSensitive MID_SEARCH_CASESENSITIVE;
+ BOOL RegExp MID_SEARCH_REGEXPR;
+ BOOL WordOnly MID_SEARCH_WORDONLY;
+ UINT16 Mode MID_SEARCH_MODE;
+ UINT16 Order MID_SEARCH_ORDER;
+ BOOL AllTables MID_SEARCH_ALLTABLES;
+ BOOL Similarity MID_SEARCH_LEV_ON;
+ BOOL Relaxed MID_SEARCH_LEV_RELAXED;
+ UINT16 Other MID_SEARCH_LEV_OTHER;
+ UINT16 Shorter MID_SEARCH_LEV_SHORTER;
+ UINT16 Longer MID_SEARCH_LEV_LONGER;
+ BOOL Pattern MID_SEARCH_PATTERN;
+};
+item SvxSearch SvxSearchItem;
+
+//-------------------------------------------------------------------------
+
+struct SvxShadow
+{
+ SvxShadowLocation ShadowLocation MID_LOCATION;
+ UINT16 ShadowWidth MID_WIDTH;
+ BrushStyle ShadowStyle MID_BRUSHSTYLE;
+ BOOL ShadowTransparent MID_TRANSPARENT;
+ UINT32 ShadowBackColor MID_BG_COLOR;
+ UINT32 ShadowFillColor MID_FG_COLOR;
+};
+item SvxShadow SvxShadowItem;
+
+//-------------------------------------------------------------------------
+
+struct SvxSize
+{
+ UINT32 Width MID_WIDTH;
+ UINT32 Height MID_HEIGHT;
+};
+item SvxSize SvxSizeItem;
+
+//-------------------------------------------------------------------------
+
+struct SvxULSpace
+{
+ UINT16 TopMargin MID_UPPER; // % or direct
+ UINT16 BottomMargin MID_LOWER; // % or direct
+};
+item SvxULSpace SvxULSpaceItem
+
+//-------------------------------------------------------------------------
+
+enum SvxChooseControlEnum
+{
+ SVX_SNAP_PUSHBUTTON,
+ SVX_SNAP_CHECKBOX,
+ SVX_SNAP_RADIOBUTTON,
+ SVX_SNAP_SPINBUTTON,
+ SVX_SNAP_FIXEDTEXT,
+ SVX_SNAP_GROUPBOX,
+ SVX_SNAP_LISTBOX,
+ SVX_SNAP_COMBOBOX,
+ SVX_SNAP_EDIT,
+ SVX_SNAP_HSCROLLBAR,
+ SVX_SNAP_VSCROLLBAR,
+ SVX_SNAP_PREVIEW,
+ SVX_SNAP_SELECT,
+ SVX_SNAP_URLBUTTON
+}
+item SvxChooseControlEnum SvxChooseControlItem;
+
+//-------------------------------------------------------------------------
+
+enum SvxDrawToolEnum
+{
+ SVX_SNAP_DRAW_SELECT,
+ //
+ SVX_SNAP_DRAW_LINE,
+ SVX_SNAP_DRAW_RECT,
+ SVX_SNAP_DRAW_ELLIPSE,
+ SVX_SNAP_DRAW_POLYGON_NOFILL,
+ SVX_SNAP_DRAW_BEZIER_NOFILL,
+ SVX_SNAP_DRAW_FREELINE_NOFILL,
+ SVX_SNAP_DRAW_ARC,
+ SVX_SNAP_DRAW_PIE,
+ SVX_SNAP_DRAW_CIRCLECUT,
+ SVX_SNAP_DRAW_TEXT,
+ SVX_SNAP_DRAW_TEXT_MARQUEE,
+ SVX_SNAP_DRAW_CAPTION
+}
+item SvxDrawToolEnum SvxDrawToolEnumItem;
+
+//-------------------------------------------------------------------------
+
+enum SvxDrawAlignEnum
+{
+ SVX_OBJECT_ALIGN_LEFT,
+ SVX_OBJECT_ALIGN_CENTER,
+ SVX_OBJECT_ALIGN_RIGHT,
+ SVX_OBJECT_ALIGN_UP,
+ SVX_OBJECT_ALIGN_MIDDLE,
+ SVX_OBJECT_ALIGN_DOWN
+}
+item SvxDrawAlignEnum SvxDrawAlignEnumItem;
+
+//-------------------------------------------------------------------------
+
+enum SvxDrawBezierEnum
+{
+ SVX_BEZIER_MOVE,
+ SVX_BEZIER_INSERT,
+ SVX_BEZIER_DELETE,
+ SVX_BEZIER_CUTLINE,
+ SVX_BEZIER_CONVERT,
+ SVX_BEZIER_EDGE,
+ SVX_BEZIER_SMOOTH,
+ SVX_BEZIER_SYMMTR,
+ SVX_BEZIER_CLOSE,
+ SVX_BEZIER_ELIMINATE_POINTS
+}
+item SvxDrawBezierEnum SvxDrawBezierEnumItem;
+
+//-------------------------------------------------------------------------
+
+item SvxDrawBezierEnum SvxDrawBezierItem;
+item SvxDrawAlignEnum SvxDrawAlignItem;
+item SvxDrawToolEnum SvxDrawToolItem;
+item BYTE SvxWidowsItem;
+item BOOL SvxWordLineModeItem;
+item INT16 SvxZoomItem;
+item String SvxTabStopItem;
+
+//-------------------------------------------------------------------------
+
+enum SvxCellHorJustifyEnum
+{
+ SVX_HOR_JUSTIFY_STANDARD,
+ SVX_HOR_JUSTIFY_LEFT,
+ SVX_HOR_JUSTIFY_CENTER,
+ SVX_HOR_JUSTIFY_RIGHT,
+ SVX_HOR_JUSTIFY_BLOCK,
+ SVX_HOR_JUSTIFY_REPEAT
+};
+item SvxCellHorJustifyEnum SvxCellHorJustifyEnumItem;
+
+enum SvxCellVerJustifyEnum
+{
+ SVX_VER_JUSTIFY_STANDARD,
+ SVX_VER_JUSTIFY_TOP,
+ SVX_VER_JUSTIFY_CENTER,
+ SVX_VER_JUSTIFY_BOTTOM
+};
+item SvxCellVerJustifyEnum SvxCellVerJustifyEnumItem;
+
+//-------------------------------------------------------------------------
+
+enum SvxCellOrientationEnum
+{
+ SVX_ORIENTATION_STANDARD,
+ SVX_ORIENTATION_TOPBOTTOM,
+ SVX_ORIENTATION_BOTTOMTOP,
+ SVX_ORIENTATION_STACKED
+};
+item SvxCellOrientationEnum SvxCellOrientationEnumItem;
+
+//-------------------------------------------------------------------------
+
+item SvxCellHorJustifyEnum SvxHorJustifyItem;
+item SvxCellVerJustifyEnum SvxVerJustifyItem;
+item SvxCellOrientationEnum SvxOrientationItem;
+
+//-------------------------------------------------------------------------
+
+struct SvxLongLRSpace
+{
+ INT32 Left MID_LEFT;
+ INT32 Right MID_RIGHT;
+};
+item SvxLongLRSpace SvxLongLRSpaceItem;
+
+//-------------------------------------------------------------------------
+
+struct SvxLongULSpace
+{
+ INT32 Upper MID_UPPER;
+ INT32 Lower MID_LOWER;
+};
+item SvxLongULSpace SvxLongULSpaceItem;
+
+//-------------------------------------------------------------------------
+
+struct SvxHyperlink
+{
+ String LinkName MID_HLINK_NAME;
+ String LinkURL MID_HLINK_URL;
+ String LinkTarget MID_HLINK_TARGET;
+ UINT16 LinkType MID_HLINK_TYPE;
+};
+item SvxHyperlink SvxHyperlinkItem;
+
+//-------------------------------------------------------------------------
+
+struct Address
+{
+ String City MID_ADR_CITY;
+ String Company MID_ADR_COMPANY;
+ String Country MID_ADR_COUNTRY;
+ String EMail MID_ADR_EMAIL;
+ String Fax MID_ADR_FAX;
+ String FirstName MID_ADR_FIRSTNAME;
+ String ID MID_ADR_ID;
+ String LastName MID_ADR_LASTNAME;
+ String Phone MID_ADR_PHONE;
+ String PhonePrivate MID_ADR_PHONEPRIVATE;
+ String Position MID_ADR_POSITION;
+ String Street MID_ADR_STREET;
+ String Title MID_ADR_TITLE;
+ String ZIPCode MID_ADR_ZIPCODE;
+ String State MID_ADR_STATE;
+};
+item Address SvxAddressItem;
+
+//-------------------------------------------------------------------------
+
+/*interface TabStops: Object
+[
+ uuid( "E3701920-6131-11cf-89CA-008029E4B0B1" );
+]
+{
+ void Insert SID_TAB_INSERT
+ (
+ UINT16 Pos SID_TAB_POSITION,
+ String Adjust SID_TAB_ADJUST,
+ String Decimal SID_TAB_DECIMAL,
+ String Fill SID_TAB_FILLCHAR
+ );
+
+ void Remove SID_TAB_REMOVE
+ (
+ UINT16 Pos SID_TAB_POSITION
+ );
+ void RemoveByIndex SID_TAB_REMOVE_BY_INDEX
+ (
+ UINT16 Idx SID_TAB_POSITION
+ );
+ void RemoveAll SID_TAB_REMOVE_ALL();
+
+ UINT16 Count SID_TAB_COUNT;
+ UINT16 GetPosition SID_TAB_POSITION(UINT16 No SID_TAB_POSITION);
+ String GetAdjust SID_TAB_ADJUST(UINT16 No SID_TAB_POSITION);
+ String GetDecimal SID_TAB_DECIMAL(UINT16 No SID_TAB_POSITION);
+ String GetFillChar SID_TAB_FILLCHAR(UINT16 No SID_TAB_POSITION);
+};
+*/
+//-------------------------------------------------------------------------
+/*
+shell _TabStop_Dummy
+{
+ import TabStops [Automation];
+}
+*/
+//-------------------------------------------------------------------------
+
+/*interface BorderLine: Object
+[
+ uuid( "FF4D6443-6C71-11cf-B45A-00A0243D303B" );
+]
+{
+ UINT16 Style SID_ATTR_LINE_STYLE;
+ UINT32 Color SID_ATTR_LINE_COLOR;
+}
+*/
+//-------------------------------------------------------------------------
+
+/*interface Border: Object
+[
+ uuid( "FF4D6444-6C71-11cf-B45A-00A0243D303B" );
+]
+{
+ SbxObject TopLine SID_BORDER_TOPLINE;
+ SbxObject BottomLine SID_BORDER_BOTTOMLINE;
+ SbxObject LeftLine SID_BORDER_LEFTLINE;
+ SbxObject RightLine SID_BORDER_RIGHTLINE;
+ SbxObject HorizontalLine SID_BORDER_HORIZONTALLINE;
+ SbxObject VerticalLine SID_BORDER_VERTICALLINE;
+
+ UINT16 Distance SID_BORDER_DISTANCE;
+}
+ */
+item String SvxBoxItem;
+item String SvxBoxInfoItem;
+
+struct SvxPageSize
+{
+ UINT32 PageWidth MID_WIDTH;
+ UINT32 PageHeight MID_HEIGHT;
+};
+item SvxPageSize SvxPageSizeItem;
+
+//umdefiniert wg. doppelter Benutzung
+struct SwPageSize
+{
+ UINT32 PageWidth MID_WIDTH;
+ UINT32 PageHeight MID_HEIGHT;
+};
+item SwPageSize SwPageSizeItem;
+/* umdefiniertes ShadowItem fuer das Shadow-Interface */
+struct SwShadow
+{
+ SvxShadowLocation Location MID_LOCATION;
+ UINT16 Width MID_WIDTH;
+ BrushStyle Style MID_BRUSHSTYLE;
+ BOOL Transparent MID_TRANSPARENT;
+ UINT32 BackColor MID_BG_COLOR;
+ UINT32 FillColor MID_FG_COLOR;
+};
+item SwShadow SwShadowItem;
+
+item BOOL SdrShadowItem;
+item String SfxSetItem;
+item String SvxColumnItem;
+item String SvxShadowItem;
+item UINT32 SvxObjectItem;
+item String SdrTextFitToSizeTypeItem;
+
+struct FmFormInfo
+{
+ INT32 Pos MID_POS ;
+ INT32 Count MID_COUNT ;
+ BOOL ReadOnly MID_READONLY ;
+} ;
+
+item FmFormInfo FmFormInfoItem ;
+
+
diff --git a/svx/sdi/svxslots.hrc b/svx/sdi/svxslots.hrc
new file mode 100644
index 000000000000..5e920a9ce2d1
--- /dev/null
+++ b/svx/sdi/svxslots.hrc
@@ -0,0 +1,64 @@
+/*************************************************************************
+ *
+ * $RCSfile: svxslots.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:06 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#include <sfx2/sfx.hrc>
+#include <svxids.hrc>
+#include <sfx2/sfxsids.hrc>
+
diff --git a/svx/sdi/svxslots.sdi b/svx/sdi/svxslots.sdi
new file mode 100644
index 000000000000..17259477f4be
--- /dev/null
+++ b/svx/sdi/svxslots.sdi
@@ -0,0 +1,53 @@
+import "sfxslots.ilb"
+
+module
+"BD25A480-30AB-101C-A17D-000024021828"
+"C049C7E0-30AB-101C-A17D-000024021828"
+SvxItems
+[
+HelpText( "Svx-Items" )
+SlotIdFile( "svxslots.hrc" )
+TypeLibFile( "svxslots.tlb" )
+]
+{
+ //=========================================================================
+
+ include "svxitems.sdi"
+ include "xoitems.sdi"
+ include "svxnew.sdi"
+ include "svx.sdi"
+ include "fmslots.sdi"
+
+/* interface SearchSettings: Object
+ [
+ uuid = "19B54420-184C-101D-B8ED-3273768855A7";
+ ]
+ {
+ SID_SEARCH_ITEM
+ [
+ ExecMethod = _ExecSearch;
+ StateMethod = _StateSearch;
+ ]
+ }
+
+ interface Interior : Object
+ [
+ uuid ( "6CFA4FC0-608E-11cf-89CB-008029E4B0B1" )
+ ]
+ {
+ SID_ATTR_BRUSH // status(final|play)
+ [
+ ExecMethod = ExecBckCol ;
+ StateMethod = GetBckColState ;
+ ]
+ }
+ //============================================================================
+ interface OLEObjects : Collection
+ [
+ uuid = "BA338A43-064E-11d0-89CB-008029E4B0B1" ;
+ ]
+ {
+ }
+*/
+}
+
diff --git a/svx/sdi/xoitems.sdi b/svx/sdi/xoitems.sdi
new file mode 100644
index 000000000000..60c60d67e23e
--- /dev/null
+++ b/svx/sdi/xoitems.sdi
@@ -0,0 +1,30 @@
+item String XFillAttrSetItem;
+item String XFillBitmapItem;
+item String XFillColorItem;
+item String XFillGradientItem;
+item String XFillHatchItem;
+item String XFillStyleItem;
+item String XLineAttrSetItem;
+item String XLineColorItem;
+item String XLineDashItem;
+item String XLineEndItem;
+item String XLineEndWidthItem;
+item String XLineEndCenterItem;
+item String XLineStartItem;
+item String XLineStartWidthItem;
+item String XLineStartCenterItem;
+item String XLineStyleItem;
+item String XLineWidthItem;
+item String XFormTextStyleItem;
+item String XFormTextAdjustItem;
+item String XFormTextDistanceItem;
+item String XFormTextStartItem;
+item String XFormTextMirrorItem;
+item String XFormTextStdFormItem;
+item String XFormTextHideFormItem;
+item String XFormTextOutlineItem;
+item String XFormTextShadowItem;
+item String XFormTextShadowColorItem;
+item String XFormTextShadowXValItem;
+item String XFormTextShadowYValItem;
+
diff --git a/svx/source/dialog/_bmpmask.cxx b/svx/source/dialog/_bmpmask.cxx
new file mode 100644
index 000000000000..3d8f10b8187f
--- /dev/null
+++ b/svx/source/dialog/_bmpmask.cxx
@@ -0,0 +1,1159 @@
+/*************************************************************************
+ *
+ * $RCSfile: _bmpmask.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:06 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _SV_WRKWIN_HXX
+#include <vcl/wrkwin.hxx>
+#endif
+#ifndef _SHL_HXX
+#include <tools/shl.hxx>
+#endif
+#ifndef _SV_METAACT_HXX
+#include <vcl/metaact.hxx>
+#endif
+#ifndef _VALUESET_HXX
+#include <svtools/valueset.hxx>
+#endif
+#ifndef _SFXENUMITEM_HXX
+#include <svtools/eitem.hxx>
+#endif
+#ifndef _SFXDISPATCH_HXX //autogen
+#include <sfx2/dispatch.hxx>
+#endif
+
+#pragma hdrstop
+
+#define BMPMASK_PRIVATE
+
+#include <dialmgr.hxx>
+#include <bmpmask.hxx>
+#include <dialogs.hrc>
+#include <bmpmask.hrc>
+#include <svxids.hrc>
+
+//-------------------------------------------------------------------------
+
+#define BMP_RESID(nId) ResId(nId, DIALOG_MGR())
+#define TRANSP_STRING "Transparent"
+#define TRANSP_COL (Color( 252, 252, 252 ))
+#define OWN_CALLMODE SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD
+
+//-------------------------------------------------------------------------
+
+#define TEST_COLS() \
+{ \
+ nR = aCol.GetRed(); nG = aCol.GetGreen(); nB = aCol.GetBlue(); \
+ for( i = 0; i < nCount; i++ ) \
+ { \
+ if ( ( pMinR[i] <= nR ) && ( pMaxR[i] >= nR ) && \
+ ( pMinG[i] <= nG ) && ( pMaxG[i] >= nG ) && \
+ ( pMinB[i] <= nB ) && ( pMaxB[i] >= nB ) ) \
+ { \
+ aCol = pDstCols[i]; bReplace = TRUE; break; \
+ } \
+ } \
+}
+
+// -------------------------------------------------------------------------
+
+SFX_IMPL_DOCKINGWINDOW( SvxBmpMaskChildWindow, SID_BMPMASK )
+
+// -------------------------------------------------------------------------
+
+class ColorWindow : public Control
+{
+ Color aColor;
+
+
+public:
+
+ ColorWindow( Window* pParent, WinBits nWinStyle ) :
+ Control( pParent, nWinStyle ),
+ aColor( COL_WHITE ) {};
+
+ ColorWindow( Window* pParent, const ResId& rId ) :
+ Control( pParent, rId ),
+ aColor( COL_WHITE ) {};
+
+ void SetColor( const Color& rColor )
+ {
+ aColor = rColor;
+ Invalidate();
+ }
+
+ virtual void Paint( const Rectangle& rRect );
+};
+
+//-------------------------------------------------------------------------
+
+class MaskSet : public ValueSet
+{
+ SvxBmpMask* pSvxBmpMask;
+
+
+public:
+
+ MaskSet( SvxBmpMask* pParent, WinBits nWinStyle );
+ MaskSet( SvxBmpMask* pParent, const ResId& rId );
+
+ virtual void Select();
+};
+
+//-------------------------------------------------------------------------
+
+MaskSet::MaskSet( SvxBmpMask* pParent, WinBits nWinStyle ) :
+ ValueSet ( pParent, nWinStyle ),
+ pSvxBmpMask ( pParent )
+{
+}
+
+//-------------------------------------------------------------------------
+
+MaskSet::MaskSet( SvxBmpMask* pParent, const ResId& rId ) :
+ ValueSet ( pParent, rId ),
+ pSvxBmpMask ( pParent )
+{
+}
+
+//-------------------------------------------------------------------------
+
+void MaskSet::Select()
+{
+ ValueSet::Select();
+
+ switch ( GetSelectItemId() )
+ {
+ case ( 1 ) :
+ pSvxBmpMask->aLbColor1.GrabFocus();
+ break;
+
+ case ( 2 ) :
+ pSvxBmpMask->aLbColor2.GrabFocus();
+ break;
+
+ case ( 3 ) :
+ pSvxBmpMask->aLbColor3.GrabFocus();
+ break;
+
+ case ( 4 ) :
+ pSvxBmpMask->aLbColor4.GrabFocus();
+ break;
+
+ default :
+ break;
+ }
+}
+
+//-------------------------------------------------------------------------
+
+class MaskData
+{
+ SvxBmpMask* pMask;
+ BOOL bIsReady;
+ BOOL bExecState;
+ SfxBindings& rBindings;
+
+public:
+ MaskData( SvxBmpMask* pBmpMask, SfxBindings& rBind );
+
+ BOOL IsCbxReady() const { return bIsReady; }
+ void SetExecState( BOOL bState ) { bExecState = bState; }
+ BOOL IsExecReady() const { return bExecState; }
+
+ DECL_LINK( PipetteHdl, ToolBox* pTbx );
+ DECL_LINK( CbxHdl, CheckBox* pCbx );
+ DECL_LINK( CbxTransHdl, CheckBox* pCbx );
+ DECL_LINK( FocusLbHdl, ColorLB* pLb );
+ DECL_LINK( ExecHdl, PushButton* pBtn );
+};
+
+//-------------------------------------------------------------------------
+
+MaskData::MaskData( SvxBmpMask* pBmpMask, SfxBindings& rBind ) :
+
+ pMask ( pBmpMask ),
+ bIsReady ( FALSE ),
+ bExecState ( FALSE ),
+ rBindings ( rBind )
+
+{
+}
+
+//-------------------------------------------------------------------------
+
+IMPL_LINK( MaskData, PipetteHdl, ToolBox*, pTbx )
+{
+ SfxBoolItem aBItem( SID_BMPMASK_PIPETTE,
+ pTbx->IsItemChecked( TBI_PIPETTE ) );
+
+ rBindings.GetDispatcher()->Execute( SID_BMPMASK_PIPETTE, OWN_CALLMODE, &aBItem, 0L );
+
+ return 0;
+}
+
+//-------------------------------------------------------------------------
+
+IMPL_LINK( MaskData, CbxHdl, CheckBox*, pCbx )
+{
+ bIsReady = pMask->aCbx1.IsChecked() || pMask->aCbx2.IsChecked() ||
+ pMask->aCbx3.IsChecked() || pMask->aCbx4.IsChecked();
+
+ if ( bIsReady && IsExecReady() )
+ pMask->aBtnExec.Enable();
+ else
+ pMask->aBtnExec.Disable();
+
+ // Wenn eine Checkbox gecheckt wurde, wird die Pipette enabled
+ if ( pCbx->IsChecked() )
+ {
+ if ( pCbx == &( pMask->aCbx1 ) )
+ pMask->pQSet->SelectItem( 1 );
+ else if ( pCbx == &( pMask->aCbx2 ) )
+ pMask->pQSet->SelectItem( 2 );
+ else if ( pCbx == &( pMask->aCbx3 ) )
+ pMask->pQSet->SelectItem( 3 );
+ else if ( pCbx == &( pMask->aCbx4 ) )
+ pMask->pQSet->SelectItem( 4 );
+
+ pMask->pQSet->Select();
+
+ pMask->aTbxPipette.CheckItem( TBI_PIPETTE, TRUE );
+ PipetteHdl( &( pMask->aTbxPipette ) );
+ }
+
+ return 0;
+}
+
+//-------------------------------------------------------------------------
+
+IMPL_LINK( MaskData, CbxTransHdl, CheckBox*, pCbx )
+{
+ if ( bIsReady = pCbx->IsChecked() )
+ {
+ pMask->pQSet->Disable();
+ pMask->pCtlPipette->Disable();
+ pMask->aCbx1.Disable();
+ pMask->aSp1.Disable();
+ pMask->aCbx2.Disable();
+ pMask->aSp2.Disable();
+ pMask->aCbx3.Disable();
+ pMask->aSp3.Disable();
+ pMask->aCbx4.Disable();
+ pMask->aSp4.Disable();
+ pMask->aTbxPipette.Disable();
+
+ pMask->aLbColor1.Disable();
+ pMask->aLbColor2.Disable();
+ pMask->aLbColor3.Disable();
+ pMask->aLbColor4.Disable();
+ pMask->aLbColorTrans.Enable();
+ }
+ else
+ {
+ pMask->pQSet->Enable();
+ pMask->pCtlPipette->Enable();
+ pMask->aCbx1.Enable();
+ pMask->aSp1.Enable();
+ pMask->aCbx2.Enable();
+ pMask->aSp2.Enable();
+ pMask->aCbx3.Enable();
+ pMask->aSp3.Enable();
+ pMask->aCbx4.Enable();
+ pMask->aSp4.Enable();
+ pMask->aTbxPipette.Enable();
+
+ pMask->aLbColor1.Enable();
+ pMask->aLbColor2.Enable();
+ pMask->aLbColor3.Enable();
+ pMask->aLbColor4.Enable();
+ pMask->aLbColorTrans.Disable();
+
+ bIsReady = pMask->aCbx1.IsChecked() || pMask->aCbx2.IsChecked() ||
+ pMask->aCbx3.IsChecked() || pMask->aCbx4.IsChecked();
+ }
+
+ if ( bIsReady && IsExecReady() )
+ pMask->aBtnExec.Enable();
+ else
+ pMask->aBtnExec.Disable();
+
+ return 0L;
+}
+
+//-------------------------------------------------------------------------
+
+IMPL_LINK( MaskData, FocusLbHdl, ColorLB*, pLb )
+{
+ if ( pLb == &( pMask->aLbColor1 ) )
+ pMask->pQSet->SelectItem( 1 );
+ else if ( pLb == &( pMask->aLbColor2 ) )
+ pMask->pQSet->SelectItem( 2 );
+ else if ( pLb == &( pMask->aLbColor3 ) )
+ pMask->pQSet->SelectItem( 3 );
+ else if ( pLb == &( pMask->aLbColor4 ) )
+ pMask->pQSet->SelectItem( 4 );
+
+ return 0;
+}
+
+//-------------------------------------------------------------------------
+
+IMPL_LINK( MaskData, ExecHdl, PushButton*, pBtn )
+{
+ SfxBoolItem aBItem( SID_BMPMASK_EXEC, TRUE );
+ rBindings.GetDispatcher()->Execute( SID_BMPMASK_EXEC, OWN_CALLMODE, &aBItem, 0L );
+
+ return 0L;
+}
+
+//-------------------------------------------------------------------------
+
+void ColorWindow::Paint( const Rectangle &Rect )
+{
+ const Color& rOldLineColor = GetLineColor();
+ const Color& rOldFillColor = GetFillColor();
+
+ SetLineColor( aColor );
+ SetFillColor( aColor );
+
+ DrawRect( Rectangle( Point(), GetSizePixel() ) );
+
+ SetLineColor( rOldLineColor );
+ SetFillColor( rOldFillColor );
+}
+
+//-------------------------------------------------------------------------
+
+SvxBmpMaskSelectItem::SvxBmpMaskSelectItem( USHORT nId, SvxBmpMask& rMask,
+ SfxBindings& rBindings ) :
+ SfxControllerItem ( nId, rBindings ),
+ rBmpMask ( rMask)
+{
+}
+
+//-------------------------------------------------------------------------
+
+void SvxBmpMaskSelectItem::StateChanged( USHORT nSID, SfxItemState eState,
+ const SfxPoolItem* pItem )
+{
+ if ( ( nSID == SID_BMPMASK_EXEC ) && pItem )
+ {
+ const SfxBoolItem* pStateItem = PTR_CAST( SfxBoolItem, pItem );
+
+ DBG_ASSERT( pStateItem || pItem == 0, "SfxBoolItem erwartet");
+
+ rBmpMask.SetExecState( pStateItem->GetValue() );
+ }
+}
+
+//-------------------------------------------------------------------------
+
+SvxBmpMaskChildWindow::SvxBmpMaskChildWindow( Window* pParent, USHORT nId,
+ SfxBindings* pBindings,
+ SfxChildWinInfo* pInfo ) :
+ SfxChildWindow( pParent, nId )
+{
+ pWindow = new SvxBmpMask( pBindings, this, pParent,
+ BMP_RESID( RID_SVXDLG_BMPMASK ) );
+ SvxBmpMask* pDlg = (SvxBmpMask*) pWindow;
+
+ eChildAlignment = SFX_ALIGN_NOALIGNMENT;
+
+ pDlg->Initialize( pInfo );
+}
+
+//-------------------------------------------------------------------------
+
+SvxBmpMask::SvxBmpMask( SfxBindings *pBindinx,
+ SfxChildWindow *pCW,
+ Window* pParent,
+ const ResId& rResId ) :
+ SfxDockingWindow ( pBindinx, pCW, pParent, rResId ),
+ aTbxPipette ( this, ResId( TBX_PIPETTE ) ),
+ pCtlPipette ( new ColorWindow( this, ResId( WND_PIPETTE ) ) ),
+ aBtnExec ( this, ResId( BTN_EXEC ) ),
+ pQSet ( new MaskSet( this, ResId( QCOL_1 ) ) ),
+ aCbx1 ( this, ResId( CBX_1 ) ),
+ aSp1 ( this, ResId( SP_1 ) ),
+ aCbx2 ( this, ResId( CBX_2 ) ),
+ aSp2 ( this, ResId( SP_2 ) ),
+ aCbx3 ( this, ResId( CBX_3 ) ),
+ aSp3 ( this, ResId( SP_3 ) ),
+ aCbx4 ( this, ResId( CBX_4 ) ),
+ aSp4 ( this, ResId( SP_4 ) ),
+ aCbxTrans ( this, ResId( CBX_TRANS ) ),
+ aGrpQ ( this, ResId( GRP_Q ) ),
+ pColTab ( NULL ),
+ pData ( new MaskData( this, *pBindinx ) ),
+ aPipetteColor ( COL_WHITE ),
+ aSelItem ( SID_BMPMASK_EXEC, *this, *pBindinx ),
+ aLbColor1 ( this, ResId ( LB_1 ) ),
+ aLbColor2 ( this, ResId ( LB_2 ) ),
+ aLbColor3 ( this, ResId ( LB_3 ) ),
+ aLbColor4 ( this, ResId ( LB_4 ) ),
+ aLbColorTrans ( this, ResId ( LB_TRANS ) ),
+ aFt1 ( this, ResId ( FT_1 ) ),
+ aFt2 ( this, ResId ( FT_2 ) ),
+ aFt3 ( this, ResId ( FT_3 ) )
+{
+ FreeResource();
+
+ aTbxPipette.SetSizePixel( aTbxPipette.CalcWindowSizePixel() );
+ aTbxPipette.SetSelectHdl( LINK( pData, MaskData, PipetteHdl ) );
+ aBtnExec.SetClickHdl( LINK( pData, MaskData, ExecHdl ) );
+
+ aCbx1.SetClickHdl( LINK( pData, MaskData, CbxHdl ) );
+ aCbx2.SetClickHdl( LINK( pData, MaskData, CbxHdl ) );
+ aCbx3.SetClickHdl( LINK( pData, MaskData, CbxHdl ) );
+ aCbx4.SetClickHdl( LINK( pData, MaskData, CbxHdl ) );
+ aCbxTrans.SetClickHdl( LINK( pData, MaskData, CbxTransHdl ) );
+
+ aLbColor1.SetGetFocusHdl( LINK( pData, MaskData, FocusLbHdl ) );
+ aLbColor2.SetGetFocusHdl( LINK( pData, MaskData, FocusLbHdl ) );
+ aLbColor3.SetGetFocusHdl( LINK( pData, MaskData, FocusLbHdl ) );
+ aLbColor4.SetGetFocusHdl( LINK( pData, MaskData, FocusLbHdl ) );
+
+ aSp1.SetValue( 10 );
+ aSp2.SetValue( 10 );
+ aSp3.SetValue( 10 );
+ aSp4.SetValue( 10 );
+
+ pQSet->SetStyle( pQSet->GetStyle() | WB_DOUBLEBORDER | WB_ITEMBORDER );
+ pQSet->SetColCount( 1 );
+ pQSet->SetLineCount( 4 );
+ pQSet->SetExtraSpacing( 1 );
+ pQSet->InsertItem( 1, aPipetteColor );
+ pQSet->InsertItem( 2, aPipetteColor );
+ pQSet->InsertItem( 3, aPipetteColor );
+ pQSet->InsertItem( 4, aPipetteColor );
+ pQSet->SelectItem( 1 );
+
+ pQSet->Show();
+}
+
+//-------------------------------------------------------------------------
+
+SvxBmpMask::~SvxBmpMask()
+{
+ delete pQSet;
+ delete pCtlPipette;
+ delete pData;
+}
+
+//-------------------------------------------------------------------------
+
+BOOL SvxBmpMask::Close()
+{
+ SfxBoolItem aItem2( SID_BMPMASK_PIPETTE, FALSE );
+ GetBindings().GetDispatcher()->Execute( SID_BMPMASK_PIPETTE, OWN_CALLMODE, &aItem2, 0L );
+
+ return SfxDockingWindow::Close();
+}
+
+//-------------------------------------------------------------------------
+
+BOOL SvxBmpMask::NeedsColorTable() const
+{
+ return ( aLbColor1.GetEntryCount() == 0 );
+}
+
+//-------------------------------------------------------------------------
+
+void SvxBmpMask::SetColorTable( const XColorTable* pTable )
+{
+ if ( pTable && ( pTable != pColTab ) )
+ {
+ const String aTransp( BMP_RESID( RID_SVXDLG_BMPMASK_STR_TRANSP ) );
+
+ pColTab = pTable;
+
+ aLbColorTrans.Fill( pColTab );
+ aLbColorTrans.SelectEntryPos( 0 );
+
+ aLbColor1.Fill( pColTab );
+ aLbColor1.InsertEntry( TRANSP_COL, aTransp, 0 );
+ aLbColor1.SelectEntryPos( 0 );
+
+ aLbColor2.Fill( pColTab );
+ aLbColor2.InsertEntry( TRANSP_COL, aTransp, 0 );
+ aLbColor2.SelectEntryPos( 0 );
+
+ aLbColor3.Fill( pColTab );
+ aLbColor3.InsertEntry( TRANSP_COL, aTransp, 0 );
+ aLbColor3.SelectEntryPos( 0 );
+
+ aLbColor4.Fill( pColTab );
+ aLbColor4.InsertEntry( TRANSP_COL, aTransp, 0 );
+ aLbColor4.SelectEntryPos( 0 );
+ }
+}
+
+//-------------------------------------------------------------------------
+
+void SvxBmpMask::SetColor( const Color& rColor )
+{
+ aPipetteColor = rColor;
+ pCtlPipette->SetColor( aPipetteColor );
+}
+
+//-------------------------------------------------------------------------
+
+void SvxBmpMask::PipetteClicked()
+{
+ USHORT nId = pQSet->GetSelectItemId();
+
+ pQSet->SetItemColor( nId, aPipetteColor );
+
+ switch( nId )
+ {
+ case ( 1 ) :
+ {
+ aCbx1.Check( TRUE );
+ pData->CbxHdl( &aCbx1 );
+ }
+ break;
+
+ case ( 2 ) :
+ {
+ aCbx2.Check( TRUE );
+ pData->CbxHdl( &aCbx2 );
+ }
+ break;
+
+ case ( 3 ) :
+ {
+ aCbx3.Check( TRUE );
+ pData->CbxHdl( &aCbx3 );
+ }
+ break;
+
+ case ( 4 ) :
+ {
+ aCbx4.Check( TRUE );
+ pData->CbxHdl( &aCbx4 );
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ aTbxPipette.CheckItem( TBI_PIPETTE, FALSE );
+ pData->PipetteHdl( &aTbxPipette );
+}
+
+//-------------------------------------------------------------------------
+
+void SvxBmpMask::SetExecState( BOOL bEnable )
+{
+ pData->SetExecState( bEnable );
+
+ if ( pData->IsExecReady() && pData->IsCbxReady() )
+ aBtnExec.Enable();
+ else
+ aBtnExec.Disable();
+}
+
+//-------------------------------------------------------------------------
+
+USHORT SvxBmpMask::InitColorArrays( Color* pSrcCols, Color* pDstCols, ULONG* pTols )
+{
+ USHORT nCount = 0;
+
+ if ( aCbx1.IsChecked() )
+ {
+ pSrcCols[nCount] = pQSet->GetItemColor( 1 );
+ pDstCols[nCount] = aLbColor1.GetSelectEntryColor();
+ pTols[nCount++] = aSp1.GetValue();
+ }
+
+ if ( aCbx2.IsChecked() )
+ {
+ pSrcCols[nCount] = pQSet->GetItemColor( 2 );
+ pDstCols[nCount] = aLbColor2.GetSelectEntryColor();
+ pTols[nCount++] = aSp2.GetValue();
+ }
+
+ if ( aCbx3.IsChecked() )
+ {
+ pSrcCols[nCount] = pQSet->GetItemColor( 3 );
+ pDstCols[nCount] = aLbColor3.GetSelectEntryColor();
+ pTols[nCount++] = aSp3.GetValue();
+ }
+
+ if ( aCbx4.IsChecked() )
+ {
+ pSrcCols[nCount] = pQSet->GetItemColor( 4 );
+ pDstCols[nCount] = aLbColor4.GetSelectEntryColor();
+ pTols[nCount++] = aSp4.GetValue();
+ }
+
+ return nCount;
+}
+
+//-------------------------------------------------------------------------
+
+Bitmap SvxBmpMask::ImpMask( const Bitmap& rBitmap )
+{
+ Bitmap aBitmap( rBitmap );
+ Color pSrcCols[4];
+ Color pDstCols[4];
+ ULONG pTols[4];
+ const USHORT nCount = InitColorArrays( pSrcCols, pDstCols, pTols );
+
+ EnterWait();
+ aBitmap.Replace( pSrcCols, pDstCols, nCount, pTols );
+ LeaveWait();
+
+ return aBitmap;
+}
+
+//-------------------------------------------------------------------------
+
+BitmapEx SvxBmpMask::ImpMask( const BitmapEx& rBitmapEx )
+{
+ return BitmapEx( ImpMask( rBitmapEx.GetBitmap() ), rBitmapEx.GetMask() );
+}
+
+//-------------------------------------------------------------------------
+
+BitmapEx SvxBmpMask::ImpMaskTransparent( const BitmapEx& rBitmapEx, const Color& rColor, const long nTol )
+{
+ EnterWait();
+
+ BitmapEx aBmpEx;
+ Bitmap aMask( rBitmapEx.GetBitmap().CreateMask( rColor, nTol ) );
+
+ if( rBitmapEx.IsTransparent() )
+ aMask.CombineSimple( rBitmapEx.GetMask(), BMP_COMBINE_OR );
+
+ aBmpEx = BitmapEx( rBitmapEx.GetBitmap(), aMask );
+ LeaveWait();
+
+ return aBmpEx;
+}
+
+//-------------------------------------------------------------------------
+
+Animation SvxBmpMask::ImpMask( const Animation& rAnimation )
+{
+ Animation aAnimation( rAnimation );
+ Color pSrcCols[4];
+ Color pDstCols[4];
+ ULONG pTols[4];
+ USHORT nCount = InitColorArrays( pSrcCols, pDstCols, pTols );
+ USHORT nAnimationCount = aAnimation.Count();
+
+ for( USHORT i = 0; i < nAnimationCount; i++ )
+ {
+ AnimationBitmap aAnimBmp( aAnimation.Get( i ) );
+ aAnimBmp.aBmpEx = Mask( aAnimBmp.aBmpEx ).GetBitmapEx();
+ aAnimation.Replace( aAnimBmp, i );
+ }
+
+ return aAnimation;
+}
+
+//-------------------------------------------------------------------------
+
+GDIMetaFile SvxBmpMask::ImpMask( const GDIMetaFile& rMtf )
+{
+ GDIMetaFile aMtf;
+ Color pSrcCols[4];
+ Color pDstCols[4];
+ ULONG pTols[4];
+ USHORT nCount = InitColorArrays( pSrcCols, pDstCols, pTols );
+ BOOL pTrans[4];
+
+ // Falls keine Farben ausgewaehlt, kopieren wir nur das Mtf
+ if( !nCount )
+ aMtf = rMtf;
+ else
+ {
+ Color aCol;
+ long nVal;
+ long nTol;
+ long nR;
+ long nG;
+ long nB;
+ long* pMinR = new long[nCount];
+ long* pMaxR = new long[nCount];
+ long* pMinG = new long[nCount];
+ long* pMaxG = new long[nCount];
+ long* pMinB = new long[nCount];
+ long* pMaxB = new long[nCount];
+ USHORT i;
+ BOOL bReplace;
+
+ aMtf.SetPrefSize( rMtf.GetPrefSize() );
+ aMtf.SetPrefMapMode( rMtf.GetPrefMapMode() );
+
+ // Farbvergleichsarrays vorbereiten
+ for( i = 0; i < nCount; i++ )
+ {
+ nTol = ( pTols[i] * 255L ) / 100L;
+
+ nVal = ( (long) pSrcCols[i].GetRed() );
+ pMinR[i] = Max( nVal - nTol, 0L );
+ pMaxR[i] = Min( nVal + nTol, 255L );
+
+ nVal = ( (long) pSrcCols[i].GetGreen() );
+ pMinG[i] = Max( nVal - nTol, 0L );
+ pMaxG[i] = Min( nVal + nTol, 255L );
+
+ nVal = ( (long) pSrcCols[i].GetBlue() );
+ pMinB[i] = Max( nVal - nTol, 0L );
+ pMaxB[i] = Min( nVal + nTol, 255L );
+
+ pTrans[ i ] = ( pDstCols[ i ] == TRANSP_COL );
+ }
+
+ // Actions untersuchen und Farben ggf. ersetzen
+ for( ULONG nAct = 0UL, nActCount = rMtf.GetActionCount(); nAct < nActCount; nAct++ )
+ {
+ MetaAction* pAction = rMtf.GetAction( nAct );
+
+ bReplace = FALSE;
+
+ switch( pAction->GetType() )
+ {
+ case( META_PIXEL_ACTION ):
+ {
+ MetaPixelAction* pAct = (MetaPixelAction*) pAction;
+
+ aCol = pAct->GetColor();
+ TEST_COLS();
+
+ if( bReplace )
+ pAct = new MetaPixelAction( pAct->GetPoint(), aCol );
+ else
+ pAct->Duplicate();
+
+ aMtf.AddAction( pAct );
+ }
+ break;
+
+ case( META_LINECOLOR_ACTION ):
+ {
+ MetaLineColorAction* pAct = (MetaLineColorAction*) pAction;
+
+ aCol = pAct->GetColor();
+ TEST_COLS();
+
+ if( bReplace )
+ pAct = new MetaLineColorAction( aCol, !pTrans[ i ] );
+ else
+ pAct->Duplicate();
+
+ aMtf.AddAction( pAct );
+ }
+ break;
+
+ case( META_FILLCOLOR_ACTION ):
+ {
+ MetaFillColorAction* pAct = (MetaFillColorAction*) pAction;
+
+ aCol = pAct->GetColor();
+ TEST_COLS();
+
+ if( bReplace )
+ pAct = new MetaFillColorAction( aCol, !pTrans[ i ] );
+ else
+ pAct->Duplicate();
+
+ aMtf.AddAction( pAct );
+ }
+ break;
+
+ case( META_TEXTCOLOR_ACTION ):
+ {
+ MetaTextColorAction* pAct = (MetaTextColorAction*) pAction;
+
+ aCol = pAct->GetColor();
+ TEST_COLS();
+
+ if( bReplace )
+ pAct = new MetaTextColorAction( aCol );
+ else
+ pAct->Duplicate();
+
+ aMtf.AddAction( pAct );
+ }
+ break;
+
+ case( META_TEXTFILLCOLOR_ACTION ):
+ {
+ MetaTextFillColorAction* pAct = (MetaTextFillColorAction*) pAction;
+
+ aCol = pAct->GetColor();
+ TEST_COLS();
+
+ if( bReplace )
+ pAct = new MetaTextFillColorAction( aCol, !pTrans[ i ] );
+ else
+ pAct->Duplicate();
+
+ aMtf.AddAction( pAct );
+ }
+ break;
+
+ case( META_FONT_ACTION ):
+ {
+ MetaFontAction* pAct = (MetaFontAction*) pAction;
+ Font aFont( pAct->GetFont() );
+
+ aCol = aFont.GetColor();
+ TEST_COLS();
+
+ if( bReplace )
+ {
+ aFont.SetColor( aCol );
+ pAct = new MetaFontAction( aFont );
+ }
+ else
+ pAct->Duplicate();
+
+ aMtf.AddAction( pAct );
+ }
+ break;
+
+ case( META_WALLPAPER_ACTION ):
+ {
+ MetaWallpaperAction* pAct = (MetaWallpaperAction*) pAction;
+ Wallpaper aWall( pAct->GetWallpaper() );
+
+ aCol = aWall.GetColor();
+ TEST_COLS();
+
+ if( bReplace )
+ {
+ aWall.SetColor( aCol );
+ pAct = new MetaWallpaperAction( pAct->GetRect(), aWall );
+ }
+ else
+ pAct->Duplicate();
+
+ aMtf.AddAction( pAct );
+ }
+ break;
+
+ case( META_BMP_ACTION ):
+ {
+ MetaBmpAction* pAct = (MetaBmpAction*) pAction;
+ const Bitmap aBmp( Mask( pAct->GetBitmap() ).GetBitmap() );
+
+ pAct = new MetaBmpAction( pAct->GetPoint(), aBmp );
+ aMtf.AddAction( pAct );
+ }
+ break;
+
+ case( META_BMPSCALE_ACTION ):
+ {
+ MetaBmpScaleAction* pAct = (MetaBmpScaleAction*) pAction;
+ const Bitmap aBmp( Mask( pAct->GetBitmap() ).GetBitmap() );
+
+ pAct = new MetaBmpScaleAction( pAct->GetPoint(), pAct->GetSize(), aBmp );
+ aMtf.AddAction( pAct );
+ }
+ break;
+
+ case( META_BMPSCALEPART_ACTION ):
+ {
+ MetaBmpScalePartAction* pAct = (MetaBmpScalePartAction*) pAction;
+ const Bitmap aBmp( Mask( pAct->GetBitmap() ).GetBitmap() );
+
+ pAct = new MetaBmpScalePartAction( pAct->GetDestPoint(), pAct->GetDestSize(),
+ pAct->GetSrcPoint(), pAct->GetSrcSize(), aBmp );
+ aMtf.AddAction( pAct );
+ }
+ break;
+
+ case( META_BMPEX_ACTION ):
+ {
+ MetaBmpExAction* pAct = (MetaBmpExAction*) pAction;
+ const BitmapEx aBmpEx( Mask( pAct->GetBitmapEx() ).GetBitmapEx() );
+
+ pAct = new MetaBmpExAction( pAct->GetPoint(), aBmpEx );
+ aMtf.AddAction( pAct );
+ }
+ break;
+
+ case( META_BMPEXSCALE_ACTION ):
+ {
+ MetaBmpExScaleAction* pAct = (MetaBmpExScaleAction*) pAction;
+ const BitmapEx aBmpEx( Mask( pAct->GetBitmapEx() ).GetBitmapEx() );
+
+ pAct = new MetaBmpExScaleAction( pAct->GetPoint(), pAct->GetSize(), aBmpEx );
+ aMtf.AddAction( pAct );
+ }
+ break;
+
+ case( META_BMPEXSCALEPART_ACTION ):
+ {
+ MetaBmpExScalePartAction* pAct = (MetaBmpExScalePartAction*) pAction;
+ const BitmapEx aBmpEx( Mask( pAct->GetBitmapEx() ).GetBitmapEx() );
+
+ pAct = new MetaBmpExScalePartAction( pAct->GetDestPoint(), pAct->GetDestSize(),
+ pAct->GetSrcPoint(), pAct->GetSrcSize(), aBmpEx );
+ aMtf.AddAction( pAct );
+ }
+ break;
+
+ default:
+ {
+ pAction->Duplicate();
+ aMtf.AddAction( pAction );
+ }
+ break;
+ }
+ }
+
+ delete[] pMinR;
+ delete[] pMaxR;
+ delete[] pMinG;
+ delete[] pMaxG;
+ delete[] pMinB;
+ delete[] pMaxB;
+ }
+
+ LeaveWait();
+
+ return aMtf;
+}
+
+//-------------------------------------------------------------------------
+
+BitmapEx SvxBmpMask::ImpReplaceTransparency( const BitmapEx& rBmpEx, const Color& rColor )
+{
+ if( rBmpEx.IsTransparent() )
+ {
+ Bitmap aBmp( rBmpEx.GetBitmap() );
+ aBmp.Replace( rBmpEx.GetMask(), rColor );
+ return aBmp;
+ }
+ else
+ return rBmpEx;
+}
+
+//-------------------------------------------------------------------------
+
+Animation SvxBmpMask::ImpReplaceTransparency( const Animation& rAnim, const Color& rColor )
+{
+ Animation aAnimation( rAnim );
+ USHORT nAnimationCount = aAnimation.Count();
+
+ for( USHORT i = 0; i < nAnimationCount; i++ )
+ {
+ AnimationBitmap aAnimBmp( aAnimation.Get( i ) );
+ aAnimBmp.aBmpEx = ImpReplaceTransparency( aAnimBmp.aBmpEx, rColor );
+ aAnimation.Replace( aAnimBmp, i );
+ }
+
+ return aAnimation;
+}
+
+//-------------------------------------------------------------------------
+
+GDIMetaFile SvxBmpMask::ImpReplaceTransparency( const GDIMetaFile& rMtf, const Color& rColor )
+{
+ VirtualDevice aVDev;
+ GDIMetaFile aMtf;
+ const MapMode& rPrefMap = rMtf.GetPrefMapMode();
+ const Size& rPrefSize = rMtf.GetPrefSize();
+ const ULONG nActionCount = rMtf.GetActionCount();
+
+ aVDev.EnableOutput( FALSE );
+ aMtf.Record( &aVDev );
+ aMtf.SetPrefSize( rPrefSize );
+ aMtf.SetPrefMapMode( rPrefMap );
+ aVDev.SetLineColor( rColor );
+ aVDev.SetFillColor( rColor );
+
+ // Actions nacheinander abspielen; zuerst
+ // den gesamten Bereich auf die Ersatzfarbe setzen
+ aVDev.DrawRect( Rectangle( rPrefMap.GetOrigin(), rPrefSize ) );
+ for ( ULONG i = 0; i < nActionCount; i++ )
+ {
+ MetaAction* pAct = rMtf.GetAction( i );
+
+ pAct->Duplicate();
+ aMtf.AddAction( pAct );
+ }
+
+ aMtf.Stop();
+ aMtf.WindStart();
+
+ return aMtf;
+}
+
+//-------------------------------------------------------------------------
+
+Graphic SvxBmpMask::Mask( const Graphic& rGraphic )
+{
+ Graphic aGraphic( rGraphic );
+ const Color aReplColor( aLbColorTrans.GetSelectEntryColor() );
+
+ switch( rGraphic.GetType() )
+ {
+ case( GRAPHIC_BITMAP ):
+ {
+ if( rGraphic.IsAnimated() )
+ {
+ // Transparenz ersetzen?
+ if ( aCbxTrans.IsChecked() )
+ aGraphic = ImpReplaceTransparency( rGraphic.GetAnimation(), aReplColor );
+ else
+ aGraphic = ImpMask( rGraphic.GetAnimation() );
+ }
+ else
+ {
+ // Transparenz ersetzen?
+ if( aCbxTrans.IsChecked() )
+ {
+ if( aGraphic.IsTransparent() )
+ {
+ BitmapEx aBmpEx( ImpReplaceTransparency( aGraphic.GetBitmapEx(), aReplColor ) );
+ const Size aSize( aBmpEx.GetSizePixel() );
+
+ if( aSize.Width() && aSize.Height() )
+ aGraphic = aBmpEx;
+ }
+ }
+ else
+ {
+ Color pSrcCols[4];
+ Color pDstCols[4];
+ ULONG pTols[4];
+ USHORT nCount = InitColorArrays( pSrcCols, pDstCols, pTols );
+
+ if( nCount )
+ {
+ // erstmal alle Transparent-Farben setzen
+ for( USHORT i = 0; i < nCount; i++ )
+ {
+ // Haben wir eine Transparenzfarbe?
+ if( pDstCols[i] == TRANSP_COL )
+ {
+ BitmapEx aBmpEx( ImpMaskTransparent( aGraphic.GetBitmapEx(),
+ pSrcCols[ i ], pTols[ i ] ) );
+ const Size aSize( aBmpEx.GetSizePixel() );
+
+ if( aSize.Width() && aSize.Height() )
+ aGraphic = aBmpEx;
+ }
+ }
+
+ // jetzt noch einmal mit den normalen Farben ersetzen
+ Bitmap aBitmap( ImpMask( aGraphic.GetBitmap() ) );
+ Size aSize( aBitmap.GetSizePixel() );
+
+ if ( aSize.Width() && aSize.Height() )
+ {
+ if ( aGraphic.IsTransparent() )
+ aGraphic = Graphic( BitmapEx( aBitmap, aGraphic.GetBitmapEx().GetMask() ) );
+ else
+ aGraphic = aBitmap;
+ }
+ }
+ }
+ }
+ }
+ break;
+
+ case( GRAPHIC_GDIMETAFILE ):
+ {
+ GDIMetaFile aMtf( aGraphic.GetGDIMetaFile() );
+
+ // Transparenz ersetzen?
+ if( aCbxTrans.IsChecked() )
+ aMtf = ImpReplaceTransparency( aMtf, aReplColor );
+ else
+ aMtf = ImpMask( aMtf );
+
+ Size aSize( aMtf.GetPrefSize() );
+ if ( aSize.Width() && aSize.Height() )
+ aGraphic = Graphic( aMtf );
+ else
+ aGraphic = rGraphic;
+ }
+ break;
+
+ default:
+ aGraphic = rGraphic;
+ break;
+ }
+
+ if( aGraphic != rGraphic )
+ {
+ aGraphic.SetPrefSize( rGraphic.GetPrefSize() );
+ aGraphic.SetPrefMapMode( rGraphic.GetPrefMapMode() );
+ }
+
+ return aGraphic;
+}
+
+//-------------------------------------------------------------------------
+
+BOOL SvxBmpMask::IsEyedropping() const
+{
+ return aTbxPipette.IsItemChecked( TBI_PIPETTE );
+}
+
+
diff --git a/svx/source/dialog/_contdlg.cxx b/svx/source/dialog/_contdlg.cxx
new file mode 100644
index 000000000000..850fbb824e46
--- /dev/null
+++ b/svx/source/dialog/_contdlg.cxx
@@ -0,0 +1,1158 @@
+/*************************************************************************
+ *
+ * $RCSfile: _contdlg.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:06 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _SV_WRKWIN_HXX
+#include <vcl/wrkwin.hxx>
+#endif
+#ifndef _SOT_FACTORY_HXX
+#include <sot/factory.hxx>
+#endif
+#ifndef _SHL_HXX
+#include <tools/shl.hxx>
+#endif
+#ifndef _SV_SALBTYPE_HXX
+#include <vcl/salbtype.hxx> // FRound
+#endif
+#ifndef _SV_MSGBOX_HXX
+#include <vcl/msgbox.hxx>
+#endif
+#ifndef _SFXENUMITEM_HXX //autogen
+#include <svtools/eitem.hxx>
+#endif
+#ifndef _SFXDISPATCH_HXX
+#include <sfx2/dispatch.hxx>
+#endif
+#ifndef _SFX_SAVEOPT_HXX //autogen
+#include <sfx2/saveopt.hxx>
+#endif
+#include <sfx2/viewfrm.hxx>
+#pragma hdrstop
+
+#define _SDR_NOITEMS
+#define _SDR_NOTOUCH
+#define _SDR_NOTRANSFORM
+#define _SDR_NOOBJECTS
+#define _SDR_NOVIEWMARKER
+#define _SDR_NODRAGMETHODS
+#define _SDR_NOUNDO
+#define _SDR_NOXOUTDEV
+#define _XOUTBMP_STATICS_ONLY
+
+#include "dialmgr.hxx"
+#include "xoutbmp.hxx"
+#include "dialogs.hrc"
+#include "svxids.hrc"
+#include "contdlg.hxx"
+#include "contimp.hxx"
+#include "contdlg.hrc"
+#include "contwnd.hxx"
+#include "svdtrans.hxx"
+#include "svdopath.hxx"
+
+/******************************************************************************/
+
+inline String GetUnitString( long nVal_100, FieldUnit eFieldUnit, sal_Unicode cSep )
+{
+ String aVal = UniString::CreateFromInt32( MetricField::ConvertValue( nVal_100, 2, MAP_100TH_MM, eFieldUnit ) );
+
+ while( aVal.Len() < 3 )
+ aVal.Insert( sal_Unicode('0'), 0 );
+
+ aVal.Insert( cSep, aVal.Len() - 2 );
+ aVal += sal_Unicode(' ');
+ aVal += SdrFormatter::GetUnitStr( eFieldUnit );
+
+ return aVal;
+}
+
+
+/******************************************************************************/
+
+
+SFX_IMPL_FLOATINGWINDOW( SvxContourDlgChildWindow, SID_CONTOUR_DLG );
+
+
+/******************************************************************************/
+
+
+/*************************************************************************
+|*
+|* ControllerItem
+|*
+\************************************************************************/
+
+SvxContourDlgItem::SvxContourDlgItem( USHORT nId, SvxSuperContourDlg& rContourDlg, SfxBindings& rBindings ) :
+ SfxControllerItem ( nId, rBindings ),
+ rDlg ( rContourDlg )
+{
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+void SvxContourDlgItem::StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pItem )
+{
+ if ( pItem && ( SID_CONTOUR_EXEC == nSID ) )
+ {
+ const SfxBoolItem* pStateItem = PTR_CAST( SfxBoolItem, pItem );
+
+ DBG_ASSERT( pStateItem || pItem == 0, "SfxBoolItem erwartet");
+
+ rDlg.SetExecState( !pStateItem->GetValue() );
+ }
+}
+
+
+/******************************************************************************/
+
+
+/*************************************************************************
+|*
+|* Contour-Float
+|*
+\************************************************************************/
+
+SvxContourDlgChildWindow::SvxContourDlgChildWindow( Window* pParent, USHORT nId,
+ SfxBindings* pBindings, SfxChildWinInfo* pInfo ) :
+ SfxChildWindow( pParent, nId )
+{
+ Point aPt;
+ pWindow = new SvxSuperContourDlg( pBindings, this, pParent, CONT_RESID( RID_SVXDLG_CONTOUR ) );
+
+ if ( pInfo->aSize.Width() && pInfo->aSize.Height() )
+ pWindow->SetPosSizePixel( pInfo->aPos, pInfo->aSize );
+ else
+ pWindow->SetPosPixel( aPt );
+
+ if ( pInfo->nFlags & SFX_CHILDWIN_ZOOMIN )
+ ( (SvxSuperContourDlg*) pWindow )->RollUp();
+
+ eChildAlignment = SFX_ALIGN_NOALIGNMENT;
+}
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+void SvxContourDlgChildWindow::UpdateContourDlg( const Graphic& rGraphic, BOOL bGraphicLinked,
+ const PolyPolygon* pPolyPoly, void* pEditingObj )
+{
+ if ( SfxViewFrame::Current() &&
+ SfxViewFrame::Current()->HasChildWindow( SvxContourDlgChildWindow::GetChildWindowId() ) )
+ SVXCONTOURDLG()->Update( rGraphic, bGraphicLinked, pPolyPoly, pEditingObj );
+}
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+SvxContourDlg::SvxContourDlg( SfxBindings* pBindings, SfxChildWindow* pCW,
+ Window* pParent, const ResId& rResId ) :
+
+ SfxFloatingWindow ( pBindings, pCW, pParent, rResId )
+
+{
+}
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+SvxContourDlg::~SvxContourDlg()
+{
+}
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+PolyPolygon SvxContourDlg::CreateAutoContour( const Graphic& rGraphic,
+ const Rectangle* pRect,
+ const ULONG nFlags )
+{
+ Bitmap aBmp;
+ ULONG nContourFlags = XOUTBMP_CONTOUR_HORZ;
+
+ if ( rGraphic.GetType() == GRAPHIC_BITMAP )
+ {
+ if( rGraphic.IsAnimated() )
+ {
+ VirtualDevice aVDev;
+ MapMode aTransMap;
+ PolyPolygon aAnimPolyPoly;
+ const Animation aAnim( rGraphic.GetAnimation() );
+ const Size& rSizePix = aAnim.GetDisplaySizePixel();
+ const USHORT nCount = aAnim.Count();
+
+ if ( aVDev.SetOutputSizePixel( rSizePix ) )
+ {
+ aVDev.SetLineColor( Color( COL_BLACK ) );
+ aVDev.SetFillColor( Color( COL_BLACK ) );
+
+ for( USHORT i = 0; i < nCount; i++ )
+ {
+ const AnimationBitmap& rStepBmp = aAnim.Get( i );
+
+ // Polygonausgabe an die richtige Stelle schieben;
+ // dies ist der Offset des Teilbildes innerhalb
+ // der Gesamtanimation
+ aTransMap.SetOrigin( Point( rStepBmp.aPosPix.X(), rStepBmp.aPosPix.Y() ) );
+ aVDev.SetMapMode( aTransMap );
+ aVDev.DrawPolyPolygon( CreateAutoContour( rStepBmp.aBmpEx, pRect, nFlags ) );
+ }
+
+ aTransMap.SetOrigin( Point() );
+ aVDev.SetMapMode( aTransMap );
+ aBmp = aVDev.GetBitmap( Point(), rSizePix );
+ aBmp.Convert( BMP_CONVERSION_1BIT_THRESHOLD );
+ }
+ }
+ else if( rGraphic.IsTransparent() )
+ aBmp = rGraphic.GetBitmapEx().GetMask();
+ else
+ {
+ aBmp = rGraphic.GetBitmap();
+ nContourFlags |= XOUTBMP_CONTOUR_EDGEDETECT;
+ }
+ }
+ else if( rGraphic.GetType() != GRAPHIC_NONE )
+ {
+ VirtualDevice aVDev;
+ const MapMode aMap( rGraphic.GetPrefMapMode() );
+ const Size aPrefSize( rGraphic.GetPrefSize() );
+ const Point aNullPt;
+
+ if ( aVDev.SetOutputSizePixel( aVDev.LogicToPixel( Rectangle( aNullPt, aPrefSize ), aMap ).GetSize() ) )
+ {
+ rGraphic.Draw( &aVDev, aNullPt, aVDev.LogicToPixel( aPrefSize, aMap ) );
+ aBmp = aVDev.GetBitmap( aNullPt, aVDev.GetOutputSizePixel() );
+ nContourFlags |= XOUTBMP_CONTOUR_EDGEDETECT;
+ }
+ }
+
+ aBmp.SetPrefSize( rGraphic.GetPrefSize() );
+ aBmp.SetPrefMapMode( rGraphic.GetPrefMapMode() );
+
+ return PolyPolygon( XOutBitmap::GetCountour( aBmp, nContourFlags, 128, pRect ) );
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+void SvxContourDlg::ScaleContour( PolyPolygon& rContour, const Graphic& rGraphic,
+ const MapUnit eUnit, const Size& rDisplaySize )
+{
+ DBG_ASSERT( rGraphic.GetType() != GRAPHIC_NONE, "Graphic is not valid!" );
+
+ OutputDevice* pOutDev = Application::GetDefaultDevice();
+ const MapMode aDispMap( eUnit );
+ const MapMode aGrfMap( rGraphic.GetPrefMapMode() );
+ const Size aGrfSize( rGraphic.GetPrefSize() );
+ double fScaleX;
+ double fScaleY;
+ Size aOrgSize;
+ Point aNewPoint;
+ BOOL bPixelMap = aGrfMap.GetMapUnit() == MAP_PIXEL;
+
+ if ( bPixelMap )
+ aOrgSize = pOutDev->PixelToLogic( aGrfSize, aDispMap );
+ else
+ aOrgSize = pOutDev->LogicToLogic( aGrfSize, aGrfMap, aDispMap );
+
+ if ( aOrgSize.Width() && aOrgSize.Height() )
+ {
+ fScaleX = (double) rDisplaySize.Width() / aOrgSize.Width();
+ fScaleY = (double) rDisplaySize.Height() / aOrgSize.Height();
+
+ for ( USHORT j = 0, nPolyCount = rContour.Count(); j < nPolyCount; j++ )
+ {
+ Polygon& rPoly = rContour[ j ];
+
+ for ( USHORT i = 0, nCount = rPoly.GetSize(); i < nCount; i++ )
+ {
+ if ( bPixelMap )
+ aNewPoint = pOutDev->PixelToLogic( rPoly[ i ], aDispMap );
+ else
+ aNewPoint = pOutDev->LogicToLogic( rPoly[ i ], aGrfMap, aDispMap );
+
+ rPoly[ i ] = Point( FRound( aNewPoint.X() * fScaleX ), FRound( aNewPoint.Y() * fScaleY ) );
+ }
+ }
+ }
+}
+
+
+/*************************************************************************
+|*
+|* Durchschleifen an SuperClass; keine virt. Methoden, um
+|* bei IF-Aenderungen nicht inkompatibel zu werden
+|*
+\************************************************************************/
+
+void SvxContourDlg::SetExecState( BOOL bEnable )
+{
+ pSuperClass->SetExecState( bEnable );
+}
+
+void SvxContourDlg::SetGraphic( const Graphic& rGraphic )
+{
+ pSuperClass->SetGraphic( rGraphic );
+}
+
+void SvxContourDlg::SetGraphicLinked( BOOL bGraphicLinked )
+{
+ pSuperClass->SetGraphicLinked( bGraphicLinked );
+}
+
+const Graphic& SvxContourDlg::GetGraphic() const
+{
+ return pSuperClass->GetGraphic();
+}
+
+BOOL SvxContourDlg::IsGraphicChanged() const
+{
+ return pSuperClass->IsGraphicChanged();
+}
+
+void SvxContourDlg::SetPolyPolygon( const PolyPolygon& rPolyPoly )
+{
+ pSuperClass->SetPolyPolygon( rPolyPoly );
+}
+
+PolyPolygon SvxContourDlg::GetPolyPolygon()
+{
+ return pSuperClass->GetPolyPolygon( TRUE );
+}
+
+void SvxContourDlg::SetEditingObject( void* pObj )
+{
+ pSuperClass->SetEditingObject( pObj );
+}
+
+const void* SvxContourDlg::GetEditingObject() const
+{
+ return pSuperClass->GetEditingObject();
+}
+
+void SvxContourDlg::Update( const Graphic& rGraphic, BOOL bGraphicLinked,
+ const PolyPolygon* pPolyPoly, void* pEditingObj )
+{
+ pSuperClass->Update( rGraphic, bGraphicLinked, pPolyPoly, pEditingObj );
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+SvxSuperContourDlg::SvxSuperContourDlg( SfxBindings *pBindings, SfxChildWindow *pCW,
+ Window* pParent, const ResId& rResId ) :
+ SvxContourDlg ( pBindings, pCW, pParent, rResId ),
+ aContourItem ( SID_CONTOUR_EXEC, *this, *pBindings ),
+ aTbx1 ( this, ResId( TBX1 ) ),
+ aMtfTolerance ( this, ResId( MTF_TOLERANCE ) ),
+ aContourWnd ( this, ResId( CTL_CONTOUR) ),
+ aStbStatus ( this, WB_BORDER | WB_3DLOOK | WB_LEFT ),
+ nGrfChanged ( 0UL ),
+ pCheckObj ( NULL ),
+ bExecState ( FALSE ),
+ bGraphicLinked ( FALSE )
+{
+ FreeResource();
+
+ SvxContourDlg::SetSuperClass( *this );
+
+ aContourWnd.SetMousePosLink( LINK( this, SvxSuperContourDlg, MousePosHdl ) );
+ aContourWnd.SetGraphSizeLink( LINK( this, SvxSuperContourDlg, GraphSizeHdl ) );
+ aContourWnd.SetUpdateLink( LINK( this, SvxSuperContourDlg, StateHdl ) );
+ aContourWnd.SetPipetteHdl( LINK( this, SvxSuperContourDlg, PipetteHdl ) );
+ aContourWnd.SetPipetteClickHdl( LINK( this, SvxSuperContourDlg, PipetteClickHdl ) );
+ aContourWnd.SetWorkplaceClickHdl( LINK( this, SvxSuperContourDlg, WorkplaceClickHdl ) );
+
+ const Size aTbxSize( aTbx1.CalcWindowSizePixel() );
+ Point aPos( aTbx1.GetPosPixel() );
+
+ aTbx1.SetSizePixel( aTbxSize );
+ aTbx1.SetSelectHdl( LINK( this, SvxSuperContourDlg, Tbx1ClickHdl ) );
+
+ aPos.X() += aTbxSize.Width() + LogicToPixel( Size( 3, 0 ), MapMode( MAP_APPFONT ) ).Width();
+ aMtfTolerance.SetPosPixel( aPos );
+ aMtfTolerance.SetValue( 10L );
+
+ SetMinOutputSizePixel( aLastSize = GetOutputSizePixel() );
+
+ aStbStatus.InsertItem( 1, 130, SIB_LEFT | SIB_IN | SIB_AUTOSIZE );
+ aStbStatus.InsertItem( 2, 10 + GetTextWidth( String::CreateFromAscii( " 9999,99 cm / 9999,99 cm " ) ), SIB_CENTER | SIB_IN );
+ aStbStatus.InsertItem( 3, 10 + GetTextWidth( String::CreateFromAscii( " 9999,99 cm x 9999,99 cm " ) ), SIB_CENTER | SIB_IN );
+ aStbStatus.InsertItem( 4, 20, SIB_CENTER | SIB_IN );
+
+ Resize();
+
+ EnableDrop(TRUE);
+
+ aUpdateTimer.SetTimeout( 100 );
+ aUpdateTimer.SetTimeoutHdl( LINK( this, SvxSuperContourDlg, UpdateHdl ) );
+
+ aCreateTimer.SetTimeout( 50 );
+ aCreateTimer.SetTimeoutHdl( LINK( this, SvxSuperContourDlg, CreateHdl ) );
+}
+
+
+/*************************************************************************
+|*
+|* Dtor
+|*
+\************************************************************************/
+
+SvxSuperContourDlg::~SvxSuperContourDlg()
+{
+}
+
+
+/*************************************************************************
+|*
+|* Resize-Methode
+|*
+\************************************************************************/
+
+void SvxSuperContourDlg::Resize()
+{
+ SfxFloatingWindow::Resize();
+
+ Size aMinSize( GetMinOutputSizePixel() );
+ Size aNewSize( GetOutputSizePixel() );
+
+ if ( aNewSize.Height() >= aMinSize.Height() )
+ {
+ Size aSize( aStbStatus.GetSizePixel() );
+ Point aPoint( 0, aNewSize.Height() - aSize.Height() );
+
+ // StatusBar positionieren
+ aStbStatus.SetPosSizePixel( aPoint, Size( aNewSize.Width(), aSize.Height() ) );
+ aStbStatus.Show();
+
+ // EditWindow positionieren
+ aSize.Width() = aNewSize.Width() - 18;
+ aSize.Height() = aPoint.Y() - aContourWnd.GetPosPixel().Y() - 6;
+ aContourWnd.SetSizePixel( aSize );
+
+ aLastSize = aNewSize;
+ }
+}
+
+
+/*************************************************************************
+|*
+|* Close-Methode
+|*
+\************************************************************************/
+
+BOOL SvxSuperContourDlg::Close()
+{
+ BOOL bRet = TRUE;
+
+ if ( aTbx1.IsItemEnabled( TBI_APPLY ) )
+ {
+ QueryBox aQBox( this, WB_YES_NO_CANCEL | WB_DEF_YES,
+ String( CONT_RESID( STR_CONTOURDLG_MODIFY ) ) );
+ const long nRet = aQBox.Execute();
+
+ if ( nRet == RET_YES )
+ {
+ SfxBoolItem aBoolItem( SID_CONTOUR_EXEC, TRUE );
+ GetBindings().GetDispatcher()->Execute(
+ SID_CONTOUR_EXEC, SFX_CALLMODE_SYNCHRON | SFX_CALLMODE_RECORD, &aBoolItem, 0L );
+ }
+ else if ( nRet == RET_CANCEL )
+ bRet = FALSE;
+ }
+
+ return( bRet ? SfxFloatingWindow::Close() : FALSE );
+}
+
+
+/*************************************************************************
+|*
+|* Enabled oder disabled alle Controls
+|*
+\************************************************************************/
+
+void SvxSuperContourDlg::SetExecState( BOOL bEnable )
+{
+ bExecState = bEnable;
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+void SvxSuperContourDlg::SetGraphic( const Graphic& rGraphic )
+{
+ aUndoGraphic = aRedoGraphic = Graphic();
+ aGraphic = rGraphic;
+ nGrfChanged = 0UL;
+ aContourWnd.SetGraphic( aGraphic );
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+void SvxSuperContourDlg::SetPolyPolygon( const PolyPolygon& rPolyPoly )
+{
+ DBG_ASSERT( aContourWnd.GetGraphic().GetType() != GRAPHIC_NONE, "Graphic must've been set first!" );
+
+ PolyPolygon aPolyPoly( rPolyPoly );
+ const MapMode aMap100( MAP_100TH_MM );
+ const MapMode aGrfMap( aGraphic.GetPrefMapMode() );
+ OutputDevice* pOutDev = Application::GetDefaultDevice();
+ BOOL bPixelMap = aGrfMap.GetMapUnit() == MAP_PIXEL;
+
+ for ( USHORT j = 0, nPolyCount = aPolyPoly.Count(); j < nPolyCount; j++ )
+ {
+ Polygon& rPoly = aPolyPoly[ j ];
+
+ for ( USHORT i = 0, nCount = rPoly.GetSize(); i < nCount; i++ )
+ {
+ Point& rPt = rPoly[ i ];
+
+ if ( !bPixelMap )
+ rPt = pOutDev->LogicToPixel( rPt, aGrfMap );
+
+ rPt = pOutDev->PixelToLogic( rPt, aMap100 );
+ }
+ }
+
+ aContourWnd.SetPolyPolygon( aPolyPoly );
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+PolyPolygon SvxSuperContourDlg::GetPolyPolygon( BOOL bRescaleToGraphic )
+{
+ PolyPolygon aRetPolyPoly( aContourWnd.GetPolyPolygon() );
+
+ if ( bRescaleToGraphic )
+ {
+ const MapMode aMap100( MAP_100TH_MM );
+ const MapMode aGrfMap( aGraphic.GetPrefMapMode() );
+ OutputDevice* pOutDev = Application::GetDefaultDevice();
+ BOOL bPixelMap = aGrfMap.GetMapUnit() == MAP_PIXEL;
+
+ for ( USHORT j = 0, nPolyCount = aRetPolyPoly.Count(); j < nPolyCount; j++ )
+ {
+ Polygon& rPoly = aRetPolyPoly[ j ];
+
+ for ( USHORT i = 0, nCount = rPoly.GetSize(); i < nCount; i++ )
+ {
+ Point& rPt = rPoly[ i ];
+
+ rPt = pOutDev->LogicToPixel( rPt, aMap100 );
+
+ if ( !bPixelMap )
+ rPt = pOutDev->PixelToLogic( rPt, aGrfMap );
+ }
+ }
+ }
+
+ return aRetPolyPoly;
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+void SvxSuperContourDlg::Update( const Graphic& rGraphic, BOOL bGraphicLinked,
+ const PolyPolygon* pPolyPoly, void* pEditingObj )
+{
+ aUpdateGraphic = rGraphic;
+ bUpdateGraphicLinked = bGraphicLinked;
+ pUpdateEditingObject = pEditingObj;
+
+ if ( pPolyPoly )
+ aUpdatePolyPoly = *pPolyPoly;
+ else
+ aUpdatePolyPoly = PolyPolygon();
+
+ aUpdateTimer.Start();
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+BOOL SvxSuperContourDlg::IsUndoPossible() const
+{
+ return aUndoGraphic.GetType() != GRAPHIC_NONE;
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+BOOL SvxSuperContourDlg::IsRedoPossible() const
+{
+ return aRedoGraphic.GetType() != GRAPHIC_NONE;
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+void SvxSuperContourDlg::DoAutoCreate()
+{
+ aCreateTimer.Start();
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+void SvxSuperContourDlg::ReducePoints( const long nTol )
+{
+ PolyPolygon aPolyPoly( GetPolyPolygon( FALSE ) );
+
+ if ( aPolyPoly.Count() )
+ {
+ const MapMode aMapMode( MAP_100TH_MM );
+ const long nTol2 = nTol * nTol;
+ Polygon& rPoly = aPolyPoly[ 0 ];
+ OutputDevice* pOutDev = Application::GetDefaultDevice();
+ Point aPtPix;
+ const USHORT nSize = rPoly.GetSize();
+ USHORT nCounter = 0;
+
+ if ( nSize )
+ aPtPix = pOutDev->LogicToPixel( rPoly[ 0 ], aMapMode );
+
+ for( USHORT i = 1; i < nSize; i++ )
+ {
+ const Point& rNewPt = rPoly[ i ];
+ const Point aNewPtPix( pOutDev->LogicToPixel( rNewPt, aMapMode ) );
+
+ const long nDistX = aNewPtPix.X() - aPtPix.X();
+ const long nDistY = aNewPtPix.Y() - aPtPix.Y();
+
+ if( ( nDistX * nDistX + nDistY * nDistY ) >= nTol2 )
+ {
+ rPoly[ ++nCounter ] = rNewPt;
+ aPtPix = aNewPtPix;
+ }
+ }
+
+ rPoly.SetSize( nCounter );
+ aContourWnd.SetPolyPolygon( aPolyPoly );
+ }
+}
+
+
+/*************************************************************************
+|*
+|* Click-Hdl fuer ToolBox
+|*
+\************************************************************************/
+
+IMPL_LINK( SvxSuperContourDlg, Tbx1ClickHdl, ToolBox*, pTbx )
+{
+ USHORT nNewItemId = pTbx->GetCurItemId();
+
+ switch( pTbx->GetCurItemId() )
+ {
+ case( TBI_APPLY ):
+ {
+ SfxBoolItem aBoolItem( SID_CONTOUR_EXEC, TRUE );
+ GetBindings().GetDispatcher()->Execute(
+ SID_CONTOUR_EXEC, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD, &aBoolItem, 0L );
+ }
+ break;
+
+ case( TBI_WORKPLACE ):
+ {
+ if ( aTbx1.IsItemChecked( TBI_WORKPLACE ) )
+ {
+ QueryBox aQBox( this, WB_YES_NO | WB_DEF_NO, String( CONT_RESID( STR_CONTOURDLG_WORKPLACE ) ) );
+
+ if ( !aContourWnd.IsContourChanged() || ( aQBox.Execute() == RET_YES ) )
+ aContourWnd.SetWorkplaceMode( TRUE );
+ else
+ aTbx1.CheckItem( TBI_WORKPLACE, FALSE );
+ }
+ else
+ aContourWnd.SetWorkplaceMode( FALSE );
+ }
+ break;
+
+ case( TBI_SELECT ):
+ {
+ pTbx->CheckItem( nNewItemId, TRUE );
+ aContourWnd.SetEditMode( TRUE );
+ }
+ break;
+
+ case( TBI_RECT ):
+ {
+ pTbx->CheckItem( nNewItemId, TRUE );
+ aContourWnd.SetObjKind( OBJ_RECT );
+ }
+ break;
+
+ case( TBI_CIRCLE ):
+ {
+ pTbx->CheckItem( nNewItemId, TRUE );
+ aContourWnd.SetObjKind( OBJ_CIRC );
+ }
+ break;
+
+ case( TBI_POLY ):
+ {
+ pTbx->CheckItem( nNewItemId, TRUE );
+ aContourWnd.SetObjKind( OBJ_POLY );
+ }
+ break;
+
+ case( TBI_FREEPOLY ):
+ {
+ pTbx->CheckItem( nNewItemId, TRUE );
+ aContourWnd.SetObjKind( OBJ_FREEFILL );
+ }
+ break;
+
+ case( TBI_POLYEDIT ):
+ aContourWnd.SetPolyEditMode( pTbx->IsItemChecked( TBI_POLYEDIT ) ? SID_BEZIER_MOVE : 0 );
+ break;
+
+ case( TBI_POLYMOVE ):
+ aContourWnd.SetPolyEditMode( SID_BEZIER_MOVE );
+ break;
+
+ case( TBI_POLYINSERT ):
+ aContourWnd.SetPolyEditMode( SID_BEZIER_INSERT );
+ break;
+
+ case( TBI_POLYDELETE ):
+ aContourWnd.GetSdrView()->DeleteMarkedPoints();
+ break;
+
+ case( TBI_UNDO ):
+ {
+ nGrfChanged = nGrfChanged ? nGrfChanged-- : 0UL;
+ aRedoGraphic = aGraphic;
+ aGraphic = aUndoGraphic;
+ aUndoGraphic = Graphic();
+ aContourWnd.SetGraphic( aGraphic, FALSE );
+ }
+ break;
+
+ case( TBI_REDO ):
+ {
+ nGrfChanged++;
+ aUndoGraphic = aGraphic;
+ aGraphic = aRedoGraphic;
+ aRedoGraphic = Graphic();
+ aContourWnd.SetGraphic( aGraphic, FALSE );
+ }
+ break;
+
+ case( TBI_AUTOCONTOUR ):
+ aCreateTimer.Start();
+ break;
+
+ case( TBI_PIPETTE ):
+ {
+ BOOL bPipette = aTbx1.IsItemChecked( TBI_PIPETTE );
+
+ if ( !bPipette )
+ aStbStatus.Invalidate();
+ else if ( bGraphicLinked )
+ {
+ QueryBox aQBox( this, WB_YES_NO | WB_DEF_YES, String( CONT_RESID( STR_CONTOURDLG_LINKED ) ) );
+
+ if ( aQBox.Execute() != RET_YES )
+ {
+ aTbx1.CheckItem( TBI_PIPETTE, bPipette = FALSE );
+ aStbStatus.Invalidate();
+ }
+ }
+
+ aContourWnd.SetPipetteMode( bPipette );
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ return 0L;
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+IMPL_LINK( SvxSuperContourDlg, MousePosHdl, ContourWindow*, pWnd )
+{
+ String aStr;
+ const FieldUnit eFieldUnit = SFX_APP()->GetOptions().GetMetric();
+ const Point& rMousePos = pWnd->GetMousePos();
+ const sal_Unicode cSep = International().GetNumDecimalSep();
+
+ aStr.Assign( GetUnitString( rMousePos.X(), eFieldUnit, cSep ) );
+ aStr.Append( String::CreateFromAscii( " / " ) );
+ aStr.Append( GetUnitString( rMousePos.Y(), eFieldUnit, cSep ) );
+
+ aStbStatus.SetItemText( 2, aStr );
+
+ return 0L;
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+IMPL_LINK( SvxSuperContourDlg, GraphSizeHdl, ContourWindow*, pWnd )
+{
+ String aStr;
+ const FieldUnit eFieldUnit = SFX_APP()->GetOptions().GetMetric();
+ const Size& rSize = pWnd->GetGraphicSize();
+ const sal_Unicode cSep = International().GetNumDecimalSep();
+
+ aStr.Assign( GetUnitString( rSize.Width(), eFieldUnit, cSep ) );
+ aStr.Append( String::CreateFromAscii( " x " ) );
+ aStr.Append( GetUnitString( rSize.Height(), eFieldUnit, cSep ) );
+
+ aStbStatus.SetItemText( 3, aStr );
+
+ return 0L;
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+IMPL_LINK( SvxSuperContourDlg, UpdateHdl, Timer*, pTimer )
+{
+ aUpdateTimer.Stop();
+
+ if ( pUpdateEditingObject != pCheckObj )
+ {
+ if( !GetEditingObject() )
+ aContourWnd.GrabFocus();
+
+ SetGraphic( aUpdateGraphic );
+ SetPolyPolygon( aUpdatePolyPoly );
+ SetEditingObject( pUpdateEditingObject );
+ bGraphicLinked = bUpdateGraphicLinked;
+
+ aUpdateGraphic = Graphic();
+ aUpdatePolyPoly = PolyPolygon();
+ bUpdateGraphicLinked = FALSE;
+
+ aContourWnd.GetSdrModel()->SetChanged( FALSE );
+ }
+
+ GetBindings().Invalidate( SID_CONTOUR_EXEC );
+
+ return 0L;
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+IMPL_LINK( SvxSuperContourDlg, CreateHdl, Timer*, pTimer )
+{
+ aCreateTimer.Stop();
+
+ const Rectangle aWorkRect = aContourWnd.LogicToPixel( aContourWnd.GetWorkRect(), MapMode( MAP_100TH_MM ) );
+ const Graphic& rGraphic = aContourWnd.GetGraphic();
+ const BOOL bValid = aWorkRect.Left() != aWorkRect.Right() && aWorkRect.Top() != aWorkRect.Bottom();
+
+ EnterWait();
+ SetPolyPolygon( CreateAutoContour( rGraphic, bValid ? &aWorkRect : NULL ) );
+ LeaveWait();
+
+ return 0L;
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+IMPL_LINK( SvxSuperContourDlg, StateHdl, ContourWindow*, pWnd )
+{
+ const SdrObject* pObj = pWnd->GetSelectedSdrObject();
+ const SdrView* pView = pWnd->GetSdrView();
+ const BOOL bPolyEdit = ( pObj != NULL ) && pObj->ISA( SdrPathObj );
+ const BOOL bDrawEnabled = !( bPolyEdit && aTbx1.IsItemChecked( TBI_POLYEDIT ) );
+ const BOOL bPipette = aTbx1.IsItemChecked( TBI_PIPETTE );
+ const BOOL bWorkplace = aTbx1.IsItemChecked( TBI_WORKPLACE );
+ const BOOL bDontHide = !( bPipette || bWorkplace );
+ const BOOL bBitmap = pWnd->GetGraphic().GetType() == GRAPHIC_BITMAP;
+
+ aTbx1.EnableItem( TBI_APPLY, bDontHide && bExecState && pWnd->IsChanged() );
+
+ aTbx1.EnableItem( TBI_WORKPLACE, !bPipette && bDrawEnabled );
+
+ aTbx1.EnableItem( TBI_SELECT, bDontHide && bDrawEnabled );
+ aTbx1.EnableItem( TBI_RECT, bDontHide && bDrawEnabled );
+ aTbx1.EnableItem( TBI_CIRCLE, bDontHide && bDrawEnabled );
+ aTbx1.EnableItem( TBI_POLY, bDontHide && bDrawEnabled );
+ aTbx1.EnableItem( TBI_FREEPOLY, bDontHide && bDrawEnabled );
+
+ aTbx1.EnableItem( TBI_POLYEDIT, bDontHide && bPolyEdit );
+ aTbx1.EnableItem( TBI_POLYMOVE, bDontHide && !bDrawEnabled );
+ aTbx1.EnableItem( TBI_POLYINSERT, bDontHide && !bDrawEnabled );
+ aTbx1.EnableItem( TBI_POLYDELETE, bDontHide && !bDrawEnabled && pView->IsDeleteMarkedPointsPossible() );
+
+ aTbx1.EnableItem( TBI_AUTOCONTOUR, bDontHide && bDrawEnabled );
+ aTbx1.EnableItem( TBI_PIPETTE, !bWorkplace && bDrawEnabled && bBitmap );
+
+ aTbx1.EnableItem( TBI_UNDO, bDontHide && IsUndoPossible() );
+ aTbx1.EnableItem( TBI_REDO, bDontHide && IsRedoPossible() );
+
+ if ( bPolyEdit )
+ {
+ USHORT nId = 0;
+
+ switch( pWnd->GetPolyEditMode() )
+ {
+ case( SID_BEZIER_MOVE ): nId = TBI_POLYMOVE; break;
+ case( SID_BEZIER_INSERT ): nId = TBI_POLYINSERT; break;
+
+ default:
+ break;
+ }
+
+ aTbx1.CheckItem( nId, TRUE );
+ }
+ else
+ {
+ aTbx1.CheckItem( TBI_POLYEDIT, FALSE );
+ aTbx1.CheckItem( TBI_POLYMOVE, TRUE );
+ aTbx1.CheckItem( TBI_POLYINSERT, FALSE );
+ pWnd->SetPolyEditMode( 0 );
+ }
+
+ return 0L;
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+IMPL_LINK( SvxSuperContourDlg, PipetteHdl, ContourWindow*, pWnd )
+{
+ const Color& rOldLineColor = aStbStatus.GetLineColor();
+ const Color& rOldFillColor = aStbStatus.GetFillColor();
+
+ Rectangle aRect( aStbStatus.GetItemRect( 4 ) );
+ const Color& rColor = pWnd->GetPipetteColor();
+
+ aStbStatus.SetLineColor( rColor );
+ aStbStatus.SetFillColor( rColor );
+
+ aRect.Left() += 4;
+ aRect.Top() += 4;
+ aRect.Right() -= 4;
+ aRect.Bottom() -= 4;
+
+ aStbStatus.DrawRect( aRect );
+
+ aStbStatus.SetLineColor( rOldLineColor );
+ aStbStatus.SetFillColor( rOldFillColor );
+
+ return 0L;
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+IMPL_LINK( SvxSuperContourDlg, PipetteClickHdl, ContourWindow*, pWnd )
+{
+ if ( pWnd->IsClickValid() )
+ {
+ Bitmap aMask;
+ const Color& rColor = pWnd->GetPipetteColor();
+ Bitmap* pMask = NULL;
+
+ EnterWait();
+
+ if( aGraphic.GetType() == GRAPHIC_BITMAP )
+ {
+ Bitmap aBmp( aGraphic.GetBitmap() );
+ const long nTol = aMtfTolerance.GetValue() * 255L / 100L;
+
+ aMask = aBmp.CreateMask( rColor, nTol );
+
+ if( aGraphic.IsTransparent() )
+ aMask.CombineSimple( aGraphic.GetBitmapEx().GetMask(), BMP_COMBINE_OR );
+
+ if( !!aMask )
+ {
+ QueryBox aQBox( this, WB_YES_NO | WB_DEF_YES, String( CONT_RESID( STR_CONTOURDLG_NEWPIPETTE ) ) );
+ BOOL bNewContour;
+
+ aRedoGraphic = Graphic();
+ aUndoGraphic = aGraphic;
+ aGraphic = Graphic( BitmapEx( aBmp, aMask ) );
+ nGrfChanged++;
+
+ bNewContour = ( aQBox.Execute() == RET_YES );
+ pWnd->SetGraphic( aGraphic, bNewContour );
+
+ if( bNewContour )
+ aCreateTimer.Start();
+ }
+ }
+
+ LeaveWait();
+ }
+
+ aTbx1.CheckItem( TBI_PIPETTE, FALSE );
+ pWnd->SetPipetteMode( FALSE );
+ aStbStatus.Invalidate();
+
+ return 0L;
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+IMPL_LINK( SvxSuperContourDlg, WorkplaceClickHdl, ContourWindow*, pWnd )
+{
+ aTbx1.CheckItem( TBI_WORKPLACE, FALSE );
+ aTbx1.CheckItem( TBI_SELECT, TRUE );
+ pWnd->SetWorkplaceMode( FALSE );
+
+ return 0L;
+}
+
+
diff --git a/svx/source/dialog/align.cxx b/svx/source/dialog/align.cxx
new file mode 100644
index 000000000000..d7b35cacf6d0
--- /dev/null
+++ b/svx/source/dialog/align.cxx
@@ -0,0 +1,631 @@
+/*************************************************************************
+ *
+ * $RCSfile: align.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:06 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+// include ---------------------------------------------------------------
+
+#include <svxenum.hxx>
+#pragma hdrstop
+
+#define _SVX_ALIGN_CXX
+
+#include "dialogs.hrc"
+#include "align.hrc"
+#include "rotmodit.hxx"
+
+#define ITEMID_HORJUSTIFY SID_ATTR_ALIGN_HOR_JUSTIFY
+#define ITEMID_VERJUSTIFY SID_ATTR_ALIGN_VER_JUSTIFY
+#define ITEMID_ORIENTATION SID_ATTR_ALIGN_ORIENTATION
+#define ITEMID_LINEBREAK SID_ATTR_ALIGN_LINEBREAK
+#define ITEMID_MARGIN SID_ATTR_ALIGN_MARGIN
+
+#include "algitem.hxx"
+#include "align.hxx"
+#include "dialmgr.hxx"
+#include "dlgutil.hxx"
+
+#ifndef _SHL_HXX //autogen
+#include <tools/shl.hxx>
+#endif
+#ifndef _SFX_SAVEOPT_HXX //autogen
+#include <sfx2/saveopt.hxx>
+#endif
+#ifndef _SFXAPP_HXX //autogen
+#include <sfx2/app.hxx>
+#endif
+#ifndef _SFXMODULE_HXX
+#include <sfx2/module.hxx>
+#endif
+
+// static ----------------------------------------------------------------
+
+static USHORT pRanges[] =
+{
+ SID_ATTR_ALIGN_HOR_JUSTIFY,
+ SID_ATTR_ALIGN_LINEBREAK,
+ SID_ATTR_ALIGN_INDENT,SID_ATTR_ALIGN_INDENT,
+ SID_ATTR_ALIGN_DEGREES,SID_ATTR_ALIGN_DEGREES,
+ SID_ATTR_ALIGN_LOCKPOS,SID_ATTR_ALIGN_LOCKPOS,
+ 0
+};
+
+//--------------------------------------------------------------
+// class SvxAlignmentTabPage
+//--------------------------------------------------------------
+// Konstruktor
+
+SvxAlignmentTabPage::SvxAlignmentTabPage( Window* pParent,
+ const SfxItemSet& rCoreAttrs ) :
+
+ SfxTabPage( pParent, SVX_RES( RID_SVXPAGE_ALIGNMENT ), rCoreAttrs ),
+
+ aBtnHorStd ( this, ResId( BTN_HORSTD ) ),
+ aBtnHorLeft ( this, ResId( BTN_HORLEFT ) ),
+ aBtnHorCenter ( this, ResId( BTN_HORCENTER ) ),
+ aBtnHorRight ( this, ResId( BTN_HORRIGHT ) ),
+ aBtnHorBlock ( this, ResId( BTN_HORBLOCK ) ),
+ aIndentFT ( this, ResId( FT_INDENT ) ),
+ aIndentED ( this, ResId( ED_INDENT ) ),
+ aGbHorAlign ( this, ResId( GB_HORALIGN ) ),
+
+ aBtnVerStd ( this, ResId( BTN_VERSTD ) ),
+ aBtnVerTop ( this, ResId( BTN_VERTOP ) ),
+ aBtnVerMid ( this, ResId( BTN_VERMID ) ),
+ aBtnVerBot ( this, ResId( BTN_VERBOT ) ),
+ aGbVerAlign ( this, ResId( GB_VERALIGN ) ),
+
+ aWinOrient ( this,ResId(CTR_DIAL),ResId(BTN_TXTSTACKED),
+ ResId(FT_DEGREES),ResId(NF_ORIENT),ResId(FT_BORDER_LOCK),
+ ResId(CTR_BORDER_LOCK),ResId( GB_ALIGN)), //@ 12.09.97
+
+ aFtLeftSpace ( this, ResId( FT_LEFTSPACE ) ),
+ aEdLeftSpace ( this, ResId( ED_LEFTSPACE ) ),
+ aFtRightSpace ( this, ResId( FT_RIGHTSPACE ) ),
+ aEdRightSpace ( this, ResId( ED_RIGHTSPACE ) ),
+ aFtTopSpace ( this, ResId( FT_TOPSPACE ) ),
+ aEdTopSpace ( this, ResId( ED_TOPSPACE ) ),
+ aFtBottomSpace ( this, ResId( FT_BOTTOMSPACE ) ),
+ aEdBottomSpace ( this, ResId( ED_BOTTOMSPACE ) ),
+ aGbSpace ( this, ResId( GB_SPACE ) ),
+
+ aBtnWrap ( this, ResId( BTN_WRAP ) ),
+ aWrapGB ( this, ResId( GB_WRAP ) )
+
+{
+ Link aLink = LINK( this, SvxAlignmentTabPage, HorizontalClickHdl_Impl );
+ aBtnHorStd.SetClickHdl( aLink );
+ aBtnHorLeft.SetClickHdl( aLink );
+ aBtnHorCenter.SetClickHdl( aLink );
+ aBtnHorRight.SetClickHdl( aLink );
+ aBtnHorBlock.SetClickHdl( aLink );
+
+ // diese Page braucht ExchangeSupport
+ SetExchangeSupport();
+
+ // Metrik einstellen
+ FieldUnit eFUnit;
+ GET_MODULE_FIELDUNIT( eFUnit );
+
+ switch ( eFUnit )
+ {
+ case FUNIT_CM:
+ case FUNIT_M:
+ case FUNIT_KM:
+ eFUnit = FUNIT_MM;
+ break;
+ }
+ SetFieldUnit( aEdLeftSpace, eFUnit );
+ SetFieldUnit( aEdRightSpace, eFUnit );
+ SetFieldUnit( aEdTopSpace, eFUnit );
+ SetFieldUnit( aEdBottomSpace, eFUnit );
+
+ FillForLockMode();
+ FreeResource();
+}
+
+//------------------------------------------------------------------------
+
+SvxAlignmentTabPage::~SvxAlignmentTabPage()
+{
+}
+
+// LockMode in WinOrientation initialisieren -----------------------------
+
+void SvxAlignmentTabPage::FillForLockMode()
+{
+ ImageList aIlLock( ResId( IL_LOCK_BMPS ) );
+ Size aItemSize = aIlLock.GetImage(IID_BOTTOMLOCK).GetSizePixel();
+ Size aSize;
+
+
+ aWinOrient.GetVSLockMode().SetColCount( 3 );
+ aWinOrient.GetVSLockMode().SetStyle(
+ aWinOrient.GetVSLockMode().GetStyle() | WB_ITEMBORDER | WB_DOUBLEBORDER );
+ aSize = aWinOrient.GetVSLockMode().CalcWindowSizePixel( aItemSize );
+
+ aWinOrient.GetVSLockMode().SetSizePixel( aSize );
+ //aWinOrient.GetVSLockMode().SetColCount( 5 );
+ aWinOrient.GetVSLockMode().InsertItem( 1, aIlLock.GetImage(IID_BOTTOMLOCK),String(ResId(STR_BOTTOMLOCK)));
+ aWinOrient.GetVSLockMode().InsertItem( 2, aIlLock.GetImage(IID_TOPLOCK),String(ResId(STR_TOPLOCK)));
+ aWinOrient.GetVSLockMode().InsertItem( 3, aIlLock.GetImage(IID_CELLLOCK),String(ResId(STR_CELLLOCK)));
+ aWinOrient.GetVSLockMode().SetNoSelection();
+ aWinOrient.GetVSLockMode().Show();
+}
+
+//------------------------------------------------------------------------
+
+USHORT* SvxAlignmentTabPage::GetRanges()
+{
+ return pRanges;
+}
+
+// -----------------------------------------------------------------------
+
+SfxTabPage* SvxAlignmentTabPage::Create( Window* pParent,
+ const SfxItemSet& rAttrSet )
+{
+ return ( new SvxAlignmentTabPage( pParent, rAttrSet ) );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxAlignmentTabPage::Reset( const SfxItemSet& rCoreAttrs )
+{
+ // erstmal alles zur"ucksetzen
+ aBtnHorStd.Check( FALSE );
+ aBtnHorLeft.Check( FALSE );
+ aBtnHorCenter.Check( FALSE );
+ aBtnHorRight.Check( FALSE );
+ aBtnHorBlock.Check( FALSE );
+
+ aBtnVerStd.Check( FALSE );
+ aBtnVerTop.Check( FALSE );
+ aBtnVerMid.Check( FALSE );
+ aBtnVerBot.Check( FALSE );
+
+ // und dann einstellen
+ const SfxPoolItem* pItem =
+ GetItem( rCoreAttrs, SID_ATTR_ALIGN_HOR_JUSTIFY );
+
+ if ( pItem )
+ {
+ switch ( (SvxCellHorJustify)
+ ( (const SvxHorJustifyItem*)pItem )->GetValue() )
+ {
+ case SVX_HOR_JUSTIFY_STANDARD: aBtnHorStd.Check(); break;
+ case SVX_HOR_JUSTIFY_LEFT: aBtnHorLeft.Check(); break;
+ case SVX_HOR_JUSTIFY_CENTER: aBtnHorCenter.Check(); break;
+ case SVX_HOR_JUSTIFY_RIGHT: aBtnHorRight.Check(); break;
+ case SVX_HOR_JUSTIFY_BLOCK: aBtnHorBlock.Check(); break;
+ default: aBtnHorStd.Check();
+ }
+ }
+ // else DON'T-KNOW
+
+ pItem = GetItem( rCoreAttrs, SID_ATTR_ALIGN_INDENT );
+
+ if ( pItem )
+ {
+ // Einzug in Twips -> umrechnen in Point
+ USHORT nVal = (USHORT)( (const SfxUInt16Item*)pItem )->GetValue();
+ nVal /= 20;
+ aIndentED.SetValue( nVal );
+ }
+ else
+ aIndentED.SetText( String() );
+
+ pItem = GetItem( rCoreAttrs, SID_ATTR_ALIGN_VER_JUSTIFY );
+
+ if ( pItem )
+ {
+ switch ( (SvxCellVerJustify)
+ ( (const SvxVerJustifyItem*)pItem )->GetValue() )
+ {
+ case SVX_VER_JUSTIFY_STANDARD: aBtnVerStd.Check(); break;
+ case SVX_VER_JUSTIFY_TOP: aBtnVerTop.Check(); break;
+ case SVX_VER_JUSTIFY_CENTER: aBtnVerMid.Check(); break;
+ case SVX_VER_JUSTIFY_BOTTOM: aBtnVerBot.Check(); break;
+ default: aBtnVerStd.Check();
+ }
+ }
+ // else DON'T-KNOW
+
+ pItem = GetItem( rCoreAttrs, SID_ATTR_ALIGN_ORIENTATION );
+
+ aWinOrient.SetDegrees(0);
+ aWinOrient.SetStackedTxt(FALSE);
+ if ( pItem )
+ {
+ switch ( (SvxCellOrientation)
+ ( (const SvxOrientationItem*)pItem )->GetValue() )
+ {
+ case SVX_ORIENTATION_STANDARD:
+ pItem = GetItem( rCoreAttrs, SID_ATTR_ALIGN_DEGREES );
+ if(pItem)
+ {
+ aWinOrient.SetDegrees(
+ ((const SfxInt32Item*) pItem)->GetValue()/100);
+ }
+ break;
+ case SVX_ORIENTATION_TOPBOTTOM: aWinOrient.SetDegrees(270); break;
+ case SVX_ORIENTATION_STACKED: aWinOrient.SetStackedTxt(TRUE); break;
+ case SVX_ORIENTATION_BOTTOMTOP: aWinOrient.SetDegrees(90); break;
+ default: aWinOrient.SetDegrees(0);
+ };
+ }
+
+ if (rCoreAttrs.GetItemState(GetWhich(SID_ATTR_ALIGN_LOCKPOS),TRUE) != SFX_ITEM_DONTCARE)
+ {
+ pItem=GetItem( rCoreAttrs,SID_ATTR_ALIGN_LOCKPOS);
+ if (pItem)
+ {
+ aWinOrient.SetRotateMode((SvxRotateMode)
+ ( (const SvxRotateModeItem*)pItem )->GetValue() );
+ }
+ }
+
+ pItem = GetItem( rCoreAttrs, SID_ATTR_ALIGN_MARGIN );
+
+ if ( pItem )
+ {
+ const SvxMarginItem* pMarginAttr = (const SvxMarginItem*)pItem;
+
+ aEdLeftSpace.SetValue( aEdLeftSpace.Normalize( (long)
+ (pMarginAttr->GetLeftMargin()) ),
+ FUNIT_TWIP );
+ aEdRightSpace.SetValue( aEdRightSpace.Normalize( (long)
+ (pMarginAttr->GetRightMargin()) ),
+ FUNIT_TWIP );
+ aEdTopSpace.SetValue( aEdTopSpace.Normalize( (long)
+ (pMarginAttr->GetTopMargin()) ),
+ FUNIT_TWIP );
+ aEdBottomSpace.SetValue ( aEdBottomSpace.Normalize( (long)
+ (pMarginAttr->GetBottomMargin()) ),
+ FUNIT_TWIP );
+ }
+ else // DON'T-KNOW
+ {
+ aEdLeftSpace.SetText ( String() );
+ aEdRightSpace.SetText ( String() );
+ aEdTopSpace.SetText ( String() );
+ aEdBottomSpace.SetText ( String() );
+ }
+
+ pItem = GetItem( rCoreAttrs, SID_ATTR_ALIGN_LINEBREAK );
+
+ if ( pItem )
+ {
+ aBtnWrap.EnableTriState( FALSE );
+ aBtnWrap.SetState( ( (const SfxBoolItem*)pItem )->GetValue()
+ ? TriState( STATE_CHECK )
+ : TriState( STATE_NOCHECK ) );
+ }
+ else
+ {
+ aBtnWrap.EnableTriState();
+ aBtnWrap.SetState( TriState( STATE_DONTKNOW ) );
+ }
+
+ HorizontalClickHdl_Impl( NULL );
+
+ aBtnHorStd .SaveValue(); // RadioButton
+ aBtnHorLeft .SaveValue();
+ aBtnHorCenter .SaveValue();
+ aBtnHorRight .SaveValue();
+ aBtnHorBlock .SaveValue();
+ aBtnVerStd .SaveValue();
+ aBtnVerTop .SaveValue();
+ aBtnVerMid .SaveValue();
+ aBtnVerBot .SaveValue();
+ aBtnWrap .SaveValue(); // TriStateButton
+}
+
+// -----------------------------------------------------------------------
+
+BOOL SvxAlignmentTabPage::FillItemSet( SfxItemSet& rCoreAttrs )
+{
+ BOOL bAttrsChanged = FALSE;
+ const SfxItemSet& rOldSet = GetItemSet();
+ USHORT nWhich;
+ TriState eState;
+ const SfxPoolItem* pOld = 0;
+
+ // Horizontale Ausrichtung
+ nWhich = GetWhich( SID_ATTR_ALIGN_HOR_JUSTIFY );
+ USHORT nTmp = USHRT_MAX;
+
+ if ( aBtnHorStd.IsChecked() )
+ nTmp = SVX_HOR_JUSTIFY_STANDARD;
+ else if ( aBtnHorLeft.IsChecked() )
+ nTmp = SVX_HOR_JUSTIFY_LEFT;
+ else if ( aBtnHorCenter.IsChecked() )
+ nTmp = SVX_HOR_JUSTIFY_CENTER;
+ else if ( aBtnHorRight.IsChecked() )
+ nTmp = SVX_HOR_JUSTIFY_RIGHT;
+ else if ( aBtnHorBlock.IsChecked() )
+ nTmp = SVX_HOR_JUSTIFY_BLOCK;
+ DBG_ASSERT( (USHRT_MAX != nTmp) || !aBtnHorStd.IsEnabled(), "no button checked" );
+ // if aBtnHorStd is disabled SetFlags was called with the WBA_NO_HORIZONTAL flag set
+ // 67977 - 30.07.99 - FS
+ pOld = GetOldItem( rCoreAttrs, SID_ATTR_ALIGN_HOR_JUSTIFY );
+
+ if ( !pOld || ( (const SvxHorJustifyItem*)pOld )->GetValue() != nTmp )
+ {
+ rCoreAttrs.Put( SvxHorJustifyItem( (SvxCellHorJustify)nTmp, nWhich ) );
+ bAttrsChanged |= TRUE;
+ }
+ else if ( rOldSet.GetItemState( nWhich, FALSE ) == SFX_ITEM_DEFAULT )
+ rCoreAttrs.ClearItem( nWhich );
+
+ nWhich = GetWhich( SID_ATTR_ALIGN_INDENT );
+ pOld = GetOldItem( rCoreAttrs, SID_ATTR_ALIGN_INDENT );
+ nTmp = aIndentED.GetValue() * 20; // Point in twips
+
+ if ( !pOld || ( (const SfxUInt16Item*)pOld )->GetValue() != nTmp )
+ {
+ rCoreAttrs.Put( SfxUInt16Item( nWhich, nTmp ) );
+ bAttrsChanged |= TRUE;
+ }
+ else if ( rOldSet.GetItemState( nWhich, FALSE ) == SFX_ITEM_DEFAULT )
+ rCoreAttrs.ClearItem( nWhich );
+
+ // Vertikale Ausrichtung
+ nWhich = GetWhich( SID_ATTR_ALIGN_VER_JUSTIFY );
+ nTmp = USHRT_MAX;
+
+ if ( aBtnVerStd.IsChecked() )
+ nTmp = SVX_VER_JUSTIFY_STANDARD;
+ else if ( aBtnVerTop.IsChecked() )
+ nTmp = SVX_VER_JUSTIFY_TOP;
+ else if ( aBtnVerMid.IsChecked() )
+ nTmp = SVX_VER_JUSTIFY_CENTER;
+ else if ( aBtnVerBot.IsChecked() )
+ nTmp = SVX_VER_JUSTIFY_BOTTOM;
+ DBG_ASSERT( (USHRT_MAX != nTmp) || !aBtnVerStd.IsEnabled(), "no button checked" );
+ // if aBtnVerStd is disabled SetFlags was called with the WBA_NO_VERTICAL flag set
+ // 67977 - 30.07.99 - FS
+ pOld = GetOldItem( rCoreAttrs, SID_ATTR_ALIGN_VER_JUSTIFY );
+
+ if ( !pOld || ( (const SvxVerJustifyItem*)pOld )->GetValue() != nTmp )
+ {
+ rCoreAttrs.Put( SvxVerJustifyItem( (SvxCellVerJustify)nTmp, nWhich ) );
+ bAttrsChanged |= TRUE;
+ }
+ else if ( rOldSet.GetItemState( nWhich, FALSE ) == SFX_ITEM_DEFAULT )
+ rCoreAttrs.ClearItem( nWhich );
+
+ // Schreibrichtung
+ nWhich = GetWhich( SID_ATTR_ALIGN_ORIENTATION );
+
+ nTmp = SVX_ORIENTATION_STANDARD;
+
+ if ( aWinOrient.IsStackedTxt() )
+ nTmp = SVX_ORIENTATION_STACKED;
+ else if ( aWinOrient.GetDegrees()==90 )
+ nTmp = SVX_ORIENTATION_BOTTOMTOP;
+ else if ( aWinOrient.GetDegrees()==270 )
+ nTmp = SVX_ORIENTATION_TOPBOTTOM;
+
+ pOld = GetOldItem( rCoreAttrs, SID_ATTR_ALIGN_ORIENTATION );
+
+ if ( !pOld || ( (const SvxOrientationItem*)pOld )->GetValue() != nTmp )
+ {
+ rCoreAttrs.Put(
+ SvxOrientationItem( (SvxCellOrientation)nTmp, nWhich ) );
+ bAttrsChanged |= TRUE;
+ }
+ else if ( rOldSet.GetItemState( nWhich, FALSE ) == SFX_ITEM_DEFAULT )
+ rCoreAttrs.ClearItem( nWhich );
+
+ // Schreibwinkel
+ nWhich = GetWhich( SID_ATTR_ALIGN_DEGREES );
+
+ long nDegrees=aWinOrient.GetDegrees()*100L;
+
+ pOld = GetOldItem( rCoreAttrs, SID_ATTR_ALIGN_DEGREES );
+
+ if ( !pOld || ( (const SfxInt32Item*)pOld )->GetValue() != nDegrees )
+ {
+ rCoreAttrs.Put(SfxInt32Item( nWhich,nDegrees) );
+ bAttrsChanged |= TRUE;
+ }
+ else if ( rOldSet.GetItemState( nWhich, FALSE ) == SFX_ITEM_DEFAULT )
+ rCoreAttrs.ClearItem( nWhich );
+
+ // Bezugskante
+
+ nWhich = GetWhich( SID_ATTR_ALIGN_LOCKPOS );
+
+ SvxRotateMode nRotMode=aWinOrient.GetRotateMode();
+
+ pOld = GetOldItem( rCoreAttrs, SID_ATTR_ALIGN_LOCKPOS );
+
+ if(aWinOrient.IsSelRotateMode())
+ {
+ if ( !pOld ||
+ ((SvxRotateMode)((const SvxRotateModeItem*)pOld )->GetValue()) != nRotMode )
+ {
+ rCoreAttrs.Put(SvxRotateModeItem( nRotMode,nWhich) );
+ bAttrsChanged |= TRUE;
+ }
+ else if ( rOldSet.GetItemState( nWhich, FALSE ) == SFX_ITEM_DEFAULT )
+ rCoreAttrs.ClearItem( nWhich );
+ }
+
+ // Abst"ande zum Zellinhalt
+ nWhich = GetWhich( SID_ATTR_ALIGN_MARGIN );
+ SvxMarginItem aMargin(
+ (INT16)aEdLeftSpace.Denormalize(
+ aEdLeftSpace.GetValue( FUNIT_TWIP ) ),
+ (INT16)aEdTopSpace.Denormalize(
+ aEdTopSpace.GetValue( FUNIT_TWIP ) ),
+ (INT16)aEdRightSpace.Denormalize(
+ aEdRightSpace.GetValue( FUNIT_TWIP ) ),
+ (INT16)aEdBottomSpace.Denormalize(
+ aEdBottomSpace.GetValue( FUNIT_TWIP ) ),
+ nWhich );
+ pOld = GetOldItem( rCoreAttrs, SID_ATTR_ALIGN_MARGIN );
+
+ if ( !pOld || !( *(const SvxMarginItem*)pOld == aMargin ) )
+ {
+ rCoreAttrs.Put( aMargin );
+ bAttrsChanged |= TRUE;
+ }
+ else if ( rOldSet.GetItemState( nWhich, FALSE ) == SFX_ITEM_DEFAULT )
+ rCoreAttrs.ClearItem( nWhich );
+
+ // Zeilenumbruch
+ nWhich = GetWhich( SID_ATTR_ALIGN_LINEBREAK );
+ eState = aBtnWrap.GetState();
+ pOld = GetOldItem( rCoreAttrs, SID_ATTR_ALIGN_LINEBREAK );
+
+ if ( !pOld || ( (const SfxBoolItem*)pOld )->GetValue()
+ != ( eState == STATE_CHECK ) )
+ {
+ rCoreAttrs.Put( SfxBoolItem( nWhich, (eState == STATE_CHECK) ) );
+ bAttrsChanged = TRUE;
+ }
+ else if ( rOldSet.GetItemState( nWhich, FALSE ) == SFX_ITEM_DEFAULT )
+ rCoreAttrs.ClearItem( nWhich );
+ return bAttrsChanged;
+}
+
+//------------------------------------------------------------------------
+
+int SvxAlignmentTabPage::DeactivatePage( SfxItemSet* pSet )
+{
+ if ( pSet )
+ FillItemSet( *pSet );
+ return LEAVE_PAGE;
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SvxAlignmentTabPage, HorizontalClickHdl_Impl, RadioButton *, EMPTYARG )
+{
+ BOOL bChecked = aBtnHorLeft.IsChecked();
+ aIndentFT.Enable( bChecked );
+ aIndentED.Enable( bChecked );
+ return 0;
+}
+
+//------------------------------------------------------------------------
+
+void SvxAlignmentTabPage::SetFlags( USHORT nFlags )
+
+/* [Beschreibung]
+
+ Mit dieser Methode k"onnen einzelne Gruppen diabled werden.
+*/
+
+{
+ if ( ( nFlags & WBA_NO_ORIENTATION ) == WBA_NO_ORIENTATION )
+ {
+ aWinOrient.Disable();
+ }
+
+ if ( ( nFlags & WBA_NO_LINEBREAK ) == WBA_NO_LINEBREAK )
+ {
+ aBtnWrap.Disable();
+ aWrapGB.Disable();
+ }
+
+ if ( ( nFlags & WBA_NO_HORIZONTAL ) == WBA_NO_HORIZONTAL )
+ {
+ aBtnHorStd.Disable();
+ aBtnHorLeft.Disable();
+ aBtnHorRight.Disable();
+ aBtnHorCenter.Disable();
+ aBtnHorBlock.Disable();
+ aIndentFT.Disable();
+ aIndentED.Disable();
+ aGbHorAlign.Disable();
+ }
+
+ if ( ( nFlags & WBA_NO_LEFTINDENT ) == WBA_NO_LEFTINDENT )
+ {
+ aIndentFT.Hide();
+ aIndentED.Hide();
+ }
+
+ if ( ( nFlags & WBA_NO_VERTICAL ) == WBA_NO_VERTICAL )
+ {
+ aBtnVerStd.Disable();
+ aBtnVerTop.Disable();
+ aBtnVerBot.Disable();
+ aBtnVerMid.Disable();
+ aGbVerAlign.Disable();
+ }
+
+ if ( ( nFlags & WBA_NO_GRIDLINES ) == WBA_NO_GRIDLINES )
+ {
+ aFtLeftSpace.Disable();
+ aEdLeftSpace.Disable();
+ aFtRightSpace.Disable();
+ aEdRightSpace.Disable();
+ aFtTopSpace.Disable();
+ aEdTopSpace.Disable();
+ aFtBottomSpace.Disable();
+ aEdBottomSpace.Disable();
+ aGbSpace.Disable();
+ }
+}
+
+
diff --git a/svx/source/dialog/align.hrc b/svx/source/dialog/align.hrc
new file mode 100644
index 000000000000..211f259263db
--- /dev/null
+++ b/svx/source/dialog/align.hrc
@@ -0,0 +1,119 @@
+/*************************************************************************
+ *
+ * $RCSfile: align.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:06 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SVX_ALIGN_HRC
+#define _SVX_ALIGN_HRC
+
+// defines ------------------------------------------------------------------
+
+#define BTN_HORSTD 10
+#define BTN_HORLEFT 11
+#define BTN_HORCENTER 12
+#define BTN_HORRIGHT 13
+#define BTN_HORBLOCK 14
+#define FT_INDENT 15
+#define ED_INDENT 16
+#define ED_INDENT 16
+#define GB_HORALIGN 17
+//
+#define BTN_VERSTD 20
+#define BTN_VERTOP 21
+#define BTN_VERMID 23
+#define BTN_VERBOT 24
+#define GB_VERALIGN 25
+
+// ID's fuer Ausrichtung
+#define CTR_DIAL 30
+#define BTN_TXTSTACKED 31
+#define FT_DEGREES 32
+#define NF_ORIENT 33
+#define CTR_BORDER_LOCK 34
+#define FT_BORDER_LOCK 35
+#define GB_ALIGN 37
+
+//
+#define FT_LEFTSPACE 40
+#define ED_LEFTSPACE 41
+#define FT_RIGHTSPACE 42
+#define ED_RIGHTSPACE 43
+#define FT_TOPSPACE 44
+#define ED_TOPSPACE 45
+#define FT_BOTTOMSPACE 46
+#define ED_BOTTOMSPACE 47
+#define GB_SPACE 48
+//
+#define BTN_WRAP 50
+#define GB_WRAP 51
+
+#define ED_INDENT1 100
+
+// ImageListe fuer ValueSets:
+
+#define IL_LOCK_BMPS 1
+#define IID_BOTTOMLOCK 1
+#define IID_TOPLOCK 2
+#define IID_CELLLOCK 3
+
+#define STR_BOTTOMLOCK 1
+#define STR_TOPLOCK 2
+#define STR_CELLLOCK 3
+
+#endif
+
diff --git a/svx/source/dialog/align.src b/svx/source/dialog/align.src
new file mode 100644
index 000000000000..83e394abfee4
--- /dev/null
+++ b/svx/source/dialog/align.src
@@ -0,0 +1,952 @@
+/*************************************************************************
+ *
+ * $RCSfile: align.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:06 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+ // include ---------------------------------------------------------------
+#include "dialogs.hrc"
+#include "helpid.hrc"
+#include "align.hrc"
+ // pragma ----------------------------------------------------------------
+
+#define MASKCOLOR \
+ MaskColor = Color { Red = 0xC000 ; Green = 0xC000 ; Blue = 0xC000 ; }
+
+ // define ---------------------------------------------------------------
+#define IL_LOCK_MCOL Color { Red=0xFFFF; Green=0xFFFF; Blue=0xFFFF; }
+ // RID_SVXPAGE_ALIGNMENT -------------------------------------------------
+TabPage RID_SVXPAGE_ALIGNMENT
+{
+ HelpId = HID_ALIGNMENT ;
+ Hide = TRUE ;
+ Text = "Ausrichtung" ;
+ Text [ English ] = "Alignment" ;
+ Text [ norwegian ] = "Alignment" ;
+ Text [ italian ] = "Allineamento" ;
+ Text [ portuguese_brazilian ] = "Alinhamento" ;
+ Text [ portuguese ] = "Alinhamento" ;
+ Text [ finnish ] = "Tasaus" ;
+ Text [ danish ] = "Justering" ;
+ Text [ french ] = "Alignement" ;
+ Text [ swedish ] = "Justering" ;
+ Text [ dutch ] = "Uitlijning" ;
+ Text [ spanish ] = "Alineacin" ;
+ Text [ english_us ] = "Alignment" ;
+ Size = MAP_APPFONT ( 260 , 135 ) ;
+ SVLook = TRUE ;
+ RadioButton BTN_HORSTD
+ {
+ Pos = MAP_APPFONT ( 12 , 14 ) ;
+ Size = MAP_APPFONT ( 100 , 10 ) ;
+ Text = "Standar~d" ;
+ Text [ ENGLISH ] = "~Standard" ;
+ Text [ norwegian ] = "~Standard" ;
+ Text [ italian ] = "~Standard" ;
+ Text [ portuguese_brazilian ] = "~Padro" ;
+ Text [ portuguese ] = "~Padro" ;
+ Text [ finnish ] = "~Normaali" ;
+ Text [ danish ] = "Standar~d" ;
+ Text [ french ] = "Standard" ;
+ Text [ swedish ] = "~Standard" ;
+ Text [ dutch ] = "~Standaard" ;
+ Text [ spanish ] = "~Predeterm." ;
+ Text [ english_us ] = "~Default" ;
+ Text[ chinese_simplified ] = "׼(~D)";
+ Text[ russian ] = "";
+ Text[ polish ] = "S~tandard";
+ Text[ japanese ] = "W(~D)";
+ Text[ chinese_traditional ] = "з(~D)";
+ Text[ arabic ] = "";
+ Text[ dutch ] = "~Standaard";
+ Text[ chinese_simplified ] = "׼(~D)";
+ Text[ greek ] = "";
+ Text[ korean ] = "⺻(~D)";
+ Text[ turkish ] = "Standar~t";
+ Text[ language_user1 ] = " ";
+ };
+ RadioButton BTN_HORLEFT
+ {
+ Pos = MAP_APPFONT ( 12 , 27 ) ;
+ Size = MAP_APPFONT ( 36 , 10 ) ;
+ Text = "~Links" ;
+ Text [ ENGLISH ] = "Flush ~Left" ;
+ Text [ norwegian ] = "Flush ~Left" ;
+ Text [ italian ] = "A sinistra" ;
+ Text [ portuguese_brazilian ] = "Alinhar ~ Esquerda" ;
+ Text [ portuguese ] = "~Esquerda" ;
+ Text [ finnish ] = "~Vasen tasaus" ;
+ Text [ danish ] = "Venstre" ;
+ Text [ french ] = " gauch~e" ;
+ Text [ swedish ] = "V~nster" ;
+ Text [ dutch ] = "~Links" ;
+ Text [ spanish ] = "Izq~uierda" ;
+ Text [ english_us ] = "~Left" ;
+ Text[ chinese_simplified ] = "(~L)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Do l~ewej";
+ Text[ japanese ] = "(~L)";
+ Text[ chinese_traditional ] = "V(~L)";
+ Text[ arabic ] = "";
+ Text[ dutch ] = "~Links";
+ Text[ chinese_simplified ] = "(~L)";
+ Text[ greek ] = "";
+ Text[ korean ] = "(~L)";
+ Text[ turkish ] = "So~l";
+ Text[ language_user1 ] = " ";
+ };
+ RadioButton BTN_HORCENTER
+ {
+ Pos = MAP_APPFONT ( 12 , 53 ) ;
+ Size = MAP_APPFONT ( 100 , 10 ) ;
+ Text = "Zen~triert" ;
+ Text [ ENGLISH ] = "~Centered" ;
+ Text [ norwegian ] = "~Centered" ;
+ Text [ italian ] = "Al ~centro" ;
+ Text [ portuguese_brazilian ] = "~Centralizado" ;
+ Text [ portuguese ] = "~Centrado" ;
+ Text [ finnish ] = "~Keski" ;
+ Text [ danish ] = "Centreret" ;
+ Text [ french ] = "Centr" ;
+ Text [ swedish ] = "~Centrera" ;
+ Text [ dutch ] = "~Gecentreerd" ;
+ Text [ spanish ] = "~Centrado" ;
+ Text [ english_us ] = "Center" ;
+ Text[ chinese_simplified ] = "(~C)";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Wy~rodkuj";
+ Text[ japanese ] = "";
+ Text[ chinese_traditional ] = "m(~C)";
+ Text[ arabic ] = "";
+ Text[ dutch ] = "~Gecentreerd";
+ Text[ chinese_simplified ] = "(~C)";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "Orta~la";
+ Text[ language_user1 ] = " ";
+ };
+ RadioButton BTN_HORRIGHT
+ {
+ Pos = MAP_APPFONT ( 12 , 40 ) ;
+ Size = MAP_APPFONT ( 100 , 10 ) ;
+ Text = "~Rechts" ;
+ Text [ ENGLISH ] = "Flush ~Right" ;
+ Text [ norwegian ] = "Flush ~Right" ;
+ Text [ italian ] = "A destra" ;
+ Text [ portuguese_brazilian ] = "Alinhar ~ Direita" ;
+ Text [ portuguese ] = "~Direita" ;
+ Text [ finnish ] = "~Oikea tasaus" ;
+ Text [ danish ] = "Hjre" ;
+ Text [ french ] = " dr~oite" ;
+ Text [ swedish ] = "H~ger" ;
+ Text [ dutch ] = "~Rechts" ;
+ Text [ spanish ] = "~Derecha" ;
+ Text [ english_us ] = "R~ight" ;
+ Text[ chinese_simplified ] = "(~R)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Do prawe~j";
+ Text[ japanese ] = "E(~R)";
+ Text[ chinese_traditional ] = "Vk(~R)";
+ Text[ arabic ] = "";
+ Text[ dutch ] = "~Rechts";
+ Text[ chinese_simplified ] = "(~R)";
+ Text[ greek ] = "";
+ Text[ korean ] = "(~I)";
+ Text[ turkish ] = "Sa~";
+ Text[ language_user1 ] = " ";
+ };
+ RadioButton BTN_HORBLOCK
+ {
+ Pos = MAP_APPFONT ( 12 , 66 ) ;
+ Size = MAP_APPFONT ( 100 , 10 ) ;
+ Text = "~Block" ;
+ Text [ ENGLISH ] = "Blo~ck" ;
+ Text [ norwegian ] = "Blo~ck" ;
+ Text [ italian ] = "Giustifica" ;
+ Text [ portuguese_brazilian ] = "Blo~co" ;
+ Text [ portuguese ] = "~Justificado" ;
+ Text [ finnish ] = "Lo~hko" ;
+ Text [ danish ] = "Lige margener" ;
+ Text [ french ] = "~Justifi" ;
+ Text [ swedish ] = "Marginal~justering" ;
+ Text [ dutch ] = "~Uitgevuld" ;
+ Text [ spanish ] = "~Justificada" ;
+ Text [ english_us ] = "~Justify" ;
+ Text[ chinese_simplified ] = "˶(~J)";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Wyj~ustuj";
+ Text[ japanese ] = "ϓt(~J)";
+ Text[ chinese_traditional ] = "ݹ(~J)";
+ Text[ arabic ] = "";
+ Text[ dutch ] = "~Uitgevuld";
+ Text[ chinese_simplified ] = "˶(~J)";
+ Text[ greek ] = " ";
+ Text[ korean ] = " (~J)";
+ Text[ turkish ] = "~ki yana yasla";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_INDENT
+ {
+ Pos = MAP_APPFONT ( 51 , 27 ) ;
+ Size = MAP_APPFONT ( 30 , 10 ) ;
+ Text = "Einzug" ;
+ Text [ English ] = "~Indent" ;
+ Text [ english_us ] = "Indent" ;
+ Text [ swedish ] = "Indrag" ;
+ Text [ danish ] = "Indrykning" ;
+ Text [ italian ] = "Rientro" ;
+ Text [ spanish ] = "Sangra" ;
+ Text [ french ] = "Retrait" ;
+ Text [ dutch ] = "Inspringing" ;
+ Text [ portuguese_brazilian ] = "Einzu~g" ;
+ Text [ portuguese ] = "Avano" ;
+ Text[ chinese_simplified ] = "(~I)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Wcicie";
+ Text[ japanese ] = "";
+ Text[ chinese_traditional ] = "Y(~I)";
+ Text[ arabic ] = "";
+ Text[ dutch ] = "Inspringing";
+ Text[ chinese_simplified ] = "(~I)";
+ Text[ greek ] = "";
+ Text[ korean ] = "鿩 ";
+ Text[ turkish ] = "Girinti";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField ED_INDENT
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 84 , 26 ) ;
+ Size = MAP_APPFONT ( 30 , 12 ) ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = 0 ;
+ Maximum = 990 ;
+ SpinSize = 10 ;
+ Unit = FUNIT_POINT ;
+ };
+ GroupBox GB_HORALIGN
+ {
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 112 , 80 ) ;
+ Text = "Horizontal" ;
+ Text [ ENGLISH ] = "Horizontal" ;
+ Text [ norwegian ] = "Horisontal" ;
+ Text [ italian ] = "Orizzontale" ;
+ Text [ portuguese_brazilian ] = "Horizontal" ;
+ Text [ portuguese ] = "Horizontal" ;
+ Text [ finnish ] = "Vaakasuora" ;
+ Text [ danish ] = "Vandret" ;
+ Text [ french ] = "Horizontal" ;
+ Text [ swedish ] = "Horisontellt" ;
+ Text [ dutch ] = "Horizontaal" ;
+ Text [ spanish ] = "Horizontal" ;
+ Text [ english_us ] = "Horizontal" ;
+ Text[ chinese_simplified ] = "ˮƽ";
+ Text[ russian ] = "";
+ Text[ polish ] = "Poziomo";
+ Text[ japanese ] = "ʒu";
+ Text[ chinese_traditional ] = "V";
+ Text[ arabic ] = "";
+ Text[ dutch ] = "Horizontaal";
+ Text[ chinese_simplified ] = "ˮƽ";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "Yatay";
+ Text[ language_user1 ] = " ";
+ };
+ RadioButton BTN_VERSTD
+ {
+ Pos = MAP_APPFONT ( 130 , 14 ) ;
+ Size = MAP_APPFONT ( 45 , 10 ) ;
+ Text = "St~andard" ;
+ Text [ ENGLISH ] = "~Standard" ;
+ Text [ norwegian ] = "~Standard" ;
+ Text [ italian ] = "St~andard" ;
+ Text [ portuguese_brazilian ] = "~Padro" ;
+ Text [ portuguese ] = "~Padro" ;
+ Text [ finnish ] = "~Normaali" ;
+ Text [ danish ] = "Standard" ;
+ Text [ french ] = "~Standard" ;
+ Text [ swedish ] = "S~tandard" ;
+ Text [ dutch ] = "~Standaard" ;
+ Text [ spanish ] = "~Predeterm." ;
+ Text [ english_us ] = "Standard" ;
+ Text[ chinese_simplified ] = "׼(~S)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Sta~ndard";
+ Text[ japanese ] = "W(~S)";
+ Text[ chinese_traditional ] = "з(~S)";
+ Text[ arabic ] = "";
+ Text[ dutch ] = "~Standaard";
+ Text[ chinese_simplified ] = "׼(~S)";
+ Text[ greek ] = "";
+ Text[ korean ] = "ǥ";
+ Text[ turkish ] = "Sta~ndart";
+ Text[ language_user1 ] = " ";
+ };
+ RadioButton BTN_VERTOP
+ {
+ Pos = MAP_APPFONT ( 130 , 27 ) ;
+ Size = MAP_APPFONT ( 45 , 10 ) ;
+ Text = "~Oben" ;
+ Text [ ENGLISH ] = "~Top" ;
+ Text [ norwegian ] = "~Top" ;
+ Text [ italian ] = "Sopra" ;
+ Text [ portuguese_brazilian ] = "~Topo" ;
+ Text [ portuguese ] = "Em ~cima" ;
+ Text [ finnish ] = "~Yls" ;
+ Text [ danish ] = "verst" ;
+ Text [ french ] = "En ha~ut" ;
+ Text [ swedish ] = "~verst" ;
+ Text [ dutch ] = "~Boven" ;
+ Text [ spanish ] = "A~rriba" ;
+ Text [ english_us ] = "~Top" ;
+ Text[ chinese_simplified ] = "(~T)";
+ Text[ russian ] = "";
+ Text[ polish ] = "W ~grze";
+ Text[ japanese ] = "(~T)";
+ Text[ chinese_traditional ] = "VW(~T)";
+ Text[ arabic ] = "";
+ Text[ dutch ] = "~Boven";
+ Text[ chinese_simplified ] = "(~T)";
+ Text[ greek ] = "";
+ Text[ korean ] = "(~T)";
+ Text[ turkish ] = "~st";
+ Text[ language_user1 ] = " ";
+ };
+ RadioButton BTN_VERBOT
+ {
+ Pos = MAP_APPFONT ( 130 , 40 ) ;
+ Size = MAP_APPFONT ( 45 , 10 ) ;
+ Text = "~Unten" ;
+ Text [ ENGLISH ] = "~Bottom" ;
+ Text [ norwegian ] = "~Bottom" ;
+ Text [ italian ] = "Basso" ;
+ Text [ portuguese_brazilian ] = "~Base" ;
+ Text [ portuguese ] = "Em ~baixo" ;
+ Text [ finnish ] = "~Alas" ;
+ Text [ danish ] = "Nederst" ;
+ Text [ french ] = "En ~bas" ;
+ Text [ swedish ] = "~Underst" ;
+ Text [ dutch ] = "~Onder" ;
+ Text [ spanish ] = "A~bajo" ;
+ Text [ english_us ] = "~Bottom" ;
+ Text[ chinese_simplified ] = "(~B)";
+ Text[ russian ] = "";
+ Text[ polish ] = "W ~dole";
+ Text[ japanese ] = "(~B)";
+ Text[ chinese_traditional ] = "VU(~B)";
+ Text[ arabic ] = "";
+ Text[ dutch ] = "~Onder";
+ Text[ chinese_simplified ] = "(~B)";
+ Text[ greek ] = "";
+ Text[ korean ] = "Ʒ(~B)";
+ Text[ turkish ] = "~Alt";
+ Text[ language_user1 ] = " ";
+ };
+ RadioButton BTN_VERMID
+ {
+ Pos = MAP_APPFONT ( 130 , 53 ) ;
+ Size = MAP_APPFONT ( 45 , 10 ) ;
+ Text = "~Mitte" ;
+ Text [ ENGLISH ] = "~Mid" ;
+ Text [ norwegian ] = "~Mid" ;
+ Text [ italian ] = "Al centro" ;
+ Text [ portuguese_brazilian ] = "~Meio" ;
+ Text [ portuguese ] = "~Meio" ;
+ Text [ finnish ] = "K~eski" ;
+ Text [ danish ] = "Centreret" ;
+ Text [ french ] = "~Milieu" ;
+ Text [ swedish ] = "~Mitten" ;
+ Text [ dutch ] = "~Midden" ;
+ Text [ spanish ] = "Ce~ntro" ;
+ Text [ english_us ] = "C~enter" ;
+ Text[ chinese_simplified ] = "(~E)";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Wy~rodkowany";
+ Text[ japanese ] = "(~E)";
+ Text[ chinese_traditional ] = "m(~E)";
+ Text[ arabic ] = "";
+ Text[ dutch ] = "~Midden";
+ Text[ chinese_simplified ] = "(~E)";
+ Text[ greek ] = "";
+ Text[ korean ] = "(~E)";
+ Text[ turkish ] = "O~rta";
+ Text[ language_user1 ] = " ";
+ };
+ GroupBox GB_VERALIGN
+ {
+ Pos = MAP_APPFONT ( 124 , 3 ) ;
+ Size = MAP_APPFONT ( 55 , 80 ) ;
+ Text = "Vertikal" ;
+ Text [ ENGLISH ] = "Vertical" ;
+ Text [ norwegian ] = "Vertikal" ;
+ Text [ italian ] = "Verticale" ;
+ Text [ portuguese_brazilian ] = "Vertical" ;
+ Text [ portuguese ] = "Vertical" ;
+ Text [ finnish ] = "Pystysuora" ;
+ Text [ danish ] = "Lodret" ;
+ Text [ french ] = "Vertical" ;
+ Text [ swedish ] = "Vertikalt" ;
+ Text [ dutch ] = "Verticaal" ;
+ Text [ spanish ] = "Vertical" ;
+ Text [ english_us ] = "Vertical" ;
+ Text[ chinese_simplified ] = "ֱ";
+ Text[ russian ] = "";
+ Text[ polish ] = "Pionowo";
+ Text[ japanese ] = "cʒu";
+ Text[ chinese_traditional ] = "V";
+ Text[ arabic ] = "";
+ Text[ dutch ] = "Verticaal";
+ Text[ chinese_simplified ] = "ֱ";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "Dikey";
+ Text[ language_user1 ] = " ";
+ };
+ Control CTR_DIAL
+ {
+ HelpId = HID_ALIGNMENT_CTR_DIAL ;
+ Pos = MAP_APPFONT ( 191 , 14 ) ;
+ Size = MAP_APPFONT ( 42 , 43 ) ;
+ Text = "ABCD" ;
+ };
+ ImageButton BTN_TXTSTACKED
+ {
+ Pos = MAP_APPFONT ( 239 , 14 ) ;
+ Size = MAP_APPFONT ( 12 , 43 ) ;
+ TabStop = TRUE ;
+ ButtonImage = Image
+ {
+ ImageBitmap = Bitmap { File = "txtstk.bmp" ; };
+ MASKCOLOR ;
+ };
+ };
+ FixedText FT_DEGREES
+ {
+ Pos = MAP_APPFONT ( 222 , 61 ) ;
+ Size = MAP_APPFONT ( 31 , 10 ) ;
+ Text = "~Grad" ;
+ Text [ ENGLISH ] = "Degrees" ;
+ Text [ english_us ] = "Degrees" ;
+ Text [ portuguese_brazilian ] = "Gra~d" ;
+ Text [ swedish ] = "Gra~der" ;
+ Text [ danish ] = "grader" ;
+ Text [ italian ] = "Gra~di" ;
+ Text [ spanish ] = "~Grados" ;
+ Text [ french ] = "~Degrs" ;
+ Text [ dutch ] = "Gra~den" ;
+ Text [ portuguese ] = "~Graus" ;
+ Text[ chinese_simplified ] = "Ƕ(~G)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Stopie";
+ Text[ japanese ] = "x";
+ Text[ chinese_traditional ] = "(~G)";
+ Text[ arabic ] = "/";
+ Text[ dutch ] = "Gra~den";
+ Text[ chinese_simplified ] = "Ƕ(~G)";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "De~rece";
+ Text[ language_user1 ] = " ";
+ };
+ NumericField NF_ORIENT
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 191 , 59 ) ;
+ Size = MAP_APPFONT ( 28 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ StrictFormat = TRUE ;
+ };
+ FixedText FT_BORDER_LOCK
+ {
+ Pos = MAP_APPFONT ( 191 , 76 ) ;
+ Size = MAP_APPFONT ( 60 , 10 ) ;
+ Text = "Bezugs~kante" ;
+ Text [ ENGLISH ] = "Reference edge" ;
+ Text [ english_us ] = "Re~ference edge" ;
+ Text [ portuguese_brazilian ] = "Bezugs~kante" ;
+ Text [ swedish ] = "Referens~kant" ;
+ Text [ danish ] = "Referencekant" ;
+ Text [ italian ] = "Bordo di ~riferimento" ;
+ Text [ spanish ] = "~Aristas de referencia" ;
+ Text [ french ] = "~Bord de rfrence" ;
+ Text [ dutch ] = "~Invalshoek" ;
+ Text [ portuguese ] = "Borda de ~referncia" ;
+ Text[ chinese_simplified ] = "ñ(~F)";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Krawd odniesienia";
+ Text[ japanese ] = "ɂȂ鉏(~F)";
+ Text[ chinese_traditional ] = "ѷ(~F)";
+ Text[ arabic ] = " ";
+ Text[ dutch ] = "~Invalshoek";
+ Text[ chinese_simplified ] = "ñ(~F)";
+ Text[ greek ] = " ";
+ Text[ korean ] = " (~F)";
+ Text[ turkish ] = "Referans ~kenar";
+ Text[ language_user1 ] = " ";
+ };
+ Control CTR_BORDER_LOCK
+ {
+ HelpId = HID_ALIGNMENT_CTR_BORDER_LOCK ;
+ Hide = TRUE ;
+ Pos = MAP_APPFONT ( 191 , 87 ) ;
+ Size = MAP_APPFONT ( 50 , 15 ) ;
+ TabStop = TRUE ;
+ };
+ GroupBox GB_ALIGN
+ {
+ Pos = MAP_APPFONT ( 185 , 3 ) ;
+ Size = MAP_APPFONT ( 69 , 100 ) ;
+ Text = "Schreibrichtung" ;
+ Text [ ENGLISH ] = "Orientation" ;
+ Text [ norwegian ] = "Orientation" ;
+ Text [ italian ] = "Orientamento" ;
+ Text [ portuguese_brazilian ] = "Orientao" ;
+ Text [ portuguese ] = "Orientao" ;
+ Text [ finnish ] = "Suunta" ;
+ Text [ danish ] = "Skriveretning" ;
+ Text [ french ] = "Sens d'criture" ;
+ Text [ swedish ] = "Skrivriktning" ;
+ Text [ dutch ] = "Schrijfrichting" ;
+ Text [ spanish ] = "Direccin de escritura" ;
+ Text [ english_us ] = "Text direction" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Kierunek pisania";
+ Text[ japanese ] = "̕";
+ Text[ chinese_traditional ] = "V";
+ Text[ arabic ] = " ";
+ Text[ dutch ] = "Schrijfrichting";
+ Text[ chinese_simplified ] = "";
+ Text[ greek ] = " ";
+ Text[ korean ] = "ؽƮ ";
+ Text[ turkish ] = "Metin yn";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_LEFTSPACE
+ {
+ Pos = MAP_APPFONT ( 12 , 99 ) ;
+ Size = MAP_APPFONT ( 30 , 10 ) ;
+ Text = "L~inks" ;
+ Text [ ENGLISH ] = "L~eft" ;
+ Text [ norwegian ] = "L~eft" ;
+ Text [ italian ] = "A sinistra" ;
+ Text [ portuguese_brazilian ] = "E~squerda" ;
+ Text [ portuguese ] = "E~squerda" ;
+ Text [ finnish ] = "Va~sen" ;
+ Text [ danish ] = "Venstre" ;
+ Text [ french ] = "~ gauche" ;
+ Text [ swedish ] = "Vnster" ;
+ Text [ dutch ] = "~Links" ;
+ Text [ spanish ] = "I~zquierda" ;
+ Text [ english_us ] = "L~eft" ;
+ Text[ chinese_simplified ] = "(~E)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Z lewej";
+ Text[ japanese ] = "(~E)";
+ Text[ chinese_traditional ] = "V(~E)";
+ Text[ arabic ] = "";
+ Text[ dutch ] = "~Links";
+ Text[ chinese_simplified ] = "(~E)";
+ Text[ greek ] = "";
+ Text[ korean ] = "(~E)";
+ Text[ turkish ] = "~Sol";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField ED_LEFTSPACE
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 45 , 97 ) ;
+ Size = MAP_APPFONT ( 39 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ SpinSize = 1 ;
+ DecimalDigits = 1 ;
+ Maximum = 100 ;
+ Last = 100 ;
+ Unit = FUNIT_MM ;
+ };
+ FixedText FT_RIGHTSPACE
+ {
+ Pos = MAP_APPFONT ( 12 , 114 ) ;
+ Size = MAP_APPFONT ( 30 , 10 ) ;
+ Text = "Recht~s" ;
+ Text [ ENGLISH ] = "Rig~ht" ;
+ Text [ norwegian ] = "Rig~ht" ;
+ Text [ italian ] = "A destra" ;
+ Text [ portuguese_brazilian ] = "Dir~eita" ;
+ Text [ portuguese ] = "Dir~eita" ;
+ Text [ finnish ] = "Oi~kea" ;
+ Text [ danish ] = "Hjre" ;
+ Text [ french ] = " droite" ;
+ Text [ swedish ] = "~Hger" ;
+ Text [ dutch ] = "~Rechts" ;
+ Text [ spanish ] = "Derec~ha" ;
+ Text [ english_us ] = "Right" ;
+ Text[ chinese_simplified ] = "(~H)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Z prawej";
+ Text[ japanese ] = "E";
+ Text[ chinese_traditional ] = "Vk(~H)";
+ Text[ arabic ] = "";
+ Text[ dutch ] = "~Rechts";
+ Text[ chinese_simplified ] = "(~H)";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "~Sa";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField ED_RIGHTSPACE
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 45 , 112 ) ;
+ Size = MAP_APPFONT ( 39 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ SpinSize = 1 ;
+ DecimalDigits = 1 ;
+ Maximum = 100 ;
+ Last = 100 ;
+ Unit = FUNIT_MM ;
+ };
+ FixedText FT_TOPSPACE
+ {
+ Pos = MAP_APPFONT ( 97 , 99 ) ;
+ Size = MAP_APPFONT ( 30 , 10 ) ;
+ Text = "Obe~n" ;
+ Text [ ENGLISH ] = "To~p" ;
+ Text [ norwegian ] = "To~p" ;
+ Text [ italian ] = "In altro" ;
+ Text [ portuguese_brazilian ] = "To~po" ;
+ Text [ portuguese ] = "Em ~cima" ;
+ Text [ finnish ] = "Yl~" ;
+ Text [ danish ] = "verst" ;
+ Text [ french ] = "~En haut" ;
+ Text [ swedish ] = "~verst" ;
+ Text [ dutch ] = "~Boven" ;
+ Text [ spanish ] = "Arr~iba" ;
+ Text [ english_us ] = "To~p" ;
+ Text[ chinese_simplified ] = "(~P)";
+ Text[ russian ] = "";
+ Text[ polish ] = "W grze";
+ Text[ japanese ] = "(~P)";
+ Text[ chinese_traditional ] = "VW(~P)";
+ Text[ arabic ] = "";
+ Text[ dutch ] = "~Boven";
+ Text[ chinese_simplified ] = "(~P)";
+ Text[ greek ] = "~";
+ Text[ korean ] = "(~P)";
+ Text[ turkish ] = "~st";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField ED_TOPSPACE
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 130 , 97 ) ;
+ Size = MAP_APPFONT ( 39 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ SpinSize = 1 ;
+ DecimalDigits = 1 ;
+ Maximum = 100 ;
+ Last = 100 ;
+ Unit = FUNIT_MM ;
+ };
+ FixedText FT_BOTTOMSPACE
+ {
+ Pos = MAP_APPFONT ( 97 , 114 ) ;
+ Size = MAP_APPFONT ( 30 , 10 ) ;
+ Text = "Unt~en" ;
+ Text [ ENGLISH ] = "Botto~m" ;
+ Text [ norwegian ] = "Botto~m" ;
+ Text [ italian ] = "In basso" ;
+ Text [ portuguese_brazilian ] = "Bas~e" ;
+ Text [ portuguese ] = "Em ~baixo" ;
+ Text [ finnish ] = "A~la" ;
+ Text [ danish ] = "Nederst" ;
+ Text [ french ] = "En ~bas" ;
+ Text [ swedish ] = "Un~derst" ;
+ Text [ dutch ] = "~Onder" ;
+ Text [ spanish ] = "Abaj~o" ;
+ Text [ english_us ] = "Botto~m" ;
+ Text[ chinese_simplified ] = "(~M)";
+ Text[ russian ] = "";
+ Text[ polish ] = "W dole";
+ Text[ japanese ] = "(~M)";
+ Text[ chinese_traditional ] = "VU(~M)";
+ Text[ arabic ] = "";
+ Text[ dutch ] = "~Onder";
+ Text[ chinese_simplified ] = "(~M)";
+ Text[ greek ] = "";
+ Text[ korean ] = "Ʒ(~M)";
+ Text[ turkish ] = "Al~t";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField ED_BOTTOMSPACE
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 130 , 112 ) ;
+ Size = MAP_APPFONT ( 39 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ SpinSize = 1 ;
+ DecimalDigits = 1 ;
+ Maximum = 100 ;
+ Last = 100 ;
+ Unit = FUNIT_MM ;
+ };
+ GroupBox GB_SPACE
+ {
+ Pos = MAP_APPFONT ( 6 , 86 ) ;
+ Size = MAP_APPFONT ( 173 , 45 ) ;
+ Text = "Abstand zu Gitterlinien" ;
+ Text [ ENGLISH ] = "Margins" ;
+ Text [ norwegian ] = "Margins" ;
+ Text [ italian ] = "Distanza dalla linee della griglia" ;
+ Text [ portuguese_brazilian ] = "Margens" ;
+ Text [ portuguese ] = "Margens da quadrcula" ;
+ Text [ finnish ] = "Reunukset" ;
+ Text [ danish ] = "Afstand til gitterlinjer" ;
+ Text [ french ] = "cart des lignes de la grille" ;
+ Text [ swedish ] = "Marginaler" ;
+ Text [ dutch ] = "Afstand tot rasterlijnen" ;
+ Text [ spanish ] = "Distancia a la cuadrcula" ;
+ Text [ english_us ] = "Spacing to grid lines" ;
+ Text[ chinese_simplified ] = "ߵľ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Odstp do linii siatki";
+ Text[ japanese ] = "دސ܂ł̊Ԋu";
+ Text[ chinese_traditional ] = "ܺuZ";
+ Text[ arabic ] = " ";
+ Text[ dutch ] = "Afstand tot rasterlijnen";
+ Text[ chinese_simplified ] = "ߵľ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ";
+ Text[ turkish ] = "Klavuz izgilere uzaklk";
+ Text[ language_user1 ] = " ";
+ };
+ TriStateBox BTN_WRAP
+ {
+ Pos = MAP_APPFONT ( 190 , 117 ) ;
+ Size = MAP_APPFONT ( 60 , 10 ) ;
+ Text = "Zeilenumbru~ch" ;
+ Text [ ENGLISH ] = "Linebrea~k" ;
+ Text [ norwegian ] = "Linebrea~k" ;
+ Text [ italian ] = "Testo a capo" ;
+ Text [ portuguese_brazilian ] = "Interrup~ao de linha" ;
+ Text [ portuguese ] = "Quebra de ~linha" ;
+ Text [ finnish ] = "R~ivinvaihto" ;
+ Text [ danish ] = "Linjeskift" ;
+ Text [ french ] = "R~envoi la ligne" ;
+ Text [ swedish ] = "Rad~brytning" ;
+ Text [ dutch ] = "~Regelafbreking" ;
+ Text [ spanish ] = "Salto de ~lnea" ;
+ Text [ english_us ] = "Line break" ;
+ Text[ chinese_simplified ] = "(~L)";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Podzia wierszy";
+ Text[ japanese ] = "s";
+ Text[ chinese_traditional ] = "(~L)";
+ Text[ arabic ] = " ";
+ Text[ dutch ] = "~Regelafbreking";
+ Text[ chinese_simplified ] = "(~L)";
+ Text[ greek ] = " ";
+ Text[ korean ] = "ٹٲ";
+ Text[ turkish ] = "Satr son~u";
+ Text[ language_user1 ] = " ";
+ };
+ GroupBox GB_WRAP
+ {
+ Pos = MAP_APPFONT ( 185 , 106 ) ;
+ Size = MAP_APPFONT ( 69 , 25 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? Textflu : Textflu */
+ Text = "Textfluss" ;
+ Text [ English ] = "Text Flow" ;
+ Text [ english_us ] = "Text flow" ;
+ Text [ swedish ] = "Textflde" ;
+ Text [ danish ] = "Tekstretning" ;
+ Text [ italian ] = "Flusso di testo" ;
+ Text [ spanish ] = "Flujo del texto" ;
+ Text [ french ] = "Enchanements" ;
+ Text [ dutch ] = "Tekstverloop" ;
+ Text [ portuguese_brazilian ] = "Textflu" ;
+ Text [ portuguese ] = "Fluxo de texto" ;
+ Text[ chinese_simplified ] = "кͷҳ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Tekst";
+ Text[ japanese ] = "̍";
+ Text[ chinese_traditional ] = "M";
+ Text[ arabic ] = " ";
+ Text[ dutch ] = "Tekstverloop";
+ Text[ chinese_simplified ] = "кͷҳ";
+ Text[ greek ] = " ";
+ Text[ korean ] = "ؽƮ 帧";
+ Text[ turkish ] = "Metin ak";
+ Text[ language_user1 ] = " ";
+ };
+ ImageList IL_LOCK_BMPS
+ {
+ ImageBitmap = Bitmap { File = "lockmode.bmp" ; };
+ MaskColor = IL_LOCK_MCOL ;
+ IdList =
+ {
+ IID_BOTTOMLOCK ;
+ IID_TOPLOCK ;
+ IID_CELLLOCK ;
+ };
+ IdCount = { 3 ; };
+ };
+ String STR_BOTTOMLOCK
+ {
+ Text = "Textausdehnung von unterer Zellkante aus." ;
+ Text [ English ] = "Text direction by lower cell-edge" ;
+ Text [ english_us ] = "Text Extension from Lower Cell Border" ;
+ Text [ portuguese_brazilian ] = "Textausdehnung von unterer Zellkante aus." ;
+ Text [ swedish ] = "Textutstrckning frn nedre cellkanten." ;
+ Text [ danish ] = "Tekstudstrkning ud fra nederste cellekant" ;
+ Text [ italian ] = "Estensione del testo dal bordo inferiore della cella." ;
+ Text [ spanish ] = "Expansin del texto a partir del borde inferior de la celda." ;
+ Text [ french ] = "Extension de texte partir du bord infrieur de la cellule" ;
+ Text [ dutch ] = "Inhoud uitbreiden vanaf onderkant cel." ;
+ Text [ portuguese ] = "Expanso do texto a partir do canto inferior da clula." ;
+ Text[ chinese_simplified ] = "ִӵԪ±Ե졣";
+ Text[ russian ] = " .";
+ Text[ polish ] = "Rozcignicie tekstu od dolnej krawdzi komrki.";
+ Text[ japanese ] = "ق̉ɌX";
+ Text[ language_user1 ] = " ";
+ Text[ chinese_traditional ] = "rqxsUtC";
+ Text[ arabic ] = " .";
+ Text[ dutch ] = "Inhoud uitbreiden vanaf onderkant cel.";
+ Text[ chinese_simplified ] = "ִӵԪ±Ե졣";
+ Text[ greek ] = " .";
+ Text[ korean ] = " Ʒ ׵θ ؽƮ Ȯ";
+ Text[ turkish ] = "Hcre alt kenarndan metin genilemesi";
+ };
+ String STR_TOPLOCK
+ {
+ Text = "Textausdehnung von oberer Zellkante aus." ;
+ Text [ English ] = "Text direction by upper cell-edge" ;
+ Text [ english_us ] = "Text Extension from Upper Cell Border" ;
+ Text [ portuguese_brazilian ] = "Textausdehnung von oberer Zellkante aus." ;
+ Text [ swedish ] = "Textutstrckning frn vre cellkanten." ;
+ Text [ danish ] = "Tekstudstrkning ud fra verste cellerand." ;
+ Text [ italian ] = "Estensione del testo dal bordo superiore della cella." ;
+ Text [ spanish ] = "Expansin del texto a partir del borde superior de la celda." ;
+ Text [ french ] = "Extension de texte partir du bord suprieur de la cellule" ;
+ Text [ dutch ] = "Inhoud uitbreiden vanaf bovenkant cel." ;
+ Text [ portuguese ] = "Expanso do texto a partir do canto superior da clula." ;
+ Text[ chinese_simplified ] = "ִӵԪϱԵ졣";
+ Text[ russian ] = " .";
+ Text[ polish ] = "Rozcignicie tekstu od grnej krawdzi komrki.";
+ Text[ japanese ] = "ق̏㉏ɌX";
+ Text[ language_user1 ] = " ";
+ Text[ chinese_traditional ] = "rqxsWtC";
+ Text[ arabic ] = " .";
+ Text[ dutch ] = "Inhoud uitbreiden vanaf bovenkant cel.";
+ Text[ chinese_simplified ] = "ִӵԪϱԵ졣";
+ Text[ greek ] = " .";
+ Text[ korean ] = " ׵θ ؽƮ Ȯ";
+ Text[ turkish ] = "Hcre st kenarndan metin genilemesi.";
+ };
+ String STR_CELLLOCK
+ {
+ Text = "Textausdehnung nur innerhalb der Zelle." ;
+ Text [ English ] = "Text- expanding only inside cell" ;
+ Text [ english_us ] = "Text Extension Inside Cell" ;
+ Text [ portuguese_brazilian ] = "Textausdehnung nur innerhalb der Zelle." ;
+ Text [ swedish ] = "Textutstrckning endast inom cellen." ;
+ Text [ danish ] = "Tekstudstrkning kun indenfor cellen." ;
+ Text [ italian ] = "Estensione del testo solo all'interno della cella." ;
+ Text [ spanish ] = "Expansin del texto solo dentro de la celda." ;
+ Text [ french ] = "Extension de texte uniquement l'intrieur de la cellule." ;
+ Text [ dutch ] = "Inhoud uitbreiden alleen binnen cel." ;
+ Text [ portuguese ] = "Expanso do texto apenas dentro da clula." ;
+ Text[ chinese_simplified ] = "ֻڵԪ졣";
+ Text[ russian ] = " .";
+ Text[ polish ] = "Rozcignicie tekstu tylko wewntrz komrki.";
+ Text[ japanese ] = "÷Ă̂݌X";
+ Text[ language_user1 ] = " ";
+ Text[ chinese_traditional ] = "rubxs椺C";
+ Text[ arabic ] = " .";
+ Text[ dutch ] = "Inhoud uitbreiden alleen binnen cel.";
+ Text[ chinese_simplified ] = "ֻڵԪ졣";
+ Text[ greek ] = " .";
+ Text[ korean ] = " ȿ ؽƮ Ȯ";
+ Text[ turkish ] = "Yalnzca hcre iinde metin genilemesi";
+ };
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "Wyrwnanie";
+ Text[ japanese ] = "zu";
+ Text[ chinese_traditional ] = "";
+ Text[ arabic ] = "";
+ Text[ dutch ] = "Uitlijning";
+ Text[ chinese_simplified ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "Hizalama";
+ Text[ language_user1 ] = " ";
+};
+ // ********************************************************************** EOF
diff --git a/svx/source/dialog/backgrnd.cxx b/svx/source/dialog/backgrnd.cxx
new file mode 100644
index 000000000000..53cddf6bc530
--- /dev/null
+++ b/svx/source/dialog/backgrnd.cxx
@@ -0,0 +1,1884 @@
+/*************************************************************************
+ *
+ * $RCSfile: backgrnd.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:06 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+// include ---------------------------------------------------------------
+
+#ifndef _SFXINTITEM_HXX //autogen
+#include <svtools/intitem.hxx>
+#endif
+#ifndef _SV_MSGBOX_HXX //autogen
+#include <vcl/msgbox.hxx>
+#endif
+#ifndef _URLOBJ_HXX
+#include <tools/urlobj.hxx>
+#endif
+#ifndef _SFXINIMGR_HXX
+#include <svtools/iniman.hxx>
+#endif
+#ifndef _SFX_OBJSH_HXX //autogen
+#include <sfx2/objsh.hxx>
+#endif
+#ifndef _SFX_INIMGR_HXX
+#include <sfx2/inimgr.hxx>
+#endif
+#ifndef _SFXDOCFILE_HXX
+#include <sfx2/docfile.hxx>
+#endif
+#ifndef _WALLITEM_HXX
+#include <svtools/wallitem.hxx>
+#endif
+#ifndef _CNTWALL_HXX
+#include <svtools/cntwall.hxx>
+#endif
+#ifndef _CNTIDS_HRC
+#include <sfx2/cntids.hrc>
+#endif
+#pragma hdrstop
+
+#define _SVX_BACKGRND_CXX
+
+#include "dialogs.hrc"
+#include "backgrnd.hrc"
+#include "svxitems.hrc"
+
+#define ITEMID_BRUSH 0
+#define ITEMID_COLOR_TABLE 0
+
+// Tabellenhintergrund
+#define TBL_DEST_CELL 0
+#define TBL_DEST_ROW 1
+#define TBL_DEST_TBL 2
+
+#include "brshitem.hxx"
+#include "backgrnd.hxx"
+
+#include "xtable.hxx"
+#include "impgrf.hxx"
+#include "svxerr.hxx"
+#include "drawitem.hxx"
+#include "dialmgr.hxx"
+#include "htmlmode.hxx"
+
+// static ----------------------------------------------------------------
+
+static USHORT pRanges[] =
+{
+ SID_VIEW_FLD_PIC, SID_VIEW_FLD_PIC,
+ SID_ATTR_BRUSH, SID_ATTR_BRUSH,
+ SID_ATTR_BRUSH_CHAR, SID_ATTR_BRUSH_CHAR,
+ 0
+};
+
+struct SvxBackgroundTable_Impl
+{
+ SvxBrushItem* pCellBrush;
+ SvxBrushItem* pRowBrush;
+ SvxBrushItem* pTableBrush;
+ USHORT nActPos;
+
+ SvxBackgroundTable_Impl() :
+ pCellBrush(NULL), pRowBrush(NULL), pTableBrush(NULL) {}
+};
+
+struct SvxBackgroundPara_Impl
+{
+ SvxBrushItem* pParaBrush;
+ SvxBrushItem* pCharBrush;
+
+ USHORT nActPos;
+
+ SvxBackgroundPara_Impl() :
+ pParaBrush(NULL), pCharBrush(NULL) {}
+};
+
+struct SvxBackgroundPage_Impl
+{
+ Timer* pLoadTimer;
+ BOOL bIsImportDlgInExecute;
+
+ SvxBackgroundPage_Impl() :
+ pLoadTimer(NULL), bIsImportDlgInExecute(FALSE) {}
+};
+
+//-------------------------------------------------------------------------
+
+/* [Beschreibung]
+
+*/
+
+USHORT GetItemId_Impl( ValueSet& rValueSet, const Color& rCol )
+{
+ BOOL bFound = FALSE;
+ USHORT nCount = rValueSet.GetItemCount();
+ USHORT n = 1;
+
+ while ( !bFound && n <= nCount )
+ {
+ Color aValCol = rValueSet.GetItemColor(n);
+
+ bFound = ( aValCol.GetRed() == rCol.GetRed()
+ && aValCol.GetGreen() == rCol.GetGreen()
+ && aValCol.GetBlue() == rCol.GetBlue() );
+
+ if ( !bFound )
+ n++;
+ }
+ return bFound ? n : 0;
+}
+
+// class BackgroundPreview -----------------------------------------------
+
+/* [Beschreibung]
+
+ Vorschaufenster f"ur Brush oder Bitmap
+*/
+
+class BackgroundPreviewImpl : public Window
+{
+public:
+ BackgroundPreviewImpl( Window* pParent,
+ const ResId& rResId, BOOL bIsBmpPreview );
+ ~BackgroundPreviewImpl();
+
+ void NotifyChange( const Color& rColor );
+ void NotifyChange( const Bitmap* pBitmap );
+
+protected:
+ virtual void Paint( const Rectangle& rRect );
+
+private:
+ const BOOL bIsBmp;
+ Bitmap* pBitmap;
+ Point aDrawPos;
+ Size aDrawSize;
+ Rectangle aDrawRect;
+};
+
+//-----------------------------------------------------------------------
+
+BackgroundPreviewImpl::BackgroundPreviewImpl
+(
+ Window* pParent,
+ const ResId& rResId,
+ BOOL bIsBmpPreview
+) :
+
+/* [Beschreibung]
+
+*/
+
+ Window( pParent, rResId ),
+
+ bIsBmp ( bIsBmpPreview ),
+ pBitmap ( NULL ),
+ aDrawRect( Point(0,0), GetOutputSizePixel() )
+
+{
+ Paint( aDrawRect );
+}
+
+//-----------------------------------------------------------------------
+
+BackgroundPreviewImpl::~BackgroundPreviewImpl()
+
+/* [Beschreibung]
+
+*/
+
+{
+ delete pBitmap;
+}
+
+//-----------------------------------------------------------------------
+void BackgroundPreviewImpl::NotifyChange( const Color& rColor )
+
+/* [Beschreibung]
+
+*/
+
+{
+ if ( !bIsBmp )
+ {
+ if ( rColor == Color( COL_TRANSPARENT ) )
+ {
+ SetFillColor( GetBackground().GetColor() );
+ Paint( aDrawRect );
+ }
+ SetFillColor( rColor );
+ Paint( aDrawRect );
+ }
+}
+
+//-----------------------------------------------------------------------
+
+void BackgroundPreviewImpl::NotifyChange( const Bitmap* pNewBitmap )
+/* [Beschreibung]
+
+*/
+
+{
+ if ( bIsBmp && (pNewBitmap || pBitmap) )
+ {
+ if ( pNewBitmap && pBitmap )
+ *pBitmap = *pNewBitmap;
+ else if ( pNewBitmap && !pBitmap )
+ pBitmap = new Bitmap( *pNewBitmap );
+ else if ( !pNewBitmap )
+ DELETEZ( pBitmap );
+
+ if ( pBitmap )
+ {
+ Size aSize = GetOutputSizePixel();
+ aDrawSize = pBitmap->GetSizePixel();
+
+ if ( aDrawSize.Width() > aSize.Width() )
+ aDrawSize.Width() = aSize.Width();
+ if ( aDrawSize.Height() > aSize.Height() )
+ aDrawSize.Height() = aSize.Height();
+
+ aDrawPos.X() = (aSize.Width() - aDrawSize.Width()) / 2;
+ aDrawPos.Y() = (aSize.Height() - aDrawSize.Height()) / 2;
+ }
+ Paint( aDrawRect );
+ }
+}
+
+//-----------------------------------------------------------------------
+
+void BackgroundPreviewImpl::Paint( const Rectangle& rRect )
+
+/* [Beschreibung]
+
+*/
+
+{
+ SetLineColor();
+ DrawRect( aDrawRect );
+
+ if ( bIsBmp )
+ {
+ if ( pBitmap )
+ DrawBitmap( aDrawPos, aDrawSize, *pBitmap );
+ else
+ {
+ Size aSize = GetOutputSizePixel();
+ SetLineColor( Color( COL_BLACK ) );
+ DrawLine( Point(0,0), Point(aSize.Width(),aSize.Height()) );
+ DrawLine( Point(0,aSize.Height()), Point(aSize.Width(),0) );
+ }
+ }
+}
+
+// class SvxBackgroundTabPage --------------------------------------------
+
+#define HDL(hdl) LINK(this,SvxBackgroundTabPage,hdl)
+
+SvxBackgroundTabPage::SvxBackgroundTabPage( Window* pParent,
+ const SfxItemSet& rCoreSet ) :
+
+/* [Beschreibung]
+
+*/
+
+ SvxTabPage( pParent, SVX_RES( RID_SVXPAGE_BACKGROUND ), rCoreSet ),
+
+ aBackgroundColorSet ( this, ResId( SET_BGDCOLOR ) ),
+ aBackgroundColorBox ( this, ResId( GB_BGDCOLOR ) ),
+ aPreviewBox ( this, ResId( GB_COL_PREVIEW ) ),
+ pPreviewWin1 ( new BackgroundPreviewImpl(
+ this, ResId( WIN_PREVIEW1 ), FALSE ) ),
+ aBtnBrowse ( this, ResId( BTN_BROWSE ) ),
+ aBtnLink ( this, ResId( BTN_LINK ) ),
+ aBtnPreview ( this, ResId( BTN_PREVIEW ) ),
+ aFtFile ( this, ResId( FT_FILE ) ),
+ aGbFile ( this, ResId( GB_FILE ) ),
+ aBtnPosition ( this, ResId( BTN_POSITION ) ),
+ aBtnArea ( this, ResId( BTN_AREA ) ),
+ aBtnTile ( this, ResId( BTN_TILE ) ),
+ aWndPosition ( this, ResId( WND_POSITION ), RP_MM ),
+ aGbPosition ( this, ResId( GB_POSITION ) ),
+ pPreviewWin2 ( new BackgroundPreviewImpl(
+ this, ResId( WIN_PREVIEW2 ), TRUE ) ),
+ aGbPreview ( this, ResId( GB_PREVIEW ) ),
+ aSelectTxt ( this, ResId( FT_SELECTOR ) ),
+ aLbSelect ( this, ResId( LB_SELECTOR ) ),
+ aTblDesc ( this, ResId( FT_TBL_DESC ) ),
+ aTblLBox ( this, ResId( LB_TBL_BOX ) ),
+ aParaLBox ( this, ResId( LB_PARA_BOX ) ),
+ aStrBrowse ( ResId( STR_BROWSE ) ),
+ aStrUnlinked ( ResId( STR_UNLINKED ) ),
+ nHtmlMode ( 0 ),
+ bAllowShowSelector ( TRUE ),
+ bIsGraphicValid ( FALSE ),
+ bLinkOnly ( FALSE ),
+ pPageImpl ( new SvxBackgroundPage_Impl ),
+ pImportDlg ( NULL ),
+ pTableBck_Impl ( NULL ),
+ pParaBck_Impl ( NULL )
+
+{
+ // diese Page braucht ExchangeSupport
+ SetExchangeSupport();
+
+ const SfxPoolItem* pItem;
+ SfxObjectShell* pShell;
+
+ if ( SFX_ITEM_SET == rCoreSet.GetItemState( SID_HTML_MODE, FALSE, &pItem )
+ || ( 0 != ( pShell = SfxObjectShell::Current()) &&
+ 0 != ( pItem = pShell->GetItem( SID_HTML_MODE ) ) ) )
+ {
+ nHtmlMode = ((SfxUInt16Item*)pItem)->GetValue();
+ }
+
+ FillColorValueSets_Impl();
+
+ aBackgroundColorSet.SetSelectHdl( HDL(BackgroundColorHdl_Impl) );
+ FreeResource();
+}
+
+//------------------------------------------------------------------------
+
+SvxBackgroundTabPage::~SvxBackgroundTabPage()
+
+/* [Beschreibung]
+
+*/
+
+{
+ delete pPreviewWin1;
+ delete pPreviewWin2;
+ delete pPageImpl->pLoadTimer;
+ delete pPageImpl;
+ delete pImportDlg;
+
+ if( pTableBck_Impl)
+ {
+ delete pTableBck_Impl->pCellBrush;
+ delete pTableBck_Impl->pRowBrush;
+ delete pTableBck_Impl->pTableBrush;
+ delete pTableBck_Impl;
+ }
+
+ if(pParaBck_Impl)
+ {
+ delete pParaBck_Impl->pParaBrush;
+ delete pParaBck_Impl->pCharBrush;
+ delete pParaBck_Impl;
+ }
+}
+
+//------------------------------------------------------------------------
+
+USHORT* SvxBackgroundTabPage::GetRanges()
+
+/* [Beschreibung]
+
+ gibt den Bereich der Which-Werte zur"uck
+*/
+
+{
+ return pRanges;
+}
+
+//------------------------------------------------------------------------
+
+SfxTabPage* SvxBackgroundTabPage::Create( Window* pParent,
+ const SfxItemSet& rAttrSet )
+
+/* [Beschreibung]
+
+ Create-Methode f"ur den TabDialog
+*/
+
+{
+ return ( new SvxBackgroundTabPage( pParent, rAttrSet ) );
+}
+
+//------------------------------------------------------------------------
+
+void SvxBackgroundTabPage::Reset( const SfxItemSet& rSet )
+
+/* [Beschreibung]
+
+*/
+
+{
+// os: So ein Unsinn! Irgendwo laesst sich so ein Item immer finden,
+// es muss aber im rSet vorhanden sein!
+// const SfxPoolItem* pX = GetOldItem( rSet, SID_VIEW_FLD_PIC );
+// if( pX && pX->ISA(SfxWallpaperItem))
+ if(SFX_ITEM_AVAILABLE <= rSet.GetItemState(GetWhich(SID_VIEW_FLD_PIC), FALSE))
+ {
+ ResetFromWallpaperItem( rSet );
+ return;
+ }
+
+ // Zustand des Vorschau-Buttons durch UserData persistent
+ String aUserData = GetUserData();
+ aBtnPreview.Check( aUserData.Len() ? ( sal_Unicode('1') == aUserData.GetChar( 0 ) ) : FALSE );
+
+ // nach Reset kein ShowSelector() mehr aufrufen d"urfen
+ bAllowShowSelector = FALSE;
+
+
+ // Input-BrushItem besorgen und auswerten
+ const SvxBrushItem* pBgdAttr = NULL;
+ USHORT nSlot = SID_ATTR_BRUSH;
+ const SfxPoolItem* pItem;
+ USHORT nDestValue = USHRT_MAX;
+
+ if ( SFX_ITEM_SET == rSet.GetItemState( SID_BACKGRND_DESTINATION,
+ FALSE, &pItem ) )
+ {
+ nDestValue = ((const SfxUInt16Item*)pItem)->GetValue();
+ aTblLBox.SelectEntryPos(nDestValue);
+
+ switch ( nDestValue )
+ {
+ case TBL_DEST_CELL:
+ nSlot = SID_ATTR_BRUSH;
+ break;
+ case TBL_DEST_ROW:
+ nSlot = SID_ATTR_BRUSH_ROW;
+ break;
+ case TBL_DEST_TBL:
+ nSlot = SID_ATTR_BRUSH_TABLE;
+ break;
+ }
+ }
+ else if( SFX_ITEM_SET == rSet.GetItemState(
+ SID_PARA_BACKGRND_DESTINATION, FALSE, &pItem ) )
+ {
+ nDestValue = ((const SfxUInt16Item*)pItem)->GetValue();
+ // ist gerade Zeichen aktiviert?
+ USHORT nParaSel = aParaLBox.GetSelectEntryPos();
+ if(1 == nParaSel)
+ {
+ // dann war das ein "Standard" - Aufruf
+ nDestValue = nParaSel;
+ }
+ aParaLBox.SelectEntryPos(nDestValue);
+
+ switch ( nDestValue )
+ {
+ case PARA_DEST_PARA:
+ nSlot = SID_ATTR_BRUSH;
+ break;
+ case PARA_DEST_CHAR:
+ nSlot = SID_ATTR_BRUSH_CHAR;
+ break;
+ }
+ }
+ USHORT nWhich = GetWhich( nSlot );
+
+ if ( rSet.GetItemState( nWhich, FALSE ) >= SFX_ITEM_AVAILABLE )
+ pBgdAttr = (const SvxBrushItem*)&( rSet.Get( nWhich ) );
+
+ aBtnTile.Check();
+
+ if ( pBgdAttr )
+ FillControls_Impl(*pBgdAttr, aUserData);
+ else
+ {
+ aSelectTxt.Hide();
+ aLbSelect.Hide();
+ aLbSelect.SelectEntryPos( 0 );
+ ShowColorUI_Impl();
+
+ const SfxPoolItem* pOld = GetOldItem( rSet, SID_ATTR_BRUSH );
+
+ if ( pOld )
+ aBgdColor = ( (SvxBrushItem*)pOld )->GetColor();
+ }
+
+ if ( nDestValue != USHRT_MAX )
+ {
+ if(aTblLBox.IsVisible())
+ {
+ USHORT nValue = aTblLBox.GetSelectEntryPos();
+
+ if ( pTableBck_Impl )
+ {
+ delete pTableBck_Impl->pCellBrush;
+ delete pTableBck_Impl->pRowBrush;
+ delete pTableBck_Impl->pTableBrush;
+ }
+ else
+ pTableBck_Impl = new SvxBackgroundTable_Impl();
+
+ pTableBck_Impl->nActPos = nValue;
+
+ nWhich = GetWhich( SID_ATTR_BRUSH );
+ if ( rSet.GetItemState( nWhich, FALSE ) >= SFX_ITEM_AVAILABLE )
+ pBgdAttr = (const SvxBrushItem*)&( rSet.Get( nWhich ) );
+ pTableBck_Impl->pCellBrush = new SvxBrushItem(*pBgdAttr);
+
+ if ( rSet.GetItemState( SID_ATTR_BRUSH_ROW, FALSE ) >= SFX_ITEM_AVAILABLE )
+ pBgdAttr = (const SvxBrushItem*)&( rSet.Get( SID_ATTR_BRUSH_ROW ) );
+ pTableBck_Impl->pRowBrush = new SvxBrushItem(*pBgdAttr);
+
+ if ( rSet.GetItemState( SID_ATTR_BRUSH_TABLE, FALSE ) >= SFX_ITEM_AVAILABLE )
+ pBgdAttr = (const SvxBrushItem*)&( rSet.Get( SID_ATTR_BRUSH_TABLE ) );
+ pTableBck_Impl->pTableBrush = new SvxBrushItem(*pBgdAttr);
+
+ TblDestinationHdl_Impl(&aTblLBox);
+ aTblLBox.SaveValue();
+ }
+ else
+ {
+ USHORT nValue = aParaLBox.GetSelectEntryPos();
+
+ if ( pParaBck_Impl )
+ {
+ delete pParaBck_Impl->pParaBrush;
+ delete pParaBck_Impl->pCharBrush;
+ }
+ else
+ pParaBck_Impl = new SvxBackgroundPara_Impl();
+
+ pParaBck_Impl->nActPos = nValue;
+
+ nWhich = GetWhich( SID_ATTR_BRUSH );
+ if ( rSet.GetItemState( nWhich, FALSE ) >= SFX_ITEM_AVAILABLE )
+ pBgdAttr = (const SvxBrushItem*)&( rSet.Get( nWhich ) );
+ pParaBck_Impl->pParaBrush = new SvxBrushItem(*pBgdAttr);
+
+ nWhich = GetWhich( SID_ATTR_BRUSH_CHAR );
+ SfxItemState eState = rSet.GetItemState( nWhich, TRUE );
+ eState = rSet.GetItemState( nWhich, FALSE );
+ if ( rSet.GetItemState( nWhich, TRUE ) > SFX_ITEM_AVAILABLE )
+ {
+ pBgdAttr = (const SvxBrushItem*)&( rSet.Get( nWhich ) );
+ pParaBck_Impl->pCharBrush = new SvxBrushItem(*pBgdAttr);
+ }
+ else
+ pParaBck_Impl->pCharBrush = new SvxBrushItem(SID_ATTR_BRUSH_CHAR);
+
+ ParaDestinationHdl_Impl(&aParaLBox);
+ aParaLBox.SaveValue();
+ }
+ }
+}
+
+void SvxBackgroundTabPage::ResetFromWallpaperItem( const SfxItemSet& rSet )
+{
+ ShowSelector();
+
+ // Zustand des Vorschau-Buttons durch UserData persistent
+ String aUserData = GetUserData();
+ aBtnPreview.Check( aUserData.Len() ? ( sal_Unicode('1') == aUserData.GetChar( 0 ) ) : FALSE );
+
+ // Input-BrushItem besorgen und auswerten
+ const SvxBrushItem* pBgdAttr = NULL;
+ USHORT nSlot = SID_VIEW_FLD_PIC;
+ USHORT nWhich = GetWhich( nSlot );
+ SvxBrushItem* pTemp = 0;
+ const CntWallpaperItem* pItem = 0;
+
+ if ( rSet.GetItemState( nWhich, FALSE ) >= SFX_ITEM_AVAILABLE )
+ {
+ pItem = (const CntWallpaperItem*)&rSet.Get( nWhich );
+ pTemp = new SvxBrushItem( *pItem, nWhich );
+ pBgdAttr = pTemp;
+ }
+
+ aBtnTile.Check();
+
+ if ( pBgdAttr )
+ {
+ FillControls_Impl(*pBgdAttr, aUserData);
+ // Auch bei Anzeige der Grafik, soll die Brush erhalten bleiben
+ if( aBgdColor != pBgdAttr->GetColor() )
+ {
+ aBgdColor = pBgdAttr->GetColor();
+ USHORT nCol = GetItemId_Impl( aBackgroundColorSet, aBgdColor );
+ aBackgroundColorSet.SelectItem( nCol );
+ pPreviewWin1->NotifyChange( aBgdColor );
+ }
+ }
+ else
+ {
+ aLbSelect.SelectEntryPos( 0 );
+ ShowColorUI_Impl();
+
+ const SfxPoolItem* pOld = GetOldItem( rSet, SID_VIEW_FLD_PIC );
+ if ( pOld )
+ aBgdColor = Color( ((CntWallpaperItem*)pOld)->GetColor() );
+ }
+
+ // We now have always a link to the background
+ bLinkOnly = TRUE;
+ aBtnLink.Check( TRUE );
+ aBtnLink.Show( FALSE );
+// if( !pItem || !pItem->GetWallpaper(FALSE).IsBitmap() )
+// aBtnLink.Check();
+
+ delete pTemp;
+}
+
+
+
+//------------------------------------------------------------------------
+
+void SvxBackgroundTabPage::FillUserData()
+
+/* [Beschreibung]
+
+ Beim Destruieren einer SfxTabPage wird diese virtuelle Methode gerufen,
+ damit die TabPage interne Informationen sichern kann.
+
+ In diesem Fall wird der Zustand des Vorschau-Buttons gesichert.
+*/
+
+{
+ SetUserData( String( aBtnPreview.IsChecked() ? sal_Unicode('1') : sal_Unicode('0') ) );
+}
+
+//------------------------------------------------------------------------
+
+BOOL SvxBackgroundTabPage::FillItemSet( SfxItemSet& rCoreSet )
+
+/* [Beschreibung]
+
+*/
+
+{
+ if ( pPageImpl->pLoadTimer && pPageImpl->pLoadTimer->IsActive() )
+ {
+ pPageImpl->pLoadTimer->Stop();
+ LoadTimerHdl_Impl( pPageImpl->pLoadTimer );
+ }
+// os: So ein Unsinn! Irgendwo laesst sich so ein Item immer finden,
+// es muss aber im rSet vorhanden sein!
+
+// const SfxPoolItem* pX = GetOldItem( rCoreSet, SID_VIEW_FLD_PIC );
+// if( pX && pX->ISA(SfxWallpaperItem))
+ if(SFX_ITEM_AVAILABLE <= rCoreSet.GetItemState(GetWhich(SID_VIEW_FLD_PIC), FALSE))
+ return FillItemSetWithWallpaperItem( rCoreSet, SID_VIEW_FLD_PIC );
+
+ BOOL bModified = FALSE;
+ USHORT nSlot = SID_ATTR_BRUSH;
+
+ if ( aTblLBox.IsVisible() )
+ {
+ switch( aTblLBox.GetSelectEntryPos() )
+ {
+ case TBL_DEST_CELL:
+ nSlot = SID_ATTR_BRUSH;
+ break;
+ case TBL_DEST_ROW:
+ nSlot = SID_ATTR_BRUSH_ROW;
+ break;
+ case TBL_DEST_TBL:
+ nSlot = SID_ATTR_BRUSH_TABLE;
+ break;
+ }
+ }
+ else if(aParaLBox.GetData() == &aParaLBox)
+ {
+ switch(aParaLBox.GetSelectEntryPos())
+ {
+ case PARA_DEST_PARA:
+ nSlot = SID_ATTR_BRUSH;
+ break;
+ case PARA_DEST_CHAR:
+ nSlot = SID_ATTR_BRUSH_CHAR;
+ break;
+ }
+ }
+ USHORT nWhich = GetWhich( nSlot );
+
+ const SfxPoolItem* pOld = GetOldItem( rCoreSet, nSlot );
+ const SfxItemSet& rOldSet = GetItemSet();
+
+ if ( pOld )
+ {
+ const SvxBrushItem& rOldItem = (const SvxBrushItem&)*pOld;
+ SvxGraphicPosition eOldPos = rOldItem.GetGraphicPos();
+ const BOOL bIsBrush = ( 0 == aLbSelect.GetSelectEntryPos() );
+
+ if ( ( (GPOS_NONE == eOldPos) && bIsBrush )
+ || ( (GPOS_NONE != eOldPos) && !bIsBrush ) ) // Brush <-> Bitmap gewechselt?
+ {
+ // Hintergrund-Art wurde nicht gewechselt:
+
+ if ( (GPOS_NONE == eOldPos) || !aLbSelect.IsVisible() )
+ {
+ // Brush-Behandlung:
+ if ( rOldItem.GetColor() != aBgdColor )
+ {
+ bModified = TRUE;
+ rCoreSet.Put( SvxBrushItem( aBgdColor, nWhich ) );
+ }
+ else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) )
+ rCoreSet.ClearItem( nWhich );
+ }
+ else
+ {
+ // Bitmap-Behandlung:
+
+ SvxGraphicPosition eNewPos = GetGraphicPosition_Impl();
+ const BOOL bIsLink = aBtnLink.IsChecked();
+ const BOOL bWasLink = (NULL != rOldItem.GetGraphicLink() );
+
+
+ if ( !bIsLink && !bIsGraphicValid )
+ bIsGraphicValid = LoadLinkedGraphic_Impl();
+
+ if ( eNewPos != eOldPos
+ || bIsLink != bWasLink
+ || ( bWasLink && *rOldItem.GetGraphicLink()
+ != aBgdGraphicPath )
+ || ( !bWasLink && rOldItem.GetGraphic()->GetBitmap()
+ != aBgdGraphic.GetBitmap() )
+ )
+ {
+ bModified = TRUE;
+
+ if ( bIsLink )
+ {
+ String aAbs = INetURLObject::RelToAbs( aBgdGraphicPath );
+ rCoreSet.Put( SvxBrushItem( aAbs,
+ aBgdGraphicFilter,
+ eNewPos,
+ nWhich ) );
+ }
+ else
+ rCoreSet.Put( SvxBrushItem( aBgdGraphic,
+ eNewPos,
+ nWhich ) );
+ }
+ else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) )
+ rCoreSet.ClearItem( nWhich );
+ }
+ }
+ else // Brush <-> Bitmap gewechselt!
+ {
+ if ( bIsBrush )
+ rCoreSet.Put( SvxBrushItem( aBgdColor, nWhich ) );
+ else
+ {
+ if ( aBtnLink.IsChecked() )
+ {
+ String aAbs = INetURLObject::RelToAbs( aBgdGraphicPath );
+ rCoreSet.Put( SvxBrushItem( aAbs,
+ aBgdGraphicFilter,
+ GetGraphicPosition_Impl(),
+ nWhich ) );
+ }
+ else
+ {
+ if ( !bIsGraphicValid )
+ bIsGraphicValid = LoadLinkedGraphic_Impl();
+
+ if ( bIsGraphicValid )
+ rCoreSet.Put( SvxBrushItem( aBgdGraphic,
+ GetGraphicPosition_Impl(),
+ nWhich ) );
+ }
+ }
+ bModified = ( bIsBrush || aBtnLink.IsChecked() || bIsGraphicValid );
+ }
+ }
+ else if ( SID_ATTR_BRUSH_CHAR == nSlot && aBgdColor != Color( COL_WHITE ) )
+ {
+ rCoreSet.Put( SvxBrushItem( aBgdColor, nWhich ) );
+ bModified = TRUE;
+ }
+
+ if( aTblLBox.IsVisible() )
+ {
+ // Der aktuelle Zustand wurde bereits geputtet
+ if( nSlot != SID_ATTR_BRUSH )
+ {
+ const SfxPoolItem* pOldCell =
+ GetOldItem( rCoreSet, SID_ATTR_BRUSH );
+
+ if ( *pTableBck_Impl->pCellBrush != *pOldCell )
+ {
+ rCoreSet.Put( *pTableBck_Impl->pCellBrush );
+ bModified |= TRUE;
+ }
+ }
+
+ if( nSlot != SID_ATTR_BRUSH_ROW )
+ {
+ const SfxPoolItem* pOldRow =
+ GetOldItem( rCoreSet, SID_ATTR_BRUSH_ROW );
+
+ if ( *pTableBck_Impl->pRowBrush != *pOldRow )
+ {
+ rCoreSet.Put( *pTableBck_Impl->pRowBrush );
+ bModified |= TRUE;
+ }
+ }
+
+ if( nSlot != SID_ATTR_BRUSH_TABLE )
+ {
+ const SfxPoolItem* pOldTable =
+ GetOldItem( rCoreSet, SID_ATTR_BRUSH_TABLE );
+
+ if ( *pTableBck_Impl->pTableBrush != *pOldTable )
+ {
+ rCoreSet.Put( *pTableBck_Impl->pTableBrush );
+ bModified |= TRUE;
+ }
+ }
+
+ if( aTblLBox.GetSavedValue() != aTblLBox.GetSelectEntryPos() )
+ {
+ rCoreSet.Put( SfxUInt16Item( SID_BACKGRND_DESTINATION,
+ aTblLBox.GetSelectEntryPos() ) );
+ bModified |= TRUE;
+ }
+ }
+ else if(aParaLBox.GetData() == &aParaLBox)
+ {
+ // Der aktuelle Zustand wurde bereits geputtet
+ if( nSlot != SID_ATTR_BRUSH && aParaLBox.IsVisible()) // nicht im Suchen-Format-Dialog
+ {
+ const SfxPoolItem* pOldPara =
+ GetOldItem( rCoreSet, SID_ATTR_BRUSH );
+
+ if ( *pParaBck_Impl->pParaBrush != *pOldPara )
+ {
+ rCoreSet.Put( *pParaBck_Impl->pParaBrush );
+ bModified |= TRUE;
+ }
+ }
+
+ if( nSlot != SID_ATTR_BRUSH_CHAR )
+ {
+ const SfxPoolItem* pOldChar =
+ GetOldItem( rCoreSet, SID_ATTR_BRUSH_CHAR );
+
+ if ( pOldChar && *pParaBck_Impl->pCharBrush != *pOldChar ||
+ *pParaBck_Impl->pCharBrush != SvxBrushItem(SID_ATTR_BRUSH_CHAR))
+ {
+ rCoreSet.Put( *pParaBck_Impl->pCharBrush );
+ bModified |= TRUE;
+ }
+ }
+
+ if( aParaLBox.GetSavedValue() != aParaLBox.GetSelectEntryPos() )
+ {
+ rCoreSet.Put( SfxUInt16Item( SID_BACKGRND_DESTINATION,
+ aParaLBox.GetSelectEntryPos() ) );
+ bModified |= TRUE;
+ }
+ }
+ return bModified;
+}
+
+BOOL SvxBackgroundTabPage::FillItemSetWithWallpaperItem( SfxItemSet& rCoreSet, USHORT nSlot)
+{
+ USHORT nWhich = GetWhich( nSlot );
+ const SfxPoolItem* pOld = GetOldItem( rCoreSet, nSlot );
+ const SfxItemSet& rOldSet = GetItemSet();
+ DBG_ASSERT(pOld,"FillItemSetWithWallpaperItem: Item not found");
+
+ SvxBrushItem rOldItem( (const CntWallpaperItem&)*pOld, nWhich );
+ SvxGraphicPosition eOldPos = rOldItem.GetGraphicPos();
+ const BOOL bIsBrush = ( 0 == aLbSelect.GetSelectEntryPos() );
+ BOOL bModified = FALSE;
+
+ if ( ( (GPOS_NONE == eOldPos) && bIsBrush )
+ || ( (GPOS_NONE != eOldPos) && !bIsBrush ) ) // Brush <-> Bitmap gewechselt?
+ {
+ // Hintergrund-Art wurde nicht gewechselt:
+
+ if ( (GPOS_NONE == eOldPos) || !aLbSelect.IsVisible() )
+ {
+ // Brush-Behandlung:
+ if ( rOldItem.GetColor() != aBgdColor )
+ {
+ bModified = TRUE;
+ CntWallpaperItem aItem( nWhich );
+ aItem.SetColor( aBgdColor );
+ rCoreSet.Put( aItem );
+ }
+ else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) )
+ rCoreSet.ClearItem( nWhich );
+ }
+ else
+ {
+ // Bitmap-Behandlung:
+ SvxGraphicPosition eNewPos = GetGraphicPosition_Impl();
+
+ int bBitmapChanged = ( ( eNewPos != eOldPos ) ||
+ ( *rOldItem.GetGraphicLink() != aBgdGraphicPath ) );
+ int bBrushChanged = ( rOldItem.GetColor() != aBgdColor );
+ if( bBitmapChanged || bBrushChanged )
+ {
+ bModified = TRUE;
+
+ CntWallpaperItem aItem( nWhich );
+ WallpaperStyle eWallStyle = SvxBrushItem::GraphicPos2WallpaperStyle(eNewPos);
+ aItem.SetStyle( eWallStyle );
+ aItem.SetColor( aBgdColor );
+ String aAbs = INetURLObject::RelToAbs( aBgdGraphicPath );
+ aItem.SetBitmapURL( aAbs );
+ rCoreSet.Put( aItem );
+ }
+ else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) )
+ rCoreSet.ClearItem( nWhich );
+ }
+ }
+ else // Brush <-> Bitmap gewechselt!
+ {
+ CntWallpaperItem aItem( nWhich );
+ if ( bIsBrush )
+ {
+ aItem.SetColor( aBgdColor );
+ rCoreSet.Put( aItem );
+ }
+ else
+ {
+ WallpaperStyle eWallStyle =
+ SvxBrushItem::GraphicPos2WallpaperStyle( GetGraphicPosition_Impl() );
+ aItem.SetStyle( eWallStyle );
+ aItem.SetColor( aBgdColor );
+ String aAbs = INetURLObject::RelToAbs( aBgdGraphicPath );
+ aItem.SetBitmapURL( aAbs );
+ rCoreSet.Put( aItem );
+ }
+
+ bModified = TRUE;
+ }
+ return bModified;
+}
+
+//-----------------------------------------------------------------------
+
+int SvxBackgroundTabPage::DeactivatePage( SfxItemSet* pSet )
+
+/* [Beschreibung]
+
+ virtuelle Methode, wird beim Deaktivieren gerufen
+*/
+
+{
+ if ( pPageImpl->bIsImportDlgInExecute )
+ return KEEP_PAGE;
+
+ int nRes = LEAVE_PAGE;
+
+/*!!! (pb) no exists question any longer
+
+ if ( ( 1 == aLbSelect.GetSelectEntryPos() ) && aBtnLink.IsChecked() )
+ {
+ // Seite nur verlassen, wenn Grafik-Link ok
+ INetURLObject aObj;
+ aObj.SetSmartURL( aBgdGraphicPath );
+ FASTBOOL bExists = ( aObj.GetProtocol() != INET_PROT_FILE ) ||
+ DirEntry( aBgdGraphicPath ).Exists();
+
+ if ( !bExists && aBgdGraphicPath.Len() )
+ {
+ // wenn Datei nicht existiert, dann vieleicht eine URL?
+ String aURL;
+
+ if ( SfxMedium::HumanToUrl( aURL, aBgdGraphicPath ) == ERRCODE_NONE )
+ {
+ SfxMedium aTmp( aURL, STREAM_READ, TRUE );
+
+ if ( !aTmp.Exists() )
+ {
+ RaiseLoadError_Impl();
+ nRes = KEEP_PAGE;
+ }
+ }
+ }
+ }
+
+!!!*/
+
+ if ( pSet && LEAVE_PAGE == nRes )
+ FillItemSet( *pSet );
+
+ return nRes;
+}
+
+//-----------------------------------------------------------------------
+
+void SvxBackgroundTabPage::PointChanged( Window* pWindow, RECT_POINT eRP )
+
+/* [Beschreibung]
+
+*/
+
+{
+ // muss implementiert werden, damit Position-Control funktioniert
+}
+
+//-----------------------------------------------------------------------
+
+void SvxBackgroundTabPage::ShowSelector()
+
+/* [Beschreibung]
+
+*/
+
+{
+ if( bAllowShowSelector)
+ {
+ aSelectTxt.Show();
+ aLbSelect.Show();
+ aLbSelect.SetSelectHdl( HDL(SelectHdl_Impl) );
+ aBtnLink.SetClickHdl( HDL(FileClickHdl_Impl) );
+ aBtnPreview.SetClickHdl( HDL(FileClickHdl_Impl) );
+ aBtnBrowse.SetClickHdl( HDL(BrowseHdl_Impl) );
+ aBtnArea.SetClickHdl( HDL(RadioClickHdl_Impl) );
+ aBtnTile.SetClickHdl( HDL(RadioClickHdl_Impl) );
+ aBtnPosition.SetClickHdl( HDL(RadioClickHdl_Impl) );
+
+ // Verz"ogertes Laden "uber Timer (wg. UI-Update)
+ pPageImpl->pLoadTimer = new Timer;
+ pPageImpl->pLoadTimer->SetTimeout( 500 ); // 500ms verz"ogern
+ pPageImpl->pLoadTimer->SetTimeoutHdl(
+ LINK( this, SvxBackgroundTabPage, LoadTimerHdl_Impl ) );
+
+ bAllowShowSelector = FALSE;
+
+ if(nHtmlMode & HTMLMODE_ON)
+ {
+ if(!(nHtmlMode & HTMLMODE_GRAPH_POS))
+ aBtnPosition.Enable(FALSE);
+ aBtnArea.Enable(FALSE);
+ }
+ }
+}
+
+//------------------------------------------------------------------------
+
+
+void SvxBackgroundTabPage::RaiseLoadError_Impl()
+
+/* [Beschreibung]
+
+*/
+
+{
+ SfxErrorContext aContext( ERRCTX_SVX_BACKGROUND,
+ String(),
+ this,
+ RID_SVXERRCTX,
+ DIALOG_MGR() );
+
+ ErrorHandler::HandleError(
+ *new StringErrorInfo( ERRCODE_SVX_GRAPHIC_NOTREADABLE,
+ aBgdGraphicPath ) );
+}
+
+//------------------------------------------------------------------------
+
+BOOL SvxBackgroundTabPage::LoadLinkedGraphic_Impl()
+
+/* [Beschreibung]
+
+*/
+
+{
+ BOOL bResult = ( aBgdGraphicPath.Len() > 0 ) &&
+ ( GRFILTER_OK == LoadGraphic( aBgdGraphicPath,
+ aBgdGraphicFilter,
+ aBgdGraphic ) );
+ return bResult;
+}
+
+//------------------------------------------------------------------------
+
+
+void SvxBackgroundTabPage::FillColorValueSets_Impl()
+
+/* [Beschreibung]
+
+ F"ullen des Farb-Sets
+*/
+
+{
+ SfxObjectShell* pDocSh = SfxObjectShell::Current();
+ const SfxPoolItem* pItem = NULL;
+ XColorTable* pColorTable = NULL;
+ const Size aSize15x15 = Size( 15, 15 );
+ FASTBOOL bOwn = FALSE;
+
+ DBG_ASSERT( pDocSh, "DocShell not found!" );
+
+ BOOL bHtmlMode = 0 != (nHtmlMode & HTMLMODE_ON);
+
+ if ( pDocSh && ( 0 != ( pItem = pDocSh->GetItem( SID_COLOR_TABLE ) ) ) )
+ pColorTable = ( (SvxColorTableItem*)pItem )->GetColorTable();
+
+ if ( !pColorTable )
+ {
+ bOwn = TRUE;
+ pColorTable =
+ new XColorTable( SFX_INIMANAGER()->Get( SFX_KEY_PALETTE_PATH ) );
+ }
+
+ if ( pColorTable )
+ {
+ short i = 0;
+ long nCount = pColorTable->Count();
+ XColorEntry* pEntry = NULL;
+ Color aColWhite( COL_WHITE );
+ String aStrWhite( ResId( RID_SVXITEMS_COLOR_WHITE, DIALOG_MGR() ) );
+ WinBits nBits = ( aBackgroundColorSet.GetStyle() | WB_ITEMBORDER | WB_NAMEFIELD | WB_NONEFIELD );
+ aBackgroundColorSet.SetText( String( ResId( RID_SVXSTR_TRANSPARENT, DIALOG_MGR() ) ) );
+ aBackgroundColorSet.SetStyle( nBits );
+ for ( i = 0; i < nCount; i++ )
+ {
+ pEntry = pColorTable->Get(i);
+ aBackgroundColorSet.InsertItem( i + 1, pEntry->GetColor(), pEntry->GetName() );
+ }
+
+ while ( i < 80 )
+ {
+ aBackgroundColorSet.InsertItem( i + 1, aColWhite, aStrWhite );
+ i++;
+ }
+
+ if ( nCount > 80 )
+ {
+ aBackgroundColorSet.SetStyle( nBits | WB_VSCROLL );
+ }
+ }
+
+ if ( bOwn )
+ delete pColorTable;
+
+ aBackgroundColorSet.SetColCount( 10 );
+ aBackgroundColorSet.SetLineCount( 8 );
+ aBackgroundColorSet.CalcWindowSizePixel( aSize15x15 );
+
+}
+
+//------------------------------------------------------------------------
+
+
+
+//------------------------------------------------------------------------
+
+void SvxBackgroundTabPage::ShowColorUI_Impl()
+
+/* [Beschreibung]
+
+ Die Controls f"ur das Einstellen der Grafik ausblenden und die
+ Controls f"ur die Farbeinstellung einblenden.
+*/
+
+{
+ if( !aBackgroundColorSet.IsVisible() )
+ {
+ aBackgroundColorSet.Show();
+ aBackgroundColorBox.Show();
+ aPreviewBox.Show();
+ pPreviewWin1->Show();
+ aBtnBrowse.Hide();
+ aFtFile.Hide();
+ aBtnLink.Hide();
+ aBtnPreview.Hide();
+ aGbFile.Hide();
+ aBtnPosition.Hide();
+ aBtnArea.Hide();
+ aBtnTile.Hide();
+ aWndPosition.Hide();
+ aGbPosition.Hide();
+ pPreviewWin2->Hide();
+ aGbPreview.Hide();
+ }
+}
+
+//------------------------------------------------------------------------
+
+void SvxBackgroundTabPage::ShowBitmapUI_Impl()
+
+/* [Beschreibung]
+
+ Die Controls f"ur die Farbeinstellung ausblenden und die
+ Controls f"ur das Einstellen der Grafik einblenden.
+*/
+
+{
+ if ( aLbSelect.IsVisible() &&
+ (
+ aBackgroundColorSet.IsVisible()
+ || !aBtnBrowse.IsVisible() ) )
+ {
+ aBackgroundColorSet.Hide();
+ aBackgroundColorBox.Hide();
+ aPreviewBox.Hide();
+ pPreviewWin1->Hide();
+ aBtnBrowse.Show();
+ aFtFile.Show();
+
+ if ( !bLinkOnly && ! nHtmlMode & HTMLMODE_ON )
+ aBtnLink.Show();
+ aBtnPreview.Show();
+ aGbFile.Show();
+ aBtnPosition.Show();
+ aBtnArea.Show();
+ aBtnTile.Show();
+ aWndPosition.Show();
+ aGbPosition.Show();
+ pPreviewWin2->Show();
+ aGbPreview.Show();
+ }
+}
+
+//------------------------------------------------------------------------
+
+void SvxBackgroundTabPage::SetGraphicPosition_Impl( SvxGraphicPosition ePos )
+
+/* [Beschreibung]
+
+ Die Controls f"ur die Grafikposition einstellen.
+*/
+
+{
+ switch ( ePos )
+ {
+ case GPOS_AREA:
+ {
+ aBtnArea.Check();
+ aWndPosition.Disable();
+ }
+ break;
+
+ case GPOS_TILED:
+ {
+ aBtnTile.Check();
+ aWndPosition.Disable();
+ }
+ break;
+
+ default:
+ {
+ aBtnPosition.Check();
+ aWndPosition.Enable();
+ RECT_POINT eNewPos = RP_MM;
+
+ switch ( ePos )
+ {
+ case GPOS_MM: break;
+ case GPOS_LT: eNewPos = RP_LT; break;
+ case GPOS_MT: eNewPos = RP_MT; break;
+ case GPOS_RT: eNewPos = RP_RT; break;
+ case GPOS_LM: eNewPos = RP_LM; break;
+ case GPOS_RM: eNewPos = RP_RM; break;
+ case GPOS_LB: eNewPos = RP_LB; break;
+ case GPOS_MB: eNewPos = RP_MB; break;
+ case GPOS_RB: eNewPos = RP_RB; break;
+ }
+ aWndPosition.SetActualRP( eNewPos );
+ }
+ break;
+ }
+ aWndPosition.Invalidate();
+}
+
+//------------------------------------------------------------------------
+
+SvxGraphicPosition SvxBackgroundTabPage::GetGraphicPosition_Impl()
+
+/* [Beschreibung]
+
+ Die Position der Grafik zur"uckgeben.
+*/
+
+{
+ if ( aBtnTile.IsChecked() )
+ return GPOS_TILED;
+ else if ( aBtnArea.IsChecked() )
+ return GPOS_AREA;
+ else
+ {
+ switch ( aWndPosition.GetActualRP() )
+ {
+ case RP_LT: return GPOS_LT;
+ case RP_MT: return GPOS_MT;
+ case RP_RT: return GPOS_RT;
+ case RP_LM: return GPOS_LM;
+ case RP_MM: return GPOS_MM;
+ case RP_RM: return GPOS_RM;
+ case RP_LB: return GPOS_LB;
+ case RP_MB: return GPOS_MB;
+ case RP_RB: return GPOS_RB;
+ }
+ }
+ return GPOS_MM;
+}
+
+//-----------------------------------------------------------------------
+// Handler
+//-----------------------------------------------------------------------
+
+IMPL_LINK( SvxBackgroundTabPage, BackgroundColorHdl_Impl, ValueSet*, EMTPYARG )
+/* [Beschreibung]
+
+*/
+
+{
+ PatternHdl_Impl(0);
+ return 0;
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SvxBackgroundTabPage, PatternHdl_Impl, ValueSet* , EMPTYARG)
+/* [Beschreibung]
+
+ Handler, der beim Selektieren des Musters gerufen wird
+*/
+
+{
+ USHORT nItemId = aBackgroundColorSet.GetSelectItemId();
+ Color aColor = nItemId ? ( aBackgroundColorSet.GetItemColor( nItemId ) ) : Color( COL_TRANSPARENT );
+ aBgdColor = aColor;
+ pPreviewWin1->NotifyChange( aBgdColor );
+ return 0;
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SvxBackgroundTabPage, SelectHdl_Impl, ListBox*, EMPTYARG )
+
+/* [Beschreibung]
+
+*/
+
+{
+ if ( 0 == aLbSelect.GetSelectEntryPos() )
+ {
+ ShowColorUI_Impl();
+ aParaLBox.Enable(); // Zeichenhintergrund kann keine Bitmap sein
+ }
+ else
+ {
+ ShowBitmapUI_Impl();
+ aParaLBox.Enable(FALSE);// Zeichenhintergrund kann keine Bitmap sein
+ }
+ return 0;
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SvxBackgroundTabPage, FileClickHdl_Impl, CheckBox*, pBox )
+
+/* [Beschreibung]
+
+*/
+
+{
+ if ( &aBtnLink == pBox )
+ {
+ if ( aBtnLink.IsChecked() )
+ {
+ INetURLObject aObj;
+ aObj.SetSmartURL( aBgdGraphicPath );
+ String aFilePath;
+
+ if ( aObj.GetProtocol() == INET_PROT_FILE )
+ aFilePath = aObj.getFSysPath( INetURLObject::FSYS_DETECT );
+ else
+ aFilePath = aBgdGraphicPath;
+ aFtFile.SetText( aFilePath );
+ }
+ else
+ aFtFile.SetText( aStrUnlinked );
+ }
+ else if ( &aBtnPreview == pBox )
+ {
+ if ( aBtnPreview.IsChecked() )
+ {
+ if ( !bIsGraphicValid )
+ bIsGraphicValid = LoadLinkedGraphic_Impl();
+
+ if ( bIsGraphicValid )
+ {
+ Bitmap aBmp = aBgdGraphic.GetBitmap();
+ pPreviewWin2->NotifyChange( &aBmp );
+ }
+ else
+ {
+ if ( aBgdGraphicPath.Len() > 0 ) // nur bei gelinkter Grafik
+ RaiseLoadError_Impl(); // ein Fehler
+ pPreviewWin2->NotifyChange( NULL );
+ }
+ }
+ else
+ pPreviewWin2->NotifyChange( NULL );
+ }
+ return 0;
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SvxBackgroundTabPage, RadioClickHdl_Impl, RadioButton*, pBtn )
+
+/* [Beschreibung]
+
+*/
+
+{
+ if ( pBtn == &aBtnPosition )
+ {
+ if ( !aWndPosition.IsEnabled() )
+ {
+ aWndPosition.Enable();
+ aWndPosition.Invalidate();
+ }
+ }
+ else if ( aWndPosition.IsEnabled() )
+ {
+ aWndPosition.Disable();
+ aWndPosition.Invalidate();
+ }
+ return 0;
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SvxBackgroundTabPage, BrowseHdl_Impl, PushButton* , EMPTYARG )
+
+/* [Beschreibung]
+
+ Handler, gerufen durch das Dr"ucken des Durchsuchen-Buttons.
+ Grafik/Einf"ugen-Dialog erzeugen, Pfad setzen und starten.
+*/
+
+{
+ if ( pPageImpl->pLoadTimer->IsActive() )
+ return 0;
+ USHORT nEnable = ENABLE_STANDARD|ENABLE_LINK;
+ BOOL bHtml = 0 != ( nHtmlMode & HTMLMODE_ON );
+
+ if ( bHtml || bLinkOnly )
+ nEnable &= ~ENABLE_LINK;
+
+ pImportDlg = new SvxImportGraphicDialog( this, aStrBrowse, nEnable );
+ pImportDlg->SetPath( aBgdGraphicPath, FALSE, aBtnLink.IsChecked() );
+
+ pPageImpl->bIsImportDlgInExecute = TRUE;
+ short nRet = pImportDlg->Execute();
+ pPageImpl->bIsImportDlgInExecute = FALSE;
+
+ if ( RET_OK == nRet )
+ {
+ if ( bHtml )
+ aBtnLink.Check();
+ // wenn Verkn"upfen nicht gecheckt ist und die Vorschau auch nicht,
+ // dann die Vorschau aktivieren, damit der Anwender sieht,
+ // welche Grafik er ausgew"ahlt hat
+ if ( !aBtnLink.IsChecked() && !aBtnPreview.IsChecked() )
+ aBtnPreview.Check( TRUE );
+ // timer-verz"ogertes Laden der Grafik
+ pPageImpl->pLoadTimer->Start();
+ }
+ else
+ DELETEZ( pImportDlg );
+ return 0;
+}
+
+//-----------------------------------------------------------------------
+
+IMPL_LINK( SvxBackgroundTabPage, LoadTimerHdl_Impl, Timer* , pTimer )
+
+/* [Beschreibung]
+
+ Verz"ogertes Laden der Grafik.
+ Grafik wird nur dann geladen, wenn sie unterschiedlich zur
+ aktuellen Grafik ist.
+*/
+
+{
+ if ( pTimer == pPageImpl->pLoadTimer )
+ {
+ pPageImpl->pLoadTimer->Stop();
+
+ if ( pImportDlg )
+ {
+ INetURLObject aOld;
+ aOld.SetSmartURL( aBgdGraphicPath );
+ INetURLObject aNew( pImportDlg->GetPath() );
+
+ if ( !aBgdGraphicPath.Len() || aNew != aOld )
+ {
+ // neue Datei gew"ahlt
+ aBgdGraphicPath = pImportDlg->GetPath();
+ aBgdGraphicFilter = pImportDlg->GetCurFilter();
+ BOOL bLink = ( nHtmlMode & HTMLMODE_ON ) || bLinkOnly ? TRUE : pImportDlg->AsLink();
+ aBtnLink.Check( bLink );
+ aBtnLink.Enable();
+
+ if ( aBtnPreview.IsChecked() )
+ {
+ Graphic* pGraphic = pImportDlg->GetGraphic();
+
+ if ( pGraphic )
+ {
+ aBgdGraphic = *pGraphic;
+ bIsGraphicValid = TRUE;
+ }
+ else
+ {
+ aBgdGraphicFilter.Erase();
+ aBgdGraphicPath.Erase();
+ bIsGraphicValid = FALSE;
+ }
+ }
+ else
+ bIsGraphicValid = FALSE; // Grafik erst beim Preview-Click laden
+
+ if ( aBtnPreview.IsChecked() && bIsGraphicValid )
+ {
+ Bitmap aBmp = aBgdGraphic.GetBitmap();
+ pPreviewWin2->NotifyChange( &aBmp );
+ }
+ else
+ pPreviewWin2->NotifyChange( NULL );
+ }
+
+ FileClickHdl_Impl( &aBtnLink );
+ DELETEZ( pImportDlg );
+ }
+ }
+ return 0;
+}
+
+//-----------------------------------------------------------------------
+
+void SvxBackgroundTabPage::ShowTblControl()
+
+/* [Beschreibung]
+
+*/
+
+{
+ aTblLBox .SetSelectHdl( HDL(TblDestinationHdl_Impl) );
+ aTblDesc.Show();
+ aTblLBox.Show();
+}
+
+//-----------------------------------------------------------------------
+
+void SvxBackgroundTabPage::ShowParaControl(BOOL bCharOnly)
+{
+ aParaLBox.SetSelectHdl(HDL(ParaDestinationHdl_Impl));
+ if(!bCharOnly)
+ {
+ aTblDesc.Show();
+ aParaLBox.Show();
+ }
+ aParaLBox.SetData(&aParaLBox); // hier erkennt man, dass dieser Mode eingeschaltet ist
+}
+//-----------------------------------------------------------------------
+
+IMPL_LINK( SvxBackgroundTabPage, TblDestinationHdl_Impl, ListBox*, pBox )
+
+/* [Beschreibung]
+
+*/
+
+{
+ USHORT nSelPos = pBox->GetSelectEntryPos();
+ if( pTableBck_Impl && pTableBck_Impl->nActPos != nSelPos)
+ {
+ SvxBrushItem** pActItem = new (SvxBrushItem*);
+ switch(pTableBck_Impl->nActPos)
+ {
+ case TBL_DEST_CELL:
+ *pActItem = pTableBck_Impl->pCellBrush;
+ break;
+ case TBL_DEST_ROW:
+ *pActItem = pTableBck_Impl->pRowBrush;
+ break;
+ case TBL_DEST_TBL:
+ *pActItem = pTableBck_Impl->pTableBrush;
+ break;
+ }
+ pTableBck_Impl->nActPos = nSelPos;
+ if(0 == aLbSelect.GetSelectEntryPos()) // Brush ausgewaehlt
+ {
+ USHORT nWhich = (*pActItem)->Which();
+ **pActItem = aBgdColor;
+ (*pActItem)->SetWhich(nWhich);
+ }
+ else
+ {
+ SvxGraphicPosition eNewPos = GetGraphicPosition_Impl();
+ const BOOL bIsLink = aBtnLink.IsChecked();
+
+ if ( !bIsLink && !bIsGraphicValid )
+ bIsGraphicValid = LoadLinkedGraphic_Impl();
+
+ if ( bIsLink )
+ **pActItem = SvxBrushItem( aBgdGraphicPath,
+ aBgdGraphicFilter,
+ eNewPos,
+ (*pActItem)->Which() );
+ else
+ **pActItem = SvxBrushItem( aBgdGraphic,
+ eNewPos,
+ (*pActItem)->Which() );
+ }
+ switch(nSelPos)
+ {
+ case TBL_DEST_CELL:
+ *pActItem = pTableBck_Impl->pCellBrush;
+ aLbSelect.Enable();
+ break;
+ case TBL_DEST_ROW:
+ {
+ if((nHtmlMode & HTMLMODE_ON) && !(nHtmlMode & HTMLMODE_SOME_STYLES))
+ aLbSelect.Disable();
+ *pActItem = pTableBck_Impl->pRowBrush;
+ }
+ break;
+ case TBL_DEST_TBL:
+ *pActItem = pTableBck_Impl->pTableBrush;
+ aLbSelect.Enable();
+ break;
+ }
+ String aUserData = GetUserData();
+ FillControls_Impl(**pActItem, aUserData);
+ delete pActItem;
+ }
+ return 0;
+}
+
+//-----------------------------------------------------------------------
+
+IMPL_LINK( SvxBackgroundTabPage, ParaDestinationHdl_Impl, ListBox*, pBox )
+{
+ USHORT nSelPos = pBox->GetSelectEntryPos();
+ if( pParaBck_Impl && pParaBck_Impl->nActPos != nSelPos)
+ {
+ SvxBrushItem** pActItem = new (SvxBrushItem*);
+ switch(pParaBck_Impl->nActPos)
+ {
+ case PARA_DEST_PARA:
+ *pActItem = pParaBck_Impl->pParaBrush;
+ break;
+ case PARA_DEST_CHAR:
+ *pActItem = pParaBck_Impl->pCharBrush;
+ break;
+ }
+ pParaBck_Impl->nActPos = nSelPos;
+ if(0 == aLbSelect.GetSelectEntryPos()) // Brush ausgewaehlt
+ {
+ USHORT nWhich = (*pActItem)->Which();
+ **pActItem = aBgdColor;
+ (*pActItem)->SetWhich(nWhich);
+ }
+ else
+ {
+ SvxGraphicPosition eNewPos = GetGraphicPosition_Impl();
+ const BOOL bIsLink = aBtnLink.IsChecked();
+
+ if ( !bIsLink && !bIsGraphicValid )
+ bIsGraphicValid = LoadLinkedGraphic_Impl();
+
+ if ( bIsLink )
+ **pActItem = SvxBrushItem( aBgdGraphicPath,
+ aBgdGraphicFilter,
+ eNewPos,
+ (*pActItem)->Which() );
+ else
+ **pActItem = SvxBrushItem( aBgdGraphic,
+ eNewPos,
+ (*pActItem)->Which() );
+ }
+ switch(nSelPos)
+ {
+ case PARA_DEST_PARA:
+ *pActItem = pParaBck_Impl->pParaBrush;
+ aLbSelect.Enable();
+ break;
+ case PARA_DEST_CHAR:
+ {
+ *pActItem = pParaBck_Impl->pCharBrush;
+ aLbSelect.Enable(FALSE);
+ }
+ break;
+ }
+ String aUserData = GetUserData();
+ FillControls_Impl(**pActItem, aUserData);
+ delete pActItem;
+ }
+ return 0;
+}
+
+//-----------------------------------------------------------------------
+
+void SvxBackgroundTabPage::FillControls_Impl( const SvxBrushItem& rBgdAttr,
+ const String& rUserData )
+
+/* [Beschreibung]
+
+*/
+
+{
+ SvxGraphicPosition ePos = rBgdAttr.GetGraphicPos();
+ const Color& rColor = rBgdAttr.GetColor();
+
+ if ( GPOS_NONE == ePos || !aLbSelect.IsVisible() )
+ {
+ aLbSelect.SelectEntryPos( 0 );
+ ShowColorUI_Impl();
+ Color aTrColor( COL_TRANSPARENT );
+ aBgdColor = rColor;
+
+ USHORT nCol = ( aTrColor != aBgdColor ) ?
+ GetItemId_Impl( aBackgroundColorSet, aBgdColor ) : 0;
+
+ if( aTrColor != aBgdColor && nCol == 0)
+ {
+ aBackgroundColorSet.SetNoSelection();
+ }
+ else
+ {
+ aBackgroundColorSet.SelectItem( nCol );
+ }
+
+ pPreviewWin1->NotifyChange( aBgdColor );
+ if ( aLbSelect.IsVisible() ) // Grafikteil initialisieren
+ {
+ aBgdGraphicFilter.Erase();
+ aBgdGraphicPath.Erase();
+
+ if ( !rUserData.Len() )
+ aBtnPreview.Check( FALSE );
+ aBtnLink.Check( FALSE );
+ aBtnLink.Disable();
+ pPreviewWin2->NotifyChange( NULL );
+ SetGraphicPosition_Impl( GPOS_TILED ); // Kacheln als Default
+ }
+ }
+ else
+ {
+ const String* pStrLink = rBgdAttr.GetGraphicLink();
+ const String* pStrFilter = rBgdAttr.GetGraphicFilter();
+
+ aLbSelect.SelectEntryPos( 1 );
+ ShowBitmapUI_Impl();
+
+ if ( pStrLink )
+ {
+ aBgdGraphicPath = *pStrLink;
+ aBtnLink.Check( TRUE );
+ aBtnLink.Enable();
+ }
+ else
+ {
+ aBgdGraphicPath.Erase();
+ aBtnLink.Check( FALSE );
+ aBtnLink.Disable();
+ }
+
+ FileClickHdl_Impl( &aBtnLink );
+
+ if ( pStrFilter )
+ aBgdGraphicFilter = *pStrFilter;
+ else
+ aBgdGraphicFilter.Erase();
+
+ if ( !pStrLink || aBtnPreview.IsChecked() )
+ {
+ // Grafik ist im Item vorhanden und muss nicht
+ // geladen werden:
+
+ const Graphic* pGraphic =
+ rBgdAttr.GetGraphic( SfxObjectShell::Current() );
+
+ if ( !pGraphic && aBtnPreview.IsChecked() )
+ bIsGraphicValid = LoadLinkedGraphic_Impl();
+ else if ( pGraphic )
+ {
+ aBgdGraphic = *pGraphic;
+ bIsGraphicValid = TRUE;
+
+ if ( !rUserData.Len() )
+ aBtnPreview.Check();
+ }
+ else
+ {
+ RaiseLoadError_Impl();
+ bIsGraphicValid = FALSE;
+
+ if ( !rUserData.Len() )
+ aBtnPreview.Check( FALSE );
+ }
+ }
+
+ if ( aBtnPreview.IsChecked() && bIsGraphicValid )
+ {
+ Bitmap aBmp = aBgdGraphic.GetBitmap();
+ pPreviewWin2->NotifyChange( &aBmp );
+ }
+ else
+ pPreviewWin2->NotifyChange( NULL );
+
+ SetGraphicPosition_Impl( ePos );
+ }
+}
+
diff --git a/svx/source/dialog/backgrnd.hrc b/svx/source/dialog/backgrnd.hrc
new file mode 100644
index 000000000000..c3fc6e5f4581
--- /dev/null
+++ b/svx/source/dialog/backgrnd.hrc
@@ -0,0 +1,99 @@
+/*************************************************************************
+ *
+ * $RCSfile: backgrnd.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:06 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SVX_BACKGRND_HRC
+#define _SVX_BACKGRND_HRC
+
+// defines ------------------------------------------------------------------
+
+#define FT_SELECTOR 1
+#define LB_SELECTOR 1
+
+#define SET_BGDCOLOR 10
+#define GB_BGDCOLOR 11
+#define SET_PATTERN 12
+#define GB_COL_PREVIEW 13
+#define SET_PATCOLOR 14
+#define GB_PATCOLOR 15
+#define FT_PREVIEW 20
+#define WIN_PREVIEW1 21
+
+#define BTN_BROWSE 20
+#define FT_FILE 21
+#define BTN_LINK 22
+#define BTN_PREVIEW 23
+#define GB_FILE 24
+#define BTN_AREA 25
+#define BTN_TILE 26
+#define BTN_POSITION 27
+#define WND_POSITION 28
+#define GB_POSITION 29
+#define WIN_PREVIEW2 30
+#define GB_PREVIEW 31
+#define LB_TBL_BOX 32
+#define FT_TBL_DESC 33
+#define LB_PARA_BOX 34
+
+#define STR_BROWSE 1
+#define STR_UNLINKED 2
+
+
+#endif
+
diff --git a/svx/source/dialog/backgrnd.src b/svx/source/dialog/backgrnd.src
new file mode 100644
index 000000000000..6e0e4f173458
--- /dev/null
+++ b/svx/source/dialog/backgrnd.src
@@ -0,0 +1,910 @@
+/*************************************************************************
+ *
+ * $RCSfile: backgrnd.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:06 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+ // include ---------------------------------------------------------------
+#include "helpid.hrc"
+#include "dialogs.hrc"
+#include "backgrnd.hrc"
+ // define ----------------------------------------------------------------
+#define UNLINKED_IMAGE \
+ Text = "unverknpfte Grafik" ; \
+ Text [ ENGLISH ] = "unlinked image" ; \
+ Text [ ENGLISH_US ] = "Unlinked graphic" ; \
+ text [ italian ] = "Immagine non collegata" ; \
+ text [ spanish ] = "Imagen no vinculada" ; \
+ text [ french ] = "Image non lie" ; \
+ text [ dutch ] = "Niet-gekoppelde afbeelding" ; \
+ text [ swedish ] = "ej lnkad grafik" ; \
+ text [ danish ] = "Ikke-kdet grafik" ; \
+ text [ portuguese_brazilian ] = "unverknpfte Grafik" ; \
+ text [ portuguese ] = "Imagem no ligada" ; \
+ text[ chinese_simplified ] = "δӵͼ"; \
+ text[ russian ] = " "; \
+ text[ polish ] = "Nie poczona grafika"; \
+ text[ japanese ] = "ݸĂĄ̑"; \
+ text[ chinese_traditional ] = "sϤ"; \
+ text[ arabic ] = " "; \
+ text[ greek ] = " "; \
+ text[ korean ] = " ׷"; \
+ text[ turkish ] = "Balantsz grafik"; \
+ text[ language_user1 ] = " ";
+
+ // pragma ----------------------------------------------------------------
+
+ // RID_SVXPAGE_BACKGROUND ------------------------------------------------
+TabPage RID_SVXPAGE_BACKGROUND
+{
+ HelpId = HID_BACKGROUND ;
+ Hide = TRUE ;
+ Size = MAP_APPFONT ( 260 , 135 ) ;
+ Text = "Hintergrund" ;
+ Text [ ENGLISH ] = "Background" ;
+ Text [ NORWEGIAN ] = "Background" ;
+ Text [ DANISH ] = "Baggrund" ;
+ Text [ ENGLISH_US ] = "Background" ;
+ Text [ SPANISH ] = "Fondo" ;
+ Text [ FINNISH ] = "Tausta" ;
+ Text [ FRENCH ] = "Arrire-plan" ;
+ Text [ ITALIAN ] = "Sfondo" ;
+ Text [ DUTCH ] = "Achtergrond" ;
+ Text [ PORTUGUESE_BRAZILIAN ] = "Fundo" ;
+ Text [ SWEDISH ] = "Bakgrund" ;
+ Text [ PORTUGUESE ] = "Plano de fundo" ;
+ FixedText FT_SELECTOR
+ {
+ Pos = MAP_APPFONT ( 6 , 4 ) ;
+ Size = MAP_APPFONT ( 24 , 10 ) ;
+ Hide = TRUE ;
+ LeftLabel = TRUE ;
+ Text = "~Als" ;
+ Text [ English ] = "A~s" ;
+ Text [ english_us ] = "A~s" ;
+ Text [ dutch ] = "~Als" ;
+ Text [ italian ] = "Come" ;
+ Text [ spanish ] = "~Como" ;
+ Text [ french ] = "~Type" ;
+ Text [ swedish ] = "~som" ;
+ Text [ danish ] = "Som" ;
+ Text [ portuguese_brazilian ] = "~Als" ;
+ Text [ portuguese ] = "~Como" ;
+ Text[ chinese_simplified ] = "(~S)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Jako";
+ Text[ japanese ] = "l(~S)";
+ Text[ chinese_traditional ] = "@(~S)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "(~S)";
+ Text[ turkish ] = "~Artalan";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_SELECTOR
+ {
+ Hide = TRUE ;
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 33 , 3 ) ;
+ Size = MAP_APPFONT ( 82 , 48 ) ;
+ DropDown = TRUE ;
+ StringList =
+ {
+ < "Farbe" ; Default ; > ;
+ < "Grafik" ; Default ; > ;
+ };
+ StringList [ ENGLISH ] =
+ {
+ < "Farbe" ; Default ; > ;
+ < "Grafik" ; Default ; > ;
+ };
+ StringList [ ENGLISH_US ] =
+ {
+ < "Color" ; Default ; > ;
+ < "Graphic" ; Default ; > ;
+ };
+ stringlist [ portuguese_brazilian ] =
+ {
+ < "Farbe" ; Default ; > ;
+ < "Grafik" ; Default ; > ;
+ };
+ stringlist [ swedish ] =
+ {
+ < "Frg" ; Default ; > ;
+ < "Grafik" ; Default ; > ;
+ };
+ stringlist [ danish ] =
+ {
+ < "Farve" ; Default ; > ;
+ < "Grafik" ; Default ; > ;
+ };
+ stringlist [ italian ] =
+ {
+ < "Colore" ; Default ; > ;
+ < "Immagine" ; Default ; > ;
+ };
+ stringlist [ spanish ] =
+ {
+ < "Color" ; Default ; > ;
+ < "Imagen" ; Default ; > ;
+ };
+ stringlist [ french ] =
+ {
+ < "Couleur" ; Default ; > ;
+ < "Image" ; Default ; > ;
+ };
+ stringlist [ dutch ] =
+ {
+ < "Kleur" ; Default ; > ;
+ < "Afbeelding" ; Default ; > ;
+ };
+ stringlist [ portuguese ] =
+ {
+ < "Cor" ; Default ; > ;
+ < "Imagem" ; Default ; > ;
+ };
+ StringList [ chinese_simplified ] =
+ {
+ < "ɫ" ; Default ; > ;
+ < "ͼ" ; Default ; > ;
+ };
+ StringList [ russian ] =
+ {
+ < "" ; Default ; > ;
+ < "" ; Default ; > ;
+ };
+ StringList [ polish ] =
+ {
+ < "Kolor" ; Default ; > ;
+ < "Grafika" ; Default ; > ;
+ };
+ StringList [ japanese ] =
+ {
+ < "F" ; Default ; > ;
+ < "̨" ; Default ; > ;
+ };
+ StringList [ chinese_traditional ] =
+ {
+ < "C" ; Default ; > ;
+ < "Ϥ" ; Default ; > ;
+ };
+ StringList [ arabic ] =
+ {
+ < "" ; Default ; > ;
+ < "" ; Default ; > ;
+ };
+ StringList [ greek ] =
+ {
+ < "" ; Default ; > ;
+ < "" ; Default ; > ;
+ };
+ StringList [ korean ] =
+ {
+ < "" ; Default ; > ;
+ < "׷" ; Default ; > ;
+ };
+ StringList [ turkish ] =
+ {
+ < "Renk" ; Default ; > ;
+ < "Grafik" ; Default ; > ;
+ };
+ StringList [ language_user1 ] =
+ {
+ < " " ; Default ; > ;
+ < " " ; Default ; > ;
+ };
+ };
+ FixedText FT_TBL_DESC
+ {
+ Pos = MAP_APPFONT ( 145 , 5 ) ;
+ Size = MAP_APPFONT ( 24 , 10 ) ;
+ Hide = TRUE ;
+ LeftLabel = TRUE ;
+ /* ### ACHTUNG: Neuer Text in Resource? F~r : F~r */
+ Text = "F~r" ;
+ Text [ English ] = "F~or" ;
+ Text [ english_us ] = "F~or" ;
+ Text [ italian ] = "Per" ;
+ Text [ spanish ] = "Pa~ra" ;
+ Text [ french ] = "Pou~r" ;
+ Text [ dutch ] = "~Voor" ;
+ Text [ swedish ] = "F~r" ;
+ Text [ danish ] = "For" ;
+ Text [ portuguese_brazilian ] = "F~r" ;
+ Text [ portuguese ] = "~Para" ;
+ Text[ chinese_simplified ] = "(~O)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Dla";
+ Text[ japanese ] = "pr(~O)";
+ Text[ chinese_traditional ] = "Ω(~O)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "(~O)";
+ Text[ turkish ] = "He~def";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_TBL_BOX
+ {
+ Hide = TRUE ;
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 172 , 3 ) ;
+ Size = MAP_APPFONT ( 82 , 48 ) ;
+ DropDown = TRUE ;
+ StringList =
+ {
+ < "Zelle" ; > ;
+ < "Zeile" ; > ;
+ < "Tabelle" ; > ;
+ };
+ StringList [ ENGLISH ] =
+ {
+ < "Zelle" ; > ;
+ < "Zeile" ; > ;
+ < "Tabelle" ; > ;
+ };
+ StringList [ ENGLISH_US ] =
+ {
+ < "Cell" ; > ;
+ < "Row" ; > ;
+ < "Table" ; > ;
+ };
+ stringlist [ portuguese_brazilian ] =
+ {
+ < "Zelle" ; > ;
+ < "Zeile" ; > ;
+ < "Tabelle" ; > ;
+ };
+ stringlist [ swedish ] =
+ {
+ < "Cell" ; > ;
+ < "Rad" ; > ;
+ < "Tabell" ; > ;
+ };
+ stringlist [ danish ] =
+ {
+ < "Celle" ; > ;
+ < "Rkke" ; > ;
+ < "Tabel" ; > ;
+ };
+ stringlist [ italian ] =
+ {
+ < "Cella" ; > ;
+ < "Riga" ; > ;
+ < "Tabella" ; > ;
+ };
+ stringlist [ spanish ] =
+ {
+ < "Celda" ; > ;
+ < "Fila" ; > ;
+ < "Tabla" ; > ;
+ };
+ stringlist [ french ] =
+ {
+ < "Cellule" ; > ;
+ < "Ligne" ; > ;
+ < "Tableau" ; > ;
+ };
+ stringlist [ dutch ] =
+ {
+ < "Cel" ; > ;
+ < "Rij" ; > ;
+ < "Tabel" ; > ;
+ };
+ stringlist [ portuguese ] =
+ {
+ < "Clula" ; > ;
+ < "Linha" ; > ;
+ < "Tabela" ; > ;
+ };
+ StringList [ chinese_simplified ] =
+ {
+ < "Ԫ" ; > ;
+ < "" ; > ;
+ < "" ; > ;
+ };
+ StringList [ russian ] =
+ {
+ < "" ; > ;
+ < "" ; > ;
+ < "" ; > ;
+ };
+ StringList [ polish ] =
+ {
+ < "Komrka" ; > ;
+ < "Wiersz" ; > ;
+ < "Tabela" ; > ;
+ };
+ StringList [ japanese ] =
+ {
+ < "" ; > ;
+ < "s" ; > ;
+ < "\\" ; > ;
+ };
+ StringList [ chinese_traditional ] =
+ {
+ < "xs" ; > ;
+ < "xs" ; > ;
+ < "" ; > ;
+ };
+ StringList [ arabic ] =
+ {
+ < "" ; > ;
+ < "" ; > ;
+ < "" ; > ;
+ };
+ StringList [ greek ] =
+ {
+ < "" ; > ;
+ < "" ; > ;
+ < "" ; > ;
+ };
+ StringList [ korean ] =
+ {
+ < "" ; > ;
+ < "" ; > ;
+ < "̺" ; > ;
+ };
+ StringList [ turkish ] =
+ {
+ < "Hcre" ; > ;
+ < "Satr" ; > ;
+ < "Tablo" ; > ;
+ };
+ StringList [ language_user1 ] =
+ {
+ < " " ; > ;
+ < " " ; > ;
+ < " " ; > ;
+ };
+ };
+ ListBox LB_PARA_BOX
+ {
+ Hide = TRUE ;
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 172 , 3 ) ;
+ Size = MAP_APPFONT ( 82 , 48 ) ;
+ DropDown = TRUE ;
+ StringList =
+ {
+ < "Absatz" ; > ;
+ < "Zeichen" ; > ;
+ };
+ StringList [ ENGLISH ] =
+ {
+ < "Absatz" ; > ;
+ < "Zeichen" ; > ;
+ };
+ stringlist [ english_us ] =
+ {
+ < "Paragraph" ; > ;
+ < "Character" ; > ;
+ };
+ stringlist [ portuguese_brazilian ] =
+ {
+ < "Absatz" ; > ;
+ < "Zeichen" ; > ;
+ };
+ stringlist [ swedish ] =
+ {
+ < "Stycke" ; > ;
+ < "Tecken" ; > ;
+ };
+ stringlist [ danish ] =
+ {
+ < "Afsnit" ; > ;
+ < "Tegn" ; > ;
+ };
+ stringlist [ italian ] =
+ {
+ < "Paragrafo" ; > ;
+ < "Carattere" ; > ;
+ };
+ stringlist [ spanish ] =
+ {
+ < "Prrafo" ; > ;
+ < "Carcter" ; > ;
+ };
+ stringlist [ french ] =
+ {
+ < "Paragraphe" ; > ;
+ < "Caractre" ; > ;
+ };
+ stringlist [ dutch ] =
+ {
+ < "Alinea" ; > ;
+ < "Teken" ; > ;
+ };
+ stringlist [ portuguese ] =
+ {
+ < "Pargrafo" ; > ;
+ < "Caracteres" ; > ;
+ };
+ StringList [ chinese_simplified ] =
+ {
+ < "" ; > ;
+ < "ַ" ; > ;
+ };
+ StringList [ russian ] =
+ {
+ < "" ; > ;
+ < "" ; > ;
+ };
+ StringList [ polish ] =
+ {
+ < "Akapit" ; > ;
+ < "Znak" ; > ;
+ };
+ StringList [ japanese ] =
+ {
+ < "i" ; > ;
+ < "" ; > ;
+ };
+ StringList [ chinese_traditional ] =
+ {
+ < "q" ; > ;
+ < "r" ; > ;
+ };
+ StringList [ arabic ] =
+ {
+ < "" ; > ;
+ < "" ; > ;
+ };
+ StringList [ greek ] =
+ {
+ < "" ; > ;
+ < "" ; > ;
+ };
+ StringList [ korean ] =
+ {
+ < "ܶ" ; > ;
+ < "" ; > ;
+ };
+ StringList [ turkish ] =
+ {
+ < "Paragraf" ; > ;
+ < "Karakter" ; > ;
+ };
+ StringList [ language_user1 ] =
+ {
+ < " " ; > ;
+ < " " ; > ;
+ };
+ };
+ // Hintergrund-Brush ----------------------------------------------------
+ Control SET_BGDCOLOR
+ {
+ HelpId = HID_BACKGROUND_CTL_BGDCOLORSET ;
+ Hide = TRUE ;
+ Pos = MAP_APPFONT ( 22 , 32 ) ;
+ Size = MAP_APPFONT ( 116 , 95 ) ;
+ TabStop = TRUE ;
+ };
+ GroupBox GB_BGDCOLOR
+ {
+ Hide = TRUE ;
+ Pos = MAP_APPFONT ( 6 , 21 ) ;
+ Size = MAP_APPFONT ( 148 , 109 ) ;
+ Text = "Hintergrundfarbe" ;
+ Text [ ENGLISH ] = "Background Color" ;
+ Text [ NORWEGIAN ] = "Background Color" ;
+ Text [ DANISH ] = "Baggrundsfarve" ;
+ Text [ ENGLISH_US ] = "Background color" ;
+ Text [ SPANISH ] = "C~olor de fondo" ;
+ Text [ FINNISH ] = "Background Color" ;
+ Text [ FRENCH ] = "Couleur d'arrire-plan" ;
+ Text [ ITALIAN ] = "Colore di sfondo" ;
+ Text [ DUTCH ] = "Achtergrondkleur" ;
+ Text [ PORTUGUESE_BRAZILIAN ] = "Background Color" ;
+ Text [ SWEDISH ] = "Bakgrundsfrg" ;
+ Text [ PORTUGUESE ] = "Cor de fundo" ;
+ Text[ chinese_simplified ] = "ɫ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Kolor ta";
+ Text[ japanese ] = "wiF";
+ Text[ chinese_traditional ] = "IC";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = "";
+ Text[ turkish ] = "Artalan rengi";
+ Text[ language_user1 ] = " ";
+ };
+ GroupBox GB_COL_PREVIEW
+ {
+ Hide = TRUE ;
+ Pos = MAP_APPFONT ( 160 , 21 ) ;
+ Size = MAP_APPFONT ( 94 , 109 ) ;
+ Text = "Vorschau" ;
+ Text [ ENGLISH ] = "Preview" ;
+ Text [ NORWEGIAN ] = "Preview" ;
+ Text [ DANISH ] = "Eksempel" ;
+ Text [ ENGLISH_US ] = "Preview" ;
+ Text [ SPANISH ] = "Previsualizacin" ;
+ Text [ FINNISH ] = "Esikatselu" ;
+ Text [ FRENCH ] = "Aperu" ;
+ Text [ ITALIAN ] = "Anteprima" ;
+ Text [ DUTCH ] = "Voorbeeld" ;
+ Text [ PORTUGUESE_BRAZILIAN ] = "Examinar" ;
+ Text [ SWEDISH ] = "Frhandsvisning" ;
+ Text [ PORTUGUESE ] = "Previsualizar" ;
+ Text[ chinese_simplified ] = "Ԥ";
+ Text[ russian ] = "";
+ Text[ polish ] = "Podgld";
+ Text[ japanese ] = "ޭ";
+ Text[ chinese_traditional ] = "w";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "̸ ";
+ Text[ turkish ] = "nizleme";
+ Text[ language_user1 ] = " ";
+ };
+ Window WIN_PREVIEW1
+ {
+ Hide = TRUE ;
+ Border = TRUE ;
+ SVLook = TRUE ;
+ Pos = MAP_APPFONT ( 166 , 32 ) ;
+ Size = MAP_APPFONT ( 82 , 92 ) ;
+ };
+ // Hintergrund-Bitmap ----------------------------------------------------
+ FixedText FT_FILE
+ {
+ Hide = TRUE ;
+ Pos = MAP_APPFONT ( 12 , 34 ) ;
+ Size = MAP_APPFONT ( 141 , 10 ) ;
+ UNLINKED_IMAGE
+ };
+ CheckBox BTN_LINK
+ {
+ Hide = TRUE ;
+ Pos = MAP_APPFONT ( 12 , 48 ) ;
+ Size = MAP_APPFONT ( 78 , 10 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? ~Verknpfen : ~Verknpfen */
+ Text = "~Verknpfen" ;
+ Text [ ENGLISH ] = "~Link" ;
+ Text [ ENGLISH_US ] = "~Link" ;
+ Text [ dutch ] = "~Koppelen" ;
+ Text [ italian ] = "Collega" ;
+ Text [ spanish ] = "~Vincular" ;
+ Text [ french ] = "~Lien" ;
+ Text [ swedish ] = "Ln~ka" ;
+ Text [ danish ] = "Kd" ;
+ Text [ portuguese_brazilian ] = "~Verknpfen" ;
+ Text [ portuguese ] = "~Ligar" ;
+ Text[ chinese_simplified ] = "(~L)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Po~cz";
+ Text[ japanese ] = "ݸ(~L)";
+ Text[ chinese_traditional ] = "|(~L)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "(~L)";
+ Text[ turkish ] = "Bala";
+ Text[ language_user1 ] = " ";
+ };
+ CheckBox BTN_PREVIEW
+ {
+ Pos = MAP_APPFONT ( 12 , 60 ) ;
+ Size = MAP_APPFONT ( 141 , 10 ) ;
+ Text = "V~orschau" ;
+ Text [ ENGLISH ] = "P~review" ;
+ Text [ ENGLISH_US ] = "Pre~view" ;
+ Text [ italian ] = "Anteprima" ;
+ Text [ spanish ] = "Previsuali~zacin" ;
+ Text [ french ] = "A~peru" ;
+ Text [ dutch ] = "V~oorbeeld" ;
+ Text [ swedish ] = "F~rhandsvisning" ;
+ Text [ danish ] = "Eksempel" ;
+ Text [ portuguese ] = "~Previsualizar" ;
+ Text [ portuguese_brazilian ] = "V~orschau" ;
+ Text[ chinese_simplified ] = "Ԥ(~R)";
+ Text[ russian ] = "";
+ Text[ polish ] = "P~odgld";
+ Text[ japanese ] = "ޭ(~R)";
+ Text[ chinese_traditional ] = "w(~R)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "̸ (~V)";
+ Text[ turkish ] = "~nizleme";
+ Text[ language_user1 ] = " ";
+ };
+ PushButton BTN_BROWSE
+ {
+ Hide = TRUE ;
+ Pos = MAP_APPFONT ( 93 , 46 ) ;
+ Size = MAP_APPFONT ( 60 , 14 ) ;
+ Text = "Au~swhlen..." ;
+ Text [ ENGLISH ] = "~Select..." ;
+ Text [ english_us ] = "~Browse..." ;
+ Text [ portuguese_brazilian ] = "~Durchsuchen..." ;
+ Text [ swedish ] = "~Vlj ut..." ;
+ Text [ danish ] = "Gennemse..." ;
+ Text [ italian ] = "~Sfoglia..." ;
+ Text [ spanish ] = "Seleccio~nar..." ;
+ Text [ french ] = "~Parcourir..." ;
+ Text [ dutch ] = "~Doorzoeken..." ;
+ Text [ portuguese ] = "~Pesquisar..." ;
+ Text[ chinese_simplified ] = "(~B)...";
+ Text[ russian ] = "...";
+ Text[ polish ] = "Przegld~aj...";
+ Text[ japanese ] = "I(~B)...";
+ Text[ chinese_traditional ] = "s(~B)...";
+ Text[ arabic ] = "...";
+ Text[ greek ] = "...";
+ Text[ korean ] = "ϱ(~B)...";
+ Text[ turkish ] = "Se...";
+ Text[ language_user1 ] = " ";
+ };
+ GroupBox GB_FILE
+ {
+ Hide = TRUE ;
+ Pos = MAP_APPFONT ( 6 , 23 ) ;
+ Size = MAP_APPFONT ( 153 , 51 ) ;
+ Text = "Datei" ;
+ Text [ ENGLISH ] = "~File" ;
+ Text [ ENGLISH_US ] = "File" ;
+ Text [ dutch ] = "Bestand" ;
+ Text [ italian ] = "File" ;
+ Text [ spanish ] = "Archivo" ;
+ Text [ french ] = "Fichier" ;
+ Text [ swedish ] = "Fil" ;
+ Text [ danish ] = "Fil" ;
+ Text [ portuguese_brazilian ] = "Datei" ;
+ Text [ portuguese ] = "Ficheiro" ;
+ Text[ chinese_simplified ] = "ļ";
+ Text[ russian ] = "";
+ Text[ polish ] = "Plik";
+ Text[ japanese ] = "̧";
+ Text[ chinese_traditional ] = "ɮ";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "Dosya";
+ Text[ language_user1 ] = " ";
+ };
+ RadioButton BTN_POSITION
+ {
+ Hide = TRUE ;
+ Pos = MAP_APPFONT ( 12 , 88 ) ;
+ Size = MAP_APPFONT ( 49 , 10 ) ;
+ Text = "~Position" ;
+ Text [ ENGLISH ] = "~Position" ;
+ Text [ ENGLISH_US ] = "~Position" ;
+ Text [ italian ] = "~Posizione" ;
+ Text [ spanish ] = "~Posicin" ;
+ Text [ french ] = "P~osition" ;
+ Text [ dutch ] = "~Positie" ;
+ Text [ swedish ] = "~Position" ;
+ Text [ danish ] = "Placering" ;
+ Text [ portuguese_brazilian ] = "~Position" ;
+ Text [ portuguese ] = "~Posio" ;
+ Text[ chinese_simplified ] = "λ(~P)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Pozy~cja";
+ Text[ japanese ] = "ʒu(~P)";
+ Text[ chinese_traditional ] = "m(~P)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "ġ(~P)";
+ Text[ turkish ] = "O~rtala";
+ Text[ language_user1 ] = " ";
+ };
+ RadioButton BTN_AREA
+ {
+ Hide = TRUE ;
+ Pos = MAP_APPFONT ( 12 , 101 ) ;
+ Size = MAP_APPFONT ( 49 , 10 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? ~Flche : ~Flche */
+ Text = "~Flche" ;
+ Text [ ENGLISH ] = "~Area" ;
+ Text [ ENGLISH_US ] = "Ar~ea" ;
+ Text [ dutch ] = "Vla~k" ;
+ Text [ italian ] = "~Area" ;
+ Text [ spanish ] = "~rea" ;
+ Text [ french ] = "~Remplissage" ;
+ Text [ swedish ] = "~Yta" ;
+ Text [ danish ] = "F~lade" ;
+ Text [ portuguese_brazilian ] = "~Flche" ;
+ Text [ portuguese ] = "~Preenchimento" ;
+ Text[ chinese_simplified ] = "ƽ(~A)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Obsza~r";
+ Text[ japanese ] = "\\(~A)";
+ Text[ chinese_traditional ] = "(~A)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "(~E)";
+ Text[ turkish ] = "Ser";
+ Text[ language_user1 ] = " ";
+ };
+ RadioButton BTN_TILE
+ {
+ Hide = TRUE ;
+ Pos = MAP_APPFONT ( 12 , 114 ) ;
+ Size = MAP_APPFONT ( 49 , 10 ) ;
+ Text = "~Kachel" ;
+ Text [ ENGLISH ] = "~Tile" ;
+ Text [ ENGLISH_US ] = "~Tile" ;
+ Text [ italian ] = "Affianca" ;
+ Text [ spanish ] = "~Mosaico" ;
+ Text [ french ] = "Ca~rrelage" ;
+ Text [ dutch ] = "~Tegel" ;
+ Text [ swedish ] = "Sida vid sida" ;
+ Text [ danish ] = "Side om side" ;
+ Text [ portuguese_brazilian ] = "~Kachel" ;
+ Text [ portuguese ] = "~Azulejo" ;
+ Text[ chinese_simplified ] = "ƽ(~T)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Pyt~ka";
+ Text[ japanese ] = "(~T)";
+ Text[ chinese_traditional ] = "Q(~T)";
+ Text[ arabic ] = "";
+ Text[ greek ] = " ";
+ Text[ korean ] = "ٵǽ(~T)";
+ Text[ turkish ] = "~De";
+ Text[ language_user1 ] = " ";
+ };
+ Control WND_POSITION
+ {
+ HelpId = HID_BACKGROUND_CTL_POSITION ;
+ Hide = TRUE ;
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 64 , 88 ) ;
+ Size = MAP_APPFONT ( 90 , 35 ) ;
+ TabStop = TRUE ;
+ };
+ GroupBox GB_POSITION
+ {
+ Hide = TRUE ;
+ Pos = MAP_APPFONT ( 6 , 75 ) ;
+ Size = MAP_APPFONT ( 153 , 54 ) ;
+ Text = "Art" ;
+ Text [ ENGLISH ] = "Type" ;
+ Text [ ENGLISH_US ] = "Type" ;
+ Text [ dutch ] = "Soort" ;
+ Text [ italian ] = "Tipo" ;
+ Text [ spanish ] = "Tipo" ;
+ Text [ french ] = "Type" ;
+ Text [ swedish ] = "Typ" ;
+ Text [ danish ] = "Type" ;
+ Text [ portuguese_brazilian ] = "Art" ;
+ Text [ portuguese ] = "Tipo" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "Typ";
+ Text[ japanese ] = "";
+ Text[ chinese_traditional ] = "";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "Tr";
+ Text[ language_user1 ] = " ";
+ };
+ Window WIN_PREVIEW2
+ {
+ Hide = TRUE ;
+ Border = TRUE ;
+ SVLook = TRUE ;
+ Pos = MAP_APPFONT ( 170 , 34 ) ;
+ Size = MAP_APPFONT ( 81 , 89 ) ;
+ };
+ GroupBox GB_PREVIEW
+ {
+ Hide = TRUE ;
+ Pos = MAP_APPFONT ( 165 , 23 ) ;
+ Size = MAP_APPFONT ( 91 , 106 ) ;
+ Text = "Grafikvorschau" ;
+ Text [ ENGLISH ] = "Image Preview" ;
+ Text [ ENGLISH_US ] = "Preview" ;
+ Text [ italian ] = "Anteprima immagine" ;
+ Text [ spanish ] = "Previsualizacin" ;
+ Text [ french ] = "Aperu" ;
+ Text [ dutch ] = "Afbeeldingvoorbeeld" ;
+ Text [ swedish ] = "Grafikfrhandsvisning" ;
+ Text [ danish ] = "Eksempel" ;
+ Text [ portuguese_brazilian ] = "Grafikvorschau" ;
+ Text [ portuguese ] = "Previsualizar" ;
+ Text[ chinese_simplified ] = "ͼԤ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Podgld grafiki";
+ Text[ japanese ] = "̨ ޭ";
+ Text[ chinese_traditional ] = "Ϥw";
+ Text[ arabic ] = " ";
+ Text[ language_user1 ] = " ";
+ Text[ greek ] = "";
+ Text[ korean ] = "׷ ̸ ";
+ Text[ turkish ] = "nizleme";
+ };
+ String STR_BROWSE
+ {
+ Text = "Grafik suchen" ;
+ Text [ ENGLISH ] = "Browse Image" ;
+ Text [ ENGLISH_US ] = "Find graphics" ;
+ Text [ italian ] = "Cerca immagine" ;
+ Text [ spanish ] = "Buscar imagen" ;
+ Text [ french ] = "Rechercher un image" ;
+ Text [ dutch ] = "Afbeelding zoeken" ;
+ Text [ swedish ] = "Sk grafik" ;
+ Text [ danish ] = "Sg grafik" ;
+ Text [ portuguese_brazilian ] = "Grafik suchen" ;
+ Text [ portuguese ] = "Localizar imagem" ;
+ Text[ chinese_simplified ] = "Ѱͼ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Szukaj grafiki";
+ Text[ japanese ] = "̨";
+ Text[ chinese_traditional ] = "MϤ";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = "׷ ã";
+ Text[ turkish ] = "Grafik bul";
+ Text[ language_user1 ] = " ";
+ };
+ String STR_UNLINKED
+ {
+ UNLINKED_IMAGE
+ };
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "To";
+ Text[ japanese ] = "wi";
+ Text[ chinese_traditional ] = "I";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "Artalan";
+ Text[ language_user1 ] = " ";
+};
+ // ********************************************************************** EOF
diff --git a/svx/source/dialog/bbdlg.cxx b/svx/source/dialog/bbdlg.cxx
new file mode 100644
index 000000000000..4a800828a711
--- /dev/null
+++ b/svx/source/dialog/bbdlg.cxx
@@ -0,0 +1,107 @@
+/*************************************************************************
+ *
+ * $RCSfile: bbdlg.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:06 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+// include ---------------------------------------------------------------
+
+#ifndef _SHL_HXX //autogen
+#include <tools/shl.hxx>
+#endif
+#pragma hdrstop
+
+#include "dialogs.hrc"
+#include "page.hrc"
+
+#include "bbdlg.hxx"
+#include "border.hxx"
+#include "backgrnd.hxx"
+#include "dialmgr.hxx"
+
+// class SvxBorderBackgroundDlg ------------------------------------------
+
+SvxBorderBackgroundDlg::SvxBorderBackgroundDlg( Window *pParent,
+ const SfxItemSet& rCoreSet,
+ BOOL bEnableSelector ) :
+
+ SfxTabDialog( pParent, SVX_RES( RID_SVXDLG_BBDLG ), &rCoreSet ),
+ bEnableBackgroundSelector( bEnableSelector )
+{
+ FreeResource();
+ AddTabPage( RID_SVXPAGE_BORDER, SvxBorderTabPage::Create, 0 );
+ AddTabPage( RID_SVXPAGE_BACKGROUND, SvxBackgroundTabPage::Create, 0 );
+}
+
+// -----------------------------------------------------------------------
+
+SvxBorderBackgroundDlg::~SvxBorderBackgroundDlg()
+{
+}
+
+// -----------------------------------------------------------------------
+
+void SvxBorderBackgroundDlg::PageCreated( USHORT nPageId, SfxTabPage& rTabPage )
+{
+ // Umschalten zwischen Farbe/Grafik ermoeglichen:
+
+ if ( bEnableBackgroundSelector && (RID_SVXPAGE_BACKGROUND == nPageId) )
+ ((SvxBackgroundTabPage&)rTabPage).ShowSelector( );
+}
+
+
diff --git a/svx/source/dialog/bbdlg.src b/svx/source/dialog/bbdlg.src
new file mode 100644
index 000000000000..24c7fc149815
--- /dev/null
+++ b/svx/source/dialog/bbdlg.src
@@ -0,0 +1,160 @@
+/*************************************************************************
+ *
+ * $RCSfile: bbdlg.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:06 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+ // include ---------------------------------------------------------------
+#include "dialogs.hrc"
+ // pragma ----------------------------------------------------------------
+
+ // RID_SVXDLG_BBDLG ------------------------------------------------------
+TabDialog RID_SVXDLG_BBDLG
+{
+ OutputSize = TRUE ;
+ SVLook = TRUE ;
+ Size = MAP_APPFONT ( 328 , 155 ) ;
+ Text = "Umrandung / Hintergrund" ;
+ Text [ ENGLISH ] = "Border / Background" ;
+ Text [ norwegian ] = "Border / Background" ;
+ Text [ italian ] = "Bordo / Sfondo" ;
+ Text [ portuguese_brazilian ] = "Margem / Fundo" ;
+ Text [ portuguese ] = "Contorno/Plano de fundo" ;
+ Text [ finnish ] = "Reunaviiva / tausta" ;
+ Text [ danish ] = "Ramme / Baggrund" ;
+ Text [ french ] = "Bordure / Arrire-plan" ;
+ Text [ swedish ] = "Inramning/ Bakgrund" ;
+ Text [ dutch ] = "Omranding / achtergrond" ;
+ Text [ spanish ] = "Bordes / Fondo" ;
+ Text [ english_us ] = "Border / Background" ;
+ Moveable = TRUE ;
+ // Closeable = TRUE; hat ja einen OKButton
+ TabControl 1
+ {
+ OutputSize = TRUE ;
+ Pos = MAP_APPFONT ( 2 , 10 ) ;
+ Size = MAP_APPFONT ( 260 , 135 ) ;
+ PageList =
+ {
+ PageItem
+ {
+ Identifier = RID_SVXPAGE_BORDER ;
+ Text = "Umrandung" ;
+ Text [ ENGLISH ] = "Border" ;
+ Text [ norwegian ] = "Border" ;
+ Text [ italian ] = "Bordo" ;
+ Text [ portuguese_brazilian ] = "Borda" ;
+ Text [ portuguese ] = "Contornos" ;
+ Text [ finnish ] = "Reunaviiva" ;
+ Text [ danish ] = "Ramme" ;
+ Text [ french ] = "Bordure" ;
+ Text [ swedish ] = "Inramning" ;
+ Text [ dutch ] = "Omranding" ;
+ Text [ spanish ] = "Borde" ;
+ Text [ english_us ] = "Borders" ;
+ Text[ chinese_simplified ] = "߿";
+ Text[ russian ] = "";
+ Text[ polish ] = "Obramowanie";
+ Text[ japanese ] = "Og";
+ Text[ chinese_traditional ] = "";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "׵θ";
+ Text[ turkish ] = "Kenarlk";
+ Text[ language_user1 ] = " ";
+ };
+ PageItem
+ {
+ Identifier = RID_SVXPAGE_BACKGROUND ;
+ Text = "Hintergrund" ;
+ Text [ ENGLISH ] = "Background" ;
+ Text [ norwegian ] = "Background" ;
+ Text [ italian ] = "Sfondo" ;
+ Text [ portuguese_brazilian ] = "Fundo" ;
+ Text [ portuguese ] = "Plano de fundo" ;
+ Text [ finnish ] = "Tausta" ;
+ Text [ danish ] = "Baggrund" ;
+ Text [ french ] = "Arrire-plan" ;
+ Text [ swedish ] = "Bakgrund" ;
+ Text [ dutch ] = "Achtergrond" ;
+ Text [ spanish ] = "Fondo" ;
+ Text [ english_us ] = "Background" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "To";
+ Text[ japanese ] = "wi";
+ Text[ chinese_traditional ] = "I";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "Artalan";
+ Text[ language_user1 ] = " ";
+ };
+ };
+ };
+ Text[ chinese_simplified ] = "߿/";
+ Text[ russian ] = " / ";
+ Text[ polish ] = "Obramowanie / To";
+ Text[ japanese ] = "Og/wi";
+ Text[ chinese_traditional ] = "/I";
+ Text[ arabic ] = " / ";
+ Text[ greek ] = " / ";
+ Text[ korean ] = "׵θ / ";
+ Text[ turkish ] = "Kenarlk / Artalan";
+ Text[ language_user1 ] = " ";
+};
+ // ********************************************************************** EOF
diff --git a/svx/source/dialog/bmpmask.hrc b/svx/source/dialog/bmpmask.hrc
new file mode 100644
index 000000000000..e28105ccadde
--- /dev/null
+++ b/svx/source/dialog/bmpmask.hrc
@@ -0,0 +1,93 @@
+/*************************************************************************
+ *
+ * $RCSfile: bmpmask.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:06 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define RID_SVXDLG_BMPMASK (RID_SVX_BMPMASK_START)
+#define RID_SVXDLG_BMPMASK_STR_TRANSP (RID_SVX_BMPMASK_START + 1)
+
+#define GRP_Q 1
+#define CTR_PIPETTE 1
+#define CBX_1 1
+#define CBX_2 4
+#define CBX_3 3
+#define CBX_4 2
+#define CBX_TRANS 5
+#define QCOL_1 2
+#define QCOL_2 5
+#define QCOL_3 4
+#define QCOL_4 3
+#define SP_1 2
+#define SP_2 4
+#define SP_3 1
+#define SP_4 3
+#define GRP_D 2
+#define TBX_PIPETTE 1
+#define TBI_PIPETTE 1
+#define WND_PIPETTE 10
+#define BTN_EXEC 1
+#define LB_1 1
+#define LB_2 2
+#define LB_3 3
+#define LB_4 4
+#define LB_TRANS 5
+#define FT_1 1
+#define FT_2 2
+#define FT_3 3
+
+
diff --git a/svx/source/dialog/bmpmask.src b/svx/source/dialog/bmpmask.src
new file mode 100644
index 000000000000..e99be6d2a81d
--- /dev/null
+++ b/svx/source/dialog/bmpmask.src
@@ -0,0 +1,466 @@
+/*************************************************************************
+ *
+ * $RCSfile: bmpmask.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:06 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+ // include ---------------------------------------------------------------
+#include "svxids.hrc"
+#include "dialogs.hrc"
+#include "bmpmask.hrc"
+#include "helpid.hrc"
+ // pragma ----------------------------------------------------------------
+
+ // RID_SVXDLG_BMPMASK ----------------------------------------------------
+DockingWindow RID_SVXDLG_BMPMASK
+{
+ HelpId = SID_BMPMASK ;
+ OutputSize = TRUE ;
+ Hide = TRUE ;
+ SVLook = TRUE ;
+ Pos = MAP_APPFONT ( 0 , 0 ) ;
+ Size = MAP_APPFONT ( 163 , 133 ) ;
+ Text = "Pipette" ;
+ Text [ ENGLISH ] = "Eyedropper" ;
+ Sizeable = FALSE ;
+ Moveable = TRUE ;
+ Closeable = TRUE ;
+ Zoomable = TRUE ;
+ Dockable = TRUE ;
+ EnableResizing = TRUE ;
+ GroupBox GRP_Q
+ {
+ Pos = MAP_APPFONT ( 6 , 23 ) ;
+ Size = MAP_APPFONT ( 151 , 104 ) ;
+ Text = "Farben" ;
+ Text [ ENGLISH ] = "Colors" ;
+ Text [ dutch ] = "Kleuren" ;
+ Text [ english_us ] = "Colors" ;
+ Text [ italian ] = "Colori" ;
+ Text [ spanish ] = "Colores" ;
+ Text [ french ] = "Couleurs" ;
+ Text [ swedish ] = "Frger" ;
+ Text [ danish ] = "Farver" ;
+ Text [ portuguese_brazilian ] = "Farben" ;
+ Text [ portuguese ] = "Cores" ;
+ Text[ chinese_simplified ] = "ɫ";
+ Text[ russian ] = "";
+ Text[ polish ] = "Kolory";
+ Text[ japanese ] = "F";
+ Text[ chinese_traditional ] = "C";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "Renkler";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_1
+ {
+ Pos = MAP_APPFONT ( 12 , 34 ) ;
+ Size = MAP_APPFONT ( 38 , 12 ) ;
+ Text = "Quellfarbe" ;
+ Text [ ENGLISH ] = "Source color" ;
+ Text [ dutch ] = "Uitgangskleur" ;
+ Text [ english_us ] = "Source color" ;
+ Text [ italian ] = "Colore origine" ;
+ Text [ spanish ] = "Color fuente" ;
+ Text [ french ] = "Couleur d'origine" ;
+ Text [ swedish ] = "Kllfrg" ;
+ Text [ danish ] = "Kildefarve" ;
+ Text [ portuguese_brazilian ] = "Quellfarbe" ;
+ Text [ portuguese ] = "Cor-fonte" ;
+ Text[ chinese_simplified ] = "Դɫ";
+ Text[ russian ] = "";
+ Text[ polish ] = "Kolor orygin.";
+ Text[ japanese ] = "װ";
+ Text[ chinese_traditional ] = "C";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = "ҽ ";
+ Text[ turkish ] = "Kaynak renk";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_2
+ {
+ Pos = MAP_APPFONT ( 51 , 34 ) ;
+ Size = MAP_APPFONT ( 35 , 12 ) ;
+ Text = "Toleranz" ;
+ Text [ ENGLISH ] = "Tolerance" ;
+ Text [ english_us ] = "Tolerance" ;
+ Text [ italian ] = "Tolleranza" ;
+ Text [ spanish ] = "Tolerancia" ;
+ Text [ french ] = "Tolrance" ;
+ Text [ dutch ] = "Tolerantie" ;
+ Text [ swedish ] = "Tolerans" ;
+ Text [ danish ] = "Tolerance" ;
+ Text [ portuguese_brazilian ] = "Toleranz" ;
+ Text [ portuguese ] = "Tolerncia" ;
+ Text[ chinese_simplified ] = "ƫ";
+ Text[ russian ] = "";
+ Text[ polish ] = "Tolerancja";
+ Text[ japanese ] = "e͈";
+ Text[ chinese_traditional ] = "t";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = " ";
+ Text[ turkish ] = "Tolerans";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_3
+ {
+ Pos = MAP_APPFONT ( 87 , 34 ) ;
+ Size = MAP_APPFONT ( 64 , 12 ) ;
+ Text = "Ersetzen durch..." ;
+ Text [ ENGLISH ] = "Replace with..." ;
+ Text [ english_us ] = "Replace with..." ;
+ Text [ italian ] = "Sostituisci con..." ;
+ Text [ spanish ] = "Reemplazar con..." ;
+ Text [ french ] = "Remplacer par..." ;
+ Text [ dutch ] = "Vervangen door..." ;
+ Text [ swedish ] = "Erstt med..." ;
+ Text [ danish ] = "Erstat med..." ;
+ Text [ portuguese_brazilian ] = "Ersetzen durch..." ;
+ Text [ portuguese ] = "Substituir por..." ;
+ Text[ chinese_simplified ] = "滻Ϊ...";
+ Text[ russian ] = " ...";
+ Text[ polish ] = "Zamie na...";
+ Text[ japanese ] = "u...";
+ Text[ chinese_traditional ] = "N...";
+ Text[ arabic ] = " ...";
+ Text[ greek ] = " ...";
+ Text[ korean ] = " ٲٱ...";
+ Text[ turkish ] = "Yeni renk...";
+ Text[ language_user1 ] = " ";
+ };
+ CheckBox CBX_1
+ {
+ Pos = MAP_APPFONT ( 12 , 49 ) ;
+ Size = MAP_APPFONT ( 12 , 12 ) ;
+ TabStop = TRUE ;
+ };
+ CheckBox CBX_2
+ {
+ Pos = MAP_APPFONT ( 12 , 64 ) ;
+ Size = MAP_APPFONT ( 12 , 12 ) ;
+ TabStop = TRUE ;
+ };
+ CheckBox CBX_3
+ {
+ Pos = MAP_APPFONT ( 12 , 79 ) ;
+ Size = MAP_APPFONT ( 12 , 12 ) ;
+ TabStop = TRUE ;
+ };
+ CheckBox CBX_4
+ {
+ Pos = MAP_APPFONT ( 12 , 94 ) ;
+ Size = MAP_APPFONT ( 12 , 12 ) ;
+ TabStop = TRUE ;
+ };
+ Control QCOL_1
+ {
+ HelpId = HID_BMPMASK_CTL_QCOL_1 ;
+ Pos = MAP_APPFONT ( 24 , 49 ) ;
+ Size = MAP_APPFONT ( 24 , 57 ) ;
+ Border = TRUE ;
+ };
+ CheckBox CBX_TRANS
+ {
+ Pos = MAP_APPFONT ( 12 , 109 ) ;
+ Size = MAP_APPFONT ( 67 , 12 ) ;
+ Text = "Transparenz" ;
+ Text [ ENGLISH ] = "Transparency" ;
+ TabStop = TRUE ;
+ Text [ english_us ] = "Tr~ansparency" ;
+ Text [ italian ] = "Trasparenza" ;
+ Text [ spanish ] = "Transparencia" ;
+ Text [ french ] = "Transparent" ;
+ Text [ dutch ] = "Transparantie" ;
+ Text [ swedish ] = "Transparens" ;
+ Text [ danish ] = "Transparens" ;
+ Text [ portuguese_brazilian ] = "Transparenz" ;
+ Text [ portuguese ] = "Transparncia" ;
+ Text[ chinese_simplified ] = "͸";
+ Text[ russian ] = "";
+ Text[ polish ] = "Przezroczysto";
+ Text[ japanese ] = "ߐ";
+ Text[ chinese_traditional ] = "z";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "(~A)";
+ Text[ turkish ] = "Saydamlk";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField SP_1
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 51 , 49 ) ;
+ Size = MAP_APPFONT ( 28 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Maximum = 99 ;
+ Last = 99 ;
+ SpinSize = 1 ;
+ Unit = FUNIT_CUSTOM ;
+ CustomUnitText = " %" ;
+ };
+ MetricField SP_2
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 51 , 64 ) ;
+ Size = MAP_APPFONT ( 28 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Maximum = 99 ;
+ Last = 99 ;
+ SpinSize = 1 ;
+ Unit = FUNIT_CUSTOM ;
+ CustomUnitText = " %" ;
+ };
+ MetricField SP_3
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 51 , 79 ) ;
+ Size = MAP_APPFONT ( 28 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Maximum = 99 ;
+ Last = 99 ;
+ SpinSize = 1 ;
+ Unit = FUNIT_CUSTOM ;
+ CustomUnitText = " %" ;
+ };
+ MetricField SP_4
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 51 , 94 ) ;
+ Size = MAP_APPFONT ( 28 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Maximum = 99 ;
+ Last = 99 ;
+ SpinSize = 1 ;
+ Unit = FUNIT_CUSTOM ;
+ CustomUnitText = " %" ;
+ };
+ PushButton BTN_EXEC
+ {
+ Pos = MAP_APPFONT ( 93 , 6 ) ;
+ Size = MAP_APPFONT ( 64 , 14 ) ;
+ Text = "Ersetzen" ;
+ Text [ ENGLISH ] = "Replace" ;
+ Text [ dutch ] = "Vervangen" ;
+ Text [ english_us ] = "~Replace" ;
+ Text [ italian ] = "Sostituisci" ;
+ Text [ spanish ] = "Reemplazar" ;
+ Text [ french ] = "Remplacer" ;
+ Text [ swedish ] = "Erstt" ;
+ Text [ danish ] = "Erstat" ;
+ Text [ portuguese ] = "Substituir" ;
+ Text [ portuguese_brazilian ] = "Ersetzen" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "Zamie";
+ Text[ japanese ] = "u";
+ Text[ chinese_traditional ] = "N";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "ٲٱ(~R)";
+ Text[ turkish ] = "Deitir";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_1
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 87 , 49 ) ;
+ Size = MAP_APPFONT ( 64 , 75 ) ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+ DDExtraWidth = TRUE ;
+ };
+ ListBox LB_2
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 87 , 64 ) ;
+ Size = MAP_APPFONT ( 64 , 75 ) ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+ DDExtraWidth = TRUE ;
+ };
+ ListBox LB_3
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 87 , 79 ) ;
+ Size = MAP_APPFONT ( 64 , 75 ) ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+ DDExtraWidth = TRUE ;
+ };
+ ListBox LB_4
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 87 , 94 ) ;
+ Size = MAP_APPFONT ( 64 , 75 ) ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+ DDExtraWidth = TRUE ;
+ };
+ ListBox LB_TRANS
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 87 , 109 ) ;
+ Size = MAP_APPFONT ( 64 , 75 ) ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+ DDExtraWidth = TRUE ;
+ };
+ ToolBox TBX_PIPETTE
+ {
+ SVLook = TRUE ;
+ Pos = MAP_APPFONT ( 6 , 6 ) ;
+ ItemList =
+ {
+ ToolBoxItem
+ {
+ AutoCheck = TRUE ;
+ Identifier = TBI_PIPETTE ;
+ HelpId = HID_BMPMASK_TBI_PIPETTE ;
+ Text = "Pipette" ;
+ Text [ ENGLISH ] = "Eyedropper" ;
+ ItemImage = Image
+ {
+ ImageBitmap = Bitmap { File = "sc10350.bmp" ; };
+ MaskColor = Color { Red = 0xC000 ; Green = 0xC000 ; Blue = 0xC000 ; };
+ };
+ Text [ dutch ] = "Pipet" ;
+ Text [ english_us ] = "Eyedropper" ;
+ Text [ italian ] = "Contagocce" ;
+ Text [ spanish ] = "Pipeta" ;
+ Text [ french ] = "Pipette" ;
+ Text [ swedish ] = "Pipett" ;
+ Text [ danish ] = "Pipette" ;
+ Text [ portuguese ] = "Pipeta" ;
+ Text [ portuguese_brazilian ] = "Pipette" ;
+ Text[ chinese_simplified ] = "ȡɫ";
+ Text[ russian ] = "";
+ Text[ polish ] = "Pipeta";
+ Text[ japanese ] = "߯";
+ Text[ chinese_traditional ] = "";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = " 󳻱";
+ Text[ turkish ] = "Renk rnei al";
+ Text[ language_user1 ] = " ";
+ };
+ };
+ };
+ Control WND_PIPETTE
+ {
+ HelpId = HID_BMPMASK_CTL_PIPETTE ;
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 23 , 6 ) ;
+ Size = MAP_APPFONT ( 43 , 14 ) ;
+ };
+ Text [ english_us ] = "Eyedropper" ;
+ Text [ italian ] = "Contagocce" ;
+ Text [ spanish ] = "Pipeta" ;
+ Text [ french ] = "Pipette" ;
+ Text [ dutch ] = "Pipet" ;
+ Text [ swedish ] = "Pipett" ;
+ Text [ danish ] = "Pipette" ;
+ Text [ portuguese_brazilian ] = "Pipette" ;
+ Text [ portuguese ] = "Pipeta" ;
+ Text[ chinese_simplified ] = "ȡɫ";
+ Text[ russian ] = "";
+ Text[ polish ] = "Pipeta";
+ Text[ japanese ] = "߯";
+ Text[ chinese_traditional ] = "";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = " 󳻱";
+ Text[ turkish ] = "Renk rnei al";
+ Text[ language_user1 ] = " ";
+};
+
+String RID_SVXDLG_BMPMASK_STR_TRANSP
+{
+ Text = "Transparent";
+ Text [ ENGLISH ] = "Transparent";
+ Text [ english_us ] = "Transparent";
+ Text[ portuguese ] = "Transparente";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "Transparant";
+ Text[ french ] = "Transparent";
+ Text[ spanish ] = "Transparente";
+ Text[ italian ] = "Trasparente";
+ Text[ danish ] = "Transparent";
+ Text[ swedish ] = "Transparent";
+ Text[ polish ] = "Przeroczysty";
+ Text[ portuguese_brazilian ] = "Transparent";
+ Text[ japanese ] = "h‚ԂȂ";
+ Text[ korean ] = "Transparent";
+ Text[ chinese_simplified ] = "͸";
+ Text[ chinese_traditional ] = "z";
+ Text[ turkish ] = "Saydam";
+ Text[ arabic ] = "";
+};
+
+ // ********************************************************************** EOF
diff --git a/svx/source/dialog/border.cxx b/svx/source/dialog/border.cxx
new file mode 100644
index 000000000000..bafd39012bdf
--- /dev/null
+++ b/svx/source/dialog/border.cxx
@@ -0,0 +1,1790 @@
+/*************************************************************************
+ *
+ * $RCSfile: border.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:07 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+// include ---------------------------------------------------------------
+
+#ifndef _SFXAPP_HXX
+#include <sfx2/app.hxx>
+#endif
+#ifndef _SFX_SAVEOPT_HXX //autogen
+#include <sfx2/saveopt.hxx>
+#endif
+#ifndef _SFX_OBJSH_HXX
+#include <sfx2/objsh.hxx>
+#endif
+#ifndef _SFXMODULE_HXX
+#include <sfx2/module.hxx>
+#endif
+#pragma hdrstop
+
+#define _SVX_BORDER_CXX
+
+#include "dialogs.hrc"
+#include "svxitems.hrc"
+#include "border.hrc"
+#include "helpid.hrc"
+
+#define ITEMID_COLOR_TABLE 0
+#define ITEMID_BOX SID_ATTR_BORDER_OUTER
+#define ITEMID_BOXINFO SID_ATTR_BORDER_INNER
+#define ITEMID_SHADOW SID_ATTR_BORDER_SHADOW
+
+#define LINESTYLE_HTML_MAX 5
+
+#include "xtable.hxx" // XColorTable
+#include "drawitem.hxx"
+#include "boxitem.hxx"
+#include "shaditem.hxx"
+#include "border.hxx"
+#include "linelink.hxx"
+#include "dlgutil.hxx"
+#include "dialmgr.hxx"
+#include "htmlmode.hxx"
+#ifndef _SV_MSGBOX_HXX //autogen
+#include <vcl/msgbox.hxx>
+#endif
+
+/* -----------------01.06.99 08:23-------------------
+ *
+ * --------------------------------------------------*/
+
+class BorderDistanceExample_Impl : public Window
+{
+ long nLeft;
+ long nRight;
+ long nTop;
+ long nBottom;
+ USHORT nValid; //mit VALID_TOP, ...
+public:
+ BorderDistanceExample_Impl(Window* pParent, const ResId& rResId) :
+ Window(pParent, rResId),
+ nLeft(0),
+ nRight(0),
+ nTop(0),
+ nBottom(0),
+ nValid(VALID_TOP|VALID_BOTTOM|VALID_LEFT|VALID_RIGHT)
+ {}
+
+ virtual void Paint( const Rectangle& rRect );
+
+ void SetDistances(long nL, long nR, long nT, long nB)
+ {nLeft = nL; nRight = nR; nTop = nT; nBottom = nB;}
+ void SetValid(USHORT nSet) {nValid = nSet;}
+};
+void BorderDistanceExample_Impl::Paint( const Rectangle& rRect )
+{
+// Pen aSolidPen(PEN_SOLID);
+ Size aLogSize(PixelToLogic(GetOutputSizePixel()));
+ Point aTL( 0, 0 );
+ Rectangle aRect(aTL, aLogSize);
+
+ SetFillColor( Color( COL_WHITE ) );
+ SetLineColor( Color( COL_BLACK ) );
+ DrawRect(aRect);
+
+ SetFillColor( Color( COL_GRAY ) );
+ SetLineColor( Color( COL_BLACK ) );
+
+ aTL = Point( aLogSize.Width() / 10, aLogSize.Height() / 10 );
+ Rectangle aBorderRect(aTL, Size(aLogSize.Width() * 8 / 10, aLogSize.Height() * 8 /10));
+
+ if(VALID_LEFT&nValid)
+ DrawLine(aBorderRect.TopLeft(), aBorderRect.BottomLeft());
+ if(VALID_RIGHT&nValid)
+ DrawLine(aBorderRect.TopRight(), aBorderRect.BottomRight());
+ if(VALID_TOP&nValid)
+ DrawLine(aBorderRect.TopLeft(), aBorderRect.TopRight());
+ if(VALID_BOTTOM&nValid)
+ DrawLine(aBorderRect.BottomLeft(), aBorderRect.BottomRight());
+
+ Rectangle aContentRect(aBorderRect);
+
+ long nL = nLeft / 10;
+ long nR = nRight/ 10;
+ long nT = nTop / 10;
+ long nB = nBottom / 10;
+ if((nL + nR) > aContentRect.GetWidth())
+ {
+ nL = aContentRect.GetWidth() * 100 / (nL + nR) * nL / 100;
+ nR = aContentRect.GetWidth() - nL;
+ }
+ aContentRect.Left() += nL;
+ aContentRect.Right()-= nR;
+ if((nT + nB) > aContentRect.GetHeight())
+ {
+ nT = aContentRect.GetHeight() * 100 / (nT + nB) * nT / 100;
+ nB = aContentRect.GetHeight() - nT;
+ }
+ aContentRect.Top() += nT;
+ aContentRect.Bottom()-= nB;
+
+ DrawRect(aContentRect);
+}
+
+class SvxDistanceDlg_Impl : public ModalDialog
+{
+ friend class SvxBorderTabPage;
+ GroupBox aDistanceGB;
+ FixedText aLeftFT;
+ MetricField aLeftMF;
+ FixedText aRightFT;
+ MetricField aRightMF;
+ FixedText aTopFT;
+ MetricField aTopMF;
+ FixedText aBottomFT;
+ MetricField aBottomMF;
+ CheckBox aSynchronizeCB;
+ BorderDistanceExample_Impl aExampleWIN;
+
+ OKButton aOK;
+ CancelButton aCancel;
+ HelpButton aHelp;
+
+ USHORT nValid;
+
+ static BOOL bSync;
+ DECL_LINK(ModifyHdl, MetricField*);
+ DECL_LINK(SyncHdl, CheckBox*);
+
+public:
+ SvxDistanceDlg_Impl(Window* pParent, const ResId& rResId);
+ virtual short Execute();
+
+ void SetFldUnit(FieldUnit eUnit)
+ {
+ SetFieldUnit(aLeftMF, eUnit);
+ SetFieldUnit(aRightMF, eUnit);
+ SetFieldUnit(aTopMF, eUnit);
+ SetFieldUnit(aBottomMF, eUnit);
+ if(eUnit == FUNIT_MM)
+ {
+ aLeftMF.SetDecimalDigits(1);
+ aRightMF.SetDecimalDigits(1);
+ aTopMF.SetDecimalDigits(1);
+ aBottomMF.SetDecimalDigits(1);
+ }
+ }
+ void UpdateExample();
+ void SetValid(USHORT nSet)
+ { nValid = nSet;
+ aExampleWIN.SetValid(nValid);
+ aLeftFT.Enable(0 != (nValid&VALID_LEFT));
+ aRightFT.Enable(0 != (nValid&VALID_RIGHT));
+ aTopFT.Enable(0 != (nValid&VALID_TOP));
+ aBottomFT.Enable(0 != (nValid&VALID_BOTTOM));
+ aLeftMF.Enable(0 != (nValid&VALID_LEFT));
+ aRightMF.Enable(0 != (nValid&VALID_RIGHT));
+ aTopMF.Enable(0 != (nValid&VALID_TOP));
+ aBottomMF.Enable(0 != (nValid&VALID_BOTTOM));
+ }
+
+};
+/* -----------------01.06.99 08:28-------------------
+ *
+ * --------------------------------------------------*/
+BOOL SvxDistanceDlg_Impl::bSync = TRUE;
+SvxDistanceDlg_Impl::SvxDistanceDlg_Impl(Window* pParent, const ResId& rResId) :
+ ModalDialog(pParent, rResId),
+ aOK( this, ResId(PB_OK)),
+ aCancel( this, ResId(PB_CANCEL)),
+ aHelp( this, ResId(PB_HELP)),
+ aDistanceGB( this, ResId(GB_DISTANCE)),
+ aLeftFT( this, ResId(FT_LEFT)),
+ aLeftMF( this, ResId(MF_LEFT)),
+ aRightFT( this, ResId(FT_RIGHT)),
+ aRightMF( this, ResId(MF_RIGHT)),
+ aTopFT( this, ResId(FT_TOP)),
+ aTopMF( this, ResId(MF_TOP)),
+ aBottomFT( this, ResId(FT_BOTTOM)),
+ aBottomMF( this, ResId(MF_BOTTOM)),
+ aSynchronizeCB( this, ResId(CB_SYNC )),
+ aExampleWIN( this, ResId(WIN_EXAMPLE )),
+ nValid(VALID_TOP|VALID_BOTTOM|VALID_LEFT|VALID_RIGHT)
+{
+ FreeResource();
+ aSynchronizeCB.Check(bSync);
+ aSynchronizeCB.SetClickHdl(LINK(this, SvxDistanceDlg_Impl, SyncHdl));
+ aLeftMF.SetModifyHdl(LINK(this, SvxDistanceDlg_Impl, ModifyHdl));
+ aRightMF.SetModifyHdl(LINK(this, SvxDistanceDlg_Impl, ModifyHdl));
+ aTopMF.SetModifyHdl(LINK(this, SvxDistanceDlg_Impl, ModifyHdl));
+ aBottomMF.SetModifyHdl(LINK(this, SvxDistanceDlg_Impl, ModifyHdl));
+
+ aHelp .SetHelpId(HID_BORDER_DISTANCE_DLG_HELP_PB);
+ aLeftMF .SetHelpId(HID_BORDER_DISTANCE_DLG_LEFT);
+ aRightMF .SetHelpId(HID_BORDER_DISTANCE_DLG_RIGHT );
+ aTopMF .SetHelpId(HID_BORDER_DISTANCE_DLG_TOP );
+ aBottomMF .SetHelpId(HID_BORDER_DISTANCE_DLG_BOTTOM );
+ aSynchronizeCB .SetHelpId(HID_BORDER_DISTANCE_DLG_SYNC_CB);
+ aExampleWIN .SetHelpId(HID_BORDER_DISTANCE_DLG_EXAMPLE);
+}
+/* -----------------01.07.99 15:03-------------------
+
+ --------------------------------------------------*/
+short SvxDistanceDlg_Impl::Execute()
+{
+ long nLeft = aLeftMF.GetValue();
+ long nRight = aRightMF.GetValue();
+ long nTop = aTopMF.GetValue();
+ long nBottom = aBottomMF.GetValue();
+
+ // save all values
+ short nRet = ModalDialog::Execute();
+ if(RET_CANCEL == nRet)
+ {
+ //restore values
+ aLeftMF.SetValue( nLeft );
+ aRightMF.SetValue( nRight );
+ aTopMF.SetValue( nTop );
+ aBottomMF.SetValue( nBottom);
+ UpdateExample();
+ }
+ return nRet;
+}
+
+/* -----------------07.06.99 15:58-------------------
+ *
+ * --------------------------------------------------*/
+IMPL_LINK(SvxDistanceDlg_Impl, ModifyHdl, MetricField*, pField)
+{
+ if(bSync)
+ {
+ long nVal = pField->GetValue();
+ aLeftMF.SetValue(nVal);
+ aRightMF.SetValue(nVal);
+ aTopMF.SetValue(nVal);
+ aBottomMF.SetValue(nVal);
+ }
+ UpdateExample();
+ return 0;
+}
+
+/* -----------------07.06.99 15:58-------------------
+ *
+ * --------------------------------------------------*/
+IMPL_LINK(SvxDistanceDlg_Impl, SyncHdl, CheckBox*, pBox)
+{
+ bSync = pBox->IsChecked();
+ return 0;
+}
+/* -----------------07.06.99 15:58-------------------
+ *
+ * --------------------------------------------------*/
+void SvxDistanceDlg_Impl::UpdateExample()
+{
+ aExampleWIN.SetDistances(
+ aLeftMF.GetValue(), aRightMF.GetValue(),
+ aTopMF.GetValue(), aBottomMF.GetValue());
+ aExampleWIN.Invalidate();
+}
+
+// -----------------------------------------------------------------------
+
+/*
+ * [Beschreibung:]
+ * TabPage zum Einstellen der Rahmen-Attribute.
+ * Benoetigt
+ * ein SvxShadowItem: Schatten
+ * ein SvxBoxItem: Linien links,rechts,oben,unten ),
+ * ein SvxBoxInfo: Linien vertikal,horizontal, Abstaende, Flags )
+ *
+ * Linien koennen drei Zustaende haben.
+ * 1. Show ( -> gueltige Werte )
+ * 2. Hide ( -> NULL-Pointer )
+ * 3. DontCare ( -> gesonderte Valid-Flags im InfoItem )
+ */
+
+// static ----------------------------------------------------------------
+
+static USHORT pRanges[] =
+{
+ SID_ATTR_BORDER_INNER,
+ SID_ATTR_BORDER_SHADOW,
+ 0
+};
+
+//------------------------------------------------------------------------
+
+#define LINE_WIDTH0 (DEF_LINE_WIDTH_0 *100)
+#define LINE_WIDTH1 (DEF_LINE_WIDTH_1 *100)
+#define LINE_WIDTH2 (DEF_LINE_WIDTH_2 *100)
+#define LINE_WIDTH3 (DEF_LINE_WIDTH_3 *100)
+#define LINE_WIDTH4 (DEF_LINE_WIDTH_4 *100)
+
+#define DLINE0_OUT (DEF_DOUBLE_LINE0_OUT *100)
+#define DLINE0_IN (DEF_DOUBLE_LINE0_IN *100)
+#define DLINE0_DIST (DEF_DOUBLE_LINE0_DIST *100)
+
+#define DLINE1_OUT (DEF_DOUBLE_LINE1_OUT *100)
+#define DLINE1_IN (DEF_DOUBLE_LINE1_IN *100)
+#define DLINE1_DIST (DEF_DOUBLE_LINE1_DIST *100)
+
+#define DLINE2_OUT (DEF_DOUBLE_LINE2_OUT *100)
+#define DLINE2_IN (DEF_DOUBLE_LINE2_IN *100)
+#define DLINE2_DIST (DEF_DOUBLE_LINE2_DIST *100)
+
+#define DLINE3_OUT (DEF_DOUBLE_LINE3_OUT *100)
+#define DLINE3_IN (DEF_DOUBLE_LINE3_IN *100)
+#define DLINE3_DIST (DEF_DOUBLE_LINE3_DIST *100)
+
+#define DLINE4_OUT (DEF_DOUBLE_LINE4_OUT *100)
+#define DLINE4_IN (DEF_DOUBLE_LINE4_IN *100)
+#define DLINE4_DIST (DEF_DOUBLE_LINE4_DIST *100)
+
+#define DLINE5_OUT (DEF_DOUBLE_LINE5_OUT *100)
+#define DLINE5_IN (DEF_DOUBLE_LINE5_IN *100)
+#define DLINE5_DIST (DEF_DOUBLE_LINE5_DIST *100)
+
+#define DLINE6_OUT (DEF_DOUBLE_LINE6_OUT *100)
+#define DLINE6_IN (DEF_DOUBLE_LINE6_IN *100)
+#define DLINE6_DIST (DEF_DOUBLE_LINE6_DIST *100)
+
+#define DLINE7_OUT (DEF_DOUBLE_LINE7_OUT *100)
+#define DLINE7_IN (DEF_DOUBLE_LINE7_IN *100)
+#define DLINE7_DIST (DEF_DOUBLE_LINE7_DIST *100)
+
+#define DLINE8_OUT (DEF_DOUBLE_LINE8_OUT *100)
+#define DLINE8_IN (DEF_DOUBLE_LINE8_IN *100)
+#define DLINE8_DIST (DEF_DOUBLE_LINE8_DIST *100)
+
+#define DLINE9_OUT (DEF_DOUBLE_LINE9_OUT *100)
+#define DLINE9_IN (DEF_DOUBLE_LINE9_IN *100)
+#define DLINE9_DIST (DEF_DOUBLE_LINE9_DIST *100)
+
+#define DLINE10_OUT (DEF_DOUBLE_LINE10_OUT *100)
+#define DLINE10_IN (DEF_DOUBLE_LINE10_IN *100)
+#define DLINE10_DIST (DEF_DOUBLE_LINE10_DIST*100)
+
+#define EQSTYLE(s1,s2) \
+ ( (s1).nLeft == (s2).nLeft \
+ && (s1).nMiddle == (s2).nMiddle \
+ && (s1).nRight == (s2).nRight \
+ )
+
+#define SET_STYLE(s,l,m,r) \
+ ((s).nLeft = l), \
+ ((s).nMiddle = m), \
+ ((s).nRight = r)
+
+#define RGBCOL(eColorName) (TpBorderRGBColor(eColorName))
+
+// LOKALE FUNKTION
+// Konvertiert in echte RGB-Farben, damit in den Listboxen
+// endlich mal richtig selektiert werden kann.
+
+Color TpBorderRGBColor( ColorData aColorData )
+{
+ Color aRGBColor( aColorData );
+
+ return( aRGBColor );
+}
+
+// -----------------------------------------------------------------------
+
+Color TpBorderRGBColor( const Color& rColor )
+{
+ Color aRGBColor( rColor.GetRed(),
+ rColor.GetGreen(),
+ rColor.GetBlue() );
+
+ return( aRGBColor );
+}
+
+// -----------------------------------------------------------------------
+
+SvxBorderTabPage::SvxBorderTabPage( Window* pParent,
+ const SfxItemSet& rCoreAttrs )
+
+ : SfxTabPage( pParent, ResId( RID_SVXPAGE_BORDER, DIALOG_MGR() ), rCoreAttrs ),
+
+ aWndPresets ( this, ResId( WIN_PRESETS ) ),
+ aGbPresets ( this, ResId( GB_PRESETS ) ),
+
+ aWndFrameSel ( this, ResId( WIN_FRAMESEL ) ),
+ aDistancePB ( this, ResId( PB_DISTANCE ) ),
+ aGbBorder ( this, ResId( GB_BORDER ) ),
+
+ aFtLineStyle ( this, ResId( FT_LINESTYLE ) ),
+ aLbLineStyle ( this, ResId( LB_LINESTYLE ) ),
+ aFtLineColor ( this, ResId( FT_LINECOLOR ) ),
+ aLbLineColor ( this, ResId( LB_LINECOLOR ) ),
+ aGbLine ( this, ResId( GB_LINE ) ),
+
+ aFtShadowPos ( this, ResId( FT_SHADOWPOS ) ),
+ aWndShadows ( this, ResId( WIN_SHADOWS ) ),
+ aFtShadowSize ( this, ResId( FT_SHADOWSIZE ) ),
+ aEdShadowSize ( this, ResId( ED_SHADOWSIZE ) ),
+ aFtShadowColor ( this, ResId( FT_SHADOWCOLOR ) ),
+ aLbShadowColor ( this, ResId( LB_SHADOWCOLOR ) ),
+ aGbShadow ( this, ResId( GB_SHADOW ) ),
+ pDistDlg(0),
+ nMinValue(0),
+ bIsTableBorder ( FALSE ),
+ nSWMode(0)
+{
+ // diese Page braucht ExchangeSupport
+ SetExchangeSupport();
+
+ // Metrik einstellen
+ FieldUnit eFUnit;
+ GET_MODULE_FIELDUNIT( eFUnit );
+
+ switch ( eFUnit )
+ {
+ case FUNIT_M:
+ case FUNIT_KM:
+ eFUnit = FUNIT_MM;
+ break;
+ }
+
+ SetFieldUnit( aEdShadowSize, eFUnit );
+
+ USHORT nWhich = GetWhich( SID_ATTR_BORDER_INNER );
+ BOOL bIsDontCare = TRUE;
+
+ if ( rCoreAttrs.GetItemState( nWhich, TRUE ) >= SFX_ITEM_AVAILABLE )
+ {
+ // Absatz oder Tabelle
+ const SvxBoxInfoItem* pBoxInfo =
+ (const SvxBoxInfoItem*)&( rCoreAttrs.Get( nWhich ) );
+ bIsTableBorder = pBoxInfo->IsTable();
+
+ if(pBoxInfo->IsDist())
+ {
+ aDistancePB.Show();
+ pDistDlg = new SvxDistanceDlg_Impl(this, ResId(DLG_DISTANCE));
+ SetFieldUnit(pDistDlg->aLeftMF , eFUnit);
+ SetFieldUnit(pDistDlg->aRightMF , eFUnit);
+ SetFieldUnit(pDistDlg->aTopMF , eFUnit);
+ SetFieldUnit(pDistDlg->aBottomMF , eFUnit);
+ pDistDlg->UpdateExample();
+ }
+ bIsDontCare = !pBoxInfo->IsValid( VALID_DISABLE );
+ }
+ if(eFUnit == FUNIT_MM && SFX_MAPUNIT_TWIP == rCoreAttrs.GetPool()->GetMetric( GetWhich( SID_ATTR_BORDER_INNER ) ))
+ {
+ if(pDistDlg)
+ {
+ pDistDlg->aLeftMF.SetDecimalDigits(1);
+ pDistDlg->aRightMF.SetDecimalDigits(1);
+ pDistDlg->aTopMF.SetDecimalDigits(1);
+ pDistDlg->aBottomMF.SetDecimalDigits(1);
+ }
+ aEdShadowSize.SetDecimalDigits(1);
+ }
+
+ pFrameSel = new SvxFrameSelector( &aWndFrameSel,
+ bIsTableBorder
+ ? SVX_FRMSELTYPE_TABLE
+ : SVX_FRMSELTYPE_PARAGRAPH,
+ bIsDontCare );
+
+ pFrameSel->SetSelectLink(LINK(this, SvxBorderTabPage, LinesChanged_Impl));
+ if ( bIsTableBorder ||
+ !pDistDlg)
+ {
+ long nDeltaY = 0;
+
+ if(pDistDlg)
+ nDeltaY = aGbBorder.GetPosPixel().Y() +
+ aGbBorder.GetSizePixel().Height() -
+ aDistancePB.GetPosPixel().Y() - 6/*GroupBox-Offset*/;
+
+ // Anpassung des FrameSelectors an StarCalc:
+ long nXdiff = ( aGbBorder.GetSizePixel().Width()
+ - aWndFrameSel.GetSizePixel().Width()) / 2;
+ long nYdiff = ( aGbBorder.GetSizePixel().Height() - nDeltaY
+ - aWndFrameSel.GetSizePixel().Height()) / 2;
+
+
+ aWndFrameSel.SetPosPixel( aGbBorder.GetPosPixel() +
+ Point( nXdiff, nYdiff ) );
+ }
+
+ aLbLineStyle.SetSelectHdl( LINK( this, SvxBorderTabPage, SelStyleHdl_Impl ) );
+ aLbLineColor.SetSelectHdl( LINK( this, SvxBorderTabPage, SelColHdl_Impl ) );
+ aLbShadowColor.SetSelectHdl( LINK( this, SvxBorderTabPage, SelColHdl_Impl ) );
+ aWndPresets.SetSelectHdl( LINK( this, SvxBorderTabPage, SelPreHdl_Impl ) );
+ aWndShadows.SetSelectHdl( LINK( this, SvxBorderTabPage, SelSdwHdl_Impl ) );
+ aDistancePB.SetClickHdl( LINK( this, SvxBorderTabPage, DistanceHdl_Impl ) );
+
+ FillValueSets_Impl();
+ FillLineListBox_Impl();
+
+ // ColorBox aus der XColorTable fuellen.
+ SfxObjectShell* pDocSh = SfxObjectShell::Current();
+ const SfxPoolItem* pItem = NULL;
+ XColorTable* pColorTable = NULL;
+
+ DBG_ASSERT( pDocSh, "DocShell not found!" );
+
+ if ( pDocSh && ( pItem = pDocSh->GetItem( SID_COLOR_TABLE ) ) )
+ pColorTable = ( (SvxColorTableItem*)pItem )->GetColorTable();
+
+ DBG_ASSERT( pColorTable, "ColorTable not found!" );
+
+ if ( pColorTable )
+ {
+ // fuellen der Linienfarben-Box
+ aLbLineColor.SetUpdateMode( FALSE );
+
+ for ( long i = 0; i < pColorTable->Count(); ++i )
+ {
+ XColorEntry* pEntry = pColorTable->Get(i);
+ aLbLineColor.InsertEntry( pEntry->GetColor(), pEntry->GetName() );
+ }
+ aLbLineColor.SetUpdateMode( TRUE );
+ // dann nur noch in die Schattenfarben-Box kopieren
+ aLbShadowColor.CopyEntries( aLbLineColor );
+ }
+ FreeResource();
+}
+
+// -----------------------------------------------------------------------
+
+SvxBorderTabPage::~SvxBorderTabPage()
+{
+ delete pFrameSel, pFrameSel=NULL;
+ delete pDistDlg;
+}
+
+// -----------------------------------------------------------------------
+
+USHORT* SvxBorderTabPage::GetRanges()
+{
+ return pRanges;
+}
+
+// -----------------------------------------------------------------------
+
+SfxTabPage* SvxBorderTabPage::Create( Window* pParent,
+ const SfxItemSet& rAttrSet )
+{
+ return ( new SvxBorderTabPage( pParent, rAttrSet ) );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxBorderTabPage::ResetFrameLine_Impl( const SvxBorderLine* pCoreLine,
+ SvxFrameLine& rFrameLine )
+{
+ SvxLineStruct newLineStyle = { 0,0,0 };
+
+ if ( !pCoreLine ) // == Linie nicht darstellen
+ {
+ rFrameLine.SetStyle( newLineStyle );
+ rFrameLine.SetColor( RGBCOL(COL_BLACK) );
+ }
+ else
+ {
+ newLineStyle.nLeft = pCoreLine->GetOutWidth()*100;
+ newLineStyle.nMiddle = pCoreLine->GetDistance()*100;
+ newLineStyle.nRight = pCoreLine->GetInWidth() *100;
+ rFrameLine.SetStyle( newLineStyle );
+ rFrameLine.SetColor( pCoreLine->GetColor() );
+ }
+}
+
+// -----------------------------------------------------------------------
+
+void SvxBorderTabPage::Reset( const SfxItemSet& rSet )
+{
+ const SvxBoxItem* pBoxItem;
+ const SvxBoxInfoItem* pBoxInfoItem;
+ const SvxShadowItem* pShadowItem;
+ USHORT nWhichBox = GetWhich(SID_ATTR_BORDER_OUTER);
+ USHORT nWhichShadow = GetWhich(SID_ATTR_BORDER_SHADOW);
+ SfxMapUnit eCoreUnit;
+ const Color aColBlack = RGBCOL(COL_BLACK);
+
+ pBoxItem = (const SvxBoxItem*)GetItem( rSet, SID_ATTR_BORDER_OUTER );
+ pBoxInfoItem = (const SvxBoxInfoItem*)GetItem( rSet, SID_ATTR_BORDER_INNER );
+ pShadowItem = (const SvxShadowItem*)GetItem( rSet, SID_ATTR_BORDER_SHADOW );
+
+ eCoreUnit = rSet.GetPool()->GetMetric( nWhichBox );
+
+ if ( pBoxItem && pBoxInfoItem ) // -> Don't Care
+ {
+ //-----------------
+ // Umrandung links:
+ //-----------------
+ if ( pBoxInfoItem->IsValid( VALID_LEFT ) )
+ ResetFrameLine_Impl( pBoxItem->GetLeft(),
+ pFrameSel->GetLeft() );
+ else
+ pFrameSel->GetLeft().SetState( SVX_FRMLINESTATE_DONT_CARE );
+
+ //------------------
+ // Umrandung rechts:
+ //------------------
+ if ( pBoxInfoItem->IsValid( VALID_RIGHT ) )
+ ResetFrameLine_Impl( pBoxItem->GetRight(),
+ pFrameSel->GetRight() );
+ else
+ pFrameSel->GetRight().SetState( SVX_FRMLINESTATE_DONT_CARE );
+
+ //----------------
+ // Umrandung oben:
+ //----------------
+ if ( pBoxInfoItem->IsValid( VALID_TOP ) )
+ ResetFrameLine_Impl( pBoxItem->GetTop(),
+ pFrameSel->GetTop() );
+ else
+ pFrameSel->GetTop().SetState( SVX_FRMLINESTATE_DONT_CARE );
+
+ //-----------------
+ // Umrandung unten:
+ //-----------------
+ if ( pBoxInfoItem->IsValid( VALID_BOTTOM ) )
+ ResetFrameLine_Impl( pBoxItem->GetBottom(),
+ pFrameSel->GetBottom() );
+ else
+ pFrameSel->GetBottom().SetState( SVX_FRMLINESTATE_DONT_CARE );
+
+ //-------------------
+ // Abstand nach innen
+ //-------------------
+ if(pDistDlg)
+ {
+ SetMetricValue( pDistDlg->aLeftMF,
+ pBoxInfoItem->GetDefDist(), eCoreUnit );
+ SetMetricValue( pDistDlg->aRightMF,
+ pBoxInfoItem->GetDefDist(), eCoreUnit );
+ SetMetricValue( pDistDlg->aTopMF,
+ pBoxInfoItem->GetDefDist(), eCoreUnit );
+ SetMetricValue( pDistDlg->aBottomMF,
+ pBoxInfoItem->GetDefDist(), eCoreUnit );
+
+ nMinValue = pDistDlg->aLeftMF.GetValue();
+
+ if ( pBoxInfoItem->IsMinDist() )
+ {
+ pDistDlg->aLeftMF.SetMin ( nMinValue );
+ pDistDlg->aLeftMF.SetFirst( nMinValue );
+ pDistDlg->aRightMF.SetMin ( nMinValue );
+ pDistDlg->aRightMF.SetFirst( nMinValue );
+ pDistDlg->aTopMF.SetMin ( nMinValue );
+ pDistDlg->aTopMF.SetFirst( nMinValue );
+ pDistDlg->aBottomMF.SetMin ( nMinValue );
+ pDistDlg->aBottomMF.SetFirst( nMinValue );
+ }
+
+ if ( pBoxInfoItem->IsDist() )
+ {
+ if ( SFX_ITEM_SET == rSet.GetItemState( nWhichBox, FALSE ) &&
+ pBoxInfoItem->IsValid( VALID_DISTANCE ) )
+ {
+ if( !pFrameSel->IsAnyLineSet() )
+ {
+ pDistDlg->aLeftMF.SetMin( 0 );
+ pDistDlg->aLeftMF.SetFirst( 0 );
+ pDistDlg->aRightMF.SetMin( 0 );
+ pDistDlg->aRightMF.SetFirst( 0 );
+ pDistDlg->aTopMF.SetMin( 0 );
+ pDistDlg->aTopMF.SetFirst( 0 );
+ pDistDlg->aBottomMF.SetMin( 0 );
+ pDistDlg->aBottomMF.SetFirst( 0 );
+ }
+ long nLeftDist = pBoxItem->GetDistance( BOX_LINE_LEFT);
+ SetMetricValue( pDistDlg->aLeftMF,
+ nLeftDist, eCoreUnit );
+ long nRightDist = pBoxItem->GetDistance( BOX_LINE_RIGHT);
+ SetMetricValue( pDistDlg->aRightMF,
+ nRightDist, eCoreUnit );
+ long nTopDist = pBoxItem->GetDistance( BOX_LINE_TOP);
+ SetMetricValue( pDistDlg->aTopMF,
+ nTopDist, eCoreUnit );
+ long nBottomDist = pBoxItem->GetDistance( BOX_LINE_BOTTOM);
+ SetMetricValue( pDistDlg->aBottomMF,
+ nBottomDist, eCoreUnit );
+
+ // ist der Abstand auf nicht-default gesetzt,
+ // dann soll der Wert auch nicht
+ // mehr autom. veraendert werden
+ const long nDefDist = pBoxInfoItem->GetDefDist();
+ if((pBoxItem->GetDistance() ||
+ (nSWMode & SW_BORDER_MODE_FRAME)&& pFrameSel->IsAnyLineSet()) &&
+ (nDefDist != nLeftDist ||
+ nDefDist != nRightDist ||
+ nDefDist != nTopDist ||
+ nDefDist != nBottomDist) )
+ {
+ pDistDlg->aLeftMF.SetModifyFlag();
+ pDistDlg->aRightMF.SetModifyFlag();
+ pDistDlg->aTopMF.SetModifyFlag();
+ pDistDlg->aBottomMF.SetModifyFlag();
+ }
+ }
+ else
+ {
+ SetMetricValue( pDistDlg->aLeftMF,
+ pBoxInfoItem->GetDefDist(), eCoreUnit );
+ SetMetricValue( pDistDlg->aRightMF,
+ pBoxInfoItem->GetDefDist(), eCoreUnit );
+ SetMetricValue( pDistDlg->aTopMF,
+ pBoxInfoItem->GetDefDist(), eCoreUnit );
+ SetMetricValue( pDistDlg->aBottomMF,
+ pBoxInfoItem->GetDefDist(), eCoreUnit );
+
+ }
+ }
+ pDistDlg->aLeftMF.SaveValue();
+ pDistDlg->aRightMF.SaveValue();
+ pDistDlg->aTopMF.SaveValue();
+ pDistDlg->aBottomMF.SaveValue();
+ pDistDlg->UpdateExample();
+ }
+
+ //----------------
+ // innen vertikal:
+ //----------------
+ if ( pBoxInfoItem->IsValid( VALID_VERT ) )
+ ResetFrameLine_Impl( pBoxInfoItem->GetVert(),
+ pFrameSel->GetVer() );
+ else
+ pFrameSel->GetVer().SetState( SVX_FRMLINESTATE_DONT_CARE );
+
+ //------------------
+ // innen horizontal:
+ //------------------
+ if ( pBoxInfoItem->IsValid( VALID_HORI ) )
+ ResetFrameLine_Impl( pBoxInfoItem->GetHori(),
+ pFrameSel->GetHor() );
+ else
+ pFrameSel->GetHor().SetState( SVX_FRMLINESTATE_DONT_CARE );
+
+ }
+ else
+ {
+ // ResetFrameLine-Aufrufe einsparen:
+ Color aColBlack = RGBCOL(COL_BLACK);
+ SvxLineStruct aNullLine = { 0,0,0 };
+ SvxFrameLine& rLeft = pFrameSel->GetLeft();
+ SvxFrameLine& rRight = pFrameSel->GetRight();
+ SvxFrameLine& rTop = pFrameSel->GetTop();
+ SvxFrameLine& rBottom = pFrameSel->GetBottom();
+ SvxFrameLine& rHor = pFrameSel->GetVer();
+ SvxFrameLine& rVer = pFrameSel->GetHor();
+
+ rLeft .SetStyle( aNullLine ); rLeft .SetColor( aColBlack );
+ rRight .SetStyle( aNullLine ); rRight .SetColor( aColBlack );
+ rTop .SetStyle( aNullLine ); rTop .SetColor( aColBlack );
+ rBottom .SetStyle( aNullLine ); rBottom .SetColor( aColBlack );
+ rHor .SetStyle( aNullLine ); rHor .SetColor( aColBlack );
+ rVer .SetStyle( aNullLine ); rVer .SetColor( aColBlack );
+ }
+
+ //-------------------------------
+ // Linien im Selektor darstellen:
+ //-------------------------------
+ pFrameSel->ShowLines();
+
+ //-------------------------------------------------------------
+ // Linie/Linienfarbe in Controllern darstellen, wenn eindeutig:
+ //-------------------------------------------------------------
+ {
+ SvxLineStruct aDefStyle;
+ List aList;
+
+ if ( pFrameSel->GetTop().GetState() == SVX_FRMLINESTATE_SHOW )
+ {
+ aList.Insert( &(pFrameSel->GetTop()) );
+ pFrameSel->SelectLine( SVX_FRMSELLINE_TOP );
+ }
+ else
+ pFrameSel->SelectLine( SVX_FRMSELLINE_TOP, FALSE );
+
+ if ( pFrameSel->GetBottom().GetState() == SVX_FRMLINESTATE_SHOW )
+ {
+ aList.Insert( &(pFrameSel->GetBottom()) );
+ pFrameSel->SelectLine( SVX_FRMSELLINE_BOTTOM );
+ }
+ else
+ pFrameSel->SelectLine( SVX_FRMSELLINE_BOTTOM, FALSE );
+
+ if ( pFrameSel->GetLeft().GetState() == SVX_FRMLINESTATE_SHOW )
+ {
+ aList.Insert( &(pFrameSel->GetLeft()) );
+ pFrameSel->SelectLine( SVX_FRMSELLINE_LEFT );
+ }
+ else
+ pFrameSel->SelectLine( SVX_FRMSELLINE_LEFT, FALSE );
+
+ if ( pFrameSel->GetRight().GetState() == SVX_FRMLINESTATE_SHOW )
+ {
+ aList.Insert( &(pFrameSel->GetRight()) );
+ pFrameSel->SelectLine( SVX_FRMSELLINE_RIGHT );
+ }
+ else
+ pFrameSel->SelectLine( SVX_FRMSELLINE_RIGHT, FALSE );
+
+ if ( pFrameSel->GetHor().GetState() == SVX_FRMLINESTATE_SHOW )
+ {
+ aList.Insert( &(pFrameSel->GetHor()) );
+ pFrameSel->SelectLine( SVX_FRMSELLINE_HOR );
+ }
+ else
+ pFrameSel->SelectLine( SVX_FRMSELLINE_HOR, FALSE );
+
+ if ( pFrameSel->GetVer().GetState() == SVX_FRMLINESTATE_SHOW )
+ {
+ aList.Insert( &(pFrameSel->GetVer()) );
+ pFrameSel->SelectLine( SVX_FRMSELLINE_VER );
+ }
+ else
+ pFrameSel->SelectLine( SVX_FRMSELLINE_VER, FALSE );
+
+ if ( aList.Count() > 0 )
+ {
+ SvxFrameLine* pLine = (SvxFrameLine*)aList.First();
+ Color aColor( pLine->GetColor() );
+ SvxLineStruct aStyle = pLine->GetStyle();
+ BOOL bEqual = TRUE;
+
+ // Linienfarbe -------------------------------------
+
+ while ( pLine && bEqual )
+ {
+ bEqual = (aColor == pLine->GetColor());
+ pLine = (SvxFrameLine*)aList.Next();
+ }
+
+ if ( !bEqual )
+ aColor = aColBlack;
+
+ USHORT nSelPos = aLbLineColor.GetEntryPos( aColor );
+
+ if ( LISTBOX_ENTRY_NOTFOUND != nSelPos )
+ aLbLineColor.SelectEntryPos( nSelPos );
+ else
+ {
+ nSelPos = aLbLineColor.GetEntryPos( aColor );
+
+ if ( LISTBOX_ENTRY_NOTFOUND != nSelPos )
+ {
+ aLbLineColor.SelectEntryPos( nSelPos );
+ }
+ else
+ aLbLineColor.SelectEntryPos( aLbLineColor.InsertEntry(
+ aColor, SVX_RESSTR( RID_SVXSTR_COLOR_USER ) ) );
+ }
+ aLbLineStyle.SetColor( aColor );
+ if ( bEqual )
+ pFrameSel->SetCurLineColor( aColor );
+
+ // Linienstil --------------------------------------
+
+ pLine = (SvxFrameLine*)aList.First();
+ bEqual = TRUE;
+
+ while ( pLine && bEqual )
+ {
+ bEqual = EQSTYLE( pLine->GetStyle(), aStyle );
+ pLine = (SvxFrameLine*)aList.Next();
+ }
+
+ if ( bEqual )
+ {
+ aLbLineStyle.SelectEntry( aStyle.nLeft,
+ aStyle.nRight,
+ aStyle.nMiddle );
+ pFrameSel->SetCurLineStyle( aStyle );
+ }
+ else
+ {
+ SET_STYLE( aDefStyle, LINE_WIDTH0, 0, 0 );
+ aLbLineStyle.SelectEntry( LINE_WIDTH0 );
+ pFrameSel->SelectLine( SVX_FRMSELLINE_NONE );
+ pFrameSel->SetCurLineStyle( aDefStyle );
+ }
+ }
+ else
+ {
+ aLbLineColor.SelectEntry( aColBlack, TRUE );
+ aLbLineStyle.SetColor( aColBlack );
+ pFrameSel->SetCurLineColor( aColBlack );
+
+ SET_STYLE( aDefStyle, 0, 0, 0 );
+ aLbLineStyle.SelectEntryPos( 0 );
+ pFrameSel->SetCurLineStyle( aDefStyle );
+ pFrameSel->SelectLine( SVX_FRMSELLINE_NONE );
+ }
+ }
+
+ //----------
+ // Schatten:
+ //----------
+ if ( pShadowItem )
+ {
+ Color aColor( pShadowItem->GetColor() );
+ USHORT nSelPos = aLbShadowColor.GetEntryPos( aColor );
+
+ if ( LISTBOX_ENTRY_NOTFOUND != nSelPos )
+ aLbShadowColor.SelectEntryPos( nSelPos );
+ else
+ {
+ nSelPos = aLbShadowColor.GetEntryPos( aColor );
+
+ if ( LISTBOX_ENTRY_NOTFOUND != nSelPos )
+ {
+ aLbShadowColor.SelectEntryPos( nSelPos );
+ }
+ else
+ aLbShadowColor.SelectEntryPos(
+ aLbShadowColor.InsertEntry(
+ aColor, SVX_RESSTR( RID_SVXSTR_COLOR_USER ) ) );
+ }
+
+ pFrameSel->SetShadowColor( aColor );
+
+ // Shadow-Attribut auslesen
+ SetMetricValue( aEdShadowSize, pShadowItem->GetWidth(), eCoreUnit );
+ USHORT nItem = 1;
+ SvxFrameShadow ePos = SVX_FRMSHADOW_NONE;
+
+ switch ( pShadowItem->GetLocation() )
+ {
+ case SVX_SHADOW_NONE:
+ break;
+ case SVX_SHADOW_BOTTOMRIGHT:
+ nItem = 2;
+ ePos = SVX_FRMSHADOW_BOT_RIGHT;
+ break;
+ case SVX_SHADOW_TOPRIGHT:
+ nItem = 3;
+ ePos = SVX_FRMSHADOW_TOP_RIGHT;
+ break;
+ case SVX_SHADOW_BOTTOMLEFT:
+ nItem = 4;
+ ePos = SVX_FRMSHADOW_BOT_LEFT;
+ break;
+ case SVX_SHADOW_TOPLEFT:
+ nItem = 5;
+ ePos = SVX_FRMSHADOW_TOP_LEFT;
+ break;
+ }
+ aWndShadows.SelectItem( nItem );
+ pFrameSel->SetShadowPos( ePos );
+ }
+ else // Don't Care
+ {
+ // diese Bedingung erfordert noch eine geeignete
+ // Schatten-TriState-Darstellung
+ aWndShadows.SelectItem( 1 );
+ pFrameSel->SetShadowPos( SVX_FRMSHADOW_NONE );
+
+ Color aColor( aColBlack );
+ USHORT nSelPos = aLbShadowColor.GetEntryPos( aColor );
+
+ if ( LISTBOX_ENTRY_NOTFOUND != nSelPos )
+ aLbShadowColor.SelectEntryPos( nSelPos );
+ else
+ {
+ nSelPos = aLbShadowColor.GetEntryPos( aColor );
+
+ if ( LISTBOX_ENTRY_NOTFOUND != nSelPos )
+ {
+ aLbShadowColor.SelectEntryPos( nSelPos );
+ }
+ else
+ aLbShadowColor.SelectEntryPos(
+ aLbShadowColor.InsertEntry(
+ aColor, SVX_RESSTR( RID_SVXSTR_COLOR_USER ) ) );
+ }
+
+ pFrameSel->SetShadowColor( aColor );
+
+ // Default-Schattenbreite vom Pool abholen
+ SetMetricValue( aEdShadowSize,
+ ((const SvxShadowItem&)rSet.GetPool()->
+ GetDefaultItem( nWhichShadow )).GetWidth(),
+ eCoreUnit );
+ }
+
+ BOOL bEnable = aWndShadows.GetSelectItemId() > 1 ;
+ aFtShadowSize.Enable(bEnable);
+ aEdShadowSize.Enable(bEnable);
+
+ //---------------------------------
+ // Schatten im Selektor darstellen:
+ //---------------------------------
+ pFrameSel->ShowShadow();
+
+ aWndPresets.SetNoSelection();
+
+ // - keine Line - sollte nicht selektiert sein
+
+ if ( aLbLineStyle.GetSelectEntryPos() == 0 )
+ {
+ aLbLineStyle.SelectEntryPos( 1 );
+ SelStyleHdl_Impl( &aLbLineStyle );
+ }
+
+ const SfxPoolItem* pItem;
+ SfxObjectShell* pShell;
+ if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, FALSE, &pItem) ||
+ ( 0 != (pShell = SfxObjectShell::Current()) &&
+ 0 != (pItem = pShell->GetItem(SID_HTML_MODE))))
+ {
+ USHORT nHtmlMode = ((SfxUInt16Item*)pItem)->GetValue();
+ if(nHtmlMode & HTMLMODE_ON)
+ {
+ //Im Html-Mode gibt es keinen Schatten und nur komplette Umrandungen
+ aFtShadowPos .Enable(FALSE);
+ aWndShadows .Enable(FALSE);
+ aFtShadowSize .Enable(FALSE);
+ aEdShadowSize .Enable(FALSE);
+ aFtShadowColor.Enable(FALSE);
+ aLbShadowColor.Enable(FALSE);
+ aGbShadow .Enable(FALSE);
+
+ USHORT nLBCount = aLbLineStyle.GetEntryCount();
+ // ist es ein Absatzdialog, dann alle Linien fuer
+ // Sw-Export, sonst ist die Page nicht da
+ if(!bIsTableBorder && 0 == (nHtmlMode & HTMLMODE_FULL_ABS_POS) &&
+ SFX_ITEM_AVAILABLE > rSet.GetItemState(GetWhich( SID_ATTR_PARA_LINESPACE )))
+ {
+ for( USHORT i = nLBCount - 1; i > LINESTYLE_HTML_MAX; i--)
+ aLbLineStyle.RemoveEntry(i);
+ }
+
+ if(!bIsTableBorder)
+ {
+ aGbBorder .Enable(FALSE);
+ aWndFrameSel.Enable(FALSE);
+ aWndPresets.RemoveItem(3);
+ aWndPresets.RemoveItem(4);
+ aWndPresets.RemoveItem(5);
+ }
+ }
+ }
+}
+
+// -----------------------------------------------------------------------
+
+int SvxBorderTabPage::DeactivatePage( SfxItemSet* pSet )
+{
+ if ( pSet )
+ FillItemSet( *pSet );
+
+ return LEAVE_PAGE;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxBorderTabPage::SetCoreLine_Impl( const SvxFrameLine* pFrameLine,
+ SvxBorderLine*& rpCoreLine )
+{
+ if ( !pFrameLine )
+ rpCoreLine = NULL;
+ else if ( pFrameLine->GetState() == SVX_FRMLINESTATE_HIDE )
+ rpCoreLine = NULL;
+ else if ( pFrameLine->GetState() == SVX_FRMLINESTATE_SHOW )
+ {
+ const USHORT nOut = (USHORT)pFrameLine->GetStyle().nLeft;
+ const USHORT nDist = (USHORT)pFrameLine->GetStyle().nMiddle;
+ const USHORT nIn = (USHORT)pFrameLine->GetStyle().nRight;
+
+ if ( 0 == nOut && 0 == nDist && 0 == nIn )
+ rpCoreLine = NULL;
+ else
+ {
+ rpCoreLine->SetColor ( pFrameLine->GetColor() );
+ rpCoreLine->SetOutWidth ( nOut ? (nOut / 100) : 0 );
+ rpCoreLine->SetDistance ( nDist ? (nDist / 100) : 0 );
+ rpCoreLine->SetInWidth ( nDist ? (nIn / 100) : 0 );
+ }
+ }
+}
+
+// -----------------------------------------------------------------------
+
+#define IS_DONT_CARE(a) ((a).GetState() == SVX_FRMLINESTATE_DONT_CARE )
+
+BOOL SvxBorderTabPage::FillItemSet( SfxItemSet& rCoreAttrs )
+{
+ BOOL bAttrsChanged = FALSE;
+ BOOL bPut = TRUE;
+ USHORT nBoxWhich = GetWhich( SID_ATTR_BORDER_OUTER );
+ USHORT nBoxInfoWhich = GetWhich( SID_ATTR_BORDER_INNER );
+ USHORT nShadowWhich = GetWhich( SID_ATTR_BORDER_SHADOW );
+ const SfxItemSet& rOldSet = GetItemSet();
+ SvxBoxItem aBoxItem ( nBoxWhich );
+ SvxBoxInfoItem aBoxInfoItem ( nBoxInfoWhich );
+ SvxShadowItem aShadowItem ( nShadowWhich );
+ SvxBorderLine aCoreLine;
+ SvxBorderLine* pCoreLine;
+ SvxBoxItem* pOldBoxItem = (SvxBoxItem*)GetOldItem( rCoreAttrs, SID_ATTR_BORDER_OUTER );
+
+ SfxMapUnit eCoreUnit = rOldSet.GetPool()->GetMetric( nBoxWhich );
+ const SfxPoolItem* pOld = 0;
+
+ //------------------
+ // Umrandung aussen:
+ //------------------
+ pCoreLine = &aCoreLine;
+ SetCoreLine_Impl( &pFrameSel->GetLeft(), pCoreLine );
+ aBoxItem.SetLine( pCoreLine, BOX_LINE_LEFT );
+
+ pCoreLine = &aCoreLine;
+ SetCoreLine_Impl( &pFrameSel->GetRight(), pCoreLine );
+ aBoxItem.SetLine( pCoreLine, BOX_LINE_RIGHT );
+
+ pCoreLine = &aCoreLine;
+ SetCoreLine_Impl( &pFrameSel->GetTop(), pCoreLine );
+ aBoxItem.SetLine( pCoreLine, BOX_LINE_TOP );
+
+ pCoreLine = &aCoreLine;
+ SetCoreLine_Impl( &pFrameSel->GetBottom(), pCoreLine );
+ aBoxItem.SetLine( pCoreLine, BOX_LINE_BOTTOM );
+
+ //--------------------------------
+ // Umrandung hor/ver und TableFlag
+ //--------------------------------
+ pCoreLine = &aCoreLine;
+ SetCoreLine_Impl( &pFrameSel->GetHor(), pCoreLine );
+ aBoxInfoItem.SetLine( pCoreLine, BOXINFO_LINE_HORI );
+
+ pCoreLine = &aCoreLine;
+ SetCoreLine_Impl( &pFrameSel->GetVer(), pCoreLine );
+ aBoxInfoItem.SetLine( pCoreLine, BOXINFO_LINE_VERT );
+
+ aBoxInfoItem.SetTable( bIsTableBorder );
+
+ //-------------------
+ // Abstand nach Innen
+ //-------------------
+ if( pDistDlg )
+ {
+ aBoxInfoItem.SetDist( TRUE );
+
+ if ( ((bIsTableBorder || (nSWMode & SW_BORDER_MODE_TABLE)) &&
+ (pDistDlg->aLeftMF.IsModified()||pDistDlg->aRightMF.IsModified()||
+ pDistDlg->aTopMF.IsModified()||pDistDlg->aBottomMF.IsModified()) )||
+ pFrameSel->GetTop() .GetState() != SVX_FRMLINESTATE_HIDE
+ || pFrameSel->GetBottom().GetState() != SVX_FRMLINESTATE_HIDE
+ || pFrameSel->GetLeft() .GetState() != SVX_FRMLINESTATE_HIDE
+ || pFrameSel->GetRight() .GetState() != SVX_FRMLINESTATE_HIDE )
+ {
+ SvxBoxInfoItem* pOldBoxInfoItem = (SvxBoxInfoItem*)GetOldItem(
+ rCoreAttrs, SID_ATTR_BORDER_INNER );
+ if(!pOldBoxItem ||
+ pDistDlg->aLeftMF .GetText() != pDistDlg->aLeftMF .GetSavedValue() ||
+ pDistDlg->aRightMF .GetText() != pDistDlg->aRightMF .GetSavedValue() ||
+ pDistDlg->aTopMF .GetText() != pDistDlg->aTopMF .GetSavedValue() ||
+ pDistDlg->aBottomMF.GetText() != pDistDlg->aBottomMF.GetSavedValue() ||
+ nMinValue == pDistDlg->aLeftMF .GetValue() ||
+ nMinValue == pDistDlg->aRightMF .GetValue() ||
+ nMinValue == pDistDlg->aTopMF .GetValue() ||
+ nMinValue == pDistDlg->aBottomMF.GetValue() ||
+ pOldBoxInfoItem && !pOldBoxInfoItem->IsValid(VALID_DISTANCE))
+ {
+ aBoxItem.SetDistance(
+ (USHORT)GetCoreValue( pDistDlg->aLeftMF , eCoreUnit ), BOX_LINE_LEFT );
+ aBoxItem.SetDistance(
+ (USHORT)GetCoreValue( pDistDlg->aRightMF , eCoreUnit ), BOX_LINE_RIGHT );
+ aBoxItem.SetDistance(
+ (USHORT)GetCoreValue( pDistDlg->aTopMF , eCoreUnit ), BOX_LINE_TOP );
+ aBoxItem.SetDistance(
+ (USHORT)GetCoreValue( pDistDlg->aBottomMF , eCoreUnit ), BOX_LINE_BOTTOM);
+ }
+ else
+ {
+// aBoxItem.SetDistance(pOldBoxItem->GetDistance());
+ aBoxItem.SetDistance(pOldBoxItem->GetDistance(BOX_LINE_LEFT ), BOX_LINE_LEFT);
+ aBoxItem.SetDistance(pOldBoxItem->GetDistance(BOX_LINE_RIGHT), BOX_LINE_RIGHT);
+ aBoxItem.SetDistance(pOldBoxItem->GetDistance(BOX_LINE_TOP ), BOX_LINE_TOP);
+ aBoxItem.SetDistance(pOldBoxItem->GetDistance(BOX_LINE_BOTTOM), BOX_LINE_BOTTOM);
+ }
+ aBoxInfoItem.SetValid( VALID_DISTANCE, TRUE );
+ }
+ else
+ aBoxInfoItem.SetValid( VALID_DISTANCE, FALSE );
+ }
+
+ //------------------------------------------
+ // Don't Care Status im Info-Item vermerken:
+ //------------------------------------------
+ aBoxInfoItem.SetValid( VALID_TOP, !IS_DONT_CARE( pFrameSel->GetTop() ) );
+ aBoxInfoItem.SetValid( VALID_BOTTOM, !IS_DONT_CARE( pFrameSel->GetBottom() ) );
+ aBoxInfoItem.SetValid( VALID_LEFT, !IS_DONT_CARE( pFrameSel->GetLeft() ) );
+ aBoxInfoItem.SetValid( VALID_RIGHT, !IS_DONT_CARE( pFrameSel->GetRight() ) );
+ aBoxInfoItem.SetValid( VALID_HORI, !IS_DONT_CARE( pFrameSel->GetHor() ) );
+ aBoxInfoItem.SetValid( VALID_VERT, !IS_DONT_CARE( pFrameSel->GetVer() ) );
+
+ //
+ // Put oder Clear der Umrandung?
+ //
+ bPut = TRUE;
+
+ if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nBoxWhich, FALSE )
+ || SFX_ITEM_DEFAULT == rOldSet.GetItemState( nBoxInfoWhich, FALSE ) )
+ {
+ const SvxBoxInfoItem& rOldBoxInfo = (const SvxBoxInfoItem&)
+ rOldSet.Get(nBoxInfoWhich);
+
+ aBoxInfoItem.SetMinDist( rOldBoxInfo.IsMinDist() );
+ aBoxInfoItem.SetDefDist( rOldBoxInfo.GetDefDist() );
+ bPut =
+ ( (aBoxItem != (const SvxBoxItem&)(rOldSet.Get(nBoxWhich)))
+ || (aBoxInfoItem != rOldBoxInfo ) );
+ }
+
+ if ( bPut )
+ {
+ if ( !pOldBoxItem || !( *pOldBoxItem == aBoxItem ) )
+ {
+ rCoreAttrs.Put( aBoxItem );
+ bAttrsChanged |= TRUE;
+ }
+ pOld = GetOldItem( rCoreAttrs, SID_ATTR_BORDER_INNER );
+
+ if ( !pOld || !( *(const SvxBoxInfoItem*)pOld == aBoxInfoItem ) )
+ {
+ rCoreAttrs.Put( aBoxInfoItem );
+ bAttrsChanged |= TRUE;
+ }
+ }
+ else
+ {
+ rCoreAttrs.ClearItem( nBoxWhich );
+ rCoreAttrs.ClearItem( nBoxInfoWhich );
+ }
+
+ //---------
+ // Schatten
+ //---------
+ aShadowItem.SetColor( TpBorderRGBColor( pFrameSel->GetShadowColor() ) );
+ aShadowItem.SetWidth( (USHORT)GetCoreValue( aEdShadowSize, eCoreUnit ) );
+ SvxShadowLocation eLoc = SVX_SHADOW_NONE;
+
+ switch ( pFrameSel->GetShadowPos() )
+ {
+ case SVX_FRMSHADOW_BOT_RIGHT:
+ eLoc = SVX_SHADOW_BOTTOMRIGHT;
+ break;
+
+ case SVX_FRMSHADOW_TOP_RIGHT:
+ eLoc = SVX_SHADOW_TOPRIGHT;
+ break;
+
+ case SVX_FRMSHADOW_BOT_LEFT:
+ eLoc = SVX_SHADOW_BOTTOMLEFT;
+ break;
+
+ case SVX_FRMSHADOW_TOP_LEFT:
+ eLoc = SVX_SHADOW_TOPLEFT;
+ break;
+ }
+ aShadowItem.SetLocation( eLoc );
+
+ //
+ // Put oder Clear des Schattens?
+ //
+ bPut = TRUE;
+
+ if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nShadowWhich, FALSE ) )
+ {
+ const SvxShadowItem& rOldShadowItem
+ = (const SvxShadowItem&)(rOldSet.Get( nShadowWhich ));
+
+ // der Vergleich von Brushes haut nicht hin, deshalb einzeln:
+ if ( ( aShadowItem.GetWidth() == rOldShadowItem.GetWidth() )
+ && ( aShadowItem.GetLocation() == rOldShadowItem.GetLocation() ) )
+ {
+ Color aCol = aShadowItem.GetColor();
+ Color aOldCol = rOldShadowItem.GetColor();
+ bPut = ( aCol.GetRed() != aOldCol.GetRed()
+ || aCol.GetGreen() != aOldCol.GetGreen()
+ || aCol.GetBlue() != aOldCol.GetBlue() );
+ }
+ }
+
+ if ( bPut )
+ {
+ if ( aShadowItem.GetLocation() == SVX_SHADOW_NONE )
+ {
+ // wenn kein Schatten ausgewaehlt wurde, wird das
+ // Default-Item genommen:
+ const SfxItemPool* pPool = rCoreAttrs.GetPool();
+
+ if ( pPool->IsInRange( nShadowWhich ) )
+ aShadowItem =
+ (const SvxShadowItem&)pPool->GetDefaultItem( nShadowWhich );
+ }
+ pOld = GetOldItem( rCoreAttrs, SID_ATTR_BORDER_SHADOW );
+
+ if ( !pOld || !( *(const SvxShadowItem*)pOld == aShadowItem ) )
+ {
+ rCoreAttrs.Put( aShadowItem );
+ bAttrsChanged |= TRUE;
+ }
+ }
+ else
+ rCoreAttrs.ClearItem( nShadowWhich );
+ return bAttrsChanged;
+}
+
+#undef IS_DONT_CARE
+
+// -----------------------------------------------------------------------
+
+void SvxBorderTabPage::HideShadowControls()
+{
+ aFtShadowPos.Hide();
+ aWndShadows.Hide();
+ aFtShadowSize.Hide();
+ aEdShadowSize.Hide();
+ aFtShadowColor.Hide();
+ aLbShadowColor.Hide();
+ aGbShadow.Hide();
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxBorderTabPage, SelPreHdl_Impl, void *, EMPTYARG )
+{
+ USHORT nSelId = aWndPresets.GetSelectItemId();
+ SvxLineStruct theNewStyle;
+
+ if ( nSelId > 1 )
+ if ( aLbLineStyle.GetSelectEntryPos() == 0
+ || aLbLineStyle.GetSelectEntryPos() == LISTBOX_ENTRY_NOTFOUND )
+ aLbLineStyle.SelectEntryPos( 1 );
+
+ theNewStyle.nLeft = (short)aLbLineStyle.GetSelectEntryLine1();
+ theNewStyle.nMiddle = (short)aLbLineStyle.GetSelectEntryDistance();
+ theNewStyle.nRight = (short)aLbLineStyle.GetSelectEntryLine2();
+
+ switch ( nSelId )
+ {
+ case 1: // keine Linien
+ {
+ pFrameSel->ShowShadow();
+ pFrameSel->HideLines();
+ pFrameSel->SelectLine( SVX_FRMSELLINE_NONE );
+ }
+ break;
+
+ case 2: // aussen
+ {
+
+ pFrameSel->HideLines();
+ pFrameSel->GetLeft() .SetState( SVX_FRMLINESTATE_SHOW );
+ pFrameSel->GetRight() .SetState( SVX_FRMLINESTATE_SHOW );
+ pFrameSel->GetTop() .SetState( SVX_FRMLINESTATE_SHOW );
+ pFrameSel->GetBottom().SetState( SVX_FRMLINESTATE_SHOW );
+ pFrameSel->SelectLine( SVX_FRMSELLINE_NONE );
+ pFrameSel->SelectLine( SVX_FRMSELLINE_LEFT );
+ pFrameSel->SelectLine( SVX_FRMSELLINE_RIGHT );
+ pFrameSel->SelectLine( SVX_FRMSELLINE_TOP );
+ pFrameSel->SelectLine( SVX_FRMSELLINE_BOTTOM );
+ }
+ break;
+
+ case 3:
+ {
+ if ( bIsTableBorder ) // aussen/horizontal
+ {
+ pFrameSel->HideLines();
+ pFrameSel->GetLeft() .SetState( SVX_FRMLINESTATE_SHOW );
+ pFrameSel->GetRight() .SetState( SVX_FRMLINESTATE_SHOW );
+ pFrameSel->GetTop() .SetState( SVX_FRMLINESTATE_SHOW );
+ pFrameSel->GetBottom().SetState( SVX_FRMLINESTATE_SHOW );
+ pFrameSel->GetHor() .SetState( SVX_FRMLINESTATE_SHOW );
+ pFrameSel->SelectLine( SVX_FRMSELLINE_NONE );
+ pFrameSel->SelectLine( SVX_FRMSELLINE_LEFT );
+ pFrameSel->SelectLine( SVX_FRMSELLINE_RIGHT );
+ pFrameSel->SelectLine( SVX_FRMSELLINE_TOP );
+ pFrameSel->SelectLine( SVX_FRMSELLINE_BOTTOM );
+ pFrameSel->SelectLine( SVX_FRMSELLINE_HOR );
+ }
+ else // links/rechts
+ {
+ pFrameSel->HideLines();
+ pFrameSel->GetLeft() .SetState( SVX_FRMLINESTATE_SHOW );
+ pFrameSel->GetRight().SetState( SVX_FRMLINESTATE_SHOW );
+ pFrameSel->SelectLine( SVX_FRMSELLINE_NONE );
+ pFrameSel->SelectLine( SVX_FRMSELLINE_LEFT );
+ pFrameSel->SelectLine( SVX_FRMSELLINE_RIGHT );
+ }
+ }
+ break;
+
+ case 4:
+ {
+ if ( bIsTableBorder ) // aussen/hor./ver.
+ {
+ pFrameSel->HideLines();
+ pFrameSel->GetLeft() .SetState( SVX_FRMLINESTATE_SHOW );
+ pFrameSel->GetRight() .SetState( SVX_FRMLINESTATE_SHOW );
+ pFrameSel->GetTop() .SetState( SVX_FRMLINESTATE_SHOW );
+ pFrameSel->GetBottom().SetState( SVX_FRMLINESTATE_SHOW );
+ pFrameSel->GetHor() .SetState( SVX_FRMLINESTATE_SHOW );
+ pFrameSel->GetVer() .SetState( SVX_FRMLINESTATE_SHOW );
+ pFrameSel->SelectLine( SVX_FRMSELLINE_NONE );
+ pFrameSel->SelectLine( SVX_FRMSELLINE_LEFT );
+ pFrameSel->SelectLine( SVX_FRMSELLINE_RIGHT );
+ pFrameSel->SelectLine( SVX_FRMSELLINE_TOP );
+ pFrameSel->SelectLine( SVX_FRMSELLINE_BOTTOM );
+ pFrameSel->SelectLine( SVX_FRMSELLINE_HOR );
+ pFrameSel->SelectLine( SVX_FRMSELLINE_VER );
+ }
+ else // oben/unten
+ {
+ pFrameSel->HideLines();
+ pFrameSel->GetTop() .SetState( SVX_FRMLINESTATE_SHOW );
+ pFrameSel->GetBottom().SetState( SVX_FRMLINESTATE_SHOW );
+ pFrameSel->SelectLine( SVX_FRMSELLINE_NONE );
+ pFrameSel->SelectLine( SVX_FRMSELLINE_TOP );
+ pFrameSel->SelectLine( SVX_FRMSELLINE_BOTTOM );
+ }
+ }
+ break;
+
+ case 5:
+ {
+ if ( bIsTableBorder ) // Aussen setzen, innen Don't Care
+ {
+ pFrameSel->HideLines();
+ pFrameSel->GetLeft() .SetState( SVX_FRMLINESTATE_SHOW );
+ pFrameSel->GetRight() .SetState( SVX_FRMLINESTATE_SHOW );
+ pFrameSel->GetTop() .SetState( SVX_FRMLINESTATE_SHOW );
+ pFrameSel->GetBottom().SetState( SVX_FRMLINESTATE_SHOW );
+ pFrameSel->GetHor() .SetState( SVX_FRMLINESTATE_DONT_CARE );
+ pFrameSel->GetVer() .SetState( SVX_FRMLINESTATE_DONT_CARE );
+ pFrameSel->SelectLine( SVX_FRMSELLINE_NONE );
+ pFrameSel->SelectLine( SVX_FRMSELLINE_LEFT );
+ pFrameSel->SelectLine( SVX_FRMSELLINE_RIGHT );
+ pFrameSel->SelectLine( SVX_FRMSELLINE_TOP );
+ pFrameSel->SelectLine( SVX_FRMSELLINE_BOTTOM );
+ }
+ else // links (Absatz-Markierung)
+ {
+ pFrameSel->HideLines();
+ pFrameSel->GetLeft().SetState( SVX_FRMLINESTATE_SHOW );
+ pFrameSel->SelectLine( SVX_FRMSELLINE_NONE );
+ pFrameSel->SelectLine( SVX_FRMSELLINE_LEFT );
+ }
+ }
+ break;
+ }
+
+ pFrameSel->SetCurLineStyle( theNewStyle );
+ pFrameSel->SetCurLineColor( aLbLineColor.GetSelectEntryColor() );
+ pFrameSel->SetShadowColor( aLbShadowColor.GetSelectEntryColor() );
+ pFrameSel->ShowLines();
+ pFrameSel->ShowShadow();
+ aWndPresets.SetNoSelection(); // Nur Auswahl, kein Status
+ LinesChanged_Impl(0);
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxBorderTabPage, SelSdwHdl_Impl, void *, EMPTYARG )
+{
+ BOOL bEnable = aWndShadows.GetSelectItemId() > 1;
+ aFtShadowSize.Enable(bEnable);
+ aEdShadowSize.Enable(bEnable);
+
+ SvxFrameShadow ePos = SVX_FRMSHADOW_NONE; // case 1
+
+ switch ( aWndShadows.GetSelectItemId() )
+ {
+ case 2: ePos = SVX_FRMSHADOW_BOT_RIGHT; break;
+ case 3: ePos = SVX_FRMSHADOW_TOP_RIGHT; break;
+ case 4: ePos = SVX_FRMSHADOW_BOT_LEFT; break;
+ case 5: ePos = SVX_FRMSHADOW_TOP_LEFT; break;
+ }
+ pFrameSel->SetShadowPos( ePos );
+ pFrameSel->ShowShadow();
+
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxBorderTabPage, SelColHdl_Impl, ListBox *, pLb )
+{
+ ColorListBox* pColLb = (ColorListBox*)pLb;
+
+ if ( pLb == &aLbLineColor )
+ {
+ pFrameSel->SetCurLineColor( pColLb->GetSelectEntryColor() );
+ aLbLineStyle.SetColor( pColLb->GetSelectEntryColor() );
+ pFrameSel->ShowLines();
+ }
+ else if ( pLb == &aLbShadowColor )
+ {
+ pFrameSel->SetShadowColor( pColLb->GetSelectEntryColor() );
+ pFrameSel->ShowShadow();
+ }
+
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxBorderTabPage, SelStyleHdl_Impl, ListBox *, pLb )
+{
+ if ( pLb == &aLbLineStyle )
+ {
+ SvxLineStruct theNewStyle;
+
+ theNewStyle.nLeft = (short)aLbLineStyle.GetSelectEntryLine1();
+ theNewStyle.nMiddle = (short)aLbLineStyle.GetSelectEntryDistance();
+ theNewStyle.nRight = (short)aLbLineStyle.GetSelectEntryLine2();
+
+ pFrameSel->SetCurLineStyle( theNewStyle );
+ pFrameSel->ShowLines();
+ }
+
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxBorderTabPage::FillValueSets_Impl()
+{
+ ImageList aIlPre( ResId( IL_PRE_BITMAPS ) );
+ ImageList aIlSdw( ResId( IL_SDW_BITMAPS ) );
+ Size aItemSize = aIlPre.GetImage(IID_PRENONE).GetSizePixel();
+ Size aGbSize( aGbPresets.GetSizePixel() );
+ Size aSize;
+ long nXpos = aGbPresets.GetPosPixel().X();
+ long nYpos = aGbPresets.GetPosPixel().Y();
+
+ // Presets:
+ aGbSize.Height() -= 12;
+ aWndPresets.SetColCount( 5 );
+ aWndPresets.SetStyle( aWndPresets.GetStyle() | WB_ITEMBORDER | WB_DOUBLEBORDER );
+
+ aSize = aWndPresets.CalcWindowSizePixel( aItemSize );
+
+ nXpos += ( aGbSize.Width() > aSize.Width()+4 )
+ ? ((aGbSize.Width()-aSize.Width())/2)
+ : 2;
+
+ nYpos += ( aGbSize.Height() > aSize.Height()+4 )
+ ? ((aGbSize.Height()-aSize.Height())/2)
+ : 2;
+
+ aWndPresets.SetPosSizePixel( Point( nXpos, nYpos+12 ), aSize );
+
+ aWndPresets.InsertItem( 1, aIlPre.GetImage(IID_PRENONE) );
+ if ( bIsTableBorder )
+ {
+ aWndPresets.InsertItem( 2, aIlPre.GetImage(IID_TABLE_PRE1) );
+ aWndPresets.InsertItem( 3, aIlPre.GetImage(IID_TABLE_PRE2) );
+ aWndPresets.InsertItem( 4, aIlPre.GetImage(IID_TABLE_PRE3) );
+ aWndPresets.InsertItem( 5, aIlPre.GetImage(IID_TABLE_PRE4) );
+ }
+ else
+ {
+ aWndPresets.InsertItem( 2, aIlPre.GetImage(IID_PARAGRAPH_PRE1) );
+ aWndPresets.InsertItem( 3, aIlPre.GetImage(IID_PARAGRAPH_PRE2) );
+ aWndPresets.InsertItem( 4, aIlPre.GetImage(IID_PARAGRAPH_PRE3) );
+ aWndPresets.InsertItem( 5, aIlPre.GetImage(IID_PARAGRAPH_PRE4) );
+ }
+ aWndPresets.SetNoSelection();
+ aWndPresets.Show();
+
+ // Schatten: ---------------------------------------------------------
+
+ aWndShadows.SetColCount( 5 );
+ aWndShadows.SetStyle( aWndShadows.GetStyle() | WB_ITEMBORDER | WB_DOUBLEBORDER );
+ aSize = aWndShadows.CalcWindowSizePixel( aItemSize );
+ nXpos = aFtShadowPos.GetPosPixel().X();
+ nYpos = aFtShadowPos.GetPosPixel().Y() + aFtShadowPos.GetSizePixel().Height() + 3;
+ aWndShadows.SetPosSizePixel( Point( nXpos, nYpos ), aSize );
+ aWndShadows.SetColCount( 5 );
+ aWndShadows.InsertItem( 1, aIlSdw.GetImage(IID_SHADOWNONE) );
+ aWndShadows.InsertItem( 2, aIlSdw.GetImage(IID_SHADOW_BOT_RIGHT) );
+ aWndShadows.InsertItem( 3, aIlSdw.GetImage(IID_SHADOW_TOP_RIGHT) );
+ aWndShadows.InsertItem( 4, aIlSdw.GetImage(IID_SHADOW_BOT_LEFT) );
+ aWndShadows.InsertItem( 5, aIlSdw.GetImage(IID_SHADOW_TOP_LEFT) );
+ aWndShadows.SelectItem( 1 );
+ aWndShadows.Show();
+}
+
+// -----------------------------------------------------------------------
+
+void SvxBorderTabPage::FillLineListBox_Impl()
+{
+ aLbLineStyle.SetUnit( FUNIT_POINT );
+ aLbLineStyle.SetSourceUnit( FUNIT_TWIP );
+
+ // Writer 2.0 Defaults:
+ aLbLineStyle.InsertEntry( SVX_RESSTR( STR_NONE ) );
+
+ aLbLineStyle.InsertEntry( LINE_WIDTH0 );
+ aLbLineStyle.InsertEntry( LINE_WIDTH1 );
+ aLbLineStyle.InsertEntry( LINE_WIDTH2 );
+ aLbLineStyle.InsertEntry( LINE_WIDTH3 );
+ aLbLineStyle.InsertEntry( LINE_WIDTH4 );
+
+ // OS: wenn hier neue Linienstaerken zugfuegt werden, dann
+ // LINESTYLE_HTML_MAX anpassen
+
+ aLbLineStyle.InsertEntry( DLINE0_OUT, DLINE0_IN, DLINE0_DIST );
+ aLbLineStyle.InsertEntry( DLINE7_OUT, DLINE7_IN, DLINE7_DIST );
+ aLbLineStyle.InsertEntry( DLINE1_OUT, DLINE1_IN, DLINE1_DIST );
+ aLbLineStyle.InsertEntry( DLINE2_OUT, DLINE2_IN, DLINE2_DIST );
+ aLbLineStyle.InsertEntry( DLINE8_OUT, DLINE8_IN, DLINE8_DIST );
+ aLbLineStyle.InsertEntry( DLINE9_OUT, DLINE9_IN, DLINE9_DIST );
+ aLbLineStyle.InsertEntry( DLINE10_OUT,DLINE10_IN,DLINE10_DIST);
+ aLbLineStyle.InsertEntry( DLINE3_OUT, DLINE3_IN, DLINE3_DIST );
+ aLbLineStyle.InsertEntry( DLINE4_OUT, DLINE4_IN, DLINE4_DIST );
+ aLbLineStyle.InsertEntry( DLINE5_OUT, DLINE5_IN, DLINE5_DIST );
+ aLbLineStyle.InsertEntry( DLINE6_OUT, DLINE6_IN, DLINE6_DIST );
+}
+
+// -----------------------------------------------------------------------
+IMPL_LINK( SvxBorderTabPage, LinesChanged_Impl, void*, EMPTYARG )
+{
+ if(pDistDlg)
+ {
+ BOOL bLineSet = pFrameSel->IsAnyLineSet();
+ BOOL bMinAllowed = nSWMode & SW_BORDER_MODE_FRAME;
+ BOOL bSpaceModified = pDistDlg->aLeftMF .IsModified()||
+ pDistDlg->aRightMF .IsModified()||
+ pDistDlg->aTopMF .IsModified()||
+ pDistDlg->aBottomMF.IsModified();
+
+ if(bLineSet)
+ {
+ if(bMinAllowed)
+ {
+ if(!bSpaceModified)
+ {
+ pDistDlg->aLeftMF .SetValue(nMinValue);
+ pDistDlg->aRightMF .SetValue(nMinValue);
+ pDistDlg->aTopMF .SetValue(nMinValue);
+ pDistDlg->aBottomMF.SetValue(nMinValue);
+ }
+ }
+ else
+ {
+ pDistDlg->aLeftMF .SetMin(nMinValue);
+ pDistDlg->aRightMF .SetMin(nMinValue);
+ pDistDlg->aTopMF .SetMin(nMinValue);
+ pDistDlg->aBottomMF.SetMin(nMinValue);
+ pDistDlg->aLeftMF .SetFirst(nMinValue);
+ pDistDlg->aRightMF .SetFirst(nMinValue);
+ pDistDlg->aTopMF .SetFirst(nMinValue);
+ pDistDlg->aBottomMF.SetFirst(nMinValue);
+ }
+ }
+ else
+ {
+ pDistDlg->aLeftMF .SetMin(0);
+ pDistDlg->aRightMF .SetMin(0);
+ pDistDlg->aTopMF .SetMin(0);
+ pDistDlg->aBottomMF.SetMin(0);
+ pDistDlg->aLeftMF .SetFirst(0);
+ pDistDlg->aRightMF .SetFirst(0);
+ pDistDlg->aTopMF .SetFirst(0);
+ pDistDlg->aBottomMF.SetFirst(0);
+ if(!bSpaceModified)
+ {
+ pDistDlg->aLeftMF .SetValue(0);
+ pDistDlg->aRightMF .SetValue(0);
+ pDistDlg->aTopMF .SetValue(0);
+ pDistDlg->aBottomMF.SetValue(0);
+ }
+ }
+ //fuer Tabellen ist alles erlaubt
+ USHORT nValid = VALID_TOP|VALID_BOTTOM|VALID_LEFT|VALID_RIGHT;
+ //fuer Rahmen und Absatz wird das Edit disabled, wenn keine Border gesetzt ist
+ if(nSWMode & (SW_BORDER_MODE_FRAME|SW_BORDER_MODE_PARA))
+ {
+ aDistancePB.Enable(bLineSet);
+ nValid = pFrameSel->GetTop().GetState() == SVX_FRMLINESTATE_SHOW ? VALID_TOP : 0;
+ nValid |= pFrameSel->GetBottom().GetState() == SVX_FRMLINESTATE_SHOW ? VALID_BOTTOM : 0;
+ nValid |= pFrameSel->GetLeft().GetState() == SVX_FRMLINESTATE_SHOW ? VALID_LEFT : 0;
+ nValid |= pFrameSel->GetRight().GetState() == SVX_FRMLINESTATE_SHOW ? VALID_RIGHT : 0;
+ }
+ pDistDlg->SetValid(nValid);
+ }
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxBorderTabPage, DistanceHdl_Impl, PushButton*, pBtn )
+{
+ pDistDlg->Execute();
+ return 0;
+}
+// -----------------------------------------------------------------------
+
+void SvxBorderTabPage::SetSWMode(BYTE nSet)
+{
+//#define SW_BORDER_MODE_PARA 0x01
+//#define SW_BORDER_MODE_TABLE 0x02
+//#define SW_BORDER_MODE_FRAME 0x04
+ nSWMode = nSet;
+}
+
+#undef EQSTYLE
+#undef SET_STYLE
+
+
diff --git a/svx/source/dialog/border.hrc b/svx/source/dialog/border.hrc
new file mode 100644
index 000000000000..b040acd359e8
--- /dev/null
+++ b/svx/source/dialog/border.hrc
@@ -0,0 +1,126 @@
+/*************************************************************************
+ *
+ * $RCSfile: border.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:07 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SVX_BORDER_HRC
+#define _SVX_BORDER_HRC
+
+// defines ------------------------------------------------------------------
+
+#define WIN_PRESETS 10
+#define GB_PRESETS 20
+
+#define WIN_FRAMESEL 30
+#define FT_XSPACE 31
+#define ED_XSPACE 32
+#define GB_BORDER 33
+
+#define FT_LINESTYLE 40
+#define LB_LINESTYLE 41
+#define FT_LINECOLOR 42
+#define LB_LINECOLOR 43
+#define GB_LINE 44
+
+#define FT_SHADOWPOS 50
+#define WIN_SHADOWS 51
+#define FT_SHADOWSIZE 57
+#define ED_SHADOWSIZE 58
+#define FT_SHADOWCOLOR 59
+#define LB_SHADOWCOLOR 60
+#define GB_SHADOW 61
+#define PB_DISTANCE 62
+#define DLG_DISTANCE 63
+#define GB_DISTANCE 64
+#define FT_LEFT 65
+#define MF_LEFT 66
+#define FT_RIGHT 67
+#define MF_RIGHT 68
+#define FT_TOP 69
+#define MF_TOP 70
+#define FT_BOTTOM 71
+#define MF_BOTTOM 72
+#define PB_OK 73
+#define PB_CANCEL 74
+#define PB_HELP 75
+#define CB_SYNC 76
+#define WIN_EXAMPLE 77
+
+// ImageListe fuer ValueSets:
+#define IL_PRE_BITMAPS 1
+#define IID_PRENONE 1
+#define IID_TABLE_PRE1 2
+#define IID_TABLE_PRE2 3
+#define IID_TABLE_PRE3 4
+#define IID_TABLE_PRE4 5
+#define IID_PARAGRAPH_PRE1 6
+#define IID_PARAGRAPH_PRE2 7
+#define IID_PARAGRAPH_PRE3 8
+#define IID_PARAGRAPH_PRE4 9
+
+#define IL_SDW_BITMAPS 2
+#define IID_SHADOWNONE 1
+#define IID_SHADOW_BOT_RIGHT 2
+#define IID_SHADOW_BOT_LEFT 3
+#define IID_SHADOW_TOP_RIGHT 4
+#define IID_SHADOW_TOP_LEFT 5
+
+
+
+#endif
+
diff --git a/svx/source/dialog/border.src b/svx/source/dialog/border.src
new file mode 100644
index 000000000000..ce9dd8747eb0
--- /dev/null
+++ b/svx/source/dialog/border.src
@@ -0,0 +1,738 @@
+/*************************************************************************
+ *
+ * $RCSfile: border.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:07 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+ // include ---------------------------------------------------------------
+#include "helpid.hrc"
+#include "dialogs.hrc"
+#include "border.hrc"
+ // pragma ----------------------------------------------------------------
+
+ // define ---------------------------------------------------------------
+#define STD_MASKCOLOR Color { Red=0xC000; Green=0xC000; Blue=0xC000; }
+ // RID_SVXPAGE_BORDER ---------------------------------------------------
+TabPage RID_SVXPAGE_BORDER
+{
+ Helpid = HID_BORDER ;
+ Hide = TRUE ;
+ Text = "Umrandung" ;
+ Text [ English ] = "Border" ;
+ Text [ norwegian ] = "Border" ;
+ Text [ italian ] = "Bordo" ;
+ Text [ portuguese_brazilian ] = "Borda" ;
+ Text [ portuguese ] = "Contornos" ;
+ Text [ finnish ] = "Reunaviiva" ;
+ Text [ danish ] = "Ramme" ;
+ Text [ french ] = "Bordure" ;
+ Text [ swedish ] = "Inramning" ;
+ Text [ dutch ] = "Omranding" ;
+ Text [ spanish ] = "Borde" ;
+ Text [ english_us ] = "Borders" ;
+ Size = MAP_APPFONT ( 260 , 135 ) ;
+ Control WIN_PRESETS
+ {
+ HelpId = HID_BORDER_CTL_PRESETS ;
+ Hide = TRUE ;
+ Pos = MAP_APPFONT ( 17 , 12 ) ;
+ Size = MAP_APPFONT ( 63 , 15 ) ;
+ TabStop = TRUE ;
+ };
+ GroupBox GB_PRESETS
+ {
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 86 , 30 ) ;
+ Text = "Vorgaben" ;
+ Text [ ENGLISH ] = "Presets" ;
+ Text [ norwegian ] = "Presets" ;
+ Text [ italian ] = "Predefiniti" ;
+ Text [ portuguese_brazilian ] = "Predefine" ;
+ Text [ portuguese ] = "Predefinies" ;
+ Text [ finnish ] = "Mritykset" ;
+ Text [ danish ] = "Forudindstillinger" ;
+ Text [ french ] = "Valeurs prdfinies" ;
+ Text [ swedish ] = "Frinstllningar" ;
+ Text [ dutch ] = "Standaard" ;
+ Text [ spanish ] = "Predeterminados" ;
+ Text [ english_us ] = "Presets" ;
+ Text[ chinese_simplified ] = "Ԥ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Ustawienia domylne";
+ Text[ japanese ] = "ؾ";
+ Text[ chinese_traditional ] = "wm";
+ Text[ arabic ] = " ";
+ Text[ greek ] = "";
+ Text[ korean ] = "⺻ ";
+ Text[ turkish ] = "nayarlar";
+ Text[ language_user1 ] = " ";
+ };
+ Window WIN_FRAMESEL
+ {
+ Pos = MAP_APPFONT ( 12 , 44 ) ;
+ Size = MAP_APPFONT ( 74 , 55 ) ;
+ };
+ PushButton PB_DISTANCE
+ {
+ Pos = MAP_APPFONT ( 24 , 112 ) ;
+ Size = MAP_APPFONT ( 50 , 12 ) ;
+ Hide = TRUE;
+ Text = "~Abstnde" ;
+ Text [ ENGLISH ] = "Distances" ;
+ Text[ english_us ] = "Sp~acing";
+ Text[ portuguese ] = "E~spaamento";
+ Text[ russian ] = "";
+ Text[ greek ] = "A";
+ Text[ dutch ] = "~Afstanden";
+ Text[ french ] = "~carts";
+ Text[ spanish ] = "E~spacios";
+ Text[ italian ] = "Dis~tanze";
+ Text[ danish ] = "Afstand";
+ Text[ swedish ] = "Avstnd";
+ Text[ polish ] = "~Odstpy";
+ Text[ portuguese_brazilian ] = "Distances";
+ Text[ japanese ] = "Ԋu";
+ Text[ korean ] = "(~A)";
+ Text[ chinese_simplified ] = "";
+ Text[ chinese_traditional ] = "j";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "~Aralklar";
+ Text[ language_user1 ] = " ";
+ };
+ ModalDialog DLG_DISTANCE
+ {
+ Helpid = HID_BORDER_DISTANCE_DLG;
+ OutputSize = TRUE ;
+ SvLook = TRUE ;
+ Size = MAP_APPFONT ( 225 , 96 ) ;
+ Text = "Abstnde" ;
+ Text [ ENGLISH ] = "Distances" ;
+ Moveable = TRUE ;
+ FixedText FT_LEFT
+ {
+ Pos = MAP_APPFONT ( 12 , 15 ) ;
+ Size = MAP_APPFONT ( 38 , 10 ) ;
+ Text = "~Links" ;
+ Text [ ENGLISH ] = "Left" ;
+ Text[ english_us ] = "~Left";
+ Text[ portuguese ] = "Esque~rda";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "~Links";
+ Text[ french ] = " ~gauche";
+ Text[ spanish ] = "~Izquierda";
+ Text[ italian ] = "~Sinistra";
+ Text[ danish ] = "Venstre";
+ Text[ swedish ] = "~Vnster";
+ Text[ polish ] = "Z lewej";
+ Text[ portuguese_brazilian ] = "Left";
+ Text[ japanese ] = "(~L)";
+ Text[ korean ] = "(~L)";
+ Text[ chinese_simplified ] = "(~L)";
+ Text[ chinese_traditional ] = "(~L)";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "~Sol";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField MF_LEFT
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 53 , 15 ) ;
+ Size = MAP_APPFONT ( 40 , 12 ) ;
+ Spin = TRUE ;
+ Repeat = TRUE ;
+ SpinSize = 10 ;
+ First = 100 ;
+ Last = 5000 ;
+ Maximum = 5000 ;
+ Minimum = 0 ;
+ DecimalDigits = 2 ;
+ Unit = FUNIT_MM ;
+ };
+ FixedText FT_RIGHT
+ {
+ Pos = MAP_APPFONT ( 12 , 30 ) ;
+ Size = MAP_APPFONT ( 38 , 10 ) ;
+ Text = "R~echts" ;
+ Text [ ENGLISH ] = "Right" ;
+ Text[ english_us ] = "Right";
+ Text[ portuguese ] = "~Direita";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "~Rechts";
+ Text[ french ] = " ~droite";
+ Text[ spanish ] = "~Derecha";
+ Text[ italian ] = "~Destra";
+ Text[ danish ] = "Hjre";
+ Text[ swedish ] = "Hg~er";
+ Text[ polish ] = "Z prawej";
+ Text[ portuguese_brazilian ] = "Right";
+ Text[ japanese ] = "E";
+ Text[ korean ] = "";
+ Text[ chinese_simplified ] = "";
+ Text[ chinese_traditional ] = "k";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "S~a";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField MF_RIGHT
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 53 , 30 ) ;
+ Size = MAP_APPFONT ( 40 , 12 ) ;
+ Spin = TRUE ;
+ Repeat = TRUE ;
+ SpinSize = 10 ;
+ First = 100 ;
+ Last = 5000 ;
+ Maximum = 5000 ;
+ Minimum = 0 ;
+ DecimalDigits = 2 ;
+ Unit = FUNIT_MM ;
+ };
+ FixedText FT_TOP
+ {
+ Pos = MAP_APPFONT ( 12 , 45 ) ;
+ Size = MAP_APPFONT ( 38 , 10 ) ;
+ Text = "~Oben" ;
+ Text [ ENGLISH ] = "Top" ;
+ Text[ english_us ] = "~Top";
+ Text[ portuguese ] = "Em ~cima";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "~Boven";
+ Text[ french ] = "En ~haut";
+ Text[ spanish ] = "~Arriba";
+ Text[ italian ] = "~Alto";
+ Text[ danish ] = "Top";
+ Text[ swedish ] = "~Uppe";
+ Text[ polish ] = "W grze";
+ Text[ portuguese_brazilian ] = "Top";
+ Text[ japanese ] = "(~T)";
+ Text[ korean ] = "(~T)";
+ Text[ chinese_simplified ] = "(~T)";
+ Text[ chinese_traditional ] = "W(~T)";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "~st";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField MF_TOP
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 53 , 45 ) ;
+ Size = MAP_APPFONT ( 40 , 12 ) ;
+ Spin = TRUE ;
+ Repeat = TRUE ;
+ SpinSize = 10 ;
+ First = 100 ;
+ Last = 5000 ;
+ Maximum = 5000 ;
+ Minimum = 0 ;
+ DecimalDigits = 2 ;
+ Unit = FUNIT_MM ;
+ };
+ FixedText FT_BOTTOM
+ {
+ Pos = MAP_APPFONT ( 12 , 60 ) ;
+ Size = MAP_APPFONT ( 38 , 10 ) ;
+ Text = "~Unten" ;
+ Text [ ENGLISH ] = "Bottom" ;
+ Text[ english_us ] = "~Bottom";
+ Text[ portuguese ] = "Em ~baixo";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "Be~neden";
+ Text[ french ] = "En ~bas";
+ Text[ spanish ] = "~Abajo";
+ Text[ italian ] = "~Basso";
+ Text[ danish ] = "Bund";
+ Text[ swedish ] = "~Nere";
+ Text[ polish ] = "W dole";
+ Text[ portuguese_brazilian ] = "Bottom";
+ Text[ japanese ] = "(~B)";
+ Text[ korean ] = "Ʒ(~B)";
+ Text[ chinese_simplified ] = "(~B)";
+ Text[ chinese_traditional ] = "U(~B)";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "Al~t";
+ };
+ MetricField MF_BOTTOM
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 53 , 60 ) ;
+ Size = MAP_APPFONT ( 40 , 12 ) ;
+ Spin = TRUE ;
+ Repeat = TRUE ;
+ SpinSize = 10 ;
+ First = 100 ;
+ Last = 5000 ;
+ Maximum = 5000 ;
+ Minimum = 0 ;
+ DecimalDigits = 2 ;
+ Unit = FUNIT_MM ;
+ };
+ CheckBox CB_SYNC
+ {
+ Pos = MAP_APPFONT ( 12 , 75 ) ;
+ Size = MAP_APPFONT ( 120 , 12 ) ;
+ Text = "S~ynchronisieren" ;
+ Text [ ENGLISH ] = "Synchronize" ;
+ Text[ english_us ] = "Synchronize";
+ Text[ portuguese ] = "~Sincronizar";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "S~ynchroniseren";
+ Text[ french ] = "~Synchroniser";
+ Text[ spanish ] = "~Sincronizar";
+ Text[ italian ] = "~Sicronizza";
+ Text[ danish ] = "Synkroniser";
+ Text[ swedish ] = "Synkronisera";
+ Text[ polish ] = "Synchronizuj";
+ Text[ portuguese_brazilian ] = "Synchronize";
+ Text[ japanese ] = "ݸ";
+ Text[ korean ] = "ȭ";
+ Text[ chinese_simplified ] = "ͬ";
+ Text[ chinese_traditional ] = "PB";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "~Eitle";
+ Text[ language_user1 ] = " ";
+ };
+ Window WIN_EXAMPLE
+ {
+ Pos = MAP_APPFONT ( 106 , 15 ) ;
+ Size = MAP_APPFONT ( 57 , 57 ) ;
+ Border = TRUE;
+ };
+ GroupBox GB_DISTANCE
+ {
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 160 , 90 ) ;
+ Text = "Einstellungen" ;
+ Text [ ENGLISH ] = "Settings" ;
+ Text[ english_us ] = "Settings";
+ Text[ portuguese ] = "Predefinies";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "Instellingen";
+ Text[ french ] = "Paramtres";
+ Text[ spanish ] = "Configuracin";
+ Text[ italian ] = "Impostazioni";
+ Text[ danish ] = "Indstillinger";
+ Text[ swedish ] = "Instllningar";
+ Text[ polish ] = "Ustawienia";
+ Text[ portuguese_brazilian ] = "Settings";
+ Text[ japanese ] = "ݒ";
+ Text[ korean ] = "";
+ Text[ chinese_simplified ] = "趨";
+ Text[ chinese_traditional ] = "]w";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "Ayarlar";
+ Text[ language_user1 ] = " ";
+ };
+ OKButton PB_OK
+ {
+ Pos = MAP_APPFONT ( 172 , 6 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ DefButton = TRUE;
+ };
+ CancelButton PB_CANCEL
+ {
+ Pos = MAP_APPFONT ( 172 , 23 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ };
+ HelpButton PB_HELP
+ {
+ Pos = MAP_APPFONT ( 172 , 43 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ };
+
+ Text[ english_us ] = "Spacing";
+ Text[ portuguese ] = "Espaamento";
+ Text[ russian ] = "";
+ Text[ greek ] = "A";
+ Text[ dutch ] = "Afstanden";
+ Text[ french ] = "carts";
+ Text[ spanish ] = "Espacios";
+ Text[ italian ] = "Distanze";
+ Text[ danish ] = "Afstand";
+ Text[ swedish ] = "Avstnd";
+ Text[ polish ] = "Odstpy";
+ Text[ portuguese_brazilian ] = "Distances";
+ Text[ japanese ] = "Ԋu";
+ Text[ korean ] = "";
+ Text[ chinese_simplified ] = "";
+ Text[ chinese_traditional ] = "j";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "Aralklar";
+ Text[ language_user1 ] = " ";
+ };
+ GroupBox GB_BORDER
+ {
+ Pos = MAP_APPFONT ( 6 , 34 ) ;
+ Size = MAP_APPFONT ( 86 , 95 ) ;
+ Text = "Rahmen" ;
+ Text [ ENGLISH ] = "Border" ;
+ Text [ norwegian ] = "Border" ;
+ Text [ italian ] = "Cornice" ;
+ Text [ portuguese_brazilian ] = "Borda" ;
+ Text [ portuguese ] = "Moldura" ;
+ Text [ finnish ] = "Reunaviiva" ;
+ Text [ danish ] = "Ramme" ;
+ Text [ french ] = "Cadre" ;
+ Text [ swedish ] = "Ram" ;
+ Text [ dutch ] = "Voorbeeld" ;
+ Text [ spanish ] = "Marco" ;
+ Text [ english_us ] = "Frame" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "Ramka";
+ Text[ japanese ] = "g";
+ Text[ chinese_traditional ] = "w";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "ereve";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_LINESTYLE
+ {
+ Pos = MAP_APPFONT ( 104 , 14 ) ;
+ Size = MAP_APPFONT ( 63 , 10 ) ;
+ Text = "~Stil" ;
+ Text [ ENGLISH ] = "~Style" ;
+ Text [ norwegian ] = "~Style" ;
+ Text [ italian ] = "Stile" ;
+ Text [ portuguese_brazilian ] = "~Estilo" ;
+ Text [ portuguese ] = "~Estilo" ;
+ Text [ finnish ] = "~Tyyli" ;
+ Text [ danish ] = "Type" ;
+ Text [ french ] = "~Style" ;
+ Text [ swedish ] = "~Stil" ;
+ Text [ dutch ] = "~Type" ;
+ Text [ spanish ] = "~Estilo" ;
+ Text [ english_us ] = "~Style" ;
+ Text[ chinese_simplified ] = "ʽ(~S)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Styl";
+ Text[ japanese ] = "(~S)";
+ Text[ chinese_traditional ] = "˦(~S)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "(~S)";
+ Text[ turkish ] = "~Biim";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_LINECOLOR
+ {
+ Pos = MAP_APPFONT ( 104 , 100 ) ;
+ Size = MAP_APPFONT ( 63 , 10 ) ;
+ Text = "~Farbe" ;
+ Text [ ENGLISH ] = "~Color" ;
+ Text [ norwegian ] = "~Color" ;
+ Text [ italian ] = "~Colore" ;
+ Text [ portuguese_brazilian ] = "~Cor" ;
+ Text [ portuguese ] = "~Cor" ;
+ Text [ finnish ] = "~Vri" ;
+ Text [ danish ] = "Farve" ;
+ Text [ french ] = "~Couleur" ;
+ Text [ swedish ] = "~Frg" ;
+ Text [ dutch ] = "~Kleur" ;
+ Text [ spanish ] = "~Color" ;
+ Text [ english_us ] = "~Color" ;
+ Text[ chinese_simplified ] = "ɫ(~C)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Kolor";
+ Text[ japanese ] = "F(~C)";
+ Text[ chinese_traditional ] = "C(~C)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "(~C)";
+ Text[ turkish ] = "~Renk";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_LINECOLOR
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 104 , 112 ) ;
+ Size = MAP_APPFONT ( 62 , 68 ) ;
+ DropDown = TRUE ;
+ DDExtraWidth = TRUE ;
+ };
+ GroupBox GB_LINE
+ {
+ Pos = MAP_APPFONT ( 98 , 3 ) ;
+ Size = MAP_APPFONT ( 75 , 126 ) ;
+ Text = "Linie" ;
+ Text [ ENGLISH ] = "Lines" ;
+ Text [ norwegian ] = "Linjer" ;
+ Text [ italian ] = "Linea" ;
+ Text [ portuguese_brazilian ] = "Linhas" ;
+ Text [ portuguese ] = "Linha" ;
+ Text [ finnish ] = "Viivat" ;
+ Text [ danish ] = "Streg" ;
+ Text [ french ] = "Ligne" ;
+ Text [ swedish ] = "Linje" ;
+ Text [ dutch ] = "Lijn" ;
+ Text [ spanish ] = "Lnea" ;
+ Text [ english_us ] = "Line" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "Linia";
+ Text[ japanese ] = "";
+ Text[ chinese_traditional ] = "u";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "izgi";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_SHADOWPOS
+ {
+ Pos = MAP_APPFONT ( 185 , 14 ) ;
+ Size = MAP_APPFONT ( 63 , 10 ) ;
+ Text = "~Position" ;
+ Text [ ENGLISH ] = "~Position" ;
+ Text [ norwegian ] = "~Posisjon" ;
+ Text [ italian ] = "~Posizione" ;
+ Text [ portuguese_brazilian ] = "~Posio" ;
+ Text [ portuguese ] = "~Posio" ;
+ Text [ finnish ] = "A~sema" ;
+ Text [ danish ] = "Placering" ;
+ Text [ french ] = "~Position" ;
+ Text [ swedish ] = "~Position" ;
+ Text [ dutch ] = "~Positie" ;
+ Text [ spanish ] = "~Posicin" ;
+ Text [ english_us ] = "~Position" ;
+ Text[ chinese_simplified ] = "λ(~P)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Pozycja";
+ Text[ japanese ] = "ʒu(~P)";
+ Text[ chinese_traditional ] = "m(~P)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "ġ(~P)";
+ Text[ turkish ] = "~Konum";
+ Text[ language_user1 ] = " ";
+ };
+ Control WIN_SHADOWS
+ {
+ HelpId = HID_BORDER_CTL_SHADOWS ;
+ Hide = TRUE ;
+ Pos = MAP_APPFONT ( 185 , 25 ) ;
+ Size = MAP_APPFONT ( 65 , 15 ) ;
+ TabStop = TRUE ;
+ };
+ FixedText FT_SHADOWCOLOR
+ {
+ Pos = MAP_APPFONT ( 185 , 72 ) ;
+ Size = MAP_APPFONT ( 63 , 10 ) ;
+ Text = "Fa~rbe" ;
+ Text [ ENGLISH ] = "C~olor" ;
+ Text [ norwegian ] = "C~olor" ;
+ Text [ italian ] = "Colore" ;
+ Text [ portuguese_brazilian ] = "C~or" ;
+ Text [ portuguese ] = "C~or" ;
+ Text [ finnish ] = "V~ri" ;
+ Text [ danish ] = "Farve" ;
+ Text [ french ] = "~Couleur" ;
+ Text [ swedish ] = "F~rg" ;
+ Text [ dutch ] = "K~leur" ;
+ Text [ spanish ] = "C~olor" ;
+ Text [ english_us ] = "C~olor" ;
+ Text[ chinese_simplified ] = "ɫ(~O)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Kolor";
+ Text[ japanese ] = "F(~O)";
+ Text[ chinese_traditional ] = "C(~O)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "(~O)";
+ Text[ turkish ] = "Re~nk";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_SHADOWCOLOR
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 185 , 83 ) ;
+ Size = MAP_APPFONT ( 62 , 68 ) ;
+ DropDown = TRUE ;
+ DDExtraWidth = TRUE ;
+ };
+ FixedText FT_SHADOWSIZE
+ {
+ Pos = MAP_APPFONT ( 185 , 43 ) ;
+ Size = MAP_APPFONT ( 63 , 10 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? ~Gre : ~Gre */
+ /* ### ACHTUNG: Neuer Text in Resource? ~Gre : ~Gre */
+ Text = "~Gre" ;
+ Text [ ENGLISH ] = "Si~ze" ;
+ Text [ norwegian ] = "Si~ze" ;
+ Text [ italian ] = "~Dimensione" ;
+ Text [ portuguese_brazilian ] = "Ta~manho" ;
+ Text [ portuguese ] = "~Tamanho" ;
+ Text [ finnish ] = "~Koko" ;
+ Text [ danish ] = "Strrelse" ;
+ Text [ french ] = "~Taille" ;
+ Text [ swedish ] = "St~orlek" ;
+ Text [ dutch ] = "~Grootte" ;
+ Text [ spanish ] = "~Tamao" ;
+ Text [ english_us ] = "Si~ze" ;
+ Text[ chinese_simplified ] = "С(~Z)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Rozmiar";
+ Text[ japanese ] = "(~Z)";
+ Text[ chinese_traditional ] = "jp(~Z)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "ũ(~Z)";
+ Text[ turkish ] = "~Byklk";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField ED_SHADOWSIZE
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 185 , 54 ) ;
+ Size = MAP_APPFONT ( 40 , 12 ) ;
+ Spin = TRUE ;
+ Repeat = TRUE ;
+ SpinSize = 10 ;
+ First = 100 ;
+ Last = 5000 ;
+ Maximum = 5000 ;
+ Minimum = 50 ;
+ DecimalDigits = 2 ;
+ Unit = FUNIT_MM ;
+ };
+ GroupBox GB_SHADOW
+ {
+ Pos = MAP_APPFONT ( 179 , 3 ) ;
+ Size = MAP_APPFONT ( 75 , 126 ) ;
+ Text = "Schatten" ;
+ Text [ ENGLISH ] = "Shadow" ;
+ Text [ norwegian ] = "Shadow" ;
+ Text [ italian ] = "Ombre" ;
+ Text [ portuguese_brazilian ] = "Sombra" ;
+ Text [ portuguese ] = "Sombras" ;
+ Text [ finnish ] = "Varjo" ;
+ Text [ danish ] = "Skygge" ;
+ Text [ french ] = "Ombre" ;
+ Text [ swedish ] = "Skuggning" ;
+ Text [ dutch ] = "Schaduw" ;
+ Text [ spanish ] = "Sombra" ;
+ Text [ english_us ] = "Shadow style" ;
+ Text[ chinese_simplified ] = "Ӱ";
+ Text[ russian ] = "";
+ Text[ polish ] = "Cie";
+ Text[ japanese ] = "e";
+ Text[ chinese_traditional ] = "v";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "Glge";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_LINESTYLE
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 104 , 25 ) ;
+ Size = MAP_APPFONT ( 62 , 70 ) ;
+ };
+ ImageList IL_PRE_BITMAPS
+ {
+ ImageBitmap = Bitmap { File = "preview.bmp" ; };
+ MaskColor = STD_MASKCOLOR ;
+ IdList =
+ {
+ IID_PRENONE ;
+ IID_TABLE_PRE1 ;
+ IID_TABLE_PRE2 ;
+ IID_TABLE_PRE3 ;
+ IID_TABLE_PRE4 ;
+ IID_PARAGRAPH_PRE1 ;
+ IID_PARAGRAPH_PRE2 ;
+ IID_PARAGRAPH_PRE3 ;
+ IID_PARAGRAPH_PRE4 ;
+ };
+ IdCount = { 9 ; };
+ };
+ ImageList IL_SDW_BITMAPS
+ {
+ ImageBitmap = Bitmap { File = "shadow.bmp" ; };
+ MaskColor = STD_MASKCOLOR ;
+ IdList =
+ {
+ IID_SHADOWNONE ;
+ IID_SHADOW_BOT_RIGHT ;
+ IID_SHADOW_BOT_LEFT ;
+ IID_SHADOW_TOP_RIGHT ;
+ IID_SHADOW_TOP_LEFT ;
+ };
+ IdCount = { 5 ; };
+ };
+ Text[ chinese_simplified ] = "߿";
+ Text[ russian ] = "";
+ Text[ polish ] = "Obramowanie";
+ Text[ japanese ] = "g";
+ Text[ chinese_traditional ] = "";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "׵θ";
+ Text[ turkish ] = "Kenarlk";
+ Text[ language_user1 ] = " ";
+};
+ // **********************************************************************
+
diff --git a/svx/source/dialog/chardlg.cxx b/svx/source/dialog/chardlg.cxx
new file mode 100644
index 000000000000..1693224fdbfb
--- /dev/null
+++ b/svx/source/dialog/chardlg.cxx
@@ -0,0 +1,2953 @@
+/*************************************************************************
+ *
+ * $RCSfile: chardlg.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:07 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+// include ---------------------------------------------------------------
+
+#ifndef _UNO_LINGU_HXX
+#include <unolingu.hxx>
+#endif
+#ifndef _CTRLTOOL_HXX //autogen
+#include <svtools/ctrltool.hxx>
+#endif
+#ifndef _SFX_PRINTER_HXX //autogen
+#include <sfx2/printer.hxx>
+#endif
+#ifndef _SFX_OBJSH_HXX //autogen
+#include <sfx2/objsh.hxx>
+#endif
+#ifndef _SFXVIEWSH_HXX
+#include <sfx2/viewsh.hxx>
+#endif
+#ifndef _SFX_INIMGR_HXX //autogen
+#include <sfx2/inimgr.hxx>
+#endif
+#ifndef _SFONTITM_HXX
+#include <svtools/sfontitm.hxx>
+#endif
+#pragma hdrstop
+
+#define _SVX_CHARDLG_CXX
+
+#include "dialogs.hrc"
+#include "svxitems.hrc"
+#include "chardlg.hrc"
+
+//Erstmal definieren, damit die Klassendeklarionen angezogen werden.
+#define ITEMID_FONT SID_ATTR_CHAR_FONT
+#define ITEMID_POSTURE SID_ATTR_CHAR_POSTURE
+#define ITEMID_WEIGHT SID_ATTR_CHAR_WEIGHT
+#define ITEMID_SHADOWED SID_ATTR_CHAR_SHADOWED
+#define ITEMID_WORDLINEMODE SID_ATTR_CHAR_WORDLINEMODE
+#define ITEMID_CONTOUR SID_ATTR_CHAR_CONTOUR
+#define ITEMID_CROSSEDOUT SID_ATTR_CHAR_STRIKEOUT
+#define ITEMID_UNDERLINE SID_ATTR_CHAR_UNDERLINE
+#define ITEMID_FONTHEIGHT SID_ATTR_CHAR_FONTHEIGHT
+#define ITEMID_PROPSIZE SID_ATTR_CHAR_PROPSIZE
+#define ITEMID_COLOR SID_ATTR_CHAR_COLOR
+#define ITEMID_KERNING SID_ATTR_CHAR_KERNING
+#define ITEMID_CASEMAP SID_ATTR_CHAR_CASEMAP
+#define ITEMID_LANGUAGE SID_ATTR_CHAR_LANGUAGE
+#define ITEMID_ESCAPEMENT SID_ATTR_CHAR_ESCAPEMENT
+#define ITEMID_FONTLIST SID_ATTR_CHAR_FONTLIST
+#define ITEMID_AUTOKERN SID_ATTR_CHAR_AUTOKERN
+#define ITEMID_COLOR_TABLE SID_COLOR_TABLE
+#define ITEMID_BLINK SID_ATTR_FLASH
+#define ITEMID_BRUSH SID_ATTR_BRUSH
+
+
+#include "xtable.hxx" // XColorTable
+#include "chardlg.hxx"
+#include "fontitem.hxx"
+#include "postitem.hxx"
+#include "udlnitem.hxx"
+#include "crsditem.hxx"
+#include "cntritem.hxx"
+#include "langitem.hxx"
+#include "wghtitem.hxx"
+#include "fhgtitem.hxx"
+#include "shdditem.hxx"
+#include "escpitem.hxx"
+#include "prszitem.hxx"
+#include "wrlmitem.hxx"
+#include "cmapitem.hxx"
+#include "kernitem.hxx"
+#include "blnkitem.hxx"
+#include "flstitem.hxx"
+#include "akrnitem.hxx"
+#include "brshitem.hxx"
+#include "colritem.hxx"
+#include "drawitem.hxx"
+#include "dlgutil.hxx"
+#include "dialmgr.hxx"
+#include "htmlmode.hxx"
+
+using namespace ::com::sun::star;
+
+// define ----------------------------------------------------------------
+
+#define LW_NORMAL 0
+#define LW_GESPERRT 1
+#define LW_SCHMAL 2
+
+// static ----------------------------------------------------------------
+
+static USHORT pStdRanges[] =
+{
+ SID_ATTR_CHAR_FONT,
+ SID_ATTR_CHAR_SHADOWED,
+ SID_ATTR_CHAR_CONTOUR,
+ SID_ATTR_CHAR_COLOR,
+ SID_ATTR_CHAR_CASEMAP,
+ SID_ATTR_CHAR_FONTLIST,
+ 0
+};
+
+static USHORT pExtRanges[] =
+{
+ SID_ATTR_CHAR_WORDLINEMODE,
+ SID_ATTR_CHAR_WORDLINEMODE,
+ SID_ATTR_CHAR_STRIKEOUT,
+ SID_ATTR_CHAR_UNDERLINE,
+ SID_ATTR_CHAR_PROPSIZE,
+ SID_ATTR_CHAR_PROPSIZE,
+ SID_ATTR_CHAR_KERNING,
+ SID_ATTR_CHAR_CASEMAP,
+ SID_ATTR_CHAR_ESCAPEMENT,
+ SID_ATTR_CHAR_ESCAPEMENT,
+ 0
+};
+
+// C-Funktion ------------------------------------------------------------
+
+inline BOOL StateToAttr( TriState aState )
+{
+ return ( STATE_CHECK == aState );
+}
+
+// class SvxCharStdPage --------------------------------------------------
+
+SfxTabPage* SvxCharStdPage::Create( Window* pParent, const SfxItemSet& rSet )
+{
+ return new SvxCharStdPage( pParent, rSet );
+}
+
+// -----------------------------------------------------------------------
+
+BOOL SvxCharStdPage::FillItemSet( SfxItemSet& rSet )
+{
+ const SfxPoolItem* pOld = 0, *pItem;
+ const SfxItemSet& rOldSet = GetItemSet();
+ BOOL bModified = FALSE;
+ const SfxItemSet* pExampleSet = GetTabDialog() ? GetTabDialog()->GetExampleSet() : NULL;
+
+ // "Anderungen beim Font?
+ FASTBOOL bChanged = TRUE;
+ USHORT nWhich = GetWhich( SID_ATTR_CHAR_FONT );
+ const String& rFntName = aFontBox.GetText();
+ const FontList* pFontList = GetFontList();
+ String aStyleBoxText = aStyleBox.GetText();
+ USHORT nEntryPos = aStyleBox.GetEntryPos( aStyleBoxText );
+ if ( nEntryPos >= nExtraEntryPos )
+ aStyleBoxText.Erase();
+ FontInfo aInfo( pFontList->Get( rFntName, aStyleBoxText ) );
+
+ SvxFontItem aFmtFont( aInfo.GetFamily(), aInfo.GetName(),
+ aInfo.GetStyleName(), aInfo.GetPitch(),
+ aInfo.GetCharSet(), nWhich );
+ pOld = GetOldItem( rSet, SID_ATTR_CHAR_FONT );
+
+ if ( pOld )
+ {
+ const SvxFontItem& rItem = *( (const SvxFontItem*)pOld );
+
+ if ( rItem.GetFamilyName() == aFmtFont.GetFamilyName() )
+ bChanged = FALSE;
+ }
+
+ if ( !bChanged )
+ bChanged = !aFontBox.GetSavedValue().Len();
+
+ if( !bChanged && pExampleSet &&
+ pExampleSet->GetItemState(nWhich, FALSE, &pItem) == SFX_ITEM_SET &&
+ ((SvxFontItem*)pItem)->GetFamilyName() != aFmtFont.GetFamilyName() )
+ bChanged = TRUE;
+
+ if ( bChanged && rFntName.Len() )
+ {
+ rSet.Put( aFmtFont );
+ bModified |= TRUE;
+ }
+ else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) )
+ rSet.ClearItem( nWhich );
+
+ bChanged = TRUE;
+ nWhich = GetWhich( SID_ATTR_CHAR_WEIGHT );
+ FontWeight eWeight = aInfo.GetWeight();
+ if ( nEntryPos >= nExtraEntryPos )
+ eWeight = WEIGHT_NORMAL;
+ SvxWeightItem aFmtWeight( eWeight, nWhich );
+ pOld = GetOldItem( rSet, SID_ATTR_CHAR_WEIGHT );
+
+ if ( pOld )
+ {
+ const SvxWeightItem& rItem = *( (const SvxWeightItem*)pOld );
+
+ if ( rItem.GetValue() == aFmtWeight.GetValue() )
+ bChanged = FALSE;
+ }
+
+ if ( !bChanged )
+ {
+ bChanged = !aStyleBox.GetSavedValue().Len();
+
+ if ( bInSearchMode && bChanged &&
+ aInfo.GetWeight() == WEIGHT_NORMAL && aInfo.GetItalic() != ITALIC_NONE )
+ bChanged = FALSE;
+ }
+
+ if ( !bChanged && pExampleSet &&
+ pExampleSet->GetItemState(nWhich, FALSE, &pItem) == SFX_ITEM_SET &&
+ ((SvxWeightItem*)pItem)->GetValue() != aFmtWeight.GetValue() )
+ bChanged = TRUE;
+
+ if ( nEntryPos >= nExtraEntryPos )
+ bChanged = ( nEntryPos == nExtraEntryPos );
+
+ String aText( aStyleBox.GetText() ); // Tristate, dann Text leer
+
+ if ( bChanged && aText.Len() )
+ {
+ rSet.Put( aFmtWeight );
+ bModified |= TRUE;
+ }
+ else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) )
+ rSet.ClearItem( nWhich );
+
+ bChanged = TRUE;
+ nWhich = GetWhich( SID_ATTR_CHAR_POSTURE );
+ FontItalic eItalic = aInfo.GetItalic();
+ if ( nEntryPos >= nExtraEntryPos )
+ eItalic = ITALIC_NONE;
+ SvxPostureItem aFmtPosture( eItalic, nWhich );
+ pOld = GetOldItem( rSet, SID_ATTR_CHAR_POSTURE );
+
+ if ( pOld )
+ {
+ const SvxPostureItem& rItem = *( (const SvxPostureItem*)pOld );
+
+ if ( rItem.GetValue() == aFmtPosture.GetValue() )
+ bChanged = FALSE;
+ }
+
+ if ( !bChanged )
+ {
+ bChanged = !aStyleBox.GetSavedValue().Len();
+
+ if ( bInSearchMode && bChanged &&
+ aInfo.GetItalic() == ITALIC_NONE && aInfo.GetWeight() != WEIGHT_NORMAL )
+ bChanged = FALSE;
+ }
+
+ if ( !bChanged && pExampleSet &&
+ pExampleSet->GetItemState(nWhich, FALSE, &pItem) == SFX_ITEM_SET &&
+ ((SvxPostureItem*)pItem)->GetValue() != aFmtPosture.GetValue() )
+ bChanged = TRUE;
+
+ if ( nEntryPos >= nExtraEntryPos )
+ bChanged = ( nEntryPos == ( nExtraEntryPos + 1 ) );
+
+ if ( bChanged && aText.Len() )
+ {
+ rSet.Put( aFmtPosture );
+ bModified |= TRUE;
+ }
+ else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) )
+ rSet.ClearItem( nWhich );
+
+ // FontSize
+ long nSize = aSizeBox.GetValue();
+
+ if ( !aSizeBox.GetText().Len() ) // GetValue() gibt dann Min-Wert zurueck
+ nSize = 0;
+ long nSavedSize = (long)aSizeBox.GetSavedValue().ToInt32();
+ FASTBOOL bRel = TRUE;
+
+ if ( !aSizeBox.IsRelative() )
+ {
+ nSavedSize *= 10;
+ bRel = FALSE;
+ }
+
+ nWhich = GetWhich( SID_ATTR_CHAR_FONTHEIGHT );
+ const SvxFontHeightItem* pOldHeight =
+ (const SvxFontHeightItem*)GetOldItem( rSet, SID_ATTR_CHAR_FONTHEIGHT );
+ bChanged = ( nSize != nSavedSize );
+
+ if ( !bChanged && pExampleSet &&
+ pExampleSet->GetItemState(nWhich, FALSE, &pItem) == SFX_ITEM_SET )
+ {
+ float fSize = (float)nSize / 10;
+ long nVal = CalcToUnit( fSize, rSet.GetPool()->GetMetric( nWhich ) );
+ if ( ( (SvxFontHeightItem*)pItem)->GetHeight() != (UINT32)nVal )
+ bChanged = TRUE;
+ }
+
+ if( bChanged || !pOldHeight ||
+ bRel != ( SFX_MAPUNIT_RELATIVE != pOldHeight->GetPropUnit() ||
+ 100 != pOldHeight->GetProp() ) )
+ {
+ SfxMapUnit eUnit = rSet.GetPool()->GetMetric( nWhich );
+ if( aSizeBox.IsRelative() )
+ {
+ DBG_ASSERT( GetItemSet().GetParent(), "No parent set" );
+ const SvxFontHeightItem& rOldItem = (const SvxFontHeightItem&)
+ GetItemSet().GetParent()->Get( nWhich );
+
+ SvxFontHeightItem aHeight( 240, 100, nWhich );
+ if( aSizeBox.IsPtRelative() )
+ aHeight.SetHeight( rOldItem.GetHeight(),
+ (USHORT)( nSize / 10 ),
+ SFX_MAPUNIT_POINT, eUnit );
+
+ else
+ aHeight.SetHeight( rOldItem.GetHeight(),
+ (USHORT)nSize, SFX_MAPUNIT_RELATIVE );
+ rSet.Put( aHeight );
+ }
+ else
+ {
+ float fSize = (float)nSize / 10;
+ SvxFontHeightItem aFmtSize(
+ CalcToUnit( fSize, eUnit ), 100, nWhich );
+ rSet.Put( aFmtSize );
+ }
+ bModified |= TRUE;
+ }
+ else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) )
+ rSet.ClearItem( nWhich );
+
+ // Farbe
+ bModified |= FillItemSet_Impl( aColorBox, rSet, SID_ATTR_CHAR_COLOR );
+ if( aFillColorBox.IsVisible() )
+ bModified |= FillItemSet_Impl( aFillColorBox, rSet, SID_ATTR_CHAR_FILLCOLOR );
+
+ bChanged = TRUE;
+ // Unterstreichen
+ nWhich = GetWhich( SID_ATTR_CHAR_UNDERLINE );
+ pOld = GetOldItem( rSet, SID_ATTR_CHAR_UNDERLINE );
+ TriState eState = aUnderlineBtn.GetState();
+
+ if ( pOld )
+ {
+ const SvxUnderlineItem& rItem = *( (const SvxUnderlineItem*)pOld );
+
+ if ( (FontUnderline)rItem.GetValue() == eUnderline &&
+ aUnderlineBtn.GetSavedValue() == eState )
+ bChanged = FALSE;
+ }
+
+ if ( !bChanged && pExampleSet &&
+ pExampleSet->GetItemState(nWhich, FALSE, &pItem) == SFX_ITEM_SET &&
+ !StateToAttr( eState ) &&
+ ((SvxUnderlineItem*)pItem)->GetUnderline() != UNDERLINE_NONE )
+ bChanged = TRUE;
+
+ if ( bChanged && eState != STATE_DONTKNOW )
+ {
+ SvxUnderlineItem aFmtUnderl(
+ StateToAttr( eState ) ? eUnderline : UNDERLINE_NONE, nWhich );
+ rSet.Put( aFmtUnderl );
+ bModified |= TRUE;
+ }
+ else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) )
+ rSet.ClearItem( nWhich );
+ bChanged = TRUE;
+
+ // Durchstreichen
+ nWhich = GetWhich( SID_ATTR_CHAR_STRIKEOUT );
+ pOld = GetOldItem( rSet, SID_ATTR_CHAR_STRIKEOUT );
+ eState = aStrikeoutBtn.GetState();
+
+ if ( pOld )
+ {
+ const SvxCrossedOutItem& rItem = *( (const SvxCrossedOutItem*)pOld );
+
+ if ( (FontStrikeout)rItem.GetValue() == eStrikeout &&
+ aStrikeoutBtn.GetSavedValue() == eState )
+ bChanged = FALSE;
+ }
+
+ if ( !bChanged && pExampleSet &&
+ pExampleSet->GetItemState(nWhich, FALSE, &pItem) == SFX_ITEM_SET &&
+ !StateToAttr( eState ) &&
+ ((SvxCrossedOutItem*)pItem)->GetStrikeout() != STRIKEOUT_NONE )
+ bChanged = TRUE;
+
+ if ( bChanged && eState != STATE_DONTKNOW )
+ {
+ SvxCrossedOutItem aFmtCrossedOut(
+ StateToAttr( eState ) ? eStrikeout : STRIKEOUT_NONE, nWhich );
+ rSet.Put( aFmtCrossedOut );
+ bModified |= TRUE;
+ }
+ else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) )
+ rSet.ClearItem( nWhich );
+ bChanged = TRUE;
+
+ // Kontour
+ nWhich = GetWhich( SID_ATTR_CHAR_CONTOUR );
+ pOld = GetOldItem( rSet, SID_ATTR_CHAR_CONTOUR );
+ eState = aOutlineBtn.GetState();
+
+ if ( pOld )
+ {
+ const SvxContourItem& rItem = *( (const SvxContourItem*)pOld );
+
+ if ( rItem.GetValue() == StateToAttr( eState ) &&
+ aOutlineBtn.GetSavedValue() == eState )
+ bChanged = FALSE;
+ }
+
+ if ( !bChanged && pExampleSet &&
+ pExampleSet->GetItemState(nWhich, FALSE, &pItem) == SFX_ITEM_SET &&
+ !StateToAttr( eState ) && ((SvxContourItem*)pItem)->GetValue() )
+ bChanged = TRUE;
+
+ if ( bChanged && eState != STATE_DONTKNOW )
+ {
+ rSet.Put( SvxContourItem( StateToAttr( eState ), nWhich ) );
+ bModified |= TRUE;
+ }
+ else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) )
+ rSet.ClearItem( nWhich );
+ bChanged = TRUE;
+
+ // Schatten
+ nWhich = GetWhich( SID_ATTR_CHAR_SHADOWED );
+ pOld = GetOldItem( rSet, SID_ATTR_CHAR_SHADOWED );
+ eState = aShadowBtn.GetState();
+
+ if ( pOld )
+ {
+ const SvxShadowedItem& rItem = *( (const SvxShadowedItem*)pOld );
+
+ if ( rItem.GetValue() == StateToAttr( eState ) &&
+ aShadowBtn.GetSavedValue() == eState )
+ bChanged = FALSE;
+ }
+
+ if ( !bChanged && pExampleSet &&
+ pExampleSet->GetItemState(nWhich, FALSE, &pItem) == SFX_ITEM_SET &&
+ !StateToAttr( eState ) && ((SvxShadowedItem*)pItem)->GetValue() )
+ bChanged = TRUE;
+
+ if ( bChanged && eState != STATE_DONTKNOW )
+ {
+ rSet.Put( SvxShadowedItem( StateToAttr( eState ), nWhich ) );
+ bModified |= TRUE;
+ }
+ else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) )
+ rSet.ClearItem( nWhich );
+ bChanged = TRUE;
+
+ // Sprache
+ if( aLanguageBox.IsVisible() )
+ {
+ nWhich = GetWhich( SID_ATTR_CHAR_LANGUAGE );
+ pOld = GetOldItem( rSet, SID_ATTR_CHAR_LANGUAGE );
+ USHORT nLPos = aLanguageBox.GetSelectEntryPos();
+ USHORT nLang = (USHORT)(ULONG)aLanguageBox.GetEntryData(nLPos);
+ util::Language nLanguage = SvxGetSelectableLanguages().getConstArray()[ nLang ];
+
+ if ( pOld )
+ {
+ const SvxLanguageItem& rItem = *( (const SvxLanguageItem*)pOld );
+
+ if ( nLPos == LISTBOX_ENTRY_NOTFOUND ||
+ rItem.GetValue() == nLanguage )
+ bChanged = FALSE;
+ }
+
+ if ( !bChanged )
+ bChanged = ( aLanguageBox.GetSavedValue() == LISTBOX_ENTRY_NOTFOUND );
+
+ if ( bChanged && nLPos != LISTBOX_ENTRY_NOTFOUND )
+ {
+ rSet.Put( SvxLanguageItem( (LanguageType) nLanguage, nWhich ) );
+ bModified |= TRUE;
+ }
+ else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) )
+ rSet.ClearItem( nWhich );
+ }
+
+ return bModified;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxCharStdPage::Reset( const SfxItemSet& rSet )
+{
+ // die FontListBox fuellen
+ const FontList* pFontList = GetFontList();
+ aFontBox.Fill( pFontList );
+
+ // Font ermitteln
+ const SvxFontItem* pFontItem = 0;
+ USHORT nWhich = GetWhich( SID_ATTR_CHAR_FONT );
+ SfxItemState eState = rSet.GetItemState( nWhich );
+
+ if ( eState >= SFX_ITEM_AVAILABLE )
+ {
+ pFontItem = (const SvxFontItem*)&( rSet.Get( nWhich ) );
+ aFontBox.SetText( pFontItem->GetFamilyName() );
+ }
+ else
+ aFontBox.SetText( String() );
+
+ // Alle Styles zu einem selektierten Font
+ FillStyleBox_Impl();
+
+ FASTBOOL bStyle = FALSE;
+ FontItalic eItalic = ITALIC_NONE;
+ FontWeight eWeight = WEIGHT_NORMAL;
+ nWhich = GetWhich( SID_ATTR_CHAR_POSTURE );
+ eState = rSet.GetItemState( nWhich );
+
+ if ( eState >= SFX_ITEM_AVAILABLE )
+ {
+ const SvxPostureItem& rItem = (SvxPostureItem&)rSet.Get( nWhich );
+ eItalic = (FontItalic)rItem.GetValue();
+ bStyle = TRUE;
+ }
+
+ nWhich = GetWhich( SID_ATTR_CHAR_WEIGHT );
+ eState = rSet.GetItemState( nWhich );
+
+ if ( eState >= SFX_ITEM_AVAILABLE )
+ {
+ SvxWeightItem& rItem = (SvxWeightItem&)rSet.Get( nWhich );
+ eWeight = (FontWeight)rItem.GetValue();
+ }
+ else if ( bStyle )
+ bStyle = FALSE;
+
+ // Aktuell eingestellter Font
+ if ( bStyle && pFontItem )
+ {
+/*!!!
+ String aStyleStr( pFontItem->GetStyleName() );
+
+ if ( aStyleStr.Len() )
+ aStyleBox.SetText( aStyleStr );
+ else
+ {
+ FontInfo aInfo = pFontList->Get( pFontItem->GetFamilyName(), eWeight, eItalic );
+ aStyleBox.SetText( pFontList->GetStyleName( aInfo ) );
+ }
+*/
+ FontInfo aInfo = pFontList->Get( pFontItem->GetFamilyName(),
+ eWeight, eItalic );
+ aStyleBox.SetText( pFontList->GetStyleName( aInfo ) );
+ }
+ else if ( !bInSearchMode || !bStyle )
+ aStyleBox.SetText( String() );
+ else if ( bStyle )
+ {
+ FontInfo aInfo = pFontList->Get( String(), eWeight, eItalic );
+ aStyleBox.SetText( pFontList->GetStyleName( aInfo ) );
+ }
+
+ // SizeBox fuellen
+ FillSizeBox_Impl();
+ nWhich = GetWhich( SID_ATTR_CHAR_FONTHEIGHT );
+ eState = rSet.GetItemState( nWhich );
+
+ if ( aSizeBox.IsRelativeMode() )
+ {
+ SfxMapUnit eUnit = rSet.GetPool()->GetMetric( nWhich );
+ const SvxFontHeightItem& rItem =
+ (SvxFontHeightItem&)rSet.Get( nWhich );
+
+ if( rItem.GetProp() != 100 ||
+ SFX_MAPUNIT_RELATIVE != rItem.GetPropUnit() )
+ {
+ BOOL bPtRel = SFX_MAPUNIT_POINT == rItem.GetPropUnit();
+ aSizeBox.SetPtRelative( bPtRel );
+ aSizeBox.SetValue( bPtRel ? ((short)rItem.GetProp()) * 10
+ : rItem.GetProp() );
+ }
+ else
+ {
+ aSizeBox.SetRelative();
+ aSizeBox.SetValue( (long)CalcToPoint( rItem.GetHeight(), eUnit, 10 ) );
+ }
+ }
+ else if ( eState >= SFX_ITEM_AVAILABLE )
+ {
+ SfxMapUnit eUnit = rSet.GetPool()->GetMetric( nWhich );
+ const SvxFontHeightItem& rItem =
+ (SvxFontHeightItem&)rSet.Get( nWhich );
+ aSizeBox.SetValue(
+ (long)CalcToPoint( rItem.GetHeight(), eUnit, 10 ) );
+ }
+ else
+ aSizeBox.SetText( String() );
+
+ // Schattiert
+ nWhich = GetWhich( SID_ATTR_CHAR_SHADOWED );
+ eState = rSet.GetItemState( nWhich );
+
+ switch ( eState )
+ {
+ case SFX_ITEM_UNKNOWN:
+ aShadowBtn.Hide();
+ break;
+
+ case SFX_ITEM_DISABLED:
+ case SFX_ITEM_READONLY:
+ aShadowBtn.Disable();
+ break;
+
+ case SFX_ITEM_DONTCARE:
+ aShadowBtn.SetState( STATE_DONTKNOW );
+ break;
+
+ case SFX_ITEM_DEFAULT:
+ case SFX_ITEM_SET:
+ {
+ const SvxShadowedItem& rItem =
+ (SvxShadowedItem&)rSet.Get( nWhich );
+ aShadowBtn.SetState( (TriState)rItem.GetValue() );
+ aShadowBtn.EnableTriState( FALSE );
+ break;
+ }
+ }
+
+ // Kontour
+ nWhich = GetWhich( SID_ATTR_CHAR_CONTOUR );
+ eState = rSet.GetItemState( nWhich );
+
+ switch ( eState )
+ {
+ case SFX_ITEM_UNKNOWN:
+ aOutlineBtn.Hide();
+ break;
+
+ case SFX_ITEM_DISABLED:
+ case SFX_ITEM_READONLY:
+ aOutlineBtn.Disable();
+ break;
+
+ case SFX_ITEM_DONTCARE:
+ aOutlineBtn.SetState( STATE_DONTKNOW );
+ break;
+
+ case SFX_ITEM_DEFAULT:
+ case SFX_ITEM_SET:
+ {
+ const SvxContourItem& rItem = (SvxContourItem&)rSet.Get( nWhich );
+ aOutlineBtn.SetState( (TriState)rItem.GetValue() );
+ aOutlineBtn.EnableTriState( FALSE );
+ break;
+ }
+ }
+
+ // Underline
+ nWhich = GetWhich( SID_ATTR_CHAR_UNDERLINE );
+ eState = rSet.GetItemState( nWhich );
+
+ switch ( eState )
+ {
+ case SFX_ITEM_UNKNOWN:
+ aUnderlineBtn.Hide();
+ break;
+
+ case SFX_ITEM_DISABLED:
+ case SFX_ITEM_READONLY:
+ aUnderlineBtn.Disable();
+ break;
+
+ case SFX_ITEM_DONTCARE:
+ aUnderlineBtn.SetState( STATE_DONTKNOW );
+ break;
+
+ case SFX_ITEM_DEFAULT:
+ case SFX_ITEM_SET:
+ {
+ const SvxUnderlineItem& rItem =
+ (SvxUnderlineItem&)rSet.Get( nWhich );
+ eUnderline = (FontUnderline)rItem.GetValue();
+
+ if ( eUnderline == UNDERLINE_NONE )
+ aUnderlineBtn.SetState( STATE_NOCHECK );
+ else
+ aUnderlineBtn.SetState( STATE_CHECK );
+ aUnderlineBtn.EnableTriState( FALSE );
+ break;
+ }
+ }
+
+ // Strikeout
+ nWhich = GetWhich( SID_ATTR_CHAR_STRIKEOUT );
+ eState = rSet.GetItemState( nWhich );
+
+ switch ( eState )
+ {
+ case SFX_ITEM_UNKNOWN:
+ aStrikeoutBtn.Hide();
+ break;
+
+ case SFX_ITEM_DISABLED:
+ case SFX_ITEM_READONLY:
+ aStrikeoutBtn.Disable();
+ break;
+
+ case SFX_ITEM_DONTCARE:
+ aStrikeoutBtn.SetState( STATE_DONTKNOW );
+ break;
+
+ case SFX_ITEM_DEFAULT:
+ case SFX_ITEM_SET:
+ {
+ const SvxCrossedOutItem& rItem =
+ (SvxCrossedOutItem&)rSet.Get( nWhich );
+ eStrikeout = (FontStrikeout)rItem.GetValue();
+
+ if ( eStrikeout == STRIKEOUT_NONE )
+ aStrikeoutBtn.SetState( STATE_NOCHECK );
+ else
+ aStrikeoutBtn.SetState( STATE_CHECK );
+ aStrikeoutBtn.EnableTriState( FALSE );
+ break;
+ }
+ }
+
+ // Farbe
+ Reset_Impl( aColorBox, aColorText, rSet, SID_ATTR_CHAR_COLOR);
+ if( aFillColorBox.IsVisible() )
+ Reset_Impl( aFillColorBox, aFillColorText, rSet, SID_ATTR_CHAR_FILLCOLOR);
+
+ // Sprache
+ if( aLanguageBox.IsVisible() )
+ {
+ nWhich = GetWhich( SID_ATTR_CHAR_LANGUAGE );
+ aLanguageBox.SetNoSelection();
+ eState = rSet.GetItemState( nWhich );
+
+ switch ( eState )
+ {
+ case SFX_ITEM_UNKNOWN:
+ aLanguageText.Hide();
+ aLanguageBox.Hide();
+ break;
+
+ case SFX_ITEM_DISABLED:
+ case SFX_ITEM_READONLY:
+ aLanguageText.Disable();
+ aLanguageBox.Disable();
+ break;
+
+ case SFX_ITEM_DONTCARE:
+ aLanguageBox.SetNoSelection();
+ break;
+
+ case SFX_ITEM_DEFAULT:
+ case SFX_ITEM_SET:
+ {
+ const SvxLanguageItem& rItem =
+ (SvxLanguageItem&)rSet.Get( nWhich );
+ DBG_ASSERT( (LanguageType)rItem.GetValue() != LANGUAGE_SYSTEM,
+ "LANGUAGE_SYSTEM nicht erlaubt!" );
+ if ( (LanguageType)rItem.GetValue() != LANGUAGE_DONTKNOW )
+ {
+ USHORT nLang = SvxGetLanguagePos( SvxGetSelectableLanguages(),
+ rItem.GetValue() );
+ for ( USHORT i = 0; i < aLanguageBox.GetEntryCount(); ++i )
+ {
+ if ( (USHORT)(ULONG)aLanguageBox.GetEntryData(i) == nLang )
+ {
+ aLanguageBox.SelectEntryPos(i);
+ break;
+ }
+ }
+ }
+ break;
+ }
+ }
+ }
+
+
+ // alle Attribute des Beispiel-Window-Fonts einstellen
+ short nEsc = 0;
+ BYTE nEscProp = 100;
+ BYTE nProp = 100;
+ SvxCaseMap eCaseMap = SVX_CASEMAP_NOT_MAPPED;
+
+ // HochTief-Stellung
+ nWhich = GetWhich( SID_ATTR_CHAR_ESCAPEMENT );
+ eState = rSet.GetItemState( nWhich );
+
+ if ( eState >= SFX_ITEM_AVAILABLE )
+ {
+ const SvxEscapementItem& rItem =
+ (SvxEscapementItem&)rSet.Get( nWhich );
+ nEsc = rItem.GetEsc();
+ nEscProp = rItem.GetProp();
+ }
+
+ nWhich = GetWhich( SID_ATTR_CHAR_PROPSIZE );
+ eState = rSet.GetItemState( nWhich );
+
+ if ( eState >= SFX_ITEM_AVAILABLE )
+ {
+ const SvxPropSizeItem& rItem = (SvxPropSizeItem&)rSet.Get( nWhich );
+ nProp = (BYTE)rItem.GetValue();
+ }
+
+ // Auszeichnung
+ nWhich = GetWhich( SID_ATTR_CHAR_CASEMAP );
+ eState = rSet.GetItemState( nWhich );
+
+ if ( eState >= SFX_ITEM_AVAILABLE )
+ {
+ const SvxCaseMapItem& rItem = (const SvxCaseMapItem&)rSet.Get( nWhich );
+ eCaseMap = (SvxCaseMap)rItem.GetValue();
+ }
+
+ SvxFont& rFont = aExampleWin.GetFont();
+ nWhich = GetWhich( SID_ATTR_CHAR_KERNING );
+ eState = rSet.GetItemState( nWhich );
+
+ if ( eState >= SFX_ITEM_AVAILABLE )
+ {
+ MapUnit eUnit = (MapUnit)rSet.GetPool()->GetMetric( nWhich );
+ const SvxKerningItem& rItem = (SvxKerningItem&)rSet.Get( nWhich );
+ long nKern = LogicToLogic( rItem.GetValue(), eUnit, MAP_TWIP );
+ rFont.SetFixKerning( (short)nKern );
+ }
+ else
+ rFont.SetFixKerning( 0 );
+
+ /*
+ * Fontattribute aus den Attr-Controls
+ * ExampleFont in Klammern, damit diese Variable nicht mehr
+ * verwendet wird. Update() und andere holen sich den Font
+ * aus dem Beispielcontrol; das gibt nette Seiteneffekte, wenn
+ * dann mit diesem Font(aExampleFont) weitergearbeitet wird und
+ * dieser anschliessend in das Beispielcontrol selektiert wird.
+ */
+ if ( pFontItem )
+ {
+ rFont.SetFamily( pFontItem->GetFamily() );
+ rFont.SetName( pFontItem->GetFamilyName() );
+ rFont.SetPitch( pFontItem->GetPitch() );
+ rFont.SetCharSet( pFontItem->GetCharSet() );
+ }
+
+ nWhich = GetWhich( SID_ATTR_CHAR_FONTHEIGHT );
+ eState = rSet.GetItemState( nWhich );
+
+ if ( aSizeBox.IsRelativeMode() )
+ {
+ DBG_ASSERT( rSet.GetParent(), "No parent set" );
+
+ // SetValue wuerde nur einen Prozent-Wert zurueckgeben, deshalb
+ // den Wert vom Parent des Items abholen
+ SfxMapUnit eUnit = rSet.GetPool()->GetMetric( nWhich );
+ const SvxFontHeightItem& rItem =
+ (SvxFontHeightItem&)rSet.GetParent()->Get( nWhich );
+ rFont.SetSize( Size( 0, PointToTwips(
+ (long)CalcToPoint( rItem.GetHeight(), eUnit, 1 ) ) ) );
+ }
+ else if ( aSizeBox.GetText().Len() )
+ rFont.SetSize( Size( 0, PointToTwips( aSizeBox.GetValue() ) / 10 ) );
+ else
+ // als Default 10pt
+ rFont.SetSize( Size( 0, 200 ) );
+
+ rFont.SetWeight(
+ eWeight != WEIGHT_NORMAL ? WEIGHT_BOLD : WEIGHT_NORMAL );
+
+ rFont.SetItalic(
+ eItalic != ITALIC_NONE ? ITALIC_NORMAL : ITALIC_NONE );
+
+ rFont.SetUnderline(
+ StateToAttr( aUnderlineBtn.GetState() ) ? eUnderline : UNDERLINE_NONE );
+
+ rFont.SetStrikeout(
+ StateToAttr( aStrikeoutBtn.GetState() ) ? eStrikeout : STRIKEOUT_NONE );
+
+ // Outline Shadow
+ rFont.SetOutline( StateToAttr( aOutlineBtn.GetState() ) );
+ rFont.SetShadow( StateToAttr( aShadowBtn.GetState() ) );
+
+ // Color
+ rFont.SetColor( aColorBox.GetSelectEntryColor() );
+ if( aFillColorBox.IsVisible() )
+ {
+ Color aSelectedColor;
+ if( aFillColorBox.GetSelectEntry() == aStrTransparent )
+ aSelectedColor = Color( COL_TRANSPARENT );
+ else
+ aSelectedColor = aFillColorBox.GetSelectEntryColor();
+ rFont.SetFillColor( aSelectedColor );
+ }
+
+ // Kapitaelchen
+ rFont.SetCaseMap( eCaseMap );
+
+ // erst Relative Groesse dann Escapement
+ rFont.SetPropr( nProp );
+ rFont.SetProprRel( nEscProp );
+ rFont.SetEscapement( nEsc );
+
+ // WordLineMode
+ nWhich = GetWhich( SID_ATTR_CHAR_WORDLINEMODE );
+ eState = rSet.GetItemState( nWhich );
+
+ if ( eState >= SFX_ITEM_AVAILABLE )
+ {
+ const SvxWordLineModeItem& rItem =
+ (SvxWordLineModeItem&)rSet.Get( nWhich );
+ rFont.SetWordLineMode( rItem.GetValue() );
+ }
+
+ // Hintergrund umstellen
+ aExampleWin.Invalidate();
+
+ // Hilfetext
+ aFontTypeText.SetText( pFontList->GetFontMapText(
+ pFontList->Get( aFontBox.GetText(), aStyleBox.GetText() ) ) );
+
+ // alte Einstellungen merken
+ aFontBox.SaveValue();
+ aStyleBox.SaveValue();
+ aSizeBox.SaveValue();
+ aOutlineBtn.SaveValue();
+ aShadowBtn.SaveValue();
+ aUnderlineBtn.SaveValue();
+ aStrikeoutBtn.SaveValue();
+ aColorBox.SaveValue();
+ aFillColorBox.SaveValue();
+ aLanguageBox.SaveValue();
+}
+
+// -----------------------------------------------------------------------
+
+void SvxCharStdPage::DataChanged( const DataChangedEvent& rDCEvt )
+{
+ SfxTabPage::DataChanged( rDCEvt );
+ if ( bDeleteFontList )
+ delete (FontList*)_pFontList;
+ _pFontList = NULL;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxCharStdPage::EnableRelativeMode()
+{
+ DBG_ASSERT( GetItemSet().GetParent(), "RelativeMode, but no ParentSet!" );
+ aSizeBox.EnableRelativeMode( 0, 999 ); // min 0%, max 999%, step 5
+
+ USHORT nWhich = GetWhich( SID_ATTR_CHAR_FONTHEIGHT );
+ const SvxFontHeightItem& rItem =
+ (SvxFontHeightItem&)GetItemSet().GetParent()->Get( nWhich );
+ SfxMapUnit eUnit = GetItemSet().GetPool()->GetMetric( nWhich );
+ short nCurHeight = CalcToPoint( rItem.GetHeight(), eUnit, 1 ) * 10;
+
+ // ausgehend von der akt. Hoehe:
+ // - neagtiv bis minimal 2 pt
+ // - positiv bis maximal 999 pt
+ aSizeBox.EnablePtRelativeMode( -(nCurHeight - 20),
+ (9999 - nCurHeight), 10 );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxCharStdPage::SetInfoItem( const SvxFontListItem& rItem )
+{
+ if( bDeleteFontList )
+ {
+ delete (FontList*)_pFontList;
+ bDeleteFontList = FALSE;
+ }
+ _pFontList = rItem.GetFontList();
+}
+
+// -----------------------------------------------------------------------
+
+const FontList* SvxCharStdPage::GetFontList() const
+{
+ if ( !_pFontList )
+ {
+ SfxObjectShell* pDocSh = SfxObjectShell::Current();
+ const SfxPoolItem* pItem;
+
+ if ( pDocSh && ( pItem = pDocSh->GetItem( SID_ATTR_CHAR_FONTLIST ) ) )
+ ((SvxCharStdPage*)this)->_pFontList = ( (SvxFontListItem*)pItem )->GetFontList();
+ else
+ {
+ ((SvxCharStdPage*)this)->_pFontList = new FontList( Application::GetDefaultDevice() );
+ ((SvxCharStdPage*)this)->bDeleteFontList = TRUE;
+ }
+ }
+ return _pFontList;
+}
+
+// -----------------------------------------------------------------------
+
+SvxCharStdPage::SvxCharStdPage( Window* pParent,
+ const SfxItemSet& rAttr ) :
+
+ SfxTabPage( pParent, SVX_RES( RID_SVXPAGE_CHAR_STD ), rAttr ),
+
+ aFontText ( this, ResId( FT_FONT ) ),
+ aFontBox ( this, ResId( LB_FONT ) ),
+ aStyleText ( this, ResId( FT_STYLE ) ),
+ aStyleBox ( this, ResId( LB_STYLE ) ),
+ aSizeText ( this, ResId( FT_SIZE ) ),
+ aSizeBox ( this, ResId( LB_SIZE ) ),
+ aOutlineBtn ( this, ResId( BTN_OUTLINE ) ),
+ aShadowBtn ( this, ResId( BTN_SHADOW ) ),
+ aUnderlineBtn ( this, ResId( BTN_UNDERLINE ) ),
+ aStrikeoutBtn ( this, ResId( BTN_STRIKEOUT ) ),
+ aCasemapBox ( this, ResId( GB_CASEMAP ) ),
+ aColorText ( this, ResId( FT_COLOR ) ),
+ aColorBox ( this, ResId( LB_COLOR ) ),
+ aFillColorText ( this, ResId( FT_FILLCOLOR ) ),
+ aFillColorBox ( this, ResId( LB_FILLCOLOR ) ),
+ aLanguageText ( this, ResId( FT_LANGUAGE ) ),
+ aLanguageBox ( this, ResId( LB_LANGUAGE ) ),
+ aFontTypeText ( this, ResId( FT_FONTTYPE ) ),
+ aExampleWin ( this, ResId( WIN_EXAMPLE ) ),
+ aExampleBox ( this, ResId( GB_EXAMPLE ) ),
+ aStrTransparent ( ResId( STR_TRANSPARENT ) ),
+ aNoStyleStr ( ResId( STR_NOSTYLE ) ),
+ _pFontList ( NULL ),
+ eUnderline ( UNDERLINE_NONE ),
+ eStrikeout ( STRIKEOUT_NONE ),
+ bDeleteFontList ( FALSE ),
+ bInSearchMode ( FALSE ),
+ nExtraEntryPos ( LISTBOX_ENTRY_NOTFOUND )
+
+{
+ FreeResource();
+
+ const SfxPoolItem* pItem;
+ SfxObjectShell* pShell;
+ if(SFX_ITEM_SET == rAttr.GetItemState(SID_HTML_MODE, FALSE, &pItem) ||
+ ( 0 != ( pShell = SfxObjectShell::Current()) &&
+ 0 != (pItem = pShell->GetItem(SID_HTML_MODE))))
+ {
+ USHORT nHtmlMode = ((const SfxUInt16Item*)pItem)->GetValue();
+ if(nHtmlMode & HTMLMODE_ON)
+ {
+ aOutlineBtn .Hide();
+ aShadowBtn .Hide();
+ aUnderlineBtn .SetPosPixel(aOutlineBtn .GetPosPixel());
+ aStrikeoutBtn .SetPosPixel(aShadowBtn .GetPosPixel());
+ }
+ }
+
+ // diese Page braucht ExchangeSupport
+ SetExchangeSupport();
+
+ SetHandler_Impl();
+
+ // ColorBox aus der XColorTable fuellen.
+ SfxObjectShell* pDocSh = SfxObjectShell::Current();
+ XColorTable* pColorTable = NULL;
+ FASTBOOL bKillTable = FALSE;
+ SfxIniManager* pIniMgr = SFX_INIMANAGER();
+
+ DBG_ASSERT( pDocSh, "DocShell not found!" );
+
+ if ( pDocSh && ( pItem = pDocSh->GetItem( SID_COLOR_TABLE ) ) )
+ pColorTable = ( (SvxColorTableItem*)pItem )->GetColorTable();
+
+ if ( !pColorTable )
+ {
+ pColorTable = new XColorTable( pIniMgr->Get( SFX_KEY_PALETTE_PATH ) );
+ bKillTable = TRUE;
+ }
+
+ aColorBox.SetUpdateMode( FALSE );
+
+ for ( long i = 0; i < pColorTable->Count(); i++ )
+ {
+ XColorEntry* pEntry = pColorTable->Get(i);
+ aColorBox.InsertEntry( pEntry->GetColor(), pEntry->GetName() );
+ }
+ aColorBox.SetUpdateMode( TRUE );
+
+ if( SFX_ITEM_SET == rAttr.GetItemState(SID_ATTR_CHAR_FILLCOLOR, FALSE ) )
+ {
+ aFillColorBox.SetUpdateMode( FALSE );
+ aFillColorBox.CopyEntries( aColorBox );
+ aFillColorBox.InsertEntry( aStrTransparent, 0 );
+ aFillColorBox.SetUpdateMode( TRUE );
+ aLanguageBox.Hide();
+ aLanguageText.Hide();
+ aFillColorBox.Show();
+ aFillColorText.Show();
+ }
+
+ if ( bKillTable )
+ delete pColorTable;
+
+ aTimer.Start();
+}
+
+// -----------------------------------------------------------------------
+
+SvxCharStdPage::~SvxCharStdPage()
+{
+ if( bDeleteFontList )
+ delete (FontList*)_pFontList;
+}
+
+// -----------------------------------------------------------------------
+
+USHORT* SvxCharStdPage::GetRanges()
+{
+ return pStdRanges;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxCharStdPage::Reset_Impl( ColorListBox& rColorBox,
+ FixedText& rColorText, const SfxItemSet& rSet, USHORT nSlot )
+{
+ USHORT nWhich = GetWhich( nSlot );
+ SfxItemState eState = rSet.GetItemState( nWhich );
+
+ switch ( eState )
+ {
+ case SFX_ITEM_UNKNOWN:
+ rColorText.Hide();
+ rColorBox.Hide();
+ break;
+
+ case SFX_ITEM_DISABLED:
+ case SFX_ITEM_READONLY:
+ rColorText.Disable();
+ rColorBox.Disable();
+ break;
+
+ case SFX_ITEM_DONTCARE:
+ rColorBox.SetNoSelection();
+ break;
+
+ case SFX_ITEM_DEFAULT:
+ case SFX_ITEM_SET:
+ {
+ const SvxColorItem& rItem = (SvxColorItem&)rSet.Get( nWhich );
+ Color aColor = rItem.GetValue();
+ USHORT nSelPos = rColorBox.GetEntryPos( aColor );
+ if( nSelPos == LISTBOX_ENTRY_NOTFOUND &&
+ aColor == Color(COL_TRANSPARENT) )
+ nSelPos = rColorBox.GetEntryPos( aStrTransparent );
+
+ if ( LISTBOX_ENTRY_NOTFOUND != nSelPos )
+ rColorBox.SelectEntryPos( nSelPos );
+ else
+ {
+ nSelPos = rColorBox.GetEntryPos( aColor );
+ if ( LISTBOX_ENTRY_NOTFOUND != nSelPos )
+ rColorBox.SelectEntryPos( nSelPos );
+ else
+ rColorBox.SelectEntryPos( rColorBox.InsertEntry(
+ aColor, String( SVX_RES( RID_SVXSTR_COLOR_USER ) ) ) );
+ }
+ break;
+ }
+ }
+}
+
+// -----------------------------------------------------------------------
+
+BOOL SvxCharStdPage::FillItemSet_Impl( const ColorListBox& rColorBox,
+ SfxItemSet& rSet, USHORT nSlot )
+{
+ USHORT nWhich = GetWhich( nSlot );
+ const SvxColorItem* pOld = (const SvxColorItem*)GetOldItem( rSet, nSlot );
+ const SvxColorItem* pItem = 0;
+ BOOL bChanged = TRUE;
+ const SfxItemSet* pExampleSet =
+ GetTabDialog() ? GetTabDialog()->GetExampleSet() : NULL;
+ const SfxItemSet& rOldSet = GetItemSet();
+
+ Color aSelectedColor;
+ if( rColorBox.GetSelectEntry() == aStrTransparent )
+ aSelectedColor = Color( COL_TRANSPARENT );
+ else
+ aSelectedColor = rColorBox.GetSelectEntryColor();
+
+ if ( pOld && pOld->GetValue() == aSelectedColor )
+ bChanged = FALSE;
+
+ if ( !bChanged )
+ bChanged = ( rColorBox.GetSavedValue() == LISTBOX_ENTRY_NOTFOUND );
+
+ if ( !bChanged && pExampleSet &&
+ pExampleSet->GetItemState(nWhich, FALSE, (const SfxPoolItem**)&pItem) == SFX_ITEM_SET &&
+ ( (SvxColorItem*)pItem)->GetValue() != aSelectedColor )
+ bChanged = TRUE;
+
+ BOOL bModified = FALSE;
+
+ if ( bChanged && rColorBox.GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND )
+ {
+ rSet.Put( SvxColorItem( aSelectedColor, nWhich ) );
+ bModified = TRUE;
+ }
+ else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) )
+ rSet.ClearItem( nWhich );
+
+ return bModified;
+}
+
+
+// -----------------------------------------------------------------------
+
+void SvxCharStdPage::ActivatePage( const SfxItemSet& rSet )
+{
+ SvxFont& rFont = aExampleWin.GetFont();
+
+ // WordLineMode
+ USHORT nWhich = GetWhich( SID_ATTR_CHAR_WORDLINEMODE );
+
+ if ( rSet.GetItemState( nWhich ) == SFX_ITEM_SET )
+ {
+ const SvxWordLineModeItem& rItem =
+ (SvxWordLineModeItem&)rSet.Get( nWhich );
+ rFont.SetWordLineMode( rItem.GetValue() );
+ }
+
+ short nEsc = 0;
+ BYTE nEscProp = 100;
+ BYTE nProp = 100;
+ SvxCaseMap eCaseMap = SVX_CASEMAP_NOT_MAPPED;
+
+ // Proportionale Textgroesse
+ nWhich = GetWhich( SID_ATTR_CHAR_PROPSIZE );
+
+ if ( rSet.GetItemState( nWhich ) == SFX_ITEM_SET )
+ {
+ const SvxPropSizeItem& rItem = (SvxPropSizeItem&)rSet.Get( nWhich );
+ nProp = (BYTE)rItem.GetValue();
+ }
+
+ // HochTief-Stellung
+ nWhich = GetWhich( SID_ATTR_CHAR_ESCAPEMENT );
+
+ if ( rSet.GetItemState( nWhich ) == SFX_ITEM_SET )
+ {
+ const SvxEscapementItem& rItem = (SvxEscapementItem&)rSet.Get( nWhich );
+ nEsc = rItem.GetEsc();
+ nEscProp = rItem.GetProp();
+ }
+
+ // BspFont setzen
+ rFont.SetPropr( nProp );
+ rFont.SetProprRel( nEscProp );
+ rFont.SetEscapement( nEsc );
+
+ // Auszeichnung
+ nWhich = GetWhich( SID_ATTR_CHAR_CASEMAP );
+
+ if ( rSet.GetItemState( nWhich ) == SFX_ITEM_SET )
+ {
+ const SvxCaseMapItem& rItem = (const SvxCaseMapItem&)rSet.Get( nWhich );
+ eCaseMap = (SvxCaseMap)rItem.GetValue();
+ }
+ rFont.SetCaseMap( eCaseMap );
+
+ // Kerning
+ nWhich = GetWhich( SID_ATTR_CHAR_KERNING );
+
+ if ( rSet.GetItemState( nWhich ) == SFX_ITEM_SET )
+ {
+ const SvxKerningItem& rItem = (SvxKerningItem&)rSet.Get( nWhich );
+ MapUnit eUnit = (MapUnit)rSet.GetPool()->GetMetric( nWhich );
+ long nKern = LogicToLogic( rItem.GetValue(), eUnit, MAP_TWIP );
+ rFont.SetFixKerning( (short)nKern );
+ }
+
+ // Unterstrichen
+ nWhich = GetWhich( SID_ATTR_CHAR_UNDERLINE );
+
+ if ( rSet.GetItemState( nWhich ) == SFX_ITEM_SET )
+ {
+ const SvxUnderlineItem& rItem = (SvxUnderlineItem&)rSet.Get( nWhich );
+ eUnderline = (FontUnderline)rItem.GetValue();
+ rFont.SetUnderline( eUnderline );
+ if ( eUnderline == UNDERLINE_NONE )
+ aUnderlineBtn.SetState( STATE_NOCHECK );
+ }
+
+ // Durchgestrichen
+ nWhich = GetWhich( SID_ATTR_CHAR_STRIKEOUT );
+
+ if ( rSet.GetItemState( nWhich ) == SFX_ITEM_SET )
+ {
+ const SvxCrossedOutItem& rItem = (SvxCrossedOutItem&)rSet.Get( nWhich );
+ eStrikeout = (FontStrikeout)rItem.GetValue();
+ rFont.SetStrikeout( eStrikeout );
+ if ( eStrikeout == STRIKEOUT_NONE )
+ aStrikeoutBtn.SetState( STATE_NOCHECK );
+ }
+
+ // Hintergrundbrush
+ nWhich = GetWhich( SID_ATTR_BRUSH );
+
+ if ( rSet.GetItemState( nWhich ) == SFX_ITEM_SET )
+ {
+ const SvxBrushItem& rItem = (SvxBrushItem&)rSet.Get( nWhich );
+ aExampleWin.SetColor( rItem.GetColor() );
+ }
+
+ UpdateExample_Impl();
+}
+
+// -----------------------------------------------------------------------
+
+int SvxCharStdPage::DeactivatePage( SfxItemSet* pSet )
+{
+ if ( pSet )
+ FillItemSet( *pSet );
+ return LEAVE_PAGE;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxCharStdPage::SetHandler_Impl()
+{
+ // Handler jeweils fuer Update der Beispielbox
+ aTimer.SetTimeout( 350 );
+ aTimer.SetTimeoutHdl( LINK( this, SvxCharStdPage, TimeoutHdl_Impl ) );
+
+ Link aModLink = LINK( this, SvxCharStdPage, BoxModifyHdl_Impl );
+ aFontBox.SetModifyHdl( aModLink );
+ aStyleBox.SetModifyHdl( aModLink );
+ aSizeBox.SetModifyHdl( aModLink );
+
+ aOutlineBtn.SetClickHdl(
+ LINK( this, SvxCharStdPage, OutlineClickHdl_Impl ) );
+ aShadowBtn.SetClickHdl(
+ LINK( this, SvxCharStdPage, ShadowClickHdl_Impl ) );
+ aUnderlineBtn.SetClickHdl(
+ LINK( this, SvxCharStdPage, UnderlineClickHdl_Impl ) );
+ aStrikeoutBtn.SetClickHdl(
+ LINK( this, SvxCharStdPage, StrikeoutClickHdl_Impl ) );
+
+ aColorBox.SetSelectHdl(
+ LINK( this, SvxCharStdPage, ColorBoxSelectHdl_Impl ) );
+ aFillColorBox.SetSelectHdl(
+ LINK( this, SvxCharStdPage, ColorBoxSelectHdl_Impl ) );
+
+ // initialisieren Sprachen
+ const USHORT nLanguageCount = SvxGetSelectableLanguages().getLength();
+ const util::Language *pLang = SvxGetSelectableLanguages().getConstArray();
+ for ( USHORT i = 0; i < nLanguageCount; ++i )
+ {
+ LanguageType eType = pLang[i];
+ USHORT nPos;
+
+ nPos = aLanguageBox.InsertEntry( ::GetLanguageString( eType ) );
+ aLanguageBox.SetEntryData( nPos, (void*)(ULONG)i );
+ }
+ }
+
+// -----------------------------------------------------------------------
+
+void SvxCharStdPage::UpdateExample_Impl()
+{
+ SvxFont& rFont = aExampleWin.GetFont();
+ Size aSize = rFont.GetSize();
+ aSize.Width() = 0;
+
+ // Font
+ const FontList* pFontList = GetFontList();
+ FontInfo aFontInfo( pFontList->Get( aFontBox.GetText(),
+ aStyleBox.GetText() ) );
+ // Size
+ if ( aSizeBox.IsRelative() )
+ {
+ DBG_ASSERT( GetItemSet().GetParent(), "No parent set" );
+
+ USHORT nWhich = GetWhich( SID_ATTR_CHAR_FONTHEIGHT );
+ const SvxFontHeightItem& rOldItem =
+ (SvxFontHeightItem&)GetItemSet().GetParent()->Get( nWhich );
+
+ // alter Wert, skaliert
+ long nHeight;
+ if( aSizeBox.IsPtRelative() )
+ nHeight = rOldItem.GetHeight() +
+ PointToTwips( aSizeBox.GetValue() / 10 );
+ else
+ nHeight = rOldItem.GetHeight() * aSizeBox.GetValue() / 100;
+
+ // Umrechnung in twips fuer das Beispiel-Window
+ aSize.Height() = ItemToControl( nHeight,
+ GetItemSet().GetPool()->GetMetric( nWhich ), SFX_FUNIT_TWIP );
+ }
+ else if ( aSizeBox.GetText().Len() )
+ aSize.Height() = PointToTwips( aSizeBox.GetValue() / 10 );
+ else
+ aSize.Height() = 200; // als Default 10pt
+ aFontInfo.SetSize( aSize );
+
+ rFont.SetFamily( aFontInfo.GetFamily() );
+ rFont.SetName( aFontInfo.GetName() );
+ rFont.SetStyleName( aFontInfo.GetStyleName() );
+ rFont.SetPitch( aFontInfo.GetPitch() );
+ rFont.SetCharSet( aFontInfo.GetCharSet() );
+ rFont.SetWeight( aFontInfo.GetWeight() );
+ rFont.SetItalic( aFontInfo.GetItalic() );
+ rFont.SetSize( aFontInfo.GetSize() );
+
+ aExampleWin.Invalidate();
+ aFontTypeText.SetText( pFontList->GetFontMapText( aFontInfo ) );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxCharStdPage::FillStyleBox_Impl()
+{
+ const FontList* pFontList = GetFontList();
+ DBG_ASSERT( pFontList, "no fontlist" );
+ // "Uber FontInfo und Fontlist die StyleBox f"ullen
+ aStyleBox.Fill( aFontBox.GetText(), pFontList );
+
+ if ( bInSearchMode )
+ {
+ // Bei der Suche zus"atzliche Eintr"age:
+ // "Nicht Fett" und "Nicht Kursiv"
+ String aEntry = aNoStyleStr;
+ const sal_Char sS[] = "%s";
+ aEntry.SearchAndReplaceAscii( sS, pFontList->GetBoldStr() );
+ nExtraEntryPos = aStyleBox.InsertEntry( aEntry );
+ aEntry = aNoStyleStr;
+ aEntry.SearchAndReplaceAscii( sS, pFontList->GetItalicStr() );
+ aStyleBox.InsertEntry( aEntry );
+ }
+}
+
+// -----------------------------------------------------------------------
+
+void SvxCharStdPage::FillSizeBox_Impl()
+{
+ const FontList* pFontList = GetFontList();
+ // Ueber FontInfo und Fontlist Size fuellen
+ aSizeBox.Fill( pFontList->Get( aFontBox.GetText(), aStyleBox.GetText() ),
+ pFontList );
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK_INLINE_START( SvxCharStdPage, TimeoutHdl_Impl, Timer *, EMPTYARG )
+{
+ UpdateExample_Impl();
+ return 0;
+}
+IMPL_LINK_INLINE_END( SvxCharStdPage, TimeoutHdl_Impl, Timer *, EMPTYARG )
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxCharStdPage, BoxModifyHdl_Impl, void *, pBox )
+{
+ aTimer.Start();
+
+ if ( &aFontBox == pBox )
+ {
+ FillStyleBox_Impl();
+ FillSizeBox_Impl();
+ }
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK_INLINE_START( SvxCharStdPage, OutlineClickHdl_Impl, TriStateBox *, pBtn )
+{
+ pBtn->EnableTriState( FALSE );
+ SvxFont& rFont = aExampleWin.GetFont();
+ rFont.SetOutline( StateToAttr( pBtn->GetState() ) );
+ aExampleWin.Invalidate();
+ return 0;
+}
+IMPL_LINK_INLINE_END( SvxCharStdPage, OutlineClickHdl_Impl, TriStateBox *, pBtn )
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK_INLINE_START( SvxCharStdPage, ShadowClickHdl_Impl, TriStateBox *, pBtn )
+{
+ pBtn->EnableTriState( FALSE );
+ SvxFont& rFont = aExampleWin.GetFont();
+ rFont.SetShadow( StateToAttr( pBtn->GetState() ) );
+ aExampleWin.Invalidate();
+ return 0;
+}
+IMPL_LINK_INLINE_END( SvxCharStdPage, ShadowClickHdl_Impl, TriStateBox *, pBtn )
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxCharStdPage, UnderlineClickHdl_Impl, TriStateBox *, pBtn )
+{
+ pBtn->EnableTriState( FALSE );
+ SvxFont& rFont = aExampleWin.GetFont();
+ eUnderline = StateToAttr( pBtn->GetState() ) == TRUE ? UNDERLINE_SINGLE
+ : UNDERLINE_NONE;
+ rFont.SetUnderline( eUnderline );
+ UpdateExample_Impl();
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxCharStdPage, StrikeoutClickHdl_Impl, TriStateBox *, pBtn )
+{
+ pBtn->EnableTriState( FALSE );
+ SvxFont& rFont = aExampleWin.GetFont();
+ eStrikeout = StateToAttr( pBtn->GetState() ) == TRUE ? STRIKEOUT_SINGLE
+ : STRIKEOUT_NONE;
+ rFont.SetStrikeout( eStrikeout );
+ UpdateExample_Impl();
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK_INLINE_START( SvxCharStdPage, ColorBoxSelectHdl_Impl, ColorListBox *, pBox )
+{
+ SvxFont& rFont = aExampleWin.GetFont();
+ Color aSelectedColor;
+ if( pBox->GetSelectEntry() == aStrTransparent )
+ aSelectedColor = Color( COL_TRANSPARENT );
+ else
+ aSelectedColor = pBox->GetSelectEntryColor();
+
+ if( pBox == &aColorBox )
+ rFont.SetColor( aSelectedColor );
+ else
+ rFont.SetFillColor( aSelectedColor );
+ UpdateExample_Impl();
+ return 0;
+}
+IMPL_LINK_INLINE_END( SvxCharStdPage, ColorBoxSelectHdl_Impl, ColorListBox *, pBox )
+
+// class SvxCharExtPage --------------------------------------------------
+
+SfxTabPage* SvxCharExtPage::Create( Window* pParent, const SfxItemSet& rSet )
+{
+ return new SvxCharExtPage( pParent, rSet );
+}
+
+// -----------------------------------------------------------------------
+
+BOOL SvxCharExtPage::FillItemSet( SfxItemSet& rSet )
+{
+ const SfxPoolItem* pOld = 0;
+ const SfxItemSet& rOldSet = GetItemSet();
+ BOOL bModified = FALSE;
+ FASTBOOL bChanged = TRUE;
+
+ // Wortweise
+ USHORT nWhich = GetWhich( SID_ATTR_CHAR_WORDLINEMODE );
+ pOld = GetOldItem( rSet, SID_ATTR_CHAR_WORDLINEMODE );
+
+ if ( pOld )
+ {
+ const SvxWordLineModeItem& rItem = *( (const SvxWordLineModeItem*)pOld );
+
+ if ( rItem.GetValue() == aWordBox.IsChecked() )
+ bChanged = FALSE;
+ }
+
+ if ( rOldSet.GetItemState( nWhich ) == SFX_ITEM_DONTCARE &&
+ aWordBox.IsChecked() == aWordBox.GetSavedValue() )
+ bChanged = FALSE;
+
+ if ( bChanged )
+ {
+ rSet.Put( SvxWordLineModeItem( aWordBox.IsChecked(), nWhich ) );
+ bModified |= TRUE;
+ }
+ else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) )
+ rSet.ClearItem( nWhich );
+ bChanged = TRUE;
+
+ // Auszeichnung
+ nWhich = GetWhich( SID_ATTR_CHAR_CASEMAP );
+ pOld = GetOldItem( rSet, SID_ATTR_CHAR_CASEMAP );
+ SvxCaseMap eCaseMap = SVX_CASEMAP_NOT_MAPPED;
+ FASTBOOL bChecked = FALSE;
+
+#if ( SUPD < 590 )
+ if ( aCapsBtn.IsChecked() )
+ {
+ eCaseMap = SVX_CASEMAP_VERSALIEN;
+ bChecked = TRUE;
+ }
+ else if ( aLowercaseBtn.IsChecked() )
+ {
+ eCaseMap = SVX_CASEMAP_GEMEINE;
+ bChecked = TRUE;
+ }
+ else if ( aSmallcapsBtn.IsChecked() )
+ {
+ eCaseMap = SVX_CASEMAP_KAPITAELCHEN;
+ bChecked = TRUE;
+ }
+ else if ( aTitelBtn.IsChecked() )
+ {
+ eCaseMap = SVX_CASEMAP_TITEL;
+ bChecked = TRUE;
+ }
+ else if ( aNoneBtn.IsChecked() )
+ bChecked = TRUE;
+#else
+ USHORT nCapsPos = aCapsLB.GetSelectEntryPos();
+ if ( nCapsPos != LISTBOX_ENTRY_NOTFOUND )
+ {
+ eCaseMap = (SvxCaseMap)nCapsPos;
+ bChecked = TRUE;
+ }
+#endif
+
+ if ( pOld )
+ {
+ const SvxCaseMapItem& rItem = *( (const SvxCaseMapItem*)pOld );
+
+ if ( (SvxCaseMap)rItem.GetValue() == eCaseMap )
+ bChanged = FALSE;
+ }
+
+#if ( SUPD < 590 )
+ if ( !bChanged && !aNoneBtn.GetSavedValue() &&
+ !aCapsBtn.GetSavedValue() && !aLowercaseBtn.GetSavedValue() &&
+ !aSmallcapsBtn.GetSavedValue() && !aTitelBtn.GetSavedValue() )
+ bChanged = TRUE;
+#endif
+
+ if ( bChanged && bChecked )
+ {
+ rSet.Put( SvxCaseMapItem( eCaseMap, nWhich ) );
+ bModified |= TRUE;
+ }
+ else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) )
+ rSet.ClearItem( nWhich );
+ bChanged = TRUE;
+
+ // Position (hoch, normal oder tief)
+ nWhich = GetWhich( SID_ATTR_CHAR_ESCAPEMENT );
+ pOld = GetOldItem( rSet, SID_ATTR_CHAR_ESCAPEMENT );
+ const FASTBOOL bHigh = aHighBtn.IsChecked();
+ short nEsc;
+ BYTE nEscProp;
+
+ if ( bHigh || aDeepBtn.IsChecked() )
+ {
+ if(aAutoPosBox.IsChecked())
+ {
+ nEsc = bHigh ? DFLT_ESC_AUTO_SUPER : DFLT_ESC_AUTO_SUB;
+ }
+ else
+ {
+ nEsc = (short)aEscRelPosEdit.Denormalize( aEscRelPosEdit.GetValue() );
+ nEsc *= bHigh ? 1 : -1;
+ }
+ nEscProp = (BYTE)aEscRelSizeEdit.Denormalize(
+ aEscRelSizeEdit.GetValue() );
+ }
+ else
+ {
+ nEsc = 0;
+ nEscProp = 100;
+ }
+
+ if ( pOld )
+ {
+ const SvxEscapementItem& rItem = *( (const SvxEscapementItem*)pOld );
+
+ // Wert gleich geblieben oder kein Button gecheckt?
+ if ( rItem.GetEsc() == nEsc && rItem.GetProp() == nEscProp )
+ bChanged = FALSE;
+ }
+
+ if ( !bChanged && !aHighBtn.GetSavedValue() &&
+ !aNormalBtn.GetSavedValue() && !aDeepBtn.GetSavedValue() )
+ bChanged = TRUE;
+
+ if ( bChanged &&
+ ( aHighBtn.IsChecked() ||
+ aNormalBtn.IsChecked() ||
+ aDeepBtn.IsChecked() ) )
+ {
+ rSet.Put( SvxEscapementItem( nEsc, nEscProp, nWhich ) );
+ bModified |= TRUE;
+ }
+ else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) )
+ rSet.ClearItem( nWhich );
+ bChanged = TRUE;
+
+ // Kerning
+ nWhich = GetWhich( SID_ATTR_CHAR_KERNING );
+ pOld = GetOldItem( rSet, SID_ATTR_CHAR_KERNING );
+ USHORT nPos = aKerningListBox.GetSelectEntryPos();
+ short nKerning = 0;
+ SfxMapUnit eUnit = rSet.GetPool()->GetMetric( nWhich );
+
+ if ( nPos == LW_GESPERRT || nPos == LW_SCHMAL )
+ {
+ long nTmp = aKerningEdit.GetValue();
+ long nVal = LogicToLogic( nTmp, MAP_POINT, (MapUnit)eUnit );
+ nKerning = (short)aKerningEdit.Denormalize( nVal );
+
+ if ( nPos == LW_SCHMAL )
+ nKerning *= - 1;
+ }
+
+ if ( pOld )
+ {
+ const SvxKerningItem& rItem = *( (const SvxKerningItem*)pOld );
+
+ if ( rItem.GetValue() == nKerning )
+ bChanged = FALSE;
+ }
+
+ if ( !bChanged &&
+ ( aKerningListBox.GetSavedValue() == LISTBOX_ENTRY_NOTFOUND ||
+ !aKerningEdit.GetSavedValue().Len() ) )
+ bChanged = TRUE;
+
+ if ( bChanged && nPos != LISTBOX_ENTRY_NOTFOUND )
+ {
+ rSet.Put( SvxKerningItem( nKerning, nWhich ) );
+ bModified |= TRUE;
+ }
+ else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) )
+ rSet.ClearItem( nWhich );
+ bChanged = TRUE;
+
+ // Pair-Kerning
+ nWhich = GetWhich( SID_ATTR_CHAR_AUTOKERN );
+
+ if ( aAutoKernBtn.IsChecked() != aAutoKernBtn.GetSavedValue() )
+ {
+ rSet.Put( SvxAutoKernItem( aAutoKernBtn.IsChecked(), nWhich ) );
+ bModified |= TRUE;
+ }
+ else if ( SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) )
+ rSet.ClearItem( nWhich );
+
+ // Unterstrichen
+ nWhich = GetWhich( SID_ATTR_CHAR_UNDERLINE );
+ pOld = GetOldItem( rSet, SID_ATTR_CHAR_UNDERLINE );
+ nPos = aUnderlineBox.GetSelectEntryPos();
+ FontUnderline eUnder = (FontUnderline)(ULONG)aUnderlineBox.GetEntryData( nPos );
+
+ if ( pOld )
+ {
+ const SvxUnderlineItem& rItem = *( (const SvxUnderlineItem*)pOld );
+
+ if ( !aUnderlineBox.IsEnabled() ||
+ (FontUnderline)rItem.GetValue() == eUnder )
+ bChanged = FALSE;
+ }
+
+ FASTBOOL bTmp = FALSE;
+ SfxTabDialog* pDlg = GetTabDialog();
+ const SfxItemSet* pExSet = NULL;
+
+ if ( pDlg )
+ pExSet = pDlg->GetExampleSet();
+
+ if ( aUnderlineBox.IsEnabled() )
+ {
+ if ( bChanged )
+ {
+ const SvxUnderlineItem* pTmp = NULL;
+ SfxItemState eState = SFX_ITEM_UNKNOWN;
+
+ if ( pExSet )
+ eState = pExSet->GetItemState( nWhich, TRUE, (const SfxPoolItem**)&pTmp );
+
+ if ( pTmp && pTmp->GetUnderline() != UNDERLINE_NONE )
+ bTmp = TRUE;
+ else if ( !pTmp )
+ {
+ pTmp = (SvxUnderlineItem*)GetItem( rOldSet, SID_ATTR_CHAR_UNDERLINE );
+ if ( pTmp && pTmp->GetUnderline() != UNDERLINE_NONE )
+ bTmp = TRUE;
+ }
+
+ if ( bTmp || SFX_ITEM_DONTCARE == eState )
+ {
+ rSet.Put( SvxUnderlineItem( eUnder, nWhich ) );
+ bModified |= TRUE;
+ }
+ }
+
+ if ( ( !bChanged || !bTmp ) &&
+ SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) )
+ rSet.ClearItem( nWhich );
+ }
+ bChanged = TRUE;
+
+ // Durchgestrichen
+ nWhich = GetWhich( SID_ATTR_CHAR_STRIKEOUT );
+ pOld = GetOldItem( rSet, SID_ATTR_CHAR_UNDERLINE );
+ nPos = aStrikeoutBox.GetSelectEntryPos();
+ FontStrikeout eStrike = (FontStrikeout)(ULONG)aStrikeoutBox.GetEntryData( nPos );
+
+ if ( pOld )
+ {
+ const SvxCrossedOutItem& rItem = *( (const SvxCrossedOutItem*)pOld );
+
+ if ( !aStrikeoutBox.IsEnabled() || (FontStrikeout)rItem.GetValue() == eStrike )
+ bChanged = FALSE;
+ }
+
+ bTmp = FALSE;
+
+ if ( aStrikeoutBox.IsEnabled() )
+ {
+ if ( bChanged )
+ {
+ const SvxCrossedOutItem* pTmp = NULL;
+ SfxItemState eState = SFX_ITEM_UNKNOWN;
+
+ if ( pExSet )
+ eState = pExSet->GetItemState( nWhich, TRUE, (const SfxPoolItem**)&pTmp );
+
+ if ( pTmp && pTmp->GetStrikeout() != STRIKEOUT_NONE )
+ bTmp = TRUE;
+ else if ( !pTmp )
+ {
+ pTmp = (SvxCrossedOutItem*)GetItem( rOldSet, SID_ATTR_CHAR_STRIKEOUT );
+ if ( pTmp && pTmp->GetStrikeout() != STRIKEOUT_NONE )
+ bTmp = TRUE;
+ }
+
+ if ( bTmp || SFX_ITEM_DONTCARE == eState )
+ {
+ rSet.Put( SvxCrossedOutItem( eStrike, nWhich ) );
+ bModified |= TRUE;
+ }
+ }
+
+ if ( ( !bChanged || !bTmp ) &&
+ SFX_ITEM_DEFAULT == rOldSet.GetItemState( nWhich, FALSE ) )
+ rSet.ClearItem( nWhich );
+ }
+
+ //blinken
+
+ if ( aFlashBox.IsChecked() != aFlashBox.GetSavedValue())
+ {
+ nWhich = GetWhich( SID_ATTR_FLASH );
+ rSet.Put(SvxBlinkItem(aFlashBox.IsChecked(), nWhich));
+ bModified |= TRUE;
+ }
+
+ return bModified;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxCharExtPage::Reset( const SfxItemSet& rSet )
+{
+ bInReset = TRUE;
+ String sUser = GetUserData();
+
+ if ( sUser.Len() )
+ {
+ nSuperEsc = (short)sUser.GetToken( 0 ).ToInt32();
+ nSubEsc = (short)sUser.GetToken( 1 ).ToInt32();
+ nSuperProp = (BYTE)sUser.GetToken( 2 ).ToInt32();
+ nSubProp = (BYTE)sUser.GetToken( 3 ).ToInt32();
+ }
+ ActivatePage( rSet );
+
+ SvxFont& rFont = aExampleWin.GetFont();
+ USHORT nWhich;
+
+ // WordLineMode
+ nWhich = GetWhich( SID_ATTR_CHAR_WORDLINEMODE );
+
+ if ( rSet.GetItemState( nWhich ) >= SFX_ITEM_AVAILABLE )
+ {
+ const SvxWordLineModeItem& rItem =
+ (SvxWordLineModeItem&)rSet.Get( nWhich );
+ rFont.SetWordLineMode( rItem.GetValue() );
+ aWordBox.Check( rItem.GetValue() );
+ }
+
+ short nEsc = 0;
+ BYTE nEscProp = 100;
+ BYTE nProp = 100;
+
+ aEscRelPosEdit.Disable();
+ aEscRelPosText.Disable();
+ aEscRelSizeEdit.Disable();
+ aEscRelSizeText.Disable();
+
+ // HochTief-Stellung
+ nWhich = GetWhich( SID_ATTR_CHAR_ESCAPEMENT );
+
+ if ( rSet.GetItemState( nWhich ) >= SFX_ITEM_AVAILABLE )
+ {
+ const SvxEscapementItem& rItem = (SvxEscapementItem&)rSet.Get( nWhich );
+ nEsc = rItem.GetEsc();
+ nEscProp = rItem.GetProp();
+
+ if ( nEsc != 0 )
+ {
+ aEscRelPosEdit.Enable();
+ aEscRelPosText.Enable();
+ aEscRelSizeEdit.Enable();
+ aEscRelSizeText.Enable();
+
+ short nFac;
+
+ if ( nEsc > 0 )
+ {
+ nFac = 1;
+ aHighBtn.Check( TRUE );
+ if(nEsc == DFLT_ESC_AUTO_SUPER)
+ {
+ aAutoPosBox.Check(TRUE);
+ nEsc = DFLT_ESC_SUPER;
+ }
+ }
+ else
+ {
+ nFac = -1;
+ aDeepBtn.Check( TRUE );
+ if(nEsc == DFLT_ESC_AUTO_SUB)
+ {
+ aAutoPosBox.Check(TRUE);
+ nEsc = DFLT_ESC_SUB;
+
+ }
+ }
+ if(aAutoPosBox.IsChecked())
+ {
+ aEscRelPosText .Disable();
+ aEscRelPosEdit .Disable();
+ }
+ aEscRelPosEdit.SetValue( aEscRelPosEdit.Normalize( nFac * nEsc ) );
+ aEscRelSizeEdit.SetValue( aEscRelSizeEdit.Normalize( nEscProp ) );
+ }
+ else
+ {
+ aNormalBtn.Check( TRUE );
+ aAutoPosBox.Check( TRUE );
+ EscapementHdl_Impl( 0 );
+ }
+ }
+ else
+ {
+ aHighBtn.Check( FALSE );
+ aNormalBtn.Check( FALSE );
+ aDeepBtn.Check( FALSE );
+ }
+
+ // BspFont setzen
+ rFont.SetPropr(nProp);
+ rFont.SetProprRel(nEscProp);
+ rFont.SetEscapement(nEsc);
+
+ // Auszeichnung
+ //
+ nWhich = GetWhich( SID_ATTR_CHAR_CASEMAP );
+ SvxCaseMap eCaseMap = SVX_CASEMAP_END; // dont care
+
+ if ( rSet.GetItemState( nWhich ) >= SFX_ITEM_AVAILABLE )
+ {
+ const SvxCaseMapItem& rItem = (const SvxCaseMapItem&)rSet.Get( nWhich );
+ eCaseMap = (SvxCaseMap)rItem.GetValue();
+ }
+ SetCaseMap_Impl( eCaseMap );
+
+ // Kerning
+ //
+ nWhich = GetWhich( SID_ATTR_CHAR_KERNING );
+
+ if ( rSet.GetItemState( nWhich ) >= SFX_ITEM_AVAILABLE )
+ {
+ const SvxKerningItem& rItem = (SvxKerningItem&)rSet.Get( nWhich );
+ SfxMapUnit eUnit = rSet.GetPool()->GetMetric( nWhich );
+ MapUnit eOrgUnit = (MapUnit)eUnit;
+ MapUnit ePntUnit( MAP_POINT );
+ long nBig = aKerningEdit.Normalize( (long)rItem.GetValue() );
+ long nKerning = LogicToLogic( nBig, eOrgUnit, ePntUnit );
+
+ // Kerning am Font setzen, vorher in Twips umrechnen
+ long nKern =
+ LogicToLogic( rItem.GetValue(), (MapUnit)eUnit, MAP_TWIP );
+ rFont.SetFixKerning( (short)nKern );
+
+ if ( nKerning > 0 )
+ {
+ aKerningEdit.Enable();
+ aKerningEdit.SetValue( nKerning );
+ aKerningListBox.SelectEntryPos( LW_GESPERRT );
+ }
+ else if ( nKerning < 0 )
+ {
+ aKerningText.Enable();
+ aKerningEdit.Enable();
+ aKerningEdit.SetValue( -nKerning );
+ aKerningListBox.SelectEntryPos( LW_SCHMAL );
+ // beim schmalen Kerning den Maximal-Wert auf
+ // 1/6 der Font-Hoehe setzen
+ long nMax = rFont.GetSize().Height() / 6;
+ aKerningEdit.SetMax( aKerningEdit.Normalize( nMax ), FUNIT_TWIP );
+ aKerningEdit.SetLast(
+ aKerningEdit.GetMax( aKerningEdit.GetUnit() ) );
+ }
+ else
+ {
+ aKerningText.Disable();
+ aKerningEdit.Disable();
+ aKerningEdit.SetValue( 0 );
+ aKerningListBox.SelectEntryPos( LW_NORMAL );
+ aKerningEdit.SetMax( 9999 );
+ aKerningEdit.SetLast( 9999 );
+ }
+ }
+ else
+ aKerningEdit.SetText( String() );
+
+ nWhich = GetWhich( SID_ATTR_CHAR_AUTOKERN );
+
+ if ( rSet.GetItemState( nWhich ) >= SFX_ITEM_AVAILABLE )
+ {
+ const SvxAutoKernItem& rItem = (SvxAutoKernItem&)rSet.Get( nWhich );
+ aAutoKernBtn.Check( rItem.GetValue() );
+ }
+ else
+ aAutoKernBtn.Check( FALSE );
+
+ FASTBOOL bWord = FALSE;
+
+ // Underline
+ nWhich = GetWhich( SID_ATTR_CHAR_UNDERLINE );
+
+ rFont.SetUnderline( UNDERLINE_NONE );
+ aUnderlineBox.SelectEntryPos( 0 );
+ aUnderlineBox.Disable();
+ aUnderlineText.Disable();
+ SfxItemState eState = rSet.GetItemState( nWhich );
+
+ if ( eState >= SFX_ITEM_DONTCARE )
+ {
+ if ( eState == SFX_ITEM_DONTCARE )
+ {
+ aUnderlineBox.Enable();
+ aUnderlineBox.SetNoSelection();
+ aUnderlineText.Enable();
+ }
+ else
+ {
+ const SvxUnderlineItem& rItem = (SvxUnderlineItem&)rSet.Get( nWhich );
+ FontUnderline eUnderline = (FontUnderline)rItem.GetValue();
+ rFont.SetUnderline( eUnderline );
+
+ if ( eUnderline != UNDERLINE_NONE )
+ {
+ aUnderlineBox.Enable();
+ aUnderlineText.Enable();
+
+ for ( USHORT i = 0; i < aUnderlineBox.GetEntryCount(); ++i )
+ {
+ if ( (FontUnderline)(ULONG)aUnderlineBox.GetEntryData(i) == eUnderline )
+ {
+ aUnderlineBox.SelectEntryPos(i);
+ break;
+ }
+ }
+ bWord |= TRUE;
+ }
+ }
+ }
+
+ // Strikeout
+ nWhich = GetWhich( SID_ATTR_CHAR_STRIKEOUT );
+
+ rFont.SetStrikeout( STRIKEOUT_NONE );
+ aStrikeoutBox.SelectEntryPos( 0 );
+ aStrikeoutBox.Disable();
+ aStrikeoutText.Disable();
+ eState = rSet.GetItemState( nWhich );
+
+ if ( eState >= SFX_ITEM_DONTCARE )
+ {
+ if ( eState == SFX_ITEM_DONTCARE )
+ {
+ aStrikeoutBox.Enable();
+ aStrikeoutBox.SetNoSelection();
+ aStrikeoutText.Enable();
+ }
+ else
+ {
+ const SvxCrossedOutItem& rItem = (SvxCrossedOutItem&)rSet.Get( nWhich );
+ FontStrikeout eStrikeout = (FontStrikeout)rItem.GetValue();
+ rFont.SetStrikeout( eStrikeout );
+
+ if ( eStrikeout != STRIKEOUT_NONE )
+ {
+ aStrikeoutBox.Enable();
+ aStrikeoutText.Enable();
+
+ for ( USHORT i = 0; i < aStrikeoutBox.GetEntryCount(); ++i )
+ {
+ if ( (FontStrikeout)(ULONG)aStrikeoutBox.GetEntryData(i) == eStrikeout )
+ {
+ aStrikeoutBox.SelectEntryPos(i);
+ break;
+ }
+ }
+ bWord |= TRUE;
+ }
+ }
+ }
+
+ if ( !bWord )
+ aWordBox.Disable();
+ else
+ aWordBox.Enable();
+
+ //blinken
+ nWhich = GetWhich( SID_ATTR_FLASH );
+ if ( rSet.GetItemState( nWhich ) >= SFX_ITEM_AVAILABLE )
+ {
+ const SvxBlinkItem& rItem = (SvxBlinkItem&)rSet.Get(nWhich);
+ aFlashBox.Check(rItem.GetValue());
+ }
+
+ aExampleWin.Invalidate();
+
+ // Alte Einstellungen merken
+#if ( SUPD < 590 )
+ aNoneBtn.SaveValue();
+ aCapsBtn.SaveValue();
+ aLowercaseBtn.SaveValue();
+ aSmallcapsBtn.SaveValue();
+ aTitelBtn.SaveValue();
+#else
+ aCapsLB.SaveValue();
+#endif
+ aHighBtn.SaveValue();
+ aNormalBtn.SaveValue();
+ aDeepBtn.SaveValue();
+ aEscRelPosEdit.SaveValue();
+ aEscRelSizeEdit.SaveValue();
+ aKerningListBox.SaveValue();
+ aKerningEdit.SaveValue();
+ aAutoKernBtn.SaveValue();
+ aUnderlineBox.SaveValue();
+ aStrikeoutBox.SaveValue();
+ aWordBox.SaveValue();
+ aFlashBox.SaveValue();
+ bInReset = FALSE;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxCharExtPage::FillUserData()
+{
+ const sal_Unicode cTok = ';';
+
+ String sUser( UniString::CreateFromInt32( nSuperEsc ) );
+ sUser.Append( cTok );
+ sUser.Append( UniString::CreateFromInt32( nSubEsc ) );
+ sUser.Append( cTok );
+ sUser.Append( UniString::CreateFromInt32( nSuperProp ) );
+ sUser.Append( cTok );
+ sUser.Append( UniString::CreateFromInt32( nSubProp ) );
+ SetUserData( sUser );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxCharExtPage::DisableControls( USHORT nDisable )
+{
+ if ( DISABLE_CASEMAP & nDisable )
+ {
+#if ( SUPD < 590 )
+ aNoneBtn.Disable();
+ aCapsBtn.Disable();
+ aLowercaseBtn.Disable();
+ aSmallcapsBtn.Disable();
+ aTitelBtn.Disable();
+ aEffectBox.Disable();
+#else
+ aCapsLB.Disable();
+#endif
+ }
+
+ if ( DISABLE_WORDLINE & nDisable )
+ aWordBox.Hide();
+
+ if ( DISABLE_BLINK & nDisable )
+ aFlashBox.Disable();
+}
+// -----------------------------------------------------------------------
+
+void SvxCharExtPage::EnableFlash()
+{
+ if(!((nHtmlMode & HTMLMODE_ON) && !(nHtmlMode & HTMLMODE_BLINK)))
+ aFlashBox.Show();
+}
+
+// -----------------------------------------------------------------------
+
+SvxCharExtPage::SvxCharExtPage( Window* pParent, const SfxItemSet& rAttr ):
+
+ SfxTabPage( pParent, SVX_RES( RID_SVXPAGE_CHAR_EXT ), rAttr ),
+
+#if ( SUPD < 590 )
+ aNoneBtn ( this, ResId( BTN_NONE ) ),
+ aCapsBtn ( this, ResId( BTN_CAPS ) ),
+ aLowercaseBtn ( this, ResId( BTN_LOWERCASE ) ),
+ aSmallcapsBtn ( this, ResId( BTN_SMALLCAPS ) ),
+ aTitelBtn ( this, ResId( BTN_TITEL ) ),
+#else
+ aCapsLB ( this, ResId( LB_CAPS ) ),
+#endif
+ aFlashBox ( this, ResId( CB_FLASH ) ),
+ aEffectBox ( this, ResId( GB_EFFECT ) ),
+ aHighBtn ( this, ResId( BTN_HIGH ) ),
+ aNormalBtn ( this, ResId( BTN_NORMAL ) ),
+ aDeepBtn ( this, ResId( BTN_DEEP ) ),
+ aPositionBox ( this, ResId( GB_POSITION ) ),
+ aEscRelPosText ( this, ResId( FT_ESCDEEPHIGH ) ),
+ aEscRelPosEdit ( this, ResId( ED_ESCDEEPHIGH ) ),
+ aEscRelSizeText ( this, ResId( FT_ESCRELSIZE ) ),
+ aEscRelSizeEdit ( this, ResId( ED_ESCRELSIZE ) ),
+ aAutoPosBox ( this, ResId( CB_AUTOPOS ) ),
+ aPosExtBox ( this, ResId( GB_POSEXT ) ),
+ aKerningListBox ( this, ResId( LB_KERNING ) ),
+ aKerningText ( this, ResId( FT_KERNING ) ),
+ aKerningEdit ( this, ResId( ED_KERNING ) ),
+ aAutoKernBtn ( this, ResId( BTN_AUTOKERN ) ),
+ aKerningBox ( this, ResId( GB_KERNING ) ),
+ aUnderlineText ( this, ResId( FT_UNDERLINECNT ) ),
+ aUnderlineBox ( this, ResId( LB_UNDERLINECNT ) ),
+ aStrikeoutText ( this, ResId( FT_STRIKEOUTCNT ) ),
+ aStrikeoutBox ( this, ResId( LB_STRIKEOUTCNT ) ),
+ aWordBox ( this, ResId( CB_WORD ) ),
+ aExampleWin ( this, ResId( WIN_EXAMPLE ) ),
+ aExampleBox ( this, ResId( GB_EXAMPLE ) ),
+
+ bInReset ( FALSE ),
+ nSuperEsc ( (short)DFLT_ESC_SUPER ),
+ nSubEsc ( (short)DFLT_ESC_SUB ),
+ nSuperProp ( (BYTE)DFLT_ESC_PROP ),
+ nSubProp ( (BYTE)DFLT_ESC_PROP ),
+ nHtmlMode (0)
+
+{
+ FreeResource();
+
+ const SfxPoolItem* pItem;
+ SfxObjectShell* pShell;
+ if ( SFX_ITEM_SET == rAttr.GetItemState( SID_HTML_MODE, FALSE, &pItem ) ||
+ ( 0 != ( pShell = SfxObjectShell::Current() ) &&
+ 0 != ( pItem = pShell->GetItem( SID_HTML_MODE ) ) ) )
+ {
+ nHtmlMode = (BOOL)( (const SfxUInt16Item*)pItem )->GetValue();
+ if ( nHtmlMode & HTMLMODE_ON )
+ {
+ aStrikeoutText .Hide();
+ aStrikeoutBox .Hide();
+ aPosExtBox .Hide();
+ aAutoPosBox .Hide();
+ aEscRelPosText .Hide();
+ aEscRelPosEdit .Hide();
+ aEscRelSizeText .Hide();
+ aEscRelSizeEdit .Hide();
+#if ( SUPD < 590 )
+ aCapsBtn .Hide();
+ aLowercaseBtn .Hide();
+ aTitelBtn .Hide();
+#endif
+ aUnderlineText .Hide();
+ aUnderlineBox .Hide();
+ aWordBox .Hide();
+
+ if ( !( nHtmlMode & HTMLMODE_FULL_STYLES ) )
+ {
+ aKerningListBox.Hide();
+ aKerningText .Hide();
+ aKerningEdit .Hide();
+ aAutoKernBtn .Hide();
+ aKerningBox .Hide();
+ }
+ if ( !( nHtmlMode & HTMLMODE_BLINK ) )
+ aFlashBox.Hide();
+#if ( SUPD < 590 )
+ else
+ aFlashBox.SetPosPixel( aLowercaseBtn.GetPosPixel() );
+ if ( nHtmlMode & HTMLMODE_SMALL_CAPS )
+ aSmallcapsBtn.SetPosPixel( aCapsBtn.GetPosPixel() );
+ else
+ aSmallcapsBtn.Hide();
+#endif
+ Point aPos = aPosExtBox.GetPosPixel();
+ Point aXPos = aExampleBox.GetPosPixel();
+ int nYDiff = aXPos.Y() - aPos.Y();
+ aExampleBox.SetPosPixel(aPos);
+ aXPos = aExampleWin.GetPosPixel();
+ aXPos.Y() -= nYDiff;
+ aExampleWin.SetPosPixel(aXPos);
+ }
+ }
+
+ // diese Page braucht ExchangeSupport
+ SetExchangeSupport();
+
+ SetHandler_Impl();
+}
+
+// -----------------------------------------------------------------------
+
+USHORT* SvxCharExtPage::GetRanges()
+{
+ return pExtRanges;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxCharExtPage::ActivatePage( const SfxItemSet& rSet )
+{
+ SfxItemState eState = bInReset ? SFX_ITEM_AVAILABLE : SFX_ITEM_SET;
+ SvxFont& rFont = aExampleWin.GetFont();
+ const SvxFontItem* pFontItem = 0;
+ USHORT nWhich = GetWhich( SID_ATTR_CHAR_FONT );
+
+ if ( rSet.GetItemState( nWhich ) >= eState )
+ {
+ pFontItem = (const SvxFontItem*)&rSet.Get( nWhich );
+ rFont.SetFamily( pFontItem->GetFamily() );
+ rFont.SetName( pFontItem->GetFamilyName() );
+ rFont.SetPitch( pFontItem->GetPitch() );
+ rFont.SetCharSet( pFontItem->GetCharSet() );
+ rFont.SetStyleName( pFontItem->GetStyleName() );
+ }
+
+ nWhich = GetWhich( SID_ATTR_CHAR_POSTURE );
+
+ if ( rSet.GetItemState( nWhich ) >= eState )
+ {
+ const SvxPostureItem& rItem = (SvxPostureItem&)rSet.Get( nWhich );
+ rFont.SetItalic( (FontItalic)rItem.GetValue() != ITALIC_NONE ?
+ ITALIC_NORMAL : ITALIC_NONE );
+ }
+
+ nWhich = GetWhich( SID_ATTR_CHAR_WEIGHT );
+
+ if ( rSet.GetItemState( nWhich ) >= eState )
+ {
+ SvxWeightItem& rItem = (SvxWeightItem&)rSet.Get( nWhich );
+ rFont.SetWeight( (FontWeight)rItem.GetValue() != WEIGHT_NORMAL ?
+ WEIGHT_BOLD : WEIGHT_NORMAL );
+ }
+
+ nWhich = GetWhich( SID_ATTR_CHAR_FONTHEIGHT );
+
+ if ( rSet.GetItemState( nWhich ) >= eState )
+ {
+ MapUnit eUnit = (MapUnit)rSet.GetPool()->GetMetric( nWhich );
+ SvxFontHeightItem& rItem = (SvxFontHeightItem&)rSet.Get( nWhich );
+
+ Size aSize( rFont.GetSize() );
+ long nH = LogicToLogic( rItem.GetHeight(), eUnit, MAP_TWIP );
+ aSize.Height() = nH;
+ aSize.Width() = 0; //!!!
+ rFont.SetSize( aSize );
+ }
+ else
+ // als Default 12pt
+ rFont.SetSize( Size( 0, 240 ) );
+
+ // Schattiert
+ nWhich = GetWhich( SID_ATTR_CHAR_SHADOWED );
+
+ if ( rSet.GetItemState( nWhich ) >= eState )
+ {
+ const SvxShadowedItem& rItem = (SvxShadowedItem&)rSet.Get( nWhich );
+ rFont.SetShadow(rItem.GetValue());
+ }
+
+ // Kontour
+ nWhich = GetWhich( SID_ATTR_CHAR_CONTOUR );
+
+ if ( rSet.GetItemState( nWhich ) >= eState )
+ {
+ const SvxContourItem& rItem = (SvxContourItem&)rSet.Get( nWhich );
+ rFont.SetOutline( rItem.GetValue() );
+ }
+
+ // Farbe
+ nWhich = GetWhich( SID_ATTR_CHAR_COLOR );
+ if ( rSet.GetItemState( nWhich ) >= eState )
+ {
+ const SvxColorItem& rItem = (SvxColorItem&)rSet.Get( nWhich );
+ rFont.SetColor( rItem.GetValue() );
+ }
+ nWhich = GetWhich( SID_ATTR_CHAR_FILLCOLOR );
+ if ( rSet.GetItemState( nWhich ) >= eState )
+ {
+ const SvxColorItem& rItem = (SvxColorItem&)rSet.Get( nWhich );
+ rFont.SetFillColor( rItem.GetValue() );
+ }
+
+ FASTBOOL bWord = FALSE;
+
+ // Durchstreichen
+ nWhich = GetWhich( SID_ATTR_CHAR_STRIKEOUT );
+
+ if ( rSet.GetItemState( nWhich ) >= eState )
+ {
+ const SvxCrossedOutItem& rItem =
+ (SvxCrossedOutItem&)rSet.Get( nWhich );
+ FontStrikeout eStrikeout = (FontStrikeout)rItem.GetValue();
+ rFont.SetStrikeout( eStrikeout );
+
+ if ( eStrikeout == STRIKEOUT_NONE )
+ {
+ aStrikeoutText.Disable();
+ aStrikeoutBox.Disable();
+ aStrikeoutBox.SelectEntryPos( 0 );
+ }
+ else
+ {
+ aStrikeoutText.Enable();
+ aStrikeoutBox.Enable();
+
+ for ( USHORT i = 0; i < aStrikeoutBox.GetEntryCount(); ++i )
+ {
+ if ( (FontStrikeout)(ULONG)aStrikeoutBox.GetEntryData(i) == eStrikeout )
+ {
+ aStrikeoutBox.SelectEntryPos(i);
+ break;
+ }
+ }
+ bWord |= TRUE;
+ }
+ }
+
+ // Underline
+ nWhich = GetWhich( SID_ATTR_CHAR_UNDERLINE );
+
+ if ( rSet.GetItemState( nWhich ) >= eState )
+ {
+ const SvxUnderlineItem& rItem = (SvxUnderlineItem&)rSet.Get( nWhich );
+ FontUnderline eUnderline = (FontUnderline)rItem.GetValue();
+ rFont.SetUnderline( eUnderline );
+
+ if ( eUnderline == UNDERLINE_NONE )
+ {
+ aUnderlineBox.SelectEntryPos( 0 );
+ aUnderlineBox.Disable();
+ aUnderlineText.Disable();
+ }
+ else
+ {
+ for ( USHORT i = 0; i < aUnderlineBox.GetEntryCount(); ++i )
+ {
+ if ( (FontUnderline)(ULONG)aUnderlineBox.GetEntryData(i) == eUnderline )
+ {
+ aUnderlineBox.SelectEntryPos(i);
+ break;
+ }
+ }
+ aUnderlineBox.Enable();
+ aUnderlineText.Enable();
+ bWord |= TRUE;
+ }
+ }
+
+ if ( !bWord )
+ aWordBox.Disable();
+ else
+ aWordBox.Enable();
+
+ // Hintergrundfarbe
+ nWhich = GetWhich( SID_ATTR_BRUSH );
+
+ if ( rSet.GetItemState( nWhich ) >= eState )
+ {
+ const SvxBrushItem& rItem = (SvxBrushItem&)rSet.Get( nWhich );
+ aExampleWin.SetColor( rItem.GetColor() );
+ }
+
+ aExampleWin.Invalidate();
+ KerningSelectHdl_Impl( 0 );
+ aDelayTimer.Start();
+}
+
+// -----------------------------------------------------------------------
+
+int SvxCharExtPage::DeactivatePage( SfxItemSet* pSet )
+{
+ if ( pSet )
+ FillItemSet( *pSet );
+ return LEAVE_PAGE;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxCharExtPage::SetHandler_Impl()
+{
+ Link aLink = LINK( this, SvxCharExtPage, CaseMapHdl_Impl );
+#if ( SUPD < 590 )
+ aNoneBtn.SetClickHdl( aLink );
+ aCapsBtn.SetClickHdl( aLink );
+ aLowercaseBtn.SetClickHdl( aLink );
+ aSmallcapsBtn.SetClickHdl( aLink );
+ aTitelBtn.SetClickHdl( aLink );
+#else
+ aCapsLB.SetSelectHdl( aLink );
+#endif
+
+ aLink = LINK( this, SvxCharExtPage, EscapementHdl_Impl );
+ aHighBtn.SetClickHdl( aLink );
+ aNormalBtn.SetClickHdl( aLink );
+ aDeepBtn.SetClickHdl( aLink );
+ aAutoKernBtn.SetClickHdl( LINK( this, SvxCharExtPage, AutoKernHdl_Impl ) );
+ aKerningListBox.SetSelectHdl(
+ LINK( this, SvxCharExtPage, KerningSelectHdl_Impl ) );
+ aUnderlineBox.SetSelectHdl(
+ LINK( this, SvxCharExtPage, UnderlineSelectHdl_Impl ) );
+ aStrikeoutBox.SetSelectHdl(
+ LINK( this, SvxCharExtPage, StrikeoutSelectHdl_Impl ) );
+
+ aUnderlineBox.SelectEntryPos( 0 );
+ aStrikeoutBox.SelectEntryPos( 0 );
+
+ aEscRelPosEdit.SetModifyHdl(
+ LINK( this, SvxCharExtPage, FontExtModifyHdl_Impl ) );
+ aEscRelSizeEdit.SetModifyHdl(
+ LINK( this, SvxCharExtPage, FontExtModifyHdl_Impl ) );
+
+ aEscRelPosEdit.SetLoseFocusHdl(
+ LINK( this, SvxCharExtPage, LoseFocusHdl_Impl ) );
+ aEscRelSizeEdit.SetLoseFocusHdl(
+ LINK( this, SvxCharExtPage, LoseFocusHdl_Impl ) );
+
+ aKerningEdit.SetModifyHdl(
+ LINK( this, SvxCharExtPage, KerningModifyHdl_Impl ) );
+ aWordBox.SetClickHdl(
+ LINK( this, SvxCharExtPage, WordLineClickHdl_Impl ) );
+
+ aAutoPosBox.SetClickHdl(
+ LINK( this, SvxCharExtPage, AutoPosHdl_Impl ) );
+
+ aDelayTimer.SetTimeout( 300 );
+ aDelayTimer.SetTimeoutHdl( LINK( this, SvxCharExtPage, TimeoutHdl_Impl ) );
+}
+
+
+// -----------------------------------------------------------------------
+
+#if ( SUPD < 590 )
+IMPL_LINK( SvxCharExtPage, CaseMapHdl_Impl, RadioButton *, pBox )
+#else
+IMPL_LINK( SvxCharExtPage, CaseMapHdl_Impl, ListBox *, EMPTYARG )
+#endif
+{
+ SvxCaseMap eMap = SVX_CASEMAP_NOT_MAPPED;
+
+#if ( SUPD < 590 )
+ if ( !pBox->IsChecked() )
+ return 0;
+
+ if ( pBox == &aCapsBtn )
+ eMap = SVX_CASEMAP_VERSALIEN;
+ else if ( pBox == &aLowercaseBtn )
+ eMap = SVX_CASEMAP_GEMEINE;
+ else if ( pBox == &aSmallcapsBtn )
+ eMap = SVX_CASEMAP_KAPITAELCHEN;
+ else if ( pBox == &aTitelBtn )
+ eMap = SVX_CASEMAP_TITEL;
+#else
+ USHORT nCapsPos = aCapsLB.GetSelectEntryPos();
+ if ( nCapsPos != LISTBOX_ENTRY_NOTFOUND )
+ eMap = (SvxCaseMap)nCapsPos;
+#endif
+
+ SetCaseMap_Impl( eMap );
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxCharExtPage::SetCaseMap_Impl( USHORT eMap )
+{
+#if ( SUPD < 590 )
+ switch ( eMap )
+ {
+ case SVX_CASEMAP_VERSALIEN: aCapsBtn.Check( TRUE ); break;
+ case SVX_CASEMAP_GEMEINE: aLowercaseBtn.Check( TRUE ); break;
+ case SVX_CASEMAP_TITEL: aTitelBtn.Check( TRUE ); break;
+ case SVX_CASEMAP_KAPITAELCHEN: aSmallcapsBtn.Check( TRUE ); break;
+ case SVX_CASEMAP_NOT_MAPPED: aNoneBtn.Check( TRUE ); break;
+ case SVX_CASEMAP_END:
+ aCapsBtn.Check( FALSE );
+ aLowercaseBtn.Check( FALSE );
+ aTitelBtn.Check( FALSE );
+ aSmallcapsBtn.Check( FALSE );
+ aNoneBtn.Check( FALSE );
+ break;
+ default: DBG_ASSERT(FALSE, "Falscher CaseMap"); return;
+ }
+ if ( eMap == SVX_CASEMAP_END )
+ eMap = SVX_CASEMAP_NOT_MAPPED;
+#else
+ if ( SVX_CASEMAP_END > (SvxCaseMap)eMap )
+ aCapsLB.SelectEntryPos( eMap );
+ else
+ {
+ aCapsLB.SetNoSelection();
+ eMap = SVX_CASEMAP_NOT_MAPPED;
+ }
+#endif
+
+ aExampleWin.GetFont().SetCaseMap( (SvxCaseMap)eMap );
+ aExampleWin.Invalidate();
+}
+
+// -----------------------------------------------------------------------
+
+void SvxCharExtPage::EnablePairKerning_Impl()
+{
+ SvxFont& rFont = aExampleWin.GetFont();
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxCharExtPage, EscapementHdl_Impl, RadioButton *, pBtn )
+{
+ USHORT nEsc = SVX_ESCAPEMENT_OFF; // auch wenn pBtn == 0
+
+ if ( &aHighBtn == pBtn )
+ nEsc = SVX_ESCAPEMENT_SUPERSCRIPT;
+ else if ( &aDeepBtn == pBtn )
+ nEsc = SVX_ESCAPEMENT_SUBSCRIPT;
+
+ SetEscapement_Impl( nEsc );
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxCharExtPage::SetEscapement_Impl( USHORT eEsc )
+{
+ SvxEscapementItem aEsc( (SvxEscapement)eEsc );
+
+ if ( SVX_ESCAPEMENT_SUPERSCRIPT == eEsc )
+ {
+ aEsc.GetEsc() = nSuperEsc;
+ aEsc.GetProp() = nSuperProp;
+ }
+ else if ( SVX_ESCAPEMENT_SUBSCRIPT == eEsc )
+ {
+ aEsc.GetEsc() = nSubEsc;
+ aEsc.GetProp() = nSubProp;
+ }
+
+ short nFac = aEsc.GetEsc() < 0 ? -1 : 1;
+
+ aEscRelPosEdit.SetValue( aEsc.GetEsc() * nFac );
+ aEscRelSizeEdit.SetValue( aEsc.GetProp() );
+
+ if ( eEsc == SVX_ESCAPEMENT_OFF )
+ {
+ aEscRelSizeText.Disable();
+ aEscRelSizeEdit.Disable();
+ aEscRelPosEdit.Disable();
+ aEscRelPosText.Disable();
+ aAutoPosBox.Disable();
+ }
+ else
+ {
+ aEscRelSizeText.Enable();
+ aEscRelSizeEdit.Enable();
+ aAutoPosBox.Enable();
+ if(!aAutoPosBox.IsChecked())
+ {
+ aEscRelPosEdit.Enable();
+ aEscRelPosText.Enable();
+ }
+ else
+ {
+ AutoPosHdl_Impl(&aAutoPosBox);
+ }
+ }
+ UpdatePos_Impl( 100, aEsc.GetEsc(), aEsc.GetProp() );
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK_INLINE_START( SvxCharExtPage, FontExtModifyHdl_Impl, MetricField *, EMPTYARG )
+{
+ short nEsc = (short)aEscRelPosEdit.GetValue();
+ BYTE nEscProp = (BYTE)aEscRelSizeEdit.GetValue();
+ nEsc *= aDeepBtn.IsChecked() ? -1 : 1;
+ UpdatePos_Impl( 100, nEsc, nEscProp );
+ return 0;
+}
+IMPL_LINK_INLINE_END( SvxCharExtPage, FontExtModifyHdl_Impl, MetricField *, EMPTYARG )
+
+// -----------------------------------------------------------------------
+
+void SvxCharExtPage::UpdatePos_Impl( BYTE nProp, short nEsc, BYTE nEscProp )
+{
+ SvxFont& rFont = aExampleWin.GetFont();
+
+ rFont.SetPropr( nProp );
+ rFont.SetProprRel( nEscProp );
+ rFont.SetEscapement( nEsc );
+ aExampleWin.Invalidate();
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxCharExtPage, KerningModifyHdl_Impl, MetricField *, EMPTYARG )
+{
+ long nTmp = aKerningEdit.GetValue();
+ long nVal = LogicToLogic( nTmp, MAP_POINT, MAP_TWIP );
+ long nKern = (short)aKerningEdit.Denormalize( nVal );
+
+ // Schmal?, dann negativ
+ if ( aKerningListBox.GetSelectEntryPos() == 2 )
+ nKern *= -1;
+
+ SvxFont& rFont = aExampleWin.GetFont();
+ rFont.SetFixKerning( (short)nKern );
+ aExampleWin.Invalidate();
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxCharExtPage, KerningSelectHdl_Impl, ListBox *, EMPTYARG )
+{
+ if ( aKerningListBox.GetSelectEntryPos() > 0 )
+ {
+ aKerningText.Enable();
+ aKerningEdit.Enable();
+
+ if ( aKerningListBox.GetSelectEntryPos() == 2 )
+ {
+ // beim schmalen Kerning den Maximal-Wert auf
+ // 1/6 der Font-Hoehe setzen
+ SvxFont& rFont = aExampleWin.GetFont();
+ long nMax = rFont.GetSize().Height() / 6;
+ aKerningEdit.SetMax( aKerningEdit.Normalize( nMax ), FUNIT_TWIP );
+ aKerningEdit.SetLast(
+ aKerningEdit.GetMax( aKerningEdit.GetUnit() ) );
+ }
+ else
+ {
+ aKerningEdit.SetMax( 9999 );
+ aKerningEdit.SetLast( 9999 );
+ }
+ }
+ else
+ {
+ aKerningEdit.SetValue(0);
+ aKerningText.Disable();
+ aKerningEdit.Disable();
+ }
+ KerningModifyHdl_Impl(0);
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxCharExtPage, StrikeoutSelectHdl_Impl, ListBox *, EMPTYARG )
+{
+ if ( aStrikeoutBox.GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND )
+ {
+ USHORT nPos = aStrikeoutBox.GetSelectEntryPos();
+ FontStrikeout eStrikeout = (FontStrikeout)(ULONG)aStrikeoutBox.GetEntryData( nPos );
+ aExampleWin.GetFont().SetStrikeout(eStrikeout);
+ aExampleWin.Invalidate();
+ }
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxCharExtPage, UnderlineSelectHdl_Impl, ListBox *, EMPTYARG )
+{
+ if ( aUnderlineBox.GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND )
+ {
+ USHORT nPos = aUnderlineBox.GetSelectEntryPos();
+ FontUnderline eUnderline = (FontUnderline)(ULONG)aUnderlineBox.GetEntryData( nPos );
+ aExampleWin.GetFont().SetUnderline(eUnderline);
+ aExampleWin.Invalidate();
+ }
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK_INLINE_START( SvxCharExtPage, WordLineClickHdl_Impl, CheckBox *, pBox )
+{
+ aExampleWin.GetFont().SetWordLineMode( pBox->IsChecked() );
+ aExampleWin.Invalidate();
+ return 0;
+}
+IMPL_LINK_INLINE_END( SvxCharExtPage, WordLineClickHdl_Impl, CheckBox *, pBox )
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxCharExtPage, TimeoutHdl_Impl, Timer *, EMPTYARG )
+{
+ // "Uberpr"ufung, ob Pairkerning am eingestellten Font m"oglich ist.
+
+ if ( aAutoKernBtn.IsChecked() )
+ return 0;
+
+ SfxViewShell* pSh = SfxViewShell::Current();
+ Printer* pPrinter = pSh ? pSh->GetPrinter() : 0;
+
+ if ( pPrinter )
+ {
+ Font aOldFont = pPrinter->GetFont();
+ Font aTestFont = aExampleWin.GetFont();
+ aTestFont.SetKerning( TRUE );
+ pPrinter->SetFont( aTestFont );
+ FontMetric aMetric = pPrinter->GetFontMetric();
+ pPrinter->SetFont( aOldFont );
+
+ if ( aMetric.IsKerning() )
+ aAutoKernBtn.Enable();
+ else
+ aAutoKernBtn.Disable();
+ }
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxCharExtPage, LoseFocusHdl_Impl, MetricField *, pField )
+{
+ FASTBOOL bDeep = aDeepBtn.IsChecked(),
+ bHigh = aHighBtn.IsChecked();
+
+ DBG_ASSERT( !( bDeep && bHigh ), "das kann nicht sein" );
+
+ if ( &aEscRelPosEdit == pField && ( bDeep || bHigh ) )
+ {
+ if ( bDeep )
+ nSubEsc = (short)aEscRelPosEdit.GetValue() * -1;
+ else
+ nSuperEsc = (short)aEscRelPosEdit.GetValue();
+ }
+ else if ( &aEscRelSizeEdit == pField && ( bDeep || bHigh ) )
+ {
+ if ( bDeep )
+ nSubProp = (BYTE)aEscRelSizeEdit.GetValue();
+ else
+ nSuperProp = (BYTE)aEscRelSizeEdit.GetValue();
+ }
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK_INLINE_START(SvxCharExtPage, AutoKernHdl_Impl, CheckBox*, EMTPYARG )
+{
+ if ( !aAutoKernBtn.IsChecked() )
+ TimeoutHdl_Impl( 0 );
+ return 0;
+}
+IMPL_LINK_INLINE_END(SvxCharExtPage, AutoKernHdl_Impl, CheckBox*, EMPTYARG )
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxCharExtPage, AutoPosHdl_Impl, CheckBox*, pBox)
+{
+ if(pBox->IsChecked())
+ {
+ aEscRelPosText .Disable();
+ aEscRelPosEdit .Disable();
+ }
+ else
+ {
+ RadioButton* pRadio = aHighBtn.IsChecked() ? &aHighBtn :
+ aDeepBtn.IsChecked() ? &aDeepBtn :
+ &aNormalBtn;
+ EscapementHdl_Impl(pRadio);
+ }
+ return 0;
+}
+
+
diff --git a/svx/source/dialog/chardlg.h b/svx/source/dialog/chardlg.h
new file mode 100644
index 000000000000..f425b674f46e
--- /dev/null
+++ b/svx/source/dialog/chardlg.h
@@ -0,0 +1,96 @@
+/*************************************************************************
+ *
+ * $RCSfile: chardlg.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:07 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SVX_CHARDLG_H
+#define _SVX_CHARDLG_H
+
+// define ----------------------------------------------------------------
+
+#define CHRDLG_UNDERLINE_NONE 0
+#define CHRDLG_UNDERLINE_SINGLE 1
+#define CHRDLG_UNDERLINE_DOUBLE 2
+#define CHRDLG_UNDERLINE_DOTTED 3
+#define CHRDLG_UNDERLINE_DONTKNOW 4
+#define CHRDLG_UNDERLINE_DASH 5
+#define CHRDLG_UNDERLINE_LONGDASH 6
+#define CHRDLG_UNDERLINE_DASHDOT 7
+#define CHRDLG_UNDERLINE_DASHDOTDOT 8
+#define CHRDLG_UNDERLINE_SMALLWAVE 9
+#define CHRDLG_UNDERLINE_WAVE 10
+#define CHRDLG_UNDERLINE_DOUBLEWAVE 11
+#define CHRDLG_UNDERLINE_BOLD 12
+#define CHRDLG_UNDERLINE_BOLDDOTTED 13
+#define CHRDLG_UNDERLINE_BOLDDASH 14
+#define CHRDLG_UNDERLINE_BOLDLONGDASH 15
+#define CHRDLG_UNDERLINE_BOLDDASHDOT 16
+#define CHRDLG_UNDERLINE_BOLDDASHDOTDOT 17
+#define CHRDLG_UNDERLINE_BOLDWAVE 18
+
+#define CHRDLG_STRIKEOUT_NONE 0
+#define CHRDLG_STRIKEOUT_SINGLE 1
+#define CHRDLG_STRIKEOUT_DOUBLE 2
+#define CHRDLG_STRIKEOUT_DONTKNOW 3
+#define CHRDLG_STRIKEOUT_BOLD 4
+#define CHRDLG_STRIKEOUT_SLASH 5
+#define CHRDLG_STRIKEOUT_X 6
+
+
+#endif
+
diff --git a/svx/source/dialog/chardlg.hrc b/svx/source/dialog/chardlg.hrc
new file mode 100644
index 000000000000..2feea08801ed
--- /dev/null
+++ b/svx/source/dialog/chardlg.hrc
@@ -0,0 +1,131 @@
+/*************************************************************************
+ *
+ * $RCSfile: chardlg.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:07 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SVX_CHARDLG_HRC
+#define _SVX_CHARDLG_HRC
+
+// defines ------------------------------------------------------------------
+
+// StandardPage -------------------------------------------------------------
+
+#define FT_FONT 10
+#define LB_FONT 11
+#define FT_STYLE 12
+#define LB_STYLE 13
+#define FT_SIZE 14
+#define LB_SIZE 15
+
+#define BTN_OUTLINE 20
+#define BTN_SHADOW 21
+#define BTN_UNDERLINE 22
+#define BTN_STRIKEOUT 23
+#define GB_CASEMAP 24
+
+#define FT_COLOR 30
+#define LB_COLOR 31
+#define FT_LANGUAGE 32
+#define LB_LANGUAGE 33
+#define FT_FONTTYPE 34 // auch fuer ExtendedPage
+#define FT_FILLCOLOR 35
+#define LB_FILLCOLOR 36
+#define STR_TRANSPARENT 37
+#define STR_NOSTYLE 38
+
+#define WIN_EXAMPLE 40 // auch fuer ExtendedPage
+#define GB_EXAMPLE 41 // auch fuer ExtendedPage
+
+// ExtendedPage -------------------------------------------------------------
+
+#define BTN_NONE 50
+#define BTN_CAPS 51
+#define BTN_LOWERCASE 52
+#define BTN_SMALLCAPS 53
+#define BTN_TITEL 54
+#define GB_EFFECT 55
+#define LB_CAPS 56
+
+#define BTN_HIGH 60
+#define BTN_NORMAL 61
+#define BTN_DEEP 62
+#define GB_POSITION 63
+
+#define FT_ESCDEEPHIGH 70
+#define ED_ESCDEEPHIGH 71
+#define FT_ESCRELSIZE 72
+#define ED_ESCRELSIZE 73
+#define GB_POSEXT 74
+#define CB_AUTOPOS 75
+
+#define LB_KERNING 80
+#define FT_KERNING 81
+#define ED_KERNING 82
+#define BTN_AUTOKERN 83
+#define GB_KERNING 84
+
+#define FT_UNDERLINECNT 90
+#define LB_UNDERLINECNT 91
+#define FT_STRIKEOUTCNT 92
+#define LB_STRIKEOUTCNT 93
+#define CB_WORD 94
+#define CB_FLASH 95
+
+
+#endif
+
diff --git a/svx/source/dialog/chardlg.src b/svx/source/dialog/chardlg.src
new file mode 100644
index 000000000000..a99181df5f28
--- /dev/null
+++ b/svx/source/dialog/chardlg.src
@@ -0,0 +1,2413 @@
+/*************************************************************************
+ *
+ * $RCSfile: chardlg.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:07 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+ // include ---------------------------------------------------------------
+#include "helpid.hrc"
+#include "dialogs.hrc"
+#include "chardlg.hrc"
+#include "chardlg.h"
+
+ // RID_SVXPAGE_CHAR_STD --------------------------------------------------
+
+TabPage RID_SVXPAGE_CHAR_STD
+{
+ HelpId = HID_FORMAT_CHAR_STD ;
+ Size = MAP_APPFONT ( 260 , 135 ) ;
+ Hide = TRUE ;
+ Text = "Schrift" ;
+ Text [ English ] = "Character" ;
+ Text [ norwegian ] = "Character" ;
+ Text [ italian ] = "Carattere" ;
+ Text [ portuguese_brazilian ] = "Caractere" ;
+ Text [ portuguese ] = "Tipo de letra" ;
+ Text [ finnish ] = "Merkki" ;
+ Text [ danish ] = "Skrifttype" ;
+ Text [ french ] = "Police" ;
+ Text [ swedish ] = "Teckensnitt" ;
+ Text [ dutch ] = "Lettertype" ;
+ Text [ spanish ] = "Fuente" ;
+ Text [ english_us ] = "Font" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "Czcionka";
+ Text[ japanese ] = "̫";
+ Text[ chinese_traditional ] = "r";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "۲";
+ Text[ turkish ] = "Yaztipi";
+ Text[ language_user1 ] = " ";
+
+ String STR_TRANSPARENT
+ {
+ Text = "Transparent";
+ Text[ENGLISH] = "Transparent";
+ Text[ENGLISH_US] = "Transparent";
+ Text[ italian ] = "Transparente";
+ Text[ portuguese_brazilian ] = "Transparent";
+ Text[ portuguese ] = "Transparente";
+ Text[ danish ] = "Transparent";
+ Text[ french ] = "Transparent";
+ Text[ swedish ] = "Transparent";
+ Text[ dutch ] = "Transparant";
+ Text[ spanish ] = "Transparente";
+ Text[ chinese_simplified ] = "͸";
+ Text[ russian ] = "";
+ Text[ polish ] = "Przeroczysty";
+ Text[ japanese ] = "ߐ";
+ Text[ chinese_traditional ] = "z";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "Saydam";
+ Text[ language_user1 ] = " ";
+ };
+ String STR_NOSTYLE
+ {
+ Text = "Nicht %s";
+ Text[ENGLISH] = "No %s";
+ Text[language_user1] = "PB: %s wird ersetzt durch fett oder kursiv";
+ Text[ english_us ] = "No %s";
+ Text[ portuguese ] = "Sem %s";
+ Text[ russian ] = " %s";
+ Text[ dutch ] = "Niet %s";
+ Text[ french ] = "Pas de %s";
+ Text[ spanish ] = "No %s";
+ Text[ italian ] = "Senza %s";
+ Text[ danish ] = "Ikke %s";
+ Text[ swedish ] = "Inte %s";
+ Text[ polish ] = "Nie %s";
+ Text[ portuguese_brazilian ] = "No %s";
+ Text[ japanese ] = "%sȂ";
+ Text[ chinese_simplified ] = " %s";
+ Text[ chinese_traditional ] = "O %s";
+ Text[ arabic ] = " %s";
+ Text[ greek ] = " %s";
+ Text[ korean ] = "%s ƴ";
+ Text[ turkish ] = "%s deil";
+ };
+
+ FixedText FT_FONT
+ {
+ Pos = MAP_APPFONT ( 6 , 2 ) ;
+ Size = MAP_APPFONT ( 147 , 10 ) ;
+ Text = "A~rt" ;
+ Text [ ENGLISH ] = "~Type" ;
+ Text [ norwegian ] = "~Font" ;
+ Text [ italian ] = "~Carattere" ;
+ Text [ portuguese_brazilian ] = "~Fonte" ;
+ Text [ portuguese ] = "~Tipo de letra" ;
+ Text [ finnish ] = "~Fontti" ;
+ Text [ danish ] = "Skrifttype" ;
+ Text [ french ] = "~Type" ;
+ Text [ swedish ] = "~Teckensnitt" ;
+ Text [ dutch ] = "~Lettertype" ;
+ Text [ spanish ] = "T~ipo" ;
+ Text [ english_us ] = "~Font" ;
+ Left = TRUE ;
+ Text[ chinese_simplified ] = "(~F)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Typ";
+ Text[ japanese ] = "̫(~F)";
+ Text[ chinese_traditional ] = "r(~F)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "۲(~F)";
+ Text[ turkish ] = "T~r";
+ Text[ language_user1 ] = " ";
+ };
+ ComboBox LB_FONT
+ {
+ Pos = MAP_APPFONT ( 6 , 14 ) ;
+ Size = MAP_APPFONT ( 147 , 47 ) ;
+ Group = TRUE ;
+ Sort = TRUE ;
+ AutoHScroll = TRUE ;
+ DDExtraWidth = TRUE ;
+ };
+ FixedText FT_STYLE
+ {
+ Pos = MAP_APPFONT ( 159 , 2 ) ;
+ Size = MAP_APPFONT ( 57 , 10 ) ;
+ Text = "~Schnitt" ;
+ Text [ ENGLISH ] = "~Style" ;
+ Text [ norwegian ] = "~Style" ;
+ Text [ italian ] = "~Stile" ;
+ Text [ portuguese_brazilian ] = "~Estilo" ;
+ Text [ portuguese ] = "~Estilo" ;
+ Text [ finnish ] = "~Tyyli" ;
+ Text [ danish ] = "Typografi" ;
+ Text [ french ] = "~Style" ;
+ Text [ swedish ] = "St~il" ;
+ Text [ dutch ] = "~Schrijfwijze" ;
+ Text [ spanish ] = "~Estilo" ;
+ Text [ english_us ] = "~Style" ;
+ Left = TRUE ;
+ Text[ chinese_simplified ] = "(~S)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Styl";
+ Text[ japanese ] = "(~S)";
+ Text[ chinese_traditional ] = "˦(~S)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "Ÿ(~S)";
+ Text[ turkish ] = "~Biim";
+ Text[ language_user1 ] = " ";
+ };
+ ComboBox LB_STYLE
+ {
+ Pos = MAP_APPFONT ( 159 , 14 ) ;
+ Size = MAP_APPFONT ( 57 , 47 ) ;
+ AutoHScroll = TRUE ;
+ DDExtraWidth = TRUE ;
+ StringList =
+ {
+ "Normal" ;
+ "Kursiv" ;
+ "Fett" ;
+ "Fett Kursiv" ;
+ };
+ StringList [ ENGLISH ] =
+ {
+ "Normal" ;
+ "Italic" ;
+ "Bold" ;
+ "Bold Italic" ;
+ };
+ StringList [ norwegian ] =
+ {
+ "Normal" ;
+ "Kursiv" ;
+ "Fet" ;
+ "Bold Italic" ;
+ };
+ StringList [ italian ] =
+ {
+ "Normale" ;
+ "Corsivo" ;
+ "Grassetto" ;
+ "Grassetto corsivo" ;
+ };
+ StringList [ portuguese_brazilian ] =
+ {
+ "Normal" ;
+ "Itlico" ;
+ "Negrito" ;
+ "Negrito Itlico" ;
+ };
+ StringList [ portuguese ] =
+ {
+ "Padro" ;
+ "Itlico" ;
+ "Negrito" ;
+ "Negrito Itlico" ;
+ };
+ StringList [ finnish ] =
+ {
+ "Normaali" ;
+ "Kursivoitu" ;
+ "Lihavoitu" ;
+ "Lihavoitu Kursivoitu" ;
+ };
+ StringList [ danish ] =
+ {
+ "Normal" ;
+ "Kursiv" ;
+ "Fed" ;
+ "Fed kursiv" ;
+ };
+ StringList [ french ] =
+ {
+ "Normal" ;
+ "Italique" ;
+ "Gras" ;
+ "Italique gras" ;
+ };
+ StringList [ swedish ] =
+ {
+ "Normal" ;
+ "Kursiv" ;
+ "Fet" ;
+ "Fet kursiv" ;
+ };
+ StringList [ dutch ] =
+ {
+ "Normaal" ;
+ "Cursief" ;
+ "Vet" ;
+ "Vet Cursief" ;
+ };
+ StringList [ spanish ] =
+ {
+ "Normal" ;
+ "Cursiva" ;
+ "Negrita" ;
+ "Cursiva negrita" ;
+ };
+ StringList [ english_us ] =
+ {
+ "Normal" ;
+ "Italic" ;
+ "Bold" ;
+ "Bold Italic" ;
+ };
+ StringList [ language_user1 ] =
+ {
+ " " ;
+ " " ;
+ " " ;
+ "Fett Kursiv" ;
+ };
+ StringList [ russian ] =
+ {
+ "" ;
+ "" ;
+ "" ;
+ " " ;
+ };
+ StringList [ polish ] =
+ {
+ "Normalny" ;
+ "Kursywa" ;
+ "Pogrubienie" ;
+ "Kursywa pogrubiona" ;
+ };
+ StringList [ japanese ] =
+ {
+ "W" ;
+ "Α" ;
+ "" ;
+ " Α" ;
+ };
+ StringList [ chinese_simplified ] =
+ {
+ "ͨ" ;
+ "б" ;
+ "" ;
+ "б" ;
+ };
+ StringList [ chinese_traditional ] =
+ {
+ "q" ;
+ "" ;
+ "" ;
+ "ʱ" ;
+ };
+ StringList [ arabic ] =
+ {
+ "" ;
+ "" ;
+ "" ;
+ " " ;
+ };
+ StringList [ greek ] =
+ {
+ "" ;
+ "" ;
+ "" ;
+ " " ;
+ };
+ StringList [ korean ] =
+ {
+ "" ;
+ "Ӳ" ;
+ "ϰ" ;
+ " Ӳ" ;
+ };
+ StringList [ turkish ] =
+ {
+ "Normal" ;
+ "talik" ;
+ "Kaln" ;
+ "Kaln italik" ;
+ };
+ };
+ FixedText FT_SIZE
+ {
+ Pos = MAP_APPFONT ( 222 , 2 ) ;
+ Size = MAP_APPFONT ( 33 , 10 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? ~Gre : ~Gre */
+ /* ### ACHTUNG: Neuer Text in Resource? ~Gre : ~Gre */
+ Text = "~Gre" ;
+ Text [ ENGLISH ] = "S~ize" ;
+ Text [ norwegian ] = "S~ize" ;
+ Text [ italian ] = "D~imensione" ;
+ Text [ portuguese_brazilian ] = "T~amanho" ;
+ Text [ portuguese ] = "T~amanho" ;
+ Text [ finnish ] = "~Koko" ;
+ Text [ danish ] = "Strrelse" ;
+ Text [ french ] = "Ta~ille" ;
+ Text [ swedish ] = "~Storlek" ;
+ Text [ dutch ] = "G~rootte" ;
+ Text [ spanish ] = "~Tamao" ;
+ Text [ english_us ] = "S~ize" ;
+ Left = TRUE ;
+ Text[ chinese_simplified ] = "С(~I)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Rozmiar";
+ Text[ japanese ] = "(~I)";
+ Text[ chinese_traditional ] = "jp(~I)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "ũ(~I)";
+ Text[ turkish ] = "~Boy";
+ Text[ language_user1 ] = " ";
+ };
+ MetricBox LB_SIZE
+ {
+ Pos = MAP_APPFONT ( 222 , 14 ) ;
+ Size = MAP_APPFONT ( 35 , 47 ) ;
+ Minimum = 1 ;
+ Maximum = 500 ;
+ DecimalDigits = 1 ;
+ };
+ TriStateBox BTN_OUTLINE
+ {
+ Pos = MAP_APPFONT ( 12 , 71 ) ;
+ Size = MAP_APPFONT ( 62 , 10 ) ;
+ Text = "~Kontur" ;
+ Text [ ENGLISH ] = "~Outline" ;
+ Text [ norwegian ] = "~Outline" ;
+ Text [ italian ] = "~Contorno" ;
+ Text [ portuguese_brazilian ] = "~Vazado" ;
+ Text [ portuguese ] = "~Contorno" ;
+ Text [ finnish ] = "~riviiva" ;
+ Text [ danish ] = "Kontur" ;
+ Text [ french ] = "C~ontour" ;
+ Text [ swedish ] = "~Kontur" ;
+ Text [ dutch ] = "~Contour" ;
+ Text [ spanish ] = "~Contorno" ;
+ Text [ english_us ] = "~Outline" ;
+ Text[ chinese_simplified ] = "(~O)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Ko~ntur";
+ Text[ japanese ] = "(~O)";
+ Text[ chinese_traditional ] = "(~O)";
+ Text[ arabic ] = " ";
+ Text[ greek ] = "";
+ Text[ korean ] = "(~O)";
+ Text[ turkish ] = "~Kontur";
+ Text[ language_user1 ] = " ";
+ };
+ TriStateBox BTN_SHADOW
+ {
+ Pos = MAP_APPFONT ( 12 , 83 ) ;
+ Size = MAP_APPFONT ( 62 , 10 ) ;
+ Text = "S~chatten" ;
+ Text [ ENGLISH ] = "Sh~adow" ;
+ Text [ norwegian ] = "Sh~adow" ;
+ Text [ italian ] = "Om~breggiato" ;
+ Text [ portuguese_brazilian ] = "So~mbra" ;
+ Text [ portuguese ] = "So~mbra" ;
+ Text [ finnish ] = "~Varjo" ;
+ Text [ danish ] = "Skygge" ;
+ Text [ french ] = "O~mbre" ;
+ Text [ swedish ] = "Skugg~ning" ;
+ Text [ dutch ] = "Sch~aduw" ;
+ Text [ spanish ] = "~Sombra" ;
+ Text [ english_us ] = "Sh~adow" ;
+ Text[ chinese_simplified ] = "Ӱ(~A)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Cie";
+ Text[ japanese ] = "e(~A)";
+ Text[ chinese_traditional ] = "v(~A)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "(~A)";
+ Text[ turkish ] = "G~lge";
+ Text[ language_user1 ] = " ";
+ };
+ TriStateBox BTN_UNDERLINE
+ {
+ Pos = MAP_APPFONT ( 12 , 95 ) ;
+ Size = MAP_APPFONT ( 62 , 10 ) ;
+ Text = "~Unterstreichen" ;
+ Text [ ENGLISH ] = "~Underline" ;
+ Text [ norwegian ] = "~Underline" ;
+ Text [ italian ] = "~Sottolineato" ;
+ Text [ portuguese_brazilian ] = "~Sublinhar" ;
+ Text [ portuguese ] = "~Sublinhar" ;
+ Text [ finnish ] = "~Alleviivattu" ;
+ Text [ danish ] = "Understreget" ;
+ Text [ french ] = "So~ulignage" ;
+ Text [ swedish ] = "~Understruken" ;
+ Text [ dutch ] = "~Onderstrepen" ;
+ Text [ spanish ] = "Su~brayado" ;
+ Text [ english_us ] = "~Underline" ;
+ Text[ chinese_simplified ] = "»(~U)";
+ Text[ russian ] = "";
+ Text[ polish ] = "P~odkrel";
+ Text[ japanese ] = "(~U)";
+ Text[ chinese_traditional ] = "Uu(~U)";
+ Text[ arabic ] = " ";
+ Text[ greek ] = "";
+ Text[ korean ] = "(~U)";
+ Text[ turkish ] = "~Alt izili";
+ Text[ language_user1 ] = " ";
+ };
+ TriStateBox BTN_STRIKEOUT
+ {
+ Pos = MAP_APPFONT ( 12 , 107 ) ;
+ Size = MAP_APPFONT ( 62 , 10 ) ;
+ Text = "~Durchstreichen" ;
+ Text [ ENGLISH ] = "St~rike through" ;
+ Text [ norwegian ] = "S~trike through" ;
+ Text [ italian ] = "~Barrato" ;
+ Text [ portuguese_brazilian ] = "R~iscar" ;
+ Text [ portuguese ] = "~Rasurar" ;
+ Text [ finnish ] = "~Yliviivaus" ;
+ Text [ danish ] = "Gennemstreget" ;
+ Text [ french ] = "Ba~rrer" ;
+ Text [ swedish ] = "Geno~mstruken" ;
+ Text [ dutch ] = "~Doorhalen" ;
+ Text [ spanish ] = "T~achado" ;
+ Text [ english_us ] = "S~trikethrough" ;
+ Text[ chinese_simplified ] = "ɾ(~T)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Przekr~el";
+ Text[ japanese ] = "(~T)";
+ Text[ chinese_traditional ] = "Ru(~T)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "Ҽ(~T)";
+ Text[ turkish ] = "~st izili";
+ Text[ language_user1 ] = " ";
+ };
+ GroupBox GB_CASEMAP
+ {
+ Pos = MAP_APPFONT ( 6 , 62 ) ;
+ Size = MAP_APPFONT ( 74 , 58 ) ;
+ Text = "Auszeichnungen" ;
+ Text [ ENGLISH ] = "Effects" ;
+ Text [ norwegian ] = "Effects" ;
+ Text [ italian ] = "Effetti" ;
+ Text [ portuguese_brazilian ] = "Efeitos" ;
+ Text [ portuguese ] = "Efeitos" ;
+ Text [ finnish ] = "Tehosteet" ;
+ Text [ danish ] = "Effekter" ;
+ Text [ french ] = "Effets" ;
+ Text [ swedish ] = "Effekter" ;
+ Text [ dutch ] = "Effecten" ;
+ Text [ spanish ] = "Efectos" ;
+ Text [ english_us ] = "Effects" ;
+ Text[ chinese_simplified ] = "Ч";
+ Text[ russian ] = "";
+ Text[ polish ] = "Wyrnienia";
+ Text[ japanese ] = "";
+ Text[ chinese_traditional ] = "ĪG";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "ȿ";
+ Text[ turkish ] = "Efektler";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_COLOR
+ {
+ Pos = MAP_APPFONT ( 86 , 63 ) ;
+ Size = MAP_APPFONT ( 71 , 10 ) ;
+ Text = "~Farbe" ;
+ Text [ ENGLISH ] = "~Color" ;
+ Text [ norwegian ] = "~Color" ;
+ Text [ italian ] = "~Colore" ;
+ Text [ portuguese_brazilian ] = "~Cor" ;
+ Text [ portuguese ] = "~Cor" ;
+ Text [ finnish ] = "~Vri" ;
+ Text [ danish ] = "Farve" ;
+ Text [ french ] = "~Couleur" ;
+ Text [ swedish ] = "~Frg" ;
+ Text [ dutch ] = "~Kleur" ;
+ Text [ spanish ] = "Co~lor" ;
+ Text [ english_us ] = "~Color" ;
+ Left = TRUE ;
+ Text[ chinese_simplified ] = "ɫ(~C)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Kolor";
+ Text[ japanese ] = "F(~C)";
+ Text[ chinese_traditional ] = "C(~C)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "(~C)";
+ Text[ turkish ] = "~Renk";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_COLOR
+ {
+ Pos = MAP_APPFONT ( 86 , 74 ) ;
+ Size = MAP_APPFONT ( 71 , 68 ) ;
+ Group = TRUE ;
+ DropDown = TRUE ;
+ DDExtraWidth = TRUE ;
+ };
+
+ FixedText FT_FILLCOLOR
+ {
+ Pos = MAP_APPFONT ( 86 , 96 ) ;
+ Size = MAP_APPFONT ( 71 , 10 ) ;
+ Hide = TRUE;
+ Text = "~Hintergrundfarbe" ;
+ Text [ ENGLISH ] = "~Fillcolor" ;
+ Text [ norwegian ] = "~Fillcolor" ;
+ Text[ italian ] = "Colore di sfondo";
+ Text[ portuguese_brazilian ] = "~Fillcolor";
+ Text[ portuguese ] = "~Cor de fundo";
+ Text[ danish ] = "Baggrundsfarve";
+ Text[ french ] = "~Couleur d'arrire-plan";
+ Text[ swedish ] = "~Bakgrundsfrg";
+ Text[ dutch ] = "~Achtergrondkleur";
+ Text[ spanish ] = "~Color de fondo";
+ Text[ english_us ] = "~Fill color";
+ Text[ chinese_simplified ] = "ɫ(~F)";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Kolor ta";
+ Text[ japanese ] = "wiF(~F)";
+ Text[ chinese_traditional ] = "IC(~F)";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = "(~F)";
+ Text[ turkish ] = "~Artalan rengi";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_FILLCOLOR
+ {
+ Pos = MAP_APPFONT ( 86 , 107 ) ;
+ Size = MAP_APPFONT ( 71 , 68 ) ;
+ Hide = TRUE;
+ Group = TRUE ;
+ DropDown = TRUE ;
+ DDExtraWidth = TRUE ;
+ };
+
+ FixedText FT_LANGUAGE
+ {
+ Pos = MAP_APPFONT ( 86 , 96 ) ;
+ Size = MAP_APPFONT ( 71 , 10 ) ;
+ Text = "S~prache" ;
+ Text [ ENGLISH ] = "~Language" ;
+ Text [ norwegian ] = "~Language" ;
+ Text [ italian ] = "~Lingua" ;
+ Text [ portuguese_brazilian ] = "~Idioma" ;
+ Text [ portuguese ] = "~Lngua" ;
+ Text [ finnish ] = "K~ieli" ;
+ Text [ danish ] = "Sprog" ;
+ Text [ french ] = "~Langue" ;
+ Text [ swedish ] = "S~prk" ;
+ Text [ dutch ] = "~Taal" ;
+ Text [ spanish ] = "I~dioma" ;
+ Text [ english_us ] = "~Language" ;
+ Text[ chinese_simplified ] = "(~L)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Jzyk";
+ Text[ japanese ] = "(~L)";
+ Text[ chinese_traditional ] = "y(~L)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "(~L)";
+ Text[ turkish ] = "D~il";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_LANGUAGE
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 86 , 107 ) ;
+ Size = MAP_APPFONT ( 71 , 68 ) ;
+ DropDown = TRUE ;
+ Sort = TRUE ;
+ };
+ FixedText FT_FONTTYPE
+ {
+ Pos = MAP_APPFONT ( 6 , 123 ) ;
+ Size = MAP_APPFONT ( 248 , 10 ) ;
+ };
+ Window WIN_EXAMPLE
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 166 , 74 ) ;
+ Size = MAP_APPFONT ( 85 , 40 ) ;
+ Text = "Beispiel" ;
+ Text [ English ] = "Example" ;
+ Text [ portuguese ] = "Exemplo" ;
+ Text [ english_us ] = "Example" ;
+ Text [ portuguese_brazilian ] = "Beispiel" ;
+ Text [ swedish ] = "Exempel" ;
+ Text [ danish ] = "Eksempel" ;
+ Text [ italian ] = "Esempio" ;
+ Text [ spanish ] = "Ejemplo" ;
+ Text [ french ] = "Exemple" ;
+ Text [ dutch ] = "Voorbeeld" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "Przykad";
+ Text[ japanese ] = "";
+ Text[ chinese_traditional ] = "Ҥl";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "rnek";
+ Text[ language_user1 ] = " ";
+ };
+ GroupBox GB_EXAMPLE
+ {
+ Pos = MAP_APPFONT ( 160 , 62 ) ;
+ Size = MAP_APPFONT ( 97 , 58 ) ;
+ Text = "Vorschau" ;
+ Text [ ENGLISH ] = "Preview" ;
+ Text [ norwegian ] = "Preview" ;
+ Text [ italian ] = "Anteprima" ;
+ Text [ portuguese_brazilian ] = "Examinar" ;
+ Text [ portuguese ] = "Previsualizar" ;
+ Text [ finnish ] = "Esikatselu" ;
+ Text [ danish ] = "Eksempel" ;
+ Text [ french ] = "Aperu" ;
+ Text [ swedish ] = "Frhandsvisning" ;
+ Text [ dutch ] = "Voorbeeld" ;
+ Text [ spanish ] = "Previsualizacin" ;
+ Text [ english_us ] = "Preview" ;
+ Group = TRUE ;
+ Text[ chinese_simplified ] = "Ԥ";
+ Text[ russian ] = "";
+ Text[ polish ] = "Podgld";
+ Text[ japanese ] = "ޭ";
+ Text[ chinese_traditional ] = "w";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "̸ ";
+ Text[ turkish ] = "nizleme";
+ Text[ language_user1 ] = " ";
+ };
+};
+ // RID_SVXPAGE_CHAR_EXT --------------------------------------------------
+TabPage RID_SVXPAGE_CHAR_EXT
+{
+ HelpId = HID_FORMAT_CHAR_EXT ;
+ Hide = TRUE ;
+ Text = "Schrifteffekt" ;
+ Text [ English ] = "Character Extension" ;
+ Text [ norwegian ] = "Character Extension" ;
+ Text [ italian ] = "Effetto carattere" ;
+ Text [ portuguese_brazilian ] = "Extenso de Caracter" ;
+ Text [ portuguese ] = "Efeitos do tipo de letra" ;
+ Text [ finnish ] = "Merkin tehosteet" ;
+ Text [ danish ] = "Skrifteffekt" ;
+ Text [ french ] = "Effet de caractre" ;
+ Text [ swedish ] = "Teckensnittseffekt" ;
+ Text [ dutch ] = "Schrifteffecten" ;
+ Text [ spanish ] = "Efectos de fuente" ;
+ Text [ english_us ] = "Font Effects" ;
+ Text[ chinese_simplified ] = "Ч";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Animacje";
+ Text[ japanese ] = "̫Č";
+ Text[ chinese_traditional ] = "rĪG";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = "۲ ȿ";
+ Text[ turkish ] = "Yaztipi efektleri";
+ Text[ language_user1 ] = " ";
+ Size = MAP_APPFONT ( 260 , 135 ) ;
+ ListBox LB_CAPS
+ {
+ Pos = MAP_APPFONT ( 6 , 12 ) ;
+ Size = MAP_APPFONT ( 84 , 56 ) ;
+ DropDown = TRUE;
+ StringList =
+ {
+ < "Keine" ; Default ; > ;
+ < "Versalien" ; Default ; > ;
+ < "Gemeine" ; Default ; > ;
+ < "Titelschrift" ; Default ; > ;
+ < "Kapitlchen" ; Default ; > ;
+ };
+ StringList [ ENGLISH ] =
+ {
+ < "None" ; Default ; > ;
+ < "All caps" ; Default ; > ;
+ < "Lower case" ; Default ; > ;
+ < "Title" ; Default ; > ;
+ < "Small caps" ; Default ; > ;
+ };
+ StringList [ language_user1 ] =
+ {
+ < "Keine" ; Default ; > ;
+ < "Versalien" ; Default ; > ;
+ < "Gemeine" ; Default ; > ;
+ < "Titelschrift" ; Default ; > ;
+ < "Kapitlchen" ; Default ; > ;
+ };
+ StringList [ english_us ] =
+ {
+ < "None" ; Default ; > ;
+ < "Capitals" ; Default ; > ;
+ < "Lowercase" ; Default ; > ;
+ < "Title" ; Default ; > ;
+ < "Small Capitals" ; Default ; > ;
+ };
+ StringList [ portuguese ] =
+ {
+ < "Nenhum(a)" ; Default ; > ;
+ < "Maisculas" ; Default ; > ;
+ < "Gemeine" ; Default ; > ;
+ < "Titelschrift" ; Default ; > ;
+ < "Kapitlchen" ; Default ; > ;
+ };
+ StringList [ russian ] =
+ {
+ < "Keine" ; Default ; > ;
+ < "Versalien" ; Default ; > ;
+ < "Gemeine" ; Default ; > ;
+ < "Titelschrift" ; Default ; > ;
+ < "Kapitlchen" ; Default ; > ;
+ };
+ StringList [ greek ] =
+ {
+ < "" ; Default ; > ;
+ < "" ; Default ; > ;
+ < " " ; Default ; > ;
+ < " " ; Default ; > ;
+ < " " ; Default ; > ;
+ };
+ StringList [ dutch ] =
+ {
+ < "Geen" ; Default ; > ;
+ < "Hoofdletters" ; Default ; > ;
+ < "Gewone" ; Default ; > ;
+ < "Titel" ; Default ; > ;
+ < "Kapitaaltjes" ; Default ; > ;
+ };
+ StringList [ french ] =
+ {
+ < "Aucun(e)" ; Default ; > ;
+ < "Majuscules" ; Default ; > ;
+ < "Minuscules" ; Default ; > ;
+ < "Caractres du titre" ; Default ; > ;
+ < "Petites majuscules" ; Default ; > ;
+ };
+ StringList [ spanish ] =
+ {
+ < "Keine" ; Default ; > ;
+ < "Versalien" ; Default ; > ;
+ < "Gemeine" ; Default ; > ;
+ < "Titelschrift" ; Default ; > ;
+ < "Kapitlchen" ; Default ; > ;
+ };
+ StringList [ italian ] =
+ {
+ < "Keine" ; Default ; > ;
+ < "Versalien" ; Default ; > ;
+ < "Gemeine" ; Default ; > ;
+ < "Titelschrift" ; Default ; > ;
+ < "Kapitlchen" ; Default ; > ;
+ };
+ StringList [ danish ] =
+ {
+ < "Ingen" ; Default ; > ;
+ < "Store bogstaver" ; Default ; > ;
+ < "Sm bogstaver" ; Default ; > ;
+ < "Titelskrift" ; Default ; > ;
+ < "Kapitler" ; Default ; > ;
+ };
+ StringList [ swedish ] =
+ {
+ < "Keine" ; Default ; > ;
+ < "Versalien" ; Default ; > ;
+ < "Gemeine" ; Default ; > ;
+ < "Titelschrift" ; Default ; > ;
+ < "Kapitlchen" ; Default ; > ;
+ };
+ StringList [ polish ] =
+ {
+ < "Keine" ; Default ; > ;
+ < "Versalien" ; Default ; > ;
+ < "Gemeine" ; Default ; > ;
+ < "Titelschrift" ; Default ; > ;
+ < "Kapitlchen" ; Default ; > ;
+ };
+ StringList [ portuguese_brazilian ] =
+ {
+ < "Keine" ; Default ; > ;
+ < "Versalien" ; Default ; > ;
+ < "Gemeine" ; Default ; > ;
+ < "Titelschrift" ; Default ; > ;
+ < "Kapitlchen" ; Default ; > ;
+ };
+ StringList [ japanese ] =
+ {
+ < "Ȃ" ; Default ; > ;
+ < "啶" ; Default ; > ;
+ < "" ; Default ; > ;
+ < "ٕ" ; Default ; > ;
+ < "^啶" ; Default ; > ;
+ };
+ StringList [ korean ] =
+ {
+ < "Keine" ; Default ; > ;
+ < "Versalien" ; Default ; > ;
+ < "Gemeine" ; Default ; > ;
+ < "Titelschrift" ; Default ; > ;
+ < "Kapitlchen" ; Default ; > ;
+ };
+ StringList [ chinese_simplified ] =
+ {
+ < "" ; Default ; > ;
+ < "дĸ" ; Default ; > ;
+ < "Сдĸ" ; Default ; > ;
+ < "" ; Default ; > ;
+ < "Сʹдĸ" ; Default ; > ;
+ };
+ StringList [ chinese_traditional ] =
+ {
+ < "L" ; Default ; > ;
+ < "jgr" ; Default ; > ;
+ < "pgr" ; Default ; > ;
+ < "Dr" ; Default ; > ;
+ < "pjgr" ; Default ; > ;
+ };
+ StringList [ turkish ] =
+ {
+ < "Keine" ; Default ; > ;
+ < "Versalien" ; Default ; > ;
+ < "Gemeine" ; Default ; > ;
+ < "Titelschrift" ; Default ; > ;
+ < "Kapitlchen" ; Default ; > ;
+ };
+ StringList [ arabic ] =
+ {
+ < "" ; Default ; > ;
+ < " " ; Default ; > ;
+ < " " ; Default ; > ;
+ < " " ; Default ; > ;
+ < " " ; Default ; > ;
+ };
+ };
+ RadioButton BTN_NONE
+ {
+ Pos = MAP_APPFONT ( 6 , 12 ) ;
+ Size = MAP_APPFONT ( 46 , 10 ) ;
+ Text = "~Keine" ;
+ Text [ ENGLISH ] = "~None" ;
+ Text [ norwegian ] = "~Ingen " ;
+ Text [ italian ] = "~Nessuno" ;
+ Text [ portuguese_brazilian ] = "~Nenhum" ;
+ Text [ portuguese ] = "~Nenhum" ;
+ Text [ finnish ] = "~Ei ole" ;
+ Text [ danish ] = "Ingen" ;
+ Text [ french ] = "~Aucun(e)" ;
+ Text [ swedish ] = "~Inga" ;
+ Text [ dutch ] = "~Geen" ;
+ Text [ spanish ] = "Nin~guno" ;
+ Text [ english_us ] = "~None" ;
+ Text[ chinese_simplified ] = "(~N)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Brak";
+ Text[ japanese ] = "Ȃ(~N)";
+ Text[ chinese_traditional ] = "L(~N)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "(~N)";
+ Text[ turkish ] = "~Yok";
+ Text[ language_user1 ] = " ";
+ };
+ RadioButton BTN_CAPS
+ {
+ Pos = MAP_APPFONT ( 6 , 23 ) ;
+ Size = MAP_APPFONT ( 46 , 10 ) ;
+ Text = "~Versalien" ;
+ Text [ ENGLISH ] = "~All Caps" ;
+ Text [ norwegian ] = "~All Caps" ;
+ Text [ italian ] = "Ma~iuscolo" ;
+ Text [ portuguese_brazilian ] = "~Tudo em caixa alta" ;
+ Text [ portuguese ] = "~Maisculas" ;
+ Text [ finnish ] = "I~soin kirjaimin" ;
+ Text [ danish ] = "Store bogst." ;
+ Text [ french ] = "Ma~juscules" ;
+ Text [ swedish ] = "~Versaler" ;
+ Text [ dutch ] = "~Hoofdletters" ;
+ Text [ spanish ] = "Ma~ysculas" ;
+ Text [ english_us ] = "~All caps" ;
+ Text[ chinese_simplified ] = "дĸ(~A)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Wersaliki";
+ Text[ japanese ] = "啶(~A)";
+ Text[ chinese_traditional ] = "jgr(~A)";
+ Text[ arabic ] = " ";
+ Text[ greek ] = "";
+ Text[ korean ] = " 빮(~A)";
+ Text[ turkish ] = "~Byk harflerle";
+ Text[ language_user1 ] = " ";
+ };
+ RadioButton BTN_LOWERCASE
+ {
+ Pos = MAP_APPFONT ( 6 , 34 ) ;
+ Size = MAP_APPFONT ( 46 , 10 ) ;
+ Text = "~Gemeine" ;
+ Text [ ENGLISH ] = "~Lower Case" ;
+ Text [ norwegian ] = "~Lower Case" ;
+ Text [ italian ] = "~Minuscolo" ;
+ Text [ portuguese_brazilian ] = "~Caixa Baixa" ;
+ Text [ portuguese ] = "Mins~culas" ;
+ Text [ finnish ] = "~Pienin kirjaimin" ;
+ Text [ danish ] = "Sm bogst." ;
+ Text [ french ] = "Minuscu~les" ;
+ Text [ swedish ] = "~Gemener" ;
+ Text [ dutch ] = "~Kleine letters" ;
+ Text [ spanish ] = "~Minsculas" ;
+ Text [ english_us ] = "~Lower case" ;
+ Text[ chinese_simplified ] = "Сд(~L)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Ma~e litery";
+ Text[ japanese ] = "(~L)";
+ Text[ chinese_traditional ] = "pg(~L)";
+ Text[ arabic ] = " ";
+ Text[ greek ] = "";
+ Text[ korean ] = "Ʒ /ҹ(~L)";
+ Text[ turkish ] = "~Kk harflerle";
+ Text[ language_user1 ] = " ";
+ };
+ RadioButton BTN_SMALLCAPS
+ {
+ Pos = MAP_APPFONT ( 53 , 12 ) ;
+ Size = MAP_APPFONT ( 54 , 10 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? K~apitlchen : K~apitlchen */
+ /* ### ACHTUNG: Neuer Text in Resource? K~apitlchen : K~apitlchen */
+ Text = "K~apitlchen" ;
+ Text [ ENGLISH ] = "S~mall Caps" ;
+ Text [ norwegian ] = "S~mall Caps" ;
+ Text [ italian ] = "M~aiuscoletto" ;
+ Text [ portuguese_brazilian ] = "V~ersaletes" ;
+ Text [ portuguese ] = "~Versaletes" ;
+ Text [ finnish ] = "~Kapiteelein" ;
+ Text [ danish ] = "Kapitler" ;
+ Text [ french ] = "Petites ~majusc." ;
+ Text [ swedish ] = "Sm k~apitler" ;
+ Text [ dutch ] = "Kle~in kapitaal" ;
+ Text [ spanish ] = "~Versalitas" ;
+ Text [ english_us ] = "S~mall caps" ;
+ Text[ chinese_simplified ] = "Сʹдĸ(~M)";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Kapita~liki";
+ Text[ japanese ] = "^啶(~M)";
+ Text[ chinese_traditional ] = "pjgr(~M)";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = "ҹ(~M)";
+ Text[ turkish ] = "K~k byk harf";
+ Text[ language_user1 ] = " ";
+ };
+ RadioButton BTN_TITEL
+ {
+ Pos = MAP_APPFONT ( 53 , 23 ) ;
+ Size = MAP_APPFONT ( 54 , 10 ) ;
+ Text = "~Titelschrift" ;
+ Text [ ENGLISH ] = "~Title" ;
+ Text [ norwegian ] = "~Tittel" ;
+ Text [ italian ] = "Cara~ttere" ;
+ Text [ portuguese_brazilian ] = "~Ttulo" ;
+ Text [ portuguese ] = "~Ttulo" ;
+ Text [ finnish ] = "~Arvo" ;
+ Text [ danish ] = "Titelskrift" ;
+ Text [ french ] = "~Caractres du titre" ;
+ Text [ swedish ] = "~Titel" ;
+ Text [ dutch ] = "~Titel" ;
+ Text [ spanish ] = "Carcter ttu~lo" ;
+ Text [ english_us ] = "~Title" ;
+ Text[ chinese_simplified ] = "(~T)";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Czcionk~a tytuowa";
+ Text[ japanese ] = "ٕ(~T)";
+ Text[ chinese_traditional ] = "D(~T)";
+ Text[ arabic ] = " ";
+ Text[ greek ] = "";
+ Text[ korean ] = "(~T)";
+ Text[ turkish ] = "~lk harf byk";
+ Text[ language_user1 ] = " ";
+ };
+ CheckBox CB_FLASH
+ {
+#if ( SUPD < 583 )
+ Pos = MAP_APPFONT ( 53 , 34 ) ;
+ Size = MAP_APPFONT ( 54 , 10 ) ;
+#else
+ Pos = MAP_APPFONT ( 6 , 29 ) ;
+ Size = MAP_APPFONT ( 84 , 10 ) ;
+#endif
+ Text = "~Blinkend" ;
+ Text [ ENGLISH ] = "~Flashing" ;
+ Hide = TRUE ;
+ Text [ english_us ] = "~Blinking" ;
+ Text [ italian ] = "Lampeggiante" ;
+ Text [ spanish ] = "~Intermitente" ;
+ Text [ french ] = "C~lignotant" ;
+ Text [ dutch ] = "K~nipperend" ;
+ Text [ swedish ] = "~Blinkande" ;
+ Text [ danish ] = "Blinkende" ;
+ Text [ portuguese_brazilian ] = "~Blinkend" ;
+ Text [ portuguese ] = "~Intermitente" ;
+ Text[ chinese_simplified ] = "˸(~B)";
+ Text[ russian ] = "";
+ Text[ polish ] = "~Miganie";
+ Text[ japanese ] = "_(~B)";
+ Text[ chinese_traditional ] = "{{(~B)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "~ ";
+ Text[ korean ] = "(~B)";
+ Text[ turkish ] = "~Yanp snen metin";
+ Text[ language_user1 ] = " ";
+ };
+ GroupBox GB_EFFECT
+ {
+ Pos = MAP_APPFONT ( 3 , 3 ) ;
+ Size = MAP_APPFONT ( 90 , 43 ) ;
+ Text = "Weitere Auszeichnungen" ;
+ Text [ ENGLISH ] = "More Effects" ;
+ Text [ norwegian ] = "More Effects" ;
+ Text [ italian ] = "Altri effetti" ;
+ Text [ portuguese_brazilian ] = "Mais Efeitos" ;
+ Text [ portuguese ] = "Mais efeitos" ;
+ Text [ finnish ] = "Lis tehosteita" ;
+ Text [ danish ] = "Flere effekter" ;
+ Text [ french ] = "Casse et autre" ;
+ Text [ swedish ] = "Fler effekter" ;
+ Text [ dutch ] = "Effecten" ;
+ Text [ spanish ] = "Ms efectos" ;
+ Text [ english_us ] = "More effects" ;
+ Text[ chinese_simplified ] = "Ч";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Inne wyrnienia";
+ Text[ japanese ] = "̑̕";
+ Text[ chinese_traditional ] = "LĪG";
+ Text[ arabic ] = " ";
+ Text[ greek ] = "";
+ Text[ korean ] = "Ÿ ȿ";
+ Text[ turkish ] = "Dier efektler";
+ Text[ language_user1 ] = " ";
+ };
+ RadioButton BTN_HIGH
+ {
+ Pos = MAP_APPFONT ( 99 , 12 ) ;
+ Size = MAP_APPFONT ( 57 , 10 ) ;
+ Text = "H~och" ;
+ Text [ ENGLISH ] = "~Super" ;
+ Text [ norwegian ] = "~Super" ;
+ Text [ italian ] = "~Apice" ;
+ Text [ portuguese_brazilian ] = "~Sobre" ;
+ Text [ portuguese ] = "~Superior" ;
+ Text [ finnish ] = "Y~lindeksi" ;
+ Text [ danish ] = "Hvet" ;
+ Text [ french ] = "Expo~sant" ;
+ Text [ swedish ] = "Upphj~d" ;
+ Text [ dutch ] = "~Superscript" ;
+ Text [ spanish ] = "Supernd~ice" ;
+ Text [ english_us ] = "Sup~er" ;
+ Text[ chinese_simplified ] = "(~S)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Indeks g~rny";
+ Text[ japanese ] = "t(~S)";
+ Text[ chinese_traditional ] = "@(~S)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "~";
+ Text[ korean ] = "(~E)";
+ Text[ turkish ] = "~st simge";
+ Text[ language_user1 ] = " ";
+ };
+ RadioButton BTN_NORMAL
+ {
+ Pos = MAP_APPFONT ( 99 , 23 ) ;
+ Size = MAP_APPFONT ( 57 , 10 ) ;
+ Text = "No~rmal" ;
+ Text [ English ] = "N~ormal" ;
+ Text [ norwegian ] = "N~ormal" ;
+ Text [ italian ] = "N~ormale" ;
+ Text [ portuguese_brazilian ] = "N~ormal" ;
+ Text [ portuguese ] = "~Padro" ;
+ Text [ finnish ] = "~Normaali" ;
+ Text [ danish ] = "Normal" ;
+ Text [ french ] = "N~ormal" ;
+ Text [ swedish ] = "No~rmal" ;
+ Text [ dutch ] = "N~ormaal" ;
+ Text [ spanish ] = "N~ormal" ;
+ Text [ english_us ] = "N~ormal" ;
+ Text[ chinese_simplified ] = "ͨ(~O)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Normalny";
+ Text[ japanese ] = "ʏ(~O)";
+ Text[ chinese_traditional ] = "q(~O)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "(~O)";
+ Text[ turkish ] = "No~rmal";
+ Text[ language_user1 ] = " ";
+ };
+ RadioButton BTN_DEEP
+ {
+ Pos = MAP_APPFONT ( 99 , 34 ) ;
+ Size = MAP_APPFONT ( 57 , 10 ) ;
+ Text = "T~ief" ;
+ Text [ ENGLISH ] = "S~ub" ;
+ Text [ norwegian ] = "S~ub" ;
+ Text [ italian ] = "Pedice" ;
+ Text [ portuguese_brazilian ] = "S~ob" ;
+ Text [ portuguese ] = "~Inferior" ;
+ Text [ finnish ] = "~Alaindeksi" ;
+ Text [ danish ] = "Snket" ;
+ Text [ french ] = "Indi~ce" ;
+ Text [ swedish ] = "~Nedsnkt" ;
+ Text [ dutch ] = "Subs~cript" ;
+ Text [ spanish ] = "Subndic~e" ;
+ Text [ english_us ] = "S~ub" ;
+ Text[ chinese_simplified ] = "(~U)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Indek~s dolny";
+ Text[ japanese ] = "t(~U)";
+ Text[ chinese_traditional ] = "C(~U)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "~";
+ Text[ korean ] = "Ʒ(~U)";
+ Text[ turkish ] = "A~lt simge";
+ Text[ language_user1 ] = " ";
+ };
+ GroupBox GB_POSITION
+ {
+ Pos = MAP_APPFONT ( 96 , 3 ) ;
+ Size = MAP_APPFONT ( 61 , 43 ) ;
+ Text = "Position" ;
+ Text [English] = "Position";
+ Text[ english_us ] = "Position";
+ Text[ portuguese ] = "Posio";
+ Text[ russian ] = "";
+ Text[ dutch ] = "Positie";
+ Text[ french ] = "Position";
+ Text[ spanish ] = "Posicin";
+ Text[ italian ] = "Posizione";
+ Text[ danish ] = "Placering";
+ Text[ swedish ] = "Position";
+ Text[ polish ] = "Pozycja";
+ Text[ portuguese_brazilian ] = "Position";
+ Text[ japanese ] = "ʒu";
+ Text[ chinese_simplified ] = "λ";
+ Text[ chinese_traditional ] = "m";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "ġ";
+ Text[ turkish ] = "Konum";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_ESCDEEPHIGH
+ {
+ Pos = MAP_APPFONT ( 165 , 15 ) ;
+ Size = MAP_APPFONT ( 59 , 10 ) ;
+ Text = "Ho~ch/Tief um" ;
+ Text [ ENGLISH ] = "Sup~er/Sub" ;
+ Text [ norwegian ] = "Sup~er/Sub" ;
+ Text [ italian ] = "Api~ce/Pedice di" ;
+ Text [ portuguese_brazilian ] = "Sub~re/Sob" ;
+ Text [ portuguese ] = "~Superior/Inferior em" ;
+ Text [ finnish ] = "Yl/alain~deksi" ;
+ Text [ danish ] = "Hv/snk" ;
+ Text [ french ] = "~Exposant/Indice" ;
+ Text [ swedish ] = "~Hj/snk" ;
+ Text [ dutch ] = "Sup~er/Subscript" ;
+ Text [ spanish ] = "Super/subndice e~n" ;
+ Text [ english_us ] = "Raise/lo~wer by" ;
+ Text[ chinese_simplified ] = "/½ֵ(~W)";
+ Text[ russian ] = "/ ";
+ Text[ polish ] = "Ind. gr./Ind. dln. przy";
+ Text[ japanese ] = "/(~W)";
+ Text[ chinese_traditional ] = "W@/U(~W)";
+ Text[ arabic ] = "/ ";
+ Text[ greek ] = "~/ ";
+ Text[ korean ] = "ø/ (~W)";
+ Text[ turkish ] = "Yk~seklik/Derinlik";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField ED_ESCDEEPHIGH
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 225 , 14 ) ;
+ Size = MAP_APPFONT ( 29 , 12 ) ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = 1 ;
+ Maximum = 100 ;
+ Unit = FUNIT_CUSTOM ;
+ CustomUnitText = "%" ;
+ First = 1 ;
+ Last = 100 ;
+ SpinSize = 1 ;
+ };
+ FixedText FT_ESCRELSIZE
+ {
+ Pos = MAP_APPFONT ( 165 , 30 ) ;
+ Size = MAP_APPFONT ( 59 , 10 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? ~Schriftgre rel. : ~Schriftgre rel. */
+ /* ### ACHTUNG: Neuer Text in Resource? ~Schriftgre rel. : ~Schriftgre rel. */
+ Text = "~Schriftgre rel." ;
+ Text [ ENGLISH ] = "~Font size rel." ;
+ Text [ norwegian ] = "~Font size rel." ;
+ Text [ italian ] = "Dim. relative ~caratt." ;
+ Text [ portuguese_brazilian ] = "~Tamanho rel. de fonte" ;
+ Text [ portuguese ] = "~Tamanho relativo" ;
+ Text [ finnish ] = "~Fontin koko suht." ;
+ Text [ danish ] = "Relativ strrelse" ;
+ Text [ french ] = "~Taille relative" ;
+ Text [ swedish ] = "Rel. ~teckenstorlek" ;
+ Text [ dutch ] = "~Lettergrootte rel." ;
+ Text [ spanish ] = "Tama~o relativo" ;
+ Text [ english_us ] = "R~elative font size" ;
+ Text[ chinese_simplified ] = "ԵС(~E)";
+ Text[ russian ] = " .";
+ Text[ polish ] = "Wzgl. rozm. czcionki";
+ Text[ japanese ] = "̫Ļނ̔{(~E)";
+ Text[ chinese_traditional ] = "۹諸rjp(~E)";
+ Text[ arabic ] = " ";
+ Text[ greek ] = "~ .";
+ Text[ korean ] = " ۲ ũ(~E)";
+ Text[ turkish ] = "~Gr. karakter boyu";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField ED_ESCRELSIZE
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 225 , 29 ) ;
+ Size = MAP_APPFONT ( 29 , 12 ) ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = 10 ;
+ Maximum = 100 ;
+ Unit = FUNIT_CUSTOM ;
+ CustomUnitText = "%" ;
+ First = 10 ;
+ Last = 100 ;
+ SpinSize = 1 ;
+ };
+ CheckBox CB_AUTOPOS
+ {
+ Pos = MAP_APPFONT ( 165 , 45 ) ;
+ Size = MAP_APPFONT ( 89 , 10 ) ;
+ Text = "A~utomatisch" ;
+ Text [ ENGLISH ] = "Automati~c" ;
+ Text [ english_us ] = "Automati~c" ;
+ Text [ italian ] = "A~utomatico" ;
+ Text [ spanish ] = "~Automtico" ;
+ Text [ french ] = "A~utomatique" ;
+ Text [ dutch ] = "A~utomatisch" ;
+ Text [ swedish ] = "A~utomatisk" ;
+ Text [ danish ] = "Automatisk" ;
+ Text [ portuguese ] = "A~utomtico" ;
+ Text [ portuguese_brazilian ] = "A~utomatisch" ;
+ Text[ chinese_simplified ] = "Զ(~C)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Automatycznie";
+ Text[ japanese ] = "";
+ Text[ chinese_traditional ] = "۰(~C)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "ڵ(~C)";
+ Text[ turkish ] = "O~tomatik";
+ Text[ language_user1 ] = " ";
+ };
+ GroupBox GB_POSEXT
+ {
+ Pos = MAP_APPFONT ( 160 , 3 ) ;
+ Size = MAP_APPFONT ( 97 , 59 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? Positionszustze : Positionszustze */
+ /* ### ACHTUNG: Neuer Text in Resource? Positionszustze : Positionszustze */
+ Text = "Positionszustze" ;
+ Text [ ENGLISH ] = "Position Options" ;
+ Text [ norwegian ] = "Position Options" ;
+ Text [ italian ] = "Opzioni posizione" ;
+ Text [ portuguese_brazilian ] = "Opes de posio" ;
+ Text [ portuguese ] = "Opes de posio" ;
+ Text [ finnish ] = "Sijaintiasetukset" ;
+ Text [ danish ] = "Positionsindstillinger" ;
+ Text [ french ] = "Options de position" ;
+ Text [ swedish ] = "Placeringsalternativ" ;
+ Text [ dutch ] = "Positieopties" ;
+ Text [ spanish ] = "Opciones de posicin" ;
+ Text [ english_us ] = "Position options" ;
+ Text[ chinese_simplified ] = "λѡ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Opcje pozycji";
+ Text[ japanese ] = "ʒu̵߼";
+ Text[ chinese_traditional ] = "mﶵ";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = "ġ ɼ";
+ Text[ turkish ] = "Konum seenekleri";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_KERNING
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 6 , 59 ) ;
+ Size = MAP_APPFONT ( 72 , 46 ) ;
+ DropDown = TRUE ;
+ StringList =
+ {
+ < "Standard" ; Default ; > ;
+ < "Gesperrt" ; Default ; > ;
+ < "Schmal" ; Default ; > ;
+ };
+ StringList [ ENGLISH ] =
+ {
+ < "Standard" ; Default ; > ;
+ < "Gesperrt" ; Default ; > ;
+ < "Schmal" ; Default ; > ;
+ };
+ StringList [ norwegian ] =
+ {
+ < "Standard" ; Default ; > ;
+ < "Gesperrt" ; Default ; > ;
+ < "Schmal" ; Default ; > ;
+ };
+ StringList [ italian ] =
+ {
+ < "Standard" ; Default ; > ;
+ < "Espansa" ; Default ; > ;
+ < "Ridotta" ; Default ; > ;
+ };
+ StringList [ portuguese_brazilian ] =
+ {
+ < "Standard" ; Default ; > ;
+ < "Gesperrt" ; Default ; > ;
+ < "Condensado" ; Default ; > ;
+ };
+ StringList [ portuguese ] =
+ {
+ < "Padro" ; Default ; > ;
+ < "Expandido" ; Default ; > ;
+ < "Condensado" ; Default ; > ;
+ };
+ StringList [ finnish ] =
+ {
+ < "Standard" ; Default ; > ;
+ < "Gesperrt" ; Default ; > ;
+ < "Schmal" ; Default ; > ;
+ };
+ StringList [ danish ] =
+ {
+ < "Standard" ; Default ; > ;
+ < "Bred" ; Default ; > ;
+ < "Smal" ; Default ; > ;
+ };
+ StringList [ french ] =
+ {
+ < "Standard" ; Default ; > ;
+ < "tendu" ; Default ; > ;
+ < "Condens" ; Default ; > ;
+ };
+ StringList [ swedish ] =
+ {
+ < "Standard" ; Default ; > ;
+ < "Sprrat" ; Default ; > ;
+ < "Smalt" ; Default ; > ;
+ };
+ StringList [ dutch ] =
+ {
+ < "Standaard" ; Default ; > ;
+ < "Verbreed" ; Default ; > ;
+ < "Versmald" ; Default ; > ;
+ };
+ StringList [ spanish ] =
+ {
+ < "Predeterminado" ; Default ; > ;
+ < "Expandido" ; Default ; > ;
+ < "Condensado" ; Default ; > ;
+ };
+ StringList [ english_us ] =
+ {
+ < "Standard" ; Default ; > ;
+ < "Expanded" ; Default ; > ;
+ < "Condensed" ; Default ; > ;
+ };
+ StringList [ chinese_simplified ] =
+ {
+ < "׼" ; Default ; > ;
+ < "չ" ; Default ; > ;
+ < "" ; Default ; > ;
+ };
+ StringList [ russian ] =
+ {
+ < "" ; Default ; > ;
+ < "" ; Default ; > ;
+ < "" ; Default ; > ;
+ };
+ StringList [ polish ] =
+ {
+ < "Standard" ; Default ; > ;
+ < "Rozszerzony" ; Default ; > ;
+ < "Wski" ; Default ; > ;
+ };
+ StringList [ japanese ] =
+ {
+ < "W" ; Default ; > ;
+ < "L" ; Default ; > ;
+ < "߂" ; Default ; > ;
+ };
+ StringList [ chinese_traditional ] =
+ {
+ < "з" ; Default ; > ;
+ < "Xi" ; Default ; > ;
+ < "Y" ; Default ; > ;
+ };
+ StringList [ arabic ] =
+ {
+ < "" ; Default ; > ;
+ < "" ; Default ; > ;
+ < "" ; Default ; > ;
+ };
+ StringList [ greek ] =
+ {
+ < "" ; Default ; > ;
+ < "" ; Default ; > ;
+ < "" ; Default ; > ;
+ };
+ StringList [ korean ] =
+ {
+ < "ǥ" ; Default ; > ;
+ < "" ; Default ; > ;
+ < "" ; Default ; > ;
+ };
+ StringList [ turkish ] =
+ {
+ < "Standart" ; Default ; > ;
+ < "Aral byt" ; Default ; > ;
+ < "Aral klt" ; Default ; > ;
+ };
+ StringList [ language_user1 ] =
+ {
+ < " " ; Default ; > ;
+ < " " ; Default ; > ;
+ < " " ; Default ; > ;
+ };
+ };
+ FixedText FT_KERNING
+ {
+ Pos = MAP_APPFONT ( 83 , 60 ) ;
+ Size = MAP_APPFONT ( 14 , 10 ) ;
+ Text = "u~m" ;
+ Text [ ENGLISH ] = "~by" ;
+ Text [ norwegian ] = "~by" ;
+ Text [ italian ] = "~per" ;
+ Text [ portuguese_brazilian ] = "~por" ;
+ Text [ portuguese ] = "P~or" ;
+ Text [ finnish ] = "~mr" ;
+ Text [ danish ] = "p" ;
+ Text [ french ] = "~par" ;
+ Text [ swedish ] = "o~m" ;
+ Text [ dutch ] = "~met" ;
+ Text [ spanish ] = "~de" ;
+ Text [ english_us ] = "~by" ;
+ Text[ chinese_simplified ] = "ֵ(~B)";
+ Text[ russian ] = "";
+ Text[ polish ] = "o";
+ Text[ japanese ] = "Ԋu";
+ Text[ chinese_traditional ] = "ƭ(~B)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "~";
+ Text[ korean ] = "ŭ(~B)";
+ Text[ turkish ] = "->";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField ED_KERNING
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 101 , 59 ) ;
+ Size = MAP_APPFONT ( 48 , 12 ) ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Maximum = 9999 ;
+ DecimalDigits = 1 ;
+ Unit = FUNIT_POINT ;
+ SpinSize = 10 ;
+ };
+ CheckBox BTN_AUTOKERN
+ {
+ Pos = MAP_APPFONT ( 6 , 74 ) ;
+ Size = MAP_APPFONT ( 142 , 10 ) ;
+ Text = "~Paarweises Kerning" ;
+ Text [ ENGLISH ] = "~Pair Kerning" ;
+ Text [ norwegian ] = "~Pair Kerning" ;
+ Text [ italian ] = "C~renatura caratteri a coppia" ;
+ Text [ portuguese_brazilian ] = "~Par de Kerning" ;
+ Text [ portuguese ] = "Espaamento por ~pares" ;
+ Text [ finnish ] = "~Parien vlistys" ;
+ Text [ danish ] = "Parvis knibning" ;
+ Text [ french ] = "~Crnage pair" ;
+ Text [ swedish ] = "~Parvis kerning" ;
+ Text [ dutch ] = "~Paarsgewijze kerning" ;
+ Text [ spanish ] = "A~juste par entre caracteres" ;
+ Text [ english_us ] = "~Pair kerning" ;
+ Text[ chinese_simplified ] = "־(~P)";
+ Text[ russian ] = " ";
+ Text[ polish ] = "K~erning w parze";
+ Text[ japanese ] = "g̶݂ݸ(~P)";
+ Text[ chinese_traditional ] = "rZվ(~P)";
+ Text[ arabic ] = " ";
+ Text[ greek ] = "~ ";
+ Text[ korean ] = " Ŀ(~P)";
+ Text[ turkish ] = "~Aralk azalt";
+ Text[ language_user1 ] = " ";
+ };
+ GroupBox GB_KERNING
+ {
+ Pos = MAP_APPFONT ( 3 , 49 ) ;
+ Size = MAP_APPFONT ( 154 , 37 ) ;
+ Text = "Laufweite" ;
+ Text [ ENGLISH ] = "Spacing" ;
+ Text [ norwegian ] = "Spacing" ;
+ Text [ italian ] = "Spaziatura" ;
+ Text [ portuguese_brazilian ] = "Espaamento" ;
+ Text [ portuguese ] = "Espaamento" ;
+ Text [ finnish ] = "Vli" ;
+ Text [ danish ] = "Afstand" ;
+ Text [ french ] = "Espacement" ;
+ Text [ swedish ] = "Avstnd" ;
+ Text [ dutch ] = "Spatiring" ;
+ Text [ spanish ] = "Espacios" ;
+ Text [ english_us ] = "Spacing" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "Odstpy";
+ Text[ japanese ] = "Ԋu";
+ Text[ chinese_traditional ] = "j";
+ Text[ arabic ] = " ";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "Karakter aral";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_UNDERLINECNT
+ {
+ Pos = MAP_APPFONT ( 6 , 88 ) ;
+ Size = MAP_APPFONT ( 71 , 10 ) ;
+ Text = "Unt~erstreichung" ;
+ Text [ ENGLISH ] = "Un~derline Style" ;
+ Text [ norwegian ] = "Un~derline Style" ;
+ Text [ italian ] = "S~ottolineato" ;
+ Text [ portuguese_brazilian ] = "Estilo Sub~linhado" ;
+ Text [ portuguese ] = "Sub~linhado" ;
+ Text [ finnish ] = "~Alleviivaustapa" ;
+ Text [ danish ] = "Understreget" ;
+ Text [ french ] = "Soulignage" ;
+ Text [ swedish ] = "Un~derstrykning" ;
+ Text [ dutch ] = "Onde~rstrepen" ;
+ Text [ spanish ] = "Su~brayado" ;
+ Text [ english_us ] = "Underlining" ;
+ Text[ chinese_simplified ] = "»(~D)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Podkrelenie";
+ Text[ japanese ] = "";
+ Text[ chinese_traditional ] = "Uu(~D)";
+ Text[ arabic ] = " ";
+ Text[ greek ] = "";
+ Text[ korean ] = "ٱ߱";
+ Text[ turkish ] = "Alt ~izili";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_UNDERLINECNT
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 6 , 98 ) ;
+ Size = MAP_APPFONT ( 71 , 46 ) ;
+ DropDown = TRUE ;
+ DDExtraWidth = TRUE ;
+ StringList =
+ {
+ < "Einfach" ; CHRDLG_UNDERLINE_SINGLE ; > ;
+ < "Doppelt" ; CHRDLG_UNDERLINE_DOUBLE ; > ;
+ < "Fett"; CHRDLG_UNDERLINE_BOLD; > ;
+ < "Punktiert" ; CHRDLG_UNDERLINE_DOTTED ; > ;
+ < "Punktiert fett" ; CHRDLG_UNDERLINE_BOLDDOTTED; > ;
+ < "Strich"; CHRDLG_UNDERLINE_DASH; > ;
+ < "Strich fett"; CHRDLG_UNDERLINE_BOLDDASH; > ;
+ < "Strich lang"; CHRDLG_UNDERLINE_LONGDASH; > ;
+ < "Strich fett lang"; CHRDLG_UNDERLINE_BOLDLONGDASH; > ;
+ < "Punkt Strich"; CHRDLG_UNDERLINE_DASHDOT; > ;
+ < "Punkt Strich fett"; CHRDLG_UNDERLINE_BOLDDASHDOT; > ;
+ < "Punkt Punkt Strich"; CHRDLG_UNDERLINE_DASHDOTDOT; > ;
+ < "Punkt Punkt Strich fett"; CHRDLG_UNDERLINE_BOLDDASHDOTDOT; > ;
+ < "Welle"; CHRDLG_UNDERLINE_WAVE; > ;
+ < "Welle fett"; CHRDLG_UNDERLINE_BOLDWAVE; > ;
+ < "Welle doppelt"; CHRDLG_UNDERLINE_DOUBLEWAVE; > ;
+ };
+ StringList [ ENGLISH ] =
+ {
+ < "Einfach" ; CHRDLG_UNDERLINE_SINGLE ; > ;
+ < "Doppelt" ; CHRDLG_UNDERLINE_DOUBLE ; > ;
+ < "Fett"; CHRDLG_UNDERLINE_BOLD; > ;
+ < "Punktiert" ; CHRDLG_UNDERLINE_DOTTED ; > ;
+ < "Punktiert fett" ; CHRDLG_UNDERLINE_BOLDDOTTED; > ;
+ < "Strich"; CHRDLG_UNDERLINE_DASH; > ;
+ < "Strich fett"; CHRDLG_UNDERLINE_BOLDDASH; > ;
+ < "Strich lang"; CHRDLG_UNDERLINE_LONGDASH; > ;
+ < "Strich fett lang"; CHRDLG_UNDERLINE_BOLDLONGDASH; > ;
+ < "Punkt Strich"; CHRDLG_UNDERLINE_DASHDOT; > ;
+ < "Punkt Strich fett"; CHRDLG_UNDERLINE_BOLDDASHDOT; > ;
+ < "Punkt Punkt Strich"; CHRDLG_UNDERLINE_DASHDOTDOT; > ;
+ < "Punkt Punkt Strich fett"; CHRDLG_UNDERLINE_BOLDDASHDOTDOT; > ;
+ < "Welle"; CHRDLG_UNDERLINE_WAVE; > ;
+ < "Welle fett"; CHRDLG_UNDERLINE_BOLDWAVE; > ;
+ < "Welle doppelt"; CHRDLG_UNDERLINE_DOUBLEWAVE; > ;
+ };
+ StringList [ norwegian ] =
+ {
+ < "Einfach" ; CHRDLG_UNDERLINE_SINGLE ; > ;
+ < "Doppelt" ; CHRDLG_UNDERLINE_DOUBLE ; > ;
+ < "Fett"; CHRDLG_UNDERLINE_BOLD; > ;
+ };
+ StringList [ italian ] =
+ {
+ < "Semplice" ; CHRDLG_UNDERLINE_SINGLE ; > ;
+ < "Doppio" ; CHRDLG_UNDERLINE_DOUBLE ; > ;
+ < "Grassetto"; CHRDLG_UNDERLINE_BOLD; > ;
+ < "Puntato" ; CHRDLG_UNDERLINE_DOTTED ; > ;
+ < "Grassetto puntato" ; CHRDLG_UNDERLINE_BOLDDOTTED; > ;
+ < "Tratto"; CHRDLG_UNDERLINE_DASH; > ;
+ < "Tratto grassetto"; CHRDLG_UNDERLINE_BOLDDASH; > ;
+ < "Tratto lungo"; CHRDLG_UNDERLINE_LONGDASH; > ;
+ < "Tratto grassetto lungo"; CHRDLG_UNDERLINE_BOLDLONGDASH; > ;
+ < "Punto tratto"; CHRDLG_UNDERLINE_DASHDOT; > ;
+ < "Punto tratto grassetto"; CHRDLG_UNDERLINE_BOLDDASHDOT; > ;
+ < "Punto punto tratto"; CHRDLG_UNDERLINE_DASHDOTDOT; > ;
+ < "Punto punto tratto grassetto"; CHRDLG_UNDERLINE_BOLDDASHDOTDOT; > ;
+ < "Linea ondulata"; CHRDLG_UNDERLINE_WAVE; > ;
+ < "Linea ondulata grassetto"; CHRDLG_UNDERLINE_BOLDWAVE; > ;
+ < "Linea ondulata doppia"; CHRDLG_UNDERLINE_DOUBLEWAVE; > ;
+ };
+ StringList [ portuguese_brazilian ] =
+ {
+ < "Einfach" ; CHRDLG_UNDERLINE_SINGLE ; > ;
+ < "Doppelt" ; CHRDLG_UNDERLINE_DOUBLE ; > ;
+ < "Pontilhado"; CHRDLG_UNDERLINE_BOLD; > ;
+ < "Punktiert" ; CHRDLG_UNDERLINE_DOTTED ; > ;
+ < "Punktiert fett" ; CHRDLG_UNDERLINE_BOLDDOTTED; > ;
+ < "Strich"; CHRDLG_UNDERLINE_DASH; > ;
+ < "Strich fett"; CHRDLG_UNDERLINE_BOLDDASH; > ;
+ < "Strich lang"; CHRDLG_UNDERLINE_LONGDASH; > ;
+ < "Strich fett lang"; CHRDLG_UNDERLINE_BOLDLONGDASH; > ;
+ < "Punkt Strich"; CHRDLG_UNDERLINE_DASHDOT; > ;
+ < "Punkt Strich fett"; CHRDLG_UNDERLINE_BOLDDASHDOT; > ;
+ < "Punkt Punkt Strich"; CHRDLG_UNDERLINE_DASHDOTDOT; > ;
+ < "Punkt Punkt Strich fett"; CHRDLG_UNDERLINE_BOLDDASHDOTDOT; > ;
+ < "Welle"; CHRDLG_UNDERLINE_WAVE; > ;
+ < "Welle fett"; CHRDLG_UNDERLINE_BOLDWAVE; > ;
+ < "Welle doppelt"; CHRDLG_UNDERLINE_DOUBLEWAVE; > ;
+ };
+ StringList [ portuguese ] =
+ {
+ < "Simples" ; CHRDLG_UNDERLINE_SINGLE ; > ;
+ < "Duplo" ; CHRDLG_UNDERLINE_DOUBLE ; > ;
+ < "Negrito"; CHRDLG_UNDERLINE_BOLD; > ;
+ < "Pontilhado" ; CHRDLG_UNDERLINE_DOTTED ; > ;
+ < "Pontilhado negrito" ; CHRDLG_UNDERLINE_BOLDDOTTED; > ;
+ < "Trao"; CHRDLG_UNDERLINE_DASH; > ;
+ < "Trao negrito"; CHRDLG_UNDERLINE_BOLDDASH; > ;
+ < "Trao longo"; CHRDLG_UNDERLINE_LONGDASH; > ;
+ < "Trao longo negrito"; CHRDLG_UNDERLINE_BOLDLONGDASH; > ;
+ < "Ponto trao"; CHRDLG_UNDERLINE_DASHDOT; > ;
+ < "Ponto trao negrito"; CHRDLG_UNDERLINE_BOLDDASHDOT; > ;
+ < "Ponto ponto trao"; CHRDLG_UNDERLINE_DASHDOTDOT; > ;
+ < "Ponto ponto trao negrito"; CHRDLG_UNDERLINE_BOLDDASHDOTDOT; > ;
+ < "Ondulao"; CHRDLG_UNDERLINE_WAVE; > ;
+ < "Ondulao negrito"; CHRDLG_UNDERLINE_BOLDWAVE; > ;
+ < "Ondulao dupla"; CHRDLG_UNDERLINE_DOUBLEWAVE; > ;
+ };
+ StringList [ finnish ] =
+ {
+ < "Einfach" ; CHRDLG_UNDERLINE_SINGLE ; > ;
+ < "Doppelt" ; CHRDLG_UNDERLINE_DOUBLE ; > ;
+ < "Fett"; CHRDLG_UNDERLINE_BOLD; > ;
+ };
+ StringList [ danish ] =
+ {
+ < "Enkelt" ; CHRDLG_UNDERLINE_SINGLE ; > ;
+ < "Dobbelt" ; CHRDLG_UNDERLINE_DOUBLE ; > ;
+ < "Fed"; CHRDLG_UNDERLINE_BOLD; > ;
+ < "Punkteret" ; CHRDLG_UNDERLINE_DOTTED ; > ;
+ < "Punkteret (fed)" ; CHRDLG_UNDERLINE_BOLDDOTTED; > ;
+ < "Stiplet"; CHRDLG_UNDERLINE_DASH; > ;
+ < "Stiplet (fed)"; CHRDLG_UNDERLINE_BOLDDASH; > ;
+ < "Stiplet lang"; CHRDLG_UNDERLINE_LONGDASH; > ;
+ < "Stiplet lang (fed)"; CHRDLG_UNDERLINE_BOLDLONGDASH; > ;
+ < "Prik streg"; CHRDLG_UNDERLINE_DASHDOT; > ;
+ < "Prik streg (fed)"; CHRDLG_UNDERLINE_BOLDDASHDOT; > ;
+ < "Prik prik streg"; CHRDLG_UNDERLINE_DASHDOTDOT; > ;
+ < "Prik prik streg (fed)"; CHRDLG_UNDERLINE_BOLDDASHDOTDOT; > ;
+ < "Blge"; CHRDLG_UNDERLINE_WAVE; > ;
+ < "Blge (fed)"; CHRDLG_UNDERLINE_BOLDWAVE; > ;
+ < "Dobbelt blge"; CHRDLG_UNDERLINE_DOUBLEWAVE; > ;
+ };
+ StringList [ french ] =
+ {
+ < "Simple" ; CHRDLG_UNDERLINE_SINGLE ; > ;
+ < "Double" ; CHRDLG_UNDERLINE_DOUBLE ; > ;
+ < "Gras"; CHRDLG_UNDERLINE_BOLD; > ;
+ < "Pointill" ; CHRDLG_UNDERLINE_DOTTED ; > ;
+ < "Pointill gras" ; CHRDLG_UNDERLINE_BOLDDOTTED; > ;
+ < "Tiret"; CHRDLG_UNDERLINE_DASH; > ;
+ < "Tiret gras"; CHRDLG_UNDERLINE_BOLDDASH; > ;
+ < "Tiret long"; CHRDLG_UNDERLINE_LONGDASH; > ;
+ < "Tiret gras long "; CHRDLG_UNDERLINE_BOLDLONGDASH; > ;
+ < "Point tiret"; CHRDLG_UNDERLINE_DASHDOT; > ;
+ < "Point tiret gras"; CHRDLG_UNDERLINE_BOLDDASHDOT; > ;
+ < "Point point tiret"; CHRDLG_UNDERLINE_DASHDOTDOT; > ;
+ < "Point point tiret gras"; CHRDLG_UNDERLINE_BOLDDASHDOTDOT; > ;
+ < "Ondulation"; CHRDLG_UNDERLINE_WAVE; > ;
+ < "Ondulation grasse"; CHRDLG_UNDERLINE_BOLDWAVE; > ;
+ < "Double ondulation"; CHRDLG_UNDERLINE_DOUBLEWAVE; > ;
+ };
+ StringList [ swedish ] =
+ {
+ < "Enkelt" ; CHRDLG_UNDERLINE_SINGLE ; > ;
+ < "Dubbelt" ; CHRDLG_UNDERLINE_DOUBLE ; > ;
+ < "Fet"; CHRDLG_UNDERLINE_BOLD; > ;
+ < "Punkterad" ; CHRDLG_UNDERLINE_DOTTED ; > ;
+ < "Punkterad fet" ; CHRDLG_UNDERLINE_BOLDDOTTED; > ;
+ < "Streck"; CHRDLG_UNDERLINE_DASH; > ;
+ < "Streck fet"; CHRDLG_UNDERLINE_BOLDDASH; > ;
+ < "Streck lngt"; CHRDLG_UNDERLINE_LONGDASH; > ;
+ < "Streck fet lngt"; CHRDLG_UNDERLINE_BOLDLONGDASH; > ;
+ < "Punkt streck"; CHRDLG_UNDERLINE_DASHDOT; > ;
+ < "Punkt streck fet"; CHRDLG_UNDERLINE_BOLDDASHDOT; > ;
+ < "Punkt punkt streck"; CHRDLG_UNDERLINE_DASHDOTDOT; > ;
+ < "Punkt punkt streck fet"; CHRDLG_UNDERLINE_BOLDDASHDOTDOT; > ;
+ < "Vg"; CHRDLG_UNDERLINE_WAVE; > ;
+ < "Vg fet"; CHRDLG_UNDERLINE_BOLDWAVE; > ;
+ < "Dubbel vg"; CHRDLG_UNDERLINE_DOUBLEWAVE; > ;
+ };
+ StringList [ dutch ] =
+ {
+ < "Eenvoudig" ; CHRDLG_UNDERLINE_SINGLE ; > ;
+ < "Dubbel" ; CHRDLG_UNDERLINE_DOUBLE ; > ;
+ < "Vet"; CHRDLG_UNDERLINE_BOLD; > ;
+ < "Stippellijn" ; CHRDLG_UNDERLINE_DOTTED ; > ;
+ < "Stippellijn vet" ; CHRDLG_UNDERLINE_BOLDDOTTED; > ;
+ < "Streepje"; CHRDLG_UNDERLINE_DASH; > ;
+ < "Streepje vet"; CHRDLG_UNDERLINE_BOLDDASH; > ;
+ < "Streepje lang"; CHRDLG_UNDERLINE_LONGDASH; > ;
+ < "Streepje vet lang"; CHRDLG_UNDERLINE_BOLDLONGDASH; > ;
+ < "Punt-streepje"; CHRDLG_UNDERLINE_DASHDOT; > ;
+ < "Punt-streepje vet"; CHRDLG_UNDERLINE_BOLDDASHDOT; > ;
+ < "Punt punt streepje"; CHRDLG_UNDERLINE_DASHDOTDOT; > ;
+ < "Punt Puntj streepje vet"; CHRDLG_UNDERLINE_BOLDDASHDOTDOT; > ;
+ < "Golf"; CHRDLG_UNDERLINE_WAVE; > ;
+ < "Golf vet"; CHRDLG_UNDERLINE_BOLDWAVE; > ;
+ < "Dubbele golf"; CHRDLG_UNDERLINE_DOUBLEWAVE; > ;
+ };
+ StringList [ spanish ] =
+ {
+ < "Sencillo" ; CHRDLG_UNDERLINE_SINGLE ; > ;
+ < "Doble" ; CHRDLG_UNDERLINE_DOUBLE ; > ;
+ < "Negrita"; CHRDLG_UNDERLINE_BOLD; > ;
+ < "Punteado" ; CHRDLG_UNDERLINE_DOTTED ; > ;
+ < "Punteado negrita" ; CHRDLG_UNDERLINE_BOLDDOTTED; > ;
+ < "Trazo"; CHRDLG_UNDERLINE_DASH; > ;
+ < "Trazo negrita"; CHRDLG_UNDERLINE_BOLDDASH; > ;
+ < "Trazo largo"; CHRDLG_UNDERLINE_LONGDASH; > ;
+ < "Trazo negrita largo"; CHRDLG_UNDERLINE_BOLDLONGDASH; > ;
+ < "Punto trazo"; CHRDLG_UNDERLINE_DASHDOT; > ;
+ < "Punto trazo negrita"; CHRDLG_UNDERLINE_BOLDDASHDOT; > ;
+ < "Punto punto trazo"; CHRDLG_UNDERLINE_DASHDOTDOT; > ;
+ < "Punto punto trazo negrita"; CHRDLG_UNDERLINE_BOLDDASHDOTDOT; > ;
+ < "Ondulada"; CHRDLG_UNDERLINE_WAVE; > ;
+ < "Ondulada negrita"; CHRDLG_UNDERLINE_BOLDWAVE; > ;
+ < "Ondulada doble"; CHRDLG_UNDERLINE_DOUBLEWAVE; > ;
+ };
+ StringList [ english_us ] =
+ {
+ < "Single" ; CHRDLG_UNDERLINE_SINGLE ; > ;
+ < "Double" ; CHRDLG_UNDERLINE_DOUBLE ; > ;
+ < "Bold"; CHRDLG_UNDERLINE_BOLD; > ;
+ < "Dotted" ; CHRDLG_UNDERLINE_DOTTED ; > ;
+ < "Dotted (Bold)" ; CHRDLG_UNDERLINE_BOLDDOTTED; > ;
+ < "Dash"; CHRDLG_UNDERLINE_DASH; > ;
+ < "Dash (Bold)"; CHRDLG_UNDERLINE_BOLDDASH; > ;
+ < "Long Dash"; CHRDLG_UNDERLINE_LONGDASH; > ;
+ < "Long Dash (Bold)"; CHRDLG_UNDERLINE_BOLDLONGDASH; > ;
+ < "Dot Dash"; CHRDLG_UNDERLINE_DASHDOT; > ;
+ < "Dot Dash (Bold)"; CHRDLG_UNDERLINE_BOLDDASHDOT; > ;
+ < "Dot Dot Dash"; CHRDLG_UNDERLINE_DASHDOTDOT; > ;
+ < "Dot Dot Dash (Bold)"; CHRDLG_UNDERLINE_BOLDDASHDOTDOT; > ;
+ < "Wave"; CHRDLG_UNDERLINE_WAVE; > ;
+ < "Wave (Bold)"; CHRDLG_UNDERLINE_BOLDWAVE; > ;
+ < "Double Wave"; CHRDLG_UNDERLINE_DOUBLEWAVE; > ;
+ };
+ StringList [ chinese_simplified ] =
+ {
+ < "" ; CHRDLG_UNDERLINE_SINGLE ; > ;
+ < "˫" ; CHRDLG_UNDERLINE_DOUBLE ; > ;
+ < ""; CHRDLG_UNDERLINE_BOLD; > ;
+ < "" ; CHRDLG_UNDERLINE_DOTTED ; > ;
+ < "δ" ; CHRDLG_UNDERLINE_BOLDDOTTED; > ;
+ < ""; CHRDLG_UNDERLINE_DASH; > ;
+ < "ۺ"; CHRDLG_UNDERLINE_BOLDDASH; > ;
+ < ""; CHRDLG_UNDERLINE_LONGDASH; > ;
+ < "ͳ"; CHRDLG_UNDERLINE_BOLDLONGDASH; > ;
+ < "㻮"; CHRDLG_UNDERLINE_DASHDOT; > ;
+ < "͵㻮"; CHRDLG_UNDERLINE_BOLDDASHDOT; > ;
+ < "㻮"; CHRDLG_UNDERLINE_DASHDOTDOT; > ;
+ < "͵㻮"; CHRDLG_UNDERLINE_BOLDDASHDOTDOT; > ;
+ < ""; CHRDLG_UNDERLINE_WAVE; > ;
+ < "Ͳ"; CHRDLG_UNDERLINE_BOLDWAVE; > ;
+ < "˫"; CHRDLG_UNDERLINE_DOUBLEWAVE; > ;
+ };
+ StringList [ russian ] =
+ {
+ < "" ; CHRDLG_UNDERLINE_SINGLE ; > ;
+ < "" ; CHRDLG_UNDERLINE_DOUBLE ; > ;
+ < ""; CHRDLG_UNDERLINE_BOLD; > ;
+ < "" ; CHRDLG_UNDERLINE_DOTTED ; > ;
+ < " " ; CHRDLG_UNDERLINE_BOLDDOTTED; > ;
+ < ""; CHRDLG_UNDERLINE_DASH; > ;
+ < " "; CHRDLG_UNDERLINE_BOLDDASH; > ;
+ < " "; CHRDLG_UNDERLINE_LONGDASH; > ;
+ < " "; CHRDLG_UNDERLINE_BOLDLONGDASH; > ;
+ < " "; CHRDLG_UNDERLINE_DASHDOT; > ;
+ < " ()"; CHRDLG_UNDERLINE_BOLDDASHDOT; > ;
+ < " "; CHRDLG_UNDERLINE_DASHDOTDOT; > ;
+ < " ()"; CHRDLG_UNDERLINE_BOLDDASHDOTDOT; > ;
+ < ""; CHRDLG_UNDERLINE_WAVE; > ;
+ < " "; CHRDLG_UNDERLINE_BOLDWAVE; > ;
+ < " "; CHRDLG_UNDERLINE_DOUBLEWAVE; > ;
+ };
+ StringList [ polish ] =
+ {
+ < "Pojedyncze" ; CHRDLG_UNDERLINE_SINGLE ; > ;
+ < "Podwjne" ; CHRDLG_UNDERLINE_DOUBLE ; > ;
+ < "Pogrubienie"; CHRDLG_UNDERLINE_BOLD; > ;
+ < "Kropkowany" ; CHRDLG_UNDERLINE_DOTTED ; > ;
+ < "Kropkowany (pogrubiony)" ; CHRDLG_UNDERLINE_BOLDDOTTED; > ;
+ < "Kreska"; CHRDLG_UNDERLINE_DASH; > ;
+ < "Kreska (pogrubiona)"; CHRDLG_UNDERLINE_BOLDDASH; > ;
+ < "Duga kreska "; CHRDLG_UNDERLINE_LONGDASH; > ;
+ < "Duga kreska (pogrubiona)"; CHRDLG_UNDERLINE_BOLDLONGDASH; > ;
+ < "Kropka-Kreska"; CHRDLG_UNDERLINE_DASHDOT; > ;
+ < "Kropka Kreska (pogrubiona)"; CHRDLG_UNDERLINE_BOLDDASHDOT; > ;
+ < "Kropka-Kropka-Kreska"; CHRDLG_UNDERLINE_DASHDOTDOT; > ;
+ < "Kropka Kropka Kreska (pogrubiona)"; CHRDLG_UNDERLINE_BOLDDASHDOTDOT; > ;
+ < "Fala"; CHRDLG_UNDERLINE_WAVE; > ;
+ < "Fala (pogrubiona)"; CHRDLG_UNDERLINE_BOLDWAVE; > ;
+ < "Fala podwjna"; CHRDLG_UNDERLINE_DOUBLEWAVE; > ;
+ };
+ StringList [ japanese ] =
+ {
+ < "P" ; CHRDLG_UNDERLINE_SINGLE ; > ;
+ < "d" ; CHRDLG_UNDERLINE_DOUBLE ; > ;
+ < ""; CHRDLG_UNDERLINE_BOLD; > ;
+ < "_" ; CHRDLG_UNDERLINE_DOTTED ; > ;
+ < "_" ; CHRDLG_UNDERLINE_BOLDDOTTED; > ;
+ < "ޯ"; CHRDLG_UNDERLINE_DASH; > ;
+ < "ޯ"; CHRDLG_UNDERLINE_BOLDDASH; > ;
+ < "ޯ"; CHRDLG_UNDERLINE_LONGDASH; > ;
+ < "ޯ"; CHRDLG_UNDERLINE_BOLDLONGDASH; > ;
+ < "_ޯ"; CHRDLG_UNDERLINE_DASHDOT; > ;
+ < "_ޯ"; CHRDLG_UNDERLINE_BOLDDASHDOT; > ;
+ < "__ޯ"; CHRDLG_UNDERLINE_DASHDOTDOT; > ;
+ < "̓__ޯ"; CHRDLG_UNDERLINE_BOLDDASHDOTDOT; > ;
+ < "g"; CHRDLG_UNDERLINE_WAVE; > ;
+ < "g"; CHRDLG_UNDERLINE_BOLDWAVE; > ;
+ < "d̔g"; CHRDLG_UNDERLINE_DOUBLEWAVE; > ;
+ };
+ StringList [ chinese_traditional ] =
+ {
+ < "" ; CHRDLG_UNDERLINE_SINGLE ; > ;
+ < "" ; CHRDLG_UNDERLINE_DOUBLE ; > ;
+ < ""; CHRDLG_UNDERLINE_BOLD; > ;
+ < "I" ; CHRDLG_UNDERLINE_DOTTED ; > ;
+ < "Iβ" ; CHRDLG_UNDERLINE_BOLDDOTTED; > ;
+ < "}鸹"; CHRDLG_UNDERLINE_DASH; > ;
+ < "ʫ}鸹"; CHRDLG_UNDERLINE_BOLDDASH; > ;
+ < "u"; CHRDLG_UNDERLINE_LONGDASH; > ;
+ < "ʫu"; CHRDLG_UNDERLINE_BOLDLONGDASH; > ;
+ < "Iu"; CHRDLG_UNDERLINE_DASHDOT; > ;
+ < "ʫIu"; CHRDLG_UNDERLINE_BOLDDASHDOT; > ;
+ < "IIu"; CHRDLG_UNDERLINE_DASHDOTDOT; > ;
+ < "ʫIIu"; CHRDLG_UNDERLINE_BOLDDASHDOTDOT; > ;
+ < "iu"; CHRDLG_UNDERLINE_WAVE; > ;
+ < "ʫiu"; CHRDLG_UNDERLINE_BOLDWAVE; > ;
+ < "iu"; CHRDLG_UNDERLINE_DOUBLEWAVE; > ;
+ };
+ StringList [ arabic ] =
+ {
+ < "" ; CHRDLG_UNDERLINE_SINGLE ; > ;
+ < "" ; CHRDLG_UNDERLINE_DOUBLE ; > ;
+ < ""; CHRDLG_UNDERLINE_BOLD; > ;
+ < "" ; CHRDLG_UNDERLINE_DOTTED ; > ;
+ < " ()" ; CHRDLG_UNDERLINE_BOLDDOTTED; > ;
+ < ""; CHRDLG_UNDERLINE_DASH; > ;
+ < " ()"; CHRDLG_UNDERLINE_BOLDDASH; > ;
+ < " "; CHRDLG_UNDERLINE_LONGDASH; > ;
+ < " "; CHRDLG_UNDERLINE_BOLDLONGDASH; > ;
+ < " "; CHRDLG_UNDERLINE_DASHDOT; > ;
+ < " ()"; CHRDLG_UNDERLINE_BOLDDASHDOT; > ;
+ < " "; CHRDLG_UNDERLINE_DASHDOTDOT; > ;
+ < " ()"; CHRDLG_UNDERLINE_BOLDDASHDOTDOT; > ;
+ < ""; CHRDLG_UNDERLINE_WAVE; > ;
+ < " ()"; CHRDLG_UNDERLINE_BOLDWAVE; > ;
+ < " "; CHRDLG_UNDERLINE_DOUBLEWAVE; > ;
+ };
+ StringList [ greek ] =
+ {
+ < "" ; CHRDLG_UNDERLINE_SINGLE ; > ;
+ < "" ; CHRDLG_UNDERLINE_DOUBLE ; > ;
+ < ""; CHRDLG_UNDERLINE_BOLD; > ;
+ < "" ; CHRDLG_UNDERLINE_DOTTED ; > ;
+ < " ()" ; CHRDLG_UNDERLINE_BOLDDOTTED; > ;
+ < ""; CHRDLG_UNDERLINE_DASH; > ;
+ < " ()"; CHRDLG_UNDERLINE_BOLDDASH; > ;
+ < " ()"; CHRDLG_UNDERLINE_LONGDASH; > ;
+ < " ( - )"; CHRDLG_UNDERLINE_BOLDLONGDASH; > ;
+ < " - "; CHRDLG_UNDERLINE_DASHDOT; > ;
+ < " - ()"; CHRDLG_UNDERLINE_BOLDDASHDOT; > ;
+ < " - - "; CHRDLG_UNDERLINE_DASHDOTDOT; > ;
+ < " - - ()"; CHRDLG_UNDERLINE_BOLDDASHDOTDOT; > ;
+ < " "; CHRDLG_UNDERLINE_WAVE; > ;
+ < " ()"; CHRDLG_UNDERLINE_BOLDWAVE; > ;
+ < " "; CHRDLG_UNDERLINE_DOUBLEWAVE; > ;
+ };
+ StringList [ korean ] =
+ {
+ < "" ; CHRDLG_UNDERLINE_SINGLE ; > ;
+ < "" ; CHRDLG_UNDERLINE_DOUBLE ; > ;
+ < "ϰ"; CHRDLG_UNDERLINE_BOLD; > ;
+ < "" ; CHRDLG_UNDERLINE_DOTTED ; > ;
+ < "(ϰ)" ; CHRDLG_UNDERLINE_BOLDDOTTED; > ;
+ < ""; CHRDLG_UNDERLINE_DASH; > ;
+ < "(ϰ)"; CHRDLG_UNDERLINE_BOLDDASH; > ;
+ < " "; CHRDLG_UNDERLINE_LONGDASH; > ;
+ < " (ϰ)"; CHRDLG_UNDERLINE_BOLDLONGDASH; > ;
+ < " "; CHRDLG_UNDERLINE_DASHDOT; > ;
+ < " (ϰ)"; CHRDLG_UNDERLINE_BOLDDASHDOT; > ;
+ < " "; CHRDLG_UNDERLINE_DASHDOTDOT; > ;
+ < " (ϰ)"; CHRDLG_UNDERLINE_BOLDDASHDOTDOT; > ;
+ < "ļ"; CHRDLG_UNDERLINE_WAVE; > ;
+ < "ļ (ϰ)"; CHRDLG_UNDERLINE_BOLDWAVE; > ;
+ < " ļ"; CHRDLG_UNDERLINE_DOUBLEWAVE; > ;
+ };
+ StringList [ turkish ] =
+ {
+ < "Tek" ; CHRDLG_UNDERLINE_SINGLE ; > ;
+ < "ift" ; CHRDLG_UNDERLINE_DOUBLE ; > ;
+ < "Kaln"; CHRDLG_UNDERLINE_BOLD; > ;
+ < "Noktal" ; CHRDLG_UNDERLINE_DOTTED ; > ;
+ < "Kaln noktal" ; CHRDLG_UNDERLINE_BOLDDOTTED; > ;
+ < "izgi"; CHRDLG_UNDERLINE_DASH; > ;
+ < "Kaln izgi"; CHRDLG_UNDERLINE_BOLDDASH; > ;
+ < "Uzun izgi"; CHRDLG_UNDERLINE_LONGDASH; > ;
+ < "Kaln uun izgi"; CHRDLG_UNDERLINE_BOLDLONGDASH; > ;
+ < "Nokta izgi"; CHRDLG_UNDERLINE_DASHDOT; > ;
+ < "Kaln nokta izgi"; CHRDLG_UNDERLINE_BOLDDASHDOT; > ;
+ < "Nokta nokta izgi"; CHRDLG_UNDERLINE_DASHDOTDOT; > ;
+ < "Kaln nokta nokta izgi"; CHRDLG_UNDERLINE_BOLDDASHDOTDOT; > ;
+ < "Dalga"; CHRDLG_UNDERLINE_WAVE; > ;
+ < "Kaln dalga"; CHRDLG_UNDERLINE_BOLDWAVE; > ;
+ < "ift dalga"; CHRDLG_UNDERLINE_DOUBLEWAVE; > ;
+ };
+ StringList [ language_user1 ] =
+ {
+ < " " ; CHRDLG_UNDERLINE_SINGLE ; > ;
+ < " " ; CHRDLG_UNDERLINE_DOUBLE ; > ;
+ < " "; CHRDLG_UNDERLINE_BOLD; > ;
+ < "Punktiert" ; CHRDLG_UNDERLINE_DOTTED ; > ;
+ < " " ; CHRDLG_UNDERLINE_BOLDDOTTED; > ;
+ < "Strich"; CHRDLG_UNDERLINE_DASH; > ;
+ < "Strich fett"; CHRDLG_UNDERLINE_BOLDDASH; > ;
+ < "Strich lang"; CHRDLG_UNDERLINE_LONGDASH; > ;
+ < "Strich fett lang"; CHRDLG_UNDERLINE_BOLDLONGDASH; > ;
+ < "Punkt Strich"; CHRDLG_UNDERLINE_DASHDOT; > ;
+ < "Punkt Strich fett"; CHRDLG_UNDERLINE_BOLDDASHDOT; > ;
+ < "Punkt Punkt Strich"; CHRDLG_UNDERLINE_DASHDOTDOT; > ;
+ < "Punkt Punkt Strich fett"; CHRDLG_UNDERLINE_BOLDDASHDOTDOT; > ;
+ < "Welle"; CHRDLG_UNDERLINE_WAVE; > ;
+ < "Welle fett"; CHRDLG_UNDERLINE_BOLDWAVE; > ;
+ < "Welle doppelt"; CHRDLG_UNDERLINE_DOUBLEWAVE; > ;
+ };
+ };
+ FixedText FT_STRIKEOUTCNT
+ {
+ Pos = MAP_APPFONT ( 83 , 88 ) ;
+ Size = MAP_APPFONT ( 71 , 10 ) ;
+ Text = "~Durchstreichung" ;
+ Text [ ENGLISH ] = "Stri~ke through Style" ;
+ Text [ norwegian ] = "Stri~ke through Style" ;
+ Text [ italian ] = "Stile ~barrato" ;
+ Text [ portuguese_brazilian ] = "Estilo Ris~cado" ;
+ Text [ portuguese ] = "~Traado" ;
+ Text [ finnish ] = "~Yliviivaustapa" ;
+ Text [ danish ] = "Gennemstreget" ;
+ Text [ french ] = "~Barr" ;
+ Text [ swedish ] = "Genomstr~ykning" ;
+ Text [ dutch ] = "~Doorhalen" ;
+ Text [ spanish ] = "Ta~chado" ;
+ Text [ english_us ] = "Stri~kethrough" ;
+ Text[ chinese_simplified ] = "ɾ(~K)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Przekrelenie";
+ Text[ japanese ] = "(~K)";
+ Text[ chinese_traditional ] = "Ru(~K)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "Ҽ(~K)";
+ Text[ turkish ] = "~st izili";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_STRIKEOUTCNT
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 83 , 98 ) ;
+ Size = MAP_APPFONT ( 74 , 46 ) ;
+ DropDown = TRUE ;
+ StringList =
+ {
+ < "Einfach" ; CHRDLG_STRIKEOUT_SINGLE ; > ;
+ < "Doppelt" ; CHRDLG_STRIKEOUT_DOUBLE ; > ;
+ < "Fett" ; CHRDLG_STRIKEOUT_BOLD ; > ;
+ < "Mit /" ; CHRDLG_STRIKEOUT_SLASH ; > ;
+ < "Mit X" ; CHRDLG_STRIKEOUT_X ; > ;
+ };
+ StringList [ ENGLISH ] =
+ {
+ < "Einfach" ; CHRDLG_STRIKEOUT_SINGLE ; > ;
+ < "Doppelt" ; CHRDLG_STRIKEOUT_DOUBLE ; > ;
+ < "Fett" ; CHRDLG_STRIKEOUT_BOLD ; > ;
+ < "Mit /" ; CHRDLG_STRIKEOUT_SLASH ; > ;
+ < "Mit X" ; CHRDLG_STRIKEOUT_X ; > ;
+ };
+ StringList [ norwegian ] =
+ {
+ < "Einfach" ; CHRDLG_STRIKEOUT_SINGLE ; > ;
+ < "Doppelt" ; CHRDLG_STRIKEOUT_DOUBLE ; > ;
+ };
+ StringList [ italian ] =
+ {
+ < "Semplice" ; CHRDLG_STRIKEOUT_SINGLE ; > ;
+ < "Doppia" ; CHRDLG_STRIKEOUT_DOUBLE ; > ;
+ < "Grassetto" ; CHRDLG_STRIKEOUT_BOLD ; > ;
+ < "Con /" ; CHRDLG_STRIKEOUT_SLASH ; > ;
+ < "Con X" ; CHRDLG_STRIKEOUT_X ; > ;
+ };
+ StringList [ portuguese_brazilian ] =
+ {
+ < "Einfach" ; CHRDLG_STRIKEOUT_SINGLE ; > ;
+ < "Duplo" ; CHRDLG_STRIKEOUT_DOUBLE ; > ;
+ < "Fett" ; CHRDLG_STRIKEOUT_BOLD ; > ;
+ < "Mit /" ; CHRDLG_STRIKEOUT_SLASH ; > ;
+ < "Mit X" ; CHRDLG_STRIKEOUT_X ; > ;
+ };
+ StringList [ portuguese ] =
+ {
+ < "Simples" ; CHRDLG_STRIKEOUT_SINGLE ; > ;
+ < "Duplo" ; CHRDLG_STRIKEOUT_DOUBLE ; > ;
+ < "Negrito" ; CHRDLG_STRIKEOUT_BOLD ; > ;
+ < "Com /" ; CHRDLG_STRIKEOUT_SLASH ; > ;
+ < "Com X" ; CHRDLG_STRIKEOUT_X ; > ;
+ };
+ StringList [ finnish ] =
+ {
+ < "Einfach" ; CHRDLG_STRIKEOUT_SINGLE ; > ;
+ < "Doppelt" ; CHRDLG_STRIKEOUT_DOUBLE ; > ;
+ };
+ StringList [ danish ] =
+ {
+ < "Enkelt" ; CHRDLG_STRIKEOUT_SINGLE ; > ;
+ < "Dobbelt" ; CHRDLG_STRIKEOUT_DOUBLE ; > ;
+ < "Fed" ; CHRDLG_STRIKEOUT_BOLD ; > ;
+ < "Med /" ; CHRDLG_STRIKEOUT_SLASH ; > ;
+ < "Mit X" ; CHRDLG_STRIKEOUT_X ; > ;
+ };
+ StringList [ french ] =
+ {
+ < "Simple" ; CHRDLG_STRIKEOUT_SINGLE ; > ;
+ < "Double" ; CHRDLG_STRIKEOUT_DOUBLE ; > ;
+ < "Gras" ; CHRDLG_STRIKEOUT_BOLD ; > ;
+ < "Avec /" ; CHRDLG_STRIKEOUT_SLASH ; > ;
+ < "Avec X" ; CHRDLG_STRIKEOUT_X ; > ;
+ };
+ StringList [ swedish ] =
+ {
+ < "Enkelt" ; CHRDLG_STRIKEOUT_SINGLE ; > ;
+ < "Dubbelt" ; CHRDLG_STRIKEOUT_DOUBLE ; > ;
+ < "Fet" ; CHRDLG_STRIKEOUT_BOLD ; > ;
+ < "Med /" ; CHRDLG_STRIKEOUT_SLASH ; > ;
+ < "Med X" ; CHRDLG_STRIKEOUT_X ; > ;
+ };
+ StringList [ dutch ] =
+ {
+ < "Eenvoudig" ; CHRDLG_STRIKEOUT_SINGLE ; > ;
+ < "Dubbel" ; CHRDLG_STRIKEOUT_DOUBLE ; > ;
+ < "Vet" ; CHRDLG_STRIKEOUT_BOLD ; > ;
+ < "Met /" ; CHRDLG_STRIKEOUT_SLASH ; > ;
+ < "Met X" ; CHRDLG_STRIKEOUT_X ; > ;
+ };
+ StringList [ spanish ] =
+ {
+ < "Sencillo" ; CHRDLG_STRIKEOUT_SINGLE ; > ;
+ < "Doble" ; CHRDLG_STRIKEOUT_DOUBLE ; > ;
+ < "Negrita" ; CHRDLG_STRIKEOUT_BOLD ; > ;
+ < "Con /" ; CHRDLG_STRIKEOUT_SLASH ; > ;
+ < "Con X" ; CHRDLG_STRIKEOUT_X ; > ;
+ };
+ StringList [ english_us ] =
+ {
+ < "Single" ; CHRDLG_STRIKEOUT_SINGLE ; > ;
+ < "Double" ; CHRDLG_STRIKEOUT_DOUBLE ; > ;
+ < "Bold" ; CHRDLG_STRIKEOUT_BOLD ; > ;
+ < "With /" ; CHRDLG_STRIKEOUT_SLASH ; > ;
+ < "With X" ; CHRDLG_STRIKEOUT_X ; > ;
+ };
+ StringList [ chinese_simplified ] =
+ {
+ < "" ; CHRDLG_STRIKEOUT_SINGLE ; > ;
+ < "˫" ; CHRDLG_STRIKEOUT_DOUBLE ; > ;
+ < "" ; CHRDLG_STRIKEOUT_BOLD ; > ;
+ < " /" ; CHRDLG_STRIKEOUT_SLASH ; > ;
+ < " X" ; CHRDLG_STRIKEOUT_X ; > ;
+ };
+ StringList [ russian ] =
+ {
+ < "" ; CHRDLG_STRIKEOUT_SINGLE ; > ;
+ < "" ; CHRDLG_STRIKEOUT_DOUBLE ; > ;
+ < "" ; CHRDLG_STRIKEOUT_BOLD ; > ;
+ < " /" ; CHRDLG_STRIKEOUT_SLASH ; > ;
+ < " X" ; CHRDLG_STRIKEOUT_X ; > ;
+ };
+ StringList [ polish ] =
+ {
+ < "Pojedyncze" ; CHRDLG_STRIKEOUT_SINGLE ; > ;
+ < "Podwjne" ; CHRDLG_STRIKEOUT_DOUBLE ; > ;
+ < "Pogrubienie" ; CHRDLG_STRIKEOUT_BOLD ; > ;
+ < "Z /" ; CHRDLG_STRIKEOUT_SLASH ; > ;
+ < "Z X" ; CHRDLG_STRIKEOUT_X ; > ;
+ };
+ StringList [ japanese ] =
+ {
+ < "P" ; CHRDLG_STRIKEOUT_SINGLE ; > ;
+ < "d" ; CHRDLG_STRIKEOUT_DOUBLE ; > ;
+ < "" ; CHRDLG_STRIKEOUT_BOLD ; > ;
+ < "/t" ; CHRDLG_STRIKEOUT_SLASH ; > ;
+ < "Xt" ; CHRDLG_STRIKEOUT_X ; > ;
+ };
+ StringList [ chinese_traditional ] =
+ {
+ < "" ; CHRDLG_STRIKEOUT_SINGLE ; > ;
+ < "" ; CHRDLG_STRIKEOUT_DOUBLE ; > ;
+ < "" ; CHRDLG_STRIKEOUT_BOLD ; > ;
+ < " /" ; CHRDLG_STRIKEOUT_SLASH ; > ;
+ < " X" ; CHRDLG_STRIKEOUT_X ; > ;
+ };
+ StringList [ arabic ] =
+ {
+ < "" ; CHRDLG_STRIKEOUT_SINGLE ; > ;
+ < "" ; CHRDLG_STRIKEOUT_DOUBLE ; > ;
+ < "" ; CHRDLG_STRIKEOUT_BOLD ; > ;
+ < " /" ; CHRDLG_STRIKEOUT_SLASH ; > ;
+ < " X" ; CHRDLG_STRIKEOUT_X ; > ;
+ };
+ StringList [ greek ] =
+ {
+ < "" ; CHRDLG_STRIKEOUT_SINGLE ; > ;
+ < "" ; CHRDLG_STRIKEOUT_DOUBLE ; > ;
+ < "" ; CHRDLG_STRIKEOUT_BOLD ; > ;
+ < " /" ; CHRDLG_STRIKEOUT_SLASH ; > ;
+ < " X" ; CHRDLG_STRIKEOUT_X ; > ;
+ };
+ StringList [ korean ] =
+ {
+ < "" ; CHRDLG_STRIKEOUT_SINGLE ; > ;
+ < "" ; CHRDLG_STRIKEOUT_DOUBLE ; > ;
+ < "ϰ" ; CHRDLG_STRIKEOUT_BOLD ; > ;
+ < "/ Բ" ; CHRDLG_STRIKEOUT_SLASH ; > ;
+ < "X Բ" ; CHRDLG_STRIKEOUT_X ; > ;
+ };
+ StringList [ turkish ] =
+ {
+ < "Tek" ; CHRDLG_STRIKEOUT_SINGLE ; > ;
+ < "ift" ; CHRDLG_STRIKEOUT_DOUBLE ; > ;
+ < "Kaln" ; CHRDLG_STRIKEOUT_BOLD ; > ;
+ < "/ ile" ; CHRDLG_STRIKEOUT_SLASH ; > ;
+ < "X ile" ; CHRDLG_STRIKEOUT_X ; > ;
+ };
+ StringList [ language_user1 ] =
+ {
+ < " " ; CHRDLG_STRIKEOUT_SINGLE ; > ;
+ < " " ; CHRDLG_STRIKEOUT_DOUBLE ; > ;
+ < " " ; CHRDLG_STRIKEOUT_BOLD ; > ;
+ < "Mit /" ; CHRDLG_STRIKEOUT_SLASH ; > ;
+ < "Mit X" ; CHRDLG_STRIKEOUT_X ; > ;
+ };
+ };
+ CheckBox CB_WORD
+ {
+ Pos = MAP_APPFONT ( 6 , 113 ) ;
+ Size = MAP_APPFONT ( 71 , 10 ) ;
+ Text = "~Wortweise" ;
+ Text [ ENGLISH ] = "~Words Only" ;
+ Text [ norwegian ] = "~Words Only" ;
+ Text [ italian ] = "Solo par~ole" ;
+ Text [ portuguese_brazilian ] = "~Apenas Palavras" ;
+ Text [ portuguese ] = "S p~alavras" ;
+ Text [ finnish ] = "~Vain sanat" ;
+ Text [ danish ] = "Ordvis" ;
+ Text [ french ] = "~Mot par mot" ;
+ Text [ swedish ] = "~Ordvis" ;
+ Text [ dutch ] = "~Alleen woorden" ;
+ Text [ spanish ] = "Solo pa~labras" ;
+ Text [ english_us ] = "~Individual words" ;
+ Text[ chinese_simplified ] = "(~I)";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Po s~owie";
+ Text[ japanese ] = "PꂲƂɂ(~I)";
+ Text[ chinese_traditional ] = "vr(~I)";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ܾ(~I)";
+ Text[ turkish ] = "~Yalnzca szckler";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_FONTTYPE
+ {
+ Pos = MAP_APPFONT ( 6 , 124 ) ;
+ Size = MAP_APPFONT ( 0 , 10 ) ;
+ };
+ Window WIN_EXAMPLE
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 166 , 76 ) ;
+ Size = MAP_APPFONT ( 85 , 44 ) ;
+ Text = "Beispiel" ;
+ Text [ English ] = "Example" ;
+ Text [ portuguese ] = "Exemplo" ;
+ Text [ english_us ] = "Example" ;
+ Text [ portuguese_brazilian ] = "Beispiel" ;
+ Text [ swedish ] = "Exempel" ;
+ Text [ danish ] = "Eksempel" ;
+ Text [ italian ] = "Esempio" ;
+ Text [ spanish ] = "Ejemplo" ;
+ Text [ french ] = "Exemple" ;
+ Text [ dutch ] = "Voorbeeld" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "Przykad";
+ Text[ japanese ] = "";
+ Text[ chinese_traditional ] = "Ҥl";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "rnek";
+ Text[ language_user1 ] = " ";
+ };
+ GroupBox GB_EXAMPLE
+ {
+ Pos = MAP_APPFONT ( 160 , 65 ) ;
+ Size = MAP_APPFONT ( 97 , 62 ) ;
+ Text = "Vorschau" ;
+ Text [ ENGLISH ] = "Preview" ;
+ Text [ norwegian ] = "Preview" ;
+ Text [ italian ] = "Anteprima" ;
+ Text [ portuguese_brazilian ] = "Examinar" ;
+ Text [ portuguese ] = "Previsualizar" ;
+ Text [ finnish ] = "Esikatselu" ;
+ Text [ danish ] = "Eksempel" ;
+ Text [ french ] = "Aperu" ;
+ Text [ swedish ] = "Frhandsvisning" ;
+ Text [ dutch ] = "Voorbeeld" ;
+ Text [ spanish ] = "Previsualizacin" ;
+ Text [ english_us ] = "Preview" ;
+ Group = TRUE ;
+ Text[ chinese_simplified ] = "Ԥ";
+ Text[ russian ] = "";
+ Text[ polish ] = "Podgld";
+ Text[ japanese ] = "ޭ";
+ Text[ chinese_traditional ] = "w";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "̸ ";
+ Text[ turkish ] = "nizleme";
+ Text[ language_user1 ] = " ";
+ };
+};
+
+ // unbekannte Zeichenfarbe
+String RID_SVXSTR_COLOR_USER
+{
+ Text = "Benutzer" ;
+ Text [ English ] = "User" ;
+ Text [ norwegian ] = "User" ;
+ Text [ italian ] = "Utente" ;
+ Text [ portuguese_brazilian ] = "Usurio" ;
+ Text [ portuguese ] = "Utilizador" ;
+ Text [ finnish ] = "Kyttj" ;
+ Text [ danish ] = "Bruger" ;
+ Text [ french ] = "Utilisateur" ;
+ Text [ swedish ] = "Anvndare" ;
+ Text [ dutch ] = "Gebruiker" ;
+ Text [ spanish ] = "Usuario" ;
+ Text [ english_us ] = "User" ;
+ Text[ chinese_simplified ] = "û";
+ Text[ russian ] = "";
+ Text[ polish ] = "Uytkownik";
+ Text[ japanese ] = "հް";
+ Text[ chinese_traditional ] = "ϥΪ";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "Kullanc";
+ Text[ language_user1 ] = " ";
+};
+ // ********************************************************************** EOF
diff --git a/svx/source/dialog/charmap.cxx b/svx/source/dialog/charmap.cxx
new file mode 100644
index 000000000000..94eb6e60359a
--- /dev/null
+++ b/svx/source/dialog/charmap.cxx
@@ -0,0 +1,683 @@
+/*************************************************************************
+ *
+ * $RCSfile: charmap.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:07 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+// include ---------------------------------------------------------------
+
+#ifndef _SHL_HXX
+#include <tools/shl.hxx>
+#endif
+#ifndef _SV_SOUND_HXX
+#include <vcl/sound.hxx>
+#endif
+#ifndef _SV_METRIC_HXX
+#include <vcl/metric.hxx>
+#endif
+#ifndef _SV_SVAPP_HXX //autogen
+#include <vcl/svapp.hxx>
+#endif
+#pragma hdrstop
+
+#include "dialogs.hrc"
+#include "charmap.hrc"
+
+#include "charmap.hxx"
+#include "dialmgr.hxx"
+
+// class SvxShowCharSet --------------------------------------------------
+
+SvxShowCharSet::SvxShowCharSet( Window* pParent, const ResId& rResId ) :
+
+ Control( pParent, rResId )
+
+{
+ Size aOutputSize = GetOutputSizePixel();
+ c = 32;
+ nX = aOutputSize.Width() / COLUMN_COUNT;
+ nY = aOutputSize.Height() / ROW_COUNT;
+ bDrag = FALSE;
+ SetOutputSizePixel( Size( nX * COLUMN_COUNT, nY * ROW_COUNT ) );
+ InitSettings( TRUE, TRUE );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxShowCharSet::GetFocus()
+{
+ Control::GetFocus();
+ SelectCharacter( c, TRUE );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxShowCharSet::LoseFocus()
+{
+ Control::LoseFocus();
+ SelectCharacter( c, TRUE );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxShowCharSet::StateChanged( StateChangedType nType )
+{
+ if ( nType == STATE_CHANGE_CONTROLFOREGROUND )
+ InitSettings( TRUE, FALSE );
+ else if ( nType == STATE_CHANGE_CONTROLBACKGROUND )
+ InitSettings( FALSE, TRUE );
+
+ Control::StateChanged( nType );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxShowCharSet::DataChanged( const DataChangedEvent& rDCEvt )
+{
+ if ( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) )
+ InitSettings( TRUE, TRUE );
+ else
+ Control::DataChanged( rDCEvt );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxShowCharSet::MouseButtonDown( const MouseEvent& rMEvt )
+{
+ if ( rMEvt.IsLeft() )
+ {
+ if ( rMEvt.GetClicks() == 1 )
+ {
+ GrabFocus();
+ bDrag = TRUE;
+ CaptureMouse();
+
+ long n = (rMEvt.GetPosPixel().Y() / nY) * COLUMN_COUNT +
+ (rMEvt.GetPosPixel().X() / nX) + 32;
+ SelectCharacter( (sal_Unicode)Min( n, 255L ) );
+ }
+
+ if ( !(rMEvt.GetClicks() % 2) )
+ aDoubleClkHdl.Call( this );
+ }
+}
+
+// -----------------------------------------------------------------------
+
+void SvxShowCharSet::MouseButtonUp( const MouseEvent& rMEvt )
+{
+ if ( bDrag && rMEvt.IsLeft() )
+ {
+ // Mouse ueber der Char-Auswahl losgelassen
+ if ( Rectangle(Point(), GetOutputSize()).IsInside(rMEvt.GetPosPixel()))
+ aSelectHdl.Call( this );
+ ReleaseMouse();
+ bDrag = FALSE;
+ }
+}
+
+// -----------------------------------------------------------------------
+
+void SvxShowCharSet::MouseMove( const MouseEvent& rMEvt )
+{
+ if ( rMEvt.IsLeft() && bDrag )
+ {
+ Point aPos = rMEvt.GetPosPixel();
+ Size aSize = GetSizePixel();
+
+ if ( aPos.X() < 0 )
+ aPos.X() = 0;
+ else if ( aPos.X() > aSize.Width()-5 )
+ aPos.X() = aSize.Width()-5;
+ if ( aPos.Y() < 0 )
+ aPos.Y() = 0;
+ else if ( aPos.Y() > aSize.Height()-5 )
+ aPos.Y() = aSize.Height()-5;
+
+ long n = (aPos.Y() / nY) * COLUMN_COUNT +
+ (aPos.X() / nX) + 32;
+ SelectCharacter( (sal_Unicode)Min( n, 255L ) );
+ }
+}
+
+// -----------------------------------------------------------------------
+
+void SvxShowCharSet::KeyInput( const KeyEvent& rKEvt )
+{
+ KeyCode aCode = rKEvt.GetKeyCode();
+
+ if ( aCode.GetModifier() )
+ {
+ Control::KeyInput( rKEvt );
+ return;
+ }
+
+ sal_Unicode cChar = (sal_Unicode)rKEvt.GetCharCode();
+
+ if ( cChar > 32 )
+ {
+ SelectCharacter( cChar );
+ aPreSelectHdl.Call( this );
+ return;
+ }
+
+ FASTBOOL bPreSelect = TRUE;
+
+ switch ( aCode.GetCode() )
+ {
+ case KEY_SPACE:
+ aSelectHdl.Call( this );
+ break;
+ case KEY_LEFT:
+ if ( c > 32 )
+ SelectCharacter( c-1 );
+ break;
+ case KEY_RIGHT:
+ if ( c < 255 )
+ SelectCharacter( c+1 );
+ break;
+ case KEY_UP:
+ if ( c-COLUMN_COUNT >= 32 )
+ SelectCharacter( c-COLUMN_COUNT );
+ break;
+ case KEY_DOWN:
+ if ( c+COLUMN_COUNT <= 255 )
+ SelectCharacter( c+COLUMN_COUNT );
+ break;
+ case KEY_HOME:
+ SelectCharacter( 32 );
+ break;
+ case KEY_END:
+ SelectCharacter( 255 );
+ break;
+ default:
+ bPreSelect = FALSE;
+ Control::KeyInput( rKEvt );
+ }
+
+ if ( bPreSelect )
+ aPreSelectHdl.Call( this );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxShowCharSet::Paint( const Rectangle& )
+{
+ DrawChars_Impl( 32, 256 );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxShowCharSet::DrawChars_Impl( USHORT n1, USHORT n2 )
+{
+ USHORT i;
+ long x, y;
+ Size aOutputSize;
+ String aCharStr;
+
+ aOutputSize = GetOutputSizePixel();
+
+ for ( i = 1; i < COLUMN_COUNT; i++ )
+ DrawLine( Point( nX * i, 0 ), Point( nX * i, aOutputSize.Height() ) );
+ for ( i = 1; i < ROW_COUNT; i++ )
+ DrawLine( Point( 0, nY * i ), Point( aOutputSize.Width(), nY * i ) );
+
+ for ( i = n1; i < n2; i++ )
+ {
+ x = ((i-32) % COLUMN_COUNT) * nX;
+ y = ((i-32) / COLUMN_COUNT) * nY;
+
+ if ( c == sal_Unicode(i) && HasFocus() )
+ {
+ const StyleSettings& rStyleSettings =
+ Application::GetSettings().GetStyleSettings();
+
+ Color aLineCol = GetLineColor();
+ Color aFillCol = GetFillColor();
+ SetLineColor();
+ SetFillColor( rStyleSettings.GetFaceColor() );
+ DrawRect( Rectangle( Point( x + 1, y + 1),
+ Size( nX - 1, nY - 1 ) ) );
+ SetLineColor( rStyleSettings.GetLightColor() );
+ DrawLine( Point( x + 1, y + 1 ), Point( x + nX - 1, y + 1 ) );
+ DrawLine( Point( x + 1, y + 1 ), Point( x + 1, y + nY - 1 ) );
+ SetLineColor( rStyleSettings.GetShadowColor() );
+ DrawLine( Point( x + 1, y + nY - 1 ),
+ Point( x + nX - 1, y + nY - 1 ) );
+ DrawLine( Point( x + nX - 1, y + nY - 1 ),
+ Point( x + nX - 1, y + 1 ) );
+ SetLineColor( aLineCol );
+ SetFillColor( aFillCol );
+ }
+
+ if ( i > 0 )
+ aCharStr = String( (sal_Unicode)i );
+ else
+ aCharStr.Erase();
+
+ x += ( nX - GetTextWidth(aCharStr) ) / 2;
+ y += ( nY - GetTextHeight() ) / 2;
+
+ DrawText( Point( x, y ), aCharStr );
+ }
+}
+
+// -----------------------------------------------------------------------
+
+void SvxShowCharSet::InitSettings( BOOL bForeground, BOOL bBackground )
+{
+ const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
+
+ if ( bForeground )
+ {
+ Color aTextColor = rStyleSettings.GetWindowTextColor();
+
+ if ( IsControlForeground() )
+ aTextColor = GetControlForeground();
+ SetTextColor( aTextColor );
+ }
+
+ if ( bBackground )
+ {
+ if ( IsControlBackground() )
+ SetBackground( GetControlBackground() );
+ else
+ SetBackground( rStyleSettings.GetWindowColor() );
+ }
+ Invalidate();
+}
+
+// -----------------------------------------------------------------------
+
+void SvxShowCharSet::SetFont( const Font& rFont )
+{
+ Font aFont = rFont;
+
+ Invalidate();
+
+ aFont.SetWeight( WEIGHT_LIGHT );
+ aFont.SetSize( Size( 0, 12 ) );
+ aFont.SetTransparent( TRUE );
+ Control::SetFont( aFont );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxShowCharSet::SelectCharacter( sal_Unicode cNew, BOOL bFocus )
+{
+ if ( (c == cNew) && !bFocus )
+ return;
+
+ USHORT n = c;
+
+ // Highlight-Darstellung entfernen
+ long x = ((n-32) % COLUMN_COUNT) * nX;
+ long y = ((n-32) / COLUMN_COUNT) * nY;
+
+ Color aLineCol = GetLineColor();
+ Color aFillCol = GetFillColor();
+ SetLineColor();
+ SetFillColor( GetBackground().GetColor() );
+ DrawRect( Rectangle( Point( x + 1, y + 1), Size( nX - 1, nY - 1 ) ) );
+ SetLineColor( aLineCol );
+ SetFillColor( aFillCol );
+
+ c = cNew;
+
+ DrawChars_Impl( n, n+1 );
+
+ n = c;
+ DrawChars_Impl( n, n+1 );
+
+ aHighHdl.Call( this );
+}
+
+// -----------------------------------------------------------------------
+
+SvxShowCharSet::~SvxShowCharSet()
+{
+}
+
+// class SvxShowText -----------------------------------------------------
+
+SvxShowText::SvxShowText(Window* pParent, const ResId& rResId, BOOL bCenter) :
+
+ Control( pParent, rResId )
+
+{
+ SvxShowText::bCenter = bCenter;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxShowText::Paint( const Rectangle& )
+{
+ if ( bCenter )
+ {
+ String aText = GetText();
+ DrawText( Point( (GetOutputSizePixel().Width() - GetTextWidth(aText)) / 2,
+ nY ),
+ aText );
+ }
+ else
+ DrawText( Point( 2, nY ), GetText() );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxShowText::SetFont( const Font& rFont )
+{
+ Invalidate();
+
+ long nWinHeight = GetOutputSizePixel().Height();
+ Font aFont = rFont;
+ aFont.SetWeight( WEIGHT_NORMAL );
+ aFont.SetSize( Size( 0, nWinHeight-6 ) );
+ aFont.SetTransparent( TRUE );
+ Control::SetFont( aFont );
+ nY = ( nWinHeight - GetTextHeight() ) / 2;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxShowText::SetText( const String& rText )
+{
+ Control::SetText( rText );
+ Invalidate();
+}
+
+// -----------------------------------------------------------------------
+
+SvxShowText::~SvxShowText()
+{
+}
+
+// class SvxCharacterMap -------------------------------------------------
+
+SvxCharacterMap::SvxCharacterMap( Window* pParent, BOOL bOne ) :
+
+ SfxModalDialog( pParent, SVX_RES( RID_SVXDLG_CHARMAP ) ),
+
+ aShowSet ( this, ResId( CT_SHOWSET ) ),
+ aFontText ( this, ResId( FT_FONT ) ),
+ aFontLB ( this, ResId( LB_FONT ) ),
+ aSymbolText ( this, ResId( FT_SYMBOLE ) ),
+ aShowText ( this, ResId( CT_SHOWTEXT ) ),
+ aShowChar ( this, ResId( CT_SHOWCHAR ), TRUE ),
+ aCharCodeText ( this, ResId( FT_CHARCODE ) ),
+ aOKBtn ( this, ResId( BTN_CHAR_OK ) ),
+ aCancelBtn ( this, ResId( BTN_CHAR_CANCEL ) ),
+ aHelpBtn ( this, ResId( BTN_CHAR_HELP ) ),
+ aDeleteBtn ( this, ResId( BTN_DELETE ) )
+
+{
+ FreeResource();
+
+ // SystemFont erst mal einstellen
+ aFont = GetFont();
+ aFont.SetTransparent( TRUE );
+ aFont.SetFamily( FAMILY_DONTKNOW );
+ aFont.SetPitch( PITCH_DONTKNOW );
+ aFont.SetCharSet( RTL_TEXTENCODING_DONTKNOW );
+
+ SvxCharacterMap::bOne = bOne;
+
+ if ( bOne )
+ {
+ Size aDlgSize = GetSizePixel();
+ SetSizePixel( Size( aDlgSize.Width(),
+ aDlgSize.Height()-aShowText.GetSizePixel().Height() ) );
+ aSymbolText.Hide();
+ aShowText.Hide();
+ aDeleteBtn.Hide();
+ }
+
+ xub_StrLen i;
+ xub_StrLen nCount = GetDevFontCount();
+ String aDefStr( aFont.GetName() );
+
+ for ( i = 0; i < nCount; i++ )
+ {
+ String aFontName( GetDevFont( i ).GetName() );
+
+ if ( aFontLB.GetEntryPos( aFontName ) == LISTBOX_ENTRY_NOTFOUND )
+ {
+ USHORT nPos = aFontLB.InsertEntry( aFontName );
+ aFontLB.SetEntryData( nPos, (void*)(ULONG)i );
+ }
+ }
+ FASTBOOL bFound = FALSE;
+ // ggf. ist der Name des Fonts in der Liste nicht enthalten ->
+ // dann versuchen einen Token des Namens zu selektieren oder sonst
+ // den ersten Eintrag.
+ if ( aFontLB.GetEntryPos( aDefStr ) == LISTBOX_ENTRY_NOTFOUND )
+ {
+ for ( i = 0; i < aDefStr.GetTokenCount(); ++i )
+ {
+ String aToken = aDefStr.GetToken(i);
+
+ if ( aFontLB.GetEntryPos( aToken ) != LISTBOX_ENTRY_NOTFOUND )
+ {
+ aDefStr = aToken;
+ bFound = TRUE;
+ break;
+ }
+ }
+ }
+ else
+ bFound = TRUE;
+
+ if ( bFound )
+ aFontLB.SelectEntry( aDefStr );
+ else if ( aFontLB.GetEntryCount() )
+ aFontLB.SelectEntryPos(0);
+ FontSelectHdl( &aFontLB );
+
+ aOKBtn.SetClickHdl( LINK( this, SvxCharacterMap, OKHdl ) );
+ aFontLB.SetSelectHdl( LINK( this, SvxCharacterMap, FontSelectHdl ) );
+ aShowSet.SetDoubleClickHdl( LINK( this, SvxCharacterMap, CharDoubleClickHdl ) );
+ aShowSet.SetSelectHdl( LINK( this, SvxCharacterMap, CharSelectHdl ) );
+ aShowSet.SetHighlightHdl( LINK( this, SvxCharacterMap, CharHighlightHdl ) );
+ aShowSet.SetPreSelectHdl( LINK( this, SvxCharacterMap, CharPreSelectHdl ) );
+ aDeleteBtn.SetClickHdl( LINK( this, SvxCharacterMap, DeleteHdl ) );
+
+ SetChar( 32 );
+ aOKBtn.Disable();
+}
+
+// -----------------------------------------------------------------------
+
+void SvxCharacterMap::SetFont( const Font& rFont )
+{
+ SetCharFont( rFont );
+}
+
+// -----------------------------------------------------------------------
+
+/* [Beschreibung]
+
+ Diese Methode wird gerufen, um die Font-Auswahl zu disablen.
+*/
+
+void SvxCharacterMap::DisableFontSelection()
+{
+ aFontText.Disable();
+ aFontLB.Disable();
+}
+
+// -----------------------------------------------------------------------
+
+void SvxCharacterMap::SetCharFont( const Font& rFont )
+{
+ //Font ersteinmal ermitteln lassen, damit auch auch Fonts mit dem
+ //Namen "Times New Roman;Times" auf der jeweiligen Plattform richtig
+ //funktionieren.
+ Font aTmp( GetFontMetric( rFont ) );
+
+ if ( aFontLB.GetEntryPos( aTmp.GetName() ) == LISTBOX_ENTRY_NOTFOUND )
+ return;
+
+ aFontLB.SelectEntry( aTmp.GetName() );
+ aFont = aTmp;
+ FontSelectHdl( &aFontLB );
+
+ // aus Kompatiblitaetsgruenden noch drin
+ ModalDialog::SetFont( aFont );
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxCharacterMap, OKHdl, OKButton *, EMPTYARG )
+{
+ String aStr = aShowText.GetText();
+
+ if ( !aStr.Len() )
+ {
+ if ( aShowSet.GetSelectCharacter() > 0 )
+ aStr = String( aShowSet.GetSelectCharacter() );
+ aShowText.SetText( aStr );
+ }
+ EndDialog( TRUE );
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxCharacterMap, FontSelectHdl, ListBox *, EMPTYARG )
+{
+ USHORT nPos = aFontLB.GetSelectEntryPos(),
+ nFont = (USHORT)(ULONG)aFontLB.GetEntryData( nPos );
+ aFont = GetDevFont( nFont );
+ aShowSet.SetFont( aFont );
+ aShowText.SetFont( aFont );
+ aShowChar.SetFont( aFont );
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK_INLINE_START( SvxCharacterMap, CharDoubleClickHdl, Control *, EMPTYARG )
+{
+ EndDialog( TRUE );
+ return 0;
+}
+IMPL_LINK_INLINE_END( SvxCharacterMap, CharDoubleClickHdl, Control *, EMPTYARG )
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxCharacterMap, CharSelectHdl, Control *, EMPTYARG )
+{
+ if ( !bOne )
+ {
+ String aText = aShowText.GetText();
+
+ if ( aText.Len() == CHARMAP_MAXLEN )
+ Sound::Beep( SOUND_WARNING );
+ else
+ {
+ if ( aShowSet.GetSelectCharacter() > 0 )
+ aText += aShowSet.GetSelectCharacter();
+ aShowText.SetText( aText );
+ }
+ }
+ aOKBtn.Enable();
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxCharacterMap, CharHighlightHdl, Control *, EMPTYARG )
+{
+ String aTemp;
+ sal_Bool bSelect = ( aShowSet.GetSelectCharacter() > 0 );
+ if ( bSelect )
+ aTemp = String( aShowSet.GetSelectCharacter() );
+ aShowChar.SetText( aTemp );
+ aShowChar.Update();
+ if ( bSelect )
+ aTemp = String::CreateFromInt32( (USHORT)aShowSet.GetSelectCharacter() );
+ aCharCodeText.SetText( aTemp );
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK_INLINE_START( SvxCharacterMap, CharPreSelectHdl, Control *, EMPTYARG )
+{
+ aOKBtn.Enable();
+ return 0;
+}
+IMPL_LINK_INLINE_END( SvxCharacterMap, CharPreSelectHdl, Control *, EMPTYARG )
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK_INLINE_START( SvxCharacterMap, DeleteHdl, PushButton *, EMPTYARG )
+{
+ aShowText.SetText( String() );
+ aOKBtn.Disable();
+ return 0;
+}
+IMPL_LINK_INLINE_END( SvxCharacterMap, DeleteHdl, PushButton *, EMPTYARG )
+
+// -----------------------------------------------------------------------
+
+SvxCharacterMap::~SvxCharacterMap()
+{
+}
+
+
diff --git a/svx/source/dialog/charmap.hrc b/svx/source/dialog/charmap.hrc
new file mode 100644
index 000000000000..edcb8c0cbe2c
--- /dev/null
+++ b/svx/source/dialog/charmap.hrc
@@ -0,0 +1,80 @@
+/*************************************************************************
+ *
+ * $RCSfile: charmap.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:07 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SVX_CHARMAP_HRC
+#define _SVX_CHARMAP_HRC
+
+// defines ------------------------------------------------------------------
+
+#define CT_SHOWSET 10
+#define FT_FONT 11
+#define LB_FONT 12
+#define CT_SHOWTEXT 13
+#define FT_SYMBOLE 14
+#define CT_SHOWCHAR 15
+#define FT_CHARCODE 16
+#define BTN_CHAR_OK 17
+#define BTN_CHAR_CANCEL 18
+#define BTN_CHAR_HELP 19
+#define BTN_DELETE 20
+
+
+#endif
+
diff --git a/svx/source/dialog/charmap.src b/svx/source/dialog/charmap.src
new file mode 100644
index 000000000000..975e1cbd9c94
--- /dev/null
+++ b/svx/source/dialog/charmap.src
@@ -0,0 +1,234 @@
+/*************************************************************************
+ *
+ * $RCSfile: charmap.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:07 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+ // include ---------------------------------------------------------------
+#include "svxids.hrc"
+#include "dialogs.hrc"
+#include "charmap.hrc"
+#include "helpid.hrc"
+
+ // RID_SVXDLG_CHARMAP ----------------------------------------------------
+ModalDialog RID_SVXDLG_CHARMAP
+{
+ HelpId = SID_CHARMAP ;
+ SvLook = TRUE ;
+ Text= "Sonderzeichen";
+ Text[ italian ] = "Carattere speciale";
+ Text[ portuguese_brazilian ] = "Smbolo";
+ Text[ portuguese ] = "Caracteres especiais";
+ Text[ danish ] = "Specialtegn";
+ Text[ french ] = "Caractres spciaux";
+ Text[ swedish ] = "Specialtecken";
+ Text[ dutch ] = "Speciale tekens";
+ Text[ spanish ] = "Smbolos";
+ Text[ english_us ] = "Special Character";
+ Text[ chinese_simplified ] = "ַ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Znaki specjalne";
+ Text[ japanese ] = "LƓꕶ";
+ Text[ chinese_traditional ] = "Sr";
+ Text[ arabic ] = " ";
+ Size = MAP_APPFONT ( 346 , 141 ) ;
+ OutputSize = TRUE ;
+ Moveable = TRUE ;
+ Control CT_SHOWSET
+ {
+ HelpId = HID_CHARMAP_CTL_SHOWSET ;
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 6 , 24 ) ;
+ Size = MAP_APPFONT ( 278 , 95 ) ;
+ TabStop = TRUE ;
+ Group = TRUE ;
+ };
+ FixedText FT_FONT
+ {
+ Pos = MAP_APPFONT ( 6 , 8 ) ;
+ Size = MAP_APPFONT ( 28 , 8 ) ;
+ Text = "~Schrift" ;
+ Text [ ENGLISH ] = "~Font" ;
+ Text [ norwegian ] = "~Font" ;
+ Text [ italian ] = "~Font" ;
+ Text [ portuguese_brazilian ] = "~Fonte" ;
+ Text [ portuguese ] = "~Tipo de letra" ;
+ Text [ finnish ] = "~Fontti" ;
+ Text [ danish ] = "Skrifttype" ;
+ Text [ french ] = "~Police" ;
+ Text [ swedish ] = "Tecken~sn." ;
+ Text [ dutch ] = "~Lettertype" ;
+ Text [ spanish ] = "~Fuente" ;
+ Text [ english_us ] = "~Font" ;
+ Left = TRUE ;
+ Group = TRUE ;
+ Text[ chinese_simplified ] = "(~F)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Czcionka";
+ Text[ japanese ] = "̫(~F)";
+ Text[ chinese_traditional ] = "r(~F)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "۲(~F)";
+ Text[ turkish ] = "~Yaztipi";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_FONT
+ {
+ Pos = MAP_APPFONT ( 36 , 6 ) ;
+ Size = MAP_APPFONT ( 110 , 68 ) ;
+ Sort = TRUE ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+ };
+ FixedText FT_SYMBOLE
+ {
+ Pos = MAP_APPFONT ( 6 , 127 ) ;
+ Size = MAP_APPFONT ( 38 , 8 ) ;
+ Left = TRUE ;
+ Text= "Zeichen:";
+ Text[ italian ] = "Caratteri:";
+ Text[ portuguese_brazilian ] = "Caracteres:";
+ Text[ portuguese ] = "Caracteres:";
+ Text[ danish ] = "Tegn:";
+ Text[ french ] = "Caractres :";
+ Text[ swedish ] = "Tecken:";
+ Text[ dutch ] = "Tekens:";
+ Text[ spanish ] = "Carcter:";
+ Text[ english_us ] = "Characters:";
+ Text[ chinese_simplified ] = "壺";
+ Text[ russian ] = ":";
+ Text[ polish ] = "Znaki:";
+ Text[ japanese ] = ":";
+ Text[ chinese_traditional ] = "rG";
+ Text[ arabic ] = ":";
+ Text[ greek ] = ":";
+ Text[ korean ] = ":";
+ Text[ turkish ] = "Karakter:";
+ Text[ language_user1 ] = " ";
+ };
+ Control CT_SHOWTEXT
+ {
+ HelpId = HID_CHARMAP_CTL_SHOWTEXT ;
+ Pos = MAP_APPFONT ( 53 , 121 ) ;
+ Size = MAP_APPFONT ( 284 , 18 ) ;
+ Group = TRUE ;
+ };
+ Control CT_SHOWCHAR
+ {
+ HelpId = HID_CHARMAP_CTL_SHOWCHAR ;
+ Pos = MAP_APPFONT ( 287 , 80 ) ;
+ Size = MAP_APPFONT ( 50 , 23 ) ;
+ Group = TRUE ;
+ };
+ FixedText FT_CHARCODE
+ {
+ Pos = MAP_APPFONT ( 287 , 105 ) ;
+ Size = MAP_APPFONT ( 50 , 8 ) ;
+ Center = TRUE ;
+ };
+ OKButton BTN_CHAR_OK
+ {
+ Pos = MAP_APPFONT ( 287 , 6 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TabStop = TRUE ;
+ DefButton = TRUE ;
+ };
+ CancelButton BTN_CHAR_CANCEL
+ {
+ Pos = MAP_APPFONT ( 287 , 23 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TabStop = TRUE ;
+ };
+ HelpButton BTN_CHAR_HELP
+ {
+ Pos = MAP_APPFONT ( 287 , 43 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TabStop = TRUE ;
+ };
+ PushButton BTN_DELETE
+ {
+ Pos = MAP_APPFONT ( 287 , 63 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ Text= "~Lschen";
+ Text[ italian ] = "~Elimina";
+ Text[ portuguese_brazilian ] = "~Apagar";
+ Text[ portuguese ] = "E~liminar";
+ Text[ danish ] = "Slet";
+ Text[ french ] = "~Supprimer";
+ Text[ swedish ] = "~Radera";
+ Text[ dutch ] = "~Wissen";
+ Text[ spanish ] = "~Eliminar";
+ Text[ english_us ] = "~Delete";
+ Text[ chinese_simplified ] = "ɾ(~D)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Usu";
+ Text[ japanese ] = "폜(~D)";
+ Text[ chinese_traditional ] = "R(~D)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "(~D)";
+ Text[ turkish ] = "~Sil";
+ Text[ language_user1 ] = " ";
+ };
+ Text[ greek ] = " ";
+ Text[ korean ] = "Ưȣ";
+ Text[ turkish ] = "zel karakter";
+ Text[ language_user1 ] = " ";
+};
+ // ********************************************************************** EOF
diff --git a/svx/source/dialog/checklbx.cxx b/svx/source/dialog/checklbx.cxx
new file mode 100644
index 000000000000..97a3750aee19
--- /dev/null
+++ b/svx/source/dialog/checklbx.cxx
@@ -0,0 +1,309 @@
+/*************************************************************************
+ *
+ * $RCSfile: checklbx.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:07 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+// include ---------------------------------------------------------------
+
+#ifndef _SHL_HXX //autogen
+#include <tools/shl.hxx>
+#endif
+#pragma hdrstop
+
+#define _SVX_CHECKLBX_CXX
+
+#include "dialogs.hrc"
+#include "checklbx.hrc"
+
+#include "checklbx.hxx"
+#include "dialmgr.hxx"
+
+// class SvxCheckListBox -------------------------------------------------
+
+SvxCheckListBox::SvxCheckListBox( Window* pParent, WinBits nWinStyle ) :
+ SvTreeListBox( pParent, nWinStyle )
+{
+ Init_Impl();
+}
+
+// -----------------------------------------------------------------------
+
+SvxCheckListBox::SvxCheckListBox( Window* pParent, const ResId& rResId ) :
+ SvTreeListBox( pParent, rResId )
+{
+ Init_Impl();
+}
+
+// -----------------------------------------------------------------------
+
+__EXPORT SvxCheckListBox::~SvxCheckListBox()
+{
+ delete pCheckButton;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxCheckListBox::Init_Impl()
+{
+ SvxCheckListBoxBitmaps theBmps;
+
+ pCheckButton = new SvLBoxButtonData();
+ pCheckButton->aBmps[SV_BMP_UNCHECKED] = theBmps.GetUncheckedBmp();
+ pCheckButton->aBmps[SV_BMP_CHECKED] = theBmps.GetCheckedBmp();
+ pCheckButton->aBmps[SV_BMP_HICHECKED] = theBmps.GetHiCheckedBmp();
+ pCheckButton->aBmps[SV_BMP_HIUNCHECKED] = theBmps.GetHiUncheckedBmp();
+ pCheckButton->aBmps[SV_BMP_TRISTATE] = theBmps.GetTriStateBmp();
+ pCheckButton->aBmps[SV_BMP_HITRISTATE] = theBmps.GetHiTriStateBmp();
+ EnableCheckButton( pCheckButton );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxCheckListBox::InsertEntry( const String& rStr, USHORT nPos )
+{
+ SvTreeListBox::InsertEntry( rStr, NULL, FALSE, nPos );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxCheckListBox::RemoveEntry( USHORT nPos )
+{
+ if ( nPos < GetEntryCount() )
+ {
+ SvTreeListBox::GetModel()->Remove( GetEntry( nPos ) );
+ }
+}
+
+// -----------------------------------------------------------------------
+
+void SvxCheckListBox::SelectEntryPos( USHORT nPos, BOOL bSelect )
+{
+ if ( nPos < GetEntryCount() )
+ {
+ Select( GetEntry( nPos ), bSelect );
+ }
+}
+
+// -----------------------------------------------------------------------
+
+USHORT SvxCheckListBox::GetSelectEntryPos() const
+{
+ SvLBoxEntry* pEntry = GetCurEntry();
+
+ if ( pEntry )
+ return (USHORT)GetModel()->GetAbsPos( pEntry );
+ return LISTBOX_ENTRY_NOTFOUND;
+}
+
+// -----------------------------------------------------------------------
+
+String SvxCheckListBox::GetText( USHORT nPos ) const
+{
+ SvLBoxEntry* pEntry = GetEntry( nPos );
+
+ if ( pEntry )
+ return GetEntryText( pEntry );
+ return String();
+}
+
+// -----------------------------------------------------------------------
+
+USHORT SvxCheckListBox::GetCheckedEntryCount() const
+{
+ USHORT nCheckCount = 0;
+ USHORT nCount = (USHORT)GetEntryCount();
+
+ for ( USHORT i = 0; i < nCount; ++i )
+ if ( IsChecked( i ) )
+ nCheckCount++;
+ return nCheckCount;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxCheckListBox::CheckEntryPos( USHORT nPos, BOOL bCheck )
+{
+ if ( nPos < GetEntryCount() )
+ SetCheckButtonState(
+ GetEntry( nPos ), bCheck ? SvButtonState( SV_BUTTON_CHECKED ) :
+ SvButtonState( SV_BUTTON_UNCHECKED ) );
+}
+
+// -----------------------------------------------------------------------
+
+BOOL SvxCheckListBox::IsChecked( USHORT nPos ) const
+{
+ if ( nPos < GetEntryCount() )
+ return (GetCheckButtonState( GetEntry( nPos ) ) == SV_BUTTON_CHECKED);
+ else
+ return FALSE;
+}
+
+// -----------------------------------------------------------------------
+
+void* SvxCheckListBox::SetEntryData ( USHORT nPos, void* pNewData )
+{
+ void* pOld = NULL;
+
+ if ( nPos < GetEntryCount() )
+ {
+ pOld = GetEntry( nPos )->GetUserData();
+ GetEntry( nPos )->SetUserData( pNewData );
+ }
+ return pOld;
+}
+
+// -----------------------------------------------------------------------
+
+void* SvxCheckListBox::GetEntryData( USHORT nPos ) const
+{
+ if ( nPos < GetEntryCount() )
+ return GetEntry( nPos )->GetUserData();
+ else
+ return NULL;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxCheckListBox::ToggleCheckButton( SvLBoxEntry* pEntry )
+{
+ if ( pEntry && IsSelected( pEntry ) )
+ CheckEntryPos( GetSelectEntryPos(),
+ !IsChecked( GetSelectEntryPos() ) );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxCheckListBox::MouseButtonDown( const MouseEvent& rMEvt )
+{
+ if ( rMEvt.IsLeft() )
+ {
+ Point aPnt = rMEvt.GetPosPixel();
+ SvLBoxEntry* pEntry = GetEntry( aPnt );
+
+ if ( pEntry )
+ {
+ BOOL bCheck =
+ ( GetCheckButtonState( pEntry ) == SV_BUTTON_CHECKED );
+ SvLBoxItem* pItem = GetItem( pEntry, aPnt.X() );
+
+ if ( pItem && pItem->IsA() == SV_ITEM_ID_LBOXBUTTON )
+ {
+ SvTreeListBox::MouseButtonDown( rMEvt );
+ Select( pEntry, TRUE );
+ return;
+ }
+ else
+ {
+ ToggleCheckButton( pEntry );
+ SvTreeListBox::MouseButtonDown( rMEvt );
+
+ if ( bCheck !=
+ ( GetCheckButtonState( pEntry ) == SV_BUTTON_CHECKED ) )
+ CheckButtonHdl();
+ return;
+ }
+ }
+ }
+ SvTreeListBox::MouseButtonDown( rMEvt );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxCheckListBox::KeyInput( const KeyEvent& rKEvt )
+{
+ const KeyCode& rKey = rKEvt.GetKeyCode();
+
+ if ( rKey.GetCode() == KEY_RETURN || rKey.GetCode() == KEY_SPACE )
+ {
+ SvLBoxEntry* pEntry = GetCurEntry();
+
+ if ( pEntry )
+ {
+ BOOL bCheck = ( GetCheckButtonState( pEntry ) ==
+ SV_BUTTON_CHECKED );
+ ToggleCheckButton( pEntry );
+
+ if ( bCheck != ( GetCheckButtonState( pEntry ) ==
+ SV_BUTTON_CHECKED ) )
+ CheckButtonHdl();
+ }
+ }
+ else if ( GetEntryCount() )
+ SvTreeListBox::KeyInput( rKEvt );
+}
+
+// class SvxCheckListBoxBitmaps ------------------------------------------
+
+SvxCheckListBoxBitmaps::SvxCheckListBoxBitmaps() :
+
+ Resource ( ResId( RID_CHECKLISTBOX_BITMAPS, DIALOG_MGR() ) ),
+
+ aUncheckedBmp ( ResId( BMP_UNCHECKED ) ),
+ aCheckedBmp ( ResId( BMP_CHECKED ) ),
+ aHiCheckedBmp ( ResId( BMP_HICHECKED ) ),
+ aHiUncheckedBmp ( ResId( BMP_HIUNCHECKED ) ),
+ aTriStateBmp ( ResId( BMP_TRISTATE ) ),
+ aHiTriStateBmp ( ResId( BMP_HITRISTATE ) )
+
+{
+ FreeResource();
+}
+
+
diff --git a/svx/source/dialog/connctrl.cxx b/svx/source/dialog/connctrl.cxx
new file mode 100644
index 000000000000..dbf062efa478
--- /dev/null
+++ b/svx/source/dialog/connctrl.cxx
@@ -0,0 +1,381 @@
+/*************************************************************************
+ *
+ * $RCSfile: connctrl.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:07 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+// include ---------------------------------------------------------------
+
+#pragma hdrstop
+
+#include "xoutx.hxx"
+
+#include "svdoedge.hxx"
+#include "svdattrx.hxx"
+
+#ifndef _SVDMARK_HXX //autogen
+#include "svdmark.hxx"
+#endif
+#ifndef _SVDVIEW_HXX //autogen
+#include "svdview.hxx"
+#endif
+
+#include "svdpage.hxx" // SdrObjList
+
+#include "connctrl.hxx"
+#include "dialmgr.hxx"
+
+/*************************************************************************
+|*
+|* Ctor SvxXConnectionPreview
+|*
+*************************************************************************/
+
+SvxXConnectionPreview::SvxXConnectionPreview( Window* pParent, const ResId& rResId,
+ const SfxItemSet& rInAttrs ) :
+ Control ( pParent, rResId ),
+ pEdgeObj( NULL ),
+ pObjList( NULL ),
+ pView ( NULL ),
+ rAttrs ( rInAttrs )
+{
+ pExtOutDev = new ExtOutputDevice( this );
+
+ SetMapMode( MAP_100TH_MM );
+
+ SetBackground( Wallpaper( Color( COL_WHITE ) ) );
+}
+
+/*************************************************************************
+|*
+|* Dtor SvxXConnectionPreview
+|*
+*************************************************************************/
+
+SvxXConnectionPreview::~SvxXConnectionPreview()
+{
+ delete pObjList;
+ delete pExtOutDev;
+}
+
+/*************************************************************************
+|*
+|* Dtor SvxXConnectionPreview
+|*
+*************************************************************************/
+
+void SvxXConnectionPreview::Construct()
+{
+ DBG_ASSERT( pView, "Keine gueltige View Uebergeben!" );
+
+ const SdrMarkList& rMarkList = pView->GetMarkList();
+ ULONG nMarkCount = rMarkList.GetMarkCount();
+
+ if( nMarkCount >= 1 )
+ {
+ BOOL bFound = FALSE;
+ const SdrObject* pObj = rMarkList.GetMark(0)->GetObj();
+
+
+ for( USHORT i = 0; i < nMarkCount && !bFound; i++ )
+ {
+ pObj = rMarkList.GetMark( i )->GetObj();
+ UINT32 nInv = pObj->GetObjInventor();
+ UINT16 nId = pObj->GetObjIdentifier();
+ if( nInv == SdrInventor && nId == OBJ_EDGE )
+ {
+ bFound = TRUE;
+ SdrEdgeObj* pTmpEdgeObj = (SdrEdgeObj*) pObj;
+ pEdgeObj = (SdrEdgeObj*) pTmpEdgeObj->Clone();
+
+ SdrObjConnection& rConn1 = (SdrObjConnection&)pEdgeObj->GetConnection( TRUE );
+ SdrObjConnection& rConn2 = (SdrObjConnection&)pEdgeObj->GetConnection( FALSE );
+
+ rConn1 = pTmpEdgeObj->GetConnection( TRUE );
+ rConn2 = pTmpEdgeObj->GetConnection( FALSE );
+
+ SdrObject* pTmpObj1 = pTmpEdgeObj->GetConnectedNode( TRUE );
+ SdrObject* pTmpObj2 = pTmpEdgeObj->GetConnectedNode( FALSE );
+
+ pObjList = new SdrObjList( pView->GetModel(), NULL );
+ if( pTmpObj1 )
+ {
+ SdrObject* pObj1 = pTmpObj1->Clone();
+ pObjList->InsertObject( pObj1 );
+ pEdgeObj->ConnectToNode( TRUE, pObj1 );
+ }
+ if( pTmpObj2 )
+ {
+ SdrObject* pObj2 = pTmpObj2->Clone();
+ pObjList->InsertObject( pObj2 );
+ pEdgeObj->ConnectToNode( FALSE, pObj2 );
+ }
+ pObjList->InsertObject( pEdgeObj );
+ }
+ }
+ }
+
+ if( !pEdgeObj )
+ pEdgeObj = new SdrEdgeObj();
+
+ // Groesse anpassen
+ if( pObjList )
+ {
+ OutputDevice* pOD = pView->GetWin( 0 );
+ Rectangle aRect = pObjList->GetAllObjBoundRect();
+
+ MapMode aMapMode = GetMapMode();
+ aMapMode.SetMapUnit( pOD->GetMapMode().GetMapUnit() );
+ SetMapMode( aMapMode );
+
+ MapMode aDisplayMap( aMapMode );
+ Point aNewPos;
+ Size aNewSize;
+ const Size aWinSize = PixelToLogic( GetOutputSizePixel(), aDisplayMap );
+ const long nWidth = aWinSize.Width();
+ const long nHeight = aWinSize.Height();
+ double fRectWH = (double) aRect.GetWidth() / aRect.GetHeight();
+ double fWinWH = (double) nWidth / nHeight;
+
+ // Bitmap an Thumbgroesse anpassen (hier nicht!)
+ if ( fRectWH < fWinWH)
+ {
+ aNewSize.Width() = (long) ( (double) nHeight * fRectWH );
+ aNewSize.Height()= nHeight;
+ }
+ else
+ {
+ aNewSize.Width() = nWidth;
+ aNewSize.Height()= (long) ( (double) nWidth / fRectWH );
+ }
+
+ Fraction aFrac1( aWinSize.Width(), aRect.GetWidth() );
+ Fraction aFrac2( aWinSize.Height(), aRect.GetHeight() );
+ Fraction aMinFrac( aFrac1 <= aFrac2 ? aFrac1 : aFrac2 );
+
+ // MapMode umsetzen
+ aDisplayMap.SetScaleX( aMinFrac );
+ aDisplayMap.SetScaleY( aMinFrac );
+
+ // Zentrierung
+ aNewPos.X() = ( nWidth - aNewSize.Width() ) >> 1;
+ aNewPos.Y() = ( nHeight - aNewSize.Height() ) >> 1;
+
+ aDisplayMap.SetOrigin( LogicToLogic( aNewPos, aMapMode, aDisplayMap ) );
+ SetMapMode( aDisplayMap );
+
+ // Ursprung
+ aNewPos = aDisplayMap.GetOrigin();
+ aNewPos -= Point( aRect.TopLeft().X(), aRect.TopLeft().Y() );
+ aDisplayMap.SetOrigin( aNewPos );
+ SetMapMode( aDisplayMap );
+
+
+ Point aPos;
+ MouseEvent aMEvt( aPos, 1, 0, MOUSE_RIGHT );
+ MouseButtonDown( aMEvt );
+ /*
+ Point aPt( -aRect.TopLeft().X(), -aRect.TopLeft().Y() );
+ aMapMode.SetOrigin( aPt );
+
+ // Skalierung
+ Size aSize = GetOutputSize();
+ Fraction aFrac1( aSize.Width(), aRect.GetWidth() );
+ Fraction aFrac2( aSize.Height(), aRect.GetHeight() );
+ Fraction aMaxFrac( aFrac1 > aFrac2 ? aFrac1 : aFrac2 );
+ Fraction aMinFrac( aFrac1 <= aFrac2 ? aFrac1 : aFrac2 );
+ BOOL bChange = (BOOL) ( (double)aMinFrac > 1.0 );
+ aMapMode.SetScaleX( aMinFrac );
+ aMapMode.SetScaleY( aMinFrac );
+
+ // zentrieren
+ long nXXL = aSize.Width() > aRect.GetWidth() ? aSize.Width() : aRect.GetWidth();
+ long nXS = aSize.Width() <= aRect.GetWidth() ? aSize.Width() : aRect.GetWidth();
+ if( bChange )
+ {
+ long nTmp = nXXL; nXXL = nXS; nXS = nTmp;
+ }
+ long nX = (long) ( (double)aMinFrac * (double)nXXL );
+ nX = (long) ( (double)labs( nXS - nX ) / (double)aMinFrac / 2.0 );
+
+ long nYXL = aSize.Height() > aRect.GetHeight() ? aSize.Height() : aRect.GetHeight();
+ long nYS = aSize.Height() <= aRect.GetHeight() ? aSize.Height() : aRect.GetHeight();
+ if( bChange )
+ {
+ long nTmp = nXXL; nXXL = nXS; nXS = nTmp;
+ }
+ long nY = (long) ( (double)aMinFrac * (double)nYXL );
+ nY = (long) ( (double)labs( nYS - nY ) / (double)aMinFrac / 2.0 );
+
+ aPt += Point( nX, nY );
+ aMapMode.SetOrigin( aPt );
+
+ SetMapMode( aMapMode );
+ */
+ }
+}
+
+/*************************************************************************
+|*
+|* SvxXConnectionPreview: Paint()
+|*
+*************************************************************************/
+
+void SvxXConnectionPreview::Paint( const Rectangle& rRect )
+{
+ SdrPaintInfoRec aInfoRec;
+
+ //pEdgeObj->Paint( *pExtOutDev, aInfoRec );
+ if( pObjList )
+ pObjList->Paint( *pExtOutDev, aInfoRec );
+}
+
+/*************************************************************************
+|*
+|* SvxXConnectionPreview: SetAttributes()
+|*
+*************************************************************************/
+
+void SvxXConnectionPreview::SetAttributes( const SfxItemSet& rInAttrs )
+{
+ pEdgeObj->SetAttributes( rInAttrs, FALSE );
+ Invalidate();
+}
+
+/*************************************************************************
+|*
+|* Ermittelt die Anzahl der Linienversaetze anhand des Preview-Objektes
+|*
+*************************************************************************/
+
+USHORT SvxXConnectionPreview::GetLineDeltaAnz()
+{
+ USHORT nCount = 0;
+ SfxItemSet aSet( rAttrs );
+
+ pEdgeObj->TakeAttributes( aSet, FALSE, FALSE );
+
+ if( aSet.GetItemState( SDRATTR_EDGELINEDELTAANZ ) != SFX_ITEM_DONTCARE )
+ {
+ nCount = ( ( const SdrEdgeLineDeltaAnzItem& ) aSet.
+ Get( SDRATTR_EDGELINEDELTAANZ ) ).GetValue();
+ }
+ return( nCount );
+}
+
+/*************************************************************************
+|*
+|* SvxXConnectionPreview: MouseButtonDown()
+|*
+*************************************************************************/
+
+void SvxXConnectionPreview::MouseButtonDown( const MouseEvent& rMEvt )
+{
+ BOOL bZoomIn = rMEvt.IsLeft() && !rMEvt.IsShift();
+ BOOL bZoomOut = rMEvt.IsRight() || rMEvt.IsShift();
+ BOOL bCtrl = rMEvt.IsMod1();
+
+ if( bZoomIn || bZoomOut )
+ {
+ MapMode aMapMode = GetMapMode();
+ Fraction aXFrac = aMapMode.GetScaleX();
+ Fraction aYFrac = aMapMode.GetScaleY();
+ Fraction* pMultFrac;
+
+ if( bZoomIn )
+ {
+ if( bCtrl )
+ pMultFrac = new Fraction( 3, 2 );
+ else
+ pMultFrac = new Fraction( 11, 10 );
+ }
+ else
+ {
+ if( bCtrl )
+ pMultFrac = new Fraction( 2, 3 );
+ else
+ pMultFrac = new Fraction( 10, 11 );
+ }
+
+ aXFrac *= *pMultFrac;
+ aYFrac *= *pMultFrac;
+ if( (double)aXFrac > 0.001 && (double)aXFrac < 1000.0 &&
+ (double)aYFrac > 0.001 && (double)aYFrac < 1000.0 )
+ {
+ aMapMode.SetScaleX( aXFrac );
+ aMapMode.SetScaleY( aYFrac );
+ SetMapMode( aMapMode );
+
+ Size aOutSize( GetOutputSize() );
+
+ Point aPt( aMapMode.GetOrigin() );
+ long nX = (long)( ( (double)aOutSize.Width() - ( (double)aOutSize.Width() * (double)*pMultFrac ) ) / 2.0 + 0.5 );
+ long nY = (long)( ( (double)aOutSize.Height() - ( (double)aOutSize.Height() * (double)*pMultFrac ) ) / 2.0 + 0.5 );
+ aPt.X() += nX;
+ aPt.Y() += nY;
+
+ aMapMode.SetOrigin( aPt );
+ SetMapMode( aMapMode );
+
+ Invalidate();
+ }
+ delete pMultFrac;
+ }
+}
+
+
diff --git a/svx/source/dialog/connect.cxx b/svx/source/dialog/connect.cxx
new file mode 100644
index 000000000000..cf74cd98773d
--- /dev/null
+++ b/svx/source/dialog/connect.cxx
@@ -0,0 +1,650 @@
+/*************************************************************************
+ *
+ * $RCSfile: connect.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:07 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+// include ---------------------------------------------------------------
+
+#ifndef _SFXAPP_HXX //autogen
+#include <sfx2/app.hxx>
+#endif
+#ifndef _SFXMODULE_HXX
+#include <sfx2/module.hxx>
+#endif
+
+#ifndef _SHL_HXX //autogen
+#include <tools/shl.hxx>
+#endif
+#ifndef _SFX_SAVEOPT_HXX //autogen
+#include <sfx2/saveopt.hxx>
+#endif
+#pragma hdrstop
+
+
+#define _SVX_CONNECT_CXX
+
+#include "svdoedge.hxx"
+#include "svdattr.hxx"
+#include "svdattrx.hxx"
+#include "svdview.hxx"
+
+#include "connctrl.hxx"
+#include "connect.hxx"
+#include "connect.hrc"
+#include "dialmgr.hxx"
+#include "dlgutil.hxx"
+
+#include "dialogs.hrc"
+
+static USHORT pRanges[] =
+{
+ SDRATTR_EDGE_FIRST,
+ SDRATTR_EDGE_LAST,
+ 0
+};
+
+/*************************************************************************
+|*
+|* Dialog zum Aendern von Konnektoren (Connectors)
+|*
+\************************************************************************/
+
+SvxConnectionDialog::SvxConnectionDialog( Window* pParent, const SfxItemSet& rInAttrs,
+ const SdrView* pSdrView ) :
+ SfxSingleTabDialog( pParent, rInAttrs, RID_SVXPAGE_CONNECTION, FALSE )
+{
+ SvxConnectionPage* pPage = new SvxConnectionPage( this, rInAttrs );
+
+ pPage->SetView( pSdrView );
+ pPage->Construct();
+
+ SetTabPage( pPage );
+ SetText( pPage->GetText() );
+}
+
+/*************************************************************************
+|*
+|* Dtor
+|*
+\************************************************************************/
+
+SvxConnectionDialog::~SvxConnectionDialog()
+{
+}
+
+/*************************************************************************
+|*
+|* Seite zum Aendern von Konnektoren (Connectors)
+|*
+\************************************************************************/
+
+SvxConnectionPage::SvxConnectionPage( Window* pWindow, const SfxItemSet& rInAttrs ) :
+ SfxTabPage ( pWindow, ResId( RID_SVXPAGE_CONNECTION, DIALOG_MGR() ),
+ rInAttrs ),
+
+ rOutAttrs ( rInAttrs ),
+ aAttrSet ( *rInAttrs.GetPool() ),
+
+ aFtType ( this, ResId( FT_TYPE ) ),
+ aLbType ( this, ResId( LB_TYPE ) ),
+
+ aFtHorz1 ( this, ResId( FT_HORZ_1 ) ),
+ aMtrFldHorz1 ( this, ResId( MTR_FLD_HORZ_1 ) ),
+ aFtHorz2 ( this, ResId( FT_HORZ_2 ) ),
+ aMtrFldHorz2 ( this, ResId( MTR_FLD_HORZ_2 ) ),
+ aFtVert1 ( this, ResId( FT_VERT_1 ) ),
+ aMtrFldVert1 ( this, ResId( MTR_FLD_VERT_1 ) ),
+ aFtVert2 ( this, ResId( FT_VERT_2 ) ),
+ aMtrFldVert2 ( this, ResId( MTR_FLD_VERT_2 ) ),
+ aGrpDistance ( this, ResId( GRP_DISTANCE ) ),
+
+ aFtLine1 ( this, ResId( FT_LINE_1 ) ),
+ aMtrFldLine1 ( this, ResId( MTR_FLD_LINE_1 ) ),
+ aFtLine2 ( this, ResId( FT_LINE_2 ) ),
+ aMtrFldLine2 ( this, ResId( MTR_FLD_LINE_2 ) ),
+ aFtLine3 ( this, ResId( FT_LINE_3 ) ),
+ aMtrFldLine3 ( this, ResId( MTR_FLD_LINE_3 ) ),
+ aGrpDelta ( this, ResId( GRP_DELTA ) ),
+
+ aCtlPreview ( this, ResId( CTL_PREVIEW ), rInAttrs ),
+ aGrpPreview ( this, ResId( GRP_PREVIEW ) )
+{
+ FreeResource();
+
+ SfxItemPool* pPool = rOutAttrs.GetPool();
+ DBG_ASSERT( pPool, "Wo ist der Pool" );
+ eUnit = pPool->GetMetric( SDRATTR_EDGENODE1HORZDIST );
+
+ FillTypeLB();
+
+ FieldUnit eFUnit;
+ GET_MODULE_FIELDUNIT( eFUnit );
+ SetFieldUnit( aMtrFldHorz1, eFUnit );
+ SetFieldUnit( aMtrFldHorz2, eFUnit );
+ SetFieldUnit( aMtrFldVert1, eFUnit );
+ SetFieldUnit( aMtrFldVert2, eFUnit );
+ SetFieldUnit( aMtrFldLine1, eFUnit );
+ SetFieldUnit( aMtrFldLine2, eFUnit );
+ SetFieldUnit( aMtrFldLine3, eFUnit );
+ if( eFUnit == FUNIT_MM )
+ {
+ aMtrFldHorz1.SetSpinSize( 50 );
+ aMtrFldHorz2.SetSpinSize( 50 );
+ aMtrFldVert1.SetSpinSize( 50 );
+ aMtrFldVert2.SetSpinSize( 50 );
+ aMtrFldLine1.SetSpinSize( 50 );
+ aMtrFldLine2.SetSpinSize( 50 );
+ aMtrFldLine3.SetSpinSize( 50 );
+ }
+
+ Link aLink( LINK( this, SvxConnectionPage, ChangeAttrHdl_Impl ) );
+ aMtrFldHorz1.SetModifyHdl( aLink );
+ aMtrFldVert1.SetModifyHdl( aLink );
+ aMtrFldHorz2.SetModifyHdl( aLink );
+ aMtrFldVert2.SetModifyHdl( aLink );
+ aMtrFldLine1.SetModifyHdl( aLink );
+ aMtrFldLine2.SetModifyHdl( aLink );
+ aMtrFldLine3.SetModifyHdl( aLink );
+ aLbType.SetSelectHdl( aLink );
+}
+
+/*************************************************************************
+|*
+|* Dtor
+|*
+\************************************************************************/
+
+SvxConnectionPage::~SvxConnectionPage()
+{
+}
+
+/*************************************************************************
+|*
+|* Liest uebergebenen Item-Set
+|*
+\************************************************************************/
+
+void __EXPORT SvxConnectionPage::Reset( const SfxItemSet& rAttrs )
+{
+ const SfxPoolItem* pItem = GetItem( rAttrs, SDRATTR_EDGENODE1HORZDIST );
+ const SfxItemPool* pPool = rAttrs.GetPool();
+
+ // SdrEdgeNode1HorzDistItem
+ if( !pItem )
+ pItem = &pPool->GetDefaultItem( SDRATTR_EDGENODE1HORZDIST );
+ if( pItem )
+ {
+ long nValue = ( ( const SdrEdgeNode1HorzDistItem* )pItem )->GetValue();
+ SetMetricValue( aMtrFldHorz1, nValue, eUnit );
+ }
+ else
+#ifndef VCL
+ aMtrFldHorz1.SetEmptyValue();
+#else
+ aMtrFldHorz1.SetEmptyFieldValue();
+#endif
+
+ aMtrFldHorz1.SaveValue();
+
+ // SdrEdgeNode2HorzDistItem
+ pItem = GetItem( rAttrs, SDRATTR_EDGENODE2HORZDIST );
+ if( !pItem )
+ pItem = &pPool->GetDefaultItem( SDRATTR_EDGENODE2HORZDIST );
+ if( pItem )
+ {
+ long nValue = ( ( const SdrEdgeNode2HorzDistItem* )pItem )->GetValue();
+ SetMetricValue( aMtrFldHorz2, nValue, eUnit );
+ }
+ else
+#ifndef VCL
+ aMtrFldHorz2.SetEmptyValue();
+#else
+ aMtrFldHorz2.SetEmptyFieldValue();
+#endif
+
+ aMtrFldHorz2.SaveValue();
+
+ // SdrEdgeNode1VertDistItem
+ pItem = GetItem( rAttrs, SDRATTR_EDGENODE1VERTDIST );
+ if( !pItem )
+ pItem = &pPool->GetDefaultItem( SDRATTR_EDGENODE1VERTDIST );
+ if( pItem )
+ {
+ long nValue = ( ( const SdrEdgeNode1VertDistItem* )pItem )->GetValue();
+ SetMetricValue( aMtrFldVert1, nValue, eUnit );
+ }
+ else
+#ifndef VCL
+ aMtrFldVert1.SetEmptyValue();
+#else
+ aMtrFldVert1.SetEmptyFieldValue();
+#endif
+
+ aMtrFldVert1.SaveValue();
+
+ // SdrEdgeNode2VertDistItem
+ pItem = GetItem( rAttrs, SDRATTR_EDGENODE2VERTDIST );
+ if( !pItem )
+ pItem = &pPool->GetDefaultItem( SDRATTR_EDGENODE2VERTDIST );
+ if( pItem )
+ {
+ long nValue = ( ( const SdrEdgeNode2VertDistItem* )pItem )->GetValue();
+ SetMetricValue( aMtrFldVert2, nValue, eUnit );
+ }
+ else
+#ifndef VCL
+ aMtrFldVert2.SetEmptyValue();
+#else
+ aMtrFldVert2.SetEmptyFieldValue();
+#endif
+
+ aMtrFldVert2.SaveValue();
+
+ // SdrEdgeLine1DeltaItem
+ pItem = GetItem( rAttrs, SDRATTR_EDGELINE1DELTA );
+ if( !pItem )
+ pItem = &pPool->GetDefaultItem( SDRATTR_EDGELINE1DELTA );
+ if( pItem )
+ {
+ long nValue = ( ( const SdrEdgeLine1DeltaItem* )pItem )->GetValue();
+ SetMetricValue( aMtrFldLine1, nValue, eUnit );
+ }
+ else
+#ifndef VCL
+ aMtrFldLine1.SetEmptyValue();
+#else
+ aMtrFldLine1.SetEmptyFieldValue();
+#endif
+
+ aMtrFldLine1.SaveValue();
+
+ // SdrEdgeLine2DeltaItem
+ pItem = GetItem( rAttrs, SDRATTR_EDGELINE2DELTA );
+ if( !pItem )
+ pItem = &pPool->GetDefaultItem( SDRATTR_EDGELINE2DELTA );
+ if( pItem )
+ {
+ long nValue = ( ( const SdrEdgeLine2DeltaItem* )pItem )->GetValue();
+ SetMetricValue( aMtrFldLine2, nValue, eUnit );
+ }
+ else
+#ifndef VCL
+ aMtrFldLine2.SetEmptyValue();
+#else
+ aMtrFldLine2.SetEmptyFieldValue();
+#endif
+
+ aMtrFldLine2.SaveValue();
+
+ // SdrEdgeLine3DeltaItem
+ pItem = GetItem( rAttrs, SDRATTR_EDGELINE3DELTA );
+ if( !pItem )
+ pItem = &pPool->GetDefaultItem( SDRATTR_EDGELINE3DELTA );
+ if( pItem )
+ {
+ long nValue = ( ( const SdrEdgeLine3DeltaItem* )pItem )->GetValue();
+ SetMetricValue( aMtrFldLine3, nValue, eUnit );
+ }
+ else
+#ifndef VCL
+ aMtrFldLine3.SetEmptyValue();
+#else
+ aMtrFldLine3.SetEmptyFieldValue();
+#endif
+
+ aMtrFldLine3.SaveValue();
+
+ // SdrEdgeLineDeltaAnzItem
+ pItem = GetItem( rAttrs, SDRATTR_EDGELINEDELTAANZ );
+ if( !pItem )
+ pItem = &pPool->GetDefaultItem( SDRATTR_EDGELINEDELTAANZ );
+ if( pItem )
+ {
+ UINT16 nValue = ( ( const SdrEdgeLineDeltaAnzItem* )pItem )->GetValue();
+ if( nValue <= 2 )
+ {
+ aFtLine3.Enable( FALSE );
+ aMtrFldLine3.Enable( FALSE );
+#ifndef VCL
+ aMtrFldLine3.SetEmptyValue();
+#else
+ aMtrFldLine3.SetEmptyFieldValue();
+#endif
+ }
+ if( nValue <= 1 )
+ {
+ aFtLine2.Enable( FALSE );
+ aMtrFldLine2.Enable( FALSE );
+#ifndef VCL
+ aMtrFldLine2.SetEmptyValue();
+#else
+ aMtrFldLine2.SetEmptyFieldValue();
+#endif
+ }
+ if( nValue == 0 )
+ {
+ aFtLine1.Enable( FALSE );
+ aMtrFldLine1.Enable( FALSE );
+#ifndef VCL
+ aMtrFldLine1.SetEmptyValue();
+#else
+ aMtrFldLine1.SetEmptyFieldValue();
+#endif
+ }
+ }
+
+ // SdrEdgeKindItem
+ pItem = GetItem( rAttrs, SDRATTR_EDGEKIND );
+ if( !pItem )
+ pItem = &pPool->GetDefaultItem( SDRATTR_EDGEKIND );
+ if( pItem )
+ {
+ USHORT nValue = ( ( const SdrEdgeKindItem* )pItem )->GetValue();
+ aLbType.SelectEntryPos( nValue );
+ }
+ else
+ aLbType.SetNoSelection();
+ aLbType.SaveValue();
+}
+
+/*************************************************************************
+|*
+|* Fuellt uebergebenen Item-Set mit Dialogbox-Attributen
+|*
+\************************************************************************/
+
+BOOL SvxConnectionPage::FillItemSet( SfxItemSet& rAttrs)
+{
+ BOOL bModified = FALSE;
+ INT32 nValue;
+
+ if( aMtrFldHorz1.GetText() != aMtrFldHorz1.GetSavedValue() )
+ {
+ nValue = GetCoreValue( aMtrFldHorz1, eUnit );
+ rAttrs.Put( SdrEdgeNode1HorzDistItem( nValue ) );
+ bModified = TRUE;
+ }
+
+ if( aMtrFldHorz2.GetText() != aMtrFldHorz2.GetSavedValue() )
+ {
+ nValue = GetCoreValue( aMtrFldHorz2, eUnit );
+ rAttrs.Put( SdrEdgeNode2HorzDistItem( nValue ) );
+ bModified = TRUE;
+ }
+
+ if( aMtrFldVert1.GetText() != aMtrFldVert1.GetSavedValue() )
+ {
+ nValue = GetCoreValue( aMtrFldVert1, eUnit );
+ rAttrs.Put( SdrEdgeNode1VertDistItem( nValue ) );
+ bModified = TRUE;
+ }
+
+ if( aMtrFldVert2.GetText() != aMtrFldVert2.GetSavedValue() )
+ {
+ nValue = GetCoreValue( aMtrFldVert2, eUnit );
+ rAttrs.Put( SdrEdgeNode2VertDistItem( nValue ) );
+ bModified = TRUE;
+ }
+
+ if( aMtrFldLine1.GetText() != aMtrFldLine1.GetSavedValue() )
+ {
+ nValue = GetCoreValue( aMtrFldLine1, eUnit );
+ rAttrs.Put( SdrEdgeLine1DeltaItem( nValue ) );
+ bModified = TRUE;
+ }
+
+ if( aMtrFldLine2.GetText() != aMtrFldLine2.GetSavedValue() )
+ {
+ nValue = GetCoreValue( aMtrFldLine2, eUnit );
+ rAttrs.Put( SdrEdgeLine2DeltaItem( nValue ) );
+ bModified = TRUE;
+ }
+
+ if( aMtrFldLine3.GetText() != aMtrFldLine3.GetSavedValue() )
+ {
+ nValue = GetCoreValue( aMtrFldLine3, eUnit );
+ rAttrs.Put( SdrEdgeLine3DeltaItem( nValue ) );
+ bModified = TRUE;
+ }
+
+
+ USHORT nPos = aLbType.GetSelectEntryPos();
+ if( nPos != aLbType.GetSavedValue() )
+ {
+ if( nPos != LISTBOX_ENTRY_NOTFOUND )
+ {
+ rAttrs.Put( SdrEdgeKindItem( (SdrEdgeKind) nPos ) );
+ bModified = TRUE;
+ }
+ }
+
+ return( bModified );
+}
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+void SvxConnectionPage::Construct()
+{
+ DBG_ASSERT( pView, "Keine gueltige View Uebergeben!" );
+
+ aCtlPreview.SetView( pView );
+ aCtlPreview.Construct();
+}
+
+/*************************************************************************
+|*
+|* Erzeugt die Seite
+|*
+\************************************************************************/
+
+SfxTabPage* SvxConnectionPage::Create( Window* pWindow,
+ const SfxItemSet& rAttrs )
+{
+ return( new SvxConnectionPage( pWindow, rAttrs ) );
+}
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+USHORT* SvxConnectionPage::GetRanges()
+{
+ return( pRanges );
+}
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+IMPL_LINK( SvxConnectionPage, ChangeAttrHdl_Impl, void *, p )
+{
+ if( p == &aMtrFldHorz1 )
+ {
+ INT32 nValue = GetCoreValue( aMtrFldHorz1, eUnit );
+ aAttrSet.Put( SdrEdgeNode1HorzDistItem( nValue ) );
+ }
+
+ if( p == &aMtrFldHorz2 )
+ {
+ INT32 nValue = GetCoreValue( aMtrFldHorz2, eUnit );
+ aAttrSet.Put( SdrEdgeNode2HorzDistItem( nValue ) );
+ }
+
+ if( p == &aMtrFldVert1 )
+ {
+ INT32 nValue = GetCoreValue( aMtrFldVert1, eUnit );
+ aAttrSet.Put( SdrEdgeNode1VertDistItem( nValue ) );
+ }
+
+ if( p == &aMtrFldVert2 )
+ {
+ INT32 nValue = GetCoreValue( aMtrFldVert2, eUnit );
+ aAttrSet.Put( SdrEdgeNode2VertDistItem( nValue ) );
+ }
+
+ if( p == &aMtrFldLine1 )
+ {
+ INT32 nValue = GetCoreValue( aMtrFldLine1, eUnit );
+ aAttrSet.Put( SdrEdgeLine1DeltaItem( nValue ) );
+ }
+
+ if( p == &aMtrFldLine2 )
+ {
+ INT32 nValue = GetCoreValue( aMtrFldLine2, eUnit );
+ aAttrSet.Put( SdrEdgeLine2DeltaItem( nValue ) );
+ }
+
+ if( p == &aMtrFldLine3 )
+ {
+ INT32 nValue = GetCoreValue( aMtrFldLine3, eUnit );
+ aAttrSet.Put( SdrEdgeLine3DeltaItem( nValue ) );
+ }
+
+
+ if( p == &aLbType )
+ {
+ USHORT nPos = aLbType.GetSelectEntryPos();
+ if( nPos != LISTBOX_ENTRY_NOTFOUND )
+ {
+ aAttrSet.Put( SdrEdgeKindItem( (SdrEdgeKind) nPos ) );
+ }
+ }
+
+ aCtlPreview.SetAttributes( aAttrSet );
+
+ if( p == &aLbType )
+ {
+ // Anzahl der Linienversaetze ermitteln
+ USHORT nCount = aCtlPreview.GetLineDeltaAnz();
+
+ aFtLine3.Enable( nCount > 2 );
+ aMtrFldLine3.Enable( nCount > 2 );
+ if( nCount > 2 )
+ aMtrFldLine3.SetValue( aMtrFldLine3.GetValue() );
+ else
+#ifndef VCL
+ aMtrFldLine3.SetEmptyValue();
+#else
+ aMtrFldLine3.SetEmptyFieldValue();
+#endif
+
+ aFtLine2.Enable( nCount > 1 );
+ aMtrFldLine2.Enable( nCount > 1 );
+ if( nCount > 1 )
+ aMtrFldLine2.SetValue( aMtrFldLine2.GetValue() );
+ else
+#ifndef VCL
+ aMtrFldLine2.SetEmptyValue();
+#else
+ aMtrFldLine2.SetEmptyFieldValue();
+#endif
+
+ aFtLine1.Enable( nCount > 0 );
+ aMtrFldLine1.Enable( nCount > 0 );
+ if( nCount > 0 )
+ aMtrFldLine1.SetValue( aMtrFldLine1.GetValue() );
+ else
+#ifndef VCL
+ aMtrFldLine1.SetEmptyValue();
+#else
+ aMtrFldLine1.SetEmptyFieldValue();
+#endif
+
+ }
+
+ return( 0L );
+}
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+void SvxConnectionPage::FillTypeLB()
+{
+ // ListBox mit Verbindernamen fuellen
+ const SfxPoolItem* pItem = GetItem( rOutAttrs, SDRATTR_EDGEKIND );
+ const SfxItemPool* pPool = rOutAttrs.GetPool();
+
+ if( !pItem )
+ pItem = &pPool->GetDefaultItem( SDRATTR_EDGEKIND );
+ if( pItem )
+ {
+ const SdrEdgeKindItem* pEdgeKindItem = (const SdrEdgeKindItem*) pItem;
+ USHORT nCount = pEdgeKindItem->GetValueCount();
+ String aStr;
+
+ for( USHORT i = 0; i < nCount; i++ )
+ {
+ aStr = pEdgeKindItem->GetValueTextByPos( i );
+ aLbType.InsertEntry( aStr );
+ }
+ }
+}
+
+
diff --git a/svx/source/dialog/connect.src b/svx/source/dialog/connect.src
new file mode 100644
index 000000000000..fb4af1e0d563
--- /dev/null
+++ b/svx/source/dialog/connect.src
@@ -0,0 +1,510 @@
+/*************************************************************************
+ *
+ * $RCSfile: connect.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:07 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+ // pragma ----------------------------------------------------------------
+
+ // include ---------------------------------------------------------------
+#include "connect.hrc"
+#include "dialogs.hrc"
+#include "helpid.hrc"
+ // RID_SVXPAGE_CONNECTION ------------------------------------------------
+TabPage RID_SVXPAGE_CONNECTION
+{
+ HelpId = HID_PAGE_CONNECTION ;
+ SVLook = TRUE ;
+ Hide = TRUE ;
+ Size = MAP_APPFONT ( 260 , 135 ) ;
+ Text = "Verbinder" ;
+ Text [ ENGLISH ] = "Connectors" ;
+ Text [ english_us ] = "Connector" ;
+ Text [ portuguese_brazilian ] = "Verbinder" ;
+ Text [ swedish ] = "Frbindelse" ;
+ Text [ danish ] = "Forbindelse" ;
+ Text [ italian ] = "Connettore" ;
+ Text [ spanish ] = "Conector" ;
+ Text [ french ] = "Connecteur" ;
+ Text [ dutch ] = "Verbinding" ;
+ Text [ portuguese ] = "Conectores" ;
+ GroupBox GRP_DISTANCE
+ {
+ Pos = MAP_APPFONT ( 6 , 58 ) ;
+ Size = MAP_APPFONT ( 120 , 71 ) ;
+ Text = "Linienabstand" ;
+ Text [ ENGLISH ] = "Distance" ;
+ Text [ english_us ] = "Line spacing" ;
+ Text [ portuguese_brazilian ] = "Linienabstand" ;
+ Text [ swedish ] = "Linjeavstnd" ;
+ Text [ danish ] = "Linjeafstand" ;
+ Text [ italian ] = "Distanza tra le linee" ;
+ Text [ spanish ] = "Distancia entre lneas" ;
+ Text [ french ] = "Interligne" ;
+ Text [ dutch ] = "Lijnafstand" ;
+ Text [ portuguese ] = "Intervalo entre linhas" ;
+ Text[ chinese_simplified ] = "߼";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Odstp wierszy";
+ Text[ japanese ] = "Ԋu";
+ Text[ chinese_traditional ] = "uj";
+ Text[ arabic ] = " ";
+ Text[ greek ] = "";
+ Text[ korean ] = " ";
+ Text[ turkish ] = "izgi aral";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_TYPE
+ {
+ Pos = MAP_APPFONT ( 132 , 8 ) ;
+ Size = MAP_APPFONT ( 25 , 10 ) ;
+ Text = "~Typ" ;
+ Text [ ENGLISH ] = "~Type" ;
+ Text [ english_us ] = "~Type" ;
+ Text [ portuguese_brazilian ] = "~Typ" ;
+ Text [ swedish ] = "~Typ" ;
+ Text [ danish ] = "Type" ;
+ Text [ italian ] = "~Tipo" ;
+ Text [ spanish ] = "~Tipo" ;
+ Text [ french ] = "~Type" ;
+ Text [ dutch ] = "~Type" ;
+ Text [ portuguese ] = "~Tipo" ;
+ Text[ chinese_simplified ] = "(~T)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Typ";
+ Text[ japanese ] = "(~T)";
+ Text[ chinese_traditional ] = "(~T)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "~";
+ Text[ korean ] = "(~T)";
+ Text[ turkish ] = "~Tip";
+ Text[ language_user1 ] = " ";
+ };
+ GroupBox GRP_DELTA
+ {
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 120 , 53 ) ;
+ Text = "Linienversatz" ;
+ Text [ ENGLISH ] = "Delta" ;
+ Text [ english_us ] = "Line skew" ;
+ Text [ portuguese_brazilian ] = "Linienversatz" ;
+ Text [ swedish ] = "Linjefrskjutning" ;
+ Text [ danish ] = "Linjeforskydning" ;
+ Text [ italian ] = "Spostamento linea" ;
+ Text [ spanish ] = "Desplazamiento de lneas" ;
+ Text [ french ] = "Dcalage de ligne" ;
+ Text [ dutch ] = "Lijnopvulling" ;
+ Text [ portuguese ] = "Transposio de linhas" ;
+ Text[ chinese_simplified ] = "ƫ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Przesunicie linii";
+ Text[ japanese ] = "̂";
+ Text[ chinese_traditional ] = "u";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ";
+ Text[ turkish ] = "izgi erilii";
+ Text[ language_user1 ] = " ";
+ };
+ GroupBox GRP_PREVIEW
+ {
+ Pos = MAP_APPFONT ( 132 , 24 ) ;
+ Size = MAP_APPFONT ( 121 , 105 ) ;
+ Text = "Vorschau" ;
+ Text [ ENGLISH ] = "Preview" ;
+ Text [ english_us ] = "Preview" ;
+ Text [ portuguese_brazilian ] = "Vorschau" ;
+ Text [ swedish ] = "Frhandsvisning" ;
+ Text [ danish ] = "Eksempel" ;
+ Text [ italian ] = "Anteprima" ;
+ Text [ spanish ] = "Previsualizacin" ;
+ Text [ french ] = "Aperu" ;
+ Text [ dutch ] = "Voorbeeld" ;
+ Text [ portuguese ] = "Previsualizar" ;
+ Text[ chinese_simplified ] = "Ԥ";
+ Text[ russian ] = "";
+ Text[ polish ] = "Podgld";
+ Text[ japanese ] = "ޭ";
+ Text[ chinese_traditional ] = "w";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "̸ ";
+ Text[ turkish ] = "nizleme";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_TYPE
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 158 , 6 ) ;
+ Size = MAP_APPFONT ( 96 , 60 ) ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+ };
+ FixedText FT_LINE_1
+ {
+ Pos = MAP_APPFONT ( 12 , 15 ) ;
+ Size = MAP_APPFONT ( 66 , 10 ) ;
+ Text = "Linie ~1" ;
+ Text [ ENGLISH ] = "Line ~1" ;
+ Text [ english_us ] = "Line ~1" ;
+ Text [ portuguese_brazilian ] = "Linie ~1" ;
+ Text [ swedish ] = "Linje ~1" ;
+ Text [ danish ] = "Linje 1" ;
+ Text [ italian ] = "Linea ~1" ;
+ Text [ spanish ] = "Lnea ~1" ;
+ Text [ french ] = "Ligne ~1" ;
+ Text [ dutch ] = "Lijn ~1" ;
+ Text [ portuguese ] = "Linha ~1" ;
+ Text[ chinese_simplified ] = " ~1";
+ Text[ russian ] = " ~1";
+ Text[ polish ] = "Linia 1";
+ Text[ japanese ] = "1";
+ Text[ chinese_traditional ] = "u ~1";
+ Text[ arabic ] = " 1";
+ Text[ greek ] = " ~1";
+ Text[ korean ] = "1";
+ Text[ turkish ] = "izgi ~1";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField MTR_FLD_LINE_1
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 79 , 12 ) ;
+ Size = MAP_APPFONT ( 40 , 12 ) ;
+ TabStop = TRUE ;
+ Spin = TRUE ;
+ Repeat = TRUE ;
+ DecimalDigits = 2 ;
+ Minimum = -10000 ;
+ First = -10000 ;
+ Maximum = 10000 ;
+ Last = 10000 ;
+ SpinSize = 10 ;
+ Unit = FUNIT_CM ;
+ };
+ FixedText FT_LINE_2
+ {
+ Pos = MAP_APPFONT ( 12 , 28 ) ;
+ Size = MAP_APPFONT ( 66 , 10 ) ;
+ Text = "Linie ~2" ;
+ Text [ ENGLISH ] = "Line ~2" ;
+ Text [ english_us ] = "Line ~2" ;
+ Text [ portuguese_brazilian ] = "Linie ~2" ;
+ Text [ swedish ] = "Linje ~2" ;
+ Text [ danish ] = "Linje 2" ;
+ Text [ italian ] = "Linea ~2" ;
+ Text [ spanish ] = "Lnea ~2" ;
+ Text [ french ] = "Ligne ~2" ;
+ Text [ dutch ] = "Lijn ~2" ;
+ Text [ portuguese ] = "Linha ~2" ;
+ Text[ chinese_simplified ] = " ~2";
+ Text[ russian ] = " ~2";
+ Text[ polish ] = "Linia 2";
+ Text[ japanese ] = "2";
+ Text[ chinese_traditional ] = "u ~2";
+ Text[ arabic ] = " 2";
+ Text[ greek ] = " 2";
+ Text[ korean ] = "2";
+ Text[ turkish ] = "izgi ~2";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField MTR_FLD_LINE_2
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 79 , 26 ) ;
+ Size = MAP_APPFONT ( 40 , 12 ) ;
+ TabStop = TRUE ;
+ Spin = TRUE ;
+ Repeat = TRUE ;
+ DecimalDigits = 2 ;
+ Minimum = -10000 ;
+ First = -10000 ;
+ Maximum = 10000 ;
+ Last = 10000 ;
+ SpinSize = 10 ;
+ Unit = FUNIT_CM ;
+ };
+ FixedText FT_LINE_3
+ {
+ Pos = MAP_APPFONT ( 12 , 41 ) ;
+ Size = MAP_APPFONT ( 66 , 10 ) ;
+ Text = "Linie ~3" ;
+ Text [ ENGLISH ] = "Line ~3" ;
+ Text [ english_us ] = "Line ~3" ;
+ Text [ portuguese_brazilian ] = "Linie ~3" ;
+ Text [ swedish ] = "Linje ~3" ;
+ Text [ danish ] = "Linje 3" ;
+ Text [ italian ] = "Linea ~3" ;
+ Text [ spanish ] = "Lnea~3" ;
+ Text [ french ] = "Ligne ~3" ;
+ Text [ dutch ] = "Lijn ~3" ;
+ Text [ portuguese ] = "Linha ~3" ;
+ Text[ chinese_simplified ] = " ~3";
+ Text[ russian ] = " ~3";
+ Text[ polish ] = "Linia 3";
+ Text[ japanese ] = "3";
+ Text[ chinese_traditional ] = "u ~3";
+ Text[ arabic ] = " 3";
+ Text[ greek ] = " ~3";
+ Text[ korean ] = "3";
+ Text[ turkish ] = "izgi ~3";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField MTR_FLD_LINE_3
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 79 , 40 ) ;
+ Size = MAP_APPFONT ( 40 , 12 ) ;
+ TabStop = TRUE ;
+ Spin = TRUE ;
+ Repeat = TRUE ;
+ DecimalDigits = 2 ;
+ Minimum = -10000 ;
+ First = -10000 ;
+ Maximum = 10000 ;
+ Last = 10000 ;
+ SpinSize = 10 ;
+ Unit = FUNIT_CM ;
+ };
+ FixedText FT_HORZ_1
+ {
+ Pos = MAP_APPFONT ( 12 , 69 ) ;
+ Size = MAP_APPFONT ( 66 , 10 ) ;
+ Text = "Anfang h~orizontal" ;
+ Text [ ENGLISH ] = "Start h~orizontal" ;
+ Text [ english_us ] = "~Begin horizontal" ;
+ Text [ portuguese_brazilian ] = "H~orizontal 1" ;
+ Text [ swedish ] = "Start ~horisontell" ;
+ Text [ danish ] = "Start vandret" ;
+ Text [ italian ] = "Inizio o~rizzontale" ;
+ Text [ spanish ] = "Comienzo h~orizontal" ;
+ Text [ french ] = "Dbut h~orizontal" ;
+ Text [ dutch ] = "Begin h~orizontaal" ;
+ Text [ portuguese ] = "Incio h~orizontal" ;
+ Text[ chinese_simplified ] = "ͷˮƽ(~B)";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Pocztek poziomo";
+ Text[ japanese ] = "̎n_(~B)";
+ Text[ chinese_traditional ] = "}YOV(~B)";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = "μ (~B)";
+ Text[ turkish ] = "Ba ~yatay";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField MTR_FLD_HORZ_1
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 79 , 68 ) ;
+ Size = MAP_APPFONT ( 40 , 12 ) ;
+ TabStop = TRUE ;
+ Spin = TRUE ;
+ Repeat = TRUE ;
+ DecimalDigits = 2 ;
+ Minimum = -10000 ;
+ First = -10000 ;
+ Maximum = 10000 ;
+ Last = 10000 ;
+ SpinSize = 10 ;
+ Unit = FUNIT_CM ;
+ };
+ FixedText FT_HORZ_2
+ {
+ Pos = MAP_APPFONT ( 12 , 99 ) ;
+ Size = MAP_APPFONT ( 54 , 10 ) ;
+ Text = "Ende ho~rizontal" ;
+ Text [ ENGLISH ] = "End ho~rizontal" ;
+ Text [ english_us ] = "End ~horizontal" ;
+ Text [ portuguese_brazilian ] = "Ho~rizontal 2" ;
+ Text [ swedish ] = "Slut h~orisontellt" ;
+ Text [ danish ] = "Slut vandret" ;
+ Text [ italian ] = "Fine o~rizzontale" ;
+ Text [ spanish ] = "Final hori~zontal" ;
+ Text [ french ] = "Fin ho~rizontale" ;
+ Text [ dutch ] = "Einde ho~rizontaal" ;
+ Text [ portuguese ] = "Fim ho~rizontal" ;
+ Text[ chinese_simplified ] = "βˮƽ(~H)";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Koniec poziomo";
+ Text[ japanese ] = "̏I_(~H)";
+ Text[ chinese_traditional ] = "OV(~H)";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = "μ (~H)";
+ Text[ turkish ] = "Sonu ya~tay";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField MTR_FLD_HORZ_2
+ {
+ Border = TRUE ;
+ Size = MAP_APPFONT ( 40 , 12 ) ;
+ Pos = MAP_APPFONT ( 79 , 98 ) ;
+ TabStop = TRUE ;
+ Spin = TRUE ;
+ Repeat = TRUE ;
+ DecimalDigits = 2 ;
+ Minimum = -10000 ;
+ First = -10000 ;
+ Maximum = 10000 ;
+ Last = 10000 ;
+ SpinSize = 10 ;
+ Unit = FUNIT_CM ;
+ };
+ FixedText FT_VERT_1
+ {
+ Pos = MAP_APPFONT ( 12 , 84 ) ;
+ Size = MAP_APPFONT ( 54 , 10 ) ;
+ Text = "Anfang ~vertikal" ;
+ Text [ ENGLISH ] = "Start ~vertical" ;
+ Text [ english_us ] = "Begin ~vertical" ;
+ Text [ portuguese_brazilian ] = "~Vertikal 1" ;
+ Text [ swedish ] = "Start ~vertikal" ;
+ Text [ danish ] = "Start lodret" ;
+ Text [ italian ] = "Inizio ~verticale" ;
+ Text [ spanish ] = "Comienzo ~vertical" ;
+ Text [ french ] = "Dbut ~vertical" ;
+ Text [ dutch ] = "Begin ~verticaal" ;
+ Text [ portuguese ] = "Incio ~vertical" ;
+ Text[ chinese_simplified ] = "ͷǴֱ(~V)";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Pocztek pionowo";
+ Text[ japanese ] = "c̎n_(~V)";
+ Text[ chinese_traditional ] = "}YOV(~V)";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ~";
+ Text[ korean ] = "μ (~V)";
+ Text[ turkish ] = "Ba ~dikey";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField MTR_FLD_VERT_1
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 79 , 83 ) ;
+ Size = MAP_APPFONT ( 40 , 12 ) ;
+ TabStop = TRUE ;
+ Spin = TRUE ;
+ Repeat = TRUE ;
+ DecimalDigits = 2 ;
+ Minimum = -10000 ;
+ First = -10000 ;
+ Maximum = 10000 ;
+ Last = 10000 ;
+ SpinSize = 10 ;
+ Unit = FUNIT_CM ;
+ };
+ FixedText FT_VERT_2
+ {
+ Pos = MAP_APPFONT ( 12 , 114 ) ;
+ Size = MAP_APPFONT ( 54 , 10 ) ;
+ Text = "Ende v~ertikal" ;
+ Text [ ENGLISH ] = "End v~ertical" ;
+ Text [ english_us ] = "~End vertical" ;
+ Text [ portuguese_brazilian ] = "V~ertikal 2" ;
+ Text [ swedish ] = "Slut v~ertikalt" ;
+ Text [ danish ] = "Slut lodret" ;
+ Text [ italian ] = "Fine v~erticale" ;
+ Text [ spanish ] = "Final v~ertical" ;
+ Text [ french ] = "Fin v~erticale" ;
+ Text [ dutch ] = "Einde v~erticaal" ;
+ Text [ portuguese ] = "Fim v~ertical" ;
+ Text[ chinese_simplified ] = "βǴֱ(~E)";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Koniec pionowo";
+ Text[ japanese ] = "c̏I_(~E)";
+ Text[ chinese_traditional ] = "OV(~E)";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = "μ (~E)";
+ Text[ turkish ] = "Sonu d~ikey";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField MTR_FLD_VERT_2
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 79 , 113 ) ;
+ Size = MAP_APPFONT ( 40 , 12 ) ;
+ TabStop = TRUE ;
+ Spin = TRUE ;
+ Repeat = TRUE ;
+ DecimalDigits = 2 ;
+ Minimum = -10000 ;
+ First = -10000 ;
+ Maximum = 10000 ;
+ Last = 10000 ;
+ SpinSize = 10 ;
+ Unit = FUNIT_CM ;
+ };
+ Control CTL_PREVIEW
+ {
+ HelpId = HID_PAGE_CONNECTION_CTL_PREVIEW ;
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 138 , 35 ) ;
+ Size = MAP_APPFONT ( 109 , 88 ) ;
+ TabStop = TRUE ;
+ };
+ Text[ chinese_simplified ] = "ӷ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "cznik";
+ Text[ japanese ] = "ȸ";
+ Text[ chinese_traditional ] = "s";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "ἱ";
+ Text[ turkish ] = "Balayc";
+ Text[ language_user1 ] = " ";
+};
+ // ******************************************************************* EOF
diff --git a/svx/source/dialog/contdlg.hrc b/svx/source/dialog/contdlg.hrc
new file mode 100644
index 000000000000..dbdb9a3c5ab1
--- /dev/null
+++ b/svx/source/dialog/contdlg.hrc
@@ -0,0 +1,118 @@
+/*************************************************************************
+ *
+ * $RCSfile: contdlg.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:07 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#include <dialogs.hrc>
+
+
+// ImapDlg-Dialoge
+#define RID_SVX_CONTOURDLG_START RID_SVX_CONTOUR_START
+
+
+/******************************************************************************/
+
+
+#define RID_SVXDLG_CONTOUR (RID_SVX_CONTOURDLG_START)
+
+#define TBX1 1
+#define TBI_APPLY 1
+
+#define TBI_WORKPLACE 2
+
+#define TBI_SELECT 5
+#define TBI_RECT 6
+#define TBI_CIRCLE 7
+#define TBI_POLY 8
+#define TBI_FREEPOLY 9
+
+#define TBI_POLYEDIT 15
+#define TBI_POLYMOVE 16
+#define TBI_POLYINSERT 17
+#define TBI_POLYDELETE 18
+
+#define TBI_UNDO 20
+#define TBI_REDO 21
+
+#define TBI_AUTOCONTOUR 25
+#define TBI_PIPETTE 26
+
+#define MTF_TOLERANCE 1
+
+#define CTL_CONTOUR 1
+
+#define STB_STATUS 1
+
+
+/******************************************************************************/
+
+#define STR_CONTOURDLG_MODIFY (RID_SVX_CONTOURDLG_START + 2)
+#define STR_CONTOURDLG_NEWPIPETTE (RID_SVX_CONTOURDLG_START + 3)
+#define STR_CONTOURDLG_WORKPLACE (RID_SVX_CONTOURDLG_START + 4)
+#define STR_CONTOURDLG_LINKED (RID_SVX_CONTOURDLG_START + 5)
+
+/******************************************************************************/
+
+
+/******************************************************************************/
+
+
+/******************************************************************************/
+
+
+/******************************************************************************/
diff --git a/svx/source/dialog/contdlg.src b/svx/source/dialog/contdlg.src
new file mode 100644
index 000000000000..21f7aa8cd3a1
--- /dev/null
+++ b/svx/source/dialog/contdlg.src
@@ -0,0 +1,783 @@
+/*************************************************************************
+ *
+ * $RCSfile: contdlg.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:07 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+ // include ---------------------------------------------------------------
+#include "helpid.hrc"
+#include "contdlg.hrc"
+ // pragma ----------------------------------------------------------------
+
+ // RID_SVXDLG_CONTOUR ----------------------------------------------------
+FloatingWindow RID_SVXDLG_CONTOUR
+{
+ OutputSize = TRUE ;
+ Hide = TRUE ;
+ SVLook = TRUE ;
+ Pos = MAP_APPFONT ( 0 , 0 ) ;
+ Size = MAP_APPFONT ( 270 , 213 ) ;
+ Text = "Kontur-Editor" ;
+ Text [ ENGLISH ] = "Contour editor" ;
+ Text [ english_us ] = "Contour Editor" ;
+ Sizeable = TRUE ;
+ Moveable = TRUE ;
+ Closeable = TRUE ;
+ Zoomable = TRUE ;
+ ToolBox TBX1
+ {
+ SVLook = TRUE ;
+ Pos = MAP_APPFONT ( 6 , 6 ) ;
+ HelpId = HID_CONTDLG_TOOLBOX ;
+ ItemList =
+ {
+ ToolBoxItem
+ {
+ Identifier = TBI_APPLY ;
+ HelpId = HID_CONTDLG_APPLY ;
+ Text = "Zuweisen" ;
+ Text [ ENGLISH ] = "Apply" ;
+ Text [ english_us ] = "Apply" ;
+ ItemImage = Image
+ {
+ ImageBitmap = Bitmap { File = "apply.bmp" ; };
+ MaskColor = Color { Red = 0xC000 ; Green = 0xC000 ; Blue = 0xC000 ; };
+ };
+ Text [ portuguese ] = "Aplicar" ;
+ Text [ portuguese_brazilian ] = "Zuweisen" ;
+ Text [ swedish ] = "Tilldela" ;
+ Text [ danish ] = "Tildel" ;
+ Text [ italian ] = "Assegna" ;
+ Text [ spanish ] = "Asignar" ;
+ Text [ french ] = "Assigner" ;
+ Text [ dutch ] = "Toewijzen" ;
+ Text[ chinese_simplified ] = "ʹ";
+ Text[ russian ] = "";
+ Text[ polish ] = "Przypisz";
+ Text[ japanese ] = "Kp";
+ Text[ chinese_traditional ] = "ϥ";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "Uygula";
+ Text[ language_user1 ] = " ";
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SEPARATOR ;
+ };
+ ToolBoxItem
+ {
+ Identifier = TBI_WORKPLACE ;
+ HelpId = HID_CONTDLG_WORKPLACE ;
+ Text = "Arbeitsbereich" ;
+ Text [ ENGLISH ] = "Workplace" ;
+ Text [ english_us ] = "Workspace" ;
+ AutoCheck = TRUE ;
+ ItemImage = Image
+ {
+ ImageBitmap = Bitmap { File = "scarb.bmp" ; };
+ MaskColor = Color { Red = 0xC000 ; Green = 0xC000 ; Blue = 0xC000 ; };
+ };
+ Text [ portuguese ] = "rea de ajuste" ;
+ Text [ portuguese_brazilian ] = "Arbeitsbereich" ;
+ Text [ swedish ] = "Arbetsomrde" ;
+ Text [ danish ] = "Arbejdsomrde" ;
+ Text [ italian ] = "Area di lavoro" ;
+ Text [ spanish ] = "rea de trabajo" ;
+ Text [ french ] = "Zone de travail" ;
+ Text [ dutch ] = "Werkbereik" ;
+ Text[ chinese_simplified ] = "༭";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Obszar roboczy";
+ Text[ japanese ] = "Ɨ̈";
+ Text[ chinese_traditional ] = "sϰ";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = "۾";
+ Text[ turkish ] = "alma alan";
+ Text[ language_user1 ] = " ";
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SEPARATOR ;
+ };
+ ToolBoxItem
+ {
+ Identifier = TBI_SELECT ;
+ HelpId = HID_CONTDLG_SELECT ;
+ Text = "Auswahl" ;
+ Text [ ENGLISH ] = "Selection" ;
+ RadioCheck = TRUE ;
+ AutoCheck = TRUE ;
+ ItemImage = Image
+ {
+ ImageBitmap = Bitmap { File = "sc10128.bmp" ; };
+ MaskColor = Color { Red = 0xC000 ; Green = 0xC000 ; Blue = 0xC000 ; };
+ };
+ Text [ dutch ] = "Selectie" ;
+ Text [ english_us ] = "Select" ;
+ Text [ italian ] = "Selezione" ;
+ Text [ spanish ] = "Seleccin" ;
+ Text [ french ] = "Slection" ;
+ Text [ swedish ] = "Urval" ;
+ Text [ danish ] = "Marker" ;
+ Text [ portuguese ] = "Seleccionar" ;
+ Text [ portuguese_brazilian ] = "Auswahl" ;
+ /* ### ACHTUNG: Neuer Text in Resource? Objekte auswhlen : Objekte auswhlen */
+ Text[ chinese_simplified ] = "ѡ";
+ Text[ russian ] = "";
+ Text[ polish ] = "Wybr";
+ Text[ japanese ] = "I";
+ Text[ chinese_traditional ] = "";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "Seim";
+ Text[ language_user1 ] = " ";
+ };
+ ToolBoxItem
+ {
+ Identifier = TBI_RECT ;
+ HelpId = HID_CONTDLG_RECT ;
+ Text = "Rechteck" ;
+ Text [ ENGLISH ] = "Rectangle" ;
+ RadioCheck = TRUE ;
+ AutoCheck = TRUE ;
+ ItemImage = Image
+ {
+ ImageBitmap = Bitmap { File = "sc10104.bmp" ; };
+ MaskColor = Color { Red = 0xC000 ; Green = 0xC000 ; Blue = 0xC000 ; };
+ };
+ Text [ dutch ] = "Rechthoek" ;
+ Text [ english_us ] = "Rectangle" ;
+ Text [ italian ] = "Rettangolo" ;
+ Text [ spanish ] = "Rectngulo" ;
+ Text [ french ] = "Rectangle" ;
+ Text [ swedish ] = "Rektangel" ;
+ Text [ danish ] = "Rektangel" ;
+ Text [ portuguese ] = "Rectngulo" ;
+ Text [ portuguese_brazilian ] = "Rechteck" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "Prostokt";
+ Text[ japanese ] = "lp`";
+ Text[ chinese_traditional ] = "x";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "簢";
+ Text[ turkish ] = "Dikdrtgen";
+ Text[ language_user1 ] = " ";
+ };
+ ToolBoxItem
+ {
+ Identifier = TBI_CIRCLE ;
+ HelpId = HID_CONTDLG_CIRCLE ;
+ Text = "Ellipse" ;
+ Text [ ENGLISH ] = "Ellipse" ;
+ RadioCheck = TRUE ;
+ AutoCheck = TRUE ;
+ ItemImage = Image
+ {
+ ImageBitmap = Bitmap { File = "sc10110.bmp" ; };
+ MaskColor = Color { Red = 0xC000 ; Green = 0xC000 ; Blue = 0xC000 ; };
+ };
+ Text [ dutch ] = "Ellips" ;
+ Text [ english_us ] = "Ellipse" ;
+ Text [ italian ] = "Ellisse" ;
+ Text [ spanish ] = "Elipse" ;
+ Text [ french ] = "Ellipse" ;
+ Text [ swedish ] = "Ellips" ;
+ Text [ danish ] = "Ellipse" ;
+ Text [ portuguese ] = "Elipse" ;
+ Text [ portuguese_brazilian ] = "Ellipse" ;
+ Text[ chinese_simplified ] = "Բ";
+ Text[ russian ] = "";
+ Text[ polish ] = "Elipsa";
+ Text[ japanese ] = "ȉ~";
+ Text[ chinese_traditional ] = "";
+ Text[ arabic ] = " ";
+ Text[ greek ] = "";
+ Text[ korean ] = "Ÿ";
+ Text[ turkish ] = "Elips";
+ Text[ language_user1 ] = " ";
+ };
+ ToolBoxItem
+ {
+ Identifier = TBI_POLY ;
+ HelpId = HID_CONTDLG_POLY ;
+ Text = "Polygon" ;
+ Text [ ENGLISH ] = "Polygon" ;
+ RadioCheck = TRUE ;
+ AutoCheck = TRUE ;
+ ItemImage = Image
+ {
+ ImageBitmap = Bitmap { File = "sc10117.bmp" ; };
+ MaskColor = Color { Red = 0xC000 ; Green = 0xC000 ; Blue = 0xC000 ; };
+ };
+ Text [ english_us ] = "Polygon" ;
+ Text [ italian ] = "Poligono" ;
+ Text [ spanish ] = "Polgono" ;
+ Text [ french ] = "Polygone" ;
+ Text [ dutch ] = "Veelhoek" ;
+ Text [ swedish ] = "Polygon" ;
+ Text [ danish ] = "Polygon" ;
+ Text [ portuguese ] = "Polgono" ;
+ Text [ portuguese_brazilian ] = "Polygon" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "Wielokt";
+ Text[ japanese ] = "p`";
+ Text[ chinese_traditional ] = "h";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "ٰ";
+ Text[ turkish ] = "okgen";
+ Text[ language_user1 ] = " ";
+ };
+ /*
+ ToolBoxItem
+ {
+ Identifier = TBI_FREEPOLY ;
+ HelpId = HID_CONTDLG_FREEPOLY;
+ Text = "Freihandpolygon" ;
+ Text [ ENGLISH ] = "Freeline polygon" ;
+ Text [ english_us ] = "Freeline polygon" ;
+ RadioCheck = TRUE ;
+ AutoCheck = TRUE ;
+ ItemImage = Image
+ {
+ ImageBitmap = Bitmap { File = "sc10463.bmp" ; };
+ MaskColor = Color { Red = 0xC000 ; Green = 0xC000 ; Blue = 0xC000 ; };
+ };
+ };
+*/
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SEPARATOR ;
+ };
+ ToolBoxItem
+ {
+ Identifier = TBI_POLYEDIT ;
+ HelpId = HID_CONTDLG_POLYEDIT ;
+ Text = "Punkte bearbeiten" ;
+ Text [ norwegian ] = "Edit Points" ;
+ Text [ italian ] = "Modifica punti" ;
+ Text [ portuguese_brazilian ] = "Editar Pontos" ;
+ Text [ portuguese ] = "Editar pontos" ;
+ Text [ finnish ] = "Muokkaa pisteit" ;
+ Text [ danish ] = "Rediger punkter" ;
+ Text [ french ] = "diter des points" ;
+ Text [ swedish ] = "Redigera punkter" ;
+ Text [ dutch ] = "Punten bewerken" ;
+ Text [ spanish ] = "Modificar puntos" ;
+ Text [ english_us ] = "Edit Points" ;
+ AutoCheck = TRUE ;
+ ItemImage = Image
+ {
+ ImageBitmap = Bitmap { File = "sc10126.bmp" ; };
+ MaskColor = Color { Red = 0xC000 ; Green = 0xC000 ; Blue = 0xC000 ; };
+ };
+ Text[ chinese_simplified ] = "༭";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Edytuj punkty";
+ Text[ japanese ] = "_̕ҏW";
+ Text[ chinese_traditional ] = "קI";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ";
+ Text[ turkish ] = "Nokta dzenle";
+ Text[ language_user1 ] = " ";
+ };
+ ToolBoxItem
+ {
+ Identifier = TBI_POLYMOVE ;
+ HelpId = HID_CONTDLG_POLYMOVE ;
+ Text = "Punkte verschieben" ;
+ Text [ ENGLISH ] = "Edit Points" ;
+ Text [ norwegian ] = "Edit Points" ;
+ Text [ italian ] = "Sposta punti" ;
+ Text [ portuguese_brazilian ] = "Editar Pontos" ;
+ Text [ portuguese ] = "Mover pontos" ;
+ Text [ finnish ] = "Muokkaa pisteit" ;
+ Text [ danish ] = "Flyt punkter" ;
+ Text [ french ] = "Dplacer des points" ;
+ Text [ swedish ] = "Flytta punkter" ;
+ Text [ dutch ] = "Punten verplaatsen" ;
+ Text [ spanish ] = "Desplazar puntos" ;
+ Text [ english_us ] = "Move Points" ;
+ RadioCheck = TRUE ;
+ AutoCheck = TRUE ;
+ ItemImage = Image
+ {
+ ImageBitmap = Bitmap { File = "sc10121.bmp" ; };
+ MaskColor = Color { Red = 0xC000 ; Green = 0xC000 ; Blue = 0xC000 ; };
+ };
+ Text[ chinese_simplified ] = "ƶ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Przesu punkty";
+ Text[ japanese ] = "_̈ړ";
+ Text[ chinese_traditional ] = "I";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ̵";
+ Text[ turkish ] = "Nokta ta";
+ Text[ language_user1 ] = " ";
+ };
+ ToolBoxItem
+ {
+ Identifier = TBI_POLYINSERT ;
+ HelpId = HID_CONTDLG_POLYINSERT ;
+ /* ### ACHTUNG: Neuer Text in Resource? Punkte einfgen : Punkte einfgen */
+ /* ### ACHTUNG: Neuer Text in Resource? Punkte einfgen : Punkte einfgen */
+ Text = "Punkte einfgen" ;
+ Text [ ENGLISH ] = "Insert Points" ;
+ Text [ norwegian ] = "Insert Points" ;
+ Text [ italian ] = "Inserisci punti" ;
+ Text [ portuguese_brazilian ] = "Inserir Pontos" ;
+ Text [ portuguese ] = "Inserir pontos" ;
+ Text [ finnish ] = "Lis pisteit" ;
+ Text [ danish ] = "Indst punkter" ;
+ Text [ french ] = "Insrer des points" ;
+ Text [ swedish ] = "Infoga punkter" ;
+ Text [ dutch ] = "Punten invoegen" ;
+ Text [ spanish ] = "Insertar puntos" ;
+ Text [ english_us ] = "Insert Points" ;
+ RadioCheck = TRUE ;
+ AutoCheck = TRUE ;
+ ItemImage = Image
+ {
+ ImageBitmap = Bitmap { File = "sc10119.bmp" ; };
+ MaskColor = Color { Red = 0xC000 ; Green = 0xC000 ; Blue = 0xC000 ; };
+ };
+ /* ### ACHTUNG: Neuer Text in Resource? Neue Punkte einfgen oder anhngen : Neue Punkte einfgen oder anhngen */
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Wstaw punkty";
+ Text[ japanese ] = "_̑}";
+ Text[ chinese_traditional ] = "JI";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ";
+ Text[ turkish ] = "Nokta ekle";
+ Text[ language_user1 ] = " ";
+ };
+ ToolBoxItem
+ {
+ Identifier = TBI_POLYDELETE ;
+ HelpId = HID_CONTDLG_POLYDELETE ;
+ /* ### ACHTUNG: Neuer Text in Resource? Punkte lschen : Punkte lschen */
+ /* ### ACHTUNG: Neuer Text in Resource? Punkte lschen : Punkte lschen */
+ Text = "Punkte lschen" ;
+ Text [ ENGLISH ] = "Delete Points" ;
+ Text [ norwegian ] = "Delete Points" ;
+ Text [ italian ] = "Elimina punti" ;
+ Text [ portuguese_brazilian ] = "Apagar Pontos" ;
+ Text [ portuguese ] = "Eliminar pontos" ;
+ Text [ finnish ] = "Poista pisteit" ;
+ Text [ danish ] = "Slet punkter" ;
+ Text [ french ] = "Supprimer des points" ;
+ Text [ swedish ] = "Radera punkter" ;
+ Text [ dutch ] = "Punten verwijderen" ;
+ Text [ spanish ] = "Eliminar puntos" ;
+ Text [ english_us ] = "Delete Points" ;
+ ItemImage = Image
+ {
+ ImageBitmap = Bitmap { File = "sc10120.bmp" ; };
+ MaskColor = Color { Red = 0xC000 ; Green = 0xC000 ; Blue = 0xC000 ; };
+ };
+ /* ### ACHTUNG: Neuer Text in Resource? Markierte Punkte lschen : Markierte Punkte lschen */
+ Text[ chinese_simplified ] = "ɾ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Usu punkty";
+ Text[ japanese ] = "_̍폜";
+ Text[ chinese_traditional ] = "RI";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ";
+ Text[ turkish ] = "Nokta sil";
+ Text[ language_user1 ] = " ";
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SEPARATOR ;
+ };
+ ToolBoxItem
+ {
+ Identifier = TBI_AUTOCONTOUR ;
+ HelpId = HID_CONTDLG_AUTOCONTOUR ;
+ /* ### ACHTUNG: Neuer Text in Resource? AutoKontur : Autokontur */
+ /* ### ACHTUNG: Neuer Text in Resource? AutoKontur : Autokontur */
+ Text = "AutoKontur" ;
+ Text [ ENGLISH ] = "Auto contour" ;
+ Text [ english_us ] = "AutoContour" ;
+ ItemImage = Image
+ {
+ ImageBitmap = Bitmap { File = "scautoko.bmp" ; };
+ MaskColor = Color { Red = 0xC000 ; Green = 0xC000 ; Blue = 0xC000 ; };
+ };
+ Text [ portuguese ] = "AutoContorno" ;
+ Text [ portuguese_brazilian ] = "Autokontur" ;
+ Text [ swedish ] = "AutoKontur" ;
+ Text [ danish ] = "AutoKontur" ;
+ Text [ italian ] = "Contorno automatico" ;
+ Text [ spanish ] = "Contorno automtico" ;
+ Text [ french ] = "AutoContour" ;
+ Text [ dutch ] = "AutoContour" ;
+ Text[ chinese_simplified ] = "Զ";
+ Text[ russian ] = "";
+ Text[ polish ] = "Autokontur";
+ Text[ japanese ] = "ė֊s";
+ Text[ chinese_traditional ] = "۰ʽ";
+ Text[ arabic ] = " ";
+ Text[ greek ] = "";
+ Text[ korean ] = "ڵ ";
+ Text[ turkish ] = "Otomatik kontur";
+ Text[ language_user1 ] = " ";
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SEPARATOR ;
+ };
+ ToolBoxItem
+ {
+ Identifier = TBI_UNDO ;
+ HelpId = HID_CONTDLG_UNDO ;
+
+ ItemImage = Image
+ {
+ ImageBitmap = Bitmap { File = "sc05701.bmp" ; };
+ MaskColor = Color { Red = 0xC000 ; Green = 0xC000 ; Blue = 0xC000 ; };
+ };
+
+ Text = "Rckgngig " ;
+ Text [ English ] = "Undo " ;
+ Text [ norwegian ] = "Angre " ;
+ Text [ italian ] = "Annulla " ;
+ Text [ portuguese_brazilian ] = "Widerrufen" ;
+ Text [ portuguese ] = "Anular " ;
+ Text [ finnish ] = "Kumoa " ;
+ Text [ danish ] = "Fortryd " ;
+ Text [ french ] = "Annuler " ;
+ Text [ swedish ] = "ngra " ;
+ Text [ dutch ] = "Ongedaan. " ;
+ Text [ spanish ] = "Deshacer " ;
+ Text [ english_us ] = "Undo " ;
+ Text[ chinese_simplified ] = " ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Cofnij ";
+ Text[ japanese ] = "ɖ߂ ";
+ Text[ chinese_traditional ] = "_ ";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ";
+ Text[ turkish ] = "Geri al ";
+ Text[ language_user1 ] = " ";
+ };
+ ToolBoxItem
+ {
+ Identifier = TBI_REDO ;
+ HelpId = HID_CONTDLG_REDO ;
+
+ ItemImage = Image
+ {
+ ImageBitmap = Bitmap { File = "sc05700.bmp" ; };
+ MaskColor = Color { Red = 0xC000 ; Green = 0xC000 ; Blue = 0xC000 ; };
+ };
+
+ Text = "Wiederherstellen " ;
+ Text [ English ] = "Redo " ;
+ Text [ english_us ] = "Redo " ;
+ Text [ portuguese ] = "Restaurar " ;
+ Text [ portuguese_brazilian ] = "Wiederholen" ;
+ Text [ swedish ] = "Upprepa " ;
+ Text [ danish ] = "Gendan " ;
+ Text [ italian ] = "Ripristina " ;
+ Text [ spanish ] = "Restaurar " ;
+ Text [ french ] = "Restaurer " ;
+ Text [ dutch ] = "Herstellen " ;
+ Text[ chinese_simplified ] = "ָ ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Przywr ";
+ Text[ japanese ] = "蒼 ";
+ Text[ chinese_traditional ] = "_MRO ";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = "ٽϱ ";
+ Text[ turkish ] = "Yinele ";
+ Text[ language_user1 ] = " ";
+ };
+ ToolBoxItem
+ {
+ Identifier = TBI_PIPETTE ;
+ HelpId = HID_CONTDLG_PIPETTE ;
+ Text = "Pipette" ;
+ Text [ ENGLISH ] = "Eyedropper" ;
+ Text [ english_us ] = "Eyedropper" ;
+ AutoCheck = TRUE ;
+ ItemImage = Image
+ {
+ ImageBitmap = Bitmap { File = "sc10350.bmp" ; };
+ MaskColor = Color { Red = 0xC000 ; Green = 0xC000 ; Blue = 0xC000 ; };
+ };
+ Text [ portuguese ] = "Pipeta" ;
+ Text [ portuguese_brazilian ] = "Pipette" ;
+ Text [ swedish ] = "Pipett" ;
+ Text [ danish ] = "Pipette" ;
+ Text [ italian ] = "Contagocce" ;
+ Text [ spanish ] = "Pipeta" ;
+ Text [ french ] = "Pipette" ;
+ Text [ dutch ] = "Pipet" ;
+ Text[ chinese_simplified ] = "ȡɫ";
+ Text[ russian ] = "";
+ Text[ polish ] = "Pipeta";
+ Text[ japanese ] = "߯";
+ Text[ chinese_traditional ] = "";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = " 󳻱";
+ Text[ turkish ] = "Renk rnei al";
+ Text[ language_user1 ] = " ";
+ };
+ };
+ };
+ MetricField MTF_TOLERANCE
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 0 , 0 ) ;
+ Size = MAP_APPFONT ( 28 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Maximum = 99 ;
+ Last = 99 ;
+ SpinSize = 1 ;
+ Unit = FUNIT_CUSTOM ;
+ CustomUnitText = " %" ;
+ QuickHelpText = "Farbtoleranz" ;
+ QuickHelpText [ ENGLISH ] = "Color tolerance" ;
+ QuickHelpText [ english_us ] = "Color Tolerance" ;
+ CustomUnitText [ portuguese ] = "%" ;
+ QuickHelpText [ portuguese ] = "Tolerncia de cor" ;
+ CustomUnitText [ portuguese_brazilian ] = "%" ;
+ QuickHelpText [ portuguese_brazilian ] = "Farbtoleranz" ;
+ CustomUnitText [ swedish ] = "%" ;
+ QuickHelpText [ swedish ] = "Frgtolerans" ;
+ CustomUnitText [ danish ] = "%" ;
+ QuickHelpText [ danish ] = "Farbtoleranz" ;
+ CustomUnitText [ italian ] = "%" ;
+ QuickHelpText [ italian ] = "Tolleranza colore" ;
+ CustomUnitText [ spanish ] = "%" ;
+ QuickHelpText [ spanish ] = "Tolerancia del color" ;
+ CustomUnitText [ french ] = "%" ;
+ QuickHelpText [ french ] = "Tolrance chromatique" ;
+ CustomUnitText [ dutch ] = "%" ;
+ QuickHelpText [ dutch ] = "Kleurtolerantie" ;
+ CustomUnitText [ english_us ] = "%" ;
+ CustomUnitText[ chinese_simplified ] = "%";
+ CustomUnitText[ russian ] = "%";
+ CustomUnitText[ polish ] = "%";
+ CustomUnitText[ japanese ] = "%";
+ CustomUnitText[ chinese_traditional ] = "%";
+ CustomUnitText[ arabic ] = "%";
+ QuickHelpText[ russian ] = "Farbtoleranz";
+ QuickHelpText[ polish ] = "Farbtoleranz";
+ QuickHelpText[ japanese ] = "F̋e";
+ QuickHelpText[ chinese_simplified ] = "ɫƫ";
+ QuickHelpText[ chinese_traditional ] = "Cⰾt";
+ QuickHelpText[ arabic ] = "Color Tolerance";
+ CustomUnitText[ greek ] = "%";
+ CustomUnitText[ korean ] = "%";
+ QuickHelpText[ greek ] = "Color Tolerance";
+ QuickHelpText[ korean ] = "Color Tolerance";
+ CustomUnitText[ turkish ] = "%";
+ CustomUnitText[ language_user1 ] = " ";
+ };
+ Control CTL_CONTOUR
+ {
+ Border = TRUE ;
+ SVLook = TRUE ;
+ Pos = MAP_APPFONT ( 6 , 24 ) ;
+ HelpId = HID_CONTDLG_GRAPHWND ;
+ };
+ Text [ portuguese_brazilian ] = "Kontur-Editor" ;
+ Text [ swedish ] = "Kontur-editor" ;
+ Text [ danish ] = "Kontur-redigering" ;
+ Text [ italian ] = "Editor contorno" ;
+ Text [ spanish ] = "Editor de contornos" ;
+ Text [ french ] = "Editeur de contours" ;
+ Text [ dutch ] = "Contoureneditor" ;
+ Text [ portuguese ] = "Editor de contornos" ;
+ Text[ chinese_simplified ] = "ͼ༭";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Edytor konturw";
+ Text[ japanese ] = "֊sި";
+ Text[ chinese_traditional ] = "Ϥs边";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ";
+ Text[ turkish ] = "Kontur editr";
+ Text[ language_user1 ] = " ";
+};
+/******************************************************************************/
+String STR_CONTOURDLG_MODIFY
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Die Kontur wurde gendert.\nSollen die nderungen bernommen werden? : Die Kontur wurde gendert.\nSollen die nderungen bernommen werden? */
+ /* ### ACHTUNG: Neuer Text in Resource? Die Kontur wurde gendert.\nSollen die nderungen bernommen werden? : Die Kontur wurde gendert.\nSollen die nderungen bernommen werden? */
+ Text = "Die Kontur wurde gendert.\nSollen die nderungen bernommen werden?" ;
+ Text [ English ] = "The contour has been modified.\nDo you want to take your changes?" ;
+ Text [ english_us ] = "The contour has been modified.\nDo you want to save the changes?" ;
+ Text [ portuguese_brazilian ] = "Die Kontur wurde gendert.\nSollen die nderungen bernommen werden?" ;
+ Text [ swedish ] = "Konturen har ndrats.\nSkall ndringarna vertas?" ;
+ Text [ danish ] = "Konturen er blevet ndret.\nSkal ndringerne overtages?" ;
+ Text [ italian ] = "Il contorno stato modificato.\nAccettate le modifiche?" ;
+ Text [ spanish ] = "Se ha modificado el contorno de la imagen.\nDesea guardar las modificaciones?" ;
+ Text [ french ] = "Le contour de l'image a t modifi.\nAppliquer les modifications ?" ;
+ Text [ dutch ] = "De contour werd gewijzigd.\nWilt u de veranderingen overnemen?" ;
+ Text [ portuguese ] = "O contorno foi modificado.\nDeseja aplicarr as modificaes?" ;
+ Text[ chinese_simplified ] = "Ѿġ\nҪ";
+ Text[ russian ] = " .\n ?";
+ Text[ polish ] = "Kontur zosta zmieniony.\nCzy zapisa zmiany?";
+ Text[ japanese ] = "֊sύX܂B\nύXp܂܂?";
+ Text[ chinese_traditional ] = "oӹϤwgܧC\nznoܧH";
+ Text[ arabic ] = " .\n ʿ";
+ Text[ greek ] = " .\n ;";
+ Text[ korean ] = " Ǿϴ. \n Ͻðڽϱ?";
+ Text[ turkish ] = "Kontur deitirildi.\nDeiiklikler kaydedilsin mi?";
+ Text[ language_user1 ] = " ";
+};
+String STR_CONTOURDLG_NEWPIPETTE
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Mchten Sie eine neue Kontur erzeugen? : Mchten Sie eine neue Kontur erzeugen? */
+ /* ### ACHTUNG: Neuer Text in Resource? Mchten Sie eine neue Kontur erzeugen? : Mchten Sie eine neue Kontur erzeugen? */
+ Text = "Mchten Sie eine neue Kontur erzeugen?" ;
+ Text [ English ] = "Do you want to create a new contour?" ;
+ Text [ english_us ] = "Do you want to create a new contour?" ;
+ Text [ portuguese_brazilian ] = "Mchten Sie eine neue Kontur erzeugen?" ;
+ Text [ swedish ] = "Vill Du skapa en ny kontur?" ;
+ Text [ danish ] = "Vil du skabe en ny kontur?" ;
+ Text [ italian ] = "Creare un nuovo contorno?" ;
+ Text [ spanish ] = "Desea crear un contorno nuevo?" ;
+ Text [ french ] = "Souhaitez-vous crer un nouveau contour ?" ;
+ Text [ dutch ] = "Wilt u een nieuw contour maken?" ;
+ Text [ portuguese ] = "Deseja criar um novo contorno?" ;
+ Text[ chinese_simplified ] = "Ҫһµ";
+ Text[ russian ] = " ?";
+ Text[ polish ] = "Czy chcesz utworzy nowy kontur?";
+ Text[ japanese ] = "V֊s쐬܂?";
+ Text[ chinese_traditional ] = "zn@@ӷsH";
+ Text[ arabic ] = " Ͽ";
+ Text[ greek ] = " ;";
+ Text[ korean ] = "ο ðڽϱ?";
+ Text[ turkish ] = "Yeni bir kontur oluturmak istiyor musunuz?";
+ Text[ language_user1 ] = " ";
+};
+String STR_CONTOURDLG_WORKPLACE
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Das Setzen eines neuen Arbeitsbereiches\nfhrt zu einem Lschen der Kontur.\nMchten sie wirklich fortfahren? : Das Setzen eines neuen Arbeitsbereiches\nfhrt zu einem Lschen der Kontur.\nMchten sie wirklich fortfahren? */
+ /* ### ACHTUNG: Neuer Text in Resource? Das Setzen eines neuen Arbeitsbereiches\nfhrt zu einem Lschen der Kontur.\nMchten sie wirklich fortfahren? : Das Setzen eines neuen Arbeitsbereiches\nfhrt zu einem Lschen der Kontur.\nMchten sie wirklich fortfahren? */
+ Text = "Das Setzen eines neuen Arbeitsbereiches\nfhrt zu einem Lschen der Kontur.\nMchten sie wirklich fortfahren?" ;
+ Text [ English ] = "Setting a new working area will\ncause a removal of the contour.\nDo you really want to continue?" ;
+ Text [ english_us ] = "Setting a new workspace will\ncause the contour to be deleted.\nAre you sure you want to continue?" ;
+ Text [ portuguese_brazilian ] = "Das Setzen eines neuen Arbeitsbereiches\nfhrt zu einem Lschen der Kontur.\nMchten sie wirklich fortfahren?" ;
+ Text [ swedish ] = "Definition av ett nytt arbetsomrde\nleder till att konturen raderas.\nVill Du fortstta nd?" ;
+ Text [ danish ] = "Hvis du definerer et nyt arbejdsomrde\nbliver konturen slettet.\nEr du sikker p at du vil fortstte?" ;
+ Text [ italian ] = "L'impostazione di una nuova area di lavoro\ncauser la cancellazione del contorno.\nVolete proseguire?" ;
+ Text [ spanish ] = "Al establecer una nueva rea de trabajo\nse eliminar el contorno.\nDesea realmente continuar?" ;
+ Text [ french ] = "Assigner une nouvelle zone de travail\nsupprime le contour.\nSouhaitez-vous continuer ?" ;
+ Text [ dutch ] = "Door het vastleggen van een nieuw werkbereik \nwordt de contour gewist.\nWilt u werkelijk doorgaan?" ;
+ Text [ portuguese ] = "Ao definir uma nova rea de\ntrabalho eliminar o contorno.\nDeseja continuar?" ;
+ Text[ chinese_simplified ] = "һµı༭ɾ\\Ҫ";
+ Text[ russian ] = " \n .\n ?";
+ Text[ polish ] = "Ustawienie nowego obszaru roboczego \nprowadzi do usunicia konturu.\nCzy chcesz kontynuowa?";
+ Text[ japanese ] = "VƗ̈̐ݒɂāA\n֊s폜܂B\ns܂H";
+ Text[ chinese_traditional ] = "wq@ӷssϰ|MC\nzun~H";
+ Text[ arabic ] = " \n . \n ";
+ Text[ greek ] = " \n .\n ;";
+ Text[ korean ] = "۾ ϰ Ǹ\n ˴ϴ. ׷ Ͻðڽϱ?";
+ Text[ turkish ] = "Yeni bir alma alan belirlenmesi durumunda\nkontur silinecek.\nDevam etmek istiyor musunuz?";
+ Text[ language_user1 ] = " ";
+};
+String STR_CONTOURDLG_LINKED
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Diese Grafik ist mit dem Dokument verknpft. Mchten Sie die Verknpfung aufheben, um die Grafik zu bearbeiten? : Diese Grafik ist mit dem Dokument verknpft. Mchten Sie die Verknpfung aufheben, um die Grafik zu bearbeiten? */
+ /* ### ACHTUNG: Neuer Text in Resource? Diese Grafik ist mit dem Dokument verknpft. Mchten Sie die Verknpfung aufheben, um die Grafik zu bearbeiten? : Diese Grafik ist mit dem Dokument verknpft. Mchten Sie die Verknpfung aufheben, um die Grafik zu bearbeiten? */
+ Text = "Diese Grafik ist mit dem Dokument verknpft. Mchten Sie die Verknpfung aufheben, um die Grafik zu bearbeiten?" ;
+ Text [ English ] = "This is a linked graphic. Do you want to unlink the graphic in order to edit the graphic?" ;
+ Text [ norwegian ] = "Dette er +++linked grafikk. nsker du +++unlink the graphic for redigere?" ;
+ Text [ italian ] = "Questra immagine collegata con il documento. Desiderate scollegare l'immagine per poterla modificare?" ;
+ Text [ portuguese_brazilian ] = "This is a linked graphic. Do you want to unlink the graphic in order to edit the graphic?" ;
+ Text [ portuguese ] = "Esta imagem est ligada ao documento. Deseja remover a ligao para poder editar a imagem?" ;
+ Text [ english_us ] = "This graphic object is linked to the document. Do you want to unlink the graphics in order to edit it?" ;
+ Text [ finnish ] = "This is a linked graphic. Do you want to unlink the graphic in order to edit the graphic?" ;
+ Text [ danish ] = "Denne grafik er kdet til dokumentet. Vil du ophve kden for at redigere denne grafik?" ;
+ Text [ french ] = "Cette image est lie un document. Dsirez-vous supprimer le lien pour pouvoir diter l'image ?" ;
+ Text [ swedish ] = "Den hr grafiken r lnkad till ett dokument. Vill Du upphva lnken fr att kunna redigera grafiken?" ;
+ Text [ dutch ] = "Deze afbeelding is met het document gekoppeld. Wilt u de koppeling opheffen om de afbeelding te bewerken?" ;
+ Text [ spanish ] = "Esta imagen est vinculada al documento. Desea deshacer el vnculo para editar la imagen?" ;
+ Text[ chinese_simplified ] = "ͼǺĵӵġҪȡӣ༭ͼ";
+ Text[ russian ] = " . , ?";
+ Text[ polish ] = "Grafika jest poczona z dokumentem. Czy chcesz usun cze, aby edytowa grafik?";
+ Text[ japanese ] = "̸̨޷ĂݸĂ܂B̨ҏW邽߂ݸ܂H";
+ Text[ chinese_traditional ] = "oӹϤOMsCznoӳsMsoӹϤH";
+ Text[ arabic ] = " . ɿ";
+ Text[ greek ] = " . ;";
+ Text[ korean ] = " ׷ Ǿ ֽϴ. Ͽ ׷ Ͻðڽϱ?";
+ Text[ turkish ] = "Bu grafik, belge ile balantl. Grafii dzenlemek iin bu balanty kaldrmak istiyor musunuz?";
+ Text[ language_user1 ] = " ";
+};
+/******************************************************************************/
diff --git a/svx/source/dialog/contimp.hxx b/svx/source/dialog/contimp.hxx
new file mode 100644
index 000000000000..356188c5e5f7
--- /dev/null
+++ b/svx/source/dialog/contimp.hxx
@@ -0,0 +1,154 @@
+/*************************************************************************
+ *
+ * $RCSfile: contimp.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:07 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _CONTIMP_HXX_
+#define _CONTIMP_HXX_
+
+#ifndef _CONTDLG_HXX
+#include "contdlg.hxx"
+#endif
+#ifndef _CONTWND_HXX
+#include "contwnd.hxx"
+#endif
+#ifndef _SV_TOOLBOX_HXX
+#include <vcl/toolbox.hxx>
+#endif
+#ifndef _SV_STATUS_HXX
+#include <vcl/status.hxx>
+#endif
+
+#define CONT_RESID(nId) ResId( nId, DIALOG_MGR() )
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+class SvxSuperContourDlg : public SvxContourDlg
+{
+ Graphic aGraphic;
+ Graphic aUndoGraphic;
+ Graphic aRedoGraphic;
+ Graphic aUpdateGraphic;
+ PolyPolygon aUpdatePolyPoly;
+ Timer aUpdateTimer;
+ Timer aCreateTimer;
+ Size aLastSize;
+ void* pUpdateEditingObject;
+ void* pCheckObj;
+ SvxContourDlgItem aContourItem;
+ ToolBox aTbx1;
+ MetricField aMtfTolerance;
+ ContourWindow aContourWnd;
+ StatusBar aStbStatus;
+ ULONG nGrfChanged;
+ BOOL bExecState;
+ BOOL bPipetteMode;
+ BOOL bWorkplaceMode;
+ BOOL bUpdateGraphicLinked;
+ BOOL bGraphicLinked;
+
+ virtual void Resize();
+ virtual BOOL Close();
+
+ void DoAutoCreate();
+ void ReducePoints( const long nTol = 8 );
+
+ DECL_LINK( Tbx1ClickHdl, ToolBox* );
+ DECL_LINK( MousePosHdl, ContourWindow* );
+ DECL_LINK( GraphSizeHdl, ContourWindow* );
+ DECL_LINK( UpdateHdl, Timer* );
+ DECL_LINK( CreateHdl, Timer* );
+ DECL_LINK( StateHdl, ContourWindow* );
+ DECL_LINK( PipetteHdl, ContourWindow* );
+ DECL_LINK( PipetteClickHdl, ContourWindow* );
+ DECL_LINK( WorkplaceClickHdl, ContourWindow* );
+
+public:
+
+ SvxSuperContourDlg( SfxBindings *pBindings, SfxChildWindow *pCW,
+ Window* pParent, const ResId& rResId );
+ ~SvxSuperContourDlg();
+
+ void SetExecState( BOOL bEnable );
+
+ void SetGraphic( const Graphic& rGraphic );
+ void SetGraphicLinked( BOOL bLinked ) { bGraphicLinked = bLinked; }
+ const Graphic& GetGraphic() const { return aGraphic; }
+ BOOL IsGraphicChanged() const { return nGrfChanged > 0UL; }
+
+ void SetPolyPolygon( const PolyPolygon& rPolyPoly );
+ PolyPolygon GetPolyPolygon( BOOL bRescaleToGraphic = TRUE );
+
+ void SetEditingObject( void* pObj ) { pCheckObj = pObj; }
+ const void* GetEditingObject() const { return pCheckObj; }
+
+ BOOL IsUndoPossible() const;
+ BOOL IsRedoPossible() const;
+
+ void Update( const Graphic& rGraphic, BOOL bGraphicLinked,
+ const PolyPolygon* pPolyPoly = NULL,
+ void* pEditingObj = NULL );
+};
+
+
+#endif // _CONTIMP_HXX_
+
diff --git a/svx/source/dialog/contwnd.cxx b/svx/source/dialog/contwnd.cxx
new file mode 100644
index 000000000000..0ed4620a947b
--- /dev/null
+++ b/svx/source/dialog/contwnd.cxx
@@ -0,0 +1,380 @@
+/*************************************************************************
+ *
+ * $RCSfile: contwnd.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:07 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#pragma hdrstop
+
+#ifndef _XOUTX_HXX //autogen
+#include <xoutx.hxx>
+#endif
+#include <xoutbmp.hxx>
+#include <dialogs.hrc>
+#include <svxids.hrc>
+#include <contdlg.hrc>
+#include <contwnd.hxx>
+#include "svdpage.hxx"
+#include "svdopath.hxx"
+#include "xfltrit.hxx"
+
+#ifndef _SVX_FILLITEM_HXX //autogen
+#include <xfillit.hxx>
+#endif
+
+#ifdef MAC
+#define TRANSCOL Color( COL_LIGHTGRAY )
+#else
+#define TRANSCOL Color( COL_WHITE )
+#endif
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+ContourWindow::ContourWindow( Window* pParent, const ResId& rResId ) :
+ GraphCtrl ( pParent, rResId ),
+ aWorkRect ( 0, 0, 0, 0 ),
+ bPipetteMode ( FALSE ),
+ bWorkplaceMode ( FALSE ),
+ bClickValid ( FALSE )
+{
+ SetWinStyle( WB_SDRMODE );
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+ContourWindow::~ContourWindow()
+{
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+void ContourWindow::SetPolyPolygon( const PolyPolygon& rPolyPoly )
+{
+ SdrPage* pPage = (SdrPage*) pModel->GetPage( 0 );
+ const USHORT nPolyCount = rPolyPoly.Count();
+
+ // zuerst alle Zeichenobjekte loeschen
+ aPolyPoly = rPolyPoly;
+ pPage->Clear();
+
+ for ( USHORT i = 0; i < nPolyCount; i++ )
+ {
+ SdrPathObj* pPathObj = new SdrPathObj( OBJ_PATHFILL, XPolygon( aPolyPoly[ i ] ) );
+
+ if ( pPathObj )
+ {
+ SfxItemSet aSet( pModel->GetItemPool() );
+
+ aSet.Put( XFillStyleItem( XFILL_SOLID ) );
+ aSet.Put( XFillColorItem( String(), TRANSCOL ) );
+ aSet.Put( XFillTransparenceItem( 50 ) );
+
+ pPathObj->SetAttributes( aSet, FALSE );
+ pPage->InsertObject( pPathObj );
+ }
+ }
+
+ if ( nPolyCount )
+ {
+ pView->MarkAll();
+ pView->CombineMarkedObjects( FALSE );
+ }
+
+ pModel->SetChanged( TRUE );
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+const PolyPolygon& ContourWindow::GetPolyPolygon()
+{
+ if ( pModel->IsChanged() )
+ {
+ SdrPage* pPage = (SdrPage*) pModel->GetPage( 0 );
+
+ aPolyPoly = PolyPolygon();
+
+ if ( pPage && pPage->GetObjCount() )
+ {
+ SdrPathObj* pPathObj = (SdrPathObj*) pPage->GetObj( 0 );
+ const XPolyPolygon& rXPolyPoly = pPathObj->GetPathPoly();
+
+ for ( USHORT i = 0, nPolyCount = rXPolyPoly.Count(); i < nPolyCount; i++ )
+ aPolyPoly.Insert( XOutCreatePolygon( rXPolyPoly.GetObject( i ), NULL ) );
+ }
+
+ pModel->SetChanged( FALSE );
+ }
+
+ return aPolyPoly;
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+void ContourWindow::InitSdrModel()
+{
+ GraphCtrl::InitSdrModel();
+
+ SfxItemSet aSet( pModel->GetItemPool() );
+
+ aSet.Put( XFillColorItem( String(), TRANSCOL ) );
+ aSet.Put( XFillTransparenceItem( 50 ) );
+ pView->SetAttributes( aSet );
+ pView->SetFrameDragSingles( TRUE );
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+void ContourWindow::SdrObjCreated( const SdrObject& rObj )
+{
+ pView->MarkAll();
+ pView->CombineMarkedObjects( FALSE );
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+BOOL ContourWindow::IsContourChanged() const
+{
+ SdrPage* pPage = (SdrPage*) pModel->GetPage( 0 );
+ BOOL bRet = FALSE;
+
+ if ( pPage && pPage->GetObjCount() )
+ bRet = ( (SdrPathObj*) pPage->GetObj( 0 ) )->GetPathPoly().Count() && pModel->IsChanged();
+
+ return bRet;
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+void ContourWindow::MouseButtonDown( const MouseEvent& rMEvt )
+{
+ if ( bWorkplaceMode )
+ {
+ const Point aLogPt( PixelToLogic( rMEvt.GetPosPixel() ) );
+
+ SetPolyPolygon( PolyPolygon() );
+ aWorkRect = Rectangle( aLogPt, aLogPt );
+ Paint( Rectangle( Point(), GetGraphicSize() ) );
+ SetEditMode( TRUE );
+ }
+
+ if ( !bPipetteMode )
+ GraphCtrl::MouseButtonDown( rMEvt );
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+void ContourWindow::MouseMove( const MouseEvent& rMEvt )
+{
+ bClickValid = FALSE;
+
+ if ( bPipetteMode )
+ {
+ const Point aLogPt( PixelToLogic( rMEvt.GetPosPixel() ) );
+ const Link& rLink = GetMousePosLink();
+
+ aPipetteColor = GetPixel( aLogPt );
+ Control::MouseMove( rMEvt );
+
+ if ( aPipetteLink.IsSet() && Rectangle( Point(), GetGraphicSize() ).IsInside( aLogPt ) )
+ {
+ SetPointer( POINTER_REFHAND );
+ aPipetteLink.Call( this );
+ }
+ }
+ else
+ GraphCtrl::MouseMove( rMEvt );
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+void ContourWindow::MouseButtonUp(const MouseEvent& rMEvt)
+{
+ Point aTmpPoint;
+ const Rectangle aGraphRect( aTmpPoint, GetGraphicSize() );
+ const Point aLogPt( PixelToLogic( rMEvt.GetPosPixel() ) );
+
+ bClickValid = aGraphRect.IsInside( aLogPt );
+ ReleaseMouse();
+
+ if ( bPipetteMode )
+ {
+ Control::MouseButtonUp( rMEvt );
+
+ if ( aPipetteClickLink.IsSet() )
+ aPipetteClickLink.Call( this );
+ }
+ else if ( bWorkplaceMode )
+ {
+ GraphCtrl::MouseButtonUp( rMEvt );
+
+ aWorkRect.Right() = aLogPt.X();
+ aWorkRect.Bottom() = aLogPt.Y();
+ aWorkRect.Intersection( aGraphRect );
+ aWorkRect.Justify();
+
+ if ( aWorkRect.Left() != aWorkRect.Right() && aWorkRect.Top() != aWorkRect.Bottom() )
+ {
+ PolyPolygon aPolyPoly( GetPolyPolygon() );
+
+ aPolyPoly.Clip( aWorkRect );
+ SetPolyPolygon( aPolyPoly );
+ pView->SetWorkArea( aWorkRect );
+ }
+ else
+ pView->SetWorkArea( aGraphRect );
+
+ Invalidate( aGraphRect );
+
+ if ( aWorkplaceClickLink.IsSet() )
+ aWorkplaceClickLink.Call( this );
+ }
+ else
+ GraphCtrl::MouseButtonUp( rMEvt );
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+void ContourWindow::Paint( const Rectangle& rRect )
+{
+ const Graphic& rGraphic = GetGraphic();
+
+ const Color& rOldLineColor = GetLineColor();
+ const Color& rOldFillColor = GetFillColor();
+
+ SetLineColor( Color( COL_BLACK ) );
+ SetFillColor( Color( COL_WHITE ) );
+
+ DrawRect( Rectangle( Point(), GetGraphicSize() ) );
+
+ SetLineColor( rOldLineColor );
+ SetFillColor( rOldFillColor );
+
+ if ( rGraphic.GetType() != GRAPHIC_NONE )
+ rGraphic.Draw( this, Point(), GetGraphicSize() );
+
+ if ( aWorkRect.Left() != aWorkRect.Right() && aWorkRect.Top() != aWorkRect.Bottom() )
+ {
+ PolyPolygon aPolyPoly( 2, 2 );
+ const Color aOldFillColor( GetFillColor() );
+
+ aPolyPoly.Insert( Rectangle( Point(), GetGraphicSize() ) );
+ aPolyPoly.Insert( aWorkRect );
+
+ SetFillColor( COL_LIGHTRED );
+ DrawTransparent( aPolyPoly, 50 );
+ SetFillColor( aOldFillColor );
+ }
+
+ pView->InitRedraw( this , rRect );
+}
+
+
diff --git a/svx/source/dialog/contwnd.hxx b/svx/source/dialog/contwnd.hxx
new file mode 100644
index 000000000000..ddca7dd09408
--- /dev/null
+++ b/svx/source/dialog/contwnd.hxx
@@ -0,0 +1,129 @@
+/*************************************************************************
+ *
+ * $RCSfile: contwnd.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:07 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _CONTWND_HXX
+#define _CONTWND_HXX
+
+#ifndef _SV_POLY_HXX //autogen
+#include <vcl/poly.hxx>
+#endif
+
+#ifndef _GRAPHCTL_HXX
+#include "graphctl.hxx"
+#endif
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+class ContourWindow : public GraphCtrl
+{
+ PolyPolygon aPolyPoly;
+ Color aPipetteColor;
+ Rectangle aWorkRect;
+ Link aPipetteLink;
+ Link aPipetteClickLink;
+ Link aWorkplaceClickLink;
+ BOOL bPipetteMode;
+ BOOL bWorkplaceMode;
+ BOOL bClickValid;
+
+protected:
+
+ virtual void MouseButtonDown(const MouseEvent& rMEvt);
+ virtual void MouseMove(const MouseEvent& rMEvt);
+ virtual void MouseButtonUp(const MouseEvent& rMEvt);
+ virtual void SdrObjCreated( const SdrObject& rObj );
+ virtual void InitSdrModel();
+ virtual void Paint( const Rectangle& rRect );
+
+ void CreatePolyPolygon();
+
+public:
+
+ ContourWindow( Window* pParent, const ResId& rResId );
+ ~ContourWindow();
+
+ void SetPolyPolygon( const PolyPolygon& rPolyPoly );
+ const PolyPolygon& GetPolyPolygon();
+
+ void SetPipetteMode( const BOOL bPipette ) { bPipetteMode = bPipette; }
+ BOOL IsPipetteMode() const { return bPipetteMode; }
+ const Color& GetPipetteColor() const { return aPipetteColor; }
+
+ BOOL IsClickValid() const { return bClickValid; }
+ BOOL IsContourChanged() const;
+
+ void SetWorkplaceMode( const BOOL bWorkplace ) { bWorkplaceMode = bWorkplace; }
+ BOOL IsWorkplaceMode() const { return bWorkplaceMode; }
+ const Rectangle& GetWorkRect() const { return aWorkRect; }
+
+ void SetPipetteHdl( const Link& rLink ) { aPipetteLink = rLink; }
+ void SetPipetteClickHdl( const Link& rLink ) { aPipetteClickLink = rLink; }
+
+ void SetWorkplaceClickHdl( const Link& rLink ) { aWorkplaceClickLink = rLink; }
+};
+
+
+#endif
+
diff --git a/svx/source/dialog/ctredlin.cxx b/svx/source/dialog/ctredlin.cxx
new file mode 100644
index 000000000000..95aed3202da0
--- /dev/null
+++ b/svx/source/dialog/ctredlin.cxx
@@ -0,0 +1,1577 @@
+/*************************************************************************
+ *
+ * $RCSfile: ctredlin.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:07 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+// System - Includes ---------------------------------------------------------
+#ifndef _SV_SVAPP_HXX
+#include <vcl/svapp.hxx>
+#endif
+
+#ifndef _SHL_HXX //autogen
+#include <tools/shl.hxx>
+#endif
+#ifndef _SFX_SAVEOPT_HXX //autogen
+#include <sfx2/saveopt.hxx>
+#endif
+#ifndef _SFXAPP_HXX //autogen
+#include <sfx2/app.hxx>
+#endif
+#ifndef _SFXMODULE_HXX
+#include <sfx2/module.hxx>
+#endif
+#ifndef _TXTCMP_HXX //autogen
+#include <svtools/txtcmp.hxx>
+#endif
+
+#pragma hdrstop
+
+// INCLUDE -------------------------------------------------------------------
+
+
+#include <dialmgr.hxx>
+#include "ctredlin.hrc"
+#include "ctredlin.hxx"
+#include "fontlb.hxx"
+#include "helpid.hrc"
+
+//============================================================================
+// Local Defines and Function
+//----------------------------------------------------------------------------
+
+inline void EnableDisable( Window& rWin, BOOL bEnable )
+{
+ if (bEnable)
+ rWin.Enable();
+ else
+ rWin.Disable();
+}
+
+static long nStaticTabs[]=
+{
+ 5,10,65,120,170,220
+};
+
+#define MIN_DISTANCE 6
+#define WRITER_AUTHOR 1
+#define WRITER_DATE 2
+#define CALC_AUTHOR 2
+#define CALC_DATE 3
+
+RedlinData::RedlinData()
+{
+ bDisabled=FALSE;
+ pData=NULL;
+}
+RedlinData::~RedlinData()
+{
+}
+
+//============================================================================
+// class SvxRedlinEntry (Eintraege fuer Liste)
+//----------------------------------------------------------------------------
+
+SvxRedlinEntry::SvxRedlinEntry()
+ :SvLBoxEntry()
+{
+}
+
+SvxRedlinEntry::~SvxRedlinEntry()
+{
+ RedlinData* pRedDat=(RedlinData*) GetUserData();
+ if(pRedDat!=NULL)
+ {
+ delete pRedDat;
+ }
+}
+
+/*************************************************************************
+#* Funktionen der in den SvxRedlinTable eingefuegten Items
+#************************************************************************/
+
+DBG_NAME(SvLBoxColorString);
+
+/*************************************************************************
+#* Member: SvLBoxColorString Datum:23.10.97
+#*------------------------------------------------------------------------
+#*
+#* Klasse: SvLBoxColorString
+#*
+#* Funktion: Konstruktor der Klasse SvLBoxColorString
+#*
+#* Input: Box- Entry,Flags, Text fuer Anzeige, Schrift
+#*
+#* Output: ---
+#*
+#************************************************************************/
+
+SvLBoxColorString::SvLBoxColorString( SvLBoxEntry*pEntry,USHORT nFlags,const XubString& rStr,
+ const Color& rCol)
+
+: SvLBoxString( pEntry, nFlags, rStr )
+{
+ DBG_CTOR(SvLBoxColorString,0);
+ aPrivColor=rCol;
+ SetText( pEntry, rStr );
+}
+
+/*************************************************************************
+#* Member: SvLBoxColorString Datum:23.10.97
+#*------------------------------------------------------------------------
+#*
+#* Klasse: SvLBoxColorString
+#*
+#* Funktion: Default Konstruktor der Klasse SvLBoxColorString
+#*
+#* Input: ---
+#*
+#* Output: ---
+#*
+#************************************************************************/
+
+SvLBoxColorString::SvLBoxColorString()
+: SvLBoxString()
+{
+ DBG_CTOR(SvLBoxColorString,0);
+}
+
+/*************************************************************************
+#* Member: ~SvLBoxColorString Datum:23.10.97
+#*------------------------------------------------------------------------
+#*
+#* Klasse: SvLBoxColorString
+#*
+#* Funktion: Destruktor der Klasse SvLBoxColorString
+#*
+#* Input: ---
+#*
+#* Output: ---
+#*
+#************************************************************************/
+
+SvLBoxColorString::~SvLBoxColorString()
+{
+ DBG_DTOR(SvLBoxColorString,0);
+}
+
+
+/*************************************************************************
+#* Member: SvLBoxColorString Datum:23.10.97
+#*------------------------------------------------------------------------
+#*
+#* Klasse: SvLBoxColorString
+#*
+#* Funktion: Erzeugt einen neuen SvLBoxColorString
+#*
+#* Input: ---
+#*
+#* Output: SvLBoxColorString
+#*
+#************************************************************************/
+
+SvLBoxItem* SvLBoxColorString::Create() const
+{
+ DBG_CHKTHIS(SvLBoxColorString,0);
+ return new SvLBoxColorString;
+}
+
+
+
+/*************************************************************************
+#* Member: SvLBoxColorString Datum:23.10.97
+#*------------------------------------------------------------------------
+#*
+#* Klasse: SvLBoxColorString
+#*
+#* Funktion: Zeichenroutine des SvLBoxColorString. Gezeichnet wird
+#* der entsprechende Text mit der eingestellten Farbe
+#* im Ausgabe- Device.
+#*
+#* Input: Position, Ausgabe- Device, Flag fuer Selection,
+#* Zeiger auf den Eintrag
+#*
+#* Output: ---
+#*
+#************************************************************************/
+
+void SvLBoxColorString::Paint( const Point& rPos, SvLBox& rDev,
+ USHORT nFlags, SvLBoxEntry* pEntry )
+{
+ Color aColor=rDev.GetTextColor();
+ Color a2Color=aColor;
+ if(!(nFlags & SVLISTENTRYFLAG_SELECTED))
+ {
+ rDev.SetTextColor(aPrivColor);
+ }
+ SvLBoxString::Paint(rPos,rDev,nFlags,pEntry );
+ rDev.SetTextColor(a2Color);
+}
+
+//============================================================================
+// class SvxRedlinTable
+//----------------------------------------------------------------------------
+
+SvxRedlinTable::SvxRedlinTable( Window* pParent,WinBits nBits ):
+ SvxSimpleTable(pParent,nBits )
+{
+ bAuthor=FALSE;
+ bDate=FALSE;
+ bIsCalc=FALSE;
+ bComment=FALSE;
+ nDatePos=WRITER_DATE;
+ pCommentSearcher=NULL;
+}
+
+SvxRedlinTable::SvxRedlinTable( Window* pParent,const ResId& rResId):
+ SvxSimpleTable(pParent,rResId)
+{
+ bAuthor=FALSE;
+ bDate=FALSE;
+ bIsCalc=FALSE;
+ bComment=FALSE;
+ nDatePos=WRITER_DATE;
+ pCommentSearcher=NULL;
+}
+
+SvxRedlinTable::~SvxRedlinTable()
+{
+ if(pCommentSearcher!=NULL)
+ delete pCommentSearcher;
+}
+
+StringCompare SvxRedlinTable::ColCompare(SvLBoxEntry* pLeft,SvLBoxEntry* pRight)
+{
+ StringCompare eCompare=COMPARE_EQUAL;
+
+ if(aColCompareLink.IsSet())
+ {
+ SvSortData aRedlinCompare;
+ aRedlinCompare.pLeft=pLeft;
+ aRedlinCompare.pRight=pRight;
+ eCompare=(StringCompare) aColCompareLink.Call(&aRedlinCompare);
+ }
+ else
+ {
+ if(nDatePos==GetSortedCol())
+ {
+ RedlinData *pLeftData=(RedlinData *)(pLeft->GetUserData());
+ RedlinData *pRightData=(RedlinData *)(pRight->GetUserData());
+
+ if(pLeftData!=NULL && pRightData!=NULL)
+ {
+ if(pLeftData->aDateTime < pRightData->aDateTime)
+ {
+ eCompare=COMPARE_LESS;
+ }
+ else if(pLeftData->aDateTime > pRightData->aDateTime)
+ {
+ eCompare=COMPARE_GREATER;
+ }
+ }
+ else
+ eCompare=SvxSimpleTable::ColCompare(pLeft,pRight);
+ }
+ else
+ {
+ eCompare=SvxSimpleTable::ColCompare(pLeft,pRight);
+ }
+
+ }
+
+ return eCompare;
+}
+void SvxRedlinTable::SetCalcView(BOOL bFlag)
+{
+ bIsCalc=bFlag;
+ if(bFlag)
+ {
+ nDatePos=CALC_DATE;
+ }
+ else
+ {
+ nDatePos=WRITER_DATE;
+ }
+}
+
+
+void SvxRedlinTable::UpdateFilterTest()
+{
+ Date aDateMax;
+ USHORT nYEAR=aDateMax.GetYear()+100;
+ aDateMax.SetYear(nYEAR);
+ Date aDateMin(1,1,1989);
+ Time aTMin(0);
+ Time aTMax(23,59,59);
+
+
+ DateTime aDTMin(aDateMin);
+ DateTime aDTMax(aDateMax);
+
+ switch(nDaTiMode)
+ {
+ case FLT_DATE_BEFORE:
+ aDaTiFilterFirst=aDTMin;
+ aDaTiFilterLast=aDaTiFirst;
+ break;
+ case FLT_DATE_SAVE:
+ case FLT_DATE_SINCE:
+ aDaTiFilterFirst=aDaTiFirst;
+ aDaTiFilterLast=aDTMax;
+ break;
+ case FLT_DATE_EQUAL:
+ aDaTiFilterFirst=aDaTiFirst;
+ aDaTiFilterLast=aDaTiFirst;
+ aDaTiFilterFirst.SetTime(aTMin.GetTime());
+ aDaTiFilterLast.SetTime(aTMax.GetTime());
+ break;
+ case FLT_DATE_NOTEQUAL:
+ aDaTiFilterFirst=aDaTiFirst;
+ aDaTiFilterLast=aDaTiFirst;
+ aDaTiFilterFirst.SetTime(aTMin.GetTime());
+ aDaTiFilterLast.SetTime(aTMax.GetTime());
+ break;
+ case FLT_DATE_BETWEEN:
+ aDaTiFilterFirst=aDaTiFirst;
+ aDaTiFilterLast=aDaTiLast;
+ break;
+ }
+}
+
+
+void SvxRedlinTable::SetFilterDate(BOOL bFlag)
+{
+ bDate=bFlag;
+}
+
+void SvxRedlinTable::SetDateTimeMode(USHORT nMode)
+{
+ nDaTiMode=nMode;
+}
+
+void SvxRedlinTable::SetFirstDate(const Date& aDate)
+{
+ aDaTiFirst.SetDate(aDate.GetDate());
+}
+
+void SvxRedlinTable::SetLastDate(const Date& aDate)
+{
+ aDaTiLast.SetDate(aDate.GetDate());
+}
+
+void SvxRedlinTable::SetFirstTime(const Time& aTime)
+{
+ aDaTiFirst.SetTime(aTime.GetTime());
+}
+
+void SvxRedlinTable::SetLastTime(const Time& aTime)
+{
+ aDaTiLast.SetTime(aTime.GetTime());
+}
+
+void SvxRedlinTable::SetFilterAuthor(BOOL bFlag)
+{
+ bAuthor=bFlag;
+}
+
+void SvxRedlinTable::SetAuthor(const String &aString)
+{
+ aAuthor=aString;
+}
+
+void SvxRedlinTable::SetFilterComment(BOOL bFlag)
+{
+ bComment=bFlag;
+}
+
+void SvxRedlinTable::SetCommentParams( const SearchParam* pSearchPara )
+{
+ if(pSearchPara!=NULL)
+ {
+ if(pCommentSearcher!=NULL) delete pCommentSearcher;
+
+ pCommentSearcher=new SearchText(*pSearchPara, Application::GetAppInternational());
+ }
+}
+
+BOOL SvxRedlinTable::IsValidWriterEntry(const String& rString,RedlinData *pUserData)
+{
+ BOOL nTheFlag=TRUE;
+ String aString=rString.GetToken(WRITER_AUTHOR,'\t');
+ if(pUserData==NULL)
+ {
+ if(bAuthor)
+ {
+ if(aAuthor.CompareTo(aString)==COMPARE_EQUAL)
+ nTheFlag=TRUE;
+ else
+ nTheFlag=FALSE;
+ }
+ }
+ else
+ {
+ DateTime aDateTime=pUserData->aDateTime;
+ nTheFlag=IsValidEntry(&aString,&aDateTime);
+ }
+ return nTheFlag;
+}
+
+BOOL SvxRedlinTable::IsValidCalcEntry(const String& rString,RedlinData *pUserData)
+{
+ BOOL nTheFlag=TRUE;
+ String aString=rString.GetToken(CALC_AUTHOR,'\t');
+ if(pUserData==NULL)
+ {
+ if(bAuthor)
+ {
+ if(aAuthor.CompareTo(aString)==COMPARE_EQUAL)
+ nTheFlag=TRUE;
+ else
+ nTheFlag=FALSE;
+ }
+ }
+ else
+ {
+ DateTime aDateTime=pUserData->aDateTime;
+ nTheFlag=IsValidEntry(&aString,&aDateTime);
+ }
+ return nTheFlag;
+}
+
+BOOL SvxRedlinTable::IsValidEntry(const String* pAuthorStr,
+ const DateTime *pDateTime,const String* pCommentStr)
+{
+ BOOL nTheFlag=TRUE;
+ if(bAuthor)
+ {
+ if(aAuthor.CompareTo(*pAuthorStr)==COMPARE_EQUAL)
+ nTheFlag=TRUE;
+ else
+ nTheFlag=FALSE;
+ }
+ if(bDate && nTheFlag)
+ {
+ if(nDaTiMode!=FLT_DATE_NOTEQUAL)
+ {
+ nTheFlag=pDateTime->IsBetween(aDaTiFilterFirst,aDaTiFilterLast);
+ }
+ else
+ {
+ nTheFlag=!(pDateTime->IsBetween(aDaTiFilterFirst,aDaTiFilterLast));
+ }
+ }
+ if(bComment && nTheFlag)
+ {
+ xub_StrLen nStartPos = 0;
+ xub_StrLen nEndPos = pCommentStr->Len();
+
+ nTheFlag=pCommentSearcher->SearchFrwrd( *pCommentStr, &nStartPos, &nEndPos);
+ }
+ return nTheFlag;
+}
+
+BOOL SvxRedlinTable::IsValidEntry(const String* pAuthorStr,const DateTime *pDateTime)
+{
+ BOOL nTheFlag=TRUE;
+ if(bAuthor)
+ {
+ if(aAuthor.CompareTo(*pAuthorStr)==COMPARE_EQUAL)
+ nTheFlag=TRUE;
+ else
+ nTheFlag=FALSE;
+ }
+ if(bDate && nTheFlag)
+ {
+ if(nDaTiMode!=FLT_DATE_NOTEQUAL)
+ {
+ nTheFlag=pDateTime->IsBetween(aDaTiFilterFirst,aDaTiFilterLast);
+ }
+ else
+ {
+ nTheFlag=!(pDateTime->IsBetween(aDaTiFilterFirst,aDaTiFilterLast));
+ }
+ }
+ return nTheFlag;
+}
+
+BOOL SvxRedlinTable::IsValidComment(const String* pCommentStr)
+{
+ BOOL nTheFlag=TRUE;
+
+ if(bComment)
+ {
+ xub_StrLen nStartPos = 0;
+ xub_StrLen nEndPos = pCommentStr->Len();
+
+ nTheFlag=pCommentSearcher->SearchFrwrd( *pCommentStr, &nStartPos, &nEndPos);
+ }
+ return nTheFlag;
+}
+
+SvLBoxEntry* SvxRedlinTable::InsertEntry(const String& rStr,RedlinData *pUserData,
+ SvLBoxEntry* pParent,ULONG nPos)
+{
+ aEntryColor=GetTextColor();
+ if(pUserData!=NULL)
+ {
+ if(pUserData->bDisabled)
+ aEntryColor=Color(COL_GRAY);
+ }
+
+ XubString aStr= rStr;
+
+ XubString aFirstStr( aStr );
+ xub_StrLen nEnd = aFirstStr.Search( sal_Unicode( '\t' ) );
+ if( nEnd != STRING_NOTFOUND )
+ {
+ aFirstStr.Erase( nEnd );
+ aCurEntry = aStr;
+ aCurEntry.Erase( 0, ++nEnd );
+ }
+ else
+ aCurEntry.Erase();
+
+ return SvTreeListBox::InsertEntry( aFirstStr, pParent, FALSE, nPos, pUserData );
+
+}
+
+SvLBoxEntry* SvxRedlinTable::InsertEntry(const String& rStr,RedlinData *pUserData,const Color& aColor,
+ SvLBoxEntry* pParent,ULONG nPos)
+{
+ aEntryColor=aColor;
+
+ XubString aStr= rStr;
+
+ XubString aFirstStr( aStr );
+ xub_StrLen nEnd = aFirstStr.Search( sal_Unicode ( '\t' ) );
+ if( nEnd != STRING_NOTFOUND )
+ {
+ aFirstStr.Erase( nEnd );
+ aCurEntry = aStr;
+ aCurEntry.Erase( 0, ++nEnd );
+ }
+ else
+ aCurEntry.Erase();
+
+ return SvTreeListBox::InsertEntry( aFirstStr, pParent, FALSE, nPos, pUserData );
+}
+
+SvLBoxEntry* SvxRedlinTable::CreateEntry() const
+{
+ return new SvxRedlinEntry;
+}
+
+void SvxRedlinTable::InitEntry( SvLBoxEntry* pEntry, const XubString& rStr,
+ const Image& rColl, const Image& rExp )
+{
+ SvLBoxButton* pButton;
+ SvLBoxString* pString;
+ SvLBoxContextBmp* pContextBmp;
+
+ if( nTreeFlags & TREEFLAG_CHKBTN )
+ {
+ pButton= new SvLBoxButton( pEntry,0,pCheckButtonData );
+ pEntry->AddItem( pButton );
+ }
+
+ pContextBmp= new SvLBoxContextBmp( pEntry,0, rColl,rExp,
+ SVLISTENTRYFLAG_EXPANDED);
+ pEntry->AddItem( pContextBmp );
+
+ pString = new SvLBoxColorString( pEntry, 0, rStr ,aEntryColor);
+ pEntry->AddItem( pString );
+
+ XubString aToken;
+
+ xub_Unicode* pCurToken = (xub_Unicode*)aCurEntry.GetBuffer();
+ USHORT nCurTokenLen;
+ xub_Unicode* pNextToken = (xub_Unicode*)GetToken( pCurToken, nCurTokenLen );
+ USHORT nCount = TabCount(); nCount--;
+
+ for( USHORT nToken = 0; nToken < nCount; nToken++ )
+ {
+ if( pCurToken && nCurTokenLen )
+ // aToken.Assign( pCurToken, nCurTokenLen );
+ aToken = XubString( pCurToken, nCurTokenLen );
+ else
+ aToken.Erase();
+
+ SvLBoxColorString* pStr = new SvLBoxColorString( pEntry, 0, aToken ,aEntryColor);
+ pEntry->AddItem( pStr );
+
+ pCurToken = pNextToken;
+ if( pCurToken )
+ pNextToken = (xub_Unicode*)GetToken( pCurToken, nCurTokenLen );
+ else
+ nCurTokenLen = 0;
+ }
+}
+
+
+
+
+//============================================================================
+// class SvxTPView
+//----------------------------------------------------------------------------
+
+SvxTPView::SvxTPView( Window * pParent)
+ : TabPage( pParent, SVX_RES(SID_REDLIN_VIEW_PAGE)),
+ aViewData ( this, ResId( DG_VIEW) ),
+ PbAccept ( this, ResId(PB_ACCEPT ) ),
+ PbAcceptAll ( this, ResId(PB_ACCEPTALL ) ),
+ PbReject ( this, ResId(PB_REJECT ) ),
+ PbRejectAll ( this, ResId(PB_REJECTALL ) ),
+ PbUndo ( this, ResId(PB_UNDO ) ),
+ aTitle1 ( ResId( STR_TITLE1 ) ), // lokale Resource
+ aTitle2 ( ResId( STR_TITLE2 ) ),
+ aTitle3 ( ResId( STR_TITLE3 ) ),
+ aTitle4 ( ResId( STR_TITLE4 ) ),
+ aTitle5 ( ResId( STR_TITLE5 ) ),
+ aStrMyName ( ResId( STR_VIEW) )
+{
+ FreeResource();
+
+ aMinSize=GetSizePixel();
+
+ Link aLink=LINK( this, SvxTPView, PbClickHdl);
+
+ PbAccept.SetClickHdl(aLink);
+ PbAcceptAll.SetClickHdl(aLink);
+ PbReject.SetClickHdl(aLink);
+ PbRejectAll.SetClickHdl(aLink);
+ PbUndo.SetClickHdl(aLink);
+
+ long nSize=(aViewData.GetOutputSizePixel().Width())/5;
+ nDistance=PbAccept.GetSizePixel().Height()+2*MIN_DISTANCE;
+ aViewData.SetTabs(nStaticTabs);
+}
+
+String SvxTPView::GetMyName() const
+{
+ return aStrMyName;
+}
+
+void SvxTPView::Resize()
+{
+ Size aSize=GetOutputSizePixel();
+ Point aPos=aViewData.GetPosPixel();
+ aSize.Height()-=aPos.Y()+nDistance;
+ aSize.Width()-=2*aPos.X();
+
+ USHORT newY=aPos.Y()+aSize.Height()+MIN_DISTANCE;
+ aPos=PbAccept.GetPosPixel();
+ aPos.Y()=newY;
+ PbAccept.SetPosPixel(aPos);
+ aPos=PbAcceptAll.GetPosPixel();
+ aPos.Y()=newY;
+ PbAcceptAll.SetPosPixel(aPos);
+ aPos=PbReject.GetPosPixel();
+ aPos.Y()=newY;
+ PbReject.SetPosPixel(aPos);
+ aPos=PbRejectAll.GetPosPixel();
+ aPos.Y()=newY;
+ PbRejectAll.SetPosPixel(aPos);
+
+ if(PbUndo.IsVisible())
+ {
+ aPos=PbUndo.GetPosPixel();
+ aPos.Y()=newY;
+ PbUndo.SetPosPixel(aPos);
+ }
+ aViewData.SetSizePixel(aSize);
+}
+
+void SvxTPView::InsertWriterHeader()
+{
+ String aStrTab(sal_Unicode('\t'));
+ String aString(aTitle1);
+ aString+=aStrTab;
+ aString+=aTitle3;
+ aString+=aStrTab;
+ aString+=aTitle4;
+ aString+=aStrTab;
+ aString+=aTitle5;
+ aViewData.ClearHeader();
+ aViewData.InsertHeaderEntry(aString);
+}
+
+void SvxTPView::InsertCalcHeader()
+{
+ String aStrTab(sal_Unicode('\t'));
+ String aString(aTitle1);
+ aString+=aStrTab;
+ aString+=aTitle2;
+ aString+=aStrTab;
+ aString+=aTitle3;
+ aString+=aStrTab;
+ aString+=aTitle4;
+ aString+=aStrTab;
+ aString+=aTitle5;
+ aViewData.ClearHeader();
+ aViewData.InsertHeaderEntry(aString);
+}
+
+void SvxTPView::EnableAccept(BOOL nFlag)
+{
+ PbAccept.Enable(nFlag);
+}
+
+void SvxTPView::EnableAcceptAll(BOOL nFlag)
+{
+ PbAcceptAll.Enable(nFlag);
+}
+
+void SvxTPView::EnableReject(BOOL nFlag)
+{
+ PbReject.Enable(nFlag);
+}
+
+void SvxTPView::EnableRejectAll(BOOL nFlag)
+{
+ PbRejectAll.Enable(nFlag);
+}
+
+void SvxTPView::ShowUndo(BOOL nFlag)
+{
+ PbUndo.Show(nFlag);
+}
+
+void SvxTPView::EnableUndo(BOOL nFlag)
+{
+ PbUndo.Enable(nFlag);
+}
+
+Size SvxTPView::GetMinSizePixel()
+{
+ Size aSize=aMinSize;
+ if(PbUndo.IsVisible())
+ {
+ ULONG nSize=PbUndo.GetSizePixel().Width()
+ +PbUndo.GetPosPixel().X()
+ +PbAccept.GetPosPixel().X();
+
+ aSize.Width()=nSize;
+ }
+
+ return aSize;
+}
+
+
+SvxRedlinTable* SvxTPView::GetTableControl()
+{
+ return &aViewData;
+}
+
+IMPL_LINK( SvxTPView, PbClickHdl, PushButton*, pPushB )
+{
+ if(pPushB==&PbAccept)
+ {
+ AcceptClickLk.Call(this);
+ }
+ else if(pPushB==&PbAcceptAll)
+ {
+ AcceptAllClickLk.Call(this);
+ }
+ else if(pPushB==&PbReject)
+ {
+ RejectClickLk.Call(this);
+ }
+ else if(pPushB==&PbRejectAll)
+ {
+ RejectAllClickLk.Call(this);
+ }
+ else if(pPushB==&PbUndo)
+ {
+ UndoClickLk.Call(this);
+ }
+
+ return 0;
+}
+
+
+
+
+//============================================================================
+// class SvxTPFilter
+//----------------------------------------------------------------------------
+
+SvxTPFilter::SvxTPFilter( Window * pParent)
+ : TabPage( pParent, SVX_RES(SID_REDLIN_FILTER_PAGE)),
+ aCbDate ( this, ResId( CB_DATE ) ),
+ aLbDate ( this, ResId( LB_DATE ) ),
+ aDfDate ( this, ResId( DF_DATE ) ),
+ aTfDate ( this, ResId( TF_DATE ) ),
+ aIbClock ( this, ResId( IB_CLOCK ) ),
+ aFtDate2 ( this, ResId( FT_DATE2 ) ),
+ aDfDate2 ( this, ResId( DF_DATE2 ) ),
+ aTfDate2 ( this, ResId( TF_DATE2 ) ),
+ aIbClock2 ( this, ResId( IB_CLOCK2) ),
+ aCbAuthor ( this, ResId( CB_AUTOR ) ),
+ aLbAuthor ( this, ResId( LB_AUTOR ) ),
+ aCbRange ( this, ResId( CB_RANGE ) ),
+ aEdRange ( this, ResId( ED_RANGE ) ),
+ aBtnRange ( this, ResId( BTN_REF ) ),
+ aLbAction ( this, ResId( LB_ACTION ) ),
+ aGbFilter ( this, ResId( GB_FILTER ) ),
+ aCbComment ( this, ResId( CB_COMMENT) ),
+ aEdComment ( this, ResId( ED_COMMENT) ),
+ aStrMyName ( ResId( STR_FILTER) ),
+ aActionStr ( ResId( STR_ACTION) ),
+ bModified (FALSE),
+ pRedlinTable(NULL)
+{
+ FreeResource();
+ aRangeStr=aCbRange.GetText();
+ aLbDate.SelectEntryPos(0);
+ aLbDate.SetSelectHdl( LINK( this, SvxTPFilter, SelDateHdl ) );
+ aIbClock.SetClickHdl( LINK( this, SvxTPFilter, TimeHdl) );
+ aIbClock2.SetClickHdl( LINK( this, SvxTPFilter,TimeHdl) );
+ aBtnRange.SetClickHdl( LINK( this, SvxTPFilter, RefHandle));
+
+ Link aLink=LINK( this, SvxTPFilter, RowEnableHdl) ;
+ aCbDate.SetClickHdl(aLink);
+ aCbAuthor.SetClickHdl(aLink);
+ aCbRange.SetClickHdl(aLink);
+ aCbComment.SetClickHdl(aLink);
+
+ Link a2Link=LINK( this, SvxTPFilter, ModifyDate);
+ aDfDate.SetModifyHdl(a2Link);
+ aTfDate.SetModifyHdl(a2Link);
+ aDfDate2.SetModifyHdl(a2Link);
+ aTfDate2.SetModifyHdl(a2Link);
+
+ Link a3Link=LINK( this, SvxTPFilter, ModifyHdl);
+ aEdRange.SetModifyHdl(a3Link);
+ aEdComment.SetModifyHdl(a3Link);
+ aLbAction.SetSelectHdl(a3Link);
+ aLbAuthor.SetSelectHdl(a3Link);
+
+ RowEnableHdl(&aCbDate);
+ RowEnableHdl(&aCbAuthor);
+ RowEnableHdl(&aCbRange);
+ RowEnableHdl(&aCbComment);
+
+ Date aDate;
+ Time aTime;
+ aDfDate.SetDate(aDate);
+ aTfDate.SetTime(aTime);
+ aDfDate2.SetDate(aDate);
+ aTfDate2.SetTime(aTime);
+ HideRange();
+ ShowAction();
+ bModified=FALSE;
+}
+
+void SvxTPFilter::SetRedlinTable(SvxRedlinTable* pTable)
+{
+ pRedlinTable=pTable;
+}
+
+String SvxTPFilter::GetMyName() const
+{
+ return aStrMyName;
+}
+
+void SvxTPFilter::HideGroupBox( BOOL bFlag)
+{
+ aGbFilter.Show(!bFlag);
+}
+
+void SvxTPFilter::DisableRange(BOOL bFlag)
+{
+ if(bFlag)
+ {
+ aCbRange.Disable();
+ aEdRange.Disable();
+ aBtnRange.Disable();
+ }
+ else
+ {
+ aCbRange.Enable();
+ aEdRange.Enable();
+ aBtnRange.Enable();
+ }
+}
+
+void SvxTPFilter::ShowDateFields(USHORT nKind)
+{
+ String aEmpty;
+ switch(nKind)
+ {
+ case FLT_DATE_BEFORE:
+ EnableDateLine1(TRUE);
+ EnableDateLine2(FALSE);
+ break;
+ case FLT_DATE_SINCE:
+ EnableDateLine1(TRUE);
+ EnableDateLine2(FALSE);
+ break;
+ case FLT_DATE_EQUAL:
+ EnableDateLine1(TRUE);
+ aTfDate.Disable();
+ aTfDate.SetText(aEmpty);
+ EnableDateLine2(FALSE);
+ break;
+ case FLT_DATE_NOTEQUAL:
+ EnableDateLine1(TRUE);
+ aTfDate.Disable();
+ aTfDate.SetText(aEmpty);
+ EnableDateLine2(FALSE);
+ break;
+ case FLT_DATE_BETWEEN:
+ EnableDateLine1(TRUE);
+ EnableDateLine2(TRUE);
+ break;
+ case FLT_DATE_SAVE:
+ EnableDateLine1(FALSE);
+ EnableDateLine2(FALSE);
+ break;
+ }
+}
+
+void SvxTPFilter::EnableDateLine1(BOOL bFlag)
+{
+ if(bFlag && aCbDate.IsChecked())
+ {
+ aDfDate.Enable();
+ aTfDate.Enable();
+ aIbClock.Enable();
+ }
+ else
+ {
+ aDfDate.Disable();
+ aTfDate.Disable();
+ aIbClock.Disable();
+ }
+}
+void SvxTPFilter::EnableDateLine2(BOOL bFlag)
+{
+ String aEmpty;
+ if(bFlag && aCbDate.IsChecked())
+ {
+ aFtDate2.Enable();
+ aDfDate2.Enable();
+ aTfDate2.Enable();
+ aIbClock2.Enable();
+ }
+ else
+ {
+ aFtDate2.Disable();
+ aDfDate2.Disable();
+ aDfDate2.SetText(aEmpty);
+ aTfDate2.Disable();
+ aTfDate2.SetText(aEmpty);
+ aIbClock2.Disable();
+ }
+}
+
+Date SvxTPFilter::GetFirstDate() const
+{
+ return aDfDate.GetDate();
+}
+
+void SvxTPFilter::SetFirstDate(const Date &aDate)
+{
+ aDfDate.SetDate(aDate);
+}
+
+Time SvxTPFilter::GetFirstTime() const
+{
+ return aTfDate.GetTime();
+}
+
+void SvxTPFilter::SetFirstTime(const Time &aTime)
+{
+ aTfDate.SetTime(aTime);
+}
+
+
+Date SvxTPFilter::GetLastDate() const
+{
+ return aDfDate2.GetDate();
+}
+
+void SvxTPFilter::SetLastDate(const Date &aDate)
+{
+ aDfDate2.SetDate(aDate);
+}
+
+Time SvxTPFilter::GetLastTime() const
+{
+ return aTfDate2.GetTime();
+}
+
+void SvxTPFilter::SetLastTime(const Time &aTime)
+{
+ aTfDate2.SetTime(aTime);
+}
+
+void SvxTPFilter::SetDateMode(USHORT nMode)
+{
+ aLbDate.SelectEntryPos(nMode);
+ SelDateHdl(&aLbDate);
+}
+
+USHORT SvxTPFilter::GetDateMode()
+{
+ return (USHORT) aLbDate.GetSelectEntryPos();
+}
+void SvxTPFilter::ClearAuthors()
+{
+ aLbAuthor.Clear();
+}
+
+void SvxTPFilter::InsertAuthor( const String& rString, USHORT nPos)
+{
+ aLbAuthor.InsertEntry(rString,nPos);
+}
+
+String SvxTPFilter::GetSelectedAuthor() const
+{
+ return aLbAuthor.GetSelectEntry();
+}
+
+USHORT SvxTPFilter::GetSelectedAuthorPos()
+{
+ return (USHORT) aLbAuthor.GetSelectEntryPos();
+}
+
+void SvxTPFilter::SelectedAuthorPos(USHORT nPos)
+{
+ aLbAuthor.SelectEntryPos(nPos);
+}
+
+USHORT SvxTPFilter::SelectAuthor(const String& aString)
+{
+ aLbAuthor.SelectEntry(aString);
+ return aLbAuthor.GetSelectEntryPos();
+}
+
+void SvxTPFilter::SetRange(const String& rString)
+{
+ aEdRange.SetText(rString);
+}
+
+String SvxTPFilter::GetRange() const
+{
+ return aEdRange.GetText();
+}
+
+void SvxTPFilter::SetFocusToRange()
+{
+ aEdRange.GrabFocus();
+}
+
+void SvxTPFilter::HideRange(BOOL bHide)
+{
+ if(bHide)
+ {
+ aCbRange.Hide();
+ aEdRange.Hide();
+ aBtnRange.Hide();
+ }
+ else
+ {
+ ShowAction(FALSE);
+ aCbRange.SetText(aRangeStr);
+ aCbRange.Show();
+ aEdRange.Show();
+ aBtnRange.Show();
+ }
+}
+
+void SvxTPFilter::HideClocks(BOOL bHide)
+{
+ if(bHide)
+ {
+ aIbClock. Hide();
+ aIbClock2.Hide();
+ }
+ else
+ {
+ aIbClock. Show();
+ aIbClock2.Show();
+ }
+}
+
+void SvxTPFilter::SetComment(const String &rComment)
+{
+ aEdComment.SetText(rComment);
+}
+String SvxTPFilter::GetComment()const
+{
+ return aEdComment.GetText();
+}
+
+BOOL SvxTPFilter::IsDate()
+{
+ return aCbDate.IsChecked();
+}
+
+BOOL SvxTPFilter::IsAuthor()
+{
+ return aCbAuthor.IsChecked();
+}
+
+BOOL SvxTPFilter::IsRange()
+{
+ return aCbRange.IsChecked();
+}
+BOOL SvxTPFilter::IsAction()
+{
+ return aCbRange.IsChecked();
+}
+
+BOOL SvxTPFilter::IsComment()
+{
+ return aCbComment.IsChecked();
+}
+
+void SvxTPFilter::CheckDate(BOOL bFlag)
+{
+ aCbDate.Check(bFlag);
+ RowEnableHdl(&aCbDate);
+ bModified=FALSE;
+}
+
+void SvxTPFilter::CheckAuthor(BOOL bFlag)
+{
+ aCbAuthor.Check(bFlag);
+ RowEnableHdl(&aCbAuthor);
+ bModified=FALSE;
+}
+
+void SvxTPFilter::CheckRange(BOOL bFlag)
+{
+ aCbRange.Check(bFlag);
+ RowEnableHdl(&aCbRange);
+ bModified=FALSE;
+}
+
+void SvxTPFilter::CheckAction(BOOL bFlag)
+{
+ aCbRange.Check(bFlag);
+ RowEnableHdl(&aCbRange);
+ bModified=FALSE;
+}
+
+void SvxTPFilter::CheckComment(BOOL bFlag)
+{
+ aCbComment.Check(bFlag);
+ RowEnableHdl(&aCbComment);
+ bModified=FALSE;
+}
+
+void SvxTPFilter::ShowAction(BOOL bShow)
+{
+ if(!bShow)
+ {
+ aCbRange.Hide();
+ aLbAction.Hide();
+ aCbRange.SetHelpId(HID_REDLINING_FILTER_CB_RANGE);
+ }
+ else
+ {
+ HideRange();
+ aCbRange.SetText(aActionStr);
+ aCbRange.SetHelpId(HID_REDLINING_FILTER_CB_ACTION);
+ aCbRange.Show();
+ aLbAction.Show();
+
+ }
+}
+
+ListBox* SvxTPFilter::GetLbAction()
+{
+ return &aLbAction;
+}
+
+IMPL_LINK( SvxTPFilter, SelDateHdl, ListBox*, pLb )
+{
+ ShowDateFields((USHORT)aLbDate.GetSelectEntryPos());
+ ModifyHdl(pLb);
+ return 0;
+}
+
+IMPL_LINK( SvxTPFilter, RowEnableHdl, CheckBox*, pCB )
+{
+ if(pCB==&aCbDate)
+ {
+ aLbDate.Enable(aCbDate.IsChecked());
+ aLbDate.Invalidate();
+ EnableDateLine1(FALSE);
+ EnableDateLine2(FALSE);
+ if(aCbDate.IsChecked()) SelDateHdl(&aLbDate);
+ }
+ else if(pCB==&aCbAuthor)
+ {
+ aLbAuthor.Enable(aCbAuthor.IsChecked());
+ aLbAuthor.Invalidate();
+ }
+ else if(pCB==&aCbRange)
+ {
+ aLbAction.Enable(aCbRange.IsChecked());
+ aLbAction.Invalidate();
+ aEdRange.Enable(aCbRange.IsChecked());
+ aBtnRange.Enable(aCbRange.IsChecked());
+ }
+ else if(pCB==&aCbComment)
+ {
+ aEdComment.Enable(aCbComment.IsChecked());
+ aEdComment.Invalidate();
+ }
+
+ ModifyHdl(pCB);
+ return 0;
+}
+
+IMPL_LINK( SvxTPFilter, TimeHdl, ImageButton*,pIB )
+{
+ Date aDate;
+ Time aTime;
+ if(pIB==&aIbClock)
+ {
+ aDfDate.SetDate(aDate);
+ aTfDate.SetTime(aTime);
+ }
+ else if(pIB==&aIbClock2)
+ {
+ aDfDate2.SetDate(aDate);
+ aTfDate2.SetTime(aTime);
+ }
+ ModifyHdl(&aDfDate);
+ return 0;
+}
+
+IMPL_LINK( SvxTPFilter, ModifyHdl, void*, pCtr)
+{
+ if(pCtr!=NULL)
+ {
+ if(pCtr==&aCbDate || pCtr==&aLbDate ||
+ pCtr==&aDfDate || pCtr==&aTfDate ||
+ pCtr==&aIbClock || pCtr==&aFtDate2||
+ pCtr==&aDfDate2 || pCtr==&aTfDate2||
+ pCtr==&aIbClock2)
+ {
+ aModifyDateLink.Call(this);
+ }
+ else if(pCtr==&aCbAuthor || pCtr==&aLbAuthor)
+ {
+ aModifyAuthorLink.Call(this);
+ }
+ else if(pCtr==&aCbRange || pCtr==&aEdRange ||
+ pCtr==&aBtnRange )
+ {
+ aModifyRefLink.Call(this);
+ }
+ else if(pCtr==&aCbComment || pCtr==&aEdComment)
+ {
+ aModifyComLink.Call(this);
+ }
+
+ bModified=TRUE;
+ aModifyLink.Call(this);
+ }
+ return 0;
+}
+
+void SvxTPFilter::DeactivatePage()
+{
+ if(bModified)
+ {
+ if(pRedlinTable!=NULL)
+ {
+ pRedlinTable->SetFilterDate(IsDate());
+ pRedlinTable->SetDateTimeMode(GetDateMode());
+ pRedlinTable->SetFirstDate(aDfDate.GetDate());
+ pRedlinTable->SetLastDate(aDfDate2.GetDate());
+ pRedlinTable->SetFirstTime(aTfDate.GetTime());
+ pRedlinTable->SetLastTime(aTfDate2.GetTime());
+ pRedlinTable->SetFilterAuthor(IsAuthor());
+ pRedlinTable->SetAuthor(GetSelectedAuthor());
+
+ pRedlinTable->SetFilterComment(IsComment());
+
+ SearchParam aSearchParam( aEdComment.GetText(),
+ SearchParam::SRCH_REGEXP,FALSE,FALSE,FALSE );
+
+ pRedlinTable->SetCommentParams(&aSearchParam);
+
+ pRedlinTable->UpdateFilterTest();
+ }
+
+ aReadyLink.Call(this);
+ }
+ bModified=FALSE;
+ TabPage::DeactivatePage();
+}
+
+void SvxTPFilter::Enable( BOOL bEnable, BOOL bChild)
+{
+ TabPage::Enable(bEnable,bChild);
+ if(aCbDate.IsEnabled())
+ {
+ RowEnableHdl(&aCbDate);
+ RowEnableHdl(&aCbAuthor);
+ RowEnableHdl(&aCbRange);
+ RowEnableHdl(&aCbComment);
+ }
+}
+void SvxTPFilter::Disable( BOOL bChild)
+{
+ Enable( FALSE, bChild );
+}
+
+IMPL_LINK( SvxTPFilter, ModifyDate, void*,pTF)
+{
+
+ Date aDate;
+ Time aTime(0);
+ if(&aDfDate==pTF)
+ {
+ if(aDfDate.GetText().Len()==0)
+ aDfDate.SetDate(aDate);
+
+ if(pRedlinTable!=NULL)
+ pRedlinTable->SetFirstDate(aDfDate.GetDate());
+ }
+ else if(&aDfDate2==pTF)
+ {
+ if(aDfDate2.GetText().Len()==0)
+ aDfDate2.SetDate(aDate);
+
+ if(pRedlinTable!=NULL)
+ pRedlinTable->SetLastDate(aDfDate2.GetDate());
+ }
+ else if(&aTfDate==pTF)
+ {
+ if(aTfDate.GetText().Len()==0)
+ aTfDate.SetTime(aTime);
+
+ if(pRedlinTable!=NULL)
+ pRedlinTable->SetFirstTime(aTfDate.GetTime());
+ }
+ else if(&aTfDate2==pTF)
+ {
+ if(aTfDate2.GetText().Len()==0)
+ aTfDate2.SetTime(aTime);
+
+ if(pRedlinTable!=NULL)
+ pRedlinTable->SetLastTime(aTfDate2.GetTime());
+
+ }
+ ModifyHdl(&aDfDate);
+ return 0;
+}
+
+IMPL_LINK( SvxTPFilter, RefHandle, PushButton*, pRef )
+{
+ if(pRef!=NULL)
+ {
+ aRefLink.Call(this);
+ }
+ return 0;
+}
+
+static Size gDiffSize;
+//============================================================================
+// class SvxAcceptChgCtr
+//----------------------------------------------------------------------------
+
+SvxAcceptChgCtr::SvxAcceptChgCtr( Window* pParent, WinBits nWinStyle)
+ : Control(pParent,nWinStyle |WB_DIALOGCONTROL),
+ aTCAccept(this,WB_TABSTOP |WB_DIALOGCONTROL)
+{
+ pTPFilter=new SvxTPFilter(&aTCAccept);
+ pTPView=new SvxTPView(&aTCAccept);
+ aMinSize=pTPView->GetMinSizePixel();
+
+ aTCAccept.InsertPage( TP_VIEW, pTPView->GetMyName());
+ aTCAccept.InsertPage( TP_FILTER, pTPFilter->GetMyName());
+ aTCAccept.SetTabPage( TP_VIEW, pTPView);
+ aTCAccept.SetTabPage( TP_FILTER, pTPFilter);
+ aTCAccept.SetHelpId(HID_REDLINING_TABCONTROL);
+
+ aTCAccept.SetTabPageSizePixel(aMinSize);
+ Size aSize=aTCAccept.GetSizePixel();
+
+ gDiffSize.Height()=aSize.Height()-aMinSize.Height();
+ gDiffSize.Width()=aSize.Width()-aMinSize.Width();
+
+
+ pTPFilter->SetRedlinTable(GetViewTable());
+
+ aTCAccept.Show();
+ ShowViewPage();
+}
+
+SvxAcceptChgCtr::SvxAcceptChgCtr( Window* pParent, const ResId& rResId )
+ : Control(pParent,rResId ),
+ aTCAccept(this,WB_TABSTOP |WB_DIALOGCONTROL)
+{
+ pTPFilter=new SvxTPFilter(&aTCAccept);
+ pTPView=new SvxTPView(&aTCAccept);
+ aMinSize=pTPView->GetMinSizePixel();
+
+ aTCAccept.InsertPage( TP_VIEW, pTPView->GetMyName());
+ aTCAccept.InsertPage( TP_FILTER, pTPFilter->GetMyName());
+ aTCAccept.SetTabPage( TP_VIEW, pTPView);
+ aTCAccept.SetTabPage( TP_FILTER, pTPFilter);
+ aTCAccept.SetHelpId(HID_REDLINING_TABCONTROL);
+
+ aTCAccept.SetTabPageSizePixel(aMinSize);
+ Size aSize=aTCAccept.GetSizePixel();
+
+ gDiffSize.Height()=aSize.Height()-aMinSize.Height();
+ gDiffSize.Width()=aSize.Width()-aMinSize.Width();
+
+
+ pTPFilter->SetRedlinTable(GetViewTable());
+ WinBits nWinStyle=GetStyle()|WB_DIALOGCONTROL;
+ SetStyle(nWinStyle);
+
+ aTCAccept.Show();
+ ShowViewPage();
+ Resize();
+}
+
+SvxAcceptChgCtr::~SvxAcceptChgCtr()
+{
+ delete pTPView;
+ delete pTPFilter;
+}
+
+void SvxAcceptChgCtr::Resize()
+{
+ aMinSize=pTPView->GetMinSizePixel();
+ Size aSize=GetOutputSizePixel();
+ BOOL bFlag=FALSE;
+
+ if(aMinSize.Height()>aSize.Height())
+ {
+ aSize.Height()=aMinSize.Height();
+ bFlag=TRUE;
+ }
+ if(aMinSize.Width()>aSize.Width())
+ {
+ aSize.Width()=aMinSize.Width();
+ bFlag=TRUE;
+ }
+
+ if(bFlag)
+ {
+ SetOutputSizePixel(aSize);
+ aMinSizeLink.Call(this);
+ }
+
+ aSize.Height()-=2;
+ aSize.Width()-=2;
+ aTCAccept.SetSizePixel(aSize);
+}
+
+Size SvxAcceptChgCtr::GetMinSizePixel() const
+{
+ Size aSize=pTPView->GetMinSizePixel();
+ aSize.Height()+=gDiffSize.Height();
+ aSize.Width()+=gDiffSize.Width();
+ return aSize;
+}
+
+void SvxAcceptChgCtr::ShowFilterPage()
+{
+ aTCAccept.SetCurPageId(TP_FILTER);
+}
+
+void SvxAcceptChgCtr::ShowViewPage()
+{
+ aTCAccept.SetCurPageId(TP_VIEW);
+}
+
+BOOL SvxAcceptChgCtr::IsFilterPageVisible()
+{
+ return (aTCAccept.GetCurPageId()==TP_FILTER);
+}
+
+BOOL SvxAcceptChgCtr::IsViewPageVisible()
+{
+ return (aTCAccept.GetCurPageId()==TP_VIEW);
+}
+
+SvxTPFilter* SvxAcceptChgCtr::GetFilterPage()
+{
+ return pTPFilter;
+}
+
+SvxTPView* SvxAcceptChgCtr::GetViewPage()
+{
+ return pTPView;
+}
+
+SvxRedlinTable* SvxAcceptChgCtr::GetViewTable()
+{
+ if(pTPView!=NULL)
+ {
+ return pTPView->GetTableControl();
+ }
+ else
+ {
+ return NULL;
+ }
+}
+
+
diff --git a/svx/source/dialog/ctredlin.hrc b/svx/source/dialog/ctredlin.hrc
new file mode 100644
index 000000000000..e6364f7dc162
--- /dev/null
+++ b/svx/source/dialog/ctredlin.hrc
@@ -0,0 +1,104 @@
+/*************************************************************************
+ *
+ * $RCSfile: ctredlin.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:07 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include "svxids.hrc" // ->SID_REDLIN_FILTER_PAGE
+ // ->SID_REDLIN_VIEW_PAGE
+
+#define TP_FILTER 11
+#define TP_VIEW 12
+
+#define LB_DATE 1
+#define DF_DATE 2
+#define TF_DATE 3
+#define LB_AUTOR 4
+#define ED_RANGE 5
+#define IB_CLOCK 6
+#define BTN_REF 7
+#define CB_DATE 8
+#define CB_AUTOR 9
+#define CB_RANGE 10
+#define GB_FILTER 11
+#define FT_DATE2 12
+#define DF_DATE2 13
+#define TF_DATE2 14
+#define IB_CLOCK2 15
+#define STR_FILTER 16
+#define STR_ACTION 17
+#define LB_ACTION 18
+#define CB_COMMENT 19
+#define ED_COMMENT 20
+
+#define HG_VIEW 1
+#define DG_VIEW 2
+#define PB_ACCEPT 3
+#define PB_ACCEPTALL 4
+#define PB_REJECT 5
+#define PB_REJECTALL 6
+#define PB_UNDO 7
+#define STR_VIEW 8
+
+#define STR_TITLE1 1
+#define STR_TITLE2 2
+#define STR_TITLE3 3
+#define STR_TITLE4 4
+#define STR_TITLE5 5
+//
+
diff --git a/svx/source/dialog/ctredlin.src b/svx/source/dialog/ctredlin.src
new file mode 100644
index 000000000000..787dd64ef6cd
--- /dev/null
+++ b/svx/source/dialog/ctredlin.src
@@ -0,0 +1,1005 @@
+/*************************************************************************
+ *
+ * $RCSfile: ctredlin.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:07 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+ //===========================================================================
+ // TabPages fuer Redlining
+ //
+ // (C) 1998 StarDivision GmbH, Hamburg, Germany
+ //
+ // $Workfile: ctredlin.src $
+ // $Author: hr $
+ // $Date: 2000-09-18 17:01:07 $
+ // $Revision: 1.1.1.1 $
+ // $Logfile: T:/svx/source/dialog/ctredlin.srv $
+ //---------------------------------------------------------------------------
+
+#include "ctredlin.hrc"
+#include "helpid.hrc"
+#ifndef STD_MASKCOLOR
+#define STD_MASKCOLOR Color { Red=0xC000; Green=0xC000; Blue=0xC000;}
+#endif
+TabPage SID_REDLIN_FILTER_PAGE
+{
+ String STR_FILTER
+ {
+ Text = "Filter" ;
+ Text [ ENGLISH ] = "Filter" ;
+ Text [ portuguese ] = "Filtro" ;
+ Text [ english_us ] = "Filter" ;
+ Text [ portuguese_brazilian ] = "Filter" ;
+ Text [ swedish ] = "Filter" ;
+ Text [ danish ] = "Filter" ;
+ Text [ italian ] = "Filtro" ;
+ Text [ spanish ] = "Filtro" ;
+ Text [ french ] = "Filtre" ;
+ Text [ dutch ] = "Filter" ;
+ Text[ chinese_simplified ] = "ɸѡ";
+ Text[ russian ] = "";
+ Text[ polish ] = "Filtr";
+ Text[ japanese ] = "̨";
+ Text[ chinese_traditional ] = "z";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "Filtre";
+ Text[ language_user1 ] = " ";
+ };
+ HelpId = HID_REDLINING_FILTER_PAGE ;
+ OutputSize = TRUE ;
+ SVLook = TRUE ;
+ Size = MAP_APPFONT ( 264 , 126 ) ;
+ Hide = TRUE ;
+ CheckBox CB_DATE
+ {
+ Pos = MAP_APPFONT ( 12 , 11 ) ;
+ Size = MAP_APPFONT ( 50 , 10 ) ;
+ Text = "~Datum" ;
+ Text [ ENGLISH ] = "~Date" ;
+ TabStop = TRUE ;
+ HelpId = HID_REDLINING_FILTER_CB_DATE ;
+ Text [ english_us ] = "~Date" ;
+ Text [ portuguese_brazilian ] = "Datum" ;
+ Text [ swedish ] = "~Datum" ;
+ Text [ danish ] = "~Dato" ;
+ Text [ italian ] = "Data" ;
+ Text [ spanish ] = "~Fecha" ;
+ Text [ french ] = "Date" ;
+ Text [ dutch ] = "~Datum" ;
+ Text [ portuguese ] = "~Data" ;
+ Text[ chinese_simplified ] = "(~D)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Data";
+ Text[ japanese ] = "t(~D)";
+ Text[ chinese_traditional ] = "(~D)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "¥(~D)";
+ Text[ turkish ] = "~Tarih";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_DATE
+ {
+ HelpId = HID_REDLINING_FILTER_LB_DATE ;
+ Border = TRUE ;
+ Disable = TRUE ;
+ Pos = MAP_APPFONT ( 63 , 9 ) ;
+ Size = MAP_APPFONT ( 78 , 99 ) ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+ StringList =
+ {
+ < "vor dem" ; Default ; > ;
+ < "seit dem" ; Default ; > ;
+ < "gleich dem" ; Default ; > ;
+ < "ungleich dem" ; Default ; > ;
+ < "zwischen dem" ; Default ; > ;
+ < "seit dem Speichern" ; Default ; > ;
+ };
+ StringList [ ENGLISH ] =
+ {
+ < "vor dem" ; Default ; > ;
+ < "seit dem" ; Default ; > ;
+ < "gleich dem" ; Default ; > ;
+ < "ungleich dem" ; Default ; > ;
+ < "zwischen dem" ; Default ; > ;
+ < "seit dem Speichern" ; Default ; > ;
+ };
+ stringlist [ portuguese ] =
+ {
+ < "antes de" ; Default ; > ;
+ < "desde" ; Default ; > ;
+ < "igual a" ; Default ; > ;
+ < "desigual a" ; Default ; > ;
+ < "entre" ; Default ; > ;
+ < "desde o Guardar" ; Default ; > ;
+ };
+ stringlist [ english_us ] =
+ {
+ < "earlier than" ; Default ; > ;
+ < "since" ; Default ; > ;
+ < "equal to " ; Default ; > ;
+ < "not equal to" ; Default ; > ;
+ < "between" ; Default ; > ;
+ < "since saving" ; Default ; > ;
+ };
+ stringlist [ portuguese_brazilian ] =
+ {
+ < "vor dem" ; Default ; > ;
+ < "seit dem" ; Default ; > ;
+ < "gleich dem" ; Default ; > ;
+ < "ungleich dem" ; Default ; > ;
+ < "zwischen dem" ; Default ; > ;
+ < "seit dem Speichern" ; Default ; > ;
+ };
+ stringlist [ swedish ] =
+ {
+ < "innan den" ; Default ; > ;
+ < "sedan" ; Default ; > ;
+ < "lika med" ; Default ; > ;
+ < "inte lika med" ; Default ; > ;
+ < "mellan" ; Default ; > ;
+ < "sedan sparandet" ; Default ; > ;
+ };
+ stringlist [ danish ] =
+ {
+ < "fr den" ; Default ; > ;
+ < "siden den" ; Default ; > ;
+ < "lig med den" ; Default ; > ;
+ < "forskellig fra den" ; Default ; > ;
+ < "mellem den" ; Default ; > ;
+ < "siden gemning" ; Default ; > ;
+ };
+ stringlist [ italian ] =
+ {
+ < "prima del" ; Default ; > ;
+ < "dal" ; Default ; > ;
+ < "uguale a" ; Default ; > ;
+ < "non uguale a" ; Default ; > ;
+ < "tra il" ; Default ; > ;
+ < "dal salvataggio" ; Default ; > ;
+ };
+ stringlist [ spanish ] =
+ {
+ < "antes de" ; Default ; > ;
+ < "desde el" ; Default ; > ;
+ < "igual a" ; Default ; > ;
+ < "desigual a" ; Default ; > ;
+ < "entre" ; Default ; > ;
+ < "desde el 'Guardado'" ; Default ; > ;
+ };
+ stringlist [ french ] =
+ {
+ < "avant le" ; Default ; > ;
+ < "depuis le" ; Default ; > ;
+ < "gal " ; Default ; > ;
+ < "diffrent de" ; Default ; > ;
+ < "entre le" ; Default ; > ;
+ < "depuis l'enregistrement" ; Default ; > ;
+ };
+ stringlist [ dutch ] =
+ {
+ < "voor de" ; Default ; > ;
+ < "na de" ; Default ; > ;
+ < "dezelfde als" ; Default ; > ;
+ < "niet dezelfde als" ; Default ; > ;
+ < "tussen de" ; Default ; > ;
+ < "na het opslaan" ; Default ; > ;
+ };
+ StringList [ chinese_simplified ] =
+ {
+ < "" ; Default ; > ;
+ < "" ; Default ; > ;
+ < "ͬ" ; Default ; > ;
+ < "" ; Default ; > ;
+ < "м" ; Default ; > ;
+ < "ڴ̺" ; Default ; > ;
+ };
+ StringList [ russian ] =
+ {
+ < "" ; Default ; > ;
+ < " " ; Default ; > ;
+ < "" ; Default ; > ;
+ < "" ; Default ; > ;
+ < "" ; Default ; > ;
+ < " " ; Default ; > ;
+ };
+ StringList [ polish ] =
+ {
+ < "przed" ; Default ; > ;
+ < "od" ; Default ; > ;
+ < "rwny" ; Default ; > ;
+ < "nierwny" ; Default ; > ;
+ < "midzy" ; Default ; > ;
+ < "od zapisu" ; Default ; > ;
+ };
+ StringList [ japanese ] =
+ {
+ < "ȑO" ; Default ; > ;
+ < "ȗ" ; Default ; > ;
+ < "" ; Default ; > ;
+ < "Ȃ" ; Default ; > ;
+ < "" ; Default ; > ;
+ < "ۑȗ" ; Default ; > ;
+ };
+ StringList [ chinese_traditional ] =
+ {
+ < "" ; Default ; > ;
+ < "q" ; Default ; > ;
+ < "P_" ; Default ; > ;
+ < "" ; Default ; > ;
+ < "" ; Default ; > ;
+ < "bxs" ; Default ; > ;
+ };
+ StringList [ arabic ] =
+ {
+ < "" ; Default ; > ;
+ < "" ; Default ; > ;
+ < "" ; Default ; > ;
+ < "" ; Default ; > ;
+ < "" ; Default ; > ;
+ < " " ; Default ; > ;
+ };
+ StringList [ greek ] =
+ {
+ < " " ; Default ; > ;
+ < " " ; Default ; > ;
+ < " " ; Default ; > ;
+ < " " ; Default ; > ;
+ < "" ; Default ; > ;
+ < " " ; Default ; > ;
+ };
+ StringList [ korean ] =
+ {
+ < "" ; Default ; > ;
+ < "" ; Default ; > ;
+ < "() " ; Default ; > ;
+ < "() " ; Default ; > ;
+ < " " ; Default ; > ;
+ < " " ; Default ; > ;
+ };
+ StringList [ turkish ] =
+ {
+ < "bu tarihten nce" ; Default ; > ;
+ < "ilk tarih" ; Default ; > ;
+ < "eittir" ; Default ; > ;
+ < "eit deildir" ; Default ; > ;
+ < "Aralk" ; Default ; > ;
+ < "Kayttan itibaren" ; Default ; > ;
+ };
+ StringList [ language_user1 ] =
+ {
+ < " " ; Default ; > ;
+ < " " ; Default ; > ;
+ < " " ; Default ; > ;
+ < " " ; Default ; > ;
+ < " " ; Default ; > ;
+ < " " ; Default ; > ;
+ };
+ };
+ DateField DF_DATE
+ {
+ HelpId = HID_REDLINING_FILTER_DF_DATE ;
+ Disable = TRUE ;
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 144 , 9 ) ;
+ Size = MAP_APPFONT ( 55 , 12 ) ;
+ TabStop = TRUE ;
+ Spin = TRUE ;
+ Repeat = TRUE ;
+ Intnl = International
+ {
+ DateCentury = TRUE ;
+ LongDateDayLeadingZero = TRUE ;
+ };
+ Minimum = Date
+ {
+ Year = 1985 ;
+ Month = 12 ;
+ Day = 31 ;
+ };
+ Maximum = Date
+ {
+ Year = 2050 ;
+ Month = 12 ;
+ Day = 31 ;
+ };
+ };
+ TimeField TF_DATE
+ {
+ HelpId = HID_REDLINING_FILTER_TF_DATE ;
+ Disable = TRUE ;
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 201 , 9 ) ;
+ Size = MAP_APPFONT ( 35 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ };
+ ImageButton IB_CLOCK
+ {
+ HelpId = HID_REDLINING_FILTER_IB_CLOCK ;
+ Disable = TRUE ;
+ Pos = MAP_APPFONT ( 239 , 9 ) ;
+ Size = MAP_APPFONT ( 12 , 12 ) ;
+ TabStop = TRUE ;
+ ButtonImage = Image
+ {
+ ImageBitmap = Bitmap { File = "time.bmp" ; };
+ MaskColor = STD_MASKCOLOR ;
+ };
+ QuickHelpText = "Datum/Uhrzeit einstellen" ;
+ QuickHelpText [ ENGLISH ] = "Set date/time" ;
+ QuickHelpText [ english_us ] = "Set Date/Time" ;
+ QuickHelpText [ portuguese_brazilian ] = "Datum/Uhrzeit einstellen" ;
+ QuickHelpText [ swedish ] = "Stll in datum/klockslag" ;
+ QuickHelpText [ danish ] = "Indstil dato/klokkeslt" ;
+ QuickHelpText [ italian ] = "Imposta data/ora" ;
+ QuickHelpText [ spanish ] = "Definir fecha/hora" ;
+ QuickHelpText [ french ] = "Actualiser la date/l'heure" ;
+ QuickHelpText [ dutch ] = "Datum/tijd instellen" ;
+ QuickHelpText [ portuguese ] = "Define data e hora" ;
+ QuickHelpText[ russian ] = " ";
+ QuickHelpText[ polish ] = "Ustaw dat/godzin";
+ QuickHelpText[ japanese ] = "t/ݒ";
+ QuickHelpText[ chinese_simplified ] = "趨/ʱ";
+ QuickHelpText[ chinese_traditional ] = "]w/ɶ";
+ QuickHelpText[ arabic ] = " /";
+ QuickHelpText[ greek ] = " /";
+ QuickHelpText[ korean ] = "Set Date/Time";
+ QuickHelpText[ language_user1 ] = " ";
+ QuickHelpText[ language_user1 ] = " ";
+ };
+ FixedText FT_DATE2
+ {
+ Pos = MAP_APPFONT ( 112 , 26 ) ;
+ Size = MAP_APPFONT ( 32 , 12 ) ;
+ Disable = TRUE ;
+ Text = "~und dem" ;
+ Text [ ENGLISH ] = "and" ;
+ Text [ english_us ] = "and" ;
+ Text [ portuguese_brazilian ] = "und dem" ;
+ Text [ swedish ] = "och" ;
+ Text [ danish ] = "og den" ;
+ Text [ italian ] = "e" ;
+ Text [ spanish ] = "y" ;
+ Text [ french ] = "~et" ;
+ Text [ dutch ] = "~en de" ;
+ Text [ portuguese ] = "e" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "i";
+ Text[ japanese ] = "";
+ Text[ chinese_traditional ] = "M";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "׸";
+ Text[ turkish ] = "~ile";
+ Text[ language_user1 ] = " ";
+ };
+ DateField DF_DATE2
+ {
+ HelpId = HID_REDLINING_FILTER_DF_DATE2 ;
+ Border = TRUE ;
+ Disable = TRUE ;
+ Pos = MAP_APPFONT ( 144 , 24 ) ;
+ Size = MAP_APPFONT ( 55 , 12 ) ;
+ TabStop = TRUE ;
+ Spin = TRUE ;
+ Repeat = TRUE ;
+ Intnl = International
+ {
+ DateCentury = TRUE ;
+ LongDateDayLeadingZero = TRUE ;
+ };
+ Minimum = Date
+ {
+ Year = 1985 ;
+ Month = 12 ;
+ Day = 31 ;
+ };
+ Maximum = Date
+ {
+ Year = 2050 ;
+ Month = 12 ;
+ Day = 31 ;
+ };
+ };
+ TimeField TF_DATE2
+ {
+ HelpId = HID_REDLINING_FILTER_TF_DATE2 ;
+ Border = TRUE ;
+ Disable = TRUE ;
+ Pos = MAP_APPFONT ( 201 , 24 ) ;
+ Size = MAP_APPFONT ( 35 , 12 ) ;
+ TabStop = TRUE ;
+ Spin = TRUE ;
+ Repeat = TRUE ;
+ };
+ ImageButton IB_CLOCK2
+ {
+ HelpId = HID_REDLINING_FILTER_IB_CLOCK2 ;
+ Disable = TRUE ;
+ Pos = MAP_APPFONT ( 239 , 24 ) ;
+ Size = MAP_APPFONT ( 12 , 12 ) ;
+ TabStop = TRUE ;
+ ButtonImage = Image
+ {
+ ImageBitmap = Bitmap { File = "time.bmp" ; };
+ MaskColor = STD_MASKCOLOR ;
+ };
+ QuickHelpText = "Datum/Uhrzeit einstellen" ;
+ QuickHelpText [ ENGLISH ] = "Set date/time" ;
+ QuickHelpText [ english_us ] = "Set Date/Time" ;
+ QuickHelpText [ portuguese_brazilian ] = "Datum/Uhrzeit einstellen" ;
+ QuickHelpText [ swedish ] = "Stll in datum/klockslag" ;
+ QuickHelpText [ danish ] = "Indstil dato/klokkeslt" ;
+ QuickHelpText [ italian ] = "Imposta data/ora" ;
+ QuickHelpText [ spanish ] = "Definir fecha/hora" ;
+ QuickHelpText [ french ] = "Actualiser la date/l'heure" ;
+ QuickHelpText [ dutch ] = "Datum/tijd instellen" ;
+ QuickHelpText [ portuguese ] = "Define data e hora" ;
+ QuickHelpText[ russian ] = " ";
+ QuickHelpText[ polish ] = "Ustaw dat/godzin";
+ QuickHelpText[ japanese ] = "t/ݒ";
+ QuickHelpText[ chinese_simplified ] = "趨/ʱ";
+ QuickHelpText[ chinese_traditional ] = "]w/ɶ";
+ QuickHelpText[ arabic ] = " /";
+ QuickHelpText[ greek ] = " /";
+ QuickHelpText[ korean ] = "Set Date/Time";
+ QuickHelpText[ language_user1 ] = " ";
+ QuickHelpText[ language_user1 ] = " ";
+ };
+ CheckBox CB_AUTOR
+ {
+ HelpId = HID_REDLINING_FILTER_CB_AUTOR ;
+ Pos = MAP_APPFONT ( 12 , 46 ) ;
+ Size = MAP_APPFONT ( 50 , 12 ) ;
+ Text = "~Autor" ;
+ Text [ ENGLISH ] = "~Author" ;
+ TabStop = TRUE ;
+ Text [ english_us ] = "~Author" ;
+ Text [ portuguese_brazilian ] = "Autor" ;
+ Text [ swedish ] = "Frf~attare" ;
+ Text [ danish ] = "Forfatter" ;
+ Text [ italian ] = "Autore" ;
+ Text [ spanish ] = "~Autor" ;
+ Text [ french ] = "Auteur" ;
+ Text [ dutch ] = "~Auteur" ;
+ Text [ portuguese ] = "~Autor" ;
+ Text[ chinese_simplified ] = "(~A)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Autor";
+ Text[ japanese ] = "쐬(~A)";
+ Text[ chinese_traditional ] = "@(~A)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "ۼ(~A)";
+ Text[ turkish ] = "~Yazan";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_AUTOR
+ {
+ HelpId = HID_REDLINING_FILTER_LB_AUTOR ;
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 63 , 44 ) ;
+ Size = MAP_APPFONT ( 173 , 100 ) ;
+ TabStop = TRUE ;
+ Disable = TRUE ;
+ DropDown = TRUE ;
+ };
+ CheckBox CB_RANGE
+ {
+ HelpId = HID_REDLINING_FILTER_CB_RANGE ;
+ Pos = MAP_APPFONT ( 12 , 67 ) ;
+ Size = MAP_APPFONT ( 50 , 10 ) ;
+ Text = "~Bereich" ;
+ Text [ ENGLISH ] = "~Range" ;
+ TabStop = TRUE ;
+ Text [ english_us ] = "~Range" ;
+ Text [ portuguese_brazilian ] = "Bereich" ;
+ Text [ swedish ] = "~Omrde" ;
+ Text [ danish ] = "Omrde" ;
+ Text [ italian ] = "Area" ;
+ Text [ spanish ] = "~rea" ;
+ Text [ french ] = "~Plage" ;
+ Text [ dutch ] = "~Bereik" ;
+ Text [ portuguese ] = "Intervalo" ;
+ Text[ chinese_simplified ] = "(~R)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Zakres";
+ Text[ japanese ] = "͈(~R)";
+ Text[ chinese_traditional ] = "ϰ(~R)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "(~R)";
+ Text[ turkish ] = "~Aralk";
+ Text[ language_user1 ] = " ";
+ };
+ Edit ED_RANGE
+ {
+ HelpId = HID_REDLINING_FILTER_ED_RANGE ;
+ Disable = TRUE ;
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 63 , 65 ) ;
+ Size = MAP_APPFONT ( 173 , 12 ) ;
+ TabStop = TRUE ;
+ };
+ String STR_ACTION
+ {
+ Text = "A~ktion" ;
+ Text [ ENGLISH ] = "A~ction" ;
+ Text [ portuguese ] = "A~co" ;
+ Text [ english_us ] = "A~ction" ;
+ Text [ portuguese_brazilian ] = "A~ktion" ;
+ Text [ swedish ] = "t~grd" ;
+ Text [ danish ] = "Handling" ;
+ Text [ italian ] = "Opera~zione" ;
+ Text [ spanish ] = "~Accin" ;
+ Text [ french ] = "A~ction" ;
+ Text [ dutch ] = "A~ctiviteit" ;
+ Text[ chinese_simplified ] = "(~C)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Akcja";
+ Text[ japanese ] = "ݒ(~C)";
+ Text[ chinese_traditional ] = "ާ@(~C)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "(~C)";
+ Text[ turkish ] = "~lem";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_ACTION
+ {
+ HelpId = HID_REDLINING_FILTER_LB_ACTION ;
+ Border = TRUE ;
+ Hide = TRUE ;
+ Disable = TRUE ;
+ Pos = MAP_APPFONT ( 63 , 65 ) ;
+ Size = MAP_APPFONT ( 173 , 100 ) ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+ };
+ PushButton BTN_REF
+ {
+ HelpId = HID_REDLINING_FILTER_BTN_REF ;
+ Pos = MAP_APPFONT ( 239 , 65 ) ;
+ Size = MAP_APPFONT ( 12 , 12 ) ;
+ Disable = TRUE ;
+ TabStop = TRUE ;
+ Text = "..." ;
+ QuickHelpText = "Tabellenreferenz einstellen" ;
+ QuickHelpText [ ENGLISH ] = "Set referenz" ;
+ QuickHelpText [ english_us ] = "Set Reference" ;
+ Text [ portuguese_brazilian ] = "..." ;
+ QuickHelpText [ portuguese_brazilian ] = "Tabellenreferenz einstellen" ;
+ Text [ swedish ] = "..." ;
+ QuickHelpText [ swedish ] = "Stll in tabellreferens" ;
+ Text [ danish ] = "..." ;
+ QuickHelpText [ danish ] = "Indstil tabelreference" ;
+ Text [ italian ] = "..." ;
+ QuickHelpText [ italian ] = "Imposta il riferimento di tabella" ;
+ Text [ spanish ] = "..." ;
+ QuickHelpText [ spanish ] = "Definir referencia a tabla" ;
+ Text [ french ] = "..." ;
+ QuickHelpText [ french ] = "Ajuster rfrence" ;
+ Text [ dutch ] = "..." ;
+ QuickHelpText [ dutch ] = "Tabellenreferentie instellen" ;
+ Text [ portuguese ] = "..." ;
+ QuickHelpText [ portuguese ] = "Definir referncia" ;
+ Text [ english_us ] = "..." ;
+ Text[ chinese_simplified ] = "...";
+ Text[ russian ] = "...";
+ Text[ polish ] = "...";
+ Text[ japanese ] = "...";
+ Text[ chinese_traditional ] = "...";
+ Text[ arabic ] = "...";
+ QuickHelpText[ russian ] = " ";
+ QuickHelpText[ polish ] = "Ustaw tabel odwoa";
+ QuickHelpText[ japanese ] = "\\̎QƂݒ";
+ QuickHelpText[ chinese_simplified ] = "趨";
+ QuickHelpText[ chinese_traditional ] = "]wu@ѷ";
+ QuickHelpText[ arabic ] = " ";
+ Text[ greek ] = "...";
+ Text[ korean ] = "...";
+ QuickHelpText[ greek ] = "Set Reference";
+ QuickHelpText[ korean ] = "Set Reference";
+ Text[ turkish ] = "...";
+ Text[ language_user1 ] = " ";
+ };
+ CheckBox CB_COMMENT
+ {
+ HelpId = HID_REDLINING_FILTER_CB_COMMENT ;
+ Pos = MAP_APPFONT ( 12 , 88 ) ;
+ Size = MAP_APPFONT ( 50 , 10 ) ;
+ Text = "Be~schreibung" ;
+ Text [ ENGLISH ] = "~Comment" ;
+ TabStop = TRUE ;
+ Text[ italian ] = "~Descrizione";
+ Text[ portuguese_brazilian ] = "~Comment";
+ Text[ portuguese ] = "D~escrio";
+ Text[ danish ] = "Beskrivelse";
+ Text[ french ] = "~Description";
+ Text[ swedish ] = "Be~skrivning";
+ Text[ dutch ] = "~Commentaar";
+ Text[ spanish ] = "~Descripcin";
+ Text[ english_us ] = "Comment";
+ Text[ chinese_simplified ] = "˵";
+ Text[ russian ] = "";
+ Text[ polish ] = "Opis";
+ Text[ japanese ] = "";
+ Text[ chinese_traditional ] = "yz";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "Ak~lama";
+ Text[ language_user1 ] = " ";
+ };
+ Edit ED_COMMENT
+ {
+ HelpId = HID_REDLINING_FILTER_ED_COMMENT ;
+ Disable = TRUE ;
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 63 , 86 ) ;
+ Size = MAP_APPFONT ( 173 , 12 ) ;
+ TabStop = TRUE ;
+ };
+
+ GroupBox GB_FILTER
+ {
+ Pos = MAP_APPFONT ( 3 , 1 ) ;
+ Size = MAP_APPFONT ( 257 , 103) ;
+ };
+};
+TabPage SID_REDLIN_VIEW_PAGE
+{
+ HelpId = HID_REDLINING_VIEW_PAGE ;
+ OutputSize = TRUE ;
+ SVLook = TRUE ;
+ Size = MAP_APPFONT ( 270 , 126 ) ;
+ Hide = TRUE ;
+ String STR_VIEW
+ {
+ Text = "Liste" ;
+ Text [ ENGLISH ] = "List" ;
+ Text [ english_us ] = "List" ;
+ Text [ portuguese_brazilian ] = "Liste" ;
+ Text [ swedish ] = "Lista" ;
+ Text [ danish ] = "Liste" ;
+ Text [ italian ] = "Lista" ;
+ Text [ spanish ] = "Lista" ;
+ Text [ french ] = "Liste" ;
+ Text [ dutch ] = "Lijst" ;
+ Text [ portuguese ] = "Lista" ;
+ Text[ chinese_simplified ] = "е";
+ Text[ russian ] = "";
+ Text[ polish ] = "Lista";
+ Text[ japanese ] = "ؽ";
+ Text[ chinese_traditional ] = "M";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "Liste";
+ Text[ language_user1 ] = " ";
+ };
+ Control DG_VIEW
+ {
+ HelpId = HID_REDLINING_VIEW_DG_VIEW ;
+ Pos = MAP_APPFONT ( 3 , 1 ) ;
+ Size = MAP_APPFONT ( 221 , 65 ) ;
+ Border = TRUE ;
+ };
+ PushButton PB_ACCEPT
+ {
+ HelpId = HID_REDLINING_VIEW_PB_ACCEPT ;
+ Text = "~Akzeptieren" ;
+ Text [ ENGLISH ] = "Accept" ;
+ Pos = MAP_APPFONT ( 3 , 69 ) ;
+ Size = MAP_APPFONT ( 60 , 14 ) ;
+ Text [ portuguese ] = "~Aceitar" ;
+ Text [ english_us ] = "~Accept" ;
+ Text [ portuguese_brazilian ] = "~Akzeptieren" ;
+ Text [ swedish ] = "~Acceptera" ;
+ Text [ danish ] = "Accepter" ;
+ Text [ italian ] = "~Accetta" ;
+ Text [ spanish ] = "~Aceptar" ;
+ Text [ french ] = "~Accepter" ;
+ Text [ dutch ] = "~Accepteren" ;
+ Text[ chinese_simplified ] = "(~A)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Zaakceptuj";
+ Text[ japanese ] = "F(~A)";
+ Text[ chinese_traditional ] = "(~A)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "~";
+ Text[ korean ] = "(~A)";
+ Text[ turkish ] = "~Kabul et";
+ Text[ language_user1 ] = " ";
+ };
+ PushButton PB_REJECT
+ {
+ HelpId = HID_REDLINING_VIEW_PB_REJECT ;
+ Text = "A~blehnen" ;
+ Text [ ENGLISH ] = "Reject" ;
+ Pos = MAP_APPFONT ( 69 , 69 ) ;
+ Size = MAP_APPFONT ( 60 , 14 ) ;
+ Text [ english_us ] = "~Reject" ;
+ Text [ portuguese_brazilian ] = "A~blehnen" ;
+ Text [ swedish ] = "Av~bja" ;
+ Text [ danish ] = "Forkast" ;
+ Text [ italian ] = "~Rifiuta" ;
+ Text [ spanish ] = "~Rechazar" ;
+ Text [ french ] = "~Refuser" ;
+ Text [ dutch ] = "V~erwerpen" ;
+ Text [ portuguese ] = "~Rejeitar" ;
+ Text[ chinese_simplified ] = "ܾ(~R)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Odrzu";
+ Text[ japanese ] = "j(~R)";
+ Text[ chinese_traditional ] = "ڵ(~R)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "ź(~R)";
+ Text[ turkish ] = "R~eddet";
+ Text[ language_user1 ] = " ";
+ };
+ PushButton PB_ACCEPTALL
+ {
+ HelpId = HID_REDLINING_VIEW_PB_ACCEPTALL ;
+ Text = "Alle ak~zeptieren" ;
+ Text [ ENGLISH ] = "Accept All" ;
+ Pos = MAP_APPFONT ( 141 , 69 ) ;
+ Size = MAP_APPFONT ( 60 , 14 ) ;
+ Text [ english_us ] = "~Accept All" ;
+ Text [ portuguese_brazilian ] = "Alle ak~zeptieren" ;
+ Text [ swedish ] = "A~cceptera alla" ;
+ Text [ danish ] = "Accepter alle" ;
+ Text [ italian ] = "Accetta ~tutti" ;
+ Text [ spanish ] = "~Aceptar todo" ;
+ Text [ french ] = "Tout a~ccepter" ;
+ Text [ dutch ] = "Alle ac~cepteren" ;
+ Text [ portuguese ] = "~Aceitar tudo" ;
+ Text[ chinese_simplified ] = "ȫ(~A)";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Akcept. wszystkie";
+ Text[ japanese ] = "ׂďF(~A)";
+ Text[ chinese_traditional ] = "(~A)";
+ Text[ arabic ] = " ";
+ Text[ greek ] = "~ ";
+ Text[ korean ] = " (~A)";
+ Text[ turkish ] = "~Tmn kabul et";
+ Text[ language_user1 ] = " ";
+ };
+ PushButton PB_REJECTALL
+ {
+ HelpId = HID_REDLINING_VIEW_PB_REJECTALL ;
+ Text = "Alle ab~lehnen" ;
+ Text [ ENGLISH ] = "Reject All" ;
+ Pos = MAP_APPFONT ( 207 , 69 ) ;
+ Size = MAP_APPFONT ( 60 , 14 ) ;
+ Text [ english_us ] = "~Reject All" ;
+ Text [ portuguese_brazilian ] = "Alle ab~lehnen" ;
+ Text [ swedish ] = "A~vbj alla" ;
+ Text [ danish ] = "Forkast alle" ;
+ Text [ italian ] = "Rifiuta ~tutti" ;
+ Text [ spanish ] = "~Rechazar todo" ;
+ Text [ french ] = "Tout r~efuser" ;
+ Text [ dutch ] = "Alle ver~werpen" ;
+ Text [ portuguese ] = "Rejeitar ~tudo" ;
+ Text[ chinese_simplified ] = "ȫܾ(~R)";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Odrzu wszystkie";
+ Text[ japanese ] = "ׂĔj(~R)";
+ Text[ chinese_traditional ] = "ڵ(~R)";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ź(~R)";
+ Text[ turkish ] = "Tmn ~reddet";
+ Text[ language_user1 ] = " ";
+ };
+
+ PushButton PB_UNDO
+ {
+ HelpId = HID_REDLINING_VIEW_PB_UNDO ;
+ Text = "~Rckgngig" ;
+ Text [ ENGLISH ] = "Undo" ;
+ Hide = TRUE;
+ Pos = MAP_APPFONT ( 279 , 69 ) ;
+ Size = MAP_APPFONT ( 60 , 14 ) ;
+ Text[ italian ] = "Annulla";
+ Text[ portuguese_brazilian ] = "Undo";
+ Text[ portuguese ] = "A~nular";
+ Text[ danish ] = "Fortryd";
+ Text[ french ] = "~Annuler";
+ Text[ swedish ] = "~ngra";
+ Text[ dutch ] = "~Ongedaan maken";
+ Text[ spanish ] = "~Deshacer";
+ Text[ english_us ] = "Undo";
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "Cofnij";
+ Text[ japanese ] = "ɖ߂";
+ Text[ chinese_traditional ] = "_";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = " ";
+ Text[ turkish ] = "~Geri al";
+ Text[ language_user1 ] = " ";
+ };
+ String STR_TITLE1
+ {
+ Text = "Aktion" ;
+ Text [ ENGLISH ] = "Action" ;
+ Text [ english_us ] = "Action" ;
+ Text [ portuguese_brazilian ] = "Aktion" ;
+ Text [ swedish ] = "tgrd" ;
+ Text [ danish ] = "Handling" ;
+ Text [ italian ] = "Operazione" ;
+ Text [ spanish ] = "Accin" ;
+ Text [ french ] = "Action" ;
+ Text [ dutch ] = "Activiteit" ;
+ Text [ portuguese ] = "Aco" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "Akcja";
+ Text[ japanese ] = "ݒ";
+ Text[ chinese_traditional ] = "ާ@";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "lem";
+ Text[ language_user1 ] = " ";
+ };
+ String STR_TITLE2
+ {
+ Text = "Position" ;
+ Text [ ENGLISH ] = "Position" ;
+ Text [ english_us ] = "Position" ;
+ Text [ portuguese_brazilian ] = "Position" ;
+ Text [ swedish ] = "Position" ;
+ Text [ danish ] = "Placering" ;
+ Text [ italian ] = "Posizione" ;
+ Text [ spanish ] = "Posicin" ;
+ Text [ french ] = "Position" ;
+ Text [ dutch ] = "Positie" ;
+ Text [ portuguese ] = "Posio" ;
+ Text[ chinese_simplified ] = "λ";
+ Text[ russian ] = "";
+ Text[ polish ] = "Pozycja";
+ Text[ japanese ] = "ʒu";
+ Text[ chinese_traditional ] = "m";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "ġ";
+ Text[ turkish ] = "Konum";
+ Text[ language_user1 ] = " ";
+ };
+ String STR_TITLE3
+ {
+ Text = "Autor" ;
+ Text [ ENGLISH ] = "Author" ;
+ Text [ english_us ] = "Author" ;
+ Text [ portuguese_brazilian ] = "Autor" ;
+ Text [ swedish ] = "Frfattare" ;
+ Text [ danish ] = "Forfatter" ;
+ Text [ italian ] = "Autore" ;
+ Text [ spanish ] = "Autor" ;
+ Text [ french ] = "Auteur" ;
+ Text [ dutch ] = "Auteur" ;
+ Text [ portuguese ] = "Autor" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "Autor";
+ Text[ japanese ] = "쐬";
+ Text[ chinese_traditional ] = "@";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "ۼ";
+ Text[ turkish ] = "Yazan";
+ Text[ language_user1 ] = " ";
+ };
+ String STR_TITLE4
+ {
+ Text = "Datum" ;
+ Text [ ENGLISH ] = "Date" ;
+ Text [ english_us ] = "Date" ;
+ Text [ portuguese_brazilian ] = "Datum" ;
+ Text [ swedish ] = "Datum" ;
+ Text [ danish ] = "Dato" ;
+ Text [ italian ] = "Data" ;
+ Text [ spanish ] = "Fecha" ;
+ Text [ french ] = "Date" ;
+ Text [ dutch ] = "Datum" ;
+ Text [ portuguese ] = "Data" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "Data";
+ Text[ japanese ] = "t";
+ Text[ chinese_traditional ] = "";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "¥";
+ Text[ turkish ] = "Tarih";
+ Text[ language_user1 ] = " ";
+ };
+ String STR_TITLE5
+ {
+ Text = "Beschreibung" ;
+ Text [ ENGLISH ] = "Comment" ;
+ Text [ english_us ] = "Comment" ;
+ Text [ portuguese_brazilian ] = "Beschreibung" ;
+ Text [ swedish ] = "Beskrivning" ;
+ Text [ danish ] = "Beskrivelse" ;
+ Text [ italian ] = "Descrizione" ;
+ Text [ spanish ] = "Descripcin" ;
+ Text [ french ] = "Description" ;
+ Text [ dutch ] = "Omschrijviing" ;
+ Text [ portuguese ] = "Comentrio" ;
+ Text[ chinese_simplified ] = "˵";
+ Text[ russian ] = "";
+ Text[ polish ] = "Komentarz";
+ Text[ japanese ] = "";
+ Text[ chinese_traditional ] = "yz";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "Aklama";
+ Text[ language_user1 ] = " ";
+ };
+};
diff --git a/svx/source/dialog/dlgctl3d.cxx b/svx/source/dialog/dlgctl3d.cxx
new file mode 100644
index 000000000000..1f4506ff8afd
--- /dev/null
+++ b/svx/source/dialog/dlgctl3d.cxx
@@ -0,0 +1,1710 @@
+/*************************************************************************
+ *
+ * $RCSfile: dlgctl3d.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:07 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#pragma hdrstop
+
+#include "dialogs.hrc"
+
+#include <math.h>
+
+#ifndef _SVX_XFLCLIT_HXX //autogen
+#include <xflclit.hxx>
+#endif
+#ifndef _SVX_FMMODEL_HXX
+#include <fmmodel.hxx>
+#endif
+#ifndef _SVX_FMPAGE_HXX
+#include <fmpage.hxx>
+#endif
+#ifndef _E3D_VIEW3D_HXX //autogen
+#include <view3d.hxx>
+#endif
+#ifndef _E3D_POLYSC3D_HXX //autogen
+#include <polysc3d.hxx>
+#endif
+#ifndef _E3D_OBJ3D_HXX //autogen
+#include <obj3d.hxx>
+#endif
+#ifndef _CAMERA3D_HXX //autogen
+#include <camera3d.hxx>
+#endif
+#ifndef _VOLUME3D_HXX //autogen
+#include <volume3d.hxx>
+#endif
+#ifndef _E3D_SPHERE3D_HXX //autogen
+#include <sphere3d.hxx>
+#endif
+#ifndef _E3D_CUBE3D_HXX //autogen
+#include <cube3d.hxx>
+#endif
+#ifndef _SV_EVENT_HXX //autogen
+#include <vcl/event.hxx>
+#endif
+#ifndef _SFXITEMPOOL_HXX
+#include <svtools/itempool.hxx>
+#endif
+#ifndef _SFXSTYLE_HXX
+#include <svtools/style.hxx>
+#endif
+
+#include "dlgctl3d.hxx"
+#include <goodies/base3d.hxx>
+#include <tools/link.hxx>
+
+/*************************************************************************
+|* 3D Preview Control
+|* Ctor
+\************************************************************************/
+Svx3DPreviewControl::Svx3DPreviewControl( Window* pParent, const ResId& rResId ) :
+ Control ( pParent, rResId ),
+ pModel ( NULL ),
+ pFmPage ( NULL ),
+ pScene ( NULL ),
+ p3DView ( NULL ),
+ p3DObj ( NULL ),
+ nObjectType ( PREVIEW_OBJECTTYPE_SPHERE )
+{
+ Construct();
+}
+
+/*************************************************************************
+|* Ctor
+\************************************************************************/
+Svx3DPreviewControl::Svx3DPreviewControl( Window* pParent, WinBits nStyle ) :
+ Control ( pParent, nStyle ),
+ pModel ( NULL ),
+ pFmPage ( NULL ),
+ pScene ( NULL ),
+ p3DView ( NULL ),
+ p3DObj ( NULL ),
+ nObjectType ( PREVIEW_OBJECTTYPE_SPHERE )
+{
+ Construct();
+}
+
+/*************************************************************************
+|* Dtor
+\************************************************************************/
+Svx3DPreviewControl::~Svx3DPreviewControl()
+{
+ delete p3DView;
+ delete pModel;
+}
+
+/*************************************************************************
+|* Svx3DPreviewControl::Construct
+\************************************************************************/
+void Svx3DPreviewControl::Construct()
+{
+ SetMapMode( MAP_100TH_MM );
+
+ // Model
+ pModel = new FmFormModel();
+ pModel->GetItemPool().FreezeIdRanges();
+
+ // Page
+ pFmPage = new FmFormPage( *pModel, NULL );
+ pModel->InsertPage( pFmPage, 0 );
+
+ // 3D View
+ p3DView = new E3dView( pModel, this );
+
+ // 3D Scene
+ pScene = new E3dPolyScene(p3DView->Get3DDefaultAttributes());
+
+ // Objekt
+ SetObjectType(PREVIEW_OBJECTTYPE_SPHERE);
+
+ // Kameraeinstellungen, Perspektive ...
+ Camera3D& rCamera = (Camera3D&) pScene->GetCamera();
+ const Volume3D& rVolume = pScene->GetBoundVolume();
+ double fW = rVolume.GetWidth();
+ double fH = rVolume.GetHeight();
+ double fCamZ = rVolume.MaxVec().Z() + ((fW + fH) / 2.0);
+
+ rCamera.SetAutoAdjustProjection(FALSE);
+ rCamera.SetViewWindow(- fW / 2, - fH / 2, fW, fH);
+ Vector3D aLookAt;
+ Vector3D aCamPos(p3DView->DefaultCamPos().X (), p3DView->DefaultCamPos().Y (),
+ fCamZ < p3DView->DefaultCamPos().Z () ? p3DView->DefaultCamPos().Z () : fCamZ);
+ rCamera.SetPosAndLookAt(aCamPos, aLookAt);
+ rCamera.SetFocalLength(p3DView->DefaultCamFocal());
+ rCamera.SetDefaults(p3DView->DefaultCamPos(), aLookAt, p3DView->DefaultCamFocal());
+
+ pScene->SetCamera( rCamera );
+ pFmPage->InsertObject( pScene );
+
+ pScene->RotateX( DEG2RAD( 25 ) );
+ pScene->RotateY( DEG2RAD( 40 ) ); // Weil es auch ein Wuerfel sein kann
+
+ // SnapRects der Objekte ungueltig
+ pScene->SetRectsDirty();
+
+ // Transformationen initialisieren, damit bei RecalcSnapRect()
+ // richtig gerechnet wird
+ pScene->InitTransformationSet();
+
+ SfxItemSet aSet( pModel->GetItemPool(),
+ XATTR_LINESTYLE, XATTR_LINESTYLE,
+ XATTR_FILL_FIRST, XATTR_FILLBITMAP, 0 );
+ aSet.Put( XLineStyleItem( XLINE_NONE ) );
+ aSet.Put( XFillStyleItem( XFILL_SOLID ) );
+ aSet.Put( XFillColorItem( String(), Color( COL_WHITE ) ) );
+ pScene->NbcSetAttributes( aSet, FALSE );
+
+ // Default-Attribute holen (ohne markiertes Objekt)
+// SfxItemSet aDefaultSet = p3DView->Get3DAttributes();
+
+ // PageView
+ SdrPageView* pPageView = p3DView->ShowPage( pFmPage, Point() );
+ p3DView->SetMarkHdlHidden( TRUE );
+
+ // Szene markieren
+ p3DView->MarkObj( pScene, pPageView );
+
+ // Initiale Groesse
+ pScene->FitSnapRectToBoundVol();
+// Set3DAttributes(aDefaultSet);
+}
+
+/*************************************************************************
+|* Svx3DPreviewControl::Resize
+\************************************************************************/
+void Svx3DPreviewControl::Resize()
+{
+ // Seite der Page
+ Size aSize( GetSizePixel() );
+ aSize = PixelToLogic( aSize );
+ pFmPage->SetSize( aSize );
+
+ // Groesse setzen
+ Size aObjSize( aSize.Width()*5/6, aSize.Height()*5/6 );
+ Point aObjPoint( (aSize.Width() - aObjSize.Width()) / 2,
+ (aSize.Height() - aObjSize.Height()) / 2);
+ Rectangle aRect( aObjPoint, aObjSize);
+ pScene->SetSnapRect( aRect );
+}
+
+/*************************************************************************
+|* Svx3DPreviewControl::Paint
+\************************************************************************/
+void Svx3DPreviewControl::Paint( const Rectangle& rRect )
+{
+ p3DView->InitRedraw( this, Region( rRect ) );
+}
+
+/*************************************************************************
+|* Svx3DPreviewControl::MouseButtonDown
+\************************************************************************/
+void Svx3DPreviewControl::MouseButtonDown( const MouseEvent& rMEvt )
+{
+ Control::MouseButtonDown( rMEvt );
+ if( rMEvt.IsShift() && rMEvt.IsMod1() )
+ {
+ SetObjectType( (nObjectType+1) % 2 );
+ }
+}
+
+/*************************************************************************
+|* Svx3DPreviewControl::SetObjectType
+\************************************************************************/
+void Svx3DPreviewControl::SetObjectType( UINT16 nType )
+{
+ if( nObjectType != nType || !p3DObj)
+ {
+ SfxItemSet aSet(pModel->GetItemPool(),
+ SDRATTR_START, SDRATTR_END,
+ SID_ATTR_3D_START, SID_ATTR_3D_END,
+ 0);
+ nObjectType = nType;
+
+ if( p3DObj )
+ {
+ p3DObj->TakeAttributes( aSet, FALSE, FALSE );
+ pScene->Remove3DObj( p3DObj );
+ delete p3DObj;
+ p3DObj = NULL;
+ }
+
+ switch( nType )
+ {
+ case PREVIEW_OBJECTTYPE_SPHERE:
+ {
+ // Kugel erzeugen
+ p3DObj = new E3dSphereObj(
+ p3DView->Get3DDefaultAttributes(),
+ Vector3D( 0, 0, 0 ),
+ Vector3D( 1000, 1000, 1000 ));
+ }
+ break;
+
+ case PREVIEW_OBJECTTYPE_CUBE:
+ {
+ // Wuerfel erzeugen
+ p3DObj = new E3dCubeObj(
+ p3DView->Get3DDefaultAttributes(),
+ Vector3D( -500, -500, -500 ),
+ Vector3D( 1000, 1000, 1000 ));
+ }
+ break;
+ }
+
+ // Objekte groesser machen, da meisst nur 1x1x1 cm gross nach
+ // dem Erzeugen
+ Matrix4D aScaleMat;
+ aScaleMat.Scale(Vector3D(5.0, 5.0, 5.0));
+ p3DObj->ApplyTransform(aScaleMat);
+
+ // Rein in die Szene
+ pScene->Insert3DObj( p3DObj );
+ p3DObj->NbcSetAttributes( aSet, FALSE );
+
+ // Refresh
+ Resize();
+ }
+}
+
+/*************************************************************************
+|* Svx3DPreviewControl::Get3DAttributes
+\************************************************************************/
+SfxItemSet Svx3DPreviewControl::Get3DAttributes() const
+{
+ return( p3DView->Get3DAttributes( pScene ) );
+}
+/*************************************************************************
+|* Svx3DPreviewControl::Set3DAttributes
+\************************************************************************/
+void Svx3DPreviewControl::Set3DAttributes( const SfxItemSet& rAttr )
+{
+ p3DView->Set3DAttributes( rAttr, pScene, TRUE );
+ Resize();
+}
+
+/*************************************************************************
+|* Svx3DPreviewControl::SetObjectType
+\************************************************************************/
+void Svx3DPreviewControl::Set3DObject( const E3dObject* pObj )
+{
+ if( pObj->ISA( E3dCompoundObject ) )
+ {
+ pScene->Remove3DObj( p3DObj );
+ delete p3DObj;
+ p3DObj = (E3dCompoundObject*)pObj->Clone();
+ pScene->Insert3DObj( p3DObj );
+ Resize();
+ }
+ else if( pObj->ISA( E3dPolyScene ) )
+ {
+ delete pFmPage->RemoveObject( pScene->GetOrdNum() );
+ p3DObj = NULL;
+ pScene = (E3dPolyScene*)pObj->Clone();
+ pFmPage->InsertObject( pScene );
+ Resize();
+ }
+}
+
+/*************************************************************************
+|*
+|* Control zur Darstellung und Auswahl der Eckpunkte (und Mittelpunkt)
+|* eines 3D-Objekts
+|*
+\************************************************************************/
+
+SvxRectCtl3D::SvxRectCtl3D( Window* pParent,
+ const ResId& rResId,
+ USHORT nBorderWidth,
+ USHORT nBorderHeight,
+ USHORT nCircle ) :
+ Control( pParent, rResId ),
+ nBW( nBorderWidth ),
+ nBH( nBorderHeight ),
+ nRadius( nCircle)
+
+{
+ SetMapMode( MAP_100TH_MM );
+ SetBackground( Wallpaper( Color( COL_LIGHTGRAY ) ) );
+
+ aSize = GetOutputSize();
+ long nW = aSize.Width() - nBW;
+ long nH = aSize.Height() - nBH;
+ long nBWh = nBW / 2; // BorderWidthHalf
+ long nBHh = nBH / 2; // BorderHeightHalf
+
+ // PointArray wird mit Koordinaten des Controls gefuellt,
+ // um schneller painten zu knnen
+
+ aPointArray[0] = Point(); // Leer -> dummy
+ aPointArray[1] = Point( nW*1/2 + nBWh, 0 + nBHh );
+ aPointArray[2] = Point( nW*1/4 + nBWh, nH*1/8 + nBHh );
+ aPointArray[3] = Point( nW*3/4 + nBWh, nH*1/8 + nBHh );
+ aPointArray[4] = Point( 0 + nBWh, nH*2/8 + nBHh );
+ aPointArray[5] = Point( nW*1/2 + nBWh, nH*2/8 + nBHh );
+ aPointArray[6] = Point( nW + nBWh, nH*2/8 + nBHh );
+ aPointArray[7] = Point( nW*1/4 + nBWh, nH*3/8 + nBHh );
+ aPointArray[8] = Point( nW*3/4 + nBWh, nH*3/8 + nBHh );
+ aPointArray[9] = Point( 0 + nBWh, nH*4/8 + nBHh );
+ aPointArray[10] = Point( nW*1/2 + nBWh, nH*4/8 + nBHh );
+ aPointArray[11] = Point( nW + nBWh, nH*4/8 + nBHh );
+ aPointArray[12] = Point( nW*1/4 + nBWh, nH*5/8 + nBHh );
+ aPointArray[13] = Point( nW*3/4 + nBWh, nH*5/8 + nBHh );
+ aPointArray[14] = Point( 0 + nBWh, nH*6/8 + nBHh );
+ aPointArray[15] = Point( nW*1/2 + nBWh, nH*6/8 + nBHh );
+ aPointArray[16] = Point( nW + nBWh, nH*6/8 + nBHh );
+ aPointArray[17] = Point( nW*1/4 + nBWh, nH*7/8 + nBHh );
+ aPointArray[18] = Point( nW*3/4 + nBWh, nH*7/8 + nBHh );
+ aPointArray[19] = Point( nW*1/2 + nBWh, nH + nBHh );
+
+ // Distanz -> halbe Rahmenbreite
+ nDist = (short) nBWh;
+
+ aPolyPoints1[0] = Point( aPointArray[19].X(),
+ aPointArray[19].Y() - nDist );
+ aPolyPoints1[1] = Point( ( aPointArray[14].X() + aPointArray[17].X() ) / 2,
+ ( aPointArray[14].Y() + aPointArray[17].Y() ) / 2 - nDist );
+ aPolyPoints1[2] = Point( ( aPointArray[4].X() + aPointArray[7].X() ) / 2,
+ ( aPointArray[4].Y() + aPointArray[7].Y() ) / 2 + nDist );
+ aPolyPoints1[3] = Point( aPointArray[10].X(),
+ aPointArray[10].Y() + nDist );
+
+ aPolyPoints2[0] = aPolyPoints1[0];
+ aPolyPoints2[1] = Point( ( aPointArray[16].X() + aPointArray[18].X() ) / 2,
+ ( aPointArray[16].Y() + aPointArray[18].Y() ) / 2 - nDist);
+ aPolyPoints2[2] = Point( ( aPointArray[6].X() + aPointArray[8].X() ) / 2,
+ ( aPointArray[6].Y() + aPointArray[8].Y() ) / 2 + nDist );
+ aPolyPoints2[3] = aPolyPoints1[3];
+
+ aPolyPoints3[0] = aPolyPoints1[3];
+ aPolyPoints3[1] = aPolyPoints1[2];
+ aPolyPoints3[2] = Point( ( aPointArray[2].X() + aPointArray[3].X() ) / 2,
+ ( aPointArray[2].Y() + aPointArray[3].Y() ) / 2 + nDist );
+ aPolyPoints3[3] = aPolyPoints2[2];
+
+ aPoly1 = Polygon( 4, aPolyPoints1 );
+ aPoly2 = Polygon( 4, aPolyPoints2 );
+ aPoly3 = Polygon( 4, aPolyPoints3 );
+
+ Reset();
+}
+
+/*************************************************************************
+|*
+|* Dtor
+|*
+\************************************************************************/
+
+SvxRectCtl3D::~SvxRectCtl3D()
+{
+}
+
+/*************************************************************************
+|*
+|* Zeichnet das Control (Rechteck mit 9 Kreisen)
+|*
+\************************************************************************/
+
+void SvxRectCtl3D::Paint( const Rectangle& rRect )
+{
+
+ if( IsEnabled() )
+ SetLineColor( Color( COL_BLACK ) );
+ else
+ SetLineColor( Color( COL_GRAY ) );
+
+ // Zeichnen des Polygons ( Darstellungsobjekt )
+ SetFillColor( Color( COL_GRAY ) );
+ DrawPolygon( aPoly1 );
+ SetFillColor( Color( COL_CYAN ) );
+ DrawPolygon( aPoly2 );
+ SetFillColor( Color( COL_LIGHTGRAY ) );
+ DrawPolygon( aPoly3 );
+
+ // Zeichnen des Drahtgeruestes
+ DrawLine( aPointArray[ 1], aPointArray[ 4] );
+ DrawLine( aPointArray[ 1], aPointArray[ 6] );
+ DrawLine( aPointArray[ 4], aPointArray[10] );
+ DrawLine( aPointArray[ 6], aPointArray[10] );
+ DrawLine( aPointArray[ 4], aPointArray[14] );
+ DrawLine( aPointArray[10], aPointArray[19] );
+ DrawLine( aPointArray[ 6], aPointArray[16] );
+ DrawLine( aPointArray[14], aPointArray[19] );
+ DrawLine( aPointArray[16], aPointArray[19] );
+
+ // Zeichnen der Kreise
+ if( IsEnabled() )
+ {
+ SetLineColor( Color( COL_LIGHTBLUE ) );
+ SetFillColor( Color( COL_WHITE ) );
+ }
+ else
+ {
+ SetLineColor( Color( COL_GRAY ) );
+ SetFillColor( Color( COL_LIGHTGRAY ) );
+ }
+ for( int i = 1; i < 20; i++ )
+ {
+ if( nActPoint == i )
+ {
+ const Color& rOldLineColor = GetLineColor();
+ const Color& rOldFillColor = GetFillColor();
+
+ SetLineColor( Color( COL_YELLOW ) );
+ SetFillColor( Color( COL_WHITE ) );
+
+ DrawEllipse( Rectangle(
+ aPointArray[i] - Point( nRadius+100, nRadius+100 ),
+ aPointArray[i] + Point( nRadius+100, nRadius+100 ) ) );
+
+ DrawEllipse( Rectangle(
+ aPointArray[i] - Point( nRadius+50, nRadius+50 ),
+ aPointArray[i] + Point( nRadius+50, nRadius+50 ) ) );
+
+ SetFillColor( Color( COL_YELLOW ) );
+
+ DrawEllipse( Rectangle(
+ aPointArray[i] - Point( nRadius, nRadius ),
+ aPointArray[i] + Point( nRadius, nRadius ) ) );
+
+ SetLineColor( rOldLineColor );
+ SetFillColor( rOldFillColor );
+ }
+ else
+ DrawEllipse( Rectangle(
+ aPointArray[i] - Point( nRadius, nRadius ),
+ aPointArray[i] + Point( nRadius, nRadius ) ) );
+ }
+}
+
+/*************************************************************************
+|*
+|* Das angeklickte Rechteck wird ermittelt um die Farbe zu wechseln
+|*
+\************************************************************************/
+
+void SvxRectCtl3D::MouseButtonDown( const MouseEvent& rMEvt )
+{
+ Point aPt = PixelToLogic( rMEvt.GetPosPixel() );
+
+ for( int i = 1; i < 20; i++ )
+ {
+ Rectangle aRect( aPointArray[i] - Point( nRadius, nRadius ),
+ aPointArray[i] + Point( nRadius, nRadius ) );
+ if( aRect.IsInside( aPt ) )
+ {
+ nOldPoint = nActPoint;
+ nActPoint = i;
+
+ // Neuen Kreis neu Zeichnen
+ aRect = Rectangle( aPointArray[i] - Point( nRadius+100, nRadius+100 ),
+ aPointArray[i] + Point( nRadius+100, nRadius+100 ) );
+ Invalidate( aRect );
+
+ // Alten Kreis neu Zeichnen
+ aRect = Rectangle( aPointArray[nOldPoint] - Point( nRadius+100, nRadius+100 ),
+ aPointArray[nOldPoint] + Point( nRadius+100, nRadius+100 ) );
+ Invalidate( aRect );
+
+ break;
+ }
+ }
+}
+
+/*************************************************************************
+|*
+|* Bewirkt den Ursprungszustand des Controls
+|*
+\************************************************************************/
+
+void SvxRectCtl3D::Reset()
+{
+ nActPoint = 10;
+ nOldPoint = 0;
+ Invalidate();
+}
+
+/*************************************************************************
+|*
+|* Gibt den aktuell ausgewaehlten Point als Vector zurueck
+|*
+\************************************************************************/
+
+Vector3D SvxRectCtl3D::GetVector()
+{
+ return( PointNumToVector( nActPoint ) );
+}
+
+/*************************************************************************
+|*
+|* Setzt den uebergebenen Vector als Point
+|*
+\************************************************************************/
+
+void SvxRectCtl3D::SetPoint( Vector3D nVect )
+{
+ nActPoint = VectorToPointNum( nVect );
+ if( nActPoint )
+ Invalidate();
+}
+
+/*************************************************************************
+|*
+|* Konvertiert den uebergebenen Punkt in einen Vector3D
+|*
+\************************************************************************/
+
+Vector3D SvxRectCtl3D::PointNumToVector( short nPoint )
+{
+ Vector3D aVect;
+
+ switch( nPoint )
+ {
+ case 1: aVect.X() = 0.0; aVect.Y() = 1.0; aVect.Z() = -1.0; break;
+ case 2: aVect.X() = -1.0; aVect.Y() = 1.0; aVect.Z() = -1.0; break;
+ case 3: aVect.X() = 1.0; aVect.Y() = 1.0; aVect.Z() = -1.0; break;
+ case 4: aVect.X() = -1.0; aVect.Y() = 1.0; aVect.Z() = 0.0; break;
+ case 5: aVect.X() = 0.0; aVect.Y() = 1.0; aVect.Z() = 0.0; break;
+ case 6: aVect.X() = 1.0; aVect.Y() = 1.0; aVect.Z() = 0.0; break;
+ case 7: aVect.X() = -1.0; aVect.Y() = 1.0; aVect.Z() = 1.0; break;
+ case 8: aVect.X() = 1.0; aVect.Y() = 1.0; aVect.Z() = 1.0; break;
+ case 9: aVect.X() = -1.0; aVect.Y() = 0.0; aVect.Z() = 0.0; break;
+ case 10: aVect.X() = 0.0; aVect.Y() = 1.0; aVect.Z() = 1.0; break;
+ case 11: aVect.X() = 1.0; aVect.Y() = 0.0; aVect.Z() = 0.0; break;
+ case 12: aVect.X() = -1.0; aVect.Y() = 0.0; aVect.Z() = 1.0; break;
+ case 13: aVect.X() = 1.0; aVect.Y() = 0.0; aVect.Z() = 1.0; break;
+ case 14: aVect.X() = -1.0; aVect.Y() = -1.0; aVect.Z() = 0.0; break;
+ case 15: aVect.X() = 0.0; aVect.Y() = 0.0; aVect.Z() = 1.0; break;
+ case 16: aVect.X() = 1.0; aVect.Y() = -1.0; aVect.Z() = 0.0; break;
+ case 17: aVect.X() = -1.0; aVect.Y() = -1.0; aVect.Z() = 1.0; break;
+ case 18: aVect.X() = 1.0; aVect.Y() = -1.0; aVect.Z() = 1.0; break;
+ case 19: aVect.X() = 0.0; aVect.Y() = -1.0; aVect.Z() = 1.0; break;
+ default: aVect.X() = -1.0; aVect.Y() = -1.0; aVect.Z() = -1.0; break;
+ }
+
+ return( aVect );
+}
+
+/*************************************************************************
+|*
+|* Konvertiert den uebergebenen Vector3D in einen Punkt
+|*
+\************************************************************************/
+
+short SvxRectCtl3D::VectorToPointNum( Vector3D aVect )
+{
+ short nPoint = 0;
+
+ if ( fabs (aVect.X() ) < 1e-3 && fabs (aVect.Y() - 0.70711) < 1e-3 && fabs (aVect.Z() + 0.70711) < 1e-3 ) nPoint = 1;
+ else if( fabs (aVect.X() + 0.57735) < 1e-3 && fabs (aVect.Y() - 0.57735) < 1e-3 && fabs (aVect.Z() + 0.57735) < 1e-3 ) nPoint = 2;
+ else if( fabs (aVect.X() - 0.57735) < 1e-3 && fabs (aVect.Y() - 0.57735) < 1e-3 && fabs (aVect.Z() + 0.57735) < 1e-3 ) nPoint = 3;
+ else if( fabs (aVect.X() + 0.70711) < 1e-3 && fabs (aVect.Y() - 0.70711) < 1e-3 && fabs (aVect.Z() ) < 1e-3 ) nPoint = 4;
+ else if( fabs (aVect.X() ) < 1e-3 && fabs (aVect.Y() - 1.0 ) < 1e-3 && fabs (aVect.Z() ) < 1e-3 ) nPoint = 5;
+ else if( fabs (aVect.X() - 0.70711) < 1e-3 && fabs (aVect.Y() - 0.70711) < 1e-3 && fabs (aVect.Z() ) < 1e-3 ) nPoint = 6;
+ else if( fabs (aVect.X() + 0.57735) < 1e-3 && fabs (aVect.Y() - 0.57735) < 1e-3 && fabs (aVect.Z() - 0.57735) < 1e-3 ) nPoint = 7;
+ else if( fabs (aVect.X() - 0.57735) < 1e-3 && fabs (aVect.Y() - 0.57735) < 1e-3 && fabs (aVect.Z() - 0.57735) < 1e-3 ) nPoint = 8;
+ else if( fabs (aVect.X() + 1.0 ) < 1e-3 && fabs (aVect.Y() ) < 1e-3 && fabs (aVect.Z() ) < 1e-3 ) nPoint = 9;
+ else if( fabs (aVect.X() ) < 1e-3 && fabs (aVect.Y() - 0.70711) < 1e-3 && fabs (aVect.Z() - 0.70711) < 1e-3 ) nPoint = 10;
+ else if( fabs (aVect.X() - 1.0 ) < 1e-3 && fabs (aVect.Y() ) < 1e-3 && fabs (aVect.Z() ) < 1e-3 ) nPoint = 11;
+ else if( fabs (aVect.X() + 0.70711) < 1e-3 && fabs (aVect.Y() ) < 1e-3 && fabs (aVect.Z() - 0.70711) < 1e-3 ) nPoint = 12;
+ else if( fabs (aVect.X() - 0.70711) < 1e-3 && fabs (aVect.Y() ) < 1e-3 && fabs (aVect.Z() - 0.70711) < 1e-3 ) nPoint = 13;
+ else if( fabs (aVect.X() + 0.70711) < 1e-3 && fabs (aVect.Y() + 0.70711) < 1e-3 && fabs (aVect.Z() ) < 1e-3 ) nPoint = 14;
+ else if( fabs (aVect.X() ) < 1e-3 && fabs (aVect.Y() ) < 1e-3 && fabs (aVect.Z() - 1.0 ) < 1e-3 ) nPoint = 15;
+ else if( fabs (aVect.X() - 0.70711) < 1e-3 && fabs (aVect.Y() + 0.70711) < 1e-3 && fabs (aVect.Z() ) < 1e-3 ) nPoint = 16;
+ else if( fabs (aVect.X() + 0.57735) < 1e-3 && fabs (aVect.Y() + 0.57735) < 1e-3 && fabs (aVect.Z() - 0.57735) < 1e-3 ) nPoint = 17;
+ else if( fabs (aVect.X() - 0.57735) < 1e-3 && fabs (aVect.Y() + 0.57735) < 1e-3 && fabs (aVect.Z() - 0.57735) < 1e-3 ) nPoint = 18;
+ else if( fabs (aVect.X() ) < 1e-3 && fabs (aVect.Y() + 0.70711) < 1e-3 && fabs (aVect.Z() - 0.70711) < 1e-3 ) nPoint = 19;
+
+ return( nPoint );
+}
+
+
+
+
+
+/*************************************************************************
+|*
+|* 3D Preview Control
+|*
+\************************************************************************/
+
+SvxPreviewCtl3D::SvxPreviewCtl3D( Window* pParent, const ResId& rResId)
+: Control( pParent, rResId )
+{
+ // Members initialisieren
+ Init();
+}
+
+SvxPreviewCtl3D::SvxPreviewCtl3D( Window* pParent, WinBits nStyle)
+: Control( pParent, nStyle)
+{
+ // Members initialisieren
+ Init();
+}
+
+void SvxPreviewCtl3D::Init()
+{
+ // Members mit Defaults fuellen
+ bGeometryCube=FALSE;
+ fRotateX=-20.0;
+ fRotateY=45.0;
+ fRotateZ=0.0;
+ fDistance=10.0;
+ fDeviceSize=1.5;
+
+ // MapMode waehlen
+ SetMapMode( MAP_100TH_MM );
+
+ // Hintergrund in einem schoenen neutralen Grau
+ SetBackground( Wallpaper( Color( COL_GRAY ) ) );
+
+ // Segmente
+ nHorSegs = 24;
+ nVerSegs = 12;
+
+ // Normalenmodus
+ nNormalMode = PREVIEW_NORMAL_MODE_OBJECT;
+
+ // ShadeMode
+ nShadeMode = PREVIEW_SHADEMODE_GOURAUD;
+
+ // Geometrie erzeugen
+ CreateGeometry();
+
+ // Material initialisieren
+ Color aColWhite(COL_WHITE);
+ Color aColBlack(COL_BLACK);
+
+ aObjectMaterial.SetMaterial(aColWhite, Base3DMaterialAmbient);
+ aObjectMaterial.SetMaterial(aColWhite, Base3DMaterialDiffuse);
+ aObjectMaterial.SetMaterial(aColWhite, Base3DMaterialSpecular);
+ aObjectMaterial.SetMaterial(aColBlack, Base3DMaterialEmission);
+ aObjectMaterial.SetShininess(32);
+}
+
+SvxPreviewCtl3D::~SvxPreviewCtl3D()
+{
+}
+
+void SvxPreviewCtl3D::Paint( const Rectangle& rRect )
+{
+ // Base3D anfordern
+ Base3D* pBase3D = Base3D::Create(this, nShadeMode == PREVIEW_SHADEMODE_DRAFT);
+
+ Rectangle aVisible(Point(0,0), GetOutputSizePixel());
+ aVisible = PixelToLogic(aVisible);
+
+ // Orientierung
+ Matrix4D mOrient;
+ aCameraSet.SetObjectTrans(mOrient);
+ mOrient.Orientation(
+ Point4D(0.0, 0.0, fDistance, 1.0),
+ Vector3D(0.0, 0.0, 1.0),
+ Vector3D(0.0, 1.0, 0.0));
+ aCameraSet.SetOrientation(mOrient);
+
+ // Matritzen setzen
+ pBase3D->SetTransformationSet(&aCameraSet);
+
+ // Licht setzen
+ pBase3D->SetLightGroup(&aLights);
+
+ // ShadeMode setzen
+ if(nShadeMode == PREVIEW_SHADEMODE_FLAT || nShadeMode == PREVIEW_SHADEMODE_DRAFT)
+ pBase3D->SetShadeModel(Base3DFlat);
+ else if(nShadeMode == PREVIEW_SHADEMODE_GOURAUD)
+ pBase3D->SetShadeModel(Base3DSmooth);
+ else
+ pBase3D->SetShadeModel(Base3DPhong);
+
+ // Ausgaberechteck setzen
+ aCameraSet.SetDeviceRectangle(-fDeviceSize, fDeviceSize, -fDeviceSize, fDeviceSize, FALSE);
+ aCameraSet.SetFrontClippingPlane(fDistance - fDeviceSize);
+ aCameraSet.SetBackClippingPlane(fDistance + fDeviceSize);
+ aCameraSet.SetViewportRectangle(aVisible);
+
+ // Matritzen setzen
+ pBase3D->SetTransformationSet(&aCameraSet);
+
+ // Werte fuer Objekt setzen
+ pBase3D->SetActiveTexture();
+ pBase3D->SetMaterial(aObjectMaterial.GetMaterial(Base3DMaterialAmbient), Base3DMaterialAmbient);
+ pBase3D->SetMaterial(aObjectMaterial.GetMaterial(Base3DMaterialDiffuse), Base3DMaterialDiffuse);
+ pBase3D->SetMaterial(aObjectMaterial.GetMaterial(Base3DMaterialSpecular), Base3DMaterialSpecular);
+ pBase3D->SetMaterial(aObjectMaterial.GetMaterial(Base3DMaterialEmission), Base3DMaterialEmission);
+ pBase3D->SetShininess(aObjectMaterial.GetShininess());
+
+ pBase3D->SetRenderMode(Base3DRenderFill);
+ pBase3D->SetCullMode(Base3DCullBack);
+
+ // ScissorRegion defaultmaessig disablen
+ pBase3D->ActivateScissorRegion(FALSE);
+
+ // Nicht flach
+ pBase3D->SetForceFlat(FALSE);
+
+ // Geometrie ausgeben
+ DrawGeometryClip(pBase3D);
+}
+
+void SvxPreviewCtl3D::DrawGeometryClip(Base3D *pBase3D)
+{
+ // spezielles Clipping fuer OpenGL, um keine floating windows ueberzumalen
+ if(pBase3D->GetBase3DType() == BASE3D_TYPE_OPENGL
+ && GetOutDevType() == OUTDEV_WINDOW
+ && pBase3D->GetTransformationSet())
+ {
+ Window* pWin = (Window*)this;
+ Region aClipRegion = pWin->GetActiveClipRegion();
+
+ // ClipRegion ist gesetzt, benutze diese
+ RegionHandle aRegionHandle = aClipRegion.BeginEnumRects();
+ Rectangle aClipRect;
+
+ while(aClipRegion.GetEnumRects(aRegionHandle, aClipRect))
+ {
+ if(aClipRect.IsOver(pBase3D->GetTransformationSet()->GetLogicalViewportBounds()))
+ {
+ // Viewport setzen
+ pBase3D->SetScissorRegion(aClipRect, TRUE);
+
+ // Zeichne alle Objekte
+ pBase3D->StartScene();
+ DrawGeometry(pBase3D);
+ pBase3D->EndScene();
+ }
+ }
+ aClipRegion.EndEnumRects(aRegionHandle);
+ }
+ else
+ {
+ // Zeichne alle Objekte
+ pBase3D->StartScene();
+ DrawGeometry(pBase3D);
+ pBase3D->EndScene();
+ }
+}
+
+void SvxPreviewCtl3D::DrawGeometry(Base3D *pBase3D)
+{
+ pBase3D->DrawPolygonGeometry(aGeometry);
+}
+
+void SvxPreviewCtl3D::SetGeometry(BOOL bGeomCube)
+{
+ if(bGeometryCube != bGeomCube)
+ {
+ bGeometryCube = bGeomCube;
+ CreateGeometry();
+ }
+ Invalidate();
+}
+
+void SvxPreviewCtl3D::SetRotation(double fRotX, double fRotY, double fRotZ)
+{
+ if(fRotX != fRotateX || fRotY != fRotateY || fRotZ != fRotateZ)
+ {
+ fRotateX = fRotX;
+ fRotateY = fRotY;
+ fRotateZ = fRotZ;
+ CreateGeometry();
+ }
+ Invalidate();
+}
+
+void SvxPreviewCtl3D::GetRotation(double& rRotX, double& rRotY, double& rRotZ)
+{
+ rRotX = fRotateX;
+ rRotY = fRotateY;
+ rRotZ = fRotateZ;
+}
+
+// Zugriffsfunktionen Materialien
+void SvxPreviewCtl3D::SetMaterial(Color rNew, Base3DMaterialValue eVal)
+{
+ if(aObjectMaterial.GetMaterial(eVal) != rNew)
+ {
+ aObjectMaterial.SetMaterial(rNew, eVal);
+ Invalidate();
+ }
+}
+
+Color SvxPreviewCtl3D::GetMaterial(Base3DMaterialValue eVal)
+{
+ return aObjectMaterial.GetMaterial(eVal);
+}
+
+void SvxPreviewCtl3D::SetShininess(UINT16 nNew)
+{
+ if(aObjectMaterial.GetShininess() != nNew)
+ {
+ aObjectMaterial.SetShininess(nNew);
+ Invalidate();
+ }
+}
+
+UINT16 SvxPreviewCtl3D::GetShininess()
+{
+ return aObjectMaterial.GetShininess();
+}
+
+// Lichtquellen setzen
+void SvxPreviewCtl3D::SetLightGroup(B3dLightGroup* pNew)
+{
+ if(pNew)
+ {
+ aLights = *pNew;
+ Invalidate();
+ }
+}
+
+// View-Einstellungen
+void SvxPreviewCtl3D::SetUserDistance(double fNew)
+{
+ if(fNew != fDistance)
+ {
+ fDistance = fNew;
+ Invalidate();
+ }
+}
+
+void SvxPreviewCtl3D::SetDeviceSize(double fNew)
+{
+ if(fNew != fDeviceSize)
+ {
+ fDeviceSize = fNew;
+ Invalidate();
+ }
+}
+
+// Zugriffsfunktionen Segmentierung
+void SvxPreviewCtl3D::SetHorizontalSegments(UINT16 nNew)
+{
+ if(nNew != nHorSegs)
+ {
+ nHorSegs = nNew;
+ CreateGeometry();
+ Invalidate();
+ }
+}
+
+void SvxPreviewCtl3D::SetVerticalSegments(UINT16 nNew)
+{
+ if(nNew != nVerSegs)
+ {
+ nVerSegs = nNew;
+ CreateGeometry();
+ Invalidate();
+ }
+}
+
+void SvxPreviewCtl3D::SetSegments(UINT16 nNewHor, UINT16 nNewVer)
+{
+ if(nNewHor != nHorSegs || nNewVer != nVerSegs)
+ {
+ nHorSegs = nNewHor;
+ nVerSegs = nNewVer;
+ CreateGeometry();
+ Invalidate();
+ }
+}
+
+// Zugriff Normalenmodus
+void SvxPreviewCtl3D::SetNormalMode(UINT16 nNew)
+{
+ if(nNew != nNormalMode)
+ {
+ nNormalMode = nNew;
+ CreateGeometry();
+ Invalidate();
+ }
+}
+
+// Zugriff auf ShadeMode
+void SvxPreviewCtl3D::SetShadeMode(UINT16 nNew)
+{
+ if(nNew != nShadeMode)
+ {
+ nShadeMode = nNew;
+ Invalidate();
+ }
+}
+
+void SvxPreviewCtl3D::CreateGeometry()
+{
+ // Wuerfel erzeugen fuer Objektgroesse
+ B3dVolume aVolume;
+ aVolume.MinVec() = Vector3D(-1.0, -1.0, -1.0);
+ aVolume.MaxVec() = Vector3D( 1.0, 1.0, 1.0);
+
+ if(bGeometryCube)
+ {
+ // Wuerfel erzeugen
+ aGeometry.CreateCube(aVolume);
+ }
+ else
+ {
+ // AHCTUNG: Das PreviewControl hat bis zu dieser Stelle KEINE
+ // Begrenzung in der Anzahl der Hor/Ver Segmente. Diese wird hier nun
+ // explizit eingeschraenkt.
+ double fHSegs = (nHorSegs > 50) ? 50.0 : (double)nHorSegs;
+ double fVSegs = (nVerSegs > 50) ? 50.0 : (double)nVerSegs;
+
+ // Kugel erzeugen
+ aGeometry.CreateSphere(aVolume, fHSegs, fVSegs);
+ }
+
+ if(nNormalMode != PREVIEW_NORMAL_MODE_OBJECT)
+ {
+ if(!(nNormalMode == PREVIEW_NORMAL_MODE_FLAT))
+ {
+ aGeometry.CreateDefaultNormalsSphere();
+ }
+ }
+
+ // Gesetzte Rotation ausfuehren
+ if(fRotateX != 0.0 || fRotateY != 0.0 || fRotateZ != 0.0)
+ {
+ Matrix4D aRotMat;
+ if(fRotateY != 0.0)
+ aRotMat.RotateY(fRotateY * F_PI180);
+ if(fRotateX != 0.0)
+ aRotMat.RotateX(-fRotateX * F_PI180);
+ if(fRotateZ != 0.0)
+ aRotMat.RotateZ(fRotateZ * F_PI180);
+ aGeometry.Transform(aRotMat);
+ }
+}
+
+/*************************************************************************
+|*
+|* 3D Light Control
+|*
+\************************************************************************/
+
+SvxLightPrevievCtl3D::SvxLightPrevievCtl3D( Window* pParent, const ResId& rResId)
+: SvxPreviewCtl3D(pParent, rResId)
+{
+ // Members initialisieren
+ Init();
+}
+
+SvxLightPrevievCtl3D::SvxLightPrevievCtl3D( Window* pParent, WinBits nStyle )
+: SvxPreviewCtl3D(pParent, nStyle)
+{
+ // Members initialisieren
+ Init();
+}
+
+void SvxLightPrevievCtl3D::Init()
+{
+ // Lokale Parameter fuellen
+ eSelectedLight = Base3DLightNone;
+ fObjectRadius = 1.414;
+ fDistanceToObject = 0.4;
+ fScaleSizeSelected = 1.8;
+ fLampSize = 0.1;
+ nInteractionStartDistance = 5 * 5 * 2;
+ bMouseMoved = FALSE;
+ bGeometrySelected = FALSE;
+
+ // Device groesser, da Lampen angezeigt werden
+ SetDeviceSize(2.0);
+
+ // Geometrie fuer Lampenobjekt erzeugen
+ CreateLightGeometry();
+}
+
+SvxLightPrevievCtl3D::~SvxLightPrevievCtl3D()
+{
+}
+
+void SvxLightPrevievCtl3D::SelectLight(Base3DLightNumber eNew)
+{
+ if(eNew != eSelectedLight)
+ {
+ eSelectedLight = eNew;
+ bGeometrySelected = FALSE;
+ Invalidate();
+ }
+}
+
+void SvxLightPrevievCtl3D::SelectGeometry()
+{
+ if(!bGeometrySelected)
+ {
+ bGeometrySelected = TRUE;
+ eSelectedLight = Base3DLightNone;
+ Invalidate();
+ }
+}
+
+void SvxLightPrevievCtl3D::SetObjectRadius(double fNew)
+{
+ if(fObjectRadius != fNew)
+ {
+ fObjectRadius = fNew;
+ Invalidate();
+ }
+}
+
+void SvxLightPrevievCtl3D::SetDistanceToObject(double fNew)
+{
+ if(fDistanceToObject != fNew)
+ {
+ fDistanceToObject = fNew;
+ Invalidate();
+ }
+}
+
+void SvxLightPrevievCtl3D::SetScaleSizeSelected(double fNew)
+{
+ if(fScaleSizeSelected != fNew)
+ {
+ fScaleSizeSelected = fNew;
+ Invalidate();
+ }
+}
+
+void SvxLightPrevievCtl3D::SetLampSize(double fNew)
+{
+ if(fLampSize != fNew)
+ {
+ fLampSize = fNew;
+ CreateLightGeometry();
+ Invalidate();
+ }
+}
+
+void SvxLightPrevievCtl3D::DrawGeometry(Base3D *pBase3D)
+{
+ // call parent; zeichnet das Objekt selbst
+ SvxPreviewCtl3D::DrawGeometry(pBase3D);
+
+ // Lichter zeichnen
+ for(UINT16 a=0;a<BASE3D_MAX_NUMBER_LIGHTS;a++)
+ {
+ Base3DLightNumber eLightNum = (Base3DLightNumber)(Base3DLight0 + a);
+ if(aLights.IsEnabled(eLightNum))
+ DrawLightGeometry(eLightNum, pBase3D);
+ }
+}
+
+void SvxLightPrevievCtl3D::DrawLightGeometry(Base3DLightNumber eLightNum,
+ Base3D* pBase3D)
+{
+ // Geometrie bereitstellen
+ B3dGeometry aNew;
+ Matrix4D aTrans;
+ double fRadius = fObjectRadius + fDistanceToObject;
+ Color aLineColor(COL_YELLOW);
+ aNew = aLightGeometry;
+
+ if(eLightNum == eSelectedLight)
+ aTrans.Scale(fScaleSizeSelected, fScaleSizeSelected, fScaleSizeSelected);
+
+ Vector3D aDirection = aLights.GetDirection(eLightNum);
+ aDirection.Normalize();
+ aDirection *= fRadius;
+ aTrans.Translate(aDirection);
+
+ aNew.Transform(aTrans);
+
+ // Material setzen
+ Color aZwi;
+ aZwi = aLights.GetIntensity(Base3DMaterialDiffuse, eLightNum);
+ pBase3D->SetMaterial(aZwi, Base3DMaterialAmbient);
+// pBase3D->SetMaterial(aZwi, Base3DMaterialDiffuse);
+ pBase3D->SetMaterial(aZwi, Base3DMaterialEmission);
+ aZwi = aLights.GetIntensity(Base3DMaterialSpecular, eLightNum);
+ pBase3D->SetMaterial(aZwi, Base3DMaterialSpecular);
+
+ // Lampe Zeichnen
+ pBase3D->SetRenderMode(Base3DRenderLine);
+ pBase3D->DrawPolygonGeometry(aNew);
+
+ if(eLightNum == eSelectedLight)
+ {
+ // Beleuchtung aus und Linienfarbe setzen
+ BOOL bLightingWasEnabled = aLights.IsLightingEnabled();
+ aLights.EnableLighting(FALSE);
+ pBase3D->SetLightGroup(&aLights);
+ pBase3D->SetLineWidth();
+
+ // Kreis am Boden zeichnen
+ Vector3D aPoint(0.0, -fRadius, fRadius);
+ pBase3D->StartPrimitive(Base3DLineLoop);
+ pBase3D->SetColor(aLineColor);
+
+ double fWink;
+ for(fWink=-F_PI;fWink < F_PI; fWink += F_2PI/24.0)
+ {
+ aPoint.Z() = -cos(fWink) * fRadius;
+ aPoint.X() = -sin(fWink) * fRadius;
+ pBase3D->AddVertex(aPoint);
+ }
+ pBase3D->EndPrimitive();
+
+ // Kreisbogen zeichnen
+ double fBodenWinkel = atan2(-aDirection.X(), -aDirection.Z());
+ double fSinBoden = sin(fBodenWinkel) * fRadius;
+ double fCosBoden = cos(fBodenWinkel) * fRadius;
+ pBase3D->StartPrimitive(Base3DLineStrip);
+ pBase3D->SetColor(aLineColor);
+
+ for(fWink=-F_PI2;fWink < F_PI2; fWink += F_PI/12.0)
+ {
+ aPoint.X() = cos(fWink) * -fSinBoden;
+ aPoint.Y() = sin(fWink) * fRadius;
+ aPoint.Z() = cos(fWink) * -fCosBoden;
+ pBase3D->AddVertex(aPoint);
+ }
+ pBase3D->EndPrimitive();
+
+ // Verbindung zeichnen
+ pBase3D->StartPrimitive(Base3DLineStrip);
+ pBase3D->SetColor(aLineColor);
+ aPoint = Vector3D(0.0, -fRadius, 0.0);
+ pBase3D->AddVertex(aPoint);
+ aPoint.X() = -fSinBoden;
+ aPoint.Z() = -fCosBoden;
+ pBase3D->AddVertex(aPoint);
+ aPoint.Y() = 0.0;
+ pBase3D->AddVertex(aPoint);
+ pBase3D->EndPrimitive();
+
+ // Beleuchtung wieder eischalten
+ aLights.EnableLighting(bLightingWasEnabled);
+ pBase3D->SetLightGroup(&aLights);
+ }
+}
+
+void SvxLightPrevievCtl3D::CreateLightGeometry()
+{
+ // Wuerfel erzeugen fuer Objektgroesse
+ B3dVolume aVolume;
+ aVolume.MinVec() = Vector3D(-fLampSize, -fLampSize, -fLampSize);
+ aVolume.MaxVec() = Vector3D( fLampSize, fLampSize, fLampSize);
+
+ // Kugel erzeugen
+ aLightGeometry.CreateSphere(aVolume, 4.0, 3.0);
+}
+
+// Selektion gueltig? D.h.: Lampe ist Selektiert un auch EINGESCHALTET
+BOOL SvxLightPrevievCtl3D::IsSelectionValid()
+{
+ if((eSelectedLight != Base3DLightNone)
+ && (aLights.GetLightObject(eSelectedLight).IsEnabled()))
+ {
+ return TRUE;
+ }
+ return FALSE;
+}
+
+// Selektierte Lampe Position in Polarkoordinaten holen/setzen
+// dabei geht Hor:[0..360.0[ und Ver:[-90..90] Grad
+void SvxLightPrevievCtl3D::GetPosition(double& rHor, double& rVer)
+{
+ if(IsSelectionValid())
+ {
+ Vector3D aDirection = aLights.GetDirection(eSelectedLight);
+ aDirection.Normalize();
+ rHor = atan2(-aDirection.X(), -aDirection.Z()) + F_PI; // 0..2PI
+ rVer = atan2(aDirection.Y(), aDirection.GetXZLength()); // -PI2..PI2
+ rHor /= F_PI180; // 0..360.0
+ rVer /= F_PI180; // -90.0..90.0
+ }
+ if(IsGeometrySelected())
+ {
+ rHor = fRotateY;
+ rVer = fRotateX;
+ }
+}
+
+void SvxLightPrevievCtl3D::SetPosition(double fHor, double fVer)
+{
+ if(IsSelectionValid())
+ {
+ Vector3D aDirection;
+ fHor = (fHor * F_PI180) - F_PI; // -PI..PI
+ fVer *= F_PI180; // -PI2..PI2
+ aDirection.X() = cos(fVer) * -sin(fHor);
+ aDirection.Y() = sin(fVer);
+ aDirection.Z() = cos(fVer) * -cos(fHor);
+ aDirection.Normalize();
+ aLights.SetDirection(aDirection, eSelectedLight);
+ Invalidate();
+ }
+ if(IsGeometrySelected())
+ {
+ SetRotation(fVer, fHor, fRotateZ);
+ }
+}
+
+// Interaktion
+void SvxLightPrevievCtl3D::MouseButtonDown( const MouseEvent& rMEvt )
+{
+ BOOL bCallParent = TRUE;
+
+ // Status switchen
+ if(rMEvt.IsLeft())
+ {
+ if(IsSelectionValid() || bGeometrySelected)
+ {
+ bMouseMoved = FALSE;
+ bCallParent = FALSE;
+ aActionStartPoint = rMEvt.GetPosPixel();
+ StartTracking();
+ }
+ else
+ {
+ // Einfacher Click ohne viel Bewegen, versuche eine
+ // Selektion
+ TrySelection(rMEvt.GetPosPixel());
+ bCallParent = FALSE;
+ }
+ }
+
+ // call parent
+ if(bCallParent)
+ SvxPreviewCtl3D::MouseButtonDown(rMEvt);
+}
+
+void SvxLightPrevievCtl3D::Tracking( const TrackingEvent& rTEvt )
+{
+ if(rTEvt.IsTrackingEnded())
+ {
+ if(rTEvt.IsTrackingCanceled())
+ {
+ if(bMouseMoved)
+ {
+ // Interaktion abbrechen
+ bMouseMoved = FALSE;
+ if(bGeometrySelected)
+ {
+ SetRotation(fSaveActionStartVer, fSaveActionStartHor, fSaveActionStartRotZ);
+ }
+ else
+ {
+ SetPosition(fSaveActionStartHor, fSaveActionStartVer);
+ }
+ if(aChangeCallback.IsSet())
+ aChangeCallback.Call(this);
+ }
+ }
+ else
+ {
+ const MouseEvent& rMEvt = rTEvt.GetMouseEvent();
+ if(bMouseMoved)
+ {
+ // Wurde interaktiv veraendert
+ }
+ else
+ {
+ // Einfacher Click ohne viel Bewegen, versuche eine
+ // Selektion
+ TrySelection(rMEvt.GetPosPixel());
+ }
+ }
+ }
+ else
+ {
+ const MouseEvent& rMEvt = rTEvt.GetMouseEvent();
+ Point aDeltaPos = rMEvt.GetPosPixel() - aActionStartPoint;
+
+ if(!bMouseMoved)
+ {
+ if(INT32(aDeltaPos.X() * aDeltaPos.X() + aDeltaPos.Y() * aDeltaPos.Y())
+ > nInteractionStartDistance)
+ {
+ if(bGeometrySelected)
+ {
+ GetRotation(fSaveActionStartVer, fSaveActionStartHor, fSaveActionStartRotZ);
+ }
+ else
+ {
+ // Start der Interaktion, Werte Sichern
+ GetPosition(fSaveActionStartHor, fSaveActionStartVer);
+ }
+ bMouseMoved = TRUE;
+ }
+ }
+
+ if(bMouseMoved)
+ {
+ if(bGeometrySelected)
+ {
+ double fNewRotX = fSaveActionStartVer - ((double)aDeltaPos.Y());
+ double fNewRotY = fSaveActionStartHor + ((double)aDeltaPos.X());
+
+ // Horizontal abgleichen
+ while(fNewRotY < 0.0)
+ fNewRotY += 360.0;
+ while(fNewRotY >= 360.0)
+ fNewRotY -= 360.0;
+
+ // Vertikal cutten
+ if(fNewRotX < -90.0)
+ fNewRotX = -90.0;
+ if(fNewRotX > 90.0)
+ fNewRotX = 90.0;
+
+ SetRotation(fNewRotX, fNewRotY, fSaveActionStartRotZ);
+
+ if(aChangeCallback.IsSet())
+ aChangeCallback.Call(this);
+ }
+ else
+ {
+ // Interaktion im vollen Gange
+ double fNewPosHor = fSaveActionStartHor + ((double)aDeltaPos.X());
+ double fNewPosVer = fSaveActionStartVer - ((double)aDeltaPos.Y());
+
+ // Horizontal abgleichen
+ while(fNewPosHor < 0.0)
+ fNewPosHor += 360.0;
+ while(fNewPosHor >= 360.0)
+ fNewPosHor -= 360.0;
+
+ // Vertikal cutten
+ if(fNewPosVer < -90.0)
+ fNewPosVer = -90.0;
+ if(fNewPosVer > 90.0)
+ fNewPosVer = 90.0;
+
+ SetPosition(fNewPosHor, fNewPosVer);
+
+ if(aChangeCallback.IsSet())
+ aChangeCallback.Call(this);
+ }
+ }
+ }
+}
+
+// Selektion einer Lampe
+void SvxLightPrevievCtl3D::TrySelection(Point aPosPixel)
+{
+ BOOL bNewSelection(FALSE);
+ Base3DLightNumber eNew = Base3DLightNone;
+
+ for(UINT16 a=0;a<BASE3D_MAX_NUMBER_LIGHTS;a++)
+ {
+ Base3DLightNumber eActualLight = (Base3DLightNumber)(Base3DLight0 + a);
+ if(aLights.IsEnabled(eActualLight))
+ {
+ Vector3D aLightPos = aLights.GetDirection(eActualLight);
+ aLightPos.Normalize();
+ aLightPos *= GetObjectRadius() + GetDistanceToObject();
+ Vector3D aScreenPos = aCameraSet.ObjectToViewCoor(aLightPos);
+ Point aScreenPosPixel((long)(aScreenPos.X() + 0.5), (long)(aScreenPos.Y() + 0.5));
+ aScreenPosPixel = LogicToPixel(aScreenPosPixel);
+ aScreenPosPixel -= aPosPixel;
+ INT32 nDistance = (aScreenPosPixel.X() * aScreenPosPixel.X())
+ + (aScreenPosPixel.Y() * aScreenPosPixel.Y());
+ if(nDistance < nInteractionStartDistance)
+ {
+ eNew = eActualLight;
+ bNewSelection = TRUE;
+ }
+ }
+ }
+
+ if(bNewSelection && eSelectedLight != eNew)
+ {
+ // Auswaehlen
+ SelectLight(eNew);
+
+ // Falls tatsaechlich eine andere Lampe selektiert
+ // wurde, rufe den entsprechenden Callback
+ if(aSelectionChangeCallback.IsSet())
+ aSelectionChangeCallback.Call(this);
+ }
+ else
+ {
+ // Punkt in logische Koordinaten umrechnen
+ Point aPosLogic = PixelToLogic(aPosPixel);
+
+ // Punkte generieren
+ Vector3D aHitFront(aPosLogic.X(), aPosLogic.Y(), 0.0);
+ Vector3D aHitBack(aPosLogic.X(), aPosLogic.Y(), ZBUFFER_DEPTH_RANGE);
+
+ // Umrechnen
+ aHitFront = aCameraSet.ViewToObjectCoor(aHitFront);
+ aHitBack = aCameraSet.ViewToObjectCoor(aHitBack);
+
+ // Eventuell die Geometrie des Beispielobjektes waehlen
+ if(aGeometry.CheckHit(aHitFront, aHitBack, 0))
+ {
+ // Auswaehlen
+ SelectGeometry();
+
+ // Falls tatsaechlich eine andere Lampe selektiert
+ // wurde, rufe den entsprechenden Callback
+ if(aSelectionChangeCallback.IsSet())
+ aSelectionChangeCallback.Call(this);
+ }
+ }
+}
+
+/*************************************************************************
+|*
+|* 3D Light Control Konstruktor
+|*
+\************************************************************************/
+
+SvxLightCtl3D::SvxLightCtl3D( Window* pParent, const ResId& rResId)
+: Control(pParent, rResId),
+ aLightControl(this, 0),
+ aHorScroller(this, WB_HORZ | WB_DRAG),
+ aVerScroller(this, WB_VERT | WB_DRAG),
+ aSwitcher(this, 0)
+{
+ // Members initialisieren
+ Init();
+}
+
+SvxLightCtl3D::SvxLightCtl3D( Window* pParent, WinBits nStyle )
+: Control(pParent, nStyle),
+ aLightControl(this, 0),
+ aHorScroller(this, WB_HORZ | WB_DRAG),
+ aVerScroller(this, WB_VERT | WB_DRAG),
+ aSwitcher(this, 0)
+{
+ // Members initialisieren
+ Init();
+}
+
+void SvxLightCtl3D::Init()
+{
+ // Lokale Parameter setzen
+ bSphereUsed = TRUE;
+ bVectorValid = FALSE;
+
+ // Light preview
+ aLightControl.Show();
+ aLightControl.SetChangeCallback( LINK(this, SvxLightCtl3D, InternalInteractiveChange) );
+ aLightControl.SetSelectionChangeCallback( LINK(this, SvxLightCtl3D, InternalSelectionChange) );
+
+ // Horiz Scrollbar
+ aHorScroller.Show();
+ aHorScroller.SetRange(Range(0, 36000));
+ aHorScroller.SetLineSize(100);
+ aHorScroller.SetPageSize(1000);
+ aHorScroller.SetScrollHdl( LINK(this, SvxLightCtl3D, ScrollBarMove) );
+
+ // Vert Scrollbar
+ aVerScroller.Show();
+ aVerScroller.SetRange(Range(0, 18000));
+ aVerScroller.SetLineSize(100);
+ aVerScroller.SetPageSize(1000);
+ aVerScroller.SetScrollHdl( LINK(this, SvxLightCtl3D, ScrollBarMove) );
+
+ // Switch Button
+ aSwitcher.Show();
+ aSwitcher.SetClickHdl( LINK(this, SvxLightCtl3D, ButtonPress) );
+
+ // Selektion klaeren
+ CheckSelection();
+
+ // Neues Layout
+ NewLayout();
+}
+
+SvxLightCtl3D::~SvxLightCtl3D()
+{
+}
+
+void SvxLightCtl3D::SetVector(const Vector3D& rNew)
+{
+ aVector = rNew;
+ aVector.Normalize();
+ bVectorValid = TRUE;
+}
+
+const Vector3D& SvxLightCtl3D::GetVector()
+{
+ // Grobe Anbindung an altes Verhalten, um eine Reaktion zu haben
+ aVector = aLightControl.GetLightGroup()->GetDirection(aLightControl.GetSelectedLight());
+ aVector.Normalize();
+ return aVector;
+}
+
+void SvxLightCtl3D::Resize()
+{
+ // call parent
+ Control::Resize();
+
+ // Neues Layout
+ NewLayout();
+}
+
+void SvxLightCtl3D::NewLayout()
+{
+ // Layout members
+ Size aSize = GetOutputSizePixel();
+ long nScrollSize = aHorScroller.GetSizePixel().Height();
+
+ // Preview Fenster
+ Point aPoint(0, 0);
+ Size aDestSize(aSize.Width() - nScrollSize, aSize.Height() - nScrollSize);
+ aLightControl.SetPosSizePixel(aPoint, aDestSize);
+
+ // Horizontaler Scrollbar
+ aPoint.Y() = aSize.Height() - nScrollSize;
+ aDestSize.Height() = nScrollSize;
+ aHorScroller.SetPosSizePixel(aPoint, aDestSize);
+
+ // Vertikaler Scrollbar
+ aPoint.X() = aSize.Width() - nScrollSize;
+ aPoint.Y() = 0;
+ aDestSize.Width() = nScrollSize;
+ aDestSize.Height() = aSize.Height() - nScrollSize;
+ aVerScroller.SetPosSizePixel(aPoint, aDestSize);
+
+ // Button
+ aPoint.Y() = aSize.Height() - nScrollSize;
+ aDestSize.Height() = nScrollSize;
+ aSwitcher.SetPosSizePixel(aPoint, aDestSize);
+}
+
+// Selektion auf Gueltigkeit pruefen
+void SvxLightCtl3D::CheckSelection()
+{
+ BOOL bSelectionValid = (aLightControl.IsSelectionValid()
+ || aLightControl.IsGeometrySelected());
+ aHorScroller.Enable(bSelectionValid);
+ aVerScroller.Enable(bSelectionValid);
+
+ if(bSelectionValid)
+ {
+ double fHor, fVer;
+ aLightControl.GetPosition(fHor, fVer);
+ aHorScroller.SetThumbPos( INT32(fHor * 100.0) );
+ aVerScroller.SetThumbPos( 18000 - INT32((fVer + 90.0) * 100.0) );
+ }
+}
+
+IMPL_LINK( SvxLightCtl3D, ScrollBarMove, void*, pNil)
+{
+ INT32 nHor = aHorScroller.GetThumbPos();
+ INT32 nVer = aVerScroller.GetThumbPos();
+
+ aLightControl.SetPosition(
+ ((double)nHor) / 100.0,
+ ((double)((18000 - nVer) - 9000)) / 100.0);
+
+ if(aUserInteractiveChangeCallback.IsSet())
+ aUserInteractiveChangeCallback.Call(this);
+
+ // ...um Kompatibel zu bleiben, kann spaeter wieder raus
+ //InteractiveChange(NULL);
+
+ return NULL;
+}
+
+IMPL_LINK( SvxLightCtl3D, ButtonPress, void*, pNil)
+{
+ aLightControl.SetGeometry(bSphereUsed);
+ bSphereUsed = !bSphereUsed;
+ return NULL;
+}
+
+IMPL_LINK( SvxLightCtl3D, InternalInteractiveChange, void*, pNil)
+{
+ double fHor, fVer;
+
+ aLightControl.GetPosition(fHor, fVer);
+ aHorScroller.SetThumbPos( INT32(fHor * 100.0) );
+ aVerScroller.SetThumbPos( 18000 - INT32((fVer + 90.0) * 100.0) );
+
+ if(aUserInteractiveChangeCallback.IsSet())
+ aUserInteractiveChangeCallback.Call(this);
+
+ // ...um Kompatibel zu bleiben, kann spaeter wieder raus
+ //InteractiveChange(NULL);
+
+ return NULL;
+}
+
+IMPL_LINK( SvxLightCtl3D, InternalSelectionChange, void*, pNil)
+{
+ CheckSelection();
+
+ if(aUserSelectionChangeCallback.IsSet())
+ aUserSelectionChangeCallback.Call(this);
+
+ // ...um Kompatibel zu bleiben, kann spaeter wieder raus
+ //SelectionChange(NULL);
+
+ return NULL;
+}
+
+// ...um Kompatibel zu bleiben, kann spaeter wieder raus
+/*
+IMPL_LINK( SvxLightCtl3D, InteractiveChange, void*, pNil)
+{
+ return NULL;
+} */
+
+/*
+IMPL_LINK( SvxLightCtl3D, SelectionChange, void*, pNil)
+{
+ return NULL;
+}*/
+
+
diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx
new file mode 100644
index 000000000000..72cf9375751e
--- /dev/null
+++ b/svx/source/dialog/dlgctrl.cxx
@@ -0,0 +1,1903 @@
+/*************************************************************************
+ *
+ * $RCSfile: dlgctrl.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:08 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+// include ---------------------------------------------------------------
+
+#ifndef _SHL_HXX //autogen
+#include <tools/shl.hxx>
+#endif
+#ifndef _APP_HXX //autogen
+#include <vcl/svapp.hxx>
+#endif
+#pragma hdrstop
+
+#include "xoutx.hxx"
+#include "xtable.hxx"
+#include "xpool.hxx"
+
+#include "dialogs.hrc"
+#include "dlgctrl.hxx"
+#include "dialmgr.hxx"
+
+#ifndef _SV_POLY_HXX
+#include <vcl/poly.hxx>
+#endif
+#ifndef _SV_REGION_HXX
+#include <vcl/region.hxx>
+#endif
+#ifndef _SV_GRADIENT_HXX
+#include <vcl/gradient.hxx>
+#endif
+#ifndef _SV_HATCH_HXX
+#include <vcl/hatch.hxx>
+#endif
+
+
+/*************************************************************************
+|*
+|* Control zur Darstellung und Auswahl der Eckpunkte (und Mittelpunkt)
+|* eines Objekts
+|*
+\************************************************************************/
+
+SvxRectCtl::SvxRectCtl( Window* pParent, const ResId& rResId, RECT_POINT eRpt,
+ USHORT nBorder, USHORT nCircle, CTL_STYLE eStyle ) :
+
+ Control( pParent, rResId ),
+
+ eDefRP ( eRpt ),
+ nBorderWidth( nBorder ),
+ nRadius ( nCircle),
+ m_nState ( 0 ),
+ eCS ( eStyle )
+{
+
+ pBitmap = new Bitmap( SVX_RES(RID_SVXCTRL_RECTBTNS) );
+
+ SetMapMode( MAP_100TH_MM );
+ aSize = GetOutputSize();
+
+ switch( eCS )
+ {
+ case CS_RECT:
+ case CS_ANGLE:
+ case CS_SHADOW:
+ aPtLT = Point( 0 + nBorderWidth, 0 + nBorderWidth );
+ aPtMT = Point( aSize.Width() / 2, 0 + nBorderWidth );
+ aPtRT = Point( aSize.Width() - nBorderWidth, 0 + nBorderWidth );
+
+ aPtLM = Point( 0 + nBorderWidth, aSize.Height() / 2 );
+ aPtMM = Point( aSize.Width() / 2, aSize.Height() / 2 );
+ aPtRM = Point( aSize.Width() - nBorderWidth, aSize.Height() / 2 );
+
+ aPtLB = Point( 0 + nBorderWidth, aSize.Height() - nBorderWidth );
+ aPtMB = Point( aSize.Width() / 2, aSize.Height() - nBorderWidth );
+ aPtRB = Point( aSize.Width() - nBorderWidth, aSize.Height() - nBorderWidth );
+ break;
+
+ case CS_LINE:
+ aPtLT = Point( 0 + 3 * nBorderWidth, 0 + nBorderWidth );
+ aPtMT = Point( aSize.Width() / 2, 0 + nBorderWidth );
+ aPtRT = Point( aSize.Width() - 3 * nBorderWidth, 0 + nBorderWidth );
+
+ aPtLM = Point( 0 + 3 * nBorderWidth, aSize.Height() / 2 );
+ aPtMM = Point( aSize.Width() / 2, aSize.Height() / 2 );
+ aPtRM = Point( aSize.Width() - 3 * nBorderWidth, aSize.Height() / 2 );
+
+ aPtLB = Point( 0 + 3 * nBorderWidth, aSize.Height() - nBorderWidth );
+ aPtMB = Point( aSize.Width() / 2, aSize.Height() - nBorderWidth );
+ aPtRB = Point( aSize.Width() - 3 * nBorderWidth, aSize.Height() - nBorderWidth );
+ break;
+ }
+ Reset();
+ InitSettings( TRUE, TRUE );
+}
+
+// -----------------------------------------------------------------------
+
+SvxRectCtl::~SvxRectCtl()
+{
+ delete pBitmap;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxRectCtl::InitSettings( BOOL bForeground, BOOL bBackground )
+{
+ const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
+
+ if ( bForeground )
+ {
+ Color aTextColor = rStyleSettings.GetWindowTextColor();
+
+ if ( IsControlForeground() )
+ aTextColor = GetControlForeground();
+ SetTextColor( aTextColor );
+ }
+
+ if ( bBackground )
+ {
+ if ( IsControlBackground() )
+ SetBackground( GetControlBackground() );
+ else
+ SetBackground( rStyleSettings.GetWindowColor() );
+ }
+ Invalidate();
+}
+
+/*************************************************************************
+|*
+|* Das angeklickte Rechteck (3 x 3) wird ermittelt und der Parent (Dialog)
+|* wird benachrichtigt, dass der Punkt geaendert wurde
+|*
+\************************************************************************/
+
+void SvxRectCtl::MouseButtonDown( const MouseEvent& rMEvt )
+{
+ Point aPt = PixelToLogic( rMEvt.GetPosPixel() );
+ Point aPtLast = aPtNew;
+
+ if( (m_nState & CS_NOHORZ) == 0 )
+ {
+ if( aPt.X() < aSize.Width() / 3 )
+ aPtNew.X() = aPtLT.X();
+ else if( aPt.X() < aSize.Width() * 2 / 3)
+ aPtNew.X() = aPtMM.X();
+ else
+ aPtNew.X() = aPtRB.X();
+ }
+ else
+ {
+ aPtNew.X() = aPtMM.X();
+ }
+
+ if( (m_nState & CS_NOVERT) == 0 )
+ {
+ if( aPt.Y() < aSize.Height() / 3)
+ aPtNew.Y() = aPtLT.Y();
+ else if( aPt.Y() < aSize.Height() * 2 / 3)
+ aPtNew.Y() = aPtMM.Y();
+ else
+ aPtNew.Y() = aPtRB.Y();
+ }
+ else
+ {
+ aPtNew.Y() = aPtMM.Y();
+ }
+
+ if( aPtNew == aPtMM && ( eCS == CS_SHADOW || eCS == CS_ANGLE ) )
+ {
+ aPtNew = aPtLast;
+ }
+ else
+ {
+ Invalidate( Rectangle( aPtLast - Point( nRadius, nRadius ),
+ aPtLast + Point( nRadius, nRadius ) ) );
+ Invalidate( Rectangle( aPtNew - Point( nRadius, nRadius ),
+ aPtNew + Point( nRadius, nRadius ) ) );
+ eRP = GetRPFromPoint( aPtNew );
+
+ if( WINDOW_TABPAGE == GetParent()->GetType() )
+ ( (SvxTabPage*) GetParent() )->PointChanged( this, eRP );
+ }
+}
+
+// -----------------------------------------------------------------------
+
+void SvxRectCtl::StateChanged( StateChangedType nType )
+{
+ if ( nType == STATE_CHANGE_CONTROLFOREGROUND )
+ InitSettings( TRUE, FALSE );
+ else if ( nType == STATE_CHANGE_CONTROLBACKGROUND )
+ InitSettings( FALSE, TRUE );
+
+ Window::StateChanged( nType );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxRectCtl::DataChanged( const DataChangedEvent& rDCEvt )
+{
+ if ( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) )
+ InitSettings( TRUE, TRUE );
+ else
+ Window::DataChanged( rDCEvt );
+}
+
+/*************************************************************************
+|*
+|* Zeichnet das Control (Rechteck mit 9 Kreisen)
+|*
+\************************************************************************/
+
+void SvxRectCtl::Paint( const Rectangle& rRect )
+{
+ Point aPtDiff( PixelToLogic( Point( 1, 1 ) ) );
+
+ const StyleSettings& rStyles = Application::GetSettings().GetStyleSettings();
+
+ SetLineColor( rStyles.GetDialogColor() );
+ SetFillColor( rStyles.GetDialogColor() );
+ DrawRect( Rectangle( Point(0,0), GetOutputSize() ) );
+
+ if( IsEnabled() )
+ SetLineColor( rStyles.GetLabelTextColor() );
+ else
+ SetLineColor( rStyles.GetShadowColor() );
+
+ SetFillColor();
+
+ switch( eCS )
+ {
+
+ case CS_RECT:
+ case CS_SHADOW:
+ if( !IsEnabled() )
+ {
+ Color aOldCol = GetLineColor();
+ SetLineColor( rStyles.GetLightColor() );
+ DrawRect( Rectangle( aPtLT + aPtDiff, aPtRB + aPtDiff ) );
+ SetLineColor( aOldCol );
+ }
+ DrawRect( Rectangle( aPtLT, aPtRB ) );
+ break;
+
+ case CS_LINE:
+ if( !IsEnabled() )
+ {
+ Color aOldCol = GetLineColor();
+ SetLineColor( rStyles.GetLightColor() );
+ DrawLine( aPtLM - Point( 2 * nBorderWidth, 0) + aPtDiff,
+ aPtRM + Point( 2 * nBorderWidth, 0 ) + aPtDiff );
+ SetLineColor( aOldCol );
+ }
+ DrawLine( aPtLM - Point( 2 * nBorderWidth, 0),
+ aPtRM + Point( 2 * nBorderWidth, 0 ) );
+ break;
+
+ case CS_ANGLE:
+ if( !IsEnabled() )
+ {
+ Color aOldCol = GetLineColor();
+ SetLineColor( rStyles.GetLightColor() );
+ DrawLine( aPtLT + aPtDiff, aPtRB + aPtDiff );
+ DrawLine( aPtLB + aPtDiff, aPtRT + aPtDiff );
+ DrawLine( aPtLM + aPtDiff, aPtRM + aPtDiff );
+ DrawLine( aPtMT + aPtDiff, aPtMB + aPtDiff );
+ SetLineColor( aOldCol );
+ }
+ DrawLine( aPtLT, aPtRB );
+ DrawLine( aPtLB, aPtRT );
+ DrawLine( aPtLM, aPtRM );
+ DrawLine( aPtMT, aPtMB );
+ break;
+
+ default:
+ break;
+ }
+ SetFillColor( GetBackground().GetColor() );
+
+ Size aBtnSize( 11, 11 );
+ Size aDstBtnSize( PixelToLogic( aBtnSize ) );
+ Point aToCenter( aDstBtnSize.Width() >> 1, aDstBtnSize.Height() >> 1);
+ Point aBtnPnt1( IsEnabled()?0:22,0 );
+ Point aBtnPnt2( 11,0 );
+ Point aBtnPnt3( 22,0 );
+
+ BOOL bNoHorz = (m_nState & CS_NOHORZ) != 0;
+ BOOL bNoVert = (m_nState & CS_NOVERT) != 0;
+
+ // set bitmap-colors
+ long aTempAry1[(7*sizeof(Color))/sizeof(long)];
+ long aTempAry2[(7*sizeof(Color))/sizeof(long)];
+ Color* pColorAry1 = (Color*)aTempAry1;
+ Color* pColorAry2 = (Color*)aTempAry2;
+ pColorAry1[0] = Color( 0xC0, 0xC0, 0xC0 ); // light-gray
+ pColorAry1[1] = Color( 0xFF, 0xFF, 0x00 ); // yellow
+ pColorAry1[2] = Color( 0xFF, 0xFF, 0xFF ); // white
+ pColorAry1[3] = Color( 0x80, 0x80, 0x80 ); // dark-gray
+ pColorAry1[4] = Color( 0x00, 0x00, 0x00 ); // black
+ pColorAry1[5] = Color( 0x00, 0xFF, 0x00 ); // green
+ pColorAry1[6] = Color( 0x00, 0x00, 0xFF ); // blue
+ pColorAry2[0] = rStyles.GetFaceColor();
+ pColorAry2[1] = rStyles.GetWindowColor();
+ pColorAry2[2] = rStyles.GetLightColor();
+ pColorAry2[3] = rStyles.GetShadowColor();
+ pColorAry2[4] = rStyles.GetDarkShadowColor();
+ pColorAry2[5] = rStyles.GetWindowTextColor();
+ pColorAry2[6] = rStyles.GetDialogColor();
+
+ pBitmap->Replace( pColorAry1, pColorAry2, 7, NULL );
+
+ DrawBitmap( aPtLT - aToCenter, aDstBtnSize, (bNoHorz | bNoVert)?aBtnPnt3:aBtnPnt1, aBtnSize, *pBitmap );
+ DrawBitmap( aPtMT - aToCenter, aDstBtnSize, bNoVert?aBtnPnt3:aBtnPnt1, aBtnSize, *pBitmap );
+ DrawBitmap( aPtRT - aToCenter, aDstBtnSize, (bNoHorz | bNoVert)?aBtnPnt3:aBtnPnt1, aBtnSize, *pBitmap );
+
+ DrawBitmap( aPtLM - aToCenter, aDstBtnSize, bNoHorz?aBtnPnt3:aBtnPnt1, aBtnSize, *pBitmap );
+
+ // Mittelpunkt bei Rechteck und Linie
+ if( eCS == CS_RECT || eCS == CS_LINE )
+ DrawBitmap( aPtMM - aToCenter, aDstBtnSize, aBtnPnt1, aBtnSize, *pBitmap );
+
+ DrawBitmap( aPtRM - aToCenter, aDstBtnSize, bNoHorz?aBtnPnt3:aBtnPnt1, aBtnSize, *pBitmap );
+
+ DrawBitmap( aPtLB - aToCenter, aDstBtnSize, (bNoHorz | bNoVert)?aBtnPnt3:aBtnPnt1, aBtnSize, *pBitmap );
+ DrawBitmap( aPtMB - aToCenter, aDstBtnSize, bNoVert?aBtnPnt3:aBtnPnt1, aBtnSize, *pBitmap );
+ DrawBitmap( aPtRB - aToCenter, aDstBtnSize, (bNoHorz | bNoVert)?aBtnPnt3:aBtnPnt1, aBtnSize, *pBitmap );
+
+ if( IsEnabled() ) // && eCS != CS_ANGLE )
+ {
+ DrawBitmap( aPtNew - aToCenter, aDstBtnSize, aBtnPnt2, aBtnSize, *pBitmap );
+ }
+}
+
+/*************************************************************************
+|*
+|* Konvertiert RECT_POINT in Point
+|*
+\************************************************************************/
+
+Point SvxRectCtl::GetPointFromRP( RECT_POINT eRP) const
+{
+ switch( eRP )
+ {
+ case RP_LT: return aPtLT;
+ case RP_MT: return aPtMT;
+ case RP_RT: return aPtRT;
+ case RP_LM: return aPtLM;
+ case RP_MM: return aPtMM;
+ case RP_RM: return aPtRM;
+ case RP_LB: return aPtLB;
+ case RP_MB: return aPtMB;
+ case RP_RB: return aPtRB;
+ }
+ return( aPtMM ); // default
+}
+
+/*************************************************************************
+|*
+|* Konvertiert Point in RECT_POINT
+|*
+\************************************************************************/
+
+RECT_POINT SvxRectCtl::GetRPFromPoint( Point aPt ) const
+{
+ if ( aPt == aPtLT) return RP_LT;
+ else if( aPt == aPtMT) return RP_MT;
+ else if( aPt == aPtRT) return RP_RT;
+ else if( aPt == aPtLM) return RP_LM;
+ else if( aPt == aPtRM) return RP_RM;
+ else if( aPt == aPtLB) return RP_LB;
+ else if( aPt == aPtMB) return RP_MB;
+ else if( aPt == aPtRB) return RP_RB;
+
+ else
+ return RP_MM; // default
+}
+
+/*************************************************************************
+|*
+|* Bewirkt den Ursprungszustand des Controls
+|*
+\************************************************************************/
+
+void SvxRectCtl::Reset()
+{
+ aPtNew = GetPointFromRP( eDefRP );
+ eRP = eDefRP;
+ Invalidate();
+}
+
+/*************************************************************************
+|*
+|* Gibt den aktuell ausgewaehlten RECT_POINT zurck
+|*
+\************************************************************************/
+
+RECT_POINT SvxRectCtl::GetActualRP() const
+{
+ return( eRP );
+}
+
+/*************************************************************************
+|*
+|* Gibt den aktuell ausgewaehlten RECT_POINT zurck
+|*
+\************************************************************************/
+
+void SvxRectCtl::SetActualRP( RECT_POINT eNewRP )
+{
+ Point aPtLast = aPtNew;
+ aPtNew = GetPointFromRP( eNewRP );
+
+ if( (m_nState & CS_NOHORZ) != 0 )
+ aPtNew.X() = aPtMM.X();
+
+ if( (m_nState & CS_NOVERT) != 0 )
+ aPtNew.Y() = aPtMM.Y();
+
+ eNewRP = GetRPFromPoint( aPtNew );
+
+ eDefRP = eNewRP;
+ eRP = eNewRP;
+ Invalidate( Rectangle( aPtLast - Point( nRadius, nRadius ),
+ aPtLast + Point( nRadius, nRadius ) ) );
+ Invalidate( Rectangle( aPtNew - Point( nRadius, nRadius ),
+ aPtNew + Point( nRadius, nRadius ) ) );
+}
+
+void SvxRectCtl::SetState( CTL_STATE nState )
+{
+ m_nState = nState;
+
+ Point aPtLast( GetPointFromRP( eRP ) );
+ Point aPtNew( aPtLast );
+
+ if( (m_nState & CS_NOHORZ) != 0 )
+ aPtNew.X() = aPtMM.X();
+
+ if( (m_nState & CS_NOVERT) != 0 )
+ aPtNew.Y() = aPtMM.Y();
+
+ eRP = GetRPFromPoint( aPtNew );
+ Invalidate();
+
+ if( WINDOW_TABPAGE == GetParent()->GetType() )
+ ( (SvxTabPage*) GetParent() )->PointChanged( this, eRP );
+}
+
+/*************************************************************************
+|*
+|* Konstruktor ohne Size-Parameter
+|*
+\************************************************************************/
+
+SvxAngleCtl::SvxAngleCtl( Window* pParent, const ResId& rResId ) :
+
+ SvxRectCtl( pParent, rResId ),
+
+ aFont( Application::GetSettings().GetStyleSettings().GetAppFont() )
+{
+ aFontSize = Size( 250, 400 );
+ Initialize();
+}
+
+/*************************************************************************
+|*
+|* Konstruktor mit Size-Parameter
+|*
+\************************************************************************/
+
+SvxAngleCtl::SvxAngleCtl( Window* pParent, const ResId& rResId, Size aSize ) :
+
+ SvxRectCtl( pParent, rResId ),
+
+ aFont( Application::GetSettings().GetStyleSettings().GetAppFont() )
+{
+ aFontSize = aSize;
+ Initialize();
+}
+
+/*************************************************************************
+|*
+|* Initialisierung
+|*
+\************************************************************************/
+
+void SvxAngleCtl::Initialize()
+{
+ bPositive = TRUE;
+
+ // aFont.SetName( "Helvetica" );
+ aFont.SetSize( aFontSize );
+ aFont.SetWeight( WEIGHT_NORMAL );
+ aFont.SetTransparent( FALSE );
+
+ SetFont( aFont );
+}
+
+/*************************************************************************
+|*
+|* Zeichnet das (Mini-)Koordinatensystem
+|*
+\************************************************************************/
+
+void SvxAngleCtl::Paint( const Rectangle& rRect )
+{
+ SetLineColor( Color( COL_BLACK ) ); // PEN_DOT ???
+ DrawLine( aPtLT - Point( 0, 0), aPtRB + Point( 0, 0 ) );
+ DrawLine( aPtLB - Point( 0, 0), aPtRT + Point( 0, 0 ) );
+
+ SetLineColor( Color( COL_BLACK ) );
+ DrawLine( aPtLM - Point( 0, 0), aPtRM + Point( 0, 0 ) );
+ DrawLine( aPtMT - Point( 0, 0), aPtMB + Point( 0, 0 ) );
+
+ Point aDiff(aFontSize.Width() / 2, aFontSize.Height() / 2);
+
+ DrawText( aPtLT - aDiff, UniString::CreateFromAscii(
+ RTL_CONSTASCII_STRINGPARAM( "135" ) ) );
+ DrawText( aPtLM - aDiff, UniString::CreateFromAscii(
+ RTL_CONSTASCII_STRINGPARAM( "180" ) ) );
+
+ if ( bPositive )
+ DrawText( aPtLB - aDiff, UniString::CreateFromAscii(
+ RTL_CONSTASCII_STRINGPARAM( "225" ) ) );
+ else
+ DrawText( aPtLB - aDiff, UniString::CreateFromAscii(
+ RTL_CONSTASCII_STRINGPARAM( "-135" ) ) );
+
+ aDiff.X() = aFontSize.Width();
+ DrawText( aPtMT - aDiff, UniString::CreateFromAscii(
+ RTL_CONSTASCII_STRINGPARAM( "90" ) ) );
+ DrawText( aPtRT - aDiff, UniString::CreateFromAscii(
+ RTL_CONSTASCII_STRINGPARAM( "45" ) ) );
+ aDiff.X() = aDiff .X() * 3 / 2;
+
+ if ( bPositive )
+ DrawText( aPtMB - aDiff, UniString::CreateFromAscii(
+ RTL_CONSTASCII_STRINGPARAM( "270" ) ) );
+ else
+ DrawText( aPtMB - aDiff, UniString::CreateFromAscii(
+ RTL_CONSTASCII_STRINGPARAM( "-90" ) ) );
+
+ DrawText( aPtRM - Point( 0, aDiff.Y() ), UniString::CreateFromAscii(
+ RTL_CONSTASCII_STRINGPARAM( "0" ) ) );
+ aDiff.X() = aFontSize.Width() * 2;
+
+ if ( bPositive )
+ DrawText( aPtRB - aDiff, UniString::CreateFromAscii(
+ RTL_CONSTASCII_STRINGPARAM( "315" ) ) );
+ else
+ DrawText( aPtRB - aDiff, UniString::CreateFromAscii(
+ RTL_CONSTASCII_STRINGPARAM( "-45" ) ) );
+}
+
+/*************************************************************************
+|*
+|* Control zum Editieren von Bitmaps
+|*
+\************************************************************************/
+
+SvxPixelCtl::SvxPixelCtl( Window* pParent, const ResId& rResId, USHORT nNumber ) :
+ Control ( pParent, rResId ),
+ nLines ( nNumber ),
+ bPaintable ( TRUE )
+{
+ // SetMapMode( MAP_100TH_MM );
+ aRectSize = GetOutputSize();
+
+ SetPixelColor( Color( COL_BLACK ) );
+ SetBackgroundColor( Color( COL_WHITE ) );
+ SetLineColor( Application::GetSettings().GetStyleSettings().GetShadowColor() );
+
+ nSquares = nLines * nLines;
+ pPixel = new USHORT[ nSquares ];
+
+ // Reset(); <-- wird vom Dialog aufgerufen
+}
+
+/*************************************************************************
+|*
+|* Destruktor dealociert dyn. Array
+|*
+\************************************************************************/
+
+SvxPixelCtl::~SvxPixelCtl( )
+{
+ delete []pPixel;
+}
+
+/*************************************************************************
+|*
+|* Wechselt die Vordergrund- ,bzw. Hintergrundfarbe
+|*
+\************************************************************************/
+
+void SvxPixelCtl::ChangePixel( USHORT nPixel )
+{
+ if( *( pPixel + nPixel) == 0 )
+ *( pPixel + nPixel) = 1; // koennte erweitert werden auf mehrere Farben
+ else
+ *( pPixel + nPixel) = 0;
+}
+
+/*************************************************************************
+|*
+|* Das angeklickte Rechteck wird ermittelt um die Farbe zu wechseln
+|*
+\************************************************************************/
+
+void SvxPixelCtl::MouseButtonDown( const MouseEvent& rMEvt )
+{
+ Point aPt = PixelToLogic( rMEvt.GetPosPixel() );
+ Point aPtTl, aPtBr;
+ USHORT nX, nY;
+
+ nX = (USHORT) ( aPt.X() * nLines / aRectSize.Width() );
+ nY = (USHORT) ( aPt.Y() * nLines / aRectSize.Height() );
+
+ ChangePixel( nX + nY * nLines );
+
+ aPtTl.X() = aRectSize.Width() * nX / nLines + 1;
+ aPtBr.X() = aRectSize.Width() * (nX + 1) / nLines - 1;
+ aPtTl.Y() = aRectSize.Height() * nY / nLines + 1;
+ aPtBr.Y() = aRectSize.Height() * (nY + 1) / nLines - 1;
+
+ Invalidate( Rectangle( aPtTl, aPtBr ) );
+
+ if( WINDOW_TABPAGE == GetParent()->GetType() )
+ ( (SvxTabPage*) GetParent() )->PointChanged( this, RP_MM ); // RectPoint ist dummy
+}
+
+/*************************************************************************
+|*
+|* Zeichnet das Control (Rechteck mit 9 Kreisen)
+|*
+\************************************************************************/
+
+void SvxPixelCtl::Paint( const Rectangle& rRect )
+{
+ USHORT i, j, nTmp;
+ Point aPtTl, aPtBr;
+
+ if( bPaintable )
+ {
+ // Linien Zeichnen
+ Control::SetLineColor( aLineColor );
+ for( i = 1; i < nLines; i++)
+ {
+ // horizontal
+ nTmp = (USHORT) ( aRectSize.Height() * i / nLines );
+ DrawLine( Point( 0, nTmp ), Point( aRectSize.Width(), nTmp ) );
+ // vertikal
+ nTmp = (USHORT) ( aRectSize.Width() * i / nLines );
+ DrawLine( Point( nTmp, 0 ), Point( nTmp, aRectSize.Height() ) );
+ }
+
+ // Rechtecke (Quadrate) zeichnen
+ Control::SetLineColor();
+ USHORT nLastPixel = *pPixel ? 0 : 1;
+
+ for( i = 0; i < nLines; i++)
+ {
+ aPtTl.Y() = aRectSize.Height() * i / nLines + 1;
+ aPtBr.Y() = aRectSize.Height() * (i + 1) / nLines - 1;
+
+ for( j = 0; j < nLines; j++)
+ {
+ aPtTl.X() = aRectSize.Width() * j / nLines + 1;
+ aPtBr.X() = aRectSize.Width() * (j + 1) / nLines - 1;
+
+ if ( *( pPixel + i * nLines + j ) != nLastPixel )
+ {
+ nLastPixel = *( pPixel + i * nLines + j );
+ // Farbe wechseln: 0 -> Hintergrundfarbe
+ SetFillColor( nLastPixel ? aPixelColor : aBackgroundColor );
+ }
+ DrawRect( Rectangle( aPtTl, aPtBr ) );
+ }
+ }
+ } // bPaintable
+ else
+ {
+ SetBackground( Wallpaper( Color( COL_LIGHTGRAY ) ) );
+ Control::SetLineColor( Color( COL_LIGHTRED ) );
+ DrawLine( Point( 0, 0 ), Point( aRectSize.Width(), aRectSize.Height() ) );
+ DrawLine( Point( 0, aRectSize.Height() ), Point( aRectSize.Width(), 0 ) );
+ }
+}
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+void SvxPixelCtl::SetXBitmap( const XOBitmap& rXBmp )
+{
+ if( rXBmp.GetBitmapType() == XBITMAP_8X8 )
+ {
+ aPixelColor = rXBmp.GetPixelColor();
+ aBackgroundColor = rXBmp.GetBackgroundColor();
+
+ USHORT* pArray = rXBmp.GetPixelArray();
+
+ for( USHORT i = 0; i < nSquares; i++ )
+ *( pPixel + i ) = *( pArray + i );
+ }
+}
+
+/*************************************************************************
+|*
+|* Gibt ein bestimmtes Pixel zurueck
+|*
+\************************************************************************/
+
+USHORT SvxPixelCtl::GetPixel( const USHORT nPixel )
+{
+ return( *( pPixel + nPixel ) );
+}
+
+/*************************************************************************
+|*
+|* Bewirkt den Ursprungszustand des Controls
+|*
+\************************************************************************/
+
+void SvxPixelCtl::Reset()
+{
+ // Initialisierung des Arrays
+ for( USHORT i = 0; i < nSquares; i++)
+ *(pPixel + i) = 0;
+ Invalidate();
+}
+
+/*************************************************************************
+|*
+|* Ctor: BitmapCtl fuer SvxPixelCtl
+|*
+\************************************************************************/
+
+SvxBitmapCtl::SvxBitmapCtl( Window* pParent, const Size& rSize )
+{
+ aSize = rSize;
+ // aVD.SetOutputSizePixel( aSize );
+}
+
+/*************************************************************************
+|*
+|* Dtor
+|*
+\************************************************************************/
+
+SvxBitmapCtl::~SvxBitmapCtl()
+{
+}
+
+/*************************************************************************
+|*
+|* BitmapCtl: Gibt die Bitmap zurueck
+|*
+\************************************************************************/
+
+XOBitmap SvxBitmapCtl::GetXBitmap()
+{
+ XOBitmap aXOBitmap( pBmpArray, aPixelColor, aBackgroundColor );
+
+ return( aXOBitmap );
+}
+
+/*************************************************************************
+|*
+|* Fuellt die Listbox mit Farben und Strings
+|*
+\************************************************************************/
+
+void ColorLB::Fill( const XColorTable* pColorTab )
+{
+ long nCount = pColorTab->Count();
+ XColorEntry* pEntry;
+ SetUpdateMode( FALSE );
+
+ for( long i = 0; i < nCount; i++ )
+ {
+ pEntry = pColorTab->Get( i );
+ InsertEntry( pEntry->GetColor(), pEntry->GetName() );
+ }
+ SetUpdateMode( TRUE );
+}
+
+/************************************************************************/
+
+void ColorLB::Append( XColorEntry* pEntry, Bitmap* pBmp )
+{
+ InsertEntry( pEntry->GetColor(), pEntry->GetName() );
+}
+
+/************************************************************************/
+
+void ColorLB::Modify( XColorEntry* pEntry, USHORT nPos, Bitmap* pBmp )
+{
+ RemoveEntry( nPos );
+ InsertEntry( pEntry->GetColor(), pEntry->GetName(), nPos );
+}
+
+/*************************************************************************
+|*
+|* Fuellt die Listbox mit Farben und Strings
+|*
+\************************************************************************/
+
+void FillAttrLB::Fill( const XColorTable* pColorTab )
+{
+ long nCount = pColorTab->Count();
+ XColorEntry* pEntry;
+ SetUpdateMode( FALSE );
+
+ for( long i = 0; i < nCount; i++ )
+ {
+ pEntry = pColorTab->Get( i );
+ InsertEntry( pEntry->GetColor(), pEntry->GetName() );
+ }
+ SetUpdateMode( TRUE );
+}
+
+/*************************************************************************
+|*
+|* Fuellt die Listbox (vorlaeufig) mit Strings
+|*
+\************************************************************************/
+
+HatchingLB::HatchingLB( Window* pParent, ResId Id, BOOL bUserDraw /*= TRUE*/ )
+: ListBox( pParent, Id ),
+ mpList ( NULL ),
+ mbUserDraw( bUserDraw )
+{
+ EnableUserDraw( mbUserDraw );
+}
+
+HatchingLB::HatchingLB( Window* pParent, WinBits aWB, BOOL bUserDraw /*= TRUE*/ )
+: ListBox( pParent, aWB ),
+ mpList ( NULL ),
+ mbUserDraw( bUserDraw )
+{
+ EnableUserDraw( mbUserDraw );
+}
+
+void HatchingLB::Fill( const XHatchList* pList )
+{
+ mpList = (XHatchList*)pList;
+ XHatchEntry* pEntry;
+ long nCount = pList->Count();
+
+ SetUpdateMode( FALSE );
+
+ if( mbUserDraw )
+ {
+ for( long i = 0; i < nCount; i++ )
+ InsertEntry( pList->Get( i )->GetName() );
+ }
+ else
+ {
+ for( long i = 0; i < nCount; i++ )
+ {
+ pEntry = pList->Get( i );
+ Bitmap* pBitmap = pList->GetBitmap( i );
+ if( pBitmap )
+ InsertEntry( pEntry->GetName(), *pBitmap );
+ else
+ InsertEntry( pEntry->GetName() );
+ }
+ }
+
+ SetUpdateMode( TRUE );
+}
+
+void HatchingLB::UserDraw( const UserDrawEvent& rUDEvt )
+{
+ if( mpList != NULL )
+ {
+ // Draw gradient with borderrectangle
+ const Rectangle& rDrawRect = rUDEvt.GetRect();
+ Rectangle aRect( rDrawRect.nLeft+1, rDrawRect.nTop+1, rDrawRect.nLeft+33, rDrawRect.nBottom-1 );
+
+ USHORT nId = rUDEvt.GetItemId();
+ if( nId >= 0 && nId <= mpList->Count() )
+ {
+ OutputDevice* pDevice = rUDEvt.GetDevice();
+
+ XHatch& rXHatch = mpList->Get( rUDEvt.GetItemId() )->GetHatch();
+ MapMode aMode( MAP_100TH_MM );
+ Hatch aHatch( (HatchStyle) rXHatch.GetHatchStyle(),
+ rXHatch.GetColor(),
+ rUDEvt.GetDevice()->LogicToPixel( Point( rXHatch.GetDistance(), 0 ), aMode ).X(),
+ rXHatch.GetAngle() );
+ const Polygon aPolygon( aRect );
+ const PolyPolygon aPolypoly( aPolygon );
+ pDevice->DrawHatch( aPolypoly, aHatch );
+
+ pDevice->SetLineColor( COL_BLACK );
+ pDevice->SetFillColor();
+ pDevice->DrawRect( aRect );
+
+ // Draw name
+ pDevice->DrawText( Point( aRect.nRight+7, aRect.nTop-1 ), mpList->Get( rUDEvt.GetItemId() )->GetName() );
+ }
+ }
+}
+
+/************************************************************************/
+
+void HatchingLB::Append( XHatchEntry* pEntry, Bitmap* pBmp )
+{
+ if( pBmp )
+ InsertEntry( pEntry->GetName(), *pBmp );
+ else
+ InsertEntry( pEntry->GetName() );
+}
+
+/************************************************************************/
+
+void HatchingLB::Modify( XHatchEntry* pEntry, USHORT nPos, Bitmap* pBmp )
+{
+ RemoveEntry( nPos );
+
+ if( pBmp )
+ InsertEntry( pEntry->GetName(), *pBmp, nPos );
+ else
+ InsertEntry( pEntry->GetName(), nPos );
+}
+
+/************************************************************************/
+
+void HatchingLB::SelectEntryByList( const XHatchList* pList, const String& rStr,
+ const XHatch& rHatch, USHORT nDist )
+{
+ long nCount = pList->Count();
+ XHatchEntry* pEntry;
+ BOOL bFound = FALSE;
+ String aStr;
+
+ long i;
+ for( i = 0; i < nCount && !bFound; i++ )
+ {
+ pEntry = pList->Get( i );
+
+ aStr = pEntry->GetName();
+
+ if( rStr == aStr && rHatch == pEntry->GetHatch() )
+ bFound = TRUE;
+ }
+ if( bFound )
+ SelectEntryPos( (USHORT) ( i - 1 + nDist ) );
+}
+
+/*************************************************************************
+|*
+|* Fuellt die Listbox (vorlaeufig) mit Strings
+|*
+\************************************************************************/
+
+void FillAttrLB::Fill( const XHatchList* pList )
+{
+ long nCount = pList->Count();
+ XHatchEntry* pEntry;
+ ListBox::SetUpdateMode( FALSE );
+
+ for( long i = 0; i < nCount; i++ )
+ {
+ pEntry = pList->Get( i );
+ Bitmap* pBitmap = pList->GetBitmap( i );
+ if( pBitmap )
+ ListBox::InsertEntry( pEntry->GetName(), *pBitmap );
+ else
+ InsertEntry( pEntry->GetName() );
+ }
+ ListBox::SetUpdateMode( TRUE );
+}
+
+/*************************************************************************
+|*
+|* Fuellt die Listbox (vorlaeufig) mit Strings
+|*
+\************************************************************************/
+
+GradientLB::GradientLB( Window* pParent, ResId Id, BOOL bUserDraw /*= TRUE*/ )
+: ListBox( pParent, Id ),
+ mpList(NULL),
+ mbUserDraw( bUserDraw )
+{
+ EnableUserDraw( mbUserDraw);
+}
+
+GradientLB::GradientLB( Window* pParent, WinBits aWB, BOOL bUserDraw /*= TRUE*/ )
+: ListBox( pParent, aWB ),
+ mpList(NULL),
+ mbUserDraw( bUserDraw )
+{
+ EnableUserDraw( mbUserDraw );
+}
+
+void GradientLB::Fill( const XGradientList* pList )
+{
+ mpList = (XGradientList*)pList;
+ XGradientEntry* pEntry;
+ long nCount = pList->Count();
+
+ SetUpdateMode( FALSE );
+
+ if( mbUserDraw )
+ {
+ for( long i = 0; i < nCount; i++ )
+ InsertEntry( pList->Get( i )->GetName() );
+ }
+ else
+ {
+ for( long i = 0; i < nCount; i++ )
+ {
+ pEntry = pList->Get( i );
+ Bitmap* pBitmap = pList->GetBitmap( i );
+ if( pBitmap )
+ InsertEntry( pEntry->GetName(), *pBitmap );
+ else
+ InsertEntry( pEntry->GetName() );
+ }
+ }
+
+ SetUpdateMode( TRUE );
+}
+
+void GradientLB::UserDraw( const UserDrawEvent& rUDEvt )
+{
+ if( mpList != NULL )
+ {
+ // Draw gradient with borderrectangle
+ const Rectangle& rDrawRect = rUDEvt.GetRect();
+ Rectangle aRect( rDrawRect.nLeft+1, rDrawRect.nTop+1, rDrawRect.nLeft+33, rDrawRect.nBottom-1 );
+
+ USHORT nId = rUDEvt.GetItemId();
+ if( nId >= 0 && nId <= mpList->Count() )
+ {
+ OutputDevice* pDevice = rUDEvt.GetDevice();
+
+ XGradient& rXGrad = mpList->Get( rUDEvt.GetItemId() )->GetGradient();
+ Gradient aGradient( (GradientStyle) rXGrad.GetGradientStyle(), rXGrad.GetStartColor(), rXGrad.GetEndColor() );
+ aGradient.SetAngle( (USHORT)rXGrad.GetAngle() );
+ aGradient.SetBorder( rXGrad.GetBorder() );
+ aGradient.SetOfsX( rXGrad.GetXOffset() );
+ aGradient.SetOfsY( rXGrad.GetYOffset() );
+ aGradient.SetStartIntensity( rXGrad.GetStartIntens() );
+ aGradient.SetEndIntensity( rXGrad.GetEndIntens() );
+ aGradient.SetSteps( 255 );
+
+ pDevice->DrawGradient( aRect, aGradient );
+
+ pDevice->SetLineColor( COL_BLACK );
+ pDevice->SetFillColor();
+ pDevice->DrawRect( aRect );
+
+ // Draw name
+ pDevice->DrawText( Point( aRect.nRight+7, aRect.nTop-1 ), mpList->Get( rUDEvt.GetItemId() )->GetName() );
+ }
+ }
+}
+
+/************************************************************************/
+
+void GradientLB::Append( XGradientEntry* pEntry, Bitmap* pBmp )
+{
+ if( pBmp )
+ InsertEntry( pEntry->GetName(), *pBmp );
+ else
+ InsertEntry( pEntry->GetName() );
+}
+
+/************************************************************************/
+
+void GradientLB::Modify( XGradientEntry* pEntry, USHORT nPos, Bitmap* pBmp )
+{
+ RemoveEntry( nPos );
+
+ if( pBmp )
+ InsertEntry( pEntry->GetName(), *pBmp, nPos );
+ else
+ InsertEntry( pEntry->GetName(), nPos );
+}
+
+/************************************************************************/
+
+void GradientLB::SelectEntryByList( const XGradientList* pList, const String& rStr,
+ const XGradient& rGradient, USHORT nDist )
+{
+ long nCount = pList->Count();
+ XGradientEntry* pEntry;
+ BOOL bFound = FALSE;
+ String aStr;
+
+ long i;
+ for( i = 0; i < nCount && !bFound; i++ )
+ {
+ pEntry = pList->Get( i );
+
+ aStr = pEntry->GetName();
+
+ if( rStr == aStr && rGradient == pEntry->GetGradient() )
+ bFound = TRUE;
+ }
+ if( bFound )
+ SelectEntryPos( (USHORT) ( i - 1 + nDist ) );
+}
+
+/*************************************************************************
+|*
+|* Fuellt die Listbox (vorlaeufig) mit Strings
+|*
+\************************************************************************/
+
+void FillAttrLB::Fill( const XGradientList* pList )
+{
+ long nCount = pList->Count();
+ XGradientEntry* pEntry;
+ ListBox::SetUpdateMode( FALSE );
+
+ for( long i = 0; i < nCount; i++ )
+ {
+ pEntry = pList->Get( i );
+ Bitmap* pBitmap = pList->GetBitmap( i );
+ if( pBitmap )
+ ListBox::InsertEntry( pEntry->GetName(), *pBitmap );
+ else
+ InsertEntry( pEntry->GetName() );
+ }
+ ListBox::SetUpdateMode( TRUE );
+}
+
+/*************************************************************************
+|*
+|* Konstruktor von BitmapLB
+|*
+\************************************************************************/
+
+BitmapLB::BitmapLB( Window* pParent, ResId Id, BOOL bUserDraw /*= TRUE*/ )
+: ListBox( pParent, Id ),
+ mpList( NULL ),
+ mbUserDraw( bUserDraw )
+{
+ aVD.SetOutputSizePixel( Size( 32, 16 ) );
+ EnableUserDraw( mbUserDraw );
+}
+
+/************************************************************************/
+
+void BitmapLB::SetVirtualDevice()
+{
+ if( aBitmap.GetSizePixel().Width() > 8 ||
+ aBitmap.GetSizePixel().Height() > 8 )
+ {
+ aVD.DrawBitmap( Point( 0, 0 ), Size( 32, 16 ), aBitmap );
+ }
+ else
+ {
+ aVD.DrawBitmap( Point( 0, 0 ), aBitmap );
+ aVD.DrawBitmap( Point( 8, 0 ), aBitmap );
+ aVD.DrawBitmap( Point( 16, 0 ), aBitmap );
+ aVD.DrawBitmap( Point( 24, 0 ), aBitmap );
+ aVD.DrawBitmap( Point( 0, 8 ), aBitmap );
+ aVD.DrawBitmap( Point( 8, 8 ), aBitmap );
+ aVD.DrawBitmap( Point( 16, 8 ), aBitmap );
+ aVD.DrawBitmap( Point( 24, 8 ), aBitmap );
+ }
+}
+
+/************************************************************************/
+
+void BitmapLB::Fill( const XBitmapList* pList )
+{
+ mpList = (XBitmapList*)pList;
+ XBitmapEntry* pEntry;
+ long nCount = pList->Count();
+
+ SetUpdateMode( FALSE );
+
+ if( mbUserDraw )
+ {
+ for( long i = 0; i < nCount; i++ )
+ InsertEntry( pList->Get( i )->GetName() );
+ }
+ else
+ {
+ for( long i = 0; i < nCount; i++ )
+ {
+ pEntry = pList->Get( i );
+ aBitmap = pEntry->GetXBitmap().GetBitmap();
+
+ SetVirtualDevice();
+
+ InsertEntry( pEntry->GetName(), aVD.GetBitmap( Point( 0, 2 ), Size( 32, 12 ) ) );
+ }
+ }
+
+ SetUpdateMode( TRUE );
+}
+
+void BitmapLB::UserDraw( const UserDrawEvent& rUDEvt )
+{
+ if( mpList != NULL )
+ {
+ // Draw bitmap
+ const Rectangle& rDrawRect = rUDEvt.GetRect();
+ Rectangle aRect( rDrawRect.nLeft+1, rDrawRect.nTop+1, rDrawRect.nLeft+33, rDrawRect.nBottom-1 );
+
+ USHORT nId = rUDEvt.GetItemId();
+ if( nId >= 0 && nId <= mpList->Count() )
+ {
+ Rectangle aClipRect( rDrawRect.nLeft+1, rDrawRect.nTop+1, rDrawRect.nRight-1, rDrawRect.nBottom-1 );
+
+ OutputDevice* pDevice = rUDEvt.GetDevice();
+ pDevice->SetClipRegion( Region( aClipRect ) );
+
+ aBitmap = mpList->Get( nId )->GetXBitmap().GetBitmap();
+
+ long nPosBaseX = aRect.nLeft;
+ long nPosBaseY = aRect.nTop;
+
+ if( aBitmap.GetSizePixel().Width() > 8 ||
+ aBitmap.GetSizePixel().Height() > 8 )
+ {
+ pDevice->DrawBitmap( Point( nPosBaseX, nPosBaseY ), Size( 32, 16 ), aBitmap );
+ }
+ else
+ {
+ pDevice->DrawBitmap( Point( nPosBaseX+ 0, nPosBaseY+0 ), aBitmap );
+ pDevice->DrawBitmap( Point( nPosBaseX+ 8, nPosBaseY+0 ), aBitmap );
+ pDevice->DrawBitmap( Point( nPosBaseX+16, nPosBaseY+0 ), aBitmap );
+ pDevice->DrawBitmap( Point( nPosBaseX+24, nPosBaseY+0 ), aBitmap );
+ pDevice->DrawBitmap( Point( nPosBaseX+ 0, nPosBaseY+8 ), aBitmap );
+ pDevice->DrawBitmap( Point( nPosBaseX+ 8, nPosBaseY+8 ), aBitmap );
+ pDevice->DrawBitmap( Point( nPosBaseX+16, nPosBaseY+8 ), aBitmap );
+ pDevice->DrawBitmap( Point( nPosBaseX+24, nPosBaseY+8 ), aBitmap );
+ }
+
+ pDevice->SetClipRegion();
+
+ // Draw name
+ pDevice->DrawText( Point( aRect.nRight+7, aRect.nTop-1 ), mpList->Get( nId )->GetName() );
+ }
+ }
+}
+
+/************************************************************************/
+
+void BitmapLB::Append( XBitmapEntry* pEntry, Bitmap* pBmp )
+{
+ if( pBmp )
+ {
+ aBitmap = pEntry->GetXBitmap().GetBitmap();
+ SetVirtualDevice();
+ InsertEntry( pEntry->GetName(), aVD.GetBitmap( Point( 0, 2 ), Size( 32, 12 ) ) );
+ }
+ else
+ InsertEntry( pEntry->GetName() );
+}
+
+/************************************************************************/
+
+void BitmapLB::Modify( XBitmapEntry* pEntry, USHORT nPos, Bitmap* pBmp )
+{
+ RemoveEntry( nPos );
+
+ if( pBmp )
+ {
+ aBitmap = pEntry->GetXBitmap().GetBitmap();
+ SetVirtualDevice();
+
+ InsertEntry( pEntry->GetName(), aVD.GetBitmap( Point( 0, 2 ), Size( 32, 12 ) ), nPos );
+ }
+ else
+ InsertEntry( pEntry->GetName() );
+}
+
+/************************************************************************/
+
+void BitmapLB::SelectEntryByList( const XBitmapList* pList, const String& rStr,
+ const Bitmap& rBmp)
+{
+ long nCount = pList->Count();
+ XBitmapEntry* pEntry;
+ BOOL bFound = FALSE;
+
+ long i;
+ for( i = 0; i < nCount && !bFound; i++ )
+ {
+ pEntry = pList->Get( i );
+
+ String aStr = pEntry->GetName();
+ // Bitmap aBmp = pEntry->GetBitmap();
+
+ if( rStr == aStr )
+ {
+ bFound = TRUE;
+ }
+ }
+ if( bFound )
+ SelectEntryPos( (USHORT) ( i - 1 ) );
+}
+
+/*************************************************************************
+|*
+|* Konstruktor von FillAttrLB
+|*
+\************************************************************************/
+
+FillAttrLB::FillAttrLB( Window* pParent, ResId Id ) :
+ ColorListBox( pParent, Id )
+{
+ aVD.SetOutputSizePixel( Size( 32, 16 ) );
+}
+
+/************************************************************************/
+
+FillAttrLB::FillAttrLB( Window* pParent, WinBits aWB ) :
+ ColorListBox( pParent, aWB )
+{
+ aVD.SetOutputSizePixel( Size( 32, 16 ) );
+}
+
+/************************************************************************/
+
+void FillAttrLB::SetVirtualDevice()
+{
+ if( aBitmap.GetSizePixel().Width() > 8 ||
+ aBitmap.GetSizePixel().Height() > 8 )
+ {
+ aVD.DrawBitmap( Point( 0, 0 ), Size( 32, 16 ), aBitmap );
+ }
+ else
+ {
+ aVD.DrawBitmap( Point( 0, 0 ), aBitmap );
+ aVD.DrawBitmap( Point( 8, 0 ), aBitmap );
+ aVD.DrawBitmap( Point( 16, 0 ), aBitmap );
+ aVD.DrawBitmap( Point( 24, 0 ), aBitmap );
+ aVD.DrawBitmap( Point( 0, 8 ), aBitmap );
+ aVD.DrawBitmap( Point( 8, 8 ), aBitmap );
+ aVD.DrawBitmap( Point( 16, 8 ), aBitmap );
+ aVD.DrawBitmap( Point( 24, 8 ), aBitmap );
+ }
+}
+
+/************************************************************************/
+
+void FillAttrLB::Fill( const XBitmapList* pList )
+{
+ long nCount = pList->Count();
+ XBitmapEntry* pEntry;
+ ListBox::SetUpdateMode( FALSE );
+
+ for( long i = 0; i < nCount; i++ )
+ {
+ pEntry = pList->Get( i );
+ aBitmap = pEntry->GetXBitmap().GetBitmap();
+
+ SetVirtualDevice();
+
+ ListBox::InsertEntry( pEntry->GetName(), aVD.GetBitmap( Point( 0, 2 ), Size( 32, 12 ) ) );
+ }
+ ListBox::SetUpdateMode( TRUE );
+}
+
+/************************************************************************/
+
+void FillAttrLB::SelectEntryByList( const XBitmapList* pList, const String& rStr,
+ const Bitmap& rBmp)
+{
+ long nCount = pList->Count();
+ XBitmapEntry* pEntry;
+ BOOL bFound = FALSE;
+
+ long i;
+ for( i = 0; i < nCount && !bFound; i++ )
+ {
+ pEntry = pList->Get( i );
+
+ String aStr = pEntry->GetName();
+ // Bitmap aBmp = pEntry->GetBitmap();
+
+ if( rStr == aStr )
+ {
+ bFound = TRUE;
+ }
+ /*
+ if( rStr == aStr && rBmp == aBmp )
+ bFound = TRUE; */
+ }
+ if( bFound )
+ SelectEntryPos( (USHORT) ( i - 1 ) );
+}
+
+/*************************************************************************
+|*
+|* Fuellt die Listbox (vorlaeufig) mit Strings
+|*
+\************************************************************************/
+
+void FillTypeLB::Fill()
+{
+ ResMgr* pMgr = DIALOG_MGR();
+ SetUpdateMode( FALSE );
+ InsertEntry( String( ResId( RID_SVXSTR_INVISIBLE, pMgr ) ) );
+ InsertEntry( String( ResId( RID_SVXSTR_COLOR, pMgr ) ) );
+ InsertEntry( String( ResId( RID_SVXSTR_GRADIENT, pMgr ) ) );
+ InsertEntry( String( ResId( RID_SVXSTR_HATCH, pMgr ) ) );
+ InsertEntry( String( ResId( RID_SVXSTR_BITMAP, pMgr ) ) );
+ SetUpdateMode( TRUE );
+}
+
+/*************************************************************************
+|*
+|* Fuellt die Listbox (vorlaeufig) mit Strings
+|*
+\************************************************************************/
+
+void LineLB::Fill( const XDashList* pList )
+{
+ long nCount = pList->Count();
+ XDashEntry* pEntry;
+ SetUpdateMode( FALSE );
+
+ for( long i = 0; i < nCount; i++ )
+ {
+ pEntry = pList->Get( i );
+ Bitmap* pBitmap = pList->GetBitmap( i );
+ if( pBitmap )
+ InsertEntry( pEntry->GetName(), *pBitmap );
+ else
+ InsertEntry( pEntry->GetName() );
+ }
+ SetUpdateMode( TRUE );
+}
+
+/************************************************************************/
+
+void LineLB::Append( XDashEntry* pEntry, Bitmap* pBmp )
+{
+ if( pBmp )
+ InsertEntry( pEntry->GetName(), *pBmp );
+ else
+ InsertEntry( pEntry->GetName() );
+}
+
+/************************************************************************/
+
+void LineLB::Modify( XDashEntry* pEntry, USHORT nPos, Bitmap* pBmp )
+{
+ RemoveEntry( nPos );
+
+ if( pBmp )
+ InsertEntry( pEntry->GetName(), *pBmp, nPos );
+ else
+ InsertEntry( pEntry->GetName(), nPos );
+}
+
+/************************************************************************/
+
+void LineLB::SelectEntryByList( const XDashList* pList, const String& rStr,
+ const XDash& rDash, USHORT nDist )
+{
+ long nCount = pList->Count();
+ XDashEntry* pEntry;
+ BOOL bFound = FALSE;
+ String aStr;
+ XDash aDash;
+
+ long i;
+ for( i = 0; i < nCount && !bFound; i++ )
+ {
+ pEntry = pList->Get( i );
+
+ aStr = pEntry->GetName();
+ aDash = pEntry->GetDash();
+
+ if( rStr == aStr && rDash == aDash )
+ bFound = TRUE;
+ }
+ if( bFound )
+ SelectEntryPos( (USHORT) ( i - 1 + nDist ) );
+}
+
+/*************************************************************************
+|*
+|* Fuellt die Listbox (vorlaeufig) mit Strings
+|*
+\************************************************************************/
+
+void LineEndLB::Fill( const XLineEndList* pList, BOOL bStart )
+{
+ long nCount = pList->Count();
+ XLineEndEntry* pEntry;
+ VirtualDevice aVD;
+ SetUpdateMode( FALSE );
+
+ for( long i = 0; i < nCount; i++ )
+ {
+ pEntry = pList->Get( i );
+ Bitmap* pBitmap = pList->GetBitmap( i );
+ if( pBitmap )
+ {
+ Size aBmpSize( pBitmap->GetSizePixel() );
+ aVD.SetOutputSizePixel( aBmpSize, FALSE );
+ aVD.DrawBitmap( Point(), *pBitmap );
+ InsertEntry( pEntry->GetName(),
+ aVD.GetBitmap( bStart ? Point() : Point( aBmpSize.Width() / 2, 0 ),
+ Size( aBmpSize.Width() / 2, aBmpSize.Height() ) ) );
+ }
+ else
+ InsertEntry( pEntry->GetName() );
+ }
+ SetUpdateMode( TRUE );
+}
+
+/************************************************************************/
+
+void LineEndLB::Append( XLineEndEntry* pEntry, Bitmap* pBmp,
+ BOOL bStart )
+{
+ if( pBmp )
+ {
+ VirtualDevice aVD;
+ Size aBmpSize( pBmp->GetSizePixel() );
+
+ aVD.SetOutputSizePixel( aBmpSize, FALSE );
+ aVD.DrawBitmap( Point(), *pBmp );
+ InsertEntry( pEntry->GetName(),
+ aVD.GetBitmap( bStart ? Point() : Point( aBmpSize.Width() / 2, 0 ),
+ Size( aBmpSize.Width() / 2, aBmpSize.Height() ) ) );
+ }
+ else
+ InsertEntry( pEntry->GetName() );
+}
+
+/************************************************************************/
+
+void LineEndLB::Modify( XLineEndEntry* pEntry, USHORT nPos, Bitmap* pBmp,
+ BOOL bStart )
+{
+ RemoveEntry( nPos );
+
+ if( pBmp )
+ {
+ VirtualDevice aVD;
+ Size aBmpSize( pBmp->GetSizePixel() );
+
+ aVD.SetOutputSizePixel( aBmpSize, FALSE );
+ aVD.DrawBitmap( Point(), *pBmp );
+ InsertEntry( pEntry->GetName(),
+ aVD.GetBitmap( bStart ? Point() : Point( aBmpSize.Width() / 2, 0 ),
+ Size( aBmpSize.Width() / 2, aBmpSize.Height() ) ), nPos );
+ }
+ else
+ InsertEntry( pEntry->GetName(), nPos );
+}
+
+/*************************************************************************
+|*
+|* SvxXLinePreview::SvxXLinePreview()
+|*
+*************************************************************************/
+
+SvxXLinePreview::SvxXLinePreview( Window* pParent, const ResId& rResId, XOutputDevice* pXOut ) :
+
+ Control ( pParent, rResId ),
+
+ pXOutDev ( pXOut ),
+ bWithSymbol ( FALSE ),
+ pGraphic ( NULL )
+
+{
+ SetMapMode( MAP_100TH_MM );
+ Size aSize = GetOutputSize();
+ aPtA = Point( 500, aSize.Height() / 2 );
+ aPtB = Point( aSize.Width() - 500, aSize.Height() / 2 );
+ InitSettings( TRUE, TRUE );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxXLinePreview::InitSettings( BOOL bForeground, BOOL bBackground )
+{
+ const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
+
+ if ( bForeground )
+ {
+ Color aTextColor = rStyleSettings.GetWindowTextColor();
+
+ if ( IsControlForeground() )
+ aTextColor = GetControlForeground();
+ SetTextColor( aTextColor );
+ }
+
+ if ( bBackground )
+ {
+ if ( IsControlBackground() )
+ SetBackground( GetControlBackground() );
+ else
+ SetBackground( rStyleSettings.GetWindowColor() );
+ }
+ Invalidate();
+}
+
+// -----------------------------------------------------------------------
+
+void SvxXLinePreview::SetSymbol(Graphic* p,const Size& s)
+{
+ pGraphic = p;
+ aSymbolSize = s;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxXLinePreview::ResizeSymbol(const Size& s)
+{
+ if ( s != aSymbolSize )
+ {
+ aSymbolSize = s;
+ Invalidate();
+ }
+}
+
+// -----------------------------------------------------------------------
+
+void SvxXLinePreview::Paint( const Rectangle& rRect )
+{
+ pXOutDev->DrawLine( aPtA, aPtB );
+ if ( bWithSymbol && pGraphic )
+ {
+ Point aPos = Point( GetOutputSize().Width() / 2, GetOutputSize().Height() / 2 );
+ aPos.X() -= aSymbolSize.Width() / 2;
+ aPos.Y() -= aSymbolSize.Height() / 2;
+ pGraphic->Draw( this, aPos, aSymbolSize );
+ }
+}
+
+// -----------------------------------------------------------------------
+
+void SvxXLinePreview::StateChanged( StateChangedType nType )
+{
+ if ( nType == STATE_CHANGE_CONTROLFOREGROUND )
+ InitSettings( TRUE, FALSE );
+ else if ( nType == STATE_CHANGE_CONTROLBACKGROUND )
+ InitSettings( FALSE, TRUE );
+
+ Control::StateChanged( nType );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxXLinePreview::DataChanged( const DataChangedEvent& rDCEvt )
+{
+ if ( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) )
+ InitSettings( TRUE, TRUE );
+ else
+ Control::DataChanged( rDCEvt );
+}
+
+/*************************************************************************
+|*
+|* SvxXRectPreview::SvxXRectPreview()
+|*
+*************************************************************************/
+
+SvxXRectPreview::SvxXRectPreview( Window* pParent, const ResId& rResId, XOutputDevice* pXOut ) :
+
+ Control ( pParent, rResId ),
+
+ pXOutDev( pXOut )
+
+{
+ SetMapMode( MAP_100TH_MM );
+ Size aSize = GetOutputSize();
+ aRect = Rectangle( Point(), aSize );
+ InitSettings( TRUE, TRUE );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxXRectPreview::InitSettings( BOOL bForeground, BOOL bBackground )
+{
+ const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
+
+ if ( bForeground )
+ {
+ Color aTextColor = rStyleSettings.GetWindowTextColor();
+
+ if ( IsControlForeground() )
+ aTextColor = GetControlForeground();
+ SetTextColor( aTextColor );
+ }
+
+ if ( bBackground )
+ {
+ if ( IsControlBackground() )
+ SetBackground( GetControlBackground() );
+ else
+ SetBackground( rStyleSettings.GetWindowColor() );
+ }
+ Invalidate();
+}
+
+// -----------------------------------------------------------------------
+
+void SvxXRectPreview::Paint( const Rectangle& rRect )
+{
+ pXOutDev->DrawRect( aRect );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxXRectPreview::StateChanged( StateChangedType nType )
+{
+ if ( nType == STATE_CHANGE_CONTROLFOREGROUND )
+ InitSettings( TRUE, FALSE );
+ else if ( nType == STATE_CHANGE_CONTROLBACKGROUND )
+ InitSettings( FALSE, TRUE );
+
+ Control::StateChanged( nType );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxXRectPreview::DataChanged( const DataChangedEvent& rDCEvt )
+{
+ if ( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) )
+ InitSettings( TRUE, TRUE );
+ else
+ Control::DataChanged( rDCEvt );
+}
+
+/*************************************************************************
+|*
+|* SvxXShadowPreview::SvxXShadowPreview()
+|*
+*************************************************************************/
+
+SvxXShadowPreview::SvxXShadowPreview( Window* pParent, const ResId& rResId,
+ XOutputDevice* pXOut, XOutdevItemPool* pXInPool ) :
+
+ Control ( pParent, rResId ),
+
+ pXOutDev ( pXOut ),
+ pXPool ( pXInPool ),
+ pRectItem ( NULL ),
+ pShadowItem ( NULL )
+
+{
+ SetMapMode( MAP_100TH_MM );
+ Size aSize = GetOutputSize();
+ aSize.Width() = aSize.Width() / 3;
+ aSize.Height() = aSize.Height() / 3;
+ aRect = Rectangle( Point( aSize.Width(), aSize.Height() ), aSize );
+ aShadow = Rectangle( Point( aSize.Width(), aSize.Height() ), aSize );
+ InitSettings( TRUE, TRUE );
+}
+
+// -----------------------------------------------------------------------
+
+SvxXShadowPreview::~SvxXShadowPreview()
+{
+ delete pRectItem;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxXShadowPreview::InitSettings( BOOL bForeground, BOOL bBackground )
+{
+ const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
+
+ if ( bForeground )
+ {
+ Color aTextColor = rStyleSettings.GetWindowTextColor();
+
+ if ( IsControlForeground() )
+ aTextColor = GetControlForeground();
+ SetTextColor( aTextColor );
+ }
+
+ if ( bBackground )
+ {
+ if ( IsControlBackground() )
+ SetBackground( GetControlBackground() );
+ else
+ SetBackground( rStyleSettings.GetWindowColor() );
+ }
+ Invalidate();
+}
+
+// -----------------------------------------------------------------------
+
+void SvxXShadowPreview::Paint( const Rectangle& rRect )
+{
+ aShadow.SetPos( aShadowPos + Point( aRect.GetWidth(), aRect.GetHeight() ) );
+ if ( pShadowItem )
+ pXOutDev->SetFillAttr( *pShadowItem );
+ pXOutDev->DrawRect( aShadow );
+ if ( pRectItem )
+ pXOutDev->SetFillAttr( *pRectItem );
+ pXOutDev->DrawRect( aRect );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxXShadowPreview::SetRectAttr( XFillAttrSetItem* pSetItem )
+{
+ if( pRectItem )
+ delete pRectItem;
+ pRectItem = (XFillAttrSetItem*) pSetItem->Clone( pXPool );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxXShadowPreview::SetShadowAttr( XFillAttrSetItem* pSetItem )
+{
+ pShadowItem = pSetItem;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxXShadowPreview::StateChanged( StateChangedType nType )
+{
+ if ( nType == STATE_CHANGE_CONTROLFOREGROUND )
+ InitSettings( TRUE, FALSE );
+ else if ( nType == STATE_CHANGE_CONTROLBACKGROUND )
+ InitSettings( FALSE, TRUE );
+
+ Control::StateChanged( nType );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxXShadowPreview::DataChanged( const DataChangedEvent& rDCEvt )
+{
+ if ( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) )
+ InitSettings( TRUE, TRUE );
+ else
+ Control::DataChanged( rDCEvt );
+}
+
+
diff --git a/svx/source/dialog/dlgctrl.src b/svx/source/dialog/dlgctrl.src
new file mode 100644
index 000000000000..14c3ee7241d5
--- /dev/null
+++ b/svx/source/dialog/dlgctrl.src
@@ -0,0 +1,68 @@
+/*************************************************************************
+ *
+ * $RCSfile: dlgctrl.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:08 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include "dialogs.hrc"
+
+Bitmap RID_SVXCTRL_RECTBTNS
+{
+ File = "rectbtns.bmp" ;
+};
+
diff --git a/svx/source/dialog/dlgname.cxx b/svx/source/dialog/dlgname.cxx
new file mode 100644
index 000000000000..0d15c4e14ba7
--- /dev/null
+++ b/svx/source/dialog/dlgname.cxx
@@ -0,0 +1,185 @@
+/*************************************************************************
+ *
+ * $RCSfile: dlgname.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:08 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include <tools/ref.hxx>
+#include <tools/list.hxx>
+#ifndef _SHL_HXX
+#include <tools/shl.hxx>
+#endif
+#ifndef _TOOLS_DEBUG_HXX
+#include <tools/debug.hxx>
+#endif
+#ifndef _SV_MSGBOX_HXX
+#include <vcl/msgbox.hxx>
+#endif
+
+#pragma hdrstop
+
+#include "dialogs.hrc"
+
+#include "dlgname.hxx"
+#include "dlgname.hrc"
+#include "dialmgr.hxx"
+
+/*************************************************************************
+|*
+|* Dialog zum Editieren eines Namens
+|*
+\************************************************************************/
+
+SvxNameDialog::SvxNameDialog( Window* pWindow, const String& rName, const String& rDesc ) :
+ ModalDialog ( pWindow, ResId( RID_SVXDLG_NAME, DIALOG_MGR() ) ),
+ aFtDescription ( this, ResId( FT_DESCRIPTION ) ),
+ aEdtName ( this, ResId( EDT_STRING ) ),
+ aBtnOK ( this, ResId( BTN_OK ) ),
+ aBtnCancel ( this, ResId( BTN_CANCEL ) ),
+ aBtnHelp ( this, ResId( BTN_HELP ) )
+{
+ FreeResource();
+
+ aFtDescription.SetText( rDesc );
+ aEdtName.SetText( rName );
+}
+
+/*************************************************************************/
+
+void SvxNameDialog::GetName( String& rName )
+{
+ rName = aEdtName.GetText();
+}
+
+/*************************************************************************
+|*
+|* Dialog zum Abbrechen, Speichern oder Hinzufuegen
+|*
+\************************************************************************/
+
+SvxMessDialog::SvxMessDialog( Window* pWindow, const String& rText, const String& rDesc, Image* pImg ) :
+ ModalDialog ( pWindow, ResId( RID_SVXDLG_MESSBOX, DIALOG_MGR() ) ),
+ aFtDescription ( this, ResId( FT_DESCRIPTION ) ),
+ aBtn1 ( this, ResId( BTN_1 ) ),
+ aBtn2 ( this, ResId( BTN_2 ) ),
+ aBtnCancel ( this, ResId( BTN_CANCEL ) ),
+ aFtImage ( this )
+{
+ FreeResource();
+
+ if( pImg )
+ {
+ pImage = new Image( *pImg );
+ aFtImage.SetImage( *pImage );
+ aFtImage.SetStyle( ( aFtImage.GetStyle()/* | WB_NOTABSTOP */) & ~WB_3DLOOK );
+ aFtImage.SetPosSizePixel( LogicToPixel( Point( 3, 6 ), MAP_APPFONT ),
+ aFtImage.GetImage().GetSizePixel() );
+ aFtImage.Show();
+ }
+
+ SetText( rText );
+ aFtDescription.SetText( rDesc );
+
+ aBtn1.SetClickHdl( LINK( this, SvxMessDialog, Button1Hdl ) );
+ aBtn2.SetClickHdl( LINK( this, SvxMessDialog, Button2Hdl ) );
+}
+
+SvxMessDialog::~SvxMessDialog()
+{
+ if( pImage )
+ delete pImage;
+}
+
+/*************************************************************************/
+
+IMPL_LINK_INLINE_START( SvxMessDialog, Button1Hdl, Button *, EMPTYARG )
+{
+ EndDialog( RET_BTN_1 );
+ return 0;
+}
+IMPL_LINK_INLINE_END( SvxMessDialog, Button1Hdl, Button *, EMPTYARG )
+
+/*************************************************************************/
+
+IMPL_LINK_INLINE_START( SvxMessDialog, Button2Hdl, Button *, EMPTYARG )
+{
+ EndDialog( RET_BTN_2 );
+ return 0;
+}
+IMPL_LINK_INLINE_END( SvxMessDialog, Button2Hdl, Button *, EMPTYARG )
+
+/*************************************************************************/
+
+void SvxMessDialog::SetButtonText( USHORT nBtnId, const String& rNewTxt )
+{
+ switch ( nBtnId )
+ {
+ case MESS_BTN_1:
+ aBtn1.SetText( rNewTxt );
+ break;
+
+ case MESS_BTN_2:
+ aBtn2.SetText( rNewTxt );
+ break;
+
+ default:
+ DBG_ERROR( "Falsche Button-Nummer!!!" );
+ }
+}
+
+
diff --git a/svx/source/dialog/dlgname.hrc b/svx/source/dialog/dlgname.hrc
new file mode 100644
index 000000000000..965a499a342e
--- /dev/null
+++ b/svx/source/dialog/dlgname.hrc
@@ -0,0 +1,68 @@
+/*************************************************************************
+ *
+ * $RCSfile: dlgname.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:08 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#define EDT_STRING 1
+#define BTN_OK 1
+#define BTN_CANCEL 1
+#define BTN_HELP 1
+#define FT_DESCRIPTION 1
+#define BTN_1 1
+#define BTN_2 2
diff --git a/svx/source/dialog/dlgname.src b/svx/source/dialog/dlgname.src
new file mode 100644
index 000000000000..beb5c2abd1a2
--- /dev/null
+++ b/svx/source/dialog/dlgname.src
@@ -0,0 +1,165 @@
+/*************************************************************************
+ *
+ * $RCSfile: dlgname.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:08 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+ // include ------------------------------------------------------------------
+#include "dialogs.hrc"
+#include "helpid.hrc"
+#include "dlgname.hrc"
+ // pragma -------------------------------------------------------------------
+
+ // RID_SVXDLG_NAME ----------------------------------------------------------
+ModalDialog RID_SVXDLG_NAME
+{
+ HelpId = HID_DLG_NAME ;
+ OutputSize = TRUE ;
+ SvLook = TRUE ;
+ Size = MAP_APPFONT ( 165 , 63 ) ;
+ Text = "Name" ;
+ Text [ English ] = "Name" ;
+ Text [ norwegian ] = "Navn" ;
+ Text [ italian ] = "Nome" ;
+ Text [ portuguese_brazilian ] = "Nomear" ;
+ Text [ portuguese ] = "Nome" ;
+ Text [ finnish ] = "Nimi" ;
+ Text [ danish ] = "Navn" ;
+ Text [ french ] = "Nom" ;
+ Text [ swedish ] = "Namn" ;
+ Text [ dutch ] = "Naam" ;
+ Text [ spanish ] = "Nombre" ;
+ Text [ english_us ] = "Name" ;
+ Moveable = TRUE ;
+ Edit EDT_STRING
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 6 , 45 ) ;
+ Size = MAP_APPFONT ( 97 , 12 ) ;
+ TabStop = TRUE ;
+ };
+ OKButton BTN_OK
+ {
+ Pos = MAP_APPFONT ( 109 , 6 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TabStop = TRUE ;
+ DefButton = TRUE ;
+ };
+ CancelButton BTN_CANCEL
+ {
+ Pos = MAP_APPFONT ( 109 , 23 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TabStop = TRUE ;
+ };
+ HelpButton BTN_HELP
+ {
+ Pos = MAP_APPFONT ( 109 , 43 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TabStop = TRUE ;
+ };
+ FixedText FT_DESCRIPTION
+ {
+ Pos = MAP_APPFONT ( 6 , 6 ) ;
+ Size = MAP_APPFONT ( 98 , 31 ) ;
+ WordBreak = TRUE ;
+ };
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "Nazwa";
+ Text[ japanese ] = "O";
+ Text[ chinese_traditional ] = "W";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "̸";
+ Text[ turkish ] = "Ad";
+ Text[ language_user1 ] = " ";
+};
+ // RID_SVXDLG_MESSBOX -------------------------------------------------------
+ModalDialog RID_SVXDLG_MESSBOX
+{
+ HelpId = HID_DLG_MESSBOX ;
+ OutputSize = TRUE ;
+ SvLook = TRUE ;
+ Size = MAP_APPFONT ( 212 , 64 ) ;
+ Text = "" ;
+ Moveable = TRUE ;
+ PushButton BTN_1
+ {
+ Pos = MAP_APPFONT ( 25 , 44 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TabStop = TRUE ;
+ };
+ PushButton BTN_2
+ {
+ Pos = MAP_APPFONT ( 78 , 44 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TabStop = TRUE ;
+ };
+ CancelButton BTN_CANCEL
+ {
+ Pos = MAP_APPFONT ( 131 , 44 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TabStop = TRUE ;
+ };
+ FixedText FT_DESCRIPTION
+ {
+ Pos = MAP_APPFONT ( 28 , 6 ) ;
+ Size = MAP_APPFONT ( 200 , 35 ) ;
+ WordBreak = TRUE ;
+ };
+};
+ // ********************************************************************** EOF
diff --git a/svx/source/dialog/dlgutil.cxx b/svx/source/dialog/dlgutil.cxx
new file mode 100644
index 000000000000..1fdb5ead1008
--- /dev/null
+++ b/svx/source/dialog/dlgutil.cxx
@@ -0,0 +1,911 @@
+/*************************************************************************
+ *
+ * $RCSfile: dlgutil.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:08 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+// include ---------------------------------------------------------------
+
+#include <limits.h>
+
+#ifndef _SHL_HXX
+#include <tools/shl.hxx>
+#endif
+#ifndef _URLOBJ_HXX
+#include <tools/urlobj.hxx>
+#endif
+
+#ifndef _UNO_LINGU_HXX
+#include <unolingu.hxx>
+#endif
+
+#pragma hdrstop
+
+#include "dialogs.hrc"
+
+#include "dlgutil.hxx"
+#include "dialmgr.hxx"
+#include "langtab.hxx"
+
+// -----------------------------------------------------------------------
+
+String GetLanguageString( LanguageType eType )
+{
+ static const SvxLanguageTable aLangTable;
+ return aLangTable.GetString( eType );
+}
+
+// -----------------------------------------------------------------------
+
+String GetDicInfoStr( const String& rName, const USHORT nLang, const BOOL bNeg )
+{
+ INetURLObject aURLObj;
+ aURLObj.SetSmartProtocol( INET_PROT_FILE );
+ aURLObj.SetSmartURL( rName );
+ String aTmp( aURLObj.GetBase() );
+ aTmp += sal_Unicode( ' ' );
+
+ if ( bNeg )
+ {
+ sal_Char const sTmp[] = " (-) ";
+ aTmp.AppendAscii( sTmp );
+ }
+
+ aTmp += sal_Unicode( '[' );
+ if ( LANGUAGE_NONE == nLang )
+ aTmp += String( ResId( RID_SVXSTR_LANGUAGE_ALL, DIALOG_MGR() ) );
+ else
+ aTmp += ::GetLanguageString( (LanguageType)nLang );
+ aTmp += sal_Unicode( ']' );
+
+ return aTmp;
+}
+
+// -----------------------------------------------------------------------
+
+void SetFieldUnit( MetricField& rField, FieldUnit eUnit, BOOL bAll )
+{
+ long nFirst = rField.Denormalize( rField.GetFirst( FUNIT_TWIP ) );
+ long nLast = rField.Denormalize( rField.GetLast( FUNIT_TWIP ) );
+ long nMin = rField.Denormalize( rField.GetMin( FUNIT_TWIP ) );
+ long nMax = rField.Denormalize( rField.GetMax( FUNIT_TWIP ) );
+
+ if ( !bAll )
+ {
+ switch ( eUnit )
+ {
+ case FUNIT_M:
+ case FUNIT_KM:
+ eUnit = FUNIT_CM;
+ break;
+
+ case FUNIT_FOOT:
+ case FUNIT_MILE:
+ eUnit = FUNIT_INCH;
+ break;
+ }
+ }
+ rField.SetUnit( eUnit );
+ switch( eUnit )
+ {
+ case FUNIT_MM:
+ rField.SetSpinSize( 50 );
+ break;
+
+ case FUNIT_INCH:
+ rField.SetSpinSize( 2 );
+ break;
+
+ default:
+ rField.SetSpinSize( 10 );
+ }
+
+ if ( FUNIT_POINT == eUnit && rField.GetDecimalDigits() > 1 )
+ rField.SetDecimalDigits( 1 );
+ else
+ rField.SetDecimalDigits( 2 );
+
+ if ( !bAll )
+ {
+ rField.SetFirst( rField.Normalize( nFirst ), FUNIT_TWIP );
+ rField.SetLast( rField.Normalize( nLast ), FUNIT_TWIP );
+ rField.SetMin( rField.Normalize( nMin ), FUNIT_TWIP );
+ rField.SetMax( rField.Normalize( nMax ), FUNIT_TWIP );
+ }
+}
+
+// -----------------------------------------------------------------------
+
+void SetFieldUnit( MetricBox& rBox, FieldUnit eUnit, BOOL bAll )
+{
+ long nMin = rBox.Denormalize( rBox.GetMin( FUNIT_TWIP ) );
+ long nMax = rBox.Denormalize( rBox.GetMax( FUNIT_TWIP ) );
+
+ if ( !bAll )
+ {
+ switch ( eUnit )
+ {
+ case FUNIT_M:
+ case FUNIT_KM:
+ eUnit = FUNIT_CM;
+ break;
+
+ case FUNIT_FOOT:
+ case FUNIT_MILE:
+ eUnit = FUNIT_INCH;
+ break;
+ }
+ }
+ rBox.SetUnit( eUnit );
+
+ if ( FUNIT_POINT == eUnit && rBox.GetDecimalDigits() > 1 )
+ rBox.SetDecimalDigits( 1 );
+ else
+ rBox.SetDecimalDigits( 2 );
+
+ if ( !bAll )
+ {
+ rBox.SetMin( rBox.Normalize( nMin ), FUNIT_TWIP );
+ rBox.SetMax( rBox.Normalize( nMax ), FUNIT_TWIP );
+ }
+}
+
+// -----------------------------------------------------------------------
+
+void SetMetricValue( MetricField& rField, long nCoreValue, SfxMapUnit eUnit )
+{
+ long nVal = OutputDevice::LogicToLogic( nCoreValue,
+ (MapUnit)eUnit, MAP_100TH_MM );
+ nVal = rField.Normalize( nVal );
+ rField.SetValue( nVal, FUNIT_100TH_MM );
+
+/*
+ if ( SFX_MAPUNIT_100TH_MM == eUnit )
+ {
+ FieldUnit eFUnit = ( (MetricField&)rField ).GetUnit();
+ USHORT nDigits = rField.GetDecimalDigits();
+
+ if ( FUNIT_MM == eFUnit )
+ {
+ if ( 0 == nDigits )
+ lCoreValue /= 100;
+ else if ( 1 == nDigits )
+ lCoreValue /= 10;
+ else if ( nDigits > 2 )
+ {
+ DBG_ERROR( "too much decimal digits" );
+ return;
+ }
+ rField.SetValue( lCoreValue, FUNIT_MM );
+ return;
+ }
+ else if ( FUNIT_CM == eFUnit )
+ {
+ if ( 0 == nDigits )
+ lCoreValue /= 1000;
+ else if ( 1 == nDigits )
+ lCoreValue /= 100;
+ else if ( 2 == nDigits )
+ lCoreValue /= 10;
+ else if ( nDigits > 3 )
+ {
+ DBG_ERROR( "too much decimal digits" );
+ return;
+ }
+ rField.SetValue( lCoreValue, FUNIT_CM );
+ return;
+ }
+ }
+ rField.SetValue( rField.Normalize(
+ ConvertValueToUnit( lCoreValue, eUnit ) ), MapToFieldUnit( eUnit ) );
+*/
+}
+
+// -----------------------------------------------------------------------
+
+long GetCoreValue( const MetricField& rField, SfxMapUnit eUnit )
+{
+ long nVal = rField.GetValue( FUNIT_100TH_MM );
+ long nUnitVal = OutputDevice::LogicToLogic( nVal, MAP_100TH_MM,
+ (MapUnit)eUnit );
+ nUnitVal = rField.Denormalize( nUnitVal );
+ return nUnitVal;
+
+/*
+ long nRet = rField.GetValue( MapToFieldUnit( eUnit ) );
+ FieldUnit eFUnit = ( (MetricField&)rField ).GetUnit();
+ USHORT nDigits = rField.GetDecimalDigits();
+ DBG_ASSERT( nDigits <= 2, "decimal digits > 2!" );
+
+ switch ( eUnit )
+ {
+ case SFX_MAPUNIT_100TH_MM:
+ {
+ if ( 2 == nDigits )
+ return nRet;
+ else if ( 1 == nDigits )
+ return nRet * 10;
+ else
+ return nRet * 100;
+ }
+
+ case SFX_MAPUNIT_TWIP:
+ {
+ if ( 2 == nDigits )
+ {
+ long nMod = 100;
+ long nTmp = nRet % nMod;
+
+ if ( nTmp >= 49 )
+ nRet += 100 - nTmp;
+ return nRet / 100;
+ }
+ else if ( 1 == nDigits )
+ {
+ long nMod = 10;
+ long nTmp = nRet % nMod;
+
+ if ( nTmp >= 4 )
+ nRet += 10 - nTmp;
+ return nRet / 10;
+ }
+ else
+ return nRet;
+ }
+
+ default:
+ DBG_ERROR( "this unit is not implemented" );
+ return 0;
+ }
+*/
+
+/*!!!
+ return ConvertValueToMap( rField.Denormalize(
+ rField.GetValue( MapToFieldUnit( eUnit ) ) ), eUnit );
+*/
+}
+
+// -----------------------------------------------------------------------
+
+long CalcToUnit( float nIn, SfxMapUnit eUnit )
+{
+ // nIn ist in Points
+
+ DBG_ASSERT( eUnit == SFX_MAPUNIT_TWIP ||
+ eUnit == SFX_MAPUNIT_100TH_MM ||
+ eUnit == SFX_MAPUNIT_10TH_MM ||
+ eUnit == SFX_MAPUNIT_MM ||
+ eUnit == SFX_MAPUNIT_CM, "this unit is not implemented" );
+
+ float nTmp = nIn;
+
+ if ( SFX_MAPUNIT_TWIP != eUnit )
+ nTmp = nIn * 10 / 567;
+
+ switch ( eUnit )
+ {
+ case SFX_MAPUNIT_100TH_MM: nTmp *= 100; break;
+ case SFX_MAPUNIT_10TH_MM: nTmp *= 10; break;
+ case SFX_MAPUNIT_MM: break;
+ case SFX_MAPUNIT_CM: nTmp /= 10; break;
+ }
+
+ nTmp *= 20;
+ long nRet = (long)nTmp;
+ return nRet;
+//! return (long)(nTmp * 20);
+}
+
+// -----------------------------------------------------------------------
+
+long ItemToControl( long nIn, SfxMapUnit eItem, SfxFieldUnit eCtrl )
+{
+ long nOut = 0;
+
+ switch ( eItem )
+ {
+ case SFX_MAPUNIT_100TH_MM:
+ case SFX_MAPUNIT_10TH_MM:
+ case SFX_MAPUNIT_MM:
+ {
+ if ( eItem == SFX_MAPUNIT_10TH_MM )
+ nIn /= 10;
+ else if ( eItem == SFX_MAPUNIT_100TH_MM )
+ nIn /= 100;
+ nOut = TransformMetric( nIn, FUNIT_MM, (FieldUnit)eCtrl );
+ }
+ break;
+
+ case SFX_MAPUNIT_CM:
+ {
+ nOut = TransformMetric( nIn, FUNIT_CM, (FieldUnit)eCtrl );
+ }
+ break;
+
+ case SFX_MAPUNIT_1000TH_INCH:
+ case SFX_MAPUNIT_100TH_INCH:
+ case SFX_MAPUNIT_10TH_INCH:
+ case SFX_MAPUNIT_INCH:
+ {
+ if ( eItem == SFX_MAPUNIT_10TH_INCH )
+ nIn /= 10;
+ else if ( eItem == SFX_MAPUNIT_100TH_INCH )
+ nIn /= 100;
+ else if ( eItem == SFX_MAPUNIT_1000TH_INCH )
+ nIn /= 1000;
+ nOut = TransformMetric( nIn, FUNIT_INCH, (FieldUnit)eCtrl );
+ }
+ break;
+
+ case SFX_MAPUNIT_POINT:
+ {
+ nOut = TransformMetric( nIn, FUNIT_POINT, (FieldUnit)eCtrl );
+ }
+ break;
+
+ case SFX_MAPUNIT_TWIP:
+ {
+ nOut = TransformMetric( nIn, FUNIT_TWIP, (FieldUnit)eCtrl );
+ }
+ break;
+ }
+ return nOut;
+}
+
+// -----------------------------------------------------------------------
+
+long ControlToItem( long nIn, SfxFieldUnit eCtrl, SfxMapUnit eItem )
+{
+ return ItemToControl( nIn, eItem, eCtrl );
+}
+
+// -----------------------------------------------------------------------
+
+FieldUnit MapToFieldUnit( const SfxMapUnit eUnit )
+{
+ switch ( eUnit )
+ {
+ case SFX_MAPUNIT_100TH_MM:
+ case SFX_MAPUNIT_10TH_MM:
+ case SFX_MAPUNIT_MM:
+ return FUNIT_MM;
+
+ case SFX_MAPUNIT_CM:
+ return FUNIT_CM;
+
+ case SFX_MAPUNIT_1000TH_INCH:
+ case SFX_MAPUNIT_100TH_INCH:
+ case SFX_MAPUNIT_10TH_INCH:
+ case SFX_MAPUNIT_INCH:
+ return FUNIT_INCH;
+
+ case SFX_MAPUNIT_POINT:
+ return FUNIT_POINT;
+
+ case SFX_MAPUNIT_TWIP:
+ return FUNIT_TWIP;
+ }
+ return FUNIT_NONE;
+}
+
+// -----------------------------------------------------------------------
+
+MapUnit FieldToMapUnit( const SfxFieldUnit eUnit )
+{
+ return MAP_APPFONT;
+}
+
+// -----------------------------------------------------------------------
+
+long ConvertValueToMap( long nVal, SfxMapUnit eUnit )
+{
+ long nNew = nVal;
+
+ switch ( eUnit )
+ {
+ case SFX_MAPUNIT_10TH_MM:
+ case SFX_MAPUNIT_10TH_INCH:
+ nNew *= 10;
+ break;
+
+ case SFX_MAPUNIT_100TH_MM:
+ case SFX_MAPUNIT_100TH_INCH:
+ nNew *= 100;
+ break;
+
+ case SFX_MAPUNIT_1000TH_INCH:
+ nNew *= 1000;
+ }
+ return nNew;
+}
+
+// -----------------------------------------------------------------------
+
+long ConvertValueToUnit( long nVal, SfxMapUnit eUnit )
+{
+ long nNew = nVal;
+
+ switch ( eUnit )
+ {
+ case SFX_MAPUNIT_10TH_MM:
+ case SFX_MAPUNIT_10TH_INCH:
+ nNew /= 10;
+ break;
+
+ case SFX_MAPUNIT_100TH_MM:
+ case SFX_MAPUNIT_100TH_INCH:
+ nNew /= 100;
+ break;
+
+ case SFX_MAPUNIT_1000TH_INCH:
+ nNew /= 1000;
+ }
+ return nNew;
+}
+
+// -----------------------------------------------------------------------
+
+long CalcToPoint( long nIn, SfxMapUnit eUnit, USHORT nFaktor )
+{
+ DBG_ASSERT( eUnit == SFX_MAPUNIT_TWIP ||
+ eUnit == SFX_MAPUNIT_100TH_MM ||
+ eUnit == SFX_MAPUNIT_10TH_MM ||
+ eUnit == SFX_MAPUNIT_MM ||
+ eUnit == SFX_MAPUNIT_CM, "this unit is not implemented" );
+
+ long nRet = 0;
+
+ if ( SFX_MAPUNIT_TWIP == eUnit )
+ nRet = nIn;
+ else
+ nRet = nIn * 567;
+
+ switch ( eUnit )
+ {
+ case SFX_MAPUNIT_100TH_MM: nRet /= 100; break;
+ case SFX_MAPUNIT_10TH_MM: nRet /= 10; break;
+ case SFX_MAPUNIT_MM: break;
+ case SFX_MAPUNIT_CM: nRet *= 10; break;
+ }
+
+ // ggf. aufrunden
+ if ( SFX_MAPUNIT_TWIP != eUnit )
+ {
+ long nMod = 10;
+ long nTmp = nRet % nMod;
+
+ if ( nTmp >= 4 )
+ nRet += 10 - nTmp;
+ nRet /= 10;
+ }
+ return nRet * nFaktor / 20;
+}
+
+// -----------------------------------------------------------------------
+
+long CMToTwips( long nIn )
+{
+ long nRet = 0;
+
+ if ( nIn <= ( LONG_MAX / 567 ) && nIn >= ( LONG_MIN / 567 ) )
+ nRet = nIn * 567;
+ return nRet;
+}
+
+// -----------------------------------------------------------------------
+
+long MMToTwips( long nIn )
+{
+ long nRet = 0;
+
+ if ( nIn <= ( LONG_MAX / 567 ) && nIn >= ( LONG_MIN / 567 ) )
+ nRet = nIn * 567 / 10;
+ return nRet;
+}
+
+// -----------------------------------------------------------------------
+
+long InchToTwips( long nIn )
+{
+ long nRet = 0;
+
+ if ( nIn <= ( LONG_MAX / 1440 ) && nIn >= ( LONG_MIN / 1440 ) )
+ nRet = nIn * 1440;
+ return nRet;
+}
+
+// -----------------------------------------------------------------------
+
+long PointToTwips( long nIn )
+{
+ long nRet = 0;
+
+ if ( nIn <= ( LONG_MAX / 20 ) && nIn >= ( LONG_MIN / 20 ) )
+ nRet = nIn * 20;
+ return nRet;
+}
+
+// -----------------------------------------------------------------------
+
+long PicaToTwips( long nIn )
+{
+ long nRet = 0;
+
+ if ( nIn <= ( LONG_MAX / 240 ) && nIn >= ( LONG_MIN / 240 ) )
+ nRet = nIn * 240;
+ return nRet;
+}
+
+// -----------------------------------------------------------------------
+
+long TwipsToCM( long nIn )
+{
+ long nRet = nIn / 567;
+ return nRet;
+}
+
+// -----------------------------------------------------------------------
+
+long InchToCM( long nIn )
+{
+ long nRet = 0;
+
+ if ( nIn <= ( LONG_MAX / 254 ) && nIn >= ( LONG_MIN / 254 ) )
+ nRet = nIn * 254 / 100;
+ return nRet;
+}
+
+// -----------------------------------------------------------------------
+
+long MMToCM( long nIn )
+{
+ long nRet = nIn / 10;
+ return nRet;
+}
+
+// -----------------------------------------------------------------------
+
+long PointToCM( long nIn )
+{
+ long nRet = 0;
+
+ if ( nIn <= ( LONG_MAX / 20 ) && nIn >= ( LONG_MIN / 20 ) )
+ nRet = nIn * 20 / 567;
+ return nRet;
+}
+
+// -----------------------------------------------------------------------
+
+long PicaToCM( long nIn)
+{
+ long nRet = 0;
+
+ if ( nIn <= ( LONG_MAX / 12 / 20 ) && nIn >= ( LONG_MIN / 12 / 20 ) )
+ nRet = nIn * 12 * 20 / 567;
+ return nRet;
+}
+
+// -----------------------------------------------------------------------
+
+long TwipsToMM( long nIn )
+{
+ long nRet = 0;
+
+ if ( nIn <= ( LONG_MAX / 10 ) && nIn >= ( LONG_MIN / 10 ) )
+ nRet = nIn * 10 / 566;
+ return nRet;
+}
+
+// -----------------------------------------------------------------------
+
+long CMToMM( long nIn )
+{
+ long nRet = 0;
+
+ if ( nIn <= ( LONG_MAX / 10 ) && nIn >= ( LONG_MIN / 10 ) )
+ nRet = nIn * 10;
+ return nRet;
+}
+
+// -----------------------------------------------------------------------
+
+long InchToMM( long nIn )
+{
+ long nRet = 0;
+
+ if ( nIn <= ( LONG_MAX / 254 ) && nIn >= ( LONG_MIN / 254 ) )
+ nRet = nIn * 254 / 10;
+ return nRet;
+}
+
+// -----------------------------------------------------------------------
+
+long PointToMM( long nIn )
+{
+ long nRet = 0;
+
+ if ( nIn <= ( LONG_MAX / 200 ) && nIn >= ( LONG_MIN / 200 ) )
+ nRet = nIn * 200 / 567;
+ return nRet;
+}
+
+// -----------------------------------------------------------------------
+
+long PicaToMM( long nIn )
+{
+ long nRet = 0;
+
+ if ( nIn <= ( LONG_MAX / 12 / 200 ) && nIn >= ( LONG_MIN / 12 / 200 ) )
+ nRet = nIn * 12 * 200 / 567;
+ return nRet;
+}
+
+// -----------------------------------------------------------------------
+
+long TwipsToInch( long nIn )
+{
+ long nRet = nIn / 1440;
+ return nRet;
+}
+
+// -----------------------------------------------------------------------
+
+long CMToInch( long nIn )
+{
+ long nRet = 0;
+
+ if ( nIn <= ( LONG_MAX / 100 ) && nIn >= ( LONG_MIN / 100 ) )
+ nRet = nIn * 100 / 254;
+ return nRet;
+}
+
+// -----------------------------------------------------------------------
+
+long MMToInch( long nIn )
+{
+ long nRet = 0;
+
+ if ( nIn <= ( LONG_MAX / 10 ) && nIn >= ( LONG_MIN / 10 ) )
+ nRet = nIn * 10 / 254;
+ return nRet;
+}
+
+// -----------------------------------------------------------------------
+
+long PointToInch( long nIn )
+{
+ long nRet = nIn / 72;
+ return nRet;
+}
+
+// -----------------------------------------------------------------------
+
+long PicaToInch( long nIn )
+{
+ long nRet = nIn / 6;
+ return nRet;
+}
+
+// -----------------------------------------------------------------------
+
+long TwipsToPoint( long nIn )
+{
+ long nRet = nIn / 20;
+ return nRet;
+}
+
+// -----------------------------------------------------------------------
+
+long InchToPoint( long nIn )
+{
+ long nRet = 0;
+
+ if ( nIn <= ( LONG_MAX / 72 ) && nIn >= ( LONG_MIN / 72 ) )
+ nRet = nIn * 72;
+ return nRet;
+}
+
+// -----------------------------------------------------------------------
+
+long CMToPoint( long nIn )
+{
+ long nRet = 0;
+
+ if ( nIn <= ( LONG_MAX / 567 ) && nIn >= ( LONG_MIN / 567 ) )
+ nRet = nIn * 567 / 20;
+ return nRet;
+}
+
+// -----------------------------------------------------------------------
+
+long MMToPoint( long nIn )
+{
+ long nRet = 0;
+
+ if ( nIn <= ( LONG_MAX / 567 ) && nIn >= ( LONG_MIN / 567 ) )
+ nRet = nIn * 567 / 200;
+ return nRet;
+}
+
+// -----------------------------------------------------------------------
+
+long PicaToPoint( long nIn )
+{
+ long nRet = nIn / 12;
+ return nRet;
+}
+
+// -----------------------------------------------------------------------
+
+long TwipsToPica( long nIn )
+{
+ long nRet = nIn / 240;
+ return nRet;
+}
+
+// -----------------------------------------------------------------------
+
+long InchToPica( long nIn )
+{
+ long nRet = 0;
+
+ if ( nIn <= ( LONG_MAX / 6 ) && nIn >= ( LONG_MIN / 6 ) )
+ nRet = nIn * 6;
+ return nRet;
+}
+
+// -----------------------------------------------------------------------
+
+long PointToPica( long nIn )
+{
+ long nRet = 0;
+
+ if ( nIn <= ( LONG_MAX / 12 ) && nIn >= ( LONG_MIN / 12 ) )
+ nRet = nIn * 12;
+ return nRet;
+}
+
+// -----------------------------------------------------------------------
+
+long CMToPica( long nIn )
+{
+ long nRet = 0;
+
+ if ( nIn <= ( LONG_MAX / 567 ) && nIn >= ( LONG_MIN / 567 ) )
+ nRet = nIn * 567 / 20 / 12;
+ return nRet;
+}
+
+// -----------------------------------------------------------------------
+
+long MMToPica( long nIn )
+{
+ long nRet = 0;
+
+ if ( nIn <= ( LONG_MAX / 567 ) && nIn >= ( LONG_MIN / 567 ) )
+ nRet = nIn * 567 / 200 / 12;
+ return nRet;
+}
+
+// -----------------------------------------------------------------------
+
+long Nothing( long nIn )
+{
+ long nRet = nIn;
+ return nRet;
+}
+
+FUNC_CONVERT ConvertTable[6][6] =
+{
+// CM, MM INCH POINT PICAS=32 TWIPS
+ Nothing, CMToMM, CMToInch, CMToPoint, CMToPica, CMToTwips,
+ MMToCM, Nothing, MMToInch, MMToPoint, MMToPica, MMToTwips,
+ InchToCM, InchToMM, Nothing, InchToPoint, InchToPica, InchToTwips,
+ PointToCM, PointToMM, PointToInch, Nothing, PointToPica, PointToTwips,
+ PicaToCM, PicaToMM, PicaToInch, PicaToPoint, Nothing, PicaToTwips,
+ TwipsToCM, TwipsToMM, TwipsToInch, TwipsToPoint,TwipsToPica, Nothing
+};
+
+// -----------------------------------------------------------------------
+
+long TransformMetric( long nVal, FieldUnit aOld, FieldUnit aNew )
+{
+ if ( aOld == FUNIT_NONE || aNew == FUNIT_NONE ||
+ aOld == FUNIT_CUSTOM || aNew == FUNIT_CUSTOM )
+ {
+ return nVal;
+ }
+
+ USHORT nOld = 0;
+ USHORT nNew = 0;
+
+ switch ( aOld )
+ {
+ case FUNIT_CM:
+ nOld = 0; break;
+ case FUNIT_MM:
+ nOld = 1; break;
+ case FUNIT_INCH:
+ nOld = 2; break;
+ case FUNIT_POINT:
+ nOld = 3; break;
+ case FUNIT_PICA:
+ nOld = 4; break;
+ case FUNIT_TWIP:
+ nOld = 5; break;
+ }
+
+ switch ( aNew )
+ {
+ case FUNIT_CM:
+ nNew = 0; break;
+ case FUNIT_MM:
+ nNew = 1; break;
+ case FUNIT_INCH:
+ nNew = 2; break;
+ case FUNIT_POINT:
+ nNew = 3; break;
+ case FUNIT_PICA:
+ nNew = 4; break;
+ case FUNIT_TWIP:
+ nNew = 5; break;
+ }
+ return ConvertTable[nOld][nNew]( nVal );
+}
+
+
diff --git a/svx/source/dialog/dstribut.cxx b/svx/source/dialog/dstribut.cxx
new file mode 100644
index 000000000000..563b76451d0b
--- /dev/null
+++ b/svx/source/dialog/dstribut.cxx
@@ -0,0 +1,275 @@
+/*************************************************************************
+ *
+ * $RCSfile: dstribut.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:08 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _BASEDLGS_HXX
+#include <sfx2/basedlgs.hxx>
+#endif
+
+#include "dialogs.hrc"
+#include "dstribut.hxx"
+#include "dstribut.hrc"
+
+#include "svddef.hxx"
+#include "dialmgr.hxx"
+
+#ifndef _SHL_HXX
+#include <tools/shl.hxx>
+#endif
+
+static USHORT pRanges[] =
+{
+ SDRATTR_MEASURE_FIRST,
+ SDRATTR_MEASURE_LAST,
+ 0
+};
+
+/*************************************************************************
+|*
+|* Dialog
+|*
+\************************************************************************/
+
+SvxDistributeDialog::SvxDistributeDialog(
+ Window* pParent,
+ const SfxItemSet& rInAttrs,
+ SvxDistributeHorizontal eHor,
+ SvxDistributeVertical eVer)
+: SfxSingleTabDialog(pParent, rInAttrs, RID_SVXPAGE_DISTRIBUTE, FALSE),
+ mpPage(0L)
+{
+ mpPage = new SvxDistributePage(this, rInAttrs, eHor, eVer);
+ SetTabPage(mpPage);
+ SetText(mpPage->GetText());
+}
+
+/*************************************************************************
+|*
+|* Dtor
+|*
+\************************************************************************/
+
+SvxDistributeDialog::~SvxDistributeDialog()
+{
+}
+
+/*************************************************************************
+|*
+|* Tabpage
+|*
+\************************************************************************/
+
+SvxDistributePage::SvxDistributePage(
+ Window* pWindow,
+ const SfxItemSet& rInAttrs,
+ SvxDistributeHorizontal eHor,
+ SvxDistributeVertical eVer)
+: SvxTabPage(pWindow, ResId(RID_SVXPAGE_DISTRIBUTE, DIALOG_MGR()), rInAttrs),
+ meDistributeHor(eHor),
+ meDistributeVer(eVer),
+ maGrpHorizontal (this, ResId(GRP_HORIZONTAL )),
+ maBtnHorNone (this, ResId(BTN_HOR_NONE )),
+ maBtnHorLeft (this, ResId(BTN_HOR_LEFT )),
+ maBtnHorCenter (this, ResId(BTN_HOR_CENTER )),
+ maBtnHorDistance (this, ResId(BTN_HOR_DISTANCE )),
+ maBtnHorRight (this, ResId(BTN_HOR_RIGHT )),
+ maHorLow (this, ResId(IMG_HOR_LOW )),
+ maHorCenter (this, ResId(IMG_HOR_CENTER )),
+ maHorDistance (this, ResId(IMG_HOR_DISTANCE )),
+ maHorHigh (this, ResId(IMG_HOR_HIGH )),
+ maGrpVertical (this, ResId(GRP_VERTICAL )),
+ maBtnVerNone (this, ResId(BTN_VER_NONE )),
+ maBtnVerTop (this, ResId(BTN_VER_TOP )),
+ maBtnVerCenter (this, ResId(BTN_VER_CENTER )),
+ maBtnVerDistance (this, ResId(BTN_VER_DISTANCE )),
+ maBtnVerBottom (this, ResId(BTN_VER_BOTTOM )),
+ maVerDistance (this, ResId(IMG_VER_DISTANCE )),
+ maVerLow (this, ResId(IMG_VER_LOW )),
+ maVerCenter (this, ResId(IMG_VER_CENTER )),
+ maVerHigh (this, ResId(IMG_VER_HIGH )),
+ maGrpPreview (this, ResId(GRP_PREVIEW ))
+{
+ FreeResource();
+
+ maGrpPreview.Hide();
+}
+
+/*************************************************************************
+|*
+|* Dtor
+|*
+\************************************************************************/
+
+SvxDistributePage::~SvxDistributePage()
+{
+}
+
+/*************************************************************************
+|*
+|* create the tabpage
+|*
+\************************************************************************/
+
+SfxTabPage* SvxDistributePage::Create(Window* pWindow, const SfxItemSet& rAttrs,
+ SvxDistributeHorizontal eHor, SvxDistributeVertical eVer)
+{
+ return(new SvxDistributePage(pWindow, rAttrs, eHor, eVer));
+}
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+UINT16* SvxDistributePage::GetRanges()
+{
+ return(pRanges);
+}
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+void SvxDistributePage::PointChanged(Window* pWindow, RECT_POINT eRP)
+{
+}
+
+/*************************************************************************
+|*
+|* read the delivered Item-Set
+|*
+\************************************************************************/
+
+void __EXPORT SvxDistributePage::Reset(const SfxItemSet& rAttrs)
+{
+ maBtnHorNone.SetState(FALSE);
+ maBtnHorLeft.SetState(FALSE);
+ maBtnHorCenter.SetState(FALSE);
+ maBtnHorDistance.SetState(FALSE);
+ maBtnHorRight.SetState(FALSE);
+
+ switch(meDistributeHor)
+ {
+ case SvxDistributeHorizontalNone : maBtnHorNone.SetState(TRUE); break;
+ case SvxDistributeHorizontalLeft : maBtnHorLeft.SetState(TRUE); break;
+ case SvxDistributeHorizontalCenter : maBtnHorCenter.SetState(TRUE); break;
+ case SvxDistributeHorizontalDistance : maBtnHorDistance.SetState(TRUE); break;
+ case SvxDistributeHorizontalRight : maBtnHorRight.SetState(TRUE); break;
+ }
+
+ maBtnVerNone.SetState(FALSE);
+ maBtnVerTop.SetState(FALSE);
+ maBtnVerCenter.SetState(FALSE);
+ maBtnVerDistance.SetState(FALSE);
+ maBtnVerBottom.SetState(FALSE);
+
+ switch(meDistributeVer)
+ {
+ case SvxDistributeVerticalNone : maBtnVerNone.SetState(TRUE); break;
+ case SvxDistributeVerticalTop : maBtnVerTop.SetState(TRUE); break;
+ case SvxDistributeVerticalCenter : maBtnVerCenter.SetState(TRUE); break;
+ case SvxDistributeVerticalDistance : maBtnVerDistance.SetState(TRUE); break;
+ case SvxDistributeVerticalBottom : maBtnVerBottom.SetState(TRUE); break;
+ }
+}
+
+/*************************************************************************
+|*
+|* Fill the delivered Item-Set with dialogbox-attributes
+|*
+\************************************************************************/
+
+BOOL SvxDistributePage::FillItemSet( SfxItemSet& rAttrs)
+{
+ SvxDistributeHorizontal eDistributeHor(SvxDistributeHorizontalNone);
+ SvxDistributeVertical eDistributeVer(SvxDistributeVerticalNone);
+
+ if(maBtnHorLeft.IsChecked())
+ eDistributeHor = SvxDistributeHorizontalLeft;
+ else if(maBtnHorCenter.IsChecked())
+ eDistributeHor = SvxDistributeHorizontalCenter;
+ else if(maBtnHorDistance.IsChecked())
+ eDistributeHor = SvxDistributeHorizontalDistance;
+ else if(maBtnHorRight.IsChecked())
+ eDistributeHor = SvxDistributeHorizontalRight;
+
+ if(maBtnVerTop.IsChecked())
+ eDistributeVer = SvxDistributeVerticalTop;
+ else if(maBtnVerCenter.IsChecked())
+ eDistributeVer = SvxDistributeVerticalCenter;
+ else if(maBtnVerDistance.IsChecked())
+ eDistributeVer = SvxDistributeVerticalDistance;
+ else if(maBtnVerBottom.IsChecked())
+ eDistributeVer = SvxDistributeVerticalBottom;
+
+ if(eDistributeHor != meDistributeHor || eDistributeVer != meDistributeVer)
+ {
+ meDistributeHor = eDistributeHor;
+ meDistributeVer = eDistributeVer;
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+
diff --git a/svx/source/dialog/dstribut.hrc b/svx/source/dialog/dstribut.hrc
new file mode 100644
index 000000000000..e98211785e78
--- /dev/null
+++ b/svx/source/dialog/dstribut.hrc
@@ -0,0 +1,81 @@
+/*************************************************************************
+ *
+ * $RCSfile: dstribut.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:08 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define GRP_HORIZONTAL 1
+#define BTN_HOR_NONE 2
+#define BTN_HOR_LEFT 3
+#define BTN_HOR_CENTER 4
+#define BTN_HOR_DISTANCE 5
+#define BTN_HOR_RIGHT 6
+#define GRP_VERTICAL 7
+#define BTN_VER_NONE 8
+#define BTN_VER_TOP 9
+#define BTN_VER_CENTER 10
+#define BTN_VER_DISTANCE 11
+#define BTN_VER_BOTTOM 12
+#define GRP_PREVIEW 13
+#define IMG_HOR_LOW 14
+#define IMG_HOR_CENTER 15
+#define IMG_HOR_DISTANCE 16
+#define IMG_HOR_HIGH 17
+#define IMG_VER_LOW 18
+#define IMG_VER_CENTER 19
+#define IMG_VER_DISTANCE 20
+#define IMG_VER_HIGH 21
diff --git a/svx/source/dialog/dstribut.src b/svx/source/dialog/dstribut.src
new file mode 100644
index 000000000000..1a376920fc64
--- /dev/null
+++ b/svx/source/dialog/dstribut.src
@@ -0,0 +1,514 @@
+/*************************************************************************
+ *
+ * $RCSfile: dstribut.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:08 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+// include ---------------------------------------------------------------
+#include "dialogs.hrc"
+#include "dstribut.hrc"
+#include "helpid.hrc"
+
+// RID_SVXPAGE_DISTRIBUTE ---------------------------------------------------
+#define STD_MASKCOLOR Color { Red=0xffff; Green=0x0000; Blue=0xffff; }
+TabPage RID_SVXPAGE_DISTRIBUTE
+{
+ HelpId = HID_PAGE_DISTRIBUTE ;
+ Hide = TRUE ;
+ Size = MAP_APPFONT ( 260 , 135 ) ;
+ Text = "Verteilung" ;
+ Text [ ENGLISH ] = "Distribution" ;
+ Text [ english_us ] = "Distribution" ;
+
+ GroupBox GRP_HORIZONTAL
+ {
+ Pos = MAP_APPFONT( 6 , 6 ) ;
+ Size = MAP_APPFONT( 248 , 37 ) ;
+ Text = "Horizontal" ;
+ Text [ ENGLISH ] = "Horizontal" ;
+ Text [ english_us ] = "Horizontally" ;
+ Text[ portuguese ] = "Horizontal";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "Horizontaal";
+ Text[ french ] = "Horizontalement";
+ Text[ spanish ] = "Horizontal";
+ Text[ italian ] = "Orizzontale";
+ Text[ danish ] = "Vandret";
+ Text[ swedish ] = "Horisontal";
+ Text[ polish ] = "Poziomo";
+ Text[ portuguese_brazilian ] = "Horizontal";
+ Text[ japanese ] = "";
+ Text[ korean ] = "";
+ Text[ chinese_simplified ] = "ˮƽ";
+ Text[ chinese_traditional ] = "";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "Yatay";
+ };
+
+ RadioButton BTN_HOR_NONE
+ {
+ Pos = MAP_APPFONT( 12 , 18 ) ;
+ Size = MAP_APPFONT( 48 , 12) ;
+ Text = "Keine" ;
+ Text [ ENGLISH ] = "None" ;
+ Text [ ENGLISH_US ] = "None" ;
+ Text[ portuguese ] = "Nenhuma";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "Geen";
+ Text[ french ] = "Aucune";
+ Text[ spanish ] = "Ninguno";
+ Text[ italian ] = "Senza";
+ Text[ danish ] = "Ingen";
+ Text[ swedish ] = "Ingen";
+ Text[ polish ] = "Brak";
+ Text[ portuguese_brazilian ] = "None";
+ Text[ japanese ] = "Ȃ";
+ Text[ korean ] = "";
+ Text[ chinese_simplified ] = "";
+ Text[ chinese_traditional ] = "L";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "Yok";
+ };
+
+ RadioButton BTN_HOR_LEFT
+ {
+ Pos = MAP_APPFONT( 7 + (1 * 49) , 28 ) ;
+ Size = MAP_APPFONT( 48 , 12) ;
+ Text = "Links" ;
+ Text [ ENGLISH ] = "Left" ;
+ Text [ ENGLISH_US ] = "Left" ;
+ Text[ portuguese ] = "Esquerda";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "Links";
+ Text[ french ] = " gauche";
+ Text[ spanish ] = "Izquierda";
+ Text[ italian ] = "Sinistra";
+ Text[ danish ] = "Venstre";
+ Text[ swedish ] = "Vnster";
+ Text[ polish ] = "Z lewej";
+ Text[ portuguese_brazilian ] = "Left";
+ Text[ japanese ] = "";
+ Text[ korean ] = "";
+ Text[ chinese_simplified ] = "";
+ Text[ chinese_traditional ] = "";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "Sol";
+ };
+
+ RadioButton BTN_HOR_CENTER
+ {
+ Pos = MAP_APPFONT( 7 + (2 * 49) , 28 ) ;
+ Size = MAP_APPFONT( 48 , 12 ) ;
+ Text = "Mitte" ;
+ Text [ ENGLISH ] = "Center" ;
+ Text [ ENGLISH_US ] = "Center" ;
+ Text[ portuguese ] = "Centro";
+ Text[ russian ] = " ";
+ Text[ greek ] = "";
+ Text[ dutch ] = "Minnden";
+ Text[ french ] = "Au milieu";
+ Text[ spanish ] = "Centro";
+ Text[ italian ] = "Centro";
+ Text[ danish ] = "Midte";
+ Text[ swedish ] = "Mitten";
+ Text[ polish ] = "Porodku";
+ Text[ portuguese_brazilian ] = "Center";
+ Text[ japanese ] = "";
+ Text[ korean ] = "";
+ Text[ chinese_simplified ] = "";
+ Text[ chinese_traditional ] = "~";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "Orta";
+ };
+
+ RadioButton BTN_HOR_DISTANCE
+ {
+ Pos = MAP_APPFONT( 7 + (3 * 49) , 28 ) ;
+ Size = MAP_APPFONT( 48 , 12 ) ;
+ Text = "Abstand" ;
+ Text [ ENGLISH ] = "Distance" ;
+ Text [ ENGLISH_US ] = "Spacing" ;
+ Text[ portuguese ] = "Distncia";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "Afstand";
+ Text[ french ] = "cart";
+ Text[ spanish ] = "Espacio";
+ Text[ italian ] = "Distanza";
+ Text[ danish ] = "Afstand";
+ Text[ swedish ] = "Avstnd";
+ Text[ polish ] = "Odstp";
+ Text[ portuguese_brazilian ] = "Distance";
+ Text[ japanese ] = "Ԋu";
+ Text[ korean ] = "";
+ Text[ chinese_simplified ] = "";
+ Text[ chinese_traditional ] = "j";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "Aralk";
+ };
+
+ RadioButton BTN_HOR_RIGHT
+ {
+ Pos = MAP_APPFONT( 7 + (4 * 49) , 28 ) ;
+ Size = MAP_APPFONT( 48 , 12 ) ;
+ Text = "Rechts" ;
+ Text [ ENGLISH ] = "Right" ;
+ Text [ ENGLISH_US ] = "Right" ;
+ Text[ portuguese ] = "Direita";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "Rechts";
+ Text[ french ] = " droite";
+ Text[ spanish ] = "Derecha";
+ Text[ italian ] = "Destra";
+ Text[ danish ] = "Hjre";
+ Text[ swedish ] = "Hger";
+ Text[ polish ] = "Z prawej";
+ Text[ portuguese_brazilian ] = "Right";
+ Text[ japanese ] = "E";
+ Text[ korean ] = "";
+ Text[ chinese_simplified ] = "";
+ Text[ chinese_traditional ] = "k";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "Sa";
+ };
+
+ FixedImage IMG_HOR_LOW {
+ Pos = MAP_APPFONT( 7 + (1 * 49) + 9 , 14 );
+ Size = ( 15, 16 );
+ Hide = FALSE;
+ Fixed = Image {
+ ImageBitmap = Bitmap { File = "dsth_low.bmp"; };
+ MaskColor = STD_MASKCOLOR;
+ };
+ };
+
+ FixedImage IMG_HOR_CENTER {
+ Pos = MAP_APPFONT( 7 + (2 * 49) + 9 , 14 );
+ Size = ( 15, 16 );
+ Hide = FALSE;
+ Fixed = Image {
+ ImageBitmap = Bitmap { File = "dsth_cen.bmp"; };
+ MaskColor = STD_MASKCOLOR;
+ };
+ };
+
+ FixedImage IMG_HOR_DISTANCE {
+ Pos = MAP_APPFONT( 7 + (3 * 49) + 9 , 14 );
+ Size = ( 15, 16 );
+ Hide = FALSE;
+ Fixed = Image {
+ ImageBitmap = Bitmap { File = "dsth_dst.bmp"; };
+ MaskColor = STD_MASKCOLOR;
+ };
+ };
+
+ FixedImage IMG_HOR_HIGH {
+ Pos = MAP_APPFONT( 7 + (4 * 49) + 9 , 14 );
+ Size = ( 15, 16 );
+ Hide = FALSE;
+ Fixed = Image {
+ ImageBitmap = Bitmap { File = "dsth_hig.bmp"; };
+ MaskColor = STD_MASKCOLOR;
+ };
+ };
+
+ GroupBox GRP_VERTICAL
+ {
+ Pos = MAP_APPFONT( 6, 51 ) ;
+ Size = MAP_APPFONT( 110 , 76 ) ;
+ Text = "Vertikal" ;
+ Text [ ENGLISH ] = "Vertical" ;
+ Text [ english_us ] = "Vertically" ;
+ Text[ portuguese ] = "Vertical";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "Verticaal";
+ Text[ french ] = "Verticalement";
+ Text[ spanish ] = "Vertical";
+ Text[ italian ] = "Verticale";
+ Text[ danish ] = "Lodret";
+ Text[ swedish ] = "Vertikal";
+ Text[ polish ] = "Pionowo";
+ Text[ portuguese_brazilian ] = "Vertical";
+ Text[ japanese ] = "c";
+ Text[ korean ] = "";
+ Text[ chinese_simplified ] = "ֱ";
+ Text[ chinese_traditional ] = "";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "Dikey";
+ };
+
+ RadioButton BTN_VER_NONE
+ {
+ Pos = MAP_APPFONT( 12 , 63 ) ;
+ Size = MAP_APPFONT( 46 , 12 ) ;
+ Text = "Keine" ;
+ Text [ ENGLISH ] = "None" ;
+ Text [ ENGLISH_US ] = "None" ;
+ Text[ portuguese ] = "Nenhuma";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "Geen";
+ Text[ french ] = "Aucune";
+ Text[ spanish ] = "Ninguno";
+ Text[ italian ] = "Senza";
+ Text[ danish ] = "Ingen";
+ Text[ swedish ] = "Ingen";
+ Text[ polish ] = "Brak";
+ Text[ portuguese_brazilian ] = "None";
+ Text[ japanese ] = "Ȃ";
+ Text[ korean ] = "";
+ Text[ chinese_simplified ] = "";
+ Text[ chinese_traditional ] = "L";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "Yok";
+ };
+
+ RadioButton BTN_VER_TOP
+ {
+ Pos = MAP_APPFONT( 56 , 63 ) ;
+ Size = MAP_APPFONT( 48 , 12 ) ;
+ Text = "Oben" ;
+ Text [ ENGLISH ] = "Top" ;
+ Text [ ENGLISH_US ] = "Top" ;
+ Text[ portuguese ] = "Em cima";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "Boven";
+ Text[ french ] = "En haut";
+ Text[ spanish ] = "Arriba";
+ Text[ italian ] = "Sopra";
+ Text[ danish ] = "Oppe";
+ Text[ swedish ] = "Uppe";
+ Text[ polish ] = "U gry";
+ Text[ portuguese_brazilian ] = "Top";
+ Text[ japanese ] = "";
+ Text[ korean ] = "";
+ Text[ chinese_simplified ] = "Ϸ";
+ Text[ chinese_traditional ] = "W";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "st";
+ };
+
+ RadioButton BTN_VER_CENTER
+ {
+ Pos = MAP_APPFONT( 56 , 63 + (1 * 16) ) ;
+ Size = MAP_APPFONT( 48 , 12 ) ;
+ Text = "Mitte" ;
+ Text [ ENGLISH ] = "Center" ;
+ Text [ ENGLISH_US ] = "Center" ;
+ Text[ portuguese ] = "Centro";
+ Text[ russian ] = " ";
+ Text[ greek ] = "";
+ Text[ dutch ] = "Midden";
+ Text[ french ] = "Au milieu";
+ Text[ spanish ] = "Centro";
+ Text[ italian ] = "Centro";
+ Text[ danish ] = "Midte";
+ Text[ swedish ] = "Mitten";
+ Text[ polish ] = "Porodku";
+ Text[ portuguese_brazilian ] = "Center";
+ Text[ japanese ] = "";
+ Text[ korean ] = "";
+ Text[ chinese_simplified ] = "";
+ Text[ chinese_traditional ] = "~";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "Orta";
+ };
+
+ RadioButton BTN_VER_DISTANCE
+ {
+ Pos = MAP_APPFONT( 56 , 63 + (2 * 16) ) ;
+ Size = MAP_APPFONT( 48 , 12 ) ;
+ Text = "Abstand" ;
+ Text [ ENGLISH ] = "Distance" ;
+ Text [ ENGLISH_US ] = "Spacing" ;
+ Text[ portuguese ] = "Distncia";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "Afstand";
+ Text[ french ] = "cart";
+ Text[ spanish ] = "Espacio";
+ Text[ italian ] = "Distanza";
+ Text[ danish ] = "Afstand";
+ Text[ swedish ] = "Avstnd";
+ Text[ polish ] = "Odstp";
+ Text[ portuguese_brazilian ] = "Distance";
+ Text[ japanese ] = "Ԋu";
+ Text[ korean ] = "";
+ Text[ chinese_simplified ] = "";
+ Text[ chinese_traditional ] = "j";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "Aralk";
+ };
+
+ RadioButton BTN_VER_BOTTOM
+ {
+ Pos = MAP_APPFONT( 56 , 63 + (3 * 16) ) ;
+ Size = MAP_APPFONT( 48 , 12 ) ;
+ Text = "Unten" ;
+ Text [ ENGLISH ] = "Bottom" ;
+ Text [ ENGLISH_US ] = "Bottom" ;
+ Text[ portuguese ] = "Em baixo";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "Beneden";
+ Text[ french ] = "En bas";
+ Text[ spanish ] = "Abajo";
+ Text[ italian ] = "Sotto";
+ Text[ danish ] = "Nede";
+ Text[ swedish ] = "Nere";
+ Text[ polish ] = "Na dole";
+ Text[ portuguese_brazilian ] = "Bottom";
+ Text[ japanese ] = "";
+ Text[ korean ] = "Ʒ";
+ Text[ chinese_simplified ] = "·";
+ Text[ chinese_traditional ] = "U";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "Alt";
+ };
+
+ FixedImage IMG_VER_HIGH {
+ Pos = MAP_APPFONT( 44 , 63 );
+ Size = ( 15, 16 );
+ Hide = FALSE;
+ Fixed = Image {
+ ImageBitmap = Bitmap { File = "dstv_hig.bmp"; };
+ MaskColor = STD_MASKCOLOR;
+ };
+ };
+
+ FixedImage IMG_VER_CENTER {
+ Pos = MAP_APPFONT( 44 , 63 + (1 * 16) );
+ Size = ( 15, 16 );
+ Hide = FALSE;
+ Fixed = Image {
+ ImageBitmap = Bitmap { File = "dstv_cen.bmp"; };
+ MaskColor = STD_MASKCOLOR;
+ };
+ };
+
+ FixedImage IMG_VER_DISTANCE {
+ Pos = MAP_APPFONT( 44 , 63 + (2 * 16) );
+ Size = ( 15, 16 );
+ Hide = FALSE;
+ Fixed = Image {
+ ImageBitmap = Bitmap { File = "dstv_dst.bmp"; };
+ MaskColor = STD_MASKCOLOR;
+ };
+ };
+
+ FixedImage IMG_VER_LOW {
+ Pos = MAP_APPFONT( 44 , 63 + (3 * 16) );
+ Size = ( 15, 16 );
+ Hide = FALSE;
+ Fixed = Image {
+ ImageBitmap = Bitmap { File = "dstv_low.bmp"; };
+ MaskColor = STD_MASKCOLOR;
+ };
+ };
+
+ GroupBox GRP_PREVIEW
+ {
+ Pos = MAP_APPFONT( 10, 10 ) ;
+ Size = MAP_APPFONT( 10 , 10 ) ;
+ Text = "Vorschau" ;
+ Text [ ENGLISH ] = "Preview" ;
+ Text [ english_us ] = "Preview" ;
+ Text[ portuguese ] = "Previsualizar";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "Voorbeeld";
+ Text[ french ] = "Aperu";
+ Text[ spanish ] = "Previsualizacin";
+ Text[ italian ] = "Anteprima";
+ Text[ danish ] = "Eksempel";
+ Text[ swedish ] = "Frhandsvisning";
+ Text[ polish ] = "Podgld";
+ Text[ portuguese_brazilian ] = "Preview";
+ Text[ japanese ] = "ޭ";
+ Text[ korean ] = "̸ ";
+ Text[ chinese_simplified ] = "Ԥ";
+ Text[ chinese_traditional ] = "w";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "nizleme";
+ };
+ Text[ portuguese ] = "Distribuio...";
+ Text[ russian ] = "";
+ Text[ greek ] = "..";
+ Text[ dutch ] = "Verdeling";
+ Text[ french ] = "Rpartition";
+ Text[ spanish ] = "Distribucin";
+ Text[ italian ] = "Distribuzione";
+ Text[ danish ] = "Distribution";
+ Text[ swedish ] = "Frdelning";
+ Text[ polish ] = "Rozmieszczenie";
+ Text[ portuguese_brazilian ] = "Distribution..";
+ Text[ japanese ] = "z...";
+ Text[ korean ] = "";
+ Text[ chinese_simplified ] = "ֲ";
+ Text[ chinese_traditional ] = "";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "Datm";
+};
+
+// ********************************************************************** EOF
diff --git a/svx/source/dialog/fntctrl.cxx b/svx/source/dialog/fntctrl.cxx
new file mode 100644
index 000000000000..b96b38a20268
--- /dev/null
+++ b/svx/source/dialog/fntctrl.cxx
@@ -0,0 +1,264 @@
+/*************************************************************************
+ *
+ * $RCSfile: fntctrl.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:08 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+// include ---------------------------------------------------------------
+
+#ifndef _SFXVIEWSH_HXX
+#include <sfx2/viewsh.hxx> // SfxViewShell
+#endif
+#ifndef _SFX_PRINTER_HXX
+#include <sfx2/printer.hxx> // SfxPrinter
+#endif
+#ifndef _SV_METRIC_HXX //autogen
+#include <vcl/metric.hxx>
+#endif
+#ifndef _SV_SVAPP_HXX //autogen
+#include <vcl/svapp.hxx>
+#endif
+#pragma hdrstop
+
+#include "fntctrl.hxx"
+#include "dialogs.hrc"
+
+// struct FontPrevWin_Impl -----------------------------------------------
+
+struct FontPrevWin_Impl
+{
+ BOOL bSelection : 1,
+ bGetSelection : 1,
+ bUseResText : 1;
+ Color* pColor;
+ String aText;
+
+ FontPrevWin_Impl() :
+ bSelection( FALSE ), bGetSelection( FALSE ), bUseResText( FALSE ), pColor( NULL ) {}
+};
+
+// class SvxFontPrevWindow -----------------------------------------------
+
+void SvxFontPrevWindow::InitSettings( BOOL bForeground, BOOL bBackground )
+{
+ const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
+
+ if ( bForeground )
+ {
+ Color aTextColor = rStyleSettings.GetWindowTextColor();
+
+ if ( IsControlForeground() )
+ aTextColor = GetControlForeground();
+ SetTextColor( aTextColor );
+ }
+
+ if ( bBackground )
+ {
+ if ( IsControlBackground() )
+ SetBackground( GetControlBackground() );
+ else
+ SetBackground( rStyleSettings.GetWindowColor() );
+ }
+ Invalidate();
+}
+
+// -----------------------------------------------------------------------
+
+SvxFontPrevWindow::SvxFontPrevWindow( Window* pParent, const ResId& rId ) :
+
+ Window ( pParent, rId ),
+ pPrinter ( NULL ),
+ bDelPrinter( FALSE )
+
+{
+ pImpl = new FontPrevWin_Impl;
+ SfxViewShell* pSh = SfxViewShell::Current();
+
+ if ( pSh )
+ pPrinter = pSh->GetPrinter();
+
+ if ( !pPrinter )
+ {
+ pPrinter = new Printer;
+ bDelPrinter = TRUE;
+ }
+ SetMapMode( MapMode( MAP_TWIP ) );
+ aFont.SetTransparent(TRUE);
+ aFont.SetAlign(ALIGN_BASELINE);
+ InitSettings( TRUE, TRUE );
+}
+
+// -----------------------------------------------------------------------
+
+SvxFontPrevWindow::~SvxFontPrevWindow()
+{
+ delete pImpl->pColor;
+ delete pImpl;
+
+ if ( bDelPrinter )
+ delete pPrinter;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxFontPrevWindow::StateChanged( StateChangedType nType )
+{
+ if ( nType == STATE_CHANGE_CONTROLFOREGROUND )
+ InitSettings( TRUE, FALSE );
+ else if ( nType == STATE_CHANGE_CONTROLBACKGROUND )
+ InitSettings( FALSE, TRUE );
+
+ Window::StateChanged( nType );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxFontPrevWindow::DataChanged( const DataChangedEvent& rDCEvt )
+{
+ if ( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) )
+ InitSettings( TRUE, TRUE );
+ else
+ Window::DataChanged( rDCEvt );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxFontPrevWindow::SetFont(const SvxFont &rOutFont)
+{
+ aFont = rOutFont;
+ aFont.SetTransparent(TRUE);
+ aFont.SetAlign(ALIGN_BASELINE);
+ Invalidate();
+}
+
+// -----------------------------------------------------------------------
+
+void SvxFontPrevWindow::SetColor(const Color &rColor)
+{
+ delete pImpl->pColor;
+ pImpl->pColor = new Color( rColor );
+ Invalidate();
+}
+
+// -----------------------------------------------------------------------
+
+void SvxFontPrevWindow::UseResourceText( BOOL bUse )
+{
+ pImpl->bUseResText = bUse;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxFontPrevWindow::Paint( const Rectangle& rRect )
+{
+ if ( pImpl->bUseResText )
+ pImpl->aText = GetText();
+ else if ( !pImpl->bSelection )
+ {
+ SfxViewShell* pSh = SfxViewShell::Current();
+
+ if ( pSh && !pImpl->bGetSelection )
+ {
+ pImpl->aText = pSh->GetSelectionText();
+ pImpl->bGetSelection = TRUE;
+ pImpl->bSelection = pImpl->aText.Len() != 0;
+ }
+
+ if ( !pImpl->bSelection )
+ pImpl->aText = aFont.GetName();
+
+ if ( !pImpl->aText.Len() )
+ pImpl->aText = GetText();
+
+ if ( pImpl->aText.Len() > 15 )
+ pImpl->aText.Erase( pImpl->aText.Search( sal_Unicode( ' ' ), 16 ) );
+ }
+ Window::SetFont(aFont);
+ Font aOldFont = pPrinter->GetFont();
+ pPrinter->SetFont( aFont );
+ Size aTxtSize( aFont.GetTxtSize( pPrinter, pImpl->aText ) );
+ pPrinter->SetFont( aOldFont );
+ const Size aLogSize( GetOutputSize() );
+ FontMetric aMetric(GetFontMetric());
+ aTxtSize.Height() = aMetric.GetLineHeight();
+
+ long nX = aLogSize.Width() / 2 - aTxtSize.Width() / 2;
+ long nY = aLogSize.Height() / 2 - aTxtSize.Height() / 2;
+
+ if ( nY + aMetric.GetAscent() > aLogSize.Height() )
+ nY = aLogSize.Height() - aMetric.GetAscent();
+
+ if ( pImpl->pColor )
+ {
+ Rectangle aRect( Point( nX, nY ), aTxtSize );
+ Color aLineCol = GetLineColor();
+ Color aFillCol = GetFillColor();
+ SetLineColor();
+ SetFillColor( *pImpl->pColor );
+ DrawRect( aRect );
+ SetLineColor( aLineCol );
+ SetFillColor( aFillCol );
+ }
+
+ nY += aMetric.GetAscent();
+ DrawLine( Point( 0, nY ), Point( nX, nY ) );
+ DrawLine( Point( nX + aTxtSize.Width(), nY ), Point( aLogSize.Width(), nY ) );
+ aFont.DrawPrev( this, pPrinter, Point( nX, nY ), pImpl->aText );
+}
+
+
diff --git a/svx/source/dialog/fontlb.cxx b/svx/source/dialog/fontlb.cxx
new file mode 100644
index 000000000000..cac1cceea442
--- /dev/null
+++ b/svx/source/dialog/fontlb.cxx
@@ -0,0 +1,453 @@
+/*************************************************************************
+ *
+ * $RCSfile: fontlb.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:08 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _SV_IMAGE_HXX //autogen
+#include <vcl/image.hxx>
+#endif
+#pragma hdrstop
+
+#include "fontlb.hxx"
+
+DBG_NAME(SvLBoxFontString);
+
+/*************************************************************************
+#* Funktionen der in die SvxFontListBox eingefuegten Items
+#************************************************************************/
+
+
+/*************************************************************************
+#* Member: SvLBoxFontString Datum:23.10.97
+#*------------------------------------------------------------------------
+#*
+#* Klasse: SvLBoxFontString
+#*
+#* Funktion: Konstruktor der Klasse SvLBoxFontString
+#*
+#* Input: Box- Entry,Flags, Text fuer Anzeige, Schrift
+#*
+#* Output: ---
+#*
+#************************************************************************/
+
+SvLBoxFontString::SvLBoxFontString( SvLBoxEntry*pEntry,USHORT nFlags,const XubString& rStr,
+ const Font& aFont)
+
+: SvLBoxString( pEntry, nFlags, rStr )
+{
+ DBG_CTOR(SvLBoxFontString,0);
+ aPrivatFont=aFont;
+ SetText( pEntry, rStr );
+}
+
+/*************************************************************************
+#* Member: SvLBoxFontString Datum:23.10.97
+#*------------------------------------------------------------------------
+#*
+#* Klasse: SvLBoxFontString
+#*
+#* Funktion: Default Konstruktor der Klasse SvLBoxFontString
+#*
+#* Input: ---
+#*
+#* Output: ---
+#*
+#************************************************************************/
+
+SvLBoxFontString::SvLBoxFontString()
+: SvLBoxString()
+{
+ DBG_CTOR(SvLBoxFontString,0);
+}
+
+/*************************************************************************
+#* Member: ~SvLBoxFontString Datum:23.10.97
+#*------------------------------------------------------------------------
+#*
+#* Klasse: SvLBoxFontString
+#*
+#* Funktion: Destruktor der Klasse SvLBoxFontString
+#*
+#* Input: ---
+#*
+#* Output: ---
+#*
+#************************************************************************/
+
+SvLBoxFontString::~SvLBoxFontString()
+{
+ DBG_DTOR(SvLBoxFontString,0);
+}
+
+
+/*************************************************************************
+#* Member: SvLBoxFontString Datum:23.10.97
+#*------------------------------------------------------------------------
+#*
+#* Klasse: SvLBoxFontString
+#*
+#* Funktion: Erzeugt einen neuen SvLBoxFontString
+#*
+#* Input: ---
+#*
+#* Output: SvLBoxFontString
+#*
+#************************************************************************/
+
+SvLBoxItem* SvLBoxFontString::Create() const
+{
+ DBG_CHKTHIS(SvLBoxFontString,0);
+ return new SvLBoxFontString;
+}
+
+
+
+/*************************************************************************
+#* Member: SvLBoxFontString Datum:23.10.97
+#*------------------------------------------------------------------------
+#*
+#* Klasse: SvLBoxFontString
+#*
+#* Funktion: Zeichenroutine des SvLBoxFontString. Gezeichnet wird
+#* der entsprechende Text mit der eingestellten Schriftart
+#* im Ausgabe- Device.
+#*
+#* Input: Position, Ausgabe- Device, Flag fuer Selection,
+#* Zeiger auf den Eintrag
+#*
+#* Output: ---
+#*
+#************************************************************************/
+
+void SvLBoxFontString::Paint( const Point& rPos, SvLBox& rDev,
+ USHORT nFlags, SvLBoxEntry* pEntry )
+{
+ Font aFont=rDev.GetFont();
+ Font a2Font=aPrivatFont;
+ Color aColor;
+ if(nFlags & SVLISTENTRYFLAG_SELECTED)
+ {
+ aColor=a2Font.GetColor();
+ aColor.SetRed(~aColor.GetRed());
+ aColor.SetGreen(~aColor.GetGreen());
+ aColor.SetBlue(~aColor.GetBlue());
+ a2Font.SetColor(aColor);
+ rDev.SetFont(a2Font);
+ }
+ else
+ {
+ rDev.SetFont(aPrivatFont);
+ }
+ SvLBoxString::Paint(rPos,rDev,nFlags,pEntry );
+ rDev.SetFont(aFont);
+}
+
+
+/*************************************************************************
+#* Member: SvLBoxFontString Datum:23.10.97
+#*------------------------------------------------------------------------
+#*
+#* Klasse: SvLBoxFontString
+#*
+#* Funktion: Ermittelt und stellt die Ausgabegroesse in der View ein.
+#*
+#* Input: Zeiger auf die View, Eintrag, Anzeigedaten
+#*
+#*
+#* Output: ---
+#*
+#************************************************************************/
+
+void SvLBoxFontString::InitViewData( SvLBox* pView,SvLBoxEntry* pEntry,
+ SvViewDataItem* pViewData)
+{
+ DBG_CHKTHIS(SvLBoxFontString,0);
+ Font aFont= pView->GetFont();
+ pView->SetFont(aPrivatFont);
+ SvLBoxString::InitViewData(pView,pEntry,pViewData);
+ pView->SetFont(aFont);
+}
+
+/*************************************************************************
+#* Listbox mit Schrifteinstellung
+#************************************************************************/
+
+
+/*************************************************************************
+#* Member: SvxFontListBox Datum:20.10.97
+#*------------------------------------------------------------------------
+#*
+#* Klasse: SvxFontListBox
+#*
+#* Funktion: Konstruktor der Klasse SvxFontListBox. Die Klasse dient
+#* der Darstellung von Strings in der entsprechenden
+#* Schriftart.
+#*
+#* Input: Parent-Window, WinBits, min. Winkel, max. Winkel
+#*
+#* Output: ---
+#*
+#************************************************************************/
+
+SvxFontListBox::SvxFontListBox(Window* pParent,const ResId& aResID)
+:SvTabListBox(pParent,aResID)
+{
+ pPrivatVDev=new VirtualDevice;
+ aStandardFont=GetFont();
+ Size aWinSize=GetOutputSizePixel();
+ bSettingFont=FALSE;
+ aStandardFont.SetTransparent(TRUE);
+ aStandardFont.SetColor(Color(COL_BLUE));
+ if(pPrivatVDev!=NULL)
+ {
+ pPrivatVDev->SetOutputSizePixel(aWinSize);
+ pPrivatVDev->SetFont(aStandardFont);
+ }
+ Color aCol=GetBackground().GetColor();
+ aStandardFont.SetColor(aCol);
+ SetFont(aStandardFont);
+ aEntryFont=aStandardFont;
+}
+
+/*************************************************************************
+#* Member: SvxFontListBox Datum:20.10.97
+#*------------------------------------------------------------------------
+#*
+#* Klasse: SvxFontListBox
+#*
+#* Funktion: Destruktor der Klasse SvxFontListBox. Gibt den
+#* Speicher, der fuer das VDevice angelegt wurde,
+#* wieder frei.
+#*
+#* Input: ---
+#*
+#* Output: ---
+#*
+#************************************************************************/
+
+SvxFontListBox::~SvxFontListBox()
+{
+ delete pPrivatVDev;
+}
+
+
+/*************************************************************************
+#* Member: InsertFontEntry Datum:20.10.97
+#*------------------------------------------------------------------------
+#*
+#* Klasse: SvxColorTabListBox
+#*
+#* Funktion: Erzeugt aus dem uebergebenen String eine Bitmap
+#* und fuegt diese Bitmap in die ListBox ein.
+#*
+#* Input: String, Font, Position
+#*
+#* Output: ---
+#*
+#************************************************************************/
+
+void SvxFontListBox::InsertFontEntry( const String& rString,Font aActorFont)
+{
+ Point aPos(0,0);
+ bSettingFont=TRUE;
+ aEntryFont=aActorFont;
+ InsertEntry( rString);
+}
+
+/*************************************************************************
+#* Member: SelectEntryPos Datum:20.10.97
+#*------------------------------------------------------------------------
+#*
+#* Klasse: SvxFontListBox
+#*
+#* Funktion: Schaltet an der Position nPos, die Selektion
+#* an oder aus.
+#*
+#* Input: Position, Selektion: An/Aus
+#*
+#* Output: ---
+#*
+#************************************************************************/
+
+void SvxFontListBox::SelectEntryPos( USHORT nPos, BOOL bSelect)
+{
+ SvLBoxEntry* pEntry=GetEntry(nPos);
+ if(pEntry!=NULL)
+ {
+ Select( pEntry,bSelect);
+ ShowEntry(pEntry );
+ }
+}
+
+/*************************************************************************
+#* Member: GetSelectEntryPos Datum:20.10.97
+#*------------------------------------------------------------------------
+#*
+#* Klasse: SvxFontListBox
+#*
+#* Funktion: Liefert die Position der ersten Selektion
+#* zurck.
+#*
+#* Input: ---
+#*
+#* Output: Position
+#*
+#************************************************************************/
+
+ULONG SvxFontListBox::GetSelectEntryPos()
+{
+ SvLBoxEntry* pSvLBoxEntry=FirstSelected();
+ ULONG nSel=LIST_APPEND;
+
+ if(pSvLBoxEntry!=NULL)
+ {
+ nSel=GetModel()->GetAbsPos( pSvLBoxEntry );
+ }
+
+ return nSel;
+}
+
+/*************************************************************************
+#* Member: GetSelectEntry Datum:20.10.97
+#*------------------------------------------------------------------------
+#*
+#* Klasse: SvxFontListBox
+#*
+#* Funktion: Liefert den ersten Eintrag der Selektion
+#* zurck.
+#*
+#* Input: ---
+#*
+#* Output: Position
+#*
+#************************************************************************/
+
+XubString SvxFontListBox::GetSelectEntry()
+{
+ return GetEntryText(GetSelectEntryPos());
+}
+
+
+/*************************************************************************
+#* Member: SetNoSelection Datum:20.10.97
+#*------------------------------------------------------------------------
+#*
+#* Klasse: SvxFontListBox
+#*
+#* Funktion: Hebt eine bestehende Selektierung auf.
+#*
+#* Input: ---
+#*
+#* Output: ---
+#*
+#************************************************************************/
+
+void SvxFontListBox::SetNoSelection()
+{
+ SelectAll( FALSE,TRUE );
+}
+
+
+/*************************************************************************
+#* Member: SvxFontListBox Datum:20.10.97
+#*------------------------------------------------------------------------
+#*
+#* Klasse: SvxFontListBox
+#*
+#* Funktion: Ueberladene Funktion der TreeListBox. Fuegt einen
+#* neuen SvLBoxFontString ein.
+#*
+#* Input: ---
+#*
+#* Output: ---
+#*
+#************************************************************************/
+
+void SvxFontListBox::InitEntry( SvLBoxEntry* pEntry, const XubString& aStr,
+ const Image& aCollEntryBmp, const Image& aExpEntryBmp)
+{
+ if(bSettingFont==TRUE)
+ {
+ bSettingFont=FALSE;
+
+ SvLBoxButton* pButton;
+ SvLBoxFontString* pString;
+ SvLBoxContextBmp* pContextBmp;
+
+ if( nTreeFlags & TREEFLAG_CHKBTN )
+ {
+ pButton= new SvLBoxButton( pEntry,0,pCheckButtonData );
+ pEntry->AddItem( pButton );
+ }
+
+ pContextBmp= new SvLBoxContextBmp( pEntry,0, aCollEntryBmp,aExpEntryBmp,
+ SVLISTENTRYFLAG_EXPANDED);
+ pEntry->AddItem( pContextBmp );
+
+ pString = new SvLBoxFontString( pEntry, 0, aStr,aEntryFont);
+ pEntry->AddItem( pString );
+ }
+ else
+ {
+ SvTreeListBox::InitEntry( pEntry, aStr, aCollEntryBmp, aExpEntryBmp);
+ }
+}
+
+
diff --git a/svx/source/dialog/fontwork.cxx b/svx/source/dialog/fontwork.cxx
new file mode 100644
index 000000000000..86f603e0076e
--- /dev/null
+++ b/svx/source/dialog/fontwork.cxx
@@ -0,0 +1,1230 @@
+/*************************************************************************
+ *
+ * $RCSfile: fontwork.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:08 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+// include ---------------------------------------------------------------
+
+#ifndef _SFXMODULE_HXX
+#include <sfx2/module.hxx>
+#endif
+#ifndef _SFXDISPATCH_HXX
+#include <sfx2/dispatch.hxx>
+#endif
+#ifndef _SFX_SAVEOPT_HXX //autogen
+#include <sfx2/saveopt.hxx>
+#endif
+#ifndef _SHL_HXX //autogen
+#include <tools/shl.hxx>
+#endif
+
+#pragma hdrstop
+
+#define _SVX_FONTWORK_CXX
+
+#ifndef _SVDOBJ_HXX
+#include "svdobj.hxx"
+#endif
+#ifndef _SVDOPATH_HXX
+#include "svdopath.hxx"
+#endif
+#ifndef _SVDVIEW_HXX
+#include "svdview.hxx"
+#endif
+#ifndef _SVDOCIRC_HXX
+#include "svdocirc.hxx"
+#endif
+#ifndef _SVX_XTEXTITEM_HXX //autogen
+#include "xtextit.hxx"
+#endif
+
+#include "dialmgr.hxx"
+#include "dlgutil.hxx"
+
+#include "dialogs.hrc"
+#include "fontwork.hrc"
+#include "fontwork.hxx"
+#include "outlobj.hxx"
+
+
+SFX_IMPL_DOCKINGWINDOW( SvxFontWorkChildWindow, SID_FONTWORK );
+
+/*************************************************************************
+|*
+|* ControllerItem fuer Fontwork
+|*
+\************************************************************************/
+
+SvxFontWorkControllerItem::SvxFontWorkControllerItem
+(
+ USHORT nId,
+ SvxFontWorkDialog& rDlg,
+ SfxBindings& rBindings
+) :
+
+ SfxControllerItem( nId, rBindings ),
+
+ rFontWorkDlg( rDlg )
+{
+}
+
+/*************************************************************************
+|*
+|* StateChanged-Methode fuer FontWork-Items
+|*
+\************************************************************************/
+
+void SvxFontWorkControllerItem::StateChanged( USHORT nSID, SfxItemState eState,
+ const SfxPoolItem* pItem )
+{
+ switch ( GetId() )
+ {
+ case SID_FORMTEXT_STYLE:
+ {
+ const XFormTextStyleItem* pStateItem =
+ PTR_CAST(XFormTextStyleItem, pItem);
+ DBG_ASSERT(pStateItem || pItem == 0, "XFormTextStyleItem erwartet");
+ rFontWorkDlg.SetStyle_Impl(pStateItem);
+ break;
+ }
+ case SID_FORMTEXT_ADJUST:
+ {
+ const XFormTextAdjustItem* pStateItem =
+ PTR_CAST(XFormTextAdjustItem, pItem);
+ DBG_ASSERT(pStateItem || pItem == 0, "XFormTextAdjustItem erwartet");
+ rFontWorkDlg.SetAdjust_Impl(pStateItem);
+ break;
+ }
+ case SID_FORMTEXT_DISTANCE:
+ {
+ const XFormTextDistanceItem* pStateItem =
+ PTR_CAST(XFormTextDistanceItem, pItem);
+ DBG_ASSERT(pStateItem || pItem == 0, "XFormTextDistanceItem erwartet");
+ rFontWorkDlg.SetDistance_Impl(pStateItem);
+ break;
+ }
+ case SID_FORMTEXT_START:
+ {
+ const XFormTextStartItem* pStateItem =
+ PTR_CAST(XFormTextStartItem, pItem);
+ DBG_ASSERT(pStateItem || pItem == 0, "XFormTextStartItem erwartet");
+ rFontWorkDlg.SetStart_Impl(pStateItem);
+ break;
+ }
+ case SID_FORMTEXT_MIRROR:
+ {
+ const XFormTextMirrorItem* pStateItem =
+ PTR_CAST(XFormTextMirrorItem, pItem);
+ DBG_ASSERT(pStateItem || pItem == 0, "XFormTextMirrorItem erwartet");
+ rFontWorkDlg.SetMirror_Impl(pStateItem);
+ break;
+ }
+ case SID_FORMTEXT_STDFORM:
+ {
+ const XFormTextStdFormItem* pStateItem =
+ PTR_CAST(XFormTextStdFormItem, pItem);
+ DBG_ASSERT(pStateItem || pItem == 0, "XFormTextStdFormItem erwartet");
+ rFontWorkDlg.SetStdForm_Impl(pStateItem);
+ break;
+ }
+ case SID_FORMTEXT_HIDEFORM:
+ {
+ const XFormTextHideFormItem* pStateItem =
+ PTR_CAST(XFormTextHideFormItem, pItem);
+ DBG_ASSERT(pStateItem || pItem == 0, "XFormTextHideFormItem erwartet");
+ rFontWorkDlg.SetShowForm_Impl(pStateItem);
+ break;
+ }
+ case SID_FORMTEXT_OUTLINE:
+ {
+ const XFormTextOutlineItem* pStateItem =
+ PTR_CAST(XFormTextOutlineItem, pItem);
+ DBG_ASSERT(pStateItem || pItem == 0, "XFormTextOutlineItem erwartet");
+ rFontWorkDlg.SetOutline_Impl(pStateItem);
+ break;
+ }
+ case SID_FORMTEXT_SHADOW:
+ {
+ const XFormTextShadowItem* pStateItem =
+ PTR_CAST(XFormTextShadowItem, pItem);
+ DBG_ASSERT(pStateItem || pItem == 0, "XFormTextShadowItem erwartet");
+ rFontWorkDlg.SetShadow_Impl(pStateItem);
+ break;
+ }
+ case SID_FORMTEXT_SHDWCOLOR:
+ {
+ const XFormTextShadowColorItem* pStateItem =
+ PTR_CAST(XFormTextShadowColorItem, pItem);
+ DBG_ASSERT(pStateItem || pItem == 0, "XFormTextShadowColorItem erwartet");
+ rFontWorkDlg.SetShadowColor_Impl(pStateItem);
+ break;
+ }
+ case SID_FORMTEXT_SHDWXVAL:
+ {
+ const XFormTextShadowXValItem* pStateItem =
+ PTR_CAST(XFormTextShadowXValItem, pItem);
+ DBG_ASSERT(pStateItem || pItem == 0, "XFormTextShadowXValItem erwartet");
+ rFontWorkDlg.SetShadowXVal_Impl(pStateItem);
+ break;
+ }
+ case SID_FORMTEXT_SHDWYVAL:
+ {
+ const XFormTextShadowYValItem* pStateItem =
+ PTR_CAST(XFormTextShadowYValItem, pItem);
+ DBG_ASSERT(pStateItem || pItem == 0, "XFormTextShadowYValItem erwartet");
+ rFontWorkDlg.SetShadowYVal_Impl(pStateItem);
+ break;
+ }
+ }
+}
+
+/*************************************************************************
+|*
+|* Ableitung vom SfxChildWindow als "Behaelter" fuer Fontwork-Dialog
+|*
+\************************************************************************/
+
+SvxFontWorkChildWindow::SvxFontWorkChildWindow
+(
+ Window* pParent,
+ USHORT nId,
+ SfxBindings* pBindings,
+ SfxChildWinInfo* pInfo
+) :
+
+ SfxChildWindow( pParent, nId )
+
+{
+ pWindow = new SvxFontWorkDialog( pBindings, this, pParent,
+ SVX_RES( RID_SVXDLG_FONTWORK ) );
+ SvxFontWorkDialog* pDlg = (SvxFontWorkDialog*) pWindow;
+
+ eChildAlignment = SFX_ALIGN_NOALIGNMENT;
+
+ pDlg->Initialize( pInfo );
+}
+
+/*************************************************************************
+|*
+|* Floating Window zur Attributierung von Texteffekten
+|*
+\************************************************************************/
+
+// pMgr wird unten angelegt
+#define FW_RESID(nId) ResId(nId, pMgr)
+
+SvxFontWorkDialog::SvxFontWorkDialog( SfxBindings *pBindinx,
+ SfxChildWindow *pCW,
+ Window* pParent,
+ const ResId& rResId ) :
+ SfxDockingWindow( pBindinx, pCW, pParent, rResId ),
+
+ aFormSet (this, ResId(VS_FORMS)),
+
+ aTbxStyle (this, ResId(TBX_STYLE)),
+ aTbxAdjust (this, ResId(TBX_ADJUST)),
+
+ aFbDistance (this, ResId(FB_DISTANCE)),
+ aMtrFldDistance (this, ResId(MTR_FLD_DISTANCE)),
+ aFbTextStart (this, ResId(FB_TEXTSTART)),
+ aMtrFldTextStart(this, ResId(MTR_FLD_TEXTSTART)),
+
+ aTbxShadow (this, ResId(TBX_SHADOW)),
+
+ aFbShadowX (this, ResId(FB_SHADOW_X)),
+ aMtrFldShadowX (this, ResId(MTR_FLD_SHADOW_X)),
+ aFbShadowY (this, ResId(FB_SHADOW_Y)),
+ aMtrFldShadowY (this, ResId(MTR_FLD_SHADOW_Y)),
+
+ aShadowColorLB (this, ResId(CLB_SHADOW_COLOR)),
+
+ rBindings (*pBindinx),
+
+ nLastStyleTbxId(0),
+ nLastAdjustTbxId(0),
+ nLastShadowTbxId(0),
+ nSaveShadowX (0),
+ nSaveShadowY (0),
+ nSaveShadowAngle(450),
+ nSaveShadowSize (100),
+
+ pColorTable (NULL)
+{
+ FreeResource();
+
+ pCtrlItems[0] = new SvxFontWorkControllerItem(SID_FORMTEXT_STYLE, *this, rBindings);
+ pCtrlItems[1] = new SvxFontWorkControllerItem(SID_FORMTEXT_ADJUST, *this, rBindings);
+ pCtrlItems[2] = new SvxFontWorkControllerItem(SID_FORMTEXT_DISTANCE, *this, rBindings);
+ pCtrlItems[3] = new SvxFontWorkControllerItem(SID_FORMTEXT_START, *this, rBindings);
+ pCtrlItems[4] = new SvxFontWorkControllerItem(SID_FORMTEXT_MIRROR, *this, rBindings);
+ pCtrlItems[5] = new SvxFontWorkControllerItem(SID_FORMTEXT_STDFORM, *this, rBindings);
+ pCtrlItems[6] = new SvxFontWorkControllerItem(SID_FORMTEXT_HIDEFORM, *this, rBindings);
+ pCtrlItems[7] = new SvxFontWorkControllerItem(SID_FORMTEXT_OUTLINE, *this, rBindings);
+ pCtrlItems[8] = new SvxFontWorkControllerItem(SID_FORMTEXT_SHADOW, *this, rBindings);
+ pCtrlItems[9] = new SvxFontWorkControllerItem(SID_FORMTEXT_SHDWCOLOR, *this, rBindings);
+ pCtrlItems[10] = new SvxFontWorkControllerItem(SID_FORMTEXT_SHDWXVAL, *this, rBindings);
+ pCtrlItems[11] = new SvxFontWorkControllerItem(SID_FORMTEXT_SHDWYVAL, *this, rBindings);
+
+ WinBits aNewStyle = ( aFormSet.GetStyle() | WB_VSCROLL | WB_ITEMBORDER | WB_DOUBLEBORDER );
+ aFormSet.SetStyle( aNewStyle );
+
+ Size aSize = aTbxStyle.CalcWindowSizePixel();
+ aTbxStyle.SetSizePixel(aSize);
+ aTbxStyle.SetSelectHdl( LINK(this, SvxFontWorkDialog, SelectStyleHdl_Impl) );
+
+ aTbxAdjust.SetSizePixel(aSize);
+ aTbxAdjust.SetSelectHdl( LINK(this, SvxFontWorkDialog, SelectAdjustHdl_Impl) );
+
+ aTbxShadow.SetSizePixel(aSize);
+ aTbxShadow.SetSelectHdl( LINK(this, SvxFontWorkDialog, SelectShadowHdl_Impl) );
+
+ ResMgr* pMgr = DIALOG_MGR();
+ aFbShadowX.SetBitmap(Bitmap(FW_RESID(RID_SVXBMP_SHADOW_XDIST)));
+ aFbShadowY.SetBitmap(Bitmap(FW_RESID(RID_SVXBMP_SHADOW_YDIST)));
+
+ Link aLink = LINK(this, SvxFontWorkDialog, ModifyInputHdl_Impl);
+ aMtrFldDistance.SetModifyHdl( aLink );
+ aMtrFldTextStart.SetModifyHdl( aLink );
+ aMtrFldShadowX.SetModifyHdl( aLink );
+ aMtrFldShadowY.SetModifyHdl( aLink );
+
+ // System-Metrik setzen
+ FieldUnit eDlgUnit;
+ GET_MODULE_FIELDUNIT( eDlgUnit );
+ SetFieldUnit( aMtrFldDistance, eDlgUnit, TRUE );
+ SetFieldUnit( aMtrFldTextStart, eDlgUnit, TRUE );
+ SetFieldUnit( aMtrFldShadowX, eDlgUnit, TRUE );
+ SetFieldUnit( aMtrFldShadowY, eDlgUnit, TRUE );
+ if( eDlgUnit == FUNIT_MM )
+ {
+ aMtrFldDistance.SetSpinSize( 50 );
+ aMtrFldTextStart.SetSpinSize( 50 );
+ aMtrFldShadowX.SetSpinSize( 50 );
+ aMtrFldShadowY.SetSpinSize( 50 );
+ }
+ else
+ {
+ aMtrFldDistance.SetSpinSize( 10 );
+ aMtrFldTextStart.SetSpinSize( 10 );
+ aMtrFldShadowX.SetSpinSize( 10 );
+ aMtrFldShadowY.SetSpinSize( 10 );
+ }
+
+ aShadowColorLB.SetSelectHdl( LINK(this, SvxFontWorkDialog, ColorSelectHdl_Impl) );
+
+ aInputTimer.SetTimeout(500);
+ aInputTimer.SetTimeoutHdl(LINK(this, SvxFontWorkDialog, InputTimoutHdl_Impl));
+
+ aFormSet.SetSelectHdl( LINK(this, SvxFontWorkDialog, FormSelectHdl_Impl) );
+ aFormSet.SetColCount(4);
+ aFormSet.SetLineCount(2);
+
+ Bitmap aBmp(FW_RESID(RID_SVXBMP_FONTWORK_FORM1));
+ aSize.Height() = aFormSet.CalcWindowSizePixel(aBmp.GetSizePixel()).Height() + 2;
+ aFormSet.SetSizePixel(aSize);
+
+ aFormSet.InsertItem( 1, aBmp, String(FW_RESID(RID_SVXSTR_FONTWORK_FORM1)));
+ aFormSet.InsertItem( 2, Bitmap(FW_RESID(RID_SVXBMP_FONTWORK_FORM2)),
+ String(FW_RESID(RID_SVXSTR_FONTWORK_FORM2)));
+ aFormSet.InsertItem( 3, Bitmap(FW_RESID(RID_SVXBMP_FONTWORK_FORM3)),
+ String(FW_RESID(RID_SVXSTR_FONTWORK_FORM3)));
+ aFormSet.InsertItem( 4, Bitmap(FW_RESID(RID_SVXBMP_FONTWORK_FORM4)),
+ String(FW_RESID(RID_SVXSTR_FONTWORK_FORM4)));
+ aFormSet.InsertItem( 5, Bitmap(FW_RESID(RID_SVXBMP_FONTWORK_FORM5)),
+ String(FW_RESID(RID_SVXSTR_FONTWORK_FORM5)));
+ aFormSet.InsertItem( 6, Bitmap(FW_RESID(RID_SVXBMP_FONTWORK_FORM6)),
+ String(FW_RESID(RID_SVXSTR_FONTWORK_FORM6)));
+ aFormSet.InsertItem( 7, Bitmap(FW_RESID(RID_SVXBMP_FONTWORK_FORM7)),
+ String(FW_RESID(RID_SVXSTR_FONTWORK_FORM7)));
+ aFormSet.InsertItem( 8, Bitmap(FW_RESID(RID_SVXBMP_FONTWORK_FORM8)),
+ String(FW_RESID(RID_SVXSTR_FONTWORK_FORM8)));
+ aFormSet.InsertItem( 9, Bitmap(FW_RESID(RID_SVXBMP_FONTWORK_FORM9)),
+ String(FW_RESID(RID_SVXSTR_FONTWORK_FORM9)));
+ aFormSet.InsertItem(10, Bitmap(FW_RESID(RID_SVXBMP_FONTWORK_FORM10)),
+ String(FW_RESID(RID_SVXSTR_FONTWORK_FORM10)));
+ aFormSet.InsertItem(11, Bitmap(FW_RESID(RID_SVXBMP_FONTWORK_FORM11)),
+ String(FW_RESID(RID_SVXSTR_FONTWORK_FORM11)));
+ aFormSet.InsertItem(12, Bitmap(FW_RESID(RID_SVXBMP_FONTWORK_FORM12)),
+ String(FW_RESID(RID_SVXSTR_FONTWORK_FORM12)));
+}
+
+#undef FW_RESID
+
+/*************************************************************************
+|*
+|* Destruktor
+|*
+\************************************************************************/
+
+SvxFontWorkDialog::~SvxFontWorkDialog()
+{
+ for (USHORT i = 0; i < CONTROLLER_COUNT; i++)
+ DELETEZ(pCtrlItems[i]);
+}
+
+/*************************************************************************
+|*
+\************************************************************************/
+
+void SvxFontWorkDialog::Zoom()
+{
+ SfxDockingWindow::Roll();
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+SfxChildAlignment SvxFontWorkDialog::CheckAlignment( SfxChildAlignment eActAlign,
+ SfxChildAlignment eAlign )
+{
+ SfxChildAlignment eAlignment;
+
+ switch ( eAlign )
+ {
+ case SFX_ALIGN_TOP:
+ case SFX_ALIGN_HIGHESTTOP:
+ case SFX_ALIGN_LOWESTTOP:
+ case SFX_ALIGN_BOTTOM:
+ case SFX_ALIGN_LOWESTBOTTOM:
+ case SFX_ALIGN_HIGHESTBOTTOM:
+ {
+ eAlignment = eActAlign;
+ }
+ break;
+
+ case SFX_ALIGN_LEFT:
+ case SFX_ALIGN_RIGHT:
+ case SFX_ALIGN_FIRSTLEFT:
+ case SFX_ALIGN_LASTLEFT:
+ case SFX_ALIGN_FIRSTRIGHT:
+ case SFX_ALIGN_LASTRIGHT:
+ {
+ eAlignment = eAlign;
+ }
+ break;
+
+ default:
+ {
+ eAlignment = eAlign;
+ }
+ break;
+ }
+
+ return eAlignment;
+}
+
+
+/*************************************************************************
+|*
+|* Style-Buttons setzen
+|*
+\************************************************************************/
+
+void SvxFontWorkDialog::SetStyle_Impl(const XFormTextStyleItem* pItem)
+{
+ if ( pItem )
+ {
+ USHORT nId = TBI_STYLE_OFF;
+
+ switch ( pItem->GetValue() )
+ {
+ case XFT_ROTATE : nId = TBI_STYLE_ROTATE; break;
+ case XFT_UPRIGHT: nId = TBI_STYLE_UPRIGHT; break;
+ case XFT_SLANTX : nId = TBI_STYLE_SLANTX; break;
+ case XFT_SLANTY : nId = TBI_STYLE_SLANTY; break;
+ }
+ aTbxStyle.Enable();
+
+ if ( pItem->GetValue() == XFT_NONE )
+ {
+ aTbxStyle.CheckItem(TBI_STYLE_ROTATE, FALSE);
+ aTbxStyle.CheckItem(TBI_STYLE_UPRIGHT, FALSE);
+ aTbxStyle.CheckItem(TBI_STYLE_SLANTX, FALSE);
+ aTbxStyle.CheckItem(TBI_STYLE_SLANTY, FALSE);
+ }
+ else
+ aTbxStyle.CheckItem(TBI_STYLE_OFF, FALSE);
+
+ aTbxStyle.CheckItem(nId);
+ nLastStyleTbxId = nId;
+ }
+ else
+ aTbxStyle.Disable();
+}
+
+/*************************************************************************
+|*
+|* Adjust-Buttons setzen
+|*
+\************************************************************************/
+
+void SvxFontWorkDialog::SetAdjust_Impl(const XFormTextAdjustItem* pItem)
+{
+ if ( pItem )
+ {
+ USHORT nId;
+
+ aTbxAdjust.Enable();
+ aMtrFldDistance.Enable();
+
+ if ( pItem->GetValue() == XFT_LEFT || pItem->GetValue() == XFT_RIGHT )
+ {
+ if ( pItem->GetValue() == XFT_LEFT ) nId = TBI_ADJUST_LEFT;
+ else nId = TBI_ADJUST_RIGHT;
+ aMtrFldTextStart.Enable();
+ }
+ else
+ {
+ if ( pItem->GetValue() == XFT_CENTER ) nId = TBI_ADJUST_CENTER;
+ else nId = TBI_ADJUST_AUTOSIZE;
+ aMtrFldTextStart.Disable();
+ }
+
+ if ( !aTbxAdjust.IsItemChecked(nId) )
+ {
+ aTbxAdjust.CheckItem(nId);
+ }
+ nLastAdjustTbxId = nId;
+ }
+ else
+ {
+ aTbxAdjust.Disable();
+ aMtrFldTextStart.Disable();
+ aMtrFldDistance.Disable();
+ }
+}
+
+/*************************************************************************
+|*
+|* Abstand-Wert in Editfeld eintragen
+|*
+\************************************************************************/
+
+void SvxFontWorkDialog::SetDistance_Impl(const XFormTextDistanceItem* pItem)
+{
+ if ( pItem && !aMtrFldDistance.HasFocus() )
+ {
+ SetMetricValue( aMtrFldDistance, pItem->GetValue(), SFX_MAPUNIT_100TH_MM );
+ }
+}
+
+/*************************************************************************
+|*
+|* Einzug-Wert in Editfeld eintragen
+|*
+\************************************************************************/
+
+void SvxFontWorkDialog::SetStart_Impl(const XFormTextStartItem* pItem)
+{
+ if ( pItem && !aMtrFldTextStart.HasFocus() )
+ {
+ SetMetricValue( aMtrFldTextStart, pItem->GetValue(), SFX_MAPUNIT_100TH_MM );
+ }
+}
+
+/*************************************************************************
+|*
+|* Button fuer Umkehrung der Textrichtung setzen
+|*
+\************************************************************************/
+
+void SvxFontWorkDialog::SetMirror_Impl(const XFormTextMirrorItem* pItem)
+{
+ if ( pItem )
+ aTbxAdjust.CheckItem(TBI_ADJUST_MIRROR, pItem->GetValue());
+}
+
+/*************************************************************************
+|*
+|* Standardform im ValueSet anzeigen
+|*
+\************************************************************************/
+
+void SvxFontWorkDialog::SetStdForm_Impl(const XFormTextStdFormItem* pItem)
+{
+ if ( pItem )
+ {
+ aFormSet.Enable();
+ aFormSet.SetNoSelection();
+
+ if ( pItem->GetValue() != XFTFORM_NONE )
+ aFormSet.SelectItem(pItem->GetValue());
+ }
+ else
+ aFormSet.Disable();
+}
+
+/*************************************************************************
+|*
+|* Button fuer Konturanzeige setzen
+|*
+\************************************************************************/
+
+void SvxFontWorkDialog::SetShowForm_Impl(const XFormTextHideFormItem* pItem)
+{
+ if ( pItem )
+ aTbxShadow.CheckItem(TBI_SHOWFORM, !pItem->GetValue());
+}
+
+/*************************************************************************
+|*
+|* Button fuer Zeichenumrandung setzen
+|*
+\************************************************************************/
+
+void SvxFontWorkDialog::SetOutline_Impl(const XFormTextOutlineItem* pItem)
+{
+ if ( pItem )
+ aTbxShadow.CheckItem(TBI_OUTLINE, pItem->GetValue());
+}
+
+/*************************************************************************
+|*
+|* Shadow-Buttons setzen
+|*
+\************************************************************************/
+
+void SvxFontWorkDialog::SetShadow_Impl(const XFormTextShadowItem* pItem,
+ BOOL bRestoreValues)
+{
+ if ( pItem )
+ {
+ USHORT nId;
+
+ aTbxShadow.Enable();
+
+ if ( pItem->GetValue() == XFTSHADOW_NONE )
+ {
+ nId = TBI_SHADOW_OFF;
+ aFbShadowX.Hide();
+ aFbShadowY.Hide();
+ aMtrFldShadowX.Disable();
+ aMtrFldShadowY.Disable();
+ aShadowColorLB.Disable();
+ }
+ else
+ {
+ ResMgr* pMgr = DIALOG_MGR();
+ aFbShadowX.Show();
+ aFbShadowY.Show();
+ aMtrFldShadowX.Enable();
+ aMtrFldShadowY.Enable();
+ aShadowColorLB.Enable();
+
+ if ( pItem->GetValue() == XFTSHADOW_NORMAL )
+ {
+ nId = TBI_SHADOW_NORMAL;
+ FieldUnit eDlgUnit;
+ GET_MODULE_FIELDUNIT( eDlgUnit );
+
+ aFbShadowX.SetBitmap(
+ Bitmap( ResId(RID_SVXBMP_SHADOW_XDIST, pMgr ) ) );
+ //aMtrFldShadowX.SetUnit(FUNIT_MM);
+ aMtrFldShadowX.SetUnit( eDlgUnit );
+ aMtrFldShadowX.SetDecimalDigits(2);
+ aMtrFldShadowX.SetMin(LONG_MIN);
+ aMtrFldShadowX.SetMax(LONG_MAX);
+ if( eDlgUnit == FUNIT_MM )
+ aMtrFldShadowX.SetSpinSize( 50 );
+ else
+ aMtrFldShadowX.SetSpinSize( 10 );
+
+ aFbShadowY.SetBitmap(
+ Bitmap( ResId( RID_SVXBMP_SHADOW_YDIST, pMgr ) ) );
+ //aMtrFldShadowY.SetUnit(FUNIT_MM);
+ aMtrFldShadowY.SetUnit( eDlgUnit );
+ aMtrFldShadowY.SetDecimalDigits(2);
+ aMtrFldShadowY.SetMin(LONG_MIN);
+ aMtrFldShadowY.SetMax(LONG_MAX);
+ if( eDlgUnit == FUNIT_MM )
+ aMtrFldShadowY.SetSpinSize( 50 );
+ else
+ aMtrFldShadowY.SetSpinSize( 10 );
+
+ if ( bRestoreValues )
+ {
+ SetMetricValue( aMtrFldShadowX, nSaveShadowX, SFX_MAPUNIT_100TH_MM );
+ SetMetricValue( aMtrFldShadowY, nSaveShadowY, SFX_MAPUNIT_100TH_MM );
+
+ XFormTextShadowXValItem aXItem( nSaveShadowX );
+ XFormTextShadowYValItem aYItem( nSaveShadowY );
+
+ GetBindings().GetDispatcher()->Execute(
+ SID_FORMTEXT_SHDWXVAL, SFX_CALLMODE_RECORD, &aXItem, &aYItem, 0L );
+ }
+ }
+ else
+ {
+ nId = TBI_SHADOW_SLANT;
+
+ aFbShadowX.SetBitmap(
+ Bitmap( ResId( RID_SVXBMP_SHADOW_ANGLE, pMgr ) ) );
+ aMtrFldShadowX.SetUnit(FUNIT_CUSTOM);
+ aMtrFldShadowX.SetDecimalDigits(1);
+ aMtrFldShadowX.SetMin(-1800);
+ aMtrFldShadowX.SetMax( 1800);
+ aMtrFldShadowX.SetSpinSize(10);
+
+ aFbShadowY.SetBitmap(
+ Bitmap( ResId( RID_SVXBMP_SHADOW_SIZE, pMgr ) ) );
+ aMtrFldShadowY.SetUnit(FUNIT_CUSTOM);
+ aMtrFldShadowY.SetDecimalDigits(0);
+ aMtrFldShadowY.SetMin(-999);
+ aMtrFldShadowY.SetMax( 999);
+ aMtrFldShadowY.SetSpinSize(10);
+
+ if ( bRestoreValues )
+ {
+ aMtrFldShadowX.SetValue(nSaveShadowAngle);
+ aMtrFldShadowY.SetValue(nSaveShadowSize);
+ XFormTextShadowXValItem aXItem(nSaveShadowAngle);
+ XFormTextShadowYValItem aYItem(nSaveShadowSize);
+ GetBindings().GetDispatcher()->Execute(
+ SID_FORMTEXT_SHDWXVAL, SFX_CALLMODE_RECORD, &aXItem, &aYItem, 0L );
+ }
+ }
+ }
+
+ if ( !aTbxShadow.IsItemChecked(nId) )
+ {
+ aTbxShadow.CheckItem(nId);
+ }
+ nLastShadowTbxId = nId;
+ }
+ else
+ {
+ aTbxShadow.Disable();
+ aMtrFldShadowX.Disable();
+ aMtrFldShadowY.Disable();
+ aShadowColorLB.Disable();
+ }
+}
+
+/*************************************************************************
+|*
+|* Schattenfarbe in Listbox eintragen
+|*
+\************************************************************************/
+
+void SvxFontWorkDialog::SetShadowColor_Impl(const XFormTextShadowColorItem* pItem)
+{
+ if ( pItem )
+ aShadowColorLB.SelectEntry(pItem->GetValue());
+}
+
+/*************************************************************************
+|*
+|* X-Wert fuer Schatten in Editfeld eintragen
+|*
+\************************************************************************/
+
+void SvxFontWorkDialog::SetShadowXVal_Impl(const XFormTextShadowXValItem* pItem)
+{
+ if ( pItem && !aMtrFldShadowX.HasFocus() )
+ {
+ INT32 nValue = pItem->GetValue();
+ nValue = nValue - ( int( float( nValue ) / 360.0 ) * 360 );
+ SetMetricValue( aMtrFldShadowX, nValue/*pItem->GetValue()*/, SFX_MAPUNIT_100TH_MM );
+ }
+}
+
+/*************************************************************************
+|*
+|* Y-Wert fuer Schatten in Editfeld eintragen
+|*
+\************************************************************************/
+
+void SvxFontWorkDialog::SetShadowYVal_Impl(const XFormTextShadowYValItem* pItem)
+{
+ if ( pItem && !aMtrFldShadowY.HasFocus() )
+ {
+ SetMetricValue( aMtrFldShadowY, pItem->GetValue(), SFX_MAPUNIT_100TH_MM );
+ }
+}
+
+/*************************************************************************
+|*
+\************************************************************************/
+
+IMPL_LINK( SvxFontWorkDialog, SelectStyleHdl_Impl, void *, EMPTYARG )
+{
+ USHORT nId = aTbxStyle.GetCurItemId();
+
+ if ( nId != nLastStyleTbxId )
+ {
+ XFormTextStyle eStyle = XFT_NONE;
+
+ switch ( nId )
+ {
+ case TBI_STYLE_ROTATE : eStyle = XFT_ROTATE; break;
+ case TBI_STYLE_UPRIGHT : eStyle = XFT_UPRIGHT; break;
+ case TBI_STYLE_SLANTX : eStyle = XFT_SLANTX; break;
+ case TBI_STYLE_SLANTY : eStyle = XFT_SLANTY; break;
+ }
+ XFormTextStyleItem aItem( eStyle );
+ GetBindings().GetDispatcher()->Execute( SID_FORMTEXT_STYLE, SFX_CALLMODE_RECORD, &aItem, 0L );
+ SetStyle_Impl( &aItem );
+ nLastStyleTbxId = nId;
+ }
+ return 0;
+}
+
+/*************************************************************************
+|*
+\************************************************************************/
+
+IMPL_LINK( SvxFontWorkDialog, SelectAdjustHdl_Impl, void *, EMPTYARG )
+{
+ USHORT nId = aTbxAdjust.GetCurItemId();
+
+ if ( nId == TBI_ADJUST_MIRROR )
+ {
+ XFormTextMirrorItem aItem(aTbxAdjust.IsItemChecked(nId));
+ GetBindings().GetDispatcher()->Execute( SID_FORMTEXT_MIRROR, SFX_CALLMODE_SLOT, &aItem, 0L );
+ }
+ else if ( nId != nLastAdjustTbxId )
+ {
+ XFormTextAdjust eAdjust = XFT_AUTOSIZE;
+
+ switch ( nId )
+ {
+ case TBI_ADJUST_LEFT : eAdjust = XFT_LEFT; break;
+ case TBI_ADJUST_CENTER : eAdjust = XFT_CENTER; break;
+ case TBI_ADJUST_RIGHT : eAdjust = XFT_RIGHT; break;
+ }
+ XFormTextAdjustItem aItem(eAdjust);
+ GetBindings().GetDispatcher()->Execute( SID_FORMTEXT_ADJUST, SFX_CALLMODE_RECORD, &aItem, 0L );
+ SetAdjust_Impl(&aItem);
+ nLastAdjustTbxId = nId;
+ }
+ return 0;
+}
+
+/*************************************************************************
+|*
+\************************************************************************/
+
+IMPL_LINK( SvxFontWorkDialog, SelectShadowHdl_Impl, void *, EMPTYARG )
+{
+ USHORT nId = aTbxShadow.GetCurItemId();
+
+ if ( nId == TBI_SHOWFORM )
+ {
+ XFormTextHideFormItem aItem(!aTbxShadow.IsItemChecked(nId));
+ GetBindings().GetDispatcher()->Execute( SID_FORMTEXT_HIDEFORM, SFX_CALLMODE_RECORD, &aItem, 0L );
+ }
+ else if ( nId == TBI_OUTLINE )
+ {
+ XFormTextOutlineItem aItem(aTbxShadow.IsItemChecked(nId));
+ GetBindings().GetDispatcher()->Execute( SID_FORMTEXT_OUTLINE, SFX_CALLMODE_RECORD, &aItem, 0L );
+ }
+ else if ( nId != nLastShadowTbxId )
+ {
+ XFormTextShadow eShadow = XFTSHADOW_NONE;
+
+ if ( nLastShadowTbxId == TBI_SHADOW_NORMAL )
+ {
+ nSaveShadowX = GetCoreValue( aMtrFldShadowX, SFX_MAPUNIT_100TH_MM );
+ nSaveShadowY = GetCoreValue( aMtrFldShadowY, SFX_MAPUNIT_100TH_MM );
+ }
+ else if ( nLastShadowTbxId == TBI_SHADOW_SLANT )
+ {
+ nSaveShadowAngle = aMtrFldShadowX.GetValue();
+ nSaveShadowSize = aMtrFldShadowY.GetValue();
+ }
+ nLastShadowTbxId = nId;
+
+ if ( nId == TBI_SHADOW_NORMAL ) eShadow = XFTSHADOW_NORMAL;
+ else if ( nId == TBI_SHADOW_SLANT ) eShadow = XFTSHADOW_SLANT;
+
+ XFormTextShadowItem aItem(eShadow);
+ GetBindings().GetDispatcher()->Execute( SID_FORMTEXT_SHADOW, SFX_CALLMODE_RECORD, &aItem, 0L );
+ SetShadow_Impl(&aItem, TRUE);
+ }
+ return 0;
+}
+
+/*************************************************************************
+|*
+\************************************************************************/
+
+IMPL_LINK_INLINE_START( SvxFontWorkDialog, ModifyInputHdl_Impl, void *, EMPTYARG )
+{
+ aInputTimer.Start();
+ return 0;
+}
+IMPL_LINK_INLINE_END( SvxFontWorkDialog, ModifyInputHdl_Impl, void *, EMPTYARG )
+
+/*************************************************************************
+|*
+\************************************************************************/
+
+IMPL_LINK( SvxFontWorkDialog, InputTimoutHdl_Impl, void *, EMPTYARG )
+{
+ // System-Metrik evtl. neu setzen
+ // Dieses sollte mal als Listener passieren, ist aber aus
+ // inkompatibilitaetsgruenden z.Z. nicht moeglich
+ FieldUnit eDlgUnit;
+ GET_MODULE_FIELDUNIT( eDlgUnit );
+ if( eDlgUnit != aMtrFldDistance.GetUnit() )
+ {
+ SetFieldUnit( aMtrFldDistance, eDlgUnit, TRUE );
+ SetFieldUnit( aMtrFldTextStart, eDlgUnit, TRUE );
+ aMtrFldDistance.SetSpinSize( eDlgUnit == FUNIT_MM ? 50 : 10 );
+ aMtrFldTextStart.SetSpinSize( eDlgUnit == FUNIT_MM ? 50 : 10 );
+ }
+ if( eDlgUnit != aMtrFldShadowX.GetUnit() &&
+ aTbxShadow.IsItemChecked( TBI_SHADOW_NORMAL ) )
+ {
+ SetFieldUnit( aMtrFldShadowX, eDlgUnit, TRUE );
+ SetFieldUnit( aMtrFldShadowY, eDlgUnit, TRUE );
+ aMtrFldShadowX.SetSpinSize( eDlgUnit == FUNIT_MM ? 50 : 10 );
+ aMtrFldShadowY.SetSpinSize( eDlgUnit == FUNIT_MM ? 50 : 10 );
+ }
+
+ long nValue = GetCoreValue( aMtrFldDistance, SFX_MAPUNIT_100TH_MM );
+ XFormTextDistanceItem aDistItem( nValue );
+ nValue = GetCoreValue( aMtrFldTextStart, SFX_MAPUNIT_100TH_MM );
+ XFormTextStartItem aStartItem( nValue );
+
+ nValue = GetCoreValue( aMtrFldShadowX, SFX_MAPUNIT_100TH_MM );
+ XFormTextShadowXValItem aShadowXItem( nValue );
+ nValue = GetCoreValue( aMtrFldShadowY, SFX_MAPUNIT_100TH_MM );
+ XFormTextShadowYValItem aShadowYItem( nValue );
+
+ // Slot-ID ist egal, die Exec-Methode wertet das gesamte ItemSet aus
+ GetBindings().GetDispatcher()->Execute( SID_FORMTEXT_DISTANCE, SFX_CALLMODE_RECORD, &aDistItem,
+ &aStartItem, &aShadowXItem, &aShadowYItem, 0L );
+ return 0;
+}
+
+/*************************************************************************
+|*
+\************************************************************************/
+
+IMPL_LINK( SvxFontWorkDialog, FormSelectHdl_Impl, void *, EMPTYARG )
+{
+ XFormTextStdFormItem aItem;
+
+ if ( aFormSet.IsNoSelection() )
+ aItem.SetValue(XFTFORM_NONE);
+ else
+ aItem.SetValue(((XFormTextStdForm)(aFormSet.GetSelectItemId())));
+ GetBindings().GetDispatcher()->Execute( SID_FORMTEXT_STDFORM, SFX_CALLMODE_RECORD, &aItem, 0L );
+ aFormSet.SetNoSelection();
+ return 0;
+}
+
+/*************************************************************************
+|*
+\************************************************************************/
+
+IMPL_LINK( SvxFontWorkDialog, ColorSelectHdl_Impl, void *, EMPTYARG )
+{
+// Changed by obo. Linux-Compiler can't parse commented lines
+ XFormTextShadowColorItem aItem( (const String &) String(),
+ (const Color &) aShadowColorLB.GetSelectEntryColor() );
+// XFormTextShadowColorItem aItem( String(),
+// aShadowColorLB.GetSelectEntryColor() );
+ GetBindings().GetDispatcher()->Execute( SID_FORMTEXT_SHDWCOLOR, SFX_CALLMODE_RECORD, &aItem, 0L );
+ return 0;
+}
+
+/*************************************************************************
+|*
+\************************************************************************/
+
+void SvxFontWorkDialog::SetColorTable(const XColorTable* pTable)
+{
+ if ( pTable && pTable != pColorTable )
+ {
+ pColorTable = pTable;
+ aShadowColorLB.Clear();
+ aShadowColorLB.Fill(pColorTable);
+ }
+}
+
+/*************************************************************************
+|*
+\************************************************************************/
+
+void SvxFontWorkDialog::SetActive(BOOL bActivate)
+{
+}
+
+/*************************************************************************
+|*
+|* Standard-FontWork-Objekt erzeugen
+|*
+\************************************************************************/
+
+void SvxFontWorkDialog::CreateStdFormObj(SdrView& rView, SdrPageView& rPV,
+ const SfxItemSet& rAttr,
+ SdrObject& rOldObj,
+ XFormTextStdForm eForm)
+{
+ SfxItemSet aAttr(*rAttr.GetPool(), XATTR_FORMTXTSTYLE,
+ XATTR_FORMTXTHIDEFORM);
+ SdrObject* pNewObj = NULL;
+ Rectangle aRect;
+ XFormTextAdjust eAdjust = XFT_AUTOSIZE;
+
+ rOldObj.TakeAttributes(aAttr, TRUE, FALSE);
+ const XFormTextStdFormItem& rOldForm = (const XFormTextStdFormItem&)
+ aAttr.Get(XATTR_FORMTXTSTDFORM);
+
+ aRect = rOldObj.GetSnapRect();
+
+ if ( !rOldObj.ISA(SdrPathObj) )
+ {
+ Point aPos = aRect.TopLeft();
+ aRect = rOldObj.GetLogicRect();
+ aRect.SetPos(aPos);
+ }
+
+ aAttr.Put(rAttr);
+
+ if ( rOldForm.GetValue() == XFTFORM_NONE )
+ {
+ long nW = aRect.GetWidth();
+ aRect.SetSize(Size(nW, nW));
+ aAttr.Put(XFormTextStyleItem(XFT_ROTATE));
+ }
+
+ Point aCenter = aRect.Center();
+
+ switch ( eForm )
+ {
+ case XFTFORM_TOPCIRC:
+ case XFTFORM_BOTCIRC:
+ case XFTFORM_LFTCIRC:
+ case XFTFORM_RGTCIRC:
+ case XFTFORM_TOPARC:
+ case XFTFORM_BOTARC:
+ case XFTFORM_LFTARC:
+ case XFTFORM_RGTARC:
+ {
+ long nBeg, nEnd;
+
+ switch ( eForm )
+ {
+ case XFTFORM_TOPCIRC:
+ nBeg = 0;
+ nEnd = 18000;
+ break;
+ case XFTFORM_BOTCIRC:
+ nBeg = 18000;
+ nEnd = 36000;
+ break;
+ case XFTFORM_LFTCIRC:
+ nBeg = 9000;
+ nEnd = 27000;
+ break;
+ case XFTFORM_RGTCIRC:
+ nBeg = 27000;
+ nEnd = 9000;
+ break;
+ case XFTFORM_TOPARC:
+ nBeg = 4500;
+ nEnd = 13500;
+ break;
+ case XFTFORM_BOTARC:
+ nBeg = 22500;
+ nEnd = 31500;
+ break;
+ case XFTFORM_LFTARC:
+ nBeg = 13500;
+ nEnd = 22500;
+ break;
+ case XFTFORM_RGTARC:
+ nBeg = 31500;
+ nEnd = 4500;
+ break;
+ }
+ pNewObj = new SdrCircObj(OBJ_CARC, aRect, nBeg, nEnd);
+ break;
+ }
+ case XFTFORM_BUTTON1:
+ {
+ XPolyPolygon aXPP;
+ XPolygon aLine(3);
+ long nR = aRect.GetWidth() / 2;
+
+ XPolygon aTopArc(aCenter, -nR, nR, 50, 1750, FALSE);
+ XPolygon aBottomArc(aCenter, -nR, nR, 1850, 3550, FALSE);
+
+ // Polygone schliessen
+ aTopArc[aTopArc.GetPointCount()] = aTopArc[0];
+ aBottomArc[aBottomArc.GetPointCount()] = aBottomArc[0];
+ aXPP.Insert(aTopArc);
+ aLine[0] = aBottomArc[aBottomArc.GetPointCount()-2];
+ aLine[2] = aLine[0];
+ aLine[1] = aBottomArc[0];
+ aXPP.Insert(aLine);
+ aXPP.Insert(aBottomArc);
+
+ pNewObj = new SdrPathObj(OBJ_PATHFILL, aXPP);
+ eAdjust = XFT_CENTER;
+ break;
+ }
+ case XFTFORM_BUTTON2:
+ case XFTFORM_BUTTON3:
+ case XFTFORM_BUTTON4:
+ {
+ XPolyPolygon aXPP;
+ XPolygon aLine(3);
+ long nR = aRect.GetWidth() / 2;
+ long nWDiff = nR / 5;
+ long nHDiff;
+
+ if ( eForm == XFTFORM_BUTTON4 )
+ {
+ aXPP.Insert(XPolygon(aCenter, -nR, nR, 950, 2650, FALSE));
+ // Polygon schliessen
+ aXPP[0][aXPP[0].GetPointCount()] = aXPP[0][0];
+ eAdjust = XFT_CENTER;
+ }
+ else
+ aXPP.Insert(XPolygon(aCenter, -nR, nR, 2700, 2700));
+
+ if ( eForm == XFTFORM_BUTTON3 )
+ nHDiff = -aRect.GetHeight() / 10;
+ else
+ nHDiff = aRect.GetHeight() / 20;
+
+ aLine[0] = aRect.LeftCenter();
+ aLine[0].X() += nWDiff;
+ aLine[0].Y() += nHDiff;
+ aLine[2] = aLine[0];
+ aLine[1] = aRect.RightCenter();
+ aLine[1].X() -= nWDiff;
+ aLine[1].Y() += nHDiff;
+ aXPP.Insert(aLine);
+
+ if ( eForm == XFTFORM_BUTTON4 )
+ {
+ aXPP.Insert(XPolygon(aCenter, -nR, nR, 2750, 850, FALSE));
+ aXPP[2][aXPP[2].GetPointCount()] = aXPP[2][0];
+ }
+
+ if ( eForm == XFTFORM_BUTTON3 )
+ {
+ nHDiff += nHDiff;
+ aLine[0].Y() -= nHDiff;
+ aLine[1].Y() -= nHDiff;
+ aLine[2].Y() -= nHDiff;
+ aXPP.Insert(aLine);
+ }
+
+ pNewObj = new SdrPathObj(OBJ_PATHFILL, aXPP);
+ break;
+ }
+ }
+ if ( pNewObj )
+ {
+ Size aSize;
+ Rectangle aSnap = pNewObj->GetSnapRect();
+
+ aSize.Width() = aRect.Left() - aSnap.Left();
+ aSize.Height() = aRect.Top() - aSnap.Top();
+ pNewObj->NbcMove(aSize);
+
+ rView.BegUndo( SVX_RESSTR( RID_SVXSTR_FONTWORK_UNDOCREATE ) );
+ OutlinerParaObject* pPara = rOldObj.GetOutlinerParaObject();
+ BOOL bHide = TRUE;
+
+ if ( pPara != NULL )
+ {
+ pPara = new OutlinerParaObject(*pPara);
+ pNewObj->SetOutlinerParaObject(pPara);
+ }
+ else
+ bHide = FALSE;
+
+ rView.ReplaceObject(&rOldObj, rPV, pNewObj, TRUE);
+ pNewObj->SetLayer(rOldObj.GetLayer());
+ aAttr.Put(XFormTextHideFormItem(bHide));
+ aAttr.Put(XFormTextAdjustItem(eAdjust));
+
+ XFormTextShadow eShadow = XFTSHADOW_NONE;
+
+ if ( nLastShadowTbxId == TBI_SHADOW_NORMAL )
+ {
+ eShadow = XFTSHADOW_NORMAL;
+ aAttr.Put(XFormTextShadowXValItem(nSaveShadowX));
+ aAttr.Put(XFormTextShadowYValItem(nSaveShadowY));
+ }
+ else if ( nLastShadowTbxId == TBI_SHADOW_SLANT )
+ {
+ eShadow = XFTSHADOW_SLANT;
+ aAttr.Put(XFormTextShadowXValItem(nSaveShadowAngle));
+ aAttr.Put(XFormTextShadowYValItem(nSaveShadowSize));
+ }
+
+ aAttr.Put(XFormTextShadowItem(eShadow));
+
+ rView.SetAttributes(aAttr);
+ rView.EndUndo();
+ }
+}
+
diff --git a/svx/source/dialog/fontwork.hrc b/svx/source/dialog/fontwork.hrc
new file mode 100644
index 000000000000..75a2b469cba9
--- /dev/null
+++ b/svx/source/dialog/fontwork.hrc
@@ -0,0 +1,88 @@
+/*************************************************************************
+ *
+ * $RCSfile: fontwork.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:08 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define VS_FORMS 1
+#define TBX_STYLE 1
+#define TBX_ADJUST 2
+#define TBX_SHADOW 3
+#define TBI_STYLE_OFF 1
+#define TBI_STYLE_ROTATE 2
+#define TBI_STYLE_UPRIGHT 3
+#define TBI_STYLE_SLANTX 4
+#define TBI_STYLE_SLANTY 5
+#define TBI_ADJUST_MIRROR 6
+#define TBI_ADJUST_LEFT 7
+#define TBI_ADJUST_CENTER 8
+#define TBI_ADJUST_RIGHT 9
+#define TBI_ADJUST_AUTOSIZE 10
+#define TBI_SHOWFORM 11
+#define TBI_OUTLINE 12
+#define TBI_SHADOW_OFF 13
+#define TBI_SHADOW_NORMAL 14
+#define TBI_SHADOW_SLANT 15
+#define FB_DISTANCE 1
+#define FB_TEXTSTART 2
+#define FB_SHADOW_X 3
+#define FB_SHADOW_Y 4
+#define MTR_FLD_DISTANCE 1
+#define MTR_FLD_TEXTSTART 2
+#define MTR_FLD_SHADOW_X 3
+#define MTR_FLD_SHADOW_Y 4
+#define CLB_SHADOW_COLOR 1
diff --git a/svx/source/dialog/fontwork.src b/svx/source/dialog/fontwork.src
new file mode 100644
index 000000000000..789339bd4a4d
--- /dev/null
+++ b/svx/source/dialog/fontwork.src
@@ -0,0 +1,1348 @@
+/*************************************************************************
+ *
+ * $RCSfile: fontwork.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:08 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+ // include ---------------------------------------------------------------
+#include "svxids.hrc"
+#include "dialogs.hrc"
+#include "fontwork.hrc"
+#include "helpid.hrc"
+ // pragma ----------------------------------------------------------------
+
+ // RID_SVXDLG_FONTWORK ---------------------------------------------------
+DockingWindow RID_SVXDLG_FONTWORK
+{
+ HelpId = SID_FONTWORK ;
+ OutputSize = TRUE ;
+ SVLook = TRUE ;
+ Hide = TRUE ;
+ Pos = MAP_APPFONT ( 0 , 0 ) ;
+ Size = MAP_APPFONT ( 89 , 193 ) ;
+ Text = "FontWork" ;
+ Text [ ENGLISH ] = "FontWork" ;
+ Text [ norwegian ] = "FontWork" ;
+ Text [ italian ] = "FontWork" ;
+ Text [ portuguese_brazilian ] = "FontWork" ;
+ Text [ portuguese ] = "FontWork" ;
+ Text [ french ] = "FontWork" ;
+ Text [ dutch ] = "FontWork" ;
+ Text [ spanish ] = "FontWork" ;
+ Text [ danish ] = "FontWork" ;
+ Text [ swedish ] = "FontWork" ;
+ Text [ finnish ] = "FontWork" ;
+ Text [ english_us ] = "FontWork" ;
+ Moveable = TRUE ;
+ Zoomable = TRUE ;
+ Closeable = TRUE ;
+ Dockable = TRUE ;
+ EnableResizing = TRUE ;
+ Control VS_FORMS
+ {
+ HelpId = HID_FONTWORK_CTL_FORMS ;
+ Pos = MAP_APPFONT ( 6 , 4 ) ;
+ Size = MAP_APPFONT ( 71 , 30 ) ;
+ Border = TRUE ;
+ };
+ ToolBox TBX_STYLE
+ {
+ SVLook = TRUE ;
+ Pos = MAP_APPFONT ( 6 , 41 ) ;
+ ItemList =
+ {
+ ToolBoxItem
+ {
+ AutoCheck = TRUE ;
+ Identifier = TBI_STYLE_OFF ;
+ HelpId = HID_FONTWORK_TBI_STYLE_OFF ;
+ Text = "Aus" ;
+ Text [ ENGLISH ] = "Off" ;
+ ItemImage = Image
+ {
+ ImageBitmap = Bitmap { File = "ftoff.bmp" ; };
+ MaskColor = Color { Red = 0xC000 ; Green = 0xC000 ; Blue = 0xC000 ; };
+ };
+ Text [ dutch ] = "Uit" ;
+ Text [ english_us ] = "Off" ;
+ Text [ italian ] = "Off" ;
+ Text [ spanish ] = "Desactivado" ;
+ Text [ french ] = "Dsactiv" ;
+ Text [ swedish ] = "Av" ;
+ Text [ danish ] = "Deaktiver" ;
+ Text [ portuguese ] = "Desactivar" ;
+ Text [ portuguese_brazilian ] = "Aus" ;
+ Text[ chinese_simplified ] = "ʧ";
+ Text[ russian ] = ".";
+ Text[ polish ] = "Wycz";
+ Text[ japanese ] = "";
+ Text[ chinese_traditional ] = "";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "Kapal";
+ Text[ language_user1 ] = " ";
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SEPARATOR ;
+ };
+ ToolBoxItem
+ {
+ AutoCheck = TRUE ;
+ RadioCheck = TRUE ;
+ Identifier = TBI_STYLE_ROTATE ;
+ HelpId = HID_FONTWORK_TBI_STYLE_ROTATE ;
+ Text = "Drehen" ;
+ Text [ ENGLISH ] = "Rotate" ;
+ ItemImage = Image
+ {
+ ImageBitmap = Bitmap { File = "ftrotate.bmp" ; };
+ MaskColor = Color { Red = 0xC000 ; Green = 0xC000 ; Blue = 0xC000 ; };
+ };
+ Text [ dutch ] = "Draaien" ;
+ Text [ english_us ] = "Rotate" ;
+ Text [ italian ] = "Ruota" ;
+ Text [ spanish ] = "Rodar" ;
+ Text [ french ] = "Rotation" ;
+ Text [ swedish ] = "Rotera" ;
+ Text [ danish ] = "Roter" ;
+ Text [ portuguese ] = "Rodar" ;
+ Text [ portuguese_brazilian ] = "Drehen" ;
+ Text[ chinese_simplified ] = "ת";
+ Text[ russian ] = "";
+ Text[ polish ] = "Obr";
+ Text[ japanese ] = "]";
+ Text[ chinese_traditional ] = "";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "ȸ";
+ Text[ turkish ] = "evir";
+ Text[ language_user1 ] = " ";
+ };
+ ToolBoxItem
+ {
+ AutoCheck = TRUE ;
+ RadioCheck = TRUE ;
+ Identifier = TBI_STYLE_UPRIGHT ;
+ HelpId = HID_FONTWORK_TBI_STYLE_UPRIGHT ;
+ Text = "Aufrecht" ;
+ Text [ ENGLISH ] = "Upright" ;
+ ItemImage = Image
+ {
+ ImageBitmap = Bitmap { File = "ftuprght.bmp" ; };
+ MaskColor = Color { Red = 0xC000 ; Green = 0xC000 ; Blue = 0xC000 ; };
+ };
+ Text [ dutch ] = "Rechtop" ;
+ Text [ english_us ] = "Upright" ;
+ Text [ italian ] = "In piedi" ;
+ Text [ spanish ] = "Derecho" ;
+ Text [ french ] = "Debout" ;
+ Text [ swedish ] = "Upprtt" ;
+ Text [ danish ] = "Opret" ;
+ Text [ portuguese ] = "Direito" ;
+ Text [ portuguese_brazilian ] = "Aufrecht" ;
+ Text[ chinese_simplified ] = "ֱ";
+ Text[ russian ] = "";
+ Text[ polish ] = "Prosto";
+ Text[ japanese ] = "";
+ Text[ chinese_traditional ] = "";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "ȹٷ";
+ Text[ turkish ] = "Dik";
+ Text[ language_user1 ] = " ";
+ };
+ ToolBoxItem
+ {
+ AutoCheck = TRUE ;
+ RadioCheck = TRUE ;
+ Identifier = TBI_STYLE_SLANTX ;
+ HelpId = HID_FONTWORK_TBI_STYLE_SLANTX ;
+ Text = "Horizontal kippen" ;
+ Text [ ENGLISH ] = "Slant horizontal" ;
+ ItemImage = Image
+ {
+ ImageBitmap = Bitmap { File = "ftslantx.bmp" ; };
+ MaskColor = Color { Red = 0xC000 ; Green = 0xC000 ; Blue = 0xC000 ; };
+ };
+ Text [ dutch ] = "Horizontaal kantelen" ;
+ Text [ english_us ] = "Slant Horizontal" ;
+ Text [ italian ] = "Inclina orizzontalmente" ;
+ Text [ spanish ] = "Inclinar horizontalmente" ;
+ Text [ french ] = "Basculer l'horizontale" ;
+ Text [ swedish ] = "Tippa horisontellt" ;
+ Text [ danish ] = "Hld vandret" ;
+ Text [ portuguese ] = "Inclinar na horizontal" ;
+ Text [ portuguese_brazilian ] = "Horizontal kippen" ;
+ Text[ chinese_simplified ] = "ˮƽб";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Przerzu w poziomie";
+ Text[ japanese ] = "ɌX";
+ Text[ chinese_traditional ] = "bVɱ";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ";
+ Text[ turkish ] = "Yatay eim";
+ Text[ language_user1 ] = " ";
+ };
+ ToolBoxItem
+ {
+ AutoCheck = TRUE ;
+ RadioCheck = TRUE ;
+ Identifier = TBI_STYLE_SLANTY ;
+ HelpId = HID_FONTWORK_TBI_STYLE_SLANTY ;
+ Text = "Vertikal kippen" ;
+ Text [ ENGLISH ] = "Slant vertical" ;
+ ItemImage = Image
+ {
+ ImageBitmap = Bitmap { File = "ftslanty.bmp" ; };
+ MaskColor = Color { Red = 0xC000 ; Green = 0xC000 ; Blue = 0xC000 ; };
+ };
+ Text [ english_us ] = "Slant Vertical" ;
+ Text [ italian ] = "Inclina verticalmente" ;
+ Text [ spanish ] = "Inclinar verticalmente" ;
+ Text [ french ] = "Basculer la verticale" ;
+ Text [ dutch ] = "Verticaal kantelen" ;
+ Text [ swedish ] = "Tippa vertikalt" ;
+ Text [ danish ] = "Hld lodret" ;
+ Text [ portuguese ] = "Inclinar na vertical" ;
+ Text [ portuguese_brazilian ] = "Vertikal kippen" ;
+ Text[ chinese_simplified ] = "ֱб";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Przerzu w pionie";
+ Text[ japanese ] = "cɌX";
+ Text[ chinese_traditional ] = "bVɱ";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ";
+ Text[ turkish ] = "Dikey eim";
+ Text[ language_user1 ] = " ";
+ };
+ };
+ };
+ ToolBox TBX_ADJUST
+ {
+ SVLook = TRUE ;
+ Pos = MAP_APPFONT ( 6 , 63 ) ;
+ ItemList =
+ {
+ ToolBoxItem
+ {
+ AutoCheck = TRUE ;
+ Checkable = TRUE ;
+ Identifier = TBI_ADJUST_MIRROR ;
+ HelpId = HID_FONTWORK_TBI_ADJUST_MIRROR ;
+ Text = "Laufrichtung" ;
+ Text [ ENGLISH ] = "Text direction" ;
+ ItemImage = Image
+ {
+ ImageBitmap = Bitmap { File = "ftmirror.bmp" ; };
+ MaskColor = Color { Red = 0xC000 ; Green = 0xC000 ; Blue = 0xC000 ; };
+ };
+ Text [ dutch ] = "Looprichting" ;
+ Text [ english_us ] = "Orientation" ;
+ Text [ italian ] = "Direzione di scorrimento" ;
+ Text [ spanish ] = "Orientacin" ;
+ Text [ french ] = "Orientation" ;
+ Text [ swedish ] = "Lpriktning" ;
+ Text [ danish ] = "Retning" ;
+ Text [ portuguese ] = "Orientao" ;
+ Text [ portuguese_brazilian ] = "Laufrichtung" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "Orientacja";
+ Text[ japanese ] = "";
+ Text[ chinese_traditional ] = "V";
+ Text[ arabic ] = "";
+ Text[ greek ] = " ";
+ Text[ korean ] = "";
+ Text[ turkish ] = "Metin yn";
+ Text[ language_user1 ] = " ";
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SEPARATOR ;
+ };
+ ToolBoxItem
+ {
+ AutoCheck = TRUE ;
+ RadioCheck = TRUE ;
+ Identifier = TBI_ADJUST_LEFT ;
+ HelpId = HID_FONTWORK_TBI_ADJUST_LEFT ;
+ /* ### ACHTUNG: Neuer Text in Resource? Linksbndig : Linksbndig */
+ /* ### ACHTUNG: Neuer Text in Resource? Linksbndig : Linksbndig */
+ Text = "Linksbndig" ;
+ Text [ ENGLISH ] = "Left aligned" ;
+ ItemImage = Image
+ {
+ ImageBitmap = Bitmap { File = "ftleft.bmp" ; };
+ MaskColor = Color { Red = 0xC000 ; Green = 0xC000 ; Blue = 0xC000 ; };
+ };
+ Text [ dutch ] = "Links uitgelijnd" ;
+ Text [ english_us ] = "Align Left" ;
+ Text [ italian ] = "Allineato a sinistra" ;
+ Text [ spanish ] = "Alineado a la izquierda" ;
+ Text [ french ] = "Align gauche" ;
+ Text [ swedish ] = "Vnsterjusterad" ;
+ Text [ danish ] = "Venstrejusteret" ;
+ Text [ portuguese ] = " esquerda" ;
+ Text [ portuguese_brazilian ] = "Linksbndig" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Wyrwnaj do lewej";
+ Text[ japanese ] = "";
+ Text[ chinese_traditional ] = "V";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " 迭";
+ Text[ turkish ] = "Sola hizala";
+ Text[ language_user1 ] = " ";
+ };
+ ToolBoxItem
+ {
+ AutoCheck = TRUE ;
+ RadioCheck = TRUE ;
+ Identifier = TBI_ADJUST_CENTER ;
+ HelpId = HID_FONTWORK_TBI_ADJUST_CENTER ;
+ Text = "Zentriert" ;
+ Text [ ENGLISH ] = "Centered" ;
+ ItemImage = Image
+ {
+ ImageBitmap = Bitmap { File = "ftcenter.bmp" ; };
+ MaskColor = Color { Red = 0xC000 ; Green = 0xC000 ; Blue = 0xC000 ; };
+ };
+ Text [ dutch ] = "Centreren" ;
+ Text [ english_us ] = "Center" ;
+ Text [ italian ] = "Centrato" ;
+ Text [ spanish ] = "Centrado" ;
+ Text [ french ] = "Centr" ;
+ Text [ swedish ] = "Centrera" ;
+ Text [ danish ] = "Centreret" ;
+ Text [ portuguese ] = "Centrado" ;
+ Text [ portuguese_brazilian ] = "Zentriert" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Wyrodkuj";
+ Text[ japanese ] = "";
+ Text[ chinese_traditional ] = "m";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "Ortala";
+ Text[ language_user1 ] = " ";
+ };
+ ToolBoxItem
+ {
+ AutoCheck = TRUE ;
+ RadioCheck = TRUE ;
+ Identifier = TBI_ADJUST_RIGHT ;
+ HelpId = HID_FONTWORK_TBI_ADJUST_RIGHT ;
+ /* ### ACHTUNG: Neuer Text in Resource? Rechtsbndig : Rechtsbndig */
+ /* ### ACHTUNG: Neuer Text in Resource? Rechtsbndig : Rechtsbndig */
+ Text = "Rechtsbndig" ;
+ Text [ ENGLISH ] = "Right aligned" ;
+ ItemImage = Image
+ {
+ ImageBitmap = Bitmap { File = "ftright.bmp" ; };
+ MaskColor = Color { Red = 0xC000 ; Green = 0xC000 ; Blue = 0xC000 ; };
+ };
+ Text [ english_us ] = "Align Right" ;
+ Text [ italian ] = "Allineato a destra" ;
+ Text [ spanish ] = "Alinear a la derecha" ;
+ Text [ french ] = "Align droite" ;
+ Text [ dutch ] = "Rechtslijnend" ;
+ Text [ swedish ] = "Hgerjusterad" ;
+ Text [ danish ] = "Hjrejusteret" ;
+ Text [ portuguese ] = " direita" ;
+ Text [ portuguese_brazilian ] = "Rechtsbndig" ;
+ Text[ chinese_simplified ] = "Ҷ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Wyrwnaj do prawej";
+ Text[ japanese ] = "E";
+ Text[ chinese_traditional ] = "Vk";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " 迭";
+ Text[ turkish ] = "Saa hizala";
+ Text[ language_user1 ] = " ";
+ };
+ ToolBoxItem
+ {
+ AutoCheck = TRUE ;
+ RadioCheck = TRUE ;
+ Identifier = TBI_ADJUST_AUTOSIZE ;
+ HelpId = HID_FONTWORK_TBI_ADJUST_AUTOSIZE ;
+ /* ### ACHTUNG: Neuer Text in Resource? Auto-Textgre : Auto-Textgre */
+ /* ### ACHTUNG: Neuer Text in Resource? Auto-Textgre : Auto-Textgre */
+ Text = "Auto-Textgre" ;
+ Text [ ENGLISH ] = "Autosize" ;
+ ItemImage = Image
+ {
+ ImageBitmap = Bitmap { File = "ftautosz.bmp" ; };
+ MaskColor = Color { Red = 0xC000 ; Green = 0xC000 ; Blue = 0xC000 ; };
+ };
+ Text [ dutch ] = "AutoTekstgrootte" ;
+ Text [ english_us ] = "AutoSize Text" ;
+ Text [ italian ] = "Dimensione testo automatico" ;
+ Text [ spanish ] = "Tamao automtico de texto" ;
+ Text [ french ] = "Taille du texte adapte" ;
+ Text [ swedish ] = "AutoTextstorlek" ;
+ Text [ danish ] = "AutoTekststrrelse" ;
+ Text [ portuguese ] = "Tamanho automtico - texto" ;
+ Text [ portuguese_brazilian ] = "Auto-Textgre" ;
+ Text[ chinese_simplified ] = "ԶִС";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Rozmiar autotekstu";
+ Text[ japanese ] = "÷Ļ";
+ Text[ chinese_traditional ] = "۰ʤrjp";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = "ڵ ũ ؽƮ";
+ Text[ turkish ] = "Otomatik metin boyu";
+ Text[ language_user1 ] = " ";
+ };
+ };
+ };
+ FixedBitmap FB_DISTANCE
+ {
+ Pos = MAP_APPFONT ( 10 , 84 ) ;
+ Size = MAP_APPFONT ( 14 , 15 ) ;
+ Fixed = Bitmap
+ {
+ File = "ftdist.bmp" ;
+ };
+ };
+ MetricField MTR_FLD_DISTANCE
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 29 , 85 ) ;
+ Size = MAP_APPFONT ( 48 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = -5000000 ;
+ Maximum = 5000000 ;
+ StrictFormat = TRUE ;
+ DecimalDigits = 2 ;
+ Unit = FUNIT_MM ;
+ First = -5000000 ;
+ Last = 5000000 ;
+ SpinSize = 50 ;
+ QuickHelpText = "Abstand" ;
+ QuickHelpText [ ENGLISH ] = "Distance" ;
+ QuickHelpText [ dutch ] = "Afstand" ;
+ QuickHelpText [ english_us ] = "Distance" ;
+ CustomUnitText [ italian ] = "-" ;
+ QuickHelpText [ italian ] = "Distanza" ;
+ QuickHelpText [ spanish ] = "Distancia" ;
+ CustomUnitText [ french ] = "-" ;
+ QuickHelpText [ french ] = "Distance" ;
+ QuickHelpText [ portuguese ] = "Distncia" ;
+ QuickHelpText [ portuguese_brazilian ] = "Abstand" ;
+ QuickHelpText [ swedish ] = "Avstnd" ;
+ QuickHelpText[ russian ] = "";
+ QuickHelpText[ danish ] = "Afstand";
+ QuickHelpText[ polish ] = "Abstand";
+ QuickHelpText[ japanese ] = "Ԋu";
+ QuickHelpText[ chinese_simplified ] = "";
+ QuickHelpText[ chinese_traditional ] = "j";
+ QuickHelpText[ arabic ] = "";
+ QuickHelpText[ greek ] = "";
+ QuickHelpText[ korean ] = "Distance";
+ CustomUnitText[ language_user1 ] = " ";
+ };
+ FixedBitmap FB_TEXTSTART
+ {
+ Pos = MAP_APPFONT ( 10 , 99 ) ;
+ Size = MAP_APPFONT ( 14 , 15 ) ;
+ Fixed = Bitmap
+ {
+ File = "ftstart.bmp" ;
+ };
+ };
+ MetricField MTR_FLD_TEXTSTART
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 29 , 100 ) ;
+ Size = MAP_APPFONT ( 48 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Maximum = 5000000 ;
+ StrictFormat = TRUE ;
+ DecimalDigits = 2 ;
+ Unit = FUNIT_MM ;
+ Last = 5000000 ;
+ SpinSize = 50 ;
+ QuickHelpText = "Einzug" ;
+ QuickHelpText [ ENGLISH ] = "Indention" ;
+ QuickHelpText [ english_us ] = "Indent" ;
+ QuickHelpText [ italian ] = "Rientro" ;
+ QuickHelpText [ spanish ] = "Sangra" ;
+ CustomUnitText [ french ] = "-" ;
+ QuickHelpText [ french ] = "Retrait" ;
+ QuickHelpText [ dutch ] = "1e regel inspringen" ;
+ QuickHelpText [ portuguese ] = "Avano" ;
+ QuickHelpText [ portuguese_brazilian ] = "Einzug" ;
+ QuickHelpText [ swedish ] = "Indrag" ;
+ QuickHelpText[ russian ] = "";
+ QuickHelpText[ danish ] = "Indrykning";
+ QuickHelpText[ polish ] = "Einzug";
+ QuickHelpText[ japanese ] = "";
+ QuickHelpText[ chinese_simplified ] = "";
+ QuickHelpText[ chinese_traditional ] = "Y";
+ QuickHelpText[ arabic ] = "";
+ QuickHelpText[ greek ] = "";
+ QuickHelpText[ korean ] = "Indent";
+ CustomUnitText[ language_user1 ] = " ";
+ };
+ ToolBox TBX_SHADOW
+ {
+ SVLook = TRUE ;
+ Pos = MAP_APPFONT ( 6 , 122 ) ;
+ ItemList =
+ {
+ ToolBoxItem
+ {
+ AutoCheck = TRUE ;
+ Checkable = TRUE ;
+ Identifier = TBI_SHOWFORM ;
+ HelpId = HID_FONTWORK_TBI_SHOWFORM ;
+ Text = "Kontur" ;
+ Text [ ENGLISH ] = "Outline" ;
+ ItemImage = Image
+ {
+ ImageBitmap = Bitmap { File = "ftshowfm.bmp" ; };
+ MaskColor = Color { Red = 0xC000 ; Green = 0xC000 ; Blue = 0xC000 ; };
+ };
+ Text [ english_us ] = "Contour" ;
+ Text [ italian ] = "Bordo" ;
+ Text [ spanish ] = "Contorno" ;
+ Text [ french ] = "Contour" ;
+ Text [ dutch ] = "Contour" ;
+ Text [ swedish ] = "Kontur" ;
+ Text [ danish ] = "Kontur" ;
+ Text [ portuguese ] = "Contorno" ;
+ Text [ portuguese_brazilian ] = "Kontur" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "Kontur";
+ Text[ japanese ] = "";
+ Text[ chinese_traditional ] = "";
+ Text[ arabic ] = " ";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "Kontur";
+ Text[ language_user1 ] = " ";
+ };
+ ToolBoxItem
+ {
+ AutoCheck = TRUE ;
+ Checkable = TRUE ;
+ Identifier = TBI_OUTLINE ;
+ HelpId = HID_FONTWORK_TBI_OUTLINE ;
+ Text = "Buchstabenumrandung" ;
+ Text [ ENGLISH ] = "Character outlines" ;
+ ItemImage = Image
+ {
+ ImageBitmap = Bitmap { File = "ftoutlin.bmp" ; };
+ MaskColor = Color { Red = 0xC000 ; Green = 0xC000 ; Blue = 0xC000 ; };
+ };
+ Text [ dutch ] = "Letteromranding" ;
+ Text [ english_us ] = "Text Contour" ;
+ Text [ italian ] = "Bordo dei caratteri" ;
+ Text [ spanish ] = "Contorno de caracteres" ;
+ Text [ french ] = "Contour de lettres" ;
+ Text [ swedish ] = "Bokstavskontur" ;
+ Text [ danish ] = "Bogstavramme" ;
+ Text [ portuguese ] = "Contorno de caracteres" ;
+ Text [ portuguese_brazilian ] = "Buchstabenumrandung" ;
+ Text[ chinese_simplified ] = "ĸ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Obramowanie liter";
+ Text[ japanese ] = "̗֊s";
+ Text[ chinese_traditional ] = "r";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = "ؽƮ ";
+ Text[ turkish ] = "Metin konturu";
+ Text[ language_user1 ] = " ";
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SEPARATOR ;
+ };
+ ToolBoxItem
+ {
+ AutoCheck = TRUE ;
+ RadioCheck = TRUE ;
+ Identifier = TBI_SHADOW_OFF ;
+ HelpId = HID_FONTWORK_TBI_SHADOW_OFF ;
+ Text = "Aus" ;
+ Text [ ENGLISH ] = "Off" ;
+ ItemImage = Image
+ {
+ ImageBitmap = Bitmap { File = "ftshdoff.bmp" ; };
+ MaskColor = Color { Red = 0xC000 ; Green = 0xC000 ; Blue = 0xC000 ; };
+ };
+ Text [ english_us ] = "No Shadow" ;
+ Text [ italian ] = "Senza ombre" ;
+ Text [ spanish ] = "Sin sombra" ;
+ Text [ french ] = "Dsactiv" ;
+ Text [ dutch ] = "Uit" ;
+ Text [ swedish ] = "Av" ;
+ Text [ danish ] = "Deaktiver" ;
+ Text [ portuguese ] = "Desactivar" ;
+ Text [ portuguese_brazilian ] = "Aus" ;
+ Text[ chinese_simplified ] = "ȡӰ";
+ Text[ russian ] = ".";
+ Text[ polish ] = "Wycz";
+ Text[ japanese ] = "eȂ";
+ Text[ chinese_traditional ] = "v";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "׸ ֱ";
+ Text[ turkish ] = "Kapal";
+ Text[ language_user1 ] = " ";
+ };
+ ToolBoxItem
+ {
+ AutoCheck = TRUE ;
+ RadioCheck = TRUE ;
+ Identifier = TBI_SHADOW_NORMAL ;
+ HelpId = HID_FONTWORK_TBI_SHADOW_NORMAL ;
+ Text = "Senkrecht" ;
+ Text [ ENGLISH ] = "Vertical" ;
+ ItemImage = Image
+ {
+ ImageBitmap = Bitmap { File = "ftshdwnm.bmp" ; };
+ MaskColor = Color { Red = 0xC000 ; Green = 0xC000 ; Blue = 0xC000 ; };
+ };
+ Text [ dutch ] = "Verticaal" ;
+ Text [ english_us ] = "Vertical" ;
+ Text [ italian ] = "Verticale" ;
+ Text [ spanish ] = "Vertical" ;
+ Text [ french ] = "Vertical" ;
+ Text [ swedish ] = "Lodrtt" ;
+ Text [ danish ] = "Lodret" ;
+ Text [ portuguese ] = "Vertical" ;
+ Text [ portuguese_brazilian ] = "Senkrecht" ;
+ Text[ chinese_simplified ] = "ֱ";
+ Text[ russian ] = "";
+ Text[ polish ] = "Pionowo";
+ Text[ japanese ] = "ˉe";
+ Text[ chinese_traditional ] = "V";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "Dikey";
+ Text[ language_user1 ] = " ";
+ };
+ ToolBoxItem
+ {
+ AutoCheck = TRUE ;
+ RadioCheck = TRUE ;
+ Identifier = TBI_SHADOW_SLANT ;
+ HelpId = HID_FONTWORK_TBI_SHADOW_SLANT ;
+ Text = "Kippen" ;
+ Text [ ENGLISH ] = "Slant" ;
+ ItemImage = Image
+ {
+ ImageBitmap = Bitmap { File = "ftshdwsl.bmp" ; };
+ MaskColor = Color { Red = 0xC000 ; Green = 0xC000 ; Blue = 0xC000 ; };
+ };
+ Text [ english_us ] = "Slant" ;
+ Text [ italian ] = "Inclina" ;
+ Text [ spanish ] = "Inclinar" ;
+ Text [ french ] = "Basculer" ;
+ Text [ dutch ] = "Kantelen" ;
+ Text [ swedish ] = "Tippa" ;
+ Text [ danish ] = "Hld" ;
+ Text [ portuguese ] = "Inclinar" ;
+ Text [ portuguese_brazilian ] = "Kippen" ;
+ Text[ chinese_simplified ] = "б";
+ Text[ russian ] = "";
+ Text[ polish ] = "Przerzu";
+ Text[ japanese ] = "Γe";
+ Text[ chinese_traditional ] = "ɱ";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "츮";
+ Text[ turkish ] = "Eim";
+ Text[ language_user1 ] = " ";
+ };
+ };
+ };
+ FixedBitmap FB_SHADOW_X
+ {
+ Pos = MAP_APPFONT ( 10 , 143 ) ;
+ Size = MAP_APPFONT ( 14 , 15 ) ;
+ };
+ MetricField MTR_FLD_SHADOW_X
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 29 , 144 ) ;
+ Size = MAP_APPFONT ( 48 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = -5000000 ;
+ Maximum = 5000000 ;
+ StrictFormat = TRUE ;
+ DecimalDigits = 2 ;
+ Unit = FUNIT_MM ;
+ CustomUnitText = " Grad" ;
+ CustomUnitText [ ENGLISH ] = "Degrees" ;
+ CustomUnitText [ norwegian ] = "Degrees" ;
+ CustomUnitText [ italian ] = "gradi" ;
+ CustomUnitText [ portuguese_brazilian ] = "Degrees" ;
+ CustomUnitText [ portuguese ] = "Graus" ;
+ CustomUnitText [ french ] = "degrs" ;
+ CustomUnitText [ dutch ] = "graden" ;
+ CustomUnitText [ spanish ] = "Grados" ;
+ CustomUnitText [ danish ] = "grader" ;
+ CustomUnitText [ swedish ] = "grader" ;
+ CustomUnitText [ finnish ] = "Degrees" ;
+ CustomUnitText [ english_us ] = "degrees" ;
+ First = -5000000 ;
+ Last = 5000000 ;
+ SpinSize = 50 ;
+ QuickHelpText = "Abstand X" ;
+ QuickHelpText [ ENGLISH ] = "Distance X" ;
+ QuickHelpText [ dutch ] = "Afstand X" ;
+ QuickHelpText [ english_us ] = "Distance X" ;
+ QuickHelpText [ italian ] = "Distanza X" ;
+ QuickHelpText [ spanish ] = "Distancia X" ;
+ QuickHelpText [ french ] = "Distance X" ;
+ QuickHelpText [ danish ] = "Afstand X" ;
+ QuickHelpText [ portuguese ] = "Distncia X" ;
+ QuickHelpText [ portuguese_brazilian ] = "Abstand X" ;
+ QuickHelpText [ swedish ] = "Avstnd X" ;
+ CustomUnitText[ chinese_simplified ] = "";
+ CustomUnitText[ russian ] = "";
+ CustomUnitText[ polish ] = "Stopie";
+ CustomUnitText[ japanese ] = "x";
+ CustomUnitText[ chinese_traditional ] = "";
+ CustomUnitText[ arabic ] = "/";
+ QuickHelpText[ russian ] = " X";
+ QuickHelpText[ polish ] = "Abstand X";
+ QuickHelpText[ japanese ] = "Abstand X";
+ QuickHelpText[ chinese_simplified ] = " X";
+ QuickHelpText[ chinese_traditional ] = "j X";
+ QuickHelpText[ arabic ] = " ";
+ CustomUnitText[ greek ] = "";
+ CustomUnitText[ korean ] = "";
+ QuickHelpText[ greek ] = "Distance X";
+ QuickHelpText[ korean ] = "Distance X";
+ CustomUnitText[ turkish ] = "Derece";
+ CustomUnitText[ language_user1 ] = " ";
+ };
+ FixedBitmap FB_SHADOW_Y
+ {
+ Pos = MAP_APPFONT ( 10 , 158 ) ;
+ Size = MAP_APPFONT ( 14 , 15 ) ;
+ };
+ MetricField MTR_FLD_SHADOW_Y
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 29 , 159 ) ;
+ Size = MAP_APPFONT ( 48 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Maximum = 5000000 ;
+ StrictFormat = TRUE ;
+ DecimalDigits = 2 ;
+ Unit = FUNIT_MM ;
+ Last = 5000000 ;
+ SpinSize = 50 ;
+ CustomUnitText = " %" ;
+ QuickHelpText = "Abstand Y" ;
+ QuickHelpText [ ENGLISH ] = "Distance Y" ;
+ QuickHelpText [ english_us ] = "Distance Y" ;
+ QuickHelpText [ italian ] = "Distanza Y" ;
+ QuickHelpText [ spanish ] = "Distancia Y" ;
+ QuickHelpText [ french ] = "Distance Y" ;
+ QuickHelpText [ dutch ] = "Afstand Y" ;
+ QuickHelpText [ danish ] = "Afstand Y" ;
+ QuickHelpText [ portuguese ] = "Distncia Y" ;
+ QuickHelpText [ portuguese_brazilian ] = "Abstand Y" ;
+ CustomUnitText [ portuguese ] = "%" ;
+ CustomUnitText [ english_us ] = "%" ;
+ CustomUnitText [ portuguese_brazilian ] = "%" ;
+ CustomUnitText [ swedish ] = "%" ;
+ QuickHelpText [ swedish ] = "Avstnd Y" ;
+ CustomUnitText [ danish ] = "%" ;
+ CustomUnitText [ italian ] = "%" ;
+ CustomUnitText [ spanish ] = "%" ;
+ CustomUnitText [ french ] = "%" ;
+ CustomUnitText [ dutch ] = "%" ;
+ CustomUnitText[ chinese_simplified ] = "%";
+ CustomUnitText[ russian ] = "%";
+ CustomUnitText[ polish ] = "%";
+ CustomUnitText[ japanese ] = "%";
+ CustomUnitText[ chinese_traditional ] = "%";
+ CustomUnitText[ arabic ] = "%";
+ QuickHelpText[ russian ] = "Abstand Y";
+ QuickHelpText[ polish ] = "Abstand Y";
+ QuickHelpText[ japanese ] = "Ԋu Y";
+ QuickHelpText[ chinese_simplified ] = " Y";
+ QuickHelpText[ chinese_traditional ] = "j Y";
+ QuickHelpText[ arabic ] = "Distance Y";
+ CustomUnitText[ greek ] = "%";
+ CustomUnitText[ korean ] = "%";
+ QuickHelpText[ greek ] = " Y";
+ QuickHelpText[ korean ] = "Distance Y";
+ CustomUnitText[ turkish ] = "%";
+ CustomUnitText[ language_user1 ] = " ";
+ };
+ ListBox CLB_SHADOW_COLOR
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 6 , 174 ) ;
+ Size = MAP_APPFONT ( 71 , 60 ) ;
+ DropDown = TRUE ;
+ QuickHelpText = "Schattenfarbe" ;
+ QuickHelpText [ portuguese ] = "Cor do sombreado" ;
+ QuickHelpText [ english_us ] = "Shadow Color" ;
+ QuickHelpText [ portuguese_brazilian ] = "Farbe" ;
+ QuickHelpText [ danish ] = "Skyggefarve" ;
+ QuickHelpText [ spanish ] = "Color sombra" ;
+ QuickHelpText [ french ] = "Couleur d'ombre" ;
+ QuickHelpText [ portuguese ] = "Cor do sombreado" ;
+ QuickHelpText [ portuguese_brazilian ] = "Farbe" ;
+ QuickHelpText [ danish ] = "Skyggefarve" ;
+ QuickHelpText [ dutch ] = "Schaduwkleur" ;
+ QuickHelpText [ portuguese ] = "Cor do sombreado" ;
+ QuickHelpText [ portuguese_brazilian ] = "Farbe" ;
+ QuickHelpText [ danish ] = "Skyggefarve" ;
+ QuickHelpText [ portuguese ] = "Cor do sombreado" ;
+ QuickHelpText [ portuguese_brazilian ] = "Farbe" ;
+ QuickHelpText [ danish ] = "Skyggefarve" ;
+ QuickHelpText [ portuguese ] = "Cor do sombreado" ;
+ QuickHelpText [ portuguese_brazilian ] = "Farbe" ;
+ QuickHelpText [ danish ] = "Skyggefarve" ;
+ QuickHelpText [ portuguese ] = "Cor do sombreado" ;
+ QuickHelpText [ portuguese_brazilian ] = "Farbe" ;
+ QuickHelpText [ danish ] = "Skyggefarve" ;
+ QuickHelpText [ portuguese ] = "Cor do sombreado" ;
+ QuickHelpText [ portuguese_brazilian ] = "Farbe" ;
+ QuickHelpText [ danish ] = "Skyggefarve" ;
+ QuickHelpText [ portuguese ] = "Cor do sombreado" ;
+ QuickHelpText [ portuguese_brazilian ] = "Farbe" ;
+ QuickHelpText [ danish ] = "Skyggefarve" ;
+ QuickHelpText [ portuguese ] = "Cor do sombreado" ;
+ QuickHelpText [ portuguese_brazilian ] = "Farbe" ;
+ QuickHelpText [ danish ] = "Skyggefarve" ;
+ QuickHelpText [ portuguese ] = "Cor do sombreado" ;
+ QuickHelpText [ portuguese_brazilian ] = "Farbe" ;
+ QuickHelpText [ danish ] = "Skyggefarve" ;
+ QuickHelpText [ portuguese ] = "Cor do sombreado" ;
+ QuickHelpText [ portuguese_brazilian ] = "Farbe" ;
+ QuickHelpText [ danish ] = "Skyggefarve" ;
+ QuickHelpText [ portuguese ] = "Cor do sombreado" ;
+ QuickHelpText [ portuguese_brazilian ] = "Farbe" ;
+ QuickHelpText [ swedish ] = "Skuggans frg" ;
+ QuickHelpText [ danish ] = "Skyggefarve" ;
+ QuickHelpText [ portuguese ] = "Cor do sombreado" ;
+ QuickHelpText [ portuguese_brazilian ] = "Farbe" ;
+ QuickHelpText [ danish ] = "Skyggefarve" ;
+ QuickHelpText [ portuguese ] = "Cor do sombreado" ;
+ QuickHelpText [ portuguese_brazilian ] = "Farbe" ;
+ QuickHelpText [ danish ] = "Skyggefarve" ;
+ QuickHelpText [ portuguese ] = "Cor do sombreado" ;
+ QuickHelpText [ portuguese_brazilian ] = "Farbe" ;
+ QuickHelpText [ danish ] = "Skyggefarve" ;
+ QuickHelpText [ portuguese ] = "Cor do sombreado" ;
+ QuickHelpText [ portuguese_brazilian ] = "Farbe" ;
+ QuickHelpText [ danish ] = "Skyggefarve" ;
+ QuickHelpText [ italian ] = "Colore dell'ombra" ;
+ QuickHelpText [ portuguese ] = "Cor do sombreado" ;
+ QuickHelpText [ portuguese_brazilian ] = "Farbe" ;
+ QuickHelpText [ danish ] = "Skyggefarve" ;
+ QuickHelpText [ portuguese_brazilian ] = "Farbe" ;
+ QuickHelpText [ danish ] = "Skyggefarve" ;
+ QuickHelpText [ portuguese_brazilian ] = "Farbe" ;
+ QuickHelpText [ danish ] = "Skyggefarve" ;
+ Text[ portuguese_brazilian ] = "Farbe";
+ Text[ danish ] = "-";
+ QuickHelpText[ russian ] = " ";
+ QuickHelpText[ polish ] = "Schattenfarbe";
+ QuickHelpText[ japanese ] = "e̐F";
+ QuickHelpText[ chinese_simplified ] = "Ӱɫ";
+ QuickHelpText[ chinese_traditional ] = "vC";
+ QuickHelpText[ arabic ] = " ";
+ QuickHelpText[ greek ] = "Shadow Color";
+ QuickHelpText[ korean ] = "Shadow Color";
+ Text[ greek ] = " ";
+ Text[ language_user1 ] = " ";
+ };
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "FontWork";
+ Text[ polish ] = "FontWork";
+ Text[ japanese ] = "̫ܰ";
+ Text[ chinese_traditional ] = "Nr";
+ Text[ arabic ] = "FontWork";
+ Text[ greek ] = "FontWork";
+ Text[ korean ] = "FontWork";
+ Text[ turkish ] = "FontWork";
+ Text[ language_user1 ] = " ";
+};
+ // Bitmaps ---------------------------------------------------------------
+Bitmap RID_SVXBMP_FONTWORK_FORM1
+{
+ File = "fwthcirc.bmp" ;
+};
+Bitmap RID_SVXBMP_FONTWORK_FORM2
+{
+ File = "fwbhcirc.bmp" ;
+};
+Bitmap RID_SVXBMP_FONTWORK_FORM3
+{
+ File = "fwlhcirc.bmp" ;
+};
+Bitmap RID_SVXBMP_FONTWORK_FORM4
+{
+ File = "fwrhcirc.bmp" ;
+};
+Bitmap RID_SVXBMP_FONTWORK_FORM5
+{
+ File = "fwtoparc.bmp" ;
+};
+Bitmap RID_SVXBMP_FONTWORK_FORM6
+{
+ File = "fwbotarc.bmp" ;
+};
+Bitmap RID_SVXBMP_FONTWORK_FORM7
+{
+ File = "fwlftarc.bmp" ;
+};
+Bitmap RID_SVXBMP_FONTWORK_FORM8
+{
+ File = "fwrgtarc.bmp" ;
+};
+Bitmap RID_SVXBMP_FONTWORK_FORM9
+{
+ File = "fwbuttn1.bmp" ;
+};
+Bitmap RID_SVXBMP_FONTWORK_FORM10
+{
+ File = "fwbuttn2.bmp" ;
+};
+Bitmap RID_SVXBMP_FONTWORK_FORM11
+{
+ File = "fwbuttn3.bmp" ;
+};
+Bitmap RID_SVXBMP_FONTWORK_FORM12
+{
+ File = "fwbuttn4.bmp" ;
+};
+Bitmap RID_SVXBMP_SHADOW_XDIST
+{
+ File = "ftshdwx.bmp" ;
+};
+Bitmap RID_SVXBMP_SHADOW_YDIST
+{
+ File = "ftshdwy.bmp" ;
+};
+Bitmap RID_SVXBMP_SHADOW_ANGLE
+{
+ File = "ftshdang.bmp" ;
+};
+Bitmap RID_SVXBMP_SHADOW_SIZE
+{
+ File = "ftshdsiz.bmp" ;
+};
+ // Strings ---------------------------------------------------------------
+String RID_SVXSTR_FONTWORK_FORM1
+{
+ Text = "Oberer Halbkreis" ;
+ Text [ ENGLISH ] = "Top half circle" ;
+ Text [ norwegian ] = "Top half circle" ;
+ Text [ italian ] = "Semicerchio superiore" ;
+ Text [ portuguese_brazilian ] = "Top half circle" ;
+ Text [ portuguese ] = "Semi-crculo superior" ;
+ Text [ french ] = "Demi-cercle suprieur" ;
+ Text [ dutch ] = "Bovenste halve cirkel" ;
+ Text [ spanish ] = "Semicrculo superior" ;
+ Text [ danish ] = "Halvcirkel" ;
+ Text [ swedish ] = "vre halvcirkel" ;
+ Text [ finnish ] = "Top half circle" ;
+ Text [ english_us ] = "Upper Semicircle" ;
+ Text[ chinese_simplified ] = "ϰԲ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Grne pkole";
+ Text[ japanese ] = "㔼~";
+ Text[ chinese_traditional ] = "Wb";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ݿ";
+ Text[ turkish ] = "st yarm daire";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_FONTWORK_FORM2
+{
+ Text = "Unterer Halbkreis" ;
+ Text [ ENGLISH ] = "Bottom half circle" ;
+ Text [ norwegian ] = "Bottom half circle" ;
+ Text [ italian ] = "Semicerchio inferiore" ;
+ Text [ portuguese_brazilian ] = "Bottom half circle" ;
+ Text [ portuguese ] = "Semi-crculo inferior" ;
+ Text [ french ] = "Demi-cercle infrieur" ;
+ Text [ dutch ] = "Onderste halve cirkel" ;
+ Text [ spanish ] = "Semicrculo inferior" ;
+ Text [ danish ] = "Buet nedad" ;
+ Text [ swedish ] = "Undre halvcirkel" ;
+ Text [ finnish ] = "Bottom half circle" ;
+ Text [ english_us ] = "Lower Semicircle" ;
+ Text[ chinese_simplified ] = "°Բ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Dolne pkole";
+ Text[ japanese ] = "~";
+ Text[ chinese_traditional ] = "Ub";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = "Ʒ ݿ";
+ Text[ turkish ] = "Alt yarm daire";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_FONTWORK_FORM3
+{
+ Text = "Linker Halbkreis" ;
+ Text [ ENGLISH ] = "Left half circle" ;
+ Text [ norwegian ] = "Left half circle" ;
+ Text [ italian ] = "Semicerchio sinistro" ;
+ Text [ portuguese_brazilian ] = "Left half circle" ;
+ Text [ portuguese ] = "Semi-crculo esquerdo" ;
+ Text [ french ] = "Demi-cercle gauche" ;
+ Text [ dutch ] = "Linker halve cirkel" ;
+ Text [ spanish ] = "Semicrculo izquierdo" ;
+ Text [ danish ] = "Venstre halvcirkel" ;
+ Text [ swedish ] = "Vnster halvcirkel" ;
+ Text [ finnish ] = "Left half circle" ;
+ Text [ english_us ] = "Left Semicircle" ;
+ Text[ chinese_simplified ] = "Բ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Lewe pkole";
+ Text[ japanese ] = "~";
+ Text[ chinese_traditional ] = "b";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ݿ";
+ Text[ turkish ] = "Sol yarm daire";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_FONTWORK_FORM4
+{
+ Text = "Rechter Halbkreis" ;
+ Text [ ENGLISH ] = "Right half circle" ;
+ Text [ norwegian ] = "Right half circle" ;
+ Text [ italian ] = "Semicerchio destro" ;
+ Text [ portuguese_brazilian ] = "Right half circle" ;
+ Text [ portuguese ] = "Semi-crculo direito" ;
+ Text [ french ] = "Demi-cercle droit" ;
+ Text [ dutch ] = "Rechter halve cirkel" ;
+ Text [ spanish ] = "Semicrculo derecho" ;
+ Text [ danish ] = "Hjre halvcirkel" ;
+ Text [ swedish ] = "Hger halvcirkel" ;
+ Text [ finnish ] = "Right half circle" ;
+ Text [ english_us ] = "Right Semicircle" ;
+ Text[ chinese_simplified ] = "ҰԲ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Prawe pkole";
+ Text[ japanese ] = "E~";
+ Text[ chinese_traditional ] = "kb";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ݿ";
+ Text[ turkish ] = "Sa yarm daire";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_FONTWORK_FORM5
+{
+ Text = "Oberer Kreisbogen" ;
+ Text [ ENGLISH ] = "Top arc" ;
+ Text [ norwegian ] = "Top arc" ;
+ Text [ italian ] = "Arco superiore" ;
+ Text [ portuguese_brazilian ] = "Top arc" ;
+ Text [ portuguese ] = "Arco superior" ;
+ Text [ french ] = "Arc suprieur" ;
+ Text [ dutch ] = "Bovenste boog" ;
+ Text [ spanish ] = "Arco superior de crculo" ;
+ Text [ danish ] = "Buet opad" ;
+ Text [ swedish ] = "vre cirkelbge" ;
+ Text [ finnish ] = "Top arc" ;
+ Text [ english_us ] = "Upper Arc" ;
+ Text[ chinese_simplified ] = "Բ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Grny uk koa";
+ Text[ japanese ] = "~";
+ Text[ chinese_traditional ] = "W꩷";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ȣ";
+ Text[ turkish ] = "st yay";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_FONTWORK_FORM6
+{
+ Text = "Unterer Kreisbogen" ;
+ Text [ ENGLISH ] = "Bottom arc" ;
+ Text [ norwegian ] = "Bottom arc" ;
+ Text [ italian ] = "Arco di cerchio inferiore" ;
+ Text [ portuguese_brazilian ] = "Bottom arc" ;
+ Text [ portuguese ] = "Arco inferior" ;
+ Text [ french ] = "Arc infrieur" ;
+ Text [ dutch ] = "Onderste boog" ;
+ Text [ spanish ] = "Arco inferior de crculo" ;
+ Text [ danish ] = "Buet nedad" ;
+ Text [ swedish ] = "Undre cirkelbge" ;
+ Text [ finnish ] = "Bottom arc" ;
+ Text [ english_us ] = "Lower Arc" ;
+ Text[ chinese_simplified ] = "Բ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Dolny uk koa";
+ Text[ japanese ] = "~";
+ Text[ chinese_traditional ] = "U꩷";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = "Ʒ ȣ";
+ Text[ turkish ] = "Alt yay";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_FONTWORK_FORM7
+{
+ Text = "Linker Kreisbogen" ;
+ Text [ ENGLISH ] = "Left arc" ;
+ Text [ norwegian ] = "Left arc" ;
+ Text [ italian ] = "Arco sinistro" ;
+ Text [ portuguese_brazilian ] = "Left arc" ;
+ Text [ portuguese ] = "Arco esquerdo" ;
+ Text [ french ] = "Arc gauche" ;
+ Text [ dutch ] = "Linker boog" ;
+ Text [ spanish ] = "Arco izquierdo de crculo" ;
+ Text [ danish ] = "Venstre bue" ;
+ Text [ swedish ] = "Vnster cirkelbge" ;
+ Text [ finnish ] = "Left arc" ;
+ Text [ english_us ] = "Left Arc" ;
+ Text[ chinese_simplified ] = "Բ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Lewy uk koa";
+ Text[ japanese ] = "~";
+ Text[ chinese_traditional ] = "꩷";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ȣ";
+ Text[ turkish ] = "Sol yay";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_FONTWORK_FORM8
+{
+ Text = "Rechter Kreisbogen" ;
+ Text [ ENGLISH ] = "Right arc" ;
+ Text [ norwegian ] = "Right arc" ;
+ Text [ italian ] = "Arco destro" ;
+ Text [ portuguese_brazilian ] = "Right arc" ;
+ Text [ portuguese ] = "Arco direito" ;
+ Text [ french ] = "Arc droit" ;
+ Text [ dutch ] = "Rechter boog" ;
+ Text [ spanish ] = "Arco derecho de crculo" ;
+ Text [ danish ] = "Hjre bue" ;
+ Text [ swedish ] = "Hger cirkelbge" ;
+ Text [ finnish ] = "Right arc" ;
+ Text [ english_us ] = "Right Arc" ;
+ Text[ chinese_simplified ] = "Բ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Prawy uk koa";
+ Text[ japanese ] = "E~";
+ Text[ chinese_traditional ] = "k꩷";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ȣ";
+ Text[ turkish ] = "Sa yay";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_FONTWORK_FORM9
+{
+ Text = "Offener Kreis" ;
+ Text [ ENGLISH ] = "Open circle" ;
+ Text [ norwegian ] = "Open circle" ;
+ Text [ italian ] = "Cerchio aperto" ;
+ Text [ portuguese_brazilian ] = "Open circle" ;
+ Text [ portuguese ] = "Crculo aberto" ;
+ Text [ french ] = "Cercle ouvert" ;
+ Text [ dutch ] = "Open cirkel" ;
+ Text [ spanish ] = "Circulo abierto" ;
+ Text [ danish ] = "ben cirkel" ;
+ Text [ swedish ] = "ppen cirkel" ;
+ Text [ finnish ] = "Open circle" ;
+ Text [ english_us ] = "Open Circle" ;
+ Text[ chinese_simplified ] = "յԲ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Otwarte koo";
+ Text[ japanese ] = "㉺~";
+ Text[ chinese_traditional ] = "ʳ";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ";
+ Text[ turkish ] = "Ak daire";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_FONTWORK_FORM10
+{
+ Text = "Geschlossener Kreis" ;
+ Text [ ENGLISH ] = "Closed circle" ;
+ Text [ norwegian ] = "Closed circle" ;
+ Text [ italian ] = "Cerchio chiuso" ;
+ Text [ portuguese_brazilian ] = "Closed circle" ;
+ Text [ portuguese ] = "Circulo fechado" ;
+ Text [ french ] = "Cercle ferm" ;
+ Text [ dutch ] = "Gesloten cirkel" ;
+ Text [ spanish ] = "Crculo cerrado" ;
+ Text [ danish ] = "Cirkulr" ;
+ Text [ swedish ] = "Stngd cirkel" ;
+ Text [ finnish ] = "Closed circle" ;
+ Text [ english_us ] = "Closed Circle" ;
+ Text[ chinese_simplified ] = "յԲ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Zamknite koo";
+ Text[ japanese ] = "~";
+ Text[ chinese_traditional ] = "ʳ";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ";
+ Text[ turkish ] = "Kapal daire";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_FONTWORK_FORM11
+{
+ Text = "Geschlossener Kreis II" ;
+ Text [ ENGLISH ] = "Closed circle II" ;
+ Text [ norwegian ] = "Closed circle II" ;
+ Text [ italian ] = "Cerchio chiuso II" ;
+ Text [ portuguese_brazilian ] = "Closed circle II" ;
+ Text [ portuguese ] = "Crculo fechado II" ;
+ Text [ french ] = "Cercle ferm II" ;
+ Text [ dutch ] = "Gesloten cirkel II" ;
+ Text [ spanish ] = "Crculo cerrado II" ;
+ Text [ danish ] = "Cirkulr II" ;
+ Text [ swedish ] = "Stngd cirkel II" ;
+ Text [ finnish ] = "Closed circle II" ;
+ Text [ english_us ] = "Closed Circle II" ;
+ Text[ chinese_simplified ] = "յԲ II";
+ Text[ russian ] = " II";
+ Text[ polish ] = "Zamknite koo II";
+ Text[ japanese ] = "~II";
+ Text[ chinese_traditional ] = "ʳ II";
+ Text[ arabic ] = " II";
+ Text[ greek ] = " II";
+ Text[ korean ] = " II";
+ Text[ turkish ] = "Kapal daire II";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_FONTWORK_FORM12
+{
+ Text = "Offener Kreis senkrecht" ;
+ Text [ ENGLISH ] = "Open circle vertical" ;
+ Text [ norwegian ] = "Open circle vertical" ;
+ Text [ italian ] = "Cerchio aperto verticale" ;
+ Text [ portuguese_brazilian ] = "Open circle vertical" ;
+ Text [ portuguese ] = "Crculo aberto vertical" ;
+ Text [ french ] = "Cercle ouvert vertical" ;
+ Text [ dutch ] = "Open cirkel verticaal" ;
+ Text [ spanish ] = "Crculo abierto vertical" ;
+ Text [ danish ] = "ben cirkel lodret" ;
+ Text [ swedish ] = "ppen cirkel lodrtt" ;
+ Text [ finnish ] = "Open circle vertical" ;
+ Text [ english_us ] = "Open Circle Vertical" ;
+ Text[ chinese_simplified ] = "ֱ򲻷յԲ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Otwarte koo w pionie";
+ Text[ japanese ] = "E~";
+ Text[ chinese_traditional ] = "ʳ";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ";
+ Text[ turkish ] = "Dikey ak daire";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_FONTWORK_UNDOCREATE
+{
+ Text = "FontWork-Objekt erzeugen" ;
+ Text [ ENGLISH ] = "create FontWork object" ;
+ Text [ english_us ] = "Create FontWork object" ;
+ Text [ italian ] = "Crea un oggetto FontWork" ;
+ Text [ spanish ] = "Crear objeto FontWork" ;
+ Text [ french ] = "Crer un objet FontWork" ;
+ Text [ dutch ] = "FontWork-object maken" ;
+ Text [ swedish ] = "Skapa FontWork-objekt" ;
+ Text [ danish ] = "Opret FontWork-objekt" ;
+ Text [ portuguese_brazilian ] = "FontWork-Objekt erzeugen" ;
+ Text [ portuguese ] = "Criar objecto FontWork" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = " FontWork";
+ Text[ polish ] = "Utwrz obiekt FontWork";
+ Text[ japanese ] = "̫ܰ ޼ުĂ̍쐬";
+ Text[ chinese_traditional ] = "ͦNr";
+ Text[ arabic ] = " FontWork";
+ Text[ greek ] = " FontWork";
+ Text[ korean ] = "FontWork ü ";
+ Text[ turkish ] = "FontWork nesnesi olutur";
+ Text[ language_user1 ] = " ";
+};
+ // ********************************************************************** EOF
diff --git a/svx/source/dialog/frmsel.cxx b/svx/source/dialog/frmsel.cxx
new file mode 100644
index 000000000000..eb6ab5f3b442
--- /dev/null
+++ b/svx/source/dialog/frmsel.cxx
@@ -0,0 +1,1265 @@
+/*************************************************************************
+ *
+ * $RCSfile: frmsel.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:08 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+// include ---------------------------------------------------------------
+
+#ifndef _SV_VIRDEV_HXX
+#include <vcl/virdev.hxx>
+#endif
+#pragma hdrstop
+
+#define _SVX_FRMSEL_CXX
+#define ITEMID_BOX SID_ATTR_BORDER_OUTER
+#define ITEMID_BOXINFO SID_ATTR_BORDER_INNER
+
+#include "frmsel.hxx"
+#include "linelink.hxx"
+
+#ifndef _SVX_BOXITEM_HXX //autogen
+#include <boxitem.hxx>
+#endif
+
+// class SvxFrameLine ----------------------------------------------------
+
+struct SvxLineStruct SvxFrameLine::NO_LINE = { 0,0,0 };
+struct SvxLineStruct SvxFrameLine::THIN_LINE = { 1,0,0 };
+struct SvxLineStruct SvxFrameLine::THICK_LINE = { 3,0,0 };
+struct SvxLineStruct SvxFrameLine::THIN_DOUBLE_LINE = { 1,1,1 };
+struct SvxLineStruct SvxFrameLine::THICK_DOUBLE_LINE = { 2,1,2 };
+
+//------------------------------------------------------------------------
+
+SvxFrameLine::SvxFrameLine()
+ : aStartPos ( 0, 0 ),
+ aMidPos ( 0, 0 ),
+ aEndPos ( 0, 0 ),
+ aColor ( COL_BLACK ),
+ theState ( SVX_FRMLINESTATE_HIDE ),
+#ifndef MIPS
+ theStyle ( NO_LINE ),
+ theCoreStyle ( NO_LINE ),
+#endif
+ bIsSelected ( FALSE )
+{
+#if defined MIPS
+ theStyle.nLeft=0;
+ theStyle.nMiddle=0;
+ theStyle.nRight=0;
+ theCoreStyle.nLeft=0;
+ theCoreStyle.nMiddle=0;
+ theCoreStyle.nRight=0;
+#endif
+}
+
+//------------------------------------------------------------------------
+
+#define WIDTH_THICK (DEF_LINE_WIDTH_2 *100)
+
+void SvxFrameLine::SetStyle( const SvxLineStruct& aStyle )
+{
+ theCoreStyle = aStyle;
+ /*
+ * Mapping: (in TWIPS, 1pt = 100 * 20 TWIPS = duenn)
+ * alles was <=0 ist -> NO_LINE
+ * alles was <=DEF_SLINE_WIDTH_2 ist -> THIN_LINE
+ * alles andere -> THICK_LINE
+ */
+ if ( ( aStyle.nLeft <= 0 ) && ( aStyle.nRight <= 0 ) )
+ {
+ theStyle = NO_LINE;
+ theState = SVX_FRMLINESTATE_HIDE;
+ }
+ else if ( ( aStyle.nRight == 0 ) && // einzelne Linie
+ ( aStyle.nLeft > 0 ) && // sichtbar
+ ( aStyle.nLeft < WIDTH_THICK ) ) // duenn
+ {
+ theStyle = THIN_LINE;
+ theState = SVX_FRMLINESTATE_SHOW;
+ }
+ else if ( ( aStyle.nRight == 0 ) && // einzelne Linie
+ ( aStyle.nLeft > 0 ) && // sichtbar
+ ( aStyle.nLeft >= WIDTH_THICK ) ) // dick
+ {
+ theStyle = THICK_LINE;
+ theState = SVX_FRMLINESTATE_SHOW;
+ }
+ else if ( ( aStyle.nRight > 0 ) && // doppelte Linie
+ ( aStyle.nLeft > 0 ) && // sichtbar
+ ( aStyle.nLeft < WIDTH_THICK ) ) // duenn
+ {
+ theStyle = THIN_DOUBLE_LINE;
+ theState = SVX_FRMLINESTATE_SHOW;
+ }
+ else if ( ( aStyle.nRight > 0 ) && // doppelte Linie
+ ( aStyle.nLeft > 0 ) && // sichtbar
+ ( aStyle.nLeft >= WIDTH_THICK ) ) // dick
+ {
+ theStyle = THICK_DOUBLE_LINE;
+ theState = SVX_FRMLINESTATE_SHOW;
+ }
+}
+
+#undef WIDTH_THICK
+
+//------------------------------------------------------------------------
+
+void SvxFrameLine::SetState( SvxFrameLineState eState )
+{
+ theState = eState;
+
+ if ( SVX_FRMLINESTATE_DONT_CARE == eState )
+ {
+ theStyle = THICK_LINE;
+ theCoreStyle = NO_LINE;
+ }
+}
+
+// class SvxFrameSelector ------------------------------------------------
+
+SvxFrameSelector::SvxFrameSelector( Window* pParent,
+ SvxFrameSelectorType eType,
+ BOOL bDontCare )
+ : Window ( pParent, (WinBits)0x0000 ),
+ eSel ( eType ),
+ eShadow ( SVX_FRMSHADOW_NONE ),
+ theCurLineStyle ( SvxFrameLine::NO_LINE ),
+ theCurLineCol ( COL_BLACK ),
+ theShadowCol ( COL_BLACK ),
+ bIsDontCare ( bDontCare ),
+ bIsClicked ( FALSE )
+{
+ Size aSzBmp( ( eSel == SVX_FRMSELTYPE_TABLE )
+ ? Size( 60, 42 )
+ : Size( 50, 50 ) );
+ aSzBmp = pParent->LogicToPixel(aSzBmp, MAP_APPFONT);
+ Size aSzParent( pParent->GetSizePixel() );
+ long nXCenter = ( aSzParent.Width() - aSzBmp.Width() ) / 2;
+ long nYCenter = ( aSzParent.Height() - aSzBmp.Height() ) / 2;
+ Point atPos( ( nXCenter < 0 ) ? 0 : nXCenter,
+ ( nYCenter < 0 ) ? 0 : nYCenter );
+
+ InitBitmap_Impl( aSzBmp );
+ SetPosSizePixel( atPos, theBmp.GetSizePixel() );
+ Show();
+}
+
+// -----------------------------------------------------------------------
+
+void SvxFrameSelector::InitBitmap_Impl( const Size& rSize )
+{
+ VirtualDevice aVirDev;
+ long nX = rSize.Width();
+ long nY = rSize.Height();
+ long nXMid = nX / 2;
+ long nYMid = nY / 2;
+
+ /*
+ * Berechnen des Frame-Rects und der Linie-Mittelpunkte
+ */
+ theBoundingRect = aRectFrame = Rectangle( 21, 21, nX-21, nY-21 );
+
+ theLeftLine.aStartPos = Point( 21, 21 );
+ theLeftLine.aEndPos = Point( 21, nY - 21 );
+ theLeftLine.aMidPos = Point( 21, nYMid );
+
+ theRightLine.aStartPos = Point( nX - 21, 21 );
+ theRightLine.aEndPos = Point( nX - 21, nY - 21 );
+ theRightLine.aMidPos = Point( nX - 21, nYMid );
+
+ theVerLine.aStartPos = Point( nXMid, 21 );
+ theVerLine.aEndPos = Point( nXMid, nY - 21 );
+ theVerLine.aMidPos = Point( nXMid, nYMid );
+
+ theTopLine.aStartPos = theLeftLine.aStartPos;
+ theTopLine.aEndPos = theRightLine.aStartPos;
+ theTopLine.aMidPos = theVerLine.aStartPos;
+
+ theBottomLine.aStartPos = theLeftLine.aEndPos;
+ theBottomLine.aEndPos = theRightLine.aEndPos;
+ theBottomLine.aMidPos = theVerLine.aEndPos;
+
+ theHorLine.aStartPos = theLeftLine.aMidPos;
+ theHorLine.aEndPos = theRightLine.aMidPos;
+ theHorLine.aMidPos = theVerLine.aMidPos;
+
+ // HotSpot-Rectangles:
+ aSpotLeft = Rectangle( Point( 0, 0 ),
+ Size( theLeftLine.aStartPos.X() + 3,
+ rSize.Height() ) );
+ aSpotRight = Rectangle( Point( theRightLine.aStartPos.X() - 3, 0 ),
+ aSpotLeft.GetSize() );
+ aSpotTop = Rectangle( Point( theTopLine.aStartPos.X(), 0 ),
+ Size( aRectFrame.GetWidth(),
+ theTopLine.aStartPos.Y() + 3 ) );
+ aSpotBottom = Rectangle( theBottomLine.aStartPos - Point( 0, 3 ),
+ aSpotTop.GetSize() );
+ aSpotHor = ( eSel == SVX_FRMSELTYPE_TABLE )
+ ? Rectangle( theHorLine.aStartPos + Point( 0, -2 ),
+ Size( aRectFrame.GetWidth(), 5 ) )
+ : Rectangle( Point( -1, -1 ), Size(- 1, -1 ) );
+ aSpotVer = ( eSel == SVX_FRMSELTYPE_TABLE )
+ ? Rectangle( theVerLine.aStartPos + Point( -2, 0 ),
+ Size( 5, aRectFrame.GetHeight() ) )
+ : Rectangle( Point( -1, -1 ), Size( -1, -1 ) );
+
+ /*
+ * Initialisieren der Bitmap:
+ */
+ aVirDev.SetOutputSizePixel( rSize );
+ aVirDev.SetLineColor( Color( COL_BLACK ) );
+ aVirDev.SetFillColor( Color( COL_WHITE ) );
+ aVirDev.DrawRect( Rectangle( Point( 0, 0 ), rSize ) );
+
+ DrawContents_Impl( aVirDev );
+
+ /*
+ * Malen der vier Eck-Winkel:
+ */
+ aVirDev.SetLineColor( Color( COL_GRAY ) );
+
+ // links/rechts oben:
+ aVirDev.DrawLine( Point( 10, 15 ), Point( 15, 15 ) );
+ aVirDev.DrawLine( Point( 15, 15 ), Point( 15, 10 ) );
+ aVirDev.DrawLine( Point( nX - 10, 15 ), Point( nX - 15, 15 ) );
+ aVirDev.DrawLine( Point( nX - 15, 15 ), Point( nX - 15, 10 ) );
+
+ // links/rechts unten:
+ aVirDev.DrawLine( Point( 10, nY - 15 ), Point( 15, nY - 15 ) );
+ aVirDev.DrawLine( Point( 15, nY - 15 ), Point( 15, nY - 10 ) );
+ aVirDev.DrawLine( Point( nX -10, nY - 15 ), Point( nX - 15, nY - 15 ) );
+ aVirDev.DrawLine( Point( nX -15, nY - 15 ), Point( nX - 15, nY - 10 ) );
+
+ /*
+ * Tabelle: Malen der vier Mitte-Winkel:
+ */
+ if ( eSel == SVX_FRMSELTYPE_TABLE )
+ {
+ // links/rechts
+ aVirDev.DrawLine( Point( 10, nYMid ), Point( 15, nYMid ) );
+ aVirDev.DrawLine( Point( 15, nYMid-2 ), Point( 15, nYMid+2 ) );
+ aVirDev.DrawLine( Point( nX-10, nYMid ), Point( nX-15, nYMid ) );
+ aVirDev.DrawLine( Point( nX-15, nYMid-2 ), Point( nX-15, nYMid+2 ) );
+
+ // horizontal/vertikal
+ aVirDev.DrawLine( Point( nXMid, 10 ), Point( nXMid, 15 ) );
+ aVirDev.DrawLine( Point( nXMid-2, 15 ), Point( nXMid+2, 15 ) );
+ aVirDev.DrawLine( Point( nXMid, nY-10 ), Point( nXMid, nY-15 ) );
+ aVirDev.DrawLine( Point( nXMid-2, nY-15 ), Point( nXMid+2, nY-15 ) );
+ }
+ theBmp = aVirDev.GetBitmap( Point( 0, 0 ), rSize );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxFrameSelector::DrawFrameLine_Impl( OutputDevice& rVirDev, Point from,
+ Point to, BOOL bHor, SvxLineStruct& dline, SvxLineStruct& lt,
+ SvxLineStruct& lLine, SvxLineStruct& lb, SvxLineStruct& rt,
+ SvxLineStruct& rLine, SvxLineStruct& rb )
+{
+ short diffArr[4]; // Kreuzungspunkt-Differenzen
+ short nHeight = 0;
+ Point from2( from );
+ Point to2( to );
+
+ if ( bHor ) // horizontale Linien
+ {
+ // Berechnung der Differenzen der Linienlaenge
+ // in den Kreuzungspunkten:
+ LinkLine( dline, lt, lLine, lb, rt, rLine, rb, diffArr );
+ nHeight = dline.nLeft + dline.nMiddle + dline.nRight;
+
+ from.Y() -= nHeight/2;
+ to.Y() -= nHeight/2;
+ to.Y() += ( dline.nLeft - 1 );
+
+ from.X() += diffArr[0];
+ to.X() += diffArr[2];
+
+ rVirDev.DrawRect( Rectangle( from, to ) );
+
+ // noch eine zweite Linie zu malen?
+ if ( dline.nRight != 0 )
+ {
+ from2.Y() -= nHeight / 2;
+ from2.Y() += dline.nLeft + dline.nMiddle;
+ to2.Y() -= nHeight / 2;
+ to2.Y() += dline.nMiddle + dline.nLeft;
+ to2.Y() += ( dline.nRight - 1 );
+ from2.X() += diffArr[1];
+ to2.X() += diffArr[3];
+ rVirDev.DrawRect( Rectangle( from2, to2 ) );
+ }
+ }
+ else // vertikale Linien
+ {
+ // Berechnung der Differenzen der Linienlaenge
+ // in den Kreuzungspunkten:
+ LinkLine( dline, lt, lLine, lb, rt, rLine, rb, diffArr );
+ nHeight = dline.nLeft + dline.nMiddle + dline.nRight;
+
+ from.X() -= nHeight / 2;
+ to.X() -= nHeight / 2;
+ to.X() += ( dline.nLeft - 1 );
+ from.Y() -= diffArr[2];
+ to.Y() -= diffArr[0];
+ rVirDev.DrawRect( Rectangle( from, to ) );
+
+ // noch eine zweite Linie zu malen?
+ if ( dline.nRight != 0 )
+ {
+ from2.X() -= nHeight / 2;
+ from2.X() += dline.nLeft + dline.nMiddle;
+ to2.X() -= nHeight / 2;
+ to2.X() += dline.nMiddle + dline.nLeft;
+ to2.X() += ( dline.nRight - 1 );
+ from2.Y() -= diffArr[3];
+ to2.Y() -= diffArr[1];
+ rVirDev.DrawRect( Rectangle( from2, to2 ) );
+ }
+ }
+
+ /*
+ * Anpassen des umgebenden Rectangles:
+ */
+ long x1 = Min( from.X(), from2.X() );
+ long x2 = Max( to.X(), to2.X() );
+ long y1 = Min( from.Y(), from2.Y() );
+ long y2 = Max( to.Y(), to2.Y() );
+
+ if ( x1 < theBoundingRect.Left() )
+ theBoundingRect.Left() = x1;
+ else if ( x1 > theBoundingRect.Right() )
+ theBoundingRect.Right() = x1;
+
+ if ( x2 < theBoundingRect.Left() )
+ theBoundingRect.Left() = x2;
+ else if ( x2 > theBoundingRect.Right() )
+ theBoundingRect.Right() = x2;
+
+ if ( y1 < theBoundingRect.Top() )
+ theBoundingRect.Top() = y1;
+ else if ( y1 > theBoundingRect.Bottom() )
+ theBoundingRect.Bottom() = y1;
+
+ if ( y2 < theBoundingRect.Top() )
+ theBoundingRect.Top() = y2;
+ else if ( y2 > theBoundingRect.Bottom() )
+ theBoundingRect.Bottom() = y2;
+}
+
+// class SvxFrameSelector ------------------------------------------------
+
+void SvxFrameSelector::HideLines()
+{
+ theLeftLine.theState =
+ theRightLine.theState =
+ theTopLine.theState =
+ theBottomLine.theState =
+ theHorLine.theState =
+ theVerLine.theState = SVX_FRMLINESTATE_HIDE;
+ theLeftLine.theStyle =
+ theRightLine.theStyle =
+ theTopLine.theStyle =
+ theBottomLine.theStyle =
+ theHorLine.theStyle =
+ theHorLine.theStyle =
+ theVerLine.theStyle = SvxFrameLine::NO_LINE;
+
+ ShowLines();
+}
+
+// -----------------------------------------------------------------------
+
+void SvxFrameSelector::ShowLines()
+{
+ VirtualDevice aVirDev;
+ Color aFillColor;
+
+ aVirDev.SetOutputSizePixel( theBmp.GetSizePixel() );
+ aVirDev.DrawBitmap( Point( 0, 0 ), theBmp );
+
+ // gesamten Rahmen loeschen und Inhalt malen
+ aVirDev.SetLineColor();
+ aVirDev.SetFillColor( Color( COL_WHITE ) );
+ aVirDev.DrawRect( theBoundingRect );
+ DrawContents_Impl( aVirDev );
+ theBoundingRect = aRectFrame;
+
+ /*
+ * Zeichnen aller Linien:
+ * ----------------------
+ * Eine Linie wird in zwei Abschnitten gemalt, um die Kreuzungs-
+ * punkte mit anderen Linien beruecksichtigen zu koennen.
+ * Diese Aufgabe uebernimmt die Methode DrawFrameLine_Impl().
+ */
+
+ // innere Linien: ---------------------------------------------
+
+ if ( eSel == SVX_FRMSELTYPE_TABLE &&
+ ( theVerLine.theState == SVX_FRMLINESTATE_SHOW ||
+ theVerLine.theState == SVX_FRMLINESTATE_DONT_CARE ) )
+ {
+ if ( theVerLine.theState == SVX_FRMLINESTATE_SHOW )
+ aFillColor = theVerLine.aColor;
+ else
+ aFillColor = Color( COL_LIGHTGRAY );
+
+ aVirDev.SetLineColor();
+ aVirDev.SetFillColor( aFillColor );
+
+ DrawFrameLine_Impl( aVirDev,
+ theVerLine.aStartPos,
+ theVerLine.aMidPos,
+ FALSE,
+ theVerLine.theStyle, // dline
+ theHorLine.theStyle, // rb
+ theVerLine.theStyle, // lLine
+ theHorLine.theStyle, // rt
+ theTopLine.theStyle, // lb
+ SvxFrameLine::NO_LINE, // rLine
+ theTopLine.theStyle // lt
+ );
+
+ DrawFrameLine_Impl( aVirDev,
+ theVerLine.aMidPos,
+ theVerLine.aEndPos,
+ FALSE,
+ theVerLine.theStyle, // dline
+ theBottomLine.theStyle, // rb
+ SvxFrameLine::NO_LINE, // lLine
+ theBottomLine.theStyle, // rb
+ theHorLine.theStyle, // lb
+ theVerLine.theStyle, // rLine
+ theHorLine.theStyle // lt
+ );
+ }
+
+ if ( eSel == SVX_FRMSELTYPE_TABLE &&
+ ( theHorLine.theState == SVX_FRMLINESTATE_SHOW ||
+ theHorLine.theState == SVX_FRMLINESTATE_DONT_CARE ) )
+ {
+ if ( theHorLine.theState == SVX_FRMLINESTATE_SHOW )
+ aFillColor = theHorLine.aColor;
+ else
+ aFillColor = Color( COL_LIGHTGRAY );
+
+ aVirDev.SetLineColor();
+ aVirDev.SetFillColor( aFillColor );
+
+ DrawFrameLine_Impl( aVirDev,
+ theHorLine.aStartPos,
+ theHorLine.aMidPos,
+ TRUE,
+ theHorLine.theStyle, // dline
+ theLeftLine.theStyle, // lt
+ SvxFrameLine::NO_LINE, // lLine
+ theLeftLine.theStyle, // lb
+ theVerLine.theStyle, // rt
+ theHorLine.theStyle, // rLine
+ theVerLine.theStyle // rb
+ );
+
+ DrawFrameLine_Impl( aVirDev,
+ theHorLine.aMidPos,
+ theHorLine.aEndPos,
+ TRUE,
+ theHorLine.theStyle, // dline
+ theVerLine.theStyle, // lt
+ theHorLine.theStyle, // lLine
+ theVerLine.theStyle, // lb
+ theRightLine.theStyle, // rt
+ SvxFrameLine::NO_LINE, // rLine
+ theRightLine.theStyle // rb
+ );
+ }
+
+ // aeussere Linien: -------------------------------------------
+
+ if ( theLeftLine.theState == SVX_FRMLINESTATE_SHOW ||
+ theLeftLine.theState == SVX_FRMLINESTATE_DONT_CARE )
+ {
+ if ( theLeftLine.theState == SVX_FRMLINESTATE_SHOW )
+ aFillColor = theLeftLine.aColor;
+ else
+ aFillColor = Color( COL_LIGHTGRAY );
+
+ aVirDev.SetLineColor();
+ aVirDev.SetFillColor( aFillColor );
+
+ DrawFrameLine_Impl( aVirDev,
+ theLeftLine.aStartPos,
+ theLeftLine.aMidPos,
+ FALSE,
+ theLeftLine.theStyle, // dline
+ SvxFrameLine::NO_LINE, // lb
+ theLeftLine.theStyle, // lLine
+ theHorLine.theStyle, // lt
+ SvxFrameLine::NO_LINE, // rb
+ SvxFrameLine::NO_LINE, // rLine
+ theTopLine.theStyle // rt
+ );
+
+ DrawFrameLine_Impl( aVirDev,
+ theLeftLine.aMidPos,
+ theLeftLine.aEndPos,
+ FALSE,
+ theLeftLine.theStyle, // dline
+ SvxFrameLine::NO_LINE, // lb
+ SvxFrameLine::NO_LINE, // lLine
+ theBottomLine.theStyle, // lt
+ SvxFrameLine::NO_LINE, // rb
+ theLeftLine.theStyle, // rLine
+ theHorLine.theStyle // rt
+ );
+ }
+
+ if ( theRightLine.theState == SVX_FRMLINESTATE_SHOW ||
+ theRightLine.theState == SVX_FRMLINESTATE_DONT_CARE )
+ {
+ if ( theRightLine.theState == SVX_FRMLINESTATE_SHOW )
+ aFillColor = theRightLine.aColor;
+ else
+ aFillColor = Color( COL_LIGHTGRAY );
+
+ aVirDev.SetLineColor();
+ aVirDev.SetFillColor( aFillColor );
+
+ DrawFrameLine_Impl( aVirDev,
+ theRightLine.aStartPos,
+ theRightLine.aMidPos,
+ FALSE,
+ theRightLine.theStyle, // dline
+ theHorLine.theStyle, // rb
+ theRightLine.theStyle, // lLine
+ SvxFrameLine::NO_LINE, // rt
+ theTopLine.theStyle, // lb
+ SvxFrameLine::NO_LINE, // eLine
+ SvxFrameLine::NO_LINE // lt
+ );
+
+ DrawFrameLine_Impl( aVirDev,
+ theRightLine.aMidPos,
+ theRightLine.aEndPos,
+ FALSE,
+ theRightLine.theStyle, // dline
+ theBottomLine.theStyle, // rb
+ SvxFrameLine::NO_LINE, // lLine
+ SvxFrameLine::NO_LINE, // lt
+ theHorLine.theStyle, // lb
+ theRightLine.theStyle, // lLine
+ SvxFrameLine::NO_LINE // rt
+ );
+ }
+
+ if ( theTopLine.theState == SVX_FRMLINESTATE_SHOW ||
+ theTopLine.theState == SVX_FRMLINESTATE_DONT_CARE )
+ {
+ if ( theTopLine.theState == SVX_FRMLINESTATE_SHOW )
+ aFillColor = theTopLine.aColor;
+ else
+ aFillColor = Color( COL_LIGHTGRAY );
+
+ aVirDev.SetLineColor();
+ aVirDev.SetFillColor( aFillColor );
+
+ DrawFrameLine_Impl( aVirDev,
+ theTopLine.aStartPos,
+ theTopLine.aMidPos,
+ TRUE,
+ theTopLine.theStyle, // dline
+ SvxFrameLine::NO_LINE, // lt
+ SvxFrameLine::NO_LINE, // lLine
+ theLeftLine.theStyle, // lb
+ SvxFrameLine::NO_LINE, // rt
+ theTopLine.theStyle, // rLine
+ theVerLine.theStyle // rb
+ );
+
+ DrawFrameLine_Impl( aVirDev,
+ theTopLine.aMidPos,
+ theTopLine.aEndPos,
+ TRUE,
+ theTopLine.theStyle, // dline
+ SvxFrameLine::NO_LINE, // lt
+ theTopLine.theStyle, // lLine
+ theVerLine.theStyle, // lb
+ SvxFrameLine::NO_LINE, // rt
+ SvxFrameLine::NO_LINE, // rLine
+ theRightLine.theStyle // rb
+ );
+ }
+
+ if ( theBottomLine.theState == SVX_FRMLINESTATE_SHOW ||
+ theBottomLine.theState == SVX_FRMLINESTATE_DONT_CARE )
+ {
+ if ( theBottomLine.theState == SVX_FRMLINESTATE_SHOW )
+ aFillColor = theBottomLine.aColor;
+ else
+ aFillColor = Color( COL_LIGHTGRAY );
+
+ aVirDev.SetLineColor();
+ aVirDev.SetFillColor( aFillColor );
+
+ DrawFrameLine_Impl( aVirDev,
+ theBottomLine.aStartPos,
+ theBottomLine.aMidPos,
+ TRUE,
+ theBottomLine.theStyle, // dline
+ theLeftLine.theStyle, // lt
+ SvxFrameLine::NO_LINE, // lLine
+ SvxFrameLine::NO_LINE, // lb
+ theVerLine.theStyle, // rt
+ theBottomLine.theStyle, // rLine
+ SvxFrameLine::NO_LINE // rb
+ );
+
+ DrawFrameLine_Impl( aVirDev,
+ theBottomLine.aMidPos,
+ theBottomLine.aEndPos,
+ TRUE,
+ theBottomLine.theStyle, // dline
+ theVerLine.theStyle, // lt
+ theBottomLine.theStyle, // lLine
+ SvxFrameLine::NO_LINE, // lb
+ theRightLine.theStyle, // rt
+ SvxFrameLine::NO_LINE, // rLine
+ SvxFrameLine::NO_LINE // rb
+ );
+ }
+
+ theBmp = aVirDev.GetBitmap( Point(0,0), theBmp.GetSizePixel() );
+
+ if ( eShadow != SVX_FRMSHADOW_NONE )
+ ShowShadow();
+ else
+ Invalidate( INVALIDATE_NOERASE );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxFrameSelector::SetCurLineStyle( const SvxLineStruct& aStyle )
+{
+ theCurLineStyle = aStyle;
+
+ if ( theLeftLine.bIsSelected ) theLeftLine.SetStyle( aStyle );
+ if ( theRightLine.bIsSelected ) theRightLine.SetStyle( aStyle );
+ if ( theTopLine.bIsSelected ) theTopLine.SetStyle( aStyle );
+ if ( theBottomLine.bIsSelected ) theBottomLine.SetStyle( aStyle );
+ if ( theHorLine.bIsSelected ) theHorLine.SetStyle( aStyle );
+ if ( theVerLine.bIsSelected ) theVerLine.SetStyle( aStyle );
+}
+
+//------------------------------------------------------------------------
+
+void SvxFrameSelector::SetCurLineColor( const Color& aColor )
+{
+ theCurLineCol = aColor;
+
+ if ( theLeftLine.bIsSelected ) theLeftLine.aColor = aColor;
+ if ( theRightLine.bIsSelected ) theRightLine.aColor = aColor;
+ if ( theTopLine.bIsSelected ) theTopLine.aColor = aColor;
+ if ( theBottomLine.bIsSelected ) theBottomLine.aColor = aColor;
+ if ( theHorLine.bIsSelected ) theHorLine.aColor = aColor;
+ if ( theVerLine.bIsSelected ) theVerLine.aColor = aColor;
+}
+
+//------------------------------------------------------------------------
+
+void SvxFrameSelector::DrawContents_Impl( OutputDevice& rVirDev )
+{
+ /*
+ * Malen des Inhaltes:
+ */
+ if ( eSel == SVX_FRMSELTYPE_TABLE )
+ {
+ Color aPrevLineColor = rVirDev.GetLineColor();
+ rVirDev.SetLineColor( Color( COL_LIGHTGRAY ) );
+ Color aPrevFillColor = rVirDev.GetFillColor();
+ rVirDev.SetFillColor( Color( COL_LIGHTGRAY ) );
+
+ Size aContentsSize =
+ Size( theVerLine.aStartPos.X() - theLeftLine.aStartPos.X() - 8,
+ theHorLine.aStartPos.Y() - theTopLine.aStartPos.Y() - 8 );
+
+ // links-oben
+ rVirDev.DrawRect( Rectangle( theLeftLine.aStartPos + Point( 4, 4 ),
+ aContentsSize ) );
+ // rechts-oben
+ rVirDev.DrawRect( Rectangle( theVerLine.aStartPos + Point( 4, 4 ),
+ aContentsSize ) );
+ // links-unten
+ rVirDev.DrawRect( Rectangle( theHorLine.aStartPos + Point( 4, 4 ),
+ aContentsSize ) );
+ // rechts-unten
+ rVirDev.DrawRect( Rectangle( theHorLine.aMidPos + Point( 4, 4 ),
+ aContentsSize ) );
+
+ rVirDev.SetLineColor( aPrevLineColor );
+ rVirDev.SetFillColor( aPrevFillColor);
+ }
+ else
+ {
+ Color aPrevLineColor = rVirDev.GetLineColor();
+ rVirDev.SetLineColor( Color( COL_LIGHTGRAY ) );
+ Color aPrevFillColor = rVirDev.GetFillColor();
+ rVirDev.SetFillColor( Color( COL_LIGHTGRAY ) );
+ Size aContentsSize =
+ Size( theRightLine.aStartPos.X() - theLeftLine.aStartPos.X() - 8 ,
+ theBottomLine.aStartPos.Y() - theLeftLine.aStartPos.Y() - 8 );
+
+ rVirDev.DrawRect( Rectangle( theLeftLine.aStartPos + Point( 4, 4 ),
+ aContentsSize ) );
+
+ /* symbolisierter Paragraph ist nicht gewuenscht - vielleicht spaeter mal wieder...
+ Size aContentsSize =
+ Size( theRightLine.aStartPos.X() - theLeftLine.aStartPos.X() - 8,
+ theBottomLine.aStartPos.Y() - theLeftLine.aStartPos.Y() - 13 );
+
+ rVirDev.DrawRect( Rectangle( theLeftLine.aStartPos + Point( 4, 4 ),
+ aContentsSize ) );
+ rVirDev.DrawRect( Rectangle( theLeftLine.aEndPos + Point( 4, -13 ),
+ Size( 20, 8 ) ) );
+ */
+ /* -------------------------------------------------------------------
+ kann StarWriter noch nicht - vielleicht spaeter mal:
+ Size aContentsSize =
+ Size( theRightLine.aStartPos.X()
+ - theLeftLine.aStartPos.X()
+ - 8,
+ theHorLine.aStartPos.Y()
+ - theLeftLine.aStartPos.Y()
+ - 13 );
+
+ // oben
+ rVirDev.DrawRect( Rectangle( theLeftLine.aStartPos + Point(4,4),
+ aContentsSize ) );
+ rVirDev.DrawRect( Rectangle( theLeftLine.aMidPos + Point(4,-13),
+ Size(20,8) ) );
+ // unten
+ rVirDev.DrawRect( Rectangle( theLeftLine.aMidPos + Point(4,4),
+ aContentsSize ) );
+ rVirDev.DrawRect( Rectangle( theLeftLine.aEndPos + Point(4,-13),
+ Size(20,8) ) );
+ --------------------------------------------------------------------*/
+ }
+}
+
+//------------------------------------------------------------------------
+
+void SvxFrameSelector::SelectLine( SvxFrameSelectorLine eNewLine, BOOL bSet )
+{
+ VirtualDevice aVirDev;
+ Color aDrawColor(
+ ( bSet && ( eNewLine != SVX_FRMSELLINE_NONE ) ) ? COL_BLACK : COL_WHITE );
+ long nX = theBmp.GetSizePixel().Width();
+ long nY = theBmp.GetSizePixel().Height();
+ long nXMid = theVerLine.aStartPos.X();
+ long nYMid = theHorLine.aStartPos.Y();
+
+ aVirDev.SetOutputSizePixel( theBmp.GetSizePixel() );
+ aVirDev.DrawBitmap( Point( 0, 0 ), theBmp );
+
+ switch ( eNewLine )
+ {
+ case SVX_FRMSELLINE_LEFT:
+ {
+ DrawSelArrow_Impl( aVirDev, Point( 13, 3 ), aDrawColor,
+ SVX_SELARROWTYPE_DOWN );
+ DrawSelArrow_Impl( aVirDev, Point( 13, nY - 8 ), aDrawColor,
+ SVX_SELARROWTYPE_UP );
+ theLeftLine.bIsSelected = bSet;
+ }
+ break;
+
+ case SVX_FRMSELLINE_RIGHT:
+ {
+ DrawSelArrow_Impl( aVirDev, Point( nX - 17, 3 ), aDrawColor,
+ SVX_SELARROWTYPE_DOWN );
+ DrawSelArrow_Impl( aVirDev, Point( nX - 17, nY - 8 ), aDrawColor,
+ SVX_SELARROWTYPE_UP );
+ theRightLine.bIsSelected = bSet;
+ }
+ break;
+
+ case SVX_FRMSELLINE_TOP:
+ {
+ DrawSelArrow_Impl( aVirDev, Point( 3, 13 ), aDrawColor,
+ SVX_SELARROWTYPE_RIGHT );
+ DrawSelArrow_Impl( aVirDev, Point( nX - 8, 13 ), aDrawColor,
+ SVX_SELARROWTYPE_LEFT );
+ theTopLine.bIsSelected = bSet;
+ }
+ break;
+
+ case SVX_FRMSELLINE_BOTTOM:
+ {
+ DrawSelArrow_Impl( aVirDev, Point( 3, nY - 17 ), aDrawColor,
+ SVX_SELARROWTYPE_RIGHT );
+ DrawSelArrow_Impl( aVirDev, Point( nX - 8, nY - 17 ), aDrawColor,
+ SVX_SELARROWTYPE_LEFT );
+ theBottomLine.bIsSelected = bSet;
+ }
+ break;
+
+ case SVX_FRMSELLINE_HOR:
+ if ( eSel == SVX_FRMSELTYPE_TABLE )
+ {
+ DrawSelArrow_Impl( aVirDev, Point( 3, nYMid - 2 ), aDrawColor,
+ SVX_SELARROWTYPE_RIGHT );
+ DrawSelArrow_Impl( aVirDev, Point( nX - 8, nYMid - 2 ), aDrawColor,
+ SVX_SELARROWTYPE_LEFT );
+ theHorLine.bIsSelected = bSet;
+ }
+ break;
+
+ case SVX_FRMSELLINE_VER:
+ if ( eSel == SVX_FRMSELTYPE_TABLE )
+ {
+ DrawSelArrow_Impl( aVirDev, Point( nXMid - 2, 3 ), aDrawColor,
+ SVX_SELARROWTYPE_DOWN);
+ DrawSelArrow_Impl( aVirDev, Point( nXMid - 2, nY - 8 ), aDrawColor,
+ SVX_SELARROWTYPE_UP );
+ theVerLine.bIsSelected = bSet;
+ }
+ break;
+
+ case SVX_FRMSELLINE_NONE:
+ {
+ // links
+ DrawSelArrow_Impl( aVirDev, Point( 13, 3 ), aDrawColor,
+ SVX_SELARROWTYPE_DOWN );
+ DrawSelArrow_Impl( aVirDev, Point( 13, nY - 8 ), aDrawColor,
+ SVX_SELARROWTYPE_UP );
+ // rechts
+ DrawSelArrow_Impl( aVirDev, Point( nX - 17, 3 ), aDrawColor,
+ SVX_SELARROWTYPE_DOWN );
+ DrawSelArrow_Impl( aVirDev, Point( nX - 17, nY - 8 ), aDrawColor,
+ SVX_SELARROWTYPE_UP );
+ // oben
+ DrawSelArrow_Impl( aVirDev, Point( 3, 13 ), aDrawColor,
+ SVX_SELARROWTYPE_RIGHT );
+ DrawSelArrow_Impl( aVirDev, Point( nX - 8, 13 ), aDrawColor,
+ SVX_SELARROWTYPE_LEFT );
+ // unten
+ DrawSelArrow_Impl( aVirDev, Point( 3, nY - 17 ), aDrawColor,
+ SVX_SELARROWTYPE_RIGHT );
+ DrawSelArrow_Impl( aVirDev, Point( nX - 8, nY - 17 ), aDrawColor,
+ SVX_SELARROWTYPE_LEFT );
+
+ if ( eSel == SVX_FRMSELTYPE_TABLE )
+ {
+ // horizontal
+ DrawSelArrow_Impl( aVirDev, Point( 3, nYMid-2 ), aDrawColor,
+ SVX_SELARROWTYPE_RIGHT );
+ DrawSelArrow_Impl( aVirDev, Point( nX - 8, nYMid - 2 ), aDrawColor,
+ SVX_SELARROWTYPE_LEFT );
+
+ // vertikal
+ DrawSelArrow_Impl( aVirDev, Point( nXMid - 2, 3 ),aDrawColor,
+ SVX_SELARROWTYPE_DOWN );
+ DrawSelArrow_Impl( aVirDev, Point( nXMid - 2, nY - 8 ), aDrawColor,
+ SVX_SELARROWTYPE_UP );
+ }
+
+ theLeftLine.bIsSelected =
+ theRightLine.bIsSelected =
+ theTopLine.bIsSelected =
+ theBottomLine.bIsSelected =
+ theHorLine.bIsSelected =
+ theVerLine.bIsSelected = FALSE;
+ }
+ }
+ theBmp = aVirDev.GetBitmap( Point( 0, 0 ), theBmp.GetSizePixel() );
+ Invalidate( INVALIDATE_NOERASE );
+ if(aSelectLink.IsSet())
+ aSelectLink.Call(0);
+}
+
+//------------------------------------------------------------------------
+
+void SvxFrameSelector::DrawSelArrow_Impl(
+
+ OutputDevice& rDev, Point aPos, Color aCol, SvxSelArrowType eType )
+{
+ Point aPtArray[5];
+ Color aPrevLineColor = rDev.GetLineColor();
+ Color aPrevFillColor = rDev.GetFillColor();
+ rDev.SetLineColor( aCol );
+ rDev.SetFillColor( aCol );
+
+ switch ( eType )
+ {
+ case SVX_SELARROWTYPE_LEFT:
+ aPtArray[0] = aPos + Point( 3, 0 );
+ aPtArray[1] = aPos + Point( 4, 4 );
+ aPtArray[2] = aPos + Point( 1, 1 );
+ aPtArray[3] = aPos + Point( 2, 3 );
+ aPtArray[4] = aPos + Point( 0, 2 );
+ break;
+ case SVX_SELARROWTYPE_RIGHT:
+ aPtArray[0] = aPos;
+ aPtArray[1] = aPos + Point( 1, 4 );
+ aPtArray[2] = aPos + Point( 2, 1 );
+ aPtArray[3] = aPos + Point( 3, 3 );
+ aPtArray[4] = aPos + Point( 4, 2 );
+ break;
+ case SVX_SELARROWTYPE_UP:
+ aPtArray[0] = aPos + Point( 0, 3 );
+ aPtArray[1] = aPos + Point( 4, 4 );
+ aPtArray[2] = aPos + Point( 1, 1 );
+ aPtArray[3] = aPos + Point( 3, 2 );
+ aPtArray[4] = aPos + Point( 2, 0 );
+ break;
+ case SVX_SELARROWTYPE_DOWN:
+ aPtArray[0] = aPos;
+ aPtArray[1] = aPos + Point( 4, 1 );
+ aPtArray[2] = aPos + Point( 1, 2 );
+ aPtArray[3] = aPos + Point( 3, 3 );
+ aPtArray[4] = aPos + Point( 2, 4 );
+ break;
+ }
+ rDev.DrawRect( Rectangle( aPtArray[0], aPtArray[1] ) );
+ rDev.DrawRect( Rectangle( aPtArray[2], aPtArray[3] ) );
+ rDev.DrawLine( aPtArray[4], aPtArray[4] );
+ rDev.SetLineColor( aPrevLineColor );
+ rDev.SetFillColor( aPrevFillColor );
+}
+
+//------------------------------------------------------------------------
+
+void SvxFrameSelector::SetShadowPos( SvxFrameShadow eShadowPos )
+{
+ eShadow = eShadowPos;
+}
+
+//------------------------------------------------------------------------
+
+void SvxFrameSelector::ShowShadow()
+{
+ VirtualDevice aVirDev;
+ Bitmap theFrameBmp;
+ Color aWhiteCol( COL_WHITE );
+ Color theDrawCol =
+ eShadow != SVX_FRMSHADOW_NONE ? theShadowCol : aWhiteCol;
+ long nX = theBmp.GetSizePixel().Width();
+ long nY = theBmp.GetSizePixel().Height();
+ Point theOldPos;
+ Rectangle theFrameRect = theBoundingRect;
+ Rectangle theEraseRect( Point( 16, 16 ), Size( nX - 31, nY - 31 ) );
+
+ aVirDev.SetOutputSizePixel( theBmp.GetSizePixel() );
+ aVirDev.DrawBitmap( Point( 0, 0 ), theBmp );
+
+ // Rahmen-Bitmap sichern
+ theFrameBmp = aVirDev.GetBitmap( theFrameRect.TopLeft(),
+ theFrameRect.GetSize() );
+ // aktuellen Schatten entfernen:
+ aVirDev.SetLineColor( aWhiteCol );
+ aVirDev.SetFillColor( aWhiteCol );
+ aVirDev.DrawRect( theEraseRect );
+ aVirDev.SetLineColor( theDrawCol );
+ aVirDev.SetFillColor( theDrawCol );
+
+ if ( eShadow != SVX_FRMSHADOW_NONE )
+ {
+ Point aDeltaPnt( 3, 3 );
+
+ switch ( eShadow )
+ {
+ case SVX_FRMSHADOW_TOP_RIGHT:
+ aDeltaPnt.Y() *= -1; break;
+
+ case SVX_FRMSHADOW_BOT_LEFT:
+ aDeltaPnt.X() *= -1;
+ break;
+
+ case SVX_FRMSHADOW_TOP_LEFT:
+ aDeltaPnt.X() *= -1; aDeltaPnt.Y() *= -1;
+ break;
+ }
+ Rectangle aTempRect( Point( theFrameRect.Left()+aDeltaPnt.X(),
+ theFrameRect.Top()+aDeltaPnt.Y() ),
+ theFrameRect.GetSize() );
+ aVirDev.DrawRect( aTempRect );
+ }
+ aVirDev.DrawBitmap( theFrameRect.TopLeft(), theFrameBmp );
+ theBmp = aVirDev.GetBitmap( Point( 0, 0 ), theBmp.GetSizePixel() );
+ Invalidate( INVALIDATE_NOERASE );
+}
+
+//------------------------------------------------------------------------
+
+void SvxFrameSelector::SetShadowColor( const Color& aColor )
+{
+ theShadowCol = aColor;
+}
+
+// -----------------------------------------------------------------------
+
+Color SvxFrameSelector::GetShadowColor() const
+{
+ return theShadowCol;
+}
+
+// -----------------------------------------------------------------------
+
+SvxFrameShadow SvxFrameSelector::GetShadowPos() const
+{
+ return eShadow;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxFrameSelector::Paint( const Rectangle& )
+{
+ DrawBitmap( Point( 0, 0 ), theBmp );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxFrameSelector::MouseButtonDown( const MouseEvent& rMEvt )
+{
+ if ( rMEvt.IsLeft() && ( rMEvt.GetClicks() == 1 ) )
+ {
+ CaptureMouse();
+ }
+}
+
+// -----------------------------------------------------------------------
+
+void SvxFrameSelector::MouseButtonUp( const MouseEvent& rMEvt )
+{
+ /* Verhalten bei Mausclicks:
+ * -------------------------
+ * o nur Einfachclicks
+ * o Shift-Einfachclick -> Mehrfachselektion
+ * o einzelne Linien:
+ * - ist die Linie bereits selektiert -> an/aus-Toggle
+ * - sonst -> an
+ * o Kreuzungspunkt vertikal/horizontal (Mitte)
+ * - ist eine oder keine Linie selektiert -> an
+ * - sonst -> an/aus-Toggle beide
+ * o Click auf die gleiche Linie -> Toggle SHOW/HIDE/DONT_CARE
+ */
+
+ if ( rMEvt.IsLeft() )
+ {
+ Point aBtnUpPos( rMEvt.GetPosPixel() );
+
+ if ( !bIsClicked && !bIsDontCare )
+ {
+ bIsClicked = TRUE;
+
+ // wenn Linien auf DontCare sind, muessen diese auf HIDE
+ // gesetzt werden (ausser der aktuellen Linie)
+
+ if ( theLeftLine.theState == SVX_FRMLINESTATE_DONT_CARE &&
+ !aSpotLeft.IsInside( aBtnUpPos ) )
+ {
+ theLeftLine.SetStyle( SvxFrameLine::NO_LINE );
+ }
+ if ( theRightLine.theState == SVX_FRMLINESTATE_DONT_CARE &&
+ !aSpotRight.IsInside( aBtnUpPos ) )
+ {
+ theRightLine.SetStyle( SvxFrameLine::NO_LINE );
+ }
+ if ( theTopLine.theState == SVX_FRMLINESTATE_DONT_CARE &&
+ !aSpotTop.IsInside( aBtnUpPos ) )
+ {
+ theTopLine.SetStyle( SvxFrameLine::NO_LINE );
+ }
+ if ( theBottomLine.theState == SVX_FRMLINESTATE_DONT_CARE &&
+ !aSpotBottom.IsInside( aBtnUpPos ) )
+ {
+ theBottomLine.SetStyle( SvxFrameLine::NO_LINE );
+ }
+ if ( theVerLine.theState == SVX_FRMLINESTATE_DONT_CARE &&
+ !aSpotVer.IsInside( aBtnUpPos ) )
+ {
+ theVerLine.SetStyle( SvxFrameLine::NO_LINE );
+ }
+ if ( theHorLine.theState == SVX_FRMLINESTATE_DONT_CARE &&
+ !aSpotHor.IsInside( aBtnUpPos ) )
+ {
+ theHorLine.SetStyle( SvxFrameLine::NO_LINE );
+ }
+ }
+
+ if ( aSpotLeft.IsInside( aBtnUpPos ) )
+ {
+ LineClicked_Impl( theLeftLine, rMEvt.IsShift(),
+ ( rMEvt.GetClicks() != 1 ) );
+ SelectLine( SVX_FRMSELLINE_LEFT );
+ }
+ else if ( aSpotRight.IsInside( aBtnUpPos ) )
+ {
+ LineClicked_Impl( theRightLine, rMEvt.IsShift(),
+ ( rMEvt.GetClicks() != 1 ) );
+ SelectLine( SVX_FRMSELLINE_RIGHT );
+ }
+ else if ( aSpotTop.IsInside( aBtnUpPos ) )
+ {
+ LineClicked_Impl( theTopLine, rMEvt.IsShift(),
+ ( rMEvt.GetClicks() != 1 ) );
+ SelectLine( SVX_FRMSELLINE_TOP );
+ }
+ else if ( aSpotBottom.IsInside( aBtnUpPos ) )
+ {
+ LineClicked_Impl( theBottomLine, rMEvt.IsShift(),
+ ( rMEvt.GetClicks() != 1 ) );
+ SelectLine( SVX_FRMSELLINE_BOTTOM );
+ }
+ else if ( aSpotVer.IsInside( aBtnUpPos ) &&
+ aSpotHor.IsInside( aBtnUpPos ) )
+ {
+ if ( !theHorLine.bIsSelected || !theVerLine.bIsSelected )
+ {
+ theVerLine.aColor =
+ theHorLine.aColor = theCurLineCol;
+ theVerLine.SetStyle( theCurLineStyle );
+ theHorLine.SetStyle( theCurLineStyle );
+
+ if ( !rMEvt.IsShift() )
+ SelectLine( SVX_FRMSELLINE_NONE );
+
+ SelectLine( SVX_FRMSELLINE_VER );
+ SelectLine( SVX_FRMSELLINE_HOR );
+ }
+ else if ( theHorLine.bIsSelected && theVerLine.bIsSelected )
+ {
+ if ( !rMEvt.IsShift() )
+ SelectLine( SVX_FRMSELLINE_NONE );
+ SelectLine( SVX_FRMSELLINE_VER );
+ SelectLine( SVX_FRMSELLINE_HOR );
+ LineClicked_Impl( theVerLine, TRUE, ( rMEvt.GetClicks() != 1 ) );
+ LineClicked_Impl( theHorLine, TRUE, ( rMEvt.GetClicks() != 1 ) );
+ }
+ }
+ else if ( aSpotVer.IsInside( aBtnUpPos ) )
+ {
+ LineClicked_Impl( theVerLine, rMEvt.IsShift(),
+ ( rMEvt.GetClicks() != 1 ) );
+ SelectLine( SVX_FRMSELLINE_VER );
+ }
+ else if ( aSpotHor.IsInside( aBtnUpPos ) )
+ {
+ LineClicked_Impl( theHorLine, rMEvt.IsShift(),
+ ( rMEvt.GetClicks() != 1 ) );
+ SelectLine( SVX_FRMSELLINE_HOR );
+ }
+ ShowLines();
+ ReleaseMouse();
+ }
+}
+
+// -----------------------------------------------------------------------
+
+void SvxFrameSelector::LineClicked_Impl( SvxFrameLine& aLine,
+ BOOL bShiftPressed,
+ BOOL bDoubleClick )
+{
+ if ( aLine.bIsSelected )
+ {
+ int nMod = bIsDontCare ? 3 : 2;
+ aLine.theState = SvxFrameLineState(
+ ( ( (int)aLine.theState ) + ( ( !bDoubleClick ) ? 1 : 2 ) ) % nMod );
+
+ switch ( aLine.theState )
+ {
+ case SVX_FRMLINESTATE_SHOW:
+ aLine.SetStyle( theCurLineStyle );
+ aLine.aColor = theCurLineCol;
+ break;
+ case SVX_FRMLINESTATE_HIDE:
+ aLine.SetStyle( SvxFrameLine::NO_LINE );
+ break;
+ case SVX_FRMLINESTATE_DONT_CARE:
+ aLine.theStyle = SvxFrameLine::THICK_LINE;
+ break;
+ }
+ }
+ else
+ {
+ aLine.theState = SVX_FRMLINESTATE_SHOW;
+ aLine.aColor = theCurLineCol;
+ aLine.SetStyle( theCurLineStyle );
+ }
+
+ if ( !bShiftPressed )
+ SelectLine( SVX_FRMSELLINE_NONE );
+}
+
+// -----------------------------------------------------------------------
+
+BOOL SvxFrameSelector::IsAnyLineSet() const
+{
+ if( theLeftLine.theState == SVX_FRMLINESTATE_SHOW ||
+ theRightLine.theState == SVX_FRMLINESTATE_SHOW ||
+ theTopLine.theState == SVX_FRMLINESTATE_SHOW ||
+ theBottomLine.theState == SVX_FRMLINESTATE_SHOW ||
+ theHorLine.theState == SVX_FRMLINESTATE_SHOW ||
+ theVerLine.theState == SVX_FRMLINESTATE_SHOW )
+ return TRUE;
+ else
+ return FALSE;
+}
+
+
diff --git a/svx/source/dialog/graphctl.cxx b/svx/source/dialog/graphctl.cxx
new file mode 100644
index 000000000000..ae464dac789c
--- /dev/null
+++ b/svx/source/dialog/graphctl.cxx
@@ -0,0 +1,689 @@
+/*************************************************************************
+ *
+ * $RCSfile: graphctl.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:08 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#if defined( OS2 ) || defined( WIN ) || defined( UNX ) || defined( WNT )
+#include <stdlib.h> //wegen fcvt
+#endif
+#ifdef MAC
+char *fcvt(double value, int ndigit, int *decpt, int *sign);
+#endif
+
+#ifndef _SFXITEMPOOL_HXX //autogen
+#include <svtools/itempool.hxx>
+#endif
+#pragma hdrstop
+
+#ifndef _SV_WRKWIN_HXX
+#include <vcl/wrkwin.hxx>
+#endif
+
+#include "graphctl.hxx"
+
+#include "xoutbmp.hxx"
+#include "svxids.hrc"
+#include "svdpage.hxx"
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+void GraphCtrlUserCall::Changed( const SdrObject& rObj, SdrUserCallType eType, const Rectangle& rOldBoundRect )
+{
+ switch( eType )
+ {
+ case( SDRUSERCALL_MOVEONLY ):
+ case( SDRUSERCALL_RESIZE ):
+ rWin.SdrObjChanged( rObj );
+ break;
+
+ case( SDRUSERCALL_INSERTED ):
+ rWin.SdrObjCreated( rObj );
+ break;
+
+ default:
+ break;
+ }
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+GraphCtrl::GraphCtrl( Window* pParent, const WinBits nWinBits ) :
+ Control ( pParent, nWinBits ),
+ aMap100 ( MAP_100TH_MM ),
+ pModel ( NULL ),
+ pView ( NULL ),
+ eObjKind ( OBJ_NONE ),
+ nPolyEdit ( 0 ),
+ bEditMode ( FALSE ),
+ bSdrMode ( FALSE )
+{
+ pUserCall = new GraphCtrlUserCall( *this );
+ aUpdateTimer.SetTimeout( 200 );
+ aUpdateTimer.SetTimeoutHdl( LINK( this, GraphCtrl, UpdateHdl ) );
+ aUpdateTimer.Start();
+
+ SetWinStyle( nWinBits );
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+GraphCtrl::GraphCtrl( Window* pParent, const ResId& rResId ) :
+ Control ( pParent, rResId ),
+ aMap100 ( MAP_100TH_MM ),
+ pModel ( NULL ),
+ pView ( NULL ),
+ eObjKind ( OBJ_NONE ),
+ nPolyEdit ( 0 ),
+ bEditMode ( FALSE ),
+ bSdrMode ( FALSE ),
+ bAnim ( FALSE ),
+ nWinStyle ( 0 )
+{
+ pUserCall = new GraphCtrlUserCall( *this );
+ aUpdateTimer.SetTimeout( 500 );
+ aUpdateTimer.SetTimeoutHdl( LINK( this, GraphCtrl, UpdateHdl ) );
+ aUpdateTimer.Start();
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+GraphCtrl::~GraphCtrl()
+{
+ delete pView;
+ delete pModel;
+ delete pUserCall;
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+void GraphCtrl::SetWinStyle( WinBits nWinBits )
+{
+ nWinStyle = nWinBits;
+ bAnim = ( nWinStyle & WB_ANIMATION ) == WB_ANIMATION;
+ bSdrMode = ( nWinStyle & WB_SDRMODE ) == WB_SDRMODE;
+
+ const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
+ SetBackground( Wallpaper( rStyleSettings.GetWindowColor() ) );
+ SetMapMode( aMap100 );
+ EnableDrop( TRUE );
+
+ delete pView;
+ pView = NULL;
+
+ delete pModel;
+ pModel = NULL;
+
+ if ( bSdrMode )
+ InitSdrModel();
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+void GraphCtrl::InitSdrModel()
+{
+ SdrPage* pPage;
+
+ // alten Kram zerstoeren
+ delete pView;
+ delete pModel;
+
+ // Model anlegen
+ pModel = new SdrModel;
+ pModel->GetItemPool().FreezeIdRanges();
+ pModel->SetScaleUnit( aMap100.GetMapUnit() );
+ pModel->SetScaleFraction( Fraction( 1, 1 ) );
+ pModel->SetDefaultFontHeight( 500 );
+
+ pPage = new SdrPage( *pModel );
+
+ pPage->SetSize( aGraphSize );
+ pPage->SetBorder( 0, 0, 0, 0 );
+ pModel->InsertPage( pPage );
+ pModel->SetChanged( FALSE );
+
+ // View anlegen
+ pView = new GraphCtrlView( pModel, this );
+ pView->SetWorkArea( Rectangle( Point(), aGraphSize ) );
+ pView->SetHlplVisible( FALSE );
+ pView->SetGridVisible( FALSE );
+ pView->SetBordVisible( FALSE );
+ pView->SetPageVisible( FALSE );
+ pView->EnableExtendedMouseEventDispatcher( TRUE );
+ pView->ShowPagePgNum( 0, Point() );
+ pView->SetFrameDragSingles( TRUE );
+ pView->SetMarkedPointsSmooth( SDRPATHSMOOTH_SYMMETRIC );
+ pView->SetEditMode( TRUE );
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+void GraphCtrl::SetGraphic( const Graphic& rGraphic, BOOL bNewModel )
+{
+ // Bitmaps dithern wir ggf. fuer die Anzeige
+ if ( !bAnim && ( rGraphic.GetType() == GRAPHIC_BITMAP ) )
+ {
+ if ( rGraphic.IsTransparent() )
+ {
+ Bitmap aBmp( rGraphic.GetBitmap() );
+
+ DitherBitmap( aBmp );
+#ifndef VCL
+ aGraphic = Graphic( aBmp, rGraphic.GetTransparentBitmap() );
+#else
+ aGraphic = Graphic( BitmapEx( aBmp, rGraphic.GetBitmapEx().GetMask() ) );
+#endif
+ }
+ else
+ {
+#ifndef VCL
+ Bitmap aBmp( XOutBitmap::GetBitmapFromGraphic( rGraphic ) );
+#else
+ Bitmap aBmp( rGraphic.GetBitmap() );
+#endif
+ DitherBitmap( aBmp );
+ aGraphic = aBmp;
+ }
+ }
+ else
+ aGraphic = rGraphic;
+
+ if ( aGraphic.GetPrefMapMode().GetMapUnit() == MAP_PIXEL )
+ aGraphSize = Application::GetDefaultDevice()->PixelToLogic( aGraphic.GetPrefSize(), aMap100 );
+ else
+ aGraphSize = OutputDevice::LogicToLogic( aGraphic.GetPrefSize(), aGraphic.GetPrefMapMode(), aMap100 );
+
+ if ( bSdrMode && bNewModel )
+ InitSdrModel();
+
+ if ( aGraphSizeLink.IsSet() )
+ aGraphSizeLink.Call( this );
+
+ Resize();
+ Invalidate();
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+void GraphCtrl::Resize()
+{
+ Control::Resize();
+
+ if ( aGraphSize.Width() && aGraphSize.Height() )
+ {
+ MapMode aDisplayMap( aMap100 );
+ Point aNewPos;
+ Size aNewSize;
+ const Size aWinSize = PixelToLogic( GetOutputSizePixel(), aDisplayMap );
+ const long nWidth = aWinSize.Width();
+ const long nHeight = aWinSize.Height();
+ double fGrfWH = (double) aGraphSize.Width() / aGraphSize.Height();
+ double fWinWH = (double) nWidth / nHeight;
+
+ // Bitmap an Thumbgroesse anpassen
+ if ( fGrfWH < fWinWH)
+ {
+ aNewSize.Width() = (long) ( (double) nHeight * fGrfWH );
+ aNewSize.Height()= nHeight;
+ }
+ else
+ {
+ aNewSize.Width() = nWidth;
+ aNewSize.Height()= (long) ( (double) nWidth / fGrfWH );
+ }
+
+ aNewPos.X() = ( nWidth - aNewSize.Width() ) >> 1;
+ aNewPos.Y() = ( nHeight - aNewSize.Height() ) >> 1;
+
+ // MapMode fuer Engine umsetzen
+ aDisplayMap.SetScaleX( Fraction( aNewSize.Width(), aGraphSize.Width() ) );
+ aDisplayMap.SetScaleY( Fraction( aNewSize.Height(), aGraphSize.Height() ) );
+
+ aDisplayMap.SetOrigin( LogicToLogic( aNewPos, aMap100, aDisplayMap ) );
+ SetMapMode( aDisplayMap );
+ }
+
+ Invalidate();
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+void GraphCtrl::Paint( const Rectangle& rRect )
+{
+ if ( aGraphic.GetType() != GRAPHIC_NONE )
+ aGraphic.Draw( this, Point(), aGraphSize );
+
+ if ( bSdrMode )
+ pView->InitRedraw( this , Region( rRect ) );
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+void GraphCtrl::SdrObjChanged( const SdrObject& rObj )
+{
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+void GraphCtrl::SdrObjCreated( const SdrObject& rObj )
+{
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+void GraphCtrl::MarkListHasChanged()
+{
+ if ( aMarkObjLink.IsSet() )
+ aMarkObjLink.Call( this );
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+void GraphCtrl::KeyInput( const KeyEvent& rKEvt )
+{
+ KeyCode aCode( rKEvt.GetKeyCode() );
+ BOOL bProc = FALSE;
+
+ switch ( aCode.GetCode() )
+ {
+ case KEY_ESCAPE:
+ {
+ if ( bSdrMode )
+ {
+ if ( pView->IsAction() )
+ {
+ pView->BrkAction();
+ bProc = TRUE;
+ }
+ else
+ pView->UnmarkAll();
+ }
+ }
+ break;
+
+ case KEY_DELETE:
+ case KEY_BACKSPACE:
+ {
+ if ( bSdrMode )
+ {
+ pView->DeleteMarked();
+ bProc = TRUE;
+ }
+ }
+ break;
+
+ case KEY_TAB:
+ {
+ if ( !aCode.IsMod1() && !aCode.IsMod2() )
+ {
+ // Wechsel zum naechten Objekt
+ if ( bSdrMode )
+ {
+ pView->MarkNextObj( !aCode.IsShift() );
+ bProc = TRUE;
+ }
+ }
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ if ( !bProc )
+ Control::KeyInput( rKEvt );
+ else
+ ReleaseMouse();
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+void GraphCtrl::MouseButtonDown( const MouseEvent& rMEvt )
+{
+ if ( bSdrMode && ( rMEvt.GetClicks() < 2 ) )
+ {
+ const Point aLogPt( PixelToLogic( rMEvt.GetPosPixel() ) );
+
+ if ( !Rectangle( Point(), aGraphSize ).IsInside( aLogPt ) && !pView->IsEditMode() )
+ Control::MouseButtonDown( rMEvt );
+ else
+ {
+ // Focus anziehen fuer Key-Inputs
+ GrabFocus();
+
+ if ( nPolyEdit )
+ {
+ SdrViewEvent aVEvt;
+ SdrHitKind eHit = pView->PickAnything( rMEvt, SDRMOUSEBUTTONDOWN, aVEvt );
+
+ if ( nPolyEdit == SID_BEZIER_INSERT && eHit == SDRHIT_MARKEDOBJECT )
+ pView->BegInsObjPoint( aLogPt, rMEvt.IsMod1(), NULL, 0 );
+ else
+ pView->MouseButtonDown( rMEvt, this );
+ }
+ else
+ pView->MouseButtonDown( rMEvt, this );
+ }
+
+ SdrObject* pCreateObj = pView->GetCreateObj();
+
+ // Wir wollen das Inserten mitbekommen
+ if ( pCreateObj && !pCreateObj->GetUserCall() )
+ pCreateObj->SetUserCall( pUserCall );
+
+ SetPointer( pView->GetPreferedPointer( aLogPt, this ) );
+ }
+ else
+ Control::MouseButtonDown( rMEvt );
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+void GraphCtrl::MouseMove(const MouseEvent& rMEvt)
+{
+ const Point aLogPos( PixelToLogic( rMEvt.GetPosPixel() ) );
+
+ if ( bSdrMode )
+ {
+ pView->MouseMove( rMEvt, this );
+
+ if( ( SID_BEZIER_INSERT == nPolyEdit ) &&
+ !pView->HitHandle( aLogPos, *this ) &&
+ !pView->IsInsObjPoint() )
+ {
+ SetPointer( POINTER_CROSS );
+ }
+ else
+ SetPointer( pView->GetPreferedPointer( aLogPos, this ) );
+ }
+ else
+ Control::MouseButtonUp( rMEvt );
+
+ if ( aMousePosLink.IsSet() )
+ {
+ if ( Rectangle( Point(), aGraphSize ).IsInside( aLogPos ) )
+ aMousePos = aLogPos;
+ else
+ aMousePos = Point();
+
+ aMousePosLink.Call( this );
+ }
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+void GraphCtrl::MouseButtonUp(const MouseEvent& rMEvt)
+{
+ if ( bSdrMode )
+ {
+ if ( pView->IsInsObjPoint() )
+ pView->EndInsObjPoint( SDRCREATE_FORCEEND );
+ else
+ pView->MouseButtonUp( rMEvt, this );
+
+ ReleaseMouse();
+ SetPointer( pView->GetPreferedPointer( PixelToLogic( rMEvt.GetPosPixel() ), this ) );
+ }
+ else
+ Control::MouseButtonUp( rMEvt );
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+SdrObject* GraphCtrl::GetSelectedSdrObject() const
+{
+ SdrObject* pSdrObj = NULL;
+
+ if ( bSdrMode )
+ {
+ const SdrMarkList& rMarkList = pView->GetMarkList();
+
+ if ( rMarkList.GetMarkCount() == 1 )
+ pSdrObj = rMarkList.GetMark( 0 )->GetObj();
+ }
+
+ return pSdrObj;
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+void GraphCtrl::SetEditMode( const BOOL _bEditMode )
+{
+ if ( bSdrMode )
+ {
+ pView->SetEditMode( bEditMode = _bEditMode );
+ pView->SetCurrentObj( eObjKind = OBJ_NONE );
+ }
+ else
+ bEditMode = FALSE;
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+void GraphCtrl::SetPolyEditMode( const USHORT _nPolyEdit )
+{
+ if ( bSdrMode && ( _nPolyEdit != nPolyEdit ) )
+ {
+ nPolyEdit = _nPolyEdit;
+ pView->SetFrameDragSingles( nPolyEdit == 0 );
+ }
+ else
+ nPolyEdit = 0;
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+void GraphCtrl::SetObjKind( const SdrObjKind _eObjKind )
+{
+ if ( bSdrMode )
+ {
+ pView->SetEditMode( bEditMode = FALSE );
+ pView->SetCurrentObj( eObjKind = _eObjKind );
+ }
+ else
+ eObjKind = OBJ_NONE;
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+String GraphCtrl::GetStringFromDouble( const double& rDouble )
+{
+ int nDec;
+ int nSign;
+ String aString( String::CreateFromAscii( fcvt( rDouble, 2, &nDec, &nSign ) ) );
+ String aStr;
+ sal_Unicode cSep = International().GetNumDecimalSep();
+
+ if ( nDec > -1 )
+ {
+ aString.Insert( cSep, nDec );
+ if ( !nDec )
+ aString.Insert( sal_Unicode('0'), 0 );
+ }
+ else
+ {
+ aString.Insert( sal_Unicode('0'), 0 );
+ aString.Insert( cSep, 0 );
+ aString.Insert( sal_Unicode('0'), 0 );
+ }
+
+ return aString;
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+IMPL_LINK( GraphCtrl, UpdateHdl, Timer*, pTimer )
+{
+ if ( aUpdateLink.IsSet() )
+ aUpdateLink.Call( this );
+
+ pTimer->Start();
+
+ return 0L;
+}
+
+
diff --git a/svx/source/dialog/grfpage.cxx b/svx/source/dialog/grfpage.cxx
new file mode 100644
index 000000000000..4046984b807b
--- /dev/null
+++ b/svx/source/dialog/grfpage.cxx
@@ -0,0 +1,907 @@
+/*************************************************************************
+ *
+ * $RCSfile: grfpage.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:08 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#pragma hdrstop
+
+#define ITEMID_GRF_CROP 0
+#define ITEMID_SIZE 0
+#define ITEMID_BRUSH 0
+
+#ifndef _SHL_HXX //autogen
+#include <tools/shl.hxx>
+#endif
+#ifndef _SFXENUMITEM_HXX //autogen
+#include <svtools/eitem.hxx>
+#endif
+#ifndef _SFXAPP_HXX //autogen
+#include <sfx2/app.hxx>
+#endif
+#ifndef _SFX_SAVEOPT_HXX //autogen
+#include <sfx2/saveopt.hxx>
+#endif
+#ifndef _SFXMODULE_HXX //autogen
+#include <sfx2/module.hxx>
+#endif
+
+#ifndef _SFXSIDS_HRC
+#include <sfx2/sfxsids.hrc>
+#endif
+
+
+#ifndef _SVX_DIALMGR_HXX //autogen
+#include <dialmgr.hxx>
+#endif
+#ifndef _SVX_DLGUTIL_HXX
+#include <dlgutil.hxx>
+#endif
+#ifndef _SVX_SIZEITEM_HXX //autogen
+#include <sizeitem.hxx>
+#endif
+#ifndef _SVX_BRSHITEM_HXX //autogen
+#include <brshitem.hxx>
+#endif
+
+#ifndef _GRFPAGE_HXX
+#include <grfpage.hxx>
+#endif
+#ifndef _SVX_GRFCROP_HXX
+#include <grfcrop.hxx>
+#endif
+
+#ifndef _GRFPAGE_HRC
+#include <grfpage.hrc>
+#endif
+#ifndef _SVX_DIALOGS_HRC
+#include <dialogs.hrc>
+#endif
+#ifndef _SVX_SVXIDS_HRC
+#include <svxids.hrc>
+#endif
+
+
+#define CM_1_TO_TWIP 567
+
+
+inline long lcl_GetValue( MetricField& rMetric, FieldUnit eUnit )
+{
+ return rMetric.Denormalize( rMetric.GetValue( eUnit ));
+}
+
+/*--------------------------------------------------------------------
+ Beschreibung: Grafik zuschneiden
+ --------------------------------------------------------------------*/
+
+SvxGrfCropPage::SvxGrfCropPage ( Window *pParent, const SfxItemSet &rSet )
+ : SfxTabPage( pParent, SVX_RES( RID_SVXPAGE_GRFCROP ), rSet ),
+ aSizeGB( this, ResId( GB_SIZE )),
+ aWidthFT( this, ResId( FT_WIDTH )),
+ aWidthMF( this, ResId( MF_WIDTH )),
+ aHeightFT( this, ResId( FT_HEIGHT )),
+ aHeightMF( this, ResId( MF_HEIGHT )),
+ aZoomGB( this, ResId( GB_ZOOM )),
+ aWidthZoomFT( this, ResId( FT_WIDTHZOOM )),
+ aWidthZoomMF( this, ResId( MF_WIDTHZOOM )),
+ aHeightZoomFT( this, ResId( FT_HEIGHTZOOM)),
+ aHeightZoomMF( this, ResId( MF_HEIGHTZOOM)),
+ aCropGB( this, ResId( GB_CROP )),
+ aLeftFT( this, ResId( FT_LEFT )),
+ aLeftMF( this, ResId( MF_LEFT )),
+ aRightFT( this, ResId( FT_RIGHT )),
+ aRightMF( this, ResId( MF_RIGHT )),
+ aTopFT( this, ResId( FT_TOP )),
+ aTopMF( this, ResId( MF_TOP )),
+ aBottomFT( this, ResId( FT_BOTTOM )),
+ aBottomMF( this, ResId( MF_BOTTOM )),
+ aSizeConstRB( this, ResId( RB_SIZECONST)),
+ aZoomConstRB( this, ResId( RB_ZOOMCONST)),
+ aExampleWN( this, ResId( WN_BSP )),
+ aExampleGB( this, ResId( GB_EXAMPLE )),
+ aOrigSizeFT( this, ResId(FT_ORIG_SIZE)),
+ aOrigSizePB( this, ResId( PB_ORGSIZE )),
+ pLastCropField(0),
+ bInitialized(FALSE),
+ bSetOrigSize(FALSE)
+{
+ FreeResource();
+
+ SetExchangeSupport();
+
+ // set the correct Metrik
+ FieldUnit aMetric;
+ GET_MODULE_FIELDUNIT( aMetric );
+
+ SetFieldUnit( aWidthMF, aMetric );
+ SetFieldUnit( aHeightMF, aMetric );
+ SetFieldUnit( aLeftMF, aMetric );
+ SetFieldUnit( aRightMF, aMetric );
+ SetFieldUnit( aTopMF , aMetric );
+ SetFieldUnit( aBottomMF, aMetric );
+
+ Link aLk = LINK(this, SvxGrfCropPage, SizeHdl);
+ aWidthMF.SetModifyHdl( aLk );
+ aHeightMF.SetModifyHdl( aLk );
+
+ aLk = LINK(this, SvxGrfCropPage, ZoomHdl);
+ aWidthZoomMF.SetModifyHdl( aLk );
+ aHeightZoomMF.SetModifyHdl( aLk );
+
+ aLk = LINK(this, SvxGrfCropPage, CropHdl);
+ aLeftMF.SetDownHdl( aLk );
+ aRightMF.SetDownHdl( aLk );
+ aTopMF.SetDownHdl( aLk );
+ aBottomMF.SetDownHdl( aLk );
+ aLeftMF.SetUpHdl( aLk );
+ aRightMF.SetUpHdl( aLk );
+ aTopMF.SetUpHdl( aLk );
+ aBottomMF.SetUpHdl( aLk );
+
+ aLk = LINK(this, SvxGrfCropPage, CropModifyHdl);
+ aLeftMF.SetModifyHdl( aLk );
+ aRightMF.SetModifyHdl( aLk );
+ aTopMF.SetModifyHdl( aLk );
+ aBottomMF.SetModifyHdl( aLk );
+
+ aLk = LINK(this, SvxGrfCropPage, CropLoseFocusHdl);
+ aLeftMF.SetLoseFocusHdl( aLk );
+ aRightMF.SetLoseFocusHdl( aLk );
+ aTopMF.SetLoseFocusHdl( aLk );
+ aBottomMF.SetLoseFocusHdl( aLk );
+
+ aLk = LINK(this, SvxGrfCropPage, OrigSizeHdl);
+ aOrigSizePB.SetClickHdl( aLk );
+
+ aTimer.SetTimeoutHdl(LINK(this, SvxGrfCropPage, Timeout));
+ aTimer.SetTimeout( 1500 );
+}
+
+/*--------------------------------------------------------------------
+ Beschreibung:
+ --------------------------------------------------------------------*/
+
+SvxGrfCropPage::~SvxGrfCropPage()
+{
+ aTimer.Stop();
+}
+
+/*--------------------------------------------------------------------
+ Beschreibung:
+ --------------------------------------------------------------------*/
+
+SfxTabPage* SvxGrfCropPage::Create(Window *pParent, const SfxItemSet &rSet)
+{
+ return new SvxGrfCropPage( pParent, rSet );
+}
+/*--------------------------------------------------------------------
+ Beschreibung:
+ --------------------------------------------------------------------*/
+
+void SvxGrfCropPage::Reset( const SfxItemSet &rSet )
+{
+ const SfxPoolItem* pItem;
+ const SfxItemPool& rPool = *rSet.GetPool();
+
+ if(SFX_ITEM_SET == rSet.GetItemState( rPool.GetWhich(
+ SID_ATTR_GRAF_KEEP_ZOOM ), TRUE, &pItem ))
+ {
+ if( ((const SfxBoolItem*)pItem)->GetValue() )
+ aZoomConstRB.Check();
+ else
+ aSizeConstRB.Check();
+ aZoomConstRB.SaveValue();
+ }
+
+ USHORT nW = rPool.GetWhich( SID_ATTR_GRAF_CROP );
+ if( SFX_ITEM_SET == rSet.GetItemState( nW, TRUE, &pItem))
+ {
+ FieldUnit eUnit = MapToFieldUnit( rSet.GetPool()->GetMetric( nW ));
+
+ SvxGrfCrop* pCrop = (SvxGrfCrop*)pItem;
+
+ aExampleWN.SetLeft( pCrop->GetLeft());
+ aExampleWN.SetRight( pCrop->GetRight());
+ aExampleWN.SetTop( pCrop->GetTop());
+ aExampleWN.SetBottom( pCrop->GetBottom());
+
+ aLeftMF.SetValue( aLeftMF.Normalize( pCrop->GetLeft()), eUnit );
+ aRightMF.SetValue( aRightMF.Normalize( pCrop->GetRight()), eUnit );
+ aTopMF.SetValue( aTopMF.Normalize( pCrop->GetTop()), eUnit );
+ aBottomMF.SetValue( aBottomMF.Normalize( pCrop->GetBottom()), eUnit );
+ }
+ else
+ {
+ aLeftMF.SetValue( 0 );
+ aRightMF.SetValue( 0 );
+ aTopMF.SetValue( 0 );
+ aBottomMF.SetValue( 0 );
+ }
+
+ nW = rPool.GetWhich( SID_ATTR_PAGE_SIZE );
+ if ( SFX_ITEM_SET == rSet.GetItemState( nW, FALSE, &pItem ) )
+ {
+ // Orientation und Size aus dem PageItem
+ FieldUnit eUnit = MapToFieldUnit( rSet.GetPool()->GetMetric( nW ));
+
+ aPageSize = ((const SvxSizeItem*)pItem)->GetSize();
+
+ long nTmp = aHeightMF.Normalize(aPageSize.Height());
+ aHeightMF.SetMax( nTmp, eUnit );
+ nTmp = aWidthMF.Normalize(aPageSize.Width());
+ aWidthMF.SetMax( nTmp, eUnit );
+ nTmp = aWidthMF.Normalize( 23 );
+ aHeightMF.SetMin( nTmp, eUnit );
+ aWidthMF.SetMin( nTmp, eUnit );
+ }
+ else
+ {
+ aPageSize = OutputDevice::LogicToLogic(
+ Size( CM_1_TO_TWIP, CM_1_TO_TWIP ),
+ MapMode( MAP_TWIP ),
+ MapMode( (MapUnit)rSet.GetPool()->GetMetric( nW ) ) );
+ }
+
+ BOOL bFound = FALSE;
+ if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_GRAF_GRAPHIC, FALSE, &pItem ) )
+ {
+ const Graphic* pGrf = ((SvxBrushItem*)pItem)->GetGraphic();
+ if( pGrf )
+ aOrigSize = GetGrfOrigSize( *pGrf );
+
+ if( aOrigSize.Width() && aOrigSize.Height() )
+ {
+ CalcMinMaxBorder();
+ aExampleWN.SetGraphic( *pGrf );
+ aExampleWN.SetFrameSize( aOrigSize );
+
+ bFound = TRUE;
+ if( ((SvxBrushItem*)pItem)->GetGraphicLink() )
+ aGraphicName = *((SvxBrushItem*)pItem)->GetGraphicLink();
+ }
+ }
+
+ GraphicHasChanged( bFound );
+ bReset = TRUE;
+ ActivatePage( rSet );
+ bReset = FALSE;
+}
+
+/*--------------------------------------------------------------------
+ Beschreibung:
+ --------------------------------------------------------------------*/
+
+BOOL SvxGrfCropPage::FillItemSet(SfxItemSet &rSet)
+{
+ const SfxItemPool& rPool = *rSet.GetPool();
+ BOOL bModified = FALSE;
+ if( aWidthMF.GetSavedValue() != aWidthMF.GetText() ||
+ aHeightMF.GetSavedValue() != aHeightMF.GetText() )
+ {
+ USHORT nW = rPool.GetWhich( SID_ATTR_GRAF_FRMSIZE );
+ FieldUnit eUnit = MapToFieldUnit( rSet.GetPool()->GetMetric( nW ));
+
+ SvxSizeItem aSz( nW );
+
+ // die Groesse koennte schon von einer anderen Page gesetzt worden sein
+ // #44204#
+ const SfxItemSet* pExSet = GetTabDialog()->GetExampleSet();
+ const SfxPoolItem* pItem = 0;
+ if( pExSet && SFX_ITEM_SET ==
+ pExSet->GetItemState( nW, FALSE, &pItem ) )
+ aSz = *(const SvxSizeItem*)pItem;
+ else
+ aSz = (const SvxSizeItem&)GetItemSet().Get( nW );
+
+ Size aTmpSz( aSz.GetSize() );
+ if( aWidthMF.GetText() != aWidthMF.GetSavedValue() )
+ aTmpSz.Width() = lcl_GetValue( aWidthMF, eUnit );
+ if( aHeightMF.GetText() != aHeightMF.GetSavedValue() )
+ aTmpSz.Height() = lcl_GetValue( aHeightMF, eUnit );
+ aSz.SetSize( aTmpSz );
+ aWidthMF.SaveValue();
+ aHeightMF.SaveValue();
+
+ bModified |= 0 != rSet.Put( aSz );
+
+ if( bSetOrigSize )
+ {
+ bModified |= 0 != rSet.Put( SvxSizeItem( rPool.GetWhich(
+ SID_ATTR_GRAF_FRMSIZE_PERCENT ), Size( 0, 0 )) );
+ }
+ }
+ if( aLeftMF.IsModified() || aRightMF.IsModified() ||
+ aTopMF.IsModified() || aBottomMF.IsModified() )
+ {
+ USHORT nW = rPool.GetWhich( SID_ATTR_GRAF_CROP );
+ FieldUnit eUnit = MapToFieldUnit( rSet.GetPool()->GetMetric( nW ));
+ SvxGrfCrop* pNew = (SvxGrfCrop*)rSet.Get( nW ).Clone();
+
+ pNew->SetLeft( lcl_GetValue( aLeftMF, eUnit ) );
+ pNew->SetRight( lcl_GetValue( aRightMF, eUnit ) );
+ pNew->SetTop( lcl_GetValue( aTopMF, eUnit ) );
+ pNew->SetBottom( lcl_GetValue( aBottomMF, eUnit ) );
+ bModified |= 0 != rSet.Put( *pNew );
+ delete pNew;
+ }
+
+ if( aZoomConstRB.GetSavedValue() != aZoomConstRB.IsChecked() )
+ {
+ bModified |= 0 != rSet.Put( SfxBoolItem( rPool.GetWhich(
+ SID_ATTR_GRAF_KEEP_ZOOM), aZoomConstRB.IsChecked() ) );
+ }
+
+ bInitialized = FALSE;
+
+ return bModified;
+}
+
+/*--------------------------------------------------------------------
+ Beschreibung:
+ --------------------------------------------------------------------*/
+
+void SvxGrfCropPage::ActivatePage(const SfxItemSet& rSet)
+{
+ SfxItemPool* pPool = GetItemSet().GetPool();
+ DBG_ASSERT( pPool, "Wo ist der Pool" );
+ FieldUnit eUnit = MapToFieldUnit( pPool->GetMetric( pPool->GetWhich(
+ SID_ATTR_GRAF_CROP ) ) );
+
+ bSetOrigSize = FALSE;
+ // Size
+ const Size& rSize = ((const SvxSizeItem&)rSet.Get(
+ SID_ATTR_GRAF_FRMSIZE)).GetSize();
+ nOldWidth = rSize.Width();
+ nOldHeight = rSize.Height();
+
+ long nWidth = aWidthMF.Normalize(nOldWidth);
+ long nHeight = aHeightMF.Normalize(nOldHeight);
+
+ if (nWidth != aWidthMF.GetValue(FUNIT_TWIP))
+ {
+ if(!bReset)
+ {
+ // Wert wurde von Umlauf-Tabpage geaendert und muss
+ // mit Modify-Flag gesetzt werden
+ aWidthMF.SetUserValue(nWidth, FUNIT_TWIP);
+ }
+ else
+ aWidthMF.SetValue(nWidth, FUNIT_TWIP);
+ }
+ aWidthMF.SaveValue();
+
+ if (nHeight != aHeightMF.GetValue(FUNIT_TWIP))
+ {
+ if (!bReset)
+ {
+ // Wert wurde von Umlauf-Tabpage geaendert und muss
+ // mit Modify-Flag gesetzt werden
+ aHeightMF.SetUserValue(nHeight, FUNIT_TWIP);
+ }
+ else
+ aHeightMF.SetValue(nHeight, FUNIT_TWIP);
+ }
+ aHeightMF.SaveValue();
+ bInitialized = TRUE;
+
+ const SfxPoolItem* pItem;
+ if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_GRAF_GRAPHIC, FALSE, &pItem ) )
+ {
+ const SvxBrushItem& rBrush = *(SvxBrushItem*)pItem;
+ if( rBrush.GetGraphicLink() &&
+ aGraphicName != *rBrush.GetGraphicLink() )
+ aGraphicName = *rBrush.GetGraphicLink();
+
+ const Graphic* pGrf = rBrush.GetGraphic();
+ if( pGrf )
+ {
+ aExampleWN.SetGraphic( *pGrf );
+ aOrigSize = GetGrfOrigSize( *pGrf );
+ aExampleWN.SetFrameSize(aOrigSize);
+ GraphicHasChanged( TRUE );
+ CalcMinMaxBorder();
+ }
+ else
+ GraphicHasChanged( FALSE );
+ }
+
+ CalcZoom();
+}
+
+/*--------------------------------------------------------------------
+ Beschreibung:
+ --------------------------------------------------------------------*/
+
+int SvxGrfCropPage::DeactivatePage(SfxItemSet *pSet)
+{
+ if ( pSet )
+ FillItemSet( *pSet );
+ return TRUE;
+}
+
+/*--------------------------------------------------------------------
+ Beschreibung: Massstab geaendert, Groesse anpassen
+ --------------------------------------------------------------------*/
+
+IMPL_LINK( SvxGrfCropPage, ZoomHdl, MetricField *, pField )
+{
+ SfxItemPool* pPool = GetItemSet().GetPool();
+ DBG_ASSERT( pPool, "Wo ist der Pool" );
+ FieldUnit eUnit = MapToFieldUnit( pPool->GetMetric( pPool->GetWhich(
+ SID_ATTR_GRAF_CROP ) ) );
+
+ if( pField == &aWidthZoomMF )
+ {
+ long nLRBorders = lcl_GetValue(aLeftMF, eUnit)
+ +lcl_GetValue(aRightMF, eUnit);
+ aWidthMF.SetValue( aWidthMF.Normalize(
+ ((aOrigSize.Width() - nLRBorders) * pField->GetValue())/100L),
+ eUnit);
+ }
+ else
+ {
+ long nULBorders = lcl_GetValue(aTopMF, eUnit)
+ +lcl_GetValue(aBottomMF, eUnit);
+ aHeightMF.SetValue( aHeightMF.Normalize(
+ ((aOrigSize.Height() - nULBorders ) * pField->GetValue())/100L) ,
+ eUnit );
+ }
+
+ return 0;
+}
+
+/*--------------------------------------------------------------------
+ Beschreibung: Groesse aendern, Massstab anpassen
+ --------------------------------------------------------------------*/
+
+IMPL_LINK( SvxGrfCropPage, SizeHdl, MetricField *, pField )
+{
+ SfxItemPool* pPool = GetItemSet().GetPool();
+ DBG_ASSERT( pPool, "Wo ist der Pool" );
+ FieldUnit eUnit = MapToFieldUnit( pPool->GetMetric( pPool->GetWhich(
+ SID_ATTR_GRAF_CROP ) ) );
+
+ Size aSize( lcl_GetValue(aWidthMF, eUnit),
+ lcl_GetValue(aHeightMF, eUnit) );
+
+ if(pField == &aWidthMF)
+ {
+ long nWidth = aOrigSize.Width() -
+ ( lcl_GetValue(aLeftMF, eUnit) +
+ lcl_GetValue(aRightMF, eUnit) );
+ if(!nWidth)
+ nWidth++;
+ USHORT nZoom = (USHORT)( aSize.Width() * 100L / nWidth);
+ aWidthZoomMF.SetValue(nZoom);
+ }
+ else
+ {
+ long nHeight = aOrigSize.Height() -
+ ( lcl_GetValue(aTopMF, eUnit) +
+ lcl_GetValue(aBottomMF, eUnit));
+ if(!nHeight)
+ nHeight++;
+ USHORT nZoom = (USHORT)( aSize.Height() * 100L/ nHeight);
+ aHeightZoomMF.SetValue(nZoom);
+ }
+
+ return 0;
+}
+
+/*--------------------------------------------------------------------
+ Beschreibung: Raender auswerten
+ --------------------------------------------------------------------*/
+
+IMPL_LINK( SvxGrfCropPage, CropHdl, const MetricField *, pField )
+{
+ SfxItemPool* pPool = GetItemSet().GetPool();
+ DBG_ASSERT( pPool, "Wo ist der Pool" );
+ FieldUnit eUnit = MapToFieldUnit( pPool->GetMetric( pPool->GetWhich(
+ SID_ATTR_GRAF_CROP ) ) );
+
+ BOOL bZoom = aZoomConstRB.IsChecked();
+ if( pField == &aLeftMF || pField == &aRightMF )
+ {
+ long nLeft = lcl_GetValue( aLeftMF, eUnit );
+ long nRight = lcl_GetValue( aRightMF, eUnit );
+ long nWidthZoom = aWidthZoomMF.GetValue();
+ if(bZoom && ( ( ( aOrigSize.Width() - (nLeft + nRight )) * nWidthZoom )
+ / 100 >= aPageSize.Width() ) )
+ {
+ if(pField == &aLeftMF)
+ {
+// nLeft = aPageSize.Width() -
+// ((nRight + aOrigSize.Width()) * nWidthZoom) / 100;
+ nLeft = aOrigSize.Width() -
+ ( aPageSize.Width() * 100 / nWidthZoom + nRight );
+ aLeftMF.SetValue( aLeftMF.Normalize( nLeft ), eUnit );
+ }
+ else
+ {
+// nRight = aPageSize.Width() -
+// ((nLeft - aOrigSize.Width()) * nWidthZoom) / 100;
+ nRight = aOrigSize.Width() -
+ ( aPageSize.Width() * 100 / nWidthZoom + nLeft );
+ aRightMF.SetValue( aRightMF.Normalize( nRight ), eUnit );
+ }
+ }
+ aExampleWN.SetLeft(nLeft);
+ aExampleWN.SetRight(nRight);
+ if(bZoom)
+ {
+ //Massstab bleibt -> Breite neu berechnen
+ ZoomHdl(&aWidthZoomMF);
+ }
+ }
+ else
+ {
+ long nTop = lcl_GetValue( aTopMF, eUnit );
+ long nBottom = lcl_GetValue( aBottomMF, eUnit );
+ long nHeightZoom = aHeightZoomMF.GetValue();
+ if(bZoom && ( ( ( aOrigSize.Height() - (nTop + nBottom )) * nHeightZoom)
+ / 100 >= aPageSize.Height()))
+ {
+ if(pField == &aTopMF)
+ {
+// nTop = aPageSize.Height() -
+// ((aOrigSize.Height() - nBottom) * nHeightZoom)/ 100;
+ nTop = aOrigSize.Height() -
+ ( aPageSize.Height() * 100 / nHeightZoom + nBottom);
+ aTopMF.SetValue( aWidthMF.Normalize( nTop ), eUnit );
+ }
+ else
+ {
+// nBottom = aPageSize.Height() -
+// ((aOrigSize.Height() - nTop)*nHeightZoom) / 100;
+ nBottom = aOrigSize.Height() -
+ ( aPageSize.Height() * 100 / nHeightZoom + nTop);
+ aBottomMF.SetValue( aWidthMF.Normalize( nBottom ), eUnit );
+ }
+ }
+ aExampleWN.SetTop( nTop );
+ aExampleWN.SetBottom( nBottom );
+ if(bZoom)
+ {
+ //Massstab bleibt -> Hoehe neu berechnen
+ ZoomHdl(&aHeightZoomMF);
+ }
+ }
+ aExampleWN.Invalidate();
+ //Groesse und Raender veraendert -> Massstab neu berechnen
+ if(!bZoom)
+ CalcZoom();
+ CalcMinMaxBorder();
+ return 0;
+}
+/*--------------------------------------------------------------------
+ Beschreibung: Originalgroesse einstellen
+ --------------------------------------------------------------------*/
+
+IMPL_LINK( SvxGrfCropPage, OrigSizeHdl, PushButton *, EMPTYARG )
+{
+ SfxItemPool* pPool = GetItemSet().GetPool();
+ DBG_ASSERT( pPool, "Wo ist der Pool" );
+ FieldUnit eUnit = MapToFieldUnit( pPool->GetMetric( pPool->GetWhich(
+ SID_ATTR_GRAF_CROP ) ) );
+
+ long nWidth = aOrigSize.Width() +
+ lcl_GetValue( aLeftMF, eUnit ) +
+ lcl_GetValue( aRightMF, eUnit );
+ aWidthMF.SetValue( aWidthMF.Normalize( nWidth ), eUnit );
+ long nHeight = aOrigSize.Height() +
+ lcl_GetValue( aTopMF, eUnit ) +
+ lcl_GetValue( aBottomMF, eUnit );
+ aHeightMF.SetValue( aHeightMF.Normalize( nHeight ), eUnit );
+ aWidthZoomMF.SetValue(100);
+ aHeightZoomMF.SetValue(100);
+ bSetOrigSize = TRUE;
+ return 0;
+}
+/*--------------------------------------------------------------------
+ Beschreibung: Massstab berechnen
+ --------------------------------------------------------------------*/
+
+void SvxGrfCropPage::CalcZoom()
+{
+ SfxItemPool* pPool = GetItemSet().GetPool();
+ DBG_ASSERT( pPool, "Wo ist der Pool" );
+ FieldUnit eUnit = MapToFieldUnit( pPool->GetMetric( pPool->GetWhich(
+ SID_ATTR_GRAF_CROP ) ) );
+
+ long nWidth = lcl_GetValue( aWidthMF, eUnit );
+ long nHeight = lcl_GetValue( aHeightMF, eUnit );
+ long nLRBorders = lcl_GetValue( aLeftMF, eUnit ) +
+ lcl_GetValue( aRightMF, eUnit );
+ long nULBorders = lcl_GetValue( aTopMF, eUnit ) +
+ lcl_GetValue( aBottomMF, eUnit );
+ USHORT nZoom = 0;
+ long nDen;
+ if( (nDen = aOrigSize.Width() - nLRBorders) > 0)
+ nZoom = (USHORT)((( nWidth * 1000L / nDen )+5)/10);
+ aWidthZoomMF.SetValue(nZoom);
+ if( (nDen = aOrigSize.Height() - nULBorders) > 0)
+ nZoom = (USHORT)((( nHeight * 1000L / nDen )+5)/10);
+ else
+ nZoom = 0;
+ aHeightZoomMF.SetValue(nZoom);
+}
+
+/*--------------------------------------------------------------------
+ Beschreibung: Minimal-/Maximalwerte fuer die Raender setzen
+ --------------------------------------------------------------------*/
+
+void SvxGrfCropPage::CalcMinMaxBorder()
+{
+ SfxItemPool* pPool = GetItemSet().GetPool();
+ DBG_ASSERT( pPool, "Wo ist der Pool" );
+ FieldUnit eUnit = MapToFieldUnit( pPool->GetMetric( pPool->GetWhich(
+ SID_ATTR_GRAF_CROP ) ) );
+ long nR = lcl_GetValue(aRightMF, eUnit );
+ long nMinWidth = (aOrigSize.Width() * 10) /11;
+ long nMin = nMinWidth - (nR >= 0 ? nR : 0);
+ aLeftMF.SetMax( aLeftMF.Normalize(nMin), eUnit );
+
+ long nL = lcl_GetValue(aLeftMF, eUnit );
+ nMin = nMinWidth - (nL >= 0 ? nL : 0);
+ aRightMF.SetMax( aRightMF.Normalize(nMin), eUnit );
+
+ // Zoom nicht unter 2%
+/* nMin = (aOrigSize.Width() * 102) /100;
+ aLeftMF.SetMax(aPageSize.Width() - nR - nMin);
+ aRightMF.SetMax(aPageSize.Width() - nL - nMin);
+*/
+ long nUp = lcl_GetValue( aTopMF, eUnit );
+ long nMinHeight = (aOrigSize.Height() * 10) /11;
+ nMin = nMinHeight - (nUp >= 0 ? nUp : 0);
+ aBottomMF.SetMax( aBottomMF.Normalize(nMin), eUnit );
+
+ long nLow = lcl_GetValue(aBottomMF, eUnit );
+ nMin = nMinHeight - (nLow >= 0 ? nLow : 0);
+ aTopMF.SetMax( aTopMF.Normalize(nMin), eUnit );
+
+ // Zoom nicht unter 2%
+/* nMin = (aOrigSize.Height() * 102) /100;
+ aTopMF.SetMax(aPageSize.Height() - nLow - nMin);
+ aBottomMF.SetMax(aPageSize.Height() - nUp - nMin);*/
+}
+/*--------------------------------------------------------------------
+ Beschreibung: Spinsize auf 1/20 der Originalgroesse setzen,
+ FixedText mit der Originalgroesse fuellen
+ --------------------------------------------------------------------*/
+
+void SvxGrfCropPage::GraphicHasChanged( BOOL bFound )
+{
+ if( bFound )
+ {
+ SfxItemPool* pPool = GetItemSet().GetPool();
+ DBG_ASSERT( pPool, "Wo ist der Pool" );
+ FieldUnit eUnit = MapToFieldUnit( pPool->GetMetric( pPool->GetWhich(
+ SID_ATTR_GRAF_CROP ) ));
+
+ long nSpin = aLeftMF.Normalize(aOrigSize.Width()) / 20;
+ nSpin = MetricField::ConvertValue( nSpin, aOrigSize.Width(), 0,
+ eUnit, aLeftMF.GetUnit());
+
+ // Ist der Rand zu gross, wird er auf beiden Seiten auf 1/3 eingestellt.
+ long nR = lcl_GetValue( aRightMF, eUnit );
+ long nL = lcl_GetValue( aLeftMF, eUnit );
+ if((nL + nR) < - aOrigSize.Width())
+ {
+ long nVal = aOrigSize.Width() / -3;
+ aRightMF.SetValue( aRightMF.Normalize( nVal ), eUnit );
+ aLeftMF.SetValue( aLeftMF.Normalize( nVal ), eUnit );
+ aExampleWN.SetLeft(nVal);
+ aExampleWN.SetRight(nVal);
+ }
+ long nUp = lcl_GetValue(aTopMF, eUnit );
+ long nLow = lcl_GetValue(aBottomMF, eUnit );
+ if((nUp + nLow) < - aOrigSize.Height())
+ {
+ long nVal = aOrigSize.Height() / -3;
+ aTopMF.SetValue( aTopMF.Normalize( nVal ), eUnit );
+ aBottomMF.SetValue( aBottomMF.Normalize( nVal ), eUnit );
+ aExampleWN.SetTop(nVal);
+ aExampleWN.SetBottom(nVal);
+ }
+
+ aLeftMF.SetSpinSize(nSpin);
+ aRightMF.SetSpinSize(nSpin);
+ nSpin = aTopMF.Normalize(aOrigSize.Height()) / 20;
+ nSpin = MetricField::ConvertValue( nSpin, aOrigSize.Width(), 0,
+ eUnit, aLeftMF.GetUnit() );
+ aTopMF.SetSpinSize(nSpin);
+ aBottomMF.SetSpinSize(nSpin);
+
+ //Originalgroesse anzeigen
+ FieldUnit aMetric;
+ GET_MODULE_FIELDUNIT( aMetric );
+
+ MetricField aFld(this, WB_HIDE);
+ SetFieldUnit( aFld, aMetric );
+ aFld.SetDecimalDigits( aWidthMF.GetDecimalDigits() );
+ aFld.SetMax( LONG_MAX - 1 );
+
+ aFld.SetValue( aFld.Normalize( aOrigSize.Width() ), eUnit );
+ String sTemp = aFld.GetText();
+ aFld.SetValue( aFld.Normalize( aOrigSize.Height() ), eUnit );
+ sTemp += UniString::CreateFromAscii(" x ");
+ sTemp += aFld.GetText();
+ long nXSize = aOrigSizeFT.GetTextWidth( sTemp );
+ long nXPos = aOrigSizePB.GetPosPixel().X() + aOrigSizePB.GetSizePixel().Width()/2;
+ nXPos -= (nXSize/2);
+ Point aTxtPos(aOrigSizeFT.GetPosPixel());
+ aTxtPos.X() = nXPos;
+ aOrigSizeFT.SetPosPixel(aTxtPos);
+ aOrigSizeFT.SetText(sTemp);
+ }
+ aLeftFT .Enable(bFound);
+ aLeftMF .Enable(bFound);
+ aRightFT .Enable(bFound);
+ aRightMF .Enable(bFound);
+ aTopFT .Enable(bFound);
+ aTopMF .Enable(bFound);
+ aBottomFT .Enable(bFound);
+ aBottomMF .Enable(bFound);
+ aSizeConstRB .Enable(bFound);
+ aZoomConstRB .Enable(bFound);
+ aWidthFT .Enable(bFound);
+ aWidthMF .Enable(bFound);
+ aHeightFT .Enable(bFound);
+ aHeightMF .Enable(bFound);
+ aWidthZoomFT .Enable(bFound);
+ aWidthZoomMF .Enable(bFound);
+ aHeightZoomFT .Enable(bFound);
+ aHeightZoomMF .Enable(bFound);
+ aExampleWN .Enable(bFound);
+ aOrigSizePB .Enable(bFound);
+ aOrigSizeFT .Enable(bFound);
+}
+
+IMPL_LINK( SvxGrfCropPage, Timeout, Timer *, EMPTYARG )
+{
+ DBG_ASSERT(pLastCropField,"Timeout ohne Feld?")
+ CropHdl(pLastCropField);
+ pLastCropField = 0;
+ return 0;
+}
+
+
+IMPL_LINK( SvxGrfCropPage, CropLoseFocusHdl, MetricField*, pField )
+{
+ aTimer.Stop();
+ CropHdl(pField);
+ pLastCropField = 0;
+ return 0;
+}
+
+
+IMPL_LINK( SvxGrfCropPage, CropModifyHdl, MetricField *, pField )
+{
+ aTimer.Start();
+ pLastCropField = pField;
+ return 0;
+}
+
+Size SvxGrfCropPage::GetGrfOrigSize( const Graphic& rGrf ) const
+{
+ const MapMode aMapTwip( MAP_TWIP );
+ Size aSize( rGrf.GetPrefSize() );
+ if( MAP_PIXEL == rGrf.GetPrefMapMode().GetMapUnit() )
+ aSize = PixelToLogic( aSize, aMapTwip );
+ else
+ aSize = OutputDevice::LogicToLogic( aSize,
+ rGrf.GetPrefMapMode(), aMapTwip );
+ return aSize;
+}
+
+/*****************************************************************/
+
+SvxGrfCropPage::SvxCropExample::SvxCropExample( Window* pPar,
+ const ResId& rResId )
+ : Window( pPar, rResId ),
+ aTopLeft(0,0), aBottomRight(0,0),
+ aFrameSize( OutputDevice::LogicToLogic(
+ Size( CM_1_TO_TWIP / 2, CM_1_TO_TWIP / 2 ),
+ MapMode( MAP_TWIP ), GetMapMode() ))
+
+{
+}
+
+void SvxGrfCropPage::SvxCropExample::Paint( const Rectangle& rRect )
+{
+ Size aWinSize( PixelToLogic(GetOutputSizePixel() ));
+ SetLineColor( Color( COL_GRAY ));
+ Rectangle aRect(Point((aWinSize.Width() - aFrameSize.Width())/2,
+ (aWinSize.Height() - aFrameSize.Height())/2),
+ aFrameSize );
+ SetRasterOp( ROP_OVERPAINT );
+ aGrf.Draw( this, aRect.TopLeft(), aRect.GetSize() );
+
+ Size aSz( 2, 0 );
+ aSz = PixelToLogic( aSz );
+ SetFillColor( Color( COL_TRANSPARENT ) );
+ SetRasterOp( ROP_INVERT );
+ aRect.Left() += aTopLeft.Y();
+ aRect.Top() += aTopLeft.X();
+ aRect.Right() -= aBottomRight.Y();
+ aRect.Bottom() -= aBottomRight.X();
+ DrawRect( aRect );
+}
+
+void SvxGrfCropPage::SvxCropExample::SetFrameSize( const Size& rSz )
+{
+ aFrameSize = rSz;
+ Size aWinSize( GetOutputSizePixel() );
+ Fraction aXScale( aWinSize.Width() * 4, aFrameSize.Width() * 5 );
+ Fraction aYScale( aWinSize.Height() * 4, aFrameSize.Height() * 5 );
+
+ if( aYScale < aXScale )
+ aXScale = aYScale;
+
+ MapMode aMapMode( GetMapMode() );
+
+ aMapMode.SetScaleX( aXScale );
+ aMapMode.SetScaleY( aXScale );
+
+ SetMapMode( aMapMode );
+ Invalidate();
+}
+
+
+
+
diff --git a/svx/source/dialog/grfpage.hrc b/svx/source/dialog/grfpage.hrc
new file mode 100644
index 000000000000..f996af6db724
--- /dev/null
+++ b/svx/source/dialog/grfpage.hrc
@@ -0,0 +1,88 @@
+/*************************************************************************
+ *
+ * $RCSfile: grfpage.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:08 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#define FT_BOTTOM 1
+#define FT_HEIGHT 2
+#define FT_HEIGHTZOOM 3
+#define FT_LEFT 4
+#define FT_ORIG_SIZE 5
+#define FT_RIGHT 6
+#define FT_TOP 7
+#define FT_WIDTH 8
+#define FT_WIDTHZOOM 9
+#define GB_CROP 10
+#define GB_EXAMPLE 11
+#define GB_SIZE 12
+#define GB_ZOOM 13
+#define MF_BOTTOM 14
+#define MF_HEIGHT 15
+#define MF_HEIGHTZOOM 16
+#define MF_LEFT 17
+#define MF_RIGHT 18
+#define MF_TOP 19
+#define MF_WIDTH 20
+#define MF_WIDTHZOOM 21
+#define PB_ORGSIZE 22
+#define RB_SIZECONST 23
+#define RB_ZOOMCONST 24
+#define WN_BSP 25
+
+
diff --git a/svx/source/dialog/grfpage.hxx b/svx/source/dialog/grfpage.hxx
new file mode 100644
index 000000000000..d4ec511cb021
--- /dev/null
+++ b/svx/source/dialog/grfpage.hxx
@@ -0,0 +1,180 @@
+/*************************************************************************
+ *
+ * $RCSfile: grfpage.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:08 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _SVX_GRFPAGE_HXX
+#define _SVX_GRFPAGE_HXX
+
+#ifndef _FIXED_HXX //autogen
+#include <vcl/fixed.hxx>
+#endif
+#ifndef _BUTTON_HXX //autogen
+#include <vcl/button.hxx>
+#endif
+#ifndef _GROUP_HXX //autogen
+#include <vcl/group.hxx>
+#endif
+#ifndef _FIELD_HXX //autogen
+#include <vcl/field.hxx>
+#endif
+#ifndef _SV_GRAPH_HXX //autogen
+#include <vcl/graph.hxx>
+#endif
+
+#ifndef _SFXTABDLG_HXX //autogen
+#include <sfx2/tabdlg.hxx>
+#endif
+
+
+class SvxGrfCropPage : public SfxTabPage
+{
+ class SvxCropExample : public Window
+ {
+ Size aFrameSize;
+ Point aTopLeft, aBottomRight;
+ Graphic aGrf;
+
+ public:
+ SvxCropExample( Window* pPar, const ResId& rResId );
+
+ virtual void Paint( const Rectangle& rRect );
+
+ void SetTopLeft( const Point& rNew ) { aTopLeft = rNew; }
+ void SetTop( long nVal ) { aTopLeft.X() = nVal; }
+ void SetBottom( long nVal ) { aBottomRight.X() = nVal; }
+ void SetLeft( long nVal ) { aTopLeft.Y() = nVal; }
+ void SetRight( long nVal) { aBottomRight.Y() = nVal; }
+ void SetBottomRight(const Point& rNew ) { aBottomRight = rNew; }
+ void SetFrameSize( const Size& rSz );
+ void SetGraphic( const Graphic& rGrf ) { aGrf = rGrf; }
+ const Graphic& GetGraphic() const { return aGrf; }
+ };
+
+
+ GroupBox aCropGB;
+ FixedText aLeftFT;
+ MetricField aLeftMF;
+ FixedText aRightFT;
+ MetricField aRightMF;
+ FixedText aTopFT;
+ MetricField aTopMF;
+ FixedText aBottomFT;
+ MetricField aBottomMF;
+ RadioButton aSizeConstRB;
+ RadioButton aZoomConstRB;
+
+ GroupBox aSizeGB;
+ FixedText aWidthFT;
+ MetricField aWidthMF;
+ FixedText aHeightFT;
+ MetricField aHeightMF;
+
+ GroupBox aZoomGB;
+ FixedText aWidthZoomFT;
+ MetricField aWidthZoomMF;
+ FixedText aHeightZoomFT;
+ MetricField aHeightZoomMF;
+
+ // Example
+ SvxCropExample aExampleWN;
+ GroupBox aExampleGB;
+
+ FixedText aOrigSizeFT;
+ PushButton aOrigSizePB;
+
+ Timer aTimer;
+ String aGraphicName;
+ Size aOrigSize;
+ Size aPageSize;
+ const MetricField* pLastCropField;
+ long nOldWidth;
+ long nOldHeight;
+ BOOL bReset;
+ BOOL bInitialized;
+ BOOL bSetOrigSize;
+
+
+ SvxGrfCropPage( Window *pParent, const SfxItemSet &rSet );
+ virtual ~SvxGrfCropPage();
+
+ DECL_LINK( ZoomHdl, MetricField * );
+ DECL_LINK( SizeHdl, MetricField * );
+ DECL_LINK( CropHdl, const MetricField * );
+ DECL_LINK( CropLoseFocusHdl, MetricField * );
+ DECL_LINK( CropModifyHdl, MetricField * );
+ DECL_LINK( OrigSizeHdl, PushButton * );
+ DECL_LINK( Timeout, Timer * );
+
+ void CalcZoom();
+ void CalcMinMaxBorder();
+ void GraphicHasChanged(BOOL bFound);
+ virtual void ActivatePage(const SfxItemSet& rSet);
+
+ Size GetGrfOrigSize( const Graphic& ) const;
+public:
+ static SfxTabPage *Create( Window *pParent, const SfxItemSet &rSet );
+
+ virtual BOOL FillItemSet( SfxItemSet &rSet );
+ virtual void Reset( const SfxItemSet &rSet );
+ virtual int DeactivatePage( SfxItemSet *pSet );
+};
+
+
+#endif
diff --git a/svx/source/dialog/grfpage.src b/svx/source/dialog/grfpage.src
new file mode 100644
index 000000000000..dd461425bfcf
--- /dev/null
+++ b/svx/source/dialog/grfpage.src
@@ -0,0 +1,639 @@
+/*************************************************************************
+ *
+ * $RCSfile: grfpage.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:08 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include "dialogs.hrc"
+#include "helpid.hrc"
+#include "grfpage.hrc"
+
+#define GB_SIZE_LEFT 6
+#define GB_SIZE_TOP 81
+
+#define GB_ZOOM_LEFT 91
+#define GB_ZOOM_TOP 81
+
+#define GB_CROP_LEFT 6
+#define GB_CROP_TOP 3
+
+/************************************************************/
+/* */
+/* */
+/* Crop-Page */
+/* */
+/* */
+/************************************************************/
+TabPage RID_SVXPAGE_GRFCROP
+{
+ Hide = TRUE ;
+ HelpID = HID_SVXPAGE_GRFCROP;
+ SVLook = TRUE ;
+ Pos = MAP_APPFONT ( 0 , 0 ) ;
+ Size = MAP_APPFONT ( 260 , 135 ) ;
+ GroupBox GB_SIZE
+ {
+ Pos = MAP_APPFONT ( GB_SIZE_LEFT , GB_SIZE_TOP ) ;
+ Size = MAP_APPFONT ( 79 , 48 ) ;
+ Text = "Gre" ;
+ Text [ ENGLISH ] = "Size" ;
+ Text [ norwegian ] = "Strrelse" ;
+ Text [ italian ] = "Dimensione" ;
+ Text [ portuguese_brazilian ] = "Tamanho" ;
+ Text [ portuguese ] = "Tamanho" ;
+ Text [ finnish ] = "Koko" ;
+ Text [ danish ] = "Strrelse" ;
+ Text [ french ] = "Taille" ;
+ Text [ swedish ] = "Storlek" ;
+ Text [ dutch ] = "Grootte" ;
+ Text [ spanish ] = "Tamao" ;
+ Text [ english_us ] = "Size" ;
+ Text[ chinese_simplified ] = "С";
+ Text[ russian ] = "";
+ Text[ polish ] = "Rozmiar";
+ Text[ japanese ] = "";
+ Text[ chinese_traditional ] = "jp";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "ũ";
+ Text[ turkish ] = "Boyut";
+ };
+ FixedText FT_WIDTH
+ {
+ Pos = MAP_APPFONT ( GB_SIZE_LEFT + 6 , GB_SIZE_TOP + 12 ) ;
+ Size = MAP_APPFONT ( 21 , 8 ) ;
+ Left = TRUE ;
+ Text = "~Breite" ;
+ Text [ ENGLISH ] = "~Width" ;
+ Text [ norwegian ] = "~Bredde" ;
+ Text [ italian ] = "~Largh." ;
+ Text [ portuguese_brazilian ] = "~Largura" ;
+ Text [ portuguese ] = "~Largura" ;
+ Text [ finnish ] = "~Leveys" ;
+ Text [ danish ] = "Bredde" ;
+ Text [ french ] = "~Largeur" ;
+ Text [ swedish ] = "~Bredd" ;
+ Text [ dutch ] = "B~reedte" ;
+ Text [ spanish ] = "A~ncho" ;
+ Text [ english_us ] = "~Width" ;
+ Text[ chinese_simplified ] = "(~W)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Szer.";
+ Text[ japanese ] = "(~W)";
+ Text[ chinese_traditional ] = "e(~W)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "ʺ(~W)";
+ Text[ turkish ] = "~Genilik";
+ };
+ MetricField MF_WIDTH
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( GB_SIZE_LEFT + 32 , GB_SIZE_TOP + 10 ) ;
+ Size = MAP_APPFONT ( 40 , 12 ) ;
+ Text = "12,99" ;
+ TabStop = TRUE ;
+ Left = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = 5 ;
+ Maximum = 9999 ;
+ DecimalDigits = 2 ;
+ Unit = FUNIT_CM ;
+ First = 5 ;
+ Last = 9999 ;
+ SpinSize = 10 ;
+ };
+ FixedText FT_HEIGHT
+ {
+ Pos = MAP_APPFONT ( GB_SIZE_LEFT + 6 , GB_SIZE_TOP + 29 ) ;
+ Size = MAP_APPFONT ( 21 , 12 ) ;
+ Left = TRUE ;
+ Text = "Hh~e" ;
+ Text [ ENGLISH ] = "H~eight" ;
+ Text [ norwegian ] = "H~eight" ;
+ Text [ italian ] = "Altezza" ;
+ Text [ portuguese_brazilian ] = "A~ltura" ;
+ Text [ portuguese ] = "A~ltura" ;
+ Text [ finnish ] = "~Korkeus" ;
+ Text [ danish ] = "Hjde" ;
+ Text [ french ] = "~Haut." ;
+ Text [ swedish ] = "H~jd" ;
+ Text [ dutch ] = "H~oogte" ;
+ Text [ spanish ] = "A~ltura" ;
+ Text [ english_us ] = "H~eight" ;
+ Text[ chinese_simplified ] = "߶(~E)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Wys.";
+ Text[ japanese ] = "(~E)";
+ Text[ chinese_traditional ] = "(~E)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "(~E)";
+ Text[ turkish ] = "~Ykseklik";
+ };
+ MetricField MF_HEIGHT
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( GB_SIZE_LEFT + 32 , GB_SIZE_TOP + 27 ) ;
+ Size = MAP_APPFONT ( 40 , 12 ) ;
+ TabStop = TRUE ;
+ Left = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = 5 ;
+ Maximum = 9999 ;
+ DecimalDigits = 2 ;
+ Unit = FUNIT_CM ;
+ First = 5 ;
+ Last = 9999 ;
+ SpinSize = 10 ;
+ };
+ GroupBox GB_ZOOM
+ {
+ Pos = MAP_APPFONT ( GB_ZOOM_LEFT , GB_ZOOM_TOP ) ;
+ Size = MAP_APPFONT ( 79 , 48 ) ;
+ Text = "Mastab" ;
+ Text [ ENGLISH ] = "Zoom" ;
+ Text [ english_us ] = "Scale" ;
+ Text [ italian ] = "Scala" ;
+ Text [ spanish ] = "Escala" ;
+ Text [ french ] = "chelle" ;
+ Text [ dutch ] = "Schaal" ;
+ Text [ swedish ] = "Skala" ;
+ Text [ danish ] = "Mlestok" ;
+ Text [ portuguese_brazilian ] = "Mastab" ;
+ Text [ portuguese ] = "Escala" ;
+ Text[ chinese_simplified ] = "̶";
+ Text[ russian ] = "";
+ Text[ polish ] = "Skala";
+ Text[ japanese ] = "";
+ Text[ chinese_traditional ] = "ܤ";
+ Text[ arabic ] = "/";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "lek";
+ };
+ FixedText FT_WIDTHZOOM
+ {
+ Left = TRUE ;
+ Pos = MAP_APPFONT ( GB_ZOOM_LEFT + 6 , GB_ZOOM_TOP + 12 ) ;
+ Size = MAP_APPFONT ( 21 , 8 ) ;
+ Text = "Bre~ite" ;
+ Text [ ENGLISH ] = "~Width" ;
+ Text [ norwegian ] = "~Bredde" ;
+ Text [ italian ] = "Largh." ;
+ Text [ portuguese_brazilian ] = "~Largura" ;
+ Text [ portuguese ] = "~Largura" ;
+ Text [ finnish ] = "~Leveys" ;
+ Text [ danish ] = "Bredde" ;
+ Text [ french ] = "~Largeur" ;
+ Text [ swedish ] = "Br~edd" ;
+ Text [ dutch ] = "B~reedte" ;
+ Text [ spanish ] = "A~ncho" ;
+ Text [ english_us ] = "~Width" ;
+ Text[ chinese_simplified ] = "(~W)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Szer.";
+ Text[ japanese ] = "(~W)";
+ Text[ chinese_traditional ] = "e(~W)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "ʺ(~W)";
+ Text[ turkish ] = "G~enilik";
+ };
+ MetricField MF_WIDTHZOOM
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( GB_ZOOM_LEFT + 32 , GB_ZOOM_TOP + 10 ) ;
+ Size = MAP_APPFONT ( 40 , 12 ) ;
+ Text = "12,99" ;
+ TabStop = TRUE ;
+ Left = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = 1 ;
+ Maximum = 9999 ;
+ First = 5 ;
+ Last = 1000 ;
+ Maximum = 9999 ;
+ Value = 100 ;
+ Unit = FUNIT_CUSTOM ;
+ CustomUnitText = "%" ;
+ SpinSize = 10 ;
+ };
+ FixedText FT_HEIGHTZOOM
+ {
+ Pos = MAP_APPFONT ( GB_ZOOM_LEFT + 6 , GB_ZOOM_TOP + 29 ) ;
+ Size = MAP_APPFONT ( 21 , 12 ) ;
+ Text = "H~he" ;
+ Text [ ENGLISH ] = "H~eight" ;
+ Text [ norwegian ] = "H~eight" ;
+ Text [ italian ] = "Altezza" ;
+ Text [ portuguese_brazilian ] = "A~ltura" ;
+ Text [ portuguese ] = "A~ltura" ;
+ Text [ finnish ] = "~Korkeus" ;
+ Text [ danish ] = "Hjde" ;
+ Text [ french ] = "~Haut." ;
+ Text [ swedish ] = "H~jd" ;
+ Text [ dutch ] = "H~oogte" ;
+ Text [ spanish ] = "A~ltura" ;
+ Text [ english_us ] = "H~eight" ;
+ Left = TRUE ;
+ Text[ chinese_simplified ] = "(~E)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Wys.";
+ Text[ japanese ] = "(~E)";
+ Text[ chinese_traditional ] = "(~E)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "(~E)";
+ Text[ turkish ] = "Y~kseklik";
+ };
+ MetricField MF_HEIGHTZOOM
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( GB_ZOOM_LEFT + 32 , GB_ZOOM_TOP + 27 ) ;
+ Size = MAP_APPFONT ( 40 , 12 ) ;
+ TabStop = TRUE ;
+ Left = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = 1 ;
+ Maximum = 9999 ;
+ First = 5 ;
+ Last = 1000 ;
+ Maximum = 9999 ;
+ Value = 100 ;
+ Unit = FUNIT_CUSTOM ;
+ CustomUnitText = "%" ;
+ SpinSize = 10 ;
+ };
+ GroupBox GB_CROP
+ {
+ Pos = MAP_APPFONT ( GB_CROP_LEFT , GB_CROP_TOP ) ;
+ Size = MAP_APPFONT ( 164 , 72 ) ;
+ Text = "Zuschneiden" ;
+ Text [ ENGLISH ] = "Crop" ;
+ Text [ english_us ] = "Crop" ;
+ Text [ italian ] = "Taglia" ;
+ Text [ spanish ] = "Recortar" ;
+ Text [ french ] = "Recadrer" ;
+ Text [ dutch ] = "Knippen" ;
+ Text [ swedish ] = "Skr till" ;
+ Text [ danish ] = "Beskr" ;
+ Text [ portuguese_brazilian ] = "Zuschneiden" ;
+ Text [ portuguese ] = "Recortar" ;
+ Text[ chinese_simplified ] = "ü";
+ Text[ russian ] = "";
+ Text[ polish ] = "Przytnij";
+ Text[ japanese ] = "ݸ";
+ Text[ chinese_traditional ] = "ŤU";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "ڸ";
+ Text[ turkish ] = "Krp";
+ };
+ FixedText FT_LEFT
+ {
+ Pos = MAP_APPFONT ( GB_CROP_LEFT + 6 , GB_CROP_TOP + 12 ) ;
+ Size = MAP_APPFONT ( 21 , 8 ) ;
+ Text = "~Links" ;
+ Text [ ENGLISH ] = "~Left" ;
+ Text [ dutch ] = "~Links" ;
+ Text [ english_us ] = "~Left" ;
+ Text [ italian ] = "~Sinistra" ;
+ Text [ spanish ] = "~Izquierda" ;
+ Text [ french ] = "~ gauche" ;
+ Text [ swedish ] = "~Vnster" ;
+ Text [ danish ] = "Venstre" ;
+ Text [ portuguese_brazilian ] = "~Links" ;
+ Text [ portuguese ] = "~Esquerda" ;
+ Text[ chinese_simplified ] = "(~L)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Z lewej";
+ Text[ japanese ] = "(~L)";
+ Text[ chinese_traditional ] = "(~L)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "(~L)";
+ Text[ turkish ] = "So~l";
+ };
+ MetricField MF_LEFT
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( GB_CROP_LEFT + 32 , GB_CROP_TOP + 10 ) ;
+ Size = MAP_APPFONT ( 40 , 12 ) ;
+ Text = "12,99" ;
+ TabStop = TRUE ;
+ Left = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = -9999 ;
+ Maximum = 9999 ;
+ DecimalDigits = 2 ;
+ Unit = FUNIT_CM ;
+ First = 0 ;
+ Last = 9999 ;
+ SpinSize = 10 ;
+ };
+ FixedText FT_RIGHT
+ {
+ Pos = MAP_APPFONT ( GB_CROP_LEFT + 6 , GB_CROP_TOP + 29 ) ;
+ Size = MAP_APPFONT ( 21 , 12 ) ;
+ Left = TRUE ;
+ Text = "~Rechts" ;
+ Text [ ENGLISH ] = "Right" ;
+ Text [ english_us ] = "~Right" ;
+ Text [ italian ] = "Destra" ;
+ Text [ spanish ] = "~Derecha" ;
+ Text [ french ] = "~ droite" ;
+ Text [ dutch ] = "~Rechts" ;
+ Text [ swedish ] = "~Hger" ;
+ Text [ danish ] = "Hjre" ;
+ Text [ portuguese_brazilian ] = "Rechts" ;
+ Text [ portuguese ] = "~Direita" ;
+ Text[ chinese_simplified ] = "(~R)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Z prawej";
+ Text[ japanese ] = "E(~R)";
+ Text[ chinese_traditional ] = "k(~R)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "(~R)";
+ Text[ turkish ] = "S~a";
+ };
+ MetricField MF_RIGHT
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( GB_CROP_LEFT + 32 , GB_CROP_TOP + 27 ) ;
+ Size = MAP_APPFONT ( 40 , 12 ) ;
+ TabStop = TRUE ;
+ Left = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = -9999 ;
+ Maximum = 9999 ;
+ DecimalDigits = 2 ;
+ Unit = FUNIT_CM ;
+ First = 0 ;
+ Last = 9999 ;
+ SpinSize = 10 ;
+ };
+ FixedText FT_TOP
+ {
+ Pos = MAP_APPFONT ( GB_CROP_LEFT + 91 , GB_CROP_TOP + 12 ) ;
+ Size = MAP_APPFONT ( 21 , 8 ) ;
+ Text = "~Oben" ;
+ Text [ ENGLISH ] = "Top" ;
+ Text [ english_us ] = "~Top" ;
+ Text [ italian ] = "Sopra" ;
+ Text [ spanish ] = "~Arriba" ;
+ Text [ french ] = "~En haut" ;
+ Text [ dutch ] = "~Boven" ;
+ Text [ swedish ] = "~verst" ;
+ Text [ danish ] = "verst" ;
+ Text [ portuguese_brazilian ] = "Oben" ;
+ Text [ portuguese ] = "Em cima" ;
+ Text[ chinese_simplified ] = "(~T)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Na grze";
+ Text[ japanese ] = "(~T)";
+ Text[ chinese_traditional ] = "W(~T)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "(~T)";
+ Text[ turkish ] = "~st";
+ };
+ MetricField MF_TOP
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( GB_CROP_LEFT + 117 , GB_CROP_TOP + 10 ) ;
+ Size = MAP_APPFONT ( 40 , 12 ) ;
+ Text = "12,99" ;
+ TabStop = TRUE ;
+ Left = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = -9999 ;
+ Maximum = 9999 ;
+ DecimalDigits = 2 ;
+ Unit = FUNIT_CM ;
+ First = 0 ;
+ Last = 9999 ;
+ SpinSize = 10 ;
+ };
+ FixedText FT_BOTTOM
+ {
+ Pos = MAP_APPFONT ( GB_CROP_LEFT + 91 , GB_CROP_TOP + 29 ) ;
+ Size = MAP_APPFONT ( 21 , 12 ) ;
+ Left = TRUE ;
+ Text = "~Unten" ;
+ Text [ ENGLISH ] = "Bottom" ;
+ Text [ dutch ] = "~Beneden" ;
+ Text [ english_us ] = "~Bottom" ;
+ Text [ italian ] = "Sotto" ;
+ Text [ spanish ] = "A~bajo" ;
+ Text [ french ] = "En ~bas" ;
+ Text [ swedish ] = "~Nederst" ;
+ Text [ danish ] = "Nederst" ;
+ Text [ portuguese ] = "Em baixo" ;
+ Text [ portuguese_brazilian ] = "Unten" ;
+ Text[ chinese_simplified ] = "(~B)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Na dole";
+ Text[ japanese ] = "(~B)";
+ Text[ chinese_traditional ] = "U(~B)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "Ʒ(~B)";
+ Text[ turkish ] = "A~lt";
+ };
+ MetricField MF_BOTTOM
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( GB_CROP_LEFT + 117 , GB_CROP_TOP + 27 ) ;
+ Size = MAP_APPFONT ( 40 , 12 ) ;
+ TabStop = TRUE ;
+ Left = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = -9999 ;
+ Maximum = 9999 ;
+ DecimalDigits = 2 ;
+ Unit = FUNIT_CM ;
+ First = 0 ;
+ Last = 9999 ;
+ SpinSize = 10 ;
+ };
+ RadioButton RB_SIZECONST
+ {
+ Pos = MAP_APPFONT ( GB_CROP_LEFT + 6 , GB_CROP_TOP + 49 ) ;
+ Size = MAP_APPFONT ( 74 , 10 ) ;
+ Text = "Gre beibehal~ten" ;
+ Text [ ENGLISH ] = "Keep size" ;
+ Text [ english_us ] = "Keep si~ze" ;
+ Text [ italian ] = "Mantieni dimensione" ;
+ Text [ spanish ] = "~Mantener el tamao" ;
+ Text [ french ] = "Mme ~taille" ;
+ Text [ dutch ] = "M~et behoud v. grootte" ;
+ Text [ swedish ] = "Bibehll s~torlek" ;
+ Text [ danish ] = "Bevar strrelse" ;
+ Text [ portuguese_brazilian ] = "Gre beibehalten" ;
+ Text [ portuguese ] = "~Manter tamanho" ;
+ Text[ chinese_simplified ] = "ִС(~Z)";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Za~chowaj rozmiar";
+ Text[ japanese ] = "ޕێ(~Z)";
+ Text[ chinese_traditional ] = "Ojp(~Z)";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = "ũ (~Z)";
+ Text[ turkish ] = "Boyutu kor~u";
+ };
+ RadioButton RB_ZOOMCONST
+ {
+ Pos = MAP_APPFONT ( GB_CROP_LEFT + 82 , GB_CROP_TOP + 49 ) ;
+ Size = MAP_APPFONT ( 80 , 10 ) ;
+ Check = TRUE ;
+ Text = "~Mastab beibehalten" ;
+ Text [ ENGLISH ] = "Keep Zoom" ;
+ Text [ english_us ] = "Keep ~scale" ;
+ Text [ italian ] = "Mantieni scala" ;
+ Text [ spanish ] = "Mantener la ~escala" ;
+ Text [ french ] = "Mme ~chelle" ;
+ Text [ dutch ] = "~Met behoud van schaal" ;
+ Text [ swedish ] = "Bibehll s~kala" ;
+ Text [ danish ] = "Bevar mlestok" ;
+ Text [ portuguese_brazilian ] = "Mastab beibehalten" ;
+ Text [ portuguese ] = "Manter ~escala" ;
+ Text[ chinese_simplified ] = "̶ֿ(~S)";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Zachowaj s~kal";
+ Text[ japanese ] = "ٕێ(~S)";
+ Text[ chinese_traditional ] = "Oܤ(~S)";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " (~S)";
+ Text[ turkish ] = "~Oranty koru";
+ };
+ GroupBox GB_EXAMPLE
+ {
+ Pos = MAP_APPFONT ( 176 , 3 ) ;
+ Size = MAP_APPFONT ( 79 , 72 ) ;
+ Text = "Vorschau" ;
+ Text [ ENGLISH ] = "Example" ;
+ Text [ norwegian ] = "Eksempel" ;
+ Text [ italian ] = "Anteprima" ;
+ Text [ portuguese_brazilian ] = "Exemplo" ;
+ Text [ portuguese ] = "Previsualizar" ;
+ Text [ finnish ] = "Malli" ;
+ Text [ danish ] = "Eksempel" ;
+ Text [ french ] = "Aperu" ;
+ Text [ swedish ] = "Frhandsvisning" ;
+ Text [ dutch ] = "Voorbeeld" ;
+ Text [ spanish ] = "Previsualizacin" ;
+ Text [ english_us ] = "Preview" ;
+ Text[ chinese_simplified ] = "Ԥ";
+ Text[ russian ] = "";
+ Text[ polish ] = "Podgld";
+ Text[ japanese ] = "ޭ";
+ Text[ chinese_traditional ] = "w";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "̸";
+ Text[ turkish ] = "nizleme";
+ };
+ Window WN_BSP
+ {
+ Pos = MAP_APPFONT ( 180 , 12 ) ;
+ Size = MAP_APPFONT ( 71 , 60 ) ;
+ };
+ FixedText FT_ORIG_SIZE
+ {
+ Pos = MAP_APPFONT ( 180 , 99 ) ;
+ Size = MAP_APPFONT ( 70 , 10 ) ;
+ };
+ PushButton PB_ORGSIZE
+ {
+ Pos = MAP_APPFONT ( 190 , 111 ) ;
+ Size = MAP_APPFONT ( 50 , 15 ) ;
+ TabStop = TRUE ;
+ Text = "Ori~ginalgre" ;
+ Text [ ENGLISH ] = "Real Size" ;
+ Text [ english_us ] = "~Original Size" ;
+ Text [ italian ] = "Dimens. ori~ginale" ;
+ Text [ spanish ] = "Tamao ori~ginal" ;
+ Text [ french ] = "Taille d'~origine" ;
+ Text [ dutch ] = "~Originele grootte" ;
+ Text [ swedish ] = "Ori~ginalstorlek" ;
+ Text [ danish ] = "Oprindelig strrelse" ;
+ Text [ portuguese_brazilian ] = "Originalgre" ;
+ Text [ portuguese ] = "Tamanho ~original" ;
+ Text[ chinese_simplified ] = "ԭС(~O)";
+ Text[ russian ] = " ";
+ Text[ polish ] = "~Rozmiar oryginalny";
+ Text[ japanese ] = "̻(~O)";
+ Text[ chinese_traditional ] = "jp(~O)";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ũ(~O)";
+ Text[ turkish ] = "~lk boyut";
+ };
+};
+
diff --git a/svx/source/dialog/hdft.cxx b/svx/source/dialog/hdft.cxx
new file mode 100644
index 000000000000..26d4289e161d
--- /dev/null
+++ b/svx/source/dialog/hdft.cxx
@@ -0,0 +1,1010 @@
+/*************************************************************************
+ *
+ * $RCSfile: hdft.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:08 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+// include ---------------------------------------------------------------
+
+#ifndef _SHL_HXX
+#include <tools/shl.hxx>
+#endif
+#ifndef _SFXITEMITER_HXX
+#include <svtools/itemiter.hxx>
+#endif
+#ifndef _SFXAPP_HXX
+#include <sfx2/app.hxx>
+#endif
+#ifndef _SFX_OBJSH_HXX //autogen
+#include <sfx2/objsh.hxx>
+#endif
+#ifndef _SFXMODULE_HXX
+#include <sfx2/module.hxx>
+#endif
+#ifndef _SFX_SAVEOPT_HXX //autogen
+#include <sfx2/saveopt.hxx>
+#endif
+#include <vcl/msgbox.hxx>
+#include <vcl/graph.hxx>
+#pragma hdrstop
+
+#include "dialogs.hrc"
+#include "hdft.hrc"
+
+#define ITEMID_PAGE 0
+#define ITEMID_SIZE 0
+#define ITEMID_ULSPACE 0
+#define ITEMID_LRSPACE 0
+#define ITEMID_PAPERBIN 0
+#define ITEMID_SETITEM 0
+#define ITEMID_BRUSH 0
+#define ITEMID_BOX 0
+#define ITEMID_BOXINFO 0
+#define ITEMID_SHADOW 0
+
+#define _SVX_HDFT_CXX
+
+#include "hdft.hxx"
+#include "pageitem.hxx"
+#include "bbdlg.hxx"
+#include "dlgutil.hxx"
+#include "dialmgr.hxx"
+#include "htmlmode.hxx"
+
+#include "brshitem.hxx"
+#include "lrspitem.hxx"
+#include "ulspitem.hxx"
+#include "shaditem.hxx"
+#include "sizeitem.hxx"
+#include "boxitem.hxx"
+
+// static ----------------------------------------------------------------
+
+static const long MINBODY = 284; // 0,5cm in twips aufgerundet
+
+// default distance to Header or footer
+static const long DEF_DIST_WRITER = 500; // 5mm (Writer)
+static const long DEF_DIST_CALC = 250; // 2,5mm (Calc)
+
+static USHORT pRanges[] =
+{
+ SID_ATTR_BRUSH, SID_ATTR_BRUSH,
+ SID_ATTR_BORDER_OUTER, SID_ATTR_BORDER_OUTER,
+ SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER,
+ SID_ATTR_BORDER_SHADOW, SID_ATTR_BORDER_SHADOW,
+ SID_ATTR_LRSPACE, SID_ATTR_LRSPACE,
+ SID_ATTR_ULSPACE, SID_ATTR_ULSPACE,
+ SID_ATTR_PAGE_SIZE, SID_ATTR_PAGE_SIZE,
+ SID_ATTR_PAGE_HEADERSET, SID_ATTR_PAGE_HEADERSET,
+ SID_ATTR_PAGE_FOOTERSET, SID_ATTR_PAGE_FOOTERSET,
+ SID_ATTR_PAGE_ON, SID_ATTR_PAGE_ON,
+ SID_ATTR_PAGE_DYNAMIC, SID_ATTR_PAGE_DYNAMIC,
+ SID_ATTR_PAGE_SHARED, SID_ATTR_PAGE_SHARED,
+ 0
+};
+
+/*--------------------------------------------------------------------
+ Beschreibung:
+ --------------------------------------------------------------------*/
+
+// gibt den Bereich der Which-Werte zurueck
+
+
+USHORT* SvxHeaderPage::GetRanges()
+{
+ return pRanges;
+}
+
+//------------------------------------------------------------------------
+
+SfxTabPage* SvxHeaderPage::Create( Window* pParent, const SfxItemSet& rSet )
+{
+ return new SvxHeaderPage( pParent, rSet );
+}
+
+//------------------------------------------------------------------------
+
+USHORT* SvxFooterPage::GetRanges()
+{
+ return pRanges;
+}
+
+// -----------------------------------------------------------------------
+
+SfxTabPage* SvxFooterPage::Create( Window* pParent, const SfxItemSet& rSet )
+{
+ return new SvxFooterPage( pParent, rSet );
+}
+
+// -----------------------------------------------------------------------
+
+SvxHeaderPage::SvxHeaderPage( Window* pParent, const SfxItemSet& rAttr ) :
+
+ SvxHFPage( pParent, RID_SVXPAGE_HEADER, rAttr, SID_ATTR_PAGE_HEADERSET )
+
+{
+}
+
+// -----------------------------------------------------------------------
+
+SvxFooterPage::SvxFooterPage( Window* pParent, const SfxItemSet& rAttr ) :
+
+ SvxHFPage( pParent, RID_SVXPAGE_FOOTER, rAttr, SID_ATTR_PAGE_FOOTERSET )
+
+{
+}
+
+// -----------------------------------------------------------------------
+
+SvxHFPage::SvxHFPage( Window* pParent, USHORT nResId, const SfxItemSet& rAttr, USHORT nSetId ) :
+
+ SfxTabPage( pParent, ResId( nResId, DIALOG_MGR() ), rAttr ),
+
+ aTurnOnBox ( this, ResId( CB_TURNON ) ),
+ aDistFT ( this, ResId( FT_DIST ) ),
+ aDistEdit ( this, ResId( ED_DIST ) ),
+ aHeightFT ( this, ResId( FT_HEIGHT ) ),
+ aHeightEdit ( this, ResId( ED_HEIGHT ) ),
+ aHeightDynBtn ( this, ResId( CB_HEIGHT_DYN ) ),
+ aLMLbl ( this, ResId( FT_LMARGIN ) ),
+ aLMEdit ( this, ResId( ED_LMARGIN ) ),
+ aRMLbl ( this, ResId( FT_RMARGIN ) ),
+ aRMEdit ( this, ResId( ED_RMARGIN ) ),
+ aCntSharedBox ( this, ResId( CB_SHARED ) ),
+ aFrm ( this, ResId( GB_FRAME ) ),
+ aBspWin ( this, ResId( WN_BSP ) ),
+ aBspFrm ( this, ResId( GB_BSP ) ),
+ aBackgroundBtn ( this, ResId( BTN_EXTRAS ) ),
+
+ pBBSet ( NULL ),
+ nId ( nSetId ),
+ bDisableQueryBox ( FALSE ),
+ bEnableBackgroundSelector ( TRUE )
+
+{
+ InitHandler();
+
+ // diese Page braucht ExchangeSupport
+ SetExchangeSupport();
+
+ FreeResource();
+
+ // Metrik einstellen
+ FieldUnit eFUnit;
+ GET_MODULE_FIELDUNIT( eFUnit );
+ SetFieldUnit( aDistEdit, eFUnit );
+ SetFieldUnit( aHeightEdit, eFUnit );
+ SetFieldUnit( aLMEdit, eFUnit );
+ SetFieldUnit( aRMEdit, eFUnit );
+}
+
+// -----------------------------------------------------------------------
+
+SvxHFPage::~SvxHFPage()
+{
+ delete pBBSet;
+}
+
+// -----------------------------------------------------------------------
+
+BOOL SvxHFPage::FillItemSet( SfxItemSet& rSet )
+{
+ const USHORT nWSize = GetWhich( SID_ATTR_PAGE_SIZE );
+ const USHORT nWLRSpace = GetWhich( SID_ATTR_LRSPACE );
+ const USHORT nWULSpace = GetWhich( SID_ATTR_ULSPACE );
+ const USHORT nWOn = GetWhich( SID_ATTR_PAGE_ON );
+ const USHORT nWDynamic = GetWhich( SID_ATTR_PAGE_DYNAMIC );
+ const USHORT nWShared = GetWhich( SID_ATTR_PAGE_SHARED );
+ const USHORT nWBrush = GetWhich( SID_ATTR_BRUSH );
+ const USHORT nWBox = GetWhich( SID_ATTR_BORDER_OUTER );
+ const USHORT nWBoxInfo = GetWhich( SID_ATTR_BORDER_INNER );
+ const USHORT nWShadow = GetWhich( SID_ATTR_BORDER_SHADOW );
+#ifdef SINIX
+ USHORT aWhichTab[23];
+ aWhichTab[0] = aWhichTab[1] = nWSize;
+ aWhichTab[2] = aWhichTab[3] = nWLRSpace;
+ aWhichTab[4] = aWhichTab[5] = nWULSpace;
+ aWhichTab[6] = aWhichTab[7] = nWOn;
+ aWhichTab[8] = aWhichTab[9] = nWDynamic;
+ aWhichTab[10] = aWhichTab[11] = nWShared;
+ aWhichTab[12] = aWhichTab[13] = nWBrush;
+ aWhichTab[14] = aWhichTab[15] = nWBoxInfo;
+ aWhichTab[16] = aWhichTab[17] = nWBox;
+ aWhichTab[18] = aWhichTab[19] = nWShadow;
+ aWhichTab[20] = 0;
+#else
+ const USHORT aWhichTab[] = { nWSize, nWSize,
+ nWLRSpace, nWLRSpace,
+ nWULSpace, nWULSpace,
+ nWOn, nWOn,
+ nWDynamic, nWDynamic,
+ nWShared, nWShared,
+ nWBrush, nWBrush,
+ nWBoxInfo, nWBoxInfo,
+ nWBox, nWBox,
+ nWShadow, nWShadow,
+ 0 };
+#endif
+ const SfxItemSet& rOldSet = GetItemSet();
+ SfxItemPool* pPool = rOldSet.GetPool();
+ DBG_ASSERT( pPool, "no pool :-(" );
+ SfxMapUnit eUnit = pPool->GetMetric( nWSize );
+ SfxItemSet aSet ( *pPool, aWhichTab );
+
+ //--------------------------------------------------------------------
+
+ aSet.Put( SfxBoolItem( nWOn, aTurnOnBox.IsChecked() ) );
+ aSet.Put( SfxBoolItem( nWDynamic, aHeightDynBtn.IsChecked() ) );
+ aSet.Put( SfxBoolItem( nWShared, aCntSharedBox.IsChecked() ) );
+
+ // Groesse
+ SvxSizeItem aSizeItem( (const SvxSizeItem&)rOldSet.Get( nWSize ) );
+ Size aSize( aSizeItem.GetSize() );
+ long nDist = GetCoreValue( aDistEdit, eUnit );
+ long nH = GetCoreValue( aHeightEdit, eUnit );
+
+ // fixe Hoehe?
+// if ( !aHeightDynBtn.IsChecked() )
+ nH += nDist; // dann Abstand dazu addieren
+ aSize.Height() = nH;
+ aSizeItem.SetSize( aSize );
+ aSet.Put( aSizeItem );
+
+ // Raender
+ SvxLRSpaceItem aLR( nWLRSpace );
+ aLR.SetLeft( (USHORT)GetCoreValue( aLMEdit, eUnit ) );
+ aLR.SetRight( (USHORT)GetCoreValue( aRMEdit, eUnit ) );
+ aSet.Put( aLR );
+
+ SvxULSpaceItem aUL( nWULSpace );
+ if ( nId == SID_ATTR_PAGE_HEADERSET )
+ aUL.SetLower( (USHORT)nDist );
+ else
+ aUL.SetUpper( (USHORT)nDist );
+ aSet.Put( aUL );
+
+ // Hintergrund und Umrandung?
+ if ( pBBSet )
+ aSet.Put( *pBBSet );
+ else
+ {
+ const SfxItemSet* pSet;
+ const SfxPoolItem* pItem;
+
+ if ( SFX_ITEM_SET ==
+ GetItemSet().GetItemState( GetWhich( nId ), FALSE, &pItem ) )
+ {
+ pSet = &( (SvxSetItem*)pItem )->GetItemSet();
+
+ if ( pSet->GetItemState( nWBrush ) == SFX_ITEM_SET )
+ aSet.Put( (const SvxBrushItem&)pSet->Get( nWBrush ) );
+ if ( pSet->GetItemState( nWBoxInfo ) == SFX_ITEM_SET )
+ aSet.Put( (const SvxBoxInfoItem&)pSet->Get( nWBoxInfo ) );
+ if ( pSet->GetItemState( nWBox ) == SFX_ITEM_SET )
+ aSet.Put( (const SvxBoxItem&)pSet->Get( nWBox ) );
+ if ( pSet->GetItemState( nWShadow ) == SFX_ITEM_SET )
+ aSet.Put( (const SvxShadowItem&)pSet->Get( nWShadow ) );
+ }
+ }
+
+ // Das SetItem wegschreiben
+ SvxSetItem aSetItem( GetWhich( nId ), aSet );
+ rSet.Put( aSetItem );
+
+ return TRUE;
+}
+
+// -----------------------------------------------------------------------
+void SvxHFPage::Reset( const SfxItemSet& rSet )
+{
+ ActivatePage( rSet );
+ ResetBackground_Impl( rSet );
+
+ SfxItemPool* pPool = GetItemSet().GetPool();
+ DBG_ASSERT( pPool, "Wo ist der Pool" );
+ SfxMapUnit eUnit = pPool->GetMetric( GetWhich( SID_ATTR_PAGE_SIZE ) );
+
+ // Kopf-/Fusszeilen-Attribute auswerten
+ //
+ const SvxSetItem* pSetItem = 0;
+
+ if ( SFX_ITEM_SET == rSet.GetItemState( GetWhich(nId), FALSE,
+ (const SfxPoolItem**)&pSetItem ) )
+ {
+ const SfxItemSet& rHeaderSet = pSetItem->GetItemSet();
+ const SfxBoolItem& rHeaderOn =
+ (const SfxBoolItem&)rHeaderSet.Get(GetWhich(SID_ATTR_PAGE_ON));
+
+ aTurnOnBox.Check(rHeaderOn.GetValue());
+
+ if ( rHeaderOn.GetValue() )
+ {
+ const SfxBoolItem& rDynamic =
+ (const SfxBoolItem&)rHeaderSet.Get( GetWhich( SID_ATTR_PAGE_DYNAMIC ) );
+ const SfxBoolItem& rShared =
+ (const SfxBoolItem&)rHeaderSet.Get( GetWhich( SID_ATTR_PAGE_SHARED ) );
+ const SvxSizeItem& rSize =
+ (const SvxSizeItem&)rHeaderSet.Get( GetWhich( SID_ATTR_PAGE_SIZE ) );
+ const SvxULSpaceItem& rUL =
+ (const SvxULSpaceItem&)rHeaderSet.Get( GetWhich( SID_ATTR_ULSPACE ) );
+ const SvxLRSpaceItem& rLR =
+ (const SvxLRSpaceItem&)rHeaderSet.Get( GetWhich( SID_ATTR_LRSPACE ) );
+
+ if ( nId == SID_ATTR_PAGE_HEADERSET )
+ { // Kopfzeile
+ SetMetricValue( aDistEdit, rUL.GetLower(), eUnit );
+ SetMetricValue( aHeightEdit, rSize.GetSize().Height() - rUL.GetLower(), eUnit );
+ }
+ else
+ { // Fusszeile
+ SetMetricValue( aDistEdit, rUL.GetUpper(), eUnit );
+ SetMetricValue( aHeightEdit, rSize.GetSize().Height() - rUL.GetUpper(), eUnit );
+ }
+
+ aHeightDynBtn.Check(rDynamic.GetValue());
+ SetMetricValue( aLMEdit, rLR.GetLeft(), eUnit );
+ SetMetricValue( aRMEdit, rLR.GetRight(), eUnit );
+ aCntSharedBox.Check(rShared.GetValue());
+ }
+ else
+ pSetItem = 0;
+ }
+ else
+ {
+ // defaults for distance and height
+ long nDefaultDist = DEF_DIST_WRITER;
+ const SfxPoolItem* pExt1 = GetItem( rSet, SID_ATTR_PAGE_EXT1 );
+ const SfxPoolItem* pExt2 = GetItem( rSet, SID_ATTR_PAGE_EXT2 );
+
+ if ( pExt1 && pExt1->ISA(SfxBoolItem) && pExt2 && pExt2->ISA(SfxBoolItem) )
+ nDefaultDist = DEF_DIST_CALC;
+
+ SetMetricValue( aDistEdit, nDefaultDist, SFX_MAPUNIT_100TH_MM );
+ SetMetricValue( aHeightEdit, 500, SFX_MAPUNIT_100TH_MM );
+ }
+
+ if ( !pSetItem )
+ {
+ aTurnOnBox.Check( FALSE );
+ aHeightDynBtn.Check( TRUE );
+ aCntSharedBox.Check( TRUE );
+ }
+
+ TurnOnHdl(0);
+
+ aTurnOnBox.SaveValue();
+ aDistEdit.SaveValue();
+ aHeightEdit.SaveValue();
+ aHeightDynBtn.SaveValue();
+ aLMEdit.SaveValue();
+ aRMEdit.SaveValue();
+ aCntSharedBox.SaveValue();
+ RangeHdl( 0 );
+
+ USHORT nHtmlMode = 0;
+ const SfxPoolItem* pItem = 0;
+ SfxObjectShell* pShell;
+ if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, FALSE, &pItem) ||
+ ( 0 != (pShell = SfxObjectShell::Current()) &&
+ 0 != (pItem = pShell->GetItem(SID_HTML_MODE))))
+ {
+ nHtmlMode = ((SfxUInt16Item*)pItem)->GetValue();
+ if(nHtmlMode && HTMLMODE_ON)
+ {
+ aCntSharedBox.Hide();
+ aBackgroundBtn.Hide();
+ Size aFrmSize = aBspFrm.GetSizePixel();
+ long nDiff = aFrmSize.Height() - aBspWin.GetSizePixel().Height();
+ aFrmSize.Height() = aFrm.GetSizePixel().Height();
+ aBspFrm.SetSizePixel(aFrmSize);
+ aFrmSize.Height() -= nDiff;
+ aBspWin.SetSizePixel(aFrmSize);
+
+ }
+ }
+
+}
+
+/*--------------------------------------------------------------------
+ Beschreibung: Handler initialisieren
+ --------------------------------------------------------------------*/
+
+void SvxHFPage::InitHandler()
+{
+ aTurnOnBox.SetClickHdl(LINK(this, SvxHFPage, TurnOnHdl));
+ aDistEdit.SetModifyHdl(LINK(this, SvxHFPage, DistModify));
+ aDistEdit.SetLoseFocusHdl(LINK(this, SvxHFPage, RangeHdl));
+
+ aHeightEdit.SetModifyHdl(LINK(this, SvxHFPage, HeightModify));
+ aHeightEdit.SetLoseFocusHdl(LINK(this,SvxHFPage,RangeHdl));
+
+ aLMEdit.SetModifyHdl(LINK(this, SvxHFPage, BorderModify));
+ aLMEdit.SetLoseFocusHdl(LINK(this, SvxHFPage, RangeHdl));
+ aRMEdit.SetModifyHdl(LINK(this, SvxHFPage, BorderModify));
+ aRMEdit.SetLoseFocusHdl(LINK(this, SvxHFPage, RangeHdl));
+ aBackgroundBtn.SetClickHdl(LINK(this,SvxHFPage, BackgroundHdl));
+}
+
+/*--------------------------------------------------------------------
+ Beschreibung: Ein/aus
+ --------------------------------------------------------------------*/
+
+IMPL_LINK( SvxHFPage, TurnOnHdl, CheckBox *, pBox )
+{
+ if ( aTurnOnBox.IsChecked() )
+ {
+ aDistFT.Enable();
+ aDistEdit.Enable();
+ aHeightFT.Enable();
+ aHeightEdit.Enable();
+ aHeightDynBtn.Enable();
+ aLMLbl.Enable();
+ aLMEdit.Enable();
+ aRMLbl.Enable();
+ aRMEdit.Enable();
+
+ USHORT nUsage = aBspWin.GetUsage();
+
+ if( nUsage == SVX_PAGE_RIGHT || nUsage == SVX_PAGE_LEFT )
+ aCntSharedBox.Disable();
+ else
+ aCntSharedBox.Enable();
+ aBackgroundBtn.Enable();
+ }
+ else
+ {
+ BOOL bDelete = TRUE;
+
+ if ( !bDisableQueryBox && pBox && aTurnOnBox.GetSavedValue() == TRUE )
+ bDelete = ( QueryBox( this, ResId( RID_SVXQBX_DELETE_HEADFOOT, DIALOG_MGR() ) ).Execute() == RET_YES );
+
+ if ( bDelete )
+ {
+ aDistFT.Disable();
+ aDistEdit.Disable();
+ aHeightFT.Disable();
+ aHeightEdit.Disable();
+ aHeightDynBtn.Disable();
+
+ aLMLbl.Disable();
+ aLMEdit.Disable();
+ aRMLbl.Disable();
+ aRMEdit.Disable();
+
+ aCntSharedBox.Disable();
+ aBackgroundBtn.Disable();
+ }
+ else
+ aTurnOnBox.Check();
+ }
+ UpdateExample();
+ return 0;
+}
+
+/*--------------------------------------------------------------------
+ Beschreibung: Abstand im Bsp Modifizieren
+ --------------------------------------------------------------------*/
+
+IMPL_LINK_INLINE_START( SvxHFPage, DistModify, MetricField *, EMPTYARG )
+{
+ UpdateExample();
+ return 0;
+}
+IMPL_LINK_INLINE_END( SvxHFPage, DistModify, MetricField *, EMPTYARG )
+
+IMPL_LINK_INLINE_START( SvxHFPage, HeightModify, MetricField *, EMPTYARG )
+{
+ UpdateExample();
+
+ return 0;
+}
+IMPL_LINK_INLINE_END( SvxHFPage, HeightModify, MetricField *, EMPTYARG )
+
+/*--------------------------------------------------------------------
+ Beschreibung: Raender einstellen
+ --------------------------------------------------------------------*/
+
+IMPL_LINK_INLINE_START( SvxHFPage, BorderModify, MetricField *, EMPTYARG )
+{
+ UpdateExample();
+ return 0;
+}
+IMPL_LINK_INLINE_END( SvxHFPage, BorderModify, MetricField *, EMPTYARG )
+
+/*--------------------------------------------------------------------
+ Beschreibung: Hintergrund
+ --------------------------------------------------------------------*/
+
+IMPL_LINK( SvxHFPage, BackgroundHdl, Button *, EMPTYARG )
+{
+ if ( !pBBSet )
+ {
+ // nur die n"otigen Items f"uer Umrandung und Hintergrund benutzen
+ USHORT nBrush = GetWhich( SID_ATTR_BRUSH );
+ USHORT nOuter = GetWhich( SID_ATTR_BORDER_OUTER );
+ USHORT nInner = GetWhich( SID_ATTR_BORDER_INNER );
+ USHORT nShadow = GetWhich( SID_ATTR_BORDER_SHADOW );
+
+ // einen leeren Set erzeugen
+ pBBSet = new SfxItemSet( *GetItemSet().GetPool(), nBrush, nBrush,
+ nOuter, nOuter, nInner, nInner,
+ nShadow, nShadow, 0 );
+ const SfxPoolItem* pItem;
+
+ if ( SFX_ITEM_SET ==
+ GetItemSet().GetItemState( GetWhich( nId ), FALSE, &pItem ) )
+ // wenn es schon einen gesetzen Set gibt, dann diesen benutzen
+ pBBSet->Put( ( (SvxSetItem*)pItem)->GetItemSet() );
+
+ if ( SFX_ITEM_SET ==
+ GetItemSet().GetItemState( nInner, FALSE, &pItem ) )
+ // das gesetze InfoItem wird immer ben"otigt
+ pBBSet->Put( *pItem );
+ }
+
+ SvxBorderBackgroundDlg* pDlg =
+ new SvxBorderBackgroundDlg( this, *pBBSet, bEnableBackgroundSelector );
+
+ if ( pDlg->Execute() == RET_OK && pDlg->GetOutputItemSet() )
+ {
+ SfxItemIter aIter( *pDlg->GetOutputItemSet() );
+ const SfxPoolItem* pItem = aIter.FirstItem();
+
+ while ( pItem )
+ {
+ if ( !IsInvalidItem( pItem ) )
+ pBBSet->Put( *pItem );
+ pItem = aIter.NextItem();
+ }
+
+ //----------------------------------------------------------------
+
+ USHORT nWhich = GetWhich( SID_ATTR_BRUSH );
+
+ if ( pBBSet->GetItemState( nWhich ) == SFX_ITEM_SET )
+ {
+ const SvxBrushItem& rItem = (const SvxBrushItem&)pBBSet->Get( nWhich );
+ if ( nId == SID_ATTR_PAGE_HEADERSET )
+ aBspWin.SetHdColor( rItem.GetColor() );
+ else
+ aBspWin.SetFtColor( rItem.GetColor() );
+ }
+
+ //----------------------------------------------------------------
+
+ nWhich = GetWhich( SID_ATTR_BORDER_OUTER );
+
+ if ( pBBSet->GetItemState( nWhich ) == SFX_ITEM_SET )
+ {
+ const SvxBoxItem& rItem = (const SvxBoxItem&)pBBSet->Get( nWhich );
+
+ if ( nId == SID_ATTR_PAGE_HEADERSET )
+ aBspWin.SetHdBorder( rItem );
+ else
+ aBspWin.SetFtBorder( rItem );
+ }
+
+ UpdateExample();
+ }
+ delete pDlg;
+ return 0;
+}
+
+/*--------------------------------------------------------------------
+ Beschreibung: Bsp
+ --------------------------------------------------------------------*/
+
+void SvxHFPage::UpdateExample()
+{
+ if ( nId == SID_ATTR_PAGE_HEADERSET )
+ {
+ aBspWin.SetHeader( aTurnOnBox.IsChecked() );
+ aBspWin.SetHdHeight( GetCoreValue( aHeightEdit, SFX_MAPUNIT_TWIP ) );
+ aBspWin.SetHdDist( GetCoreValue( aDistEdit, SFX_MAPUNIT_TWIP ) );
+ aBspWin.SetHdLeft( GetCoreValue( aLMEdit, SFX_MAPUNIT_TWIP ) );
+ aBspWin.SetHdRight( GetCoreValue( aRMEdit, SFX_MAPUNIT_TWIP ) );
+ }
+ else
+ {
+ aBspWin.SetFooter( aTurnOnBox.IsChecked() );
+ aBspWin.SetFtHeight( GetCoreValue( aHeightEdit, SFX_MAPUNIT_TWIP ) );
+ aBspWin.SetFtDist( GetCoreValue( aDistEdit, SFX_MAPUNIT_TWIP ) );
+ aBspWin.SetFtLeft( GetCoreValue( aLMEdit, SFX_MAPUNIT_TWIP ) );
+ aBspWin.SetFtRight( GetCoreValue( aRMEdit, SFX_MAPUNIT_TWIP ) );
+ }
+ aBspWin.Invalidate();
+}
+
+/*--------------------------------------------------------------------
+ Beschreibung: Hintergrund im Beispiel setzen
+ --------------------------------------------------------------------*/
+
+void SvxHFPage::ResetBackground_Impl( const SfxItemSet& rSet )
+{
+ USHORT nWhich = GetWhich( SID_ATTR_PAGE_HEADERSET );
+
+ if ( rSet.GetItemState( nWhich, FALSE ) == SFX_ITEM_SET )
+ {
+ const SvxSetItem& rSetItem =
+ (const SvxSetItem&)rSet.Get( nWhich, FALSE );
+ const SfxItemSet& rTmpSet = rSetItem.GetItemSet();
+ const SfxBoolItem& rOn =
+ (const SfxBoolItem&)rTmpSet.Get( GetWhich( SID_ATTR_PAGE_ON ) );
+
+ if ( rOn.GetValue() )
+ {
+ nWhich = GetWhich( SID_ATTR_BRUSH );
+
+ if ( rTmpSet.GetItemState( nWhich ) == SFX_ITEM_SET )
+ {
+ const SvxBrushItem& rItem = (const SvxBrushItem&)rTmpSet.Get( nWhich );
+ aBspWin.SetHdColor( rItem.GetColor() );
+ }
+ nWhich = GetWhich( SID_ATTR_BORDER_OUTER );
+
+ if ( rTmpSet.GetItemState( nWhich ) == SFX_ITEM_SET )
+ {
+ const SvxBoxItem& rItem =
+ (const SvxBoxItem&)rTmpSet.Get( nWhich );
+ aBspWin.SetHdBorder( rItem );
+ }
+ }
+ }
+
+ nWhich = GetWhich( SID_ATTR_PAGE_FOOTERSET );
+
+ if ( rSet.GetItemState( nWhich, FALSE ) == SFX_ITEM_SET )
+ {
+ const SvxSetItem& rSetItem =
+ (const SvxSetItem&)rSet.Get( nWhich, FALSE );
+ const SfxItemSet& rTmpSet = rSetItem.GetItemSet();
+ const SfxBoolItem& rOn =
+ (const SfxBoolItem&)rTmpSet.Get( GetWhich( SID_ATTR_PAGE_ON ) );
+
+ if ( rOn.GetValue() )
+ {
+ nWhich = GetWhich( SID_ATTR_BRUSH );
+
+ if ( rTmpSet.GetItemState( nWhich ) == SFX_ITEM_SET )
+ {
+ const SvxBrushItem& rItem = (const SvxBrushItem&)rTmpSet.Get( nWhich );
+ aBspWin.SetFtColor( rItem.GetColor() );
+ }
+ nWhich = GetWhich( SID_ATTR_BORDER_OUTER );
+
+ if ( rTmpSet.GetItemState( nWhich ) == SFX_ITEM_SET )
+ {
+ const SvxBoxItem& rItem =
+ (const SvxBoxItem&)rTmpSet.Get( nWhich );
+ aBspWin.SetFtBorder( rItem );
+ }
+ }
+ }
+ nWhich = GetWhich( SID_ATTR_BRUSH );
+
+ if ( rSet.GetItemState( nWhich ) >= SFX_ITEM_AVAILABLE )
+ {
+ const SvxBrushItem& rItem = (const SvxBrushItem&)rSet.Get( nWhich );
+ aBspWin.SetColor( rItem.GetColor() );
+ const Graphic* pGrf = rItem.GetGraphic();
+
+ if ( pGrf )
+ {
+ Bitmap aBitmap = pGrf->GetBitmap();
+ aBspWin.SetBitmap( &aBitmap );
+ }
+ else
+ aBspWin.SetBitmap( NULL );
+ }
+ nWhich = GetWhich( SID_ATTR_BORDER_OUTER );
+
+ if ( rSet.GetItemState( nWhich ) >= SFX_ITEM_AVAILABLE )
+ {
+ const SvxBoxItem& rItem = (const SvxBoxItem&)rSet.Get( nWhich );
+ aBspWin.SetBorder( rItem );
+ }
+}
+
+/*--------------------------------------------------------------------
+ Beschreibung:
+ --------------------------------------------------------------------*/
+
+void SvxHFPage::ActivatePage( const SfxItemSet& rSet )
+{
+ const SfxPoolItem* pItem = GetItem( rSet, SID_ATTR_LRSPACE );
+
+ if ( pItem )
+ {
+ // linken und rechten Rand einstellen
+ const SvxLRSpaceItem& rLRSpace = (const SvxLRSpaceItem&)*pItem;
+
+ aBspWin.SetLeft( rLRSpace.GetLeft() );
+ aBspWin.SetRight( rLRSpace.GetRight() );
+ }
+ else
+ {
+ aBspWin.SetLeft( 0 );
+ aBspWin.SetRight( 0 );
+ }
+
+ pItem = GetItem( rSet, SID_ATTR_ULSPACE );
+
+ if ( pItem )
+ {
+ // oberen und unteren Rand einstellen
+ const SvxULSpaceItem& rULSpace = (const SvxULSpaceItem&)*pItem;
+
+ aBspWin.SetTop( rULSpace.GetUpper() );
+ aBspWin.SetBottom( rULSpace.GetLower() );
+ }
+ else
+ {
+ aBspWin.SetTop( 0 );
+ aBspWin.SetBottom( 0 );
+ }
+
+ USHORT nUsage = SVX_PAGE_ALL;
+ pItem = GetItem( rSet, SID_ATTR_PAGE );
+
+ if ( pItem )
+ nUsage = ( (const SvxPageItem*)pItem )->GetPageUsage();
+
+ aBspWin.SetUsage( nUsage );
+
+ if ( SVX_PAGE_RIGHT == nUsage || SVX_PAGE_LEFT == nUsage )
+ aCntSharedBox.Disable();
+ else
+ aCntSharedBox.Enable();
+ pItem = GetItem( rSet, SID_ATTR_PAGE_SIZE );
+
+ if ( pItem )
+ {
+ // Orientation und Size aus dem PageItem
+ const SvxSizeItem& rSize = (const SvxSizeItem&)*pItem;
+ // die Groesse ist ggf. schon geswappt (Querformat)
+ aBspWin.SetSize( rSize.GetSize() );
+ }
+
+ // Kopfzeilen-Attribute auswerten
+ const SvxSetItem* pSetItem = 0;
+
+ if ( SFX_ITEM_SET == rSet.GetItemState( GetWhich( SID_ATTR_PAGE_HEADERSET ),
+ FALSE,
+ (const SfxPoolItem**)&pSetItem ) )
+ {
+ const SfxItemSet& rHeaderSet = pSetItem->GetItemSet();
+ const SfxBoolItem& rHeaderOn =
+ (const SfxBoolItem&)rHeaderSet.Get( GetWhich( SID_ATTR_PAGE_ON ) );
+
+ if ( rHeaderOn.GetValue() )
+ {
+ const SfxBoolItem& rDynamic = (const SfxBoolItem&)
+ rHeaderSet.Get( GetWhich( SID_ATTR_PAGE_DYNAMIC ) );
+ const SvxSizeItem& rSize = (const SvxSizeItem&)
+ rHeaderSet.Get( GetWhich( SID_ATTR_PAGE_SIZE ) );
+ const SvxULSpaceItem& rUL = (const SvxULSpaceItem&)
+ rHeaderSet.Get( GetWhich(SID_ATTR_ULSPACE ) );
+ const SvxLRSpaceItem& rLR = (const SvxLRSpaceItem&)
+ rHeaderSet.Get( GetWhich( SID_ATTR_LRSPACE ) );
+ long nDist = rUL.GetLower();
+
+ aBspWin.SetHdHeight( rSize.GetSize().Height() - nDist );
+ aBspWin.SetHdDist( nDist );
+ aBspWin.SetHdLeft( rLR.GetLeft() );
+ aBspWin.SetHdRight( rLR.GetRight() );
+ aBspWin.SetHeader( TRUE );
+ }
+ else
+ pSetItem = 0;
+ }
+
+ if ( !pSetItem )
+ {
+ aBspWin.SetHeader( FALSE );
+
+ if ( SID_ATTR_PAGE_HEADERSET == nId )
+ aCntSharedBox.Disable();
+ }
+ pSetItem = 0;
+
+ if ( SFX_ITEM_SET == rSet.GetItemState( GetWhich( SID_ATTR_PAGE_FOOTERSET ),
+ FALSE,
+ (const SfxPoolItem**)&pSetItem ) )
+ {
+ const SfxItemSet& rFooterSet = pSetItem->GetItemSet();
+ const SfxBoolItem& rFooterOn =
+ (const SfxBoolItem&)rFooterSet.Get( GetWhich( SID_ATTR_PAGE_ON ) );
+
+ if ( rFooterOn.GetValue() )
+ {
+ const SfxBoolItem& rDynamic = (const SfxBoolItem&)
+ rFooterSet.Get( GetWhich( SID_ATTR_PAGE_DYNAMIC ) );
+ const SvxSizeItem& rSize = (const SvxSizeItem&)
+ rFooterSet.Get( GetWhich( SID_ATTR_PAGE_SIZE ) );
+ const SvxULSpaceItem& rUL = (const SvxULSpaceItem&)
+ rFooterSet.Get( GetWhich( SID_ATTR_ULSPACE ) );
+ const SvxLRSpaceItem& rLR = (const SvxLRSpaceItem&)
+ rFooterSet.Get( GetWhich( SID_ATTR_LRSPACE ) );
+ long nDist = rUL.GetUpper();
+
+ aBspWin.SetFtHeight( rSize.GetSize().Height() - nDist );
+ aBspWin.SetFtDist( nDist );
+ aBspWin.SetFtLeft( rLR.GetLeft() );
+ aBspWin.SetFtRight( rLR.GetRight() );
+ aBspWin.SetFooter( TRUE );
+ }
+ else
+ pSetItem = 0;
+ }
+
+ if ( !pSetItem )
+ {
+ aBspWin.SetFooter( FALSE );
+
+ if ( SID_ATTR_PAGE_FOOTERSET == nId )
+ aCntSharedBox.Disable();
+ }
+
+ pItem = GetItem( rSet, SID_ATTR_PAGE_EXT1 );
+
+ if ( pItem && pItem->ISA(SfxBoolItem) )
+ {
+ aBspWin.SetTable( TRUE );
+ aBspWin.SetHorz( ( (SfxBoolItem*)pItem )->GetValue() );
+ }
+
+ pItem = GetItem( rSet, SID_ATTR_PAGE_EXT2 );
+
+ if ( pItem && pItem->ISA(SfxBoolItem) )
+ {
+ aBspWin.SetTable( TRUE );
+ aBspWin.SetVert( ( (SfxBoolItem*)pItem )->GetValue() );
+ }
+ ResetBackground_Impl( rSet );
+ RangeHdl( 0 );
+}
+
+/*--------------------------------------------------------------------
+ Beschreibung:
+ --------------------------------------------------------------------*/
+
+int SvxHFPage::DeactivatePage( SfxItemSet* pSet )
+{
+ if ( pSet )
+ FillItemSet( *pSet );
+ return LEAVE_PAGE;
+}
+
+/*--------------------------------------------------------------------
+ Beschreibung: Berech
+ --------------------------------------------------------------------*/
+
+IMPL_LINK( SvxHFPage, RangeHdl, Edit *, EMPTYARG )
+{
+ long nHHeight = aBspWin.GetHdHeight();
+ long nHDist = aBspWin.GetHdDist();
+
+ long nFHeight = aBspWin.GetFtHeight();
+ long nFDist = aBspWin.GetFtDist();
+
+ long nHeight = Max( (long)MINBODY,
+ aHeightEdit.Denormalize( aHeightEdit.GetValue( FUNIT_TWIP ) ) );
+ long nDist = aTurnOnBox.IsChecked() ?
+ aDistEdit.Denormalize( aDistEdit.GetValue( FUNIT_TWIP ) ) : 0;
+
+ long nMin;
+ long nMax;
+
+ if ( nId == SID_ATTR_PAGE_HEADERSET )
+ {
+ nHHeight = nHeight;
+ nHDist = nDist;
+ }
+ else
+ {
+ nFHeight = nHeight;
+ nFDist = nDist;
+ }
+
+ // Aktuelle Werte der Seitenraender
+ long nBT = aBspWin.GetTop();
+ long nBB = aBspWin.GetBottom();
+ long nBL = aBspWin.GetLeft();
+ long nBR = aBspWin.GetRight();
+
+ long nH = aBspWin.GetSize().Height();
+ long nW = aBspWin.GetSize().Width();
+
+ // Grenzen
+ if ( nId == SID_ATTR_PAGE_HEADERSET )
+ {
+ // Header
+ nMin = ( nH - nBB - nBT ) / 5; // 20%
+ nMax = Max( nH - nMin - nHDist - nFDist - nFHeight - nBB - nBT,
+ nMin );
+ aHeightEdit.SetMax( aHeightEdit.Normalize( nMax ), FUNIT_TWIP );
+ nMin = ( nH - nBB - nBT ) / 5; // 20%
+ nDist = Max( nH - nMin - nHHeight - nFDist - nFHeight - nBB - nBT,
+ long(0) );
+ aDistEdit.SetMax( aDistEdit.Normalize( nDist ), FUNIT_TWIP );
+ }
+ else
+ {
+ // Footer
+ nMin = ( nH - nBT - nBB ) / 5; // 20%
+ nMax = Max( nH - nMin - nFDist - nHDist - nHHeight - nBT - nBB,
+ nMin );
+ aHeightEdit.SetMax( aHeightEdit.Normalize( nMax ), FUNIT_TWIP );
+ nMin = ( nH - nBT - nBB ) / 5; // 20%
+ nDist = Max( nH - nMin - nFHeight - nHDist - nHHeight - nBT - nBB,
+ long(0) );
+ aDistEdit.SetMax( aDistEdit.Normalize( nDist ), FUNIT_TWIP );
+ }
+
+ // Einzuege beschraenken
+ nMax = nW - nBL - nBR -
+ aRMEdit.Denormalize( aRMEdit.GetValue( FUNIT_TWIP ) ) - MINBODY;
+ aLMEdit.SetMax( aLMEdit.Normalize( nMax ), FUNIT_TWIP );
+
+ nMax = nW - nBL - nBR -
+ aLMEdit.Denormalize( aLMEdit.GetValue( FUNIT_TWIP ) ) - MINBODY;
+ aRMEdit.SetMax( aLMEdit.Normalize( nMax ), FUNIT_TWIP );
+ return 0;
+}
+
+
diff --git a/svx/source/dialog/hdft.hrc b/svx/source/dialog/hdft.hrc
new file mode 100644
index 000000000000..001f87e59813
--- /dev/null
+++ b/svx/source/dialog/hdft.hrc
@@ -0,0 +1,86 @@
+/*************************************************************************
+ *
+ * $RCSfile: hdft.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:08 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SVX_HDFT_HRC
+#define _SVX_HDFT_HRC
+
+// defines ---------------------------------------------------------------
+
+#define CB_TURNON 10
+#define FT_DIST 11
+#define ED_DIST 12
+#define FT_HEIGHT 13
+#define ED_HEIGHT 14
+#define CB_HEIGHT_DYN 15
+#define FT_LMARGIN 16
+#define ED_LMARGIN 17
+#define FT_RMARGIN 18
+#define ED_RMARGIN 19
+#define CB_SHARED 20
+#define GB_FRAME 21
+
+#define WN_BSP 30
+#define GB_BSP 31
+
+#define BTN_EXTRAS 40
+
+
+#endif
+
diff --git a/svx/source/dialog/hdft.src b/svx/source/dialog/hdft.src
new file mode 100644
index 000000000000..287fb58086b6
--- /dev/null
+++ b/svx/source/dialog/hdft.src
@@ -0,0 +1,863 @@
+/*************************************************************************
+ *
+ * $RCSfile: hdft.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:08 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+ // include ---------------------------------------------------------------
+#include "helpid.hrc"
+#include "dialogs.hrc"
+#include "hdft.hrc"
+ // pragma ----------------------------------------------------------------
+
+ // RID_SVXPAGE_HEADER ----------------------------------------------------
+TabPage RID_SVXPAGE_HEADER
+{
+ HelpId = HID_FORMAT_HEADER ;
+ Hide = TRUE ;
+ Text = "Kopfzeile" ;
+ Text [ English ] = "Header" ;
+ Text [ norwegian ] = "Header" ;
+ Text [ italian ] = "Intestazione" ;
+ Text [ portuguese_brazilian ] = "Cabealho" ;
+ Text [ portuguese ] = "Cabealho" ;
+ Text [ finnish ] = "Ylteksti" ;
+ Text [ danish ] = "Sidehoved" ;
+ Text [ french ] = "En-tte" ;
+ Text [ swedish ] = "Sidhuvud" ;
+ Text [ dutch ] = "Koptekst" ;
+ Text [ spanish ] = "Encabezamiento" ;
+ Text [ english_us ] = "Header" ;
+ Size = MAP_APPFONT ( 260 , 135 ) ;
+ CheckBox CB_TURNON
+ {
+ Pos = MAP_APPFONT ( 12 , 15 ) ;
+ Size = MAP_APPFONT ( 145 , 10 ) ;
+ Text = "~Kopfzeile einschalten" ;
+ Text [ ENGLISH ] = "~Turn on header" ;
+ Text [ norwegian ] = "Header, ~with distance" ;
+ Text [ italian ] = "Attiva riga d'intestazione" ;
+ Text [ portuguese_brazilian ] = "Cabealho, ~com distncia" ;
+ Text [ portuguese ] = "Activar ~cabealho" ;
+ Text [ finnish ] = "Ylteksti ~etisyydell" ;
+ Text [ danish ] = "Aktiver sidehoved" ;
+ Text [ french ] = "Activer l'~en-tte " ;
+ Text [ swedish ] = "~Sidhuvud p" ;
+ Text [ dutch ] = "~Koptekst inschakelen" ;
+ Text [ spanish ] = "~Activar encabezamiento" ;
+ Text [ english_us ] = "Hea~der on" ;
+ Text[ chinese_simplified ] = "ʾҳü(~H)";
+ Text[ russian ] = ". ";
+ Text[ polish ] = "~Wcz nagwek";
+ Text[ japanese ] = "ͯނt(~H)";
+ Text[ chinese_traditional ] = "ܭ(~H)";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = "Ӹ (~D)";
+ Text[ turkish ] = "~stbilgi olutur";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_DIST
+ {
+ Pos = MAP_APPFONT ( 12 , 31 ) ;
+ Size = MAP_APPFONT ( 102 , 10 ) ;
+ Text = "A~bstand" ;
+ Text [ English ] = "~Distance" ;
+ Text [ english_us ] = "~Spacing" ;
+ Text [ portuguese_brazilian ] = "~Hhe" ;
+ Text [ swedish ] = "A~vstnd" ;
+ Text [ danish ] = "Afstand" ;
+ Text [ italian ] = "~Distanza" ;
+ Text [ spanish ] = "~Espacio" ;
+ Text [ french ] = "~cart" ;
+ Text [ dutch ] = "~Afstand" ;
+ Text [ portuguese ] = "~Espaamento" ;
+ Text[ chinese_simplified ] = "(~S)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Odstp";
+ Text[ japanese ] = "Ԋu(~S)";
+ Text[ chinese_traditional ] = "j(~S)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "~";
+ Text[ korean ] = "(~S)";
+ Text[ turkish ] = "U~zaklk";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField ED_DIST
+ {
+ Disable = TRUE ;
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 117 , 30 ) ;
+ Size = MAP_APPFONT ( 40 , 12 ) ;
+ Left = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Maximum = 9999 ;
+ DecimalDigits = 2 ;
+ Unit = FUNIT_CM ;
+ Last = 9999 ;
+ SpinSize = 10 ;
+ };
+ FixedText FT_HEIGHT
+ {
+ Pos = MAP_APPFONT ( 12 , 46 ) ;
+ Size = MAP_APPFONT ( 102 , 10 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? ~Hhe : ~Hhe */
+ /* ### ACHTUNG: Neuer Text in Resource? ~Hhe : ~Hhe */
+ Text = "~Hhe" ;
+ Text [ ENGLISH ] = "~Height" ;
+ Text [ english_us ] = "~Height" ;
+ Text [ portuguese_brazilian ] = "~Hhe" ;
+ Text [ swedish ] = "~Hjd" ;
+ Text [ danish ] = "Hjde" ;
+ Text [ italian ] = "~Altezza" ;
+ Text [ spanish ] = "A~ltura" ;
+ Text [ french ] = "~Hauteur" ;
+ Text [ dutch ] = "~Hoogte" ;
+ Text [ portuguese ] = "~Altura" ;
+ Text[ chinese_simplified ] = "߶(~H)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Wys.";
+ Text[ japanese ] = "(~H)";
+ Text[ chinese_traditional ] = "(~H)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "(~H)";
+ Text[ turkish ] = "Y~kseklik";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField ED_HEIGHT
+ {
+ Disable = TRUE ;
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 117 , 45 ) ;
+ Size = MAP_APPFONT ( 40 , 12 ) ;
+ Left = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = 50 ;
+ Maximum = 9999 ;
+ DecimalDigits = 2 ;
+ Unit = FUNIT_CM ;
+ First = 50 ;
+ Last = 9999 ;
+ SpinSize = 10 ;
+ };
+ CheckBox CB_HEIGHT_DYN
+ {
+ Pos = MAP_APPFONT ( 12 , 63 ) ;
+ Size = MAP_APPFONT ( 145 , 10 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? Hhe ~dynamisch anpassen : Hhe ~dynamisch anpassen */
+ /* ### ACHTUNG: Neuer Text in Resource? Hhe ~dynamisch anpassen : Hhe ~dynamisch anpassen */
+ Text = "Hhe ~dynamisch anpassen" ;
+ Text [ ENGLISH ] = "~Dynamic height adjustment" ;
+ Text [ dutch ] = "Hoogte ~dynamisch aanpassen" ;
+ Text [ english_us ] = "~AutoFit height" ;
+ Text [ swedish ] = "An~passa hjd dynamiskt" ;
+ Text [ danish ] = "Juster hjde dynamisk" ;
+ Text [ italian ] = "Adatta altezza din~amicamente" ;
+ Text [ spanish ] = "Ajus~te dinmico de la altura" ;
+ Text [ french ] = "Adaptation ~dynamique de la hauteur" ;
+ Text [ portuguese ] = "Ajuste ~dinmico da altura" ;
+ Text [ portuguese_brazilian ] = "Hhe ~dynamisch anpassen" ;
+ Text[ chinese_simplified ] = "Զ߶(~A)";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Autodopasowanie wysokoci";
+ Text[ japanese ] = "(~A)";
+ Text[ chinese_traditional ] = "۰ʽվ㰪(~A)";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ڵ (~A)";
+ Text[ turkish ] = "Ykseklii oto~matik olarak ayarla";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_LMARGIN
+ {
+ Pos = MAP_APPFONT ( 12 , 80 ) ;
+ Size = MAP_APPFONT ( 102 , 10 ) ;
+ Text = "~Linker Rand" ;
+ Text [ ENGLISH ] = "~Left Margin" ;
+ Text [ norwegian ] = "~Left Margin" ;
+ Text [ italian ] = "Margine sinistro" ;
+ Text [ portuguese_brazilian ] = "~Cabealho da Margem Esquerda" ;
+ Text [ portuguese ] = "Margem ~esquerda" ;
+ Text [ finnish ] = "~Vasemman reunan ylteksti" ;
+ Text [ danish ] = "Venstre margen" ;
+ Text [ french ] = "Marge ~gauche" ;
+ Text [ swedish ] = "Vnstermargina~l" ;
+ Text [ dutch ] = "~Linker marge" ;
+ Text [ spanish ] = "Margen ~izquierdo" ;
+ Text [ english_us ] = "~Left margin" ;
+ Left = TRUE ;
+ Text[ chinese_simplified ] = "ҳ߾(~L)";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Lewy margines";
+ Text[ japanese ] = "](~L)";
+ Text[ chinese_traditional ] = "ť(~L)";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " (~L)";
+ Text[ turkish ] = "S~ol kenar";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField ED_LMARGIN
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 117 , 79 ) ;
+ Size = MAP_APPFONT ( 40 , 12 ) ;
+ Left = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Maximum = 9999 ;
+ Minimum = 0 ;
+ DecimalDigits = 2 ;
+ Unit = FUNIT_CM ;
+ Last = 9999 ;
+ SpinSize = 10 ;
+ };
+ FixedText FT_RMARGIN
+ {
+ Pos = MAP_APPFONT ( 12 , 95 ) ;
+ Size = MAP_APPFONT ( 102 , 10 ) ;
+ Text = "~Rechter Rand" ;
+ Text [ ENGLISH ] = "R~ight Margin" ;
+ Text [ norwegian ] = "R~ight Margin" ;
+ Text [ italian ] = "~Margine destro" ;
+ Text [ portuguese_brazilian ] = "Margem Direita Cabealho" ;
+ Text [ portuguese ] = "Margem ~direita" ;
+ Text [ finnish ] = "~Oikean reunan ylteksti" ;
+ Text [ danish ] = "Hjre margen" ;
+ Text [ french ] = "Marge ~droite" ;
+ Text [ swedish ] = "Hge~rmarginal" ;
+ Text [ dutch ] = "~Rechter marge" ;
+ Text [ spanish ] = "Margen ~derecho" ;
+ Text [ english_us ] = "R~ight margin" ;
+ Left = TRUE ;
+ Text[ chinese_simplified ] = "ҷҳ߾(~I)";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Prawy margines";
+ Text[ japanese ] = "E](~I)";
+ Text[ chinese_traditional ] = "kť(~I)";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " (~I)";
+ Text[ turkish ] = "~Sa kenar";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField ED_RMARGIN
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 117 , 94 ) ;
+ Size = MAP_APPFONT ( 40 , 12 ) ;
+ Left = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = 0 ;
+ Maximum = 9999 ;
+ DecimalDigits = 2 ;
+ Unit = FUNIT_CM ;
+ Last = 9999 ;
+ SpinSize = 10 ;
+ };
+ CheckBox CB_SHARED
+ {
+ Pos = MAP_APPFONT ( 12 , 112 ) ;
+ Size = MAP_APPFONT ( 145 , 10 ) ;
+ Text = "~Inhalt links/rechts gleich" ;
+ Text [ ENGLISH ] = "Same ~content left/right" ;
+ Text [ norwegian ] = "Same ~content left/right" ;
+ Text [ italian ] = "~Contenuto uguale destra/sinistra" ;
+ Text [ portuguese_brazilian ] = "Mesmo ~contedo esquerda/direita" ;
+ Text [ portuguese ] = "Mesmo ~contedo esquerda/direita" ;
+ Text [ finnish ] = "Sama ~sislt vasemmalla/oikealla" ;
+ Text [ danish ] = "Ens indhold venstre/hjre" ;
+ Text [ french ] = "~Contenu identique gauche/droite" ;
+ Text [ swedish ] = "Samma ~innehll hger/vnster" ;
+ Text [ dutch ] = "Links/rechts dezelfde ~inhoud" ;
+ Text [ spanish ] = "~Contenido a la izquierda/derecha igual" ;
+ Text [ english_us ] = "Same ~content left/right" ;
+ Text[ chinese_simplified ] = "ͬ(~C)";
+ Text[ russian ] = " /";
+ Text[ polish ] = "Zawarto~ z lewej i z prawej jest taka sama";
+ Text[ japanese ] = "E߰ޓꍀ(~C)";
+ Text[ chinese_traditional ] = "ekۦP(~C)";
+ Text[ arabic ] = " /";
+ Text[ greek ] = " /";
+ Text[ korean ] = " / (~C)";
+ Text[ turkish ] = "Sol/sa ierik ay~n";
+ Text[ language_user1 ] = " ";
+ };
+ GroupBox GB_FRAME
+ {
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 157 , 125 ) ;
+ Text = "Kopfzeile" ;
+ Text [ ENGLISH ] = "Header" ;
+ Text [ norwegian ] = "Header" ;
+ Text [ italian ] = "Intestazione" ;
+ Text [ portuguese_brazilian ] = "Cabealho" ;
+ Text [ portuguese ] = "Cabealho" ;
+ Text [ finnish ] = "Ylteksti" ;
+ Text [ danish ] = "Sidehoved" ;
+ Text [ french ] = "En-tte" ;
+ Text [ swedish ] = "Sidhuvud" ;
+ Text [ dutch ] = "Koptekst" ;
+ Text [ spanish ] = "Encabezamiento" ;
+ Text [ english_us ] = "Headers" ;
+ Text[ chinese_simplified ] = "ҳü";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Nagwek";
+ Text[ japanese ] = "ͯ";
+ Text[ chinese_traditional ] = "";
+ Text[ arabic ] = " ";
+ Text[ greek ] = "";
+ Text[ korean ] = "Ӹ";
+ Text[ turkish ] = "stbilgi";
+ Text[ language_user1 ] = " ";
+ };
+ Window WN_BSP
+ {
+ Pos = MAP_APPFONT ( 176 , 14 ) ;
+ Size = MAP_APPFONT ( 72 , 54 ) ;
+ };
+ GroupBox GB_BSP
+ {
+ Pos = MAP_APPFONT ( 171 , 3 ) ;
+ Size = MAP_APPFONT ( 83 , 71 ) ;
+ Text = "Vorschau" ;
+ Text [ ENGLISH ] = "Example" ;
+ Text [ norwegian ] = "Eksempel" ;
+ Text [ italian ] = "Anteprima" ;
+ Text [ portuguese_brazilian ] = "Exemplo" ;
+ Text [ portuguese ] = "Previsualizar" ;
+ Text [ finnish ] = "Malli" ;
+ Text [ danish ] = "Eksempel" ;
+ Text [ french ] = "Aperu" ;
+ Text [ swedish ] = "Frhandsvisning" ;
+ Text [ dutch ] = "Voorbeeld" ;
+ Text [ spanish ] = "Previsualizacin" ;
+ Text [ english_us ] = "Preview" ;
+ Text[ chinese_simplified ] = "Ԥ";
+ Text[ russian ] = "";
+ Text[ polish ] = "Podgld";
+ Text[ japanese ] = "ޭ";
+ Text[ chinese_traditional ] = "w";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "̸ ";
+ Text[ turkish ] = "nizleme";
+ Text[ language_user1 ] = " ";
+ };
+ PushButton BTN_EXTRAS
+ {
+ Pos = MAP_APPFONT ( 186 , 94 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? Zus~tze... : Zus~tze... */
+ /* ### ACHTUNG: Neuer Text in Resource? Zus~tze... : Zus~tze... */
+ Text = "Zus~tze..." ;
+ Text [ ENGLISH ] = "Option~s..." ;
+ Text [ norwegian ] = "Option~s..." ;
+ Text [ italian ] = "E~xtra..." ;
+ Text [ portuguese_brazilian ] = "Ope~s..." ;
+ Text [ portuguese ] = "~Outros..." ;
+ Text [ finnish ] = "~Mritykset..." ;
+ Text [ danish ] = "Flere..." ;
+ Text [ french ] = "~Options..." ;
+ Text [ swedish ] = "~Fler..." ;
+ Text [ dutch ] = "~Overige..." ;
+ Text [ spanish ] = "~Opciones..." ;
+ Text [ english_us ] = "~More..." ;
+ Text[ chinese_simplified ] = "(~M)...";
+ Text[ russian ] = "...";
+ Text[ polish ] = "Dodatki...";
+ Text[ japanese ] = "߼(~M)...";
+ Text[ chinese_traditional ] = "L(~M)...";
+ Text[ arabic ] = "...";
+ Text[ greek ] = "...";
+ Text[ korean ] = "(~M)...";
+ Text[ turkish ] = "Ayr~ntlar...";
+ Text[ language_user1 ] = " ";
+ };
+ Text[ chinese_simplified ] = "ҳü";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Nagwek";
+ Text[ japanese ] = "ͯ";
+ Text[ chinese_traditional ] = "";
+ Text[ arabic ] = " ";
+ Text[ greek ] = "";
+ Text[ korean ] = "Ӹ";
+ Text[ turkish ] = "stbilgi";
+ Text[ language_user1 ] = " ";
+};
+ // RID_SVXPAGE_FOOTER ----------------------------------------------------
+TabPage RID_SVXPAGE_FOOTER
+{
+ HelpId = HID_FORMAT_FOOTER ;
+ Hide = TRUE ;
+ /* ### ACHTUNG: Neuer Text in Resource? Fuzeile : Fuzeile */
+ /* ### ACHTUNG: Neuer Text in Resource? Fuzeile : Fuzeile */
+ Text = "Fuzeile" ;
+ Text [ English ] = "Footer" ;
+ Text [ norwegian ] = "Footer" ;
+ Text [ italian ] = "Pi di pagina" ;
+ Text [ portuguese_brazilian ] = "Rodap" ;
+ Text [ portuguese ] = "Rodap" ;
+ Text [ finnish ] = "Alateksti" ;
+ Text [ danish ] = "Sidefod" ;
+ Text [ french ] = "Pied de page" ;
+ Text [ swedish ] = "Sidfot" ;
+ Text [ dutch ] = "Voettekst" ;
+ Text [ spanish ] = "Pie de pgina" ;
+ Text [ english_us ] = "Footer" ;
+ Size = MAP_APPFONT ( 260 , 135 ) ;
+ CheckBox CB_TURNON
+ {
+ Pos = MAP_APPFONT ( 12 , 15 ) ;
+ Size = MAP_APPFONT ( 145 , 10 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? ~Fuzeile einschalten : ~Fuzeile einschalten */
+ /* ### ACHTUNG: Neuer Text in Resource? ~Fuzeile einschalten : ~Fuzeile einschalten */
+ Text = "~Fuzeile einschalten" ;
+ Text [ ENGLISH ] = "~Turn on Footer" ;
+ Text [ norwegian ] = "~Footer, with distance" ;
+ Text [ italian ] = "~Attiva pi di pagina" ;
+ Text [ portuguese_brazilian ] = "~Rodap com distncia" ;
+ Text [ portuguese ] = "Activar ~rodap" ;
+ Text [ finnish ] = "~Alatekstin etisyys" ;
+ Text [ danish ] = "Aktiver sidefod" ;
+ Text [ french ] = "~Activer le pied de page" ;
+ Text [ swedish ] = "Sid~fot p" ;
+ Text [ dutch ] = "~Voettekst inschakelen" ;
+ Text [ spanish ] = "~Activar pie de pgina" ;
+ Text [ english_us ] = "~Footer on" ;
+ Text[ chinese_simplified ] = "ʾҳ(~F)";
+ Text[ russian ] = ". ";
+ Text[ polish ] = "Wcz stopk";
+ Text[ japanese ] = "̯t(~e)";
+ Text[ chinese_traditional ] = "ܭ(~F)";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = "ٴڱ (~F)";
+ Text[ turkish ] = "A~ltbilgi olutur";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_DIST
+ {
+ Pos = MAP_APPFONT ( 12 , 31 ) ;
+ Size = MAP_APPFONT ( 102 , 10 ) ;
+ Text = "A~bstand" ;
+ Text [ English ] = "~Distance" ;
+ Text [ english_us ] = "~Spacing" ;
+ Text [ portuguese_brazilian ] = "~Hhe" ;
+ Text [ swedish ] = "A~vstnd" ;
+ Text [ danish ] = "Afstand" ;
+ Text [ italian ] = "~Distanza" ;
+ Text [ spanish ] = "Es~pacio" ;
+ Text [ french ] = "~cart" ;
+ Text [ dutch ] = "~Afstand" ;
+ Text [ portuguese ] = "~Espaamento" ;
+ Text[ chinese_simplified ] = "(~S)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Odstp";
+ Text[ japanese ] = "Ԋu(~S)";
+ Text[ chinese_traditional ] = "j(~S)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "~";
+ Text[ korean ] = "(~S)";
+ Text[ turkish ] = "~Uzaklk";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField ED_DIST
+ {
+ Disable = TRUE ;
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 117 , 30 ) ;
+ Size = MAP_APPFONT ( 40 , 12 ) ;
+ Left = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Maximum = 9999 ;
+ DecimalDigits = 2 ;
+ Unit = FUNIT_CM ;
+ Last = 9999 ;
+ SpinSize = 10 ;
+ };
+ FixedText FT_HEIGHT
+ {
+ Pos = MAP_APPFONT ( 12 , 46 ) ;
+ Size = MAP_APPFONT ( 102 , 10 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? ~Hhe : ~Hhe */
+ /* ### ACHTUNG: Neuer Text in Resource? ~Hhe : ~Hhe */
+ Text = "~Hhe" ;
+ Text [ ENGLISH ] = "~Height" ;
+ Disable = TRUE ;
+ Text [ english_us ] = "~Height" ;
+ Text [ portuguese_brazilian ] = "~Hhe" ;
+ Text [ swedish ] = "~Hjd" ;
+ Text [ danish ] = "Hjde" ;
+ Text [ italian ] = "~Altezza" ;
+ Text [ spanish ] = "A~ltura" ;
+ Text [ french ] = "~Hauteur" ;
+ Text [ dutch ] = "~Hoogte" ;
+ Text [ portuguese ] = "~Altura" ;
+ Text[ chinese_simplified ] = "߶(~H)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Wys.";
+ Text[ japanese ] = "(~H)";
+ Text[ chinese_traditional ] = "(~H)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "(~H)";
+ Text[ turkish ] = "Y~kseklik";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField ED_HEIGHT
+ {
+ Disable = TRUE ;
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 117 , 45 ) ;
+ Size = MAP_APPFONT ( 40 , 12 ) ;
+ Left = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = 50 ;
+ Maximum = 9999 ;
+ DecimalDigits = 2 ;
+ Unit = FUNIT_CM ;
+ First = 50 ;
+ Last = 9999 ;
+ SpinSize = 10 ;
+ };
+ CheckBox CB_HEIGHT_DYN
+ {
+ Pos = MAP_APPFONT ( 12 , 63 ) ;
+ Size = MAP_APPFONT ( 145 , 10 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? Hhe ~dynamisch anpassen : Hhe ~dynamisch anpassen */
+ /* ### ACHTUNG: Neuer Text in Resource? Hhe ~dynamisch anpassen : Hhe ~dynamisch anpassen */
+ Text = "Hhe ~dynamisch anpassen" ;
+ Text [ ENGLISH ] = "~Dynamic height adjustment" ;
+ Text [ norwegian ] = "Footer height ~dynamic" ;
+ Text [ italian ] = "Adatta altezza din~amicamente" ;
+ Text [ portuguese_brazilian ] = "Rodap dinmica da ~altura" ;
+ Text [ portuguese ] = "Ajuste dinmico da altura" ;
+ Text [ finnish ] = "Alatekstin korkeus ~dynaaminen" ;
+ Text [ danish ] = "Juster hjde dynamisk" ;
+ Text [ french ] = "Adaptation ~dynamique de la hauteur" ;
+ Text [ swedish ] = "An~passa hjd dynamiskt" ;
+ Text [ dutch ] = "Hoogte ~dynamisch aanpassen" ;
+ Text [ spanish ] = "Aj~uste dinmico de la altura" ;
+ Text [ english_us ] = "~AutoFit height" ;
+ Text[ chinese_simplified ] = "Զ߶(~A)";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Autodopasowanie wysokoci";
+ Text[ japanese ] = "(~A)";
+ Text[ chinese_traditional ] = "۰ʽվ㰪(~A)";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ڵ(~A)";
+ Text[ turkish ] = "Ykseklii oto~matik olarak ayarla";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_LMARGIN
+ {
+ Pos = MAP_APPFONT ( 12 , 80 ) ;
+ Size = MAP_APPFONT ( 102 , 10 ) ;
+ Text = "~Linker Rand" ;
+ Text [ ENGLISH ] = "~Left Margin" ;
+ Text [ norwegian ] = "~Left Margin" ;
+ Text [ italian ] = "Margine sinistro" ;
+ Text [ portuguese_brazilian ] = "~Rodap da Margem Esquerda" ;
+ Text [ portuguese ] = "Margem ~esquerda" ;
+ Text [ finnish ] = "~Vasemman reunan alateksti" ;
+ Text [ danish ] = "Venstre margen" ;
+ Text [ french ] = "Marge ~gauche" ;
+ Text [ swedish ] = "Vnstermargina~l" ;
+ Text [ dutch ] = "~Linker marge" ;
+ Text [ spanish ] = "Margen ~izquierdo" ;
+ Text [ english_us ] = "~Left margin" ;
+ Left = TRUE ;
+ Text[ chinese_simplified ] = "߿հ(~L)";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Lewy margines";
+ Text[ japanese ] = "](~L)";
+ Text[ chinese_traditional ] = "ť(~L)";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " (~L)";
+ Text[ turkish ] = "S~ol kenar";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField ED_LMARGIN
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 117 , 79 ) ;
+ Size = MAP_APPFONT ( 40 , 12 ) ;
+ Left = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = 0 ;
+ Maximum = 9999 ;
+ DecimalDigits = 2 ;
+ Unit = FUNIT_CM ;
+ Last = 9999 ;
+ SpinSize = 10 ;
+ };
+ FixedText FT_RMARGIN
+ {
+ Pos = MAP_APPFONT ( 12 , 95 ) ;
+ Size = MAP_APPFONT ( 102 , 10 ) ;
+ Text = "~Rechter Rand" ;
+ Text [ ENGLISH ] = "R~ight Margin" ;
+ Text [ norwegian ] = "R~ight Margin" ;
+ Text [ italian ] = "Margine destro" ;
+ Text [ portuguese_brazilian ] = "M~argem Direita Rodap" ;
+ Text [ portuguese ] = "Margem ~direita" ;
+ Text [ finnish ] = "~Oikean reunan alateksti" ;
+ Text [ danish ] = "Hjre margen" ;
+ Text [ french ] = "Marge dro~ite" ;
+ Text [ swedish ] = "Hge~rmarginal" ;
+ Text [ dutch ] = "~Rechter marge" ;
+ Text [ spanish ] = "Margen ~derecho" ;
+ Text [ english_us ] = "R~ight margin" ;
+ Left = TRUE ;
+ Text[ chinese_simplified ] = "ұ߿հ(~I)";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Prawy margines";
+ Text[ japanese ] = "E](~I)";
+ Text[ chinese_traditional ] = "kť(~I)";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " (~I)";
+ Text[ turkish ] = "~Sa kenar";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField ED_RMARGIN
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 117 , 94 ) ;
+ Size = MAP_APPFONT ( 40 , 12 ) ;
+ Left = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Minimum = 0 ;
+ Maximum = 9999 ;
+ DecimalDigits = 2 ;
+ Unit = FUNIT_CM ;
+ Last = 9999 ;
+ SpinSize = 10 ;
+ };
+ CheckBox CB_SHARED
+ {
+ Pos = MAP_APPFONT ( 12 , 112 ) ;
+ Size = MAP_APPFONT ( 145 , 10 ) ;
+ Text = "~Inhalt links/rechts gleich" ;
+ Text [ ENGLISH ] = "Same ~content left/right" ;
+ Text [ norwegian ] = "Same ~content left/right" ;
+ Text [ italian ] = "~Contenuto uguale destra/sinistra" ;
+ Text [ portuguese_brazilian ] = "Mesmo ~contedo esquerda/direita" ;
+ Text [ portuguese ] = "Mesmo ~contedo esquerda/direita" ;
+ Text [ finnish ] = "Sama ~sislt vasemmalla/oikealla" ;
+ Text [ danish ] = "Ens indhold venstre/hjre" ;
+ Text [ french ] = "~Contenu identique gauche/droite" ;
+ Text [ swedish ] = "Samma ~innehll hger/vnster" ;
+ Text [ dutch ] = "Links/rechts dezelfde ~inhoud" ;
+ Text [ spanish ] = "Igual ~contenido a la izquierda/derecha" ;
+ Text [ english_us ] = "Same ~content left/right" ;
+ Text[ chinese_simplified ] = "ͬ(~C)";
+ Text[ russian ] = " /";
+ Text[ polish ] = "Zawarto z prawej i z lewej jest ta~ka sama";
+ Text[ japanese ] = "E߰ޓꍀ(~C)";
+ Text[ chinese_traditional ] = "ekۦP(~C)";
+ Text[ arabic ] = " /";
+ Text[ greek ] = " /";
+ Text[ korean ] = " / (~C)";
+ Text[ turkish ] = "Sol/sa ierik ay~n";
+ Text[ language_user1 ] = " ";
+ };
+ GroupBox GB_FRAME
+ {
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 157 , 125 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? Fuzeile : Fuzeile */
+ /* ### ACHTUNG: Neuer Text in Resource? Fuzeile : Fuzeile */
+ Text = "Fuzeile" ;
+ Text [ ENGLISH ] = "Footer" ;
+ Text [ norwegian ] = "Footer" ;
+ Text [ italian ] = "Pi di pagina" ;
+ Text [ portuguese_brazilian ] = "Rodap" ;
+ Text [ portuguese ] = "Rodap" ;
+ Text [ finnish ] = "Alateksti" ;
+ Text [ danish ] = "Sidefod" ;
+ Text [ french ] = "Pied de page" ;
+ Text [ swedish ] = "Sidfot" ;
+ Text [ dutch ] = "Voettekst" ;
+ Text [ spanish ] = "Pie de pgina" ;
+ Text [ english_us ] = "Footer" ;
+ Text[ chinese_simplified ] = "ҳ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Stopka";
+ Text[ japanese ] = "̯";
+ Text[ chinese_traditional ] = "";
+ Text[ arabic ] = " ";
+ Text[ greek ] = "";
+ Text[ korean ] = "ٴڱ";
+ Text[ turkish ] = "Altbilgi";
+ Text[ language_user1 ] = " ";
+ };
+ Window WN_BSP
+ {
+ Pos = MAP_APPFONT ( 176 , 14 ) ;
+ Size = MAP_APPFONT ( 72 , 54 ) ;
+ };
+ GroupBox GB_BSP
+ {
+ Pos = MAP_APPFONT ( 171 , 3 ) ;
+ Size = MAP_APPFONT ( 83 , 71 ) ;
+ Text = "Vorschau" ;
+ Text [ ENGLISH ] = "Example" ;
+ Text [ norwegian ] = "Eksempel" ;
+ Text [ italian ] = "Anteprima" ;
+ Text [ portuguese_brazilian ] = "Exemplo" ;
+ Text [ portuguese ] = "Previsualizar" ;
+ Text [ finnish ] = "Malli" ;
+ Text [ danish ] = "Eksempel" ;
+ Text [ french ] = "Aperu" ;
+ Text [ swedish ] = "Frhandsvisning" ;
+ Text [ dutch ] = "Voorbeeld" ;
+ Text [ spanish ] = "Previsualizacin" ;
+ Text [ english_us ] = "Preview" ;
+ Text[ chinese_simplified ] = "Ԥ";
+ Text[ russian ] = "";
+ Text[ polish ] = "Podgld";
+ Text[ japanese ] = "ޭ";
+ Text[ chinese_traditional ] = "w";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "̸ ";
+ Text[ turkish ] = "nizleme";
+ Text[ language_user1 ] = " ";
+ };
+ PushButton BTN_EXTRAS
+ {
+ Pos = MAP_APPFONT ( 186 , 94 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? Zus~tze... : Zus~tze... */
+ Text = "Zus~tze..." ;
+ Text [ ENGLISH ] = "~Options..." ;
+ Text [ norwegian ] = "~Options..." ;
+ Text [ italian ] = "E~xtra..." ;
+ Text [ portuguese_brazilian ] = "~Opes..." ;
+ Text [ portuguese ] = "~Outros..." ;
+ Text [ finnish ] = "Mr~itykset..." ;
+ Text [ danish ] = "Flere..." ;
+ Text [ french ] = "~Options..." ;
+ Text [ swedish ] = "~Fler..." ;
+ Text [ dutch ] = "~Overige..." ;
+ Text [ spanish ] = "~Opciones..." ;
+ Text [ english_us ] = "~More..." ;
+ Text[ chinese_simplified ] = "(~M)...";
+ Text[ russian ] = "...";
+ Text[ polish ] = "Dodatki...";
+ Text[ japanese ] = "߼(~M)...";
+ Text[ chinese_traditional ] = "L(~M)...";
+ Text[ arabic ] = "...";
+ Text[ greek ] = "...";
+ Text[ korean ] = "(~M)...";
+ Text[ turkish ] = "Ayr~ntlar...";
+ Text[ language_user1 ] = " ";
+ };
+ Text[ chinese_simplified ] = "ҳ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Stopka";
+ Text[ japanese ] = "̯";
+ Text[ chinese_traditional ] = "";
+ Text[ arabic ] = " ";
+ Text[ greek ] = "";
+ Text[ korean ] = "ٴڱ";
+ Text[ turkish ] = "Altbilgi";
+ Text[ language_user1 ] = " ";
+};
+QueryBox RID_SVXQBX_DELETE_HEADFOOT
+{
+ Buttons = WB_YES_NO ;
+ DefButton = WB_DEF_NO ;
+ /* ### ACHTUNG: Neuer Text in Resource? Das Ausschalten der Kopf- oder Fuzeilen lscht vorhandenen Text.\nMchten Sie den Inhalt lschen? : Das Ausschalten der Kopf- oder Fuzeilen lscht vorhandenen Text.\nMchten Sie den Inhalt lschen? */
+ Message = "Das Ausschalten der Kopf- oder Fuzeilen lscht vorhandenen Text.\nMchten Sie den Inhalt lschen?" ;
+ Message [ English ] = "Turn off the header or footer delete its contents.\nAre you sure you want to delete this text?" ;
+ Message [ norwegian ] = "Turn off the header or footer delete its contents.\nAre you sure you want to delete this text?" ;
+ Message [ italian ] = "Disattivando l'intestazione o il pi di pagina il testo esistente verr cancellato.\nCancellare il contenuto?" ;
+ Message [ portuguese_brazilian ] = "Desativar o cabealho ou o rodap apagar seu contedo.\nTem certeza que deseja apagar este texto?" ;
+ Message [ portuguese ] = "Ao desactivar o cabealho ou o rodap apaga o respectivo contedo.\nDeseja realmente eliminar o texto?" ;
+ Message [ finnish ] = "Jos poistat yl/alatekstin, sen sislt katoaa.\nHaluatko varmasti poistaa tmn tekstin?" ;
+ Message [ danish ] = "Hvis sidehoved eller sidefod deaktiveres, slettes indholdet.\nVil du slette indholdet?" ;
+ Message [ french ] = "Dsactivez l'en-tte ou le pied de page pour supprimer son contenu.\ntes-vous sr de vouloir supprimer ce texte ?" ;
+ Message [ swedish ] = "Deaktivering av sidhuvud eller sidfot raderar innehllet. \nVill Du radera innehllet?" ;
+ Message [ dutch ] = "Als u de kop- of voettekst uitschakelt, wordt de inhoud ervan verwijderd.\nWeet u zeker dat u deze tekst wilt verwijderen?" ;
+ Message [ spanish ] = "Al desactivar el encabezamiento o pie de pgina se eliminar su contenido.\nDesea eliminarlo?" ;
+ Message [ english_us ] = "Removing headers or footers deletes the contents.\nAre you sure you want to delete this text?" ;
+ Message[ chinese_simplified ] = "ʧҳüҳžͻɾǰִ֡\nҪɾЩ";
+ Message[ russian ] = " .\n ?";
+ Message[ polish ] = "Wyczenie stopki i nagwka spowoduje usunicie istniejcego tekstu. \nChcesz skasowa ten tekst?";
+ Message[ japanese ] = "ͯނ܂̯OƊY̓e폜܂B\n폜Ă낵ł?";
+ Message[ chinese_traditional ] = "έN|Re{srC\nznRoǤrH";
+ Message[ arabic ] = " / .\n տ";
+ Message[ greek ] = " . \n ;";
+ Message[ korean ] = "Ӹ̳ ٴڱ ָ ؽƮ ˴ϴ. \n Ͻðڽϱ?";
+ Message[ turkish ] = "stbilgi ve altbilginin kaldrlmas ile mevcut metin silinecek.\nerii silmek istiyor musunuz?";
+ Message[ language_user1 ] = " ";
+};
+
+ // ********************************************************************** EOF
diff --git a/svx/source/dialog/hldocntp.cxx b/svx/source/dialog/hldocntp.cxx
new file mode 100644
index 000000000000..7d52cf667194
--- /dev/null
+++ b/svx/source/dialog/hldocntp.cxx
@@ -0,0 +1,781 @@
+/*************************************************************************
+ *
+ * $RCSfile: hldocntp.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:08 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+
+#ifndef _SFXVIEWFRM_HXX
+#include <sfx2/viewfrm.hxx>
+#endif
+#ifndef _SFX_OBJFAC_HXX
+#include <sfx2/docfac.hxx>
+#endif
+
+#ifndef _COM_SUN_STAR_UNO_REFERENCE_H_
+#include <com/sun/star/uno/Reference.h>
+#endif
+
+#ifndef _UCBHELPER_CONTENTBROKER_HXX
+#include <ucbhelper/contentbroker.hxx>
+#endif
+
+#ifndef _UCBHELPER_CONTENT_HXX
+#include <ucbhelper/content.hxx>
+#endif
+
+#ifndef _COM_SUN_STAR_SDBC_XRESULTSET_HPP_
+#include <com/sun/star/sdbc/XResultSet.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_UNO_SEQUENCE_H_
+#include <com/sun/star/uno/Sequence.h>
+#endif
+
+#ifndef _COM_SUN_STAR_SDBC_XROW_HPP_
+#include <com/sun/star/sdbc/XRow.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_UCB_XCONTENTACCESS_HPP_
+#include <com/sun/star/ucb/XContentAccess.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_UNO_EXCEPTION_HPP_
+#include <com/sun/star/uno/Exception.hpp>
+#endif
+
+#ifndef _SV_CONFIG_HXX
+#include <vcl/config.hxx>
+#endif
+
+#ifndef _SV_SYSTEM_HXX
+#include <vcl/system.hxx>
+#endif
+
+#ifndef _SV_IMAGE_HXX
+#include <vcl/image.hxx>
+#endif
+
+#ifndef _URLOBJ_HXX
+#include <tools/urlobj.hxx>
+#endif
+
+#include "hldocntp.hxx"
+#include "hyperdlg.hrc"
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+
+/*************************************************************************
+|*
+|* Data-struct for documenttypes in listbox
+|*
+|************************************************************************/
+
+struct DocumentTypeData
+{
+ String aStrURL;
+ String aStrExt;
+ DocumentTypeData (String aURL, String aExt) : aStrURL(aURL), aStrExt(aExt)
+ {}
+};
+
+/*************************************************************************
+|*
+|* Contructor / Destructor
+|*
+|************************************************************************/
+
+SvxHyperlinkNewDocTp::SvxHyperlinkNewDocTp ( Window *pParent, const SfxItemSet& rItemSet)
+: maGrpNewDoc ( this, ResId (GRP_NEWDOCUMENT) ),
+ maRbtEditNow ( this, ResId (RB_EDITNOW) ),
+ maRbtEditLater ( this, ResId (RB_EDITLATER) ),
+ maFtPath ( this, ResId (FT_PATH_NEWDOC) ),
+ maEdPath ( this, ResId (ED_PATH_NEWDOC) ),
+ maFtDocTypes ( this, ResId (FT_DOCUMENT_TYPES) ),
+ maLbDocTypes ( this, ResId (LB_DOCUMENT_TYPES) ),
+ maBtCreate ( this, ResId (BTN_CREATE) ),
+ SvxHyperlinkTabPageBase ( pParent, SVX_RES( RID_SVXPAGE_HYPERLINK_NEWDOCUMENT ),
+ rItemSet )
+{
+ InitStdControls();
+ FreeResource();
+
+ SetExchangeSupport ();
+
+ // set defaults
+ maRbtEditNow.Check();
+
+ maBtCreate.SetClickHdl ( LINK ( this, SvxHyperlinkNewDocTp, ClickNewHdl_Impl ) );
+ maEdPath.SetLoseFocusHdl ( LINK ( this, SvxHyperlinkNewDocTp, LostFocusTargetHdl_Impl ) );
+ maEdPath.SetModifyHdl ( LINK ( this, SvxHyperlinkNewDocTp, ModifiedPathHdl_Impl ) );
+ maLbDocTypes.SetDoubleClickHdl( LINK ( this, SvxHyperlinkNewDocTp, DClickDocTypeHdl_Impl ) );
+
+ FillDocumentList ();
+}
+
+SvxHyperlinkNewDocTp::~SvxHyperlinkNewDocTp ()
+{
+ for ( int n=0; n<maLbDocTypes.GetEntryCount(); n++ )
+ {
+ DocumentTypeData* pTypeData = (DocumentTypeData*)
+ maLbDocTypes.GetEntryData ( n );
+ delete pTypeData;
+ }
+}
+
+/*************************************************************************
+|*
+|* Fill the all dialog-controls except controls in groupbox "more..."
+|*
+|************************************************************************/
+
+
+void SvxHyperlinkNewDocTp::FillDlgFields ( String& aStrURL )
+{
+}
+
+#define INTERNETSHORTCUT_ID_TAG "InternetShortcut"
+#define INTERNETSHORTCUT_TITLE_TAG "Title"
+#define INTERNETSHORTCUT_TARGET_TAG "Target"
+#define INTERNETSHORTCUT_FOLDER_TAG "Folder"
+#define INTERNETSHORTCUT_URL_TAG "URL"
+#define INTERNETSHORTCUT_ICONID_TAG "IconIndex"
+
+void SvxHyperlinkNewDocTp::ReadURLFile( const String& rFile, String& rTitle, String& rURL, sal_Int32& rIconId, BOOL* pShowAsFolder )
+{
+ // Open file
+ Config aCfg( rFile );
+ aCfg.SetGroup( INTERNETSHORTCUT_ID_TAG );
+
+ // read URL
+ rURL = aCfg.ReadKey( ByteString( RTL_CONSTASCII_STRINGPARAM( INTERNETSHORTCUT_URL_TAG) ), RTL_TEXTENCODING_ASCII_US );
+ rURL = SFX_INIMANAGER()->SubstPathVars( rURL );
+
+ // read target
+ if ( pShowAsFolder )
+ {
+ String aTemp( aCfg.ReadKey( ByteString( RTL_CONSTASCII_STRINGPARAM( INTERNETSHORTCUT_TARGET_TAG ) ), RTL_TEXTENCODING_ASCII_US ) );
+ *pShowAsFolder = aTemp == String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( INTERNETSHORTCUT_FOLDER_TAG ) );
+ }
+
+ // read image-ID
+ String aStrIconId( aCfg.ReadKey( ByteString( RTL_CONSTASCII_STRINGPARAM( INTERNETSHORTCUT_ICONID_TAG ) ), RTL_TEXTENCODING_ASCII_US ) );
+ rIconId = aStrIconId.ToInt32();
+
+ // read title
+ String aLangStr = SfxIniManager::Get()->SubstPathVars( String::CreateFromAscii( "$(vlang)" ) );
+ ByteString aLang( aLangStr, RTL_TEXTENCODING_UTF8 );
+ ByteString aGroup = INTERNETSHORTCUT_ID_TAG;
+ ( ( aGroup += '-' ) += aLang ) += ".W";
+ aCfg.SetGroup( aGroup );
+ rTitle = String( aCfg.ReadKey( INTERNETSHORTCUT_TITLE_TAG ), RTL_TEXTENCODING_UTF7 );
+}
+
+void SvxHyperlinkNewDocTp::FillDocumentList ()
+{
+ EnterWait();
+
+ SfxIniManager* pIni = SFX_APP()->GetIniManager();
+ String aStrDirName( pIni->Get( SFX_KEY_NEW_DIR ) );
+
+ INetURLObject aFolderObj( aStrDirName, INET_PROT_FILE );
+ try
+ {
+ ::ucb::Content aCnt( aFolderObj.GetMainURL(), uno::Reference< ::com::sun::star::ucb::XCommandEnvironment > () );
+ uno::Reference< sdbc::XResultSet > xResultSet;
+ uno::Sequence< OUString > aProps(1);
+ OUString* pProps = aProps.getArray();
+ pProps[0] == OUString::createFromAscii( "Url" );
+
+ try
+ {
+ xResultSet = aCnt.createCursor( aProps, ::ucb::INCLUDE_DOCUMENTS_ONLY );
+ }
+ catch ( uno::Exception )
+ {
+ DBG_ERRORFILE( "Hyperlink-dialog:'New Document':create cursor failed!" );
+ }
+
+ if ( xResultSet.is() )
+ {
+ uno::Reference< com::sun::star::ucb::XContentAccess > xContentAccess( xResultSet, uno::UNO_QUERY );
+ try
+ {
+ while ( xResultSet->next() )
+ {
+ OUString aFileURL = xContentAccess->queryContentIdentfierString();
+ INetURLObject aObj( aFileURL );
+
+ String aTitle;
+ String aURL;
+ BOOL bShowAsFolder;
+ sal_Int32 nIconId;
+
+ ReadURLFile( aObj.PathToFileName(), aTitle, aURL, nIconId, &bShowAsFolder);//, nImageId );
+
+ if( aURL.Len() && aTitle.Len() && !aURL.EqualsAscii("private:separator") &&
+ aURL.SearchAscii( "slot" ) == STRING_NOTFOUND && aURL.SearchAscii( "?" ) == STRING_NOTFOUND )
+ {
+ if ( aTitle.GetChar(0) == '_' && aTitle.GetChar(3) == '_' )
+ aTitle = aTitle.Erase( 0, 4 );
+
+ sal_Char const sTilde[] = "~";
+ aTitle.Erase ( aTitle.SearchAscii( sTilde ), 1 );
+
+ aURL = pIni->SubstPathVars( aURL );
+
+ if( !bShowAsFolder )
+ {
+ USHORT nTitleLen = aTitle.Len();
+ if( nTitleLen > 4 && aTitle.GetChar(nTitleLen-4) == '.' && aURL.EqualsAscii( "file:",0,5 ) )
+ aTitle.Erase( nTitleLen-4 );
+
+ // Insert into listbox
+ const SfxObjectFactory* pFactory = SfxObjectFactory::GetFactory ( aURL );
+ if ( pFactory )
+ {
+ // insert doc-name and image
+ int nPos = maLbDocTypes.InsertEntry ( aTitle );//, aImage );
+
+ // insert private-url and default-extension as user-data
+ String aStrDefExt ( pFactory->GetFilter (0)->GetDefaultExtension () );
+ DocumentTypeData *pTypeData = new DocumentTypeData ( aURL,
+ aStrDefExt.Copy( 2, aStrDefExt.Len() ) );
+ maLbDocTypes.SetEntryData ( nPos, pTypeData );
+ }
+ }
+ }
+ }
+ }
+ catch ( ... )
+ {
+ DBG_ERRORFILE( "Hyperlink-dialog:'New Document':Retrieve fileinfos failed!" );
+ }
+ }
+ }
+ catch( ... )
+ {
+ DBG_ERRORFILE( "Hyperlink-dialog:'New Document':Fill listfield failed!" );
+ }
+
+ maLbDocTypes.SelectEntryPos ( 0 );
+
+ LeaveWait();
+}
+
+/*************************************************************************
+|*
+|* retrieve and prepare data from dialog-fields
+|*
+|************************************************************************/
+
+void SvxHyperlinkNewDocTp::GetCurentItemData ( String& aStrURL, String& aStrName,
+ String& aStrIntName, String& aStrFrame,
+ SvxLinkInsertMode& eMode )
+{
+ // get data from dialog-controls
+ aStrURL = maEdPath.GetText();
+
+ // does the filename have got a valid extension ?
+ INetURLObject aURL( aStrURL, INET_PROT_FILE );
+
+ if ( aStrURL != aEmptyStr &&
+ maLbDocTypes.GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND )
+ {
+ // get private-url
+ int nPos = maLbDocTypes.GetSelectEntryPos();
+ aURL.setExtension ( ( ( DocumentTypeData* )
+ maLbDocTypes.GetEntryData( nPos ) )->aStrExt );
+ }
+
+ sal_Char const sSep[] = ".";
+
+ if( aURL.getFSysPath( INetURLObject::FSYS_DETECT ).Len() - aURL.getName().Len() <= 1 ||
+ aURL.getFSysPath( INetURLObject::FSYS_DETECT ).Search( '.' ) == 0 )
+ {
+ INetURLObject aTmpURL( SFX_APP()->GetIniManager()->Get( SFX_KEY_WORK_PATH ), INET_PROT_FILE );
+ if( !aTmpURL.hasFinalSlash() )
+ aTmpURL.setFinalSlash();
+ aTmpURL.Append( aURL.getName() );
+ aURL = aTmpURL;
+ }
+
+ // get data from standard-fields
+ aStrIntName = mpEdText->GetText();
+ aStrName = mpEdIndication->GetText();
+ aStrFrame = mpCbbFrame->GetText();
+ eMode = (SvxLinkInsertMode) (mpLbForm->GetSelectEntryPos()+1);
+ if( IsHTMLDoc() )
+ eMode = (SvxLinkInsertMode) ( UINT16(eMode) | HLINK_HTMLMODE );
+
+ if ( aStrURL != aEmptyStr )
+ aStrURL = aURL.GetMainURL( INetURLObject::DECODE_WITH_CHARSET );
+
+ if ( aStrName == aEmptyStr )
+ aStrName = aStrURL;
+}
+
+/*************************************************************************
+|*
+|* static method to create Tabpage
+|*
+|************************************************************************/
+
+IconChoicePage* SvxHyperlinkNewDocTp::Create( Window* pWindow, const SfxItemSet& rItemSet )
+{
+ return( new SvxHyperlinkNewDocTp( pWindow, rItemSet ) );
+}
+
+/*************************************************************************
+|*
+|* Activate / Deactivate Tabpage
+|*
+|************************************************************************/
+
+void SvxHyperlinkNewDocTp::ActivatePage( const SfxItemSet& rItemSet )
+{
+ ///////////////////////////////////////
+ // Set dialog-fields from input-itemset
+ SvxHyperlinkItem *pHyperlinkItem = (SvxHyperlinkItem *)
+ rItemSet.GetItem (SID_HYPERLINK_GETLINK);
+
+ if ( pHyperlinkItem )
+ {
+ // standard-fields
+ FillStandardDlgFields (pHyperlinkItem);
+
+ mbNewName = ( pHyperlinkItem->GetName() == aEmptyStr );
+ }
+}
+
+int SvxHyperlinkNewDocTp::DeactivatePage( SfxItemSet* pSet )
+{
+ String aStrURL, aStrName, aStrIntName, aStrFrame;
+ SvxLinkInsertMode eMode;
+
+ GetCurentItemData ( aStrURL, aStrName, aStrIntName, aStrFrame, eMode);
+
+ USHORT nEvents = GetMacroEvents();
+ SvxMacroTableDtor* pTable = GetMacroTable();
+
+ SvxHyperlinkItem aItem( SID_HYPERLINK_GETLINK, aStrName, aStrURL, aStrFrame,
+ aStrIntName, eMode, nEvents, pTable );
+ pSet->Put (aItem);
+
+ return( LEAVE_PAGE );
+}
+
+/*************************************************************************
+|*
+|* Fill output-ItemSet
+|*
+|*
+|************************************************************************/
+
+BOOL SvxHyperlinkNewDocTp::FillItemSet( SfxItemSet& rOut)
+{
+ String aStrURL, aStrName, aStrIntName, aStrFrame;
+ SvxLinkInsertMode eMode;
+
+ GetCurentItemData ( aStrURL, aStrName, aStrIntName, aStrFrame, eMode);
+
+ // put data into itemset
+ USHORT nEvents = GetMacroEvents();
+ SvxMacroTableDtor* pTable = GetMacroTable();
+
+ SvxHyperlinkItem aItem( SID_HYPERLINK_SETLINK, aStrName, aStrURL, aStrFrame,
+ aStrIntName, eMode, nEvents, pTable );
+ rOut.Put (aItem);
+
+ return TRUE;
+}
+
+/*************************************************************************
+|*
+|* Set initial focus
+|*
+|************************************************************************/
+
+void SvxHyperlinkNewDocTp::SetInitFocus()
+{
+ maEdPath.GrabFocus();
+}
+
+/*************************************************************************
+|*
+|* Ask page whether an insert is possible
+|*
+\************************************************************************/
+
+BOOL SvxHyperlinkNewDocTp::AskApply ()
+{
+ if( GetName( maEdPath.GetText() ) != aEmptyStr )
+ return TRUE;
+
+ WarningBox aWarning( this, WB_OK, SVX_RESSTR(RID_SVXSTR_HYPDLG_NOVALIDFILENAME) );
+ aWarning.Execute();
+
+ return FALSE;
+}
+
+/*************************************************************************
+|*
+|* Any action to do after apply-button is pressed
+|*
+\************************************************************************/
+
+void SvxHyperlinkNewDocTp::DoApply ()
+{
+ EnterWait();
+
+ // get data from dialog-controls
+ String aStrNewName = maEdPath.GetText();
+
+ if ( aStrNewName == aEmptyStr )
+ aStrNewName = maStrInitURL;
+
+ ///////////////////////////////////////////////////////
+ // create a real URL-String
+ INetURLObject aURL( aStrNewName, INET_PROT_FILE );
+
+ int nPos = maLbDocTypes.GetSelectEntryPos();
+ if( nPos == LISTBOX_ENTRY_NOTFOUND )
+ nPos=0;
+ aURL.setExtension ( ( ( DocumentTypeData* )
+ maLbDocTypes.GetEntryData( nPos ) )->aStrExt );
+
+ sal_Char const sSep[] = ".";
+
+ if( aURL.getFSysPath( INetURLObject::FSYS_DETECT ).Len() - aURL.getName().Len() <= 1 ||
+ aURL.getFSysPath( INetURLObject::FSYS_DETECT ).Search( '.' ) == 0 )
+ {
+ INetURLObject aTmpURL( SFX_APP()->GetIniManager()->Get( SFX_KEY_WORK_PATH ), INET_PROT_FILE );
+ if( !aTmpURL.hasFinalSlash() )
+ aTmpURL.setFinalSlash();
+ aTmpURL.Append( aURL.getName() );
+ aURL = aTmpURL;
+ }
+
+ ///////////////////////////////////////////////////////
+ // create Document
+ aStrNewName = aURL.GetURLPath( INetURLObject::DECODE_WITH_CHARSET );//INetURLObject::FSYS_DETECT );
+ sal_Char const sSlash[] = "/";
+ if( aStrNewName.SearchAscii( sSlash ) == 0 )
+ aStrNewName.Erase( 0, 1 );
+
+ // current document
+ SfxViewFrame* pCurrentDocFrame = SFX_APP()->GetViewFrame();
+
+ if ( aStrNewName != aEmptyStr )
+ {
+ // get private-url
+ int nPos = maLbDocTypes.GetSelectEntryPos();
+ if( nPos == LISTBOX_ENTRY_NOTFOUND )
+ nPos=0;
+ String aStrDocName ( ( ( DocumentTypeData* )
+ maLbDocTypes.GetEntryData( nPos ) )->aStrURL );
+
+ // create items
+ SfxStringItem aName( SID_FILE_NAME, aStrDocName );
+ SfxStringItem aReferer( SID_REFERER, UniString::CreateFromAscii(
+ RTL_CONSTASCII_STRINGPARAM( "private:user" ) ) );
+ SfxStringItem aFrame( SID_TARGETNAME, UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "_blank" ) ) );
+ //SfxBoolItem aFrame( SID_OPEN_NEW_VIEW, TRUE );
+
+ String aStrFlags ( sal_Unicode('S') );
+ if ( maRbtEditLater.IsChecked() )
+ {
+ aStrFlags += sal_Unicode('H');
+ }
+ SfxStringItem aFlags (SID_OPTIONS, aStrFlags);
+
+ // open url
+ const SfxPoolItem* pReturn = GetDispatcher()->Execute( SID_OPENDOC,
+ SFX_CALLMODE_SYNCHRON,
+ &aName, &aFlags,
+ &aFrame, &aReferer, 0L );
+
+ // save new doc
+ const SfxViewFrameItem *pItem = PTR_CAST( SfxViewFrameItem, pReturn );
+ SfxViewFrame *pViewFrame = pItem->GetFrame();
+ if (pViewFrame)
+ {
+ //SfxViewFrame *pViewFrame = pFrame->GetCurrentViewFrame();
+ SfxStringItem aNewName( SID_FILE_NAME, aStrNewName );
+ pViewFrame->GetDispatcher()->Execute( SID_SAVEASDOC,
+ SFX_CALLMODE_SYNCHRON,
+ &aNewName, 0L );
+
+ if ( maRbtEditLater.IsChecked() )
+ {
+ BOOL bResult = pViewFrame->DoClose();
+ }
+ }
+ }
+
+ if ( maRbtEditNow.IsChecked() )
+ {
+ pCurrentDocFrame->ToTop();
+ }
+
+ LeaveWait();
+}
+
+/*************************************************************************
+|*
+|* reset dialog-fields
+|*
+|************************************************************************/
+
+void SvxHyperlinkNewDocTp::Reset( const SfxItemSet& rItemSet)
+{
+ ///////////////////////////////////////
+ // Set dialog-fields from create-itemset
+ maStrInitURL = aEmptyStr;
+
+ SvxHyperlinkItem *pHyperlinkItem = (SvxHyperlinkItem *)
+ rItemSet.GetItem (SID_HYPERLINK_GETLINK);
+
+ if ( pHyperlinkItem )
+ {
+ // set dialog-fields
+ FillStandardDlgFields (pHyperlinkItem);
+
+ // set all other fields
+ FillDlgFields ( (String&)pHyperlinkItem->GetURL() );
+
+ // Store initial URL
+ maStrInitURL = pHyperlinkItem->GetURL();
+
+ mbNewName = ( pHyperlinkItem->GetName() == aEmptyStr );
+ }
+}
+
+/*************************************************************************
+|*
+|* Click on imagebutton : new
+|*
+|************************************************************************/
+
+IMPL_LINK ( SvxHyperlinkNewDocTp, ClickNewHdl_Impl, void *, EMPTYARG )
+{
+ SfxFileDialog aDlg( SFX_APP()->GetTopWindow(), WB_3DLOOK | WB_OPEN |
+ SFXWB_PATHDIALOG );
+
+ String aStrPath = GetPath ( maEdPath.GetText() );
+ String aStrName = GetName ( maEdPath.GetText() );
+
+ if ( aStrPath == aEmptyStr )
+ {
+ aStrPath = SFX_APP()->GetIniManager()->Get( SFX_KEY_WORK_PATH );
+ }
+
+ aDlg.SetPath ( aStrPath );
+
+ if ( aDlg.Execute() == RET_OK )
+ {
+ String aStrTmp( aDlg.GetPath() );
+ aStrTmp += aStrName;
+ INetURLObject aNewURL( aStrTmp, INET_PROT_FILE );
+
+ if ( aStrName != aEmptyStr && aNewURL.getExtension() != aEmptyStr &&
+ maLbDocTypes.GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND )
+ {
+ // get private-url
+ int nPos = maLbDocTypes.GetSelectEntryPos();
+ aNewURL.setExtension ( ( ( DocumentTypeData* )
+ maLbDocTypes.GetEntryData( nPos ) )->aStrExt );
+ }
+
+ aStrTmp = aNewURL.GetURLPath( INetURLObject::DECODE_WITH_CHARSET );
+ sal_Char const sSlash[] = "/";
+ if( aStrTmp.SearchAscii( sSlash ) == 0 )
+ aStrTmp.Erase( 0, 1 );
+
+ maEdPath.SetText ( aStrTmp );
+ }
+
+ return( 0L );
+}
+
+/*************************************************************************
+|*
+|* Contens of combobox "Path" modified
+|*
+|************************************************************************/
+
+IMPL_LINK ( SvxHyperlinkNewDocTp, ModifiedPathHdl_Impl, void *, EMPTYARG )
+{
+ if ( mbNewName )
+ mpEdIndication->SetText ( maEdPath.GetText() );
+
+ return( 0L );
+}
+
+/*************************************************************************
+|*
+|* Combobox Target lost the focus
+|*
+|************************************************************************/
+
+IMPL_LINK ( SvxHyperlinkNewDocTp, LostFocusTargetHdl_Impl, void *, EMPTYARG )
+{
+ String aStrURL ( maEdPath.GetText() );
+
+ // Extension
+ if ( GetName ( aStrURL ) != aEmptyStr &&
+ maLbDocTypes.GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND )
+ {
+ INetURLObject aURL( aStrURL, INET_PROT_FILE );
+
+ // get private-url
+ int nPos = maLbDocTypes.GetSelectEntryPos();
+ aURL.setExtension ( ( ( DocumentTypeData* )
+ maLbDocTypes.GetEntryData( nPos ) )->aStrExt );
+
+ String aStrTmp( aURL.GetURLPath( INetURLObject::DECODE_WITH_CHARSET ) );
+ sal_Char const sSlash[] = "/";
+ if( aStrTmp.SearchAscii( sSlash ) == 0 )
+ aStrTmp.Erase( 0, 1 );
+ maEdPath.SetText ( aStrTmp );
+ }
+
+ ModifiedPathHdl_Impl ( NULL );
+
+ return (0L);
+}
+
+/*************************************************************************
+|*
+|* Double-Click in Listbox
+|*
+|************************************************************************/
+
+IMPL_LINK ( SvxHyperlinkNewDocTp, DClickDocTypeHdl_Impl, void *, EMPTYARG )
+{
+ if (maEdPath.GetText().Len() )
+ LostFocusTargetHdl_Impl (NULL);
+
+ return (0L);
+}
+
+/*************************************************************************
+|*
+|* retrieve path
+|*
+|************************************************************************/
+
+String SvxHyperlinkNewDocTp::GetPath ( String& aStrFull )
+{
+ String aStrPath;
+
+ /*
+ if ( aStrFull != aEmptyStr )
+ {
+ DirEntry aDirEntry ( aStrFull );
+
+ if ( aDirEntry.GetExtension() != aEmptyStr )
+ aStrPath = aDirEntry.GetPath().GetFull(); // Pfad mit Filename (+Ext)
+ else
+ if ( aDirEntry.Exists() )
+ aStrPath = aDirEntry.GetFull(); // nur Pfad
+ else
+ aStrPath = aDirEntry.GetPath().GetFull();// Pfad mit Filename (ohne Ext)
+ }
+ */
+
+ aStrPath = aStrFull;
+
+ return aStrPath;
+}
+
+/*************************************************************************
+|*
+|* retrieve filename
+|*
+|************************************************************************/
+
+String SvxHyperlinkNewDocTp::GetName ( String& aStrFull )
+{
+ String aStrName;
+/*
+ if ( aStrFull != aEmptyStr )
+ {
+ INetURLObject aURL( aStrFull, INET_PROT_FILE );
+
+ if ( aDirEntry.GetExtension() != aEmptyStr || !aDirEntry.Exists() )
+ aStrName = aDirEntry.GetName();
+ else if ( aDirEntry.Exists() )
+ {
+ FileStat aFileStatus ( aDirEntry );
+
+ if ( aFileStatus.GetKind() == FSYS_KIND_FILE )
+ aStrName = aDirEntry.GetName();
+ }
+
+ if( aURL.getExtension() != aEmptyStr )
+ aStrName = aURL.getName();
+ }
+ */
+ INetURLObject aURL( aStrFull, INET_PROT_FILE );
+ aStrName = aURL.getName();
+
+ return aStrName;
+}
+
diff --git a/svx/source/dialog/hldoctp.cxx b/svx/source/dialog/hldoctp.cxx
new file mode 100644
index 000000000000..3cf48e126315
--- /dev/null
+++ b/svx/source/dialog/hldoctp.cxx
@@ -0,0 +1,589 @@
+/*************************************************************************
+ *
+ * $RCSfile: hldoctp.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:08 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include "hyperdlg.hxx"
+
+#include "hldoctp.hxx"
+#include "hyperdlg.hrc"
+
+sal_Char __READONLY_DATA sHash[] = "#";
+sal_Char __READONLY_DATA sFileScheme[] = INET_FILE_SCHEME;
+sal_Char __READONLY_DATA sNewsSRVScheme[] = INET_NEWS_SRV_SCHEME;
+sal_Char __READONLY_DATA sHTTPScheme[] = INET_HTTP_SCHEME;
+
+/*************************************************************************
+|*
+|* Contructor / Destructor
+|*
+|************************************************************************/
+
+SvxHyperlinkDocTp::SvxHyperlinkDocTp ( Window *pParent, const SfxItemSet& rItemSet)
+: maGrpDocument ( this, ResId (GRP_DOCUMENT) ),
+ maFtPath ( this, ResId (FT_PATH_DOC) ),
+ maCbbPath ( this, INET_PROT_FILE ),
+ maBtFileopen ( this, ResId (BTN_FILEOPEN) ),
+ maGrpTarget ( this, ResId (GRP_TARGET) ),
+ maFtTarget ( this, ResId (FT_TARGET_DOC) ),
+ maEdTarget ( this, ResId (ED_TARGET_DOC) ),
+ maFtURL ( this, ResId (FT_URL) ),
+ maFtFullURL ( this, ResId (FT_FULL_URL) ),
+ maBtBrowse ( this, ResId (BTN_BROWSE) ),
+ mbMarkWndOpen ( FALSE ),
+ SvxHyperlinkTabPageBase ( pParent, SVX_RES( RID_SVXPAGE_HYPERLINK_DOCUMENT ), rItemSet )
+{
+ InitStdControls();
+ FreeResource();
+
+ //
+ // EA II - Only
+ maBtBrowse.Hide();
+ //
+
+ // Init URL-Box (pos&size, Open-Handler)
+ maCbbPath.SetPosSizePixel ( LogicToPixel( Point( 54, 15 ), MAP_APPFONT ),
+ LogicToPixel( Size ( 176, 60), MAP_APPFONT ) );
+ maCbbPath.Show();
+ maCbbPath.SetHelpId( HID_HYPERDLG_DOC_PATH );
+
+ SetExchangeSupport ();
+
+ // overload handlers
+ maBtFileopen.SetClickHdl ( LINK ( this, SvxHyperlinkDocTp, ClickFileopenHdl_Impl ) );
+ maBtBrowse.SetClickHdl ( LINK ( this, SvxHyperlinkDocTp, ClickTargetHdl_Impl ) );
+ maCbbPath.SetModifyHdl ( LINK ( this, SvxHyperlinkDocTp, ModifiedPathHdl_Impl ) );
+ maEdTarget.SetModifyHdl ( LINK ( this, SvxHyperlinkDocTp, ModifiedTargetHdl_Impl ) );
+
+ maCbbPath.SetLoseFocusHdl( LINK ( this, SvxHyperlinkDocTp, LostFocusPathHdl_Impl ) );
+
+ maTimer.SetTimeoutHdl ( LINK ( this, SvxHyperlinkDocTp, TimeoutHdl_Impl ) );
+}
+
+SvxHyperlinkDocTp::~SvxHyperlinkDocTp ()
+{
+}
+
+/*************************************************************************
+|*
+|* Fill all dialog-controls except controls in groupbox "more..."
+|*
+|************************************************************************/
+
+void SvxHyperlinkDocTp::FillDlgFields ( String& aStrURL )
+{
+ INetURLObject aURL ( aStrURL );
+ String aStrScheme;
+
+ // set protocoll-radiobuttons
+ INetProtocol aProtocol = aURL.GetProtocol ();
+ switch ( aProtocol )
+ {
+ case INET_PROT_FILE :
+ aStrScheme.AssignAscii( RTL_CONSTASCII_STRINGPARAM ( sFileScheme ) );
+ break;
+ case INET_PROT_POP3 :
+ aStrScheme.AssignAscii( RTL_CONSTASCII_STRINGPARAM ( INET_POP3_SCHEME ) );
+ break;
+ case INET_PROT_IMAP :
+ aStrScheme.AssignAscii( RTL_CONSTASCII_STRINGPARAM ( INET_IMAP_SCHEME ) );
+ break;
+ case INET_PROT_OUT :
+ aStrScheme.AssignAscii( RTL_CONSTASCII_STRINGPARAM ( INET_OUT_SCHEME ) );
+ break;
+ default :
+ if ( aStrURL.SearchAscii( sNewsSRVScheme ) == 0 )
+ aStrScheme.AssignAscii( RTL_CONSTASCII_STRINGPARAM ( sNewsSRVScheme ) );
+ else if( aStrURL.SearchAscii( sHash ) == 0 )
+ aStrScheme.AssignAscii( RTL_CONSTASCII_STRINGPARAM ( sFileScheme ) );
+ }
+
+ if ( aStrScheme != aEmptyStr )
+ {
+ String aStrURL ( aURL.GetMainURL() );
+ String aStrMark;
+
+ xub_StrLen nPos = aStrURL.SearchAscii( sHash );
+ // path
+ maCbbPath.SetText ( aStrURL.Copy( 0, ( nPos == STRING_NOTFOUND ? aStrURL.Len() : nPos ) ) );
+
+ // set target in document at editfield
+ if ( nPos != STRING_NOTFOUND && nPos<aStrURL.Len()-1 )
+ aStrMark = aStrURL.Copy( nPos+1, aStrURL.Len() );
+ maEdTarget.SetText ( aStrMark );
+ }
+ else
+ {
+ maCbbPath.SetText ( aEmptyStr );
+ maEdTarget.SetText ( aEmptyStr );
+ }
+
+ ModifiedPathHdl_Impl ( NULL );
+}
+
+/*************************************************************************
+|*
+|* retrieve current url-string
+|*
+|************************************************************************/
+
+String SvxHyperlinkDocTp::GetCurrentURL ()
+{
+ // get data from dialog-controls
+ String aStrURL ( maCbbPath.GetText() );
+ String aStrMark( maEdTarget.GetText() );
+
+ if ( aStrURL != aEmptyStr )
+ {
+ if ( aStrMark != aEmptyStr )
+ {
+ aStrURL.AppendAscii( "#" );
+ aStrURL += aStrMark;
+ }
+
+ // create a real URL-String
+ INetURLObject aURL;
+ if( aURL.GetProtocol() == INET_PROT_NOT_VALID )
+ aURL.SetSmartProtocol( INET_PROT_FILE );
+
+ aURL.SetSmartURL( aStrURL );
+
+ // if there is a empty string, the url will be the html-scheme
+ // but its better to show only the file-scheme
+ aStrURL = aURL.GetMainURL();
+
+ if ( aStrURL.SearchAscii( sHTTPScheme ) == 0 )
+ {
+ aStrURL.Erase( 0, UniString::CreateFromAscii(
+ RTL_CONSTASCII_STRINGPARAM ( sHTTPScheme ) ).Len() );
+ String aStrTmp( aStrURL );
+ aStrURL.AssignAscii( sHTTPScheme );
+ aStrURL += aStrTmp;
+ }
+ }
+ else
+ if( aStrMark != aEmptyStr )
+ {
+ aStrURL.AssignAscii( sHash );
+ aStrURL += aStrMark;
+ }
+
+ return aStrURL;
+}
+
+/*************************************************************************
+|*
+|* retrieve and prepare data from dialog-fields
+|*
+|************************************************************************/
+
+void SvxHyperlinkDocTp::GetCurentItemData ( String& aStrURL, String& aStrName,
+ String& aStrIntName, String& aStrFrame,
+ SvxLinkInsertMode& eMode )
+{
+ // get data from standard-fields
+ aStrURL = GetCurrentURL();
+
+ if( aStrURL.EqualsIgnoreCaseAscii( sFileScheme ) )
+ aStrURL=aEmptyStr;
+
+ aStrIntName = mpEdText->GetText();
+ aStrName = mpEdIndication->GetText();
+ aStrFrame = mpCbbFrame->GetText();
+ eMode = (SvxLinkInsertMode) (mpLbForm->GetSelectEntryPos()+1);
+ if( IsHTMLDoc() )
+ eMode = (SvxLinkInsertMode) ( UINT16(eMode) | HLINK_HTMLMODE );
+
+ if ( aStrName == aEmptyStr )
+ aStrName = aStrURL;
+}
+
+/*************************************************************************
+|*
+|* static method to create Tabpage
+|*
+|************************************************************************/
+
+IconChoicePage* SvxHyperlinkDocTp::Create( Window* pWindow, const SfxItemSet& rItemSet )
+{
+ return( new SvxHyperlinkDocTp( pWindow, rItemSet ) );
+}
+
+/*************************************************************************
+|*
+|* Activate / Deactivate Tabpage
+|*
+|************************************************************************/
+
+void SvxHyperlinkDocTp::ActivatePage( const SfxItemSet& rItemSet )
+{
+ ///////////////////////////////////////
+ // Set dialog-fields from input-itemset
+ SvxHyperlinkItem *pHyperlinkItem = (SvxHyperlinkItem *)
+ rItemSet.GetItem (SID_HYPERLINK_GETLINK);
+
+ if ( pHyperlinkItem )
+ {
+ // standard-fields
+ FillStandardDlgFields (pHyperlinkItem);
+
+ mbNewName = ( pHyperlinkItem->GetName() == aEmptyStr );
+ }
+
+ // show mark-window if it was open before
+ if ( mbMarkWndOpen )
+ ShowMarkWnd ();
+
+ //
+ // EA II - Only
+ maBtBrowse.Hide();
+ //
+}
+
+int SvxHyperlinkDocTp::DeactivatePage( SfxItemSet* pSet )
+{
+ // hide mark-wnd
+ mbMarkWndOpen = IsMarkWndVisible ();
+ HideMarkWnd ();
+
+ // retrieve data of dialog
+ String aStrURL, aStrName, aStrIntName, aStrFrame;
+ SvxLinkInsertMode eMode;
+
+ GetCurentItemData ( aStrURL, aStrName, aStrIntName, aStrFrame, eMode);
+
+ // put item
+ USHORT nEvents = GetMacroEvents();
+ SvxMacroTableDtor* pTable = GetMacroTable();
+
+ SvxHyperlinkItem aItem( SID_HYPERLINK_GETLINK, aStrName, aStrURL, aStrFrame,
+ aStrIntName, eMode, nEvents, pTable );
+ pSet->Put (aItem);
+
+ return( LEAVE_PAGE );
+}
+
+/*************************************************************************
+|*
+|* Fill output-ItemSet
+|*
+|************************************************************************/
+
+BOOL SvxHyperlinkDocTp::FillItemSet( SfxItemSet& rOut)
+{
+ String aStrURL, aStrName, aStrIntName, aStrFrame;
+ SvxLinkInsertMode eMode;
+
+ GetCurentItemData ( aStrURL, aStrName, aStrIntName, aStrFrame, eMode);
+
+ // put data into itemset
+ USHORT nEvents = GetMacroEvents();
+ SvxMacroTableDtor* pTable = GetMacroTable();
+
+ SvxHyperlinkItem aItem( SID_HYPERLINK_SETLINK, aStrName, aStrURL, aStrFrame,
+ aStrIntName, eMode, nEvents, pTable );
+ rOut.Put (aItem);
+
+ return TRUE;
+}
+
+/*************************************************************************
+|*
+|* reset dialog-fields
+|*
+|************************************************************************/
+
+void SvxHyperlinkDocTp::Reset( const SfxItemSet& rItemSet)
+{
+ ///////////////////////////////////////
+ // Set dialog-fields from create-itemset
+ maStrInitURL = aEmptyStr;
+
+ SvxHyperlinkItem *pHyperlinkItem = (SvxHyperlinkItem *)
+ rItemSet.GetItem (SID_HYPERLINK_GETLINK);
+
+ if ( pHyperlinkItem )
+ {
+ mbNewName = ( pHyperlinkItem->GetName() == aEmptyStr );
+
+ // set dialog-fields
+ FillStandardDlgFields (pHyperlinkItem);
+
+ // set all other fields
+ FillDlgFields ( (String&)pHyperlinkItem->GetURL() );
+
+ // Store initial URL
+ maStrInitURL = pHyperlinkItem->GetURL();
+ }
+}
+
+/*************************************************************************
+|*
+|* Set initial focus
+|*
+|************************************************************************/
+
+void SvxHyperlinkDocTp::SetInitFocus()
+{
+ maCbbPath.GrabFocus();
+}
+
+/*************************************************************************
+|*
+|* Click on imagebutton : fileopen
+|*
+|************************************************************************/
+
+IMPL_LINK ( SvxHyperlinkDocTp, ClickFileopenHdl_Impl, void *, EMPTYARG )
+{
+ // Open Fileopen-Dialog
+ SfxFileDialog* pFileDlg = SFX_APP()->CreateDocFileDialog( ( WB_3DLOOK | WB_STDMODAL | WB_OPEN ),
+ *(SfxObjectFactory*)NULL );
+ INetURLObject aOldURL( GetCurrentURL(), INET_PROT_FILE );
+ if( !aOldURL.GetMainURL().EqualsIgnoreCaseAscii( sFileScheme ) )
+ {
+ pFileDlg->SetPathURL( aOldURL.GetMainURL() );
+ }
+
+ if( pFileDlg )
+ {
+ if ( pFileDlg->Execute() == RET_OK )
+ {
+ String aStrFilename( pFileDlg->GetPath() );
+ aStrFilename = aStrFilename.EraseLeadingChars();
+
+ sal_Char const sFile[] = "file";
+ if ( aStrFilename.SearchAscii( sFile ) == 0)
+ {
+ INetURLObject aURL;
+ aURL.SetSmartProtocol( INET_PROT_FILE );
+ aURL.SetSmartURL( aStrFilename );
+
+ maCbbPath.SetText( aURL.GetFull() );
+ }
+
+ if ( aOldURL.GetMainURL() != GetCurrentURL() )
+ ModifiedPathHdl_Impl (NULL);
+ }
+
+ delete pFileDlg;
+ }
+
+ return( 0L );
+}
+
+/*************************************************************************
+|*
+|* Click on imagebutton : target
+|*
+|************************************************************************/
+
+IMPL_LINK ( SvxHyperlinkDocTp, ClickTargetHdl_Impl, void *, EMPTYARG )
+{
+ if ( GetPathType ( maStrURL ) == Type_ExistsFile ||
+ maStrURL == aEmptyStr ||
+ maStrURL.EqualsIgnoreCaseAscii( sFileScheme ) ||
+ maStrURL.SearchAscii( sHash ) == 0 )
+ {
+ mpMarkWnd->SetError( LERR_NOERROR );
+
+ if ( maStrURL.EqualsIgnoreCaseAscii( sFileScheme ) )
+ mpMarkWnd->RefreshTree ( aEmptyStr );
+ else
+ mpMarkWnd->RefreshTree ( maStrURL );
+ }
+ else
+ mpMarkWnd->SetError( LERR_DOCNOTOPEN );
+
+ ShowMarkWnd ();
+
+ return( 0L );
+}
+
+/*************************************************************************
+|*
+|* Contens of combobox "Path" modified
+|*
+|************************************************************************/
+
+IMPL_LINK ( SvxHyperlinkDocTp, ModifiedPathHdl_Impl, void *, EMPTYARG )
+{
+ maStrURL = GetCurrentURL();
+
+ maTimer.SetTimeout( 2500 );
+ maTimer.Start();
+
+ maFtFullURL.SetText( maStrURL );
+
+ if ( mbNewName && !maStrURL.EqualsIgnoreCaseAscii( sFileScheme ) )
+ mpEdIndication->SetText( maFtFullURL.GetText() );
+
+ return( 0L );
+}
+
+/*************************************************************************
+|*
+|* If path-field was modify, to browse the new doc after timeout
+|*
+|************************************************************************/
+
+IMPL_LINK ( SvxHyperlinkDocTp, TimeoutHdl_Impl, Timer *, EMPTYARG )
+{
+ if ( IsMarkWndVisible() && ( GetPathType( maStrURL )==Type_ExistsFile ||
+ maStrURL == aEmptyStr ||
+ maStrURL.EqualsIgnoreCaseAscii( sFileScheme ) ) )
+ {
+ if ( maStrURL.EqualsIgnoreCaseAscii( sFileScheme ) )
+ mpMarkWnd->RefreshTree ( aEmptyStr );
+ else
+ mpMarkWnd->RefreshTree ( maStrURL );
+ }
+
+ return( 0L );
+}
+
+/*************************************************************************
+|*
+|* Contens of editfield "Target" modified
+|*
+|************************************************************************/
+
+IMPL_LINK ( SvxHyperlinkDocTp, ModifiedTargetHdl_Impl, void *, EMPTYARG )
+{
+ maStrURL = GetCurrentURL();
+
+ if ( IsMarkWndVisible() )
+ mpMarkWnd->SelectEntry ( maEdTarget.GetText() );
+
+ maFtFullURL.SetText( maStrURL );
+
+ if ( mbNewName && !maStrURL.EqualsIgnoreCaseAscii( sFileScheme ) )
+ mpEdIndication->SetText ( maFtFullURL.GetText() );
+
+ return( 0L );
+}
+
+/*************************************************************************
+|*
+|* editfield "Target" lost focus
+|*
+|************************************************************************/
+
+IMPL_LINK ( SvxHyperlinkDocTp, LostFocusPathHdl_Impl, void *, EMPTYARG )
+{
+ maStrURL = GetCurrentURL();
+
+ maFtFullURL.SetText(maStrURL);
+
+ if ( mbNewName && !maStrURL.EqualsIgnoreCaseAscii( sFileScheme ) )
+ mpEdIndication->SetText ( maFtFullURL.GetText() );
+
+ return (0L);
+}
+
+/*************************************************************************
+|*
+|* Get String from Bookmark-Wnd
+|*
+|************************************************************************/
+
+void SvxHyperlinkDocTp::SetMarkStr ( String& aStrMark )
+{
+ maEdTarget.SetText ( aStrMark );
+
+ ModifiedTargetHdl_Impl ( NULL );
+}
+
+/*************************************************************************
+|*
+|* retrieve kind of pathstr
+|*
+|************************************************************************/
+
+SvxHyperlinkDocTp::EPathType SvxHyperlinkDocTp::GetPathType ( String& aStrPath )
+{
+ BOOL bExists = FALSE;
+ INetURLObject aURL( aStrPath, INET_PROT_FILE );
+
+ if( aURL.HasError() )
+ return Type_Invalid;
+ else
+ return Type_ExistsFile;
+
+/*
+ DirEntry aEntry ( aStrPath );
+
+ if ( !aEntry.IsValid() )
+ return Type_Invalid;
+
+ if ( aEntry.Exists() )
+ bExists = TRUE;
+
+ FileStat aFileStat ( aEntry );
+
+ if ( aFileStat.GetKind() == FSYS_KIND_FILE )
+ return ( bExists ? Type_ExistsFile : Type_File );
+
+ if ( aFileStat.GetKind() == FSYS_KIND_DIR )
+ return ( bExists ? Type_ExistsDir : Type_Dir );
+*/
+ return Type_Unknown;
+}
+
+
diff --git a/svx/source/dialog/hlinettp.cxx b/svx/source/dialog/hlinettp.cxx
new file mode 100644
index 000000000000..f0877dc8fb04
--- /dev/null
+++ b/svx/source/dialog/hlinettp.cxx
@@ -0,0 +1,979 @@
+/*************************************************************************
+ *
+ * $RCSfile: hlinettp.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:08 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _ADRPARSE_HXX
+#include <svtools/adrparse.hxx>
+#endif
+
+#include "hlinettp.hxx"
+#include "hyperdlg.hrc"
+
+#define STD_DOC_SUBPATH "internal"
+#define STD_DOC_NAME "url_transfer.htm"
+
+sal_Char __READONLY_DATA sAnonymous[] = "anonymous";
+sal_Char __READONLY_DATA sTelnet[] = "telnet";
+sal_Char __READONLY_DATA sHTTPScheme[] = INET_HTTP_SCHEME;
+sal_Char __READONLY_DATA sHTTPSScheme[] = INET_HTTPS_SCHEME;
+sal_Char __READONLY_DATA sFTPScheme[] = INET_FTP_SCHEME;
+sal_Char __READONLY_DATA sTelnetScheme[] = INET_TELNET_SCHEME;
+
+/*************************************************************************
+|*
+|* Contructor / Destructor
+|*
+|************************************************************************/
+
+SvxHyperlinkInternetTp::SvxHyperlinkInternetTp ( Window *pParent,
+ const SfxItemSet& rItemSet)
+: maGrpLinkTyp ( this, ResId (GRP_LINKTYPE) ),
+ maRbtLinktypInternet ( this, ResId (RB_LINKTYP_INTERNET) ),
+ maRbtLinktypFTP ( this, ResId (RB_LINKTYP_FTP) ),
+ maRbtLinktypTelnet ( this, ResId (RB_LINKTYP_TELNET) ),
+ maFtTarget ( this, ResId (FT_TARGET_HTML) ),
+ maCbbTarget ( this, INET_PROT_HTTP ),
+ maFtLogin ( this, ResId (FT_LOGIN) ),
+ maEdLogin ( this, ResId (ED_LOGIN) ),
+ maFtPassword ( this, ResId (FT_PASSWD) ),
+ maEdPassword ( this, ResId (ED_PASSWD) ),
+ maCbAnonymous ( this, ResId (CBX_ANONYMOUS) ),
+ maBtBrowse ( this, ResId (BTN_BROWSE) ),
+ maBtTarget ( this, ResId (BTN_TARGET) ),
+ SvxHyperlinkTabPageBase ( pParent, SVX_RES( RID_SVXPAGE_HYPERLINK_INTERNET ),
+ rItemSet ) ,
+ mbMarkWndOpen ( FALSE ),
+ maStrStdDocURL ()
+{
+ InitStdControls();
+ FreeResource();
+
+ //
+ // EA II - Only !!
+ maBtTarget.Hide();
+ maBtBrowse.Hide();
+ //
+
+ // Init URL-Box (pos&size, Open-Handler)
+ maCbbTarget.SetPosSizePixel ( LogicToPixel( Point( 54, 25 ), MAP_APPFONT ),
+ LogicToPixel( Size ( 176, 60), MAP_APPFONT ) );
+ maCbbTarget.Show();
+ maCbbTarget.SetHelpId( HID_HYPERDLG_INET_PATH );
+
+ // Find Path to Std-Doc
+ String aStrBasePaths( SFX_APP()->GetIniManager()->Get( SFX_KEY_TEMPLATE_PATH ) );
+ BOOL bFound = FALSE;
+ String aStrFilename;
+ DirEntry aFileEntry;
+ for( xub_StrLen n = 0; n<aStrBasePaths.GetTokenCount() && !bFound; n++ )
+ {
+ aStrFilename = aStrBasePaths.GetToken( n );
+ aFileEntry = DirEntry( aStrFilename );
+ DirEntry aPathEntry ( UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( STD_DOC_SUBPATH ) ) );
+ DirEntry aNameEntry ( UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( STD_DOC_NAME ) ) );
+ aFileEntry+=aPathEntry;
+ aFileEntry+=aNameEntry;
+ bFound = aFileEntry.Exists();
+ }
+ if( bFound )
+ maStrStdDocURL = aFileEntry.GetFull();
+
+
+ SetExchangeSupport ();
+
+ ///////////////////////////////////////
+ // set defaults
+ maRbtLinktypInternet.Check ();
+ maFtLogin.Show( FALSE );
+ maFtPassword.Show( FALSE );
+ maEdLogin.Show( FALSE );
+ maEdPassword.Show( FALSE );
+ maCbAnonymous.Show( FALSE );
+ maBtTarget.Enable( FALSE );
+ maBtBrowse.Enable( maStrStdDocURL==aEmptyStr?FALSE:TRUE);
+
+ ///////////////////////////////////////
+ // overload handlers
+ maRbtLinktypInternet.SetClickHdl( LINK ( this, SvxHyperlinkInternetTp, ClickTypeInternetHdl_Impl ) );
+ maRbtLinktypFTP.SetClickHdl ( LINK ( this, SvxHyperlinkInternetTp, ClickTypeFTPHdl_Impl ) );
+ maRbtLinktypTelnet.SetClickHdl ( LINK ( this, SvxHyperlinkInternetTp, ClickTypeTelnetHdl_Impl ) );
+ maCbAnonymous.SetClickHdl ( LINK ( this, SvxHyperlinkInternetTp, ClickAnonymousHdl_Impl ) );
+ maBtBrowse.SetClickHdl ( LINK ( this, SvxHyperlinkInternetTp, ClickBrowseHdl_Impl ) );
+ maBtTarget.SetClickHdl ( LINK ( this, SvxHyperlinkInternetTp, ClickTargetHdl_Impl ) );
+ maEdLogin.SetModifyHdl ( LINK ( this, SvxHyperlinkInternetTp, ModifiedLoginHdl_Impl ) );
+
+ maCbbTarget.SetLoseFocusHdl ( LINK ( this, SvxHyperlinkInternetTp, LostFocusTargetHdl_Impl ) );
+ maCbbTarget.SetModifyHdl ( LINK ( this, SvxHyperlinkInternetTp, ModifiedTargetHdl_Impl ) );
+
+ maTimer.SetTimeoutHdl ( LINK ( this, SvxHyperlinkInternetTp, TimeoutHdl_Impl ) );
+}
+
+SvxHyperlinkInternetTp::~SvxHyperlinkInternetTp ()
+{
+}
+
+/*************************************************************************
+|*
+|* Fill the all dialog-controls except controls in groupbox "more..."
+|*
+|************************************************************************/
+
+void SvxHyperlinkInternetTp::FillDlgFields ( String& aStrURL )
+{
+ INetURLObject aURL ( aStrURL );
+ String aStrScheme;
+
+ // set protocoll-radiobuttons
+ INetProtocol aProtocol = aURL.GetProtocol ();
+ switch ( aProtocol )
+ {
+ case INET_PROT_HTTP :
+ maRbtLinktypInternet.Check ();
+ maRbtLinktypFTP.Check (FALSE);
+ maRbtLinktypTelnet.Check (FALSE);
+
+ maFtLogin.Show( FALSE );
+ maFtPassword.Show( FALSE );
+ maEdLogin.Show( FALSE );
+ maEdPassword.Show( FALSE );
+ maCbAnonymous.Show( FALSE );
+
+ maBtTarget.Enable();
+
+ if ( mbMarkWndOpen )
+ ShowMarkWnd ();
+
+ aStrScheme.AssignAscii( RTL_CONSTASCII_STRINGPARAM( sHTTPScheme ) );
+
+ maCbbTarget.SetSmartProtocol( INET_PROT_HTTP );
+
+ break;
+ case INET_PROT_HTTPS :
+ maRbtLinktypInternet.Check ();
+ maRbtLinktypFTP.Check (FALSE);
+ maRbtLinktypTelnet.Check (FALSE);
+
+ maFtLogin.Show( FALSE );
+ maFtPassword.Show( FALSE );
+ maEdLogin.Show( FALSE );
+ maEdPassword.Show( FALSE );
+ maCbAnonymous.Show( FALSE );
+
+ maBtTarget.Enable();
+
+ if ( mbMarkWndOpen )
+ HideMarkWnd ();
+
+ aStrScheme.AssignAscii( RTL_CONSTASCII_STRINGPARAM( sHTTPSScheme ) );
+
+ maCbbTarget.SetSmartProtocol( INET_PROT_HTTP );
+
+ break;
+ case INET_PROT_FTP :
+ maRbtLinktypInternet.Check (FALSE);
+ maRbtLinktypFTP.Check ();
+ maRbtLinktypTelnet.Check (FALSE);
+
+ maFtLogin.Show( TRUE );
+ maFtPassword.Show( TRUE );
+ maEdLogin.Show( TRUE );
+ maEdPassword.Show( TRUE );
+ maCbAnonymous.Show( TRUE );
+
+ maBtTarget.Disable();
+
+ if ( mbMarkWndOpen )
+ HideMarkWnd ();
+
+ aStrScheme.AssignAscii( RTL_CONSTASCII_STRINGPARAM( sFTPScheme ) );
+
+ maCbbTarget.SetSmartProtocol( INET_PROT_FTP );
+
+ break;
+ default :
+ String aStrTmp ( aStrURL );
+ if ( aStrTmp.ToLowerAscii().SearchAscii( sTelnet ) == 0 )
+ {
+ maRbtLinktypInternet.Check (FALSE);
+ maRbtLinktypFTP.Check (FALSE);
+ maRbtLinktypTelnet.Check ();
+
+ maBtTarget.Disable();
+
+ if ( mbMarkWndOpen )
+ HideMarkWnd ();
+
+ aStrScheme.AssignAscii( RTL_CONSTASCII_STRINGPARAM( sTelnetScheme ) );
+
+ maCbbTarget.SetSmartProtocol( INET_PROT_FILE );
+ }
+ else
+ { // as default : HTTP-Protocoll
+ maRbtLinktypInternet.Check ();
+ maRbtLinktypFTP.Check (FALSE);
+ maRbtLinktypTelnet.Check (FALSE);
+ }
+
+ maFtLogin.Show( FALSE );
+ maFtPassword.Show( FALSE );
+ maEdLogin.Show( FALSE );
+ maEdPassword.Show( FALSE );
+ maCbAnonymous.Show( FALSE );
+ break;
+ }
+
+ // Username / Password
+ if ( aProtocol == INET_PROT_FTP )
+ {
+ String aUserName ( aURL.GetUser() );
+
+ if ( aUserName.ToLowerAscii().SearchAscii ( sAnonymous ) == 0 )
+ {
+ maCbAnonymous.Check();
+ maFtLogin.Disable ();
+ maFtPassword.Disable ();
+
+ maEdLogin.SetText ( String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( sAnonymous ) ) );
+ SvAddressParser aAddress(SFX_INIMANAGER()->GetAddressToken(ADDRESS_EMAIL));
+ maEdPassword.SetText ( aAddress.Count() ?
+ aAddress.GetEmailAddress(0) : String() );
+ }
+ else
+ {
+ maEdLogin.SetText ( aURL.GetUser() );
+ maEdPassword.SetText ( aURL.GetPass() );
+ maFtLogin.Enable ();
+ maFtPassword.Enable ();
+ }
+ }
+
+ // set URL-field
+ if ( aStrScheme != aEmptyStr )
+ {
+ // Show the scheme, #72740
+ maCbbTarget.SetText( aURL.GetMainURL() );
+ }
+ else
+ maCbbTarget.SetText ( aEmptyStr );
+
+ // State of target-button
+ String aStrCurrentTarget( maCbbTarget.GetText() );
+ aStrCurrentTarget.EraseTrailingChars();
+
+ if( aStrCurrentTarget == aEmptyStr ||
+ aStrCurrentTarget.EqualsIgnoreCaseAscii( sHTTPScheme ) ||
+ aStrCurrentTarget.EqualsIgnoreCaseAscii( sHTTPSScheme ) )
+ maBtTarget.Enable( FALSE );
+ else
+ maBtTarget.Enable( TRUE );
+
+ maBtBrowse.Enable( maStrStdDocURL==aEmptyStr?FALSE:TRUE);
+}
+
+/*************************************************************************
+|*
+|* retrieve and prepare data from dialog-fields
+|*
+|************************************************************************/
+
+void SvxHyperlinkInternetTp::GetCurentItemData ( String& aStrURL, String& aStrName,
+ String& aStrIntName, String& aStrFrame,
+ SvxLinkInsertMode& eMode )
+{
+ String aStrScheme;
+
+ // get data from dialog-controls
+ aStrURL = maCbbTarget.GetText();
+
+ if ( maRbtLinktypInternet.IsChecked() && aStrURL.SearchAscii( sHTTPScheme ) != 0 )
+ {
+ if ( aStrURL.SearchAscii( sHTTPSScheme ) != 0 )
+ aStrScheme.AssignAscii( RTL_CONSTASCII_STRINGPARAM ( sHTTPScheme ) );
+
+ } else if ( maRbtLinktypFTP.IsChecked() && aStrURL.SearchAscii( sFTPScheme ) != 0 )
+ {
+ aStrScheme.AssignAscii( RTL_CONSTASCII_STRINGPARAM ( sFTPScheme ) );
+
+ } else if ( maRbtLinktypTelnet.IsChecked() && aStrURL.SearchAscii( sTelnetScheme ) != 0 )
+ {
+ aStrScheme.AssignAscii( RTL_CONSTASCII_STRINGPARAM( sTelnetScheme ) );
+ }
+
+ String aStrTmp( aStrScheme );
+ aStrTmp += aStrURL;
+ INetURLObject aURL ( aStrTmp );
+
+ // username and password for ftp-url
+ if ( maRbtLinktypFTP.IsChecked() )
+ {
+ aURL.SetUserAndPass ( maEdLogin.GetText(), maEdPassword.GetText() );
+ }
+
+ // get data from standard-fields
+ aStrIntName = mpEdText->GetText();
+ aStrName = mpEdIndication->GetText();
+ aStrFrame = mpCbbFrame->GetText();
+ eMode = (SvxLinkInsertMode) (mpLbForm->GetSelectEntryPos()+1);
+ if( IsHTMLDoc() )
+ eMode = (SvxLinkInsertMode) ( UINT16(eMode) | HLINK_HTMLMODE );
+
+ if( aStrURL != aEmptyStr )
+ aStrURL = aURL.GetMainURL();
+
+ if( aStrName == aEmptyStr )
+ aStrName = aStrURL;
+}
+
+/*************************************************************************
+|*
+|* static method to create Tabpage
+|*
+|************************************************************************/
+
+IconChoicePage* SvxHyperlinkInternetTp::Create( Window* pWindow, const SfxItemSet& rItemSet )
+{
+ return( new SvxHyperlinkInternetTp( pWindow, rItemSet ) );
+}
+
+/*************************************************************************
+|*
+|* Activate / Deactivate Tabpage
+|*
+|************************************************************************/
+
+void SvxHyperlinkInternetTp::ActivatePage( const SfxItemSet& rItemSet )
+{
+ ///////////////////////////////////////
+ // Set dialog-fields from input-itemset
+ SvxHyperlinkItem *pHyperlinkItem = (SvxHyperlinkItem *)
+ rItemSet.GetItem (SID_HYPERLINK_GETLINK);
+
+ if ( pHyperlinkItem )
+ {
+ // standard-fields
+ FillStandardDlgFields (pHyperlinkItem);
+
+ maStrOldUser = maEdLogin.GetText();
+ maStrOldPassword = maEdPassword.GetText();
+
+ mbNewName = ( pHyperlinkItem->GetName() == aEmptyStr );
+ }
+
+ // show mark-window if it was open before
+ if ( mbMarkWndOpen && maRbtLinktypInternet.IsChecked() )
+ ShowMarkWnd ();
+
+ //
+ // EA II - Only !!
+ maBtTarget.Hide();
+ maBtBrowse.Hide();
+ //
+
+ maBtBrowse.Enable( maStrStdDocURL==aEmptyStr?FALSE:TRUE);
+}
+
+int SvxHyperlinkInternetTp::DeactivatePage( SfxItemSet* pSet)
+{
+ mbMarkWndOpen = IsMarkWndVisible ();
+ HideMarkWnd ();
+
+ String aStrURL, aStrName, aStrIntName, aStrFrame;
+ SvxLinkInsertMode eMode;
+
+ GetCurentItemData ( aStrURL, aStrName, aStrIntName, aStrFrame, eMode);
+
+ USHORT nEvents = GetMacroEvents();
+ SvxMacroTableDtor* pTable = GetMacroTable();
+
+ SvxHyperlinkItem aItem( SID_HYPERLINK_GETLINK, aStrName, aStrURL, aStrFrame,
+ aStrIntName, eMode, nEvents, pTable );
+ pSet->Put (aItem);
+
+ return( LEAVE_PAGE );
+}
+
+/*************************************************************************
+|*
+|* Fill output-ItemSet
+|*
+|************************************************************************/
+
+BOOL SvxHyperlinkInternetTp::FillItemSet( SfxItemSet& rOut)
+{
+ String aStrURL, aStrName, aStrIntName, aStrFrame;
+ SvxLinkInsertMode eMode;
+
+ GetCurentItemData ( aStrURL, aStrName, aStrIntName, aStrFrame, eMode);
+
+ USHORT nEvents = GetMacroEvents();
+ SvxMacroTableDtor* pTable = GetMacroTable();
+
+ SvxHyperlinkItem aItem( SID_HYPERLINK_SETLINK, aStrName, aStrURL, aStrFrame,
+ aStrIntName, eMode, nEvents, pTable );
+ rOut.Put (aItem);
+
+ return TRUE;
+}
+
+/*************************************************************************
+|*
+|* Reset dialogfields
+|*
+|************************************************************************/
+
+void SvxHyperlinkInternetTp::Reset( const SfxItemSet& rItemSet)
+{
+ ///////////////////////////////////////
+ // Set dialog-fields from create-itemset
+ maStrInitURL = aEmptyStr;
+
+ SvxHyperlinkItem *pHyperlinkItem = (SvxHyperlinkItem *)
+ rItemSet.GetItem (SID_HYPERLINK_GETLINK);
+
+ if ( pHyperlinkItem )
+ {
+ // set dialog-fields
+ FillStandardDlgFields (pHyperlinkItem);
+
+ // set all other fields
+ FillDlgFields ( (String&)pHyperlinkItem->GetURL() );
+
+ // Store initial URL
+ maStrInitURL = pHyperlinkItem->GetURL();
+
+ mbNewName = ( pHyperlinkItem->GetName() == aEmptyStr );
+ }
+}
+
+/*************************************************************************
+|*
+|* Set initial focus
+|*
+|************************************************************************/
+
+void SvxHyperlinkInternetTp::SetInitFocus()
+{
+ maCbbTarget.GrabFocus();
+}
+
+/*************************************************************************
+|*
+|* Contens of editfield "Taregt" modified
+|*
+|************************************************************************/
+
+IMPL_LINK ( SvxHyperlinkInternetTp, ModifiedTargetHdl_Impl, void *, EMPTYARG )
+{
+ String aStrCurrentTarget( maCbbTarget.GetText() );
+ aStrCurrentTarget.EraseTrailingChars();
+
+ if ( mbNewName )
+ {
+ mpEdIndication->SetText ( aStrCurrentTarget );
+ }
+
+ if( aStrCurrentTarget == aEmptyStr ||
+ aStrCurrentTarget.EqualsIgnoreCaseAscii( sHTTPScheme ) ||
+ aStrCurrentTarget.EqualsIgnoreCaseAscii( sHTTPSScheme ) )
+ maBtTarget.Enable( FALSE );
+ else
+ maBtTarget.Enable( TRUE );
+
+ // changed scheme ? - Then change radiobutton-settings
+ if( ( aStrCurrentTarget.SearchAscii( sHTTPScheme ) == 0 &&
+ !maRbtLinktypInternet.IsChecked() ) ||
+ ( aStrCurrentTarget.SearchAscii( sHTTPSScheme ) == 0 &&
+ !maRbtLinktypInternet.IsChecked() ) )
+ {
+ maRbtLinktypInternet.Check();
+ maRbtLinktypFTP.Check(FALSE);
+ maRbtLinktypTelnet.Check(FALSE);
+
+ maFtLogin.Show( FALSE );
+ maFtPassword.Show( FALSE );
+ maEdLogin.Show( FALSE );
+ maEdPassword.Show( FALSE );
+ maCbAnonymous.Show( FALSE );
+
+ maBtTarget.Enable();
+
+ if ( mbMarkWndOpen )
+ ShowMarkWnd ();
+ }
+ else if( aStrCurrentTarget.SearchAscii( sFTPScheme ) == 0 &&
+ !maRbtLinktypFTP.IsChecked() )
+ {
+ maRbtLinktypInternet.Check(FALSE);
+ maRbtLinktypFTP.Check();
+ maRbtLinktypTelnet.Check(FALSE);
+
+ maFtLogin.Show( TRUE );
+ maFtPassword.Show( TRUE );
+ maEdLogin.Show( TRUE );
+ maEdPassword.Show( TRUE );
+ maCbAnonymous.Show( TRUE );
+
+ maBtTarget.Disable();
+
+ if ( mbMarkWndOpen )
+ HideMarkWnd ();
+ }
+ else if( aStrCurrentTarget.SearchAscii( sTelnetScheme ) == 0 &&
+ !maRbtLinktypTelnet.IsChecked() )
+ {
+ maRbtLinktypInternet.Check(FALSE);
+ maRbtLinktypFTP.Check(FALSE);
+ maRbtLinktypTelnet.Check();
+
+ maFtLogin.Show( FALSE );
+ maFtPassword.Show( FALSE );
+ maEdLogin.Show( FALSE );
+ maEdPassword.Show( FALSE );
+ maCbAnonymous.Show( FALSE );
+
+ maBtTarget.Disable();
+
+ if ( mbMarkWndOpen )
+ HideMarkWnd ();
+ }
+
+ // start timer
+ maTimer.SetTimeout( 2500 );
+ maTimer.Start();
+
+ return( 0L );
+}
+
+/*************************************************************************
+|*
+|* If target-field was modify, to browse the new doc afeter timeout
+|*
+|************************************************************************/
+
+IMPL_LINK ( SvxHyperlinkInternetTp, TimeoutHdl_Impl, Timer *, EMPTYARG )
+{
+ if ( maRbtLinktypInternet.IsChecked() && IsMarkWndVisible() )
+ {
+ String aStrURL( maCbbTarget.GetText() );
+
+ if ( !aStrURL.EqualsIgnoreCaseAscii( sHTTPScheme ) &&
+ !aStrURL.EqualsIgnoreCaseAscii( sHTTPSScheme ) )
+ mpMarkWnd->RefreshTree ( aStrURL );
+ }
+
+ return( 0L );
+}
+
+/*************************************************************************
+|*
+|* Contens of editfield "Login" modified
+|*
+|************************************************************************/
+
+IMPL_LINK ( SvxHyperlinkInternetTp, ModifiedLoginHdl_Impl, void *, EMPTYARG )
+{
+ String aStrLogin ( maEdLogin.GetText() );
+ if ( aStrLogin.EqualsIgnoreCaseAscii( sAnonymous ) )
+ {
+ maCbAnonymous.Check();
+ ClickAnonymousHdl_Impl(NULL);
+ }
+
+ ModifiedTargetHdl_Impl (NULL);
+
+ return( 0L );
+}
+
+/*************************************************************************
+|*
+|* Change Scheme-String
+|*
+|************************************************************************/
+
+void SvxHyperlinkInternetTp::ChangeScheme ( String& aStrURL, String aStrNewScheme )
+{
+ if ( aStrURL != aEmptyStr )
+ {
+ INetURLObject aURL ( aStrURL );
+ String aStrScheme;
+
+ // set protocoll-radiobuttons
+ INetProtocol aProtocol = aURL.GetProtocol ();
+ switch ( aProtocol )
+ {
+ case INET_PROT_HTTP :
+ aStrScheme.AssignAscii( RTL_CONSTASCII_STRINGPARAM ( sHTTPScheme ) );
+ break;
+ case INET_PROT_HTTPS :
+ aStrScheme.AssignAscii( RTL_CONSTASCII_STRINGPARAM (sHTTPSScheme ) );
+ break;
+ case INET_PROT_FTP :
+ aStrScheme.AssignAscii( RTL_CONSTASCII_STRINGPARAM ( sFTPScheme ) );
+ break;
+ default :
+ String aStrTmp ( aStrURL );
+
+ if ( aStrTmp.ToLowerAscii().SearchAscii( sTelnet ) == 0 )
+ {
+ aStrScheme.AssignAscii( RTL_CONSTASCII_STRINGPARAM ( sTelnetScheme ) );
+ }
+ }
+
+ if ( aStrScheme != aEmptyStr )
+ {
+ String aStrTmp( aStrURL.Erase ( 0, aStrScheme.Len() ) );
+ aStrURL = aStrNewScheme;
+ aStrURL += aStrTmp;
+ }
+ }
+}
+
+/*************************************************************************
+|*
+|* Click on Radiobutton : Type Internet
+|*
+|************************************************************************/
+
+IMPL_LINK ( SvxHyperlinkInternetTp, ClickTypeInternetHdl_Impl, void *, EMPTYARG )
+{
+ if ( maRbtLinktypInternet.IsChecked() )
+ {
+ maFtLogin.Show( FALSE );
+ maFtPassword.Show( FALSE );
+ maEdLogin.Show( FALSE );
+ maEdPassword.Show( FALSE );
+ maCbAnonymous.Show( FALSE );
+
+ maBtTarget.Enable();
+
+ if ( mbMarkWndOpen )
+ ShowMarkWnd ();
+
+ String aStrURL ( maCbbTarget.GetText() );
+ ChangeScheme ( aStrURL, UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM ( sHTTPScheme ) ) );
+ maCbbTarget.SetText ( aStrURL );
+ }
+
+ maCbbTarget.SetSmartProtocol( INET_PROT_HTTP );
+ ModifiedTargetHdl_Impl (NULL);
+
+ return( 0L );
+}
+
+/*************************************************************************
+|*
+|* Click on Radiobutton : Type FTP
+|*
+|************************************************************************/
+
+IMPL_LINK ( SvxHyperlinkInternetTp, ClickTypeFTPHdl_Impl, void *, EMPTYARG )
+{
+ if ( maRbtLinktypFTP.IsChecked() )
+ {
+ maFtLogin.Show( TRUE );
+ maFtPassword.Show( TRUE );
+ maEdLogin.Show( TRUE );
+ maEdPassword.Show( TRUE );
+ maCbAnonymous.Show( TRUE );
+
+ maBtTarget.Disable();
+
+ if ( mbMarkWndOpen )
+ HideMarkWnd ();
+
+ ClickAnonymousHdl_Impl(NULL);
+
+ String aStrURL ( maCbbTarget.GetText() );
+ ChangeScheme ( aStrURL, UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM ( sFTPScheme ) ) );
+ maCbbTarget.SetText ( aStrURL );
+ }
+
+ maCbbTarget.SetSmartProtocol( INET_PROT_FTP );
+ ModifiedTargetHdl_Impl (NULL);
+
+ return( 0L );
+}
+
+/*************************************************************************
+|*
+|* Click on Radiobutton : Type Telnet
+|*
+|************************************************************************/
+
+IMPL_LINK ( SvxHyperlinkInternetTp, ClickTypeTelnetHdl_Impl, void *, EMPTYARG )
+{
+ if ( maRbtLinktypTelnet.IsChecked() )
+ {
+ maFtLogin.Show( FALSE );
+ maFtPassword.Show( FALSE );
+ maEdLogin.Show( FALSE );
+ maEdPassword.Show( FALSE );
+ maCbAnonymous.Show( FALSE );
+
+ maBtTarget.Disable();
+
+ if ( mbMarkWndOpen )
+ HideMarkWnd ();
+
+ String aStrURL ( maCbbTarget.GetText() );
+ ChangeScheme ( aStrURL, UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM ( sTelnetScheme ) ) );
+ maCbbTarget.SetText ( aStrURL );
+ }
+
+ maCbbTarget.SetSmartProtocol( INET_PROT_FILE );
+ ModifiedTargetHdl_Impl(NULL);
+
+ return( 0L );
+}
+
+/*************************************************************************
+|*
+|* Click on Checkbox : Anonymous user
+|*
+|************************************************************************/
+
+IMPL_LINK ( SvxHyperlinkInternetTp, ClickAnonymousHdl_Impl, void *, EMPTYARG )
+{
+ // change username & password
+ String aStrUser ( maEdLogin.GetText() );
+ String aStrPassword ( maEdPassword.GetText() );
+
+ if( maStrOldUser.EqualsIgnoreCaseAscii( sAnonymous ) )
+ {
+ maEdLogin.SetText( aEmptyStr );
+ maEdPassword.SetText( aEmptyStr );
+ }
+ else
+ {
+ maEdLogin.SetText ( maStrOldUser );
+ maEdPassword.SetText ( maStrOldPassword );
+ }
+
+ maStrOldUser = aStrUser;
+ maStrOldPassword = aStrPassword;
+
+ // disable login-editfields if checked
+ if ( maCbAnonymous.IsChecked() )
+ {
+ SvAddressParser aAddress(SFX_INIMANAGER()->GetAddressToken(ADDRESS_EMAIL));
+ maEdLogin.SetText ( UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM ( sAnonymous ) ) );
+ maEdPassword.SetText ( aAddress.Count() ? aAddress.GetEmailAddress(0) : String() );
+
+ maFtLogin.Disable ();
+ maFtPassword.Disable ();
+ maEdLogin.Disable ();
+ maEdPassword.Disable ();
+ }
+ else
+ {
+ maFtLogin.Enable ();
+ maFtPassword.Enable ();
+ maEdLogin.Enable ();
+ maEdPassword.Enable ();
+ }
+
+ ModifiedTargetHdl_Impl(NULL);
+
+ return( 0L );
+}
+
+/*************************************************************************
+|*
+|* Combobox Target lost the focus
+|*
+|************************************************************************/
+
+IMPL_LINK ( SvxHyperlinkInternetTp, LostFocusTargetHdl_Impl, void *, EMPTYARG )
+{
+ String aStrURL ( maCbbTarget.GetText() );
+ String aStrScheme;
+
+ if( maRbtLinktypInternet.IsChecked() &&
+ aStrURL.SearchAscii( sHTTPScheme ) != 0 )
+ {
+ if( aStrURL.SearchAscii( sHTTPSScheme ) != 0 )
+ aStrScheme.AssignAscii( RTL_CONSTASCII_STRINGPARAM ( sHTTPScheme ) );
+ } else if( maRbtLinktypFTP.IsChecked() &&
+ aStrURL.SearchAscii( sFTPScheme ) != 0 )
+ {
+ aStrScheme.AssignAscii( RTL_CONSTASCII_STRINGPARAM ( sFTPScheme ) );
+ } else if( maRbtLinktypTelnet.IsChecked() &&
+ aStrURL.SearchAscii( sTelnetScheme ) != 0 )
+ {
+ aStrScheme.AssignAscii( RTL_CONSTASCII_STRINGPARAM ( sTelnetScheme ) );
+ }
+
+ if( aStrURL != aEmptyStr )
+ {
+ String aStrTarget ( aStrScheme );
+ aStrTarget += aStrURL;
+ maCbbTarget.SetText ( aStrTarget );
+ }
+
+ if ( maRbtLinktypInternet.IsChecked() && aStrURL.Len()!=0 && IsMarkWndVisible() )
+ mpMarkWnd->RefreshTree ( maCbbTarget.GetText() );
+
+ ModifiedTargetHdl_Impl ( NULL );
+
+ return (0L);
+}
+
+/*************************************************************************
+|*
+|* Click on imagebutton : Browse
+|*
+|************************************************************************/
+
+IMPL_LINK ( SvxHyperlinkInternetTp, ClickBrowseHdl_Impl, void *, EMPTYARG )
+{
+ /////////////////////////////////////////////////
+ // Open URL if available
+
+ SfxStringItem aName( SID_FILE_NAME, maStrStdDocURL );
+ SfxStringItem aRefererItem( SID_REFERER, UniString::CreateFromAscii(
+ RTL_CONSTASCII_STRINGPARAM( "private:user" ) ) );
+ SfxBoolItem aNewView( SID_OPEN_NEW_VIEW, TRUE );
+ SfxBoolItem aSilent( SID_SILENT, TRUE );
+ SfxBoolItem aReadOnly( SID_DOC_READONLY, TRUE );
+
+ GetDispatcher()->Execute( SID_OPENDOC,
+ SFX_CALLMODE_ASYNCHRON |
+ SFX_CALLMODE_RECORD,
+ &aName,
+ &aNewView,
+ &aSilent,
+ &aReadOnly,
+ &aRefererItem,
+ 0L );
+
+ return( 0L );
+}
+
+/*************************************************************************
+|*
+|* Click on imagebutton : Target
+|*
+|************************************************************************/
+
+IMPL_LINK ( SvxHyperlinkInternetTp, ClickTargetHdl_Impl, void *, EMPTYARG )
+{
+ if ( maRbtLinktypInternet.IsChecked() )
+ {
+ String aStrURL( maCbbTarget.GetText() );
+ if ( !aStrURL.EqualsIgnoreCaseAscii( sHTTPScheme ) &&
+ !aStrURL.EqualsIgnoreCaseAscii(sHTTPSScheme ) &&
+ aStrURL != aEmptyStr )
+ mpMarkWnd->RefreshTree ( aStrURL );
+ else
+ mpMarkWnd->SetError( LERR_DOCNOTOPEN );
+ }
+
+ ShowMarkWnd ();
+
+ mbMarkWndOpen = IsMarkWndVisible ();
+
+ return( 0L );
+}
+
+/*************************************************************************
+|*
+|* Get String from Bookmark-Wnd
+|*
+|************************************************************************/
+
+void SvxHyperlinkInternetTp::SetMarkStr ( String& aStrMark )
+{
+ String aStrURL ( maCbbTarget.GetText() );
+
+ const sal_Unicode sUHash = '#';
+ xub_StrLen nPos = aStrURL.SearchBackward( sUHash );
+
+ if( nPos != STRING_NOTFOUND )
+ aStrURL.Erase ( nPos );
+
+ aStrURL += sUHash;
+ aStrURL += aStrMark;
+
+ maCbbTarget.SetText ( aStrURL );
+}
+
+/*************************************************************************
+|*
+|* Enable Browse-Button in subject to the office is in onlinemode
+|*
+|************************************************************************/
+
+void SvxHyperlinkInternetTp::SetOnlineMode( BOOL bEnable )
+{
+ // State of target-button in subject to the current url-string
+ // ( Can't display any targets in an document, if there is no
+ // valid url to a document )
+ String aStrCurrentTarget( maCbbTarget.GetText() );
+ aStrCurrentTarget.EraseTrailingChars();
+
+ if( aStrCurrentTarget == aEmptyStr ||
+ aStrCurrentTarget.EqualsIgnoreCaseAscii( sHTTPScheme ) ||
+ aStrCurrentTarget.EqualsIgnoreCaseAscii( sHTTPSScheme ) )
+ maBtTarget.Enable( FALSE );
+ else
+ maBtTarget.Enable( TRUE );
+}
+
+
diff --git a/svx/source/dialog/hlmailtp.cxx b/svx/source/dialog/hlmailtp.cxx
new file mode 100644
index 000000000000..278a67d26d66
--- /dev/null
+++ b/svx/source/dialog/hlmailtp.cxx
@@ -0,0 +1,580 @@
+/*************************************************************************
+ *
+ * $RCSfile: hlmailtp.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:08 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _COM_SUN_STAR_FRAME_XDISPATCHPROVIDER_HPP_
+#include <com/sun/star/frame/XDispatchProvider.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UTIL_XURLTRANSFORMER_HPP_
+#include <com/sun/star/util/XURLTransformer.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_FRAMESEARCHFLAG_HPP_
+#include <com/sun/star/frame/FrameSearchFlag.hpp>
+#endif
+
+#include <unotools/processfactory.hxx>
+
+#ifndef _SFXVIEWFRM_HXX
+#include <sfx2/viewfrm.hxx>
+#endif
+#ifndef _SFXINIPROP_HXX
+#include <svtools/iniprop.hxx>
+#endif
+
+//#include <usr/ustring.hxx>
+#include "hlmailtp.hxx"
+#include "hyperdlg.hrc"
+
+using namespace ::rtl;
+using namespace ::com::sun::star;
+
+/*************************************************************************
+|*
+|* Contructor / Destructor
+|*
+|************************************************************************/
+
+SvxHyperlinkMailTp::SvxHyperlinkMailTp ( Window *pParent, const SfxItemSet& rItemSet)
+: maGrpMailNews ( this, ResId (GRP_MAILNEWS) ),
+ maRbtMail ( this, ResId (RB_LINKTYP_MAIL) ),
+ maRbtNews ( this, ResId (RB_LINKTYP_NEWS) ),
+ maFtReceiver ( this, ResId (FT_RECEIVER) ),
+ maCbbReceiver ( this, INET_PROT_MAILTO ),
+ maFtSubject ( this, ResId (FT_SUBJECT) ),
+ maEdSubject ( this, ResId (ED_SUBJECT) ),
+ maBtAdrBook ( this, ResId (BTN_ADRESSBOOK) ),
+ SvxHyperlinkTabPageBase ( pParent, SVX_RES( RID_SVXPAGE_HYPERLINK_MAIL ),
+ rItemSet )
+{
+ InitStdControls();
+ FreeResource();
+
+ // Init URL-Box (pos&size, Open-Handler)
+ maCbbReceiver.SetPosSizePixel ( LogicToPixel( Point( 54, 25 ), MAP_APPFONT ),
+ LogicToPixel( Size ( 176, 60), MAP_APPFONT ) );
+
+ maCbbReceiver.Show();
+ maCbbReceiver.SetHelpId( HID_HYPERDLG_MAIL_PATH );
+
+ SetExchangeSupport ();
+
+ // set defaults
+ maRbtMail.Check ();
+
+ // overload handlers
+ maRbtMail.SetClickHdl ( LINK ( this, SvxHyperlinkMailTp, ClickTypeEMailHdl_Impl ) );
+ maRbtNews.SetClickHdl ( LINK ( this, SvxHyperlinkMailTp, ClickTypeNewsHdl_Impl ) );
+ maBtAdrBook.SetClickHdl ( LINK ( this, SvxHyperlinkMailTp, ClickAdrBookHdl_Impl ) );
+
+ maCbbReceiver.SetLoseFocusHdl( LINK ( this, SvxHyperlinkMailTp, LostFocusReceiverHdl_Impl ) );
+ maCbbReceiver.SetModifyHdl ( LINK ( this, SvxHyperlinkMailTp, ModifiedReceiverHdl_Impl) );
+}
+
+SvxHyperlinkMailTp::~SvxHyperlinkMailTp ()
+{
+}
+
+/*************************************************************************
+|*
+|* Fill the all dialog-controls except controls in groupbox "more..."
+|*
+|************************************************************************/
+
+void SvxHyperlinkMailTp::FillDlgFields ( String& aStrURL )
+{
+ INetURLObject aURL ( aStrURL );
+ String aStrScheme, aStrSubject;
+
+ // Protocoll
+ INetProtocol eProtocol = aURL.GetProtocol ();
+ switch ( eProtocol )
+ {
+ case INET_PROT_MAILTO :
+ maRbtMail.Check ();
+ maRbtNews.Check (FALSE);
+
+ maFtSubject.Enable();
+ maEdSubject.Enable();
+
+ aStrScheme.AssignAscii( RTL_CONSTASCII_STRINGPARAM( INET_MAILTO_SCHEME ) );
+
+ break;
+ case INET_PROT_NEWS :
+ maRbtMail.Check (FALSE);
+ maRbtNews.Check ();
+
+ maFtSubject.Disable();
+ maEdSubject.Disable();
+
+ aStrScheme.AssignAscii( RTL_CONSTASCII_STRINGPARAM( INET_NEWS_SCHEME ) );
+
+ break;
+ default:
+ maRbtMail.Check ();
+ maRbtNews.Check (FALSE);
+
+ break;
+ }
+
+ if ( aStrScheme != aEmptyStr )
+ {
+ xub_StrLen nPos = aURL.GetMainURL().Search ( aStrScheme, 0 ) + aStrScheme.Len();
+ String aStrURLc ( aURL.GetMainURL() );
+
+ if ( eProtocol == INET_PROT_MAILTO )
+ {
+ // Find mail-subject
+ String aStrTmp ( aStrURLc );
+
+ const sal_Char sSubject[] = "subject";
+ nPos = aStrTmp.ToLowerAscii().SearchAscii( sSubject, 0 );
+ nPos = aStrTmp.Search( sal_Unicode( '=' ), nPos );
+
+ if ( nPos != STRING_NOTFOUND )
+ aStrSubject = aStrURLc.Copy( nPos+1, aStrURLc.Len() );
+
+ nPos = aStrURLc.Search ( sal_Unicode( '?' ), 0);
+
+ aStrURLc = aStrURLc.Copy( 0, ( nPos == STRING_NOTFOUND ?
+ aStrURLc.Len() : nPos ) );
+
+ maEdSubject.SetText ( aStrSubject );
+ }
+ else
+ {
+ maEdSubject.SetText (aEmptyStr);
+ maEdSubject.SetText ( aEmptyStr );
+ }
+
+ maCbbReceiver.SetText ( aStrURLc );
+ }
+ else
+ {
+ maCbbReceiver.SetText ( aEmptyStr );
+ maEdSubject.SetText ( aEmptyStr );
+ }
+}
+
+/*************************************************************************
+|*
+|* retrieve and prepare data from dialog-fields
+|*
+|************************************************************************/
+
+void SvxHyperlinkMailTp::GetCurentItemData ( String& aStrURL, String& aStrName,
+ String& aStrIntName, String& aStrFrame,
+ SvxLinkInsertMode& eMode )
+{
+ String aStrScheme;
+ String aStrParam;
+
+ const sal_Char sMailtoScheme[] = INET_MAILTO_SCHEME;
+ const sal_Char sNewsScheme[] = INET_NEWS_SCHEME;
+
+ // get data from dialog-controls
+ aStrURL = maCbbReceiver.GetText();
+
+ if ( maRbtMail.IsChecked() && aStrURL.SearchAscii( sMailtoScheme ) != 0 )
+ {
+ aStrScheme.AssignAscii( RTL_CONSTASCII_STRINGPARAM( INET_MAILTO_SCHEME ) );
+
+ } else if ( maRbtNews.IsChecked() && aStrURL.SearchAscii( sNewsScheme ) != 0 )
+ {
+ aStrScheme.AssignAscii( RTL_CONSTASCII_STRINGPARAM( INET_NEWS_SCHEME ) );
+ }
+
+ if ( maRbtMail.IsChecked() )
+ {
+ if ( maEdSubject.GetText() != aEmptyStr )
+ {
+ aStrParam = UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "subject=" ) );
+ aStrParam += maEdSubject.GetText();
+ }
+ }
+
+ UniString aStrTmp( aStrScheme );
+ aStrTmp.Append( aStrURL );
+ INetURLObject aURL ( aStrTmp );
+ aURL.SetParam (aStrParam);
+
+ // get data from standard-fields
+ aStrIntName = mpEdText->GetText();
+ aStrName = mpEdIndication->GetText();
+ aStrFrame = mpCbbFrame->GetText();
+ eMode = (SvxLinkInsertMode) (mpLbForm->GetSelectEntryPos()+1);
+ if( IsHTMLDoc() )
+ eMode = (SvxLinkInsertMode) ( UINT16(eMode) | HLINK_HTMLMODE );
+
+ if ( aStrURL != aEmptyStr )
+ aStrURL = aURL.GetMainURL();
+
+ if ( aStrName == aEmptyStr )
+ aStrName = aStrURL;
+}
+
+/*************************************************************************
+|*
+|* static method to create Tabpage
+|*
+|************************************************************************/
+
+IconChoicePage* SvxHyperlinkMailTp::Create( Window* pWindow, const SfxItemSet& rItemSet )
+{
+ return( new SvxHyperlinkMailTp( pWindow, rItemSet ) );
+}
+
+/*************************************************************************
+|*
+|* Activate / Deactivate Tabpage
+|*
+|************************************************************************/
+
+void SvxHyperlinkMailTp::ActivatePage( const SfxItemSet& rItemSet )
+{
+ ///////////////////////////////////////
+ // Set dialog-fields from input-itemset
+ SvxHyperlinkItem *pHyperlinkItem = (SvxHyperlinkItem *)
+ rItemSet.GetItem (SID_HYPERLINK_GETLINK);
+
+ if ( pHyperlinkItem )
+ {
+ // standard-fields
+ FillStandardDlgFields (pHyperlinkItem);
+
+ mbNewName = ( pHyperlinkItem->GetName() == aEmptyStr );
+ }
+}
+
+int SvxHyperlinkMailTp::DeactivatePage( SfxItemSet* pSet )
+{
+ String aStrURL, aStrName, aStrIntName, aStrFrame;
+ SvxLinkInsertMode eMode;
+
+ GetCurentItemData ( aStrURL, aStrName, aStrIntName, aStrFrame, eMode);
+
+ USHORT nEvents = GetMacroEvents();
+ SvxMacroTableDtor* pTable = GetMacroTable();
+
+ SvxHyperlinkItem aItem( SID_HYPERLINK_GETLINK, aStrName, aStrURL, aStrFrame,
+ aStrIntName, eMode, nEvents, pTable );
+ pSet->Put (aItem);
+
+ return( LEAVE_PAGE );
+}
+
+/*************************************************************************
+|*
+|* Fill output-ItemSet
+|*
+|************************************************************************/
+
+BOOL SvxHyperlinkMailTp::FillItemSet( SfxItemSet& rOut)
+{
+ String aStrURL, aStrName, aStrIntName, aStrFrame;
+ SvxLinkInsertMode eMode;
+
+ GetCurentItemData ( aStrURL, aStrName, aStrIntName, aStrFrame, eMode);
+
+ USHORT nEvents = GetMacroEvents();
+ SvxMacroTableDtor* pTable = GetMacroTable();
+
+ SvxHyperlinkItem aItem( SID_HYPERLINK_SETLINK, aStrName, aStrURL, aStrFrame,
+ aStrIntName, eMode, nEvents, pTable );
+ rOut.Put (aItem);
+
+ return TRUE;
+}
+
+/*************************************************************************
+|*
+|* reset dialog-fields
+|*
+|************************************************************************/
+
+void SvxHyperlinkMailTp::Reset( const SfxItemSet& rItemSet)
+{
+ ///////////////////////////////////////
+ // Set dialog-fields from create-itemset
+ maStrInitURL = aEmptyStr;
+
+ SvxHyperlinkItem *pHyperlinkItem = (SvxHyperlinkItem *)
+ rItemSet.GetItem (SID_HYPERLINK_GETLINK);
+
+ if ( pHyperlinkItem )
+ {
+ // set dialog-fields
+ FillStandardDlgFields (pHyperlinkItem);
+
+ // set all other fields
+ FillDlgFields ( (String&)pHyperlinkItem->GetURL() );
+
+ // Store initial URL
+ maStrInitURL = pHyperlinkItem->GetURL();
+
+ mbNewName = ( pHyperlinkItem->GetName() == aEmptyStr );
+ }
+}
+
+/*************************************************************************
+|*
+|* Set initial focus
+|*
+|************************************************************************/
+
+void SvxHyperlinkMailTp::SetInitFocus()
+{
+ maCbbReceiver.GrabFocus();
+}
+
+/*************************************************************************
+|*
+|* Change Scheme-String
+|*
+|************************************************************************/
+
+void SvxHyperlinkMailTp::ChangeScheme ( String& aStrURL, String aStrNewScheme )
+{
+ INetURLObject aURL ( aStrURL );
+ String aStrScheme;
+
+ // set protocoll-radiobuttons
+ INetProtocol aProtocol = aURL.GetProtocol ();
+ switch ( aProtocol )
+ {
+ case INET_PROT_MAILTO :
+ aStrScheme.AssignAscii( RTL_CONSTASCII_STRINGPARAM( INET_MAILTO_SCHEME ) );
+ break;
+ case INET_PROT_NEWS :
+ aStrScheme.AssignAscii( RTL_CONSTASCII_STRINGPARAM( INET_NEWS_SCHEME ) );
+ break;
+ }
+
+ if ( aStrScheme != aEmptyStr )
+ {
+ aStrURL = aStrNewScheme;
+ aStrURL += aStrURL.Erase ( 0, aStrScheme.Len() );
+ }
+}
+
+/*************************************************************************
+|*
+|* Click on radiobutton : Type EMail
+|*
+|************************************************************************/
+
+IMPL_LINK ( SvxHyperlinkMailTp, ClickTypeEMailHdl_Impl, void *, EMPTYARG )
+{
+ maFtSubject.Enable();
+ maEdSubject.Enable();
+
+ String aStrURL ( maCbbReceiver.GetText() );
+ ChangeScheme ( aStrURL, UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM ( INET_MAILTO_SCHEME ) ) );
+ maCbbReceiver.SetText ( aStrURL );
+
+ ModifiedReceiverHdl_Impl (NULL);
+
+ return( 0L );
+}
+
+/*************************************************************************
+|*
+|* Click on radiobutton : Type News
+|*
+|************************************************************************/
+
+IMPL_LINK ( SvxHyperlinkMailTp, ClickTypeNewsHdl_Impl, void *, EMPTYARG )
+{
+ maFtSubject.Disable();
+ maEdSubject.Disable();
+
+ String aStrURL ( maCbbReceiver.GetText() );
+ ChangeScheme ( aStrURL, UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM ( INET_NEWS_SCHEME ) ) );
+ maCbbReceiver.SetText ( aStrURL );
+
+ ModifiedReceiverHdl_Impl (NULL);
+
+ return( 0L );
+}
+
+/*************************************************************************
+|*
+|* Contens of editfield "receiver" modified
+|*
+|************************************************************************/
+
+IMPL_LINK ( SvxHyperlinkMailTp, ModifiedReceiverHdl_Impl, void *, EMPTYARG )
+{
+ const sal_Char sMailtoScheme[] = INET_MAILTO_SCHEME;
+ const sal_Char sNewsScheme[] = INET_NEWS_SCHEME;
+
+ String aStrCurrentReceiver( maCbbReceiver.GetText() );
+
+ if ( mbNewName )
+ mpEdIndication->SetText ( aStrCurrentReceiver );
+
+ // changed scheme ? - Then change radiobutton-settings
+ if( aStrCurrentReceiver.SearchAscii( sMailtoScheme ) == 0 && !maRbtMail.IsChecked() )
+ {
+ maRbtMail.Check();
+ maRbtNews.Check(FALSE);
+ maFtSubject.Enable();
+ maEdSubject.Enable();
+ }
+ else if( aStrCurrentReceiver.SearchAscii( sNewsScheme ) == 0 && !maRbtNews.IsChecked() )
+ {
+ maRbtMail.Check(FALSE);
+ maRbtNews.Check();
+ maFtSubject.Disable();
+ maEdSubject.Disable();
+ }
+
+ return( 0L );
+}
+
+/*************************************************************************
+|*
+|* Combobox Receiver lost the focus
+|*
+|************************************************************************/
+
+IMPL_LINK ( SvxHyperlinkMailTp, LostFocusReceiverHdl_Impl, void *, EMPTYARG )
+{
+ const sal_Char sMailtoScheme[] = INET_MAILTO_SCHEME;
+ const sal_Char sNewsScheme[] = INET_NEWS_SCHEME;
+
+ String aStrURL ( maCbbReceiver.GetText() );
+ String aStrScheme;
+
+ if ( maRbtMail.IsChecked() && aStrURL.SearchAscii( sMailtoScheme ) != 0 )
+ {
+ aStrScheme.AssignAscii( RTL_CONSTASCII_STRINGPARAM( INET_MAILTO_SCHEME ) );
+ } else if ( maRbtNews.IsChecked() && aStrURL.SearchAscii( sNewsScheme ) != 0 )
+ {
+ aStrScheme.AssignAscii( RTL_CONSTASCII_STRINGPARAM( INET_NEWS_SCHEME ) );
+ }
+
+ if ( aStrURL != aEmptyStr )
+ {
+ String aStrTarget ( aStrScheme );
+ aStrTarget += aStrURL;
+ maCbbReceiver.SetText ( aStrTarget );
+ }
+
+ ModifiedReceiverHdl_Impl (NULL);
+
+ return (0L);
+}
+
+/*************************************************************************
+|*
+|* Click on imagebutton : addressbook
+|*
+|************************************************************************/
+
+IMPL_LINK ( SvxHyperlinkMailTp, ClickAdrBookHdl_Impl, void *, EMPTYARG )
+{
+ SfxViewFrame* pViewFrame = SfxViewFrame::Current();
+ uno::Reference< frame::XDispatchProvider > xProv( pViewFrame->GetFrame()->GetFrameInterface(), uno::UNO_QUERY );
+ if ( xProv.is() )
+ {
+ SfxAppIniManagerProperty aProp;
+ GetpApp()->Property( aProp );
+ if( !aProp.GetIniManager() )
+ return ( 0L );
+
+ String aAddressBook = aProp.GetIniManager()->Get( SFX_KEY_ADDRESSBOOK );
+ INetURLObject aObj;
+ aObj.SetSmartProtocol( INET_PROT_FILE );
+ aObj.SetURL( aAddressBook.GetToken( 0, sal_Unicode( ';' ) ) );
+
+ String aMark( RTL_CONSTASCII_USTRINGPARAM( "db:Table;" ) );
+ aMark += aAddressBook.GetToken( 1, sal_Unicode( ';' ) );
+ aObj.SetMark( aMark );
+
+ util::URL aURL;
+ aURL.Complete = ::rtl::OUString( aObj.GetMainURL() );
+
+ uno::Reference< lang::XMultiServiceFactory > xFactory( ::utl::getProcessServiceFactory() );
+ if( xFactory.is() )
+ {
+ uno::Reference< util::XURLTransformer > xTrans( xFactory->createInstance
+ ( OUString::createFromAscii( "com.sun.star.util.URLTransformer" ) ),
+ uno::UNO_QUERY);
+ xTrans->parseStrict( aURL );
+
+ uno::Reference< frame::XDispatch > aDisp = xProv->queryDispatch( aURL,
+ OUString::createFromAscii( "_beamer" ),
+ frame::FrameSearchFlag::GLOBAL |
+ frame::FrameSearchFlag::CREATE );
+ if ( aDisp.is() )
+ {
+ uno::Sequence< beans::PropertyValue > aArgs(1);
+ beans::PropertyValue* pArg = aArgs.getArray();
+ pArg[0].Name = DEFINE_CONST_UNICODE("Referer");
+ pArg[0].Value = uno::makeAny( OUString( DEFINE_CONST_UNICODE("private:user") ) );
+ aDisp->dispatch( aURL, aArgs );
+ }
+ }
+ }
+
+ return( 0L );
+}
+
+
diff --git a/svx/source/dialog/hlmarkwn.cxx b/svx/source/dialog/hlmarkwn.cxx
new file mode 100644
index 000000000000..c97171e59d5d
--- /dev/null
+++ b/svx/source/dialog/hlmarkwn.cxx
@@ -0,0 +1,570 @@
+/*************************************************************************
+ *
+ * $RCSfile: hlmarkwn.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:08 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _SV_WRKWIN_HXX
+#include <vcl/wrkwin.hxx>
+#endif
+#ifndef _SVX_DIALMGR_HXX
+#include <dialmgr.hxx>
+#endif
+#ifndef _SFXDOCFILE_HXX
+#include <sfx2/docfile.hxx>
+#endif
+
+// UNO-Stuff
+#include <unotools/processfactory.hxx>
+
+#ifndef _COM_SUN_STAR_AWT_XBITMAP_HPP_
+#include <com/sun/star/awt/XBitmap.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XDESKTOP_HPP_
+#include <com/sun/star/frame/XDesktop.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XDESKTOP_HPP_
+#include <com/sun/star/frame/XDesktop.hpp>
+#endif
+#ifndef _COM_SUN_STAR_FRAME_XCOMPONENTLOADER_HPP_
+#include <com/sun/star/frame/XComponentLoader.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_
+#include <com/sun/star/beans/PropertyValue.hpp>
+#endif
+#ifndef _COM_SUN_STAR_DOCUMENT_XLINKTARGETSUPPLIER_HPP_
+#include <com/sun/star/document/XLinkTargetSupplier.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
+#include <com/sun/star/beans/XPropertySet.hpp>
+#endif
+
+#include <toolkit/unohlp.hxx>
+
+#include "dialogs.hrc"
+#include "hlmarkwn.hrc"
+#include "hlmarkwn.hxx"
+#include "hltpbase.hxx"
+
+using namespace ::com::sun::star;
+using namespace ::rtl;
+
+/*************************************************************************
+|*
+|* Userdata-struct for tree-entries
+|*
+|************************************************************************/
+
+struct TargetData
+{
+ OUString aUStrLinkname;
+ BOOL bIsTarget;
+
+ TargetData ( OUString aUStrLName, BOOL bTarget )
+ : bIsTarget ( bTarget )
+ {
+ if ( bIsTarget )
+ aUStrLinkname = aUStrLName;
+ }
+};
+
+
+//########################################################################
+//# #
+//# Tree-Window #
+//# #
+//########################################################################
+
+SvxHlmarkTreeLBox::SvxHlmarkTreeLBox( Window* pParent, const ResId& rResId )
+: SvTreeListBox ( pParent, rResId ),
+ mpParentWnd ( (SvxHlinkDlgMarkWnd*) pParent )
+{}
+
+void SvxHlmarkTreeLBox::Paint( const Rectangle& rRect )
+{
+ if( mpParentWnd->mnError == LERR_NOERROR )
+ {
+ SvTreeListBox::Paint(rRect);
+ }
+ else
+ {
+ Erase();
+
+ Rectangle aDrawRect( Point( 0, 0 ), GetSizePixel() );
+
+ String aStrMessage;
+
+ switch( mpParentWnd->mnError )
+ {
+ case LERR_NOENTRIES :
+ aStrMessage = SVX_RESSTR( RID_SVXSTR_HYPDLG_ERR_LERR_NOENTRIES );
+ break;
+ case LERR_DOCNOTOPEN :
+ aStrMessage = SVX_RESSTR( RID_SVXSTR_HYPDLG_ERR_LERR_DOCNOTOPEN );
+ break;
+ }
+
+ DrawText( aDrawRect, aStrMessage, TEXT_DRAW_LEFT | TEXT_DRAW_MULTILINE | TEXT_DRAW_WORDBREAK );
+ }
+
+}
+
+//########################################################################
+//# #
+//# Window-Class #
+//# #
+//########################################################################
+
+/*************************************************************************
+|*
+|* Contructor / Destructor
+|*
+|************************************************************************/
+
+SvxHlinkDlgMarkWnd::SvxHlinkDlgMarkWnd( SvxHyperlinkTabPageBase *pParent )
+: FloatingWindow( (Window*)pParent, SVX_RES ( RID_SVXFLOAT_HYPERLINK_MARKWND ) ),
+ maBtApply( this, ResId (BT_APPLY) ),
+ maBtClose( this, ResId (BT_CLOSE) ),
+ maLbTree ( this, ResId (TLB_MARK) ),
+ mbUserMoved ( FALSE ),
+ mbFirst ( TRUE ),
+ mpParent ( pParent ),
+ mnError ( LERR_NOERROR )
+{
+ FreeResource();
+
+ maBtApply.SetClickHdl ( LINK ( this, SvxHlinkDlgMarkWnd, ClickApplyHdl_Impl ) );
+ maBtClose.SetClickHdl ( LINK ( this, SvxHlinkDlgMarkWnd, ClickCloseHdl_Impl ) );
+ maLbTree.SetDoubleClickHdl ( LINK ( this, SvxHlinkDlgMarkWnd, ClickApplyHdl_Impl ) );
+
+ // Tree-ListBox mit Linien versehen
+ maLbTree.SetWindowBits( WinBits( WB_TABSTOP | WB_BORDER | WB_HASLINES |
+ WB_HASBUTTONS | //WB_HASLINESATROOT |
+ WB_HSCROLL | WB_HASBUTTONSATROOT ) );
+
+ maLbTree.SetNodeBitmaps( Bitmap( ResId( RID_SVXBMP_HYPDLG_EXPAND ) ),
+ Bitmap( ResId( RID_SVXBMP_HYPDLG_COLLAPSE ) ) );
+}
+
+SvxHlinkDlgMarkWnd::~SvxHlinkDlgMarkWnd()
+{
+ ClearTree();
+}
+
+/*************************************************************************
+|*
+|* Set an errorstatus
+|*
+|************************************************************************/
+
+USHORT SvxHlinkDlgMarkWnd::SetError( USHORT nError)
+{
+ USHORT nOldError = mnError;
+ mnError = nError;
+
+ if( mnError != LERR_NOERROR )
+ ClearTree();
+
+ maLbTree.Invalidate();
+
+ return nOldError;
+}
+
+/*************************************************************************
+|*
+|* Move window
+|*
+|************************************************************************/
+
+const BOOL SvxHlinkDlgMarkWnd::MoveTo ( Point aNewPos )
+{
+ if ( !mbUserMoved )
+ {
+ BOOL bOldStatus = mbUserMoved;
+ SetPosPixel ( aNewPos );
+ mbUserMoved = bOldStatus;
+ }
+
+ return mbUserMoved;
+}
+
+void SvxHlinkDlgMarkWnd::Move ()
+{
+ Window::Move();
+
+ if ( IsReallyVisible() )
+ mbUserMoved = TRUE;
+}
+
+const BOOL SvxHlinkDlgMarkWnd::ConnectToDialog( BOOL bDoit )
+{
+ BOOL bOldStatus = mbUserMoved;
+
+ mbUserMoved = !bDoit;
+
+ return bOldStatus;
+}
+
+/*************************************************************************
+|*
+|* Interface to refresh tree
+|*
+|************************************************************************/
+
+void SvxHlinkDlgMarkWnd::RefreshTree ( String aStrURL )
+{
+ String aEmptyStr;
+ OUString aUStrURL;
+
+ EnterWait();
+
+ ClearTree();
+
+ int nPos = aStrURL.Search ( sal_Unicode('#') );
+
+ if( nPos != 0 )
+ aUStrURL = ::rtl::OUString( aStrURL );
+
+ if( !RefreshFromDoc ( aUStrURL ) )
+ maLbTree.Invalidate();
+
+ if ( nPos != STRING_NOTFOUND )
+ {
+ String aStrMark = aStrURL.Copy ( nPos+1 );
+ SelectEntry ( aStrMark );
+ }
+
+ LeaveWait();
+
+ maStrLastURL = aStrURL;
+}
+
+/*************************************************************************
+|*
+|* get links from document
+|*
+|************************************************************************/
+
+BOOL SvxHlinkDlgMarkWnd::RefreshFromDoc( OUString aURL )
+{
+ mnError = LERR_NOERROR;
+
+ uno::Reference< lang::XMultiServiceFactory > xFactory( ::utl::getProcessServiceFactory() );
+ if( xFactory.is() )
+ {
+ uno::Reference< frame::XDesktop > xDesktop( xFactory->createInstance( OUString::createFromAscii( "com.sun.star.frame.Desktop" ) ),
+ uno::UNO_QUERY );
+ if( xDesktop.is() )
+ {
+ uno::Reference< lang::XComponent > xComp;
+
+ if( aURL.getLength() )
+ {
+ // load from url
+ uno::Reference< frame::XComponentLoader > xLoader( xDesktop, uno::UNO_QUERY );
+ if( xLoader.is() )
+ {
+ uno::Sequence< beans::PropertyValue > noargs;
+ xComp = xLoader->loadComponentFromURL( aURL, OUString::createFromAscii( "_hidden" ), 0,
+ noargs );
+ }
+ }
+ else
+ {
+ // the component with user focus ( current document )
+ xComp = xDesktop->getCurrentComponent();
+ }
+
+ if( xComp.is() )
+ {
+ uno::Reference< document::XLinkTargetSupplier > xLTS( xComp, uno::UNO_QUERY );
+
+ if( xLTS.is() )
+ {
+ if( FillTree( xLTS->getLinks() ) == 0 )
+ mnError = LERR_NOENTRIES;
+ }
+ else
+ mnError = LERR_DOCNOTOPEN;
+
+ if ( aURL.getLength() )
+ xComp->dispose();
+ }
+ else
+ {
+ if( aURL.getLength() )
+ mnError=LERR_DOCNOTOPEN;
+ }
+ }
+ }
+ return (mnError==0);
+}
+/*
+void SvxHlinkDlgMarkWnd::Error(int nNr)
+{
+ switch(nNr)
+ {
+ case 0:
+ {
+ Rectangle aDrawRect( Point( 0, 0 ), maLbTree.GetSizePixel() );
+ //maLbTree.SetTextColor( Color(COL_BLACK) );
+ //maLbTree.DrawText( aDrawRect, "Keine Ziele im Dokument vorhanden.", TEXT_DRAW_LEFT);// | TEXT_DRAW_MULTILINE | TEXT_DRAW_WORDBREAK );
+ maLbTree.DrawText( Point(0,0), "Keine Ziele im Dokument vorhanden.");
+ maLbTree.DrawLine(aDrawRect.TopLeft(), aDrawRect.BottomRight() );
+ }
+ break;
+ case 1:
+ Rectangle aDrawRect( Point( 0, 0 ), maLbTree.GetSizePixel() );
+ maLbTree.DrawText( aDrawRect, "Das Dokument konnte nicht geffnet werden.", TEXT_DRAW_LEFT | TEXT_DRAW_MULTILINE | TEXT_DRAW_WORDBREAK );
+ break;
+ }
+}
+*/
+/*************************************************************************
+|*
+|* Fill Tree-Control
+|*
+|************************************************************************/
+
+int SvxHlinkDlgMarkWnd::FillTree( uno::Reference< container::XNameAccess > xLinks, SvLBoxEntry* pParentEntry )
+{
+ int nEntries=0;
+ const uno::Sequence< OUString > aNames( xLinks->getElementNames() );
+ const ULONG nLinks = aNames.getLength();
+ const OUString* pNames = aNames.getConstArray();
+
+ uno::Any aAny;
+
+ for( ULONG i = 0; i < nLinks; i++ )
+ {
+ OUString aLink( *pNames++ );
+
+ aAny = xLinks->getByName( aLink );
+
+ if( aAny.getValueType() == ::getCppuType(( const uno::Reference< beans::XPropertySet >*)0))
+ {
+ uno::Reference< beans::XPropertySet > xTarget( (beans::XPropertySet*)aAny.getValue() );
+
+ if( xTarget.is() )
+ {
+ try
+ {
+ // get name to display
+ aAny = xTarget->getPropertyValue( OUString::createFromAscii( "LinkDisplayName" ) );
+ OUString aDisplayName;
+ aAny >>= aDisplayName;
+ String aStrDisplayname ( aDisplayName );
+
+ // is it a target ?
+ uno::Reference< lang::XServiceInfo > xSI( xTarget, uno::UNO_QUERY );
+ BOOL bIsTarget = xSI->supportsService( OUString::createFromAscii( "com.sun.star.document.LinkTarget" ) );
+
+ // create userdata
+ TargetData *pData = new TargetData ( aLink, bIsTarget );
+
+ SvLBoxEntry* pEntry;
+
+ try
+ {
+ // get bitmap for the tree-entry
+ uno::Any aAny( xTarget->getPropertyValue( OUString::createFromAscii( "LinkDisplayBitmap" ) ) );
+ if( aAny.getValueType() == ::getCppuType(( const uno::Reference< awt::XBitmap >*)0) && aAny.hasValue() )
+ {
+ uno::Reference< awt::XBitmap > xBmp( (awt::XBitmap *)aAny.getValue() );
+ BitmapEx aBmp( VCLUnoHelper::GetBitmap( xBmp ) );
+
+ // insert Displayname into treelist with bitmaps
+ pEntry = maLbTree.InsertEntry ( aStrDisplayname,
+ aBmp, aBmp,
+ pParentEntry,
+ FALSE, LIST_APPEND,
+ (void*)pData );
+ nEntries++;
+ }
+ else
+ {
+ // insert Displayname into treelist without bitmaps
+ pEntry = maLbTree.InsertEntry ( aStrDisplayname,
+ pParentEntry,
+ FALSE, LIST_APPEND,
+ (void*)pData );
+ nEntries++;
+ }
+ }
+ catch(...)
+ {
+ // insert Displayname into treelist without bitmaps
+ pEntry = maLbTree.InsertEntry ( aStrDisplayname,
+ pParentEntry,
+ FALSE, LIST_APPEND,
+ (void*)pData );
+ nEntries++;
+ }
+
+ uno::Reference< document::XLinkTargetSupplier > xLTS( xTarget, uno::UNO_QUERY );
+ if( xLTS.is() )
+ nEntries += FillTree( xLTS->getLinks(), pEntry );
+ }
+ catch(...)
+ {
+ }
+ }
+ }
+ }
+
+ return nEntries;
+}
+
+/*************************************************************************
+|*
+|* Clear Tree
+|*
+|************************************************************************/
+
+void SvxHlinkDlgMarkWnd::ClearTree()
+{
+ SvLBoxEntry* pEntry = maLbTree.First();
+
+ while ( pEntry )
+ {
+ TargetData* pUserData = ( TargetData * ) pEntry->GetUserData();
+ delete pUserData;
+
+ pEntry = maLbTree.Next( pEntry );
+ }
+
+ maLbTree.Clear();
+}
+
+/*************************************************************************
+|*
+|* Find Entry for Strng
+|*
+|************************************************************************/
+
+SvLBoxEntry* SvxHlinkDlgMarkWnd::FindEntry ( String aStrName )
+{
+ BOOL bFound=FALSE;
+ SvLBoxEntry* pEntry = maLbTree.First();
+
+ while ( pEntry && !bFound )
+ {
+ TargetData* pUserData = ( TargetData * ) pEntry->GetUserData ();
+ if ( aStrName == String( pUserData->aUStrLinkname ) )
+ bFound = TRUE;
+ else
+ pEntry = maLbTree.Next( pEntry );
+ }
+
+ return pEntry;
+}
+
+/*************************************************************************
+|*
+|* Select Entry
+|*
+|************************************************************************/
+
+void SvxHlinkDlgMarkWnd::SelectEntry ( String aStrMark )
+{
+ SvLBoxEntry* pEntry = FindEntry ( aStrMark );
+ if ( pEntry )
+ {
+ maLbTree.Select ( pEntry );
+ maLbTree.MakeVisible ( pEntry );
+ }
+}
+
+/*************************************************************************
+|*
+|* Click on Apply-Button / Doubleclick on item in tree
+|*
+|************************************************************************/
+
+IMPL_LINK ( SvxHlinkDlgMarkWnd, ClickApplyHdl_Impl, void *, EMPTYARG )
+{
+ SvLBoxEntry* pEntry = maLbTree.GetCurEntry();
+
+ if ( pEntry )
+ {
+ TargetData *pData = ( TargetData * )pEntry->GetUserData();
+
+ if ( pData->bIsTarget )
+ {
+ String aStrMark ( pData->aUStrLinkname );
+ mpParent->SetMarkStr ( aStrMark );
+ }
+ }
+
+ return( 0L );
+}
+
+/*************************************************************************
+|*
+|* Click on Close-Button
+|*
+|************************************************************************/
+
+IMPL_LINK ( SvxHlinkDlgMarkWnd, ClickCloseHdl_Impl, void *, EMPTYARG )
+{
+ Hide();
+
+ return( 0L );
+}
+
+
diff --git a/svx/source/dialog/hlmarkwn.src b/svx/source/dialog/hlmarkwn.src
new file mode 100644
index 000000000000..2eae11971392
--- /dev/null
+++ b/svx/source/dialog/hlmarkwn.src
@@ -0,0 +1,220 @@
+/*************************************************************************
+ *
+ * $RCSfile: hlmarkwn.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:08 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include "dialogs.hrc"
+#include "helpid.hrc"
+#include "hlmarkwn.hrc"
+
+FloatingWindow RID_SVXFLOAT_HYPERLINK_MARKWND
+{
+ HelpID = HID_HYPERLINK_MARKWND;
+ OutputSize = TRUE ;
+ Moveable = TRUE ;
+ Closeable = TRUE ;//?????
+ Sizeable = FALSE ;
+ Zoomable = TRUE ;// ?????
+ Border = TRUE ;
+ Hide = TRUE ;
+ SVLook = TRUE ;
+ Size = MAP_APPFONT ( 109 , 185 ) ;
+ Text = "Sprungziel im Dokument" ;
+ Text [ ENGLISH ] = "Link target in document" ;
+ Text [ english_us ] = "Target in Document" ;
+ PushButton BT_APPLY
+ {
+ HelpId = HID_HYPERLINK_MARKWND_APPLY;
+ Pos = MAP_APPFONT ( 3 , 168 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TabStop = TRUE ;
+ DefButton = TRUE ;
+ Text = "bernehmen";
+ Text[ ENGLISH ] = "Apply";
+ Text [ english_us ] = "Apply" ;
+ Text[ portuguese ] = "Aplicar";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "Overnemen";
+ Text[ french ] = "Appliquer";
+ Text[ spanish ] = "Aplicar";
+ Text[ italian ] = "Applica";
+ Text[ danish ] = "Anvend";
+ Text[ swedish ] = "verta";
+ Text[ polish ] = "Zastosuj";
+ Text[ portuguese_brazilian ] = "Apply";
+ Text[ japanese ] = "Kp";
+ Text[ korean ] = "";
+ Text[ chinese_simplified ] = "";
+ Text[ chinese_traditional ] = "M";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "Uygula";
+ Text[ language_user1 ] = " ";
+ };
+ PushButton BT_CLOSE
+ {
+ HelpId = HID_HYPERLINK_MARKWND_CLOSE;
+ Pos = MAP_APPFONT ( 56 , 168 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ Text = "Schlieen";
+ Text[ ENGLISH ] = "Close";
+ Text [ english_us ] = "Close" ;
+ Text[ portuguese ] = "Fechar";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "Sluiten";
+ Text[ french ] = "Fermer";
+ Text[ spanish ] = "Cerrar";
+ Text[ italian ] = "Chiudi";
+ Text[ danish ] = "Luk";
+ Text[ swedish ] = "Stng";
+ Text[ polish ] = "Zamknij";
+ Text[ portuguese_brazilian ] = "Close";
+ Text[ japanese ] = "‚";
+ Text[ korean ] = "ݱ";
+ Text[ chinese_simplified ] = "ر";
+ Text[ chinese_traditional ] = "";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "Kapat";
+ Text[ language_user1 ] = " ";
+ };
+ Control TLB_MARK
+ {
+ HelpId = HID_HYPERLINK_MARKWND_TREE;
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 3 , 3 ) ;
+ Size = MAP_APPFONT ( 103 , 162 ) ;
+ TabStop = TRUE ;
+ };
+ Text[ portuguese ] = "Destino no documento";
+ Text[ russian ] = " ";
+ Text[ greek ] = " ";
+ Text[ dutch ] = "Doel in document";
+ Text[ french ] = "Cible l'intrieur du document";
+ Text[ spanish ] = "Destino en documento";
+ Text[ italian ] = "Destinazione nel documento";
+ Text[ danish ] = "Ml i dokumentet";
+ Text[ swedish ] = "Ml i dokument";
+ Text[ polish ] = "Cel w dokumencie";
+ Text[ portuguese_brazilian ] = "Target in document";
+ Text[ japanese ] = "޷Ăɂޯ";
+ Text[ korean ] = " ";
+ Text[ chinese_simplified ] = "ĵеĿ";
+ Text[ chinese_traditional ] = "󤺪ؼ";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "Belge iindeki hedef";
+};
+
+Bitmap RID_SVXBMP_HYPDLG_EXPAND
+{
+ File = "plus.bmp" ;
+};
+Bitmap RID_SVXBMP_HYPDLG_COLLAPSE
+{
+ File = "minus.bmp" ;
+};
+
+String RID_SVXSTR_HYPDLG_ERR_LERR_NOENTRIES
+{
+ Text = "Keine Sprungziele im Dokument vorhanden.";
+ Text [ ENGLISH ] = "There are no link targets available in the document." ;
+ Text [ english_us ] = "Targets do not exist in the document." ;
+ Text[ portuguese ] = "Destinos inexistentes no documento.";
+ Text[ russian ] = " .";
+ Text[ greek ] = " .";
+ Text[ dutch ] = "Geen doelen voorhanden in document";
+ Text[ french ] = "Aucune cible existante dans le document.";
+ Text[ spanish ] = "No existen destinos en el documento.";
+ Text[ italian ] = "Nel documento non esistono destinazioni.";
+ Text[ danish ] = "Der findes ingen ml i dokumentet.";
+ Text[ swedish ] = "Det finns inga ml i dokumentet.";
+ Text[ polish ] = "Brak wierszy w dokumencie.";
+ Text[ portuguese_brazilian ] = "There are no targets available in the document.";
+ Text[ japanese ] = "޷ĂޯĂ܂B";
+ Text[ korean ] = " ϴ.";
+ Text[ chinese_simplified ] = "ĵвĿꡣ";
+ Text[ chinese_traditional ] = "󤺨SؼСC";
+ Text[ arabic ] = " .";
+ Text[ turkish ] = "Belge hedef iermiyor.";
+};
+
+String RID_SVXSTR_HYPDLG_ERR_LERR_DOCNOTOPEN
+{
+ Text = "Das Dokument konnte nicht geffnet werden.";
+ Text [ ENGLISH ] = "Couldn't open the document." ;
+ Text [ english_us ] = "Couldn't open the document." ;
+ Text[ portuguese ] = "Foi impossvel abrir o documento.";
+ Text[ russian ] = " .";
+ Text[ greek ] = " .";
+ Text[ dutch ] = "Document kon niet geopend worden";
+ Text[ french ] = "Impossible d'ouvrir le document.";
+ Text[ spanish ] = "No se pudo abrir el documento.";
+ Text[ italian ] = "Non stato possibile aprire il documento.";
+ Text[ danish ] = "Det var ikke muligt at bne dokumentet.";
+ Text[ swedish ] = "Dokumentet kunde inte ppnas.";
+ Text[ polish ] = "Nie mona byo otworzy dokumentu.";
+ Text[ portuguese_brazilian ] = "Couldn't open the document.";
+ Text[ japanese ] = "޷Ă͊J܂łB";
+ Text[ korean ] = " ߽ϴ.";
+ Text[ chinese_simplified ] = "޷ĵ";
+ Text[ chinese_traditional ] = "Lk}ҤC";
+ Text[ arabic ] = " .";
+ Text[ turkish ] = "Belge alamad.";
+};
+
diff --git a/svx/source/dialog/hltpbase.cxx b/svx/source/dialog/hltpbase.cxx
new file mode 100644
index 000000000000..e681b7318e53
--- /dev/null
+++ b/svx/source/dialog/hltpbase.cxx
@@ -0,0 +1,719 @@
+/*************************************************************************
+ *
+ * $RCSfile: hltpbase.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:09 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _SFXFRAME_HXX
+#include <sfx2/frame.hxx>
+#endif
+#ifndef _SFXVIEWFRM_HXX
+#include <sfx2/viewfrm.hxx>
+#endif
+
+#ifndef _SV_DRAG_HXX
+#include <vcl/drag.hxx>
+#endif
+#ifndef _SOT_FORMATS_HXX
+#include <sot/formats.hxx>
+#endif
+
+#include <sfx2/sfxsids.hrc>
+#define ITEMID_MACRO SID_ATTR_MACROITEM
+#ifndef _SFXMACITEM_HXX
+#include <svtools/macitem.hxx>
+#endif
+
+#include "hyperdlg.hrc"
+
+#ifndef _SVX_TAB_HYPERLINK_HXX
+#include "hyperdlg.hxx"
+#endif
+
+#include "hltpbase.hxx"
+
+//########################################################################
+//# #
+//# ComboBox-Control, wich is filled with all current framenames #
+//# #
+//########################################################################
+
+/*************************************************************************
+|*
+|* Contructor / Destructor
+|*
+|************************************************************************/
+
+SvxFramesComboBox::SvxFramesComboBox ( Window* pParent, WinBits nStyle )
+: ComboBox (pParent, nStyle)
+{
+ GetCurrentFrameNames ();
+}
+
+SvxFramesComboBox::SvxFramesComboBox ( Window* pParent, const ResId& rResId )
+: ComboBox (pParent, rResId)
+{
+ GetCurrentFrameNames ();
+}
+
+SvxFramesComboBox::~SvxFramesComboBox ()
+{
+}
+
+/*************************************************************************
+|*
+|* Fill list with curretn known framenames
+|*
+|************************************************************************/
+
+BOOL SvxFramesComboBox::GetCurrentFrameNames ()
+{
+ TargetList* pList = new TargetList;
+ const SfxFrame* pFrame = SFX_APP()->GetViewFrame()->GetTopFrame();
+ if ( pFrame )
+ {
+ pFrame->GetTargetList(*pList);
+ USHORT nCount = (USHORT)pList->Count();
+ if( nCount )
+ {
+ USHORT i;
+ for ( i = 0; i < nCount; i++ )
+ {
+ InsertEntry(*pList->GetObject(i));
+ }
+ for ( i = nCount; i; i-- )
+ {
+ delete pList->GetObject( i - 1 );
+ }
+ }
+ delete pList;
+ }
+
+ return pFrame!=NULL;
+}
+
+//########################################################################
+//# #
+//# ComboBox-Control for URL's with History and Autocompletion #
+//# #
+//########################################################################
+
+/*************************************************************************
+|*
+|* Contructor / Destructor
+|*
+|************************************************************************/
+
+SvxHyperURLBox::SvxHyperURLBox( Window* pParent, INetProtocol eSmart, BOOL bAddresses )
+: SfxURLBox ( pParent, eSmart ),
+ mbAccessAddress (bAddresses)
+{}
+
+BOOL SvxHyperURLBox::QueryDrop( DropEvent& rEvt )
+{
+ for( int i=0; i<DragServer::GetItemCount(); i++)
+ {
+ if ( DragServer::HasFormat( i, FORMAT_STRING ) )
+ /*|| ( DragServer::HasFormat( i, SOT_FORMATSTR_ID_SBA_DATAEXCHANGE ) && mbAccessAddress ) )*/
+ {
+ return TRUE;
+ }
+ }
+ return FALSE;
+}
+
+BOOL SvxHyperURLBox::Drop( const DropEvent &rEvt )
+{
+ if( rEvt.IsDefaultAction() )
+ ( (DropEvent&)rEvt).SetAction( DROP_COPY );
+
+ BOOL bDone = FALSE;
+ USHORT nCount = DragServer::GetItemCount();
+
+ for ( USHORT i = 0; i < nCount; ++i )
+ {
+ if( !bDone && DragServer::HasFormat( i, FORMAT_STRING ) )
+ {
+ SetText( DragServer::PasteString(i) );
+ bDone = TRUE;
+ break;
+ }
+ /*
+ Falls Adresse aus Datenbank gedragged werden soll....
+ if( !bDone && mbAccessAddress &&
+ DragServer::HasFormat( i, SOT_FORMATSTR_ID_SBA_DATAEXCHANGE ) )
+ {
+ String aAddress = GetAllEmailNamesFromDragItem(i);
+
+ if ( aAddress.Len() )
+ {
+ SetText( aAddress );
+ bDone = TRUE;
+ break;
+ }
+ }
+ */
+ }
+
+ return TRUE;
+}
+
+/*
+Diese Methode parsed eine EMailadresse aus einem D&D-DataObjekt aus der Adredatenbank heraus
+
+#ifndef _OFF_OFADBMGR_HXX
+#include <offmgr/ofadbmgr.hxx>
+#endif
+#ifndef _OFF_APP_HXX
+#include <offmgr/app.hxx>
+#endif
+#ifndef _SDB_SDBCURS_HXX
+#include <sdb/sdbcurs.hxx>
+#endif
+
+#define DB_DD_DELIM ((char)11)
+
+String SvxHyperURLBox::GetAllEmailNamesFromDragItem( USHORT nItem )
+{
+#if !defined( ICC ) && !defined( SOLARIS )
+ String aAddress;
+
+ if ( DragServer::HasFormat( nItem, SOT_FORMATSTR_ID_SBA_DATAEXCHANGE ) )
+ {
+ ULONG nLen = DragServer::GetDataLen( nItem, SOT_FORMATSTR_ID_SBA_DATAEXCHANGE ) - 1;
+ USHORT i = 0;
+ String aTxt;
+ char *pTxt = aTxt.AllocStrBuf( (USHORT)nLen );
+ DragServer::PasteData( nItem, pTxt, nLen, SOT_FORMATSTR_ID_SBA_DATAEXCHANGE );
+ String aDBName = aTxt.GetToken( i++, DB_DD_DELIM );
+ String aTableName = aTxt.GetToken( i++, DB_DD_DELIM );
+ i++; // Format"anderung
+ String aStatement = aTxt.GetToken( i++, DB_DD_DELIM );
+ if ( !aStatement )
+ {
+ aDBName += DB_DELIM;
+ aDBName += aTableName;
+ }
+ else
+ {
+ // use here another delimiter, because the OfaDBMgr uses two
+ // delimiters ( (char)11 and ; )
+ aDBName += ';';
+ aDBName += aStatement;
+ }
+ SbaSelectionListRef pSelectionList;
+ pSelectionList.Clear();
+ pSelectionList = new SbaSelectionList;
+ USHORT nTokCnt = aTxt.GetTokenCount( DB_DD_DELIM );
+
+ for ( ; i < nTokCnt; ++i )
+ pSelectionList->Insert(
+ (void*)(USHORT)aTxt.GetToken( i, DB_DD_DELIM ), LIST_APPEND );
+
+ OfaDBMgr* pDBMgr = OFF_APP()->GetOfaDBMgr();
+ BOOL bBasic = DBMGR_STD;
+
+ if ( !pDBMgr->OpenDB( bBasic, aDBName ) )
+ return aAddress;
+
+ OfaDBParam& rParam = pDBMgr->GetDBData( bBasic );
+ pDBMgr->ChangeStatement( bBasic, aStatement );
+ rParam.pSelectionList->Clear();
+
+ if ( pSelectionList.Is() &&
+ (long)pSelectionList->GetObject(0) != -1L )
+ *rParam.pSelectionList = *pSelectionList;
+
+ if ( !pDBMgr->ToFirstSelectedRecord( bBasic ) )
+ {
+ pDBMgr->CloseAll();
+ return aAddress;
+ }
+
+ if ( pDBMgr->IsSuccessful( bBasic ) )
+ {
+ // Spaltenk"opfe
+ SbaDBDataDefRef aDBDef = pDBMgr->OpenColumnNames( bBasic );
+
+ if ( aDBDef.Is() )
+ {
+ SbaColumn* pCol = aDBDef->GetColumn("EMAIL");
+ ULONG nPos = 0;
+
+ if ( pCol )
+ nPos = aDBDef->GetOriginalColumns().GetPos( pCol ) + 1;
+ for ( i = 0 ; nPos && i < pSelectionList->Count(); ++i )
+ {
+ ULONG nIndex = (ULONG)pSelectionList->GetObject(i);
+
+ // N"achsten zu lesenden Datensatz ansteuern
+
+ BOOL bEnd = rParam.GetCursor()->IsOffRange();
+
+ if ( !bEnd )
+ {
+ const ODbRowRef aRow =
+ pDBMgr->GetSelectedRecord( bBasic, i );
+
+ if ( aRow.Is() )
+ {
+ aAddress += pDBMgr->
+ ImportDBField( (USHORT)nPos, &aDBDef, aRow.getBodyPtr() );
+ aAddress += ',';
+ }
+ else
+ {
+ aAddress.Erase();
+ break;
+ }
+ }
+ else
+ break;
+ }
+ }
+ }
+ pDBMgr->CloseAll();
+ }
+ aAddress.EraseTrailingChars( ',' );
+ return aAddress;
+#else
+ return String();
+#endif
+}
+*/
+
+void SvxHyperURLBox::Select()
+{
+ SfxURLBox::Select();
+}
+void SvxHyperURLBox::Modify()
+{
+ SfxURLBox::Modify();
+}
+long SvxHyperURLBox::Notify( NotifyEvent& rNEvt )
+{
+ return SfxURLBox::Notify( rNEvt );
+}
+long SvxHyperURLBox::PreNotify( NotifyEvent& rNEvt )
+{
+ // Drag & Drop
+ if( rNEvt.GetWindow() == GetSubEdit() && rNEvt.GetType() == EVENT_QUERYDROP )
+ {
+ rNEvt.SetReturnValue ( (long) QueryDrop ( *(rNEvt.GetDropEvent() ) ) );
+ return 1;
+ } else if( rNEvt.GetWindow() == GetSubEdit() && rNEvt.GetType() == EVENT_DROP )
+ {
+ return (long) Drop( *(rNEvt.GetDropEvent() ) );
+ }
+
+ return SfxURLBox::PreNotify( rNEvt );
+}
+
+//########################################################################
+//# #
+//# Hyperlink-Dialog: Tabpages-Baseclass #
+//# #
+//########################################################################
+
+/*************************************************************************
+|*
+|* Con/Destructor, Initialize
+|*
+\************************************************************************/
+
+SvxHyperlinkTabPageBase::SvxHyperlinkTabPageBase ( Window *pParent,
+ const ResId &rResId,
+ const SfxItemSet& rItemSet)
+: mpGrpMore ( NULL ),
+ mpFtFrame ( NULL ),
+ mpCbbFrame ( NULL ),
+ mpFtForm ( NULL ),
+ mpLbForm ( NULL ),
+ mpFtIndication ( NULL ),
+ mpEdIndication ( NULL ),
+ mpFtText ( NULL ),
+ mpEdText ( NULL ),
+ mpBtScript ( NULL ),
+ IconChoicePage ( pParent, rResId, rItemSet ),
+ mpDialog ( pParent ),
+ mbNewName ( FALSE ),
+ mbStdControlsInit ( FALSE )
+{
+ // create bookmark-window
+ mpMarkWnd = new SvxHlinkDlgMarkWnd ( this );
+}
+
+SvxHyperlinkTabPageBase::~SvxHyperlinkTabPageBase ()
+{
+ maTimer.Stop();
+
+ if ( mbStdControlsInit )
+ {
+ delete mpGrpMore;
+ delete mpFtFrame;
+ delete mpCbbFrame;
+ delete mpFtForm;
+ delete mpLbForm;
+ delete mpFtIndication;
+ delete mpEdIndication;
+ delete mpFtText;
+ delete mpEdText ;
+ delete mpBtScript;
+ }
+
+ delete mpMarkWnd;
+}
+
+void SvxHyperlinkTabPageBase::InitStdControls ()
+{
+ if ( !mbStdControlsInit )
+ {
+ mpGrpMore = new GroupBox ( this, ResId (GRP_MORE) );
+ mpFtFrame = new FixedText ( this, ResId (FT_FRAME) );
+ mpCbbFrame = new SvxFramesComboBox ( this, ResId (CB_FRAME) );
+ mpFtForm = new FixedText ( this, ResId (FT_FORM) );
+ mpLbForm = new ListBox ( this, ResId (LB_FORM) );
+ mpFtIndication= new FixedText ( this, ResId (FT_INDICATION) );
+ mpEdIndication= new Edit ( this, ResId (ED_INDICATION) );
+ mpFtText = new FixedText ( this, ResId (FT_TEXT) );
+ mpEdText = new Edit ( this, ResId (ED_TEXT) );
+ mpBtScript = new ImageButton ( this, ResId (BTN_SCRIPT) );
+
+ mpBtScript->SetClickHdl ( LINK ( this, SvxHyperlinkTabPageBase, ClickScriptHdl_Impl ) );
+ mpEdIndication->SetModifyHdl( LINK ( this, SvxHyperlinkTabPageBase, ModifiedIndicationHdl_Impl ) );
+ }
+
+ mbStdControlsInit = TRUE;
+}
+
+/*************************************************************************
+|*
+|* Move Extra-Window
+|*
+\************************************************************************/
+
+BOOL SvxHyperlinkTabPageBase::MoveToExtraWnd( Point aNewPos, BOOL bDisConnectDlg )
+{
+ BOOL bReturn = mpMarkWnd->MoveTo ( aNewPos );
+ mpMarkWnd->ConnectToDialog( !bDisConnectDlg );
+
+ return ( !bReturn && IsMarkWndVisible() );
+}
+
+/*************************************************************************
+|*
+|* Show Extra-Window
+|*
+\************************************************************************/
+
+void SvxHyperlinkTabPageBase::ShowMarkWnd ()
+{
+ ( ( Window* ) mpMarkWnd )->Show();
+
+ // Size of dialog-window
+ Point aDlgPos ( mpDialog->GetPosPixel () );
+ Size aDlgSize ( mpDialog->GetSizePixel () );
+
+ // Size of Office-Main-Window
+ Size aWindowSize( SFX_APP()->GetTopWindow()->GetSizePixel() );
+
+ // Size of Extrawindow
+ Size aExtraWndSize( mpMarkWnd->GetSizePixel () );
+
+ if( aDlgPos.X()+(1.02*aDlgSize.Width())+aExtraWndSize.Width() > aWindowSize.Width() )
+ {
+ if( aDlgPos.X() - ( 0.02*aDlgSize.Width() ) - aExtraWndSize.Width() < 0 )
+ {
+ // Pos Extrawindow anywhere
+ MoveToExtraWnd( Point( 1, 1.1*aDlgPos.Y() ) );
+ mpMarkWnd->ConnectToDialog( FALSE );
+ }
+ else
+ {
+ // Pos Extrawindow on the left side of Dialog
+ MoveToExtraWnd( aDlgPos - Point( 0.02*aDlgSize.Width(), 0 ) - Point( aExtraWndSize.Width(), 0 ) );
+ }
+ }
+ else
+ {
+ // Pos Extrawindow on the right side of Dialog
+ MoveToExtraWnd ( aDlgPos + Point( 1.02*aDlgSize.getWidth(), 0 ) );
+ }
+
+ // Set size of Extra-Window
+ mpMarkWnd->SetSizePixel( Size( aExtraWndSize.Width(), aDlgSize.Height() ) );
+}
+
+/*************************************************************************
+|*
+|* Fill Dialogfields
+|*
+\************************************************************************/
+
+void SvxHyperlinkTabPageBase::FillStandardDlgFields ( SvxHyperlinkItem* pHyperlinkItem )
+{
+ // Frame
+ USHORT nPos = mpCbbFrame->GetEntryPos ( pHyperlinkItem->GetTargetFrame() );
+ if ( nPos != LISTBOX_ENTRY_NOTFOUND)
+ mpCbbFrame->SetText ( pHyperlinkItem->GetTargetFrame() );
+
+ // Form
+ String aStrFormText = SVX_RESSTR( RID_SVXSTR_HYPERDLG_FROM_TEXT );
+ String aStrFormButton = SVX_RESSTR( RID_SVXSTR_HYPERDLG_FORM_BUTTON );
+
+ if( pHyperlinkItem->GetInsertMode() & HLINK_HTMLMODE )
+ {
+ mpLbForm->Clear();
+ mpLbForm->InsertEntry( aStrFormText );
+ mpLbForm->SelectEntryPos ( 0 );
+ }
+ else
+ {
+ mpLbForm->Clear();
+ mpLbForm->InsertEntry( aStrFormText );
+ mpLbForm->InsertEntry( aStrFormButton );
+ mpLbForm->SelectEntryPos ( pHyperlinkItem->GetInsertMode() == HLINK_BUTTON ? 1 : 0 );
+ }
+
+ // URL
+ mpEdIndication->SetText ( pHyperlinkItem->GetName() );
+
+ // Name
+ mpEdText->SetText ( pHyperlinkItem->GetIntName() );
+
+ // Script-button
+ if ( !pHyperlinkItem->GetMacroEvents() )
+ mpBtScript->Disable();
+ else
+ mpBtScript->Enable();
+}
+
+/*************************************************************************
+|*
+|* Any action to do after apply-button is pressed
+|*
+\************************************************************************/
+
+void SvxHyperlinkTabPageBase::DoApply ()
+{
+ // default-implemtation : do nothing
+}
+
+/*************************************************************************
+|*
+|* Ask page whether an insert is possible
+|*
+\************************************************************************/
+
+BOOL SvxHyperlinkTabPageBase::AskApply ()
+{
+ // default-implementation
+ return TRUE;
+}
+
+/*************************************************************************
+|*
+|* This method would be called from bookmark-window to set new mark-string
+|*
+\************************************************************************/
+
+void SvxHyperlinkTabPageBase::SetMarkStr ( String& aStrMark )
+{
+ // default-implemtation : do nothing
+}
+
+/*************************************************************************
+|*
+|* This method will be called from the dialog-class if the state off
+|* the online-mode has changed.
+|*
+\************************************************************************/
+
+void SvxHyperlinkTabPageBase::SetOnlineMode( BOOL bEnable )
+{
+ // default-implemtation : do nothing
+}
+
+/*************************************************************************
+|*
+|* Modified indication-text
+|*
+|************************************************************************/
+
+IMPL_LINK ( SvxHyperlinkTabPageBase, ModifiedIndicationHdl_Impl , void *, EMPTYARG )
+{
+ // if I have edited the indication, I don't want the dialog
+ // do set the indication automatically !
+
+ mbNewName = FALSE;
+
+ return 0L;
+}
+
+/*************************************************************************
+|*
+|* Set initial focus
+|*
+|************************************************************************/
+
+void SvxHyperlinkTabPageBase::SetInitFocus()
+{
+ GrabFocus();
+}
+
+/*************************************************************************
+|*
+|* Ask dialog whether the curretn doc is a HTML-doc
+|*
+|************************************************************************/
+
+const BOOL SvxHyperlinkTabPageBase::IsHTMLDoc() const
+{
+ return ((SvxHpLinkDlg*)mpDialog)->IsHTMLDoc();
+}
+
+/*************************************************************************
+|*
+|* retrieve dispatcher
+|*
+|************************************************************************/
+
+SfxDispatcher* SvxHyperlinkTabPageBase::GetDispatcher() const
+{
+ return ((SvxHpLinkDlg*)mpDialog)->GetDispatcher();
+}
+
+/*************************************************************************
+|*
+|* Click on imagebutton : Script
+|*
+|************************************************************************/
+
+IMPL_LINK ( SvxHyperlinkTabPageBase, ClickScriptHdl_Impl, void *, EMPTYARG )
+{
+ SvxHyperlinkItem *pHyperlinkItem = (SvxHyperlinkItem *)
+ GetItemSet().GetItem (SID_HYPERLINK_GETLINK);
+
+ if ( pHyperlinkItem->GetMacroEvents() )
+ {
+ // get macros from itemset
+ const SvxMacroTableDtor* pMacroTbl = pHyperlinkItem->GetMacroTbl();
+ SvxMacroItem aItem ( GetWhich(SID_ATTR_MACROITEM) );
+ if( pMacroTbl )
+ aItem.SetMacroTable( *pMacroTbl );
+
+ // create empty itemset for macro-dlg
+ SfxItemSet* pItemSet = new SfxItemSet(SFX_APP()->GetPool(),
+ SID_ATTR_MACROITEM,
+ SID_ATTR_MACROITEM );
+ pItemSet->Put ( aItem, SID_ATTR_MACROITEM );
+
+ SfxMacroAssignDlg aDlg (this, *pItemSet );
+
+ // add events
+ SfxSmallMacroTabPage *pMacroPage = (SfxSmallMacroTabPage*) aDlg.GetTabPage();
+
+ if ( pHyperlinkItem->GetMacroEvents() & HYPERDLG_EVENT_MOUSEOVER_OBJECT )
+ pMacroPage->AddEvent( String( SVX_RESSTR(RID_SVXSTR_HYPDLG_MACROACT1) ),
+ SFX_EVENT_MOUSEOVER_OBJECT );
+ if ( pHyperlinkItem->GetMacroEvents() & HYPERDLG_EVENT_MOUSECLICK_OBJECT )
+ pMacroPage->AddEvent( String( SVX_RESSTR(RID_SVXSTR_HYPDLG_MACROACT2) ),
+ SFX_EVENT_MOUSECLICK_OBJECT);
+ if ( pHyperlinkItem->GetMacroEvents() & HYPERDLG_EVENT_MOUSEOUT_OBJECT )
+ pMacroPage->AddEvent( String( SVX_RESSTR(RID_SVXSTR_HYPDLG_MACROACT3) ),
+ SFX_EVENT_MOUSEOUT_OBJECT);
+
+ // execute dlg
+ if ( RET_OK == aDlg.Execute() )
+ {
+ const SfxItemSet* pOutSet = aDlg.GetOutputItemSet();
+ const SfxPoolItem* pItem;
+ if( SFX_ITEM_SET == pOutSet->GetItemState( SID_ATTR_MACROITEM, FALSE, &pItem ))
+ {
+ pHyperlinkItem->SetMacroTable( ((SvxMacroItem*)pItem)->GetMacroTable() );
+ }
+ }
+
+ delete pItemSet;
+ }
+
+ return( 0L );
+}
+
+/*************************************************************************
+|*
+|* Get Macro-Infos
+|*
+|************************************************************************/
+
+USHORT SvxHyperlinkTabPageBase::GetMacroEvents()
+{
+ SvxHyperlinkItem *pHyperlinkItem = (SvxHyperlinkItem *)
+ GetItemSet().GetItem (SID_HYPERLINK_GETLINK);
+
+ return pHyperlinkItem->GetMacroEvents();
+}
+
+SvxMacroTableDtor* SvxHyperlinkTabPageBase::GetMacroTable()
+{
+ SvxHyperlinkItem *pHyperlinkItem = (SvxHyperlinkItem *)
+ GetItemSet().GetItem (SID_HYPERLINK_GETLINK);
+
+ return ( (SvxMacroTableDtor*)pHyperlinkItem->GetMacroTbl() );
+}
+
diff --git a/svx/source/dialog/hyperdlg.cxx b/svx/source/dialog/hyperdlg.cxx
new file mode 100644
index 000000000000..e00851015a5b
--- /dev/null
+++ b/svx/source/dialog/hyperdlg.cxx
@@ -0,0 +1,412 @@
+/*************************************************************************
+ *
+ * $RCSfile: hyperdlg.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:09 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+// include ---------------------------------------------------------------
+
+#ifndef _SV_SETTINGS_HXX
+#include <vcl/settings.hxx>
+#endif
+
+#include "hyperdlg.hxx"
+
+#include "hlinettp.hxx"
+#include "hlmailtp.hxx"
+#include "hldoctp.hxx"
+#include "hldocntp.hxx"
+
+#include "hyperdlg.hrc"
+
+#define INET_PROT_TELNET_PRIVATE INET_PROT_HTTP
+
+//########################################################################
+//# #
+//# Childwindow-Wrapper-Class #
+//# #
+//########################################################################
+
+SvxHlinkCtrl::SvxHlinkCtrl( USHORT nId, SfxBindings & rBindings, SvxHpLinkDlg* pDlg)
+: SfxControllerItem (nId, rBindings),
+ aForwarder ( SID_INTERNET_ONLINE, *this )
+{
+ pParent = pDlg;
+}
+
+void SvxHlinkCtrl::StateChanged( USHORT nSID, SfxItemState eState,
+ const SfxPoolItem* pState )
+{
+ if ( nSID == SID_INTERNET_ONLINE && SFX_ITEM_AVAILABLE == eState )
+ {
+ pParent->EnableInetBrowse( !( (SfxBoolItem*)pState)->GetValue() );
+ }
+ else
+ {
+ if ( nSID == SID_HYPERLINK_GETLINK && SFX_ITEM_AVAILABLE == eState )
+ {
+ pParent->SetPage ( (SvxHyperlinkItem*)pState);
+ }
+ }
+}
+
+//########################################################################
+//# #
+//# Childwindow-Wrapper-Class #
+//# #
+//########################################################################
+
+SFX_IMPL_CHILDWINDOW(SvxHlinkDlgWrapper, SID_HYPERLINK_DIALOG)
+
+// -----------------------------------------------------------------------
+
+struct MyStruct
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > xFrame;
+ SfxChildWinFactory* pFact;
+ sal_Bool bHideNotDelete;
+ sal_Bool bVisible;
+ sal_Bool bHideAtToggle;
+ SfxModule* pContextModule;
+ SfxWorkWindow* pWorkWin;
+};
+
+SvxHlinkDlgWrapper::SvxHlinkDlgWrapper( Window* pParent, USHORT nId,
+ SfxBindings* pBindings,
+ SfxChildWinInfo* pInfo ) :
+ SfxChildWindow( pParent, nId )
+
+{
+ pWindow = new SvxHpLinkDlg( pParent, pBindings );
+ ((MyStruct*)pImp)->bVisible = FALSE;
+
+ if ( pInfo->aSize.Width() != 0 && pInfo->aSize.Height() != 0 )
+ pWindow->SetPosPixel( pInfo->aPos );
+
+ eChildAlignment = SFX_ALIGN_NOALIGNMENT;
+
+ SetHideNotDelete( TRUE );
+}
+
+SfxChildWinInfo SvxHlinkDlgWrapper::GetInfo() const
+{
+ return SfxChildWindow::GetInfo();
+}
+
+//########################################################################
+//# #
+//# Hyperlink - Dialog #
+//# #
+//########################################################################
+
+/*************************************************************************
+|*
+|* Contructor / Destructor
+|*
+|************************************************************************/
+
+SvxHpLinkDlg::SvxHpLinkDlg (Window* pParent, SfxBindings* pBindings)
+: IconChoiceDialog( pParent, SVX_RES ( RID_SVXDLG_NEWHYPERLINK ) ),
+ maCtrl ( SID_HYPERLINK_GETLINK, *pBindings, this ),
+ mpBindings ( pBindings ),
+ mbIsHTMLDoc ( FALSE )
+{
+ // set background of iconchoicectrl
+ const StyleSettings& rStyles = Application::GetSettings().GetStyleSettings();
+ SetCtrlColor ( rStyles.GetWorkspaceColor() );
+
+ // insert pages
+ Image aImage;
+ String aStrTitle;
+
+ aStrTitle = SVX_RESSTR( RID_SVXSTR_HYPERDLG_HLINETTP );
+ aImage = Image( SVX_RES ( RID_SVXBMP_HLINETTP ) );
+ AddTabPage ( RID_SVXPAGE_HYPERLINK_INTERNET, aStrTitle, aImage, SvxHyperlinkInternetTp::Create );
+ aStrTitle = SVX_RESSTR( RID_SVXSTR_HYPERDLG_HLMAILTP );
+ aImage = Image( SVX_RES ( RID_SVXBMP_HLMAILTP ) );
+ AddTabPage ( RID_SVXPAGE_HYPERLINK_MAIL, aStrTitle, aImage, SvxHyperlinkMailTp::Create );
+ aStrTitle = SVX_RESSTR( RID_SVXSTR_HYPERDLG_HLDOCTP );
+ aImage = Image( SVX_RES ( RID_SVXBMP_HLDOCTP ) );
+ AddTabPage ( RID_SVXPAGE_HYPERLINK_DOCUMENT, aStrTitle, aImage, SvxHyperlinkDocTp::Create );
+ aStrTitle = SVX_RESSTR( RID_SVXSTR_HYPERDLG_HLDOCNTP );
+ aImage = Image( SVX_RES ( RID_SVXBMP_HLDOCNTP ) );
+ AddTabPage ( RID_SVXPAGE_HYPERLINK_NEWDOCUMENT, aStrTitle, aImage, SvxHyperlinkNewDocTp::Create );
+
+ // create itemset for tabpages
+ mpItemSet = new SfxItemSet( SFX_APP()->GetPool(), SID_HYPERLINK_GETLINK,
+ SID_HYPERLINK_SETLINK );
+
+ SvxHyperlinkItem aItem;
+ mpItemSet->Put (aItem, SID_HYPERLINK_GETLINK);
+
+ SetInputSet (mpItemSet);
+
+ // Init Dialog
+ Start (FALSE);
+
+ // set OK/Cancel - button
+ GetOKButton().SetText ( SVX_RESSTR(RID_SVXSTR_HYPDLG_APPLYBUT) );
+ GetCancelButton().SetText ( SVX_RESSTR(RID_SVXSTR_HYPDLG_CLOSEBUT) );
+
+ GetOKButton().SetClickHdl ( LINK ( this, SvxHpLinkDlg, ClickApplyHdl_Impl ) );
+ GetCancelButton().SetClickHdl( LINK ( this, SvxHpLinkDlg, ClickCloseHdl_Impl ) );
+}
+
+SvxHpLinkDlg::~SvxHpLinkDlg ()
+{
+ String aStrEntry = UniString::CreateFromInt32( SID_HYPERLINK_DIALOG );
+ aStrEntry += String ( RTL_CONSTASCII_USTRINGPARAM( "Window" ) );
+ SFX_APP()->GetIniManager()->Delete( SFX_GROUP_VIEW, aStrEntry );
+
+ delete mpItemSet;
+}
+
+/*************************************************************************
+|*
+|* Close Dialog-Window
+|*
+|************************************************************************/
+
+BOOL SvxHpLinkDlg::Close()
+{
+ GetDispatcher()->Execute( SID_HYPERLINK_DIALOG,
+ SFX_CALLMODE_ASYNCHRON |
+ SFX_CALLMODE_RECORD);
+ return TRUE;
+}
+
+/*************************************************************************
+|*
+|* When extrawindow is visible and its never moved by user, then move that
+|* window, too.
+|*
+|************************************************************************/
+
+void SvxHpLinkDlg::Move()
+{
+ SvxHyperlinkTabPageBase* pCurrentPage = ( SvxHyperlinkTabPageBase* )
+ GetTabPage ( GetCurPageId() );
+
+ if( pCurrentPage->IsMarkWndVisible () )
+ {
+ // Pos&Size of this dialog-window
+ Point aDlgPos ( GetPosPixel () );
+ Size aDlgSize ( GetSizePixel () );
+
+ // Size of Office-Main-Window
+ Size aWindowSize( SFX_APP()->GetTopWindow()->GetSizePixel() );
+
+ // Size of Extrawindow
+ Size aExtraWndSize( pCurrentPage->GetSizeExtraWnd() );
+
+ BOOL bDoInvalid ;
+ if( aDlgPos.X()+(1.02*aDlgSize.Width())+aExtraWndSize.Width() > aWindowSize.Width() )
+ {
+ if( aDlgPos.X() - ( 0.02*aDlgSize.Width() ) - aExtraWndSize.Width() < 0 )
+ {
+ // Pos Extrawindow anywhere
+ bDoInvalid = pCurrentPage->MoveToExtraWnd( Point( 1, 1.1*aDlgPos.Y() ), TRUE );
+ }
+ else
+ {
+ // Pos Extrawindow on the left side of Dialog
+ bDoInvalid = pCurrentPage->MoveToExtraWnd( aDlgPos -
+ Point( 0.02*aDlgSize.Width(), 0 ) -
+ Point( aExtraWndSize.Width(), 0 ) );
+ }
+ }
+ else
+ {
+ // Pos Extrawindow on the right side of Dialog
+ bDoInvalid = pCurrentPage->MoveToExtraWnd ( aDlgPos + Point( 1.02*aDlgSize.Width(), 0 ) );
+ }
+
+ if ( bDoInvalid )
+ Invalidate();
+ }
+
+ Window::Move();
+}
+
+/*************************************************************************
+|*
+|* Click on Apply-button
+|*
+|************************************************************************/
+
+IMPL_LINK ( SvxHpLinkDlg, ClickApplyHdl_Impl, void *, EMPTYARG )
+{
+ SfxItemSet aItemSet( SFX_APP()->GetPool(), SID_HYPERLINK_GETLINK,
+ SID_HYPERLINK_SETLINK );
+
+ SvxHyperlinkTabPageBase* pCurrentPage = (SvxHyperlinkTabPageBase*)
+ GetTabPage ( GetCurPageId() );
+
+ if ( pCurrentPage->AskApply() )
+ {
+ pCurrentPage->FillItemSet( aItemSet );
+
+ SvxHyperlinkItem *aItem = (SvxHyperlinkItem *)
+ aItemSet.GetItem (SID_HYPERLINK_SETLINK);
+
+ String aStrEmpty;
+ if ( aItem->GetURL() != aStrEmpty )
+ GetDispatcher()->Execute( SID_HYPERLINK_SETLINK, SFX_CALLMODE_ASYNCHRON |
+ SFX_CALLMODE_RECORD, aItem, 0L);
+
+ ( (SvxHyperlinkTabPageBase*)GetTabPage ( GetCurPageId() ) )->DoApply();
+ }
+
+ return( 0L );
+}
+
+/*************************************************************************
+|*
+|* Click on Close-button
+|*
+|************************************************************************/
+
+IMPL_LINK ( SvxHpLinkDlg, ClickCloseHdl_Impl, void *, EMPTYARG )
+{
+ Close();
+
+ return( 0L );
+}
+
+/*************************************************************************
+|*
+|* Set Page
+|*
+|************************************************************************/
+
+USHORT SvxHpLinkDlg::SetPage ( SvxHyperlinkItem* pItem )
+{
+ USHORT nPageId = RID_SVXPAGE_HYPERLINK_INTERNET;
+
+ String aStrURL ( pItem->GetURL() );
+ INetURLObject aURL ( aStrURL );
+ INetProtocol eProtocolTyp = aURL.GetProtocol();
+
+ switch ( eProtocolTyp )
+ {
+ case INET_PROT_HTTP :
+ case INET_PROT_FTP :
+ nPageId = RID_SVXPAGE_HYPERLINK_INTERNET;
+ break;
+ case INET_PROT_FILE :
+ case INET_PROT_POP3 :
+ case INET_PROT_IMAP :
+ nPageId = RID_SVXPAGE_HYPERLINK_DOCUMENT;
+ break;
+ case INET_PROT_MAILTO :
+ case INET_PROT_NEWS :
+ nPageId = RID_SVXPAGE_HYPERLINK_MAIL;
+ break;
+ default :
+ sal_Char const sTelnet[] = "telnet";
+ sal_Char const sNewsSrvScheme[] = INET_NEWS_SRV_SCHEME;
+
+ if ( aStrURL.ToLowerAscii().SearchAscii( sTelnet ) == 0 )
+ {
+ nPageId = RID_SVXPAGE_HYPERLINK_INTERNET;
+ eProtocolTyp = INET_PROT_TELNET_PRIVATE;
+ }
+ else if ( aStrURL.SearchAscii( sNewsSrvScheme ) == 0 )
+ nPageId = RID_SVXPAGE_HYPERLINK_DOCUMENT;
+ else
+ {
+ sal_Char const sHash[] = "#";
+ if( aStrURL.SearchAscii( sHash ) == 0 )
+ nPageId = RID_SVXPAGE_HYPERLINK_DOCUMENT;
+ else
+ {
+ eProtocolTyp = INET_PROT_NOT_VALID;
+ nPageId = GetCurPageId();
+ }
+ }
+ break;
+ }
+
+ ShowPage (nPageId);
+
+ SvxHyperlinkTabPageBase* pCurrentPage = (SvxHyperlinkTabPageBase*)GetTabPage( nPageId );
+
+ mbIsHTMLDoc = BOOL( pItem->GetInsertMode() & HLINK_HTMLMODE );
+
+ SfxItemSet& aPageSet = (SfxItemSet&)GetTabPage (nPageId)->GetItemSet ();
+ aPageSet.Put ( *pItem );
+
+ pCurrentPage->Reset( aPageSet );
+ pCurrentPage->SetInitFocus();
+
+ return nPageId;
+}
+
+/*************************************************************************
+|*
+|* Enable/Disable to browse targets in a html-doc
+|*
+|************************************************************************/
+
+void SvxHpLinkDlg::EnableInetBrowse( BOOL bEnable )
+{
+ SvxHyperlinkTabPageBase* pCurrentPage = ( SvxHyperlinkTabPageBase* )
+ GetTabPage ( GetCurPageId() );
+ pCurrentPage->SetOnlineMode( bEnable );
+}
+
diff --git a/svx/source/dialog/hyperdlg.src b/svx/source/dialog/hyperdlg.src
new file mode 100644
index 000000000000..08b00b0abdbb
--- /dev/null
+++ b/svx/source/dialog/hyperdlg.src
@@ -0,0 +1,2573 @@
+/*************************************************************************
+ *
+ * $RCSfile: hyperdlg.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:09 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#include "dialogs.hrc"
+#include "helpid.hrc"
+#include "hyperdlg.hrc"
+
+#ifndef STD_MASKCOLOR
+#define STD_MASKCOLOR Color { Red=0xC000; Green=0xC000; Blue=0xC000; }
+#endif
+
+/*************************************************************************
+|
+| Tabpage : Internet
+|
+*************************************************************************/
+
+TabPage RID_SVXPAGE_HYPERLINK_INTERNET
+{
+ Hide = TRUE ;
+ HelpID = HID_HYPERLINK_INTERNET;
+ OutputSize = TRUE ;
+ SVLook = TRUE ;
+ Size = MAP_APPFONT ( 260 , 162 ) ;
+ Text = "Hyperlink" ;
+ Text [ ENGLISH ] = "Hyperlink" ;
+ Text [ english_us ] = "Hyperlink" ;
+
+ GroupBox GRP_LINKTYPE
+ {
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 248 , 85 ) ;
+ Text = "Art des Hyperlinks" ;
+ Text [ ENGLISH ] = "Kind of hyperlink" ;
+ Text [ english_us ] = "Hyperlink type" ;
+/* ### ACHTUNG: Neuer Text in Resource! "Art des Hyperlinks" statt "Link Type" */
+ Text[ portuguese ] = "Tipo de hiperligao";
+ Text[ russian ] = " ";
+ Text[ greek ] = " -";
+ Text[ dutch ] = "Hyperlink type";
+ Text[ french ] = "Type d'hyperlien";
+ Text[ spanish ] = "Tipo de hiperenlace";
+ Text[ italian ] = "Tipo di hyperlink";
+ Text[ danish ] = "Hyperlinktype";
+ Text[ swedish ] = "Typ av hyperlnk";
+ Text[ polish ] = "Typ hipercza";
+ Text[ portuguese_brazilian ] = "Link Typ";
+ Text[ japanese ] = "ʲ߰ݸ̎";
+ Text[ korean ] = "۸ũ ";
+ Text[ chinese_simplified ] = "";
+ Text[ chinese_traditional ] = "|";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "Hyperlink tr";
+ };
+ RadioButton RB_LINKTYP_INTERNET
+ {
+ Pos = MAP_APPFONT( 53, 13 );
+ Size = MAP_APPFONT( 41, 10 );
+ Text = "~Internet";
+ Text [ ENGLISH ] = "~Internet";
+ Text[ english_us ] = "~Internet";
+ Text[ portuguese ] = "~Internet";
+ Text[ russian ] = "";
+ Text[ greek ] = "Internet";
+ Text[ dutch ] = "~Internet";
+ Text[ french ] = "~Internet";
+ Text[ spanish ] = "~Internet";
+ Text[ italian ] = "~Internet";
+ Text[ danish ] = "~Internet";
+ Text[ swedish ] = "~Internet";
+ Text[ polish ] = "~Internet";
+ Text[ portuguese_brazilian ] = "~Internet";
+ Text[ japanese ] = "ȯ(~I)";
+ Text[ korean ] = "ͳ(~I)";
+ Text[ chinese_simplified ] = "ʻ(~I)";
+ Text[ chinese_traditional ] = "~Internet";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "~Internet";
+ Text[ language_user1 ] = " ";
+ };
+ RadioButton RB_LINKTYP_FTP
+ {
+ Pos = MAP_APPFONT( 119, 13 );
+ Size = MAP_APPFONT( 41, 10 );
+ Text = "FT~P";
+ Text [ ENGLISH ] = "FT~P";
+ Text[ english_us ] = "~FTP";
+ Text[ portuguese ] = "~FTP";
+ Text[ russian ] = "~FTP";
+ Text[ greek ] = "FT~P";
+ Text[ dutch ] = "~FTP";
+ Text[ french ] = "~FTP";
+ Text[ spanish ] = "~FTP";
+ Text[ italian ] = "~FTP";
+ Text[ danish ] = "FTP";
+ Text[ swedish ] = "FT~P";
+ Text[ polish ] = "~FTP";
+ Text[ portuguese_brazilian ] = "~FTP";
+ Text[ japanese ] = "FTP(~F)";
+ Text[ korean ] = "~FTP";
+ Text[ chinese_simplified ] = "FTP(~F)";
+ Text[ chinese_traditional ] = "~FTP";
+ Text[ arabic ] = "FT~P";
+ Text[ turkish ] = "~FTP";
+ };
+ RadioButton RB_LINKTYP_TELNET
+ {
+ Pos = MAP_APPFONT( 185, 13 );
+ Size = MAP_APPFONT( 41, 10 );
+ Text = "T~elnet";
+ Text [ ENGLISH ] = "T~elnet";
+ Text[ english_us ] = "~Telnet";
+ Text[ portuguese ] = "~Telnet";
+ Text[ russian ] = "~Telnet";
+ Text[ greek ] = "T~elnet";
+ Text[ dutch ] = "~Telnet";
+ Text[ french ] = "~Telnet";
+ Text[ spanish ] = "~Telnet";
+ Text[ italian ] = "~Telnet";
+ Text[ danish ] = "Telnet";
+ Text[ swedish ] = "T~elnet";
+ Text[ polish ] = "~Telnet";
+ Text[ portuguese_brazilian ] = "~Telnet";
+ Text[ japanese ] = "Telnet(~T)";
+ Text[ korean ] = "Telnet(~T)";
+ Text[ chinese_simplified ] = "Telnet(~T)";
+ Text[ chinese_traditional ] = "~Telnet";
+ Text[ arabic ] = "T~elnet";
+ Text[ turkish ] = "~Telnet";
+ };
+ FixedText FT_TARGET_HTML
+ {
+ Pos = MAP_APPFONT ( 12 , 26 ) ;
+ Size = MAP_APPFONT ( 38 , 10 ) ;
+ Text = "Sprungzie~l";
+ Text [ ENGLISH ] = "Link tar~get" ;
+ Text [ english_us ] = "T~arget" ;
+ Text[ portuguese ] = "~Destino";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "D~oel";
+ Text[ french ] = "~Cible";
+ Text[ spanish ] = "D~estino";
+ Text[ italian ] = "Destinazione";
+ Text[ danish ] = "Ml";
+ Text[ swedish ] = "M~l";
+ Text[ polish ] = "Cel";
+ Text[ portuguese_brazilian ] = "T~arget";
+ Text[ japanese ] = "ޯ(~A)";
+ Text[ korean ] = "Ÿ(~A)";
+ Text[ chinese_simplified ] = "Ŀ(~A)";
+ Text[ chinese_traditional ] = "ؼ";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "~Hedef";
+ };
+ FixedText FT_LOGIN
+ {
+ Pos = MAP_APPFONT ( 12 , 43 ) ;
+ Size = MAP_APPFONT ( 40 , 10 ) ;
+ Text = "~Loginname";
+ Text [ ENGLISH ] = "~Loginname" ;
+ Text [ english_us ] = "~Login name" ;
+ Text[ portuguese ] = "~Login";
+ Text[ russian ] = " ";
+ Text[ greek ] = " ";
+ Text[ dutch ] = "~Loginnaam";
+ Text[ french ] = "~Login";
+ Text[ spanish ] = "~Login";
+ Text[ italian ] = "~Login";
+ Text[ danish ] = "Loginnavn";
+ Text[ swedish ] = "~Loginnamn";
+ Text[ polish ] = "~Login";
+ Text[ portuguese_brazilian ] = "~Loginname";
+ Text[ japanese ] = "۸޲ݖ(~L)";
+ Text[ korean ] = "α ̸(~L)";
+ Text[ chinese_simplified ] = "¼(~L)";
+ Text[ chinese_traditional ] = "ϥΪ(~L)";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "~Oturum ama ad";
+ };
+ Edit ED_LOGIN
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 54 , 42 ) ;
+ Size = MAP_APPFONT ( 80 , 12 ) ;
+ };
+ FixedText FT_PASSWD
+ {
+ Pos = MAP_APPFONT ( 12 , 60 ) ;
+ Size = MAP_APPFONT ( 40 , 10 ) ;
+ Text = "Pa~sswort";
+ Text [ ENGLISH ] = "Pa~ssword" ;
+ Text [ english_us ] = "~Password" ;
+ Text[ portuguese ] = "~Senha";
+ Text[ russian ] = "";
+ Text[ greek ] = " ~";
+ Text[ dutch ] = "~Wachtwoord";
+ Text[ french ] = "~Mot de passe";
+ Text[ spanish ] = "~Contrasea";
+ Text[ italian ] = "~Password";
+ Text[ danish ] = "Adgangskode";
+ Text[ swedish ] = "Lsen~ord";
+ Text[ polish ] = "Haso";
+ Text[ portuguese_brazilian ] = "~Password";
+ Text[ japanese ] = "߽ܰ(~P)";
+ Text[ korean ] = "н(~P)";
+ Text[ chinese_simplified ] = "(~P)";
+ Text[ chinese_traditional ] = "KX(~P)";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "~ifre";
+ Text[ language_user1 ] = " ";
+ };
+ Edit ED_PASSWD
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 54 , 59 ) ;
+ Size = MAP_APPFONT ( 80 , 12 ) ;
+ PassWord = TRUE ;
+ };
+ CheckBox CBX_ANONYMOUS
+ {
+ Pos = MAP_APPFONT ( 54 , 75 ) ;
+ Size = MAP_APPFONT ( 89 , 10 ) ;
+ TabStop = TRUE ;
+ Text = "Anonymer Ben~utzer" ;
+ Text [ ENGLISH ] = "Anonymous ~user" ;
+ Text [ english_us ] = "Anonymous ~user" ;
+ Text[ portuguese ] = "~Utilizador annimo";
+ Text[ russian ] = " ";
+ Text[ greek ] = " ";
+ Text[ dutch ] = "Anonieme gebr~uiker";
+ Text[ french ] = "Utilisateur ~Anonymous";
+ Text[ spanish ] = "Usuario ~annimo";
+ Text[ italian ] = "~Utente anonimo";
+ Text[ danish ] = "Anonymous bruger";
+ Text[ swedish ] = "Anonym anvndare";
+ Text[ polish ] = "Anonimowy uytkownik";
+ Text[ portuguese_brazilian ] = "Anonymous ~user";
+ Text[ japanese ] = "հް(~U)";
+ Text[ korean ] = "͸ (~U)";
+ Text[ chinese_simplified ] = "ʹ(~U)";
+ Text[ chinese_traditional ] = "ΦWϥΪ(~U)";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "Anonim ~kullanc";
+ Text[ language_user1 ] = " ";
+ };
+ ImageButton BTN_BROWSE
+ {
+ Pos = MAP_APPFONT ( 235, 25 ) ;
+ Size = MAP_APPFONT( 13, 13 );
+ TabStop = TRUE ;
+ QuickHelpText = "WWW-Browser" ;
+ QuickHelpText [ ENGLISH ] = "WWW-Browser" ;
+ QuickHelpText [ english_us ] = "WWW Browser" ;
+ ButtonImage = Image
+ {
+ ImageBitmap = Bitmap { File = "browse.bmp" ; };
+ MaskColor = STD_MASKCOLOR ;
+ };
+ QuickHelpText[ portuguese ] = "Browse";
+ QuickHelpText[ russian ] = "WWW-";
+ QuickHelpText[ greek ] = " WWW";
+ QuickHelpText[ dutch ] = "WWW-browser";
+ QuickHelpText[ french ] = "Browser WWW";
+ QuickHelpText[ spanish ] = "Browse";
+ QuickHelpText[ italian ] = "Browser Web";
+ QuickHelpText[ danish ] = "WWW-browser";
+ QuickHelpText[ swedish ] = "WWW-browser";
+ QuickHelpText[ polish ] = "Przegldarka WWW";
+ QuickHelpText[ portuguese_brazilian ] = "Browse";
+ QuickHelpText[ japanese ] = "WWW׳";
+ QuickHelpText[ korean ] = "Browse";
+ QuickHelpText[ chinese_simplified ] = "ά";
+ QuickHelpText[ chinese_traditional ] = "WWW s";
+ QuickHelpText[ arabic ] = " ";
+ };
+ ImageButton BTN_TARGET
+ {
+ Pos = MAP_APPFONT ( 235, 40 ) ;
+ Size = MAP_APPFONT( 13, 13 );
+ TabStop = TRUE ;
+ QuickHelpText = "Sprungziel im Dokument" ;
+ QuickHelpText [ ENGLISH ] = "Link target in document" ;
+ QuickHelpText [ english_us ] = "Target in Document" ;
+ ButtonImage = Image
+ {
+ ImageBitmap = Bitmap { File = "target.bmp" ; };
+ MaskColor = STD_MASKCOLOR ;
+ };
+ QuickHelpText[ portuguese ] = "Destino no documento";
+ QuickHelpText[ russian ] = "";
+ QuickHelpText[ greek ] = " ";
+ QuickHelpText[ dutch ] = "Doel";
+ QuickHelpText[ french ] = "Cible l'intrieur du document";
+ QuickHelpText[ spanish ] = "Target";
+ QuickHelpText[ italian ] = "Destinazione";
+ QuickHelpText[ danish ] = "Ml i dokumentet";
+ QuickHelpText[ swedish ] = "Ml";
+ QuickHelpText[ polish ] = "Cel";
+ QuickHelpText[ portuguese_brazilian ] = "Target";
+ QuickHelpText[ japanese ] = "޷Ăɂޯ";
+ QuickHelpText[ korean ] = "Target";
+ QuickHelpText[ chinese_simplified ] = "Ŀ";
+ QuickHelpText[ chinese_traditional ] = "󤺪ؼ";
+ QuickHelpText[ arabic ] = " ";
+ };
+
+ Text[ portuguese ] = "Hiperligao";
+ Text[ russian ] = "";
+ Text[ greek ] = "-";
+ Text[ dutch ] = "Hyperlink";
+ Text[ french ] = "Hyperlien";
+ Text[ spanish ] = "Hiperenlace";
+ Text[ italian ] = "Hyperlink";
+ Text[ danish ] = "Hyperlink";
+ Text[ swedish ] = "Hyperlnk";
+ Text[ polish ] = "Hipercze";
+ Text[ portuguese_brazilian ] = "Hyperlink";
+ Text[ japanese ] = "ʲ߰ݸ";
+ Text[ korean ] = "۸ũ";
+ Text[ chinese_simplified ] = "";
+ Text[ chinese_traditional ] = "Ws";
+ Text[ arabic ] = " ";
+
+
+ GroupBox GRP_MORE
+ {
+ Pos = MAP_APPFONT ( 6 , 92 ) ;
+ Size = MAP_APPFONT ( 248 , 64 ) ;
+ Text = "Weitere Einstellungen" ;
+ Text [ ENGLISH ] = "More options" ;
+ Text [ english_us ] = "Further settings" ;
+ Text[ portuguese ] = "Outras opes";
+ Text[ russian ] = " ";
+ Text[ greek ] = " ";
+ Text[ dutch ] = "Verdere opties";
+ Text[ french ] = "Autres paramtres";
+ Text[ spanish ] = "Otras opciones";
+ Text[ italian ] = "Ulteriori impostazioni";
+ Text[ danish ] = "Flere indstillinger";
+ Text[ swedish ] = "Fler instllningar";
+ Text[ polish ] = "Dodatkowe ustawienia";
+ Text[ portuguese_brazilian ] = "More options";
+ Text[ japanese ] = "̑̐ݒ";
+ Text[ korean ] = "׹ ";
+ Text[ chinese_simplified ] = "趨";
+ Text[ chinese_traditional ] = "䥦]w";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "Dier ayarlar";
+ };
+ FixedText FT_FRAME
+ {
+ Pos = MAP_APPFONT ( 12 , 105 ) ;
+ Size = MAP_APPFONT ( 28 , 10 ) ;
+ Text = "~Frame";
+ Text [ ENGLISH ] = "~Frame" ;
+ Text [ english_us ] = "F~rame" ;
+ Text[ portuguese ] = "F~rame";
+ Text[ russian ] = "";
+ Text[ greek ] = "~";
+ Text[ dutch ] = "F~rame";
+ Text[ french ] = "F~rame";
+ Text[ spanish ] = "F~rame";
+ Text[ italian ] = "F~rame";
+ Text[ danish ] = "Frame";
+ Text[ swedish ] = "~Ram";
+ Text[ polish ] = "Ramka";
+ Text[ portuguese_brazilian ] = "F~rame";
+ Text[ japanese ] = "ڰ(~R)";
+ Text[ korean ] = "(~R)";
+ Text[ chinese_simplified ] = "(~R)";
+ Text[ chinese_traditional ] = "(~R)";
+ Text[ arabic ] = "~Frame";
+ Text[ turkish ] = "F~rame";
+ };
+ ComboBox CB_FRAME
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 54 , 104 ) ;
+ Size = MAP_APPFONT ( 69 , 60 ) ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+ Sort = TRUE ;
+ };
+ FixedText FT_FORM
+ {
+ Pos = MAP_APPFONT ( 129 , 105 ) ;
+ Size = MAP_APPFONT ( 27 , 10 ) ;
+ Text = "F~orm";
+ Text [ ENGLISH ] = "F~orm" ;
+ Text [ english_us ] = "F~orm" ;
+ Text[ portuguese ] = "Ti~po";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "V~orm";
+ Text[ french ] = "F~orme";
+ Text[ spanish ] = "f~orma";
+ Text[ italian ] = "F~orma";
+ Text[ danish ] = "Form";
+ Text[ swedish ] = "F~orm";
+ Text[ polish ] = "Forma";
+ Text[ portuguese_brazilian ] = "F~orm";
+ Text[ japanese ] = "̫(~O)";
+ Text[ korean ] = "(~O)";
+ Text[ chinese_simplified ] = "ʽ(~O)";
+ Text[ chinese_traditional ] = "覡(~O)";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "F~orm";
+ };
+ ListBox LB_FORM
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 160 , 104 ) ;
+ Size = MAP_APPFONT ( 70 , 60 ) ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+ AutoHScroll = TRUE ;
+ DDExtraWidth = TRUE ;
+ StringList =
+ {
+ < "Text" ; Default ; > ;
+ < "Button" ; Default ; > ;
+ };
+ stringlist [ english_us ] =
+ {
+ < "Text" ; Default ; > ;
+ < "Button" ; Default ; > ;
+ };
+ stringlist [ ENGLISH ] =
+ {
+ < "Text" ; Default ; > ;
+ < "Button" ; Default ; > ;
+ };
+ StringList [ language_user1 ] =
+ {
+ < "Text" ; Default ; > ;
+ < "Button" ; Default ; > ;
+ };
+ StringList [ portuguese ] =
+ {
+ < "Texto" ; Default ; > ;
+ < "Boto" ; Default ; > ;
+ };
+ StringList [ russian ] =
+ {
+ < "" ; Default ; > ;
+ < "" ; Default ; > ;
+ };
+ StringList [ greek ] =
+ {
+ < "" ; Default ; > ;
+ < " " ; Default ; > ;
+ };
+ StringList [ dutch ] =
+ {
+ < "Tekst" ; Default ; > ;
+ < "Knop" ; Default ; > ;
+ };
+ StringList [ french ] =
+ {
+ < "Texte" ; Default ; > ;
+ < "Bouton" ; Default ; > ;
+ };
+ StringList [ spanish ] =
+ {
+ < "Texto" ; Default ; > ;
+ < "Botn" ; Default ; > ;
+ };
+ StringList [ italian ] =
+ {
+ < "Testo" ; Default ; > ;
+ < "Pulsante" ; Default ; > ;
+ };
+ StringList [ danish ] =
+ {
+ < "Tekst" ; Default ; > ;
+ < "Knap" ; Default ; > ;
+ };
+ StringList [ swedish ] =
+ {
+ < "Text" ; Default ; > ;
+ < "Knapp" ; Default ; > ;
+ };
+ StringList [ polish ] =
+ {
+ < "Tekst" ; Default ; > ;
+ < "Przycisk" ; Default ; > ;
+ };
+ StringList [ portuguese_brazilian ] =
+ {
+ < "Text" ; Default ; > ;
+ < "Button" ; Default ; > ;
+ };
+ StringList [ japanese ] =
+ {
+ < "÷" ; Default ; > ;
+ < "" ; Default ; > ;
+ };
+ StringList [ korean ] =
+ {
+ < "ؽƮ" ; Default ; > ;
+ < "ư" ; Default ; > ;
+ };
+ StringList [ chinese_simplified ] =
+ {
+ < "" ; Default ; > ;
+ < "ť" ; Default ; > ;
+ };
+ StringList [ chinese_traditional ] =
+ {
+ < "r" ; Default ; > ;
+ < "s" ; Default ; > ;
+ };
+ StringList [ arabic ] =
+ {
+ < "" ; Default ; > ;
+ < "" ; Default ; > ;
+ };
+ StringList [ turkish ] =
+ {
+ < "Metin" ; Default ; > ;
+ < "Dme" ; Default ; > ;
+ };
+ };
+ FixedText FT_INDICATION
+ {
+ Pos = MAP_APPFONT ( 12 , 123 ) ;
+ Size = MAP_APPFONT ( 40 , 10 ) ;
+ Text = "Te~xt";
+ Text [ ENGLISH ] = "~Caption" ;
+ Text [ english_us ] = "Te~xt" ;
+ Text[ portuguese ] = "Te~xto";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text [ dutch ] = "Aan~wijzing" ;
+ Text [ french ] = "~Texte" ;
+ Text[ spanish ] = "In~dicacin";
+ Text[ italian ] = "Nota";
+ Text[ danish ] = "Tekst";
+ Text[ swedish ] = "Hn~visning";
+ Text[ polish ] = "Wskazwka";
+ Text[ portuguese_brazilian ] = "In~dication";
+ Text[ japanese ] = "(~K)";
+ Text[ korean ] = "(~N)";
+ Text[ chinese_simplified ] = "ʾ(~N)";
+ Text[ chinese_traditional ] = "r(~K)";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "~Balant ad";
+ };
+ Edit ED_INDICATION
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 54 , 122 ) ;
+ Size = MAP_APPFONT ( 194 , 12 ) ;
+ };
+ FixedText FT_TEXT
+ {
+ Pos = MAP_APPFONT ( 12 , 140 ) ;
+ Size = MAP_APPFONT ( 30 , 10 ) ;
+ Text = "N~ame";
+ Text [ ENGLISH ] = "N~ame" ;
+ Text [ english_us ] = "N~ame" ;
+ Text[ portuguese ] = "~Nome";
+ Text[ russian ] = "";
+ Text[ greek ] = "~";
+ Text[ dutch ] = "N~aam";
+ Text[ french ] = "~Nom";
+ Text[ spanish ] = "N~ombre";
+ Text[ italian ] = "Nome";
+ Text[ danish ] = "Navn";
+ Text[ swedish ] = "N~amn";
+ Text[ polish ] = "Nazwa";
+ Text[ portuguese_brazilian ] = "N~ame";
+ Text[ japanese ] = "O(~A)";
+ Text[ korean ] = "̸(~A)";
+ Text[ chinese_simplified ] = "(~A)";
+ Text[ chinese_traditional ] = "W(~A)";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "~Ad";
+ };
+ Edit ED_TEXT
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 54 , 139 ) ;
+ Size = MAP_APPFONT ( 194 , 12 ) ;
+ };
+ ImageButton BTN_SCRIPT
+ {
+ Pos = MAP_APPFONT ( 235, 104 ) ;
+ Size = MAP_APPFONT( 13, 13 );
+ TabStop = TRUE ;
+ QuickHelpText = "Ereignisse" ;
+ QuickHelpText [ ENGLISH ] = "Events" ;
+ QuickHelpText [ english_us ] = "Events" ;
+ ButtonImage = Image
+ {
+ ImageBitmap = Bitmap { File = "script.bmp" ; };
+ MaskColor = STD_MASKCOLOR ;
+ };
+ QuickHelpText[ portuguese ] = "Script";
+ QuickHelpText[ russian ] = "";
+ QuickHelpText[ greek ] = "";
+ QuickHelpText[ dutch ] = "Gebeurtenissen";
+ QuickHelpText[ french ] = "vnements";
+ QuickHelpText[ spanish ] = "Script";
+ QuickHelpText[ italian ] = "Eventi";
+ QuickHelpText[ danish ] = "Begivenheder";
+ QuickHelpText[ swedish ] = "Hndelser";
+ QuickHelpText[ polish ] = "Wydarzenia";
+ QuickHelpText[ portuguese_brazilian ] = "Script";
+ QuickHelpText[ japanese ] = "";
+ QuickHelpText[ korean ] = "Script";
+ QuickHelpText[ chinese_simplified ] = "¼";
+ QuickHelpText[ chinese_traditional ] = "ƥ";
+ QuickHelpText[ arabic ] = "";
+ };
+ Text[ turkish ] = "Hyperlink";
+};
+
+/*************************************************************************
+|
+| Tabpage : Mail & News
+|
+*************************************************************************/
+
+TabPage RID_SVXPAGE_HYPERLINK_MAIL
+{
+ Hide = TRUE ;
+ HelpID = HID_HYPERLINK_MAIL;
+ OutputSize = TRUE ;
+ SVLook = TRUE ;
+ Size = MAP_APPFONT ( 260 , 162 ) ;
+ Text = "Hyperlink" ;
+ Text [ ENGLISH ] = "Hyperlink" ;
+ Text [ english_us ] = "Hyperlink" ;
+
+ GroupBox GRP_MAILNEWS
+ {
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 248 , 85 ) ;
+ Text = "Mail & News" ;
+ Text [ ENGLISH ] = "Mail & News" ;
+ Text [ english_us ] = "Mail & News" ;
+ Text[ portuguese ] = "Mail & News";
+ Text[ russian ] = " ";
+ Text[ greek ] = " ";
+ Text[ dutch ] = "Mail & Nieuws";
+ Text[ french ] = "Mail & News";
+ Text[ spanish ] = "Correo y noticias";
+ Text[ italian ] = "Mail e news";
+ Text[ danish ] = "E-mail og nyheder";
+ Text[ swedish ] = "E-post & nyheter";
+ Text[ polish ] = "E-mail & wiadomoci";
+ Text[ portuguese_brazilian ] = "Mail & News";
+ Text[ japanese ] = "Mail & ƭ";
+ Text[ korean ] = " & ";
+ Text[ chinese_simplified ] = "ʼ";
+ Text[ chinese_traditional ] = "qllMsDs";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "E-posta ve haber gruplar";
+ };
+ RadioButton RB_LINKTYP_MAIL
+ {
+ Pos = MAP_APPFONT( 58, 13 );
+ Size = MAP_APPFONT( 50, 10 );
+ Text = "~E-Mail";
+ Text [ ENGLISH ] = "~EMail";
+ Text[ english_us ] = "~E-mail";
+ Text[ portuguese ] = "~E-mail";
+ Text[ russian ] = ".";
+ Text[ greek ] = "EMail";
+ Text[ dutch ] = "~E-mail";
+ Text[ french ] = "~E-mail";
+ Text[ spanish ] = "~E-mail";
+ Text[ italian ] = "~eMail";
+ Text[ danish ] = "E-mail";
+ Text[ swedish ] = "~E-post";
+ Text[ polish ] = "~e-mail";
+ Text[ portuguese_brazilian ] = "~EMail";
+ Text[ japanese ] = "~E-mail";
+ Text[ korean ] = "E-mail(~E)";
+ Text[ chinese_simplified ] = "ʼ(~E)";
+ Text[ chinese_traditional ] = "qll(~E)";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "~E-posta";
+ Text[ language_user1 ] = " ";
+ };
+ RadioButton RB_LINKTYP_NEWS
+ {
+ Pos = MAP_APPFONT( 119, 13 );
+ Size = MAP_APPFONT( 50, 10 );
+ Text = "~News";
+ Text [ ENGLISH ] = "~News";
+ Text[ english_us ] = "~News";
+ Text[ portuguese ] = "~News";
+ Text[ russian ] = "";
+ Text[ greek ] = "~";
+ Text[ dutch ] = "~Nieuws";
+ Text[ french ] = "~News";
+ Text[ spanish ] = "~Noticias";
+ Text[ italian ] = "~News";
+ Text[ danish ] = "Nyheder";
+ Text[ swedish ] = "~Nyheter";
+ Text[ polish ] = "wiado~moci";
+ Text[ portuguese_brazilian ] = "~News";
+ Text[ japanese ] = "ƭ(~N)";
+ Text[ korean ] = "(~N)";
+ Text[ chinese_simplified ] = "(~N)";
+ Text[ chinese_traditional ] = "sD(~N)";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "~Haber gruplar";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_RECEIVER
+ {
+ Pos = MAP_APPFONT ( 12 , 26 ) ;
+ Size = MAP_APPFONT ( 38 , 10 ) ;
+ Text = "E~mpfnger";
+ Text [ ENGLISH ] = "Re~ceiver" ;
+ Text [ english_us ] = "Re~ceiver" ;
+ Text[ portuguese ] = "D~estinatrio";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "Ont~vanger";
+ Text[ french ] = "~Destinataire";
+ Text[ spanish ] = "D~estinatario";
+ Text[ italian ] = "Destinatario";
+ Text[ danish ] = "Modtager";
+ Text[ swedish ] = "~Mottagare";
+ Text[ polish ] = "Odbiorca";
+ Text[ portuguese_brazilian ] = "Re~ceiver";
+ Text[ japanese ] = "M(~C)";
+ Text[ korean ] = "(~C)";
+ Text[ chinese_simplified ] = "ռ(~C)";
+ Text[ chinese_traditional ] = "(~C)";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "A~lc";
+ };
+ FixedText FT_SUBJECT
+ {
+ Pos = MAP_APPFONT ( 12 , 43 ) ;
+ Size = MAP_APPFONT ( 38 , 10 ) ;
+ Text = "~Betreff";
+ Text [ ENGLISH ] = "~Subject" ;
+ Text [ english_us ] = "~Subject" ;
+ Text[ portuguese ] = "~Assunto";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "~Betreft";
+ Text[ french ] = "~Objet";
+ Text[ spanish ] = "A~sunto";
+ Text[ italian ] = "Oggetto";
+ Text[ danish ] = "Emne";
+ Text[ swedish ] = "An~gende";
+ Text[ polish ] = "Dotyczy";
+ Text[ portuguese_brazilian ] = "~Subject";
+ Text[ japanese ] = "(~S)";
+ Text[ korean ] = "(~S)";
+ Text[ chinese_simplified ] = "(~S)";
+ Text[ chinese_traditional ] = "D(~S)";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "~Konu";
+ };
+ Edit ED_SUBJECT
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 54 , 42 ) ;
+ Size = MAP_APPFONT ( 176 , 12 ) ;
+ };
+ ImageButton BTN_ADRESSBOOK
+ {
+ Pos = MAP_APPFONT ( 235, 25 ) ;
+ Size = MAP_APPFONT( 13, 13 );
+ TabStop = TRUE ;
+ QuickHelpText = "Adressbuch" ;
+ QuickHelpText [ ENGLISH ] = "Adressbook" ;
+ QuickHelpText [ english_us ] = "Adressbook" ;
+ ButtonImage = Image
+ {
+ ImageBitmap = Bitmap { File = "adrbook.bmp" ; };
+ MaskColor = STD_MASKCOLOR ;
+ };
+ QuickHelpText[ portuguese ] = "Adressbook";
+ QuickHelpText[ russian ] = " ";
+ QuickHelpText[ greek ] = " ";
+ QuickHelpText[ dutch ] = "Adresboek";
+ QuickHelpText[ french ] = "Carnet d'adresses";
+ QuickHelpText[ spanish ] = "Adressbook";
+ QuickHelpText[ italian ] = "Rubrica";
+ QuickHelpText[ danish ] = "Adressekartotek";
+ QuickHelpText[ swedish ] = "Adressbok";
+ QuickHelpText[ polish ] = "Ksika adresowa";
+ QuickHelpText[ portuguese_brazilian ] = "Adressbook";
+ QuickHelpText[ japanese ] = "ڽ";
+ QuickHelpText[ korean ] = "Adressbook";
+ QuickHelpText[ chinese_simplified ] = "ͨѶ";
+ QuickHelpText[ chinese_traditional ] = "qT";
+ QuickHelpText[ arabic ] = " ";
+ };
+
+ GroupBox GRP_MORE
+ {
+ Pos = MAP_APPFONT ( 6 , 92 ) ;
+ Size = MAP_APPFONT ( 248 , 64 ) ;
+ Text = "Weitere Einstellungen" ;
+ Text [ ENGLISH ] = "More options" ;
+ Text [ english_us ] = "Further settings" ;
+ Text[ portuguese ] = "Outras opes";
+ Text[ russian ] = " ";
+ Text[ greek ] = " ";
+ Text[ dutch ] = "Verdere opties";
+ Text[ french ] = "Autres paramtres";
+ Text[ spanish ] = "Otras opciones";
+ Text[ italian ] = "Ulteriori impostazioni";
+ Text[ danish ] = "Flere indstillinger";
+ Text[ swedish ] = "Fler instllningar";
+ Text[ polish ] = "Dodatkowe ustawienia";
+ Text[ portuguese_brazilian ] = "More options";
+ Text[ japanese ] = "̑̐ݒ";
+ Text[ korean ] = "׹ ";
+ Text[ chinese_simplified ] = "趨";
+ Text[ chinese_traditional ] = "䥦]w";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "Dier ayarlar";
+ };
+ FixedText FT_FRAME
+ {
+ Pos = MAP_APPFONT ( 12 , 105 ) ;
+ Size = MAP_APPFONT ( 28 , 10 ) ;
+ Text = "~Frame";
+ Text [ ENGLISH ] = "~Frame" ;
+ Text [ english_us ] = "F~rame" ;
+ Text[ portuguese ] = "F~rame";
+ Text[ russian ] = "";
+ Text[ greek ] = "~";
+ Text[ dutch ] = "F~rame";
+ Text[ french ] = "F~rame";
+ Text[ spanish ] = "F~rame";
+ Text[ italian ] = "F~rame";
+ Text[ danish ] = "Frame";
+ Text[ swedish ] = "~Ram";
+ Text[ polish ] = "Ramka";
+ Text[ portuguese_brazilian ] = "F~rame";
+ Text[ japanese ] = "ڰ(~R)";
+ Text[ korean ] = "(~R)";
+ Text[ chinese_simplified ] = "(~R)";
+ Text[ chinese_traditional ] = "(~R)";
+ Text[ arabic ] = "~Frame";
+ Text[ turkish ] = "F~rame";
+ };
+ ComboBox CB_FRAME
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 54 , 104 ) ;
+ Size = MAP_APPFONT ( 69 , 60 ) ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+ Sort = TRUE ;
+ };
+ FixedText FT_FORM
+ {
+ Pos = MAP_APPFONT ( 129 , 105 ) ;
+ Size = MAP_APPFONT ( 27 , 10 ) ;
+ Text = "F~orm";
+ Text [ ENGLISH ] = "F~orm" ;
+ Text [ english_us ] = "F~orm" ;
+ Text[ portuguese ] = "Ti~po";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "V~orm";
+ Text[ french ] = "F~orme";
+ Text[ spanish ] = "f~orma";
+ Text[ italian ] = "F~orma";
+ Text[ danish ] = "Form";
+ Text[ swedish ] = "F~orm";
+ Text[ polish ] = "Forma";
+ Text[ portuguese_brazilian ] = "F~orm";
+ Text[ japanese ] = "̫(~O)";
+ Text[ korean ] = "(~O)";
+ Text[ chinese_simplified ] = "ʽ(~O)";
+ Text[ chinese_traditional ] = "覡(~O)";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "F~orm";
+ };
+ ListBox LB_FORM
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 160 , 104 ) ;
+ Size = MAP_APPFONT ( 70 , 60 ) ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+ AutoHScroll = TRUE ;
+ DDExtraWidth = TRUE ;
+ StringList =
+ {
+ < "Text" ; Default ; > ;
+ < "Button" ; Default ; > ;
+ };
+ stringlist [ english_us ] =
+ {
+ < "Text" ; Default ; > ;
+ < "Button" ; Default ; > ;
+ };
+ stringlist [ ENGLISH ] =
+ {
+ < "Text" ; Default ; > ;
+ < "Button" ; Default ; > ;
+ };
+ StringList [ language_user1 ] =
+ {
+ < "Text" ; Default ; > ;
+ < "Button" ; Default ; > ;
+ };
+ StringList [ portuguese ] =
+ {
+ < "Texto" ; Default ; > ;
+ < "Boto" ; Default ; > ;
+ };
+ StringList [ russian ] =
+ {
+ < "" ; Default ; > ;
+ < "" ; Default ; > ;
+ };
+ StringList [ greek ] =
+ {
+ < "" ; Default ; > ;
+ < " " ; Default ; > ;
+ };
+ StringList [ dutch ] =
+ {
+ < "Tekst" ; Default ; > ;
+ < "Knop" ; Default ; > ;
+ };
+ StringList [ french ] =
+ {
+ < "Texte" ; Default ; > ;
+ < "Bouton" ; Default ; > ;
+ };
+ StringList [ spanish ] =
+ {
+ < "Texto" ; Default ; > ;
+ < "Botn" ; Default ; > ;
+ };
+ StringList [ italian ] =
+ {
+ < "Testo" ; Default ; > ;
+ < "Pulsante" ; Default ; > ;
+ };
+ StringList [ danish ] =
+ {
+ < "Tekst" ; Default ; > ;
+ < "Knap" ; Default ; > ;
+ };
+ StringList [ swedish ] =
+ {
+ < "Text" ; Default ; > ;
+ < "Knapp" ; Default ; > ;
+ };
+ StringList [ polish ] =
+ {
+ < "Tekst" ; Default ; > ;
+ < "Przycisk" ; Default ; > ;
+ };
+ StringList [ portuguese_brazilian ] =
+ {
+ < "Text" ; Default ; > ;
+ < "Button" ; Default ; > ;
+ };
+ StringList [ japanese ] =
+ {
+ < "÷" ; Default ; > ;
+ < "" ; Default ; > ;
+ };
+ StringList [ korean ] =
+ {
+ < "ؽƮ" ; Default ; > ;
+ < "ư" ; Default ; > ;
+ };
+ StringList [ chinese_simplified ] =
+ {
+ < "" ; Default ; > ;
+ < "ť" ; Default ; > ;
+ };
+ StringList [ chinese_traditional ] =
+ {
+ < "r" ; Default ; > ;
+ < "s" ; Default ; > ;
+ };
+ StringList [ arabic ] =
+ {
+ < "" ; Default ; > ;
+ < "" ; Default ; > ;
+ };
+ StringList [ turkish ] =
+ {
+ < "Metin" ; Default ; > ;
+ < "Dme" ; Default ; > ;
+ };
+ };
+ FixedText FT_INDICATION
+ {
+ Pos = MAP_APPFONT ( 12 , 123 ) ;
+ Size = MAP_APPFONT ( 40 , 10 ) ;
+ Text = "Te~xt";
+ Text [ ENGLISH ] = "~Caption" ;
+ Text [ english_us ] = "Te~xt" ;
+ Text[ portuguese ] = "Te~xto";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text [ dutch ] = "Aan~wijzing" ;
+ Text [ french ] = "~Texte" ;
+ Text[ spanish ] = "In~dicacin";
+ Text[ italian ] = "Nota";
+ Text[ danish ] = "Tekst";
+ Text[ swedish ] = "Hn~visning";
+ Text[ polish ] = "Wskazwka";
+ Text[ portuguese_brazilian ] = "In~dication";
+ Text[ japanese ] = "(~K)";
+ Text[ korean ] = "(~N)";
+ Text[ chinese_simplified ] = "ʾ(~N)";
+ Text[ chinese_traditional ] = "r(~K)";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "~Balant ad";
+ };
+ Edit ED_INDICATION
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 54 , 122 ) ;
+ Size = MAP_APPFONT ( 194 , 12 ) ;
+ };
+ FixedText FT_TEXT
+ {
+ Pos = MAP_APPFONT ( 12 , 140 ) ;
+ Size = MAP_APPFONT ( 30 , 10 ) ;
+ Text = "N~ame";
+ Text [ ENGLISH ] = "N~ame" ;
+ Text [ english_us ] = "N~ame" ;
+ Text[ portuguese ] = "~Nome";
+ Text[ russian ] = "";
+ Text[ greek ] = "~";
+ Text[ dutch ] = "N~aam";
+ Text[ french ] = "~Nom";
+ Text[ spanish ] = "N~ombre";
+ Text[ italian ] = "Nome";
+ Text[ danish ] = "Navn";
+ Text[ swedish ] = "N~amn";
+ Text[ polish ] = "Nazwa";
+ Text[ portuguese_brazilian ] = "N~ame";
+ Text[ japanese ] = "O(~A)";
+ Text[ korean ] = "̸(~A)";
+ Text[ chinese_simplified ] = "(~A)";
+ Text[ chinese_traditional ] = "W(~A)";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "~Ad";
+ };
+ Edit ED_TEXT
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 54 , 139 ) ;
+ Size = MAP_APPFONT ( 194 , 12 ) ;
+ };
+ ImageButton BTN_SCRIPT
+ {
+ Pos = MAP_APPFONT ( 235, 104 ) ;
+ Size = MAP_APPFONT( 13, 13 );
+ TabStop = TRUE ;
+ QuickHelpText = "Ereignisse" ;
+ QuickHelpText [ ENGLISH ] = "Events" ;
+ QuickHelpText [ english_us ] = "Events" ;
+ ButtonImage = Image
+ {
+ ImageBitmap = Bitmap { File = "script.bmp" ; };
+ MaskColor = STD_MASKCOLOR ;
+ };
+ QuickHelpText[ portuguese ] = "Script";
+ QuickHelpText[ russian ] = "";
+ QuickHelpText[ greek ] = "";
+ QuickHelpText[ dutch ] = "Gebeurtenissen";
+ QuickHelpText[ french ] = "vnements";
+ QuickHelpText[ spanish ] = "Script";
+ QuickHelpText[ italian ] = "Eventi";
+ QuickHelpText[ danish ] = "Begivenheder";
+ QuickHelpText[ swedish ] = "Hndelser";
+ QuickHelpText[ polish ] = "Wydarzenia";
+ QuickHelpText[ portuguese_brazilian ] = "Script";
+ QuickHelpText[ japanese ] = "";
+ QuickHelpText[ korean ] = "Script";
+ QuickHelpText[ chinese_simplified ] = "¼";
+ QuickHelpText[ chinese_traditional ] = "ƥ";
+ QuickHelpText[ arabic ] = "";
+ };
+
+ Text[ portuguese ] = "Hiperligao";
+ Text[ russian ] = "";
+ Text[ greek ] = "-";
+ Text[ dutch ] = "Hyperlink";
+ Text[ french ] = "Hyperlien";
+ Text[ spanish ] = "Hiperenlace";
+ Text[ italian ] = "Hyperlink";
+ Text[ danish ] = "Hyperlink";
+ Text[ swedish ] = "Hyperlnk";
+ Text[ polish ] = "Hipercze";
+ Text[ portuguese_brazilian ] = "Hyperlink";
+ Text[ japanese ] = "ʲ߰ݸ";
+ Text[ korean ] = "۸ũ";
+ Text[ chinese_simplified ] = "";
+ Text[ chinese_traditional ] = "Ws";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "Hyperlink";
+};
+
+/*************************************************************************
+|
+| Tabpage : Documents
+|
+*************************************************************************/
+
+TabPage RID_SVXPAGE_HYPERLINK_DOCUMENT
+{
+ Hide = TRUE ;
+ HelpID = HID_HYPERLINK_DOCUMENT;
+ OutputSize = TRUE ;
+ SVLook = TRUE ;
+ Size = MAP_APPFONT ( 260 , 162 ) ;
+ Text = "Hyperlink" ;
+ Text [ ENGLISH ] = "Hyperlink" ;
+ Text [ english_us ] = "Hyperlink" ;
+
+ GroupBox GRP_DOCUMENT
+ {
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 248 , 31 ) ;
+ Text = "Dokument" ;
+ Text [ ENGLISH ] = "Document" ;
+ Text [ english_us ] = "Document" ;
+ Text[ portuguese ] = "Documento";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "Document";
+ Text[ french ] = "Document";
+ Text[ spanish ] = "Documento";
+ Text[ italian ] = "Documento";
+ Text[ danish ] = "Dokument";
+ Text[ swedish ] = "Dokument";
+ Text[ polish ] = "Dokument";
+ Text[ portuguese_brazilian ] = "Document";
+ Text[ japanese ] = "޷";
+ Text[ korean ] = "";
+ Text[ chinese_simplified ] = "ĵ";
+ Text[ chinese_traditional ] = "ɮ";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "Belge";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_PATH_DOC
+ {
+ Pos = MAP_APPFONT ( 12 , 16 ) ;
+ Size = MAP_APPFONT ( 38 , 10 ) ;
+ Text = "~Pfad";
+ Text [ ENGLISH ] = "~Path" ;
+ Text [ english_us ] = "~Path" ;
+ Text[ portuguese ] = "Ata~lho";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "~Pad";
+ Text[ french ] = "~Chemin";
+ Text[ spanish ] = "~Ruta";
+ Text[ italian ] = "~Percorso";
+ Text[ danish ] = "Sti";
+ Text[ swedish ] = "S~kvg";
+ Text[ polish ] = "cieka";
+ Text[ portuguese_brazilian ] = "~Path";
+ Text[ japanese ] = "߽(~P)";
+ Text[ korean ] = "(~P)";
+ Text[ chinese_simplified ] = "·(~P)";
+ Text[ chinese_traditional ] = "|(~P)";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "~Veri yolu";
+ };
+ ImageButton BTN_FILEOPEN
+ {
+ Pos = MAP_APPFONT ( 235, 14 ) ;
+ Size = MAP_APPFONT( 13, 13 );
+ TabStop = TRUE ;
+ QuickHelpText = "Datei ffnen" ;
+ QuickHelpText [ ENGLISH ] = "Open file" ;
+ QuickHelpText [ english_us ] = "Open file" ;
+ ButtonImage = Image
+ {
+ ImageBitmap = Bitmap { File = "fileopen.bmp" ; };
+ MaskColor = STD_MASKCOLOR ;
+ };
+ QuickHelpText[ portuguese ] = "Fileopen";
+ QuickHelpText[ russian ] = " ";
+ QuickHelpText[ greek ] = " ";
+ QuickHelpText[ dutch ] = "Bestand openen";
+ QuickHelpText[ french ] = "Ouvrir un fichier";
+ QuickHelpText[ spanish ] = "Fileopen";
+ QuickHelpText[ italian ] = "Apri file";
+ QuickHelpText[ danish ] = "bn fil";
+ QuickHelpText[ swedish ] = "ppna fil";
+ QuickHelpText[ polish ] = "Otwrz plik";
+ QuickHelpText[ portuguese_brazilian ] = "Fileopen";
+ QuickHelpText[ japanese ] = "̧قJ";
+ QuickHelpText[ korean ] = "Fileopen";
+ QuickHelpText[ chinese_simplified ] = "ļ";
+ QuickHelpText[ chinese_traditional ] = "}";
+ QuickHelpText[ arabic ] = " ";
+ QuickHelpText[ language_user1 ] = " ";
+ };
+
+ GroupBox GRP_TARGET
+ {
+ Pos = MAP_APPFONT ( 6 , 38 ) ;
+ Size = MAP_APPFONT ( 248 , 48 ) ;
+ Text = "Sprungziel im Dokument" ;
+ Text [ ENGLISH ] = "Link target inside the document" ;
+ Text [ english_us ] = "Target in document" ;
+ Text[ portuguese ] = "Destino no documento";
+ Text[ russian ] = " ";
+ Text[ greek ] = " ";
+ Text[ dutch ] = "Doel in document";
+ Text[ french ] = "Cible l'intrieur du document";
+ Text[ spanish ] = "Destino en el documento";
+ Text[ italian ] = "Destinazione all'interno del documento";
+ Text[ danish ] = "Ml i dokumentet";
+ Text[ swedish ] = "Ml i dokumentet";
+ Text[ polish ] = "Cel w dokumencie";
+ Text[ portuguese_brazilian ] = "Target inside the document";
+ Text[ japanese ] = "޷Ăɂޯ";
+ Text[ korean ] = " ";
+ Text[ chinese_simplified ] = "ĵڵĿ";
+ Text[ chinese_traditional ] = "󤧤ؼ";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "Belge iindeki hedef";
+ };
+ FixedText FT_TARGET_DOC
+ {
+ Pos = MAP_APPFONT ( 12 , 53 ) ;
+ Size = MAP_APPFONT ( 38 , 10 ) ;
+ Text = "Sprungzie~l";
+ Text [ ENGLISH ] = "Link tar~get" ;
+ Text [ english_us ] = "Targ~et" ;
+ Text[ portuguese ] = "~Destino";
+ Text[ russian ] = "~";
+ Text[ greek ] = "";
+ Text[ dutch ] = "~Doel";
+ Text[ french ] = "~Cible";
+ Text[ spanish ] = "~Destino";
+ Text[ italian ] = "Destina~zione";
+ Text[ danish ] = "Ml";
+ Text[ swedish ] = "M~l";
+ Text[ polish ] = "Cel";
+ Text[ portuguese_brazilian ] = "~Target";
+ Text[ japanese ] = "ޯ(~T)";
+ Text[ korean ] = "Ÿ(~T)";
+ Text[ chinese_simplified ] = "Ŀ(~T)";
+ Text[ chinese_traditional ] = "ؼ(~T)";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "~Hedef";
+ };
+ Edit ED_TARGET_DOC
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 54 , 52 ) ;
+ Size = MAP_APPFONT ( 176 , 12 ) ;
+ };
+ FixedText FT_URL
+ {
+ Pos = MAP_APPFONT ( 12 , 70 ) ;
+ Size = MAP_APPFONT ( 30 , 10 ) ;
+ Text = "URL";
+ Text [ ENGLISH ] = "URL" ;
+ Text [ english_us ] = "URL" ;
+ Text[ portuguese ] = "URL";
+ Text[ russian ] = "URL";
+ Text[ greek ] = "URL";
+ Text[ dutch ] = "URL";
+ Text[ french ] = "URL";
+ Text[ spanish ] = "URL";
+ Text[ italian ] = "URL";
+ Text[ danish ] = "URL";
+ Text[ swedish ] = "URL";
+ Text[ polish ] = "URL";
+ Text[ portuguese_brazilian ] = "URL";
+ Text[ japanese ] = "URL";
+ Text[ korean ] = "URL";
+ Text[ chinese_simplified ] = "URL";
+ Text[ chinese_traditional ] = "URL";
+ Text[ arabic ] = "URL";
+ Text[ turkish ] = "URL";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_FULL_URL
+ {
+ Pos = MAP_APPFONT ( 45 , 70 ) ;
+ Size = MAP_APPFONT ( 185 , 12 ) ;
+ Text = "Testtext";
+ Text [ ENGLISH ] = "URL" ;
+ Text [ english_us ] = "Test text" ;
+ Text[ portuguese ] = "Texto-teste";
+ Text[ russian ] = " ";
+ Text[ greek ] = " ";
+ Text[ dutch ] = "Testtekst";
+ Text[ french ] = "Texte d'essai";
+ Text[ spanish ] = "URL";
+ Text[ italian ] = "Testo di prova";
+ Text[ danish ] = "Testtekst";
+ Text[ swedish ] = "Testtext";
+ Text[ polish ] = "Tekst prbny";
+ Text[ portuguese_brazilian ] = "URL";
+ Text[ japanese ] = "ý÷";
+ Text[ korean ] = "URL";
+ Text[ chinese_simplified ] = "";
+ Text[ chinese_traditional ] = "դ";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "Deneme metni";
+ Text[ language_user1 ] = " ";
+ };
+ ImageButton BTN_BROWSE
+ {
+ Pos = MAP_APPFONT ( 235, 51 ) ;
+ Size = MAP_APPFONT( 13, 13 );
+ TabStop = TRUE ;
+ QuickHelpText = "Sprungziel im Dokument" ;
+ QuickHelpText [ ENGLISH ] = "Link target in document" ;
+ QuickHelpText [ english_us ] = "Target in Document" ;
+ ButtonImage = Image
+ {
+ ImageBitmap = Bitmap { File = "target.bmp" ; };
+ MaskColor = STD_MASKCOLOR ;
+ };
+ QuickHelpText[ portuguese ] = "Destino no documento";
+ QuickHelpText[ russian ] = " ";
+ QuickHelpText[ greek ] = " ";
+ QuickHelpText[ dutch ] = "Doel in document";
+ QuickHelpText[ french ] = "Cible l'intrieur du document";
+ QuickHelpText[ spanish ] = "Target in document";
+ QuickHelpText[ italian ] = "Destinazione nel documento";
+ QuickHelpText[ danish ] = "Ml i dokumentet";
+ QuickHelpText[ swedish ] = "Ml i dokument";
+ QuickHelpText[ polish ] = "Cel w dokumencie";
+ QuickHelpText[ portuguese_brazilian ] = "Target in document";
+ QuickHelpText[ japanese ] = "޷Ăɂޯ";
+ QuickHelpText[ korean ] = "Target in document";
+ QuickHelpText[ chinese_simplified ] = "ĵڵĿ";
+ QuickHelpText[ chinese_traditional ] = "󤧤ؼ";
+ QuickHelpText[ arabic ] = " ";
+ };
+
+ GroupBox GRP_MORE
+ {
+ Pos = MAP_APPFONT ( 6 , 92 ) ;
+ Size = MAP_APPFONT ( 248 , 64 ) ;
+ Text = "Weitere Einstellungen" ;
+ Text [ ENGLISH ] = "More options" ;
+ Text [ english_us ] = "Further settings" ;
+ Text[ portuguese ] = "Outras opes";
+ Text[ russian ] = " ";
+ Text[ greek ] = " ";
+ Text[ dutch ] = "Verdere opties";
+ Text[ french ] = "Autres paramtres";
+ Text[ spanish ] = "Otras opciones";
+ Text[ italian ] = "Ulteriori impostazioni";
+ Text[ danish ] = "Flere indstillinger";
+ Text[ swedish ] = "Fler instllningar";
+ Text[ polish ] = "Dodatkowe ustawienia";
+ Text[ portuguese_brazilian ] = "More options";
+ Text[ japanese ] = "̑̐ݒ";
+ Text[ korean ] = "׹ ";
+ Text[ chinese_simplified ] = "趨";
+ Text[ chinese_traditional ] = "䥦]w";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "Dier ayarlar";
+ };
+ FixedText FT_FRAME
+ {
+ Pos = MAP_APPFONT ( 12 , 105 ) ;
+ Size = MAP_APPFONT ( 28 , 10 ) ;
+ Text = "~Frame";
+ Text [ ENGLISH ] = "~Frame" ;
+ Text [ english_us ] = "F~rame" ;
+ Text[ portuguese ] = "F~rame";
+ Text[ russian ] = "";
+ Text[ greek ] = "~";
+ Text[ dutch ] = "F~rame";
+ Text[ french ] = "F~rame";
+ Text[ spanish ] = "F~rame";
+ Text[ italian ] = "F~rame";
+ Text[ danish ] = "Frame";
+ Text[ swedish ] = "~Ram";
+ Text[ polish ] = "Ramka";
+ Text[ portuguese_brazilian ] = "F~rame";
+ Text[ japanese ] = "ڰ(~R)";
+ Text[ korean ] = "(~R)";
+ Text[ chinese_simplified ] = "(~R)";
+ Text[ chinese_traditional ] = "(~R)";
+ Text[ arabic ] = "~Frame";
+ Text[ turkish ] = "F~rame";
+ };
+ ComboBox CB_FRAME
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 54 , 104 ) ;
+ Size = MAP_APPFONT ( 69 , 60 ) ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+ Sort = TRUE ;
+ };
+ FixedText FT_FORM
+ {
+ Pos = MAP_APPFONT ( 129 , 105 ) ;
+ Size = MAP_APPFONT ( 27 , 10 ) ;
+ Text = "F~orm";
+ Text [ ENGLISH ] = "F~orm" ;
+ Text [ english_us ] = "F~orm" ;
+ Text[ portuguese ] = "Ti~po";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "V~orm";
+ Text[ french ] = "F~orme";
+ Text[ spanish ] = "f~orma";
+ Text[ italian ] = "F~orma";
+ Text[ danish ] = "Form";
+ Text[ swedish ] = "F~orm";
+ Text[ polish ] = "Forma";
+ Text[ portuguese_brazilian ] = "F~orm";
+ Text[ japanese ] = "̫(~O)";
+ Text[ korean ] = "(~O)";
+ Text[ chinese_simplified ] = "ʽ(~O)";
+ Text[ chinese_traditional ] = "覡(~O)";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "F~orm";
+ };
+ ListBox LB_FORM
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 160 , 104 ) ;
+ Size = MAP_APPFONT ( 70 , 60 ) ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+ AutoHScroll = TRUE ;
+ DDExtraWidth = TRUE ;
+ StringList =
+ {
+ < "Text" ; Default ; > ;
+ < "Button" ; Default ; > ;
+ };
+ stringlist [ english_us ] =
+ {
+ < "Text" ; Default ; > ;
+ < "Button" ; Default ; > ;
+ };
+ stringlist [ ENGLISH ] =
+ {
+ < "Text" ; Default ; > ;
+ < "Button" ; Default ; > ;
+ };
+ StringList [ language_user1 ] =
+ {
+ < "Text" ; Default ; > ;
+ < "Button" ; Default ; > ;
+ };
+ StringList [ portuguese ] =
+ {
+ < "Texto" ; Default ; > ;
+ < "Boto" ; Default ; > ;
+ };
+ StringList [ russian ] =
+ {
+ < "" ; Default ; > ;
+ < "" ; Default ; > ;
+ };
+ StringList [ greek ] =
+ {
+ < "" ; Default ; > ;
+ < " " ; Default ; > ;
+ };
+ StringList [ dutch ] =
+ {
+ < "Tekst" ; Default ; > ;
+ < "Knop" ; Default ; > ;
+ };
+ StringList [ french ] =
+ {
+ < "Texte" ; Default ; > ;
+ < "Bouton" ; Default ; > ;
+ };
+ StringList [ spanish ] =
+ {
+ < "Texto" ; Default ; > ;
+ < "Botn" ; Default ; > ;
+ };
+ StringList [ italian ] =
+ {
+ < "Testo" ; Default ; > ;
+ < "Pulsante" ; Default ; > ;
+ };
+ StringList [ danish ] =
+ {
+ < "Tekst" ; Default ; > ;
+ < "Knap" ; Default ; > ;
+ };
+ StringList [ swedish ] =
+ {
+ < "Text" ; Default ; > ;
+ < "Knapp" ; Default ; > ;
+ };
+ StringList [ polish ] =
+ {
+ < "Tekst" ; Default ; > ;
+ < "Przycisk" ; Default ; > ;
+ };
+ StringList [ portuguese_brazilian ] =
+ {
+ < "Text" ; Default ; > ;
+ < "Button" ; Default ; > ;
+ };
+ StringList [ japanese ] =
+ {
+ < "÷" ; Default ; > ;
+ < "" ; Default ; > ;
+ };
+ StringList [ korean ] =
+ {
+ < "ؽƮ" ; Default ; > ;
+ < "" ; Default ; > ;
+ };
+ StringList [ chinese_simplified ] =
+ {
+ < "" ; Default ; > ;
+ < "ť" ; Default ; > ;
+ };
+ StringList [ chinese_traditional ] =
+ {
+ < "r" ; Default ; > ;
+ < "s" ; Default ; > ;
+ };
+ StringList [ arabic ] =
+ {
+ < "" ; Default ; > ;
+ < "" ; Default ; > ;
+ };
+ StringList [ turkish ] =
+ {
+ < "Metin" ; Default ; > ;
+ < "Dme" ; Default ; > ;
+ };
+ };
+ FixedText FT_INDICATION
+ {
+ Pos = MAP_APPFONT ( 12 , 123 ) ;
+ Size = MAP_APPFONT ( 40 , 10 ) ;
+ Text = "Te~xt";
+ Text [ ENGLISH ] = "~Caption" ;
+ Text [ english_us ] = "Te~xt" ;
+ Text[ portuguese ] = "Te~xto";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text [ dutch ] = "Aan~wijzing" ;
+ Text [ french ] = "~Texte" ;
+ Text[ spanish ] = "In~dicacin";
+ Text[ italian ] = "Nota";
+ Text[ danish ] = "Tekst";
+ Text[ swedish ] = "Hn~visning";
+ Text[ polish ] = "Wskazwka";
+ Text[ portuguese_brazilian ] = "In~dication";
+ Text[ japanese ] = "(~K)";
+ Text[ korean ] = "(~N)";
+ Text[ chinese_simplified ] = "ʾ(~N)";
+ Text[ chinese_traditional ] = "r(~K)";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "~Balant ad";
+ };
+ Edit ED_INDICATION
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 54 , 122 ) ;
+ Size = MAP_APPFONT ( 194 , 12 ) ;
+ };
+ FixedText FT_TEXT
+ {
+ Pos = MAP_APPFONT ( 12 , 140 ) ;
+ Size = MAP_APPFONT ( 30 , 10 ) ;
+ Text = "N~ame";
+ Text [ ENGLISH ] = "N~ame" ;
+ Text [ english_us ] = "N~ame" ;
+ Text[ portuguese ] = "~Nome";
+ Text[ russian ] = "";
+ Text[ greek ] = "~";
+ Text[ dutch ] = "N~aam";
+ Text[ french ] = "~Nom";
+ Text[ spanish ] = "N~ombre";
+ Text[ italian ] = "Nome";
+ Text[ danish ] = "Navn";
+ Text[ swedish ] = "N~amn";
+ Text[ polish ] = "Nazwa";
+ Text[ portuguese_brazilian ] = "N~ame";
+ Text[ japanese ] = "O(~A)";
+ Text[ korean ] = "̸(~A)";
+ Text[ chinese_simplified ] = "(~A)";
+ Text[ chinese_traditional ] = "W(~A)";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "~Ad";
+ };
+ Edit ED_TEXT
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 54 , 139 ) ;
+ Size = MAP_APPFONT ( 194 , 12 ) ;
+ };
+ ImageButton BTN_SCRIPT
+ {
+ Pos = MAP_APPFONT ( 235, 104 ) ;
+ Size = MAP_APPFONT( 13, 13 );
+ TabStop = TRUE ;
+ QuickHelpText = "Ereignisse" ;
+ QuickHelpText [ ENGLISH ] = "Events" ;
+ QuickHelpText [ english_us ] = "Events" ;
+ ButtonImage = Image
+ {
+ ImageBitmap = Bitmap { File = "script.bmp" ; };
+ MaskColor = STD_MASKCOLOR ;
+ };
+ QuickHelpText[ portuguese ] = "Script";
+ QuickHelpText[ russian ] = "";
+ QuickHelpText[ greek ] = "";
+ QuickHelpText[ dutch ] = "Gebeurtenissen";
+ QuickHelpText[ french ] = "vnements";
+ QuickHelpText[ spanish ] = "Script";
+ QuickHelpText[ italian ] = "Eventi";
+ QuickHelpText[ danish ] = "Begivenheder";
+ QuickHelpText[ swedish ] = "Hndelser";
+ QuickHelpText[ polish ] = "Wydarzenia";
+ QuickHelpText[ portuguese_brazilian ] = "Script";
+ QuickHelpText[ japanese ] = "";
+ QuickHelpText[ korean ] = "Script";
+ QuickHelpText[ chinese_simplified ] = "¼";
+ QuickHelpText[ chinese_traditional ] = "ƥ";
+ QuickHelpText[ arabic ] = "";
+ };
+ Text[ portuguese ] = "Hiperligao";
+ Text[ russian ] = "";
+ Text[ greek ] = "-";
+ Text[ dutch ] = "Hyperlink";
+ Text[ french ] = "Hyperlien";
+ Text[ spanish ] = "Hiperenlace";
+ Text[ italian ] = "Hyperlink";
+ Text[ danish ] = "Hyperlink";
+ Text[ swedish ] = "Hyperlnk";
+ Text[ polish ] = "Hipercze";
+ Text[ portuguese_brazilian ] = "Hyperlink";
+ Text[ japanese ] = "ʲ߰ݸ";
+ Text[ korean ] = "۸ũ";
+ Text[ chinese_simplified ] = "";
+ Text[ chinese_traditional ] = "Ws";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "Hyperlink";
+};
+
+/*************************************************************************
+|
+| Tabpage : New Documents
+|
+*************************************************************************/
+
+TabPage RID_SVXPAGE_HYPERLINK_NEWDOCUMENT
+{
+ Hide = TRUE ;
+ HelpID = HID_HYPERLINK_NEWDOCUMENT;
+ OutputSize = TRUE ;
+ SVLook = TRUE ;
+ Size = MAP_APPFONT ( 260 , 162 ) ;
+ Text = "Hyperlink" ;
+ Text [ ENGLISH ] = "Hyperlink" ;
+ Text [ english_us ] = "Hyperlink" ;
+
+ GroupBox GRP_NEWDOCUMENT
+ {
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 248 , 85 ) ;
+ Text = "Neues Dokument" ;
+ Text [ ENGLISH ] = "New document" ;
+ Text [ english_us ] = "New document" ;
+ Text[ portuguese ] = "Novo documento";
+ Text[ russian ] = " ";
+ Text[ greek ] = " ";
+ Text[ dutch ] = "Nieuw document";
+ Text[ french ] = "Nouveau document";
+ Text[ spanish ] = "Nuevo documento";
+ Text[ italian ] = "Nuovo documento";
+ Text[ danish ] = "Nyt dokument";
+ Text[ swedish ] = "Nytt dokument";
+ Text[ polish ] = "Nowy dokument";
+ Text[ portuguese_brazilian ] = "New document";
+ Text[ japanese ] = "VK޷";
+ Text[ korean ] = " ";
+ Text[ chinese_simplified ] = "ĵ";
+ Text[ chinese_traditional ] = "}ҷs";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "Yeni belge";
+ Text[ language_user1 ] = " ";
+ };
+ RadioButton RB_EDITNOW
+ {
+ Pos = MAP_APPFONT( 53, 13 );
+ Size = MAP_APPFONT( 59, 10 );
+ Text = "Sofort ~bearbeiten";
+ Text [ ENGLISH ] = "~Edit now";
+ Text[ english_us ] = "Edit ~now";
+ Text[ portuguese ] = "Editar ~imediatamente";
+ Text[ russian ] = " ";
+ Text[ greek ] = "~ ";
+ Text[ dutch ] = "~Meteen bewerken";
+ Text[ french ] = "diter ~tout de suite";
+ Text[ spanish ] = "Editar a~hora";
+ Text[ italian ] = "Modi~fica subito";
+ Text[ danish ] = "Rediger straks";
+ Text[ swedish ] = "Redigera ~direkt";
+ Text[ polish ] = "Edytuj natychmiast";
+ Text[ portuguese_brazilian ] = "Edit ~now.";
+ Text[ japanese ] = "ҏW(~N)";
+ Text[ korean ] = " (~N)";
+ Text[ chinese_simplified ] = "ڱ༭(~N)";
+ Text[ chinese_traditional ] = "ߨs(~N)";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "~imdi dzenle";
+ };
+ RadioButton RB_EDITLATER
+ {
+ Pos = MAP_APPFONT( 114, 13 );
+ Size = MAP_APPFONT( 59, 10 );
+ Text = "~Spter bearbeiten";
+ Text [ ENGLISH ] = "Edit ~later";
+ Text[ english_us ] = "Edit ~later";
+ Text[ portuguese ] = "Edi~tar mais tarde";
+ Text[ russian ] = " ";
+ Text[ greek ] = " ";
+ Text[ dutch ] = "~Later bewerken";
+ Text[ french ] = "diter ~plus tard";
+ Text[ spanish ] = "Edit~ar ms tarde";
+ Text[ italian ] = "Modifica dopo";
+ Text[ danish ] = "Rediger senere";
+ Text[ swedish ] = "Redigera ~senare";
+ Text[ polish ] = "Edytuj pniej";
+ Text[ portuguese_brazilian ] = "Edit ~later";
+ Text[ japanese ] = "ŕҏW(~L)";
+ Text[ korean ] = "߿ (~L)";
+ Text[ chinese_simplified ] = "Ժ༭(~L)";
+ Text[ chinese_traditional ] = "Hs(~L)";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "~Sonra dzenle";
+ };
+ FixedText FT_PATH_NEWDOC
+ {
+ Pos = MAP_APPFONT ( 12 , 26 ) ;
+ Size = MAP_APPFONT ( 38 , 10 ) ;
+ Text = "~Datei";
+ Text [ ENGLISH ] = "Fi~le" ;
+ Text [ english_us ] = "~File" ;
+/* ### ACHTUNG: Neuer Text in Resource! "Datei" statt "Pfad" */
+ Text[ portuguese ] = "~Ficheiro";
+ Text[ russian ] = "~";
+ Text[ greek ] = "";
+ Text[ dutch ] = "~Bestand";
+ Text[ french ] = "~Fichier";
+ Text[ spanish ] = "~Archivo";
+ Text[ italian ] = "~File";
+ Text[ danish ] = "Fil";
+ Text[ swedish ] = "~Fil";
+ Text[ polish ] = "Plik";
+ Text[ portuguese_brazilian ] = "~Path";
+ Text[ japanese ] = "̧(~P)";
+ Text[ korean ] = "(~F)";
+ Text[ chinese_simplified ] = "ļ(~P)";
+ Text[ chinese_traditional ] = "ɮ(~P)";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "~Dosya";
+ };
+ Edit ED_PATH_NEWDOC
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 54 , 25 ) ;
+ Size = MAP_APPFONT ( 176 , 12 ) ;
+ };
+ FixedText FT_DOCUMENT_TYPES
+ {
+ Pos = MAP_APPFONT ( 12 , 43 ) ;
+ Size = MAP_APPFONT ( 42 , 10 ) ;//( 38 , 10 ) ;
+ Text = "Dateit~yp";
+ Text [ ENGLISH ] = "Filet~yp" ;
+ Text [ english_us ] = "File ~type" ;
+ Text[ portuguese ] = "~Tipo de ficheiro";
+ Text[ russian ] = " ";
+ Text[ greek ] = "~ ";
+ Text[ dutch ] = "Bestands~type";
+ Text[ french ] = "~Type de fichier";
+ Text[ spanish ] = "Ti~po";
+ Text[ italian ] = "~Tipo di file";
+ Text[ danish ] = "Filtype";
+ Text[ swedish ] = "Filt~yp";
+ Text[ polish ] = "Typ pliku";
+ Text[ portuguese_brazilian ] = "File~typ";
+ Text[ japanese ] = "̧ق̎(~T)";
+ Text[ korean ] = " (~T)";
+ Text[ chinese_simplified ] = "ļ(~T)";
+ Text[ chinese_traditional ] = "ɮ(~T)";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "Dosya ~tipi";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_DOCUMENT_TYPES
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 54 , 42 ) ;
+ Size = MAP_APPFONT ( 176 , 40 ) ;
+ TabStop = TRUE ;
+ DropDown = FALSE ;
+ };
+ ImageButton BTN_CREATE
+ {
+ Pos = MAP_APPFONT ( 235, 25 ) ;
+ Size = MAP_APPFONT( 13, 13 );
+ TabStop = TRUE ;
+ QuickHelpText = "Pfad auswhlen" ;
+ QuickHelpText [ ENGLISH ] = "Choose path" ;
+ QuickHelpText [ english_us ] = "Select Path" ;
+ ButtonImage = Image
+ {
+ ImageBitmap = Bitmap { File = "newdoc.bmp" ; };
+ MaskColor = STD_MASKCOLOR ;
+ };
+/* ### ACHTUNG: Neuer Text in Resource! "Pfad auswhlen" */
+ QuickHelpText[ portuguese ] = "Create";
+ QuickHelpText[ russian ] = " ";
+ QuickHelpText[ greek ] = " ";
+ QuickHelpText[ dutch ] = "Pad selecteren";
+ QuickHelpText[ french ] = "Slectionner le chemin";
+ QuickHelpText[ spanish ] = "Create";
+ QuickHelpText[ italian ] = "Seleziona percorso";
+ QuickHelpText[ danish ] = "Vlg sti";
+ QuickHelpText[ swedish ] = "Vlj ut skvg";
+ QuickHelpText[ polish ] = "Wybierz ciek";
+ QuickHelpText[ portuguese_brazilian ] = "Create";
+ QuickHelpText[ japanese ] = "߽̑I";
+ QuickHelpText[ korean ] = "Create";
+ QuickHelpText[ chinese_simplified ] = "ѡ·";
+ QuickHelpText[ chinese_traditional ] = "ܸ|";
+ QuickHelpText[ arabic ] = " ";
+ };
+
+ GroupBox GRP_MORE
+ {
+ Pos = MAP_APPFONT ( 6 , 92 ) ;
+ Size = MAP_APPFONT ( 248 , 64 ) ;
+ Text = "Weitere Einstellungen" ;
+ Text [ ENGLISH ] = "More options" ;
+ Text [ english_us ] = "Further settings" ;
+ Text[ portuguese ] = "Outras opes";
+ Text[ russian ] = " ";
+ Text[ greek ] = " ";
+ Text[ dutch ] = "Verdere opties";
+ Text[ french ] = "Autres paramtres";
+ Text[ spanish ] = "Otras opciones";
+ Text[ italian ] = "Ulteriori impostazioni";
+ Text[ danish ] = "Flere indstillinger";
+ Text[ swedish ] = "Fler instllningar";
+ Text[ polish ] = "Dodatkowe ustawienia";
+ Text[ portuguese_brazilian ] = "More options";
+ Text[ japanese ] = "̑̐ݒ";
+ Text[ korean ] = "׹ ";
+ Text[ chinese_simplified ] = "趨";
+ Text[ chinese_traditional ] = "䥦]w";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "Dier ayarlar";
+ };
+ FixedText FT_FRAME
+ {
+ Pos = MAP_APPFONT ( 12 , 105 ) ;
+ Size = MAP_APPFONT ( 28 , 10 ) ;
+ Text = "~Frame";
+ Text [ ENGLISH ] = "~Frame" ;
+ Text [ english_us ] = "F~rame" ;
+ Text[ portuguese ] = "F~rame";
+ Text[ russian ] = "";
+ Text[ greek ] = "~";
+ Text[ dutch ] = "F~rame";
+ Text[ french ] = "F~rame";
+ Text[ spanish ] = "F~rame";
+ Text[ italian ] = "F~rame";
+ Text[ danish ] = "Frame";
+ Text[ swedish ] = "~Ram";
+ Text[ polish ] = "Ramka";
+ Text[ portuguese_brazilian ] = "F~rame";
+ Text[ japanese ] = "ڰ(~R)";
+ Text[ korean ] = "(~R)";
+ Text[ chinese_simplified ] = "(~R)";
+ Text[ chinese_traditional ] = "(~R)";
+ Text[ arabic ] = "~Frame";
+ Text[ turkish ] = "F~rame";
+ };
+ ComboBox CB_FRAME
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 54 , 104 ) ;
+ Size = MAP_APPFONT ( 69 , 60 ) ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+ Sort = TRUE ;
+ };
+ FixedText FT_FORM
+ {
+ Pos = MAP_APPFONT ( 129 , 105 ) ;
+ Size = MAP_APPFONT ( 27 , 10 ) ;
+ Text = "F~orm";
+ Text [ ENGLISH ] = "F~orm" ;
+ Text [ english_us ] = "F~orm" ;
+ Text[ portuguese ] = "Ti~po";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "V~orm";
+ Text[ french ] = "F~orme";
+ Text[ spanish ] = "f~orma";
+ Text[ italian ] = "F~orma";
+ Text[ danish ] = "Form";
+ Text[ swedish ] = "F~orm";
+ Text[ polish ] = "Forma";
+ Text[ portuguese_brazilian ] = "F~orm";
+ Text[ japanese ] = "̫(~O)";
+ Text[ korean ] = "(~O)";
+ Text[ chinese_simplified ] = "ʽ(~O)";
+ Text[ chinese_traditional ] = "覡(~O)";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "F~orm";
+ };
+ ListBox LB_FORM
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 160 , 104 ) ;
+ Size = MAP_APPFONT ( 70 , 60 ) ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+ AutoHScroll = TRUE ;
+ DDExtraWidth = TRUE ;
+ StringList =
+ {
+ < "Text" ; Default ; > ;
+ < "Button" ; Default ; > ;
+ };
+ stringlist [ english_us ] =
+ {
+ < "Text" ; Default ; > ;
+ < "Button" ; Default ; > ;
+ };
+ stringlist [ ENGLISH ] =
+ {
+ < "Text" ; Default ; > ;
+ < "Button" ; Default ; > ;
+ };
+ StringList [ language_user1 ] =
+ {
+ < "Text" ; Default ; > ;
+ < "Button" ; Default ; > ;
+ };
+ StringList [ portuguese ] =
+ {
+ < "Texto" ; Default ; > ;
+ < "Boto" ; Default ; > ;
+ };
+ StringList [ russian ] =
+ {
+ < "" ; Default ; > ;
+ < "" ; Default ; > ;
+ };
+ StringList [ greek ] =
+ {
+ < "" ; Default ; > ;
+ < " " ; Default ; > ;
+ };
+ StringList [ dutch ] =
+ {
+ < "Tekst" ; Default ; > ;
+ < "Knop" ; Default ; > ;
+ };
+ StringList [ french ] =
+ {
+ < "Texte" ; Default ; > ;
+ < "Bouton" ; Default ; > ;
+ };
+ StringList [ spanish ] =
+ {
+ < "Texto" ; Default ; > ;
+ < "Botn" ; Default ; > ;
+ };
+ StringList [ italian ] =
+ {
+ < "Testo" ; Default ; > ;
+ < "Pulsante" ; Default ; > ;
+ };
+ StringList [ danish ] =
+ {
+ < "Tekst" ; Default ; > ;
+ < "Knap" ; Default ; > ;
+ };
+ StringList [ swedish ] =
+ {
+ < "Text" ; Default ; > ;
+ < "Knapp" ; Default ; > ;
+ };
+ StringList [ polish ] =
+ {
+ < "Tekst" ; Default ; > ;
+ < "Przycisk" ; Default ; > ;
+ };
+ StringList [ portuguese_brazilian ] =
+ {
+ < "Text" ; Default ; > ;
+ < "Button" ; Default ; > ;
+ };
+ StringList [ japanese ] =
+ {
+ < "÷" ; Default ; > ;
+ < "" ; Default ; > ;
+ };
+ StringList [ korean ] =
+ {
+ < "ؽƮ" ; Default ; > ;
+ < "" ; Default ; > ;
+ };
+ StringList [ chinese_simplified ] =
+ {
+ < "" ; Default ; > ;
+ < "ť" ; Default ; > ;
+ };
+ StringList [ chinese_traditional ] =
+ {
+ < "r" ; Default ; > ;
+ < "s" ; Default ; > ;
+ };
+ StringList [ arabic ] =
+ {
+ < "" ; Default ; > ;
+ < "" ; Default ; > ;
+ };
+ StringList [ turkish ] =
+ {
+ < "Metin" ; Default ; > ;
+ < "Dme" ; Default ; > ;
+ };
+ };
+ FixedText FT_INDICATION
+ {
+ Pos = MAP_APPFONT ( 12 , 123 ) ;
+ Size = MAP_APPFONT ( 40 , 10 ) ;
+ Text = "Te~xt";
+ Text [ ENGLISH ] = "~Caption" ;
+ Text [ english_us ] = "Te~xt" ;
+ Text[ portuguese ] = "Te~xto";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text [ dutch ] = "Aan~wijzing" ;
+ Text [ french ] = "~Texte" ;
+ Text[ spanish ] = "In~dicacin";
+ Text[ italian ] = "Nota";
+ Text[ danish ] = "Tekst";
+ Text[ swedish ] = "Hn~visning";
+ Text[ polish ] = "Wskazwka";
+ Text[ portuguese_brazilian ] = "In~dication";
+ Text[ japanese ] = "(~K)";
+ Text[ korean ] = "(~N)";
+ Text[ chinese_simplified ] = "ʾ(~N)";
+ Text[ chinese_traditional ] = "r(~K)";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "~Balant ad";
+ };
+ Edit ED_INDICATION
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 54 , 122 ) ;
+ Size = MAP_APPFONT ( 194 , 12 ) ;
+ };
+ FixedText FT_TEXT
+ {
+ Pos = MAP_APPFONT ( 12 , 140 ) ;
+ Size = MAP_APPFONT ( 30 , 10 ) ;
+ Text = "N~ame";
+ Text [ ENGLISH ] = "N~ame" ;
+ Text [ english_us ] = "N~ame" ;
+ Text[ portuguese ] = "~Nome";
+ Text[ russian ] = "";
+ Text[ greek ] = "~";
+ Text[ dutch ] = "N~aam";
+ Text[ french ] = "~Nom";
+ Text[ spanish ] = "N~ombre";
+ Text[ italian ] = "Nome";
+ Text[ danish ] = "Navn";
+ Text[ swedish ] = "N~amn";
+ Text[ polish ] = "Nazwa";
+ Text[ portuguese_brazilian ] = "N~ame";
+ Text[ japanese ] = "O(~A)";
+ Text[ korean ] = "̸(~A)";
+ Text[ chinese_simplified ] = "(~A)";
+ Text[ chinese_traditional ] = "W(~A)";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "~Ad";
+ };
+ Edit ED_TEXT
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 54 , 139 ) ;
+ Size = MAP_APPFONT ( 194 , 12 ) ;
+ };
+ ImageButton BTN_SCRIPT
+ {
+ Pos = MAP_APPFONT ( 235, 104 ) ;
+ Size = MAP_APPFONT( 13, 13 );
+ TabStop = TRUE ;
+ QuickHelpText = "Ereignisse" ;
+ QuickHelpText [ ENGLISH ] = "Events" ;
+ QuickHelpText [ english_us ] = "Events" ;
+ ButtonImage = Image
+ {
+ ImageBitmap = Bitmap { File = "script.bmp" ; };
+ MaskColor = STD_MASKCOLOR ;
+ };
+ QuickHelpText[ portuguese ] = "Script";
+ QuickHelpText[ russian ] = "";
+ QuickHelpText[ greek ] = "";
+ QuickHelpText[ dutch ] = "Gebeurtenissen";
+ QuickHelpText[ french ] = "vnements";
+ QuickHelpText[ spanish ] = "Script";
+ QuickHelpText[ italian ] = "Eventi";
+ QuickHelpText[ danish ] = "Begivenheder";
+ QuickHelpText[ swedish ] = "Hndelser";
+ QuickHelpText[ polish ] = "Wydarzenia";
+ QuickHelpText[ portuguese_brazilian ] = "Script";
+ QuickHelpText[ japanese ] = "";
+ QuickHelpText[ korean ] = "Script";
+ QuickHelpText[ chinese_simplified ] = "¼";
+ QuickHelpText[ chinese_traditional ] = "ƥ";
+ QuickHelpText[ arabic ] = "";
+ };
+ Text[ portuguese ] = "Hiperligao";
+ Text[ russian ] = "";
+ Text[ greek ] = "-";
+ Text[ dutch ] = "Hyperlink";
+ Text[ french ] = "Hyperlien";
+ Text[ spanish ] = "Hiperenlace";
+ Text[ italian ] = "Hyperlink";
+ Text[ danish ] = "Hyperlink";
+ Text[ swedish ] = "Hyperlnk";
+ Text[ polish ] = "Hipercze";
+ Text[ portuguese_brazilian ] = "Hyperlink";
+ Text[ japanese ] = "ʲ߰ݸ";
+ Text[ korean ] = "۸ũ";
+ Text[ chinese_simplified ] = "";
+ Text[ chinese_traditional ] = "Ws";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "Hyperlink";
+};
+
+/*************************************************************************
+|
+| Tabpage-Dialog : Hyperlinks
+|
+*************************************************************************/
+ModalDialog RID_SVXDLG_NEWHYPERLINK
+{
+ HelpID = SID_HYPERLINK_DIALOG;
+ OutputSize = TRUE ;
+ SVLook = TRUE ;
+ Size = MAP_APPFONT ( 325 , 185 ) ;
+ Text = "Hyperlink" ;
+ Text [ ENGLISH ] = "Hyperlink" ;
+ Text [ english_us ] = "Hyperlink" ;
+ Moveable = TRUE ;
+ Text[ portuguese ] = "Hiperligao";
+ Text[ russian ] = "";
+ Text[ greek ] = "-";
+ Text[ dutch ] = "Hyperlink";
+ Text[ french ] = "Hyperlien";
+ Text[ spanish ] = "Hiperenlace";
+ Text[ italian ] = "Hyperlink";
+ Text[ danish ] = "Hyperlink";
+ Text[ swedish ] = "Hyperlnk";
+ Text[ polish ] = "Hipercze";
+ Text[ portuguese_brazilian ] = "Hyperlink";
+ Text[ japanese ] = "ʲ߰ݸ";
+ Text[ korean ] = "۸ũ";
+ Text[ chinese_simplified ] = "";
+ Text[ chinese_traditional ] = "Ws";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "Hyperlink";
+};
+
+/*************************************************************************
+|
+| Tabpage-Dialog : Hyperlinks
+|
+*************************************************************************/
+
+String RID_SVXSTR_HYPDLG_APPLYBUT
+{
+ Text = "bernehmen" ;
+ Text [ ENGLISH ] = "Apply" ;
+ Text [ english_us ] = "Apply" ;
+ Text[ portuguese ] = "Aplicar";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "Overnemen";
+ Text[ french ] = "Appliquer";
+ Text[ spanish ] = "Aplicar";
+ Text[ italian ] = "Applica";
+ Text[ danish ] = "Anvend";
+ Text[ swedish ] = "verta";
+ Text[ polish ] = "Zastosuj";
+ Text[ portuguese_brazilian ] = "Apply";
+ Text[ japanese ] = "Kp";
+ Text[ korean ] = "";
+ Text[ chinese_simplified ] = "";
+ Text[ chinese_traditional ] = "M";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "Uygula";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_HYPDLG_CLOSEBUT
+{
+ Text = "Schlieen" ;
+ Text [ ENGLISH ] = "Close" ;
+ Text [ english_us ] = "Close" ;
+ Text[ portuguese ] = "Fechar";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "Sluiten";
+ Text[ french ] = "Fermer";
+ Text[ spanish ] = "Cerrar";
+ Text[ italian ] = "Chiudi";
+ Text[ danish ] = "Luk";
+ Text[ swedish ] = "Stng";
+ Text[ polish ] = "Zamknij";
+ Text[ portuguese_brazilian ] = "Close";
+ Text[ japanese ] = "‚";
+ Text[ korean ] = "ݱ";
+ Text[ chinese_simplified ] = "ر";
+ Text[ chinese_traditional ] = "";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "Kapat";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_HYPDLG_MACROACT1
+{
+ Text = "Maus ber Objekt" ;
+ Text [ ENGLISH ] = "Mouse over object" ;
+ Text [ english_us ] = "Mouse over object" ;
+ Text[ portuguese ] = "Rato sobre objecto";
+ Text[ russian ] = " ";
+ Text[ greek ] = " ";
+ Text[ dutch ] = "Muis op object";
+ Text[ french ] = "Souris sur l'objet";
+ Text[ spanish ] = "Ratn sobre objeto";
+ Text[ italian ] = "Mouse sopra oggetto";
+ Text[ danish ] = "Mus over objekt";
+ Text[ swedish ] = "Mus ver objekt";
+ Text[ polish ] = "Mysz nad obiektem";
+ Text[ portuguese_brazilian ] = "Mouse over object";
+ Text[ japanese ] = "޼ުėpϳ";
+ Text[ korean ] = "콺 ü";
+ Text[ chinese_simplified ] = "ڶ֮";
+ Text[ chinese_traditional ] = "ƹb󤧤W";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "Fare oku nesne zerinde";
+};
+String RID_SVXSTR_HYPDLG_MACROACT2
+{
+ Text = "Hyperlink auslsen" ;
+ Text [ ENGLISH ] = "Release hyperlink" ;
+ Text [ english_us ] = "Execute hyperlink" ;
+ Text[ portuguese ] = "Executar hiperligao";
+ Text[ russian ] = " ";
+ Text[ greek ] = " -";
+ Text[ dutch ] = "Hyperlink uitvoeren";
+ Text[ french ] = "Dclencher l'hyperlien";
+ Text[ spanish ] = "Ejecutar hiperenlace";
+ Text[ italian ] = "Esegui hyperlink";
+ Text[ danish ] = "Udfr hyperlink";
+ Text[ swedish ] = "Utfr hyperlnk";
+ Text[ polish ] = "Wykonaj hipercze";
+ Text[ portuguese_brazilian ] = "Release hyperlink";
+ Text[ japanese ] = "ʲ߰ݸ";
+ Text[ korean ] = "۸ũ ";
+ Text[ chinese_simplified ] = "ִг";
+ Text[ chinese_traditional ] = "Ws";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "Hyperlink'i etkinletir";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_HYPDLG_MACROACT3
+{
+ Text = "Maus verlsst Objekt" ;
+ Text [ ENGLISH ] = "Mouse leave object" ;
+ Text [ english_us ] = "Mouse leaves object" ;
+ Text[ portuguese ] = "Rato fora do objecto";
+ Text[ russian ] = " ";
+ Text[ greek ] = " ";
+ Text[ dutch ] = "Muis verlaat object";
+ Text[ french ] = "Souris quitte l'objet";
+ Text[ spanish ] = "Ratn fuera de objeto";
+ Text[ italian ] = "Mouse fuori dall'oggetto";
+ Text[ danish ] = "Mus forlader objekt";
+ Text[ swedish ] = "Mus lmnar objekt";
+ Text[ polish ] = "Mysz opuszcza obiekt";
+ Text[ portuguese_brazilian ] = "Mouse leave object";
+ Text[ japanese ] = "޼ުĂϳ𗣂";
+ Text[ korean ] = "콺 ü ";
+ Text[ chinese_simplified ] = "뿪";
+ Text[ chinese_traditional ] = "ƹö}";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "Fare oku nesneden ayrlyor";
+};
+
+String RID_SVXSTR_HYPDLG_NOVALIDFILENAME
+{
+ Text = "Geben Sie bitte einen gltigen Dateinamen ein.";
+ Text [ ENGLISH ] = "Please type in a valid filename." ;
+ Text [ english_us ] = "Please type in a valid file name." ;
+ Text[ portuguese ] = "Indique um nome de ficheiro vlido.";
+ Text[ russian ] = ", , .";
+ Text[ greek ] = " .";
+ Text[ dutch ] = "Geef een geldige bestandsnaam aan.";
+ Text[ french ] = "Veuillez saisir un nom de fichier existant.";
+ Text[ spanish ] = "Indique por favor un nombre vlido de archivo.";
+ Text[ italian ] = "Inserite un nome di file valido.";
+ Text[ danish ] = "Indtast venligst et gyldigt filnavn.";
+ Text[ swedish ] = "Mata in ett giltigt filnamn.";
+ Text[ polish ] = "Podaj prosz prawidow nazw pliku.";
+ Text[ portuguese_brazilian ] = "Please type in a valid filename.";
+ Text[ japanese ] = "Ļٖ͂ĉB";
+ Text[ korean ] = "ȿ ϸ ԷϽʽÿ.";
+ Text[ chinese_simplified ] = "һЧļ";
+ Text[ chinese_traditional ] = "пJ@ӦĪɮצWC";
+ Text[ arabic ] = " .";
+ Text[ turkish ] = "Geerli bir dosya ad girin.";
+ Text[ language_user1 ] = " ";
+};
+
+String RID_SVXSTR_HYPERDLG_HLINETTP
+{
+ Text = "Internet";
+ Text [ ENGLISH ] = "Internet" ;
+ Text [ english_us ] = "Internet" ;
+ Text[ portuguese ] = "Internet";
+ Text[ russian ] = "";
+ Text[ greek ] = "Internet";
+ Text[ dutch ] = "Internet";
+ Text[ french ] = "Internet";
+ Text[ spanish ] = "Internet";
+ Text[ italian ] = "Internet";
+ Text[ danish ] = "Internet";
+ Text[ swedish ] = "Internet";
+ Text[ polish ] = "Internet";
+ Text[ portuguese_brazilian ] = "Internet";
+ Text[ japanese ] = "ȯ";
+ Text[ korean ] = "ͳ";
+ Text[ chinese_simplified ] = "ʻ";
+ Text[ chinese_traditional ] = "Internet";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "Internet";
+};
+
+String RID_SVXSTR_HYPERDLG_HLMAILTP
+{
+ Text = "Mail & News";
+ Text [ ENGLISH ] = "Mail & News" ;
+ Text [ english_us ] = "Mail & News" ;
+ Text[ portuguese ] = "Mail & News";
+ Text[ russian ] = " ";
+ Text[ greek ] = " ";
+ Text[ dutch ] = "Mail & Nieuws";
+ Text[ french ] = "Mail & News";
+ Text[ spanish ] = "Correo y noticias";
+ Text[ italian ] = "Mail & news";
+ Text[ danish ] = "E-mail og nyheder";
+ Text[ swedish ] = "E-post & nyheter";
+ Text[ polish ] = "E-mail & wiadomoci";
+ Text[ portuguese_brazilian ] = "Mail & News";
+ Text[ japanese ] = "Ұ & ƭ";
+ Text[ korean ] = " & ";
+ Text[ chinese_simplified ] = "ʼ";
+ Text[ chinese_traditional ] = "qllMsD";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "E-posta ve haber gruplar";
+};
+
+String RID_SVXSTR_HYPERDLG_HLDOCTP
+{
+ Text = "Dokument";
+ Text [ ENGLISH ] = "Document" ;
+ Text [ english_us ] = "Document" ;
+ Text[ portuguese ] = "Documento";
+ Text[ russian ] = "";
+ Text[ greek ] = "";
+ Text[ dutch ] = "Document";
+ Text[ french ] = "Document";
+ Text[ spanish ] = "Documento";
+ Text[ italian ] = "Documento";
+ Text[ danish ] = "Dokument";
+ Text[ swedish ] = "Dokument";
+ Text[ polish ] = "Dokument";
+ Text[ portuguese_brazilian ] = "Document";
+ Text[ japanese ] = "޷";
+ Text[ korean ] = "";
+ Text[ chinese_simplified ] = "ĵ";
+ Text[ chinese_traditional ] = "";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "Belge";
+};
+
+String RID_SVXSTR_HYPERDLG_HLDOCNTP
+{
+ Text = "Neues Dokument";
+ Text [ ENGLISH ] = "New document" ;
+ Text [ english_us ] = "New document" ;
+ Text[ portuguese ] = "Novo documento";
+ Text[ russian ] = " ";
+ Text[ greek ] = " ";
+ Text[ dutch ] = "Nieuw document";
+ Text[ french ] = "Nouveau document";
+ Text[ spanish ] = "Nuevo documento";
+ Text[ italian ] = "Nuovo documento";
+ Text[ danish ] = "Nyt dokument";
+ Text[ swedish ] = "Nytt dokument";
+ Text[ polish ] = "Nowy dokument";
+ Text[ portuguese_brazilian ] = "New document";
+ Text[ japanese ] = "VK쐬޷";
+ Text[ korean ] = " ";
+ Text[ chinese_simplified ] = "½ĵ";
+ Text[ chinese_traditional ] = "}ҷs";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "Yeni belge";
+};
+
+String RID_SVXSTR_HYPERDLG_FORM_BUTTON
+{
+ Text = "Button" ;
+ Text [ english_us ] = "Button" ;
+ Text [ ENGLISH ] = "Button" ;
+ Text [ language_user1 ] = "Button" ;
+ Text [ portuguese ] = "Boto" ;
+ Text [ russian ] = "" ;
+ Text [ greek ] = " " ;
+ Text [ dutch ] = "Knop" ;
+ Text [ french ] = "Bouton" ;
+ Text [ spanish ] = "Botn" ;
+ Text [ italian ] = "Pulsante" ;
+ Text [ danish ] = "Knap" ;
+ Text [ swedish ] = "Knapp" ;
+ Text [ polish ] = "Przycisk" ;
+ Text [ portuguese_brazilian ] = "Button" ;
+ Text [ japanese ] = "" ;
+ Text [ korean ] = "ư" ;
+ Text [ chinese_simplified ] = "ť" ;
+ Text [ chinese_traditional ] = "s" ;
+ Text [ arabic ] = "" ;
+ Text [ turkish ] = "Dme" ;
+};
+
+String RID_SVXSTR_HYPERDLG_FROM_TEXT
+{
+ Text = "Text" ;
+ Text [ english_us ] = "Text" ;
+ Text [ ENGLISH ] = "Text" ;
+ Text [ language_user1 ] = "Text" ;
+ Text [ portuguese ] = "Texto" ;
+ Text [ russian ] = "" ;
+ Text [ greek ] = "" ;
+ Text [ dutch ] = "Tekst" ;
+ Text [ french ] = "Texte" ;
+ Text [ spanish ] = "Texto" ;
+ Text [ italian ] = "Testo" ;
+ Text [ danish ] = "Tekst" ;
+ Text [ swedish ] = "Text" ;
+ Text [ polish ] = "Tekst" ;
+ Text [ portuguese_brazilian ] = "Text" ;
+ Text [ japanese ] = "" ;
+ Text [ korean ] = "ؽƮ" ;
+ Text [ chinese_simplified ] = "" ;
+ Text [ chinese_traditional ] = "r" ;
+ Text [ arabic ] = "" ;
+ Text [ turkish ] = "Metin" ;
+};
+
+Image RID_SVXBMP_HLINETTP
+{
+ ImageBitmap = Bitmap { File = "hlinettp.bmp" ; };
+ MaskColor = Color { Red = 0xFFFF ; Green = 0xFFFF ; Blue = 0xFFFF ; };
+};
+
+Image RID_SVXBMP_HLMAILTP
+{
+ ImageBitmap = Bitmap { File = "hlmailtp.bmp" ; };
+ MaskColor = Color { Red = 0xFFFF ; Green = 0xFFFF ; Blue = 0xFFFF ; };
+};
+
+Image RID_SVXBMP_HLDOCTP
+{
+ ImageBitmap = Bitmap { File = "hldoctp.bmp" ; };
+ MaskColor = Color { Red = 0xFFFF ; Green = 0xFFFF ; Blue = 0xFFFF ; };
+};
+
+Image RID_SVXBMP_HLDOCNTP
+{
+ ImageBitmap = Bitmap { File = "hldocntp.bmp" ; };
+ MaskColor = Color { Red = 0xFFFF ; Green = 0xFFFF ; Blue = 0xFFFF ; };
+};
+
diff --git a/svx/source/dialog/hyphen.cxx b/svx/source/dialog/hyphen.cxx
new file mode 100644
index 000000000000..0179cf26948f
--- /dev/null
+++ b/svx/source/dialog/hyphen.cxx
@@ -0,0 +1,599 @@
+/*************************************************************************
+ *
+ * $RCSfile: hyphen.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:09 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+// include ---------------------------------------------------------------
+
+#ifndef _SHL_HXX
+#include <tools/shl.hxx>
+#endif
+
+#ifndef _LIST_HXX
+#include <tools/list.hxx>
+#endif
+
+#ifndef _COM_SUN_STAR_LINGUISTIC_XPOSSIBLEHYPHENSSUPPLIER_HPP_
+#include <com/sun/star/linguistic/XPossibleHyphensSupplier.hpp>
+#endif
+#ifndef _COM_SUN_STAR_LINGUISTIC_XPOSSIBLEHYPHENS_HPP_
+#include <com/sun/star/linguistic/XPossibleHyphens.hpp>
+#endif
+
+#ifndef _SV_MSGBOX_HXX
+#include <vcl/msgbox.hxx>
+#endif
+#pragma hdrstop
+
+#define _SVX_HYPHEN_CXX
+
+#include "dialogs.hrc"
+#include "hyphen.hrc"
+
+#include "svxenum.hxx"
+#include "hyphen.hxx"
+#include "splwrap.hxx"
+#include "dlgutil.hxx"
+#include "dialmgr.hxx"
+#ifndef _UNO_LINGU_HXX
+#include <unolingu.hxx>
+#endif
+#ifndef _USR_USTRING_HXX
+//#include <usr/ustring.hxx>
+#endif
+using namespace ::rtl;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::linguistic;
+
+#define S2U(s) StringToOUString(s, CHARSET_SYSTEM)
+#define U2S(s) OUStringToString(s, CHARSET_SYSTEM)
+
+// define ----------------------------------------------------------------
+
+#define HYPHHERE '-'
+#define CONTINUE_HYPH USHRT_MAX
+
+// Dies ist nur ein Hack, weil an dieser Stelle das extern char aus hmwrap
+// nicht bekannt ist, wird demnaechst in hmwrap durch ein define ersetzt.
+#define SW_SOFT_HYPHEN '='
+
+// class SvxHyphenEdit ---------------------------------------------------
+
+SvxHyphenEdit::SvxHyphenEdit( Window* pParent, const ResId& rResId ) :
+
+ Edit( pParent, rResId )
+{
+}
+
+// -----------------------------------------------------------------------
+
+void SvxHyphenEdit::KeyInput( const KeyEvent& rKEvt )
+{
+ sal_uInt16 nMod = rKEvt.GetKeyCode().GetModifier();
+ sal_uInt16 nCode = rKEvt.GetKeyCode().GetCode();
+
+ switch ( nCode )
+ {
+ case KEY_LEFT:
+ ( (SvxHyphenWordDialog*)GetParent() )->SelLeft();
+ break;
+
+ case KEY_RIGHT:
+ ( (SvxHyphenWordDialog*)GetParent() )->SelRight();
+ break;
+
+ case KEY_TAB:
+ case KEY_ESCAPE:
+ case KEY_RETURN:
+ Edit::KeyInput(rKEvt);
+ break;
+#ifdef MAC
+ case KEY_POINT:
+ // Command . abfangen
+ if ( nMod == KEY_MOD1 )
+ {
+ Edit::KeyInput( rKEvt );
+ break;
+ }
+ // kein break!
+#endif
+ default:
+ Control::KeyInput( rKEvt ); // An den Dialog weiterleiten
+ break;
+ }
+}
+
+// class SvxHyphenWordDialog ---------------------------------------------
+
+SvxHyphenWordDialog::SvxHyphenWordDialog( const String &rWord, LanguageType nLang,
+ Window* pParent,
+ Reference< XHyphenator > &xHyphen,
+ SvxSpellWrapper* pWrapper ) :
+ SfxModalDialog( pParent, SVX_RES( RID_SVXDLG_HYPHENATE ) ),
+
+ aWordEdit ( this, ResId( ED_WORD ) ),
+ aLeftBtn ( this, ResId( BTN_LEFT ) ),
+ aRightBtn ( this, ResId( BTN_RIGHT ) ),
+ aWordBox ( this, ResId( GB_WORD ) ),
+ aContBtn ( this, ResId( BTN_HYPH_CONTINUE ) ),
+ aDelBtn ( this, ResId( BTN_HYPH_DELETE ) ),
+ aOkBtn ( this, ResId( BTN_HYPH_CUT ) ),
+ aCancelBtn ( this, ResId( BTN_HYPH_CANCEL ) ),
+ aHelpBtn ( this, ResId( BTN_HYPH_HELP ) ),
+
+ pHyphWrapper ( pWrapper ),
+ xHyphenator ( xHyphen ),
+ aActWord ( rWord ),
+ nActLanguage ( nLang ),
+ aLabel ( GetText() ),
+ nHyphPos ( 0 ),
+ nOldPos ( 0 ),
+ bBusy ( sal_False )
+{
+ aContBtn.SetClickHdl(
+ LINK( this, SvxHyphenWordDialog, ContinueHdl_Impl ) );
+ aOkBtn.SetClickHdl( LINK( this, SvxHyphenWordDialog, CutHdl_Impl ) );
+ aDelBtn.SetClickHdl( LINK( this, SvxHyphenWordDialog, DeleteHdl_Impl ) );
+ aCancelBtn.SetClickHdl(
+ LINK( this, SvxHyphenWordDialog, CancelHdl_Impl ) );
+ aLeftBtn.SetClickHdl( LINK( this, SvxHyphenWordDialog, Left_Impl ) );
+ aRightBtn.SetClickHdl( LINK( this, SvxHyphenWordDialog, Right_Impl ) );
+
+ aWordEdit.SetGetFocusHdl(
+ LINK( this, SvxHyphenWordDialog, GetFocusHdl_Impl ) );
+
+ Reference< XHyphenatedWord > xHyphWord( pWrapper ?
+ pWrapper->GetLast() : Reference< XInterface > () , UNO_QUERY );
+ DBG_ASSERT(xHyphWord.is(), "missing hyphenated word");
+ nMaxHyphenationPos = xHyphWord.is() ? xHyphWord->getHyphenationPos() : 0;
+ SetLabel_Impl( nLang );
+
+ InitControls_Impl();
+ aWordEdit.GrabFocus();
+
+ FreeResource();
+
+ // disable controls if service is not available
+ if (!xHyphenator.is())
+ Enable( sal_False );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxHyphenWordDialog::SelLeft()
+{
+ String aTxt( aWordEdit.GetText() );
+
+ for ( xub_StrLen i = nOldPos + 1; i-- > 0 ; )
+ {
+ DBG_ASSERT(0 <= i && i <= aTxt.Len(), "index out of range");
+ if( aTxt.GetChar( i ) == sal_Unicode( SW_SOFT_HYPHEN ) )
+ {
+ aTxt.SetChar( i, sal_Unicode( HYPHHERE ) );
+
+ if ( nOldPos != 0 && nOldPos != aTxt.Len() )
+ aTxt.SetChar( nOldPos, sal_Unicode( SW_SOFT_HYPHEN ) );
+ nOldPos = i;
+ aWordEdit.SetText( aTxt );
+ aWordEdit.GrabFocus();
+ aWordEdit.SetSelection( Selection( i, i + 1 ) );
+ break;
+ }
+ }
+ nHyphPos = GetHyphIndex_Impl();
+ EnableLRBtn_Impl();
+ //EnableCutBtn_Impl();
+}
+
+// -----------------------------------------------------------------------
+
+void SvxHyphenWordDialog::SelRight()
+{
+ String aTxt( aWordEdit.GetText() );
+
+ for ( xub_StrLen i = nOldPos + 1; i < aTxt.Len(); ++i )
+ {
+ if( aTxt.GetChar( i ) == sal_Unicode( SW_SOFT_HYPHEN ) )
+ {
+ aTxt.SetChar( i, sal_Unicode( HYPHHERE ) );
+
+ if ( nOldPos != 0 && nOldPos != aTxt.Len() )
+ aTxt.SetChar( nOldPos, sal_Unicode( SW_SOFT_HYPHEN ) );
+ nOldPos = i;
+ aWordEdit.SetText( aTxt );
+ aWordEdit.GrabFocus();
+ aWordEdit.SetSelection( Selection( i, i + 1 ) );
+ break;
+ }
+ }
+ nHyphPos = GetHyphIndex_Impl();
+ EnableLRBtn_Impl();
+ //EnableCutBtn_Impl();
+}
+
+// -----------------------------------------------------------------------
+
+
+#ifdef NOT_YET
+// not used right no anymore
+void SvxHyphenWordDialog::EnableCutBtn_Impl()
+{
+ String aStr( aWordEdit.GetText() );
+
+ sal_Bool bEnable = sal_False;
+
+ if (xPossHyph.is() && aStr[nOldPos] == HYPHHERE)
+ {
+ if (nHyphPos - 1 <= nMaxHyphenationPos)
+ bEnable = sal_True;
+ }
+
+ aOkBtn.Enable( bEnable );
+}
+#endif
+// -----------------------------------------------------------------------
+
+void SvxHyphenWordDialog::EnableLRBtn_Impl()
+{
+ String aTxt( aWordEdit.GetText() );
+ xub_StrLen nLen = aTxt.Len();
+ xub_StrLen i;
+
+ aRightBtn.Disable();
+ for ( i = nOldPos + 2; i < nLen; ++i )
+ {
+ if ( aTxt.GetChar( i ) == sal_Unicode( SW_SOFT_HYPHEN ) )
+ {
+ aRightBtn.Enable();
+ break;
+ }
+ }
+
+ DBG_ASSERT(nOldPos < aTxt.Len(), "nOldPos out of range");
+ if (nOldPos >= aTxt.Len())
+ nOldPos = aTxt.Len() - 1;
+ aLeftBtn.Disable();
+ for ( i = nOldPos; i-- > 0; )
+ {
+ if ( aTxt.GetChar( i ) == sal_Unicode( SW_SOFT_HYPHEN ) )
+ {
+ aLeftBtn.Enable();
+ break;
+ }
+ }
+}
+
+// -----------------------------------------------------------------------
+
+
+void SvxHyphenWordDialog::SetLabel_Impl( LanguageType nLang )
+{
+ String aLangStr( ::GetLanguageString( nLang ) );
+ String aTmp( aLabel );
+ aTmp.AppendAscii( RTL_CONSTASCII_STRINGPARAM( " (" ) );
+ aTmp.Append( aLangStr );
+ aTmp.Append( sal_Unicode( ')' ) );
+ SetText( aTmp );
+}
+
+// -----------------------------------------------------------------------
+
+String SvxHyphenWordDialog::EraseUnusableHyphens_Impl(
+ Reference< XPossibleHyphens > &rxPossHyph,
+ sal_uInt16 nMaxHyphenationPos )
+{
+ // returns a String showing only those hyphen positions which will result
+ // in a line break if hyphenation is done there
+
+ String aTxt;
+ DBG_ASSERT(rxPossHyph.is(), "missing possible hyphens");
+ if (rxPossHyph.is())
+ {
+ aTxt = String( rxPossHyph->getPossibleHyphens() );
+
+ Sequence< sal_Int16 > aHyphenationPositions(
+ rxPossHyph->getOrigHyphensPositions() );
+ sal_Int32 nLen = aHyphenationPositions.getLength();
+ const sal_Int16 *pHyphenationPos = aHyphenationPositions.getConstArray();
+
+ // find position nIdx after which all hyphen positions are unusable
+ sal_Int32 nIdx = -1,
+ nPos;
+ if (nLen)
+ {
+ sal_Int32 nStart = 0;
+ for (sal_Int32 i = 0; i < nLen; ++i)
+ {
+ if (pHyphenationPos[i] > nMaxHyphenationPos)
+ break;
+ else
+ {
+ // find corresponding hyphen pos in string
+ nPos = aTxt.Search( sal_Unicode( SW_SOFT_HYPHEN ), nStart );
+
+ if (nStart == STRING_NOTFOUND)
+ break;
+ else
+ {
+ nIdx = nPos;
+ nStart = nPos + 1;
+ }
+ }
+ }
+ }
+ DBG_ASSERT(nIdx != -1, "no usable hyphenation position")
+
+ // remove not usable hyphens from string
+ nPos = nIdx == -1 ? 0 : nIdx + 1;
+ String aTmp( sal_Unicode( SW_SOFT_HYPHEN ) ),
+ aEmpty;
+ while (nPos != STRING_NOTFOUND)
+ nPos = aTxt.SearchAndReplace( aTmp, aEmpty, nPos + 1 );
+ }
+ return aTxt;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxHyphenWordDialog::InitControls_Impl()
+{
+ Reference< XPossibleHyphensSupplier > xSupp( xHyphenator, UNO_QUERY );
+
+ String aTxt;
+ xPossHyph = NULL;
+ if (xSupp.is())
+ {
+ lang::Locale aLocale( SvxCreateLocale(nActLanguage) );
+ xPossHyph = xSupp->createPossibleHyphens( aActWord, aLocale );
+ if (xPossHyph.is())
+ {
+ aTxt = EraseUnusableHyphens_Impl( xPossHyph, nMaxHyphenationPos );
+ }
+ SetLabel_Impl( nActLanguage );
+ }
+ aWordEdit.SetText( aTxt );
+
+ nOldPos = aTxt.Len();
+ SelLeft();
+ EnableLRBtn_Impl();
+}
+
+// -----------------------------------------------------------------------
+
+void SvxHyphenWordDialog::ContinueHyph_Impl( sal_uInt16 nInsPos )
+{
+ if ( nInsPos != CONTINUE_HYPH && xPossHyph.is())
+ {
+ if (nInsPos)
+ {
+ //String aTmp( U2S( xPossHyph->getPossibleHyphens() ) );
+ String aTmp( aWordEdit.GetText() );
+ DBG_ASSERT(nInsPos <= aTmp.Len() - 2, "wrong hyphen position");
+
+ sal_uInt16 nIdxPos = 0;
+ sal_uInt16 i = 0;
+ sal_Unicode c;
+ while (i < aTmp.Len() && HYPHHERE != (c = aTmp.GetChar(i++)) )
+ {
+ if (SW_SOFT_HYPHEN == c)
+ nIdxPos++;
+ }
+
+ Sequence< sal_Int16 > aSeq = xPossHyph->getOrigHyphensPositions();
+ sal_Int32 nLen = aSeq.getLength();
+ DBG_ASSERT(nLen, "empty sequence");
+ DBG_ASSERT(nIdxPos < nLen, "index out of range");
+ if (nLen && nIdxPos < nLen)
+ {
+ nInsPos = aSeq.getConstArray()[ nIdxPos ];
+ pHyphWrapper->InsertHyphen( nInsPos );
+ }
+ }
+ else
+ {
+ //! calling with 0 as argument will remove hyphens!
+ pHyphWrapper->InsertHyphen( nInsPos );
+ }
+ }
+
+ if ( pHyphWrapper->FindSpellError() )
+ {
+ Reference< XHyphenatedWord > xHyphWord( pHyphWrapper->GetLast(), UNO_QUERY );
+
+ // adapt actual word and language to new found hyphenation result
+ if(xHyphWord.is())
+ {
+ aActWord = String( xHyphWord->getWord() );
+ nActLanguage = SvxLocaleToLanguage( xHyphWord->getLocale() );
+ nMaxHyphenationPos = xHyphWord->getHyphenationPos();
+ InitControls_Impl();
+ }
+ }
+ else
+ EndDialog( RET_OK );
+}
+
+// -----------------------------------------------------------------------
+
+sal_uInt16 SvxHyphenWordDialog::GetHyphIndex_Impl()
+{
+ sal_uInt16 nPos = 0;
+ String aTxt(aWordEdit.GetText());
+
+ for ( sal_uInt16 i=0 ; i < aTxt.Len(); ++i )
+ {
+ sal_Unicode nChar = aTxt.GetChar( i );
+
+ if ( nChar == HYPHHERE )
+ break;
+
+ if ( nChar != SW_SOFT_HYPHEN )
+ nPos++;
+ }
+ return nPos;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK_INLINE_START( SvxHyphenWordDialog, CutHdl_Impl, Button *, EMPTYARG )
+{
+ if( !bBusy )
+ {
+ bBusy = sal_True;
+ ContinueHyph_Impl( nHyphPos );
+ bBusy = sal_False;
+ }
+ return 0;
+}
+IMPL_LINK_INLINE_END( SvxHyphenWordDialog, CutHdl_Impl, Button *, EMPTYARG )
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK_INLINE_START( SvxHyphenWordDialog, DeleteHdl_Impl, Button *, EMPTYARG )
+{
+ if( !bBusy )
+ {
+ bBusy = sal_True;
+ ContinueHyph_Impl();
+ bBusy = sal_False;
+ }
+ return 0;
+}
+IMPL_LINK_INLINE_END( SvxHyphenWordDialog, DeleteHdl_Impl, Button *, EMPTYARG )
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK_INLINE_START( SvxHyphenWordDialog, ContinueHdl_Impl, Button *, EMPTYARG )
+{
+ if( !bBusy )
+ {
+ bBusy = sal_True;
+ ContinueHyph_Impl( CONTINUE_HYPH );
+ bBusy = sal_False;
+ }
+ return 0;
+}
+IMPL_LINK_INLINE_END( SvxHyphenWordDialog, ContinueHdl_Impl, Button *, EMPTYARG )
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK_INLINE_START( SvxHyphenWordDialog, CancelHdl_Impl, Button *, EMPTYARG )
+{
+ if( !bBusy )
+ {
+ bBusy = sal_True;
+ pHyphWrapper->SpellEnd();
+ EndDialog( RET_CANCEL );
+ bBusy = sal_False;
+ }
+ return 0;
+}
+IMPL_LINK_INLINE_END( SvxHyphenWordDialog, CancelHdl_Impl, Button *, EMPTYARG )
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK_INLINE_START( SvxHyphenWordDialog, Left_Impl, Button *, EMPTYARG )
+{
+ if( !bBusy )
+ {
+ bBusy = sal_True;
+ SelLeft();
+ bBusy = sal_False;
+ }
+ return 0;
+}
+IMPL_LINK_INLINE_END( SvxHyphenWordDialog, Left_Impl, Button *, EMPTYARG )
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK_INLINE_START( SvxHyphenWordDialog, Right_Impl, Button *, EMPTYARG )
+{
+ if( !bBusy )
+ {
+ bBusy = sal_True;
+ SelRight();
+ bBusy = sal_False;
+ }
+ return 0;
+}
+IMPL_LINK_INLINE_END( SvxHyphenWordDialog, Right_Impl, Button *, EMPTYARG )
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK_INLINE_START( SvxHyphenWordDialog, GetFocusHdl_Impl, Edit *, EMPTYARG )
+{
+ aWordEdit.SetSelection( Selection( nOldPos, nOldPos + 1 ) );
+ return 0;
+}
+IMPL_LINK_INLINE_END( SvxHyphenWordDialog, GetFocusHdl_Impl, Edit *, EMPTYARG )
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxHyphenWordDialog, LangError_Impl, void *, nLang )
+{
+ // Status anzeigen
+ String aErr( ::GetLanguageString( (LanguageType)(sal_uInt32)nLang ) );
+ aErr += SVX_RESSTR( RID_SVXSTR_HMERR_CHECKINSTALL );
+ InfoBox( this, aErr ).Execute();
+ return 0;
+}
+
+
diff --git a/svx/source/dialog/hyphen.hrc b/svx/source/dialog/hyphen.hrc
new file mode 100644
index 000000000000..7af9d1d388f7
--- /dev/null
+++ b/svx/source/dialog/hyphen.hrc
@@ -0,0 +1,79 @@
+/*************************************************************************
+ *
+ * $RCSfile: hyphen.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:09 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SVX_HYPHEN_HRC
+#define _SVX_HYPHEN_HRC
+
+// defines ------------------------------------------------------------------
+
+#define ED_WORD 10
+#define BTN_LEFT 11
+#define BTN_RIGHT 12
+#define GB_WORD 13
+
+#define BTN_HYPH_CONTINUE 20
+#define BTN_HYPH_DELETE 21
+#define BTN_HYPH_CUT 22
+#define BTN_HYPH_CANCEL 23
+#define BTN_HYPH_HELP 24
+
+
+#endif
+
diff --git a/svx/source/dialog/hyphen.hxx b/svx/source/dialog/hyphen.hxx
new file mode 100644
index 000000000000..f0c81f96aaab
--- /dev/null
+++ b/svx/source/dialog/hyphen.hxx
@@ -0,0 +1,160 @@
+/*************************************************************************
+ *
+ * $RCSfile: hyphen.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:09 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SVX_HYPHEN_HXX
+#define _SVX_HYPHEN_HXX
+
+// include ---------------------------------------------------------------
+
+#ifndef _SV_EDIT_HXX
+#include <vcl/edit.hxx>
+#endif
+#ifndef _SV_BUTTON_HXX
+#include <vcl/button.hxx>
+#endif
+#ifndef _SV_GROUP_HXX
+#include <vcl/group.hxx>
+#endif
+#ifndef _BASEDLGS_HXX
+#include <sfx2/basedlgs.hxx>
+#endif
+
+#ifndef _COM_SUN_STAR_UNO_REFERENCE_HXX_
+#include <com/sun/star/uno/Reference.hxx>
+#endif
+// forward ---------------------------------------------------------------
+
+namespace com{namespace sun{namespace star{
+namespace linguistic{
+ class XHyphenator;
+ class XPossibleHyphens;
+ }}}}
+
+class SvxSpellWrapper;
+
+// class SvxHyphenEdit ---------------------------------------------------
+
+class SvxHyphenEdit : public Edit
+{
+public:
+ SvxHyphenEdit( Window* pParent, const ResId& rResId );
+
+protected:
+ virtual void KeyInput( const KeyEvent &rKEvt );
+};
+
+// class SvxHyphenWordDialog ---------------------------------------------
+
+class SvxHyphenWordDialog : public SfxModalDialog
+{
+public:
+ SvxHyphenWordDialog( const String &rWord, LanguageType nLang,
+ Window* pParent, ::com::sun::star::uno::Reference< ::com::sun::star::linguistic::XHyphenator > &xHyphen,
+ SvxSpellWrapper* pWrapper );
+
+ void SelLeft();
+ void SelRight();
+
+private:
+ SvxHyphenEdit aWordEdit;
+ ImageButton aLeftBtn;
+ ImageButton aRightBtn;
+ GroupBox aWordBox;
+ PushButton aContBtn;
+ PushButton aDelBtn;
+ OKButton aOkBtn;
+ CancelButton aCancelBtn;
+ HelpButton aHelpBtn;
+ String aLabel;
+ SvxSpellWrapper* pHyphWrapper;
+ ::com::sun::star::uno::Reference< ::com::sun::star::linguistic::XHyphenator > xHyphenator;
+ ::com::sun::star::uno::Reference< ::com::sun::star::linguistic::XPossibleHyphens > xPossHyph;
+ String aActWord; // actual (to be displayed) word
+ LanguageType nActLanguage; // and language
+ sal_uInt16 nMaxHyphenationPos; // right most valid hyphenation pos
+ sal_uInt16 nHyphPos;
+ sal_uInt16 nOldPos;
+ sal_Bool bBusy;
+
+#ifdef _SVX_HYPHEN_CXX
+ void EnableLRBtn_Impl();
+ //void EnableCutBtn_Impl();
+ void SetLabel_Impl( LanguageType nLang );
+ String EraseUnusableHyphens_Impl( ::com::sun::star::uno::Reference< ::com::sun::star::linguistic::XPossibleHyphens > &rxPossHyph,
+ sal_uInt16 nMaxHyphenationPos );
+
+ void InitControls_Impl();
+ void ContinueHyph_Impl( sal_uInt16 nInsPos = 0 );
+ sal_uInt16 GetHyphIndex_Impl();
+
+ DECL_LINK( CutHdl_Impl, Button* );
+ DECL_LINK( DeleteHdl_Impl, Button* );
+ DECL_LINK( ContinueHdl_Impl, Button* );
+ DECL_LINK( CancelHdl_Impl, Button* );
+ DECL_LINK( Left_Impl, Button* );
+ DECL_LINK( Right_Impl, Button* );
+ DECL_LINK( GetFocusHdl_Impl, Edit* );
+ DECL_LINK( LangError_Impl, void* );
+#endif
+};
+
+
+#endif
+
diff --git a/svx/source/dialog/hyphen.src b/svx/source/dialog/hyphen.src
new file mode 100644
index 000000000000..ff14ac6afb98
--- /dev/null
+++ b/svx/source/dialog/hyphen.src
@@ -0,0 +1,248 @@
+/*************************************************************************
+ *
+ * $RCSfile: hyphen.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:09 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+ // include ---------------------------------------------------------------
+#include "helpid.hrc"
+#include "dialogs.hrc"
+#include "hyphen.hrc"
+ // pragma ----------------------------------------------------------------
+
+ // RID_SVXDLG_HYPHENATE --------------------------------------------------
+ModalDialog RID_SVXDLG_HYPHENATE
+{
+ HelpId = HID_HYPHENATE ;
+ Size = MAP_APPFONT ( 245 , 63 ) ;
+ OutputSize = TRUE ;
+ SvLook = TRUE ;
+ Text = "Silbentrennung" ;
+ Text [ English ] = "Hypenation" ;
+ Text [ norwegian ] = "Hypenation" ;
+ Text [ italian ] = "Sillabazione" ;
+ Text [ portuguese_brazilian ] = "Hifenao" ;
+ Text [ portuguese ] = "Diviso silbica" ;
+ Text [ finnish ] = "Tavutus" ;
+ Text [ danish ] = "Orddeling" ;
+ Text [ french ] = "Coupure de mots" ;
+ Text [ swedish ] = "Avstavning" ;
+ Text [ dutch ] = "Woordafbreking" ;
+ Text [ spanish ] = "Separacin silbica" ;
+ Text [ english_us ] = "Hyphenation" ;
+ Moveable = TRUE ;
+ Edit ED_WORD
+ {
+ BORDER = TRUE ;
+ Pos = MAP_APPFONT ( 12 , 16 ) ;
+ Size = MAP_APPFONT ( 109 , 12 ) ;
+ TABSTOP = TRUE ;
+ LEFT = TRUE ;
+ };
+ ImageButton BTN_LEFT
+ {
+ Pos = MAP_APPFONT ( 47 , 35 ) ;
+ Size = MAP_APPFONT ( 14 , 14 ) ;
+ TABSTOP = TRUE ;
+ SYMBOL = IMAGEBUTTON_ARROW_LEFT ;
+ };
+ ImageButton BTN_RIGHT
+ {
+ Pos = MAP_APPFONT ( 72 , 35 ) ;
+ Size = MAP_APPFONT ( 14 , 14 ) ;
+ TABSTOP = TRUE ;
+ Symbol = IMAGEBUTTON_ARROW_RIGHT ;
+ };
+ GroupBox GB_WORD
+ {
+ SVLOOK = TRUE ;
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 121 , 51 ) ;
+ TEXT = "Wort" ;
+ TEXT [ English ] = "Word" ;
+ TEXT [ norwegian ] = "Word" ;
+ TEXT [ italian ] = "Parola" ;
+ TEXT [ portuguese_brazilian ] = "Palavra" ;
+ TEXT [ portuguese ] = "Palavra" ;
+ TEXT [ finnish ] = "Sana" ;
+ TEXT [ danish ] = "Ord" ;
+ TEXT [ french ] = "Mot" ;
+ TEXT [ swedish ] = "Ord" ;
+ TEXT [ dutch ] = "Woord" ;
+ TEXT [ spanish ] = "Palabra" ;
+ TEXT [ english_us ] = "Word" ;
+ TEXT[ chinese_simplified ] = "";
+ TEXT[ russian ] = "";
+ TEXT[ polish ] = "Sowo";
+ TEXT[ japanese ] = "P";
+ TEXT[ chinese_traditional ] = "r";
+ TEXT[ arabic ] = "";
+ TEXT[ greek ] = "";
+ TEXT[ korean ] = "ܾ";
+ TEXT[ turkish ] = "Szck";
+ TEXT[ language_user1 ] = " ";
+ };
+ PushButton BTN_HYPH_CONTINUE
+ {
+ Pos = MAP_APPFONT ( 133 , 6 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TEXT = "~Weiter" ;
+ TEXT [ English ] = "~Continue" ;
+ TEXT [ english_us ] = "~Next" ;
+ TABSTOP = TRUE ;
+ Text [ dutch ] = "~Verder" ;
+ Text [ italian ] = "Avanti" ;
+ Text [ spanish ] = "~Siguiente" ;
+ Text [ french ] = "~Suivant" ;
+ Text [ swedish ] = "~Nsta" ;
+ Text [ danish ] = "Nste" ;
+ Text [ portuguese ] = "~Continuar" ;
+ Text [ portuguese_brazilian ] = "~Weiter" ;
+ Text[ chinese_simplified ] = "(~N)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Dalej";
+ Text[ japanese ] = "(~N)";
+ Text[ chinese_traditional ] = "~(~N)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "(~N)";
+ Text[ turkish ] = "~Sonraki";
+ Text[ language_user1 ] = " ";
+ };
+ PushButton BTN_HYPH_DELETE
+ {
+ Pos = MAP_APPFONT ( 133 , 23 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TEXT = "~Entfernen" ;
+ TEXT [ English ] = "~Erase" ;
+ TEXT [ norwegian ] = "~Erase" ;
+ TEXT [ italian ] = "~Rimuovi" ;
+ TEXT [ portuguese_brazilian ] = "~Apagar" ;
+ TEXT [ portuguese ] = "~Remover" ;
+ TEXT [ finnish ] = "~Poista" ;
+ TEXT [ danish ] = "Slet" ;
+ TEXT [ french ] = "~Supprimer" ;
+ TEXT [ swedish ] = "Ta ~bort" ;
+ TEXT [ dutch ] = "Ver~wijderen" ;
+ TEXT [ spanish ] = "~Eliminar" ;
+ TEXT [ english_us ] = "~Remove" ;
+ TABSTOP = TRUE ;
+ TEXT[ chinese_simplified ] = "ɾ(~R)";
+ TEXT[ russian ] = "";
+ TEXT[ polish ] = "Usu";
+ TEXT[ japanese ] = "폜(~R)";
+ TEXT[ chinese_traditional ] = "R(~R)";
+ TEXT[ arabic ] = "";
+ TEXT[ greek ] = "";
+ TEXT[ korean ] = "(~R)";
+ TEXT[ turkish ] = "~Kaldr";
+ TEXT[ language_user1 ] = " ";
+ };
+ OKButton BTN_HYPH_CUT
+ {
+ Pos = MAP_APPFONT ( 189 , 6 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TEXT = "~Trennen" ;
+ TEXT [ English ] = "Hyphe~nate" ;
+ TEXT [ norwegian ] = "Hyphe~nate" ;
+ TEXT [ italian ] = "Si~llabazione" ;
+ TEXT [ portuguese_brazilian ] = "Hife~nar" ;
+ TEXT [ portuguese ] = "~Separar" ;
+ TEXT [ finnish ] = "~Tavuta" ;
+ TEXT [ danish ] = "Del ord" ;
+ TEXT [ french ] = "~Couper" ;
+ TEXT [ swedish ] = "A~vstava" ;
+ TEXT [ dutch ] = "~Afbreken" ;
+ TEXT [ spanish ] = "~Dividir" ;
+ TEXT [ english_us ] = "~Hyphenate" ;
+ TABSTOP = TRUE ;
+ DEFBUTTON = TRUE ;
+ TEXT[ chinese_simplified ] = "ַ(~H)";
+ TEXT[ russian ] = "";
+ TEXT[ polish ] = "Podziel";
+ TEXT[ japanese ] = "ʲȰ(~H)";
+ TEXT[ chinese_traditional ] = "sr(~H)";
+ TEXT[ arabic ] = " ";
+ TEXT[ greek ] = "";
+ TEXT[ korean ] = " ֱ(~H)";
+ TEXT[ turkish ] = "~Ayr";
+ TEXT[ language_user1 ] = " ";
+ };
+ CancelButton BTN_HYPH_CANCEL
+ {
+ Pos = MAP_APPFONT ( 189 , 23 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TABSTOP = TRUE ;
+ };
+ HelpButton BTN_HYPH_HELP
+ {
+ Pos = MAP_APPFONT ( 189 , 43 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ TABSTOP = TRUE ;
+ };
+ Text[ chinese_simplified ] = "ַ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Dzielenie wyrazw";
+ Text[ japanese ] = "ʲȰ";
+ Text[ chinese_traditional ] = "sr";
+ Text[ arabic ] = " ";
+ Text[ greek ] = "";
+ Text[ korean ] = " ֱ";
+ Text[ turkish ] = "Heceleme";
+ Text[ language_user1 ] = " ";
+};
+ // ******************************************************************* EOF
diff --git a/svx/source/dialog/hyprlink.hrc b/svx/source/dialog/hyprlink.hrc
new file mode 100644
index 000000000000..8844119ca8c6
--- /dev/null
+++ b/svx/source/dialog/hyprlink.hrc
@@ -0,0 +1,78 @@
+/*************************************************************************
+ *
+ * $RCSfile: hyprlink.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:09 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SVX_HYPERLINK_HRC
+#define _SVX_HYPERLINK_HRC
+
+#include <dialogs.hrc>
+
+// defines ------------------------------------------------------------------
+
+#define CB_NAME 1
+#define FT_URL 2
+#define CB_URL 3
+#define BTN_LINK 4
+#define BTN_INSERT_BOOKMARK 5
+#define BTN_INET_SEARCH 6
+#define TB 7
+#define MN_FIELD 8
+#define MN_BUTTON 9
+
+#endif
diff --git a/svx/source/dialog/hyprlink.src b/svx/source/dialog/hyprlink.src
new file mode 100644
index 000000000000..af44c93fcf9e
--- /dev/null
+++ b/svx/source/dialog/hyprlink.src
@@ -0,0 +1,390 @@
+/*************************************************************************
+ *
+ * $RCSfile: hyprlink.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:09 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+ // include ------------------------------------------------------------------
+#include "dialogs.hrc"
+#include "helpid.hrc"
+#include "hyprlink.hrc"
+ // pragma -------------------------------------------------------------------
+
+ // RID_SVXDLG_HYPERLINK ------------------------------------------------------
+DockingWindow RID_SVXDLG_HYPERLINK
+{
+ OutputSize = TRUE ;
+ Dockable = TRUE ;
+ Closeable = TRUE ;
+ Sizeable = TRUE ;
+ EnableResizing = TRUE ;
+ SVLook = TRUE ;
+ Moveable = TRUE ;
+ Size = MAP_APPFONT ( 370 , 17 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? Hyperlink einfgen : Hyperlink einfgen */
+ /* ### ACHTUNG: Neuer Text in Resource? Hyperlink einfgen : Hyperlink einfgen */
+ Text = "Hyperlink einfgen" ;
+ Text [ ENGLISH ] = "Insert Hyperlink" ;
+ ComboBox CB_NAME
+ {
+ Pos = MAP_APPFONT ( 2 , 2 ) ;
+ Size = MAP_APPFONT ( 100 , 60 ) ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+ AutoSize = TRUE ;
+ AutoHScroll = TRUE ;
+ QuickHelpText = "Name der URL" ;
+ QuickHelpText [ English ] = "URL name" ;
+ QuickHelpText [ english_us ] = "URL Name" ;
+ QuickHelpText [ italian ] = "Nome di URL" ;
+ QuickHelpText [ spanish ] = "Nombre del URL" ;
+ QuickHelpText [ french ] = "Nom de l'URL" ;
+ QuickHelpText [ dutch ] = "URL-naam" ;
+ QuickHelpText [ portuguese_brazilian ] = "Name der URL" ;
+ QuickHelpText [ portuguese ] = "Nome do URL" ;
+ QuickHelpText [ swedish ] = "URL-namn" ;
+ QuickHelpText[ russian ] = " URL";
+ QuickHelpText[ danish ] = "URL navn";
+ QuickHelpText[ polish ] = "Nazwa URL";
+ QuickHelpText[ japanese ] = "URL̖O";
+ QuickHelpText[ chinese_simplified ] = "URL ";
+ QuickHelpText[ chinese_traditional ] = "URL W";
+ QuickHelpText[ arabic ] = "URL ";
+ QuickHelpText[ greek ] = " URL";
+ QuickHelpText[ korean ] = "URL Name";
+ QuickHelpText[ language_user1 ] = " ";
+ };
+ FixedText FT_URL
+ {
+ Pos = MAP_APPFONT ( 105 , 4 ) ;
+ Size = MAP_APPFONT ( 16 , 10 ) ;
+ Text = "URL:" ;
+ Text [ ENGLISH ] = "URL:" ;
+ Text [ dutch ] = "URL:" ;
+ Text [ english_us ] = "URL:" ;
+ Text [ italian ] = "URL:" ;
+ Text [ spanish ] = "URL:" ;
+ Text [ french ] = "URL :" ;
+ Text [ swedish ] = "URL:" ;
+ Text [ danish ] = "URL:" ;
+ Text [ portuguese ] = "URL:" ;
+ Text [ portuguese_brazilian ] = "URL:" ;
+ Text[ chinese_simplified ] = "URL:";
+ Text[ russian ] = "URL:";
+ Text[ polish ] = "URL:";
+ Text[ japanese ] = "URL:";
+ Text[ chinese_traditional ] = "URL:";
+ Text[ arabic ] = ":URL";
+ Text[ greek ] = "URL:";
+ Text[ korean ] = "URL:";
+ Text[ turkish ] = "URL:";
+ Text[ language_user1 ] = " ";
+ };
+ ComboBox CB_URL
+ {
+ Pos = MAP_APPFONT ( 121 , 2 ) ;
+ Size = MAP_APPFONT ( 204 , 60 ) ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+ AutoSize = TRUE ;
+ AutoHScroll = TRUE ;
+ /* ### ACHTUNG: Neuer Text in Resource? Sammelbox fr Internet-URLs : Sammelbox fr Internet-URLs */
+ /* ### ACHTUNG: Neuer Text in Resource? Sammelbox fr Internet-URLs : Sammelbox fr Internet-URLs */
+ QuickHelpText = "Sammelbox fr Internet-URLs" ;
+ QuickHelpText [ English ] = "Internet URLs" ;
+ QuickHelpText [ dutch ] = "Verzamelbox voor Internet-URLs" ;
+ QuickHelpText [ english_us ] = "Internet URLs" ;
+ QuickHelpText [ italian ] = "Casella di raccolta per gli URL di Internet" ;
+ QuickHelpText [ spanish ] = "URLs de Internet" ;
+ QuickHelpText [ french ] = "Bote centrale pour les URLs d'Internet" ;
+ QuickHelpText [ portuguese_brazilian ] = "Sammelbox fr Internet-URLs" ;
+ QuickHelpText [ portuguese ] = "Caixa para URLs da Internet" ;
+ QuickHelpText [ swedish ] = "Samlingsbox till webbadresser" ;
+ QuickHelpText[ russian ] = " URL ";
+ QuickHelpText[ danish ] = "Samleboks til Internet URL";
+ QuickHelpText[ polish ] = "Skrzynka zbiorcza dla URL Internetu";
+ QuickHelpText[ japanese ] = "ȯURL̎Wޯ";
+ QuickHelpText[ chinese_simplified ] = "ʻ URL ַ";
+ QuickHelpText[ chinese_traditional ] = "Internet URL }C";
+ QuickHelpText[ arabic ] = " URLs ";
+ QuickHelpText[ greek ] = " URL Internet";
+ QuickHelpText[ korean ] = "Internet URLs";
+ QuickHelpText[ language_user1 ] = " ";
+ };
+ ToolBox TB
+ {
+ Pos = MAP_PIXEL ( 328 , 2 ) ;
+ Size = MAP_PIXEL ( 39 , 13 ) ;
+ ItemList =
+ {
+ ToolBoxItem
+ {
+ Identifier = BTN_LINK ;
+ ItemBitmap = Bitmap { File = "link.bmp" ; };
+ Disable = TRUE ;
+ Text = "Link" ;
+ Text [ English ] = "Link" ;
+ Text [ dutch ] = "Link" ;
+ Text [ english_us ] = "Hyperlink" ;
+ Text [ italian ] = "Link" ;
+ Text [ spanish ] = "Hiperenlace" ;
+ Text [ french ] = "Lien" ;
+ Text [ swedish ] = "Lnk" ;
+ Text [ danish ] = "Kde" ;
+ Text [ portuguese ] = "Hiperligao" ;
+ Text [ portuguese_brazilian ] = "Link" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "cze";
+ Text[ japanese ] = "ݸ";
+ Text[ chinese_traditional ] = "Ws";
+ Text[ arabic ] = "";
+ Text[ language_user1 ] = " ";
+ Text[ greek ] = "-";
+ Text[ korean ] = "۸ũ";
+ Text[ turkish ] = "Hyperlink";
+ };
+ ToolBoxItem
+ {
+ Identifier = BTN_INSERT_BOOKMARK ;
+ ItemBitmap = Bitmap { File = "addbookm.bmp" ; };
+ Disable = TRUE ;
+ Text = "Bookmark" ;
+ Text [ English ] = "Bookmark" ;
+ Text [ dutch ] = "Bookmark" ;
+ Text [ english_us ] = "Bookmark" ;
+ Text [ italian ] = "Bookmark" ;
+ Text [ spanish ] = "Marcador" ;
+ Text [ french ] = "Bookmark" ;
+ Text [ swedish ] = "Bokmrke" ;
+ Text [ danish ] = "Bogmrke" ;
+ Text [ portuguese ] = "Marcador" ;
+ Text [ portuguese_brazilian ] = "Bookmark" ;
+ Text[ chinese_simplified ] = "ǩ";
+ Text[ russian ] = "";
+ Text[ polish ] = "Zakadka";
+ Text[ japanese ] = "ޯϰ";
+ Text[ chinese_traditional ] = "";
+ Text[ arabic ] = " ";
+ Text[ greek ] = "";
+ Text[ korean ] = "å ";
+ Text[ turkish ] = "Yer iareti";
+ Text[ language_user1 ] = " ";
+ };
+ ToolBoxItem
+ {
+ Identifier = BTN_INET_SEARCH ;
+ ItemBitmap = Bitmap { File = "find.bmp" ; };
+ Disable = TRUE ;
+ Text = "Search" ;
+ Text [ English ] = "Search" ;
+ Text [ dutch ] = "Zoeken" ;
+ Text [ english_us ] = "Search" ;
+ Text [ italian ] = "Cerca" ;
+ Text [ spanish ] = "Buscar" ;
+ Text [ french ] = "Rechercher" ;
+ Text [ swedish ] = "Sk" ;
+ Text [ danish ] = "Sg" ;
+ Text [ portuguese ] = "Localizar" ;
+ Text [ portuguese_brazilian ] = "Search" ;
+ Text[ chinese_simplified ] = "Ѱ";
+ Text[ russian ] = "";
+ Text[ polish ] = "Szukaj";
+ Text[ japanese ] = "";
+ Text[ chinese_traditional ] = "M";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "˻";
+ Text[ turkish ] = "Ara";
+ Text[ language_user1 ] = " ";
+ };
+ };
+ };
+ Text [ english_us ] = "Insert Hyperlink" ;
+ Text [ italian ] = "Aggiungi Hyperlink" ;
+ Text [ spanish ] = "Insertar hiperenlace" ;
+ Text [ french ] = "Insrer un hyperlien" ;
+ Text [ dutch ] = "Hyperlink invoegen" ;
+ Text [ swedish ] = "Infoga hyperlnk" ;
+ Text [ danish ] = "Indst hyperlink" ;
+ Text [ portuguese_brazilian ] = "Hyperlink einfgen" ;
+ Text [ portuguese ] = "Inserir hiperligao" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Wstaw hipercze";
+ Text[ japanese ] = "ʲ߰ݸ̑}";
+ Text[ chinese_traditional ] = "sWWs";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " -";
+ Text[ korean ] = "۸ũ ";
+ Text[ turkish ] = "Hyperlink ekle";
+ Text[ language_user1 ] = " ";
+};
+ // PopupMenu -------------------------------------------------------------
+Menu RID_SVXMN_HYPERLINK
+{
+ ItemList =
+ {
+ MenuItem
+ {
+ Identifier = MN_FIELD ;
+ Text = "Als ~Text" ;
+ Text [ ENGLISH ] = "As ~text" ;
+ Text [ dutch ] = "Als ~tekst" ;
+ Text [ english_us ] = "As Text" ;
+ Text [ italian ] = "Come ~testo" ;
+ Text [ spanish ] = "Como ~texto" ;
+ Text [ french ] = "Comme ~texte" ;
+ Text [ swedish ] = "Som ~text" ;
+ Text [ danish ] = "Som tekst" ;
+ Text [ portuguese_brazilian ] = "Als ~Text" ;
+ Text [ portuguese ] = "Como ~texto" ;
+ Text[ chinese_simplified ] = "ı";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Jako tekst";
+ Text[ japanese ] = "÷ĂƂ";
+ Text[ chinese_traditional ] = "@r";
+ Text[ arabic ] = "";
+ Text[ greek ] = " ~";
+ Text[ korean ] = "ؽƮ";
+ Text[ turkish ] = "Metin olarak";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Identifier = MN_BUTTON ;
+ Text = "Als ~Button" ;
+ Text [ English ] = "As ~button" ;
+ Text [ dutch ] = "Als ~button" ;
+ Text [ english_us ] = "As ~Button" ;
+ Text [ italian ] = "Come ~pulsante" ;
+ Text [ spanish ] = "Como ~botn" ;
+ Text [ french ] = "Comme bouton" ;
+ Text [ swedish ] = "Som ~knapp" ;
+ Text [ danish ] = "Som knap" ;
+ Text [ portuguese ] = "Como ~boto" ;
+ Text [ portuguese_brazilian ] = "Als ~Button" ;
+ Text[ russian ] = " ";
+ Text[ polish ] = "Jako klawisz";
+ Text[ japanese ] = "݂Ƃ(~B)";
+ Text[ chinese_simplified ] = "ť(~B)";
+ Text[ chinese_traditional ] = "@s(~B)";
+ Text[ arabic ] = "";
+ Text[ greek ] = " ~ ";
+ Text[ korean ] = "ư(~B)";
+ Text[ turkish ] = "Dme olarak";
+ Text[ language_user1 ] = " ";
+ };
+ };
+};
+ // Strings ---------------------------------------------------------------
+QueryBox RID_SVXQB_NOCONNECT
+{
+ BUTTONS = WB_YES_NO_CANCEL ;
+ DEFBUTTON = WB_DEF_NO ;
+ /* ### ACHTUNG: Neuer Text in Resource? Die URL kann erst nach Aufbau einer Verbindung geprft werden.\nSoll die Verbindung aufgebaut werden? : Die URL kann erst nach Aufbau einer Verbindung geprft werden.\nSoll die Verbindung aufgebaut werden? */
+ /* ### ACHTUNG: Neuer Text in Resource? Die URL kann erst nach Aufbau einer Verbindung geprft werden.\nSoll die Verbindung aufgebaut werden? : Die URL kann erst nach Aufbau einer Verbindung geprft werden.\nSoll die Verbindung aufgebaut werden? */
+ MESSAGE = "Die URL kann erst nach Aufbau einer Verbindung geprft werden.\nSoll die Verbindung aufgebaut werden?" ;
+ MESSAGE [ English ] = "???" ;
+ Message [ english_us ] = "This URL can only be proofed after a connection has been made. Establish connection?" ;
+ Message [ italian ] = "L'URL pu essere verificato solo dopo una connessione.\nVolete effettuare la connessione?" ;
+ Message [ spanish ] = "La URL solo puede ser verificada despus de haberse establecido una conexin.\nDesea establecer la conexin?" ;
+ Message [ french ] = "L'URL ne peut tre vrifi qu'aprs connexion.\n Voulez-vous tablir la connexion?" ;
+ Message [ dutch ] = "Deze URL kan pas na het tot stand brengen van een verbinding getest worden.\nWilt u de verbinding tot stand brengen?" ;
+ Message [ swedish ] = "Denna URL kan frst prvas nr en frbindelse har upprttats.\nSka en frbindelse upprttas?" ;
+ Message [ danish ] = "URL kan frst testes nr en forbindelse er blevet oprettet.\nSkal der oprettes en forbindelse?" ;
+ Message [ portuguese_brazilian ] = "Die URL kann erst nach Aufbau einer Verbindung geprft werden.\nSoll die Verbindung aufgebaut werden?" ;
+ Message [ portuguese ] = "O URL pode apenas ser verificado depois de efectuar uma ligao.\nDeseja inici-la?" ;
+ Message[ chinese_simplified ] = "ֻڽӺȷ URL Ƿȷ\nҪڽ";
+ Message[ russian ] = " URL .n ?";
+ Message[ polish ] = "URL moe zosta sprawdzony dopiero po ustanowieniu poczenia.\nCzy utworzy poczenie?";
+ Message[ japanese ] = "URL͐ڑݒɂýĂł܂B\nڑݒ肵܂?";
+ Message[ chinese_traditional ] = "ubإ߳su~Two URL O_TC\nzn{bsu InternetS";
+ Message[ arabic ] = " (URL) .\n ";
+ Message[ greek ] = " URL .\n ;";
+ Message[ korean ] = " URL ̷ Ŀ ȿ ֽϴ. ðڽϱ?";
+ Message[ turkish ] = "Bu URL balant kurulduktan sonra kontrol edilebilir.\nBalant kurulsun mu?";
+ Message[ language_user1 ] = " ";
+};
+QueryBox RID_SVXQB_DONTEXIST
+{
+ BUTTONS = WB_YES_NO ;
+ DEFBUTTON = WB_DEF_YES ;
+ /* ### ACHTUNG: Neuer Text in Resource? Die URL existiert nicht.\nSoll sie trotzdem eingefgt werden? : Die URL existiert nicht.\nSoll sie trotzdem eingefgt werden? */
+ /* ### ACHTUNG: Neuer Text in Resource? Die URL existiert nicht.\nSoll sie trotzdem eingefgt werden? : Die URL existiert nicht.\nSoll sie trotzdem eingefgt werden? */
+ MESSAGE = "Die URL existiert nicht.\nSoll sie trotzdem eingefgt werden?" ;
+ MESSAGE [ English ] = "???" ;
+ Message [ dutch ] = "URL bestaat niet.\nToch invoegen?" ;
+ Message [ english_us ] = "This URL does not exist. Insert anyway?" ;
+ Message [ italian ] = "L'URL non esiste.\nVolete inserirlo lo stesso?" ;
+ Message [ spanish ] = "La URL no existe.\nDesea insertarla de todas formas?" ;
+ Message [ french ] = "L'URL n'existe pas.\nVoulez-vous l'insrer tout de mme ?" ;
+ Message [ swedish ] = "Denna URL existerar inte.\nSka den infogas nd?" ;
+ Message [ danish ] = "URL eksisterer ikke.\nSkal den tilfjes alligevel?" ;
+ Message [ portuguese_brazilian ] = "Die URL existiert nicht.\nSoll sie trotzdem eingefgt werden?" ;
+ Message [ portuguese ] = "O URL no existe.\nDeseja inseri-lo?" ;
+ Message[ chinese_simplified ] = " URL ڡ\nҪ";
+ Message[ russian ] = " URL .\n ?";
+ Message[ polish ] = "URL nie istnieje.\nCzy ma on zosta mimo to wstawiony?";
+ Message[ japanese ] = "URL݂͑܂B\nł}܂?";
+ Message[ chinese_traditional ] = "o URL sbC\nz٬On[JS";
+ Message[ arabic ] = " URL .\n ߿";
+ Message[ greek ] = " URL .\n ;";
+ Message[ korean ] = " URL ʽϴ.׷ Ͻðڽϱ?";
+ Message[ turkish ] = "Bu URL mevcut deil.\nYine de URL'yi eklemek istiyor musunuz?";
+ Message[ language_user1 ] = " ";
+};
diff --git a/svx/source/dialog/iconcdlg.cxx b/svx/source/dialog/iconcdlg.cxx
new file mode 100644
index 000000000000..9ce2c0fda91f
--- /dev/null
+++ b/svx/source/dialog/iconcdlg.cxx
@@ -0,0 +1,1446 @@
+/*************************************************************************
+ *
+ * $RCSfile: iconcdlg.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:09 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _SFXAPP_HXX
+#include <sfx2/app.hxx>
+#endif
+#ifndef _SFX_HELP_HXX
+#include <sfx2/sfxhelp.hxx>
+#endif
+
+#ifndef _TOOLS_RC_H
+#include <tools/rc.h>
+#endif
+
+#ifndef _SFXINIMGR_HXX
+#include <svtools/iniman.hxx>
+#endif
+
+#define _SVSTDARR_USHORTS
+#include <svtools/svstdarr.hxx>
+
+#ifndef _SVX_DIALMGR_HXX
+#include "dialmgr.hxx"
+#endif
+
+#include "iconcdlg.hxx"
+
+#ifndef _SVX_HELPID_HRC
+#include "helpid.hrc"
+#endif
+#ifndef _SVX_DIALOGS_HRC
+#include "dialogs.hrc"
+#endif
+
+#ifdef WNT
+int __cdecl IconcDlgCmpUS_Impl( const void* p1, const void* p2 )
+#else
+#if defined(OS2) && defined(ICC)
+int _Optlink IconcDlgCmpUS_Impl( const void* p1, const void* p2 )
+#else
+int IconcDlgCmpUS_Impl( const void* p1, const void* p2 )
+#endif
+#endif
+{
+ return *(USHORT*)p1 - *(USHORT*)p2;
+}
+
+//#####################################################################
+//
+// Class IconChoicePage
+//
+//#####################################################################
+
+/**********************************************************************
+|
+| Ctor / Dtor
+|
+\**********************************************************************/
+
+IconChoicePage::IconChoicePage( Window *pParent, const ResId &rResId,
+ const SfxItemSet &rAttrSet )
+: TabPage ( pParent, rResId ),
+ pSet ( &rAttrSet ),
+ bHasExchangeSupport ( FALSE ),
+ pDialog ( NULL ),
+ bStandard ( FALSE )
+{
+ SetStyle ( GetStyle() | WB_DIALOGCONTROL | WB_HIDE );
+}
+
+// -----------------------------------------------------------------------
+
+IconChoicePage::~IconChoicePage()
+{
+}
+
+/**********************************************************************
+|
+| Activate / Deaktivate
+|
+\**********************************************************************/
+
+void IconChoicePage::ActivatePage( const SfxItemSet& )
+{
+}
+
+// -----------------------------------------------------------------------
+
+int IconChoicePage::DeactivatePage( SfxItemSet* )
+{
+ return LEAVE_PAGE;
+}
+
+/**********************************************************************
+|
+| ...
+|
+\**********************************************************************/
+
+void IconChoicePage::FillUserData()
+{
+}
+
+// -----------------------------------------------------------------------
+
+BOOL IconChoicePage::IsReadOnly() const
+{
+ return FALSE;
+}
+
+/**********************************************************************
+|
+| handling itemsets
+|
+\**********************************************************************/
+
+const SfxPoolItem* IconChoicePage::GetItem( const SfxItemSet& rSet,
+ USHORT nSlot )
+{
+ const SfxItemPool* pPool = rSet.GetPool();
+ USHORT nWh = pPool->GetWhich( nSlot );
+ const SfxPoolItem* pItem = 0;
+ SfxItemState eState = rSet.GetItemState( nWh, TRUE, &pItem );
+
+ if ( !pItem && nWh != nSlot )
+ pItem = &pPool->GetDefaultItem( nWh );
+
+ return pItem;
+}
+
+// -----------------------------------------------------------------------
+
+const SfxPoolItem* IconChoicePage::GetOldItem( const SfxItemSet& rSet,
+ USHORT nSlot )
+{
+ const SfxItemSet& rOldSet = GetItemSet();
+ USHORT nWh = GetWhich( nSlot );
+ const SfxPoolItem* pItem = 0;
+
+ if ( bStandard && rOldSet.GetParent() )
+ pItem = GetItem( *rOldSet.GetParent(), nSlot );
+ else if ( rSet.GetParent() && SFX_ITEM_DONTCARE == rSet.GetItemState( nWh ) )
+ pItem = GetItem( *rSet.GetParent(), nSlot );
+ else
+ pItem = GetItem( rOldSet, nSlot );
+
+ return pItem;
+}
+
+// -----------------------------------------------------------------------
+
+const SfxPoolItem* IconChoicePage::GetExchangeItem( const SfxItemSet& rSet,
+ USHORT nSlot )
+{
+ if ( pDialog && !pDialog->IsInOK() && pDialog->GetExampleSet() )
+ return GetItem( *pDialog->GetExampleSet(), nSlot );
+ else
+ return GetOldItem( rSet, nSlot );
+}
+
+/**********************************************************************
+|
+| window-methods
+|
+\**********************************************************************/
+
+void IconChoicePage::ImplInitSettings()
+{
+ Window* pParent = GetParent();
+ if ( pParent->IsChildTransparentModeEnabled() && !IsControlBackground() )
+ {
+ EnableChildTransparentMode( TRUE );
+ SetParentClipMode( PARENTCLIPMODE_NOCLIP );
+ SetPaintTransparent( TRUE );
+ SetBackground();
+ }
+ else
+ {
+ EnableChildTransparentMode( FALSE );
+ SetParentClipMode( 0 );
+ SetPaintTransparent( FALSE );
+
+ if ( IsControlBackground() )
+ SetBackground( GetControlBackground() );
+ else
+ SetBackground( pParent->GetBackground() );
+ }
+}
+
+// -----------------------------------------------------------------------
+
+void IconChoicePage::StateChanged( StateChangedType nType )
+{
+ Window::StateChanged( nType );
+
+ if ( nType == STATE_CHANGE_CONTROLBACKGROUND )
+ {
+ ImplInitSettings();
+ Invalidate();
+ }
+}
+
+// -----------------------------------------------------------------------
+
+void IconChoicePage::DataChanged( const DataChangedEvent& rDCEvt )
+{
+ Window::DataChanged( rDCEvt );
+
+ if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) &&
+ (rDCEvt.GetFlags() & SETTINGS_STYLE) )
+ {
+ ImplInitSettings();
+ Invalidate();
+ }
+}
+
+/**********************************************************************
+|
+| D & D
+|
+\**********************************************************************/
+
+BOOL IconChoicePage::QueryDrop( DropEvent& rDEvt )
+{
+ if( pDialog )
+ return pDialog->QueryDrop( rDEvt );
+ else
+ return FALSE;
+}
+
+// -----------------------------------------------------------------------
+
+BOOL IconChoicePage::Drop( const DropEvent& rDEvt )
+{
+ if( pDialog )
+ return pDialog->Drop( rDEvt );
+ else
+ return Window::Drop( rDEvt );
+}
+
+//#####################################################################
+//
+// Class IconChoiceDialog
+//
+//#####################################################################
+
+/**********************************************************************
+|
+| Ctor / Dtor
+|
+\**********************************************************************/
+
+IconChoiceDialog::IconChoiceDialog ( Window* pParent, const ResId &rResId,
+ const EIconChoicePos ePos,
+ const SfxItemSet *pItemSet )//, BOOL bEditFmt, const String *pUserButtonText = 0 )
+: ModalDialog ( pParent, rResId ),
+ aOKBtn ( this, WB_DEFBUTTON ),
+ aCancelBtn ( this, WB_DEFBUTTON ),
+ aHelpBtn ( this ),
+ aResetBtn ( this ),
+ //pUserBtn ( pUserButtonText? new PushButton(this): 0 ),
+ //aBaseFmtBtn ( this ),
+ maIconCtrl ( this, WB_3DLOOK | WB_ICON | WB_BORDER |
+ WB_NOCOLUMNHEADER | WB_HIGHLIGHTFRAME |
+ WB_NOSELECTION | WB_NODRAGSELECTION | WB_TABSTOP ),
+ meChoicePos ( ePos ),
+ mnCurrentPageId ( USHRT_MAX ),
+ pSet ( pItemSet ),
+ pExampleSet ( NULL ),
+ pOutSet ( NULL ),
+ pRanges ( NULL ),
+ bHideResetBtn ( FALSE ),
+ bModal ( FALSE ),
+ bInOK ( FALSE ),
+ bModified ( FALSE ),
+ bItemsReset ( FALSE ),
+ nResId ( rResId.GetId() )
+{
+ // IconChoiceCtrl-Settings
+ //maIconCtrl.SetBackground ( Wallpaper( Color (146, 146, 186) ) );
+
+ maIconCtrl.SetStyle (WB_3DLOOK | WB_ICON | WB_BORDER | WB_NOCOLUMNHEADER | WB_HIGHLIGHTFRAME | WB_NOSELECTION | WB_NODRAGSELECTION | WB_TABSTOP | WB_CLIPCHILDREN );
+ SetCtrlPos ( meChoicePos );
+ maIconCtrl.SetClickHdl ( LINK ( this, IconChoiceDialog , ChosePageHdl_Impl ) );
+ maIconCtrl.Show();
+ maIconCtrl.SetChoiceWithCursor ( TRUE );
+ maIconCtrl.SetHelpId( HID_ICCDIALOG_CHOICECTRL );
+
+ // ItemSet
+ if ( pSet )
+ {
+ pExampleSet = new SfxItemSet( *pSet );
+ pOutSet = new SfxItemSet( *pSet->GetPool(), pSet->GetRanges() );
+ }
+
+ // Buttons
+ aOKBtn.SetClickHdl ( LINK( this, IconChoiceDialog, OkHdl ) );
+ aOKBtn.SetHelpId( HID_ICCDIALOG_OK_BTN );
+ aCancelBtn.SetHelpId( HID_ICCDIALOG_CANCEL_BTN );
+ aResetBtn.SetClickHdl( LINK( this, IconChoiceDialog, ResetHdl ) );
+ aResetBtn.SetText( SVX_RESSTR(RID_SVXSTR_ICONCHOICEDLG_RESETBUT) );
+ aResetBtn.SetHelpId( HID_ICCDIALOG_RESET_BTN );
+ aOKBtn.Show();
+ aCancelBtn.Show();
+ aHelpBtn.Show();
+ aResetBtn.Show();
+
+ SetPosSizeCtrls ( TRUE );
+}
+
+// -----------------------------------------------------------------------
+
+/*
+IconChoiceDialog ::IconChoiceDialog ( SfxViewFrame *pViewFrame, Window* pParent, const ResId &rResId,
+ const SfxItemSet * = 0, BOOL bEditFmt = FALSE,
+ const String *pUserButtonText = 0 )
+: meChoicePos ( PosLeft ), // Default erst ma Links
+ maIconCtrl ( this, Die_Winbits ),
+ aOKBtn ( this ),
+ pUserBtn ( pUserButtonText? new PushButton(this): 0 ),
+ aCancelBtn ( this ),
+ aHelpBtn ( this ),
+ aResetBtn ( this ),
+ aBaseFmtBtn ( this ),
+ mnCurrentPageId ( 0 )
+{
+ FreeResource();
+}
+*/
+
+// -----------------------------------------------------------------------
+
+IconChoiceDialog ::~IconChoiceDialog ()
+{
+ ULONG i;
+
+ // save configuration at INI-Manager
+ // and remove pages
+ SfxIniManager* pIniMgr = SFX_APP()->GetAppIniManager();
+ String aDlgData( pIniMgr->GetString( GetPosPixel(), Size() ) );
+ aDlgData += (sal_Unicode)pIniMgr->GetToken();
+ aDlgData.Append( UniString::CreateFromInt32( mnCurrentPageId ) );
+ pIniMgr->Set( aDlgData, SFX_KEY_DIALOG, nResId );
+ const USHORT nCount = maPageList.Count();
+
+ for ( i = 0; i < nCount; ++i )
+ {
+ IconChoicePageData* pData = maPageList.GetObject(i);
+
+ if ( pData->pPage )
+ {
+ pData->pPage->FillUserData();
+ String aPageData(pData->pPage->GetUserData());
+ if ( aPageData.Len() )
+ {
+ pIniMgr->Set( aPageData, SFX_KEY_PAGE, pData->nId);
+ }
+
+ if ( pData->bOnDemand )
+ delete (SfxItemSet*)&pData->pPage->GetItemSet();
+ delete pData->pPage;
+ }
+ delete pData;
+ }
+
+ // remove Pagelist
+/* for ( i=0; i<maPageList.Count(); i++ )
+ {
+ IconChoicePageData* pData = (IconChoicePageData*)maPageList.GetObject ( i );
+
+ if ( pData->bOnDemand )
+ delete ( SfxItemSet * )&( pData->pPage->GetItemSet() );
+
+ delete pData->pPage;
+ delete pData;
+ }*/
+
+ // remove Userdata from Icons
+ for ( i=0; i<maIconCtrl.GetEntryCount(); i++)
+ {
+ SvxIconChoiceCtrlEntry* pEntry = maIconCtrl.GetEntry ( i );
+ USHORT* pUserData = (USHORT*) pEntry->GetUserData();
+ delete pUserData;
+ }
+
+ //
+ if ( pRanges )
+ delete pRanges;
+ if ( pOutSet )
+ delete pOutSet;
+
+ SfxHelpPI *pHelpPI = SFX_APP()->GetHelpPI();
+ if ( pHelpPI )
+ pHelpPI->ResetTopic();
+}
+
+/**********************************************************************
+|
+| add new page
+|
+\**********************************************************************/
+
+void IconChoiceDialog::AddTabPage( USHORT nId, const String& rIconText,
+ const Image& rChoiceIcon,
+ CreatePage pCreateFunc /* != 0 */,
+ GetPageRanges pRangesFunc /* darf 0 sein */,
+ BOOL bItemsOnDemand, ULONG nPos )
+{
+ IconChoicePageData* pData = new IconChoicePageData ( nId, pCreateFunc,
+ pRangesFunc,
+ bItemsOnDemand );
+ maPageList.Insert ( pData, LIST_APPEND );
+
+ pData->fnGetRanges = pRangesFunc;
+ pData->bOnDemand = bItemsOnDemand;
+
+ USHORT *pId = new USHORT ( nId );
+ SvxIconChoiceCtrlEntry* pEntry = maIconCtrl.InsertEntry( rIconText, rChoiceIcon );
+ pEntry->SetUserData ( (void*) pId );
+}
+
+/**********************************************************************
+|
+| remove page
+|
+\**********************************************************************/
+
+void IconChoiceDialog::RemoveTabPage( USHORT nId )
+{
+ IconChoicePageData* pData = GetPageData ( nId );
+
+ // remove page from list
+ if ( pData )
+ {
+ maPageList.Remove ( pData );
+
+ // save settings
+ if ( pData->pPage )
+ {
+ pData->pPage->FillUserData();
+ String aPageData(pData->pPage->GetUserData());
+ if ( aPageData.Len() )
+ {
+ SfxIniManager* pIniMgr = SFX_APP()->GetAppIniManager();
+ pIniMgr->Set( aPageData, SFX_KEY_PAGE, pData->nId);
+ }
+ }
+
+ if ( pData->bOnDemand )
+ delete ( SfxItemSet * )&( pData->pPage->GetItemSet() );
+
+ delete pData->pPage;
+ delete pData;
+ }
+
+ // remove Icon
+ BOOL bFound=FALSE;
+ for ( ULONG i=0; i<maIconCtrl.GetEntryCount() && !bFound; i++)
+ {
+ SvxIconChoiceCtrlEntry* pEntry = maIconCtrl.GetEntry ( i );
+ USHORT* pUserData = (USHORT*) pEntry->GetUserData();
+
+ if ( *pUserData == nId )
+ {
+ delete pUserData;
+ maIconCtrl.RemoveEntry ( pEntry );
+ bFound = TRUE;
+ }
+ }
+
+ // was it the current page ?
+ if ( nId = mnCurrentPageId )
+ {
+ mnCurrentPageId = maPageList.First()->nId;
+ }
+
+ Invalidate ();
+}
+
+/**********************************************************************
+|
+| Paint-method
+|
+\**********************************************************************/
+
+void IconChoiceDialog::Paint( const Rectangle& rRect )
+{
+ Dialog::Paint ( rRect );
+
+ for ( ULONG i=0; i<maPageList.Count(); i++ )
+ {
+ IconChoicePageData* pData = (IconChoicePageData*)maPageList.GetObject ( i );
+
+ if ( pData->nId == mnCurrentPageId )
+ {
+ ShowPageImpl ( pData );
+ pData->pPage->Invalidate();
+ }
+ else
+ {
+ HidePageImpl ( pData );
+ }
+ }
+}
+
+EIconChoicePos IconChoiceDialog::SetCtrlPos( const EIconChoicePos& rPos )
+{
+ WinBits aWinBits = maIconCtrl.GetStyle ();
+
+ switch ( meChoicePos )
+ {
+ case PosLeft :
+ aWinBits &= ~WB_ALIGN_TOP & ~WB_NOVSCROLL;
+ aWinBits |= WB_ALIGN_LEFT | WB_NOHSCROLL;
+ break;
+ case PosRight :
+ aWinBits &= ~WB_ALIGN_TOP & ~WB_NOVSCROLL;
+ aWinBits |= WB_ALIGN_LEFT | WB_NOHSCROLL;
+ break;
+ case PosTop :
+ aWinBits &= ~WB_ALIGN_LEFT & ~WB_NOHSCROLL;
+ aWinBits |= WB_ALIGN_TOP | WB_NOVSCROLL;
+ break;
+ case PosBottom :
+ aWinBits &= ~WB_ALIGN_LEFT & ~WB_NOHSCROLL;
+ aWinBits |= WB_ALIGN_TOP | WB_NOVSCROLL;
+ break;
+ };
+ maIconCtrl.SetStyle ( aWinBits );
+
+ SetPosSizeCtrls();
+ Invalidate ();
+
+ EIconChoicePos eOldPos = meChoicePos;
+ meChoicePos = rPos;
+
+ return eOldPos;
+}
+
+void IconChoiceDialog::SetCtrlColor ( const Color& rColor )
+{
+ Wallpaper aWallpaper ( rColor );
+ maIconCtrl.SetBackground( aWallpaper );
+ maIconCtrl.SetFontColorToBackground ();
+}
+
+/**********************************************************************
+|
+| Show / Hide page or button
+|
+\**********************************************************************/
+
+void IconChoiceDialog::ShowPageImpl ( IconChoicePageData* pData )
+{
+ if ( pData->pPage )
+ pData->pPage->Show();
+}
+
+// -----------------------------------------------------------------------
+
+void IconChoiceDialog::HidePageImpl ( IconChoicePageData* pData )
+{
+ if ( pData->pPage )
+ pData->pPage->Hide();
+}
+
+// -----------------------------------------------------------------------
+
+void IconChoiceDialog::RemoveResetButton()
+{
+ aResetBtn.Hide();
+ bHideResetBtn = TRUE;
+}
+
+// -----------------------------------------------------------------------
+
+void IconChoiceDialog::ShowPage( USHORT nId )
+{
+ SetCurPageId( nId );
+ ActivatePageImpl( );
+}
+
+/**********************************************************************
+|
+| Resize Dialog
+|
+\**********************************************************************/
+
+#define ICONCTRL_WIDTH_PIXEL 110
+#define ICONCTRL_HEIGHT_PIXEL 75
+#define MINSIZE_BUTTON_WIDTH 70
+#define MINSIZE_BUTTON_HEIGHT 22
+
+void IconChoiceDialog::Resize()
+{
+ Dialog::Resize ();
+
+ if ( IsReallyVisible() )
+ {
+ SetPosSizeCtrls ();
+ }
+}
+
+void IconChoiceDialog::SetPosSizeCtrls ( BOOL bInit )
+{
+ const Point aCtrlOffset ( LogicToPixel( Point( CTRLS_OFFSET, CTRLS_OFFSET ), MAP_APPFONT ) );
+ Size aOutSize ( GetOutputSizePixel() );
+
+ ////////////////////////////////////////
+ // Button-Defaults
+ //
+ Size aDefaultButtonSize = LogicToPixel( Size( 50, 14 ), MAP_APPFONT );
+
+ // Reset-Button
+ Size aResetButtonSize ( bInit ? aDefaultButtonSize :
+ aResetBtn.GetSizePixel () );
+
+ ////////////////////////////////////////
+ // IconChoiceCtrl resizen & positionieren
+ //
+ Size aNewIconCtrlSize ( ICONCTRL_WIDTH_PIXEL,
+ aOutSize.Height()-(2*aCtrlOffset.X()) );
+ Point aIconCtrlPos;
+ switch ( meChoicePos )
+ {
+ case PosLeft :
+ aIconCtrlPos = aCtrlOffset;
+ aNewIconCtrlSize = Size ( ICONCTRL_WIDTH_PIXEL,
+ aOutSize.Height()-(2*aCtrlOffset.X()) );
+ break;
+ case PosRight :
+ aIconCtrlPos = Point ( aOutSize.Width() - ICONCTRL_WIDTH_PIXEL -
+ aCtrlOffset.X(), aCtrlOffset.X() );
+ aNewIconCtrlSize = Size ( ICONCTRL_WIDTH_PIXEL,
+ aOutSize.Height()-(2*aCtrlOffset.X()) );
+ break;
+ case PosTop :
+ aIconCtrlPos = aCtrlOffset;
+ aNewIconCtrlSize = Size ( aOutSize.Width()-(2*aCtrlOffset.X()),
+ ICONCTRL_HEIGHT_PIXEL );
+ break;
+ case PosBottom :
+ aIconCtrlPos = Point ( aCtrlOffset.X(), aOutSize.Height() -
+ aResetButtonSize.Height() - (2*aCtrlOffset.X()) -
+ ICONCTRL_HEIGHT_PIXEL );
+ aNewIconCtrlSize = Size ( aOutSize.Width()-(2*aCtrlOffset.X()),
+ ICONCTRL_HEIGHT_PIXEL );
+ break;
+ };
+ maIconCtrl.SetPosSizePixel ( aIconCtrlPos, aNewIconCtrlSize );
+ maIconCtrl.ArrangeIcons();
+
+ ////////////////////////////////////////
+ // Pages resizen & positionieren
+ //
+ for ( ULONG i=0; i<maPageList.Count(); i++ )
+ {
+ IconChoicePageData* pData = (IconChoicePageData*)maPageList.GetObject ( i );
+
+ Point aNewPagePos;
+ Size aNewPageSize;
+ switch ( meChoicePos )
+ {
+ case PosLeft :
+ aNewPagePos = Point ( aNewIconCtrlSize.Width() + (2*CTRLS_OFFSET),
+ CTRLS_OFFSET );
+ aNewPageSize = Size ( aOutSize.Width() - aNewIconCtrlSize.Width() -
+ (3*CTRLS_OFFSET),
+ aOutSize.Height() - aOKBtn.GetSizePixel().Height() -
+ (3*CTRLS_OFFSET) );
+ break;
+ case PosRight :
+ aNewPagePos = aCtrlOffset;
+ aNewPageSize = Size ( aOutSize.Width() - aNewIconCtrlSize.Width() -
+ (3*aCtrlOffset.X()),
+ aOutSize.Height() - aOKBtn.GetSizePixel().Height() -
+ (3*aCtrlOffset.X()) );
+ break;
+ case PosTop :
+ aNewPagePos = Point ( aCtrlOffset.X(), aNewIconCtrlSize.Height() +
+ (2*aCtrlOffset.X()) );
+ aNewPageSize = Size ( aOutSize.Width() - (2*aCtrlOffset.X()),
+ aOutSize.Height() - aOKBtn.GetSizePixel().Height() -
+ aNewIconCtrlSize.Height() - (4*aCtrlOffset.X()) );
+ break;
+ case PosBottom :
+ aNewPagePos = aCtrlOffset;
+ aNewPageSize = Size ( aOutSize.Width() - (2*aCtrlOffset.X()),
+ aOutSize.Height() - aOKBtn.GetSizePixel().Height() -
+ aNewIconCtrlSize.Height() - (4*aCtrlOffset.X()) );
+ break;
+ };
+
+ if ( pData->pPage )
+ pData->pPage->SetPosSizePixel ( aNewPagePos, aNewPageSize );
+ }
+
+ ////////////////////////////////////////
+ // Buttons positionieren
+ //
+ ULONG nXOffset=0;
+ if ( meChoicePos == PosRight )
+ nXOffset = aNewIconCtrlSize.Width()+(2*aCtrlOffset.X());
+
+ aResetBtn.SetPosSizePixel ( Point( aOutSize.Width() - nXOffset -
+ aResetButtonSize.Width()-aCtrlOffset.X(),
+ aOutSize.Height()-aResetButtonSize.Height()-
+ aCtrlOffset.X() ),
+ aResetButtonSize );
+ // Help-Button
+ Size aHelpButtonSize ( bInit ? aDefaultButtonSize :
+ aHelpBtn.GetSizePixel () );
+ aHelpBtn.SetPosSizePixel ( Point( aOutSize.Width()-aResetButtonSize.Width()-
+ aHelpButtonSize.Width()- nXOffset -
+ (2*aCtrlOffset.X()),
+ aOutSize.Height()-aHelpButtonSize.Height()-
+ aCtrlOffset.X() ),
+ aHelpButtonSize );
+ // Cancel-Button
+ Size aCancelButtonSize ( bInit ? aDefaultButtonSize :
+ aCancelBtn.GetSizePixel () );
+ aCancelBtn.SetPosSizePixel ( Point( aOutSize.Width()-aCancelButtonSize.Width()-
+ aResetButtonSize.Width()-aHelpButtonSize.Width()-
+ (3*aCtrlOffset.X()) - nXOffset,
+ aOutSize.Height()-aCancelButtonSize.Height()-
+ aCtrlOffset.X() ),
+ aCancelButtonSize );
+ // OK-Button
+ Size aOKButtonSize ( bInit ? aDefaultButtonSize : aOKBtn.GetSizePixel () );
+ aOKBtn.SetPosSizePixel ( Point( aOutSize.Width()-aOKButtonSize.Width()-
+ aCancelButtonSize.Width()-aResetButtonSize.Width()-
+ aHelpButtonSize.Width()-(4*aCtrlOffset.X())- nXOffset,
+ aOutSize.Height()-aOKButtonSize.Height()-aCtrlOffset.X() ),
+ aOKButtonSize );
+
+ Invalidate();
+}
+
+void IconChoiceDialog::SetPosSizePages ( USHORT nId )
+{
+ const Point aCtrlOffset ( LogicToPixel( Point( CTRLS_OFFSET, CTRLS_OFFSET ), MAP_APPFONT ) );
+ IconChoicePageData* pData = GetPageData ( nId );
+
+ if ( pData->pPage )
+ {
+ Size aOutSize ( GetOutputSizePixel() );
+ Size aIconCtrlSize ( maIconCtrl.GetSizePixel() );
+
+ Point aNewPagePos;
+ Size aNewPageSize;
+ switch ( meChoicePos )
+ {
+ case PosLeft :
+ aNewPagePos = Point ( aIconCtrlSize.Width() + (2*aCtrlOffset.X()),
+ aCtrlOffset.X() );
+ aNewPageSize = Size ( aOutSize.Width() - maIconCtrl.GetSizePixel().Width() -
+ (3*aCtrlOffset.X()),
+ aOutSize.Height() - aOKBtn.GetSizePixel().Height() -
+ (3*aCtrlOffset.X()) );
+ break;
+ case PosRight :
+ aNewPagePos = aCtrlOffset;
+ aNewPageSize = Size ( aOutSize.Width() - maIconCtrl.GetSizePixel().Width() -
+ (3*aCtrlOffset.X()),
+ aOutSize.Height() - aOKBtn.GetSizePixel().Height() -
+ (3*aCtrlOffset.X()) );
+ break;
+ case PosTop :
+ aNewPagePos = Point ( aCtrlOffset.X(), aIconCtrlSize.Height() +
+ (2*aCtrlOffset.X()) );
+ aNewPageSize = Size ( aOutSize.Width() - (2*aCtrlOffset.X()),
+ aOutSize.Height() - aOKBtn.GetSizePixel().Height() -
+ maIconCtrl.GetSizePixel().Height() - (4*aCtrlOffset.X()) );
+ break;
+ case PosBottom :
+ aNewPagePos = aCtrlOffset;
+ aNewPageSize = Size ( aOutSize.Width() - (2*aCtrlOffset.X()),
+ aOutSize.Height() - aOKBtn.GetSizePixel().Height() -
+ maIconCtrl.GetSizePixel().Height() - (4*aCtrlOffset.X()) );
+ break;
+ };
+
+ pData->pPage->SetPosSizePixel ( aNewPagePos, aNewPageSize );
+ }
+}
+
+/**********************************************************************
+|
+| select a page
+|
+\**********************************************************************/
+
+IMPL_LINK ( IconChoiceDialog , ChosePageHdl_Impl, void *, EMPTYARG )
+{
+ ULONG nPos;
+
+ SvxIconChoiceCtrlEntry *pEntry = maIconCtrl.GetSelectedEntry ( nPos );
+
+ USHORT *pId = (USHORT*)pEntry->GetUserData ();
+
+ if( *pId != mnCurrentPageId )
+ {
+ IconChoicePageData* pData = GetPageData ( mnCurrentPageId );
+ if ( pData->pPage )
+ DeActivatePageImpl();
+
+ SetCurPageId ( *pId );
+
+ ActivatePageImpl();
+ }
+
+ return 0L;
+}
+
+/**********************************************************************
+|
+| Button-handler
+|
+\**********************************************************************/
+
+IMPL_LINK( IconChoiceDialog, OkHdl, Button *, EMPTYARG )
+{
+ bInOK = TRUE;
+
+ if ( OK_Impl() )
+ {
+ if ( bModal )
+ EndDialog( Ok() );
+ else
+ {
+ Ok();
+ Close();
+ }
+ }
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( IconChoiceDialog, ResetHdl, Button *, EMPTYARG )
+{
+ ResetPageImpl ();
+
+ IconChoicePageData* pData = GetPageData ( mnCurrentPageId );
+ DBG_ASSERT( pData, "Id nicht bekannt" );
+
+ if ( pData->bOnDemand )
+ {
+ // CSet auf AIS hat hier Probleme, daher getrennt
+ const SfxItemSet* pSet = &( pData->pPage->GetItemSet() );
+ pData->pPage->Reset( *(SfxItemSet*)pSet );
+ }
+ else
+ pData->pPage->Reset( *pSet );
+
+
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( IconChoiceDialog, CancelHdl, Button*, pButton )
+{
+ Close();
+
+ return 0;
+}
+
+/**********************************************************************
+|
+| call page
+|
+\**********************************************************************/
+
+void IconChoiceDialog::ActivatePageImpl ()
+{
+ DBG_ASSERT( maPageList.Count(), "keine Pages angemeldet" );
+ SfxIniManager* pIniMgr = SFX_APP()->GetAppIniManager();
+
+ IconChoicePageData* pData = GetPageData ( mnCurrentPageId );
+ DBG_ASSERT( pData, "Id nicht bekannt" );
+ if ( pData )
+ {
+ if ( !pData->pPage )
+ {
+ const SfxItemSet* pTmpSet = 0;
+
+ if ( pSet )
+ {
+ if ( bItemsReset && pSet->GetParent() )
+ pTmpSet = pSet->GetParent();
+ else
+ pTmpSet = pSet;
+ }
+
+ if ( pTmpSet && !pData->bOnDemand )
+ pData->pPage = (pData->fnCreatePage)( this, *pTmpSet );
+ else
+ pData->pPage = (pData->fnCreatePage)
+ ( this, *CreateInputItemSet( mnCurrentPageId ) );
+
+ pData->pPage->SetUserData(pIniMgr->Get( SFX_KEY_PAGE, pData->nId ));
+
+ SetPosSizePages ( pData->nId );
+
+ PageCreated( mnCurrentPageId, *(pData->pPage) );
+
+ if ( pData->bOnDemand )
+ pData->pPage->Reset( (SfxItemSet &)pData->pPage->GetItemSet() );
+ else
+ pData->pPage->Reset( *pSet );
+ }
+ else if ( pData->bRefresh )
+ {
+ pData->pPage->Reset( *pSet );
+ }
+
+ pData->bRefresh = FALSE;
+
+ if ( pExampleSet )
+ pData->pPage->ActivatePage( *pExampleSet );
+ }
+
+ SfxHelpPI *pHelpPI = SFX_APP()->GetHelpPI();
+ if ( pHelpPI )
+ pHelpPI->LoadTopic( pData->pPage->GetHelpId() );
+
+ SetHelpId( pData->pPage->GetHelpId() );
+
+ BOOL bReadOnly = pData->pPage->IsReadOnly();
+ if ( bReadOnly || bHideResetBtn )
+ aResetBtn.Hide();
+ else
+ aResetBtn.Show();
+
+ Invalidate ();
+}
+
+// -----------------------------------------------------------------------
+
+BOOL IconChoiceDialog::DeActivatePageImpl ()
+{
+ IconChoicePageData *pData = GetPageData ( mnCurrentPageId );
+
+ int nRet = IconChoicePage::LEAVE_PAGE;
+
+ if ( pData )
+ {
+ IconChoicePage * pPage = pData->pPage;
+
+ if ( !pExampleSet && pPage->HasExchangeSupport() && pSet )
+ pExampleSet = new SfxItemSet( *pSet->GetPool(), pSet->GetRanges() );
+
+ if ( pSet )
+ {
+ SfxItemSet aTmp( *pSet->GetPool(), pSet->GetRanges() );
+
+ if ( pPage->HasExchangeSupport() )
+ nRet = pPage->DeactivatePage( &aTmp );
+
+ if ( ( IconChoicePage::LEAVE_PAGE & nRet ) == IconChoicePage::LEAVE_PAGE &&
+ aTmp.Count() )
+ {
+ pExampleSet->Put( aTmp );
+ pOutSet->Put( aTmp );
+ }
+ }
+ else
+ {
+ if ( pPage->HasExchangeSupport() ) //!!!
+ {
+ if ( !pExampleSet )
+ {
+ SfxItemPool* pPool = pPage->GetItemSet().GetPool();
+ pExampleSet =
+ new SfxItemSet( *pPool, GetInputRanges( *pPool ) );
+ }
+ nRet = pPage->DeactivatePage( pExampleSet );
+ }
+ else
+ nRet = pPage->DeactivatePage( NULL );
+ }
+
+ if ( nRet & IconChoicePage::REFRESH_SET )
+ {
+ pSet = GetRefreshedSet();
+ DBG_ASSERT( pSet, "GetRefreshedSet() liefert NULL" );
+ // alle Pages als neu zu initialsieren flaggen
+ const USHORT nCount = maPageList.Count();
+
+ for ( USHORT i = 0; i < nCount; ++i )
+ {
+ IconChoicePageData* pObj = (IconChoicePageData*)maPageList.GetObject(i);
+
+ if ( pObj->pPage != pPage ) // eigene Page nicht mehr refreshen
+ pObj->bRefresh = TRUE;
+ else
+ pObj->bRefresh = FALSE;
+ }
+ }
+ }
+
+ if ( nRet & IconChoicePage::LEAVE_PAGE )
+ return TRUE;
+ else
+ return FALSE;
+}
+
+// -----------------------------------------------------------------------
+
+void IconChoiceDialog::ResetPageImpl ()
+{
+ IconChoicePageData *pData = GetPageData ( mnCurrentPageId );
+
+ DBG_ASSERT( pData, "Id nicht bekannt" );
+
+ if ( pData->bOnDemand )
+ {
+ // CSet auf AIS hat hier Probleme, daher getrennt
+ const SfxItemSet* pSet = &pData->pPage->GetItemSet();
+ pData->pPage->Reset( *(SfxItemSet*)pSet );
+ }
+ else
+ pData->pPage->Reset( *pSet );
+}
+
+// -----------------------------------------------------------------------
+
+void IconChoiceDialog::PageCreated( USHORT nId, IconChoicePage &rPage )
+{
+}
+
+/**********************************************************************
+|
+| handling itemsets
+|
+\**********************************************************************/
+
+const USHORT* IconChoiceDialog::GetInputRanges( const SfxItemPool& rPool )
+{
+ if ( pSet )
+ {
+ DBG_ERRORFILE( "Set bereits vorhanden!" );
+ return pSet->GetRanges();
+ }
+
+ if ( pRanges )
+ return pRanges;
+ SvUShorts aUS( 16, 16 );
+ ULONG nCount = maPageList.Count();
+
+ ULONG i;
+ for ( i = 0; i < nCount; ++i )
+ {
+ IconChoicePageData* pData = maPageList.GetObject (i);
+
+ if ( pData->fnGetRanges )
+ {
+ const USHORT* pTmpRanges = (pData->fnGetRanges)();
+ const USHORT* pIter = pTmpRanges;
+
+ USHORT nLen;
+ for( nLen = 0; *pIter; ++nLen, ++pIter )
+ ;
+ aUS.Insert( pTmpRanges, nLen, aUS.Count() );
+ }
+ }
+
+ // remove double Id's
+#ifndef TF_POOLABLE
+ if ( rPool.HasMap() )
+#endif
+ {
+ nCount = aUS.Count();
+
+ for ( i = 0; i < nCount; ++i )
+ aUS[i] = (USHORT) rPool.GetWhich( aUS[i] );
+ }
+
+ // sortieren
+ if ( aUS.Count() > 1 )
+ qsort( (void*)aUS.GetData(),
+ aUS.Count(), sizeof(USHORT), IconcDlgCmpUS_Impl );
+
+ pRanges = new USHORT[aUS.Count() + 1];
+ memcpy(pRanges, aUS.GetData(), sizeof(USHORT) * aUS.Count());
+ pRanges[aUS.Count()] = 0;
+
+ return pRanges;
+}
+
+// -----------------------------------------------------------------------
+
+void IconChoiceDialog::SetInputSet( const SfxItemSet* pInSet )
+{
+ FASTBOOL bSet = ( pSet != NULL );
+
+ pSet = pInSet;
+
+ if ( !bSet && !pExampleSet && !pOutSet )
+ {
+ pExampleSet = new SfxItemSet( *pSet );
+ pOutSet = new SfxItemSet( *pSet->GetPool(), pSet->GetRanges() );
+ }
+}
+
+// -----------------------------------------------------------------------
+
+// Liefert die Pages, die ihre Sets onDemand liefern, das OutputItemSet.
+const SfxItemSet* IconChoiceDialog::GetOutputItemSet ( USHORT nId )
+{
+ IconChoicePageData * pData = GetPageData ( nId );
+ DBG_ASSERT( pData, "TabPage nicht gefunden" );
+
+ if ( pData )
+ {
+ if ( !pData->pPage )
+ return NULL;
+
+ if ( pData->bOnDemand )
+ return &pData->pPage->GetItemSet();
+
+ return pOutSet;
+ }
+
+ return NULL;
+}
+
+// -----------------------------------------------------------------------
+
+int IconChoiceDialog::FillOutputItemSet()
+{
+ int nRet = IconChoicePage::LEAVE_PAGE;
+ if ( OK_Impl() )
+ Ok();
+ else
+ nRet = IconChoicePage::KEEP_PAGE;
+ return nRet;
+}
+
+// -----------------------------------------------------------------------
+
+SfxItemSet* IconChoiceDialog::CreateInputItemSet( USHORT )
+{
+ DBG_WARNINGFILE( "CreateInputItemSet nicht implementiert" );
+
+ return 0;
+}
+
+/**********************************************************************
+|
+| start dialog
+|
+\**********************************************************************/
+
+short IconChoiceDialog::Execute()
+{
+ if ( !maPageList.Count() )
+ return RET_CANCEL;
+
+ Start_Impl();
+
+ return Dialog::Execute();
+}
+
+// -----------------------------------------------------------------------
+
+void IconChoiceDialog::Start( BOOL bShow )
+{
+
+ aCancelBtn.SetClickHdl( LINK( this, IconChoiceDialog, CancelHdl ) );
+ bModal = FALSE;
+
+ Start_Impl();
+
+ if ( bShow )
+ Window::Show();
+
+}
+
+// -----------------------------------------------------------------------
+
+void IconChoiceDialog::Start_Impl()
+{
+ Point aPos;
+ USHORT nActPage;
+
+ if ( mnCurrentPageId == 0 || mnCurrentPageId == USHRT_MAX )
+ nActPage = maPageList.GetObject(0)->nId;//First()->nId;
+ else
+ nActPage = mnCurrentPageId;
+
+ // Konfiguration vorhanden?
+ SfxIniManager* pIniMgr = SFX_APP()->GetAppIniManager();
+ String aDlgData( pIniMgr->Get( SFX_KEY_DIALOG, nResId ) );
+
+ if ( aDlgData.Len() > 0 )
+ {
+ // ggf. Position aus Konfig
+ Size aDummySize;
+
+ if ( pIniMgr->GetPosSize( aDlgData.GetToken( 0, pIniMgr->GetToken() ),
+ aPos, aDummySize ) )
+ SetPosPixel( aPos );
+
+ // initiale TabPage aus Programm/Hilfe/Konfig
+ nActPage = (USHORT)aDlgData.GetToken( 1, pIniMgr->GetToken() ).ToInt32();
+
+ if ( USHRT_MAX != mnCurrentPageId )
+ nActPage = mnCurrentPageId;
+
+ if ( GetPageData ( nActPage ) == NULL )
+ nActPage = ( (IconChoicePageData*)maPageList.GetObject(0) )->nId;
+ }
+ else if ( USHRT_MAX != mnCurrentPageId && GetPageData ( mnCurrentPageId ) != NULL )
+ nActPage = mnCurrentPageId;
+
+ mnCurrentPageId = nActPage;
+
+ FocusOnIcon( mnCurrentPageId );
+
+ ActivatePageImpl();
+}
+
+// -----------------------------------------------------------------------
+
+const SfxItemSet* IconChoiceDialog::GetRefreshedSet()
+{
+ DBG_ERRORFILE( "GetRefreshedSet nicht implementiert" );
+ return 0;
+}
+
+/**********************************************************************
+|
+| tool-methods
+|
+\**********************************************************************/
+
+IconChoicePageData* IconChoiceDialog::GetPageData ( USHORT nId )
+{
+ IconChoicePageData *pRet = NULL;
+ BOOL bFound = FALSE;
+
+ for ( ULONG i=0; i<maPageList.Count() && !bFound; i++ )
+ {
+ IconChoicePageData* pData = (IconChoicePageData*)maPageList.GetObject ( i );
+
+ if ( pData->nId == nId )
+ {
+ pRet = pData;
+ }
+ }
+
+ return pRet;
+}
+
+/**********************************************************************
+|
+| OK-Status
+|
+\**********************************************************************/
+
+BOOL IconChoiceDialog::OK_Impl()
+{
+ IconChoicePage* pPage = GetPageData ( mnCurrentPageId )->pPage;
+
+ BOOL bEnd = !pPage;
+ if ( pPage )
+ {
+ int nRet = IconChoicePage::LEAVE_PAGE;
+ if ( pSet )
+ {
+ SfxItemSet aTmp( *pSet->GetPool(), pSet->GetRanges() );
+ BOOL bRet = FALSE;
+
+ if ( pPage->HasExchangeSupport() )
+ nRet = pPage->DeactivatePage( &aTmp );
+
+ if ( ( IconChoicePage::LEAVE_PAGE & nRet ) == IconChoicePage::LEAVE_PAGE
+ && aTmp.Count() )
+ {
+ pExampleSet->Put( aTmp );
+ pOutSet->Put( aTmp );
+ }
+ else if ( bRet )
+ bModified |= TRUE;
+ }
+ else
+ nRet = pPage->DeactivatePage( NULL );
+ bEnd = nRet;
+ }
+
+ return bEnd;
+}
+
+// -----------------------------------------------------------------------
+
+short IconChoiceDialog::Ok()
+{
+ bInOK = TRUE;
+
+ if ( !pOutSet )
+ {
+ if ( !pExampleSet && pSet )
+ pOutSet = pSet->Clone( FALSE ); // ohne Items
+ else if ( pExampleSet )
+ pOutSet = new SfxItemSet( *pExampleSet );
+ }
+ BOOL bModified = FALSE;
+
+ const ULONG nCount = maPageList.Count();
+
+ for ( ULONG i = 0; i < nCount; ++i )
+ {
+ IconChoicePageData* pData = GetPageData ( i );
+
+ IconChoicePage* pPage = pData->pPage;
+
+ if ( pPage )
+ {
+ if ( pData->bOnDemand )
+ {
+ SfxItemSet& rSet = (SfxItemSet&)pPage->GetItemSet();
+ rSet.ClearItem();
+ bModified |= pPage->FillItemSet( rSet );
+ }
+ else if ( pSet && !pPage->HasExchangeSupport() )
+ {
+ SfxItemSet aTmp( *pSet->GetPool(), pSet->GetRanges() );
+
+ if ( pPage->FillItemSet( aTmp ) )
+ {
+ bModified |= TRUE;
+ pExampleSet->Put( aTmp );
+ pOutSet->Put( aTmp );
+ }
+ }
+ }
+ }
+
+ if ( bModified || ( pOutSet && pOutSet->Count() > 0 ) )
+ bModified |= TRUE;
+
+ return bModified ? RET_OK : RET_CANCEL;
+}
+
+// -----------------------------------------------------------------------
+
+BOOL IconChoiceDialog::IsInOK() const
+{
+ return bInOK;
+}
+
+// -----------------------------------------------------------------------
+
+void IconChoiceDialog::FocusOnIcon( USHORT nId )
+{
+ // set focus to icon for the current visible page
+ for ( int i=0; i<maIconCtrl.GetEntryCount(); i++)
+ {
+ SvxIconChoiceCtrlEntry* pEntry = maIconCtrl.GetEntry ( i );
+ USHORT* pUserData = (USHORT*) pEntry->GetUserData();
+
+ if ( pUserData && *pUserData == nId )
+ pEntry->SetFocus( TRUE );
+ else
+ pEntry->SetFocus( FALSE );
+ }
+}
+
+/**********************************************************************
+|
+| D & D
+|
+\**********************************************************************/
+
+BOOL IconChoiceDialog::QueryDrop( DropEvent& rDEvt )
+{
+ return ModalDialog::QueryDrop( rDEvt );
+}
+
+// -----------------------------------------------------------------------
+
+BOOL IconChoiceDialog::Drop( const DropEvent& rDEvt )
+{
+ return ModalDialog::Drop( rDEvt );
+}
+
diff --git a/svx/source/dialog/iconcdlg.src b/svx/source/dialog/iconcdlg.src
new file mode 100644
index 000000000000..42c92c12be59
--- /dev/null
+++ b/svx/source/dialog/iconcdlg.src
@@ -0,0 +1,88 @@
+/*************************************************************************
+ *
+ * $RCSfile: iconcdlg.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:09 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#include "dialogs.hrc"
+
+String RID_SVXSTR_ICONCHOICEDLG_RESETBUT
+{
+ Text = "~Zurck" ;
+ Text [ ENGLISH ] = "~Reset" ;
+ Text [ english_us ] = "~Back" ;
+ Text[ portuguese ] = "~Anterior";
+ Text[ russian ] = "";
+ Text[ greek ] = "~";
+ Text[ dutch ] = "~Vorige";
+ Text[ french ] = "~Prcdent";
+ Text[ spanish ] = "Ante~rior";
+ Text[ italian ] = "Indietro";
+ Text[ danish ] = "Tilbage";
+ Text[ swedish ] = "~Tillbaka";
+ Text[ polish ] = "Wstecz";
+ Text[ portuguese_brazilian ] = "Reset";
+ Text[ japanese ] = "߂";
+ Text[ korean ] = "ڷ(~B)";
+ Text[ chinese_simplified ] = "趨(~R)";
+ Text[ chinese_traditional ] = "^";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "Geri";
+ Text[ language_user1 ] = " ";
+};
+
+
diff --git a/svx/source/dialog/imapdlg.cxx b/svx/source/dialog/imapdlg.cxx
new file mode 100644
index 000000000000..41d7200dd7d9
--- /dev/null
+++ b/svx/source/dialog/imapdlg.cxx
@@ -0,0 +1,1039 @@
+/*************************************************************************
+ *
+ * $RCSfile: imapdlg.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:09 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#define _SDR_NOITEMS
+#define _SDR_NOTOUCH
+#define _SDR_NOTRANSFORM
+#define _SDR_NOOBJECTS
+#define _SDR_NOVIEWMARKER
+#define _SDR_NODRAGMETHODS
+#define _SDR_NOUNDO
+#define _SDR_NOXOUTDEV
+
+#include <stdlib.h>
+
+#ifndef _SHL_HXX
+#include <tools/shl.hxx>
+#endif
+#ifndef _EINF_HXX
+#include <tools/errinf.hxx>
+#endif
+#ifndef _URLOBJ_HXX
+#include <tools/urlobj.hxx>
+#endif
+#ifndef _SV_MSGBOX_HXX
+#include <vcl/msgbox.hxx>
+#endif
+#ifndef _SV_GROUP_HXX //autogen
+#include <vcl/group.hxx>
+#endif
+#ifndef _SV_LSTBOX_HXX //autogen
+#include <vcl/lstbox.hxx>
+#endif
+#ifndef _SFXENUMITEM_HXX //autogen
+#include <svtools/eitem.hxx>
+#endif
+#ifndef _SFXINIMGR_HXX
+#include <svtools/iniman.hxx>
+#endif
+#ifndef _SFXDISPATCH_HXX
+#include <sfx2/dispatch.hxx>
+#endif
+#ifndef _IODLG_HXX
+#include <sfx2/iodlg.hxx>
+#endif
+#ifndef _SFX_SAVEOPT_HXX
+#include <sfx2/saveopt.hxx>
+#endif
+#ifndef _SFXMODULE_HXX
+#include <sfx2/module.hxx>
+#endif
+#pragma hdrstop
+
+#ifndef SVTOOLS_URIHELPER_HXX
+#include <svtools/urihelper.hxx>
+#endif
+#include <sfx2/viewfrm.hxx>
+
+#define _IMAPDLG_PRIVATE
+#include "imapdlg.hxx"
+
+#include "dialmgr.hxx"
+#include "dialogs.hrc"
+#include "svxids.hrc"
+#include "imapdlg.hrc"
+#include "imapwnd.hxx"
+#include "imapimp.hxx"
+#include "dlgutil.hxx"
+#include "svdtrans.hxx"
+#include "svdopath.hxx"
+
+#define SELF_TARGET "_self"
+#define IMAP_ALL_FILTER "<Alle>"
+#define IMAP_CERN_FILTER "MAP - CERN"
+#define IMAP_NCSA_FILTER "MAP - NCSA"
+#define IMAP_BINARY_FILTER "SIP - StarView ImageMap"
+#define IMAP_ALL_TYPE "*.*"
+#define IMAP_BINARY_TYPE "*.sip"
+#define IMAP_CERN_TYPE "*.map"
+#define IMAP_NCSA_TYPE "*.map"
+#define IMAP_BINARY_EXT "sip"
+#define IMAP_CERN_EXT "map"
+#define IMAP_NCSA_EXT "map"
+
+/******************************************************************************/
+
+SFX_IMPL_FLOATINGWINDOW( SvxIMapDlgChildWindow, SID_IMAP );
+
+/******************************************************************************/
+
+inline String GetUnitString( long nVal_100, FieldUnit eFieldUnit, sal_Unicode cSep )
+{
+ String aVal = UniString::CreateFromInt32( MetricField::ConvertValue( nVal_100, 2, MAP_100TH_MM, eFieldUnit ) );
+
+ while( aVal.Len() < 3 )
+ aVal.Insert( sal_Unicode('0'), 0 );
+
+ aVal.Insert( cSep, aVal.Len() - 2 );
+ aVal += sal_Unicode(' ');
+ aVal += SdrFormatter::GetUnitStr( eFieldUnit );
+
+ return aVal;
+}
+
+/*************************************************************************
+|*
+|* ControllerItem
+|*
+\************************************************************************/
+
+SvxIMapDlgItem::SvxIMapDlgItem( USHORT nId, SvxIMapDlg& rIMapDlg, SfxBindings& rBindings ) :
+ SfxControllerItem ( nId, rBindings ),
+ rIMap ( rIMapDlg )
+{
+}
+
+/*************************************************************************
+|*
+|* StateChanged-Methode
+|*
+\************************************************************************/
+
+void SvxIMapDlgItem::StateChanged( USHORT nSID, SfxItemState eState,
+ const SfxPoolItem* pItem )
+{
+ if ( ( nSID == SID_IMAP_EXEC ) && pItem )
+ {
+ const SfxBoolItem* pStateItem = PTR_CAST( SfxBoolItem, pItem );
+
+ DBG_ASSERT( pStateItem || pItem == 0, "SfxBoolItem erwartet");
+
+ // Float ggf. disablen
+ rIMap.SetExecState( !pStateItem->GetValue() );
+ }
+}
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+SvxIMapDlgChildWindow::SvxIMapDlgChildWindow( Window* pParent, USHORT nId,
+ SfxBindings* pBindings,
+ SfxChildWinInfo* pInfo ) :
+ SfxChildWindow( pParent, nId )
+{
+ pWindow = new SvxIMapDlg( pBindings, this, pParent, SVX_RES( RID_SVXDLG_IMAP ) );
+ SvxIMapDlg* pDlg = (SvxIMapDlg*) pWindow;
+
+ if ( pInfo->aSize.Width() && pInfo->aSize.Height() )
+ pWindow->SetPosSizePixel( pInfo->aPos, pInfo->aSize );
+ else
+ pWindow->SetPosPixel( Point() );
+
+ if ( pInfo->nFlags & SFX_CHILDWIN_ZOOMIN )
+ pDlg->RollUp();
+
+ eChildAlignment = SFX_ALIGN_NOALIGNMENT;
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+void SvxIMapDlgChildWindow::UpdateIMapDlg( const Graphic& rGraphic, const ImageMap* pImageMap,
+ const TargetList* pTargetList, void* pEditingObj )
+{
+ if ( SfxViewFrame::Current() &&
+ SfxViewFrame::Current()->HasChildWindow( SvxIMapDlgChildWindow::GetChildWindowId() ) )
+ SVXIMAPDLG()->Update( rGraphic, pImageMap, pTargetList, pEditingObj );
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+SvxIMapDlg::SvxIMapDlg( SfxBindings *pBindings, SfxChildWindow *pCW,
+ Window* pParent, const ResId& rResId ) :
+ SfxFloatingWindow ( pBindings, pCW, pParent, rResId ),
+ aIMapItem ( SID_IMAP_EXEC, *this, *pBindings ),
+ pOwnData ( new IMapOwnData( this ) ),
+ aTbxIMapDlg1 ( this, SVX_RES( TBX_IMAPDLG1 ) ),
+ aStbStatus ( this, WB_BORDER | WB_3DLOOK | WB_LEFT ),
+ pIMapWnd ( new IMapWindow( this, SVX_RES( RID_SVXCTL_IMAP ) ) ),
+ pCheckObj ( NULL ),
+ aFtURL ( this, SVX_RES( FT_URL ) ),
+ aFtText ( this, SVX_RES( FT_TEXT ) ),
+ aCbbURL ( this, SVX_RES( CBB_URL ) ),
+ aEdtText ( this, SVX_RES( EDT_TEXT ) )
+{
+ FreeResource();
+
+ // nur temporaer bis Vollupdate
+ pOwnData->pFtTarget = new FixedText( this, SVX_RES( RID_SVXCTL_FT_TARGET ) );
+ pOwnData->pFtTarget->Show();
+
+ // nur temporaer bis Vollupdate
+ pOwnData->pCbbTarget = new ComboBox( this, SVX_RES( RID_SVXCTL_CBB_TARGET ) );
+ pOwnData->pCbbTarget->Show();
+
+ pIMapWnd->SetInfoLink( LINK( this, SvxIMapDlg, InfoHdl ) );
+ pIMapWnd->SetMousePosLink( LINK( this, SvxIMapDlg, MousePosHdl ) );
+ pIMapWnd->SetGraphSizeLink( LINK( this, SvxIMapDlg, GraphSizeHdl ) );
+ pIMapWnd->SetUpdateLink( LINK( this, SvxIMapDlg, StateHdl ) );
+
+ aCbbURL.SetModifyHdl( LINK( this, SvxIMapDlg, URLModifyHdl ) );
+ aCbbURL.SetSelectHdl( LINK( this, SvxIMapDlg, URLModifyHdl ) );
+ aCbbURL.SetLoseFocusHdl( LINK( this, SvxIMapDlg, URLLoseFocusHdl ) );
+ aEdtText.SetModifyHdl( LINK( this, SvxIMapDlg, URLModifyHdl ) );
+ pOwnData->pCbbTarget->SetLoseFocusHdl( LINK( this, SvxIMapDlg, URLLoseFocusHdl ) );
+
+ aTbxIMapDlg1.SetSizePixel( aTbxIMapDlg1.CalcWindowSizePixel() );
+ aTbxIMapDlg1.SetSelectHdl( LINK( this, SvxIMapDlg, TbxClickHdl ) );
+ aTbxIMapDlg1.CheckItem( TBI_SELECT, TRUE );
+ TbxClickHdl( &aTbxIMapDlg1 );
+
+ SetMinOutputSizePixel( aLastSize = GetOutputSizePixel() );
+
+ aStbStatus.InsertItem( 1, 130, SIB_LEFT | SIB_IN | SIB_AUTOSIZE );
+ aStbStatus.InsertItem( 2, 10 + GetTextWidth( String::CreateFromAscii( " 9999,99 cm / 9999,99 cm ") ), SIB_CENTER | SIB_IN );
+ aStbStatus.InsertItem( 3, 10 + GetTextWidth( String::CreateFromAscii( " 9999,99 cm x 9999,99 cm ") ), SIB_CENTER | SIB_IN );
+
+ aFtURL.Disable();
+ aCbbURL.Disable();
+ aFtText.Disable();
+ aEdtText.Disable();
+ pOwnData->pFtTarget->Disable();
+ pOwnData->pCbbTarget->Disable();
+ pOwnData->bExecState = FALSE;
+
+ Resize();
+
+ EnableDrop(TRUE);
+
+ pOwnData->aTimer.SetTimeout( 100 );
+ pOwnData->aTimer.SetTimeoutHdl( LINK( this, SvxIMapDlg, UpdateHdl ) );
+
+ aTbxIMapDlg1.EnableItem( TBI_ACTIVE, FALSE );
+ aTbxIMapDlg1.EnableItem( TBI_MACRO, FALSE );
+ aTbxIMapDlg1.EnableItem( TBI_PROPERTY, FALSE );
+}
+
+
+/*************************************************************************
+|*
+|* Dtor
+|*
+\************************************************************************/
+
+SvxIMapDlg::~SvxIMapDlg()
+{
+ // URL-Liste loeschen
+ delete pOwnData->pCbbTarget;
+ delete pOwnData->pFtTarget;
+ delete pIMapWnd;
+ delete pOwnData;
+}
+
+
+/*************************************************************************
+|*
+|* Resize-Methode
+|*
+\************************************************************************/
+
+void SvxIMapDlg::Resize()
+{
+ SfxFloatingWindow::Resize();
+
+ Size aMinSize( GetMinOutputSizePixel() );
+ Size aNewSize( GetOutputSizePixel() );
+
+ if ( aNewSize.Height() >= aMinSize.Height() )
+ {
+ Size aSize( aStbStatus.GetSizePixel() );
+ Point aPoint( 0, aNewSize.Height() - aSize.Height() );
+
+ // StatusBar positionieren
+ aStbStatus.SetPosSizePixel( aPoint, Size( aNewSize.Width(), aSize.Height() ) );
+ aStbStatus.Show();
+
+ // EditWindow positionieren
+ aSize.Width() = aNewSize.Width() - 18;
+ aSize.Height() = aPoint.Y() - pIMapWnd->GetPosPixel().Y() - 6;
+ pIMapWnd->SetSizePixel( aSize );
+
+ aLastSize = aNewSize;
+ }
+}
+
+
+/*************************************************************************
+|*
+|* Close-Methode
+|*
+\************************************************************************/
+
+BOOL SvxIMapDlg::Close()
+{
+ BOOL bRet = TRUE;
+
+ if ( aTbxIMapDlg1.IsItemEnabled( TBI_APPLY ) )
+ {
+ QueryBox aQBox( this, WB_YES_NO_CANCEL | WB_DEF_YES,
+ String( SVX_RES( STR_IMAPDLG_MODIFY ) ) );
+ const long nRet = aQBox.Execute();
+
+ if( nRet == RET_YES )
+ {
+ SfxBoolItem aBoolItem( SID_IMAP_EXEC, TRUE );
+ GetBindings().GetDispatcher()->Execute(
+ SID_IMAP_EXEC, SFX_CALLMODE_SYNCHRON | SFX_CALLMODE_RECORD, &aBoolItem, 0L );
+ }
+ else if( nRet == RET_CANCEL )
+ bRet = FALSE;
+ }
+ else if( pIMapWnd->IsChanged() )
+ {
+ QueryBox aQBox( this, WB_YES_NO_CANCEL | WB_DEF_YES,
+ String( SVX_RES( STR_IMAPDLG_SAVE ) ) );
+ const long nRet = aQBox.Execute();
+
+ if( nRet == RET_YES )
+ bRet = DoSave();
+ else if( nRet == RET_CANCEL )
+ bRet = FALSE;
+ }
+
+ return( bRet ? SfxFloatingWindow::Close() : FALSE );
+}
+
+
+/*************************************************************************
+|*
+|* Enabled oder disabled alle Controls
+|*
+\************************************************************************/
+
+void SvxIMapDlg::SetExecState( BOOL bEnable )
+{
+ pOwnData->bExecState = bEnable;
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+void SvxIMapDlg::SetGraphic( const Graphic& rGraphic )
+{
+ pIMapWnd->SetGraphic( rGraphic );
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+void SvxIMapDlg::SetImageMap( const ImageMap& rImageMap )
+{
+ pIMapWnd->SetImageMap( rImageMap );
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+const ImageMap& SvxIMapDlg::GetImageMap() const
+{
+ return pIMapWnd->GetImageMap();
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+void SvxIMapDlg::SetTargetList( const TargetList& rTargetList )
+{
+ TargetList aNewList( rTargetList );
+
+ pIMapWnd->SetTargetList( aNewList );
+
+ pOwnData->pCbbTarget->Clear();
+
+ for( String* pStr = aNewList.First(); pStr; pStr = aNewList.Next() )
+ pOwnData->pCbbTarget->InsertEntry( *pStr );
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+const TargetList& SvxIMapDlg::GetTargetList() const
+{
+ return pIMapWnd->GetTargetList();
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+void SvxIMapDlg::Update( const Graphic& rGraphic, const ImageMap* pImageMap,
+ const TargetList* pTargetList, void* pEditingObj )
+{
+ pOwnData->aUpdateGraphic = rGraphic;
+
+ if ( pImageMap )
+ pOwnData->aUpdateImageMap = *pImageMap;
+ else
+ pOwnData->aUpdateImageMap.ClearImageMap();
+
+ pOwnData->pUpdateEditingObject = pEditingObj;
+
+ // UpdateTargetList loeschen, da diese Methode
+ // vor dem Zuschlagen des Update-Timers noch
+ // mehrmals gerufen werden kann( #46540 )
+ for( String* pStr = pOwnData->aUpdateTargetList.First(); pStr; pStr = pOwnData->aUpdateTargetList.Next() )
+ delete pStr;
+ pOwnData->aUpdateTargetList.Clear();
+
+ // TargetListe muss kopiert werden, da sie im
+ // Besitz des Aufrufers ist und von ihm nach diesem
+ // Aufruf sofort geloescht werden kann;
+ // die kopierte Liste wird im Handler wieder geloescht
+ if( pTargetList )
+ {
+ TargetList aTargetList( *pTargetList );
+
+ for( String* pStr = aTargetList.First(); pStr; pStr = aTargetList.Next() )
+ pOwnData->aUpdateTargetList.Insert( new String( *pStr ) );
+ }
+
+ pOwnData->aTimer.Start();
+}
+
+
+/*************************************************************************
+|*
+|* Click-Hdl fuer ToolBox
+|*
+\************************************************************************/
+
+IMPL_LINK( SvxIMapDlg, TbxClickHdl, ToolBox*, pTbx )
+{
+ USHORT nNewItemId = pTbx->GetCurItemId();
+
+ URLLoseFocusHdl( NULL );
+
+ switch( pTbx->GetCurItemId() )
+ {
+ case( TBI_APPLY ):
+ {
+ SfxBoolItem aBoolItem( SID_IMAP_EXEC, TRUE );
+ GetBindings().GetDispatcher()->Execute(
+ SID_IMAP_EXEC, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD, &aBoolItem, 0L );
+ }
+ break;
+
+ case( TBI_OPEN ):
+ DoOpen();
+ break;
+
+ case( TBI_SAVEAS ):
+ DoSave();
+ break;
+
+ case( TBI_SELECT ):
+ {
+ pTbx->CheckItem( nNewItemId, TRUE );
+ pIMapWnd->SetEditMode( TRUE );
+ }
+ break;
+
+ case( TBI_RECT ):
+ {
+ pTbx->CheckItem( nNewItemId, TRUE );
+ pIMapWnd->SetObjKind( OBJ_RECT );
+ }
+ break;
+
+ case( TBI_CIRCLE ):
+ {
+ pTbx->CheckItem( nNewItemId, TRUE );
+ pIMapWnd->SetObjKind( OBJ_CIRC );
+ }
+ break;
+
+ case( TBI_POLY ):
+ {
+ pTbx->CheckItem( nNewItemId, TRUE );
+ pIMapWnd->SetObjKind( OBJ_POLY );
+ }
+ break;
+
+ case( TBI_FREEPOLY ):
+ {
+ pTbx->CheckItem( nNewItemId, TRUE );
+ pIMapWnd->SetObjKind( OBJ_FREEFILL );
+ }
+ break;
+
+ case( TBI_ACTIVE ):
+ {
+ BOOL bNewState = !pTbx->IsItemChecked( TBI_ACTIVE );
+
+ pTbx->CheckItem( TBI_ACTIVE, bNewState );
+ pIMapWnd->SetCurrentObjState( !bNewState );
+ }
+ break;
+
+ case( TBI_MACRO ):
+ pIMapWnd->DoMacroAssign();
+ break;
+
+ case( TBI_PROPERTY ):
+ pIMapWnd->DoPropertyDialog();
+ break;
+
+ case( TBI_POLYEDIT ):
+ pIMapWnd->SetPolyEditMode( pTbx->IsItemChecked( TBI_POLYEDIT ) ? SID_BEZIER_MOVE : 0 );
+ break;
+
+ case( TBI_POLYMOVE ):
+ pIMapWnd->SetPolyEditMode( SID_BEZIER_MOVE );
+ break;
+
+ case( TBI_POLYINSERT ):
+ pIMapWnd->SetPolyEditMode( SID_BEZIER_INSERT );
+ break;
+
+ case( TBI_POLYDELETE ):
+ pIMapWnd->GetSdrView()->DeleteMarkedPoints();
+ break;
+
+ case( TBI_UNDO ):
+ pIMapWnd->GetSdrModel()->Undo();
+ break;
+
+ case( TBI_REDO ):
+ pIMapWnd->GetSdrModel()->Redo();
+ break;
+
+ default:
+ break;
+ }
+
+ return 0;
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+void SvxIMapDlg::DoOpen()
+{
+ SfxSimpleFileDialog aDlg( this, WB_3DLOOK | WB_OPEN );
+ ImageMap aLoadIMap;
+ const String aFilter( String::CreateFromAscii( IMAP_ALL_FILTER ) );
+
+#ifdef MAC
+ aDlg.AddFilter( aFilter, String::CreateFromAscii( IMAP_ALL_TYPE ), "XXXX0" );
+ aDlg.AddFilter( String::CreateFromAscii( IMAP_CERN_FILTER ), String::CreateFromAscii( IMAP_CERN_TYPE ), "XXXX0" );
+ aDlg.AddFilter( String::CreateFromAscii( IMAP_NCSA_FILTER ), String::CreateFromAscii( IMAP_NCSA_TYPE ), "XXXX0" );
+ aDlg.AddFilter( String::CreateFromAscii( IMAP_BINARY_FILTER ), String::CreateFromAscii( IMAP_BINARY_TYPE ), "XXXX0" );
+#else
+ aDlg.AddFilter( aFilter, String::CreateFromAscii( IMAP_ALL_TYPE ) );
+ aDlg.AddFilter( String::CreateFromAscii( IMAP_CERN_FILTER ), String::CreateFromAscii( IMAP_CERN_TYPE ) );
+ aDlg.AddFilter( String::CreateFromAscii( IMAP_NCSA_FILTER ), String::CreateFromAscii( IMAP_NCSA_TYPE ) );
+ aDlg.AddFilter( String::CreateFromAscii( IMAP_BINARY_FILTER ), String::CreateFromAscii( IMAP_BINARY_TYPE ) );
+#endif
+
+ aDlg.SetCurFilter( aFilter );
+ aDlg.SetPath( SFX_INIMANAGER()->Get( SFX_KEY_GRAPHICS_PATH ) );
+ aDlg.SetDefaultExt( String::CreateFromAscii( IMAP_BINARY_EXT ) );
+
+ if ( aDlg.Execute() == RET_OK )
+ {
+ SvFileStream aIStm( aDlg.GetPath(), STREAM_READ );
+
+ if ( aIStm.IsOpen() )
+ {
+ aLoadIMap.Read( aIStm, IMAP_FORMAT_DETECT );
+
+ if ( !aIStm.GetError() )
+ pIMapWnd->SetImageMap( aLoadIMap );
+ else
+ ErrorHandler::HandleError( ERRCODE_IO_GENERAL );
+ }
+ else
+ ErrorHandler::HandleError( ERRCODE_IO_GENERAL );
+ }
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+BOOL SvxIMapDlg::DoSave()
+{
+ SfxSimpleFileDialog aDlg( this, WB_3DLOOK | WB_SAVEAS );
+ const String aBinFilter( String::CreateFromAscii( IMAP_BINARY_FILTER ) );
+ const String aCERNFilter( String::CreateFromAscii( IMAP_CERN_FILTER ) );
+ const String aNCSAFilter( String::CreateFromAscii( IMAP_NCSA_FILTER ) );
+ SdrModel* pModel = pIMapWnd->GetSdrModel();
+ const BOOL bChanged = pModel->IsChanged();
+ BOOL bRet;
+
+#ifdef MAC
+ aDlg.AddFilter( aCERNFilter, String::CreateFromAscii( IMAP_CERN_TYPE ), "XXXX0" );
+ aDlg.AddFilter( aNCSAFilter, String::CreateFromAscii( IMAP_NCSA_TYPE ), "XXXX0" );
+ aDlg.AddFilter( aBinFilter, String::CreateFromAscii( IMAP_BINARY_TYPE ), "XXXX0" );
+#else
+ aDlg.AddFilter( aCERNFilter, String::CreateFromAscii( IMAP_CERN_TYPE ) );
+ aDlg.AddFilter( aNCSAFilter, String::CreateFromAscii( IMAP_NCSA_TYPE ) );
+ aDlg.AddFilter( aBinFilter, String::CreateFromAscii( IMAP_BINARY_TYPE ) );
+#endif
+
+ aDlg.SetCurFilter( aCERNFilter );
+ aDlg.SetPath( SFX_INIMANAGER()->Get( SFX_KEY_GRAPHICS_PATH ) );
+ aDlg.SetDefaultExt( String::CreateFromAscii( IMAP_BINARY_EXT ) );
+
+ if( aDlg.Execute() == RET_OK )
+ {
+ String aPath( aDlg.GetPath() );
+ const String aFilter( aDlg.GetCurFilter() );
+ String aExt;
+ ULONG nFormat;
+
+ if ( aFilter == aBinFilter )
+ {
+ nFormat = IMAP_FORMAT_BIN;
+ aExt = String::CreateFromAscii( IMAP_BINARY_EXT );
+ }
+ else if ( aFilter == aCERNFilter )
+ {
+ nFormat = IMAP_FORMAT_CERN;
+ aExt = String::CreateFromAscii( IMAP_CERN_EXT );
+ }
+ else if ( aFilter == aNCSAFilter )
+ {
+ nFormat = IMAP_FORMAT_NCSA;
+ aExt = String::CreateFromAscii( IMAP_NCSA_EXT );
+ }
+
+ INetURLObject aURL;
+ aURL.SetSmartURL( aPath );
+
+ if( !aURL.getExtension().Len() )
+ {
+ aURL.setExtension( aExt );
+ aPath = aURL.PathToFileName();
+ }
+
+ SvFileStream aOStm( aPath, STREAM_WRITE | STREAM_TRUNC );
+ const ImageMap& rImageMap = pIMapWnd->GetImageMap();
+
+ if ( aOStm.IsOpen() )
+ {
+ rImageMap.Write( aOStm, nFormat );
+
+ if ( aOStm.GetError() )
+ ErrorHandler::HandleError( ERRCODE_IO_GENERAL );
+ }
+ else
+ ErrorHandler::HandleError( ERRCODE_IO_GENERAL );
+
+ // Status restaurieren, da 'GetImageMap' den Status zuruecksetzt
+ pModel->SetChanged( bChanged );
+ bRet = TRUE;
+ }
+ else
+ bRet = FALSE;
+
+ return bRet;
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+IMPL_LINK( SvxIMapDlg, InfoHdl, IMapWindow*, pWnd )
+{
+ String aStr;
+ const NotifyInfo& rInfo = pWnd->GetInfo();
+
+ if ( rInfo.bNewObj )
+ {
+ if( rInfo.aMarkURL.Len() && ( aCbbURL.GetEntryPos( rInfo.aMarkURL ) == LISTBOX_ENTRY_NOTFOUND ) )
+ aCbbURL.InsertEntry( rInfo.aMarkURL );
+
+ aCbbURL.SetText( rInfo.aMarkURL );
+ aEdtText.SetText( rInfo.aMarkDescription );
+
+ if ( !rInfo.aMarkTarget.Len() )
+ pOwnData->pCbbTarget->SetText( String::CreateFromAscii( SELF_TARGET ) );
+ else
+ pOwnData->pCbbTarget->SetText( rInfo.aMarkTarget );
+ }
+
+ if ( !rInfo.bOneMarked )
+ {
+ aTbxIMapDlg1.CheckItem( TBI_ACTIVE, FALSE );
+ aTbxIMapDlg1.EnableItem( TBI_ACTIVE, FALSE );
+ aTbxIMapDlg1.EnableItem( TBI_MACRO, FALSE );
+ aTbxIMapDlg1.EnableItem( TBI_PROPERTY, FALSE );
+ aStbStatus.SetItemText( 1, aStr );
+
+ aFtURL.Disable();
+ aCbbURL.Disable();
+ aFtText.Disable();
+ aEdtText.Disable();
+ pOwnData->pFtTarget->Disable();
+ pOwnData->pCbbTarget->Disable();
+
+ aCbbURL.SetText( String() );
+ aEdtText.SetText( String() );
+ }
+ else
+ {
+ aTbxIMapDlg1.EnableItem( TBI_ACTIVE, TRUE );
+ aTbxIMapDlg1.CheckItem( TBI_ACTIVE, !rInfo.bActivated );
+ aTbxIMapDlg1.EnableItem( TBI_MACRO, TRUE );
+ aTbxIMapDlg1.EnableItem( TBI_PROPERTY, TRUE );
+
+ aFtURL.Enable();
+ aCbbURL.Enable();
+ aFtText.Enable();
+ aEdtText.Enable();
+ pOwnData->pFtTarget->Enable();
+ pOwnData->pCbbTarget->Enable();
+
+ aStbStatus.SetItemText( 1, rInfo.aMarkURL );
+
+ if ( aCbbURL.GetText() != rInfo.aMarkURL )
+ aCbbURL.SetText( rInfo.aMarkURL );
+
+ if ( aEdtText.GetText() != rInfo.aMarkDescription )
+ aEdtText.SetText( rInfo.aMarkDescription );
+
+ if ( !rInfo.aMarkTarget.Len() )
+ pOwnData->pCbbTarget->SetText( String::CreateFromAscii( SELF_TARGET ) );
+ else
+ pOwnData->pCbbTarget->SetText( rInfo.aMarkTarget );
+ }
+
+ return 0;
+}
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+IMPL_LINK( SvxIMapDlg, MousePosHdl, IMapWindow*, pWnd )
+{
+ String aStr;
+ FieldUnit eFieldUnit;
+ const Point& rMousePos = pWnd->GetMousePos();
+ const sal_Unicode cSep = International().GetNumDecimalSep();
+
+ GET_MODULE_FIELDUNIT( eFieldUnit );
+
+ aStr.Assign( GetUnitString( rMousePos.X(), eFieldUnit, cSep ) );
+ aStr.Append( String::CreateFromAscii( " / " ) );
+ aStr.Append( GetUnitString( rMousePos.Y(), eFieldUnit, cSep ) );
+
+ aStbStatus.SetItemText( 2, aStr );
+
+ return 0L;
+}
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+IMPL_LINK( SvxIMapDlg, GraphSizeHdl, IMapWindow*, pWnd )
+{
+ String aStr;
+ FieldUnit eFieldUnit;
+ const Size& rSize = pWnd->GetGraphicSize();
+ const sal_Unicode cSep = International().GetNumDecimalSep();
+
+ GET_MODULE_FIELDUNIT( eFieldUnit );
+
+ aStr.Assign( GetUnitString( rSize.Width(), eFieldUnit, cSep ) );
+ aStr.Append( String::CreateFromAscii( " x " ) );
+ aStr.Append( GetUnitString( rSize.Height(), eFieldUnit, cSep ) );
+
+ aStbStatus.SetItemText( 3, aStr );
+
+ return 0L;
+}
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+IMPL_LINK( SvxIMapDlg, URLModifyHdl, void*, p )
+{
+ NotifyInfo aNewInfo;
+
+ aNewInfo.aMarkURL = aCbbURL.GetText();
+ aNewInfo.aMarkDescription = aEdtText.GetText();
+ aNewInfo.aMarkTarget = pOwnData->pCbbTarget->GetText();
+
+ pIMapWnd->ReplaceActualIMapInfo( aNewInfo );
+
+ return 0;
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+IMPL_LINK( SvxIMapDlg, URLLoseFocusHdl, void*, p )
+{
+ NotifyInfo aNewInfo;
+ const String aURLText( aCbbURL.GetText() );
+ const String aTargetText( pOwnData->pCbbTarget->GetText() );
+
+ if ( aURLText.Len() )
+ {
+ aNewInfo.aMarkURL = ::URIHelper::SmartRelToAbs( aURLText, FALSE,
+ INetURLObject::WAS_ENCODED,
+ INetURLObject::DECODE_UNAMBIGUOUS );
+ }
+ else
+ aNewInfo.aMarkURL = aURLText;
+
+ aNewInfo.aMarkDescription = aEdtText.GetText();
+
+ if ( !aTargetText.Len() )
+ aNewInfo.aMarkTarget = String::CreateFromAscii( SELF_TARGET );
+ else
+ aNewInfo.aMarkTarget = aTargetText;
+
+ pIMapWnd->ReplaceActualIMapInfo( aNewInfo );
+
+ return 0;
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+IMPL_LINK( SvxIMapDlg, UpdateHdl, Timer*, pTimer )
+{
+ pOwnData->aTimer.Stop();
+
+ if ( pOwnData->pUpdateEditingObject != pCheckObj )
+ {
+ if ( pIMapWnd->IsChanged() &&
+ ( QueryBox( this, WB_YES_NO | WB_DEF_YES,
+ String( SVX_RES( STR_IMAPDLG_SAVE ) ) ).Execute() == RET_YES ) )
+ {
+ DoSave();
+ }
+
+ SetGraphic( pOwnData->aUpdateGraphic );
+ SetImageMap( pOwnData->aUpdateImageMap );
+ SetTargetList( pOwnData->aUpdateTargetList );
+ SetEditingObject( pOwnData->pUpdateEditingObject );
+
+ // Nach Wechsel => default Selektion
+ aTbxIMapDlg1.CheckItem( TBI_SELECT, TRUE );
+ pIMapWnd->SetEditMode( TRUE );
+ }
+
+ // die in der Update-Methode kopierte Liste wieder loeschen
+ for( String* pStr = pOwnData->aUpdateTargetList.First(); pStr; pStr = pOwnData->aUpdateTargetList.Next() )
+ delete pStr;
+
+ pOwnData->aUpdateTargetList.Clear();
+
+ GetBindings().Invalidate( SID_IMAP_EXEC );
+
+ return 0L;
+}
+
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+IMPL_LINK( SvxIMapDlg, StateHdl, IMapWindow*, pWnd )
+{
+ const SdrObject* pObj = pWnd->GetSelectedSdrObject();
+ const SdrModel* pModel = pWnd->GetSdrModel();
+ const SdrView* pView = pWnd->GetSdrView();
+ const BOOL bPolyEdit = ( pObj != NULL ) && pObj->ISA( SdrPathObj );
+ const BOOL bDrawEnabled = !( bPolyEdit && aTbxIMapDlg1.IsItemChecked( TBI_POLYEDIT ) );
+
+ aTbxIMapDlg1.EnableItem( TBI_APPLY, pOwnData->bExecState && pWnd->IsChanged() );
+
+ aTbxIMapDlg1.EnableItem( TBI_SELECT, bDrawEnabled );
+ aTbxIMapDlg1.EnableItem( TBI_RECT, bDrawEnabled );
+ aTbxIMapDlg1.EnableItem( TBI_CIRCLE, bDrawEnabled );
+ aTbxIMapDlg1.EnableItem( TBI_POLY, bDrawEnabled );
+ aTbxIMapDlg1.EnableItem( TBI_FREEPOLY, bDrawEnabled );
+
+ // BezierEditor-Stati
+ aTbxIMapDlg1.EnableItem( TBI_POLYEDIT, bPolyEdit );
+ aTbxIMapDlg1.EnableItem( TBI_POLYMOVE, !bDrawEnabled );
+ aTbxIMapDlg1.EnableItem( TBI_POLYINSERT, !bDrawEnabled );
+ aTbxIMapDlg1.EnableItem( TBI_POLYDELETE, !bDrawEnabled && pView->IsDeleteMarkedPointsPossible() );
+
+ // Undo/Redo
+ aTbxIMapDlg1.EnableItem( TBI_UNDO, pModel->GetUndoActionCount() > 0 );
+ aTbxIMapDlg1.EnableItem( TBI_REDO, pModel->GetRedoActionCount() > 0 );
+
+ if ( bPolyEdit )
+ {
+ USHORT nId = 0;
+
+ switch( pWnd->GetPolyEditMode() )
+ {
+ case( SID_BEZIER_MOVE ): nId = TBI_POLYMOVE; break;
+ case( SID_BEZIER_INSERT ): nId = TBI_POLYINSERT; break;
+
+ default:
+ break;
+ }
+
+ aTbxIMapDlg1.CheckItem( nId, TRUE );
+ }
+ else
+ {
+ aTbxIMapDlg1.CheckItem( TBI_POLYEDIT, FALSE );
+ aTbxIMapDlg1.CheckItem( TBI_POLYMOVE, TRUE );
+ aTbxIMapDlg1.CheckItem( TBI_POLYINSERT, FALSE );
+ pWnd->SetPolyEditMode( 0 );
+ }
+
+ return 0L;
+}
+
+
diff --git a/svx/source/dialog/imapdlg.hrc b/svx/source/dialog/imapdlg.hrc
new file mode 100644
index 000000000000..8a447176bd2c
--- /dev/null
+++ b/svx/source/dialog/imapdlg.hrc
@@ -0,0 +1,157 @@
+/*************************************************************************
+ *
+ * $RCSfile: imapdlg.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:09 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#include <dialogs.hrc>
+
+
+// ImapDlg-Dialoge
+#define RID_SVX_IMAPDLG_START RID_SVX_IMAP_START
+
+
+/******************************************************************************/
+
+
+#define RID_SVXDLG_IMAP (RID_SVX_IMAPDLG_START)
+#define RID_SVXCTL_IMAP (RID_SVX_IMAPDLG_START + 7)
+
+#define TBX_IMAPDLG1 1
+#define TBI_APPLY 1
+#define TBI_OPEN 2
+#define TBI_SAVEAS 3
+
+#define TBI_SELECT 4
+#define TBI_RECT 5
+#define TBI_CIRCLE 6
+#define TBI_POLY 7
+#define TBI_FREEPOLY 8
+
+#define TBI_ACTIVE 16
+#define TBI_COLOR 17
+#define TBI_MACRO 18
+#define TBI_PROPERTY 19
+
+#define TBI_POLYEDIT 30
+#define TBI_POLYMOVE 31
+#define TBI_POLYINSERT 32
+#define TBI_POLYDELETE 33
+
+#define TBI_UNDO 40
+#define TBI_REDO 41
+
+#define FT_URL 1
+#define FT_TEXT 2
+#define FT_TARG 3
+#define CBB_URL 1
+#define EDT_TEXT 1
+#define LB_TARG 1
+
+#define STB_STATUS 1
+
+
+/******************************************************************************/
+
+
+#define RID_SVXMN_IMAP (RID_SVX_IMAPDLG_START + 1)
+
+#define MN_URL 1
+#define MN_POSITION 2
+#define MN_FRAME_TO_TOP 3
+#define MN_MOREFRONT 4
+#define MN_MOREBACK 5
+#define MN_FRAME_TO_BOTTOM 6
+#define MN_MARK_ALL 7
+#define MN_DELETE 8
+#define MN_ACTIVATE 9
+#define MN_MACRO 10
+
+
+/******************************************************************************/
+
+
+#define RID_SVXDLG_IMAPURL (RID_SVX_IMAPDLG_START + 2)
+
+#define FT_URLDESCRIPTION 1
+#define FT_URL1 2
+#define FT_TARGET 3
+#define FT_NAME 4
+#define EDT_URLDESCRIPTION 1
+#define EDT_URL 2
+#define EDT_NAME 3
+#define BTN_OK 1
+#define BTN_CANCEL 2
+#define GRP_URL 1
+#define CBB_TARGETS 1
+
+
+/******************************************************************************/
+
+
+#define RID_SVXCTL_FT_TARGET (RID_SVX_IMAPDLG_START + 3)
+#define RID_SVXCTL_CBB_TARGET (RID_SVX_IMAPDLG_START + 4)
+
+
+/******************************************************************************/
+
+
+#define STR_IMAPDLG_SAVE (RID_SVX_IMAPDLG_START + 5)
+#define STR_IMAPDLG_MODIFY (RID_SVX_IMAPDLG_START + 6)
+
+
+/******************************************************************************/
diff --git a/svx/source/dialog/imapdlg.src b/svx/source/dialog/imapdlg.src
new file mode 100644
index 000000000000..cef513f2490e
--- /dev/null
+++ b/svx/source/dialog/imapdlg.src
@@ -0,0 +1,1355 @@
+/*************************************************************************
+ *
+ * $RCSfile: imapdlg.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:09 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+ // include ---------------------------------------------------------------
+#include "helpid.hrc"
+#include "imapdlg.hrc"
+ // pragma ----------------------------------------------------------------
+
+ // RID_SVXDLG_IMAP ----------------------------------------------------
+FloatingWindow RID_SVXDLG_IMAP
+{
+ OutputSize = TRUE ;
+ Hide = TRUE ;
+ SVLook = TRUE ;
+ Pos = MAP_APPFONT ( 0 , 0 ) ;
+ Size = MAP_APPFONT ( 270 , 213 ) ;
+ Text = "ImageMap-Editor" ;
+ Text [ ENGLISH ] = "Image Map Editor" ;
+ Sizeable = TRUE ;
+ Moveable = TRUE ;
+ Closeable = TRUE ;
+ Zoomable = TRUE ;
+ ToolBox TBX_IMAPDLG1
+ {
+ SVLook = TRUE ;
+ Pos = MAP_APPFONT ( 6 , 6 ) ;
+ HelpId = HID_IMAPDLG_TOOLBOX ;
+ ItemList =
+ {
+ ToolBoxItem
+ {
+ Identifier = TBI_APPLY ;
+ HelpId = HID_IMAPDLG_APPLY ;
+ Text = "Zuweisen" ;
+ Text [ ENGLISH ] = "Apply" ;
+ ItemImage = Image
+ {
+ ImageBitmap = Bitmap { File = "apply.bmp" ; };
+ MaskColor = Color { Red = 0xC000 ; Green = 0xC000 ; Blue = 0xC000 ; };
+ };
+ Text [ english_us ] = "Apply" ;
+ Text [ italian ] = "Assegna" ;
+ Text [ spanish ] = "Asignar" ;
+ Text [ french ] = "Assigner" ;
+ Text [ dutch ] = "Toewijzen" ;
+ Text [ swedish ] = "Tilldela" ;
+ Text [ danish ] = "Tildel" ;
+ Text [ portuguese ] = "Aplicar" ;
+ Text [ portuguese_brazilian ] = "Zuweisen" ;
+ Text[ chinese_simplified ] = "Ӧ";
+ Text[ russian ] = "";
+ Text[ polish ] = "Przypisz";
+ Text[ japanese ] = "Kp";
+ Text[ chinese_traditional ] = "ϥ";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "Uygula";
+ Text[ language_user1 ] = " ";
+ };
+ ToolBoxItem
+ {
+ Identifier = TBI_OPEN ;
+ HelpId = HID_IMAPDLG_OPEN ;
+ /* ### ACHTUNG: Neuer Text in Resource? ffnen... : ffnen... */
+ /* ### ACHTUNG: Neuer Text in Resource? ffnen... : ffnen... */
+ Text = "ffnen..." ;
+ Text [ ENGLISH ] = "Open..." ;
+ ItemImage = Image
+ {
+ ImageBitmap = Bitmap { File = "sc05501.bmp" ; };
+ MaskColor = Color { Red = 0xC000 ; Green = 0xC000 ; Blue = 0xC000 ; };
+ };
+ Text [ dutch ] = "Openen..." ;
+ Text [ english_us ] = "Open..." ;
+ Text [ italian ] = "Apri..." ;
+ Text [ spanish ] = "Abrir..." ;
+ Text [ french ] = "Ouvrir..." ;
+ Text [ swedish ] = "ppna..." ;
+ Text [ danish ] = "bn" ;
+ Text [ portuguese ] = "Abrir..." ;
+ Text [ portuguese_brazilian ] = "ffnen..." ;
+ Text[ chinese_simplified ] = "...";
+ Text[ russian ] = "...";
+ Text[ polish ] = "Otwrz...";
+ Text[ japanese ] = "J...";
+ Text[ chinese_traditional ] = "}...";
+ Text[ arabic ] = "...";
+ Text[ greek ] = "...";
+ Text[ korean ] = "...";
+ Text[ turkish ] = "A...";
+ Text[ language_user1 ] = " ";
+ };
+ ToolBoxItem
+ {
+ Identifier = TBI_SAVEAS ;
+ HelpId = HID_IMAPDLG_SAVEAS ;
+
+ Text= "Speichern...";
+ Text [ ENGLISH ] = "Save..." ;
+ Text [ english_us ] = "Save..." ;
+ Text [ dutch ] = "Opslaan..." ;
+ Text [ italian ] = "Salva..." ;
+ Text [ spanish ] = "Guardar..." ;
+ Text [ french ] = "Enregistrer..." ;
+ Text [ swedish ] = "Spara..." ;
+ Text [ danish ] = "Gem..." ;
+ Text [ portuguese ] = "Guardar..." ;
+ Text [ portuguese_brazilian ] = "Speichern..." ;
+ Text[ arabic ] = "...";
+ Text[ chinese_simplified ] = "...";
+ Text[ chinese_traditional ] = "xs...";
+ Text[ japanese ] = "ۑ...";
+
+ ItemImage = Image
+ {
+ ImageBitmap = Bitmap { File = "sc05502.bmp" ; };
+ MaskColor = Color { Red = 0xC000 ; Green = 0xC000 ; Blue = 0xC000 ; };
+ };
+ Text[ russian ] = "...";
+ Text[ greek ] = "...";
+ Text[ polish ] = "Zapisz...";
+ Text[ korean ] = "...";
+ Text[ turkish ] = "Kaydet...";
+ Text[ language_user1 ] = " ";
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SEPARATOR ;
+ };
+ ToolBoxItem
+ {
+ Identifier = TBI_SELECT ;
+ HelpId = HID_IMAPDLG_SELECT ;
+ Text = "Auswahl" ;
+ Text [ ENGLISH ] = "Selection" ;
+ RadioCheck = TRUE ;
+ AutoCheck = TRUE ;
+ ItemImage = Image
+ {
+ ImageBitmap = Bitmap { File = "sc10128.bmp" ; };
+ MaskColor = Color { Red = 0xC000 ; Green = 0xC000 ; Blue = 0xC000 ; };
+ };
+ Text [ dutch ] = "Selectie" ;
+ Text [ english_us ] = "Select" ;
+ Text [ italian ] = "Selezione" ;
+ Text [ spanish ] = "Seleccin" ;
+ Text [ french ] = "Slection" ;
+ Text [ swedish ] = "Urval" ;
+ Text [ danish ] = "Marker" ;
+ Text [ portuguese ] = "Seleccionar" ;
+ Text [ portuguese_brazilian ] = "Auswahl" ;
+ /* ### ACHTUNG: Neuer Text in Resource? Objekte auswhlen : Objekte auswhlen */
+ Text[ chinese_simplified ] = "ѡ";
+ Text[ russian ] = "";
+ Text[ polish ] = "Wybr";
+ Text[ japanese ] = "I";
+ Text[ chinese_traditional ] = "";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "Seim";
+ Text[ language_user1 ] = " ";
+ };
+ ToolBoxItem
+ {
+ Identifier = TBI_RECT ;
+ HelpId = HID_IMAPDLG_RECT ;
+ Text = "Rechteck" ;
+ Text [ ENGLISH ] = "Rectangle" ;
+ RadioCheck = TRUE ;
+ AutoCheck = TRUE ;
+ ItemImage = Image
+ {
+ ImageBitmap = Bitmap { File = "sc10104.bmp" ; };
+ MaskColor = Color { Red = 0xC000 ; Green = 0xC000 ; Blue = 0xC000 ; };
+ };
+ Text [ dutch ] = "Rechthoek" ;
+ Text [ english_us ] = "Rectangle" ;
+ Text [ italian ] = "Rettangolo" ;
+ Text [ spanish ] = "Rectngulo" ;
+ Text [ french ] = "Rectangle" ;
+ Text [ swedish ] = "Rektangel" ;
+ Text [ danish ] = "Rektangel" ;
+ Text [ portuguese ] = "Rectngulo" ;
+ Text [ portuguese_brazilian ] = "Rechteck" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "Prostokt";
+ Text[ japanese ] = "lp`";
+ Text[ chinese_traditional ] = "";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "簢";
+ Text[ turkish ] = "Dikdrtgen";
+ Text[ language_user1 ] = " ";
+ };
+ ToolBoxItem
+ {
+ Identifier = TBI_CIRCLE ;
+ HelpId = HID_IMAPDLG_CIRCLE ;
+ Text = "Ellipse" ;
+ Text [ ENGLISH ] = "Ellipse" ;
+ RadioCheck = TRUE ;
+ AutoCheck = TRUE ;
+ ItemImage = Image
+ {
+ ImageBitmap = Bitmap { File = "sc10110.bmp" ; };
+ MaskColor = Color { Red = 0xC000 ; Green = 0xC000 ; Blue = 0xC000 ; };
+ };
+ Text [ dutch ] = "Ellips" ;
+ Text [ english_us ] = "Ellipse" ;
+ Text [ italian ] = "Ellisse" ;
+ Text [ spanish ] = "Elipse" ;
+ Text [ french ] = "Ellipse" ;
+ Text [ swedish ] = "Ellips" ;
+ Text [ danish ] = "Ellipse" ;
+ Text [ portuguese ] = "Elipse" ;
+ Text [ portuguese_brazilian ] = "Ellipse" ;
+ Text[ chinese_simplified ] = "Բ";
+ Text[ russian ] = "";
+ Text[ polish ] = "Elipsa";
+ Text[ japanese ] = "ȉ~";
+ Text[ chinese_traditional ] = "";
+ Text[ arabic ] = " ";
+ Text[ greek ] = "";
+ Text[ korean ] = "Ÿ";
+ Text[ turkish ] = "Elips";
+ Text[ language_user1 ] = " ";
+ };
+ ToolBoxItem
+ {
+ Identifier = TBI_POLY ;
+ HelpId = HID_IMAPDLG_POLY ;
+ Text = "Polygon" ;
+ Text [ ENGLISH ] = "Polygon" ;
+ RadioCheck = TRUE ;
+ AutoCheck = TRUE ;
+ ItemImage = Image
+ {
+ ImageBitmap = Bitmap { File = "sc10117.bmp" ; };
+ MaskColor = Color { Red = 0xC000 ; Green = 0xC000 ; Blue = 0xC000 ; };
+ };
+ Text [ english_us ] = "Polygon" ;
+ Text [ italian ] = "Poligono" ;
+ Text [ spanish ] = "Polgono" ;
+ Text [ french ] = "Polygone" ;
+ Text [ dutch ] = "Veelhoek" ;
+ Text [ swedish ] = "Polygon" ;
+ Text [ danish ] = "Polygon" ;
+ Text [ portuguese ] = "Polgono" ;
+ Text [ portuguese_brazilian ] = "Polygon" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "Wielokt";
+ Text[ japanese ] = "p`";
+ Text[ chinese_traditional ] = "h";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "ٰ";
+ Text[ turkish ] = "okgen";
+ Text[ language_user1 ] = " ";
+ };
+ ToolBoxItem
+ {
+ Identifier = TBI_FREEPOLY ;
+ HelpId = HID_IMAPDLG_FREEPOLY ;
+ Text = "Freihandpolygon" ;
+ Text [ ENGLISH ] = "Freeline polygon" ;
+ Text [ english_us ] = "Freeform Polygon" ;
+ RadioCheck = TRUE ;
+ AutoCheck = TRUE ;
+ ItemImage = Image
+ {
+ ImageBitmap = Bitmap { File = "sc10463.bmp" ; };
+ MaskColor = Color { Red = 0xC000 ; Green = 0xC000 ; Blue = 0xC000 ; };
+ };
+ Text [ portuguese ] = "Polgono, forma livre" ;
+ Text [ portuguese_brazilian ] = "Freihandpolygon" ;
+ Text [ swedish ] = "Frihandspolygon" ;
+ Text [ danish ] = "Frihndspolygon" ;
+ Text [ italian ] = "Poligono a mano libera" ;
+ Text [ spanish ] = "Polgono a mano alzada" ;
+ Text [ french ] = "Polygone main leve" ;
+ Text [ dutch ] = "Vrije hand-veelhoek" ;
+ Text[ chinese_simplified ] = "ɶ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Dowolny wielokt";
+ Text[ japanese ] = "ذ̫т̑p`";
+ Text[ chinese_traditional ] = "ۥѦh";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ٰ";
+ Text[ turkish ] = "Serbest okgen";
+ Text[ language_user1 ] = " ";
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SEPARATOR ;
+ };
+ ToolBoxItem
+ {
+ Identifier = TBI_POLYEDIT ;
+ HelpId = HID_IMAPDLG_POLYEDIT ;
+ Text = "Punkte bearbeiten" ;
+ Text [ norwegian ] = "Edit Points" ;
+ Text [ italian ] = "Modifica punti" ;
+ Text [ portuguese_brazilian ] = "Editar Pontos" ;
+ Text [ portuguese ] = "Editar pontos" ;
+ Text [ finnish ] = "Muokkaa pisteit" ;
+ Text [ danish ] = "Rediger punkter" ;
+ Text [ french ] = "diter des points" ;
+ Text [ swedish ] = "Redigera punkter" ;
+ Text [ dutch ] = "Punten bewerken" ;
+ Text [ spanish ] = "Modificar puntos" ;
+ Text [ english_us ] = "Edit Points" ;
+ AutoCheck = TRUE ;
+ ItemImage = Image
+ {
+ ImageBitmap = Bitmap { File = "sc10126.bmp" ; };
+ MaskColor = Color { Red = 0xC000 ; Green = 0xC000 ; Blue = 0xC000 ; };
+ };
+ Text[ chinese_simplified ] = "༭";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Edytuj punkty";
+ Text[ japanese ] = "_̕ҏW";
+ Text[ chinese_traditional ] = "ܧI";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ";
+ Text[ turkish ] = "Noktalar dzenle";
+ Text[ language_user1 ] = " ";
+ };
+ ToolBoxItem
+ {
+ Identifier = TBI_POLYMOVE ;
+ HelpId = HID_IMAPDLG_POLYMOVE ;
+ Text = "Punkte verschieben" ;
+ Text [ ENGLISH ] = "Edit Points" ;
+ Text [ norwegian ] = "Edit Points" ;
+ Text [ italian ] = "Sposta punti" ;
+ Text [ portuguese_brazilian ] = "Editar Pontos" ;
+ Text [ portuguese ] = "Mover pontos" ;
+ Text [ finnish ] = "Muokkaa pisteit" ;
+ Text [ danish ] = "Flyt punkter" ;
+ Text [ french ] = "Dplacer des points" ;
+ Text [ swedish ] = "Flytta punkter" ;
+ Text [ dutch ] = "Punten verplaatsen" ;
+ Text [ spanish ] = "Desplazar puntos" ;
+ Text [ english_us ] = "Move Points" ;
+ RadioCheck = TRUE ;
+ AutoCheck = TRUE ;
+ ItemImage = Image
+ {
+ ImageBitmap = Bitmap { File = "sc10121.bmp" ; };
+ MaskColor = Color { Red = 0xC000 ; Green = 0xC000 ; Blue = 0xC000 ; };
+ };
+ Text[ chinese_simplified ] = "ƶ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Przenie punkty";
+ Text[ japanese ] = "_̈ړ";
+ Text[ chinese_traditional ] = "I";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ̵";
+ Text[ turkish ] = "Noktalar kaydr";
+ Text[ language_user1 ] = " ";
+ };
+ ToolBoxItem
+ {
+ Identifier = TBI_POLYINSERT ;
+ HelpId = HID_IMAPDLG_POLYINSERT ;
+ /* ### ACHTUNG: Neuer Text in Resource? Punkte einfgen : Punkte einfgen */
+ /* ### ACHTUNG: Neuer Text in Resource? Punkte einfgen : Punkte einfgen */
+ Text = "Punkte einfgen" ;
+ Text [ ENGLISH ] = "Insert Points" ;
+ Text [ norwegian ] = "Insert Points" ;
+ Text [ italian ] = "Inserisci punti" ;
+ Text [ portuguese_brazilian ] = "Inserir Pontos" ;
+ Text [ portuguese ] = "Inserir pontos" ;
+ Text [ finnish ] = "Lis pisteit" ;
+ Text [ danish ] = "Indst punkter" ;
+ Text [ french ] = "Insrer des points" ;
+ Text [ swedish ] = "Infoga punkter" ;
+ Text [ dutch ] = "Punten invoegen" ;
+ Text [ spanish ] = "Insertar puntos" ;
+ Text [ english_us ] = "Insert Points" ;
+ RadioCheck = TRUE ;
+ AutoCheck = TRUE ;
+ ItemImage = Image
+ {
+ ImageBitmap = Bitmap { File = "sc10119.bmp" ; };
+ MaskColor = Color { Red = 0xC000 ; Green = 0xC000 ; Blue = 0xC000 ; };
+ };
+ /* ### ACHTUNG: Neuer Text in Resource? Neue Punkte einfgen oder anhngen : Neue Punkte einfgen oder anhngen */
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Wstaw punkty";
+ Text[ japanese ] = "_̑}";
+ Text[ chinese_traditional ] = "JI";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ";
+ Text[ turkish ] = "Nokta ekle";
+ Text[ language_user1 ] = " ";
+ };
+ ToolBoxItem
+ {
+ Identifier = TBI_POLYDELETE ;
+ HelpId = HID_IMAPDLG_POLYDELETE ;
+ /* ### ACHTUNG: Neuer Text in Resource? Punkte lschen : Punkte lschen */
+ /* ### ACHTUNG: Neuer Text in Resource? Punkte lschen : Punkte lschen */
+ Text = "Punkte lschen" ;
+ Text [ ENGLISH ] = "Delete Points" ;
+ Text [ norwegian ] = "Delete Points" ;
+ Text [ italian ] = "Elimina punti" ;
+ Text [ portuguese_brazilian ] = "Apagar Pontos" ;
+ Text [ portuguese ] = "Eliminar pontos" ;
+ Text [ finnish ] = "Poista pisteit" ;
+ Text [ danish ] = "Slet punkter" ;
+ Text [ french ] = "Supprimer des points" ;
+ Text [ swedish ] = "Radera punkter" ;
+ Text [ dutch ] = "Punten verwijderen" ;
+ Text [ spanish ] = "Eliminar puntos" ;
+ Text [ english_us ] = "Delete Points" ;
+ ItemImage = Image
+ {
+ ImageBitmap = Bitmap { File = "sc10120.bmp" ; };
+ MaskColor = Color { Red = 0xC000 ; Green = 0xC000 ; Blue = 0xC000 ; };
+ };
+ /* ### ACHTUNG: Neuer Text in Resource? Markierte Punkte lschen : Markierte Punkte lschen */
+ Text[ chinese_simplified ] = "ɾ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Usu punkty";
+ Text[ japanese ] = "_̍폜";
+ Text[ chinese_traditional ] = "RI";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ";
+ Text[ turkish ] = "Noktalar sil";
+ Text[ language_user1 ] = " ";
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SEPARATOR ;
+ };
+ ToolBoxItem
+ {
+ Identifier = TBI_UNDO ;
+ HelpId = HID_IMAPDLG_UNDO ;
+
+ ItemImage = Image
+ {
+ ImageBitmap = Bitmap { File = "sc05701.bmp" ; };
+ MaskColor = Color { Red = 0xC000 ; Green = 0xC000 ; Blue = 0xC000 ; };
+ };
+
+ Text = "Rckgngig " ;
+ Text [ English ] = "Undo " ;
+ Text [ norwegian ] = "Angre " ;
+ Text [ italian ] = "Annulla " ;
+ Text [ portuguese_brazilian ] = "Widerrufen" ;
+ Text [ portuguese ] = "Anular " ;
+ Text [ finnish ] = "Kumoa " ;
+ Text [ danish ] = "Fortryd " ;
+ Text [ french ] = "Annuler " ;
+ Text [ swedish ] = "ngra " ;
+ Text [ dutch ] = "Ongedaan maken " ;
+ Text [ spanish ] = "Deshacer " ;
+ Text [ english_us ] = "Undo " ;
+ Text[ chinese_simplified ] = " ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Cofnij ";
+ Text[ japanese ] = "ɖ߂ ";
+ Text[ chinese_traditional ] = "_ ";
+ Text[ arabic ] = "";
+ Text[ greek ] = " ";
+ Text[ korean ] = "۾ ";
+ Text[ turkish ] = "Geri al ";
+ Text[ language_user1 ] = " ";
+ };
+ ToolBoxItem
+ {
+ Identifier = TBI_REDO ;
+ HelpId = HID_IMAPDLG_REDO ;
+
+ ItemImage = Image
+ {
+ ImageBitmap = Bitmap { File = "sc05700.bmp" ; };
+ MaskColor = Color { Red = 0xC000 ; Green = 0xC000 ; Blue = 0xC000 ; };
+ };
+
+ Text = "Wiederherstellen " ;
+ Text [ English ] = "Redo " ;
+ Text [ english_us ] = "Restore " ;
+ Text [ portuguese ] = "Restaurar " ;
+ Text [ portuguese_brazilian ] = "Wiederholen" ;
+ Text [ swedish ] = "terstll " ;
+ Text [ danish ] = "Gendan " ;
+ Text [ italian ] = "Ripristina " ;
+ Text [ spanish ] = "Restaurar " ;
+ Text [ french ] = "Restaurer " ;
+ Text [ dutch ] = "Herstellen " ;
+ Text[ chinese_simplified ] = "ָ ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Ponw ";
+ Text[ japanese ] = " ";
+ Text[ chinese_traditional ] = "_ ";
+ Text[ arabic ] = "";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ";
+ Text[ turkish ] = "Yinele ";
+ Text[ language_user1 ] = " ";
+ };
+ ToolBoxItem
+ {
+ Type = TOOLBOXITEM_SEPARATOR ;
+ };
+ ToolBoxItem
+ {
+ Identifier = TBI_ACTIVE ;
+ HelpId = HID_IMAPDLG_ACTIVE ;
+ Text = "Aktiv" ;
+ Text [ ENGLISH ] = "Active" ;
+ ItemImage = Image
+ {
+ ImageBitmap = Bitmap { File = "active.bmp" ; };
+ MaskColor = Color { Red = 0xC000 ; Green = 0xC000 ; Blue = 0xC000 ; };
+ };
+ Text [ english_us ] = "Active" ;
+ Text [ italian ] = "Attivo" ;
+ Text [ spanish ] = "Activo" ;
+ Text [ french ] = "Actif" ;
+ Text [ dutch ] = "Actief" ;
+ Text [ swedish ] = "Aktiv" ;
+ Text [ danish ] = "Aktiv" ;
+ Text [ portuguese ] = "Activo" ;
+ Text [ portuguese_brazilian ] = "Aktiv" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Aktywny";
+ Text[ japanese ] = "è";
+ Text[ chinese_traditional ] = "E";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "Ȱ";
+ Text[ turkish ] = "Etkin";
+ Text[ language_user1 ] = " ";
+ };
+ ToolBoxItem
+ {
+ Identifier = TBI_MACRO ;
+ HelpId = HID_IMAPDLG_MACRO ;
+ Text = "Makro..." ;
+ Text [ ENGLISH ] = "Macro..." ;
+ ItemImage = Image
+ {
+ ImageBitmap = Bitmap { File = "scmakrod.bmp" ; };
+ MaskColor = Color { Red = 0xC000 ; Green = 0xC000 ; Blue = 0xC000 ; };
+ };
+ Text [ english_us ] = "Macro..." ;
+ Text [ dutch ] = "Macro..." ;
+ Text [ swedish ] = "Makro..." ;
+ Text [ danish ] = "Makro..." ;
+ Text [ italian ] = "Macro..." ;
+ Text [ spanish ] = "Macro..." ;
+ Text [ french ] = "Macro..." ;
+ Text [ portuguese ] = "Macro..." ;
+ Text [ portuguese_brazilian ] = "Makro..." ;
+ Text[ chinese_simplified ] = "...";
+ Text[ russian ] = "...";
+ Text[ polish ] = "Makro...";
+ Text[ japanese ] = "ϸ...";
+ Text[ chinese_traditional ] = "...";
+ Text[ arabic ] = "...";
+ Text[ greek ] = "...";
+ Text[ korean ] = "ũ...";
+ Text[ turkish ] = "Makro...";
+ Text[ language_user1 ] = " ";
+ };
+ ToolBoxItem
+ {
+ Identifier = TBI_PROPERTY ;
+ HelpId = HID_IMAPDLG_PROPERTY ;
+ Text = "Eigenschaften..." ;
+ Text [ ENGLISH ] = "Properties..." ;
+ Text [ english_us ] = "Properties..." ;
+ ItemImage = Image
+ {
+ ImageBitmap = Bitmap { File = "sc06350.bmp" ; };
+ MaskColor = Color { Red = 0xC000 ; Green = 0xC000 ; Blue = 0xC000 ; };
+ };
+ Text [ portuguese ] = "Propriedades..." ;
+ Text [ portuguese_brazilian ] = "Eigenschaften..." ;
+ Text [ swedish ] = "Egenskaper..." ;
+ Text [ danish ] = "Egenskaber..." ;
+ Text [ italian ] = "Propriet..." ;
+ Text [ spanish ] = "Propiedades..." ;
+ Text [ french ] = "Proprits..." ;
+ Text [ dutch ] = "Eigenschappen..." ;
+ Text[ chinese_simplified ] = "...";
+ Text[ russian ] = "...";
+ Text[ polish ] = "Waciwoci...";
+ Text[ japanese ] = "è...";
+ Text[ chinese_traditional ] = "ݩ...";
+ Text[ arabic ] = "...";
+ Text[ greek ] = "...";
+ Text[ korean ] = "...";
+ Text[ turkish ] = "zellikler...";
+ Text[ language_user1 ] = " ";
+ };
+ };
+ Text[ english_us ] = "Image Map Editor";
+ Text[ portuguese ] = "Mapa de imagens Editor";
+ Text[ russian ] = " Image Map";
+ Text[ dutch ] = "ImageMap-editor";
+ Text[ french ] = "Editeur ImageMap";
+ Text[ spanish ] = "Editor Image Map";
+ Text[ italian ] = "Editor ImageMap";
+ Text[ danish ] = "ImageMap-Editor";
+ Text[ swedish ] = "ImageMap-Editor";
+ Text[ polish ] = "Edytor mapy obrazkowej";
+ Text[ portuguese_brazilian ] = "ImageMap-Editor";
+ Text[ japanese ] = "ImageMap-ި";
+ Text[ chinese_simplified ] = "ͼӳ༭";
+};
+ FixedText FT_URL
+ {
+ Pos = MAP_APPFONT ( 6 , 25 ) ;
+ Size = MAP_APPFONT ( 30 , 12 ) ;
+ Text = "Adresse:" ;
+ Text [ ENGLISH ] = "Address:" ;
+ Text [ english_us ] = "Address:" ;
+ Text [ italian ] = "Indirizzo:" ;
+ Text [ spanish ] = "Direccin:" ;
+ Text [ french ] = "Adresse :" ;
+ Text [ dutch ] = "Adres:" ;
+ Text [ swedish ] = "Adress:" ;
+ Text [ danish ] = "Adresse:" ;
+ Text [ portuguese ] = "Endereo:" ;
+ Text [ portuguese_brazilian ] = "Adresse:" ;
+ Text[ chinese_simplified ] = "ַ:";
+ Text[ russian ] = ":";
+ Text[ polish ] = "Adres:";
+ Text[ japanese ] = "ڽ:";
+ Text[ chinese_traditional ] = "a}:";
+ Text[ arabic ] = ":";
+ Text[ greek ] = ":";
+ Text[ korean ] = "ּ:";
+ Text[ turkish ] = "Adres:";
+ Text[ language_user1 ] = " ";
+ };
+ ComboBox CBB_URL
+ {
+ Pos = MAP_APPFONT ( 39 , 23 ) ;
+ Size = MAP_APPFONT ( 225 , 69 ) ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+ HScroll = TRUE ;
+ };
+ FixedText FT_TEXT
+ {
+ Pos = MAP_APPFONT ( 6 , 43 ) ;
+ Size = MAP_APPFONT ( 30 , 12 ) ;
+ Text = "Text:" ;
+ Text [ ENGLISH ] = "Text:" ;
+ Text [ english_us ] = "Text:" ;
+ Text [ italian ] = "Testo:" ;
+ Text [ spanish ] = "Texto:" ;
+ Text [ french ] = "Texte :" ;
+ Text [ dutch ] = "Tekst:" ;
+ Text [ swedish ] = "Text:" ;
+ Text [ danish ] = "Tekst:" ;
+ Text [ portuguese_brazilian ] = "Text:" ;
+ Text [ portuguese ] = "Texto:" ;
+ Text[ chinese_simplified ] = "ı:";
+ Text[ russian ] = ":";
+ Text[ polish ] = "Tekst:";
+ Text[ japanese ] = "÷:";
+ Text[ chinese_traditional ] = "r:";
+ Text[ arabic ] = ":";
+ Text[ greek ] = ":";
+ Text[ korean ] = "ؽƮ:";
+ Text[ turkish ] = "Metin:";
+ Text[ language_user1 ] = " ";
+ };
+ Edit EDT_TEXT
+ {
+ Border = TRUE ;
+ SVLook = TRUE ;
+ Pos = MAP_APPFONT ( 39 , 41 ) ;
+ Size = MAP_APPFONT ( 143 , 12 ) ;
+ TabStop = TRUE ;
+ Left = TRUE ;
+ };
+ Text [ english_us ] = "ImageMap Editor" ;
+ Text [ portuguese_brazilian ] = "ImageMap-Editor" ;
+ Text [ swedish ] = "ImageMap-Editor" ;
+ Text [ danish ] = "ImageMap-redigering" ;
+ Text [ italian ] = "Editor ImageMap" ;
+ Text [ spanish ] = "Editor ImageMap" ;
+ Text [ french ] = "diteur d'ImageMap" ;
+ Text [ dutch ] = "ImageMap-editor" ;
+ Text [ portuguese ] = "Mapa de imagens Editor" ;
+ Text[ chinese_simplified ] = "ͼӳ༭";
+ Text[ russian ] = " Image Map";
+ Text[ polish ] = "Edytor mapy obrazkowej";
+ Text[ japanese ] = "Ұϯ ި";
+ Text[ chinese_traditional ] = "vMgs边";
+ Text[ arabic ] = "Image Map Editor";
+ Text[ greek ] = " ImageMap";
+ Text[ korean ] = "̹ ";
+ Text[ turkish ] = "ImageMap editr";
+ Text[ language_user1 ] = " ";
+};
+Control RID_SVXCTL_IMAP
+{
+ Border = TRUE ;
+ SVLook = TRUE ;
+ Pos = MAP_APPFONT ( 6 , 56 ) ;
+ HelpId = HID_IMAPDLG_GRAPHWND ;
+};
+ // nur temporaer
+FixedText RID_SVXCTL_FT_TARGET
+{
+ Pos = MAP_APPFONT ( 188 , 43 ) ;
+ Size = MAP_APPFONT ( 22 , 12 ) ;
+ Text = "Frame: " ;
+};
+ // nur temporaer
+ComboBox RID_SVXCTL_CBB_TARGET
+{
+ Border = TRUE ;
+ Sort = TRUE ;
+ Pos = MAP_APPFONT ( 213 , 41 ) ;
+ Size = MAP_APPFONT ( 51 , 50 ) ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+ HScroll = TRUE ;
+};
+/******************************************************************************/
+Menu RID_SVXMN_IMAP
+{
+ ItemList =
+ {
+ MenuItem
+ {
+ Identifier = MN_URL ;
+ Text = "~Beschreibung..." ;
+ Text [ ENGLISH ] = "~Description..." ;
+ Text [ english_us ] = "Description..." ;
+ Text [ italian ] = "D~escrizione..." ;
+ Text [ spanish ] = "~Descripcin..." ;
+ Text [ french ] = "~Description..." ;
+ Text [ dutch ] = "~Beschrijving..." ;
+ Text [ swedish ] = "~Beskrivning..." ;
+ Text [ danish ] = "Beskrivelse..." ;
+ Text [ portuguese_brazilian ] = "~Beschreibung..." ;
+ Text [ portuguese ] = "~Descrio..." ;
+ Text[ chinese_simplified ] = "˵...";
+ Text[ russian ] = "...";
+ Text[ polish ] = "Opis...";
+ Text[ japanese ] = "...";
+ Text[ chinese_traditional ] = "yz...";
+ Text[ arabic ] = "...";
+ Text[ greek ] = "~...";
+ Text[ korean ] = "...";
+ Text[ turkish ] = "Aklama...";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Identifier = MN_MACRO ;
+ Text = "Ma~kro..." ;
+ Text [ ENGLISH ] = "Ma~cro..." ;
+ Text [ english_us ] = "~Macro..." ;
+ Text [ swedish ] = "Ma~kro..." ;
+ Text [ danish ] = "Makro..." ;
+ Text [ italian ] = "Macro..." ;
+ Text [ spanish ] = "Ma~cro..." ;
+ Text [ french ] = "Ma~cro..." ;
+ Text [ dutch ] = "Ma~cro..." ;
+ Text [ portuguese_brazilian ] = "Ma~kro..." ;
+ Text [ portuguese ] = "Ma~cro..." ;
+ Text[ chinese_simplified ] = "(~M)...";
+ Text[ russian ] = "...";
+ Text[ polish ] = "Makro...";
+ Text[ japanese ] = "ϸ(~M)...";
+ Text[ chinese_traditional ] = "(~M)...";
+ Text[ arabic ] = "...";
+ Text[ greek ] = "~...";
+ Text[ korean ] = "ũ(~M)...";
+ Text[ turkish ] = "Makro...";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Identifier = MN_ACTIVATE ;
+ Text = "~Aktiv" ;
+ Text [ ENGLISH ] = "~Activated" ;
+ Text [ dutch ] = "~Actief" ;
+ Text [ english_us ] = "Active" ;
+ Text [ italian ] = "~Attivo" ;
+ Text [ spanish ] = "~Activo" ;
+ Text [ french ] = "~Actif" ;
+ Text [ swedish ] = "~Aktiv" ;
+ Text [ danish ] = "Aktiv" ;
+ Text [ portuguese_brazilian ] = "~Aktiv" ;
+ Text [ portuguese ] = "~Activo" ;
+ Text[ chinese_simplified ] = "(~A)";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Aktywny";
+ Text[ japanese ] = "è";
+ Text[ chinese_traditional ] = "E(~A)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "~";
+ Text[ korean ] = "Ȱ";
+ Text[ turkish ] = "Etkin";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Separator = TRUE ;
+ };
+ MenuItem
+ {
+ Identifier = MN_POSITION ;
+ Text = "A~nordnung" ;
+ Text [ ENGLISH ] = "~Arrange" ;
+ Text [ norwegian ] = "~Arrange" ;
+ Text [ italian ] = "~Disponi" ;
+ Text [ portuguese_brazilian ] = "~Organizar" ;
+ Text [ portuguese ] = "~Disposio" ;
+ Text [ finnish ] = "J~rjest" ;
+ Text [ danish ] = "Placering" ;
+ Text [ french ] = "~Disposition" ;
+ Text [ swedish ] = "~Placering" ;
+ Text [ dutch ] = "~Positie" ;
+ Text [ spanish ] = "~Posicin" ;
+ Text [ english_us ] = "Arrange" ;
+ SubMenu = Menu
+ {
+ ItemList =
+ {
+ MenuItem
+ {
+ Identifier = MN_FRAME_TO_TOP ;
+ Text = "Ganz nach ~vorn" ;
+ Text [ ENGLISH ] = "Bring to Front" ;
+ Text [ norwegian ] = "Bring to Front" ;
+ Text [ italian ] = "Porta in primo piano" ;
+ Text [ portuguese_brazilian ] = "Trazer para a Frente" ;
+ Text [ portuguese ] = "Trazer para a ~frente" ;
+ Text [ finnish ] = "E~dustalle" ;
+ Text [ danish ] = "~Placer forrest" ;
+ Text [ french ] = "Tout l'~avant" ;
+ Text [ swedish ] = "Lngst ~fram" ;
+ Text [ dutch ] = "Helemaal ~vooraan" ;
+ Text [ spanish ] = "Traer al ~frente" ;
+ Text [ english_us ] = "Bring to Front" ;
+ Text[ chinese_simplified ] = "ڶ(~T)";
+ Text[ russian ] = " ~ ";
+ Text[ polish ] = "Przesu na wierzch";
+ Text[ japanese ] = "őOʂֈړ(~F)";
+ Text[ chinese_traditional ] = "m󳻼h(~T)";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ~ ";
+ Text[ korean ] = " ";
+ Text[ turkish ] = "En ne getir";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Identifier = MN_MOREFRONT ;
+ Text = "W~eiter nach vorn" ;
+ Text [ ENGLISH ] = "Bring ~Forward" ;
+ Text [ norwegian ] = "Flytt ~Framover" ;
+ Text [ italian ] = "Porta pi avanti" ;
+ Text [ portuguese_brazilian ] = "Tazer ~Para Frente" ;
+ Text [ portuguese ] = "~Mais para a frente" ;
+ Text [ finnish ] = "Yksi ~eteen" ;
+ Text [ danish ] = "F~lyt fremad" ;
+ Text [ french ] = "V~ers l'avant" ;
+ Text [ swedish ] = "Lngre fra~m" ;
+ Text [ dutch ] = "Naar v~oren" ;
+ Text [ spanish ] = "Traer ~ms adelante" ;
+ Text [ english_us ] = "Bring ~Forward" ;
+ Text[ chinese_simplified ] = "ǰ(~F)";
+ Text[ russian ] = " ~";
+ Text[ polish ] = "Przesu do przodu";
+ Text[ japanese ] = "ɑO(~F)";
+ Text[ chinese_traditional ] = "Aem(~F)";
+ Text[ arabic ] = " ";
+ Text[ greek ] = "~ ";
+ Text[ korean ] = " (~F)";
+ Text[ turkish ] = "Bir ne getir";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Identifier = MN_MOREBACK ;
+ Text = "Weiter ~nach hinten" ;
+ Text [ ENGLISH ] = "Send ~Backward" ;
+ Text [ norwegian ] = "Send ~Bakover" ;
+ Text [ italian ] = "Porta pi i~ndietro" ;
+ Text [ portuguese_brazilian ] = "Enviar ~Para o Fundo" ;
+ Text [ portuguese ] = "Mais para o f~undo" ;
+ Text [ finnish ] = "Yksi ~taakse" ;
+ Text [ danish ] = "Flyt bag~ud" ;
+ Text [ french ] = "~Vers l'arrire" ;
+ Text [ swedish ] = "Lngre ba~k" ;
+ Text [ dutch ] = "Naar a~chteren" ;
+ Text [ spanish ] = "Enviar hacia a~trs" ;
+ Text [ english_us ] = "Send Back~ward" ;
+ Text[ chinese_simplified ] = "ٺ(~W)";
+ Text[ russian ] = " ~";
+ Text[ polish ] = "Przesu do tyu";
+ Text[ japanese ] = "Ɍ(~W)";
+ Text[ chinese_traditional ] = "Am(~W)";
+ Text[ arabic ] = " ";
+ Text[ greek ] = "~ ";
+ Text[ korean ] = "ڷ (~W)";
+ Text[ turkish ] = "Bir alta gnder";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Identifier = MN_FRAME_TO_BOTTOM ;
+ Text = "Ganz nach ~hinten" ;
+ Text [ ENGLISH ] = "Send to Bac~k" ;
+ Text [ norwegian ] = "Send to Bac~k" ;
+ Text [ italian ] = "Porta in fondo" ;
+ Text [ portuguese_brazilian ] = "Enviar para o ltimo ~Plano" ;
+ Text [ portuguese ] = "Enviar para ~trs" ;
+ Text [ finnish ] = "T~austalle" ;
+ Text [ danish ] = "Placer ~bagest" ;
+ Text [ french ] = "Tout l'a~rrire" ;
+ Text [ swedish ] = "Lngst ~bak" ;
+ Text [ dutch ] = "Helemaal~achteraan" ;
+ Text [ spanish ] = "Enviar al ~fondo" ;
+ Text [ english_us ] = "~Send to Back" ;
+ Text[ chinese_simplified ] = "ڵײ(~S)";
+ Text[ russian ] = " ~ ";
+ Text[ polish ] = "Przesu na spd";
+ Text[ japanese ] = "Ŕwʂֈړ(~S)";
+ Text[ chinese_traditional ] = "m󩳼h(~S)";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ~ ";
+ Text[ korean ] = " ڷ(~S)";
+ Text[ turkish ] = "En alta gnder";
+ Text[ language_user1 ] = " ";
+ };
+ };
+ };
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "Rozmieszczenie";
+ Text[ japanese ] = "";
+ Text[ chinese_traditional ] = "Ƨ(~R)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "~";
+ Text[ korean ] = "迭";
+ Text[ turkish ] = "Sralama";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Separator = TRUE ;
+ };
+ MenuItem
+ {
+ Identifier = MN_MARK_ALL ;
+ /* ### ACHTUNG: Neuer Text in Resource? Alles ausw~hlen : Alles ausw~hlen */
+ /* ### ACHTUNG: Neuer Text in Resource? Alles ausw~hlen : Alles ausw~hlen */
+ Text = "Alles ausw~hlen" ;
+ Text [ ENGLISH ] = "Select All" ;
+ Text [ norwegian ] = "Select All" ;
+ Text [ italian ] = "Seleziona tutto" ;
+ Text [ portuguese_brazilian ] = "Selecionar Tudo" ;
+ Text [ portuguese ] = "Seleccionar t~udo" ;
+ Text [ finnish ] = "~Valitse kaikki" ;
+ Text [ danish ] = "Marker alt" ;
+ Text [ french ] = "S~lectionner tout" ;
+ Text [ swedish ] = "~Vlj ut allt" ;
+ Text [ dutch ] = "Alles ~selecteren" ;
+ Text [ spanish ] = "~Seleccionar todo" ;
+ Text [ english_us ] = "Select ~All" ;
+ Text[ chinese_simplified ] = "ȫѡ(~A)";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Zaznacz wszystko";
+ Text[ japanese ] = "ׂđI(~A)";
+ Text[ chinese_traditional ] = "(~A)";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ~";
+ Text[ korean ] = "ü (~A)";
+ Text[ turkish ] = "Tmn se";
+ Text[ language_user1 ] = " ";
+ };
+ MenuItem
+ {
+ Identifier = MN_DELETE ;
+ /* ### ACHTUNG: Neuer Text in Resource? ~Lschen : ~Lschen */
+ /* ### ACHTUNG: Neuer Text in Resource? ~Lschen : ~Lschen */
+ Text = "~Lschen" ;
+ Text [ ENGLISH ] = "~Delete" ;
+ Text [ norwegian ] = "~Slett" ;
+ Text [ italian ] = "~Cancella" ;
+ Text [ portuguese_brazilian ] = "~Apagar" ;
+ Text [ portuguese ] = "E~liminar" ;
+ Text [ finnish ] = "~Poista" ;
+ Text [ danish ] = "~Slet" ;
+ Text [ french ] = "~Supprimer" ;
+ Text [ swedish ] = "~Radera" ;
+ Text [ dutch ] = "~Wissen" ;
+ Text [ spanish ] = "~Eliminar" ;
+ Text [ english_us ] = "~Delete" ;
+ /* ### ACHTUNG: Neuer Text in Resource? Die Selektion lschen : Die Selektion lschen */
+ Text[ chinese_simplified ] = "ɾ(~D)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Usu";
+ Text[ japanese ] = "폜(~D)";
+ Text[ chinese_traditional ] = "R(~D)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "~";
+ Text[ korean ] = "(~D)";
+ Text[ turkish ] = "Sil";
+ Text[ language_user1 ] = " ";
+ };
+ };
+};
+/******************************************************************************/
+ModalDialog RID_SVXDLG_IMAPURL
+{
+ SVLook = TRUE ;
+ OutputSize = TRUE ;
+ Closeable = TRUE ;
+ Moveable = TRUE ;
+ Size = MAP_APPFONT ( 214 , 81 ) ;
+ Text = "Beschreibung" ;
+ Text [ English ] = "Description" ;
+ Text [ english_us ] = "Description" ;
+ Text [ italian ] = "Descrizione" ;
+ Text [ spanish ] = "Descripcin" ;
+ Text [ french ] = "Description" ;
+ Text [ dutch ] = "Beschrijving" ;
+ Text [ swedish ] = "Beskrivning" ;
+ Text [ danish ] = "Beskrivelse" ;
+ FixedText FT_URLDESCRIPTION
+ {
+ Pos = MAP_APPFONT ( 12 , 28 ) ;
+ Size = MAP_APPFONT ( 47 , 10 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? Alternativtext: : Text: */
+ /* ### ACHTUNG: Neuer Text in Resource? Alternativtext: : Text: */
+ Text = "Alternativtext:" ;
+ Text [ ENGLISH ] = "Alternative text:" ;
+ Text [ english_us ] = "Alternative Text:" ;
+ Text [ italian ] = "Testo alternativo:" ;
+ Text [ spanish ] = "Texto alternativo:" ;
+ Text [ french ] = "Texte (facultatif) :" ;
+ Text [ dutch ] = "Alternatieve tekst:" ;
+ Text [ swedish ] = "Alternativtext:" ;
+ Text [ danish ] = "Alternativtekst:" ;
+ Text [ portuguese_brazilian ] = "Alternativtext:" ;
+ Text [ portuguese ] = "Texto alternativo:" ;
+ Text[ chinese_simplified ] = "Ԥ:";
+ Text[ russian ] = " :";
+ Text[ polish ] = "Tekst alternatywny:";
+ Text[ japanese ] = "p÷:";
+ Text[ chinese_traditional ] = "wƤ:";
+ Text[ arabic ] = ": ";
+ Text[ language_user1 ] = " ";
+ Text[ greek ] = " :";
+ Text[ korean ] = "ü ؽƮ:";
+ Text[ turkish ] = "Alternatif metin:";
+ };
+ Edit EDT_URLDESCRIPTION
+ {
+ Border = TRUE ;
+ TabStop = TRUE ;
+ Left = TRUE ;
+ Pos = MAP_APPFONT ( 62 , 27 ) ;
+ Size = MAP_APPFONT ( 84 , 12 ) ;
+ };
+ FixedText FT_URL1
+ {
+ Pos = MAP_APPFONT ( 12 , 14 ) ;
+ Size = MAP_APPFONT ( 47 , 10 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? URL: : Adresse: */
+ /* ### ACHTUNG: Neuer Text in Resource? URL: : Adresse: */
+ Text = "URL:" ;
+ Text [ English ] = "URL:" ;
+ Text [ dutch ] = "URL:" ;
+ Text [ english_us ] = "URL Text:" ;
+ Text [ italian ] = "URL:" ;
+ Text [ spanish ] = "URL:" ;
+ Text [ french ] = "URL :" ;
+ Text [ swedish ] = "URL:" ;
+ Text [ danish ] = "URL:" ;
+ Text [ portuguese_brazilian ] = "URL:" ;
+ Text [ portuguese ] = "Endereo (URL):" ;
+ Text[ chinese_simplified ] = "URL";
+ Text[ russian ] = "URL:";
+ Text[ polish ] = "Adres URL:";
+ Text[ japanese ] = "URL:";
+ Text[ chinese_traditional ] = "URL:";
+ Text[ arabic ] = ":URL ";
+ Text[ greek ] = "URL:";
+ Text[ korean ] = "URL ؽƮ:";
+ Text[ turkish ] = "URL:";
+ Text[ language_user1 ] = " ";
+ };
+ Edit EDT_URL
+ {
+ Border = TRUE ;
+ TabStop = TRUE ;
+ Left = TRUE ;
+ Pos = MAP_APPFONT ( 62 , 12 ) ;
+ Size = MAP_APPFONT ( 84 , 12 ) ;
+ };
+ OKButton BTN_OK
+ {
+ TabStop = TRUE ;
+ DefButton = TRUE ;
+ Pos = MAP_APPFONT ( 158 , 6 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ };
+ CancelButton BTN_CANCEL
+ {
+ TabStop = TRUE ;
+ Pos = MAP_APPFONT ( 158 , 23 ) ;
+ Size = MAP_APPFONT ( 50 , 14 ) ;
+ };
+ GroupBox GRP_URL
+ {
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 146 , 72 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? Hyperlink : URL */
+ /* ### ACHTUNG: Neuer Text in Resource? Hyperlink : URL */
+ Text = "Hyperlink" ;
+ Text [ ENGLISH ] = "Hyperlink" ;
+ Text [ english_us ] = "Hyperlink" ;
+ Text [ italian ] = "Hyperlink" ;
+ Text [ spanish ] = "Hiperenlace" ;
+ Text [ french ] = "Hyperlien" ;
+ Text [ dutch ] = "Hyperlink" ;
+ Text [ swedish ] = "Hyperlnk" ;
+ Text [ danish ] = "Hyperlink" ;
+ Text [ portuguese_brazilian ] = "Hyperlink" ;
+ Text [ portuguese ] = "Hiperligao" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "Hipercze";
+ Text[ japanese ] = "ʲ߰ݸ";
+ Text[ chinese_traditional ] = "Ws";
+ Text[ arabic ] = " ";
+ Text[ greek ] = "-";
+ Text[ korean ] = "۸ũ";
+ Text[ turkish ] = "Hyperlink";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_TARGET
+ {
+ Pos = MAP_APPFONT ( 12 , 43 ) ;
+ Size = MAP_APPFONT ( 47 , 10 ) ;
+ Text = "Frame:" ;
+ Text [ ENGLISH ] = "Frame:" ;
+ Text [ english_us ] = "Frame:" ;
+ Text [ portuguese_brazilian ] = "Frame:" ;
+ Text [ swedish ] = "Ram:" ;
+ Text [ danish ] = "Frame:" ;
+ Text [ italian ] = "Frame:" ;
+ Text [ spanish ] = "Frame:" ;
+ Text [ french ] = "Frame :" ;
+ Text [ dutch ] = "Frame:" ;
+ Text [ portuguese ] = "Frame:" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = ":";
+ Text[ polish ] = "Frame:";
+ Text[ japanese ] = "ڰ:";
+ Text[ chinese_traditional ] = "T:";
+ Text[ arabic ] = "Frame:";
+ Text[ greek ] = ":";
+ Text[ korean ] = ":";
+ Text[ turkish ] = "Frame:";
+ Text[ language_user1 ] = " ";
+ };
+ ComboBox CBB_TARGETS
+ {
+ Border = TRUE ;
+ Sort = TRUE ;
+ Pos = MAP_APPFONT ( 62 , 42 ) ;
+ Size = MAP_APPFONT ( 84 , 50 ) ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+ HScroll = TRUE ;
+ };
+ FixedText FT_NAME
+ {
+ Pos = MAP_APPFONT ( 12 , 58 ) ;
+ Size = MAP_APPFONT ( 47 , 10 ) ;
+ Text = "Name:" ;
+ Text [ English ] = "Name:" ;
+ Text [ english_us ] = "Name:" ;
+ Text [ portuguese ] = "Nome:" ;
+ Text [ portuguese_brazilian ] = "Name:" ;
+ Text [ swedish ] = "Namn:" ;
+ Text [ danish ] = "Navn:" ;
+ Text [ italian ] = "Nome:" ;
+ Text [ spanish ] = "Nombre:" ;
+ Text [ french ] = "Nom :" ;
+ Text [ dutch ] = "Naam:" ;
+ Text[ chinese_simplified ] = ":";
+ Text[ russian ] = ":";
+ Text[ polish ] = "Nazwa:";
+ Text[ japanese ] = "O:";
+ Text[ chinese_traditional ] = "W:";
+ Text[ arabic ] = ":";
+ Text[ greek ] = ":";
+ Text[ korean ] = "̸:";
+ Text[ turkish ] = "Ad:";
+ Text[ language_user1 ] = " ";
+ };
+ Edit EDT_NAME
+ {
+ Border = TRUE ;
+ TabStop = TRUE ;
+ Left = TRUE ;
+ Pos = MAP_APPFONT ( 62 , 57 ) ;
+ Size = MAP_APPFONT ( 84 , 12 ) ;
+ };
+ Text [ portuguese ] = "Descrio" ;
+ Text [ portuguese_brazilian ] = "Beschreibung" ;
+ Text[ chinese_simplified ] = "˵";
+ Text[ russian ] = "";
+ Text[ polish ] = "Opis";
+ Text[ japanese ] = "";
+ Text[ chinese_traditional ] = "yz";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "Aklama";
+ Text[ language_user1 ] = " ";
+};
+/******************************************************************************/
+String STR_IMAPDLG_SAVE
+{
+ Text= "Die ImageMap wurde gendert.\nSollen die nderungen gespeichert werden?";
+ Text [ English ] = "The ImageMap has been modified.\nDo you want to save your changes?" ;
+ Text[ english_us ] = "The ImageMap has been modified.\nDo you want to save the changes?";
+ Text[ chinese_simplified ] = "ͼӳѾĶ\nҪ̸";
+ Text[ russian ] = "Image Map .\n ?";
+ Text[ polish ] = "Mapa obrazkowa zostaa zmieniona.\nCzy zmiany maj by zapisane?";
+ Text[ japanese ] = "Ұϯ߂ύXĂ܂B\nύXۑ܂?";
+ Text[ chinese_traditional ] = "vMgwgQܧC\nznxsܧH";
+ Text[ arabic ] = " ImageMap.\n ʿ";
+ Text [ italian ] = "L'ImageMap stata cambiata.\nSalvare le modifiche?" ;
+ Text [ spanish ] = "Se ha modificado el ImageMap.\nDesea guardar los cambios?" ;
+ Text [ french ] = "L'imageMap a t modifie.\nDsirez-vous sauvegarder les modifications?" ;
+ Text [ dutch ] = "De ImageMap werd gewijzigd.\nWilt u de wijzigingen opslaan?" ;
+ /* ### ACHTUNG: Neuer Text in Resource? Die ImageMap wurde gendert.\nSollen die nderungen gespeichert werden? : Die ImageMap wurde gendert.\nSollen die nderungen gespeichert werden? */
+ /* ### ACHTUNG: Neuer Text in Resource? Die ImageMap wurde gendert.\nSollen die nderungen gespeichert werden? : Die ImageMap wurde gendert.\nSollen die nderungen gespeichert werden? */
+ Text = "Die ImageMap wurde gendert.\nSollen die nderungen gespeichert werden?" ;
+ Text [ swedish ] = "ImageMap har ndrats.\nSkall ndringarna sparas?" ;
+ Text [ danish ] = "ImageMap er blevet ndret.\nVil du gemme ndringerne?" ;
+ Text [ portuguese_brazilian ] = "Die ImageMap wurde gendert.\nSollen die nderungen gespeichert werden?" ;
+ Text [ portuguese ] = "O ImageMap foi modificado.\nDeseja guardar as modificaes?" ;
+ Text[ greek ] = " ImageMap .\n ;";
+ Text[ korean ] = "̹ Ǿϴ.\n Ͻðڽϱ?";
+ Text[ turkish ] = "ImageMap deitirildi.\nDeiiklikler kaydedilsin mi?";
+ Text[ language_user1 ] = " ";
+};
+String STR_IMAPDLG_MODIFY
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Die ImageMap wurde gendert.\nSollen die nderungen bernommen werden? : Die ImageMap wurde gendert.\nSollen die nderungen bernommen werden? */
+ /* ### ACHTUNG: Neuer Text in Resource? Die ImageMap wurde gendert.\nSollen die nderungen bernommen werden? : Die ImageMap wurde gendert.\nSollen die nderungen bernommen werden? */
+ Text = "Die ImageMap wurde gendert.\nSollen die nderungen bernommen werden?" ;
+ Text [ English ] = "The ImageMap has been modified.\nDo you want to take your changes?" ;
+ Text [ english_us ] = "The ImageMap has been modified.\nDo you want to save the changes?" ;
+ Text [ swedish ] = "ImageMap har ndrats.\nSkall ndringarna vertas?" ;
+ Text [ danish ] = "ImageMap er blevet ndret.\nSkal ndringerne overtages?" ;
+ Text [ italian ] = "La ImageMap stata cambiata.\nAccettare le modifiche?" ;
+ Text [ spanish ] = "Se ha modificado el ImageMap.\nDesea guardar las modificaciones?" ;
+ Text [ french ] = "L'imageMap a t modifie.\nAppliquer les modifications ?" ;
+ Text [ dutch ] = "De ImageMap werd gewijzigd.\nWilt u de wijzigingen overnemen?" ;
+ Text [ portuguese_brazilian ] = "Die ImageMap wurde gendert.\nSollen die nderungen bernommen werden?" ;
+ Text [ portuguese ] = "O ImageMap foi modificado.\nDeseja aplicar as modificaes?" ;
+ Text[ chinese_simplified ] = "ͼӳѾĶ\nҪܸ";
+ Text[ russian ] = "Image Map .\n ?";
+ Text[ polish ] = "Mapa obrazkowa zostaa zmieniona.\nCzy zmiany maj by zapisane?";
+ Text[ japanese ] = "Ұϯ߂ύXĂ܂B\nύXۑ܂?";
+ Text[ chinese_traditional ] = "vMgwgQܧC\nznܧS";
+ Text[ arabic ] = " ImageMap.\n ʿ";
+ Text[ greek ] = " ImageMap .\n ;";
+ Text[ korean ] = "̹ Ǿϴ.\n Ͻðڽϱ?";
+ Text[ turkish ] = "ImageMap deitirildi.\nDeiiklikler kaydedilsin mi?";
+ Text[ language_user1 ] = " ";
+};
+/******************************************************************************/
diff --git a/svx/source/dialog/imapimp.hxx b/svx/source/dialog/imapimp.hxx
new file mode 100644
index 000000000000..d8411f1ca2a5
--- /dev/null
+++ b/svx/source/dialog/imapimp.hxx
@@ -0,0 +1,92 @@
+/*************************************************************************
+ *
+ * $RCSfile: imapimp.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:09 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+
+#ifndef _IMAPIMP_HXX_
+#define _IMAPIMP_HXX_
+
+// ---------------
+// - IMapOwnData -
+// ---------------
+
+class IMapOwnData
+{
+private:
+
+ SvxIMapDlg* pIMap;
+
+public:
+
+ Timer aTimer;
+ Timer aTbxTimer;
+ Graphic aUpdateGraphic;
+ ImageMap aUpdateImageMap;
+ TargetList aUpdateTargetList;
+ void* pUpdateEditingObject;
+ FixedText* pFtTarget;
+ ComboBox* pCbbTarget;
+ BOOL bExecState;
+
+ IMapOwnData( SvxIMapDlg* pIMapDlg ) : pIMap ( pIMapDlg ) {}
+};
+
+
+#endif // _IMAPIMP_HXX
diff --git a/svx/source/dialog/imapwnd.cxx b/svx/source/dialog/imapwnd.cxx
new file mode 100644
index 000000000000..8dc482dc8f66
--- /dev/null
+++ b/svx/source/dialog/imapwnd.cxx
@@ -0,0 +1,1054 @@
+/*************************************************************************
+ *
+ * $RCSfile: imapwnd.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:09 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _URLOBJ_HXX //autogen
+#include <tools/urlobj.hxx>
+#endif
+#ifndef _SV_MSGBOX_HXX
+#include <vcl/msgbox.hxx>
+#endif
+#ifndef _SV_HELP_HXX //autogen
+#include <vcl/help.hxx>
+#endif
+#pragma hdrstop
+
+#ifndef _SFXSIDS_HRC
+#include <sfx2/sfxsids.hrc> // SID_ATTR_MACROITEM
+#endif
+
+#define _ANIMATION
+#define ITEMID_MACRO SID_ATTR_MACROITEM
+
+#ifndef _MACROPG_HXX //autogen
+#include <sfx2/macropg.hxx>
+#endif
+
+#ifndef _DTRANS_HXX //autogen
+#include <so3/dtrans.hxx>
+#endif
+
+#ifndef _GOODIES_IMAPRECT_HXX //autogen
+#include <svtools/imaprect.hxx>
+#endif
+
+#ifndef _GOODIES_IMAPCIRC_HXX //autogen
+#include <svtools/imapcirc.hxx>
+#endif
+
+#ifndef _GOODIES_IMAPPOLY_HXX //autogen
+#include <svtools/imappoly.hxx>
+#endif
+
+#ifndef _URLBMK_HXX //autogen
+#include <svtools/urlbmk.hxx>
+#endif
+
+#include <xoutbmp.hxx>
+#include <dialmgr.hxx>
+#include <dialogs.hrc>
+#include <svxids.hrc>
+#include <imapdlg.hrc>
+#include <imapwnd.hxx>
+#include "svdpage.hxx"
+#include "svdorect.hxx"
+#include "svdocirc.hxx"
+#include "svdopath.hxx"
+#include "xfltrit.hxx"
+
+#ifndef SVTOOLS_URIHELPER_HXX
+#include <svtools/urihelper.hxx>
+#endif
+#ifndef _SVX_FILLITEM_HXX //autogen
+#include <xfillit.hxx>
+#endif
+#ifndef _SVX_XLINIIT_HXX //autogen
+#include <xlineit.hxx>
+#endif
+
+#include <sot/formats.hxx>
+
+#ifdef MAC
+#define TRANSCOL Color( COL_LIGHTGRAY )
+#else
+#define TRANSCOL Color( COL_WHITE )
+#endif
+
+/*************************************************************************
+|*
+|* URLDlg
+|*
+\************************************************************************/
+
+URLDlg::URLDlg( Window* pWindow, const String& rURL,
+ const String& rDescription, const String& rTarget,
+ const String& rName, TargetList& rTargetList ) :
+
+ ModalDialog ( pWindow, SVX_RES( RID_SVXDLG_IMAPURL ) ),
+
+ aGrpURL ( this, ResId( GRP_URL ) ),
+ aBtnOk ( this, ResId( BTN_OK ) ),
+ aBtnCancel ( this, ResId( BTN_CANCEL ) ),
+ aFtURL1 ( this, ResId( FT_URL1 ) ),
+ aEdtURL ( this, ResId( EDT_URL ) ),
+ aFtURLDescription ( this, ResId( FT_URLDESCRIPTION ) ),
+ aEdtURLDescription ( this, ResId( EDT_URLDESCRIPTION ) ),
+ aFtTarget ( this, ResId( FT_TARGET ) ),
+ aCbbTargets ( this, ResId( CBB_TARGETS ) ),
+ aFtName ( this, ResId( FT_NAME ) ),
+ aEdtName ( this, ResId( EDT_NAME ) )
+
+{
+ FreeResource();
+
+ aEdtURL.SetText( rURL );
+ aEdtURLDescription.SetText( rDescription );
+ aEdtName.SetText( rName );
+
+ for( String* pStr = rTargetList.First(); pStr; pStr = rTargetList.Next() )
+ aCbbTargets.InsertEntry( *pStr );
+
+ if( !rTarget.Len() )
+ aCbbTargets.SetText( String::CreateFromAscii( "_self" ) );
+ else
+ aCbbTargets.SetText( rTarget );
+}
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+IMapWindow::IMapWindow( Window* pParent, const ResId& rResId ) :
+ GraphCtrl ( pParent, rResId )
+{
+ SetWinStyle( WB_SDRMODE );
+
+ pItemInfo = new SfxItemInfo[ 1 ];
+ memset( pItemInfo, 0, sizeof( SfxItemInfo ) );
+ pIMapPool = new SfxItemPool( String::CreateFromAscii( "IMapItemPool" ),
+ SID_ATTR_MACROITEM, SID_ATTR_MACROITEM, pItemInfo );
+ pIMapPool->FreezeIdRanges();
+}
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+IMapWindow::~IMapWindow()
+{
+ // Liste loeschen
+ for( String* pStr = aTargetList.First(); pStr; pStr = aTargetList.Next() )
+ delete pStr;
+
+ delete pIMapPool;
+ delete[] pItemInfo;
+}
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+void IMapWindow::SetImageMap( const ImageMap& rImageMap )
+{
+ ReplaceImageMap( rImageMap, FALSE );
+}
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+void IMapWindow::ReplaceImageMap( const ImageMap& rImageMap, BOOL bScaleToGraphic )
+{
+ SdrPage* pPage = (SdrPage*) pModel->GetPage( 0 );
+ long nCount = rImageMap.GetIMapObjectCount();
+
+ // zuerst alle Zeichenobjekte loeschen
+ aIMap = rImageMap;
+ pPage->Clear();
+
+ // neue Zeichenobjekte generieren
+ for ( long i = nCount - 1; i > -1; i-- )
+ {
+ SdrObject* pNewObj = CreateObj( rImageMap.GetIMapObject( (USHORT) i ) );
+
+ if ( pNewObj )
+ pPage->InsertObject( pNewObj );
+ }
+}
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+BOOL IMapWindow::ReplaceActualIMapInfo( const NotifyInfo& rNewInfo )
+{
+ const SdrObject* pSdrObj = GetSelectedSdrObject();
+ IMapObject* pIMapObj;
+ BOOL bRet = FALSE;
+
+ if ( pSdrObj && ( ( pIMapObj = GetIMapObj( pSdrObj ) ) != NULL ) )
+ {
+ pIMapObj->SetURL( rNewInfo.aMarkURL );
+ pIMapObj->SetDescription( rNewInfo.aMarkDescription );
+ pIMapObj->SetTarget( rNewInfo.aMarkTarget );
+ pModel->SetChanged( TRUE );
+ UpdateInfo( FALSE );
+
+ bRet = TRUE;
+ }
+
+ return bRet;
+}
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+const ImageMap& IMapWindow::GetImageMap()
+{
+ if ( pModel->IsChanged() )
+ {
+ SdrPage* pPage = (SdrPage*) pModel->GetPage( 0 );
+
+ if ( pPage )
+ {
+ const long nCount = pPage->GetObjCount();
+
+ aIMap.ClearImageMap();
+
+ for ( long i = nCount - 1; i > -1; i-- )
+ aIMap.InsertIMapObject( *( ( (IMapUserData*) pPage->GetObj( i )->GetUserData( 0 ) )->GetObject() ) );
+ }
+
+ pModel->SetChanged( FALSE );
+ }
+
+ return aIMap;
+}
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+void IMapWindow::SetTargetList( TargetList& rTargetList )
+{
+ String* pStr;
+
+ // alte Liste loeschen
+ for( pStr = aTargetList.First(); pStr; pStr = aTargetList.Next() )
+ delete pStr;
+
+ aTargetList.Clear();
+
+ // mit uebergebener Liste fuellen
+ for( pStr = rTargetList.First(); pStr; pStr = rTargetList.Next() )
+ aTargetList.Insert( new String( *pStr ) );
+
+ pModel->SetChanged( FALSE );
+}
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+SdrObject* IMapWindow::CreateObj( const IMapObject* pIMapObj )
+{
+ Point aPoint;
+ Rectangle aClipRect( aPoint, GetGraphicSize() );
+ SdrObject* pSdrObj = NULL;
+ IMapObject* pCloneIMapObj;
+
+ switch( pIMapObj->GetType() )
+ {
+ case( IMAP_OBJ_RECTANGLE ):
+ {
+ IMapRectangleObject* pIMapRectObj = (IMapRectangleObject*) pIMapObj;
+ Rectangle aDrawRect( pIMapRectObj->GetRectangle( FALSE ) );
+
+ // auf Zeichenflaeche clippen
+ aDrawRect.Intersection( aClipRect );
+
+ pSdrObj = (SdrObject*) new SdrRectObj( aDrawRect );
+ pCloneIMapObj = (IMapObject*) new IMapRectangleObject( *pIMapRectObj );
+ }
+ break;
+
+ case( IMAP_OBJ_CIRCLE ):
+ {
+ IMapCircleObject* pIMapCircleObj = (IMapCircleObject*) pIMapObj;
+ const Point aCenter( pIMapCircleObj->GetCenter( FALSE ) );
+ const long nRadius = pIMapCircleObj->GetRadius( FALSE );
+ const Point aOffset( nRadius, nRadius );
+ Rectangle aCircle( aCenter - aOffset, aCenter + aOffset );
+
+ // auf Zeichenflaeche begrenzen
+ aCircle.Intersection( aClipRect );
+
+ pSdrObj = (SdrObject*) new SdrCircObj( OBJ_CIRC, aCircle, 0, 36000 );
+ pCloneIMapObj = (IMapObject*) new IMapCircleObject( *pIMapCircleObj );
+ }
+ break;
+
+ case( IMAP_OBJ_POLYGON ):
+ {
+ IMapPolygonObject* pIMapPolyObj = (IMapPolygonObject*) pIMapObj;
+
+ // Falls wir eigentlich eine Ellipse sind,
+ // erzeugen wir auch wieder eine Ellipse
+ if ( pIMapPolyObj->HasExtraEllipse() )
+ {
+ Rectangle aDrawRect( pIMapPolyObj->GetExtraEllipse() );
+
+ // auf Zeichenflaeche clippen
+ aDrawRect.Intersection( aClipRect );
+
+ pSdrObj = (SdrObject*) new SdrCircObj( OBJ_CIRC, aDrawRect, 0, 36000 );
+ }
+ else
+ {
+ const Polygon& rPoly = pIMapPolyObj->GetPolygon( FALSE );
+ USHORT nCount = rPoly.GetSize();
+ Polygon aDrawPoly( rPoly );
+
+ // auf Zeichenflaeche clippen
+ aDrawPoly.Clip( aClipRect );
+
+ pSdrObj = (SdrObject*) new SdrPathObj( OBJ_POLY, XPolyPolygon( XPolygon( aDrawPoly ) ) );
+ }
+
+ pCloneIMapObj = (IMapObject*) new IMapPolygonObject( *pIMapPolyObj );
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ if ( pSdrObj )
+ {
+ SfxItemSet aSet( pModel->GetItemPool() );
+
+ aSet.Put( XFillStyleItem( XFILL_SOLID ) );
+ aSet.Put( XFillColorItem( String(), TRANSCOL ) );
+
+ if ( !pIMapObj->IsActive() )
+ {
+ aSet.Put( XFillTransparenceItem( 100 ) );
+ aSet.Put( XLineColorItem( String(), Color( COL_RED ) ) );
+ }
+ else
+ {
+ aSet.Put( XFillTransparenceItem( 50 ) );
+ aSet.Put( XLineColorItem( String(), Color( COL_BLACK ) ) );
+ }
+
+ pSdrObj->SetAttributes( aSet, FALSE );
+ pSdrObj->InsertUserData( new IMapUserData( pCloneIMapObj ) );
+ pSdrObj->SetUserCall( GetSdrUserCall() );
+ }
+
+ return pSdrObj;
+}
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+void IMapWindow::InitSdrModel()
+{
+ GraphCtrl::InitSdrModel();
+
+ SfxItemSet aSet( pModel->GetItemPool() );
+
+ aSet.Put( XFillColorItem( String(), TRANSCOL ) );
+ aSet.Put( XFillTransparenceItem( 50 ) );
+ pView->SetAttributes( aSet );
+ pView->SetFrameDragSingles( TRUE );
+}
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+void IMapWindow::SdrObjCreated( const SdrObject& rObj )
+{
+ switch( rObj.GetObjIdentifier() )
+ {
+ case( OBJ_RECT ):
+ {
+ SdrRectObj* pRectObj = (SdrRectObj*) &rObj;
+ IMapRectangleObject* pObj = new IMapRectangleObject( pRectObj->GetLogicRect(),
+ String(), String(), TRUE, FALSE );
+
+ pRectObj->InsertUserData( new IMapUserData( pObj ) );
+ }
+ break;
+
+ case( OBJ_CIRC ):
+ {
+ IMapPolygonObject* pObj;
+ SdrCircObj* pCircObj = (SdrCircObj*) &rObj;
+ SdrPathObj* pPathObj = (SdrPathObj*) pCircObj->ConvertToPolyObj( FALSE, FALSE );
+ const XPolygon& rXPoly = pPathObj->GetPathPoly().GetObject( 0 );
+ USHORT nCount = rXPoly.GetPointCount();
+ Polygon aPoly( nCount );
+
+ for ( USHORT i = 0; i < nCount; i++ )
+ aPoly[ i ] = rXPoly[ i ];
+
+ // wurde von uns nur temporaer angelegt
+ delete pPathObj;
+
+ pObj = new IMapPolygonObject( aPoly, String(), String(), TRUE, FALSE );
+ pObj->SetExtraEllipse( aPoly.GetBoundRect() );
+ pCircObj->InsertUserData( new IMapUserData( pObj ) );
+ }
+ break;
+
+ case( OBJ_POLY ):
+ case( OBJ_FREEFILL ):
+ case( OBJ_PATHPOLY ):
+ case( OBJ_PATHFILL ):
+ {
+ IMapPolygonObject* pObj;
+ SdrPathObj* pPathObj = (SdrPathObj*) &rObj;
+ const XPolyPolygon& rXPolyPoly = pPathObj->GetPathPoly();
+
+ if ( rXPolyPoly.Count() )
+ {
+ const XPolygon& rXPoly = rXPolyPoly.GetObject( 0 );
+ USHORT nCount = rXPoly.GetPointCount();
+ Polygon aPoly( nCount );
+
+ for ( USHORT i = 0; i < nCount; i++ )
+ aPoly[ i ] = rXPoly[ i ];
+
+ IMapPolygonObject aPolyObj( aPoly, String(), String(), TRUE, FALSE );
+
+ pObj = new IMapPolygonObject( aPoly, String(), String(), TRUE, FALSE );
+ pPathObj->InsertUserData( new IMapUserData( pObj ) );
+ }
+ }
+ break;
+
+ default:
+ break;
+ }
+}
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+void IMapWindow::SdrObjChanged( const SdrObject& rObj )
+{
+ IMapUserData* pUserData = (IMapUserData*) rObj.GetUserData( 0 );
+
+ if ( pUserData )
+ {
+ String aURL;
+ String aText;
+ String aTarget;
+ IMapObject* pIMapObj = pUserData->GetObject();
+ BOOL bActive = TRUE;
+
+ if ( pIMapObj )
+ {
+ aURL = pIMapObj->GetURL();
+ aText = pIMapObj->GetDescription();
+ aTarget = pIMapObj->GetTarget();
+ bActive = pIMapObj->IsActive();
+ }
+
+ switch( rObj.GetObjIdentifier() )
+ {
+ case( OBJ_RECT ):
+ {
+ pUserData->ReplaceObject( new IMapRectangleObject( ( (const SdrRectObj&) rObj ).GetLogicRect(),
+ aURL, aText, aTarget, bActive, FALSE ) );
+ }
+ break;
+
+ case( OBJ_CIRC ):
+ {
+ const SdrCircObj& rCircObj = (const SdrCircObj&) rObj;
+ SdrPathObj* pPathObj = (SdrPathObj*) rCircObj.ConvertToPolyObj( FALSE, FALSE );
+ const XPolygon& rXPoly = pPathObj->GetPathPoly().GetObject( 0 );
+ USHORT nCount = rXPoly.GetPointCount();
+ Polygon aPoly( nCount );
+
+ for ( USHORT i = 0; i < nCount; i++ )
+ aPoly[ i ] = rXPoly[ i ];
+
+ IMapPolygonObject* pObj = new IMapPolygonObject( aPoly, aURL, aText, aTarget, bActive, FALSE );
+ pObj->SetExtraEllipse( aPoly.GetBoundRect() );
+
+ // wurde von uns nur temporaer angelegt
+ delete pPathObj;
+ pUserData->ReplaceObject( pObj );
+ }
+ break;
+
+ case( OBJ_POLY ):
+ case( OBJ_FREEFILL ):
+ case( OBJ_PATHPOLY ):
+ case( OBJ_PATHFILL ):
+ {
+ const SdrPathObj& rPathObj = (const SdrPathObj&) rObj;
+ const XPolyPolygon& rXPolyPoly = rPathObj.GetPathPoly();
+
+ if ( rXPolyPoly.Count() )
+ {
+ const XPolygon& rXPoly = rPathObj.GetPathPoly().GetObject( 0 );
+ USHORT nCount = rXPoly.GetPointCount();
+ Polygon aPoly( nCount );
+
+ for ( USHORT i = 0; i < nCount; i++ )
+ aPoly[ i ] = rXPoly[ i ];
+
+ IMapPolygonObject* pObj = new IMapPolygonObject( aPoly, aURL, aText, aTarget, bActive, FALSE );
+ pUserData->ReplaceObject( pObj );
+ }
+ }
+ break;
+
+ default:
+ break;
+ }
+ }
+}
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+void IMapWindow::MouseButtonUp(const MouseEvent& rMEvt)
+{
+ GraphCtrl::MouseButtonUp( rMEvt );
+ UpdateInfo( TRUE );
+}
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+void IMapWindow::MarkListHasChanged()
+{
+ GraphCtrl::MarkListHasChanged();
+ UpdateInfo( FALSE );
+}
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+SdrObject* IMapWindow::GetHitSdrObj( const Point& rPosPixel ) const
+{
+ SdrObject* pObj = NULL;
+ Point aPt = PixelToLogic( rPosPixel );
+
+ if ( Rectangle( Point(), GetGraphicSize() ).IsInside( aPt ) )
+ {
+ SdrPage* pPage = (SdrPage*) pModel->GetPage( 0 );
+ ULONG nCount;
+
+ if ( pPage && ( ( nCount = pPage->GetObjCount() ) > 0 ) )
+ {
+ for ( long i = nCount - 1; i >= 0; i-- )
+ {
+ SdrObject* pTestObj = pPage->GetObj( i );
+ IMapObject* pIMapObj = GetIMapObj( pTestObj );
+
+ if ( pIMapObj && pIMapObj->IsHit( aPt ) )
+ {
+ pObj = pTestObj;
+ break;
+ }
+ }
+ }
+ }
+
+ return pObj;
+}
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+IMapObject* IMapWindow::GetIMapObj( const SdrObject* pSdrObj ) const
+{
+ IMapObject* pIMapObj = NULL;
+
+ if ( pSdrObj )
+ {
+ IMapUserData* pUserData = (IMapUserData*) pSdrObj->GetUserData( 0 );
+
+ if ( pUserData )
+ pIMapObj = pUserData->GetObject();
+ }
+
+ return pIMapObj;
+}
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+SdrObject* IMapWindow::GetSdrObj( const IMapObject* pIMapObj ) const
+{
+ SdrObject* pSdrObj = NULL;
+ SdrPage* pPage = (SdrPage*) pModel->GetPage( 0 );
+ ULONG nCount;
+
+ if ( pPage && ( ( nCount = pPage->GetObjCount() ) > 0 ) )
+ {
+ for ( ULONG i = 0; i < nCount; i++ )
+ {
+ SdrObject* pTestObj = pPage->GetObj( i );
+
+ if ( pIMapObj == GetIMapObj( pTestObj ) )
+ {
+ pSdrObj = pTestObj;
+ break;
+ }
+ }
+ }
+
+ return pSdrObj;
+}
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+void IMapWindow::Command(const CommandEvent& rCEvt)
+{
+ Region aRegion;
+ USHORT nSelId = 0;
+
+ if ( rCEvt.GetCommand() == COMMAND_CONTEXTMENU )
+ {
+ PopupMenu aMenu( SVX_RES( RID_SVXMN_IMAP ) );
+ const SdrMarkList& rMarkList = pView->GetMarkList();
+ ULONG nMarked = rMarkList.GetMarkCount();
+
+ aMenu.EnableItem( MN_URL, FALSE );
+ aMenu.EnableItem( MN_ACTIVATE, FALSE );
+ aMenu.EnableItem( MN_MACRO, FALSE );
+ aMenu.EnableItem( MN_MARK_ALL, pModel->GetPage( 0 )->GetObjCount() != pView->GetMarkedObjCount() );
+
+ if ( !nMarked )
+ {
+ aMenu.EnableItem( MN_POSITION, FALSE );
+ aMenu.EnableItem( MN_FRAME_TO_TOP, FALSE );
+ aMenu.EnableItem( MN_MOREFRONT, FALSE );
+ aMenu.EnableItem( MN_MOREBACK, FALSE );
+ aMenu.EnableItem( MN_FRAME_TO_BOTTOM, FALSE );
+ aMenu.EnableItem( MN_DELETE, FALSE );
+ }
+ else
+ {
+ if ( nMarked == 1 )
+ {
+ SdrObject* pSdrObj = GetSelectedSdrObject();
+
+ aMenu.EnableItem( MN_URL, TRUE );
+ aMenu.EnableItem( MN_ACTIVATE, TRUE );
+ aMenu.EnableItem( MN_MACRO, TRUE );
+ aMenu.CheckItem( MN_ACTIVATE, GetIMapObj( pSdrObj )->IsActive() );
+ }
+
+ aMenu.EnableItem( MN_POSITION, TRUE );
+ aMenu.EnableItem( MN_FRAME_TO_TOP, TRUE );
+ aMenu.EnableItem( MN_MOREFRONT, TRUE );
+ aMenu.EnableItem( MN_MOREBACK, TRUE );
+ aMenu.EnableItem( MN_FRAME_TO_BOTTOM, TRUE );
+ aMenu.EnableItem( MN_DELETE, TRUE );
+ }
+
+ aMenu.SetSelectHdl( LINK( this, IMapWindow, MenuSelectHdl ) );
+ aMenu.Execute( this, OutputToScreenPixel( rCEvt.GetMousePosPixel() ) );
+ }
+ else
+ Window::Command(rCEvt);
+}
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+BOOL IMapWindow::QueryDrop( DropEvent& rDEvt )
+{
+ return ( GetHitSdrObj( rDEvt.GetPosPixel() ) != NULL );
+}
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+BOOL IMapWindow::Drop( const DropEvent& rDEvt )
+{
+ const String aString;
+ INetBookmark aBookMark( aString, aString );
+ SvDataObjectRef aDataObj = SvDataObject::PasteDragServer( rDEvt );
+ BOOL bRet = FALSE;
+
+ if ( aBookMark.HasFormat( *aDataObj ) )
+ {
+ SdrObject* pSdrObj = GetHitSdrObj( rDEvt.GetPosPixel() );
+
+ if ( pSdrObj && aBookMark.Paste( *aDataObj, SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK ) )
+ {
+ IMapObject* pIMapObj = GetIMapObj( pSdrObj );
+
+ pIMapObj->SetURL( aBookMark.GetURL() );
+ pIMapObj->SetDescription( aBookMark.GetDescription() );
+ pModel->SetChanged( TRUE );
+ pView->UnmarkAll();
+ pView->MarkObj( pSdrObj, pView->GetPageViewPvNum( 0 ) );
+ UpdateInfo( TRUE );
+
+ bRet = TRUE;
+ }
+ }
+
+ return bRet;
+}
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+void IMapWindow::RequestHelp( const HelpEvent& rHEvt )
+{
+ SdrObject* pSdrObj = NULL;
+ SdrPageView* pPageView = NULL;
+ Point aPos = PixelToLogic( ScreenToOutputPixel( rHEvt.GetMousePosPixel() ) );
+
+ if ( Help::IsBalloonHelpEnabled() || Help::IsQuickHelpEnabled() )
+ {
+ if ( pView->PickObj( aPos, pSdrObj, pPageView ) )
+ {
+ const IMapObject* pIMapObj = GetIMapObj( pSdrObj );
+ String aStr;
+
+ if ( pIMapObj && ( aStr = pIMapObj->GetURL() ).Len() )
+ {
+ String aDescr( pIMapObj->GetDescription() );
+ Rectangle aLogicPix( LogicToPixel( Rectangle( Point(), GetGraphicSize() ) ) );
+ Rectangle aScreenRect( OutputToScreenPixel( aLogicPix.TopLeft() ),
+ OutputToScreenPixel( aLogicPix.BottomRight() ) );
+
+ if ( Help::IsBalloonHelpEnabled() )
+ Help::ShowBalloon( this, rHEvt.GetMousePosPixel(), aScreenRect, aStr );
+ else if ( Help::IsQuickHelpEnabled() )
+ Help::ShowQuickHelp( this, aScreenRect, aStr );
+ }
+ }
+ else
+ Window::RequestHelp( rHEvt );
+ }
+}
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+void IMapWindow::SetCurrentObjState( BOOL bActive )
+{
+ SdrObject* pObj = GetSelectedSdrObject();
+
+ if ( pObj )
+ {
+ SfxItemSet aSet( pModel->GetItemPool() );
+
+ GetIMapObj( pObj )->SetActive( bActive );
+
+ aSet.Put( XFillColorItem( String(), TRANSCOL ) );
+
+ if ( !bActive )
+ {
+ aSet.Put( XFillTransparenceItem( 100 ) );
+ aSet.Put( XLineColorItem( String(), Color( COL_RED ) ) );
+ }
+ else
+ {
+ aSet.Put( XFillTransparenceItem( 50 ) );
+ aSet.Put( XLineColorItem( String(), Color( COL_BLACK ) ) );
+ }
+
+ pView->SetAttributes( aSet, FALSE );
+ }
+}
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+void IMapWindow::UpdateInfo( BOOL bNewObj )
+{
+ if ( aInfoLink.IsSet() )
+ {
+ const SdrObject* pSdrObj = GetSelectedSdrObject();
+ const IMapObject* pIMapObj = pSdrObj ? GetIMapObj( pSdrObj ) : NULL;
+
+ aInfo.bNewObj = bNewObj;
+
+ if ( pIMapObj )
+ {
+ aInfo.bOneMarked = TRUE;
+ aInfo.aMarkURL = pIMapObj->GetURL();
+ aInfo.aMarkDescription = pIMapObj->GetDescription();
+ aInfo.aMarkTarget = pIMapObj->GetTarget();
+ aInfo.bActivated = pIMapObj->IsActive();
+ aInfoLink.Call( this );
+ }
+ else
+ {
+ aInfo.aMarkURL = aInfo.aMarkDescription = aInfo.aMarkTarget = String();
+ aInfo.bOneMarked = FALSE;
+ aInfo.bActivated = FALSE;
+ }
+
+ aInfoLink.Call( this );
+ }
+}
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+void IMapWindow::DoMacroAssign()
+{
+ SdrObject* pSdrObj = GetSelectedSdrObject();
+
+ if ( pSdrObj )
+ {
+ SfxItemSet aSet( *pIMapPool, SID_ATTR_MACROITEM, SID_ATTR_MACROITEM );
+ SvxMacroItem aMacroItem;
+ IMapObject* pIMapObj = GetIMapObj( pSdrObj );
+
+ aMacroItem.SetMacroTable( pIMapObj->GetMacroTable() );
+ aSet.Put( aMacroItem, SID_ATTR_MACROITEM );
+
+ SfxMacroAssignDlg aMacroDlg( this, aSet );
+ SfxMacroTabPage* pMacroTabPage = (SfxMacroTabPage*) aMacroDlg.GetTabPage();
+
+ if ( pMacroTabPage )
+ {
+ pMacroTabPage->AddEvent( String::CreateFromAscii( "MouseOver" ), SFX_EVENT_MOUSEOVER_OBJECT );
+ pMacroTabPage->AddEvent( String::CreateFromAscii( "MouseOut" ), SFX_EVENT_MOUSEOUT_OBJECT );
+
+ if ( aMacroDlg.Execute() == RET_OK )
+ {
+ const SfxItemSet* pOutSet = aMacroDlg.GetOutputItemSet();
+ pIMapObj->SetMacroTable( ((const SvxMacroItem& )pOutSet->Get( SID_ATTR_MACROITEM )).GetMacroTable() );
+ }
+ }
+ }
+}
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+void IMapWindow::DoPropertyDialog()
+{
+ SdrObject* pSdrObj = GetSelectedSdrObject();
+
+ if ( pSdrObj )
+ {
+ IMapObject* pIMapObj = GetIMapObj( pSdrObj );
+ URLDlg aDlg( this, pIMapObj->GetURL(), pIMapObj->GetDescription(),
+ pIMapObj->GetTarget(), pIMapObj->GetName(), aTargetList );
+
+ if ( aDlg.Execute() == RET_OK )
+ {
+ const String aURLText( aDlg.GetURL() );
+
+ if ( aURLText.Len() )
+ {
+ pIMapObj->SetURL( ::URIHelper::SmartRelToAbs( aURLText, FALSE,
+ INetURLObject::WAS_ENCODED,
+ INetURLObject::DECODE_UNAMBIGUOUS ) );
+ }
+ else
+ pIMapObj->SetURL( aURLText );
+
+ pIMapObj->SetDescription( aDlg.GetDescription() );
+ pIMapObj->SetTarget( aDlg.GetTarget() );
+ pIMapObj->SetName( aDlg.GetName() );
+ pModel->SetChanged( TRUE );
+ UpdateInfo( TRUE );
+ }
+ }
+}
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+IMPL_LINK( IMapWindow, MenuSelectHdl, Menu*, pMenu )
+{
+ if (pMenu)
+ {
+ USHORT nId = pMenu->GetCurItemId();
+
+ switch(nId)
+ {
+ case( MN_URL ):
+ DoPropertyDialog();
+ break;
+
+ case( MN_MACRO ):
+ DoMacroAssign();
+ break;
+
+ case( MN_ACTIVATE ):
+ {
+ const BOOL bNewState = !pMenu->IsItemChecked( MN_ACTIVATE );
+
+ pMenu->CheckItem( MN_ACTIVATE, bNewState );
+ SetCurrentObjState( bNewState );
+ UpdateInfo( FALSE );
+ }
+
+ case( MN_FRAME_TO_TOP ):
+ pView->PutMarkedToTop();
+ break;
+
+ case( MN_MOREFRONT ):
+ pView->MovMarkedToTop();
+ break;
+
+ case( MN_MOREBACK ):
+ pView->MovMarkedToBtm();
+ break;
+
+ case( MN_FRAME_TO_BOTTOM ):
+ pView->PutMarkedToBtm();
+ break;
+
+ case( MN_MARK_ALL ):
+ pView->MarkAll();
+ break;
+
+ case( MN_DELETE ):
+ pView->DeleteMarked();
+
+ default :
+ break;
+ }
+ }
+
+ return 0;
+}
+
+
diff --git a/svx/source/dialog/imapwnd.hxx b/svx/source/dialog/imapwnd.hxx
new file mode 100644
index 000000000000..b2339e77e8e3
--- /dev/null
+++ b/svx/source/dialog/imapwnd.hxx
@@ -0,0 +1,264 @@
+/*************************************************************************
+ *
+ * $RCSfile: imapwnd.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:09 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _IMAPWND_HXX
+#define _IMAPWND_HXX
+
+#ifndef _SV_DIALOG_HXX //autogen
+#include <vcl/dialog.hxx>
+#endif
+#ifndef _SV_GROUP_HXX //autogen
+#include <vcl/group.hxx>
+#endif
+#ifndef _SV_FIXED_HXX //autogen
+#include <vcl/fixed.hxx>
+#endif
+#ifndef _SV_BUTTON_HXX //autogen
+#include <vcl/button.hxx>
+#endif
+#ifndef _SV_MENU_HXX //autogen
+#include <vcl/menu.hxx>
+#endif
+#ifndef _SFXITEMPOOL_HXX //autogen
+#include <svtools/itempool.hxx>
+#endif
+#ifndef _GOODIES_IMAPOBJ_HXX //autogen
+#include <svtools/imapobj.hxx>
+#endif
+#ifndef _IMAP_HXX //autogen
+#include <svtools/imap.hxx>
+#endif
+#ifndef _SFXFRAME_HXX
+#include <sfx2/frame.hxx>
+#endif
+
+#include "graphctl.hxx"
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+struct NotifyInfo
+{
+ String aMarkURL;
+ String aMarkDescription;
+ String aMarkTarget;
+ BOOL bNewObj;
+ BOOL bOneMarked;
+ BOOL bActivated;
+};
+
+
+struct NotifyPosSize
+{
+ Size aPictureSize;
+ Point aMousePos;
+ BOOL bPictureSize;
+ BOOL bMousePos;
+};
+
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+#define SVD_IMAP_USERDATA 0x0001
+
+const UINT32 IMapInventor = UINT32('I') * 0x00000001+
+ UINT32('M') * 0x00000100+
+ UINT32('A') * 0x00010000+
+ UINT32('P') * 0x01000000;
+
+
+class IMapUserData : public SdrObjUserData
+{
+ IMapObject* pObj;
+
+public:
+
+ IMapUserData() :
+ SdrObjUserData ( IMapInventor, SVD_IMAP_USERDATA, 0 ),
+ pObj ( NULL ) {}
+
+ IMapUserData( IMapObject* pIMapObj ) :
+ SdrObjUserData ( IMapInventor, SVD_IMAP_USERDATA, 0 ),
+ pObj ( pIMapObj ) {}
+
+ IMapUserData( const IMapUserData& rIMapUserData ) :
+ SdrObjUserData ( IMapInventor, SVD_IMAP_USERDATA, 0 ),
+ pObj ( rIMapUserData.pObj ) {}
+
+ ~IMapUserData() { delete pObj; }
+
+ virtual SdrObjUserData* Clone( SdrObject *pObj ) const { return new IMapUserData( *this ); }
+
+ void SetObject( IMapObject* pIMapObj ) { pObj = pIMapObj; }
+ IMapObject* GetObject() const { return pObj; }
+ void ReplaceObject( IMapObject* pNewIMapObject ) { delete pObj; pObj = pNewIMapObject; }
+};
+
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+class URLDlg : public ModalDialog
+{
+ GroupBox aGrpURL;
+ Edit aEdtURL;
+ Edit aEdtURLDescription;
+ ComboBox aCbbTargets;
+ Edit aEdtName;
+ FixedText aFtURL1;
+ FixedText aFtURLDescription;
+ FixedText aFtTarget;
+ FixedText aFtName;
+ OKButton aBtnOk;
+ CancelButton aBtnCancel;
+
+public:
+
+ URLDlg( Window* pWindow,
+ const String& rURL, const String& rDescription,
+ const String& rTarget, const String& rName,
+ TargetList& rTargetList );
+
+ String GetURL() const { return aEdtURL.GetText(); }
+ String GetDescription() const { return aEdtURLDescription.GetText(); }
+ String GetTarget() const { return aCbbTargets.GetText(); }
+ String GetName() const { return aEdtName.GetText(); }
+};
+
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+class IMapWindow : public GraphCtrl
+{
+ NotifyInfo aInfo;
+ ImageMap aIMap;
+ TargetList aTargetList;
+ Link aInfoLink;
+ SfxItemPool* pIMapPool;
+ SfxItemInfo* pItemInfo;
+
+ DECL_LINK( MenuSelectHdl, Menu* );
+ DECL_LINK( MouseTimerHdl, Timer* );
+
+protected:
+
+ virtual void MouseButtonUp(const MouseEvent& rMEvt);
+ virtual void Command(const CommandEvent& rCEvt);
+ virtual BOOL QueryDrop( DropEvent& rDEvt );
+ virtual BOOL Drop( const DropEvent& rDEvt );
+ virtual void RequestHelp( const HelpEvent& rHEvt );
+ virtual void SdrObjCreated( const SdrObject& rObj );
+ virtual void SdrObjChanged( const SdrObject& rObj );
+ virtual void MarkListHasChanged();
+ virtual void InitSdrModel();
+
+ void CreateImageMap();
+ void ReplaceImageMap( const ImageMap& rNewImageMap, BOOL bScaleToGraphic );
+
+ void ClearTargetList();
+
+ SdrObject* CreateObj( const IMapObject* pIMapObj );
+ IMapObject* GetIMapObj( const SdrObject* pSdrObj ) const;
+ SdrObject* GetSdrObj( const IMapObject* pIMapObj ) const;
+ SdrObject* GetHitSdrObj( const Point& rPosPixel ) const;
+
+ void UpdateInfo( BOOL bNewObj );
+
+public:
+
+ IMapWindow( Window* pParent, WinBits nWinBits = 0 );
+ IMapWindow( Window* pParent, const ResId& rResId );
+ ~IMapWindow();
+
+ BOOL ReplaceActualIMapInfo( const NotifyInfo& rNewInfo );
+
+ void SetImageMap( const ImageMap& rImageMap );
+ const ImageMap& GetImageMap();
+
+ void SetCurrentObjState( BOOL bActive );
+ void DoMacroAssign();
+ void DoPropertyDialog();
+
+ void SetInfoLink( const Link& rLink ) { aInfoLink = rLink; }
+ const Link& GetInfoLink() const { return aInfoLink; }
+
+ void SetTargetList( TargetList& rTargetList );
+ const TargetList& GetTargetList() const { return aTargetList; }
+
+ const NotifyInfo& GetInfo() const { return aInfo; }
+};
+
+
+#endif
+
diff --git a/svx/source/dialog/impgrf.cxx b/svx/source/dialog/impgrf.cxx
new file mode 100644
index 000000000000..6750847bbcf7
--- /dev/null
+++ b/svx/source/dialog/impgrf.cxx
@@ -0,0 +1,1277 @@
+/*************************************************************************
+ *
+ * $RCSfile: impgrf.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:09 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+// include ------------------------------------------------------------------
+
+#include <limits.h> // USHRT_MAX
+
+#ifndef _URLOBJ_HXX
+#include <tools/urlobj.hxx>
+#endif
+#ifndef _BIGINT_HXX
+#include <tools/bigint.hxx>
+#endif
+#ifndef _SFXENUMITEM_HXX
+#include <svtools/eitem.hxx>
+#endif
+#ifndef _SFXSTRITEM_HXX
+#include <svtools/stritem.hxx>
+#endif
+#ifndef _SFXINIMGR_HXX
+#include <svtools/iniman.hxx>
+#endif
+#ifndef _SFX_INIMGR_HXX
+#include <sfx2/inimgr.hxx>
+#endif
+#ifndef _SFXDOCFILE_HXX
+#include <sfx2/docfile.hxx>
+#endif
+#ifndef _SFXDISPATCH_HXX
+#include <sfx2/dispatch.hxx>
+#endif
+#ifndef _SV_MSGBOX_HXX //autogen
+#include <vcl/msgbox.hxx>
+#endif
+#ifndef _SV_WAITOBJ_HXX //autogen
+#include <vcl/waitobj.hxx>
+#endif
+#pragma hdrstop
+
+#include <ucbhelper/content.hxx>
+
+#ifndef _COM_SUN_STAR_UCB_COMMANDABORTEDEXCEPTION_HPP_
+#include <com/sun/star/ucb/CommandAbortedException.hpp>
+#endif
+
+using namespace ::ucb;
+using namespace com::sun::star::uno;
+
+#include "dialogs.hrc"
+#include "impgrf.hrc"
+
+#define _SVX_IMPGRF_CXX
+#include "impgrf.hxx"
+
+#include "dialmgr.hxx"
+#include "svxerr.hxx"
+#include "helpid.hrc"
+
+// defines ---------------------------------------------------------------
+
+#define IMPGRF_INIKEY_ASLINK "ImportGraphicAsLink"
+#define IMPGRF_INIKEY_PREVIEW "ImportGraphicPreview"
+
+#ifdef MAC
+#define IMPGRF_GRAPHIC_FILTER_FILE "Filterlist"
+#else
+#define IMPGRF_GRAPHIC_FILTER_FILE "install.ini"
+#endif
+
+#define IMPGRF_GRAPHIC_OPTIONS_FILE "fltopt.ini"
+
+// C-Funktion ------------------------------------------------------------
+
+USHORT GetImportFormatCount( GraphicFilter& rFlt )
+{
+ if ( rFlt.GetImportFormatCount() )
+ return rFlt.GetImportFormatCount();
+ else
+ return 4;
+}
+
+// -----------------------------------------------------------------------
+
+String GetImportFormatName( GraphicFilter& rFlt,
+ USHORT nFormat, String pFmtStrs[] )
+{
+ if ( rFlt.GetImportFormatCount() )
+ return rFlt.GetImportFormatName( nFormat );
+ else
+ return pFmtStrs[STR_FLT_BMP + nFormat].GetToken( 0, ',' );
+}
+
+// -----------------------------------------------------------------------
+
+String GetImportFormatWildcard( GraphicFilter& rFlt,
+ USHORT nFormat, String pFmtStrs[] )
+{
+ if ( rFlt.GetImportFormatCount() )
+ return rFlt.GetImportWildcard( nFormat );
+ else
+ return pFmtStrs[STR_FLT_BMP + nFormat].GetToken( 1, ',' );
+}
+
+// -----------------------------------------------------------------------
+
+String GetImportFormatOSType( GraphicFilter& rFlt, USHORT nFormat, String pFmtStrs[] )
+{
+ String aOSType;
+
+ if ( rFlt.GetImportFormatCount() )
+ aOSType = rFlt.GetImportFormatType( nFormat );
+ else
+ {
+#ifdef MAC
+ aOSType = pFmtStrs[STR_FLT_BMP + nFormat].GetToken( 2, ',' );
+#endif
+ }
+ return aOSType;
+}
+
+// -----------------------------------------------------------------------
+
+GraphicFilter* DialogsResMgr::GetGrfFilter_Impl()
+{
+ if( !pGrapicFilter )
+ {
+ pGrapicFilter = new GraphicFilter;
+ ::FillFilter( *pGrapicFilter );
+ }
+ const Link aLink;
+ pGrapicFilter->SetStartFilterHdl( aLink );
+ pGrapicFilter->SetEndFilterHdl( aLink );
+ pGrapicFilter->SetUpdatePercentHdl( aLink );
+ return pGrapicFilter;
+}
+
+// -----------------------------------------------------------------------
+
+GraphicFilter* GetGrfFilter()
+{
+ return (*(DialogsResMgr**)GetAppData(SHL_SVX))->GetGrfFilter_Impl();
+}
+
+// -----------------------------------------------------------------------
+
+USHORT FillFilter( GraphicFilter& rFilter )
+{
+ ResMgr* pMgr = DIALOG_MGR();
+ SfxIniManager* pIniMgr = SFX_INIMANAGER();
+ String aModulesPath( pIniMgr->Get( SFX_KEY_MODULES_PATH ) );
+ String aFullConfigPath;
+
+ for ( xub_StrLen i = 0, nCount = aModulesPath.GetTokenCount(); i < nCount; i++ )
+ {
+ INetURLObject aToken( aModulesPath.GetToken( i ), INET_PROT_FILE );
+ aToken.insertName( DEFINE_CONST_UNICODE(IMPGRF_GRAPHIC_FILTER_FILE) );
+
+ if ( aFullConfigPath.Len() )
+ aFullConfigPath += sal_Unicode(';');
+
+ aFullConfigPath += aToken.getFSysPath( INetURLObject::FSYS_DETECT );;
+ }
+
+ rFilter.SetConfigPath( aFullConfigPath );
+
+ INetURLObject aFilterPath( pIniMgr->Get( SFX_KEY_FILTER_PATH ), INET_PROT_FILE );
+ rFilter.SetFilterPath( aFilterPath.getFSysPath( INetURLObject::FSYS_DETECT ) );
+
+ INetURLObject aFltOptFile( pIniMgr->Get( SFX_KEY_USERCONFIG_PATH ), INET_PROT_FILE );
+ aFltOptFile.Append( UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( IMPGRF_GRAPHIC_OPTIONS_FILE ) ) );
+ rFilter.SetOptionsConfigPath( aFltOptFile );
+
+ return rFilter.GetImportFormatCount();
+}
+
+sal_Bool IsFolder_Impl( const String& rURL )
+{
+ sal_Bool bRet = sal_False;
+ try
+ {
+ Content aCnt( rURL, Reference< ::com::sun::star::ucb::XCommandEnvironment > () );
+ bRet = aCnt.isFolder();
+ }
+ catch( ::com::sun::star::ucb::CommandAbortedException& )
+ {
+ DBG_ERRORFILE( "CommandAbortedException" );
+ }
+ catch( ContentCreationException& )
+ {
+ DBG_ERRORFILE( "ContentCreationException" );
+ }
+ catch( ... )
+ {
+ DBG_ERRORFILE( "Any other exception" );
+ }
+
+ return bRet;
+}
+
+// -----------------------------------------------------------------------
+
+#pragma optimize( "", off )
+
+int LoadGraphic( const String &rPath, const String &rFilterName,
+ Graphic& rGraphic, GraphicFilter* pFilter,
+ USHORT* pDeterminedFormat )
+{
+ if ( !pFilter )
+ pFilter = ::GetGrfFilter();
+
+ const int nFilter = rFilterName.Len() && pFilter->GetImportFormatCount()
+ ? pFilter->GetImportFormatNumber( rFilterName )
+ : GRFILTER_FORMAT_DONTKNOW;
+
+ SfxMedium* pMed = 0;
+
+ // dann teste mal auf File-Protokoll:
+ SvStream* pStream = NULL;
+ INetURLObject aURL( rPath );
+
+ if ( aURL.HasError() || INET_PROT_NOT_VALID == aURL.GetProtocol() )
+ {
+ aURL.SetSmartProtocol( INET_PROT_FILE );
+ aURL.SetSmartURL( rPath );
+ }
+ else if ( INET_PROT_FILE != aURL.GetProtocol() )
+ {
+ // z.Z. nur auf die aktuelle DocShell
+ pMed = new SfxMedium( rPath, STREAM_READ, TRUE );
+ pMed->SetTransferPriority( SFX_TFPRIO_SYNCHRON );
+ pMed->DownLoad();
+ pStream = pMed->GetInStream();
+ }
+ int nRes = GRFILTER_OK;
+
+ if ( !pStream )
+ nRes = pFilter->ImportGraphic( rGraphic, aURL, nFilter, pDeterminedFormat );
+ else
+ nRes = pFilter->ImportGraphic( rGraphic, rPath, *pStream,
+ nFilter, pDeterminedFormat );
+
+#ifndef PRODUCT
+ if( nRes )
+ {
+ if( pMed )
+ {
+ DBG_WARNING3( "GrafikFehler [%d] - [%s] URL[%s]",
+ nRes,
+ pMed->GetPhysicalName().GetBuffer(),
+ rPath.GetBuffer() );
+ }
+ else
+ {
+ DBG_WARNING2( "GrafikFehler [%d] - [%s]", nRes, rPath.GetBuffer() );
+ }
+ }
+#endif
+
+ if ( pMed )
+ delete pMed;
+ return nRes;
+}
+
+#pragma optimize( "", on )
+
+// -----------------------------------------------------------------------
+
+BOOL IsGraphicError_Impl( const USHORT nError, USHORT& rErrInfo )
+{
+ // default: format error
+ rErrInfo = nError ? STR_GRFILTER_FORMATERROR : 0;
+
+ switch ( nError )
+ {
+ case GRFILTER_OPENERROR:
+ rErrInfo = STR_GRFILTER_OPENERROR;
+ break;
+ case GRFILTER_IOERROR:
+ rErrInfo = STR_GRFILTER_IOERROR;
+ break;
+ case GRFILTER_FORMATERROR:
+ rErrInfo = STR_GRFILTER_FORMATERROR;
+ break;
+ case GRFILTER_VERSIONERROR:
+ rErrInfo = STR_GRFILTER_VERSIONERROR;
+ break;
+ case GRFILTER_FILTERERROR:
+ rErrInfo = STR_GRFILTER_FILTERERROR;
+ break;
+ }
+ return (BOOL)nError;
+}
+
+// struct SvxImportGraphicRes_Impl ---------------------------------------
+
+struct SvxImportGraphicRes_Impl : public Resource
+{
+ SvxImportGraphicRes_Impl( USHORT nResId );
+ ~SvxImportGraphicRes_Impl();
+
+ String* pStrings;
+ BOOL bSaveAs;
+};
+
+// -----------------------------------------------------------------------
+
+SvxImportGraphicRes_Impl::SvxImportGraphicRes_Impl( USHORT nResId ) :
+
+ Resource( SVX_RES( nResId ) ),
+
+ pStrings( 0 ),
+ bSaveAs( FALSE )
+
+{
+ USHORT nCount = STR_IMPORTGRAPHIC_COUNT+1;
+ pStrings = new String[nCount];
+ pStrings[0] = String(); // ein Dummy
+
+ for ( USHORT i = 1; i < nCount; ++i )
+ pStrings[i] = String( ResId(i) );
+ FreeResource();
+}
+
+// -----------------------------------------------------------------------
+
+SvxImportGraphicRes_Impl::~SvxImportGraphicRes_Impl()
+{
+ __DELETE(STR_IMPORTGRAPHIC_COUNT)pStrings;
+}
+
+// class SvxGraphicHdl_Impl ----------------------------------------------
+
+class SvxGraphicHdl_Impl
+{
+public:
+ SvxGraphicHdl_Impl();
+ ~SvxGraphicHdl_Impl();
+
+ void GraphicPreview( SvxImportGraphicDialog* pDlg );
+
+private:
+friend class SvxImportGraphicDialog;
+
+ Graphic* pPreviewGrf;
+ String aPreviewPath;
+
+ int InsertGraphic( const String& rPath, const String& rFilter );
+};
+
+// class SvxGraphicPrevWin_Impl ------------------------------------------
+
+class SvxGraphicPrevWin_Impl : public Window
+{
+public:
+ SvxGraphicPrevWin_Impl( Window *pParent, WinBits nBits );
+ ~SvxGraphicPrevWin_Impl();
+
+ void SetGraphic( Graphic* pPict, const String& rFile );
+ Graphic* CreateTempGraphic( Graphic* pPict );
+ void SetMessage( const String& rMessage );
+
+private:
+friend class SvxImportGraphicDialog;
+
+ Graphic* pTempGraphic;
+ Graphic* pGraphic; // Grafik ...
+ String aMessage; // oder Fehlermeldung
+ String aFile; // Dateiname
+
+ void MouseButtonDown( const MouseEvent& );
+ void Paint( const Rectangle& );
+};
+
+// -----------------------------------------------------------------------
+
+SvxGraphicPrevWin_Impl::SvxGraphicPrevWin_Impl( Window* pParent, WinBits nBits ) :
+
+ Window( pParent, nBits ),
+
+ pTempGraphic( NULL ),
+ pGraphic ( NULL )
+
+{
+ // Transparenter Font f"ur Message-Ausgabe
+ Font aFont( GetFont() );
+ aFont.SetTransparent( TRUE );
+ SetFont( aFont );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxGraphicPrevWin_Impl::MouseButtonDown( const MouseEvent& )
+{
+ SvxImportGraphicDialog *pDlg = (SvxImportGraphicDialog*)GetParent();
+
+ if ( pDlg->pPreviewBox )
+ {
+ pDlg->pPreviewBox->Check();
+ ( (Link&)pDlg->pPreviewBox->GetClickHdl() ).Call( pDlg->pPreviewBox );
+ }
+}
+
+// -----------------------------------------------------------------------
+
+void SvxGraphicPrevWin_Impl::Paint( const Rectangle& )
+{
+ Size aOutSizePix = GetOutputSizePixel();
+
+ if( pGraphic )
+ {
+ Size aNewSizePix( LogicToPixel( pGraphic->GetPrefSize(),
+ pGraphic->GetPrefMapMode() ) );
+
+ if( aNewSizePix.Height() && aOutSizePix.Height() )
+ {
+ Point aPos;
+ const double fGrfWH = (double) aNewSizePix.Width() / aNewSizePix.Height();
+ const double fWinWH = (double) aOutSizePix.Width() / aOutSizePix.Height();
+
+ // Bitmap an Fenstergroesse anpassen
+ if( fGrfWH < fWinWH )
+ {
+ aNewSizePix.Width() = (long) ( aOutSizePix.Height() * fGrfWH );
+ aNewSizePix.Height() = aOutSizePix.Height();
+ }
+ else
+ {
+ aNewSizePix.Width() = aOutSizePix.Width();
+ aNewSizePix.Height()= (long) ( aOutSizePix.Width() / fGrfWH );
+ }
+
+ WaitObject aWaitPtr( this );
+
+ aPos.X() = ( aOutSizePix.Width() - aNewSizePix.Width() ) >> 1;
+ aPos.Y() = ( aOutSizePix.Height() - aNewSizePix.Height() ) >> 1;
+
+ if( pGraphic->IsAnimated() )
+ pGraphic->StartAnimation( this, aPos, aNewSizePix );
+ else
+ pGraphic->Draw( this, aPos, aNewSizePix );
+ }
+ }
+ else
+ {
+ SetLineColor( Color( COL_BLACK ) );
+
+ if ( aMessage.Len() )
+ {
+ // Fehlermeldung zeilenweise ausgeben
+ UniString aStrSpace( sal_Unicode( ' ' ) ), aStrChar( sal_Unicode( 'X' ) );
+ xub_StrLen i,
+ nCount = aMessage.GetTokenCount( sal_Unicode( ' ' ) ),
+ x = 2,
+ y = 2,
+ nSpaceW = GetTextWidth( aStrSpace ),
+ nCharH = GetTextHeight();
+ for ( i = 0; i < nCount; i++ )
+ {
+ String aWord = aMessage.GetToken( i, sal_Unicode( ' ' ) );
+ long nWordW = GetTextWidth( aWord );
+ if ( x != 2 && x + nWordW > aOutSizePix.Width() - 2 )
+ {
+ x = 2;
+ y += nCharH;
+ }
+ DrawText( Point( x, y ), aWord );
+ x += nWordW + nSpaceW;
+ }
+ }
+ else
+ {
+ // Kreuz malen
+ DrawLine( Point( 0, 0),
+ Point( aOutSizePix.Width() - 1,
+ aOutSizePix.Height() - 1 ) );
+ DrawLine( Point( 0, aOutSizePix.Height() - 1),
+ Point( aOutSizePix.Width() - 1, 0 ) );
+ }
+ }
+
+ // Zeichnen abgeschlossen
+ ( (SvxImportGraphicDialog*)GetParent() )->SetPreviewing( FALSE );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxGraphicPrevWin_Impl::SetGraphic( Graphic* pPict, const String& rFile )
+{
+ delete pGraphic;
+ pGraphic = pPict;
+
+ if ( pGraphic )
+ {
+ aMessage.Erase();
+ aFile = rFile;
+ }
+ else
+ aFile.Erase();
+
+ Invalidate();
+}
+
+// -----------------------------------------------------------------------
+
+Graphic* SvxGraphicPrevWin_Impl::CreateTempGraphic( Graphic* pPict )
+{
+ DELETEZ(pTempGraphic);
+
+ if ( pPict )
+ pTempGraphic = new Graphic( *pPict );
+ return pTempGraphic;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxGraphicPrevWin_Impl::SetMessage( const String& rMessage )
+{
+ delete pGraphic;
+ pGraphic = 0;
+ aMessage = rMessage;
+}
+
+// -----------------------------------------------------------------------
+
+SvxGraphicPrevWin_Impl::~SvxGraphicPrevWin_Impl()
+{
+ delete pTempGraphic;
+ delete pGraphic;
+}
+
+// class SvxImportGraphicDialog ------------------------------------------
+
+SvxImportGraphicDialog::SvxImportGraphicDialog
+(
+ Window* pParent,
+ const String& rTitle,
+ const USHORT nEnable,
+ WinBits nFlags
+) :
+ SfxFileDialog( pParent, nFlags ),
+
+ pMedium ( 0 ),
+ pStandardButton ( 0 ),
+ pInternetButton ( 0 ),
+ pPropertiesButton ( 0 ),
+ pFilterButton ( 0 ),
+ pLinkBox ( 0 ),
+ pPreviewBox ( 0 ),
+ bPreviewing ( FALSE )
+
+{
+ if (nEnable & ENABLE_EMPTY_FILENAMES)
+ EnableEmptyFilename();
+
+ Construct_Impl( rTitle, nEnable );
+ pResImpl->bSaveAs = WB_SAVEAS == (nFlags&WB_SAVEAS);
+}
+
+//-------------------------------------------------------------------------
+
+void SvxImportGraphicDialog::Construct_Impl( const String &rTitle, USHORT nEnable )
+{
+ pResImpl = new SvxImportGraphicRes_Impl( RID_SVXRES_IMPORTGRAPHIC );
+
+ SetFilterSelectHdl(
+ LINK( this, SvxImportGraphicDialog, FilterSelectHdl_Impl ) );
+
+ // Titel
+ SetText( rTitle );
+
+ // Ggf. "Eigenschaften" und "Verkn"upfung"
+ SfxApplication* pSfxApp = SFX_APP();
+ SfxIniManager* pIniMgr = SFX_INIMANAGER();
+
+ if ( ( ( ENABLE_LINK & nEnable ) && ( ENABLE_PROPERTY & nEnable ) ) ||
+ ( ENABLE_PROP_WITHOUTLINK & nEnable ) )
+ {
+ pPropertiesButton = new PushButton( this );
+ pPropertiesButton->SetText( pResImpl->pStrings[STR_PROPERTIES] );
+ pPropertiesButton->SetClickHdl(
+ LINK( this, SvxImportGraphicDialog, PropertiesHdl_Impl ) );
+ pPropertiesButton->SetHelpId( HID_IMPGRF_BTN_PROPERTIES );
+ AddControl( pPropertiesButton );
+ pPropertiesButton->Show();
+ }
+
+ // FilterButton jetzt immer
+ pFilterButton = new PushButton( this );
+ pFilterButton->SetText( pResImpl->pStrings[STR_FILTER] );
+ pFilterButton->SetClickHdl( LINK( this, SvxImportGraphicDialog, FilterHdl_Impl ) );
+ pFilterButton->SetHelpId( HID_IMPGRF_BTN_FILTER );
+ AddControl( pFilterButton );
+ pFilterButton->Show();
+
+ if ( ENABLE_LINK & nEnable )
+ {
+ BOOL bLink = FALSE;
+ const SfxPoolItem* pLink = pSfxApp->GetItem( SID_IMPORT_GRAPH_LINK );
+
+ if ( pLink )
+ bLink = ( (const SfxBoolItem*)pLink )->GetValue();
+ else
+ bLink = (BOOL)pIniMgr->Get( SFX_GROUP_COMMON, UniString::CreateFromAscii(
+ RTL_CONSTASCII_STRINGPARAM( IMPGRF_INIKEY_ASLINK ) ) ).ToInt32();
+ pLinkBox = new CheckBox( this );
+ pLinkBox->SetText( pResImpl->pStrings[STR_LINK] );
+ pLinkBox->Check( bLink );
+ pLinkBox->SetHelpId( HID_IMPGRF_CB_LINK );
+ AddControl( pLinkBox );
+ pLinkBox->Show();
+ }
+
+ // static Werte besorgen
+ const SfxPoolItem* pPrevItem = pSfxApp->GetItem( SID_IMPORT_GRAPH_PREVIEW );
+ BOOL bShowPreview = FALSE;
+
+ if ( pPrevItem )
+ bShowPreview = ( (SfxBoolItem*)pPrevItem )->GetValue();
+ else
+ bShowPreview = (BOOL)pIniMgr->Get( SFX_GROUP_COMMON, UniString::CreateFromAscii(
+ RTL_CONSTASCII_STRINGPARAM( IMPGRF_INIKEY_PREVIEW ) ) ).ToInt32();
+
+ // "Vorschau"
+ pPreviewBox = new CheckBox( this );
+ pPreviewBox->SetText( pResImpl->pStrings[STR_PREVIEW] );
+ pPreviewBox->SetClickHdl( LINK( this, SvxImportGraphicDialog, PreviewHdl_Impl ) );
+ pPreviewBox->Check( bShowPreview );
+ pPreviewBox->SetHelpId( HID_IMPGRF_CB_PREVIEW );
+ AddControl( pPreviewBox );
+ pPreviewBox->Show();
+
+ // Preview-Fenster erst hier erzeugen
+ pPrevWin = new SvxGraphicPrevWin_Impl( this, WinBits( WB_BORDER ) );
+ pPrevWin->SetBackground( Wallpaper( Color( COL_WHITE ) ) );
+ AddControl( pPrevWin );
+ pPrevWin->Show();
+
+ const SfxStringItem* pPathItem =
+ (const SfxStringItem*)pSfxApp->GetItem( SID_IMPORT_GRAPH_LASTPATH );
+ const SfxStringItem* pFilterItem =
+ (const SfxStringItem*)pSfxApp->GetItem( SID_IMPORT_GRAPH_LASTFILTER );
+
+ // Filter ermitteln
+ GraphicFilter* pGraphicFilter = GetGrfFilter();
+ USHORT i, nCount = pGraphicFilter->GetImportFormatCount();
+
+ // Filter "Alle"
+ String aExtensions;
+
+ for ( i = 0; i < nCount; i++ )
+ {
+ String aWildcard =
+ ::GetImportFormatWildcard( *pGraphicFilter, i, pResImpl->pStrings );
+
+ if ( aExtensions.Search( aWildcard ) == STRING_NOTFOUND )
+ {
+ if ( aExtensions.Len() )
+ aExtensions += sal_Unicode(';');
+ aExtensions += aWildcard;
+ }
+ }
+#if defined(WIN) || defined(WNT)
+ if ( aExtensions.Len() < 240 )
+ AddFilter( pResImpl->pStrings[STR_IMPORT_ALL], aExtensions );
+ else
+ AddFilter( SVX_RESSTR( RID_SVXSTR_ALL_FILES ),
+ UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "*.*" ) ) );
+#else
+ AddFilter( pResImpl->pStrings[STR_IMPORT_ALL], aExtensions );
+#endif
+
+ // Filter eintragen
+
+ for ( i = 0; i < nCount; i++ )
+ {
+ String aName =
+ ::GetImportFormatName( *pGraphicFilter, i, pResImpl->pStrings );
+ String aWildcard =
+ ::GetImportFormatWildcard( *pGraphicFilter, i, pResImpl->pStrings );
+ String aOSType =
+ ::GetImportFormatOSType( *pGraphicFilter, i, pResImpl->pStrings );
+ AddFilter( aName, aWildcard, aOSType );
+ }
+
+ // Pfad und Filter setzen
+ aStartPath = pIniMgr->Get( SFX_KEY_GRAPHICS_PATH );
+ FASTBOOL bGrfPath = ( aStartPath.Len() > 0 );
+ if ( !bGrfPath )
+ aStartPath = pIniMgr->Get( SFX_KEY_WORK_PATH );
+ SetStandardDir( aStartPath );
+ String aLastPath;
+ if ( pPathItem )
+ aLastPath = pPathItem->GetValue();
+
+ if ( aLastPath.Len() )
+ SetPath( aLastPath, TRUE );
+ else
+ {
+ String aPath = aStartPath;
+
+ if ( bGrfPath )
+ {
+ INetURLObject aTemp( aPath, INET_PROT_FILE );
+ aTemp.setFinalSlash();
+ aPath = aTemp.getFSysPath( INetURLObject::FSYS_DETECT );
+ }
+ SetPath( aPath, TRUE );
+ }
+
+ String aLastFilter;
+
+ if ( pFilterItem )
+ aLastFilter = pFilterItem->GetValue();
+
+ if ( aLastFilter.Len() )
+ SetCurFilter( aLastFilter );
+ else
+ SetCurFilter( pResImpl->pStrings[STR_IMPORT_ALL] );
+
+ // aPreviewTimer
+ aPrevTimer.SetTimeout( 500 );
+ aPrevTimer.SetTimeoutHdl(
+ LINK( this, SvxImportGraphicDialog, TimeOutHdl_Impl ) );
+
+ FilterSelectHdl_Impl( NULL );
+}
+
+// -----------------------------------------------------------------------
+
+SvxImportGraphicDialog::~SvxImportGraphicDialog()
+{
+ ReleaseOwnerShip( pPrevWin );
+ ReleaseOwnerShip( pPropertiesButton );
+ ReleaseOwnerShip( pLinkBox );
+ ReleaseOwnerShip( pPreviewBox );
+ ReleaseOwnerShip( pStandardButton );
+ ReleaseOwnerShip( pInternetButton );
+ ReleaseOwnerShip( pFilterButton );
+ delete pPrevWin;
+ delete pPropertiesButton;
+ delete pLinkBox;
+ delete pPreviewBox;
+ delete pStandardButton;
+ delete pInternetButton;
+ delete pFilterButton;
+ delete pResImpl;
+ delete pMedium;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxImportGraphicDialog::FileSelect()
+{
+ // falls User neu selektiert hat, dann die Internetselektion vergessen
+ String aSelPath = SfxFileDialog::GetPath();
+ sal_Bool bFolder = IsFolder_Impl( aSelPath );
+
+ if ( bFolder || aSelPath == aCurrPath )
+ // keine Datei selektiert, sondern Verzeichnis gewechselt
+ // oder gleiche Datei selektiert
+ return;
+ else
+ aCurrPath = aSelPath;
+
+ // falls gew"unscht, Preview antriggern
+ if ( pPreviewBox && pPreviewBox->IsChecked() )
+ aPrevTimer.Start();
+}
+
+// -----------------------------------------------------------------------
+
+BOOL SvxImportGraphicDialog::IsURL() const
+{
+ return FALSE;
+}
+
+// -----------------------------------------------------------------------
+
+short SvxImportGraphicDialog::Execute()
+{
+ short nRet;
+ USHORT nFound = 0;
+ SfxApplication* pSfxApp = SFX_APP();
+ GraphicFilter* pGraphicFilter = GetGrfFilter();
+
+ do
+ {
+ InitSize( UniString::CreateFromAscii(
+ RTL_CONSTASCII_STRINGPARAM( "ImpGrfDialogSize" ) ) );
+ nRet = SfxFileDialog::Execute();
+ String aGrfPath = GetPath();
+
+ if ( nRet == RET_OK && aGrfPath.Len())
+ {
+ INetURLObject aObj( aGrfPath );
+
+ // zuletzt verwendeten Filter merken
+ pSfxApp->PutItem( SfxStringItem( SID_IMPORT_GRAPH_LASTFILTER, GetCurFilter() ) );
+
+ // fall File-System,
+
+ if ( !IsURL() && INET_PROT_FILE == aObj.GetProtocol() )
+ {
+ // dann den zuletzt verwendeten Pfad merken
+ INetURLObject aTemp = aObj;
+ aTemp.removeSegment();
+ aTemp.setFinalSlash();
+ pSfxApp->PutItem( SfxStringItem( SID_IMPORT_GRAPH_LASTPATH,
+ aTemp.getFSysPath( INetURLObject::FSYS_DETECT ) ) );
+ }
+
+ // merken, ob der Benutzer Linken und Preview eingeschaltet hat
+ BOOL bLink = pLinkBox ? pLinkBox->IsChecked() : FALSE;
+ pSfxApp->PutItem( SfxBoolItem( SID_IMPORT_GRAPH_LINK, bLink ) );
+ sal_Unicode cTemp = bLink ? '1' : '0';
+ SFX_INIMANAGER()->Set( String( cTemp ), SFX_GROUP_COMMON, UniString::CreateFromAscii(
+ RTL_CONSTASCII_STRINGPARAM( IMPGRF_INIKEY_ASLINK ) ) );
+ cTemp = pPreviewBox && pPreviewBox->IsChecked() ? '1' : '0';
+ SFX_INIMANAGER()->Set( String( cTemp ), SFX_GROUP_COMMON, UniString::CreateFromAscii(
+ RTL_CONSTASCII_STRINGPARAM( IMPGRF_INIKEY_PREVIEW ) ) );
+
+ // Open?
+ if ( !pResImpl->bSaveAs )
+ {
+ // pr"uefen, ob die Grafik geladen werden kann
+ nFound = USHRT_MAX;
+ SvStream* pStream = NULL;
+ SfxMedium* pMed = NULL;
+
+ if ( INET_PROT_FILE != aObj.GetProtocol() )
+ {
+ pMed = new SfxMedium( aObj.GetMainURL(), STREAM_READ, TRUE );
+ pMed->SetTransferPriority( SFX_TFPRIO_SYNCHRON );
+ pMed->DownLoad();
+ pStream = pMed->GetInStream();
+ }
+ USHORT nImpRet = 0;
+ USHORT nRetFormat = 0;
+ USHORT nFormatNum = pGraphicFilter->
+ GetImportFormatNumber( GetCurFilter() );
+
+ if ( !pStream )
+ nImpRet = pGraphicFilter->CanImportGraphic( aObj, nFormatNum, &nRetFormat );
+ else
+ nImpRet = pGraphicFilter->CanImportGraphic( aObj.GetMainURL(), *pStream, nFormatNum, &nRetFormat );
+
+ if ( GRFILTER_OK != nImpRet )
+ {
+ if ( !pStream )
+ nImpRet = pGraphicFilter->CanImportGraphic( aObj, GRFILTER_FORMAT_DONTKNOW, &nRetFormat );
+ else
+ nImpRet = pGraphicFilter->CanImportGraphic( aObj.GetMainURL(), *pStream,
+ GRFILTER_FORMAT_DONTKNOW, &nRetFormat );
+ }
+
+ if ( GRFILTER_OK == nImpRet )
+ nFound = nRetFormat;
+
+ // konnte sie nicht geladen werden?
+ if ( nFound == USHRT_MAX )
+ {
+ // Fehlermeldung
+ Window *pParent = GetParent();
+
+ if ( !pParent->IsReallyVisible() )
+ pParent = NULL;
+
+ USHORT nErrInfo;
+ IsGraphicError_Impl( nImpRet, nErrInfo );
+ InfoBox aInfoBox( pParent, pResImpl->pStrings[nErrInfo] );
+ aInfoBox.Execute();
+ }
+ else
+ {
+ // passenden Filter setzen
+ String sFmt( ::GetImportFormatName(
+ *pGraphicFilter, nFound, pResImpl->pStrings ) );
+ SetCurFilter( sFmt );
+ }
+
+ if ( pPrevWin && pPrevWin->pGraphic &&
+ pPrevWin->pGraphic->IsAnimated() )
+ pPrevWin->pGraphic->StopAnimation( pPrevWin );
+ }
+ }
+ }
+ while ( nRet == RET_OK && nFound == USHRT_MAX );
+ return nRet;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxImportGraphicDialog::SetPath( const String& rPath, BOOL bDir, BOOL bLink )
+{
+ // Leere Verzeichnisse ignorieren
+ if ( bDir && !rPath.Len() )
+ return;
+
+ // Bei Pfaden ggf. Delimiter anhaengen
+ String aPath( rPath );
+
+ if ( !bDir && pLinkBox )
+ pLinkBox->Check( bLink );
+
+ if ( !aPath.Len() )
+ return;
+
+ INetURLObject aTmp;
+ aTmp.SetSmartURL( rPath );
+
+ if ( aTmp.GetProtocol() != INET_PROT_FILE )
+ {
+ SFX_APP()->PutItem( SfxStringItem( SID_IMPORT_GRAPH_LASTURL, rPath ) );
+ return;
+ }
+ else if ( bDir )
+ {
+ aTmp.setFinalSlash();
+ aPath = aTmp.getFSysPath( INetURLObject::FSYS_DETECT );
+ }
+
+ if ( !bDir || IsFolder_Impl( aTmp.GetMainURL() ) )
+ SfxFileDialog::SetPath( aPath );
+ else
+ {
+ String aTmp( pResImpl->pStrings[STR_PATH_NOT_FOUND1] );
+ aTmp += aPath;
+ aTmp += pResImpl->pStrings[STR_PATH_NOT_FOUND2];
+ Window* pBoxParent;
+
+ if ( IsInExecute() )
+ pBoxParent = this;
+ else
+ pBoxParent = GetParent();
+ InfoBox( pBoxParent, aTmp ).Execute();
+ }
+}
+
+// -----------------------------------------------------------------------
+
+Graphic* SvxImportGraphicDialog::GetGraphic() const
+{
+ Graphic* pGraphic = NULL;
+ FASTBOOL bForcePreview = FALSE;
+
+ if ( ( !pPrevWin || !pPrevWin->pGraphic ) && pPreviewBox )
+ {
+ // wenn die Grafik noch nicht geladen ist (Vorschau ausgeschaltet),
+ // dann die Vorschau anschalten und dadurch die Grafik laden
+ if ( !pPreviewBox->IsChecked() )
+ {
+ pPreviewBox->Check( TRUE );
+ bForcePreview = TRUE;
+ }
+ ( (SvxImportGraphicDialog*)this )->PreviewHdl_Impl( NULL );
+ }
+
+ if ( pPrevWin )
+ {
+ INetURLObject aFile( pPrevWin->aFile );
+ INetURLObject aCurFile( GetPath() );
+ if ( aFile == aCurFile )
+ {
+ pGraphic = pPrevWin->pGraphic;
+
+ // falls Grafik gelinkt eingef"ugt werden soll, native Link zur"ucksetzen
+ if ( pGraphic && AsLink() )
+ pGraphic->SetLink( GfxLink() );
+ }
+ }
+
+ if ( bForcePreview && pPrevWin )
+ {
+ pGraphic = pPrevWin->CreateTempGraphic( pGraphic );
+ pPreviewBox->Check( FALSE );
+ ( (SvxImportGraphicDialog*)this )->PreviewHdl_Impl( (Button*)-1 );
+ pPreviewBox->Enable();
+ }
+
+ return pGraphic;
+}
+
+// -----------------------------------------------------------------------
+
+String SvxImportGraphicDialog::GetPath() const
+{
+ return SfxFileDialog::GetPath();
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK_INLINE_START( SvxImportGraphicDialog, StandardHdl_Impl, Button *, EMPTYARG )
+{
+ SetPath( aStartPath, TRUE );
+ return 0;
+}
+IMPL_LINK_INLINE_END( SvxImportGraphicDialog, StandardHdl_Impl, Button *, EMPTYARG )
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK_INLINE_START( SvxImportGraphicDialog, PropertiesHdl_Impl, Button *, EMPTYARG )
+{
+ aPropertyLink.Call( this );
+ return 0;
+}
+IMPL_LINK_INLINE_END( SvxImportGraphicDialog, PropertiesHdl_Impl, Button *, EMPTYARG )
+
+// -----------------------------------------------------------------------
+
+#ifdef WNT
+#pragma optimize( "", off )
+#endif
+
+IMPL_LINK( SvxImportGraphicDialog, FilterHdl_Impl, Button *, EMPTYARG )
+{
+ GraphicFilter* pGraphicFilter = GetGrfFilter();
+ USHORT nFormat = pGraphicFilter->GetImportFormatNumber( GetCurFilter() );
+
+ if ( pGraphicFilter->DoImportDialog( this, nFormat ) )
+ PreviewHdl_Impl( 0 );
+ return 0;
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxImportGraphicDialog, PreviewHdl_Impl, Button *, pButton )
+{
+ BOOL bPreview = FALSE;
+
+ if ( pPreviewBox && pPreviewBox->IsChecked() )
+ {
+ if ( !bPreviewing )
+ {
+ WaitObject aWaitPtr( this );
+ bPreview = TRUE;
+ SvxGraphicHdl_Impl aGrfImp;
+ aGrfImp.GraphicPreview( this );
+ }
+ else
+ aPrevTimer.Start();
+ }
+ else
+ {
+ String aEmpty;
+ bPreview = FALSE;
+ pPrevWin->SetMessage( aEmpty );
+ pPrevWin->SetGraphic( 0, aEmpty );
+ // wieder zur"ucksetzen, damit das Kreuz auch richtig gemalt wird
+ pPrevWin->SetMapMode( MAP_PIXEL );
+ }
+
+ if ( IsInExecute() )
+ // wenn Preview "uber GetGraphic() eingeschaltet wurde, nicht merken
+ SFX_APP()->PutItem( SfxBoolItem( SID_IMPORT_GRAPH_PREVIEW, bPreview ) );
+
+ return 0;
+}
+
+#ifdef WNT
+#pragma optimize( "", on )
+#endif
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK_INLINE_START( SvxImportGraphicDialog, TimeOutHdl_Impl, Timer *, EMPTYARG )
+{
+ PreviewHdl_Impl( 0 );
+ return 0;
+}
+IMPL_LINK_INLINE_END( SvxImportGraphicDialog, TimeOutHdl_Impl, Timer *, EMPTYARG )
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( SvxImportGraphicDialog, FilterSelectHdl_Impl, void*, EMPTYARG )
+{
+ if ( !pFilterButton )
+ return 0;
+
+ GraphicFilter* pGraphicFilter = GetGrfFilter();
+ BOOL bEnable = pGraphicFilter->HasImportDialog(
+ pGraphicFilter->GetImportFormatNumber( GetCurFilter() ) );
+
+ if ( bEnable )
+ pFilterButton->Enable();
+ else
+ pFilterButton->Disable();
+ return 1;
+}
+
+// -----------------------------------------------------------------------
+
+long SvxImportGraphicDialog::OK()
+{
+ if ( !bPreviewing )
+ aPrevTimer.Stop();
+ return (long)!bPreviewing;
+}
+
+// -----------------------------------------------------------------------
+
+void SvxImportGraphicDialog::SetPreviewing( BOOL bPrev )
+{
+ bPreviewing = bPrev;
+
+ if ( pPreviewBox )
+ {
+ if ( !bPreviewing )
+ pPreviewBox->Enable();
+ else
+ pPreviewBox->Disable();
+ }
+}
+
+// SvxGraphicHdl_Impl ----------------------------------------------------
+
+SvxGraphicHdl_Impl::SvxGraphicHdl_Impl()
+{
+ pPreviewGrf = NULL;
+}
+
+// -----------------------------------------------------------------------
+
+SvxGraphicHdl_Impl::~SvxGraphicHdl_Impl()
+{
+}
+
+// -----------------------------------------------------------------------
+
+void SvxGraphicHdl_Impl::GraphicPreview( SvxImportGraphicDialog* pDlg )
+{
+ SvxImportGraphicRes_Impl* pResImpl =
+ new SvxImportGraphicRes_Impl( RID_SVXRES_IMPORTGRAPHIC );
+
+ // Grafik einlesen
+ aPreviewPath = pDlg->GetPath();
+ SvStream* pStream = NULL;
+ SfxMedium* pMed = NULL;
+ INetURLObject aUrl( aPreviewPath );
+
+ if ( aUrl.HasError() || INET_PROT_NOT_VALID == aUrl.GetProtocol() )
+ {
+ aUrl.SetSmartProtocol( INET_PROT_FILE );
+ aUrl.SetSmartURL( aPreviewPath );
+ }
+ else if ( INET_PROT_FILE != aUrl.GetProtocol() )
+ {
+ pMed = new SfxMedium( aPreviewPath, STREAM_READ, TRUE );
+ pMed->SetTransferPriority( SFX_TFPRIO_SYNCHRON );
+ pMed->DownLoad(); // nur mal das Medium anfassen (DownLoaden)
+ pStream = pMed->GetInStream();
+ }
+
+ if ( !pStream && IsFolder_Impl( aPreviewPath ) )
+ {
+ aPreviewPath.Erase();
+ delete pResImpl;
+ delete pMed;
+ return;
+ }
+
+ // OK in FileDialog verweigern
+ pDlg->SetPreviewing( TRUE );
+
+ // Filter erkennen
+ GraphicFilter& rGrf = pDlg->GetFilter();
+ USHORT nRetFormat = GRFILTER_FORMAT_DONTKNOW;
+ USHORT nFormatNum = rGrf.GetImportFormatNumber( pDlg->GetCurFilter() );
+ USHORT nImpRet = GRFILTER_OK;
+
+ if ( !pStream )
+ nImpRet = rGrf.CanImportGraphic( aUrl, nFormatNum, &nRetFormat );
+ else
+ nImpRet = rGrf.CanImportGraphic( aPreviewPath, *pStream,
+ nFormatNum, &nRetFormat );
+
+ if ( GRFILTER_OK != nImpRet )
+ {
+ if ( !pStream )
+ nImpRet = rGrf.CanImportGraphic( aUrl, GRFILTER_FORMAT_DONTKNOW, &nRetFormat );
+ else
+ nImpRet = rGrf.CanImportGraphic( aPreviewPath, *pStream, GRFILTER_FORMAT_DONTKNOW, &nRetFormat );
+ }
+ String sFmt( rGrf.GetImportFormatName( nRetFormat ) );
+ USHORT nError = InsertGraphic( aPreviewPath, sFmt );
+
+ // Format ist ungleich Current Filter, jetzt mit AutoDetection
+ if( nError == GRFILTER_FORMATERROR )
+ nError = InsertGraphic( aPreviewPath, String() );
+
+ USHORT nErrInfo;
+ BOOL bError = IsGraphicError_Impl( nError, nErrInfo );
+
+ if ( bError )
+ {
+ pDlg->GetPreviewWindow().SetMessage( pResImpl->pStrings[nErrInfo] );
+ pPreviewGrf = 0;
+ }
+ pDlg->GetPreviewWindow().SetGraphic( pPreviewGrf, aPreviewPath );
+ delete pResImpl;
+ delete pMed;
+}
+
+// -----------------------------------------------------------------------
+
+int SvxGraphicHdl_Impl::InsertGraphic( const String &rPath, const String &rFilter )
+{
+ Graphic* pImpGrf = new Graphic;
+
+ int nRes = LoadGraphic( rPath, rFilter, *pImpGrf );
+
+ if ( nRes )
+ {
+ delete pImpGrf;
+ pImpGrf = 0;
+ }
+ pPreviewGrf = pImpGrf;
+ return nRes;
+}
+
diff --git a/svx/source/dialog/impgrf.hrc b/svx/source/dialog/impgrf.hrc
new file mode 100644
index 000000000000..82b0fecebbef
--- /dev/null
+++ b/svx/source/dialog/impgrf.hrc
@@ -0,0 +1,90 @@
+/*************************************************************************
+ *
+ * $RCSfile: impgrf.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:09 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SVX_IMPGRF_HRC
+#define _SVX_IMPGRF_HRC
+
+// define -------------------------------------------------------------------
+
+#define STR_IMPORT_ALL 1
+#define STR_UNKNOWN_FORMAT 2
+#define STR_FLT_BMP 3
+#define STR_FLT_SGF 4
+#define STR_FLT_SGV 5
+#define STR_FLT_SVM 6
+#define STR_PATH_NOT_FOUND1 7
+#define STR_PATH_NOT_FOUND2 8
+#define STR_GRFILTER_OPENERROR 9
+#define STR_GRFILTER_IOERROR 10
+#define STR_GRFILTER_FORMATERROR 11
+#define STR_GRFILTER_VERSIONERROR 12
+#define STR_GRFILTER_FILTERERROR 13
+#define STR_GRFILTER_TOOBIG 14
+#define STR_PROPERTIES 15
+#define STR_HOME 16
+#define STR_LINK 17
+#define STR_PREVIEW 18
+#define STR_FILTER 19
+#define STR_IMPORTGRAPHIC_COUNT 19
+
+
+#endif
+
+
diff --git a/svx/source/dialog/impgrf.src b/svx/source/dialog/impgrf.src
new file mode 100644
index 000000000000..3929b00d508d
--- /dev/null
+++ b/svx/source/dialog/impgrf.src
@@ -0,0 +1,498 @@
+/*************************************************************************
+ *
+ * $RCSfile: impgrf.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:09 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+ // pragma -------------------------------------------------------------------
+
+ // include ------------------------------------------------------------------
+#include "dialogs.hrc"
+#include "impgrf.hrc"
+ // --------------------------------------------------------------------------
+String RID_SVXSTR_ALL_FILES
+{
+ Text = "<Alle Dateien>" ;
+ Text [ English ] = "<All files>" ;
+ Text [ english_us ] = "<All files>" ;
+ Text [ italian ] = "<Tutti i file>" ;
+ Text [ spanish ] = "<Todos los archivos>" ;
+ Text [ french ] = "<Tous les fichiers>" ;
+ Text [ dutch ] = "<Alle bestanden>" ;
+ Text [ swedish ] = "<Alla filer>" ;
+ Text [ danish ] = "<Alle filer>" ;
+ Text [ portuguese ] = "<Ficheiros todos>" ;
+ Text [ portuguese_brazilian ] = "<Alle Dateien>" ;
+ Text[ chinese_simplified ] = "<еĸʽ>";
+ Text[ russian ] = "< >";
+ Text[ polish ] = "<Wszystkie pliki>";
+ Text[ japanese ] = "<ׂĂ̧>";
+ Text[ chinese_traditional ] = "<Ҧ榡>";
+ Text[ arabic ] = "< >";
+ Text[ greek ] = "< >";
+ Text[ korean ] = "< >";
+ Text[ turkish ] = "<Tm dosyalar>";
+ Text[ language_user1 ] = " ";
+};
+Resource RID_SVXRES_IMPORTGRAPHIC
+{
+ String STR_IMPORT_ALL
+ {
+ Text = "<Alle Formate>" ;
+ Text [ English ] = "<All formats>" ;
+ Text [ norwegian ] = "<All formats>" ;
+ Text [ italian ] = "<Tutti i formati>" ;
+ Text [ portuguese_brazilian ] = "<Todos os formatos>" ;
+ Text [ portuguese ] = "<Todos os formatos>" ;
+ Text [ finnish ] = "<All formats>" ;
+ Text [ danish ] = "<Alle formater>" ;
+ Text [ french ] = "<Tous les formats>" ;
+ Text [ swedish ] = "<Alla format>" ;
+ Text [ dutch ] = "<Alle formaten>" ;
+ Text [ spanish ] = "<Todos los formatos>" ;
+ Text [ english_us ] = "<All formats>" ;
+ Text[ chinese_simplified ] = "<еĸʽ>";
+ Text[ russian ] = "< >";
+ Text[ polish ] = "<Wszystkie formaty>";
+ Text[ japanese ] = "<ׂĂ̏>";
+ Text[ chinese_traditional ] = "<Ҧ榡>";
+ Text[ arabic ] = "< >";
+ Text[ greek ] = "< >";
+ Text[ korean ] = "< >";
+ Text[ turkish ] = "<Tm formatlar>";
+ Text[ language_user1 ] = " ";
+ };
+ String STR_UNKNOWN_FORMAT
+ {
+ Text = "Unbekanntes Dateiformat!" ;
+ Text [ English ] = "Unknown file format!" ;
+ Text [ norwegian ] = "Unknown file format!" ;
+ Text [ italian ] = "Formato file sconosciuto!" ;
+ Text [ portuguese_brazilian ] = "Formato de arquivo desconhecido!" ;
+ Text [ portuguese ] = "Formato de ficheiro desconhecido!" ;
+ Text [ finnish ] = "Tuntematon tiedostomuoto!" ;
+ Text [ danish ] = "Ukendt filformat!" ;
+ Text [ french ] = "Format de fichier inconnu !" ;
+ Text [ swedish ] = "Oknt filformat!" ;
+ Text [ dutch ] = "Onbekend bestandsformaat!" ;
+ Text [ spanish ] = "Formato de archivo desconocido!" ;
+ Text [ english_us ] = "Unknown file format!" ;
+ Text[ chinese_simplified ] = "ļʽ";
+ Text[ russian ] = " !";
+ Text[ polish ] = "Nieznany format pliku!";
+ Text[ japanese ] = "şُB";
+ Text[ chinese_traditional ] = "ɮ׮榡";
+ Text[ arabic ] = " !";
+ Text[ greek ] = " !";
+ Text[ korean ] = "˷ !";
+ Text[ turkish ] = "Bilinmeyen dosya format!";
+ Text[ language_user1 ] = " ";
+ };
+ String STR_PATH_NOT_FOUND1
+ {
+ Text = "Das Verzeichnis '" ;
+ Text [ English ] = "The directory '" ;
+ Text [ norwegian ] = "The directory '" ;
+ Text [ italian ] = "La cartella '" ;
+ Text [ portuguese_brazilian ] = "O diretrio" ;
+ Text [ portuguese ] = "O directrio '" ;
+ Text [ finnish ] = "Hakemistoa '" ;
+ Text [ danish ] = "Biblioteket '" ;
+ Text [ french ] = "Le rpertoire '" ;
+ Text [ swedish ] = "Mappen '" ;
+ Text [ dutch ] = "Map '" ;
+ Text [ spanish ] = "El directorio '" ;
+ Text [ english_us ] = "The directory '" ;
+ Text[ chinese_simplified ] = "Ŀ¼ '";
+ Text[ russian ] = " '";
+ Text[ polish ] = "Katalog";
+ Text[ japanese ] = "ިڸ'";
+ Text[ chinese_traditional ] = "oӥؿ '";
+ Text[ arabic ] = " '";
+ Text[ greek ] = " '";
+ Text[ korean ] = "丮 '";
+ Text[ turkish ] = "Dizin '";
+ Text[ language_user1 ] = " ";
+ };
+ String STR_PATH_NOT_FOUND2
+ {
+ Text = "' existiert nicht." ;
+ Text [ English ] = "' does not exist." ;
+ Text [ norwegian ] = "' does not exist." ;
+ Text [ italian ] = "' non esiste." ;
+ Text [ portuguese_brazilian ] = "' no existe." ;
+ Text [ portuguese ] = "' no existe." ;
+ Text [ finnish ] = "' ei ole." ;
+ Text [ danish ] = "' findes ikke." ;
+ Text [ french ] = "' n'existe pas." ;
+ Text [ swedish ] = "' finns inte." ;
+ Text [ dutch ] = "' bestaat niet." ;
+ Text [ spanish ] = "' no existe." ;
+ Text [ english_us ] = "' does not exist" ;
+ Text[ chinese_simplified ] = "' ڡ";
+ Text[ russian ] = "' .";
+ Text[ polish ] = "nie istnieje.";
+ Text[ japanese ] = "'݂͑܂B";
+ Text[ chinese_traditional ] = "' sbC";
+ Text[ arabic ] = "' ";
+ Text[ greek ] = "' .";
+ Text[ korean ] = "' () ϴ.";
+ Text[ turkish ] = "' mevcut deil.";
+ Text[ language_user1 ] = " ";
+ };
+ String STR_FLT_BMP
+ {
+ Text = "BMP - MS Windows,*.BMP,BMPp0" ;
+ };
+ String STR_FLT_SGF
+ {
+ Text = "SGF - StarWriter SGF,*.SGF,????0" ;
+ };
+ String STR_FLT_SGV
+ {
+ Text = "SGV - StarDraw 2.0,*.SGV,????0" ;
+ };
+ String STR_FLT_SVM
+ {
+ Text = "SVM - StarView Metafile,*.SVM,SVM 0" ;
+ };
+ String STR_GRFILTER_OPENERROR
+ {
+ TEXT = "Grafikdatei kann nicht geffnet werden" ;
+ TEXT [ English ] = "Can't open graphic file" ;
+ TEXT [ norwegian ] = "Can't open graphic file" ;
+ TEXT [ italian ] = "Impossibile aprire il file grafico" ;
+ TEXT [ portuguese_brazilian ] = "No consigo abrir arquivo grfico" ;
+ TEXT [ portuguese ] = "Impossvel abrir ficheiro grfico" ;
+ TEXT [ finnish ] = "Grafiikkatiedostoa ei voi avata" ;
+ TEXT [ danish ] = "Det er ikke muligt at bne grafikfilen" ;
+ TEXT [ french ] = "Ouverture du fichier graphique impossible" ;
+ TEXT [ swedish ] = "Grafikfil kan inte ppnas" ;
+ TEXT [ dutch ] = "Grafisch bestand kan niet worden geopend" ;
+ TEXT [ spanish ] = "No es posible abrir el archivo grfico" ;
+ TEXT [ english_us ] = "Graphics file cannot be opened" ;
+ TEXT[ chinese_simplified ] = "޷ͼļ";
+ TEXT[ russian ] = " ";
+ TEXT[ polish ] = "Pliku graficznego nie mona otworzy";
+ TEXT[ japanese ] = "̨ ̧قJƂł܂B";
+ TEXT[ chinese_traditional ] = "Lk}ҹϧɮ";
+ TEXT[ arabic ] = " ";
+ TEXT[ greek ] = " ";
+ TEXT[ korean ] = "׷ ϴ";
+ TEXT[ turkish ] = "Grafik dosyas alamyor";
+ TEXT[ language_user1 ] = " ";
+ };
+ String STR_GRFILTER_IOERROR
+ {
+ TEXT = "Grafikdatei kann nicht gelesen werden" ;
+ TEXT [ English ] = "Can't read graphic file" ;
+ TEXT [ norwegian ] = "Can't read graphic file" ;
+ TEXT [ italian ] = "Impossibile leggere il file grafico" ;
+ TEXT [ portuguese_brazilian ] = "No consigo ler arquivo grfico" ;
+ TEXT [ portuguese ] = "Impossvel ler ficheiro grfico" ;
+ TEXT [ finnish ] = "Grafiikkatiedostoa ei voi lukea" ;
+ TEXT [ danish ] = "Det er ikke muligt at lse grafikfilen" ;
+ TEXT [ french ] = "Lecture du fichier graphique impossible" ;
+ TEXT [ swedish ] = "Grafikfil kan inte lsas" ;
+ TEXT [ dutch ] = "Grafisch bestand is onleesbaar" ;
+ TEXT [ spanish ] = "No es posible leer el archivo grfico" ;
+ TEXT [ english_us ] = "Graphics file cannot be read" ;
+ TEXT[ chinese_simplified ] = "޷ͼļ";
+ TEXT[ russian ] = " ";
+ TEXT[ polish ] = "Pliku graficznego nie mona otworzy";
+ TEXT[ japanese ] = "̨ ̧قǂ߂܂B";
+ TEXT[ chinese_traditional ] = "LkŪXϤɮ";
+ TEXT[ arabic ] = " ";
+ TEXT[ greek ] = " ";
+ TEXT[ korean ] = "׷ ϴ";
+ TEXT[ turkish ] = "Grafik dosyas okunamyor";
+ TEXT[ language_user1 ] = " ";
+ };
+ String STR_GRFILTER_FORMATERROR
+ {
+ TEXT = "Unbekanntes Grafikformat" ;
+ TEXT [ English ] = "Unknown graphic format" ;
+ TEXT [ norwegian ] = "Unknown graphic format" ;
+ TEXT [ italian ] = "Formato grafico sconosciuto" ;
+ TEXT [ portuguese_brazilian ] = "Formato grfico desconhecido" ;
+ TEXT [ portuguese ] = "Formato grfico desconhecido" ;
+ TEXT [ finnish ] = "Tuntematon grafiikkamuoto" ;
+ TEXT [ danish ] = "Ukendt grafikformat" ;
+ TEXT [ french ] = "Format d'image inconnu" ;
+ TEXT [ swedish ] = "Oknt grafikformat" ;
+ TEXT [ dutch ] = "Onbekend grafisch formaat" ;
+ TEXT [ spanish ] = "Formato de imagen desconocido" ;
+ TEXT [ english_us ] = "Unknown graphics format" ;
+ TEXT[ chinese_simplified ] = "ͼθʽ";
+ TEXT[ russian ] = " ";
+ TEXT[ polish ] = "Nieznany format graficzny";
+ TEXT[ japanese ] = "sȸ̨";
+ TEXT[ chinese_traditional ] = "Ϥ榡";
+ TEXT[ arabic ] = " ";
+ TEXT[ greek ] = " ";
+ TEXT[ korean ] = "˷ ׷ȼ";
+ TEXT[ turkish ] = "Bilinmeyen grafik format";
+ TEXT[ language_user1 ] = " ";
+ };
+ String STR_GRFILTER_VERSIONERROR
+ {
+ TEXT = "Die Version der Grafikdatei wird nicht untersttzt" ;
+ TEXT [ English ] = "Version of graphic file not supported" ;
+ TEXT [ norwegian ] = "Version of graphic file not supported" ;
+ TEXT [ italian ] = "Versione del file grafico non supportata" ;
+ TEXT [ portuguese_brazilian ] = "Verso de arquivo grfico no suportada" ;
+ TEXT [ portuguese ] = "Verso do ficheiro grfico no tem suporte" ;
+ TEXT [ finnish ] = "Ei tukea grafiikkatiedoston versiolle" ;
+ TEXT [ danish ] = "Grafikfilens version understttes ikke" ;
+ TEXT [ french ] = "Version du fichier graphique non supporte" ;
+ TEXT [ swedish ] = "Grafikfilens version stds inte" ;
+ TEXT [ dutch ] = "Deze versie van het grafisch bestand wordt niet ondersteund" ;
+ TEXT [ spanish ] = "No se apoya la versin del archivo grfico" ;
+ TEXT [ english_us ] = "Cannot support version of graphic file" ;
+ TEXT[ chinese_simplified ] = "֧ͼļ汾";
+ TEXT[ russian ] = " ";
+ TEXT[ polish ] = "Wersja pliku graficznego nie bdzie obsugiwana";
+ TEXT[ japanese ] = "̨ ̧قްޮ݂߰ĂĂ܂B";
+ TEXT[ chinese_traditional ] = "oӹϤɮת";
+ TEXT[ arabic ] = " ";
+ TEXT[ greek ] = " .";
+ TEXT[ korean ] = "׷ ";
+ TEXT[ turkish ] = "Grafik dosyasnn srm desteklenmiyor";
+ TEXT[ language_user1 ] = " ";
+ };
+ String STR_GRFILTER_FILTERERROR
+ {
+ TEXT = "Grafikfilter nicht gefunden" ;
+ TEXT [ English ] = "Graphic filter not found" ;
+ TEXT [ norwegian ] = "Graphic filter not found" ;
+ TEXT [ italian ] = "Filtro grafico non trovato" ;
+ TEXT [ portuguese_brazilian ] = "Filtro grfico no encontrado" ;
+ TEXT [ portuguese ] = "Filtro grfico no encontrado" ;
+ TEXT [ finnish ] = "Grafiikkasuodinta ei lydy" ;
+ TEXT [ danish ] = "Grafikfilter blev ikke fundet" ;
+ TEXT [ french ] = "Filtre graphique introuvable" ;
+ TEXT [ swedish ] = "Grafikfilter hittades inte" ;
+ TEXT [ dutch ] = "Grafische filter niet gevonden" ;
+ TEXT [ spanish ] = "No se encontr el filtro de imgenes" ;
+ TEXT [ english_us ] = "Graphics filter not found" ;
+ TEXT[ chinese_simplified ] = "ûҵͼι";
+ TEXT[ russian ] = " ";
+ TEXT[ polish ] = "Filtru graficznego nie znaleziono";
+ TEXT[ japanese ] = "̨ ̨‚܂B";
+ TEXT[ chinese_traditional ] = "SϤLo";
+ TEXT[ arabic ] = " ";
+ TEXT[ greek ] = " ";
+ TEXT[ korean ] = "׷͸ ã ";
+ TEXT[ turkish ] = "Grafik filtresi bulunamad";
+ TEXT[ language_user1 ] = " ";
+ };
+ String STR_GRFILTER_TOOBIG
+ {
+ TEXT = "Nicht genug Speicher zum Einfgen der Grafik" ;
+ TEXT [ English ] = "Not enough memory to insert graphic" ;
+ TEXT [ norwegian ] = "Not enough memory to insert graphic" ;
+ TEXT [ italian ] = "Memoria insufficiente per inserire l'immagine" ;
+ TEXT [ portuguese_brazilian ] = "Memria insuficiente para inserir o grfico" ;
+ TEXT [ portuguese ] = "Memria insuficiente para inserir a imagem." ;
+ TEXT [ finnish ] = "Muisti ei riit grafiikan lismiseen" ;
+ TEXT [ danish ] = "Ikke tilstrkkelig hukommelse til at indstte grafik" ;
+ TEXT [ french ] = "Mmoire insuffisante pour l'insertion de l'image" ;
+ TEXT [ swedish ] = "Inte tillrckligt med minne fr att infoga grafiken" ;
+ TEXT [ dutch ] = "Niet genoeg geheugen voor invoegen van grafische afbeelding." ;
+ TEXT [ spanish ] = "No hay suficiente memoria para insertar la imagen" ;
+ TEXT [ english_us ] = "Not enough memory to insert graphic" ;
+ TEXT[ chinese_simplified ] = "ڴ治㣬޷ͼ";
+ TEXT[ russian ] = " ";
+ TEXT[ polish ] = "Brakuje pamici do wstawienia grafiki";
+ TEXT[ japanese ] = "̨}̂߂؂s[łB";
+ TEXT[ chinese_traditional ] = "O餣MLkJϤ";
+ TEXT[ arabic ] = " ";
+ TEXT[ greek ] = " ";
+ TEXT[ korean ] = "׷ ޸𸮰 մϴ";
+ TEXT[ turkish ] = "Grafiin eklenmesi iin yeterli bellek mevcut deil";
+ TEXT[ language_user1 ] = " ";
+ };
+ String STR_PROPERTIES
+ {
+ Text = "~Eigenschaften..." ;
+ Text [ English ] = "~Properties..." ;
+ Text [ norwegian ] = "~Properties..." ;
+ Text [ italian ] = "~Propriet..." ;
+ Text [ portuguese_brazilian ] = "~Propriedades..." ;
+ Text [ portuguese ] = "~Propriedades..." ;
+ Text [ finnish ] = "~Ominaisuudet..." ;
+ Text [ danish ] = "Egenskaber..." ;
+ Text [ french ] = "~Proprits..." ;
+ Text [ swedish ] = "~Egenskaper..." ;
+ Text [ dutch ] = "Eigens~chappen..." ;
+ Text [ spanish ] = "Prop~iedades..." ;
+ Text [ english_us ] = "~Properties..." ;
+ Text[ chinese_simplified ] = "(~P)...";
+ Text[ russian ] = "...";
+ Text[ polish ] = "Waciwoci...";
+ Text[ japanese ] = "è(~P)...";
+ Text[ chinese_traditional ] = "ݩ(~P)...";
+ Text[ arabic ] = "...";
+ Text[ greek ] = "...";
+ Text[ korean ] = "(~P)...";
+ Text[ turkish ] = "~zellikler...";
+ Text[ language_user1 ] = " ";
+ };
+ String STR_HOME
+ {
+ Text = "~Standard" ;
+ Text [ English ] = "H~ome" ;
+ Text [ norwegian ] = "H~ome" ;
+ Text [ italian ] = "~Standard" ;
+ Text [ portuguese_brazilian ] = "C~asa" ;
+ Text [ portuguese ] = "~Padro" ;
+ Text [ finnish ] = "~Vakio" ;
+ Text [ danish ] = "Standard" ;
+ Text [ french ] = "~Standard" ;
+ Text [ swedish ] = "~Standard" ;
+ Text [ dutch ] = "~Standaard" ;
+ Text [ spanish ] = "~Predeterminado" ;
+ Text [ english_us ] = "Standard" ;
+ Text[ chinese_simplified ] = "׼(~O)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Standard";
+ Text[ japanese ] = "W(~O)";
+ Text[ chinese_traditional ] = "з(~O)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "Ȩ(~O)";
+ Text[ turkish ] = "~Standart";
+ Text[ language_user1 ] = " ";
+ };
+ String STR_LINK
+ {
+ Text = "~Verknpfen" ;
+ Text [ English ] = "~Link" ;
+ Text [ norwegian ] = "~Link" ;
+ Text [ italian ] = "~Collega" ;
+ Text [ portuguese_brazilian ] = "~Ligao" ;
+ Text [ portuguese ] = "~Ligar" ;
+ Text [ finnish ] = "~Linkki" ;
+ Text [ danish ] = "Kd" ;
+ Text [ french ] = "~Lien" ;
+ Text [ swedish ] = "~Lnka" ;
+ Text [ dutch ] = "~Koppelen" ;
+ Text [ spanish ] = "~Vincular" ;
+ Text [ english_us ] = "~Link" ;
+ Text[ chinese_simplified ] = "(~L)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Pocz";
+ Text[ japanese ] = "ݸ(~L)";
+ Text[ chinese_traditional ] = "s(~L)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "(~L)";
+ Text[ turkish ] = "~Balant olutur";
+ Text[ language_user1 ] = " ";
+ };
+ String STR_PREVIEW
+ {
+ Text = "V~orschau" ;
+ Text [ English ] = "Pr~eview" ;
+ Text [ norwegian ] = "Pr~eview" ;
+ Text [ italian ] = "Ante~prima" ;
+ Text [ portuguese_brazilian ] = "Ex~aminar" ;
+ Text [ portuguese ] = "~Visualizar" ;
+ Text [ finnish ] = "~Esikatselu" ;
+ Text [ danish ] = "Eksempel" ;
+ Text [ french ] = "A~peru" ;
+ Text [ swedish ] = "~Frhandsvisning" ;
+ Text [ dutch ] = "~Voorbeeld" ;
+ Text [ spanish ] = "~Previsualizacin" ;
+ Text [ english_us ] = "Pr~eview" ;
+ Text[ chinese_simplified ] = "Ԥ(~E)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Podgld";
+ Text[ japanese ] = "ޭ(~E)";
+ Text[ chinese_traditional ] = "w(~E)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "̸ (~E)";
+ Text[ turkish ] = "~nizleme";
+ Text[ language_user1 ] = " ";
+ };
+ String STR_FILTER
+ {
+ Text = "Fi~lter..." ;
+ Text [ English ] = "~Filter..." ;
+ Text [ english_us ] = "~Filter..." ;
+ Text [ italian ] = "Filtro..." ;
+ Text [ spanish ] = "~Filtro..." ;
+ Text [ french ] = "~Filtre..." ;
+ Text [ dutch ] = "~Filter..." ;
+ Text [ swedish ] = "~Filter..." ;
+ Text [ danish ] = "Filter..." ;
+ Text [ portuguese_brazilian ] = "~Filter..." ;
+ Text [ portuguese ] = "~Filtro..." ;
+ Text[ chinese_simplified ] = "ɸѡ(~F)...";
+ Text[ russian ] = "...";
+ Text[ polish ] = "Filtr...";
+ Text[ japanese ] = "̨(~F)...";
+ Text[ chinese_traditional ] = "z(~F)...";
+ Text[ arabic ] = "...";
+ Text[ greek ] = "...";
+ Text[ korean ] = "(~F)...";
+ Text[ turkish ] = "Fi~ltre...";
+ Text[ language_user1 ] = " ";
+ };
+};
+ // ********************************************************************** EOF
diff --git a/svx/source/dialog/labdlg.cxx b/svx/source/dialog/labdlg.cxx
new file mode 100644
index 000000000000..121c6af8cb75
--- /dev/null
+++ b/svx/source/dialog/labdlg.cxx
@@ -0,0 +1,629 @@
+/*************************************************************************
+ *
+ * $RCSfile: labdlg.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:09 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+// include ---------------------------------------------------------------
+
+#ifndef _SHL_HXX
+#include <tools/shl.hxx>
+#endif
+#ifndef _SFXAPP_HXX
+#include <sfx2/app.hxx>
+#endif
+#ifndef _SFXMODULE_HXX
+#include <sfx2/module.hxx>
+#endif
+#ifndef _SFX_SAVEOPT_HXX //autogen
+#include <sfx2/saveopt.hxx>
+#endif
+#pragma hdrstop
+
+#define _SVX_LABDLG_CXX
+
+#include "svdattrx.hxx"
+#include "dialogs.hrc"
+#include "dialmgr.hxx"
+#include "dlgutil.hxx"
+#include "transfrm.hxx"
+
+#include "labdlg.hrc"
+#include "labdlg.hxx"
+
+// define ----------------------------------------------------------------
+
+#define AZ_OPTIMAL 0
+#define AZ_VON_OBEN 1
+#define AZ_VON_LINKS 2
+#define AZ_HORIZONTAL 3
+#define AZ_VERTIKAL 4
+
+#define AT_OBEN 0
+#define AT_MITTE 1
+#define AT_UNTEN 2
+
+#define WK_OPTIMAL 0
+#define WK_30 1
+#define WK_45 2
+#define WK_60 3
+#define WK_90 4
+
+// static ----------------------------------------------------------------
+
+static USHORT pCaptionRanges[] =
+{
+ SDRATTR_CAPTIONTYPE,
+ SDRATTR_CAPTIONFIXEDANGLE,
+ SDRATTR_CAPTIONANGLE,
+ SDRATTR_CAPTIONGAP,
+ SDRATTR_CAPTIONESCDIR,
+ SDRATTR_CAPTIONESCISREL,
+ SDRATTR_CAPTIONESCREL,
+ SDRATTR_CAPTIONESCABS,
+ SDRATTR_CAPTIONLINELEN,
+ SDRATTR_CAPTIONFITLINELEN,
+ 0
+};
+
+// -----------------------------------------------------------------------
+
+SvxCaptionTabPage::SvxCaptionTabPage(Window* pParent, const SfxItemSet& rInAttrs)
+ : SfxTabPage( pParent, SVX_RES( RID_SVXPAGE_CAPTION ), rInAttrs ),
+
+ aCT_CAPTTYPE( this, ResId( CT_CAPTTYPE ) ),
+ aFT_ABSTAND( this, ResId( FT_ABSTAND ) ),
+ aMF_ABSTAND( this, ResId( MF_ABSTAND ) ),
+ aFT_WINKEL( this, ResId( FT_WINKEL ) ),
+ aLB_WINKEL( this, ResId( LB_WINKEL ) ),
+ aFT_ANSATZ( this, ResId( FT_ANSATZ ) ),
+ aLB_ANSATZ( this, ResId( LB_ANSATZ ) ),
+ aFT_UM( this, ResId( FT_UM ) ),
+ aMF_ANSATZ( this, ResId( MF_ANSATZ ) ),
+ aFT_ANSATZ_REL( this, ResId( FT_ANSATZ_REL ) ),
+ aLB_ANSATZ_REL( this, ResId( LB_ANSATZ_REL ) ),
+ aFT_LAENGE( this, ResId( FT_LAENGE ) ),
+ aMF_LAENGE( this, ResId( MF_LAENGE ) ),
+ aCB_LAENGE( this, ResId( CB_LAENGE ) ),
+
+ aStrHorzList( ResId(STR_HORZ_LIST) ),
+ aStrVertList( ResId(STR_VERT_LIST) ),
+
+ rOutAttrs ( rInAttrs )
+{
+ //------------NYI-------------------------------------------
+ aFT_WINKEL.Hide();
+ aLB_WINKEL.Hide();
+
+ //------------Positionen korrigieren-------------------------
+ aFT_ANSATZ_REL.SetPosPixel( aFT_UM.GetPosPixel() );
+ aLB_ANSATZ_REL.SetPosPixel(
+ Point(
+ aFT_ANSATZ_REL.GetPosPixel().X()+aFT_ANSATZ_REL.GetSizePixel().Width()+6,
+ aLB_ANSATZ.GetPosPixel().Y() )
+ );
+
+ aMF_ANSATZ.SetPosPixel(
+ Point(
+ aFT_UM.GetPosPixel().X()+aFT_UM.GetSizePixel().Width()+6,
+ aLB_ANSATZ.GetPosPixel().Y() )
+ );
+
+ //------------ValueSet installieren--------------------------
+ aCT_CAPTTYPE.SetStyle( aCT_CAPTTYPE.GetStyle() | WB_ITEMBORDER | WB_DOUBLEBORDER | WB_NAMEFIELD );
+ aCT_CAPTTYPE.SetColCount(5);//XXX
+ aCT_CAPTTYPE.SetLineCount(1);
+ aCT_CAPTTYPE.SetSelectHdl(LINK( this, SvxCaptionTabPage, SelectCaptTypeHdl_Impl));
+
+ aCT_CAPTTYPE.InsertItem(BMP_CAPTTYPE_1,
+ Bitmap(ResId(BMP_CAPTTYPE_1)),
+ String(ResId(STR_CAPTTYPE_1)));
+
+ aCT_CAPTTYPE.InsertItem(BMP_CAPTTYPE_2,
+ Bitmap(ResId(BMP_CAPTTYPE_2)),
+ String(ResId(STR_CAPTTYPE_2)));
+
+ aCT_CAPTTYPE.InsertItem(BMP_CAPTTYPE_3,
+ Bitmap(ResId(BMP_CAPTTYPE_3)),
+ String(ResId(STR_CAPTTYPE_3)));
+
+/*--------------NYI----------------------------------------------
+ aCT_CAPTTYPE.InsertItem(BMP_CAPTTYPE_4,
+ Bitmap(ResId(BMP_CAPTTYPE_4)),
+ String(ResId(STR_CAPTTYPE_4)));
+*/
+
+ aLB_ANSATZ.SetSelectHdl(LINK(this,SvxCaptionTabPage,AnsatzSelectHdl_Impl));
+ aLB_ANSATZ_REL.SetSelectHdl(LINK(this,SvxCaptionTabPage,AnsatzRelSelectHdl_Impl));
+ aCB_LAENGE.SetClickHdl(LINK(this,SvxCaptionTabPage,LineOptHdl_Impl));
+
+ FreeResource();
+}
+
+// -----------------------------------------------------------------------
+
+void SvxCaptionTabPage::Construct()
+{
+ // Setzen des Rechtecks und der Workingarea
+ DBG_ASSERT( pView, "Keine gueltige View Uebergeben!" );
+}
+
+// -----------------------------------------------------------------------
+
+BOOL SvxCaptionTabPage::FillItemSet( SfxItemSet& rOutAttrs )
+{
+ SfxItemPool* pPool = rOutAttrs.GetPool();
+ DBG_ASSERT( pPool, "Wo ist der Pool" );
+
+ SfxMapUnit eUnit;
+
+ nCaptionType = aCT_CAPTTYPE.GetSelectItemId()-1;
+
+ rOutAttrs.Put( SdrCaptionTypeItem( (SdrCaptionType) nCaptionType ) );
+
+ if( aMF_ABSTAND.IsValueModified() )
+ {
+ eUnit = pPool->GetMetric( GetWhich( SDRATTR_CAPTIONGAP ) );
+ rOutAttrs.Put( SdrCaptionGapItem( GetCoreValue(aMF_ABSTAND, eUnit ) ) );
+ }
+
+ // Sonderbehandlung!!! XXX
+ if( nCaptionType==SDRCAPT_TYPE1 )
+ {
+ switch( nEscDir )
+ {
+ case SDRCAPT_ESCHORIZONTAL: nEscDir=SDRCAPT_ESCVERTICAL;break;
+ case SDRCAPT_ESCVERTICAL: nEscDir=SDRCAPT_ESCHORIZONTAL;break;
+ }
+ }
+
+ rOutAttrs.Put( SdrCaptionEscDirItem( (SdrCaptionEscDir)nEscDir ) );
+
+ bEscRel = aLB_ANSATZ_REL.IsVisible();
+ rOutAttrs.Put( SdrCaptionEscIsRelItem( bEscRel ) );
+
+ if( bEscRel )
+ {
+ long nVal = 0;
+
+ switch( aLB_ANSATZ_REL.GetSelectEntryPos() )
+ {
+ case AT_OBEN: nVal=0;break;
+ case AT_MITTE: nVal=5000;break;
+ case AT_UNTEN: nVal=10000;break;
+ }
+ rOutAttrs.Put( SdrCaptionEscRelItem( nVal ) );
+ }
+ else
+ {
+ if( aMF_ANSATZ.IsValueModified() )
+ {
+ eUnit = pPool->GetMetric( GetWhich( SDRATTR_CAPTIONESCABS ) );
+ rOutAttrs.Put( SdrCaptionEscAbsItem( GetCoreValue(aMF_ANSATZ, eUnit ) ) );
+ }
+ }
+
+ bFitLineLen = aCB_LAENGE.IsChecked();
+ rOutAttrs.Put( SdrCaptionFitLineLenItem( bFitLineLen ) );
+
+ if( ! bFitLineLen )
+ {
+ if( aMF_LAENGE.IsValueModified() )
+ {
+ eUnit = pPool->GetMetric( GetWhich( SDRATTR_CAPTIONLINELEN ) );
+ rOutAttrs.Put( SdrCaptionLineLenItem( GetCoreValue(aMF_LAENGE, eUnit ) ) );
+ }
+ }
+
+//NYI-------------die Winkel muessen noch hier rein!!! XXX----------------------
+
+ return( TRUE );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxCaptionTabPage::Reset( const SfxItemSet& rOutAttrs )
+{
+
+ //------------Metrik einstellen-----------------------------
+ FieldUnit eFUnit;
+ GET_MODULE_FIELDUNIT( eFUnit );
+
+ switch ( eFUnit )
+ {
+ case FUNIT_CM:
+ case FUNIT_M:
+ case FUNIT_KM:
+ eFUnit = FUNIT_MM;
+ break;
+ }
+ SetFieldUnit( aMF_ABSTAND, eFUnit );
+ SetFieldUnit( aMF_ANSATZ, eFUnit );
+ SetFieldUnit( aMF_LAENGE, eFUnit );
+
+ SfxItemPool* pPool = rOutAttrs.GetPool();
+ DBG_ASSERT( pPool, "Wo ist der Pool" );
+
+ USHORT nWhich;
+ SfxMapUnit eUnit;
+
+ //------- Winkel ----------
+ nWhich = GetWhich( SDRATTR_CAPTIONANGLE );
+ nFixedAngle = ( ( const SdrCaptionAngleItem& ) rOutAttrs.Get( nWhich ) ).GetValue();
+
+ //------- absolute Ansatzentfernung ----------
+ nWhich = GetWhich( SDRATTR_CAPTIONESCABS );
+ eUnit = pPool->GetMetric( nWhich );
+ nEscAbs = ( ( const SdrCaptionEscAbsItem& ) rOutAttrs.Get( nWhich ) ).GetValue();
+ SetMetricValue( aMF_ANSATZ, nEscAbs, eUnit );
+ nEscAbs = aMF_ANSATZ.GetValue();
+
+ //------- relative Ansatzentfernung ----------
+ nWhich = GetWhich( SDRATTR_CAPTIONESCREL );
+ nEscRel = (long)( ( const SdrCaptionEscRelItem& ) rOutAttrs.Get( nWhich ) ).GetValue();
+
+ //------- Linienlaenge ----------
+ nWhich = GetWhich( SDRATTR_CAPTIONLINELEN );
+ eUnit = pPool->GetMetric( nWhich );
+ nLineLen = ( ( const SdrCaptionLineLenItem& ) rOutAttrs.Get( nWhich ) ).GetValue();
+ SetMetricValue( aMF_LAENGE, nLineLen, eUnit );
+ nLineLen = aMF_LAENGE.GetValue();
+
+ //------- Abstand zur Box ----------
+ nWhich = GetWhich( SDRATTR_CAPTIONGAP );
+ eUnit = pPool->GetMetric( nWhich );
+ nGap = ( ( const SdrCaptionGapItem& ) rOutAttrs.Get( nWhich ) ).GetValue();
+ SetMetricValue( aMF_ABSTAND, nGap, eUnit );
+ nGap = aMF_ABSTAND.GetValue();
+
+ nCaptionType = (short)( ( const SdrCaptionTypeItem& ) rOutAttrs.Get( GetWhich( SDRATTR_CAPTIONTYPE ) ) ).GetValue();
+ bFixedAngle = ( ( const SfxBoolItem& ) rOutAttrs.Get( GetWhich( SDRATTR_CAPTIONFIXEDANGLE ) ) ).GetValue();
+ bFitLineLen = ( ( const SfxBoolItem& ) rOutAttrs.Get( GetWhich( SDRATTR_CAPTIONFITLINELEN ) ) ).GetValue();
+ nEscDir = (short)( ( const SdrCaptionEscDirItem& ) rOutAttrs.Get( GetWhich( SDRATTR_CAPTIONESCDIR ) ) ).GetValue();
+ bEscRel = ( ( const SfxBoolItem& ) rOutAttrs.Get( GetWhich( SDRATTR_CAPTIONESCISREL ) ) ).GetValue();
+
+ // Sonderbehandlung!!! XXX
+ if( nCaptionType==SDRCAPT_TYPE1 )
+ {
+ switch( nEscDir )
+ {
+ case SDRCAPT_ESCHORIZONTAL: nEscDir=SDRCAPT_ESCVERTICAL;break;
+ case SDRCAPT_ESCVERTICAL: nEscDir=SDRCAPT_ESCHORIZONTAL;break;
+ }
+ }
+
+ nAnsatzRelPos=AT_MITTE;
+ nAnsatzTypePos=AZ_OPTIMAL;
+ nWinkelTypePos=WK_OPTIMAL;
+
+ aMF_ABSTAND.SetValue( nGap );
+
+ if( nEscDir == SDRCAPT_ESCHORIZONTAL )
+ {
+ if( bEscRel )
+ {
+ if( nEscRel < 3333 )
+ nAnsatzRelPos = AT_OBEN;
+ if( nEscRel > 6666 )
+ nAnsatzRelPos = AT_UNTEN;
+ nAnsatzTypePos = AZ_HORIZONTAL;
+ }
+ else
+ {
+ nAnsatzTypePos = AZ_VON_OBEN;
+ aMF_ANSATZ.SetValue( nEscAbs );
+ }
+ }
+ else if( nEscDir == SDRCAPT_ESCVERTICAL )
+ {
+ if( bEscRel )
+ {
+ if( nEscRel < 3333 )
+ nAnsatzRelPos = AT_OBEN;
+ if( nEscRel > 6666 )
+ nAnsatzRelPos = AT_UNTEN;
+ nAnsatzTypePos = AZ_VERTIKAL;
+ }
+ else
+ {
+ nAnsatzTypePos = AZ_VON_LINKS;
+ aMF_ANSATZ.SetValue( nEscAbs );
+ }
+ }
+ else if( nEscDir == SDRCAPT_ESCBESTFIT )
+ {
+ nAnsatzTypePos = AZ_OPTIMAL;
+ }
+
+ if( bFixedAngle )
+ {
+ if( nFixedAngle <= 3000 )
+ nWinkelTypePos=WK_30;
+ else if( nFixedAngle <= 4500 )
+ nWinkelTypePos=WK_45;
+ else if( nFixedAngle <= 6000 )
+ nWinkelTypePos=WK_60;
+ else
+ nWinkelTypePos=WK_90;
+ }
+
+ aCB_LAENGE.Check( bFitLineLen );
+ aMF_LAENGE.SetValue( nLineLen );
+
+ aLB_ANSATZ.SelectEntryPos( nAnsatzTypePos );
+ aLB_WINKEL.SelectEntryPos( nWinkelTypePos );
+
+ SetupAnsatz_Impl( nAnsatzTypePos );
+ aCT_CAPTTYPE.SelectItem( nCaptionType+1 );// Enum beginnt bei 0!
+ SetupType_Impl( nCaptionType+1 );
+}
+
+// -----------------------------------------------------------------------
+
+SfxTabPage* SvxCaptionTabPage::Create( Window* pWindow,
+ const SfxItemSet& rOutAttrs )
+{
+ return( new SvxCaptionTabPage( pWindow, rOutAttrs ) );
+}
+
+//------------------------------------------------------------------------
+
+USHORT* SvxCaptionTabPage::GetRanges()
+{
+ return( pCaptionRanges );
+}
+
+//------------------------------------------------------------------------
+
+void SvxCaptionTabPage::SetupAnsatz_Impl( USHORT nType )
+{
+ xub_StrLen nCnt=0, nIdx=0;
+
+ switch( nType )
+ {
+ case AZ_OPTIMAL:
+// aMF_ANSATZ.Hide(); //XXX auch bei OPTIMAL werden Abswerte genommen
+// aFT_UM.Hide();
+ aMF_ANSATZ.Show();
+ aFT_UM.Show();
+ aFT_ANSATZ_REL.Hide();
+ aLB_ANSATZ_REL.Hide();
+ nEscDir = SDRCAPT_ESCBESTFIT;
+ break;
+
+ case AZ_VON_OBEN:
+ aMF_ANSATZ.Show();
+ aFT_UM.Show();
+ aFT_ANSATZ_REL.Hide();
+ aLB_ANSATZ_REL.Hide();
+ nEscDir = SDRCAPT_ESCHORIZONTAL;
+ break;
+
+ case AZ_VON_LINKS:
+ aMF_ANSATZ.Show();
+ aFT_UM.Show();
+ aFT_ANSATZ_REL.Hide();
+ aLB_ANSATZ_REL.Hide();
+ nEscDir = SDRCAPT_ESCVERTICAL;
+ break;
+
+ case AZ_HORIZONTAL:
+ aLB_ANSATZ_REL.Clear();
+ nCnt = aStrHorzList.GetTokenCount();
+ for( nIdx=0 ; nIdx<nCnt ; nIdx++ )
+ aLB_ANSATZ_REL.InsertEntry( aStrHorzList.GetToken(nIdx) );
+ aLB_ANSATZ_REL.SelectEntryPos( nAnsatzRelPos );
+
+ aMF_ANSATZ.Hide();
+ aFT_UM.Hide();
+ aFT_ANSATZ_REL.Show();
+ aLB_ANSATZ_REL.Show();
+ nEscDir = SDRCAPT_ESCHORIZONTAL;
+ break;
+
+ case AZ_VERTIKAL:
+ aLB_ANSATZ_REL.Clear();
+ nCnt = aStrVertList.GetTokenCount();
+ for( nIdx=0 ; nIdx<nCnt ; nIdx++ )
+ aLB_ANSATZ_REL.InsertEntry( aStrVertList.GetToken(nIdx) );
+ aLB_ANSATZ_REL.SelectEntryPos( nAnsatzRelPos );
+
+ aMF_ANSATZ.Hide();
+ aFT_UM.Hide();
+ aFT_ANSATZ_REL.Show();
+ aLB_ANSATZ_REL.Show();
+ nEscDir = SDRCAPT_ESCVERTICAL;
+ break;
+ }
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK_INLINE_START( SvxCaptionTabPage, AnsatzSelectHdl_Impl, ListBox *, pListBox )
+{
+ if( pListBox == &aLB_ANSATZ )
+ {
+ SetupAnsatz_Impl( aLB_ANSATZ.GetSelectEntryPos() );
+ }
+ return 0;
+}
+IMPL_LINK_INLINE_END( SvxCaptionTabPage, AnsatzSelectHdl_Impl, ListBox *, pListBox )
+
+//------------------------------------------------------------------------
+
+IMPL_LINK_INLINE_START( SvxCaptionTabPage, AnsatzRelSelectHdl_Impl, ListBox *, pListBox )
+{
+ if( pListBox == &aLB_ANSATZ_REL )
+ {
+ nAnsatzRelPos = aLB_ANSATZ_REL.GetSelectEntryPos();
+ }
+ return 0;
+}
+IMPL_LINK_INLINE_END( SvxCaptionTabPage, AnsatzRelSelectHdl_Impl, ListBox *, pListBox )
+
+//------------------------------------------------------------------------
+
+IMPL_LINK( SvxCaptionTabPage, LineOptHdl_Impl, Button *, pButton )
+{
+ if( pButton == &aCB_LAENGE )
+ {
+ if( aCB_LAENGE.IsChecked() || ! aCB_LAENGE.IsEnabled() )
+ {
+ aMF_LAENGE.Disable();
+ }
+ else
+ {
+ aMF_LAENGE.Enable();
+ }
+ }
+ return 0;
+}
+
+//------------------------------------------------------------------------
+
+IMPL_LINK_INLINE_START( SvxCaptionTabPage, SelectCaptTypeHdl_Impl, void *, EMPTYARG )
+{
+ SetupType_Impl( aCT_CAPTTYPE.GetSelectItemId() );
+ return 0;
+}
+IMPL_LINK_INLINE_END( SvxCaptionTabPage, SelectCaptTypeHdl_Impl, void *, EMPTYARG )
+
+//------------------------------------------------------------------------
+
+void SvxCaptionTabPage::SetupType_Impl( USHORT nType )
+{
+ switch( nType-1 )
+ {
+ case SDRCAPT_TYPE1:
+ aLB_WINKEL.Disable();
+ aCB_LAENGE.Disable();
+ LineOptHdl_Impl( &aCB_LAENGE );
+ break;
+
+ case SDRCAPT_TYPE2:
+ aLB_WINKEL.Enable();
+ aCB_LAENGE.Disable();
+ LineOptHdl_Impl( &aCB_LAENGE );
+ break;
+
+ case SDRCAPT_TYPE3:
+ aLB_WINKEL.Enable();
+ aCB_LAENGE.Enable();
+ LineOptHdl_Impl( &aCB_LAENGE );
+ break;
+
+ case SDRCAPT_TYPE4:
+ aLB_WINKEL.Enable();
+ aCB_LAENGE.Enable();
+ LineOptHdl_Impl( &aCB_LAENGE );
+ break;
+ }
+}
+
+//========================================================================
+
+
+SvxCaptionTabDialog::SvxCaptionTabDialog(Window* pParent, const SdrView* pSdrView, USHORT nAnchorTypes)
+ : SfxTabDialog( pParent, SVX_RES( RID_SVXDLG_CAPTION ) ),
+ nAnchorCtrls(nAnchorTypes),
+ pView ( pSdrView )
+{
+ FreeResource();
+
+ DBG_ASSERT( pView, "Keine gueltige View Uebergeben!" );
+
+ AddTabPage( RID_SVXPAGE_POSITION, SvxPositionTabPage::Create,
+ SvxPositionTabPage::GetRanges );
+ AddTabPage( RID_SVXPAGE_SIZE, SvxSizeTabPage::Create,
+ SvxSizeTabPage::GetRanges );
+ AddTabPage( RID_SVXPAGE_CAPTION, SvxCaptionTabPage::Create,
+ SvxCaptionTabPage::GetRanges );
+}
+
+// -----------------------------------------------------------------------
+
+SvxCaptionTabDialog::~SvxCaptionTabDialog()
+{
+}
+
+// -----------------------------------------------------------------------
+
+void SvxCaptionTabDialog::PageCreated( USHORT nId, SfxTabPage &rPage )
+{
+ switch( nId )
+ {
+ case RID_SVXPAGE_POSITION:
+ ( (SvxPositionTabPage&) rPage ).SetView( pView );
+ ( (SvxPositionTabPage&) rPage ).Construct();
+ if(nAnchorCtrls)
+ ( (SvxPositionTabPage&) rPage ).ShowAnchorCtrls(nAnchorCtrls);
+ break;
+
+ case RID_SVXPAGE_SIZE:
+ ( (SvxSizeTabPage&) rPage ).SetView( pView );
+ ( (SvxSizeTabPage&) rPage ).Construct();
+ break;
+
+ case RID_SVXPAGE_CAPTION:
+ ( (SvxCaptionTabPage&) rPage ).SetView( pView );
+ ( (SvxCaptionTabPage&) rPage ).Construct();
+ break;
+ }
+}
+
+
diff --git a/svx/source/dialog/labdlg.hrc b/svx/source/dialog/labdlg.hrc
new file mode 100644
index 000000000000..1ef11d626401
--- /dev/null
+++ b/svx/source/dialog/labdlg.hrc
@@ -0,0 +1,106 @@
+/*************************************************************************
+ *
+ * $RCSfile: labdlg.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:09 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#include <dialogs.hrc>
+//#define RID_SVXPAGE_CAPTION 1000
+//#define RID_SVXDLG_CAPTION 1001
+
+#define TAB_CONTROL 1
+#define BTN_OK 1
+#define BTN_CANCEL 1
+#define BTN_HELP 1
+
+#define FT_ABSTAND 1
+#define FT_WINKEL 2
+#define FT_ANSATZ 3
+#define FT_LAENGE 4
+#define FT_UM 5
+#define FT_ANSATZ_REL 6
+
+#define CT_CAPTTYPE 1
+
+#define MF_ABSTAND 1
+#define MF_ANSATZ 2
+#define MF_LAENGE 3
+
+#define CB_LAENGE 1
+
+#define CM_LAENGE 1
+
+#define LB_WINKEL 1
+#define LB_ANSATZ 2
+#define LB_ANSATZ_REL 3
+
+#define STR_CAPTTYPE_1 1
+#define STR_CAPTTYPE_2 2
+#define STR_CAPTTYPE_3 3
+#define STR_CAPTTYPE_4 4
+#define STR_HORZ_LIST 10
+#define STR_VERT_LIST 11
+
+#define BMP_CAPTTYPE_1 1
+#define BMP_CAPTTYPE_2 2
+#define BMP_CAPTTYPE_3 3
+#define BMP_CAPTTYPE_4 4
+
+#define SHOW_HORZ 1
+#define SHOW_VERT 2
+#define SHOW_ABS 3
+#define SHOW_NONE 4
diff --git a/svx/source/dialog/labdlg.src b/svx/source/dialog/labdlg.src
new file mode 100644
index 000000000000..b7a6ea138efd
--- /dev/null
+++ b/svx/source/dialog/labdlg.src
@@ -0,0 +1,974 @@
+/*************************************************************************
+ *
+ * $RCSfile: labdlg.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:09 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+ // include ---------------------------------------------------------------
+#include "helpid.hrc"
+#include "labdlg.hrc"
+ // pragma ----------------------------------------------------------------
+
+ // RID_SVXPAGE_CAPTION ---------------------------------------------------
+TabPage RID_SVXPAGE_CAPTION
+{
+ HelpId = HID_CAPTION ;
+ Hide = TRUE ;
+ //Size = MAP_APPFONT ( 189 , 97 ) ;
+ Size = MAP_APPFONT ( 260 , 135 ) ;
+ Text = "Legende" ;
+ Text [ English ] = "Caption" ;
+ Text [ english_us ] = "Callouts" ;
+ Text [ italian ] = "Legenda" ;
+ Text [ spanish ] = "Leyenda" ;
+ Text [ french ] = "Lgende" ;
+ Text [ dutch ] = "Legenda" ;
+ Text [ swedish ] = "Frklaring" ;
+ Text [ danish ] = "Forklaring" ;
+ Text [ portuguese ] = "Legenda" ;
+ Text [ portuguese_brazilian ] = "Legenda" ;
+ Control CT_CAPTTYPE
+ {
+ HelpId = HID_CAPTION_CTL_TYPE ;
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 6 , 6 ) ;
+ Size = MAP_APPFONT ( 177 , 38 ) ;
+ TabStop = TRUE ;
+ };
+ FixedText FT_ABSTAND
+ {
+ Pos = MAP_APPFONT ( 6 , 51 ) ;
+ Size = MAP_APPFONT ( 30 , 10 ) ;
+ Text = "~Abstand" ;
+ Text [ English ] = "~Distance" ;
+ Text [ english_us ] = "~Spacing" ;
+ Text [ italian ] = "Spaziatura" ;
+ Text [ spanish ] = "Espa~cio" ;
+ Text [ french ] = "~cart" ;
+ Text [ dutch ] = "~Afstand" ;
+ Text [ swedish ] = "~Avstnd" ;
+ Text [ danish ] = "Afstand" ;
+ Text [ portuguese_brazilian ] = "~Abstand" ;
+ Text [ portuguese ] = "~Espaamento" ;
+ Text[ chinese_simplified ] = "(~S)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Odstp";
+ Text[ japanese ] = "Ԋu(~S)";
+ Text[ chinese_traditional ] = "j(~S)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "~";
+ Text[ korean ] = "(~S)";
+ Text[ turkish ] = "~Uzaklk";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField MF_ABSTAND
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 38 , 50 ) ;
+ Size = MAP_APPFONT ( 50 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Maximum = 240000 ;
+ StrictFormat = TRUE ;
+ DecimalDigits = 2 ;
+ Unit = FUNIT_MM ;
+ SpinSize = 50 ;
+ };
+ FixedText FT_WINKEL
+ {
+ Pos = MAP_APPFONT ( 94 , 51 ) ;
+ Size = MAP_APPFONT ( 30 , 10 ) ;
+ Text = "~Winkel" ;
+ Text [ English ] = "~Angle" ;
+ Text [ english_us ] = "~Angle" ;
+ Text [ italian ] = "Angolo" ;
+ Text [ spanish ] = "~ngulo" ;
+ Text [ french ] = "~Angle" ;
+ Text [ dutch ] = "~Hoek" ;
+ Text [ swedish ] = "~Vinkel" ;
+ Text [ danish ] = "Vinkel" ;
+ Text [ portuguese_brazilian ] = "~Winkel" ;
+ Text [ portuguese ] = "~ngulo" ;
+ Text[ chinese_simplified ] = "Ƕ(~A)";
+ Text[ russian ] = "";
+ Text[ polish ] = "~Kt";
+ Text[ japanese ] = "px(~A)";
+ Text[ chinese_traditional ] = "(~A)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "(~A)";
+ Text[ turkish ] = "~A";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_WINKEL
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 134 , 50 ) ;
+ Size = MAP_APPFONT ( 50 , 60 ) ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+ CurPos = 0 ;
+ StringList =
+ {
+ < "Beliebig" ; 1 ; > ;
+ < "30 Grad" ; 3000 ; > ;
+ < "45 Grad" ; 4500 ; > ;
+ < "60 Grad" ; 6000 ; > ;
+ < "90 Grad" ; 9000 ; > ;
+ };
+ StringList [ English ] =
+ {
+ < "Beliebig" ; 1 ; > ;
+ < "30 Grad" ; 3000 ; > ;
+ < "45 Grad" ; 4500 ; > ;
+ < "60 Grad" ; 6000 ; > ;
+ < "90 Grad" ; 9000 ; > ;
+ };
+ stringlist [ english_us ] =
+ {
+ < "Free" ; 1 ; > ;
+ < "30 Degrees" ; 3000 ; > ;
+ < "45 degrees" ; 4500 ; > ;
+ < "60 Degrees" ; 6000 ; > ;
+ < "90 degrees" ; 9000 ; > ;
+ };
+ stringlist [ italian ] =
+ {
+ < "Qualsiasi" ; 1 ; > ;
+ < "30 gradi" ; 3000 ; > ;
+ < "45 gradi" ; 4500 ; > ;
+ < "60 gradi" ; 6000 ; > ;
+ < "90 Gradi" ; 9000 ; > ;
+ };
+ stringlist [ spanish ] =
+ {
+ < "Cualquiera" ; 1 ; > ;
+ < "30 grados" ; 3000 ; > ;
+ < "45 grados" ; 4500 ; > ;
+ < "60 grados" ; 6000 ; > ;
+ < "90 grados" ; 9000 ; > ;
+ };
+ stringlist [ french ] =
+ {
+ < "Quelconque" ; 1 ; > ;
+ < "30 degrs" ; 3000 ; > ;
+ < "45 degrs" ; 4500 ; > ;
+ < "60 degrs" ; 6000 ; > ;
+ < "90 degrs" ; 9000 ; > ;
+ };
+ stringlist [ dutch ] =
+ {
+ < "Willekeurig" ; 1 ; > ;
+ < "30 graden" ; 3000 ; > ;
+ < "45 graden" ; 4500 ; > ;
+ < "60 graden" ; 6000 ; > ;
+ < "90 graden" ; 9000 ; > ;
+ };
+ stringlist [ portuguese_brazilian ] =
+ {
+ < "Beliebig" ; 1 ; > ;
+ < "30 Grad" ; 3000 ; > ;
+ < "45 Grad" ; 4500 ; > ;
+ < "60 Grad" ; 6000 ; > ;
+ < "90 Grad" ; 9000 ; > ;
+ };
+ stringlist [ swedish ] =
+ {
+ < "Valfri" ; 1 ; > ;
+ < "30 grader" ; 3000 ; > ;
+ < "45 grader" ; 4500 ; > ;
+ < "60 grader" ; 6000 ; > ;
+ < "90 grader" ; 9000 ; > ;
+ };
+ stringlist [ danish ] =
+ {
+ < "Valgfri" ; 1 ; > ;
+ < "30 grader" ; 3000 ; > ;
+ < "45 grader" ; 4500 ; > ;
+ < "60 grader" ; 6000 ; > ;
+ < "90 grader" ; 9000 ; > ;
+ };
+ stringlist [ portuguese ] =
+ {
+ < "Qualquer um" ; 1 ; > ;
+ < "30 graus" ; 3000 ; > ;
+ < "45 graus" ; 4500 ; > ;
+ < "60 graus" ; 6000 ; > ;
+ < "90 graus" ; 9000 ; > ;
+ };
+ StringList [ chinese_simplified ] =
+ {
+ < "Ƕ" ; 1 ; > ;
+ < "30 " ; 3000 ; > ;
+ < "45 " ; 4500 ; > ;
+ < "60 " ; 6000 ; > ;
+ < "90 " ; 9000 ; > ;
+ };
+ StringList [ russian ] =
+ {
+ < " " ; 1 ; > ;
+ < "30 " ; 3000 ; > ;
+ < "45 " ; 4500 ; > ;
+ < "60 " ; 6000 ; > ;
+ < "90 " ; 9000 ; > ;
+ };
+ StringList [ polish ] =
+ {
+ < "Dowolny" ; 1 ; > ;
+ < "30 stopni" ; 3000 ; > ;
+ < "45 stopni" ; 4500 ; > ;
+ < "60 stopni" ; 6000 ; > ;
+ < "90 stopni" ; 9000 ; > ;
+ };
+ StringList [ japanese ] =
+ {
+ < "ذ" ; 1 ; > ;
+ < "30x" ; 3000 ; > ;
+ < "45x" ; 4500 ; > ;
+ < "60x" ; 6000 ; > ;
+ < "90x" ; 9000 ; > ;
+ };
+ StringList [ chinese_traditional ] =
+ {
+ < "N" ; 1 ; > ;
+ < "30 " ; 3000 ; > ;
+ < "45 " ; 4500 ; > ;
+ < "60 " ; 6000 ; > ;
+ < "90 " ; 9000 ; > ;
+ };
+ StringList [ arabic ] =
+ {
+ < "" ; 1 ; > ;
+ < "30 " ; 3000 ; > ;
+ < "45 " ; 4500 ; > ;
+ < "60 " ; 6000 ; > ;
+ < "90 " ; 9000 ; > ;
+ };
+ StringList [ greek ] =
+ {
+ < "" ; 1 ; > ;
+ < "30 " ; 3000 ; > ;
+ < "45 " ; 4500 ; > ;
+ < "60 " ; 6000 ; > ;
+ < "90 " ; 9000 ; > ;
+ };
+ StringList [ korean ] =
+ {
+ < "" ; 1 ; > ;
+ < "30 " ; 3000 ; > ;
+ < "45 " ; 4500 ; > ;
+ < "60 " ; 6000 ; > ;
+ < "90 " ; 9000 ; > ;
+ };
+ StringList [ turkish ] =
+ {
+ < "Serbest" ; 1 ; > ;
+ < "30 Derece" ; 3000 ; > ;
+ < "45 Derece" ; 4500 ; > ;
+ < "60 Derece" ; 6000 ; > ;
+ < "90 Derece" ; 9000 ; > ;
+ };
+ StringList [ language_user1 ] =
+ {
+ < " " ; 1 ; > ;
+ < " " ; 3000 ; > ;
+ < " " ; 4500 ; > ;
+ < " " ; 6000 ; > ;
+ < " " ; 9000 ; > ;
+ };
+ };
+ FixedText FT_ANSATZ
+ {
+ Pos = MAP_APPFONT ( 6 , 67 ) ;
+ Size = MAP_APPFONT ( 30 , 10 ) ;
+ Text = "A~nsatz" ;
+ Text [ English ] = "~Extension" ;
+ Text [ dutch ] = "~Aansluiting" ;
+ Text [ english_us ] = "~Extension" ;
+ Text [ italian ] = "Inizio linea" ;
+ Text [ spanish ] = "~Salida" ;
+ Text [ french ] = "~Extension" ;
+ Text [ swedish ] = "Skarv" ;
+ Text [ danish ] = "Tilhftning" ;
+ Text [ portuguese_brazilian ] = "A~nsatz" ;
+ Text [ portuguese ] = "E~xtenso" ;
+ Text[ chinese_simplified ] = "չ(~E)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Rozszerzenie";
+ Text[ japanese ] = "g(~E)";
+ Text[ chinese_traditional ] = "Xi(~E)";
+ Text[ arabic ] = " ";
+ Text[ greek ] = "~";
+ Text[ korean ] = "Ȯ(~E)";
+ Text[ turkish ] = "U~zatma";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_ANSATZ
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 38 , 66 ) ;
+ Size = MAP_APPFONT ( 50 , 60 ) ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+ CurPos = 0 ;
+ StringList =
+ {
+ < "Optimal" ; 4 ; > ;
+ < "Von oben" ; 3 ; > ;
+ < "Von links" ; 3 ; > ;
+ < "Horizontal" ; 1 ; > ;
+ < "Vertikal" ; 2 ; > ;
+ };
+ StringList [ English ] =
+ {
+ < "Optimal" ; 4 ; > ;
+ < "Von oben" ; 3 ; > ;
+ < "Von links" ; 3 ; > ;
+ < "Horizontal" ; 1 ; > ;
+ < "Vertikal" ; 2 ; > ;
+ };
+ stringlist [ english_us ] =
+ {
+ < "Optimal" ; 4 ; > ;
+ < "From top" ; 3 ; > ;
+ < "From left" ; 3 ; > ;
+ < "Horizontal" ; 1 ; > ;
+ < "Vertical" ; 2 ; > ;
+ };
+ stringlist [ italian ] =
+ {
+ < "Ottimale" ; 4 ; > ;
+ < "Dall'alto" ; 3 ; > ;
+ < "Da sinistra" ; 3 ; > ;
+ < "Orizzontale" ; 1 ; > ;
+ < "Verticale" ; 2 ; > ;
+ };
+ stringlist [ spanish ] =
+ {
+ < "ptimo" ; 4 ; > ;
+ < "Desde arriba" ; 3 ; > ;
+ < "De izquierda" ; 3 ; > ;
+ < "Horizontal" ; 1 ; > ;
+ < "Vertical" ; 2 ; > ;
+ };
+ stringlist [ french ] =
+ {
+ < "Optimal" ; 4 ; > ;
+ < "Du haut" ; 3 ; > ;
+ < "De gauche" ; 3 ; > ;
+ < "Horizontal" ; 1 ; > ;
+ < "Vertical" ; 2 ; > ;
+ };
+ stringlist [ dutch ] =
+ {
+ < "Optimaal" ; 4 ; > ;
+ < "Van boven" ; 3 ; > ;
+ < "Van links" ; 3 ; > ;
+ < "Horizontaal" ; 1 ; > ;
+ < "Verticaal" ; 2 ; > ;
+ };
+ stringlist [ portuguese_brazilian ] =
+ {
+ < "Optimal" ; 4 ; > ;
+ < "Von oben" ; 3 ; > ;
+ < "Von links" ; 3 ; > ;
+ < "Horizontal" ; 1 ; > ;
+ < "Vertikal" ; 2 ; > ;
+ };
+ stringlist [ swedish ] =
+ {
+ < "Optimal" ; 4 ; > ;
+ < "Uppifrn" ; 3 ; > ;
+ < "Frn vnster" ; 3 ; > ;
+ < "Horisontell" ; 1 ; > ;
+ < "Vertikal" ; 2 ; > ;
+ };
+ stringlist [ danish ] =
+ {
+ < "Optimal" ; 4 ; > ;
+ < "Fra oven" ; 3 ; > ;
+ < "Fra venstre" ; 3 ; > ;
+ < "Vandret" ; 1 ; > ;
+ < "Lodret" ; 2 ; > ;
+ };
+ stringlist [ portuguese ] =
+ {
+ < "ptimo" ; 4 ; > ;
+ < "De cima" ; 3 ; > ;
+ < "Da esquerda" ; 3 ; > ;
+ < "Horizontal" ; 1 ; > ;
+ < "Vertical" ; 2 ; > ;
+ };
+ StringList [ chinese_simplified ] =
+ {
+ < "" ; 4 ; > ;
+ < "" ; 3 ; > ;
+ < "" ; 3 ; > ;
+ < "ˮƽ" ; 1 ; > ;
+ < "ֱ" ; 2 ; > ;
+ };
+ StringList [ russian ] =
+ {
+ < "" ; 4 ; > ;
+ < "" ; 3 ; > ;
+ < "" ; 3 ; > ;
+ < "" ; 1 ; > ;
+ < "" ; 2 ; > ;
+ };
+ StringList [ polish ] =
+ {
+ < "Optymalny" ; 4 ; > ;
+ < "Z gry" ; 3 ; > ;
+ < "Z lewej" ; 3 ; > ;
+ < "Poziomo" ; 1 ; > ;
+ < "Pionowo" ; 2 ; > ;
+ };
+ StringList [ japanese ] =
+ {
+ < "œK" ; 4 ; > ;
+ < "ォ" ; 3 ; > ;
+ < "" ; 3 ; > ;
+ < "E" ; 1 ; > ;
+ < "㉺" ; 2 ; > ;
+ };
+ StringList [ chinese_traditional ] =
+ {
+ < "" ; 4 ; > ;
+ < "qW" ; 3 ; > ;
+ < "q" ; 3 ; > ;
+ < "V" ; 1 ; > ;
+ < "V" ; 2 ; > ;
+ };
+ StringList [ arabic ] =
+ {
+ < "" ; 4 ; > ;
+ < " " ; 3 ; > ;
+ < " " ; 3 ; > ;
+ < "" ; 1 ; > ;
+ < "" ; 2 ; > ;
+ };
+ StringList [ greek ] =
+ {
+ < "" ; 4 ; > ;
+ < "A " ; 3 ; > ;
+ < "A " ; 3 ; > ;
+ < "" ; 1 ; > ;
+ < "" ; 2 ; > ;
+ };
+ StringList [ korean ] =
+ {
+ < "" ; 4 ; > ;
+ < " " ; 3 ; > ;
+ < " " ; 3 ; > ;
+ < "" ; 1 ; > ;
+ < "" ; 2 ; > ;
+ };
+ StringList [ turkish ] =
+ {
+ < "Optimum" ; 4 ; > ;
+ < "stten" ; 3 ; > ;
+ < "Soldan" ; 3 ; > ;
+ < "Yatay" ; 1 ; > ;
+ < "Dikey" ; 2 ; > ;
+ };
+ StringList [ language_user1 ] =
+ {
+ < " " ; 4 ; > ;
+ < " " ; 3 ; > ;
+ < " " ; 3 ; > ;
+ < " " ; 1 ; > ;
+ < " " ; 2 ; > ;
+ };
+ };
+ FixedText FT_UM
+ {
+ Pos = MAP_APPFONT ( 94 , 67 ) ;
+ Size = MAP_APPFONT ( 17 , 10 ) ;
+ Text = "~Um" ;
+ Text [ English ] = "~By" ;
+ Text [ dutch ] = "~Onder" ;
+ Text [ english_us ] = "~By" ;
+ Text [ italian ] = "Per" ;
+ Text [ spanish ] = "~De" ;
+ Text [ french ] = "~De" ;
+ Text [ swedish ] = "~Om" ;
+ Text [ danish ] = "Ved" ;
+ Text [ portuguese_brazilian ] = "~Um" ;
+ Text [ portuguese ] = "~De" ;
+ Text[ chinese_simplified ] = "ֵ(~B)";
+ Text[ russian ] = "";
+ Text[ polish ] = "O";
+ Text[ japanese ] = "{(~B)";
+ Text[ chinese_traditional ] = "ƭ(~B)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "ŭ(~B)";
+ Text[ turkish ] = "~Deer";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField MF_ANSATZ
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 134 , 66 ) ;
+ Size = MAP_APPFONT ( 50 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Maximum = 240000 ;
+ StrictFormat = TRUE ;
+ DecimalDigits = 2 ;
+ Unit = FUNIT_MM ;
+ SpinSize = 50 ;
+ };
+ FixedText FT_ANSATZ_REL
+ {
+ Pos = MAP_APPFONT ( 94 , 115 ) ;
+ Size = MAP_APPFONT ( 30 , 10 ) ;
+ Text = "~Position" ;
+ Text [ English ] = "~Position" ;
+ Text [ dutch ] = "~Positie" ;
+ Text [ english_us ] = "~Position" ;
+ Text [ italian ] = "~Posizione" ;
+ Text [ spanish ] = "~Posicin" ;
+ Text [ french ] = "~Position" ;
+ Text [ swedish ] = "~Position" ;
+ Text [ danish ] = "Placering" ;
+ Text [ portuguese_brazilian ] = "~Position" ;
+ Text [ portuguese ] = "~Posio" ;
+ Text[ chinese_simplified ] = "λ(~P)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Pozycja";
+ Text[ japanese ] = "ʒu(~P)";
+ Text[ chinese_traditional ] = "m(~P)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "ġ(~P)";
+ Text[ turkish ] = "~Konum";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_ANSATZ_REL
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 134 , 114 ) ;
+ Size = MAP_APPFONT ( 50 , 60 ) ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+ };
+ FixedText FT_LAENGE
+ {
+ Pos = MAP_APPFONT ( 6 , 82 ) ;
+ Size = MAP_APPFONT ( 30 , 10 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? ~Lnge : ~Lnge */
+ /* ### ACHTUNG: Neuer Text in Resource? ~Lnge : ~Lnge */
+ Text = "~Lnge" ;
+ Text [ English ] = "~Length" ;
+ Text [ english_us ] = "~Length" ;
+ Text [ italian ] = "~Lungh." ;
+ Text [ spanish ] = "Longitud" ;
+ Text [ french ] = "~Longueur" ;
+ Text [ dutch ] = "~Lengte" ;
+ Text [ swedish ] = "~Lngd" ;
+ Text [ danish ] = "Lngde" ;
+ Text [ portuguese_brazilian ] = "~Lnge" ;
+ Text [ portuguese ] = "~Comprimento" ;
+ Text[ chinese_simplified ] = "(~L)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Dugo";
+ Text[ japanese ] = "(~L)";
+ Text[ chinese_traditional ] = "(~L)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "(~L)";
+ Text[ turkish ] = "~Uzunluk";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField MF_LAENGE
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 38 , 81 ) ;
+ Size = MAP_APPFONT ( 50 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Maximum = 240000 ;
+ StrictFormat = TRUE ;
+ DecimalDigits = 2 ;
+ Unit = FUNIT_MM ;
+ SpinSize = 50 ;
+ };
+ CheckBox CB_LAENGE
+ {
+ Pos = MAP_APPFONT ( 94 , 81 ) ;
+ Size = MAP_APPFONT ( 50 , 12 ) ;
+ Text = "~Optimal" ;
+ Text [ English ] = "~Optimal" ;
+ TabStop = TRUE ;
+ Text [ english_us ] = "~Optimal" ;
+ Text [ italian ] = "~Ottimale" ;
+ Text [ spanish ] = "~ptimo" ;
+ Text [ french ] = "~Optimal" ;
+ Text [ dutch ] = "~Optimaal" ;
+ Text [ swedish ] = "~Optimal" ;
+ Text [ danish ] = "Optimal" ;
+ Text [ portuguese_brazilian ] = "~Optimal" ;
+ Text [ portuguese ] = "~ptimo" ;
+ Text[ chinese_simplified ] = "(~O)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Optymalny";
+ Text[ japanese ] = "œK(~O)";
+ Text[ chinese_traditional ] = "(~O)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "(~O)";
+ Text[ turkish ] = "~Optimum";
+ Text[ language_user1 ] = " ";
+ };
+ String STR_CAPTTYPE_1
+ {
+ Text = "Gerade Linie" ;
+ Text [ English ] = "Straight line" ;
+ Text [ english_us ] = "Straight Line" ;
+ Text [ italian ] = "Linea diritta" ;
+ Text [ spanish ] = "Lnea recta" ;
+ Text [ french ] = "Ligne droite" ;
+ Text [ dutch ] = "Rechte lijn" ;
+ Text [ swedish ] = "Rak linje" ;
+ Text [ danish ] = "Lige linje" ;
+ Text [ portuguese_brazilian ] = "Gerade Linie" ;
+ Text [ portuguese ] = "Linha recta" ;
+ Text[ chinese_simplified ] = "ֱ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Linia prosta";
+ Text[ japanese ] = "";
+ Text[ chinese_traditional ] = "u";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = "";
+ Text[ turkish ] = "Dz izgili";
+ Text[ language_user1 ] = " ";
+ };
+ String STR_CAPTTYPE_2
+ {
+ Text = "Abgewinkelte Linie" ;
+ Text [ English ] = "Abgewinkelte Linie" ;
+ Text [ english_us ] = "Angled Line" ;
+ Text [ italian ] = "Linea angolata" ;
+ Text [ spanish ] = "Lnea acodada" ;
+ Text [ french ] = "Ligne en angle" ;
+ Text [ dutch ] = "Lijn met hoek" ;
+ Text [ swedish ] = "Vinklad linje" ;
+ Text [ danish ] = "Vinklet linje" ;
+ Text [ portuguese_brazilian ] = "Abgewinkelte Linie" ;
+ Text [ portuguese ] = "Linha angular" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Zakrzywiona linia";
+ Text[ japanese ] = "p";
+ Text[ chinese_traditional ] = "νu";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ";
+ Text[ turkish ] = "Al izgi";
+ Text[ language_user1 ] = " ";
+ };
+ String STR_CAPTTYPE_3
+ {
+ Text = "Abgewinkelte Linie einfach geknickt" ;
+ Text [ English ] = "Abgewinkelte Linie einfach geknickt" ;
+ Text [ english_us ] = "Angled Connector Line" ;
+ Text [ italian ] = "Linea angolata una volta" ;
+ Text [ spanish ] = "Lnea acodada con un solo ngulo" ;
+ Text [ french ] = "Ligne en angle flchie" ;
+ Text [ dutch ] = "Lijn met enkele hoek" ;
+ Text [ swedish ] = "Vinklad linje med en knick" ;
+ Text [ danish ] = "Vinklet linje med et knk" ;
+ Text [ portuguese_brazilian ] = "Abgewinkelte Linie einfach geknickt" ;
+ Text [ portuguese ] = "Linha angular com um s ngulo" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Zakrzywiona linia pojedynczo zaamana";
+ Text[ japanese ] = "1‚̊p";
+ Text[ chinese_traditional ] = "sνu";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ѹ ";
+ Text[ turkish ] = "Tek al izgi";
+ Text[ language_user1 ] = " ";
+ };
+ String STR_CAPTTYPE_4
+ {
+ Text = "Abgewinkelte Linie doppelt geknickt" ;
+ Text [ English ] = "Abgewinkelte Linie doppelt geknickt" ;
+ Text [ english_us ] = "Double-angled line" ;
+ Text [ italian ] = "Linea angolata due volte" ;
+ Text [ spanish ] = "Lnea acodada con dos ngulos" ;
+ Text [ french ] = "Ligne en angle doublement flchie" ;
+ Text [ dutch ] = "Lijn met dubbele hoek" ;
+ Text [ swedish ] = "Vinklad linje med tv knickar" ;
+ Text [ danish ] = "Vinklet linje med to knk" ;
+ Text [ portuguese_brazilian ] = "Abgewinkelte Linie doppelt geknickt" ;
+ Text [ portuguese ] = "Linha angular com ngulo duplo" ;
+ Text[ chinese_simplified ] = "˫";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Zakrzywiona linia podwjnie zaamana";
+ Text[ japanese ] = "2‚̊p";
+ Text[ chinese_traditional ] = "sνu";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " - 2 ";
+ Text[ korean ] = " ι ";
+ Text[ turkish ] = "ift al izgi";
+ Text[ language_user1 ] = " ";
+ };
+ String STR_HORZ_LIST
+ {
+ Text = "Oben;Mitte;Unten" ;
+ Text [ English ] = "Top;Middle;Bottom" ;
+ Text [ english_us ] = "Top;Middle;Bottom" ;
+ Text [ italian ] = "Sopra;Centro;Basso" ;
+ Text [ spanish ] = "Arriba;centro;abajo" ;
+ Text [ french ] = "Haut;Milieu;Bas" ;
+ Text [ dutch ] = "Boven;Midden;Beneden" ;
+ Text [ swedish ] = "verst;mitten;nederst" ;
+ Text [ danish ] = "verst;Centreret;Nederst" ;
+ Text [ portuguese_brazilian ] = "Oben;Mitte;Unten" ;
+ Text [ portuguese ] = "Superior; centro; inferior" ;
+ Text[ chinese_simplified ] = "ϣУ";
+ Text[ russian ] = "; ;";
+ Text[ polish ] = "W grze, Na rodku;Na dole";
+ Text[ japanese ] = ";;";
+ Text[ chinese_traditional ] = "W;;U";
+ Text[ arabic ] = "غ";
+ Text[ greek ] = ";;";
+ Text[ korean ] = ";;Ʒ";
+ Text[ turkish ] = "st;Orta;Alt";
+ Text[ language_user1 ] = " ";
+ };
+ String STR_VERT_LIST
+ {
+ Text = "Links;Mitte;Rechts" ;
+ Text [ English ] = "Left;Middle;Right" ;
+ Text [ english_us ] = "Left;Middle;Right" ;
+ Text [ italian ] = "Sinistro;Centrato; Destro" ;
+ Text [ spanish ] = "Izquierda;centrado;derecha" ;
+ Text [ french ] = "Gauche;Milieu;Droite" ;
+ Text [ dutch ] = "Links;Midden;Rechts" ;
+ Text [ swedish ] = "Vnster;mitten;hger" ;
+ Text [ danish ] = "Venstre;Centreret;Hjre" ;
+ Text [ portuguese_brazilian ] = "Links;Mitte;Rechts" ;
+ Text [ portuguese ] = "Esquerda; centro; direita" ;
+ Text[ chinese_simplified ] = "У";
+ Text[ russian ] = "; ;";
+ Text[ polish ] = "Z lewej; W rodku; Z prawej";
+ Text[ japanese ] = ";;E";
+ Text[ chinese_traditional ] = ";;k";
+ Text[ arabic ] = "Ѻغ";
+ Text[ greek ] = ";;";
+ Text[ korean ] = ";;";
+ Text[ turkish ] = "Sol;Orta;Sa";
+ Text[ language_user1 ] = " ";
+ };
+ Bitmap BMP_CAPTTYPE_1
+ {
+ File = "legtyp1.bmp" ;
+ };
+ Bitmap BMP_CAPTTYPE_2
+ {
+ File = "legtyp2.bmp" ;
+ };
+ Bitmap BMP_CAPTTYPE_3
+ {
+ File = "legtyp3.bmp" ;
+ };
+ Bitmap BMP_CAPTTYPE_4
+ {
+ File = "legtyp4.bmp" ;
+ };
+ Text[ chinese_simplified ] = "ͼ";
+ Text[ russian ] = "";
+ Text[ polish ] = "Legenda";
+ Text[ japanese ] = "o";
+ Text[ chinese_traditional ] = "Ϩ";
+ Text[ arabic ] = " ";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "Belirtme izgisi";
+ Text[ language_user1 ] = " ";
+};
+ // RID_SVXDLG_CAPTION ----------------------------------------------------
+TabDialog RID_SVXDLG_CAPTION
+{
+ OutputSize = TRUE ;
+ SVLook = TRUE ;
+ Size = MAP_APPFONT ( 237 , 161 ) ;
+ Text = "Legende" ;
+ Text [ English ] = "Caption" ;
+ Text [ english_us ] = "Callouts" ;
+ Text [ italian ] = "Legenda" ;
+ Text [ spanish ] = "Leyenda" ;
+ Text [ french ] = "Lgende" ;
+ Text [ dutch ] = "Legenda" ;
+ Text [ swedish ] = "Frklaring" ;
+ Text [ danish ] = "Forklaring" ;
+ Text [ portuguese_brazilian ] = "Legenda" ;
+ Text [ portuguese ] = "Legenda" ;
+ Moveable = TRUE ;
+ TabControl TAB_CONTROL
+ {
+ OutputSize = TRUE ;
+ Pos = MAP_APPFONT ( 3 , 3 ) ;
+ Size = MAP_APPFONT ( 189 , 97 ) ;
+ PageList =
+ {
+ PageItem
+ {
+ Identifier = RID_SVXPAGE_POSITION ;
+ Text = "Position" ;
+ Text [ ENGLISH ] = "Position" ;
+ Text [ norwegian ] = "Posisjon" ;
+ Text [ italian ] = "Posizione" ;
+ Text [ portuguese_brazilian ] = "Posio" ;
+ Text [ portuguese ] = "Posio" ;
+ Text [ finnish ] = "Sijainti" ;
+ Text [ danish ] = "Placering" ;
+ Text [ french ] = "Position" ;
+ Text [ swedish ] = "Position" ;
+ Text [ dutch ] = "Positie" ;
+ Text [ spanish ] = "Posicin" ;
+ Text [ english_us ] = "Position" ;
+ PageResID = RID_SVXPAGE_POSITION ;
+ Text[ chinese_simplified ] = "λ";
+ Text[ russian ] = "";
+ Text[ polish ] = "Pozycja";
+ Text[ japanese ] = "ʒu";
+ Text[ chinese_traditional ] = "m";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "ġ";
+ Text[ turkish ] = "Konum";
+ Text[ language_user1 ] = " ";
+ };
+ PageItem
+ {
+ Identifier = RID_SVXPAGE_SIZE ;
+ /* ### ACHTUNG: Neuer Text in Resource? Gre : Gre */
+ /* ### ACHTUNG: Neuer Text in Resource? Gre : Gre */
+ Text = "Gre" ;
+ Text [ ENGLISH ] = "Size" ;
+ Text [ norwegian ] = "Strrelse" ;
+ Text [ italian ] = "Dimensione" ;
+ Text [ portuguese_brazilian ] = "Tamanho" ;
+ Text [ portuguese ] = "Tamanho" ;
+ Text [ finnish ] = "Koko" ;
+ Text [ danish ] = "Strrelse" ;
+ Text [ french ] = "Taille" ;
+ Text [ swedish ] = "Storlek" ;
+ Text [ dutch ] = "Grootte" ;
+ Text [ spanish ] = "Tamao" ;
+ Text [ english_us ] = "Size" ;
+ PageResID = RID_SVXPAGE_SIZE ;
+ Text[ chinese_simplified ] = "С";
+ Text[ russian ] = "";
+ Text[ polish ] = "Rozmiar";
+ Text[ japanese ] = "";
+ Text[ chinese_traditional ] = "jp";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "ũ";
+ Text[ turkish ] = "Boyutlar";
+ Text[ language_user1 ] = " ";
+ };
+ PageItem
+ {
+ Identifier = RID_SVXPAGE_CAPTION ;
+ Text = "Legende" ;
+ Text [ English ] = "Caption" ;
+ PageResID = RID_SVXPAGE_CAPTION ;
+ Text [ dutch ] = "Legenda" ;
+ Text [ english_us ] = "Callout" ;
+ Text [ italian ] = "Legenda" ;
+ Text [ spanish ] = "Leyenda" ;
+ Text [ french ] = "Lgende" ;
+ Text [ swedish ] = "Frklaring" ;
+ Text [ danish ] = "Forklaring" ;
+ Text [ portuguese_brazilian ] = "Legenda" ;
+ Text [ portuguese ] = "Legenda" ;
+ Text[ chinese_simplified ] = "ͼ";
+ Text[ russian ] = "";
+ Text[ polish ] = "Legenda";
+ Text[ japanese ] = "o";
+ Text[ chinese_traditional ] = "Ϩ";
+ Text[ arabic ] = " ";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "Belirtme izgisi";
+ Text[ language_user1 ] = " ";
+ };
+ };
+ };
+ Text[ chinese_simplified ] = "ͼ";
+ Text[ russian ] = "";
+ Text[ polish ] = "Legenda";
+ Text[ japanese ] = "o";
+ Text[ chinese_traditional ] = "Ϩ";
+ Text[ arabic ] = " ";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "Belirtme izgisi";
+ Text[ language_user1 ] = " ";
+};
+ // ********************************************************************** EOF
diff --git a/svx/source/dialog/langbox.cxx b/svx/source/dialog/langbox.cxx
new file mode 100644
index 000000000000..02ae4adb7f26
--- /dev/null
+++ b/svx/source/dialog/langbox.cxx
@@ -0,0 +1,165 @@
+/*************************************************************************
+ *
+ * $RCSfile: langbox.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:09 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+// include ---------------------------------------------------------------
+
+#pragma hdrstop
+
+#include "langbox.hxx"
+#include "langtab.hxx"
+
+//========================================================================
+// class SvxLanguageBox
+//========================================================================
+
+USHORT TypeToPos_Impl( LanguageType eType, const ListBox& rLb )
+{
+ USHORT nPos = LISTBOX_ENTRY_NOTFOUND;
+ USHORT nCount = rLb.GetEntryCount();
+
+ for ( USHORT i=0; nPos == LISTBOX_ENTRY_NOTFOUND && i<nCount; i++ )
+ if ( eType == LanguageType((ULONG)rLb.GetEntryData(i)) )
+ nPos = i;
+
+ return nPos;
+}
+
+//-----------------------------------------------------------------------
+
+SvxLanguageBox::SvxLanguageBox( Window* pParent, WinBits nWinStyle )
+ : ListBox( pParent, nWinStyle )
+{
+ pLangTable = new SvxLanguageTable;
+}
+
+//------------------------------------------------------------------------
+
+SvxLanguageBox::SvxLanguageBox( Window* pParent, const ResId& rResId )
+ : ListBox( pParent, rResId )
+{
+ pLangTable = new SvxLanguageTable;
+}
+
+//------------------------------------------------------------------------
+
+SvxLanguageBox::~SvxLanguageBox()
+{
+ delete pLangTable;
+}
+
+//------------------------------------------------------------------------
+
+USHORT SvxLanguageBox::InsertLanguage( const LanguageType eLangType,
+ USHORT nPos )
+{
+ String aStrEntry = pLangTable->GetString( eLangType );
+ USHORT nAt = InsertEntry( aStrEntry, nPos );
+
+ SetEntryData( nAt, (void*)(ULONG)eLangType );
+ return nPos;
+}
+
+//------------------------------------------------------------------------
+
+void SvxLanguageBox::RemoveLanguage( const LanguageType eLangType )
+{
+ USHORT nAt = TypeToPos_Impl( eLangType, *this );
+
+ if ( nAt != LISTBOX_ENTRY_NOTFOUND )
+ RemoveEntry( nAt );
+}
+
+//------------------------------------------------------------------------
+
+LanguageType SvxLanguageBox::GetSelectLanguage() const
+{
+ LanguageType eType = LanguageType(LANGUAGE_DONTKNOW);
+ USHORT nPos = GetSelectEntryPos();
+
+ if ( nPos != LISTBOX_ENTRY_NOTFOUND )
+ return LanguageType( (ULONG)GetEntryData(nPos) );
+ else
+ return LanguageType( LANGUAGE_DONTKNOW );
+}
+
+//------------------------------------------------------------------------
+
+void SvxLanguageBox::SelectLanguage( const LanguageType eLangType, BOOL bSelect )
+{
+ USHORT nAt = TypeToPos_Impl( eLangType, *this );
+
+ if ( nAt != LISTBOX_ENTRY_NOTFOUND )
+ SelectEntryPos( nAt, bSelect );
+}
+
+//------------------------------------------------------------------------
+
+BOOL SvxLanguageBox::IsLanguageSelected( const LanguageType eLangType ) const
+{
+ USHORT nAt = TypeToPos_Impl( eLangType, *this );
+
+ if ( nAt != LISTBOX_ENTRY_NOTFOUND )
+ return IsEntryPosSelected( nAt );
+ else
+ return FALSE;
+}
+
+
diff --git a/svx/source/dialog/language.src b/svx/source/dialog/language.src
new file mode 100644
index 000000000000..db59da82580d
--- /dev/null
+++ b/svx/source/dialog/language.src
@@ -0,0 +1,94 @@
+/*************************************************************************
+ *
+ * $RCSfile: language.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:10 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+ // include ---------------------------------------------------------------
+#include "dialogs.hrc"
+ // pragma ----------------------------------------------------------------
+
+ // Language-Strings ------------------------------------------------------
+
+String RID_SVXSTR_LANGUAGE_ALL
+{
+ Text = "Alle" ;
+ Text [ ENGLISH ] = "All" ;
+ Text [ norwegian ] = "Alle" ;
+ Text [ italian ] = "[Tutte]" ;
+ Text [ portuguese_brazilian ] = "[Tudo]" ;
+ Text [ portuguese ] = "[Todas]" ;
+ Text [ finnish ] = "Kaikki" ;
+ Text [ danish ] = "Alle" ;
+ Text [ french ] = "Toutes" ;
+ Text [ swedish ] = "[Alla]" ;
+ Text [ dutch ] = "Alle" ;
+ Text [ spanish ] = "[Todo]" ;
+ Text [ english_us ] = "All" ;
+ Text[ chinese_simplified ] = "ȫ";
+ Text[ russian ] = "[]";
+ Text[ polish ] = "[Wszystkie]";
+ Text[ japanese ] = "ׂ";
+ Text[ greek ] = "";
+ Text[ korean ] = "[]";
+ Text[ chinese_traditional ] = "";
+ Text[ arabic ] = "";
+ Text[ turkish ] = "[Tm]";
+};
+
+ // ********************************************************************** EOF
diff --git a/svx/source/dialog/lingu.src b/svx/source/dialog/lingu.src
new file mode 100644
index 000000000000..bbc0591a53b6
--- /dev/null
+++ b/svx/source/dialog/lingu.src
@@ -0,0 +1,556 @@
+/*************************************************************************
+ *
+ * $RCSfile: lingu.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:10 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+ // include ---------------------------------------------------------------
+#include "dialogs.hrc"
+ // pragma ----------------------------------------------------------------
+
+ // QueryBoxen ---------------------------------------------------------------
+QueryBox RID_SVXQB_THESAURUS
+{
+ BUTTONS = WB_YES_NO ;
+ DEFBUTTON = WB_DEF_NO ;
+ // ### ACHTUNG: Neuer Text in Resource? Dieses Wort sollten Sie vermeiden! Thesaurus starten? : Dieses Wort sollten sie vermeiden! Thesaurus starten?
+ MESSAGE = "Dieses Wort sollten Sie vermeiden! Thesaurus starten?" ;
+ MESSAGE [ English ] = "Please avoid this word! Start thesaurus?" ;
+ MESSAGE [ norwegian ] = "Please avoid this word! Start thesaurus?" ;
+ MESSAGE [ italian ] = "Questo termine andrebbe evitato. Avviare il dizionario dei sinonimi?" ;
+ MESSAGE [ portuguese_brazilian ] = "Por favor evite esta palavra!Iniciar thesaurus?" ;
+ MESSAGE [ portuguese ] = "Evite esta palavra! Iniciar o dicionrio de sinnimos?" ;
+ MESSAGE [ finnish ] = "Vlt tt sanaa! Kytetnk synonyymisanastoa?" ;
+ MESSAGE [ danish ] = "Undg venligst dette ord! Vil du bruge synonymordbogen?" ;
+ MESSAGE [ french ] = "Evitez l'utilisation de ce mot ! Lancer le dictionnaire des synonymes ?" ;
+ MESSAGE [ swedish ] = "Undvik det hr ordet! Starta synonymordbok?" ;
+ MESSAGE [ dutch ] = "Dit woord is niet zo geschikt. Thesaurus starten?" ;
+ MESSAGE [ spanish ] = "Evite por favor esta palabra! Desea iniciar la bsqueda de sinnimos?" ;
+ MESSAGE [ english_us ] = "This word appears in the list of words you want to avoid. Start thesaurus?" ;
+ MESSAGE[ chinese_simplified ] = "Ӧñʹ֣Ҫʵ";
+ MESSAGE[ russian ] = " ! ?";
+ MESSAGE[ polish ] = "Prosz unika tego sowa! Wczy Tezaurus?";
+ MESSAGE[ japanese ] = "̒P͔ĉ!@ތꎫTN܂?";
+ MESSAGE[ chinese_traditional ] = "zקKϥγoӦrTnҰʵH";
+ MESSAGE[ arabic ] = " ! ʿ";
+ MESSAGE[ greek ] = " ! ;";
+ MESSAGE[ korean ] = " ܾ ȸǴܾ Ͽ ֽϴ. Ǿ ұ?";
+ MESSAGE[ turkish ] = "Bu szc kullanmaktan kanmalsnz! E anlamllar szl balatlsn m?";
+ MESSAGE[ language_user1 ] = " ";
+};
+QueryBox RID_SVXQB_CONTINUE
+{
+ BUTTONS = WB_YES_NO ;
+ DEFBUTTON = WB_DEF_YES ;
+ /* ### ACHTUNG: Neuer Text in Resource? berprfung am Anfang des Dokumentes fortsetzen? : berprfung am Anfang des Dokumentes fortsetzen? */
+ /* ### ACHTUNG: Neuer Text in Resource? berprfung am Anfang des Dokumentes fortsetzen? : berprfung am Anfang des Dokumentes fortsetzen? */
+ MESSAGE = "berprfung am Anfang des Dokumentes fortsetzen?" ;
+ MESSAGE [ English ] = "Do you want to continue checking at the start of the document?" ;
+ MESSAGE [ norwegian ] = "Do you want to continue checking at the start of the document?" ;
+ MESSAGE [ italian ] = "Continuare a controllare dall'inizio del documento?" ;
+ MESSAGE [ portuguese_brazilian ] = "Deseja continuar a verificao no incio do documento?" ;
+ MESSAGE [ portuguese ] = "Deseja continuar com a verificao no incio do documento?" ;
+ MESSAGE [ finnish ] = "Jatketaanko tarkistamista asiakirjan alusta?" ;
+ MESSAGE [ danish ] = "Vil du fortstte kontrollen fra dokumentets begyndelse?" ;
+ MESSAGE [ french ] = "Voulez-vous continuer la vrification depuis le dbut du document?" ;
+ MESSAGE [ swedish ] = "Fortstta kontroll i brjan p dokumentet?" ;
+ MESSAGE [ dutch ] = "Controle aan het begin van het document voortzetten ?" ;
+ MESSAGE [ spanish ] = "Desea continuar la revisin desde el inicio del documento?" ;
+ MESSAGE [ english_us ] = "Continue checking at beginning of document?" ;
+ MESSAGE[ chinese_simplified ] = "ĵ˼Ѱ";
+ MESSAGE[ russian ] = " ?";
+ MESSAGE[ polish ] = "Kontuynuowa sprawdzanie na pocztku dokumentu?";
+ MESSAGE[ japanese ] = "𑱍s܂H";
+ MESSAGE[ chinese_traditional ] = "q}~MH";
+ MESSAGE[ arabic ] = " Ͽ";
+ MESSAGE[ greek ] = " ;";
+ MESSAGE[ korean ] = " ó ˻縦 ұ?";
+ MESSAGE[ turkish ] = "Denetlemeye, belge banda devam edilsin mi?";
+ MESSAGE[ language_user1 ] = " ";
+};
+QueryBox RID_SVXQB_BW_CONTINUE
+{
+ BUTTONS = WB_YES_NO ;
+ DEFBUTTON = WB_DEF_YES ;
+ /* ### ACHTUNG: Neuer Text in Resource? berprfung am Ende des Dokumentes fortsetzen? : berprfung am Ende des Dokumentes fortsetzen? */
+ /* ### ACHTUNG: Neuer Text in Resource? berprfung am Ende des Dokumentes fortsetzen? : berprfung am Ende des Dokumentes fortsetzen? */
+ MESSAGE = "berprfung am Ende des Dokumentes fortsetzen?" ;
+ MESSAGE [ English ] = "Do you want to continue checking at the end of the document?" ;
+ Message [ english_us ] = "Continue checking at end of document?" ;
+ Message [ italian ] = "Continuare il controllo alla fine del documento?" ;
+ Message [ spanish ] = "Desea continuar la revisin al final del documento?" ;
+ Message [ french ] = "Continuer la vrification la fin du document ?" ;
+ Message [ dutch ] = "Controle aan het einde van het document voortzetten?" ;
+ Message [ swedish ] = "Fortstta kontroll vid slutet av dokumentet?" ;
+ Message [ danish ] = "Vil du fortstte kontrollen fra dokumentets slutning?" ;
+ Message [ portuguese ] = "Continuar a verificao no fim do documento?" ;
+ Message [ portuguese_brazilian ] = "berprfung am Ende des Dokumentes fortsetzen?" ;
+ Message[ chinese_simplified ] = "ĵβ˼Ѱ";
+ Message[ russian ] = " ?";
+ Message[ polish ] = "Kontynuowa sprawdzanie na kocu dokumentu?";
+ Message[ japanese ] = "޷Ă̍Ō܂H";
+ Message[ chinese_traditional ] = "q~MH";
+ Message[ arabic ] = " Ͽ";
+ Message[ greek ] = " ;";
+ Message[ korean ] = " ˻縦 ұ?";
+ Message[ turkish ] = "Denetlemeye, belge sonunda devam edilsin mi?";
+ Message[ language_user1 ] = " ";
+};
+QueryBox RID_SVXQB_BODYTEXT
+{
+ BUTTONS = WB_YES_NO ;
+ DEFBUTTON = WB_DEF_NO ;
+ // ### ACHTUNG: Neuer Text in Resource? Mchten Sie den Haupttext prfen? : Wollen Sie den Haupttext prfen?
+ /* ### ACHTUNG: Neuer Text in Resource? Mchten Sie den Haupttext prfen? : Mchten Sie den Haupttext prfen? */
+ /* ### ACHTUNG: Neuer Text in Resource? Mchten Sie den Haupttext prfen? : Mchten Sie den Haupttext prfen? */
+ MESSAGE = "Mchten Sie den Haupttext prfen?" ;
+ MESSAGE [ English ] = "Do you want to check the Bodytext?" ;
+ MESSAGE [ norwegian ] = "Do you want to check the Bodytext?" ;
+ MESSAGE [ italian ] = "Controllare il testo principale?" ;
+ MESSAGE [ portuguese_brazilian ] = "Deseja verificar o corpo do documento?" ;
+ MESSAGE [ portuguese ] = "Deseja verificar o texto principal?" ;
+ MESSAGE [ finnish ] = "Haluatko tarkistaa runkotekstin?" ;
+ MESSAGE [ danish ] = "Vil du kontrollere brdteksten?" ;
+ MESSAGE [ french ] = "Voulez-vous vrifier le texte principal ?" ;
+ MESSAGE [ swedish ] = "Vill Du kontrollera huvudtexten?" ;
+ MESSAGE [ dutch ] = "Wilt u de hoofdtekst controleren?" ;
+ MESSAGE [ spanish ] = "Desea verificar el texto principal?" ;
+ MESSAGE [ english_us ] = "Do you want to check the main text?" ;
+ MESSAGE[ chinese_simplified ] = "Ҫ";
+ MESSAGE[ russian ] = " ?";
+ MESSAGE[ polish ] = "Czy chcesz sprawdzi tekst gwny?";
+ MESSAGE[ japanese ] = "Ҳ ÷Ă܂?";
+ MESSAGE[ chinese_traditional ] = "zQnˬdH";
+ MESSAGE[ arabic ] = " ";
+ MESSAGE[ greek ] = " ;";
+ MESSAGE[ korean ] = " ؽƮ ˻Ͻðڽϱ?";
+ MESSAGE[ turkish ] = "Ana metni denetlemek istiyor musunuz?";
+ MESSAGE[ language_user1 ] = " ";
+};
+QueryBox RID_SVXQB_SPECIAL
+{
+ BUTTONS = WB_YES_NO ;
+ DEFBUTTON = WB_DEF_NO ;
+ /* ### ACHTUNG: Neuer Text in Resource? Sonderbereiche prfen? : Sonderbereiche prfen? */
+ /* ### ACHTUNG: Neuer Text in Resource? Sonderbereiche prfen? : Sonderbereiche prfen? */
+ MESSAGE = "Sonderbereiche prfen?" ;
+ MESSAGE [ English ] = "Do you want check the special regions?" ;
+ MESSAGE [ norwegian ] = "Do you want check the special regions?" ;
+ MESSAGE [ italian ] = "Controllare le aree speciali?" ;
+ MESSAGE [ portuguese_brazilian ] = "Deseja verificar Regies especiais?" ;
+ MESSAGE [ portuguese ] = "Deseja verificar as regies especiais?" ;
+ MESSAGE [ finnish ] = "Haluatko tarkistaa erikoisalueet?" ;
+ MESSAGE [ danish ] = "Vil du kontrollere sromrderne?" ;
+ MESSAGE [ french ] = "Voulez-vous vrifier les zones spciales?" ;
+ MESSAGE [ swedish ] = "Vill Du kontrollera specialomrden?" ;
+ MESSAGE [ dutch ] = "Wilt u de speciale bereiken controleren?" ;
+ MESSAGE [ spanish ] = "Desea verificar las reas especiales?" ;
+ MESSAGE [ english_us ] = "Do you want check the special regions?" ;
+ MESSAGE[ chinese_simplified ] = "Ҫ";
+ MESSAGE[ russian ] = " ?";
+ MESSAGE[ polish ] = "Sprawdza obszary specjalne?";
+ MESSAGE[ japanese ] = "n܂?";
+ MESSAGE[ chinese_traditional ] = "ˬdSϰH";
+ MESSAGE[ arabic ] = " ɿ";
+ MESSAGE[ greek ] = " ;";
+ MESSAGE[ korean ] = "Ư ˻Ͻðڽϱ?";
+ MESSAGE[ turkish ] = "zel blmler denetlensin mi?";
+ MESSAGE[ language_user1 ] = " ";
+};
+QueryBox RID_SVXQB_SPECIAL_FORCED
+{
+ BUTTONS = WB_YES_NO ;
+ DEFBUTTON = WB_DEF_NO ;
+ /* ### ACHTUNG: Neuer Text in Resource? Sonderbereichprfung ist ausgeschaltet, Trotzdem prfen? : Sonderbereichprfung ist ausgeschaltet, Trotzdem prfen? */
+ /* ### ACHTUNG: Neuer Text in Resource? Sonderbereichprfung ist ausgeschaltet, Trotzdem prfen? : Sonderbereichprfung ist ausgeschaltet, Trotzdem prfen? */
+ MESSAGE = "Sonderbereichprfung ist ausgeschaltet, Trotzdem prfen?" ;
+ MESSAGE [ English ] = "Check in Special regions is turned off, Proof anyway?" ;
+ MESSAGE [ norwegian ] = "Check in Special regions is turned off, Proof anyway?" ;
+ MESSAGE [ italian ] = "Il controllo delle aree speciali non attivo, controllare lo stesso?" ;
+ MESSAGE [ portuguese_brazilian ] = "Verificao de Regies especiais est desativada, Verificar assim mesmo?" ;
+ MESSAGE [ portuguese ] = "A reviso de reas especiais est desactivada. Mesmo assim prosseguir?" ;
+ MESSAGE [ finnish ] = "Erikoisalueiden tarkistus ei ole kytss. Korjausluetaanko silti?" ;
+ MESSAGE [ danish ] = "Stavekontrol i sromrder er slet fra, skal der kontrolleres alligevel?" ;
+ MESSAGE [ french ] = "La vrification dans les zones spciales est dsactive. Vrifier tout de mme ?" ;
+ MESSAGE [ swedish ] = "Kontroll av specialomrden r avstngd. Kontrollera nd?" ;
+ MESSAGE [ dutch ] = "De functie 'Speciale bereiken controleren' is uitgeschakeld. Controle toch uitvoeren?" ;
+ MESSAGE [ spanish ] = "La verificacin de las reas especiales est desactivada, Desea verificar de todas maneras?" ;
+ MESSAGE [ english_us ] = "Check special regions is deactivated. Check anyway?" ;
+ MESSAGE[ chinese_simplified ] = "Ѿʧļ飬Ҫִм飿";
+ MESSAGE[ russian ] = " . ?";
+ MESSAGE[ polish ] = "Sprawdzanie obszarw specjalnych jest wyczone. Mimo to sprawdza?";
+ MESSAGE[ japanese ] = "n̂ɂȂĂ܂Bł܂?";
+ MESSAGE[ chinese_traditional ] = "wgˬdSϰMz٬OnˬdH";
+ MESSAGE[ arabic ] = " . ߿";
+ MESSAGE[ greek ] = " . ;";
+ MESSAGE[ korean ] = "Ư ȰԴϴ. ׷ ˻Ͻðڽϱ?";
+ MESSAGE[ turkish ] = "zel blm denetleme etkin deil, yine de denetlensin mi?";
+ MESSAGE[ language_user1 ] = " ";
+};
+ // Strings ---------------------------------------------------------------
+String RID_SVXSTR_HMSTATUS_OK
+{
+ Text = "Das Wort ist korrekt geschrieben" ;
+ Text [ ENGLISH ] = "The spelled word is correct" ;
+ Text [ norwegian ] = "The spelled word is correct" ;
+ Text [ italian ] = "La parola sottoposta a controllo ortografico corretta" ;
+ Text [ portuguese_brazilian ] = "A palavra soletrada est correta" ;
+ Text [ portuguese ] = "A palavra est correcta." ;
+ Text [ finnish ] = "Sana on kirjoitettu oikein" ;
+ Text [ danish ] = "Ordet er stavet rigtigt" ;
+ Text [ french ] = "Mot correctement orthographi" ;
+ Text [ swedish ] = "Ordet r riktigt stavat" ;
+ Text [ dutch ] = "Dit woord is correct geschreven" ;
+ Text [ spanish ] = "La palabra est escrita correctamente" ;
+ Text [ english_us ] = "The word is spelled correctly" ;
+ Text[ chinese_simplified ] = "ֵдȷ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Sowo jest napisane poprawnie";
+ Text[ japanese ] = "̒P̽ق͐młB";
+ Text[ chinese_traditional ] = "oӦrgkT";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = "ܾ Ȯմϴ";
+ Text[ turkish ] = "Szcn imlas doru";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_HMSTATUS_DONTUSE
+{
+ Text = "Dieses Wort sollten Sie vermeiden" ;
+ Text [ ENGLISH ] = "Don't use this word" ;
+ Text [ norwegian ] = "Don't use this word" ;
+ Text [ italian ] = "Questa parola andrebbe evitata" ;
+ Text [ portuguese_brazilian ] = "No use esta palavra" ;
+ Text [ portuguese ] = "Tente evitar esta palavra." ;
+ Text [ finnish ] = "l kyt tt sanaa" ;
+ Text [ danish ] = "Undg venligst dette ord" ;
+ Text [ french ] = "N'utilisez pas ce mot" ;
+ Text [ swedish ] = "Undvik det hr ordet" ;
+ Text [ dutch ] = "Vermijd het gebruik van dit woord" ;
+ Text [ spanish ] = "Debera evitar esta palabra" ;
+ Text [ english_us ] = "Avoid using this word" ;
+ Text[ chinese_simplified ] = "Ҫʹ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Prosz unika tego sowa";
+ Text[ japanese ] = "̒P̎gp͔ĂB";
+ Text[ chinese_traditional ] = "ijznϥγoӦr";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ܾ Ͻʽÿ";
+ Text[ turkish ] = "Bu szc kullanmaktan kanmalsnz";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_HMSTATUS_WRONG
+{
+ Text = "Das Wort ist unbekannt." ;
+ Text [ ENGLISH ] = "Unknown word." ;
+ Text [ norwegian ] = "Unknown word." ;
+ Text [ italian ] = "Parola sconosciuta." ;
+ Text [ portuguese_brazilian ] = "Palavra desconhecida" ;
+ Text [ portuguese ] = "Palavra desconhecida." ;
+ Text [ finnish ] = "Tuntematon sana." ;
+ Text [ danish ] = "Ukendt ord." ;
+ Text [ french ] = "Mot inconnu" ;
+ Text [ swedish ] = "Oknt ord." ;
+ Text [ dutch ] = "Onbekend woord." ;
+ Text [ spanish ] = "Palabra desconocida." ;
+ Text [ english_us ] = "Unknown word." ;
+ Text[ chinese_simplified ] = "ֲ";
+ Text[ russian ] = " .";
+ Text[ polish ] = "Nieznane sowo.";
+ Text[ japanese ] = "̒P͕słB";
+ Text[ chinese_traditional ] = "oӦrC";
+ Text[ arabic ] = " .";
+ Text[ greek ] = " .";
+ Text[ korean ] = "˷ ܾԴϴ.";
+ Text[ turkish ] = "Szck bilinmiyor.";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_HMSTATUS_CAPERROR
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Gro- / Kleinschreibungs - Fehler : Gro- / Kleinschreibungs - Fehler */
+ /* ### ACHTUNG: Neuer Text in Resource? Gro- / Kleinschreibungs - Fehler : Gro- / Kleinschreibungs - Fehler */
+ Text = "Gro- / Kleinschreibungs - Fehler" ;
+ Text [ ENGLISH ] = "Capitalization Error" ;
+ Text [ norwegian ] = "Capitalization Error" ;
+ Text [ italian ] = "Errore relativo alle lettere maiuscole" ;
+ Text [ portuguese_brazilian ] = "Erro de maisculas" ;
+ Text [ portuguese ] = "Erro de maisculas/minsculas" ;
+ Text [ finnish ] = "Vr iso kirjain" ;
+ Text [ danish ] = "Retskrivningsfejl store/sm bogstaver" ;
+ Text [ french ] = "Erreur majuscule/minuscule" ;
+ Text [ swedish ] = "Fel anvndning av versaler" ;
+ Text [ dutch ] = "Fout bij gebruik hoofdletter/kleine letters" ;
+ Text [ spanish ] = "Error de maysculas/minsculas" ;
+ Text [ english_us ] = "Capitalization error" ;
+ Text[ chinese_simplified ] = "ĸСд - ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Bdy w pisowni duych i maych liter";
+ Text[ japanese ] = "啶/̴װ";
+ Text[ chinese_traditional ] = "rjpg~";
+ Text[ arabic ] = " /";
+ Text[ greek ] = " (-)";
+ Text[ korean ] = "/ҹ ";
+ Text[ turkish ] = "Byk /kk harf hatas";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_HMSTATUS_INVALID_LANG
+{
+ Text = "Sprache wird nicht untersttzt" ;
+ Text [ ENGLISH ] = "Language is not supported" ;
+ Text[ english_us ] = "Language not supported";
+ Text[ portuguese ] = "Lngua sem suporte";
+ Text[ russian ] = " ";
+ Text[ greek ] = " ";
+ Text[ dutch ] = "Taal wordt niet ondersteund";
+ Text[ french ] = "Cette langue n'est pas supporte";
+ Text[ spanish ] = "No se apoya este idioma";
+ Text[ italian ] = "La lingua non viene supportata";
+ Text[ danish ] = "Sproget understttes ikke";
+ Text[ swedish ] = "Sprket gr inte att anvnda";
+ Text[ polish ] = "Jzyk nie jest obsugiwany";
+ Text[ portuguese_brazilian ] = "Language is not supported";
+ Text[ japanese ] = "͎x܂";
+ Text[ korean ] = " ";
+ Text[ chinese_simplified ] = "֧Թ";
+ Text[ chinese_traditional ] = "y䴩";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "Dil desteklenmiyor.";
+};
+String RID_SVXSTR_HMERR_CHECKINSTALL
+{
+ /* ### ACHTUNG: Neuer Text in Resource? ist fr die Prfung nicht verfgbar. \nberprfen Sie bitte Ihre Installation und installieren Sie \ngegebenenfalls die gewnschte Sprache : ist fr die Prfung nicht verfgbar. \nberprfen Sie bitte Ihre Installation und installieren Sie \ngegebenenfalls die gewnschte Sprache */
+ /* ### ACHTUNG: Neuer Text in Resource? ist fr die Prfung nicht verfgbar. \nberprfen Sie bitte Ihre Installation und installieren Sie \ngegebenenfalls die gewnschte Sprache : ist fr die Prfung nicht verfgbar. \nberprfen Sie bitte Ihre Installation und installieren Sie \ngegebenenfalls die gewnschte Sprache */
+ TEXT = " ist fr die Prfung nicht verfgbar. \nberprfen Sie bitte Ihre Installation und installieren Sie \ngegebenenfalls die gewnschte Sprache" ;
+ TEXT [ English ] = " is not available for spellchecking\nPlease check your installation and install the desired language\n" ;
+ TEXT [ norwegian ] = " is not available for spellchecking\nKontroller innstalleringen og installer det sprket du nsker\n" ;
+ TEXT [ italian ] = "non disponibile per il controllo ortografico\nVerificare l'installazione ed installare la lingua desiderata" ;
+ TEXT [ portuguese_brazilian ] = "no est disponvel para verificao de ortografia\nPor favor confira sua instalao e instale o idioma desejado\n" ;
+ TEXT [ portuguese ] = "no est disponvel para a verificao ortogrfica.\nConfira a sua instalao e, se necessrio, instale a lngua desejada\n" ;
+ TEXT [ finnish ] = " ei ole kytettviss korjauslukua varten\nTarkista asennus ja asenna tarvitsemasi kieli\n" ;
+ TEXT [ danish ] = "str ikke til rdighed for stavekontrollen.\nKontroller venligst din installation og installer i\ngivet fald det nskede sprog" ;
+ TEXT [ french ] = "n'est pas disponible pour la vrification. Veuillez vrifier l'installation et installer, le cas chant, la langue souhaite" ;
+ TEXT [ swedish ] = "r inte tillgnglig fr stavningskontroll\nKontrollera Din installation och installera\neventuellt nskat sprk" ;
+ TEXT [ dutch ] = "is niet beschikbaar voor spellingcontrole\nControleer uw installatie en installeer\neventueel de gewenste taal." ;
+ TEXT [ spanish ] = "no est disponible para la revisin ortogrfica.\nRevise su instalacin e instale,\nsi es necesario, el idioma deseado" ;
+ TEXT [ english_us ] = "is not available for spellchecking\nPlease check your installation and install the desired language\n" ;
+ TEXT[ chinese_simplified ] = "޷ṩַܡ\n鰲װijбҪ\nװҪʹõ԰汾";
+ TEXT[ russian ] = " . \n, , \n ";
+ TEXT[ polish ] = "jest niedostpne do sprawdzania. \nProsz sprawdzi instalacj i zainstalowa \n ewentualnie potrzebny jzyk.";
+ TEXT[ japanese ] = "ͽɎgpł܂B\n۸т̲ݽİق\nꍇɂĂ͂]̌ݽİقĂB";
+ TEXT[ chinese_traditional ] = "Lkѫr\\C\nбzˬdw˪{MYnM\nбzw˭nϥΪyC";
+ TEXT[ arabic ] = " . \n ߡ ɡ ";
+ TEXT[ greek ] = " . \n , , \n ";
+ TEXT[ korean ] = " ˻翡 ϴ. \nġ ¸ ϰ \nʿ信 ϴ  ġϽʽÿ.";
+ TEXT[ turkish ] = "denetlenemiyor. \nKurulumunuzu kontrol edip gerekirse\nistenen dili ykleyin.";
+ TEXT[ language_user1 ] = " ";
+};
+String RID_SVXSTR_HMERR_ADDWORD
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Das Wort konnte nicht ins Wrterbuch aufgenommen werden. : Das Wort konnte nicht ins Wrterbuch aufgenommen werden. */
+ /* ### ACHTUNG: Neuer Text in Resource? Das Wort konnte nicht ins Wrterbuch aufgenommen werden. : Das Wort konnte nicht ins Wrterbuch aufgenommen werden. */
+ Text = "Das Wort konnte nicht ins Wrterbuch aufgenommen werden." ;
+ Text [ ENGLISH ] = "Can't add word to dictionary" ;
+ Text [ norwegian ] = "Kan ikke legge til ord I ordliste" ;
+ Text [ italian ] = "Impossibile aggiungere parola al dizionario." ;
+ Text [ portuguese_brazilian ] = "No possvel acrescentar palavra ao dicionrio" ;
+ Text [ portuguese ] = "Foi impossvel acrescentar a palavra no dicionrio." ;
+ Text [ finnish ] = "Sanastoon ei voi list" ;
+ Text [ danish ] = "Det var ikke muligt at tilfje dette ord til ordbogen." ;
+ Text [ french ] = "Impossible d'ajouter ce mot au dictionnaire" ;
+ Text [ swedish ] = "Ordet kunde inte lggas in i ordboken." ;
+ Text [ dutch ] = "Woord kan niet in woordenboek worden opgenomen" ;
+ Text [ spanish ] = "No se pudo aadir la palabra al diccionario." ;
+ Text [ english_us ] = "The word could not be added to dictionary" ;
+ Text[ chinese_simplified ] = "޷¼֡";
+ Text[ russian ] = " .";
+ Text[ polish ] = "To sowo nie mogo zosta wpisane do sownika.";
+ Text[ japanese ] = "̒P͎ɉ܂B";
+ Text[ chinese_traditional ] = "LkoӦrC";
+ Text[ arabic ] = " .";
+ Text[ greek ] = " ";
+ Text[ korean ] = "ܾ ߰ ߽ϴ.";
+ Text[ turkish ] = "Szck, szle eklenemedi.";
+ Text[ language_user1 ] = " ";
+};
+String RID_SVXSTR_HMERR_HYPH
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Die Trennhilfe ist nicht verfgbar : Die Trennhilfe ist nicht verfgbar */
+ /* ### ACHTUNG: Neuer Text in Resource? Die Trennhilfe ist nicht verfgbar : Die Trennhilfe ist nicht verfgbar */
+ TEXT = "Die Trennhilfe ist nicht verfgbar" ;
+ TEXT [ English ] = "Hyphenation is not available" ;
+ TEXT [ norwegian ] = "Orddeling er ikke tilgjengelig" ;
+ TEXT [ italian ] = "La sillabazione non disponibile" ;
+ TEXT [ portuguese_brazilian ] = "Hifenao no est disponvel" ;
+ TEXT [ portuguese ] = "Diviso silbica no se encontra disponvel" ;
+ TEXT [ finnish ] = "Tavutus ei ole kytettviss" ;
+ TEXT [ danish ] = "Orddelingen str ikke til rdighed" ;
+ TEXT [ french ] = "Csure non disponible" ;
+ TEXT [ swedish ] = "Avstavningshjlpen r inte tillgnglig" ;
+ TEXT [ dutch ] = "Afbrekingshulp is niet beschikbaar" ;
+ TEXT [ spanish ] = "No est disponible la separacin silbica" ;
+ TEXT [ english_us ] = "Hyphenation not available" ;
+ TEXT[ chinese_simplified ] = "ַ";
+ TEXT[ russian ] = " ";
+ TEXT[ polish ] = "Dzielenie wyrazw nie jest moliwe";
+ TEXT[ japanese ] = "ʲȰ݂gpł܂B";
+ TEXT[ chinese_traditional ] = "srŤsb";
+ TEXT[ arabic ] = " ";
+ TEXT[ greek ] = " ";
+ TEXT[ korean ] = " Ұ";
+ TEXT[ turkish ] = "Heceleme kullanlamyor";
+ TEXT[ language_user1 ] = " ";
+};
+String RID_SVXSTR_HMERR_THESAURUS
+{
+ /* ### ACHTUNG: Neuer Text in Resource? Ein Thesaurus fr die eingestellte Sprache ist nicht verfgbar. \nberprfen Sie bitte Ihre Installation und installieren Sie \ngegebenenfalls die gewnschte Sprache : Ein Thesaurus fr die eingestellte Sprache ist nicht verfgbar. \nberprfen Sie bitte Ihre Installation und installieren Sie \ngegebenenfalls die gewnschte Sprache */
+ /* ### ACHTUNG: Neuer Text in Resource? Ein Thesaurus fr die eingestellte Sprache ist nicht verfgbar. \nberprfen Sie bitte Ihre Installation und installieren Sie \ngegebenenfalls die gewnschte Sprache : Ein Thesaurus fr die eingestellte Sprache ist nicht verfgbar. \nberprfen Sie bitte Ihre Installation und installieren Sie \ngegebenenfalls die gewnschte Sprache */
+ TEXT = "Ein Thesaurus fr die eingestellte Sprache ist nicht verfgbar. \nberprfen Sie bitte Ihre Installation und installieren Sie \ngegebenenfalls die gewnschte Sprache" ;
+ TEXT [ English ] = "For the current Language no Thesaurus is available. \nPlease check your installation and install the desired language\n" ;
+ TEXT [ norwegian ] = "Synonymordliste er ikke tilgjengelig for det gjeldende programmet. \nKontroller innstalleringen og installer det sprket du nsker\n" ;
+ TEXT [ italian ] = "Per la lingua corrente non disponibile il dizionario dei sinonimi.\nVerificare l'installazione ed installare la lingua desiderata" ;
+ TEXT [ portuguese_brazilian ] = "Para o Idioma atual no h Thesaurus disponvel. \nPor favor confira sua instalao e instale o idioma desejado\n" ;
+ TEXT [ portuguese ] = "O dicionrio de sinnimos no est disponvel para a lngua seleccionada. \nConfira a sua instalao e, se necessrio, instale a lngua desejada.\n" ;
+ TEXT [ finnish ] = "Nykyiselle kielelle ei ole synonyymisanastoa. \nTarkista asennus ja asenna tarvitsemasi kieli\n" ;
+ TEXT [ danish ] = "Synonymordbogen str ikke til rdighed for det angivne sprog.\nKontroller venligst din installation og installer i\ngivet fald det nskede sprog" ;
+ TEXT [ french ] = "Aucun dictionnaire des synonymes n'est disponible pour la langue slectionne.\nVeuillez vrifiez l'installation et installer\nle cas chant la langue concerne." ;
+ TEXT [ swedish ] = "Ingen synonymordbok r tillgnglig fr det instllda sprket. \nKontrollera Din installation och installera\neventuellt nskat sprk." ;
+ TEXT [ dutch ] = "Voor de ingestelde taal is geen Thesaurus beschikbaar. \nControleer uw installatie en\ninstalleer eventueel de gewenste taal." ;
+ TEXT [ spanish ] = "No existe un diccionario de sinnimos para el idioma seleccionado. \nCompruebe por favor su instalacin\n e instale, si es necesario, el idioma deseado" ;
+ TEXT [ english_us ] = "No thesaurus is available for the selected language. \nPlease check your installation and install the desired language\n" ;
+ TEXT[ chinese_simplified ] = "趨ûиӴʵ书ܡ\nİװ\nбҪװҪʹõ԰汾";
+ TEXT[ russian ] = " . \n, , \n ";
+ TEXT[ polish ] = "Tezaurus jest niedostpny dla wybranego jzyka. \nProsz sprawdzi instalacj i zainstalowa \newentualnie potrzebny jzyk.";
+ TEXT[ japanese ] = "Iꂽp̗ތꎫT͎gpł܂B\n۸т̲ݽİقāA\nꍇɂĂ͂]̌ݽİقĉB";
+ TEXT[ chinese_traditional ] = "z]wyS[\\C\nбzˬdw˪{C\nYnMбzw˭nϥΪyC";
+ TEXT[ arabic ] = " . \n ߡ\n ɡ ";
+ TEXT[ greek ] = " \n. , ,\n ";
+ TEXT[ korean ] = "  Ǿ ϴ. \nġ ¸ ϰ \nʿ信 ϴ  ġϽʽÿ.";
+ TEXT[ turkish ] = "Ayarlanan dil iin e anlamllar szl mevcut deil. \nKurulumunuzu kontrol edip gerekirse\nistenen dili ykleyin.";
+ TEXT[ language_user1 ] = " ";
+};
+String RID_SVXSTR_DIC_ERR_UNKNOWN
+{
+ Text = "Das Wort konnte aus einem unbekanntem Grund\nnicht ins Wrterbuch aufgenommen werden." ;
+ Text [ ENGLISH ] = "Failed to add word to dictionary\n for an unknown reason." ;
+ Text[ english_us ] = "Word cannot be added to dictionary\ndue to unknown reason.";
+ Text[ portuguese ] = "Foi impossvel adicionar a palavra ao\ndicionrio por razes desconhecidas.";
+ Text[ russian ] = " \n .";
+ Text[ greek ] = " \n for an unknown reason.";
+ Text[ dutch ] = "Om onbekende redenen kon het woord\nniet worden opgenomen in het woordenboek.";
+ Text[ french ] = "Pour une raison inconnue,\n il a t impossible d'insrer le mot dans le dictionnaire.";
+ Text[ spanish ] = "No se puede recoger en el diccionario la\npalabra debido a una razn desconocida.";
+ Text[ italian ] = "Non stato possibile inserire la parola nel dizionario.\nErrore sconosciuto.";
+ Text[ danish ] = "Det var af en ukendt grund ikke muligt\nat tilfje ordet til ordbogen.";
+ Text[ swedish ] = "Ordet kunde av oknd anledning\ninte tas upp i ordboken.";
+ Text[ polish ] = "Z nieznanej przyczyny\nwyrazu nie mona byo przej do sownika.";
+ Text[ portuguese_brazilian ] = "Failed to add word to dictionary\n for an unknown reason.";
+ Text[ japanese ] = "P͌sȂ܂\nɒljł܂łB";
+ Text[ korean ] = " ܾ ˷ \n ߰ ϴ.";
+ Text[ chinese_simplified ] = "ڲԭ޷\nӵʵȥ";
+ Text[ chinese_traditional ] = "rLkoӦrA]C";
+ Text[ arabic ] = " \n .";
+ Text[ turkish ] = "Szck bilinmeyen bir nedenden dolay\nszle eklenemedi.";
+};
+String RID_SVXSTR_DIC_ERR_FULL
+{
+ Text = "Das Wrterbuch ist bereits voll." ;
+ Text [ ENGLISH ] = "The dictionary is already full." ;
+ Text[ english_us ] = "The dictionary is already full.";
+ Text[ portuguese ] = "O dicionrio j est cheio!";
+ Text[ russian ] = " .";
+ Text[ greek ] = " .";
+ Text[ dutch ] = "Woordenboek is vol";
+ Text[ french ] = "Le dictionnaire est plein !";
+ Text[ spanish ] = "El diccionario est lleno.";
+ Text[ italian ] = "Il dizionario pino.";
+ Text[ danish ] = "Ordbogen er allerede fuld.";
+ Text[ swedish ] = "Ordboken r redan full.";
+ Text[ polish ] = "Sownik jest przepeniony.";
+ Text[ portuguese_brazilian ] = "The dictionary is already full.";
+ Text[ japanese ] = "͂łɂςłB";
+ Text[ korean ] = " ̹ ֽϴ.";
+ Text[ chinese_simplified ] = "ʵѾװ";
+ Text[ chinese_traditional ] = "rwC";
+ Text[ arabic ] = " .";
+ Text[ turkish ] = "Szlk doldu.";
+};
+String RID_SVXSTR_DIC_ERR_READONLY
+{
+ Text = "Das Wrterbuch ist schreibgeschtzt." ;
+ Text [ ENGLISH ] = "The dictionary is readonly." ;
+ Text[ english_us ] = "The dictionary is read only.";
+ Text[ portuguese ] = "O dicionrio s de leitura.";
+ Text[ russian ] = " .";
+ Text[ greek ] = " .";
+ Text[ dutch ] = "Woordenboek is schrijfbeveiligd.";
+ Text[ french ] = "Le dictionnaire est en lecture seule !";
+ Text[ spanish ] = "El diccionario es solo de lectura.";
+ Text[ italian ] = "Il dizionario a sola lettura.";
+ Text[ danish ] = "Ordbogen er skrivebeskyttet.";
+ Text[ swedish ] = "Ordboken r skrivskyddad.";
+ Text[ polish ] = "Sownik jest tylko do odczytu.";
+ Text[ portuguese_brazilian ] = "The dictionary is readonly.";
+ Text[ japanese ] = "͓ǂݎpłB";
+ Text[ korean ] = " ȣǾ ֽϴ.";
+ Text[ chinese_simplified ] = "ʵǷд(ֻȡ)";
+ Text[ chinese_traditional ] = "rOŪC";
+ Text[ arabic ] = " .";
+ Text[ turkish ] = "Szlk yazmaya kar korumaldr.";
+};
+
+ // ********************************************************************** EOF
diff --git a/svx/source/dialog/makefile.mk b/svx/source/dialog/makefile.mk
new file mode 100644
index 000000000000..a7a75661020d
--- /dev/null
+++ b/svx/source/dialog/makefile.mk
@@ -0,0 +1,369 @@
+#*************************************************************************
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.1.1.1 $
+#
+# last change: $Author: hr $ $Date: 2000-09-18 17:01:10 $
+#
+# The Contents of this file are made available subject to the terms of
+# either of the following licenses
+#
+# - GNU Lesser General Public License Version 2.1
+# - Sun Industry Standards Source License Version 1.1
+#
+# Sun Microsystems Inc., October, 2000
+#
+# GNU Lesser General Public License Version 2.1
+# =============================================
+# Copyright 2000 by Sun Microsystems, Inc.
+# 901 San Antonio Road, Palo Alto, CA 94303, USA
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License version 2.1, as published by the Free Software Foundation.
+#
+# This library 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 for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+#
+# Sun Industry Standards Source License Version 1.1
+# =================================================
+# The contents of this file are subject to the Sun Industry Standards
+# Source License Version 1.1 (the "License"); You may not use this file
+# except in compliance with the License. You may obtain a copy of the
+# License at http://www.openoffice.org/license.html.
+#
+# Software provided under this License is provided on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+# WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+# MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+# See the License for the specific provisions governing your rights and
+# obligations concerning the Software.
+#
+# The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+#
+# Copyright: 2000 by Sun Microsystems, Inc.
+#
+# All Rights Reserved.
+#
+# Contributor(s): _______________________________________
+#
+#
+#
+#*************************************************************************
+PRJ=..$/..
+
+PROJECTPCH4DLL=TRUE
+PROJECTPCH=svxpch
+PROJECTPCHSOURCE=$(PRJ)$/util$/svxpch
+
+PRJNAME=svx
+TARGET=dialogs
+AUTOSEG=true
+VERSION=$(UPD)
+
+.IF "$(debug)" != ""
+LINK=n:\bin\optlinks\optlinks
+.ELSE
+OPTLINKS=YES
+.ENDIF
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : svpre.mk
+.INCLUDE : settings.mk
+.INCLUDE : sv.mk
+.INCLUDE : $(PRJ)$/util$/makefile.pmk
+
+.IF "$(GUI)" != "MAC"
+CFLAGS+=-DDG_DLL
+.ELSE
+CFLAGS+=-D DG_DLL
+.ENDIF
+
+# --- Files --------------------------------------------------------
+
+HXX2TARGET= drawdlgs
+HXX2EXT= hxx
+HXX2EXCL= -E:*include*
+HXX2DEPN=\
+ $(INC)$/dlgctrl.hxx \
+ $(INC)$/dlgname.hxx \
+ $(INC)$/tabarea.hxx \
+ $(INC)$/tabline.hxx \
+ $(INC)$/labdlg.hxx \
+ $(INC)$/transfrm.hxx
+
+.IF "$(header)" == ""
+
+IMGLST_SRS=$(SRS)$/dialogs.srs
+BMP_IN=$(PRJ)$/win/res
+
+CXXFILES = \
+ _contdlg.cxx \
+ _bmpmask.cxx \
+ iconcdlg.cxx\
+ ivctrl.cxx\
+ imivctl1.cxx\
+ imivctl2.cxx\
+ contwnd.cxx \
+ ctrdial.cxx\
+ ctredlin.cxx\
+ fontlb.cxx \
+ graphctl.cxx \
+ nforient.cxx\
+ worient.cxx\
+ align.cxx \
+ backgrnd.cxx \
+ bbdlg.cxx \
+ border.cxx \
+ chardlg.cxx \
+ charmap.cxx \
+ checklbx.cxx \
+ connctrl.cxx \
+ connect.cxx \
+ dlgctl3d.cxx \
+ dlgctrl.cxx \
+ dlgname.cxx \
+ dlgutil.cxx \
+ fntctrl.cxx \
+ fontwork.cxx \
+ frmsel.cxx \
+ hdft.cxx \
+ hyperdlg.cxx \
+ hltpbase.cxx\
+ hlinettp.cxx\
+ hlmailtp.cxx\
+ hldoctp.cxx\
+ hldocntp.cxx\
+ hlmarkwn.cxx\
+ hyphen.cxx \
+ imapdlg.cxx \
+ imapwnd.cxx \
+ impgrf.cxx \
+ labdlg.cxx \
+ langbox.cxx \
+ langtab.cxx \
+ linelink.cxx \
+ measctrl.cxx \
+ measure.cxx \
+ dstribut.cxx \
+ numfmt.cxx \
+ numpages.cxx \
+ page.cxx \
+ paragrph.cxx \
+ paraprev.cxx \
+ passwd.cxx \
+ pfiledlg.cxx\
+ prtqry.cxx \
+ postdlg.cxx \
+ relfld.cxx \
+ rlrcitem.cxx \
+ rulritem.cxx \
+ simptabl.cxx \
+ spldlg.cxx \
+ splwrap.cxx \
+ srchctrl.cxx \
+ srchdlg.cxx \
+ srchxtra.cxx \
+ stddlg.cxx \
+ strarray.cxx \
+ svxbox.cxx \
+ svxruler.cxx \
+ tabarea.cxx \
+ tabline.cxx \
+ tabstpge.cxx \
+ textanim.cxx \
+ textattr.cxx \
+ thesdlg.cxx \
+ tp3dattr.cxx \
+ tparea.cxx \
+ tpbitmap.cxx \
+ tpcolor.cxx \
+ tpgradnt.cxx \
+ tphatch.cxx \
+ tpline.cxx \
+ tplnedef.cxx \
+ tplneend.cxx \
+ tpshadow.cxx \
+ transfrm.cxx \
+ zoom.cxx \
+ $(PROJECTPCHSOURCE).cxx
+
+SRS1NAME=dialogs
+SRC1FILES = \
+ connect.src \
+ contdlg.src \
+ ctredlin.src \
+ measure.src \
+ dstribut.src \
+ passwd.src \
+ align.src \
+ backgrnd.src \
+ bbdlg.src \
+ bmpmask.src \
+ border.src \
+ chardlg.src \
+ charmap.src \
+ checklbx.src \
+ fontwork.src \
+ grfpage.src \
+ hdft.src \
+ hyperdlg.src \
+ hlmarkwn.src\
+ hyphen.src \
+ iconcdlg.src \
+ imapdlg.src \
+ impgrf.src \
+ langtab.src \
+ language.src \
+ lingu.src \
+ numfmt.src \
+ numpages.src \
+ page.src \
+ paragrph.src \
+ postdlg.src \
+ prtqry.src \
+ ruler.src \
+ spldlg.src \
+ srchdlg.src \
+ srchxtra.src \
+ tabstpge.src \
+ textanim.src \
+ textattr.src \
+ thesdlg.src \
+ tp3dattr.src \
+ zoom.src \
+ dlgctrl.src
+
+SRS2NAME=drawdlgs
+SRC2FILES = \
+ dlgname.src \
+ sdstring.src \
+ tabarea.src \
+ tabline.src \
+ labdlg.src \
+ transfrm.src
+
+
+SLOFILES=\
+ $(SLO)$/_bmpmask.obj\
+ $(SLO)$/_contdlg.obj\
+ $(SLO)$/iconcdlg.obj\
+ $(SLO)$/ivctrl.obj\
+ $(SLO)$/imivctl1.obj\
+ $(SLO)$/imivctl2.obj\
+ $(SLO)$/connect.obj \
+ $(SLO)$/connctrl.obj \
+ $(SLO)$/contwnd.obj \
+ $(SLO)$/fontlb.obj \
+ $(SLO)$/graphctl.obj \
+ $(SLO)$/hyperdlg.obj \
+ $(SLO)$/hltpbase.obj \
+ $(SLO)$/hlinettp.obj \
+ $(SLO)$/hlmailtp.obj \
+ $(SLO)$/hldoctp.obj \
+ $(SLO)$/hldocntp.obj \
+ $(SLO)$/hlmarkwn.obj \
+ $(SLO)$/imapdlg.obj \
+ $(SLO)$/imapwnd.obj \
+ $(SLO)$/measure.obj \
+ $(SLO)$/dstribut.obj \
+ $(SLO)$/measctrl.obj \
+ $(SLO)$/passwd.obj \
+ $(SLO)$/strarray.obj \
+ $(SLO)$/align.obj \
+ $(SLO)$/backgrnd.obj \
+ $(SLO)$/bbdlg.obj \
+ $(SLO)$/border.obj \
+ $(SLO)$/charmap.obj \
+ $(SLO)$/chardlg.obj \
+ $(SLO)$/checklbx.obj \
+ $(SLO)$/ctrdial.obj \
+ $(SLO)$/ctredlin.obj \
+ $(SLO)$/dlgctrl.obj \
+ $(SLO)$/dlgctl3d.obj \
+ $(SLO)$/dlgname.obj \
+ $(SLO)$/dlgutil.obj \
+ $(SLO)$/fntctrl.obj \
+ $(SLO)$/fontwork.obj \
+ $(SLO)$/frmsel.obj \
+ $(SLO)$/grfpage.obj \
+ $(SLO)$/hdft.obj \
+ $(SLO)$/hyphen.obj \
+ $(SLO)$/impgrf.obj \
+ $(SLO)$/labdlg.obj \
+ $(SLO)$/langtab.obj \
+ $(SLO)$/langbox.obj \
+ $(SLO)$/linelink.obj \
+ $(SLO)$/nforient.obj \
+ $(SLO)$/numfmt.obj \
+ $(SLO)$/numpages.obj \
+ $(SLO)$/page.obj \
+ $(SLO)$/pagectrl.obj \
+ $(SLO)$/paragrph.obj \
+ $(SLO)$/paraprev.obj \
+ $(SLO)$/pfiledlg.obj \
+ $(SLO)$/postdlg.obj \
+ $(SLO)$/prtqry.obj \
+ $(SLO)$/relfld.obj \
+ $(SLO)$/rlrcitem.obj \
+ $(SLO)$/rulritem.obj \
+ $(SLO)$/simptabl.obj \
+ $(SLO)$/spldlg.obj \
+ $(SLO)$/splwrap.obj \
+ $(SLO)$/srchxtra.obj \
+ $(SLO)$/srchctrl.obj \
+ $(SLO)$/srchdlg.obj \
+ $(SLO)$/stddlg.obj \
+ $(SLO)$/svxbox.obj \
+ $(SLO)$/svxruler.obj \
+ $(SLO)$/tabarea.obj \
+ $(SLO)$/tabline.obj \
+ $(SLO)$/tabstpge.obj \
+ $(SLO)$/textattr.obj \
+ $(SLO)$/textanim.obj \
+ $(SLO)$/thesdlg.obj \
+ $(SLO)$/tp3dattr.obj \
+ $(SLO)$/tparea.obj \
+ $(SLO)$/tpbitmap.obj \
+ $(SLO)$/tpcolor.obj \
+ $(SLO)$/tpgradnt.obj \
+ $(SLO)$/tphatch.obj \
+ $(SLO)$/tpline.obj \
+ $(SLO)$/tplneend.obj \
+ $(SLO)$/tplnedef.obj \
+ $(SLO)$/tpshadow.obj \
+ $(SLO)$/transfrm.obj \
+ $(SLO)$/worient.obj \
+ $(SLO)$/zoom.obj
+
+EXCEPTIONSFILES=\
+ $(SLO)$/_bmpmask.obj \
+ $(SLO)$/hldocntp.obj \
+ $(SLO)$/hlmarkwn.obj \
+ $(SLO)$/hyphen.obj \
+ $(SLO)$/thesdlg.obj \
+ $(SLO)$/spldlg.obj \
+ $(SLO)$/splwrap.obj
+
+.IF "$(COM)" == "C50"
+EXCEPTIONSNOOPTFILES=$(SLO)$/impgrf.obj
+.ELSE
+EXCEPTIONSFILES+=$(SLO)$/impgrf.obj
+.ENDIF
+
+.ENDIF
+
+# --- Targets -------------------------------------------------------
+
+.INCLUDE : target.mk
+
diff --git a/svx/source/dialog/measctrl.cxx b/svx/source/dialog/measctrl.cxx
new file mode 100644
index 000000000000..b6d80ee64968
--- /dev/null
+++ b/svx/source/dialog/measctrl.cxx
@@ -0,0 +1,215 @@
+/*************************************************************************
+ *
+ * $RCSfile: measctrl.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:10 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+// include ---------------------------------------------------------------
+
+#pragma hdrstop
+
+#include "xoutx.hxx"
+#include "svdomeas.hxx"
+#include "svdmodel.hxx"
+
+//#include "svdrwobj.hxx" // SdrPaintInfoRec
+
+#include "measctrl.hxx"
+#include "dialmgr.hxx"
+
+/*************************************************************************
+|*
+|* Ctor SvxXMeasurePreview
+|*
+*************************************************************************/
+
+SvxXMeasurePreview::SvxXMeasurePreview
+(
+ Window* pParent,
+ const ResId& rResId,
+ const SfxItemSet& rInAttrs
+) :
+
+ Control ( pParent, rResId ),
+ rAttrs ( rInAttrs )
+
+{
+ pExtOutDev = new ExtOutputDevice( this );
+
+ SetMapMode( MAP_100TH_MM );
+
+ Size aSize = GetOutputSize();
+
+ // Massstab: 1:2
+ MapMode aMapMode = GetMapMode();
+ aMapMode.SetScaleX( Fraction( 1, 2 ) );
+ aMapMode.SetScaleY( Fraction( 1, 2 ) );
+ SetMapMode( aMapMode );
+
+ aSize = GetOutputSize();
+ Rectangle aRect = Rectangle( Point(), aSize );
+ Point aPt1 = Point( aSize.Width() / 5, (long) ( aSize.Height() / 2 ) );
+ Point aPt2 = Point( aSize.Width() * 4 / 5, (long) ( aSize.Height() / 2 ) );
+
+ pMeasureObj = new SdrMeasureObj( aPt1, aPt2 );
+
+ pModel = new SdrModel();
+ pMeasureObj->SetModel( pModel );
+
+ pMeasureObj->SetAttributes( rInAttrs, FALSE );
+
+ Invalidate();
+}
+
+/*************************************************************************
+|*
+|* Dtor SvxXMeasurePreview
+|*
+*************************************************************************/
+
+SvxXMeasurePreview::~SvxXMeasurePreview()
+{
+ delete pExtOutDev;
+ delete pModel;
+}
+
+/*************************************************************************
+|*
+|* SvxXMeasurePreview: Paint()
+|*
+*************************************************************************/
+
+void SvxXMeasurePreview::Paint( const Rectangle& rRect )
+{
+ SdrPaintInfoRec aInfoRec;
+
+ pMeasureObj->Paint( *pExtOutDev, aInfoRec );
+}
+
+/*************************************************************************
+|*
+|* SvxXMeasurePreview: SetAttributes()
+|*
+*************************************************************************/
+
+void SvxXMeasurePreview::SetAttributes( const SfxItemSet& rInAttrs )
+{
+ pMeasureObj->SetAttributes( rInAttrs, FALSE );
+ Invalidate();
+}
+
+/*************************************************************************
+|*
+|* SvxXMeasurePreview: SetAttributes()
+|*
+*************************************************************************/
+
+void SvxXMeasurePreview::MouseButtonDown( const MouseEvent& rMEvt )
+{
+ BOOL bZoomIn = rMEvt.IsLeft() && !rMEvt.IsShift();
+ BOOL bZoomOut = rMEvt.IsRight() || rMEvt.IsShift();
+ BOOL bCtrl = rMEvt.IsMod1();
+
+ if( bZoomIn || bZoomOut )
+ {
+ MapMode aMapMode = GetMapMode();
+ Fraction aXFrac = aMapMode.GetScaleX();
+ Fraction aYFrac = aMapMode.GetScaleY();
+ Fraction* pMultFrac;
+
+ if( bZoomIn )
+ {
+ if( bCtrl )
+ pMultFrac = new Fraction( 3, 2 );
+ else
+ pMultFrac = new Fraction( 11, 10 );
+ }
+ else
+ {
+ if( bCtrl )
+ pMultFrac = new Fraction( 2, 3 );
+ else
+ pMultFrac = new Fraction( 10, 11 );
+ }
+
+ aXFrac *= *pMultFrac;
+ aYFrac *= *pMultFrac;
+ if( (double)aXFrac > 0.001 && (double)aXFrac < 1000.0 &&
+ (double)aYFrac > 0.001 && (double)aYFrac < 1000.0 )
+ {
+ aMapMode.SetScaleX( aXFrac );
+ aMapMode.SetScaleY( aYFrac );
+ SetMapMode( aMapMode );
+
+ Size aOutSize( GetOutputSize() );
+
+ Point aPt( aMapMode.GetOrigin() );
+ long nX = (long)( ( (double)aOutSize.Width() - ( (double)aOutSize.Width() * (double)*pMultFrac ) ) / 2.0 + 0.5 );
+ long nY = (long)( ( (double)aOutSize.Height() - ( (double)aOutSize.Height() * (double)*pMultFrac ) ) / 2.0 + 0.5 );
+ aPt.X() += nX;
+ aPt.Y() += nY;
+
+ aMapMode.SetOrigin( aPt );
+ SetMapMode( aMapMode );
+
+ Invalidate();
+ }
+ delete pMultFrac;
+ }
+}
+
diff --git a/svx/source/dialog/measure.cxx b/svx/source/dialog/measure.cxx
new file mode 100644
index 000000000000..d223fecada69
--- /dev/null
+++ b/svx/source/dialog/measure.cxx
@@ -0,0 +1,854 @@
+/*************************************************************************
+ *
+ * $RCSfile: measure.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:10 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+
+// include ---------------------------------------------------------------
+
+#ifndef _SFXAPP_HXX
+#include <sfx2/app.hxx>
+#endif
+#ifndef _SFXMODULE_HXX
+#include <sfx2/module.hxx>
+#endif
+
+#ifndef _SHL_HXX //autogen
+#include <tools/shl.hxx>
+#endif
+#ifndef _SFX_SAVEOPT_HXX //autogen
+#include <sfx2/saveopt.hxx>
+#endif
+#pragma hdrstop
+
+#include "dialogs.hrc"
+
+#define _SVX_MEASURE_CXX
+
+#include "svdomeas.hxx"
+#include "svdattr.hxx"
+#include "svdattrx.hxx"
+#include "svdview.hxx"
+
+#include "measctrl.hxx"
+#include "measure.hxx"
+#include "measure.hrc"
+#include "dialmgr.hxx"
+#include "dlgutil.hxx"
+#include "strarray.hxx"
+
+
+static USHORT pRanges[] =
+{
+ SDRATTR_MEASURE_FIRST,
+ SDRATTR_MEASURE_LAST,
+ 0
+};
+
+/*************************************************************************
+|*
+|* Dialog to change measure-attributes
+|*
+\************************************************************************/
+
+SvxMeasureDialog::SvxMeasureDialog( Window* pParent, const SfxItemSet& rInAttrs,
+ const SdrView* pSdrView ) :
+ SfxSingleTabDialog( pParent, rInAttrs, RID_SVXPAGE_MEASURE, FALSE )
+{
+ SvxMeasurePage* pPage = new SvxMeasurePage( this, rInAttrs );
+
+ pPage->SetView( pSdrView );
+ pPage->Construct();
+
+ SetTabPage( pPage );
+ SetText( pPage->GetText() );
+}
+
+/*************************************************************************
+|*
+|* Dtor
+|*
+\************************************************************************/
+
+SvxMeasureDialog::~SvxMeasureDialog()
+{
+}
+
+/*************************************************************************
+|*
+|* Tabpage for changing measure-attributes
+|*
+\************************************************************************/
+
+SvxMeasurePage::SvxMeasurePage( Window* pWindow, const SfxItemSet& rInAttrs ) :
+ SvxTabPage ( pWindow, ResId( RID_SVXPAGE_MEASURE, DIALOG_MGR() ),
+ rInAttrs ),
+
+ rOutAttrs ( rInAttrs ),
+ aAttrSet ( *rInAttrs.GetPool() ),
+
+ aFtLineDist ( this, ResId( FT_LINE_DIST ) ),
+ aMtrFldLineDist ( this, ResId( MTR_LINE_DIST ) ),
+ aFtHelplineOverhang ( this, ResId( FT_HELPLINE_OVERHANG ) ),
+ aMtrFldHelplineOverhang ( this, ResId( MTR_FLD_HELPLINE_OVERHANG ) ),
+ aFtHelplineDist ( this, ResId( FT_HELPLINE_DIST ) ),
+ aMtrFldHelplineDist ( this, ResId( MTR_FLD_HELPLINE_DIST ) ),
+ aFtHelpline1Len ( this, ResId( FT_HELPLINE1_LEN ) ),
+ aMtrFldHelpline1Len ( this, ResId( MTR_FLD_HELPLINE1_LEN ) ),
+ aFtHelpline2Len ( this, ResId( FT_HELPLINE2_LEN ) ),
+ aMtrFldHelpline2Len ( this, ResId( MTR_FLD_HELPLINE2_LEN ) ),
+ aTsbBelowRefEdge ( this, ResId( TSB_BELOW_REF_EDGE ) ),
+ aTsbParallel ( this, ResId( TSB_PARALLEL ) ),
+ aTsbShowUnit ( this, ResId( TSB_SHOW_UNIT ) ),
+ aLbUnit ( this, ResId( LB_UNIT ) ),
+ aGrpAttributes ( this, ResId( GRP_ATTRIBUTES ) ),
+
+ aCtlPosition ( this, ResId( CTL_POSITION ),
+ RP_RM, 200, 100, CS_LINE ),
+ aTsbAutoPosV ( this, ResId( TSB_AUTOPOSV ) ),
+ aTsbAutoPosH ( this, ResId( TSB_AUTOPOSH ) ),
+ aGrpPosition ( this, ResId( GRP_POSITION ) ),
+
+ aCtlPreview ( this, ResId( CTL_PREVIEW ), rInAttrs ),
+ aGrpPreview ( this, ResId( GRP_PREVIEW ) ),
+ bPositionModified ( FALSE )
+{
+ FillUnitLB();
+
+ FreeResource();
+
+ FieldUnit eFUnit;
+ GET_MODULE_FIELDUNIT( eFUnit );
+ SetFieldUnit( aMtrFldLineDist, eFUnit );
+ SetFieldUnit( aMtrFldHelplineOverhang, eFUnit );
+ SetFieldUnit( aMtrFldHelplineDist, eFUnit );
+ SetFieldUnit( aMtrFldHelpline1Len, eFUnit );
+ SetFieldUnit( aMtrFldHelpline2Len, eFUnit );
+ if( eFUnit == FUNIT_MM )
+ {
+ aMtrFldLineDist.SetSpinSize( 50 );
+ aMtrFldHelplineOverhang.SetSpinSize( 50 );
+ aMtrFldHelplineDist.SetSpinSize( 50 );
+ aMtrFldHelpline1Len.SetSpinSize( 50 );
+ aMtrFldHelpline2Len.SetSpinSize( 50 );
+ }
+
+ aTsbAutoPosV.SetClickHdl( LINK( this, SvxMeasurePage, ClickAutoPosHdl_Impl ) );
+ aTsbAutoPosH.SetClickHdl( LINK( this, SvxMeasurePage, ClickAutoPosHdl_Impl ) );
+
+ Link aLink( LINK( this, SvxMeasurePage, ChangeAttrHdl_Impl ) );
+ aMtrFldLineDist.SetModifyHdl( aLink );
+ aMtrFldHelplineOverhang.SetModifyHdl( aLink );
+ aMtrFldHelplineDist.SetModifyHdl( aLink );
+ aMtrFldHelpline1Len.SetModifyHdl( aLink );
+ aMtrFldHelpline2Len.SetModifyHdl( aLink );
+ aTsbBelowRefEdge.SetClickHdl( aLink );
+ aTsbParallel.SetClickHdl( aLink );
+ aTsbShowUnit.SetClickHdl( aLink );
+ aLbUnit.SetSelectHdl( aLink );
+}
+
+/*************************************************************************
+|*
+|* Dtor
+|*
+\************************************************************************/
+
+SvxMeasurePage::~SvxMeasurePage()
+{
+}
+
+/*************************************************************************
+|*
+|* read the delivered Item-Set
+|*
+\************************************************************************/
+
+void __EXPORT SvxMeasurePage::Reset( const SfxItemSet& rAttrs )
+{
+ SfxItemPool* pPool = rAttrs.GetPool();
+ DBG_ASSERT( pPool, "Wo ist der Pool" );
+ eUnit = pPool->GetMetric( SDRATTR_MEASURELINEDIST );
+
+ const SfxPoolItem* pItem = GetItem( rAttrs, SDRATTR_MEASURELINEDIST );
+
+ // SdrMeasureLineDistItem
+ if( pItem || (pItem = &pPool->GetDefaultItem( SDRATTR_MEASURELINEDIST )) )
+ {
+ long nValue = ( ( const SdrMeasureLineDistItem* )pItem )->GetValue();
+ SetMetricValue( aMtrFldLineDist, nValue, eUnit );
+ }
+ else
+ {
+ aMtrFldLineDist.SetText( String() );
+ }
+ aMtrFldLineDist.SaveValue();
+
+ // SdrMeasureHelplineOverhangItem
+ pItem = GetItem( rAttrs, SDRATTR_MEASUREHELPLINEOVERHANG );
+ if( pItem || (pItem = &pPool->GetDefaultItem( SDRATTR_MEASUREHELPLINEOVERHANG )))
+ {
+ long nValue = ( ( const SdrMeasureHelplineOverhangItem* )pItem )->GetValue();
+ SetMetricValue( aMtrFldHelplineOverhang, nValue, eUnit );
+ }
+ else
+ {
+ aMtrFldHelplineOverhang.SetText( String() );
+ }
+ aMtrFldHelplineOverhang.SaveValue();
+
+ // SdrMeasureHelplineDistItem
+ pItem = GetItem( rAttrs, SDRATTR_MEASUREHELPLINEDIST );
+ if( pItem || (pItem = &pPool->GetDefaultItem( SDRATTR_MEASUREHELPLINEDIST )))
+ {
+ long nValue = ( ( const SdrMeasureHelplineDistItem* )pItem )->GetValue();
+ SetMetricValue( aMtrFldHelplineDist, nValue, eUnit );
+ }
+ else
+ {
+ aMtrFldHelplineDist.SetText( String() );
+ }
+ aMtrFldHelplineDist.SaveValue();
+
+ // SdrMeasureHelpline1LenItem
+ pItem = GetItem( rAttrs, SDRATTR_MEASUREHELPLINE1LEN );
+ if( pItem || (pItem = &pPool->GetDefaultItem( SDRATTR_MEASUREHELPLINE1LEN )))
+ {
+ long nValue = ( ( const SdrMeasureHelpline1LenItem* )pItem )->GetValue();
+ SetMetricValue( aMtrFldHelpline1Len, nValue, eUnit );
+ }
+ else
+ {
+ aMtrFldHelpline1Len.SetText( String() );
+ }
+ aMtrFldHelpline1Len.SaveValue();
+
+ // SdrMeasureHelpline2LenItem
+ pItem = GetItem( rAttrs, SDRATTR_MEASUREHELPLINE2LEN );
+ if( pItem || (pItem = &pPool->GetDefaultItem( SDRATTR_MEASUREHELPLINE2LEN )))
+ {
+ long nValue = ( ( const SdrMeasureHelpline2LenItem* )pItem )->GetValue();
+ SetMetricValue( aMtrFldHelpline2Len, nValue, eUnit );
+ }
+ else
+ {
+ aMtrFldHelpline2Len.SetText( String() );
+ }
+ aMtrFldHelpline2Len.SaveValue();
+
+ // SdrMeasureBelowRefEdgeItem
+ if( rAttrs.GetItemState( SDRATTR_MEASUREBELOWREFEDGE ) != SFX_ITEM_DONTCARE )
+ {
+ aTsbBelowRefEdge.SetState( ( ( const SdrMeasureBelowRefEdgeItem& )rAttrs.Get( SDRATTR_MEASUREBELOWREFEDGE ) ).
+ GetValue() ? STATE_CHECK : STATE_NOCHECK );
+ aTsbBelowRefEdge.EnableTriState( FALSE );
+ }
+ else
+ {
+ aTsbBelowRefEdge.SetState( STATE_DONTKNOW );
+ }
+ aTsbBelowRefEdge.SaveValue();
+
+ // SdrMeasureTextRota90Item
+ // Attention: negate !
+ if( rAttrs.GetItemState( SDRATTR_MEASURETEXTROTA90 ) != SFX_ITEM_DONTCARE )
+ {
+ aTsbParallel.SetState( ( ( const SdrMeasureTextRota90Item& )rAttrs.Get( SDRATTR_MEASURETEXTROTA90 ) ).
+ GetValue() ? STATE_NOCHECK : STATE_CHECK );
+ aTsbParallel.EnableTriState( FALSE );
+ }
+ else
+ {
+ aTsbParallel.SetState( STATE_DONTKNOW );
+ }
+ aTsbParallel.SaveValue();
+
+ // SdrMeasureShowUnitItem
+ if( rAttrs.GetItemState( SDRATTR_MEASURESHOWUNIT ) != SFX_ITEM_DONTCARE )
+ {
+ aTsbShowUnit.SetState( ( ( const SdrMeasureShowUnitItem& )rAttrs.Get( SDRATTR_MEASURESHOWUNIT ) ).
+ GetValue() ? STATE_CHECK : STATE_NOCHECK );
+ aTsbShowUnit.EnableTriState( FALSE );
+ }
+ else
+ {
+ aTsbShowUnit.SetState( STATE_DONTKNOW );
+ }
+ aTsbShowUnit.SaveValue();
+
+ // SdrMeasureUnitItem
+ if( rAttrs.GetItemState( SDRATTR_MEASUREUNIT ) != SFX_ITEM_DONTCARE )
+ {
+ long nFieldUnit = (long) ( ( const SdrMeasureUnitItem& )rAttrs.
+ Get( SDRATTR_MEASUREUNIT ) ).GetValue();
+
+ for( USHORT i = 0; i < aLbUnit.GetEntryCount(); ++i )
+ {
+ if ( (long)aLbUnit.GetEntryData( i ) == nFieldUnit )
+ {
+ aLbUnit.SelectEntryPos( i );
+ break;
+ }
+ }
+ }
+ else
+ {
+ aLbUnit.SetNoSelection();
+ }
+ aLbUnit.SaveValue();
+
+ // Position
+ if ( rAttrs.GetItemState( SDRATTR_MEASURETEXTVPOS ) != SFX_ITEM_DONTCARE )
+ {
+ SdrMeasureTextVPos eVPos = (SdrMeasureTextVPos)
+ ( ( const SdrMeasureTextVPosItem& )rAttrs.Get( SDRATTR_MEASURETEXTVPOS ) ).GetValue();
+ {
+ if ( rAttrs.GetItemState( SDRATTR_MEASURETEXTHPOS ) != SFX_ITEM_DONTCARE )
+ {
+ aTsbAutoPosV.EnableTriState( FALSE );
+ aTsbAutoPosH.EnableTriState( FALSE );
+
+ SdrMeasureTextHPos eHPos = (SdrMeasureTextHPos)
+ ( ( const SdrMeasureTextHPosItem& )rAttrs.Get( SDRATTR_MEASURETEXTHPOS ) ).GetValue();
+ RECT_POINT eRP = RP_MM;
+ switch( eVPos )
+ {
+ case SDRMEASURE_ABOVE:
+ switch( eHPos )
+ {
+ case SDRMEASURE_TEXTLEFTOUTSIDE: eRP = RP_LT; break;
+ case SDRMEASURE_TEXTINSIDE: eRP = RP_MT; break;
+ case SDRMEASURE_TEXTRIGHTOUTSIDE: eRP = RP_RT; break;
+ case SDRMEASURE_TEXTHAUTO: eRP = RP_MT; break;
+ }
+ break;
+ case SDRMEASURETEXT_VERTICALCENTERED:
+ switch( eHPos )
+ {
+ case SDRMEASURE_TEXTLEFTOUTSIDE: eRP = RP_LM; break;
+ case SDRMEASURE_TEXTINSIDE: eRP = RP_MM; break;
+ case SDRMEASURE_TEXTRIGHTOUTSIDE: eRP = RP_RM; break;
+ case SDRMEASURE_TEXTHAUTO: eRP = RP_MM; break;
+ }
+ break;
+ case SDRMEASURE_BELOW:
+ switch( eHPos )
+ {
+ case SDRMEASURE_TEXTLEFTOUTSIDE: eRP = RP_LB; break;
+ case SDRMEASURE_TEXTINSIDE: eRP = RP_MB; break;
+ case SDRMEASURE_TEXTRIGHTOUTSIDE: eRP = RP_RB; break;
+ case SDRMEASURE_TEXTHAUTO: eRP = RP_MB; break;
+ }
+ break;
+ case SDRMEASURE_TEXTVAUTO:
+ switch( eHPos )
+ {
+ case SDRMEASURE_TEXTLEFTOUTSIDE: eRP = RP_LM; break;
+ case SDRMEASURE_TEXTINSIDE: eRP = RP_MM; break;
+ case SDRMEASURE_TEXTRIGHTOUTSIDE: eRP = RP_RM; break;
+ case SDRMEASURE_TEXTHAUTO: eRP = RP_MM; break;
+ }
+ break;
+ }
+
+ CTL_STATE nState = 0;
+
+ if( eHPos == SDRMEASURE_TEXTHAUTO )
+ {
+ aTsbAutoPosH.SetState( STATE_CHECK );
+ nState = CS_NOHORZ;
+ }
+
+ if( eVPos == SDRMEASURE_TEXTVAUTO )
+ {
+ aTsbAutoPosV.SetState( STATE_CHECK );
+ nState |= CS_NOVERT;
+ }
+
+ aCtlPosition.SetState( nState );
+ aCtlPosition.SetActualRP( eRP );
+ }
+ }
+ }
+ else
+ {
+ aCtlPosition.Reset();
+ aTsbAutoPosV.SetState( STATE_DONTKNOW );
+ aTsbAutoPosH.SetState( STATE_DONTKNOW );
+ }
+
+ // put the attributes to the preview-control,
+ // otherwise the control don't know about
+ // the settings of the dialog (#67930)
+ ChangeAttrHdl_Impl( &aTsbShowUnit );
+ aCtlPreview.SetAttributes( rAttrs );
+
+ bPositionModified = FALSE;
+}
+
+/*************************************************************************
+|*
+|* Fill the delivered Item-Set with dialogbox-attributes
+|*
+\************************************************************************/
+
+BOOL SvxMeasurePage::FillItemSet( SfxItemSet& rAttrs)
+{
+ BOOL bModified = FALSE;
+ INT32 nValue;
+ TriState eState;
+
+ if( aMtrFldLineDist.GetText() != aMtrFldLineDist.GetSavedValue() )
+ {
+ nValue = GetCoreValue( aMtrFldLineDist, eUnit );
+ rAttrs.Put( SdrMeasureLineDistItem( nValue ) );
+ bModified = TRUE;
+ }
+
+ if( aMtrFldHelplineOverhang.GetText() != aMtrFldHelplineOverhang.GetSavedValue() )
+ {
+ nValue = GetCoreValue( aMtrFldHelplineOverhang, eUnit );
+ rAttrs.Put( SdrMeasureHelplineOverhangItem( nValue ) );
+ bModified = TRUE;
+ }
+
+ if( aMtrFldHelplineDist.GetText() != aMtrFldHelplineDist.GetSavedValue() )
+ {
+ nValue = GetCoreValue( aMtrFldHelplineDist, eUnit );
+ rAttrs.Put( SdrMeasureHelplineDistItem( nValue ) );
+ bModified = TRUE;
+ }
+
+ if( aMtrFldHelpline1Len.GetText() != aMtrFldHelpline1Len.GetSavedValue() )
+ {
+ nValue = GetCoreValue( aMtrFldHelpline1Len, eUnit );
+ rAttrs.Put( SdrMeasureHelpline1LenItem( nValue ) );
+ bModified = TRUE;
+ }
+
+ if( aMtrFldHelpline2Len.GetText() != aMtrFldHelpline2Len.GetSavedValue() )
+ {
+ nValue = GetCoreValue( aMtrFldHelpline2Len, eUnit );
+ rAttrs.Put( SdrMeasureHelpline2LenItem( nValue ) );
+ bModified = TRUE;
+ }
+
+ eState = aTsbBelowRefEdge.GetState();
+ if( eState != aTsbBelowRefEdge.GetSavedValue() )
+ {
+ rAttrs.Put( SdrMeasureBelowRefEdgeItem( (BOOL) STATE_CHECK == eState ) );
+ bModified = TRUE;
+ }
+
+ eState = aTsbParallel.GetState();
+ if( eState != aTsbParallel.GetSavedValue() )
+ {
+ rAttrs.Put( SdrMeasureTextRota90Item( (BOOL) STATE_NOCHECK == eState ) );
+ bModified = TRUE;
+ }
+
+ eState = aTsbShowUnit.GetState();
+ if( eState != aTsbShowUnit.GetSavedValue() )
+ {
+ rAttrs.Put( SdrMeasureShowUnitItem( (BOOL) STATE_CHECK == eState ) );
+ bModified = TRUE;
+ }
+
+ USHORT nPos = aLbUnit.GetSelectEntryPos();
+ if( nPos != aLbUnit.GetSavedValue() )
+ {
+ if( nPos != LISTBOX_ENTRY_NOTFOUND )
+ {
+ USHORT nFieldUnit = (USHORT)(long)aLbUnit.GetEntryData( nPos );
+ FieldUnit eUnit = (FieldUnit) nFieldUnit;
+ rAttrs.Put( SdrMeasureUnitItem( eUnit ) );
+ bModified = TRUE;
+ }
+ }
+
+//enum SdrMeasureTextHPos {SDRMEASURE_TEXTHAUTO,SDRMEASURE_TEXTLEFTOUTSIDE,SDRMEASURE_TEXTINSIDE,SDRMEASURE_TEXTRIGHTOUTSIDE};
+//enum SdrMeasureTextVPos {SDRMEASURE_TEXTVAUTO,SDRMEASURE_ABOVE,SDRMEASURETEXT_VERTICALCENTERED,SDRMEASURE_BELOW};
+
+ if( bPositionModified )
+ {
+ // Position
+ SdrMeasureTextVPos eVPos, eOldVPos;
+ SdrMeasureTextHPos eHPos, eOldHPos;
+
+ RECT_POINT eRP = aCtlPosition.GetActualRP();
+ switch( eRP )
+ {
+ case RP_LT: eVPos = SDRMEASURE_ABOVE;
+ eHPos = SDRMEASURE_TEXTLEFTOUTSIDE; break;
+ case RP_LM: eVPos = SDRMEASURETEXT_VERTICALCENTERED;
+ eHPos = SDRMEASURE_TEXTLEFTOUTSIDE; break;
+ case RP_LB: eVPos = SDRMEASURE_BELOW;
+ eHPos = SDRMEASURE_TEXTLEFTOUTSIDE; break;
+ case RP_MT: eVPos = SDRMEASURE_ABOVE;
+ eHPos = SDRMEASURE_TEXTINSIDE; break;
+ case RP_MM: eVPos = SDRMEASURETEXT_VERTICALCENTERED;
+ eHPos = SDRMEASURE_TEXTINSIDE; break;
+ case RP_MB: eVPos = SDRMEASURE_BELOW;
+ eHPos = SDRMEASURE_TEXTINSIDE; break;
+ case RP_RT: eVPos = SDRMEASURE_ABOVE;
+ eHPos = SDRMEASURE_TEXTRIGHTOUTSIDE; break;
+ case RP_RM: eVPos = SDRMEASURETEXT_VERTICALCENTERED;
+ eHPos = SDRMEASURE_TEXTRIGHTOUTSIDE; break;
+ case RP_RB: eVPos = SDRMEASURE_BELOW;
+ eHPos = SDRMEASURE_TEXTRIGHTOUTSIDE; break;
+ }
+ if( aTsbAutoPosH.GetState() == STATE_CHECK )
+ eHPos = SDRMEASURE_TEXTHAUTO;
+
+ if( aTsbAutoPosV.GetState() == STATE_CHECK )
+ eVPos = SDRMEASURE_TEXTVAUTO;
+
+ if ( rAttrs.GetItemState( SDRATTR_MEASURETEXTVPOS ) != SFX_ITEM_DONTCARE )
+ {
+ eOldVPos = (SdrMeasureTextVPos)
+ ( ( const SdrMeasureTextVPosItem& )rOutAttrs.Get( SDRATTR_MEASURETEXTVPOS ) ).GetValue();
+ if( eOldVPos != eVPos )
+ {
+ rAttrs.Put( SdrMeasureTextVPosItem( eVPos ) );
+ bModified = TRUE;
+ }
+ }
+ else
+ {
+ rAttrs.Put( SdrMeasureTextVPosItem( eVPos ) );
+ bModified = TRUE;
+ }
+
+ if ( rAttrs.GetItemState( SDRATTR_MEASURETEXTHPOS ) != SFX_ITEM_DONTCARE )
+ {
+ eOldHPos = (SdrMeasureTextHPos)
+ ( ( const SdrMeasureTextHPosItem& )rOutAttrs.Get( SDRATTR_MEASURETEXTHPOS ) ).GetValue();
+ if( eOldHPos != eHPos )
+ {
+ rAttrs.Put( SdrMeasureTextHPosItem( eHPos ) );
+ bModified = TRUE;
+ }
+ }
+ else
+ {
+ rAttrs.Put( SdrMeasureTextHPosItem( eHPos ) );
+ bModified = TRUE;
+ }
+ }
+
+ return( bModified );
+}
+
+/*************************************************************************
+|*
+|* The View have to set at the measure-object to be able to notify
+|* unit and floatingpoint-values
+|*
+\************************************************************************/
+
+void SvxMeasurePage::Construct()
+{
+ DBG_ASSERT( pView, "Keine gueltige View Uebergeben!" );
+
+ aCtlPreview.pMeasureObj->SetModel( pView->GetModel() );
+ aCtlPreview.Invalidate();
+}
+
+/*************************************************************************
+|*
+|* create the tabpage
+|*
+\************************************************************************/
+
+SfxTabPage* SvxMeasurePage::Create( Window* pWindow,
+ const SfxItemSet& rAttrs )
+{
+ return( new SvxMeasurePage( pWindow, rAttrs ) );
+}
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+USHORT* SvxMeasurePage::GetRanges()
+{
+ return( pRanges );
+}
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+void SvxMeasurePage::PointChanged( Window* pWindow, RECT_POINT eRP )
+{
+ ChangeAttrHdl_Impl( pWindow );
+}
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+IMPL_LINK( SvxMeasurePage, ClickAutoPosHdl_Impl, void *, p )
+{
+ if( aTsbAutoPosH.GetState() == STATE_CHECK )
+ {
+ switch( aCtlPosition.GetActualRP() )
+ {
+ case RP_LT:
+ case RP_RT:
+ aCtlPosition.SetActualRP( RP_MT );
+ break;
+
+ case RP_LM:
+ case RP_RM:
+ aCtlPosition.SetActualRP( RP_MM );
+ break;
+
+ case RP_LB:
+ case RP_RB:
+ aCtlPosition.SetActualRP( RP_MB );
+ break;
+ }
+ }
+ if( aTsbAutoPosV.GetState() == STATE_CHECK )
+ {
+ switch( aCtlPosition.GetActualRP() )
+ {
+ case RP_LT:
+ case RP_LB:
+ aCtlPosition.SetActualRP( RP_LM );
+ break;
+
+ case RP_MT:
+ case RP_MB:
+ aCtlPosition.SetActualRP( RP_MM );
+ break;
+
+ case RP_RT:
+ case RP_RB:
+ aCtlPosition.SetActualRP( RP_RM );
+ break;
+ }
+ }
+ ChangeAttrHdl_Impl( p );
+
+ return( 0L );
+}
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+IMPL_LINK( SvxMeasurePage, ChangeAttrHdl_Impl, void *, p )
+{
+
+ if( p == &aMtrFldLineDist )
+ {
+ INT32 nValue = GetCoreValue( aMtrFldLineDist, eUnit );
+ aAttrSet.Put( SdrMeasureLineDistItem( nValue ) );
+ }
+
+ if( p == &aMtrFldHelplineOverhang )
+ {
+ INT32 nValue = GetCoreValue( aMtrFldHelplineOverhang, eUnit );
+ aAttrSet.Put( SdrMeasureHelplineOverhangItem( nValue) );
+ }
+
+ if( p == &aMtrFldHelplineDist )
+ {
+ INT32 nValue = GetCoreValue( aMtrFldHelplineDist, eUnit );
+ aAttrSet.Put( SdrMeasureHelplineDistItem( nValue) );
+ }
+
+ if( p == &aMtrFldHelpline1Len )
+ {
+ INT32 nValue = GetCoreValue( aMtrFldHelpline1Len, eUnit );
+ aAttrSet.Put( SdrMeasureHelpline1LenItem( nValue ) );
+ }
+
+ if( p == &aMtrFldHelpline2Len )
+ {
+ INT32 nValue = GetCoreValue( aMtrFldHelpline2Len, eUnit );
+ aAttrSet.Put( SdrMeasureHelpline2LenItem( nValue ) );
+ }
+
+ if( p == &aTsbBelowRefEdge )
+ {
+ TriState eState = aTsbBelowRefEdge.GetState();
+ if( eState != STATE_DONTKNOW )
+ aAttrSet.Put( SdrMeasureBelowRefEdgeItem( (BOOL) STATE_CHECK == eState ) );
+ }
+
+ if( p == &aTsbParallel )
+ {
+ TriState eState = aTsbParallel.GetState();
+ if( eState != STATE_DONTKNOW )
+ aAttrSet.Put( SdrMeasureTextRota90Item( (BOOL) !STATE_CHECK == eState ) );
+ }
+
+ if( p == &aTsbShowUnit )
+ {
+ TriState eState = aTsbShowUnit.GetState();
+ if( eState != STATE_DONTKNOW )
+ aAttrSet.Put( SdrMeasureShowUnitItem( (BOOL) STATE_CHECK == eState ) );
+ }
+
+ if( p == &aLbUnit )
+ {
+ USHORT nPos = aLbUnit.GetSelectEntryPos();
+ if( nPos != LISTBOX_ENTRY_NOTFOUND )
+ {
+ USHORT nFieldUnit = (USHORT)(long)aLbUnit.GetEntryData( nPos );
+ FieldUnit eUnit = (FieldUnit) nFieldUnit;
+ aAttrSet.Put( SdrMeasureUnitItem( eUnit ) );
+ }
+ }
+
+ if( p == &aTsbAutoPosV || p == &aTsbAutoPosH || p == &aCtlPosition )
+ {
+ bPositionModified = TRUE;
+
+ // Position
+ RECT_POINT eRP = aCtlPosition.GetActualRP();
+ SdrMeasureTextVPos eVPos;
+ SdrMeasureTextHPos eHPos;
+
+ switch( eRP )
+ {
+ case RP_LT: eVPos = SDRMEASURE_ABOVE;
+ eHPos = SDRMEASURE_TEXTLEFTOUTSIDE; break;
+ case RP_LM: eVPos = SDRMEASURETEXT_VERTICALCENTERED;
+ eHPos = SDRMEASURE_TEXTLEFTOUTSIDE; break;
+ case RP_LB: eVPos = SDRMEASURE_BELOW;
+ eHPos = SDRMEASURE_TEXTLEFTOUTSIDE; break;
+ case RP_MT: eVPos = SDRMEASURE_ABOVE;
+ eHPos = SDRMEASURE_TEXTINSIDE; break;
+ case RP_MM: eVPos = SDRMEASURETEXT_VERTICALCENTERED;
+ eHPos = SDRMEASURE_TEXTINSIDE; break;
+ case RP_MB: eVPos = SDRMEASURE_BELOW;
+ eHPos = SDRMEASURE_TEXTINSIDE; break;
+ case RP_RT: eVPos = SDRMEASURE_ABOVE;
+ eHPos = SDRMEASURE_TEXTRIGHTOUTSIDE; break;
+ case RP_RM: eVPos = SDRMEASURETEXT_VERTICALCENTERED;
+ eHPos = SDRMEASURE_TEXTRIGHTOUTSIDE; break;
+ case RP_RB: eVPos = SDRMEASURE_BELOW;
+ eHPos = SDRMEASURE_TEXTRIGHTOUTSIDE; break;
+ }
+
+ CTL_STATE nState = 0;
+
+ if( aTsbAutoPosH.GetState() == STATE_CHECK )
+ {
+ eHPos = SDRMEASURE_TEXTHAUTO;
+ nState = CS_NOHORZ;
+ }
+
+ if( aTsbAutoPosV.GetState() == STATE_CHECK )
+ {
+ eVPos = SDRMEASURE_TEXTVAUTO;
+ nState |= CS_NOVERT;
+ }
+
+ if( p == &aTsbAutoPosV || p == &aTsbAutoPosH )
+ aCtlPosition.SetState( nState );
+
+ aAttrSet.Put( SdrMeasureTextVPosItem( eVPos ) );
+ aAttrSet.Put( SdrMeasureTextHPosItem( eHPos ) );
+ }
+
+ aCtlPreview.SetAttributes( aAttrSet );
+ aCtlPreview.Invalidate();
+
+ return( 0L );
+}
+
+/*************************************************************************
+|*
+|*
+|*
+\************************************************************************/
+
+void SvxMeasurePage::FillUnitLB()
+{
+ // fill ListBox with metrics
+ SvxStringArray aMetricArr( RID_SVXSTR_FIELDUNIT_TABLE );
+
+ long nUnit = FUNIT_NONE;
+ String aStrMetric( ResId( STR_MEASURE_AUTOMATIC ) );
+ USHORT nPos = aLbUnit.InsertEntry( aStrMetric );
+ aLbUnit.SetEntryData( nPos, (void*)nUnit );
+
+ for( USHORT i = 0; i < aMetricArr.Count(); ++i )
+ {
+ aStrMetric = aMetricArr.GetStringByPos( i );
+ nUnit = aMetricArr.GetValue( i );
+ nPos = aLbUnit.InsertEntry( aStrMetric );
+ aLbUnit.SetEntryData( nPos, (void*)nUnit );
+ }
+}
+
+
diff --git a/svx/source/dialog/measure.hrc b/svx/source/dialog/measure.hrc
new file mode 100644
index 000000000000..4fcbab81f331
--- /dev/null
+++ b/svx/source/dialog/measure.hrc
@@ -0,0 +1,83 @@
+/*************************************************************************
+ *
+ * $RCSfile: measure.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:10 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#define FT_LINE_DIST 1
+#define FT_HELPLINE_OVERHANG 2
+#define FT_HELPLINE_DIST 3
+#define FT_HELPLINE1_LEN 4
+#define FT_HELPLINE2_LEN 5
+#define MTR_LINE_DIST 1
+#define MTR_FLD_HELPLINE_OVERHANG 2
+#define MTR_FLD_HELPLINE_DIST 3
+#define MTR_FLD_HELPLINE1_LEN 4
+#define MTR_FLD_HELPLINE2_LEN 5
+#define TSB_BELOW_REF_EDGE 1
+#define TSB_SHOW_UNIT 2
+#define TSB_AUTOPOSV 3
+#define TSB_AUTOPOSH 4
+#define TSB_PARALLEL 5
+#define CTL_POSITION 1
+#define CTL_PREVIEW 2
+#define LB_UNIT 1
+#define GRP_ATTRIBUTES 1
+#define GRP_POSITION 2
+#define GRP_PREVIEW 3
+
+#define STR_MEASURE_AUTOMATIC 1
diff --git a/svx/source/dialog/measure.src b/svx/source/dialog/measure.src
new file mode 100644
index 000000000000..abea277db421
--- /dev/null
+++ b/svx/source/dialog/measure.src
@@ -0,0 +1,568 @@
+/*************************************************************************
+ *
+ * $RCSfile: measure.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:10 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+ // include ---------------------------------------------------------------
+#include "dialogs.hrc"
+#include "measure.hrc"
+#include "helpid.hrc"
+#define DELTA 20
+ // pragma ----------------------------------------------------------------
+
+ // RID_SVXPAGE_MEASURE ---------------------------------------------------
+TabPage RID_SVXPAGE_MEASURE
+{
+ HelpId = HID_PAGE_MEASURE ;
+ Hide = TRUE ;
+ Size = MAP_APPFONT ( 260 , 135 ) ;
+ Text = "Bemaung" ;
+ Text [ ENGLISH ] = "Measure" ;
+ Text [ english_us ] = "Dimensioning" ;
+ Text [ italian ] = "Quotatura" ;
+ Text [ spanish ] = "Dimensionar" ;
+ Text [ french ] = "Cotation" ;
+ Text [ dutch ] = "Afmetingen" ;
+ Text [ swedish ] = "Dimensionering" ;
+ Text [ danish ] = "Dimensionering" ;
+ Text [ portuguese_brazilian ] = "Bemaung" ;
+ Text [ portuguese ] = "Dimensionar" ;
+ FixedText FT_LINE_DIST
+ {
+ Pos = MAP_APPFONT ( 12 , 17 ) ;
+ Size = MAP_APPFONT ( 60 + DELTA , 10 ) ;
+ Text = "L~iniendistanz" ;
+ Text [ ENGLISH ] = "L~ine distance" ;
+ Text [ english_us ] = "Line ~distance" ;
+ Text [ italian ] = "~Distanza linee" ;
+ Text [ spanish ] = "D~istancia entre lneas" ;
+ Text [ french ] = "cart des l~ignes" ;
+ Text [ dutch ] = "~Lijnafstand" ;
+ Text [ swedish ] = "L~injeavstnd" ;
+ Text [ danish ] = "Linjeafstand" ;
+ Text [ portuguese_brazilian ] = "L~iniendistanz" ;
+ Text [ portuguese ] = "~Espao entre linhas" ;
+ Text[ chinese_simplified ] = "(~D)";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Odlego linii pomocniczych";
+ Text[ japanese ] = "̊Ԋu(~D)";
+ Text[ chinese_traditional ] = "uj(~D)";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " Ÿ(~D)";
+ Text[ turkish ] = "~Nesneye uzaklk";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField MTR_LINE_DIST
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 75 + DELTA , 15 ) ;
+ Size = MAP_APPFONT ( 45 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Unit = FUNIT_MM ;
+ DecimalDigits = 2 ;
+ Minimum = -10000 ;
+ First = -10000 ;
+ Maximum = 10000 ;
+ Last = 10000 ;
+ SpinSize = 10 ;
+ };
+ FixedText FT_HELPLINE_OVERHANG
+ {
+ Pos = MAP_APPFONT ( 12 , 31 ) ;
+ Size = MAP_APPFONT ( 60 + DELTA , 10 ) ;
+ Text = "Hilfslinien~berhang" ;
+ Text [ ENGLISH ] = "Helpline ~overhang" ;
+ Text [ english_us ] = "Guide ~overhang" ;
+ Text [ italian ] = "Sporgimento linee guida" ;
+ Text [ spanish ] = "Guas ~sobresalientes" ;
+ Text [ french ] = "D~passement des repres" ;
+ Text [ dutch ] = "Hulplijn ~overhangend" ;
+ Text [ swedish ] = "Hjlplinje~verhng" ;
+ Text [ danish ] = "Hjlpelinjeoverhng" ;
+ Text [ portuguese_brazilian ] = "Hilfslinien~berhang" ;
+ Text [ portuguese ] = "Linhas auxiliares realadas" ;
+ Text[ chinese_simplified ] = "ӳ(~O)";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Nawis linii pomocniczych";
+ Text[ japanese ] = "⏕̒o(~O)";
+ Text[ chinese_traditional ] = "Uu(~O)";
+ Text[ arabic ] = " ";
+ Text[ greek ] = "~ ";
+ Text[ korean ] = "ȳ (~O)";
+ Text[ turkish ] = "Klavuz izgi ~tamas";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField MTR_FLD_HELPLINE_OVERHANG
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 75 + DELTA , 29 ) ;
+ Size = MAP_APPFONT ( 45 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Unit = FUNIT_MM ;
+ DecimalDigits = 2 ;
+ Minimum = -10000 ;
+ First = -10000 ;
+ Maximum = 10000 ;
+ Last = 10000 ;
+ SpinSize = 10 ;
+ };
+ FixedText FT_HELPLINE_DIST
+ {
+ Pos = MAP_APPFONT ( 12 , 45 ) ;
+ Size = MAP_APPFONT ( 60 + DELTA , 10 ) ;
+ Text = "Hilfslinien~distanz" ;
+ Text [ ENGLISH ] = "Helpline ~distance" ;
+ Text [ english_us ] = "~Guide distance" ;
+ Text [ italian ] = "D~istanza linee guida" ;
+ Text [ spanish ] = "~Distancia entre guas" ;
+ Text [ french ] = "~cart des repres" ;
+ Text [ dutch ] = "Afstand ~hulplijnen" ;
+ Text [ swedish ] = "Hjlplinjeavstn~d" ;
+ Text [ danish ] = "Hjlpelinjeafstand" ;
+ Text [ portuguese_brazilian ] = "Hilfslinien~distanz" ;
+ Text [ portuguese ] = "Esp. entre linhas auxiliares" ;
+ Text[ chinese_simplified ] = "߼(~G)";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Odlego linii pomocniczych";
+ Text[ japanese ] = "⏕̋(~G)";
+ Text[ chinese_traditional ] = "Uuj(~G)";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = "ȳ Ÿ(~G)";
+ Text[ turkish ] = "Klavuz izgi uzakl~";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField MTR_FLD_HELPLINE_DIST
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 75 + DELTA , 43 ) ;
+ Size = MAP_APPFONT ( 45 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Unit = FUNIT_MM ;
+ DecimalDigits = 2 ;
+ Minimum = -10000 ;
+ First = -10000 ;
+ Maximum = 10000 ;
+ Last = 10000 ;
+ SpinSize = 10 ;
+ };
+ FixedText FT_HELPLINE1_LEN
+ {
+ Pos = MAP_APPFONT ( 12 , 59 ) ;
+ Size = MAP_APPFONT ( 60 + DELTA , 10 ) ;
+ Text = "~Linke Hilfslinie" ;
+ Text [ ENGLISH ] = "~Left helpline" ;
+ Text [ english_us ] = "~Left guide" ;
+ Text [ italian ] = "Linea ausiliaria sinitra" ;
+ Text [ spanish ] = "Lnea auxiliar i~zquierda" ;
+ Text [ french ] = "Repre ~gauche" ;
+ Text [ dutch ] = "Linker h~ulplijn" ;
+ Text [ swedish ] = "Vnster hjlp~linje" ;
+ Text [ danish ] = "Venstre hjlpelinje" ;
+ Text [ portuguese_brazilian ] = "~Linke Hilfslinie" ;
+ Text [ portuguese ] = "Guia ~esquerda" ;
+ Text[ chinese_simplified ] = "(~L)";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Lewa linia pomocnicza";
+ Text[ japanese ] = "̕⏕(~L)";
+ Text[ chinese_traditional ] = "Uu(~L)";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ȳ(~L)";
+ Text[ turkish ] = "~Sol klavuz izgi";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField MTR_FLD_HELPLINE1_LEN
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 75 + DELTA , 57 ) ;
+ Size = MAP_APPFONT ( 45 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Unit = FUNIT_MM ;
+ DecimalDigits = 2 ;
+ Minimum = -10000 ;
+ First = -10000 ;
+ Maximum = 10000 ;
+ Last = 10000 ;
+ SpinSize = 10 ;
+ };
+ FixedText FT_HELPLINE2_LEN
+ {
+ Pos = MAP_APPFONT ( 12 , 73 ) ;
+ Size = MAP_APPFONT ( 60 + DELTA , 10 ) ;
+ Text = "~Rechte Hilfslinie" ;
+ Text [ ENGLISH ] = "~Right helpline" ;
+ Text [ english_us ] = "~Right guide" ;
+ Text [ italian ] = "Linea ausiliaria destra" ;
+ Text [ spanish ] = "Lnea au~xiliar derecha" ;
+ Text [ french ] = "Repre ~droit" ;
+ Text [ dutch ] = "~Rechter hulplijn" ;
+ Text [ swedish ] = "Hge~r hjlplinje" ;
+ Text [ danish ] = "Hjre hjlpelinje" ;
+ Text [ portuguese_brazilian ] = "~Rechte Hilfslinie" ;
+ Text [ portuguese ] = "Guia ~direita" ;
+ Text[ chinese_simplified ] = "Ҹ(~R)";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Prawa linia pomocnicza";
+ Text[ japanese ] = "E̕⏕(~R)";
+ Text[ chinese_traditional ] = "kUu(~R)";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ȳ(~R)";
+ Text[ turkish ] = "Sa~ klavuz izgi";
+ Text[ language_user1 ] = " ";
+ };
+ MetricField MTR_FLD_HELPLINE2_LEN
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 75 + DELTA , 71 ) ;
+ Size = MAP_APPFONT ( 45 , 12 ) ;
+ TabStop = TRUE ;
+ Repeat = TRUE ;
+ Spin = TRUE ;
+ Unit = FUNIT_MM ;
+ DecimalDigits = 2 ;
+ Minimum = -10000 ;
+ First = -10000 ;
+ Maximum = 10000 ;
+ Last = 10000 ;
+ SpinSize = 10 ;
+ };
+ TriStateBox TSB_SHOW_UNIT
+ {
+ Pos = MAP_APPFONT ( 12 , 88 ) ;
+ Size = MAP_APPFONT ( 62 + DELTA , 10 ) ;
+ TabStop = TRUE ;
+ Text = "~Metrik anzeigen" ;
+ Text [ ENGLISH ] = "Show ~Metric" ;
+ Text [ dutch ] = "Weergave ~metriek" ;
+ Text [ english_us ] = "Show ~meas. units" ;
+ Text [ italian ] = "~Mostra la metrica" ;
+ Text [ spanish ] = "~Mostrar mtrica" ;
+ Text [ french ] = "Afficher l'~unit" ;
+ Text [ swedish ] = "Visa ~metrik" ;
+ Text [ danish ] = "Vis metrik" ;
+ Text [ portuguese ] = "Mostrar ~mtrica" ;
+ Text [ portuguese_brazilian ] = "~Metrik anzeigen" ;
+ Text[ chinese_simplified ] = "ʾ(~M)";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Poka metryk";
+ Text[ japanese ] = "Pʂ\\(~M)";
+ Text[ chinese_traditional ] = "ܤ(~M)";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ǥ(~M)";
+ Text[ turkish ] = "~lm birimlerini grntle";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_UNIT
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 75 + DELTA , 85 ) ;
+ Size = MAP_APPFONT ( 45 , 80 ) ;
+ TabStop = TRUE ;
+ DropDown = TRUE ;
+ DDExtraWidth = TRUE ;
+ };
+ TriStateBox TSB_BELOW_REF_EDGE
+ {
+ Pos = MAP_APPFONT ( 12 , 100 ) ;
+ Size = MAP_APPFONT ( 80 + DELTA , 10 ) ;
+ TabStop = TRUE ;
+ Text = "Anzeige ~unterhalb" ;
+ Text [ ENGLISH ] = "~Below reference edge" ;
+ Text [ dutch ] = "~Weergave onder" ;
+ Text [ english_us ] = "~Below reference edge" ;
+ Text [ italian ] = "Mostra in basso" ;
+ Text [ spanish ] = "Mostrar ~abajo" ;
+ Text [ french ] = "Afficher ~en dessous" ;
+ Text [ swedish ] = "Visning ~nedanfr" ;
+ Text [ danish ] = "Vis nedenfor" ;
+ Text [ portuguese ] = "Mostrar ~abaixo" ;
+ Text [ portuguese_brazilian ] = "Anzeige ~unterhalb" ;
+ Text[ chinese_simplified ] = "·ʾ(~B)";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Poka poniej";
+ Text[ japanese ] = "ɕ\\(~B)";
+ Text[ chinese_traditional ] = "U(~B)";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = "Ʒ ǥ(~B)";
+ Text[ turkish ] = "Altta ~grntle";
+ Text[ language_user1 ] = " ";
+ };
+ TriStateBox TSB_PARALLEL
+ {
+ Pos = MAP_APPFONT ( 12 , 112 ) ;
+ Size = MAP_APPFONT ( 80 + DELTA , 10 ) ;
+ TabStop = TRUE ;
+ Text = "Anzeige ~parallel" ;
+ Text [ ENGLISH ] = "~parallel" ;
+ Text [ dutch ] = "Weergave ~parallel" ;
+ Text [ english_us ] = "~Parallel" ;
+ Text [ italian ] = "Mostra ~parallelamente" ;
+ Text [ spanish ] = "M~ostrar paralelamente" ;
+ Text [ french ] = "Affichage ~parallle" ;
+ Text [ swedish ] = "Visning ~parallellt" ;
+ Text [ danish ] = "Vis parallelt" ;
+ Text [ portuguese ] = "Paralelamente" ;
+ Text [ portuguese_brazilian ] = "Anzeige ~parallel" ;
+ Text[ chinese_simplified ] = "ƽʾ(~P)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Poka rwnolegle";
+ Text[ japanese ] = "sɕ\\(~P)";
+ Text[ chinese_traditional ] = "(~P)";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ǥ(~P)";
+ Text[ turkish ] = "Paralel ~grntle";
+ Text[ language_user1 ] = " ";
+ };
+ GroupBox GRP_ATTRIBUTES
+ {
+ Pos = MAP_APPFONT ( 6 , 6 ) ;
+ Size = MAP_APPFONT ( 122 + DELTA , 123 ) ;
+ Text = "Attribute" ;
+ Text [ ENGLISH ] = "Attributes" ;
+ Text [ dutch ] = "Attributen" ;
+ Text [ english_us ] = "Attributes" ;
+ Text [ italian ] = "Attributi" ;
+ Text [ spanish ] = "Atributos" ;
+ Text [ french ] = "Attributs" ;
+ Text [ swedish ] = "Attribut" ;
+ Text [ danish ] = "Attributter" ;
+ Text [ portuguese_brazilian ] = "Attribute" ;
+ Text [ portuguese ] = "Atributos" ;
+ Text[ chinese_simplified ] = "";
+ Text[ russian ] = "";
+ Text[ polish ] = "Atrybuty";
+ Text[ japanese ] = "";
+ Text[ chinese_traditional ] = "ݩ";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "Ӽ";
+ Text[ turkish ] = "znitelikler";
+ Text[ language_user1 ] = " ";
+ };
+ Control CTL_POSITION
+ {
+ HelpId = HID_MEASURE_CTL_POSITION ;
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 140 + DELTA , 17 ) ;
+ Size = MAP_APPFONT ( 108 - DELTA , 26 ) ;
+ TabStop = TRUE ;
+ };
+ TriStateBox TSB_AUTOPOSV
+ {
+ Pos = MAP_APPFONT ( 140 + DELTA , 46 ) ;
+ Size = MAP_APPFONT ( 120 , 10 ) ;
+ TabStop = TRUE ;
+ Text = "~Automatisch Vertikal" ;
+ Text [ ENGLISH ] = "~Automatic vertical" ;
+ Text [ english_us ] = "~AutoVertical" ;
+ Text[ portuguese ] = "~Vertical autom.";
+ Text[ russian ] = "~. ";
+ Text[ greek ] = " ";
+ Text[ dutch ] = "~Automatisch verticaal";
+ Text[ french ] = "~Automatiquement vertical";
+ Text[ spanish ] = "~Vertical automticamente";
+ Text[ italian ] = "Verticale ~autom.";
+ Text[ danish ] = "Automatisk lodret";
+ Text[ swedish ] = "Automatiskt vertikal";
+ Text[ polish ] = "Automatycznie pionowo";
+ Text[ portuguese_brazilian ] = "~Automatic vertical";
+ Text[ japanese ] = "Iɏc(~A)";
+ Text[ korean ] = "ڵ (~A)";
+ Text[ chinese_simplified ] = "Զֱ(~A)";
+ Text[ chinese_traditional ] = "۰ʫ(~A)";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "~Otomatik dikey";
+ Text[ language_user1 ] = " ";
+ };
+ TriStateBox TSB_AUTOPOSH
+ {
+ Pos = MAP_APPFONT ( 140 + DELTA , 59 ) ;
+ Size = MAP_APPFONT ( 120 , 10 ) ;
+ TabStop = TRUE ;
+ Text = "~Automatisch Horizontal" ;
+ Text [ ENGLISH ] = "~Automatic horizontal" ;
+ Text [ english_us ] = "A~utoHorizontal" ;
+ Text[ portuguese ] = "~Horizontal autom.";
+ Text[ russian ] = ". ";
+ Text[ greek ] = " ";
+ Text[ dutch ] = "~Automatisch horizontaal";
+ Text[ french ] = "~Automatiquement horizontal";
+ Text[ spanish ] = "~Horizontal automticamente";
+ Text[ italian ] = "~Orizzontale automat.";
+ Text[ danish ] = "Automatisk vandret";
+ Text[ swedish ] = "Automatiskt horisontal";
+ Text[ polish ] = "Automatycznie poziomo";
+ Text[ portuguese_brazilian ] = "~Automatic horizontal";
+ Text[ japanese ] = "Iɉ(~H)";
+ Text[ korean ] = "ڵ (~U)";
+ Text[ chinese_simplified ] = "Զˮƽ(~H)";
+ Text[ chinese_traditional ] = "۰ʤ(~H)";
+ Text[ arabic ] = " ";
+ Text[ turkish ] = "O~tomatik yatay";
+ Text[ language_user1 ] = " ";
+ };
+ GroupBox GRP_POSITION
+ {
+ Pos = MAP_APPFONT ( 134 + DELTA , 6 ) ;
+ Size = MAP_APPFONT ( 120 - DELTA , 68 ) ;
+ Text = "Textposition" ;
+ Text [ ENGLISH ] = "Text position" ;
+ Text [ dutch ] = "Tekstpositie" ;
+ Text [ english_us ] = "Text position" ;
+ Text [ italian ] = "Posizione testo" ;
+ Text [ spanish ] = "Posicin del texto" ;
+ Text [ french ] = "Position du texte" ;
+ Text [ swedish ] = "Textposition" ;
+ Text [ danish ] = "Tekstplacering" ;
+ Text [ portuguese_brazilian ] = "Textposition" ;
+ Text [ portuguese ] = "Posio do texto" ;
+ Text[ chinese_simplified ] = "λ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Pozycja tekstu";
+ Text[ japanese ] = "÷Ă̈ʒu";
+ Text[ chinese_traditional ] = "rm";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = "ؽƮ ġ";
+ Text[ turkish ] = "Metin konumu";
+ Text[ language_user1 ] = " ";
+ };
+ Control CTL_PREVIEW
+ {
+ HelpId = HID_MEASURE_CTL_PREVIEW ;
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 140 + DELTA , 87 ) ;
+ Size = MAP_APPFONT ( 108 - DELTA , 37 ) ;
+ TabStop = TRUE ;
+ };
+ GroupBox GRP_PREVIEW
+ {
+ Pos = MAP_APPFONT ( 134 + DELTA , 77 ) ;
+ Size = MAP_APPFONT ( 120 - DELTA , 52 ) ;
+ Text = "Vorschau" ;
+ Text [ ENGLISH ] = "Preview" ;
+ Text [ english_us ] = "Preview" ;
+ Text [ italian ] = "Anteprima" ;
+ Text [ spanish ] = "Previsualizacin" ;
+ Text [ french ] = "Aperu" ;
+ Text [ dutch ] = "Voorbeeld" ;
+ Text [ swedish ] = "Frhandsvisning" ;
+ Text [ danish ] = "Eksempel" ;
+ Text [ portuguese_brazilian ] = "Vorschau" ;
+ Text [ portuguese ] = "Previsualizar" ;
+ Text[ chinese_simplified ] = "Ԥ";
+ Text[ russian ] = "";
+ Text[ polish ] = "Podgld";
+ Text[ japanese ] = "ޭ";
+ Text[ chinese_traditional ] = "w";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "̸ ";
+ Text[ turkish ] = "nizleme";
+ Text[ language_user1 ] = " ";
+ };
+ String STR_MEASURE_AUTOMATIC
+ {
+ Text = "Automatisch" ;
+ Text [ ENGLISH ] = "Automatic" ;
+ Text [ english_us ] = "Automatic" ;
+ Text [ swedish ] = "Automatiskt" ;
+ Text [ danish ] = "Automatisk" ;
+ Text [ italian ] = "Automatico" ;
+ Text [ spanish ] = "Automtico" ;
+ Text [ french ] = "Automatique" ;
+ Text [ dutch ] = "Automatisch" ;
+ Text [ portuguese_brazilian ] = "Automatisch" ;
+ Text [ portuguese ] = "Automaticamente" ;
+ Text[ chinese_simplified ] = "Զ";
+ Text[ russian ] = "";
+ Text[ polish ] = "Automatycznie";
+ Text[ japanese ] = "I";
+ Text[ chinese_traditional ] = "۰";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "ڵ";
+ Text[ turkish ] = "Otomatik";
+ Text[ language_user1 ] = " ";
+ };
+ Text[ chinese_simplified ] = "ߴ";
+ Text[ russian ] = "";
+ Text[ polish ] = "Wymiary";
+ Text[ japanese ] = "@L";
+ Text[ chinese_traditional ] = "wؤo";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "ġ";
+ Text[ turkish ] = "Boyutlar";
+ Text[ language_user1 ] = " ";
+};
+ // ********************************************************************** EOF
diff --git a/svx/source/dialog/numfmt.cxx b/svx/source/dialog/numfmt.cxx
new file mode 100644
index 000000000000..3b0355064138
--- /dev/null
+++ b/svx/source/dialog/numfmt.cxx
@@ -0,0 +1,1904 @@
+/*************************************************************************
+ *
+ * $RCSfile: numfmt.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:10 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+// include ---------------------------------------------------------------
+
+#ifndef _SFXENUMITEM_HXX //autogen
+#include <svtools/eitem.hxx>
+#endif
+#ifndef _SFXINTITEM_HXX //autogen
+#include <svtools/intitem.hxx>
+#endif
+#ifndef _SFX_OBJSH_HXX //autogen
+#include <sfx2/objsh.hxx>
+#endif
+#ifndef _SV_SVAPP_HXX //autogen
+#include <vcl/svapp.hxx>
+#endif
+#pragma hdrstop
+
+#define _SVSTDARR_STRINGS
+#define _SVSTDARR_STRINGSDTOR
+#include <svtools/svstdarr.hxx>
+
+#define _SVX_NUMFMT_CXX
+
+#include "dialogs.hrc"
+#include "numfmt.hrc"
+
+#define ITEMID_NUMBERINFO 0
+#include "numinf.hxx"
+
+#include "numfmt.hxx"
+#include "numfmtsh.hxx"
+#include "dialmgr.hxx"
+
+#define NUMKEY_UNDEFINED ULONG_MAX
+
+// static ----------------------------------------------------------------
+
+static USHORT pRanges[] =
+{
+ SID_ATTR_NUMBERFORMAT_VALUE,
+ SID_ATTR_NUMBERFORMAT_INFO,
+ SID_ATTR_NUMBERFORMAT_NOLANGUAGE,
+ SID_ATTR_NUMBERFORMAT_NOLANGUAGE,
+ 0
+};
+
+/*************************************************************************
+#* Methode: SvxNumberPreviewImpl Datum:02.10.97
+#*------------------------------------------------------------------------
+#*
+#* Klasse: SvxNumberPreview
+#*
+#* Funktion: Konstruktor der Klasse SvxNumberPreviewImpl
+#*
+#* Input: Fenster, Resource-ID
+#*
+#* Output: ---
+#*
+#************************************************************************/
+
+SvxNumberPreviewImpl::SvxNumberPreviewImpl( Window* pParent, const ResId& rResId ) :
+
+ Window( pParent, rResId )
+
+{
+ Font aFont( GetFont() );
+ aFont.SetTransparent( TRUE );
+ aFont.SetColor( Application::GetSettings().GetStyleSettings().GetFieldColor() );
+ SetFont( aFont );
+ InitSettings( TRUE, TRUE );
+}
+
+/*************************************************************************
+#* Methode: SvxNumberPreviewImpl Datum:02.10.97
+#*------------------------------------------------------------------------
+#*
+#* Klasse: SvxNumberPreview
+#*
+#* Funktion: Destruktor der Klasse SvxNumberPreviewImpl
+#*
+#* Input: ---
+#*
+#* Output: ---
+#*
+#************************************************************************/
+
+SvxNumberPreviewImpl::~SvxNumberPreviewImpl()
+{
+}
+
+/*************************************************************************
+#* Methode: NotifyChange Datum:02.10.97
+#*------------------------------------------------------------------------
+#*
+#* Klasse: SvxNumberPreviewImpl
+#*
+#* Funktion: Funktion fuer das Aendern des Preview- Strings
+#*
+#* Input: String, Farbe
+#*
+#* Output: ---
+#*
+#************************************************************************/
+
+void SvxNumberPreviewImpl::NotifyChange( const String& rPrevStr,
+ const Color& rColor )
+{
+ aPrevStr = rPrevStr;
+ aPrevCol = rColor;
+ Invalidate();
+ Update();
+}
+
+/*************************************************************************
+#* Methode: Paint Datum:02.10.97
+#*------------------------------------------------------------------------
+#*
+#* Klasse: SvxNumberPreviewImpl
+#*
+#* Funktion: Funktion fuer das neu zeichnen des Fensters.
+#*
+#* Input: ---
+#*
+#* Output: ---
+#*
+#************************************************************************/
+
+void SvxNumberPreviewImpl::Paint( const Rectangle& rRect )
+{
+ Font aDrawFont = GetFont();
+ Size aSzWnd = GetSizePixel();
+ Point aPosText = Point( (aSzWnd.Width() - GetTextWidth( aPrevStr )) /2,
+ (aSzWnd.Height() - GetTextHeight())/2 );
+
+ aDrawFont.SetColor( aPrevCol );
+ SetFont( aDrawFont );
+ DrawText( aPosText, aPrevStr );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxNumberPreviewImpl::InitSettings( BOOL bForeground, BOOL bBackground )
+{
+ const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
+
+ if ( bForeground )
+ {
+ Color aTextColor = rStyleSettings.GetWindowTextColor();
+
+ if ( IsControlForeground() )
+ aTextColor = GetControlForeground();
+ SetTextColor( aTextColor );
+ }
+
+ if ( bBackground )
+ {
+ if ( IsControlBackground() )
+ SetBackground( GetControlBackground() );
+ else
+ SetBackground( rStyleSettings.GetWindowColor() );
+ }
+ Invalidate();
+}
+
+// -----------------------------------------------------------------------
+
+void SvxNumberPreviewImpl::StateChanged( StateChangedType nType )
+{
+ if ( nType == STATE_CHANGE_CONTROLFOREGROUND )
+ InitSettings( TRUE, FALSE );
+ else if ( nType == STATE_CHANGE_CONTROLBACKGROUND )
+ InitSettings( FALSE, TRUE );
+
+ Window::StateChanged( nType );
+}
+
+// -----------------------------------------------------------------------
+
+void SvxNumberPreviewImpl::DataChanged( const DataChangedEvent& rDCEvt )
+{
+ if ( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) )
+ InitSettings( TRUE, TRUE );
+ else
+ Window::DataChanged( rDCEvt );
+}
+
+// class SvxNumberFormatTabPage ------------------------------------------
+
+#define REMOVE_DONTKNOW() \
+ if ( !aFtLanguage.IsEnabled() ) \
+ { \
+ aFtLanguage .Enable(); \
+ aLbLanguage .Enable(); \
+ aLbLanguage .SelectLanguage( pNumFmtShell->GetCurLanguage() ); \
+ }
+
+#define HDL(hdl) LINK( this, SvxNumberFormatTabPage, hdl )
+
+
+/*************************************************************************
+#* Methode: SvxNumberFormatTabPage Datum:02.10.97
+#*------------------------------------------------------------------------
+#*
+#* Klasse: SvxNumberFormatTabPage
+#*
+#* Funktion: Konstruktor der Klasse SvxNumberFormatTabPage
+#*
+#* Input: Fenster, SfxItemSet
+#*
+#* Output: ---
+#*
+#************************************************************************/
+
+SvxNumberFormatTabPage::SvxNumberFormatTabPage( Window* pParent,
+ const SfxItemSet& rCoreAttrs )
+
+ : SfxTabPage( pParent, SVX_RES( RID_SVXPAGE_NUMBERFORMAT ), rCoreAttrs ),
+
+ aFtPreview ( this, ResId( FT_PREVIEW ) ),
+ aWndPreview ( this, ResId( WND_NUMBER_PREVIEW ) ),
+ aFtCategory ( this, ResId( FT_CATEGORY ) ),
+ aLbCategory ( this, ResId( LB_CATEGORY ) ),
+ aFtFormat ( this, ResId( FT_FORMAT ) ),
+ aLbCurrency ( this, ResId( LB_CURRENCY) ),
+ aLbFormat ( this, ResId( LB_FORMAT ) ),
+ aFtEdFormat ( this, ResId( FT_EDFORMAT ) ),
+ aEdFormat ( this, ResId( ED_FORMAT ) ),
+ aEdComment ( this, ResId( ED_COMMENT ) ),
+ aIbAdd ( this, ResId( IB_ADD ) ),
+ aIbRemove ( this, ResId( IB_REMOVE ) ),
+ aIbInfo ( this, ResId( IB_INFO ) ),
+ aBtnNegRed ( this, ResId( BTN_NEGRED ) ),
+ aBtnThousand ( this, ResId( BTN_THOUSAND ) ),
+ aFtLeadZeroes ( this, ResId( FT_LEADZEROES ) ),
+ aFtDecimals ( this, ResId( FT_DECIMALS ) ),
+ aEdLeadZeroes ( this, ResId( ED_LEADZEROES ) ),
+ aEdDecimals ( this, ResId( ED_DECIMALS ) ),
+ aFtLanguage ( this, ResId( FT_LANGUAGE ) ),
+ aLbLanguage ( this, ResId( LB_LANGUAGE ) ),
+ aGbOptions ( this, ResId( GB_OPTIONS ) ),
+ aFtComment ( this, ResId( FT_COMMENT ) ),
+ aStrEurope ( ResId( STR_EUROPE) ),
+ aIconList ( ResId( IL_ICON ) ),
+ nInitFormat ( ULONG_MAX ),
+ pNumItem ( NULL ),
+ pNumFmtShell ( NULL ),
+ pLastActivWindow( NULL )
+{
+ Init_Impl();
+ SetExchangeSupport(); // diese Page braucht ExchangeSupport
+ FreeResource();
+ nFixedCategory=-1;
+}
+
+// -----------------------------------------------------------------------
+
+
+/*************************************************************************
+#* Methode: ~SvxNumberFormatTabPage Datum:02.10.97
+#*------------------------------------------------------------------------
+#*
+#* Klasse: SvxNumberFormatTabPage
+#*
+#* Funktion: Destruktor der Klasse gibt den Speicher der
+#* fuer die Kopien von num. Shell und Item frei.
+#*
+#* Input: ---
+#*
+#* Output: ---
+#*
+#************************************************************************/
+
+SvxNumberFormatTabPage::~SvxNumberFormatTabPage()
+{
+ delete pNumFmtShell;
+ delete pNumItem;
+}
+
+/*************************************************************************
+#* Methode: Init_Impl Datum:02.10.97
+#*------------------------------------------------------------------------
+#*
+#* Klasse: SvxNumberFormatTabPage
+#*
+#* Funktion: Initialisierung der Klassen- Member und Handler
+#*
+#* Input: ---
+#*
+#* Output: ---
+#*
+#************************************************************************/
+
+void SvxNumberFormatTabPage::Init_Impl()
+{
+ bNumItemFlag=TRUE;
+ bOneAreaFlag=FALSE;
+
+ nCatHeight=aLbCategory.GetSizePixel().Height();
+
+ nCurFormatY =aLbFormat.GetPosPixel().Y();
+ nCurFormatHeight=aLbFormat.GetSizePixel().Height();
+ nStdFormatY =aLbCurrency.GetPosPixel().Y();
+ nStdFormatHeight=nCurFormatY-nStdFormatY+nCurFormatHeight;
+
+ aIbAdd. SetImage(aIconList.GetImage(IID_ADD));
+ aIbRemove.SetImage(aIconList.GetImage(IID_REMOVE));
+ aIbInfo. SetImage(aIconList.GetImage(IID_INFO));
+
+ aIbAdd.Enable(FALSE );
+ aIbRemove.Enable(FALSE );
+ aIbInfo.Enable(FALSE );
+
+ aEdComment.SetText(aLbCategory.GetEntry(1)); //String fuer Benutzerdefiniert
+ //holen
+ aEdComment.Hide();
+
+// Handler verbinden
+ Link aLink = LINK( this, SvxNumberFormatTabPage, SelFormatHdl_Impl );
+
+ aLbCategory .SetSelectHdl( aLink );
+ aLbFormat .SetSelectHdl( aLink );
+ aLbLanguage .SetSelectHdl( aLink );
+ aLbCurrency .SetSelectHdl( aLink );
+
+ aLink = LINK( this, SvxNumberFormatTabPage, OptHdl_Impl );
+
+ aEdDecimals .SetModifyHdl( aLink );
+ aEdLeadZeroes .SetModifyHdl( aLink );
+ aBtnNegRed .SetClickHdl( aLink );
+ aBtnThousand .SetClickHdl( aLink );
+ aLbFormat .SetDoubleClickHdl( HDL( DoubleClickHdl_Impl ) );
+ aEdFormat .SetModifyHdl( HDL( EditHdl_Impl ) );
+ aIbAdd.SetClickHdl( HDL( ClickHdl_Impl ) );
+ aIbRemove.SetClickHdl( HDL( ClickHdl_Impl ) );
+ aIbInfo.SetClickHdl( HDL( ClickHdl_Impl ) );
+
+ aLink = LINK( this, SvxNumberFormatTabPage, LostFocusHdl_Impl);
+
+ aEdComment .SetLoseFocusHdl( aLink);
+ aResetWinTimer .SetTimeoutHdl(LINK( this, SvxNumberFormatTabPage, TimeHdl_Impl));
+ aResetWinTimer .SetTimeout( 10);
+
+ // Sprachen-ListBox initialisieren
+
+ const USHORT nCount = International::GetAvailableFormatCount();
+
+ for ( USHORT i=0; i<nCount; i++ )
+ aLbLanguage.InsertLanguage( International::GetAvailableFormat( i ) );
+}
+
+
+/*************************************************************************
+#* Methode: GetRanges Datum:02.10.97
+#*------------------------------------------------------------------------
+#*
+#* Klasse: SvxNumberFormatTabPage
+#*
+#* Funktion: Liefert Bereichsangaben zurueck.
+#*
+#* Input: ---
+#*
+#* Output: Bereich
+#*
+#************************************************************************/
+
+USHORT* SvxNumberFormatTabPage::GetRanges()
+{
+ return pRanges;
+}
+
+
+/*************************************************************************
+#* Methode: Create Datum:02.10.97
+#*------------------------------------------------------------------------
+#*
+#* Klasse: SvxNumberFormatTabPage
+#*
+#* Funktion: Erzeugt eine neue Zahlenformat- Seite.
+#*
+#* Input: Fenster, SfxItemSet
+#*
+#* Output: neue TabPage
+#*
+#************************************************************************/
+
+SfxTabPage* SvxNumberFormatTabPage::Create( Window* pParent,
+ const SfxItemSet& rAttrSet )
+{
+ return ( new SvxNumberFormatTabPage( pParent, rAttrSet ) );
+}
+
+
+/*************************************************************************
+#* Methode: Reset Datum:02.10.97
+#*------------------------------------------------------------------------
+#*
+#* Klasse: SvxNumberFormatTabPage
+#*
+#* Funktion: Die Attribute des Dialogs werden mit Hilfe
+#* des Itemsets neu eingestellt.
+#*
+#* Input: SfxItemSet
+#*
+#* Output: ---
+#*
+#************************************************************************/
+
+void SvxNumberFormatTabPage::Reset( const SfxItemSet& rSet )
+{
+ const SfxUInt32Item* pValFmtAttr = NULL;
+ const SfxPoolItem* pItem = NULL;
+ const SfxBoolItem* pBoolItem = NULL;
+ const SfxBoolItem* pBoolLangItem = NULL;
+
+ USHORT nCatLbSelPos = 0;
+ USHORT nFmtLbSelPos = 0;
+ LanguageType eLangType = LANGUAGE_DONTKNOW;
+ SvxDelStrgs aFmtEntryList;
+ String aPrevString;
+ Color aPrevColor;
+ SvxNumberValueType eValType = SVX_VALUE_TYPE_UNDEFINED;
+ double nValDouble = 0;
+ String aValString;
+ SfxItemState eState = SFX_ITEM_DONTCARE;
+
+
+ eState = rSet.GetItemState( GetWhich( SID_ATTR_NUMBERFORMAT_NOLANGUAGE ),TRUE,&pItem);
+
+ if(eState==SFX_ITEM_SET)
+ {
+ pBoolLangItem = (const SfxBoolItem*)
+ GetItem( rSet, SID_ATTR_NUMBERFORMAT_NOLANGUAGE);
+
+ if(pBoolLangItem!=NULL && pBoolLangItem->GetValue())
+ {
+ HideLanguage();
+ }
+ else
+ {
+ HideLanguage(FALSE);
+ }
+
+ }
+
+ eState = rSet.GetItemState( GetWhich( SID_ATTR_NUMBERFORMAT_INFO ),TRUE,&pItem);
+
+ if(eState==SFX_ITEM_SET)
+ {
+ if(pNumItem==NULL)
+ {
+ bNumItemFlag=TRUE;
+ pNumItem= (SvxNumberInfoItem *) pItem->Clone();
+ }
+ else
+ {
+ bNumItemFlag=FALSE;
+ }
+ }
+ else
+ {
+ bNumItemFlag=FALSE;
+ }
+
+
+ eState = rSet.GetItemState( GetWhich( SID_ATTR_NUMBERFORMAT_ONE_AREA ));
+
+ if(eState==SFX_ITEM_SET)
+ {
+ pBoolItem = (const SfxBoolItem*)
+ GetItem( rSet, SID_ATTR_NUMBERFORMAT_ONE_AREA);
+
+ if(pBoolItem!=NULL)
+ {
+ bOneAreaFlag= pBoolItem->GetValue();
+ }
+ }
+ //bOneAreaFlag=TRUE; //@@ Debug-Test
+
+ // pNumItem muss von aussen gesetzt worden sein!
+ DBG_ASSERT( pNumItem, "No NumberInfo, no NumberFormatter, good bye.CRASH. :-(" );
+
+ // aktuellen Zahlenformat-Tabellenindex holen
+ eState = rSet.GetItemState( GetWhich( SID_ATTR_NUMBERFORMAT_VALUE ) );
+
+ if ( SFX_ITEM_DONTCARE != eState )
+ pValFmtAttr = (const SfxUInt32Item*)
+ GetItem( rSet, SID_ATTR_NUMBERFORMAT_VALUE );
+
+ eValType = pNumItem->GetValueType();
+
+ switch ( eValType )
+ {
+ case SVX_VALUE_TYPE_STRING:
+ aValString = pNumItem->GetValueString();
+ break;
+ case SVX_VALUE_TYPE_NUMBER:
+ nValDouble = pNumItem->GetValueDouble();
+ break;
+ case SVX_VALUE_TYPE_UNDEFINED:
+ default:
+ break;
+ }
+
+ // nun sind alle Informationen fuer die Formatierer-Shell beisammen:
+
+ if ( pNumFmtShell )
+ delete pNumFmtShell; // ggF. alte Shell loeschen (==Reset)
+
+ nInitFormat = ( pValFmtAttr ) // Init-Key merken
+ ? pValFmtAttr->GetValue() // (fuer FillItemSet())
+ : ULONG_MAX; // == DONT_KNOW
+
+
+ if ( eValType == SVX_VALUE_TYPE_STRING )
+ pNumFmtShell =SvxNumberFormatShell::Create(
+ pNumItem->GetNumberFormatter(),
+ (pValFmtAttr) ? nInitFormat : 0L,
+ eValType,
+ aValString );
+ else
+ pNumFmtShell =SvxNumberFormatShell::Create(
+ pNumItem->GetNumberFormatter(),
+ (pValFmtAttr) ? nInitFormat : 0L,
+ eValType,
+ nValDouble );
+
+ FillCurrencyBox();
+
+ pNumFmtShell->GetInitSettings( nCatLbSelPos, eLangType, nFmtLbSelPos,
+ aFmtEntryList, aPrevString, aPrevColor );
+
+ aLbCurrency.SelectEntryPos((USHORT)pNumFmtShell->GetCurrencySymbol());
+
+ nFixedCategory=nCatLbSelPos;
+ String sFixedCategory=aLbCategory.GetEntry(nFixedCategory);
+ if(bOneAreaFlag)
+ {
+ String sFixedCategory=aLbCategory.GetEntry(nFixedCategory);
+ aLbCategory.Clear();
+ aLbCategory.InsertEntry(sFixedCategory);
+ SetCategory(0);
+ }
+ else
+ {
+ SetCategory(nCatLbSelPos );
+ }
+ aLbLanguage.SelectLanguage( eLangType );
+ UpdateFormatListBox_Impl(FALSE,TRUE);
+ SelFormatHdl_Impl( &aLbCategory );
+
+ if ( pValFmtAttr )
+ {
+ EditHdl_Impl( &aEdFormat ); // UpdateOptions_Impl() als Seiteneffekt
+
+ }
+ else // DONT_KNOW
+ {
+ // Kategoriewechsel und direkte Eingabe sind moeglich, sonst nix:
+ Obstructing();
+ }
+
+ DeleteEntryList_Impl(aFmtEntryList);
+}
+
+/*************************************************************************
+#* Methode: Obstructing Datum:02.10.97
+#*------------------------------------------------------------------------
+#*
+#* Klasse: SvxNumberFormatTabPage
+#*
+#* Funktion: Sperren der Controls mit Ausnahme von Kategoriewechsel
+#* und direkter Eingabe.
+#*
+#* Input: ---
+#*
+#* Output: ---
+#*
+#************************************************************************/
+void SvxNumberFormatTabPage::Obstructing()
+{
+ aLbFormat .SetNoSelection();
+ aLbLanguage .SetNoSelection();
+ aFtLanguage .Disable();
+ aLbLanguage .Disable();
+
+ aIbAdd.Enable(FALSE );
+ aIbRemove.Enable(FALSE );
+ aIbInfo.Enable(FALSE );
+
+ aBtnNegRed .Disable();
+ aBtnThousand .Disable();
+ aFtLeadZeroes .Disable();
+ aFtDecimals .Disable();
+ aEdLeadZeroes .Disable();
+ aEdDecimals .Disable();
+ aGbOptions .Disable();
+ aEdDecimals .SetText( String() );
+ aEdLeadZeroes .SetText( String() );
+ aBtnNegRed .Check( FALSE );
+ aBtnThousand .Check( FALSE );
+ aWndPreview .NotifyChange( String(), Color() );
+
+ aLbCategory .SelectEntryPos( 0 );
+ aEdFormat .SetText( String() );
+ aFtComment .SetText( String() );
+ aEdComment .SetText(aLbCategory.GetEntry(1)); //String fuer Benutzerdefiniert
+ //holen
+
+ aEdFormat .GrabFocus();
+}
+
+/*************************************************************************
+#* Methode: HideLanguage Datum:14.05.98
+#*------------------------------------------------------------------------
+#*
+#* Klasse: SvxNumberFormatTabPage
+#*
+#* Funktion: Versteckt die Spracheinstellung:
+#*
+#* Input: BOOL nFlag
+#*
+#* Output: ---
+#*
+#************************************************************************/
+
+void SvxNumberFormatTabPage::HideLanguage(BOOL nFlag)
+{
+ Size aSize=aLbCategory.GetSizePixel();
+
+ if(nFlag)
+ {
+ aSize.Height()=aLbFormat.GetSizePixel().Height();
+ }
+ else
+ {
+ aSize.Height()=nCatHeight;
+ }
+
+ aLbCategory.SetSizePixel(aSize);
+
+ aFtLanguage.Show(!nFlag);
+ aLbLanguage.Show(!nFlag);
+}
+
+/*************************************************************************
+#* Methode: FillItemSet Datum:02.10.97
+#*------------------------------------------------------------------------
+#*
+#* Klasse: SvxNumberFormatTabPage
+#*
+#* Funktion: Stellt die Attribute im ItemSet ein,
+#* sowie in der DocShell den numItem, wenn
+#* bNumItemFlag nicht gesetzt ist.
+#*
+#* Input: SfxItemSet
+#*
+#* Output: ---
+#*
+#************************************************************************/
+
+BOOL SvxNumberFormatTabPage::FillItemSet( SfxItemSet& rCoreAttrs )
+{
+ BOOL bDataChanged = aFtLanguage.IsEnabled();
+ BOOL bDeleted = FALSE;
+ if ( bDataChanged )
+ {
+ USHORT nWhich = GetWhich( SID_ATTR_NUMBERFORMAT_VALUE );
+ SfxItemState eItemState = GetItemSet().GetItemState( nWhich, FALSE );
+
+ // OK angewaehlt - wurde eingegebenes Zahlenformat schon
+ // uebernommen? Wenn nein Add simulieren. Bei Syntaxfehler
+ // Eingabe ignorieren und Put unterbinden
+ String aFormat = aEdFormat.GetText();
+ ULONG nCurKey = pNumFmtShell->GetCurNumFmtKey();
+
+ if ( aIbAdd.IsEnabled()|| pNumFmtShell->IsTmpCurrencyFormat(aFormat) )
+ {
+ ULONG nErrPos;
+ USHORT nCatLbSelPos = 0;
+ short nFmtLbSelPos = SELPOS_NONE;
+ SvxDelStrgs aEntryList;
+ SvxDelStrgs a2EntryList;
+
+ bDataChanged = pNumFmtShell->AddFormat( aFormat, nErrPos,
+ nCatLbSelPos, nFmtLbSelPos,
+ aEntryList );
+
+ pNumFmtShell->SetComment4Entry(nFmtLbSelPos,aEdComment.GetText());
+
+ if(bOneAreaFlag && (nFixedCategory!=nCatLbSelPos))
+ {
+ if(bDataChanged) DeleteEntryList_Impl(aEntryList);
+ bDeleted = pNumFmtShell->RemoveFormat( aFormat,
+ nCatLbSelPos,
+ nFmtLbSelPos,
+ a2EntryList);
+ if(bDeleted) DeleteEntryList_Impl(a2EntryList);
+ bDataChanged=FALSE;
+ }
+ nCurKey = pNumFmtShell->GetCurNumFmtKey();
+ }
+ else if(nCurKey == NUMKEY_UNDEFINED) // Wohl was falsch gelaufen!
+ { // z.B. im Writer #70281#
+ pNumFmtShell->FindEntry(aFormat, &nCurKey);
+ }
+
+ //---------------------------------------------------------------
+ // Ausgewaehltes Format:
+ // ----------------------
+
+ if ( bDataChanged )
+ {
+ bDataChanged = ( nInitFormat != nCurKey );
+
+ if (bDataChanged)
+ {
+ rCoreAttrs.Put( SfxUInt32Item( nWhich, nCurKey ) );
+ }
+ else if(SFX_ITEM_DEFAULT == eItemState)
+ {
+ rCoreAttrs.ClearItem( nWhich );
+ }
+ }
+
+ // --------------------------------------------------------------
+ // Liste veraenderter benutzerdefinierter Formate:
+ // -----------------------------------------------
+ const ULONG nDelCount = pNumFmtShell->GetUpdateDataCount();
+
+ if ( nDelCount > 0 )
+ {
+ ULONG* pDelArr = new ULONG[nDelCount];
+
+ pNumFmtShell->GetUpdateData( pDelArr, nDelCount );
+ pNumItem->SetDelFormatArray( pDelArr, nDelCount );
+
+ if(bNumItemFlag==TRUE)
+ {
+ rCoreAttrs.Put( *pNumItem );
+ }
+ else
+ {
+ SfxObjectShell* pDocSh = SfxObjectShell::Current();
+
+ DBG_ASSERT( pDocSh, "DocShell not found!" );
+
+
+ if ( pDocSh )
+ pDocSh->PutItem( *pNumItem );
+ }
+ delete [] pDelArr;
+ }
+
+ // FillItemSet wird nur bei OK gerufen, d.h. an dieser
+ // Stelle kann der NumberFormat-Shell mitgeteilt werden,
+ // dass alle neuen benutzerdefinierten Formate gueltig sind:
+
+ pNumFmtShell->ValidateNewEntries();
+ }
+
+ return bDataChanged;
+}
+
+
+/*************************************************************************
+#* Methode: DeactivatePage Datum:02.10.97
+#*------------------------------------------------------------------------
+#*
+#* Klasse: SvxNumberFormatTabPage
+#*
+#* Funktion: Deaktiviert die Seite
+#*
+#* Input: Pointer auf ItemSet
+#*
+#* Output: LEAVE_PAGE
+#*
+#************************************************************************/
+
+int SvxNumberFormatTabPage::DeactivatePage( SfxItemSet* pSet )
+{
+/* if ( (ULONG_MAX != nInitFormat) && pSet )
+ {
+ const ULONG nCurKey = pNumFmtShell->GetCurNumFmtKey();
+ const USHORT nWhich = GetWhich( SID_ATTR_NUMBERFORMAT_VALUE );
+ SfxItemState eItemState = GetItemSet().GetItemState( nWhich, FALSE );
+
+ if ( (nInitFormat == nCurKey) && (SFX_ITEM_DEFAULT == eItemState) )
+ pSet->ClearItem( nWhich );
+ else
+ pSet->Put( SfxUInt32Item( nWhich, nCurKey ) );
+ }
+ */
+ if ( pSet )
+ FillItemSet( *pSet );
+ return LEAVE_PAGE;
+}
+
+
+/*************************************************************************
+#* Methode: SetInfoItem Datum:02.10.97
+#*------------------------------------------------------------------------
+#*
+#* Klasse: SvxNumberFormatTabPage
+#*
+#* Funktion: Wenn die Klasse den NumInfoItem nicht ueber den
+#* SfxItem beim Reset erhaelt MUSS ueber diese Funktion
+#* der Item gesetzt werden.
+#*
+#* Input: ---
+#*
+#* Output: ---
+#*
+#************************************************************************/
+
+void SvxNumberFormatTabPage::SetInfoItem( const SvxNumberInfoItem& rItem )
+{
+ if(pNumItem==NULL)
+ {
+ pNumItem = (SvxNumberInfoItem*)rItem.Clone();
+ }
+}
+
+
+/*************************************************************************
+#* Methode: FillFormatListBox_Impl Datum:02.10.97
+#*------------------------------------------------------------------------
+#*
+#* Klasse: SvxNumberFormatTabPage
+#*
+#* Funktion: Fuellt die Format- Listbox mit den entsprechend
+#* formatierten Zahlenwerten.
+#*
+#* Input: Liste der Formatstrings
+#*
+#* Output: ---
+#*
+#************************************************************************/
+
+void SvxNumberFormatTabPage::FillFormatListBox_Impl( SvxDelStrgs& rEntries )
+{
+ String* pEntry;
+ String aTmpString;
+ String aTmpCatString;
+ String aPreviewString;
+ Color aPreviewColor;
+ Font aFont=aLbCategory.GetFont();
+ Font a2Font;
+ Font a3Font;
+ double nVal=0;
+ BOOL bFLAG=FALSE;
+ USHORT i = 0;
+ short nTmpCatPos;
+ short aPrivCat;
+
+ aLbFormat.Clear();
+ aLbFormat.SetUpdateMode( FALSE );
+
+ USHORT nCount = rEntries.Count();
+
+ if(nCount<1) return;
+
+ if(bOneAreaFlag)
+ {
+ nTmpCatPos=nFixedCategory;
+ }
+ else
+ {
+ nTmpCatPos=aLbCategory.GetSelectEntryPos();
+ }
+
+ USHORT nSelPos=LISTBOX_ENTRY_NOTFOUND;
+
+ switch (nTmpCatPos)
+ {
+ case CAT_ALL:
+ case CAT_TEXT:
+ case CAT_NUMBER: i=1;
+ pEntry=rEntries[0];
+ if(pEntry!=NULL)
+ {
+ aTmpString=*pEntry;
+ aPrivCat=pNumFmtShell->GetCategory4Entry(0);
+ aLbFormat.InsertFontEntry(aTmpString,aFont);
+ }
+ break;
+
+ default: break;
+ }
+
+ if(pNumFmtShell!=NULL)
+ {
+ for ( ; i < nCount; ++i )
+ {
+ pEntry = rEntries[i];
+ aPrivCat=pNumFmtShell->GetCategory4Entry(i);
+ if(aPrivCat!=CAT_TEXT)
+ {
+ aPreviewString=GetExpColorString(&aPreviewColor, *pEntry,aPrivCat);
+ a2Font=aLbFormat.GetFont();
+ a2Font.SetColor(aPreviewColor);
+ aLbFormat.InsertFontEntry(aPreviewString,a2Font); //@21.10.97
+ }
+ else
+ {
+ aLbFormat.InsertFontEntry(*pEntry,aFont);
+ }
+ }
+ }
+ aLbFormat.SetUpdateMode( TRUE );
+ DeleteEntryList_Impl(rEntries);
+}
+
+
+/*************************************************************************
+#* Methode: DeleteEntryList_Impl Datum:02.10.97
+#*------------------------------------------------------------------------
+#*
+#* Klasse: SvxNumberFormatTabPage
+#*
+#* Funktion: Loescht eine SvStrings- Liste
+#*
+#* Input: String-liste
+#*
+#* Output: ---
+#*
+#************************************************************************/
+
+void SvxNumberFormatTabPage::DeleteEntryList_Impl( SvxDelStrgs& rEntries )
+{
+ USHORT nCount = rEntries.Count();
+ rEntries.DeleteAndDestroy(0,nCount);
+}
+
+
+/*************************************************************************
+#* Methode: UpdateOptions_Impl Datum:02.10.97
+#*------------------------------------------------------------------------
+#*
+#* Klasse: SvxNumberFormatTabPage
+#*
+#* Funktion: Stellt je nach eingestelltem Format die Options-
+#* attribute neu ein.
+#*
+#* Input: Flag, ob sich die Kategorie geaendert hat.
+#*
+#* Output: ---
+#*
+#************************************************************************/
+
+void SvxNumberFormatTabPage::UpdateOptions_Impl( BOOL bCheckCatChange /*= FALSE*/ )
+{
+ SvxDelStrgs aEntryList;
+ String theFormat = aEdFormat.GetText();
+ USHORT nCurCategory = aLbCategory.GetSelectEntryPos();
+ USHORT nCategory = nCurCategory;
+ USHORT nDecimals = 0;
+ USHORT nZeroes = 0;
+ BOOL bNegRed = FALSE;
+ BOOL bThousand = FALSE;
+ short nTmpCatPos;
+ USHORT nCurrencyPos =aLbCurrency.GetSelectEntryPos();
+
+ if(bOneAreaFlag)
+ {
+ nTmpCatPos=nFixedCategory;
+ nCurCategory=nFixedCategory;
+ }
+ else
+ {
+ nTmpCatPos=nCurCategory;
+ }
+
+
+ pNumFmtShell->GetOptions( theFormat,
+ bThousand, bNegRed,
+ nDecimals, nZeroes,
+ nCategory );
+ BOOL bDoIt=FALSE;
+ if(nCategory==CAT_CURRENCY)
+ {
+ USHORT nTstPos=pNumFmtShell->FindCurrencyFormat(theFormat);
+ if(nCurrencyPos!=nTstPos && nTstPos!=(USHORT)-1)
+ {
+ aLbCurrency.SelectEntryPos(nTstPos);
+ pNumFmtShell->SetCurrencySymbol(nTstPos);
+ bDoIt=TRUE;
+ }
+ }
+
+
+
+ if ( nCategory != nCurCategory || bDoIt)
+ {
+ if ( bCheckCatChange )
+ {
+ if(bOneAreaFlag)
+ SetCategory(0);
+ else
+ SetCategory(nCategory );
+
+ UpdateFormatListBox_Impl( TRUE, FALSE );
+ }
+ }
+ else if ( aLbFormat.GetEntryCount() > 0 )
+ {
+ ULONG nCurEntryKey=NUMKEY_UNDEFINED;
+ if(!pNumFmtShell->FindEntry( aEdFormat.GetText(),&nCurEntryKey))
+ {
+ aLbFormat.SetNoSelection();
+ }
+ }
+ if(bOneAreaFlag)
+ {
+ nCategory=nFixedCategory;
+ }
+
+ switch ( nCategory )
+ {
+ case CAT_NUMBER:
+ case CAT_PERCENT:
+ case CAT_CURRENCY:
+ aGbOptions.Enable();
+ aFtDecimals.Enable();
+ aEdDecimals.Enable();
+ aFtLeadZeroes.Enable();
+ aEdLeadZeroes.Enable();
+ aBtnNegRed.Enable();
+ aBtnThousand.Enable();
+ /*
+ aEdDecimals .SetValue( nDecimals );
+ aEdLeadZeroes.SetValue( nZeroes );
+ */
+ aEdDecimals .SetText( UniString::CreateFromInt32( nDecimals ) );
+ aEdLeadZeroes.SetText( UniString::CreateFromInt32( nZeroes ) );
+ aBtnNegRed .Check( bNegRed );
+ aBtnThousand .Check( bThousand );
+ break;
+
+ case CAT_ALL:
+ case CAT_USERDEFINED:
+ case CAT_TEXT:
+ case CAT_DATE:
+ case CAT_TIME:
+ case CAT_BOOLEAN:
+ case CAT_SCIENTIFIC:
+ case CAT_FRACTION:
+ default:
+ aGbOptions .Disable();
+ aFtDecimals .Disable();
+ aEdDecimals .Disable();
+ aFtLeadZeroes .Disable();
+ aEdLeadZeroes .Disable();
+ aBtnNegRed .Disable();
+ aBtnThousand .Disable();
+ aEdDecimals .SetText( UniString::CreateFromInt32( 0 ) );
+ aEdLeadZeroes .SetText( UniString::CreateFromInt32( 0 ) );
+ aBtnNegRed .Check( FALSE );
+ aBtnThousand .Check( FALSE );
+ }
+}
+
+
+/*************************************************************************
+#* Methode: UpdateFormatListBox_Impl Datum:02.10.97
+#*------------------------------------------------------------------------
+#*
+#* Klasse: SvxNumberFormatTabPage
+#*
+#* Funktion: Aktualisiert die Format- Listbox und zusaetzlich
+#* wird abhaengig vom bUpdateEdit- Flag der String
+#* in der Editbox geaendert.
+#*
+#* Input: Flags fuer Kategorie und Editbox
+#*
+#* Output: ---
+#*
+#************************************************************************/
+
+void SvxNumberFormatTabPage::UpdateFormatListBox_Impl
+ (
+ USHORT bCat, // Category oder Land/Sprache ListBox?
+ BOOL bUpdateEdit // Format-Edit aktualisieren?
+ )
+{
+ SvxDelStrgs aEntryList;
+ short nFmtLbSelPos = 0;
+ String aPreviewString;
+ Color aPreviewColor;
+ short nTmpCatPos;
+
+ if(bOneAreaFlag)
+ {
+ nTmpCatPos=nFixedCategory;
+ }
+ else
+ {
+ nTmpCatPos=aLbCategory.GetSelectEntryPos();
+ }
+
+
+ if ( bCat )
+ {
+ Point aPos=aLbFormat.GetPosPixel();
+ Size aSize=aLbFormat.GetSizePixel();
+
+ if(nTmpCatPos!=CAT_CURRENCY)
+ {
+ aPos.Y()=nStdFormatY;
+ aSize.Height()=nStdFormatHeight;
+ aLbFormat.SetPosSizePixel(aPos,aSize);
+ aLbCurrency.Hide();
+ }
+ else
+ {
+ aPos.Y()=nCurFormatY;
+ aSize.Height()=nCurFormatHeight;
+ aLbFormat.SetPosSizePixel(aPos,aSize);
+ aLbCurrency.Show();
+ }
+
+ pNumFmtShell->CategoryChanged( nTmpCatPos,nFmtLbSelPos, aEntryList );
+ }
+ else
+ pNumFmtShell->LanguageChanged( aLbLanguage.GetSelectLanguage(),
+ nFmtLbSelPos,aEntryList );
+
+ REMOVE_DONTKNOW() // ggF. UI-Enable
+
+
+ if ( (aEntryList.Count() > 0) && (nFmtLbSelPos != SELPOS_NONE) )
+ {
+ if(bUpdateEdit)
+ {
+ String aFormat=*aEntryList[nFmtLbSelPos];
+ aEdFormat.SetText(aFormat);
+ aFtComment.SetText(pNumFmtShell->GetComment4Entry(nFmtLbSelPos));
+
+ //@23.09.97 aEdFormat.SetText( aLbFormat.GetSelectEntry() );
+ }
+
+ if(!bOneAreaFlag || !bCat)
+ {
+ FillFormatListBox_Impl( aEntryList );
+ aLbFormat.SelectEntryPos( nFmtLbSelPos );
+
+ aFtComment.SetText(pNumFmtShell->GetComment4Entry(nFmtLbSelPos));
+ if(pNumFmtShell->GetUserDefined4Entry(nFmtLbSelPos))
+ {
+ if(pNumFmtShell->GetComment4Entry(nFmtLbSelPos).Len()==0)
+ {
+ aFtComment.SetText(aLbCategory.GetEntry(1));
+ }
+ }
+
+ pNumFmtShell->FormatChanged( (USHORT)nFmtLbSelPos,
+ aPreviewString,
+ aPreviewColor );
+ aWndPreview.NotifyChange( aPreviewString, aPreviewColor );
+ }
+
+ }
+ else
+ {
+ FillFormatListBox_Impl( aEntryList );
+ if(nFmtLbSelPos != SELPOS_NONE)
+ {
+ aLbFormat.SelectEntryPos( (USHORT)nFmtLbSelPos );
+
+ aFtComment.SetText(pNumFmtShell->GetComment4Entry(nFmtLbSelPos));
+ if(pNumFmtShell->GetUserDefined4Entry(nFmtLbSelPos))
+ {
+ if(pNumFmtShell->GetComment4Entry(nFmtLbSelPos).Len()==0)
+ {
+ aFtComment.SetText(aLbCategory.GetEntry(1));
+ }
+ }
+ }
+ else
+ {
+ aLbFormat.SetNoSelection();
+ }
+
+ if ( bUpdateEdit )
+ {
+ aEdFormat.SetText( String() );
+ aWndPreview.NotifyChange( String(), aPreviewColor );
+ }
+ }
+}
+
+
+/*************************************************************************
+#* Handle: DoubleClickHdl_Impl Datum:02.10.97
+#*------------------------------------------------------------------------
+#*
+#* Klasse: SvxNumberFormatTabPage
+#*
+#* Funktion: Bei einem Doppelklick in die Format- Listbox
+#* wird der Wert uebernommen und der OK-Button
+#* ausgeloest
+#*
+#* Input: Pointer auf Listbox
+#*
+#* Output: ---
+#*
+#************************************************************************/
+
+IMPL_LINK( SvxNumberFormatTabPage, DoubleClickHdl_Impl, SvxFontListBox*, pLb )
+{
+ if ( pLb == &aLbFormat )
+ {
+ SelFormatHdl_Impl( pLb );
+ // Uebergangsloesung, sollte von SfxTabPage angeboten werden
+ fnOkHdl.Call( NULL );
+ }
+ return 0;
+}
+
+
+/*************************************************************************
+#* Methode: SelFormatHdl_Impl Datum:02.10.97
+#*------------------------------------------------------------------------
+#*
+#* Klasse: SvxNumberFormatTabPage
+#*
+#* Funktion: Wird aufgerufen, wenn sich die Sprache, die Kategorie
+#* oder das Format aendert. Dem entsprechend werden die
+#* Einstellungen geaendert.
+#*
+#* Input: Pointer auf Listbox
+#*
+#* Output: ---
+#*
+#************************************************************************/
+
+IMPL_LINK( SvxNumberFormatTabPage, SelFormatHdl_Impl, void *, pLb )
+{
+ short nTmpCatPos;
+
+ if(bOneAreaFlag)
+ {
+ nTmpCatPos=nFixedCategory;
+ }
+ else
+ {
+ nTmpCatPos=aLbCategory.GetSelectEntryPos();
+ }
+
+ USHORT nCurrencyPos=LISTBOX_ENTRY_NOTFOUND ;
+
+ if(nTmpCatPos==CAT_CURRENCY && (ListBox *)pLb == &aLbCurrency )
+ {
+ nCurrencyPos=aLbCurrency.GetSelectEntryPos();
+ pNumFmtShell->SetCurrencySymbol(nCurrencyPos);
+ }
+
+ //--------------------------------------------------------------------
+ // Format-ListBox ----------------------------------------------------
+ if ( (SvxFontListBox *)pLb == &aLbFormat )
+ {
+ USHORT nSelPos = (USHORT) aLbFormat.GetSelectEntryPos();
+ String aFormat = aLbFormat.GetSelectEntry();
+ String aComment;
+ String aPreviewString;
+ Color aPreviewColor;
+ SvxDelStrgs aEntryList;
+
+ short nFmtLbSelPos = nSelPos;
+
+ aFormat=pNumFmtShell->GetFormat4Entry(nSelPos);
+ aComment=pNumFmtShell->GetComment4Entry(nSelPos);
+ if(pNumFmtShell->GetUserDefined4Entry(nFmtLbSelPos))
+ {
+ if(pNumFmtShell->GetComment4Entry(nFmtLbSelPos).Len()==0)
+ {
+ aComment=aLbCategory.GetEntry(1);
+ }
+ }
+
+ if ( aFormat.Len() > 0 )
+ {
+ if(!aEdFormat.HasFocus()) aEdFormat.SetText( aFormat );
+ aFtComment.SetText(aComment);
+ pNumFmtShell->FormatChanged( nSelPos,
+ aPreviewString,
+ aPreviewColor );
+
+ aWndPreview.NotifyChange( aPreviewString, aPreviewColor );
+ }
+
+ REMOVE_DONTKNOW() // ggF. UI-Enable
+
+ if ( pNumFmtShell->FindEntry( aFormat) )
+ {
+ aIbAdd.Enable(FALSE );
+ BOOL bIsUserDef=pNumFmtShell->IsUserDefined( aFormat );
+ aIbRemove.Enable(bIsUserDef);
+ aIbInfo.Enable(bIsUserDef);
+
+ }
+ else
+ {
+ aIbAdd.Enable(TRUE );
+ aIbInfo.Enable(TRUE );
+ aIbRemove.Enable(FALSE );
+ aFtComment.SetText(aEdComment.GetText());
+
+ }
+ UpdateOptions_Impl( FALSE );
+
+ //-------
+ return 0;
+ //-------
+ }
+
+ //--------------------------------------------------------------------
+ // Kategorie-ListBox -------------------------------------------------
+ if ( pLb == &aLbCategory || pLb == &aLbCurrency)
+ {
+ UpdateFormatListBox_Impl( TRUE, TRUE );
+ EditHdl_Impl( NULL );
+ UpdateOptions_Impl( FALSE );
+
+ //-------
+ return 0;
+ //-------
+ }
+
+ //--------------------------------------------------------------------
+ // Sprache/Land-ListBox ----------------------------------------------
+ if ( pLb == &aLbLanguage )
+ {
+ UpdateFormatListBox_Impl( FALSE, TRUE );
+ EditHdl_Impl( &aEdFormat );
+
+ //-------
+ return 0;
+ //-------
+ }
+ return 0;
+}
+
+
+/*************************************************************************
+#* Methode: ClickHdl_Impl, ImageButton* pIB Datum:02.10.97
+#*------------------------------------------------------------------------
+#*
+#* Klasse: SvxNumberFormatTabPage
+#*
+#* Funktion: Wenn, der Hinzufuegen- oder Entfernen- Button
+#* wird diese Funktion aufgerufen und die Zahlenformat-
+#* Liste den entsprechend geaendert.
+#*
+#* Input: Toolbox- Button
+#*
+#* Output: ---
+#*
+#************************************************************************/
+
+IMPL_LINK( SvxNumberFormatTabPage, ClickHdl_Impl, ImageButton*, pIB)
+{
+ BOOL bAdded = FALSE;
+ BOOL bDeleted = FALSE;
+
+ if(pIB==&aIbAdd)
+ {
+ String aFormat = aEdFormat.GetText();
+ SvxDelStrgs aEntryList;
+ SvxDelStrgs a2EntryList;
+ USHORT nCatLbSelPos = 0;
+ short nFmtLbSelPos = SELPOS_NONE;
+ ULONG nErrPos=0;
+
+ pNumFmtShell->SetCurCurrencyEntry(NULL);
+ bAdded = pNumFmtShell->AddFormat( aFormat, nErrPos,
+ nCatLbSelPos, nFmtLbSelPos,
+ aEntryList);
+
+ if(pLastActivWindow== (Window *) &aEdComment)
+ {
+ aEdFormat.GrabFocus();
+ aEdComment.Hide();
+ aFtComment.Show();
+ aFtComment.SetText(aEdComment.GetText());
+ }
+
+ if ( !nErrPos ) // Syntax ok?
+ {
+ if(nCatLbSelPos==CAT_CURRENCY)
+ {
+ aLbCurrency.SelectEntryPos((USHORT)pNumFmtShell->GetCurrencySymbol());
+ }
+
+ if(bOneAreaFlag && (nFixedCategory!=nCatLbSelPos))
+ {
+ if(bAdded) DeleteEntryList_Impl(aEntryList);
+ bDeleted = pNumFmtShell->RemoveFormat( aFormat,
+ nCatLbSelPos,
+ nFmtLbSelPos,
+ a2EntryList);
+ if(bDeleted) DeleteEntryList_Impl(a2EntryList);
+ aEdFormat.GrabFocus();
+ aEdFormat.SetSelection( Selection( (short)nErrPos, SELECTION_MAX ) );
+ }
+ else
+ {
+ if ( bAdded && (nFmtLbSelPos != SELPOS_NONE) )
+ {
+ // Alles klar
+ String aPreviewString;
+ Color aPreviewColor;
+
+ if(bOneAreaFlag) //@@ ???
+ SetCategory(0);
+ else
+ SetCategory(nCatLbSelPos );
+
+ FillFormatListBox_Impl( aEntryList );
+ if(aEdComment.GetText()!=aLbCategory.GetEntry(1))
+ {
+ pNumFmtShell->SetComment4Entry(nFmtLbSelPos,
+ aEdComment.GetText());
+ }
+ else
+ {
+ pNumFmtShell->SetComment4Entry(nFmtLbSelPos,
+ String());
+ }
+ aLbFormat.SelectEntryPos( (USHORT)nFmtLbSelPos );
+ aEdFormat.SetText( aFormat );
+
+ //aEdComment.SetText(String()); //@@ ???
+ aEdComment.SetText(aLbCategory.GetEntry(1)); //String fuer Benutzerdefiniert
+ //holen
+
+ pNumFmtShell->FormatChanged( (USHORT)nFmtLbSelPos,
+ aPreviewString,
+ aPreviewColor );
+ aWndPreview.NotifyChange( aPreviewString, aPreviewColor );
+ }
+ }
+ }
+ else // Syntaxfehler
+ {
+ aEdFormat.GrabFocus();
+ aEdFormat.SetSelection( Selection( (short)nErrPos, SELECTION_MAX ) );
+ }
+ EditHdl_Impl( &aEdFormat );
+ }
+ else if(pIB==&aIbRemove)
+ {
+ String aPreviewString;
+ Color aPreviewColor;
+ String aFormat = aEdFormat.GetText();
+ SvxDelStrgs aEntryList;
+ USHORT nCatLbSelPos = 0;
+ short nFmtLbSelPos = SELPOS_NONE;
+
+ bDeleted = pNumFmtShell->RemoveFormat( aFormat,
+ nCatLbSelPos,
+ nFmtLbSelPos,
+ aEntryList );
+
+ aEdComment.SetText(aLbCategory.GetEntry(1));
+ if ( bDeleted )
+ {
+ if(nFmtLbSelPos>=0 && nFmtLbSelPos<aEntryList.Count())
+ {
+ aFormat = *aEntryList[nFmtLbSelPos];
+ }
+
+ FillFormatListBox_Impl( aEntryList );
+
+ if ( nFmtLbSelPos != SELPOS_NONE )
+ {
+ if(bOneAreaFlag) //@@ ???
+ SetCategory(0);
+ else
+ SetCategory(nCatLbSelPos );
+
+ aLbFormat.SelectEntryPos( (USHORT)nFmtLbSelPos );
+ aEdFormat.SetText( aFormat );
+ pNumFmtShell->FormatChanged( (USHORT)nFmtLbSelPos,
+ aPreviewString,
+ aPreviewColor );
+ aWndPreview.NotifyChange( aPreviewString, aPreviewColor );
+ }
+ else
+ {
+ // auf "Alle/Standard" setzen
+ SetCategory(0 );
+ SelFormatHdl_Impl( &aLbCategory );
+ }
+ }
+ EditHdl_Impl( &aEdFormat );
+ }
+ else if(pIB==&aIbInfo)
+ {
+ if(!(pLastActivWindow== (Window *) &aEdComment))
+ {
+ aEdComment.SetText(aFtComment.GetText());
+ aEdComment.Show();
+ aFtComment.Hide();
+ aEdComment.GrabFocus();
+ }
+ else
+ {
+ aEdFormat.GrabFocus();
+ aEdComment.Hide();
+ aFtComment.Show();
+ }
+ }
+ else return 0;
+
+ return 0;
+}
+
+
+/*************************************************************************
+#* Methode: EditHdl_Impl Datum:02.10.97
+#*------------------------------------------------------------------------
+#*
+#* Klasse: SvxNumberFormatTabPage
+#*
+#* Funktion: Wenn der Eintrag im Eingabefeld geaendert wird,
+#* so wird die Vorschau aktualisiert und
+#*
+#* Input: Pointer auf Editbox
+#*
+#* Output: ---
+#*
+#************************************************************************/
+
+IMPL_LINK( SvxNumberFormatTabPage, EditHdl_Impl, Edit*, pEdFormat )
+{
+ ULONG nCurKey = NUMKEY_UNDEFINED;
+ String aPreviewString; //@ 22.09.97
+ Color aPreviewColor;
+
+ if ( aEdFormat.GetText().Len() == 0 )
+ {
+ aIbAdd.Enable(FALSE );
+ aIbRemove.Enable(FALSE );
+ aIbInfo.Enable(FALSE );
+ aFtComment.SetText(String());
+ }
+ else
+ {
+ String aFormat = aEdFormat.GetText();
+ //aFtComment.SetText(String());
+
+ pNumFmtShell->MakePreviewString(aFormat,aPreviewString, //@ 22.09.97
+ aPreviewColor);
+
+ aWndPreview.NotifyChange( aPreviewString, aPreviewColor );
+
+ if ( pNumFmtShell->FindEntry( aFormat, &nCurKey ) )
+ {
+ aIbAdd.Enable(FALSE );
+ BOOL bUserDef=pNumFmtShell->IsUserDefined( aFormat );
+
+ aIbRemove.Enable(bUserDef);
+ aIbInfo.Enable(bUserDef);
+
+ if(bUserDef)
+ {
+ USHORT nTmpCurPos=pNumFmtShell->FindCurrencyFormat(aFormat );
+
+ if(nTmpCurPos!=(USHORT)-1)
+ aLbCurrency.SelectEntryPos(nTmpCurPos);
+ }
+ short nPosi=pNumFmtShell->GetListPos4Entry(aFormat);
+ if(nPosi>=0)
+ aLbFormat.SelectEntryPos( (USHORT)nPosi);
+
+ }
+ else
+ {
+
+ aIbAdd.Enable(TRUE );
+ aIbInfo.Enable(TRUE);
+ aIbRemove.Enable(FALSE );
+
+ aFtComment.SetText(aEdComment.GetText());
+
+ }
+ }
+
+ if ( pEdFormat )
+ {
+ pNumFmtShell->SetCurNumFmtKey( nCurKey );
+ UpdateOptions_Impl( TRUE );
+ }
+
+ return 0;
+}
+
+
+/*************************************************************************
+#* Methode: NotifyChange Datum:02.10.97
+#*------------------------------------------------------------------------
+#*
+#* Klasse: SvxNumberFormatTabPage
+#*
+#* Funktion: Fuehrt Aenderungen in den Zahlen- Attributen durch.
+#*
+#* Input: Options- Controls
+#*
+#* Output: ---
+#*
+#************************************************************************/
+
+IMPL_LINK( SvxNumberFormatTabPage, OptHdl_Impl, void *, pOptCtrl )
+{
+ if ( ((NumericField*)pOptCtrl == &aEdLeadZeroes)
+ || ((NumericField*)pOptCtrl == &aEdDecimals)
+ || ((CheckBox*) pOptCtrl == &aBtnNegRed)
+ || ((CheckBox*) pOptCtrl == &aBtnThousand) )
+ {
+ String aPreviewString;
+ Color aPreviewColor;
+ String aFormat;
+ BOOL bThousand = aBtnThousand.IsEnabled()
+ && aBtnThousand.IsChecked();
+ BOOL bNegRed = aBtnNegRed.IsEnabled()
+ && aBtnNegRed.IsChecked();
+ USHORT nPrecision = (aEdDecimals.IsEnabled())
+ ? (USHORT)aEdDecimals.GetValue()
+ : (USHORT)0;
+ USHORT nLeadZeroes = (aEdLeadZeroes.IsEnabled())
+ ? (USHORT)aEdLeadZeroes.GetValue()
+ : (USHORT)0;
+
+ pNumFmtShell->MakeFormat( aFormat,
+ bThousand, bNegRed,
+ nPrecision, nLeadZeroes,
+ (USHORT)aLbFormat.GetSelectEntryPos() );
+
+ aEdFormat.SetText( aFormat );
+ //aFtComment.SetText(String());
+
+ pNumFmtShell->MakePreviewString( aFormat,
+ aPreviewString,
+ aPreviewColor );
+
+ aWndPreview.NotifyChange( aPreviewString, aPreviewColor );
+
+ if ( pNumFmtShell->FindEntry( aFormat ) )
+ {
+ aIbAdd.Enable(FALSE );
+ BOOL bUserDef=pNumFmtShell->IsUserDefined( aFormat );
+ aIbRemove.Enable(bUserDef);
+ aIbInfo.Enable(bUserDef);
+ EditHdl_Impl( &aEdFormat);
+
+ }
+ else
+ {
+ EditHdl_Impl( NULL );
+ aLbFormat.SetNoSelection();
+ }
+ }
+ return 0;
+}
+
+IMPL_LINK( SvxNumberFormatTabPage, TimeHdl_Impl, Timer*, pT)
+{
+ pLastActivWindow=NULL;
+ return 0;
+}
+
+
+/*************************************************************************
+#* Methode: LostFocusHdl_Impl Datum:30.10.97
+#*------------------------------------------------------------------------
+#*
+#* Klasse: SvxNumberFormatTabPage
+#*
+#* Funktion: Fuehrt Aenderungen in den Zahlen- Attributen durch.
+#*
+#* Input: Options- Controls
+#*
+#* Output: ---
+#*
+#************************************************************************/
+
+IMPL_LINK( SvxNumberFormatTabPage, LostFocusHdl_Impl, Edit *, pEd)
+{
+ if (pEd==&aEdComment)
+ {
+ aResetWinTimer.Start();
+ aFtComment.SetText(aEdComment.GetText());
+ aEdComment.Hide();
+ aFtComment.Show();
+ if(!aIbAdd.IsEnabled())
+ {
+ USHORT nSelPos = (USHORT) aLbFormat.GetSelectEntryPos();
+ pNumFmtShell->SetComment4Entry(nSelPos,
+ aEdComment.GetText());
+ aEdComment.SetText(aLbCategory.GetEntry(1)); //String fuer Benutzerdefiniert
+ //holen
+ }
+ }
+ return 0;
+}
+
+/*************************************************************************
+#* Methode: NotifyChange Datum:02.10.97
+#*------------------------------------------------------------------------
+#*
+#* Klasse: SvxNumberFormatTabPage
+#*
+#* Funktion: Fuehrt Aenderungen in den Zahlen- Attributen durch.
+#*
+#* Input: Options- Controls
+#*
+#* Output: ---
+#*
+#************************************************************************/
+
+String SvxNumberFormatTabPage::GetExpColorString(Color *aPreviewColor,
+ String aFormatStr,
+ short nTmpCatPos)
+{
+ Color aTmpCol;
+ String aPreviewString;
+ String aTmpString;
+ double nVal=0;
+
+ aTmpString=aFormatStr;
+
+ switch (nTmpCatPos)
+ {
+ case CAT_CURRENCY: nVal=SVX_NUMVAL_CURRENCY; break;
+
+ case CAT_SCIENTIFIC:
+ case CAT_FRACTION:
+ case CAT_NUMBER: nVal=SVX_NUMVAL_STANDARD; break;
+
+ case CAT_PERCENT: nVal=SVX_NUMVAL_PERCENT; break;
+
+ case CAT_ALL: nVal=SVX_NUMVAL_STANDARD; break;
+
+ case CAT_TIME: nVal=SVX_NUMVAL_TIME; break;
+ case CAT_DATE: nVal=SVX_NUMVAL_DATE; break;
+
+ case CAT_BOOLEAN: nVal=SVX_NUMVAL_BOOLEAN; break;
+
+ case CAT_USERDEFINED:
+ case CAT_TEXT:
+ default: nVal=0;break;
+ }
+
+ pNumFmtShell->MakePrevStringFromVal( aTmpString, //@ 19.09.97
+ aPreviewString,
+ aTmpCol,nVal );
+
+ *aPreviewColor=aTmpCol;
+ return aPreviewString;
+}
+
+long SvxNumberFormatTabPage::PreNotify( NotifyEvent& rNEvt )
+{
+ if(rNEvt.GetType()==EVENT_LOSEFOCUS)
+ {
+ pLastActivWindow=rNEvt.GetWindow();
+ }
+
+ return SfxTabPage::PreNotify( rNEvt );
+}
+/*************************************************************************
+#* Methode: SetOkHdl Datum:01.11.97
+#*------------------------------------------------------------------------
+#*
+#* Klasse: SvxNumberFormatTabPage
+#*
+#* Funktion: Setzt den OkHandler neu.
+#*
+#* Input: Neuer OkHandler
+#*
+#* Output: ---
+#*
+#************************************************************************/
+
+void SvxNumberFormatTabPage::SetOkHdl( const Link& rOkHandler )
+{
+ fnOkHdl = rOkHandler;
+}
+
+void SvxNumberFormatTabPage::FillCurrencyBox()
+{
+ SvStringsDtor aList;
+ NfShCurrencyEntries rEntries;
+ XubString* pEntry = NULL;
+ USHORT nPos=0;
+ USHORT nSelPos=0;
+
+ pNumFmtShell->GetCurrencySymbols(aList,aStrEurope,&nSelPos);
+
+ for(USHORT i=1;i<aList.Count();i++)
+ {
+ pEntry=aList[i];
+ nPos=aLbCurrency.InsertEntry( *pEntry);
+ }
+ aLbCurrency.SelectEntryPos(nSelPos);
+}
+
+void SvxNumberFormatTabPage::SetCategory(USHORT nPos)
+{
+ USHORT nCurCategory = aLbCategory.GetSelectEntryPos();
+ Point aPos=aLbFormat.GetPosPixel();
+ Size aSize=aLbFormat.GetSizePixel();
+ USHORT nTmpCatPos;
+
+ if(bOneAreaFlag)
+ {
+ nTmpCatPos=nFixedCategory;
+ }
+ else
+ {
+ nTmpCatPos=nPos;
+ }
+
+ if(aLbCategory.GetEntryCount()==1 || nCurCategory!=nPos)
+ {
+ if(nTmpCatPos!=CAT_CURRENCY)
+ {
+ aPos.Y()=nStdFormatY;
+ aSize.Height()=nStdFormatHeight;
+ aLbFormat.SetPosSizePixel(aPos,aSize);
+ aLbCurrency.Hide();
+ }
+ else
+ {
+ aPos.Y()=nCurFormatY;
+ aSize.Height()=nCurFormatHeight;
+ aLbFormat.SetPosSizePixel(aPos,aSize);
+ aLbCurrency.Show();
+ }
+ }
+ aLbCategory.SelectEntryPos(nPos);
+}
+
+
diff --git a/svx/source/dialog/numfmt.hrc b/svx/source/dialog/numfmt.hrc
new file mode 100644
index 000000000000..fe9c63718c8a
--- /dev/null
+++ b/svx/source/dialog/numfmt.hrc
@@ -0,0 +1,110 @@
+/*************************************************************************
+ *
+ * $RCSfile: numfmt.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:10 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef _SVX_NUMFMT_HRC
+#define _SVX_NUMFMT_HRC
+
+// defines ------------------------------------------------------------------
+
+//================================================
+// allgemein:
+#define FT_PREVIEW 100
+
+//================================================
+// Zahlen-TabPage:
+#define WND_NUMBER_PREVIEW 2
+#define FT_CATEGORY 3
+#define FT_FORMAT 4
+#define FT_OPTIONS 5
+#define FT_EDFORMAT 6
+#define LB_CATEGORY 9
+#define LB_FORMAT 10
+#define GB_OPTIONS 11
+#define FT_LANGUAGE 12
+#define LB_LANGUAGE 13
+#define ED_FORMAT 14
+#define BTN_ADD 15
+#define BTN_REMOVE 16
+#define BMP_CHECK 17
+#define BMP_DCHECK 18
+#define BMP_CROSS 19
+#define BMP_DCROSS 20
+#define FT_DECIMALS 21
+#define ED_DECIMALS 22
+#define FT_LEADZEROES 23
+#define ED_LEADZEROES 24
+#define BTN_NEGRED 25
+#define BTN_THOUSAND 26
+#define FT_COMMENT 27
+#define ED_COMMENT 28
+#define IB_ADD 29
+#define IB_REMOVE 30
+#define IB_INFO 31
+#define IL_ICON 32
+#define LB_CURRENCY 33
+#define STR_EUROPE 34
+
+#define TBX_ADDREMOVE 1
+#define IID_ADD 1
+#define IID_REMOVE 2
+#define IID_INFO 3
+
+#endif
+
diff --git a/svx/source/dialog/numfmt.src b/svx/source/dialog/numfmt.src
new file mode 100644
index 000000000000..8fb45bf7a78e
--- /dev/null
+++ b/svx/source/dialog/numfmt.src
@@ -0,0 +1,1006 @@
+/*************************************************************************
+ *
+ * $RCSfile: numfmt.src,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:10 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+ // include ---------------------------------------------------------------
+#include "dialogs.hrc"
+#include "helpid.hrc"
+#include "numfmt.hrc"
+ // pragma ----------------------------------------------------------------
+
+ // RID_SVXPAGE_NUMBERFORMAT ----------------------------------------------
+TabPage RID_SVXPAGE_NUMBERFORMAT
+{
+ HelpId = HID_NUMBERFORMAT ;
+ Hide = TRUE ;
+ Text = "Zahlenformat" ;
+ Text [ English ] = "Numberformat" ;
+ Text [ norwegian ] = "Tallformat" ;
+ Text [ italian ] = "Formato numero" ;
+ Text [ portuguese_brazilian ] = "Numberformat" ;
+ Text [ portuguese ] = "Formato dos nmeros" ;
+ Text [ finnish ] = "Numberformat" ;
+ Text [ danish ] = "Talformat" ;
+ Text [ french ] = "Format numrique" ;
+ Text [ swedish ] = "Talformat" ;
+ Text [ dutch ] = "Getalnotatie" ;
+ Text [ spanish ] = "Formato numrico" ;
+ Text [ english_us ] = "Number Format" ;
+ Size = MAP_APPFONT ( 260 , 135 ) ;
+ FixedText FT_CATEGORY
+ {
+ Pos = MAP_APPFONT ( 6 , 3 ) ;
+ Size = MAP_APPFONT ( 70 , 10 ) ;
+ Text = "~Kategorie" ;
+ Text [ ENGLISH ] = "~Category" ;
+ Text [ norwegian ] = "~Category" ;
+ Text [ italian ] = "Categoria" ;
+ Text [ portuguese_brazilian ] = "~Categoria" ;
+ Text [ portuguese ] = "~Categoria" ;
+ Text [ finnish ] = "~Ryhm" ;
+ Text [ danish ] = "Kategori" ;
+ Text [ french ] = "~Catgorie" ;
+ Text [ swedish ] = "~Kategori" ;
+ Text [ dutch ] = "~Categorie" ;
+ Text [ spanish ] = "~Categora" ;
+ Text [ english_us ] = "~Category" ;
+ Text[ chinese_simplified ] = "(~C)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Kategoria";
+ Text[ japanese ] = "(~C)";
+ Text[ chinese_traditional ] = "(~C)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "īװ(~C)";
+ Text[ turkish ] = "~Kategori";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_CATEGORY
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 6 , 14 ) ;
+ Size = MAP_APPFONT ( 70 , 48 ) ;
+ AutoHScroll = TRUE ;
+ StringList =
+ {
+ < "Alle" ; Default ; > ;
+ < "Benutzerdefiniert" ; Default ; > ;
+ < "Zahl" ; Default ; > ;
+ < "Prozent" ; Default ; > ;
+ /* ### ACHTUNG: Neuer Eintrag in Liste? 5 : Whrung*/
+ < "Whrung" ; Default ; > ;
+ < "Datum" ; Default ; > ;
+ < "Zeit" ; Default ; > ;
+ < "Wissenschaft" ; Default ; > ;
+ < "Bruch" ; Default ; > ;
+ < "Wahrheitswert" ; Default ; > ;
+ < "Text" ; Default ; > ;
+ };
+ StringList [ ENGLISH ] =
+ {
+ < "Alle" ; Default ; > ;
+ < "Benutzerdefiniert" ; Default ; > ;
+ < "Zahl" ; Default ; > ;
+ < "Prozent" ; Default ; > ;
+ < "Whrung" ; Default ; > ;
+ < "Datum" ; Default ; > ;
+ < "Zeit" ; Default ; > ;
+ < "Wissenschaft" ; Default ; > ;
+ < "Bruch" ; Default ; > ;
+ < "Wahrheitswert" ; Default ; > ;
+ < "Text" ; Default ; > ;
+ };
+ StringList [ norwegian ] =
+ {
+ < "Alle" ; Default ; > ;
+ < "Benutzerdefiniert" ; Default ; > ;
+ < "Zahl" ; Default ; > ;
+ < "Prozent" ; Default ; > ;
+ < "Whrung" ; Default ; > ;
+ < "Datum" ; Default ; > ;
+ < "Zeit" ; Default ; > ;
+ < "Wissenschaft" ; Default ; > ;
+ < "Bruch" ; Default ; > ;
+ < "Wahrheitswert" ; Default ; > ;
+ < "Text" ; Default ; > ;
+ };
+ StringList [ italian ] =
+ {
+ < "Tutte" ; Default ; > ;
+ < "Definito dall'utente" ; Default ; > ;
+ < "num" ; Default ; > ;
+ < "Percentuale" ; Default ; > ;
+ < "Valuta" ; Default ; > ;
+ < "Data" ; Default ; > ;
+ < "Orario" ; Default ; > ;
+ < "Scientifico" ; Default ; > ;
+ < "Frazione" ; Default ; > ;
+ < "Valore booleano" ; Default ; > ;
+ < "Testo" ; Default ; > ;
+ };
+ StringList [ portuguese_brazilian ] =
+ {
+ < "Alle" ; Default ; > ;
+ < "Benutzerdefiniert" ; Default ; > ;
+ < "Zahl" ; Default ; > ;
+ < "Prozent" ; Default ; > ;
+ < "Whrung" ; Default ; > ;
+ < "Datum" ; Default ; > ;
+ < "Zeit" ; Default ; > ;
+ < "Wissenschaft" ; Default ; > ;
+ < "Bruch" ; Default ; > ;
+ < "Wahrheitswert" ; Default ; > ;
+ < "Texto" ; Default ; > ;
+ };
+ StringList [ portuguese ] =
+ {
+ < "Tudo" ; Default ; > ;
+ < "Defenido pelo utilizador" ; Default ; > ;
+ < "Nmero" ; Default ; > ;
+ < "Percentagem" ; Default ; > ;
+ < "Moeda" ; Default ; > ;
+ < "Data" ; Default ; > ;
+ < "Hora" ; Default ; > ;
+ < "Cientfico" ; Default ; > ;
+ < "Fraco" ; Default ; > ;
+ < "Valor lgico" ; Default ; > ;
+ < "Texto" ; Default ; > ;
+ };
+ StringList [ finnish ] =
+ {
+ < "Alle" ; Default ; > ;
+ < "Benutzerdefiniert" ; Default ; > ;
+ < "Zahl" ; Default ; > ;
+ < "Prozent" ; Default ; > ;
+ < "Whrung" ; Default ; > ;
+ < "Datum" ; Default ; > ;
+ < "Zeit" ; Default ; > ;
+ < "Wissenschaft" ; Default ; > ;
+ < "Bruch" ; Default ; > ;
+ < "Wahrheitswert" ; Default ; > ;
+ < "Text" ; Default ; > ;
+ };
+ StringList [ danish ] =
+ {
+ < "Alle" ; Default ; > ;
+ < "Brugerdefineret" ; Default ; > ;
+ < "Tal" ; Default ; > ;
+ < "Procent" ; Default ; > ;
+ < "Valuta" ; Default ; > ;
+ < "Dato" ; Default ; > ;
+ < "Klokkeslt" ; Default ; > ;
+ < "Videnskabelig" ; Default ; > ;
+ < "Brk" ; Default ; > ;
+ < "Logisk vrdi" ; Default ; > ;
+ < "Tekst" ; Default ; > ;
+ };
+ StringList [ french ] =
+ {
+ < "Tout" ; Default ; > ;
+ < "Dfini par l'utilisateur" ; Default ; > ;
+ < "Nombre" ; Default ; > ;
+ < "Pourcentage" ; Default ; > ;
+ < "Montaire" ; Default ; > ;
+ < "Date" ; Default ; > ;
+ < "Heure" ; Default ; > ;
+ < "Scientifique" ; Default ; > ;
+ < "Fraction" ; Default ; > ;
+ < "Valeur logique" ; Default ; > ;
+ < "Texte" ; Default ; > ;
+ };
+ StringList [ swedish ] =
+ {
+ < "Alla" ; Default ; > ;
+ < "Anvndardefinierad" ; Default ; > ;
+ < "Tal" ; Default ; > ;
+ < "Procent" ; Default ; > ;
+ < "Valuta" ; Default ; > ;
+ < "Datum" ; Default ; > ;
+ < "Tid" ; Default ; > ;
+ < "Vetenskap" ; Default ; > ;
+ < "Brk" ; Default ; > ;
+ < "Sannolikhet" ; Default ; > ;
+ < "Text" ; Default ; > ;
+ };
+ StringList [ dutch ] =
+ {
+ < "Alle" ; Default ; > ;
+ < "Gebruikergedefinieerd" ; Default ; > ;
+ < "Getal" ; Default ; > ;
+ < "Procent" ; Default ; > ;
+ < "Valuta" ; Default ; > ;
+ < "Datum" ; Default ; > ;
+ < "Tijd" ; Default ; > ;
+ < "Wetenschap" ; Default ; > ;
+ < "Breuk" ; Default ; > ;
+ < "Logische waarde" ; Default ; > ;
+ < "Tekst" ; Default ; > ;
+ };
+ StringList [ spanish ] =
+ {
+ < "Todos" ; Default ; > ;
+ < "Definido por el usuario" ; Default ; > ;
+ < "Nmero" ; Default ; > ;
+ < "Porcentaje" ; Default ; > ;
+ < "Moneda" ; Default ; > ;
+ < "Fecha" ; Default ; > ;
+ < "Hora" ; Default ; > ;
+ < "Ciencia" ; Default ; > ;
+ < "Fraccin" ; Default ; > ;
+ < "Valor lgico" ; Default ; > ;
+ < "Texto" ; Default ; > ;
+ };
+ StringList [ english_us ] =
+ {
+ < "All" ; Default ; > ;
+ < "User-defined" ; Default ; > ;
+ < "Number" ; Default ; > ;
+ < "Percent" ; Default ; > ;
+ < "Currency" ; Default ; > ;
+ < "Date" ; Default ; > ;
+ < "Time" ; Default ; > ;
+ < "Scientific" ; Default ; > ;
+ < "Fraction" ; Default ; > ;
+ < "Boolean Value" ; Default ; > ;
+ < "Text" ; Default ; > ;
+ };
+ StringList [ chinese_simplified ] =
+ {
+ < "ȫ" ; Default ; > ;
+ < "ʹԶ" ; Default ; > ;
+ < "" ; Default ; > ;
+ < "ٷֱ" ; Default ; > ;
+ < "" ; Default ; > ;
+ < "" ; Default ; > ;
+ < "ʱ" ; Default ; > ;
+ < "ѧ" ; Default ; > ;
+ < "" ; Default ; > ;
+ < "߼ֵ" ; Default ; > ;
+ < "" ; Default ; > ;
+ };
+ StringList [ russian ] =
+ {
+ < "" ; Default ; > ;
+ < " " ; Default ; > ;
+ < "" ; Default ; > ;
+ < "" ; Default ; > ;
+ < "" ; Default ; > ;
+ < "" ; Default ; > ;
+ < "" ; Default ; > ;
+ < "" ; Default ; > ;
+ < " " ; Default ; > ;
+ < " " ; Default ; > ;
+ < "" ; Default ; > ;
+ };
+ StringList [ polish ] =
+ {
+ < "Wszystkie" ; Default ; > ;
+ < "Zdefin. przez uytk." ; Default ; > ;
+ < "Liczba" ; Default ; > ;
+ < "Procent" ; Default ; > ;
+ < "Waluta" ; Default ; > ;
+ < "Data" ; Default ; > ;
+ < "Czas" ; Default ; > ;
+ < "Nauka" ; Default ; > ;
+ < "Uamek" ; Default ; > ;
+ < "Warto logiczna" ; Default ; > ;
+ < "Tekst" ; Default ; > ;
+ };
+ StringList [ japanese ] =
+ {
+ < "ׂ" ; Default ; > ;
+ < "հްݒ" ; Default ; > ;
+ < "l" ; Default ; > ;
+ < "߰ð" ; Default ; > ;
+ < "ʉ" ; Default ; > ;
+ < "t" ; Default ; > ;
+ < "" ; Default ; > ;
+ < "Ȋw" ; Default ; > ;
+ < "" ; Default ; > ;
+ < "_l" ; Default ; > ;
+ < "÷" ; Default ; > ;
+ };
+ StringList [ chinese_traditional ] =
+ {
+ < "" ; Default ; > ;
+ < "ۭq" ; Default ; > ;
+ < "Ʀr" ; Default ; > ;
+ < "ʤ" ; Default ; > ;
+ < "f" ; Default ; > ;
+ < "" ; Default ; > ;
+ < "ɶ" ; Default ; > ;
+ < "" ; Default ; > ;
+ < "" ; Default ; > ;
+ < "" ; Default ; > ;
+ < "r" ; Default ; > ;
+ };
+ StringList [ arabic ] =
+ {
+ < "" ; Default ; > ;
+ < " " ; Default ; > ;
+ < "" ; Default ; > ;
+ < " " ; Default ; > ;
+ < "" ; Default ; > ;
+ < "" ; Default ; > ;
+ < "" ; Default ; > ;
+ < "" ; Default ; > ;
+ < "" ; Default ; > ;
+ < " " ; Default ; > ;
+ < "" ; Default ; > ;
+ };
+ StringList [ greek ] =
+ {
+ < "" ; Default ; > ;
+ < "" ; Default ; > ;
+ < "" ; Default ; > ;
+ < " (%)" ; Default ; > ;
+ < "" ; Default ; > ;
+ < "" ; Default ; > ;
+ < "" ; Default ; > ;
+ < "" ; Default ; > ;
+ < "" ; Default ; > ;
+ < " " ; Default ; > ;
+ < "" ; Default ; > ;
+ };
+ StringList [ korean ] =
+ {
+ < "" ; Default ; > ;
+ < " " ; Default ; > ;
+ < "" ; Default ; > ;
+ < "ۼƮ" ; Default ; > ;
+ < "ȭ" ; Default ; > ;
+ < "¥" ; Default ; > ;
+ < "ð" ; Default ; > ;
+ < "" ; Default ; > ;
+ < "м" ; Default ; > ;
+ < " " ; Default ; > ;
+ < "ؽƮ" ; Default ; > ;
+ };
+ StringList [ turkish ] =
+ {
+ < "Tm" ; Default ; > ;
+ < "Kullanc tanml" ; Default ; > ;
+ < "Say" ; Default ; > ;
+ < "Yzde" ; Default ; > ;
+ < "Para birimi" ; Default ; > ;
+ < "Tarih" ; Default ; > ;
+ < "Saat" ; Default ; > ;
+ < "Bilimsel" ; Default ; > ;
+ < "Kesir" ; Default ; > ;
+ < "Mantksal deer" ; Default ; > ;
+ < "Metin" ; Default ; > ;
+ };
+ StringList [ language_user1 ] =
+ {
+ < " " ; Default ; > ;
+ < " " ; Default ; > ;
+ < " " ; Default ; > ;
+ < " " ; Default ; > ;
+ < " " ; Default ; > ;
+ < " " ; Default ; > ;
+ < " " ; Default ; > ;
+ < " " ; Default ; > ;
+ < " " ; Default ; > ;
+ < " " ; Default ; > ;
+ < " " ; Default ; > ;
+ };
+ };
+ FixedText FT_EDFORMAT
+ {
+ Pos = MAP_APPFONT ( 6 , 92 ) ;
+ Size = MAP_APPFONT ( 114 , 10 ) ;
+ Text = "Format-~Code" ;
+ Text [ ENGLISH ] = "Format-~Description" ;
+ Text [ norwegian ] = "Format-~Beskrivelse" ;
+ Text [ italian ] = "Codice del formato" ;
+ Text [ portuguese_brazilian ] = "Formato-~Descrio" ;
+ Text [ portuguese ] = "Cdigo do formato" ;
+ Text [ finnish ] = "Muodon ~kuvaus" ;
+ Text [ danish ] = "Format-kode" ;
+ Text [ french ] = "~Description de format" ;
+ Text [ swedish ] = "Format~beskrivning" ;
+ Text [ dutch ] = "F~ormaatcode" ;
+ Text [ spanish ] = "Cdigo del for~mato" ;
+ Text [ english_us ] = "Format c~ode" ;
+ Text[ chinese_simplified ] = "ʽ(~O)";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Kod formatu";
+ Text[ japanese ] = "(~O)";
+ Text[ chinese_traditional ] = "榡X(~O)";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ڵ(~O)";
+ Text[ turkish ] = "Format ~kodu";
+ Text[ language_user1 ] = " ";
+ };
+ Edit ED_FORMAT
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 6 , 102 ) ;
+ Size = MAP_APPFONT ( 114 , 12 ) ;
+ };
+ FixedText FT_COMMENT
+ {
+ Pos = MAP_APPFONT ( 6 , 117 ) ;
+ Size = MAP_APPFONT ( 144 , 24 ) ;
+ WordBreak = TRUE ;
+ };
+ Edit ED_COMMENT
+ {
+ Hide = TRUE ;
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 6 , 117 ) ;
+ Size = MAP_APPFONT ( 141 , 12 ) ;
+ };
+ FixedText FT_FORMAT
+ {
+ Pos = MAP_APPFONT ( 82 , 3 ) ;
+ Size = MAP_APPFONT ( 60 , 10 ) ;
+ Text = "~Format" ;
+ Text [ ENGLISH ] = "~Format" ;
+ Text [ norwegian ] = "~Format" ;
+ Text [ italian ] = "Formato" ;
+ Text [ portuguese_brazilian ] = "~Formato" ;
+ Text [ portuguese ] = "Fo~rmatar" ;
+ Text [ finnish ] = "~Muoto" ;
+ Text [ danish ] = "~Format" ;
+ Text [ french ] = "Forma~t" ;
+ Text [ swedish ] = "~Format" ;
+ Text [ dutch ] = "~Formaat" ;
+ Text [ spanish ] = "~Formato" ;
+ Text [ english_us ] = "F~ormat" ;
+ Text[ chinese_simplified ] = "ʽ(~O)";
+ Text[ russian ] = "~";
+ Text[ polish ] = "Format";
+ Text[ japanese ] = "(~O)";
+ Text[ chinese_traditional ] = "榡(~O)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "~";
+ Text[ korean ] = "(~O)";
+ Text[ turkish ] = "~Format";
+ Text[ language_user1 ] = " ";
+ };
+
+ ListBox LB_CURRENCY
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 82 , 14 ) ;
+ Size = MAP_APPFONT ( 90 , 75 ) ;
+ DropDown = TRUE ;
+ TabStop = TRUE ;
+
+ StringList=
+ {
+ < "Automatisch" ; Default ; > ;
+ };
+
+ StringList[ENGLISH]=
+ {
+ < "Automatisch" ; Default ; > ;
+ };
+
+ StringList [ language_user1 ] =
+ {
+ < " " ; Default ; > ;
+ };
+ StringList [ english_us ] =
+ {
+ < "Automatically" ; Default ; > ;
+ };
+ StringList [ portuguese ] =
+ {
+ < "Automtico" ; Default ; > ;
+ };
+ StringList [ russian ] =
+ {
+ < "" ; Default ; > ;
+ };
+ StringList [ dutch ] =
+ {
+ < "Automatisch" ; Default ; > ;
+ };
+ StringList [ french ] =
+ {
+ < "Automatique" ; Default ; > ;
+ };
+ StringList [ spanish ] =
+ {
+ < "Automtico" ; Default ; > ;
+ };
+ StringList [ italian ] =
+ {
+ < "Automatico" ; Default ; > ;
+ };
+ StringList [ danish ] =
+ {
+ < "Automatisk" ; Default ; > ;
+ };
+ StringList [ swedish ] =
+ {
+ < "Automatisk" ; Default ; > ;
+ };
+ StringList [ polish ] =
+ {
+ < "Automatycznie" ; Default ; > ;
+ };
+ StringList [ portuguese_brazilian ] =
+ {
+ < "Automatisch" ; Default ; > ;
+ };
+ StringList [ japanese ] =
+ {
+ < "" ; Default ; > ;
+ };
+ StringList [ chinese_simplified ] =
+ {
+ < "Զ" ; Default ; > ;
+ };
+ StringList [ chinese_traditional ] =
+ {
+ < "۰" ; Default ; > ;
+ };
+ StringList [ arabic ] =
+ {
+ < "" ; Default ; > ;
+ };
+ StringList [ greek ] =
+ {
+ < "" ; Default ; > ;
+ };
+ StringList [ korean ] =
+ {
+ < "ڵ" ; Default ; > ;
+ };
+ StringList [ turkish ] =
+ {
+ < "Otomatik" ; Default ; > ;
+ };
+ };
+
+ Control LB_FORMAT
+ {
+ HelpId = HID_NUMBERFORMAT_LB_FORMAT ;
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 82 , 30 ) ;
+ Size = MAP_APPFONT ( 90 , 59 ) ;
+ TabStop = TRUE ;
+ };
+
+ FixedText FT_DECIMALS
+ {
+ Pos = MAP_APPFONT ( 184 , 15 ) ;
+ Size = MAP_APPFONT ( 69 , 10 ) ;
+ Text = "N~achkommastellen" ;
+ Text [ ENGLISH ] = "~Precision" ;
+ Text [ norwegian ] = "~Precision" ;
+ Text [ italian ] = "Posizioni decimali" ;
+ Text [ portuguese_brazilian ] = "~Preciso" ;
+ Text [ portuguese ] = "Casas ~decimais" ;
+ Text [ finnish ] = "~Tarkkuus" ;
+ Text [ danish ] = "Antal decimaler" ;
+ Text [ french ] = "~Dcimales" ;
+ Text [ swedish ] = "~Decimalpositioner" ;
+ Text [ dutch ] = "~Aantal decimalen" ;
+ Text [ spanish ] = "~Decimales" ;
+ Text [ english_us ] = "~Decimal places" ;
+ Text[ chinese_simplified ] = "Сλ(~D)";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Miejsca po przecinku";
+ Text[ japanese ] = "_ȉ̌(~D)";
+ Text[ chinese_traditional ] = "pI᪺(~D)";
+ Text[ arabic ] = " ";
+ Text[ greek ] = "~ ";
+ Text[ korean ] = "Ҽ ڸ(~D)";
+ Text[ turkish ] = "~Ondalk haneler";
+ Text[ language_user1 ] = " ";
+ };
+ NumericField ED_DECIMALS
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 184 , 26 ) ;
+ Size = MAP_APPFONT ( 24 , 12 ) ;
+ Spin = TRUE ;
+ Maximum = 20 ;
+ Last = 15 ;
+ First = 0 ;
+ StrictFormat = TRUE ;
+ SpinSize = 1 ;
+ Repeat = TRUE ;
+ };
+ FixedText FT_LEADZEROES
+ {
+ Pos = MAP_APPFONT ( 184 , 41 ) ;
+ Size = MAP_APPFONT ( 69 , 10 ) ;
+ /* ### ACHTUNG: Neuer Text in Resource? Fhrende ~Nullen : Fhrende ~Nullen */
+ Text = "Fhrende ~Nullen" ;
+ Text [ ENGLISH ] = "~Leading Zeroes" ;
+ Text [ norwegian ] = "~Ledende nuller" ;
+ Text [ italian ] = "~Zeri iniziali" ;
+ Text [ portuguese_brazilian ] = "~Zeros esquerda" ;
+ Text [ portuguese ] = "~Zeros esquerda" ;
+ Text [ finnish ] = "~Alkunollat" ;
+ Text [ danish ] = "Indledende nuller" ;
+ Text [ french ] = "~Zro(s) non significatif(s)" ;
+ Text [ swedish ] = "Inledande ~nollor" ;
+ Text [ dutch ] = "~Voorloopnullen" ;
+ Text [ spanish ] = "Ceros a la i~zquierda" ;
+ Text [ english_us ] = "Leading ~zeroes" ;
+ Text[ chinese_simplified ] = "ǰ(~Z)";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Zera wiodce";
+ Text[ japanese ] = "擪̾(~Z)";
+ Text[ chinese_traditional ] = "ems(~Z)";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ~";
+ Text[ korean ] = " (~Z)";
+ Text[ turkish ] = "Virgl ncesi ~sfr says";
+ Text[ language_user1 ] = " ";
+ };
+ NumericField ED_LEADZEROES
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( 184 , 52 ) ;
+ Size = MAP_APPFONT ( 24 , 12 ) ;
+ Spin = TRUE ;
+ Maximum = 20 ;
+ Last = 15 ;
+ First = 0 ;
+ StrictFormat = TRUE ;
+ SpinSize = 1 ;
+ Repeat = TRUE ;
+ };
+ CheckBox BTN_NEGRED
+ {
+ Pos = MAP_APPFONT ( 184 , 69 ) ;
+ Size = MAP_APPFONT ( 68 , 10 ) ;
+ Text = "Negativ in ~Rot" ;
+ Text [ ENGLISH ] = "~Mark negative red" ;
+ Text [ norwegian ] = "~Marker negativ rd Mark negative red" ;
+ Text [ italian ] = "Valori negativi in rosso" ;
+ Text [ portuguese_brazilian ] = "~Marca vermelho negativo" ;
+ Text [ portuguese ] = "Negativos em ~vermelho" ;
+ Text [ finnish ] = "~Negatiiviset punaisella" ;
+ Text [ danish ] = "Rde negative tal" ;
+ Text [ french ] = "~Nbres ng. en rouge" ;
+ Text [ swedish ] = "Negativa vrden i ~rtt" ;
+ Text [ dutch ] = "~Negatieve getallen rood" ;
+ Text [ spanish ] = "~Negativo en rojo" ;
+ Text [ english_us ] = "~Negative numbers red" ;
+ Text[ chinese_simplified ] = "úɫʾֵ(~N)";
+ Text[ russian ] = ". . ";
+ Text[ polish ] = "Licz~by ujemne w kolorze czerwonym";
+ Text[ japanese ] = "ϲŽ̐͐Ԏ(~N)";
+ Text[ chinese_traditional ] = "άܭt(~N)";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = "̳ʽ ȣ (~N)";
+ Text[ turkish ] = "Negatif saylar ~krmz";
+ Text[ language_user1 ] = " ";
+ };
+ CheckBox BTN_THOUSAND
+ {
+ Pos = MAP_APPFONT ( 184 , 81 ) ;
+ Size = MAP_APPFONT ( 68 , 10 ) ;
+ Text = "~Tausenderpunkt" ;
+ Text [ ENGLISH ] = "~Thousands point" ;
+ Text [ norwegian ] = "~Tusen punkter Thousands point" ;
+ Text [ italian ] = "Separatore migliaia" ;
+ Text [ portuguese_brazilian ] = "~Ponto da casa dos milhares" ;
+ Text [ portuguese ] = "Casa dos ~milhares" ;
+ Text [ finnish ] = "~Tuhaterotin" ;
+ Text [ danish ] = "Tusindtalsseparator" ;
+ Text [ french ] = "~Sparateur de milliers" ;
+ Text [ swedish ] = "~Tusentalsavgrnsare" ;
+ Text [ dutch ] = "~Scheidingsteken duizendtallen" ;
+ Text [ spanish ] = "~Separador de miles" ;
+ Text [ english_us ] = "~Thousands separator" ;
+ Text[ chinese_simplified ] = "ǧλ(~T)";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Separator tysiczny";
+ Text[ japanese ] = "Pʂ̌؂(~T)";
+ Text[ chinese_traditional ] = "dI(~T)";
+ Text[ arabic ] = " ";
+ Text[ greek ] = "~ ";
+ Text[ korean ] = "õ (~T)";
+ Text[ turkish ] = "~Binlik ayrcs";
+ Text[ language_user1 ] = " ";
+ };
+ GroupBox GB_OPTIONS
+ {
+ Pos = MAP_APPFONT ( 178 , 3 ) ;
+ Size = MAP_APPFONT ( 76 , 93 ) ;
+ Text = "Optionen" ;
+ Text [ ENGLISH ] = "Options" ;
+ Text [ norwegian ] = "Options" ;
+ Text [ italian ] = "Opzioni" ;
+ Text [ portuguese_brazilian ] = "Opes" ;
+ Text [ portuguese ] = "Opes" ;
+ Text [ finnish ] = "Mritykset" ;
+ Text [ danish ] = "Indstillinger" ;
+ Text [ french ] = "Options" ;
+ Text [ swedish ] = "Alternativ" ;
+ Text [ dutch ] = "Opties" ;
+ Text [ spanish ] = "Opciones" ;
+ Text [ english_us ] = "Options" ;
+ Text[ chinese_simplified ] = "ѡ";
+ Text[ russian ] = "";
+ Text[ polish ] = "Opcje";
+ Text[ japanese ] = "߼";
+ Text[ chinese_traditional ] = "ﶵ";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "ɼ";
+ Text[ turkish ] = "Seenekler";
+ Text[ language_user1 ] = " ";
+ };
+ FixedText FT_LANGUAGE
+ {
+ Pos = MAP_APPFONT ( 6 , 66 ) ;
+ Size = MAP_APPFONT ( 60 , 10 ) ;
+ Text = "S~prache" ;
+ Text [ ENGLISH ] = "~Language" ;
+ Text [ norwegian ] = "~Language" ;
+ Text [ italian ] = "Lingua" ;
+ Text [ portuguese_brazilian ] = "~Idioma" ;
+ Text [ portuguese ] = "~Lngua" ;
+ Text [ finnish ] = "K~ieli" ;
+ Text [ danish ] = "Sprog" ;
+ Text [ french ] = "~Langue" ;
+ Text [ swedish ] = "S~prk" ;
+ Text [ dutch ] = "~Taal" ;
+ Text [ spanish ] = "~Idioma" ;
+ Text [ english_us ] = "~Language" ;
+ Text[ chinese_simplified ] = "(~L)";
+ Text[ russian ] = "";
+ Text[ polish ] = "Jzyk";
+ Text[ japanese ] = "(~L)";
+ Text[ chinese_traditional ] = "y(~L)";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "(~L)";
+ Text[ turkish ] = "~Dil";
+ Text[ language_user1 ] = " ";
+ };
+ ListBox LB_LANGUAGE
+ {
+ Border = TRUE ;
+ Sort = TRUE ;
+ Pos = MAP_APPFONT ( 6 , 76 ) ;
+ Size = MAP_APPFONT ( 70 , 60 ) ;
+ DropDown = TRUE ;
+ };
+ FixedText FT_PREVIEW
+ {
+ Pos = MAP_APPFONT ( 178 , 102 ) ;
+ Size = MAP_APPFONT ( 76 , 10 ) ;
+ Text = "Vorschau" ;
+ Text [ ENGLISH ] = "Preview" ;
+ Text [ norwegian ] = "Preview" ;
+ Text [ italian ] = "Anteprima" ;
+ Text [ portuguese_brazilian ] = "Examinar" ;
+ Text [ portuguese ] = "Previsualizar" ;
+ Text [ finnish ] = "Esikatselu" ;
+ Text [ danish ] = "Eksempel" ;
+ Text [ french ] = "Aperu" ;
+ Text [ swedish ] = "Frhandsvisning" ;
+ Text [ dutch ] = "Voorbeeld" ;
+ Text [ spanish ] = "Previsualizacin" ;
+ Text [ english_us ] = "Preview" ;
+ Text[ chinese_simplified ] = "Ԥ";
+ Text[ russian ] = "";
+ Text[ polish ] = "Podgld";
+ Text[ japanese ] = "ޭ";
+ Text[ chinese_traditional ] = "w";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "̸ ";
+ Text[ turkish ] = "nizleme";
+ Text[ language_user1 ] = " ";
+ };
+ Window WND_NUMBER_PREVIEW
+ {
+ Border = TRUE ;
+ SVLook = TRUE ;
+ Pos = MAP_APPFONT ( 178 , 114 ) ;
+ Size = MAP_APPFONT ( 76 , 18 ) ;
+ };
+ ImageButton IB_ADD
+ {
+ SVLook = TRUE ;
+ Pos = MAP_APPFONT ( 123 , 102 ) ;
+ Size = MAP_APPFONT ( 12 , 12 ) ;
+ HelpId = HID_NUMBERFORMAT_TBI_ADD ;
+ QuickHelpText = "Hinzufgen" ;
+ QuickHelpText [ ENGLISH ] = "Add" ;
+ QuickHelpText [ norwegian ] = "Add" ;
+ QuickHelpText [ italian ] = "Aggiungi" ;
+ QuickHelpText [ portuguese_brazilian ] = "Acrescentar" ;
+ QuickHelpText [ portuguese ] = "Adicionar" ;
+ QuickHelpText [ finnish ] = "Lis" ;
+ QuickHelpText [ danish ] = "Tilfj" ;
+ QuickHelpText [ french ] = "Ajouter" ;
+ QuickHelpText [ swedish ] = "Lgg till" ;
+ QuickHelpText [ dutch ] = "Toevoegen" ;
+ QuickHelpText [ spanish ] = "Agregar" ;
+ QuickHelpText [ english_us ] = "Add" ;
+ // ### ACHTUNG: Neuer Text in Resource? Hinzufgen : Hinzufgen
+ // ### ACHTUNG: Neuer Text in Resource? Neues Zahlenformat hinzufgen : Neues Zahlenformat hinzufgen
+ QuickHelpText[ russian ] = "";
+ QuickHelpText[ polish ] = "Dodaj";
+ QuickHelpText[ japanese ] = "lj";
+ QuickHelpText[ chinese_simplified ] = "";
+ QuickHelpText[ chinese_traditional ] = "W[";
+ QuickHelpText[ arabic ] = "";
+ QuickHelpText[ greek ] = "";
+ QuickHelpText[ korean ] = "Add";
+ QuickHelpText[ language_user1 ] = " ";
+ QuickHelpText[ language_user1 ] = " ";
+ QuickHelpText[ language_user1 ] = " ";
+ };
+ ImageButton IB_REMOVE
+ {
+ SVLook = TRUE ;
+ Pos = MAP_APPFONT ( 149 , 102 ) ;
+ Size = MAP_APPFONT ( 12 , 12 ) ;
+ HelpId = HID_NUMBERFORMAT_TBI_REMOVE ;
+ QuickHelpText = "Entfernen" ;
+ QuickHelpText [ ENGLISH ] = "Remove" ;
+ QuickHelpText [ norwegian ] = "Fjern" ;
+ QuickHelpText [ italian ] = "Rimuovi" ;
+ QuickHelpText [ portuguese_brazilian ] = "Remover" ;
+ QuickHelpText [ portuguese ] = "Remover" ;
+ QuickHelpText [ finnish ] = "Poista" ;
+ QuickHelpText [ danish ] = "Fjern" ;
+ QuickHelpText [ french ] = "Supprimer" ;
+ QuickHelpText [ swedish ] = "Ta bort" ;
+ QuickHelpText [ dutch ] = "Verwijderen" ;
+ QuickHelpText [ spanish ] = "Eliminar" ;
+ QuickHelpText [ english_us ] = "Remove" ;
+ // ### ACHTUNG: Neuer Text in Resource? Zahlenformat lschen : Zahlenformat lschen
+ QuickHelpText[ russian ] = "";
+ QuickHelpText[ polish ] = "Usu";
+ QuickHelpText[ japanese ] = "폜";
+ QuickHelpText[ chinese_simplified ] = "ɾ";
+ QuickHelpText[ chinese_traditional ] = "R";
+ QuickHelpText[ arabic ] = "";
+ QuickHelpText[ greek ] = "";
+ QuickHelpText[ korean ] = "Remove";
+ QuickHelpText[ language_user1 ] = " ";
+ QuickHelpText[ language_user1 ] = " ";
+ QuickHelpText[ language_user1 ] = " ";
+ };
+ ImageButton IB_INFO
+ {
+ SVLook = TRUE ;
+ Pos = MAP_APPFONT ( 135 , 102 ) ;
+ Size = MAP_APPFONT ( 12 , 12 ) ;
+ HelpId = HID_NUMBERFORMAT_TBI_INFO ;
+ QuickHelpText = "Kommentar ndern" ;
+ QuickHelpText [ ENGLISH ] = "Change comment" ;
+ QuickHelpText [ english_us ] = "Edit Comment" ;
+ QuickHelpText [ portuguese_brazilian ] = "Kommentar ndern" ;
+ QuickHelpText [ swedish ] = "ndra kommentar" ;
+ QuickHelpText [ danish ] = "Modificer kommentar" ;
+ QuickHelpText [ italian ] = "Cambia commento" ;
+ QuickHelpText [ spanish ] = "Modificar comentario" ;
+ QuickHelpText [ french ] = "Modifier le commentaire" ;
+ QuickHelpText [ dutch ] = "Commentaar wijzigen" ;
+ QuickHelpText [ portuguese ] = "Edita comentrio" ;
+ QuickHelpText[ russian ] = " ";
+ QuickHelpText[ polish ] = "Zmie komentarz";
+ QuickHelpText[ japanese ] = "Ă̕ύX";
+ QuickHelpText[ chinese_simplified ] = "༭";
+ QuickHelpText[ chinese_traditional ] = "ܧy";
+ QuickHelpText[ arabic ] = " ";
+ QuickHelpText[ greek ] = " ";
+ QuickHelpText[ korean ] = "Edit Comment";
+ QuickHelpText[ language_user1 ] = " ";
+ QuickHelpText[ language_user1 ] = " ";
+ QuickHelpText[ language_user1 ] = " ";
+ };
+ ImageList IL_ICON
+ {
+ ImageBitmap = Bitmap { File = "numfmt.bmp" ; };
+ MaskColor = Color { Red = 0xC000 ; Green = 0xC000 ; Blue = 0xC000 ; };
+ IdList =
+ {
+ IID_ADD ;
+ IID_REMOVE ;
+ IID_INFO ;
+ };
+ IdCount = { 3 ; };
+ };
+
+ String STR_EUROPE
+ {
+ Text = "Europa" ;
+ Text [ ENGLISH ] = "Europe" ;
+ Text[ english_us ] = "Europe";
+ Text[ portuguese ] = "Europa";
+ Text[ russian ] = "";
+ Text[ dutch ] = "Europa";
+ Text[ french ] = "Europe";
+ Text[ spanish ] = "Europa";
+ Text[ italian ] = "Europa";
+ Text[ danish ] = "Europa";
+ Text[ swedish ] = "Europa";
+ Text[ polish ] = "Europa";
+ Text[ portuguese_brazilian ] = "Europe";
+ Text[ japanese ] = "ְۯ";
+ Text[ chinese_simplified ] = "ŷ";
+ Text[ chinese_traditional ] = "ڬw";
+ Text[ arabic ] = "";
+ Text[ greek ] = "";
+ Text[ korean ] = "";
+ Text[ turkish ] = "Avrupa";
+ Text[ language_user1 ] = " ";
+ };
+
+ Text[ chinese_simplified ] = "ָʽ";
+ Text[ russian ] = " ";
+ Text[ polish ] = "Format liczb";
+ Text[ japanese ] = "̏";
+ Text[ chinese_traditional ] = "Ʀr榡";
+ Text[ arabic ] = " ";
+ Text[ greek ] = " ";
+ Text[ korean ] = " ";
+ Text[ turkish ] = "Say format";
+ Text[ language_user1 ] = " ";
+};
+ // ********************************************************************** EOF
diff --git a/svx/source/dialog/numpages.cxx b/svx/source/dialog/numpages.cxx
new file mode 100644
index 000000000000..662dbf968f2e
--- /dev/null
+++ b/svx/source/dialog/numpages.cxx
@@ -0,0 +1,3702 @@
+/*************************************************************************
+ *
+ * $RCSfile: numpages.cxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:01:10 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#pragma hdrstop
+
+#include <numpages.hxx>
+#include <numpages.hrc>
+#ifndef _SVX_DIALMGR_HXX //autogen
+#include <dialmgr.hxx>
+#endif
+#ifndef _SVX_DIALOGS_HRC
+#include <dialogs.hrc>
+#endif
+#ifndef _SHL_HXX
+#include <tools/shl.hxx>
+#endif
+#ifndef _VALUESET_HXX //autogen
+#include <svtools/valueset.hxx>
+#endif
+#ifndef _SVX_HELPID_HRC
+#include <helpid.hrc>
+#endif
+#ifndef _SVX_NUMITEM_HXX
+#include <numitem.hxx>
+#endif
+#ifndef _SFXENUMITEM_HXX //autogen
+#include <svtools/eitem.hxx>
+#endif
+#ifndef _SV_SYSTEM_HXX //autogen
+#include <vcl/system.hxx>
+#endif
+#ifndef _GALLERY_HXX_ //autogen
+#include <gallery.hxx>
+#endif
+#ifndef SVTOOLS_URIHELPER_HXX
+#include <svtools/urihelper.hxx>
+#endif
+#define ITEMID_BRUSH SID_ATTR_BRUSH
+#ifndef _SVX_BRSHITEM_HXX //autogen
+#include <brshitem.hxx>
+#endif
+#ifndef _SFXINTITEM_HXX //autogen
+#include <svtools/intitem.hxx>
+#endif
+#ifndef _SFX_OBJSH_HXX //autogen
+#include <sfx2/objsh.hxx>
+#endif
+#ifndef _SV_GRAPH_HXX //autogen
+#include <vcl/graph.hxx>
+#endif
+#ifndef _SVX_IMPGRF_HXX //autogen
+#include <impgrf.hxx>
+#endif
+#ifndef _SV_MSGBOX_HXX //autogen
+#include <vcl/msgbox.hxx>
+#endif
+#ifndef _SVX_CHARMAP_HXX //autogen
+#include <charmap.hxx>
+#endif
+#ifndef _SVX_DLGUTIL_HXX
+#include <dlgutil.hxx>
+#endif
+#ifndef _XTABLE_HXX //autogen
+#define ITEMID_COLOR_TABLE SID_COLOR_TABLE
+#include <xtable.hxx>
+#endif
+#ifndef _SVX_DRAWITEM_HXX //autogen
+#include <drawitem.hxx>
+#endif
+#ifndef _SFX_INIMGR_HXX //autogen
+#include <sfx2/inimgr.hxx>
+#endif
+#ifndef _SVX_NUMVSET_HXX
+#include <numvset.hxx>
+#endif
+#ifndef _SVX_HTMLMODE_HXX //autogen
+#include <htmlmode.hxx>
+#endif
+
+/*-----------------07.02.97 15.37-------------------
+
+--------------------------------------------------*/
+#define NUM_PAGETYPE_BULLET 0
+#define NUM_PAGETYPE_SINGLENUM 1
+#define NUM_PAGETYPE_NUM 2
+#define NUM_PAGETYPE_BMP 3
+#define PAGETYPE_USER_START 10
+
+
+#define SHOW_NUMBERING 0
+#define SHOW_BULLET 1
+#define SHOW_BITMAP 2
+
+#define MAX_BMP_WIDTH 16
+#define MAX_BMP_HEIGHT 16
+
+static BOOL bLastRelative = FALSE;
+
+/* -----------------27.10.98 15:40-------------------
+ *
+ * --------------------------------------------------*/
+static const sal_Char aSglPostPreFixes[] =
+{
+ ' ', ')',
+ ' ', '.',
+ '(', ')',
+ ' ', '.',
+ ' ', ')',
+ ' ', ')',
+ '(', ')',
+ ' ', '.'
+};
+/* -----------------27.10.98 15:42-------------------
+ *
+ * --------------------------------------------------*/
+static const SvxExtNumType aSglNumTypes[] =
+{
+ SVX_NUM_ARABIC, // 1),2),3)...
+ SVX_NUM_ARABIC, // 1.,2.,3. ...
+ SVX_NUM_ARABIC, // (1),(2),(3)...
+ SVX_NUM_ROMAN_UPPER, // I.,II. ...
+ SVX_NUM_CHARS_UPPER_LETTER, // A),B)...
+ SVX_NUM_CHARS_LOWER_LETTER, // a),b),c) ...
+ SVX_NUM_CHARS_LOWER_LETTER, // (a),(b),(c),...
+ SVX_NUM_ROMAN_LOWER // i.,ii.,...
+};
+/* -----------------28.10.98 08:32-------------------
+ *
+ * --------------------------------------------------*/
+// Die Auswahl an Bullets aus den StarBats
+static const sal_Unicode aBulletTypes[] =
+{
+ 149 + 0xf000,
+ 34 + 0xf000,
+ 65 + 0xf000,
+ 61 + 0xf000,
+ 49 + 0xf000,
+ 47 + 0xf000,
+ 79 + 0xf000,
+ 58 + 0xf000
+};
+/* -----------------28.10.98 09:42-------------------
+ *
+ * --------------------------------------------------*/
+static sal_Char __READONLY_DATA aNumChar[] =
+{
+ 'A', //CHARS_UPPER_LETTER
+ 'a', //CHARS_LOWER_LETTER
+ 'I', //ROMAN_UPPER
+ 'i', //ROMAN_LOWER
+ '1', //ARABIC
+ ' '
+};
+
+/*-----------------18.03.98 08:35-------------------
+ Ist eins der maskierten Formate gesetzt?
+--------------------------------------------------*/
+BOOL lcl_IsNumFmtSet(SvxNumRule* pNum, USHORT nLevelMask)
+{
+ BOOL bRet = FALSE;
+ USHORT nMask = 1;
+ for( USHORT i = 0; i < SVX_MAX_NUM && !bRet; i++ )
+ {
+ if(nLevelMask & nMask)
+ bRet |= 0 != pNum->Get( i );
+ nMask <<= 1 ;
+ }
+ return bRet;
+}
+/* -----------------28.10.98 08:50-------------------
+ *
+ * --------------------------------------------------*/
+#if defined UNX
+#define BULLET_FONT_NAME "starbats"
+#else
+#define BULLET_FONT_NAME "StarBats"
+#endif
+
+Font& lcl_GetDefaultBulletFont()
+{
+ static BOOL bInit = 0;
+ static Font aDefBulletFont( UniString::CreateFromAscii(
+ RTL_CONSTASCII_STRINGPARAM( BULLET_FONT_NAME ) ),
+ String(), Size( 0, 14 ) );
+ if(!bInit)
+ {
+ aDefBulletFont.SetCharSet( RTL_TEXTENCODING_DONTKNOW );
+ aDefBulletFont.SetFamily( FAMILY_DONTKNOW );
+ aDefBulletFont.SetPitch( PITCH_DONTKNOW );
+ aDefBulletFont.SetWeight( WEIGHT_DONTKNOW );
+ aDefBulletFont.SetTransparent( TRUE );
+ bInit = TRUE;
+ }
+ return aDefBulletFont;
+}
+
+
+/**************************************************************************/
+/* */
+/* */
+/**************************************************************************/
+
+
+SvxSingleNumPickTabPage::SvxSingleNumPickTabPage(Window* pParent,
+ const SfxItemSet& rSet) :
+ SfxTabPage( pParent, SVX_RES( RID_SVXPAGE_PICK_SINGLE_NUM ), rSet ),
+ aValuesGB( this, ResId(BG_VALUES) ),
+ pExamplesVS( new SvxNumValueSet(this, ResId(VS_VALUES), NUM_PAGETYPE_SINGLENUM )),
+ pActNum(0),
+ pSaveNum(0),
+ nActNumLvl( USHRT_MAX ),
+ bModified(FALSE),
+ bPreset(FALSE),
+ bHasChild(TRUE),
+ nNumItemId(SID_ATTR_NUMBERING_RULE)
+{
+ FreeResource();
+ SetExchangeSupport();
+ pExamplesVS->SetSelectHdl(LINK(this, SvxSingleNumPickTabPage, NumSelectHdl_Impl));
+ pExamplesVS->SetDoubleClickHdl(LINK(this, SvxSingleNumPickTabPage, DoubleClickHdl_Impl));
+ pExamplesVS->SetHelpId(HID_VALUESET_SINGLENUM );
+
+}
+/*-----------------07.02.97 12.08-------------------
+
+--------------------------------------------------*/
+
+ SvxSingleNumPickTabPage::~SvxSingleNumPickTabPage()
+{
+ delete pActNum;
+ delete pExamplesVS;
+ delete pSaveNum;
+}
+
+/*-----------------07.02.97 12.13-------------------
+
+--------------------------------------------------*/
+
+SfxTabPage* SvxSingleNumPickTabPage::Create( Window* pParent,
+ const SfxItemSet& rAttrSet)
+{
+ return new SvxSingleNumPickTabPage(pParent, rAttrSet);
+}
+
+/*-----------------07.02.97 12.09-------------------
+
+--------------------------------------------------*/
+
+
+BOOL SvxSingleNumPickTabPage::FillItemSet( SfxItemSet& rSet )
+{
+ if(bPreset || bModified && pSaveNum)
+ {
+ *pSaveNum = *pActNum;
+ rSet.Put(SvxNumBulletItem( *pSaveNum ), nNumItemId);
+ rSet.Put(SfxBoolItem(SID_PARAM_NUM_PRESET, bPreset));
+ }
+
+ return bModified;
+}
+
+/*-----------------08.02.97 16.27-------------------
+
+--------------------------------------------------*/
+
+void SvxSingleNumPickTabPage::ActivatePage(const SfxItemSet& rSet)
+{
+ const SfxPoolItem* pItem;
+ bPreset = FALSE;
+ BOOL bIsPreset = FALSE;
+ const SfxItemSet* pExampleSet = GetTabDialog()->GetExampleSet();
+ if(pExampleSet)
+ {
+ if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_NUM_PRESET, FALSE, &pItem))
+ bIsPreset = ((const SfxBoolItem*)pItem)->GetValue();
+ if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_CUR_NUM_LEVEL, FALSE, &pItem))
+ nActNumLvl = ((const SfxUInt16Item*)pItem)->GetValue();
+ }
+ if(SFX_ITEM_SET == rSet.GetItemState(nNumItemId, FALSE, &pItem))
+ {
+ delete pSaveNum;
+ pSaveNum = new SvxNumRule(*((SvxNumBulletItem*)pItem)->GetNumRule());
+ }
+ if(*pSaveNum != *pActNum)
+ {
+ *pActNum = *pSaveNum;
+ pExamplesVS->SetNoSelection();
+ }
+ // ersten Eintrag vorselektieren
+ if(pActNum && (!lcl_IsNumFmtSet(pActNum, nActNumLvl) || bIsPreset))
+ {
+ pExamplesVS->SelectItem(1);
+ NumSelectHdl_Impl(pExamplesVS);
+ bPreset = TRUE;
+ }
+ bPreset |= bIsPreset;
+
+ bModified = FALSE;
+}
+
+/*-----------------08.02.97 11.28-------------------
+
+--------------------------------------------------*/
+
+int SvxSingleNumPickTabPage::DeactivatePage(SfxItemSet *pSet)
+{
+ if(pSet)
+ FillItemSet(*pSet);
+ return TRUE;
+}
+
+/*-----------------07.02.97 12.09-------------------
+
+--------------------------------------------------*/
+
+
+void SvxSingleNumPickTabPage::Reset( const SfxItemSet& rSet )
+{
+ const SfxPoolItem* pItem;
+// nActNumLvl = ((SwNumBulletTabDialog*)GetTabDialog())->GetActNumLevel();
+ //im Draw gibt es das Item als WhichId, im Writer nur als SlotId
+ SfxItemState eState = rSet.GetItemState(SID_ATTR_NUMBERING_RULE, FALSE, &pItem);
+ if(eState != SFX_ITEM_SET)
+ {
+ nNumItemId = rSet.GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE);
+ eState = rSet.GetItemState(nNumItemId, FALSE, &pItem);
+ }
+ DBG_ASSERT(eState == SFX_ITEM_SET, "kein Item gefunden!")
+ delete pSaveNum;
+ pSaveNum = new SvxNumRule(*((SvxNumBulletItem*)pItem)->GetNumRule());
+
+ if(SFX_ITEM_SET == rSet.GetItemState(SID_PARAM_CHILD_LEVELS, FALSE, &pItem))
+ bHasChild = ((const SfxBoolItem*)pItem)->GetValue();
+ if(!pActNum)
+ pActNum = new SvxNumRule(*pSaveNum);
+ else if(*pSaveNum != *pActNum)
+ *pActNum = *pSaveNum;
+}
+/*-----------------08.02.97 11.40-------------------
+
+--------------------------------------------------*/
+
+IMPL_LINK(SvxSingleNumPickTabPage, NumSelectHdl_Impl, ValueSet*, EMPTYARG)
+{
+ if(pActNum)
+ {
+ bPreset = FALSE;
+ bModified = TRUE;
+ USHORT nIdx = pExamplesVS->GetSelectItemId() - 1;
+ SvxExtNumType eNewType = aSglNumTypes[nIdx];
+ sal_Char cPrefix = aSglPostPreFixes[2 * nIdx];
+ sal_Char cPostfix = aSglPostPreFixes[2 * (nIdx) + 1];
+
+ USHORT nMask = 1;
+ for(USHORT i = 0; i < pActNum->GetLevelCount(); i++)
+ {
+ if(nActNumLvl & nMask)
+ {
+ SvxNumberFormat aFmt(pActNum->GetLevel(i));
+ aFmt.SetNumType(eNewType);
+ String aEmptyStr;
+ if(cPrefix == ' ')
+ aFmt.SetPrefix( aEmptyStr );
+ else
+ aFmt.SetPrefix( String( sal_Unicode( cPrefix ) ) );
+ if(cPostfix == ' ')
+ aFmt.SetSuffix( aEmptyStr );
+ else
+ aFmt.SetSuffix( String( sal_Unicode( cPostfix ) ) );
+ aFmt.SetCharFmt(sNumCharFmtName);
+ pActNum->SetLevel(i, aFmt);
+ }
+ nMask <<= 1 ;
+ }
+ }
+ return 0;
+}
+
+/*-----------------06.06.97 11.15-------------------
+
+--------------------------------------------------*/
+IMPL_LINK(SvxSingleNumPickTabPage, DoubleClickHdl_Impl, ValueSet*, EMPTYARG)
+{
+ NumSelectHdl_Impl(pExamplesVS);
+ OKButton& rOk = GetTabDialog()->GetOKButton();
+ rOk.GetClickHdl().Call(&rOk);
+ return 0;
+}
+
+/**************************************************************************/
+/* */
+/* */
+/**************************************************************************/
+
+
+SvxBulletPickTabPage::SvxBulletPickTabPage(Window* pParent,
+ const SfxItemSet& rSet) :
+ SfxTabPage( pParent, SVX_RES( RID_SVXPAGE_PICK_BULLET ), rSet ),
+ aValuesGB( this, ResId(BG_VALUES) ),
+ pExamplesVS( new SvxNumValueSet(this, ResId(VS_VALUES), NUM_PAGETYPE_BULLET )),
+ pActNum(0),
+ pSaveNum(0),
+ nActNumLvl( USHRT_MAX ),
+ bModified(FALSE),
+ bPreset(FALSE),
+ bHasChild(/*FALSE*/TRUE),
+ nNumItemId(SID_ATTR_NUMBERING_RULE)
+{
+ FreeResource();
+ SetExchangeSupport();
+ pExamplesVS->SetSelectHdl(LINK(this, SvxBulletPickTabPage, NumSelectHdl_Impl));
+ pExamplesVS->SetDoubleClickHdl(LINK(this, SvxBulletPickTabPage, DoubleClickHdl_Impl));
+ pExamplesVS->SetHelpId(HID_VALUESET_BULLET );
+
+}
+/*-----------------07.02.97 12.10-------------------
+
+--------------------------------------------------*/
+
+
+ SvxBulletPickTabPage::~SvxBulletPickTabPage()
+{
+ delete pActNum;
+ delete pExamplesVS;
+ delete pSaveNum;
+}
+/*-----------------07.02.97 12.10-------------------
+
+--------------------------------------------------*/
+
+
+SfxTabPage* SvxBulletPickTabPage::Create( Window* pParent,
+ const SfxItemSet& rAttrSet)
+{
+ return new SvxBulletPickTabPage(pParent, rAttrSet);
+}
+
+/*-----------------07.02.97 12.10-------------------
+
+--------------------------------------------------*/
+
+
+BOOL SvxBulletPickTabPage::FillItemSet( SfxItemSet& rSet )
+{
+ if(bPreset || bModified && pActNum)
+ {
+ *pSaveNum = *pActNum;
+ rSet.Put(SvxNumBulletItem( *pSaveNum ), nNumItemId);
+ rSet.Put(SfxBoolItem(SID_PARAM_NUM_PRESET, bPreset));
+ }
+ return bModified;
+}
+/*-----------------08.02.97 16.28-------------------
+
+--------------------------------------------------*/
+
+void SvxBulletPickTabPage::ActivatePage(const SfxItemSet& rSet)
+{
+ const SfxPoolItem* pItem;
+ bPreset = FALSE;
+ BOOL bIsPreset = FALSE;
+ const SfxItemSet* pExampleSet = GetTabDialog()->GetExampleSet();
+ if(pExampleSet)
+ {
+ if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_NUM_PRESET, FALSE, &pItem))
+ bIsPreset = ((const SfxBoolItem*)pItem)->GetValue();
+ if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_CUR_NUM_LEVEL, FALSE, &pItem))
+ nActNumLvl = ((const SfxUInt16Item*)pItem)->GetValue();
+ }
+ if(SFX_ITEM_SET == rSet.GetItemState(nNumItemId, FALSE, &pItem))
+ {
+ delete pSaveNum;
+ pSaveNum = new SvxNumRule(*((SvxNumBulletItem*)pItem)->GetNumRule());
+ }
+ if(*pSaveNum != *pActNum)
+ {
+ *pActNum = *pSaveNum;
+ pExamplesVS->SetNoSelection();
+ }
+ // ersten Eintrag vorselektieren
+ if(pActNum && (!lcl_IsNumFmtSet(pActNum, nActNumLvl) || bIsPreset))
+ {
+ pExamplesVS->SelectItem(1);
+ NumSelectHdl_Impl(pExamplesVS);
+ bPreset = TRUE;
+ }
+ bPreset |= bIsPreset;
+ bModified = FALSE;
+}
+/*-----------------08.02.97 11.28-------------------
+
+--------------------------------------------------*/
+
+int SvxBulletPickTabPage::DeactivatePage(SfxItemSet *pSet)
+{
+ if(pSet)
+ FillItemSet(*pSet);
+ return TRUE;
+}
+
+/*-----------------07.02.97 12.11-------------------
+
+--------------------------------------------------*/
+
+
+void SvxBulletPickTabPage::Reset( const SfxItemSet& rSet )
+{
+ const SfxPoolItem* pItem;
+ //im Draw gibt es das Item als WhichId, im Writer nur als SlotId
+ SfxItemState eState = rSet.GetItemState(SID_ATTR_NUMBERING_RULE, FALSE, &pItem);
+ if(eState != SFX_ITEM_SET)
+ {
+ nNumItemId = rSet.GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE);
+ eState = rSet.GetItemState(nNumItemId, FALSE, &pItem);
+ }
+ DBG_ASSERT(eState == SFX_ITEM_SET, "kein Item gefunden!")
+ delete pSaveNum;
+ pSaveNum = new SvxNumRule(*((SvxNumBulletItem*)pItem)->GetNumRule());
+
+// nActNumLvl = ((SwNumBulletTabDialog*)GetTabDialog())->GetActNumLevel();
+
+ if(SFX_ITEM_SET == rSet.GetItemState(SID_PARAM_CHILD_LEVELS, FALSE, &pItem))
+ bHasChild = ((const SfxBoolItem*)pItem)->GetValue();
+ if(!pActNum)
+ pActNum = new SvxNumRule(*pSaveNum);
+ else if(*pSaveNum != *pActNum)
+ *pActNum = *pSaveNum;
+}
+/*-----------------08.02.97 11.58-------------------
+
+--------------------------------------------------*/
+
+IMPL_LINK(SvxBulletPickTabPage, NumSelectHdl_Impl, ValueSet*, EMPTYARG)
+{
+ if(pActNum)
+ {
+ bPreset = FALSE;
+ bModified = TRUE;
+ sal_Unicode cChar = aBulletTypes[pExamplesVS->GetSelectItemId() - 1];
+ Font& rActBulletFont = lcl_GetDefaultBulletFont();
+
+ USHORT nMask = 1;
+ for(USHORT i = 0; i < pActNum->GetLevelCount(); i++)
+ {
+ if(nActNumLvl & nMask)
+ {
+ SvxNumberFormat aFmt(pActNum->GetLevel(i));
+ aFmt.SetNumType( SVX_NUM_CHAR_SPECIAL );
+ aFmt.SetBulletFont(&rActBulletFont);
+ aFmt.SetBulletChar(cChar );
+ aFmt.SetCharFmt(sBulletCharFmtName);
+ // #62069#
+ aFmt.SetBulletRelSize(75);
+ pActNum->SetLevel(i, aFmt);
+ }
+ nMask <<= 1;
+ }
+ }
+
+ return 0;
+}
+
+/*-----------------06.06.97 11.16-------------------
+
+--------------------------------------------------*/
+IMPL_LINK(SvxBulletPickTabPage, DoubleClickHdl_Impl, ValueSet*, EMPTYARG)
+{
+ NumSelectHdl_Impl(pExamplesVS);
+ OKButton& rOk = GetTabDialog()->GetOKButton();
+ rOk.GetClickHdl().Call(&rOk);
+ return 0;
+}
+
+/**************************************************************************/
+/* */
+/* */
+/**************************************************************************/
+
+
+SvxNumPickTabPage::SvxNumPickTabPage(Window* pParent,
+ const SfxItemSet& rSet) :
+ SfxTabPage( pParent, SVX_RES( RID_SVXPAGE_PICK_NUM ), rSet ),
+ aValuesGB( this, ResId(BG_VALUES) ),
+ pExamplesVS( new SvxNumValueSet(this, ResId(VS_VALUES), NUM_PAGETYPE_NUM )),
+ aNumFmt1(ResId(STR_NUMFMT_1)),
+ aNumFmt2(ResId(STR_NUMFMT_2)),
+ aNumFmt3(ResId(STR_NUMFMT_3)),
+ aNumFmt4(ResId(STR_NUMFMT_4)),
+ aNumFmt5(ResId(STR_NUMFMT_5)),
+ aNumFmt6(ResId(STR_NUMFMT_6)),
+ aNumFmt7(ResId(STR_NUMFMT_7)),
+ aNumFmt8(ResId(STR_NUMFMT_8)),
+ pActNum(0),
+ pSaveNum(0),
+ nActNumLvl( USHRT_MAX ),
+ bModified(FALSE),
+ bPreset(FALSE),
+ nNumItemId(SID_ATTR_NUMBERING_RULE)
+{
+ aNumArr[0] = &aNumFmt1;
+ aNumArr[1] = &aNumFmt2;
+ aNumArr[2] = &aNumFmt3;
+ aNumArr[3] = &aNumFmt4;
+ aNumArr[4] = &aNumFmt5;
+ aNumArr[5] = &aNumFmt6;
+ aNumArr[6] = &aNumFmt7;
+ aNumArr[7] = &aNumFmt8;
+
+#ifdef DBG_UTIL
+ for(USHORT dbg = 0; dbg < NUM_VALUSET_COUNT; dbg++)
+ DBG_ASSERT((NUMTYPE_MEMBER * 5) == aNumArr[dbg]->GetTokenCount('|'),
+ "FormatString inkonsistent")
+#endif
+
+ SfxObjectShell* pShell;
+ const SfxPoolItem* pItem;
+ if ( SFX_ITEM_SET == rSet.GetItemState( SID_HTML_MODE, FALSE, &pItem )
+ || ( 0 != ( pShell = SfxObjectShell::Current()) &&
+ 0 != ( pItem = pShell->GetItem( SID_HTML_MODE ) ) ) )
+ {
+ USHORT nHtmlMode = ((SfxUInt16Item*)pItem)->GetValue();
+ BOOL bHTMLMode = 0 != (nHtmlMode&HTMLMODE_ON);
+ if(bHTMLMode)
+ {
+ aNumFmt7 = String(ResId(STR_NUMFMT_7_HTML));
+ pExamplesVS->SetHTMLMode(TRUE);
+ }
+ }
+ FreeResource();
+
+ SetExchangeSupport();
+
+ pExamplesVS->SetSelectHdl(LINK(this, SvxNumPickTabPage, NumSelectHdl_Impl));
+ pExamplesVS->SetDoubleClickHdl(LINK(this, SvxNumPickTabPage, DoubleClickHdl_Impl));
+ pExamplesVS->SetHelpId(HID_VALUESET_NUM );
+
+}
+/*-----------------07.02.97 12.12-------------------
+
+--------------------------------------------------*/
+
+
+ SvxNumPickTabPage::~SvxNumPickTabPage()
+{
+ delete pActNum;
+ delete pExamplesVS;
+ delete pSaveNum;
+}
+
+/*-----------------07.02.97 12.12-------------------
+
+--------------------------------------------------*/
+
+
+SfxTabPage* SvxNumPickTabPage::Create( Window* pParent,
+ const SfxItemSet& rAttrSet)
+{
+ return new SvxNumPickTabPage(pParent, rAttrSet);
+}
+
+/*-----------------07.02.97 12.12-------------------
+
+--------------------------------------------------*/
+
+
+BOOL SvxNumPickTabPage::FillItemSet( SfxItemSet& rSet )
+{
+ if(bPreset || bModified && pActNum)
+ {
+ *pSaveNum = *pActNum;
+ rSet.Put(SvxNumBulletItem( *pSaveNum ), nNumItemId);
+ rSet.Put(SfxBoolItem(SID_PARAM_NUM_PRESET, bPreset));
+ }
+ return bModified;
+}
+/*-----------------08.02.97 16.28-------------------
+
+--------------------------------------------------*/
+
+void SvxNumPickTabPage::ActivatePage(const SfxItemSet& rSet)
+{
+ const SfxPoolItem* pItem;
+ bPreset = FALSE;
+ BOOL bIsPreset = FALSE;
+ const SfxItemSet* pExampleSet = GetTabDialog()->GetExampleSet();
+ if(pExampleSet)
+ {
+ if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_NUM_PRESET, FALSE, &pItem))
+ bIsPreset = ((const SfxBoolItem*)pItem)->GetValue();
+ if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_CUR_NUM_LEVEL, FALSE, &pItem))
+ nActNumLvl = ((const SfxUInt16Item*)pItem)->GetValue();
+ }
+ if(SFX_ITEM_SET == rSet.GetItemState(nNumItemId, FALSE, &pItem))
+ {
+ delete pSaveNum;
+ pSaveNum = new SvxNumRule(*((SvxNumBulletItem*)pItem)->GetNumRule());
+ }
+ if(*pSaveNum != *pActNum)
+ {
+ *pActNum = *pSaveNum;
+ pExamplesVS->SetNoSelection();
+ }
+ // ersten Eintrag vorselektieren
+ if(pActNum && (!lcl_IsNumFmtSet(pActNum, nActNumLvl) || bIsPreset))
+ {
+ pExamplesVS->SelectItem(1);
+ NumSelectHdl_Impl(pExamplesVS);
+ bPreset = TRUE;
+ }
+ bPreset |= bIsPreset;
+ bModified = FALSE;
+}
+
+/* -----------------08.02.97 11.29-------------------
+
+--------------------------------------------------*/
+
+int SvxNumPickTabPage::DeactivatePage(SfxItemSet *pSet)
+{
+ if(pSet)
+ FillItemSet(*pSet);
+ return TRUE;
+}
+
+/*-----------------07.02.97 12.12-------------------
+
+--------------------------------------------------*/
+
+void SvxNumPickTabPage::Reset( const SfxItemSet& rSet )
+{
+ const SfxPoolItem* pItem;
+ //im Draw gibt es das Item als WhichId, im Writer nur als SlotId
+ SfxItemState eState = rSet.GetItemState(SID_ATTR_NUMBERING_RULE, FALSE, &pItem);
+ if(eState != SFX_ITEM_SET)
+ {
+ nNumItemId = rSet.GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE);
+ eState = rSet.GetItemState(nNumItemId, FALSE, &pItem);
+ }
+ DBG_ASSERT(eState == SFX_ITEM_SET, "kein Item gefunden!")
+ delete pSaveNum;
+ pSaveNum = new SvxNumRule(*((SvxNumBulletItem*)pItem)->GetNumRule());
+
+// nActNumLvl = ((SwNumBulletTabDialog*)GetTabDialog())->GetActNumLevel();
+ if(!pActNum)
+ pActNum = new SvxNumRule(*pSaveNum);
+ else if(*pSaveNum != *pActNum)
+ *pActNum = *pSaveNum;
+
+}
+
+/*-----------------08.02.97 11.58-------------------
+ Hier werden alle Ebenen veraendert,
+--------------------------------------------------*/
+
+IMPL_LINK(SvxNumPickTabPage, NumSelectHdl_Impl, ValueSet*, EMPTYARG)
+{
+ if(pActNum)
+ {
+ bPreset = FALSE;
+ bModified = TRUE;
+
+ String* pNum = aNumArr[pExamplesVS->GetSelectItemId() - 1];
+ Font& rActBulletFont = lcl_GetDefaultBulletFont();
+ for(USHORT i = 0; i < pActNum->GetLevelCount(); i++)
+ {
+ SvxNumberFormat aFmt(pActNum->GetLevel(i));
+ // Definitionen reichen nur bis fuenf, danach wird die Art beibehalten
+ USHORT nTokenPos = i > 4 ? 4 : i;
+ aFmt.SetNumType( (SvxExtNumType)(USHORT) pNum->GetToken(nTokenPos * NUMTYPE_MEMBER, '|').ToInt32() );
+ USHORT nUpperLevelOrChar = pNum->GetToken(nTokenPos * NUMTYPE_MEMBER + 3, '|').ToInt32();
+ if(aFmt.GetNumType() == SVX_NUM_CHAR_SPECIAL)
+ {
+ aFmt.SetBulletFont(&rActBulletFont);
+ aFmt.SetBulletChar((char)nUpperLevelOrChar);
+ aFmt.SetCharFmt(sBulletCharFmtName);
+ }
+ else
+ {
+ aFmt.SetIncludeUpperLevels(1 == nUpperLevelOrChar ? pActNum->GetLevelCount() : 0);
+ aFmt.SetCharFmt(sNumCharFmtName);
+ }
+ aFmt.SetPrefix(pNum->GetToken(nTokenPos * NUMTYPE_MEMBER + 1, '|'));
+ aFmt.SetSuffix(pNum->GetToken(nTokenPos * NUMTYPE_MEMBER + 2, '|'));
+ pActNum->SetLevel(i, aFmt);
+ }
+ }
+
+ return 0;
+}
+
+/*-----------------06.06.97 11.16-------------------
+
+--------------------------------------------------*/
+IMPL_LINK(SvxNumPickTabPage, DoubleClickHdl_Impl, ValueSet*, EMPTYARG)
+{
+ NumSelectHdl_Impl(pExamplesVS);
+ OKButton& rOk = GetTabDialog()->GetOKButton();
+ rOk.GetClickHdl().Call(&rOk);
+ return 0;
+}
+
+/*-----------------07.02.97 15.59-------------------
+
+--------------------------------------------------*/
+
+void SvxNumValueSet::UserDraw( const UserDrawEvent& rUDEvt )
+{
+ static USHORT __READONLY_DATA aLinesArr[] =
+ {
+ 15, 10,
+ 20, 30,
+ 25, 50,
+ 30, 70,
+ 35, 90, // bis hierher nur Linien, danach die char-Positionen
+ 10, 10,
+ 15, 30,
+ 20, 50,
+ 25, 70,
+ 30, 90,
+ };
+
+ OutputDevice* pDev = rUDEvt.GetDevice();
+ Rectangle aRect = rUDEvt.GetRect();
+ USHORT nItemId = rUDEvt.GetItemId();
+ long nRectWidth = aRect.GetWidth();
+ long nRectHeight = aRect.GetHeight();
+ Size aRectSize(nRectWidth, aRect.GetHeight());
+ Point aBLPos = aRect.TopLeft();
+ Font aOldFont = pDev->GetFont();
+ Color aOldColor = pDev->GetLineColor();
+ pDev->SetLineColor(aLineColor);
+ Font aFont(System::GetStandardFont(STDFONT_ROMAN));
+ Size aSize = aFont.GetSize();
+
+ Font aRuleFont( lcl_GetDefaultBulletFont() );
+ aSize.Height() = nRectHeight/6;
+ aRuleFont.SetSize(aSize);
+ if(nPageType == NUM_PAGETYPE_BULLET)
+ aFont = aRuleFont;
+ else if(nPageType == NUM_PAGETYPE_NUM)
+ aSize.Height() = nRectHeight/8;
+ aFont.SetSize( aSize );
+ pDev->SetFont(aFont);
+
+ if(!pVDev)
+ {
+ // Die Linien werden nur einmalig in das VirtualDevice gepainted
+ // nur die Gliederungspage bekommt es aktuell
+ pVDev = new VirtualDevice(*pDev);
+ pVDev->SetMapMode(pDev->GetMapMode());
+ pVDev->SetOutputSize( aRectSize );
+ aOrgRect = aRect;
+
+ pVDev->SetLineColor(aLineColor);
+ // Linien nur einmalig Zeichnen
+ if(nPageType != NUM_PAGETYPE_NUM)
+ {
+ Point aStart(aBLPos.X() + nRectWidth *25 / 100,0);
+ Point aEnd(aBLPos.X() + nRectWidth * 9 / 10,0);
+ for( USHORT i = 11; i < 100; i += 33)
+ {
+ aStart.Y() = aEnd.Y() = aBLPos.Y() + nRectHeight * i / 100;
+ pVDev->DrawLine(aStart, aEnd);
+ aStart.Y() = aEnd.Y() = aBLPos.Y() + nRectHeight * (i + 11) / 100;
+ pVDev->DrawLine(aStart, aEnd);
+ }
+ }
+ }
+ pDev->DrawOutDev( aRect.TopLeft(), aRectSize,
+ aOrgRect.TopLeft(), aRectSize,
+ *pVDev );
+ // jetzt kommt der Text
+ if( NUM_PAGETYPE_SINGLENUM == nPageType ||
+ NUM_PAGETYPE_BULLET == nPageType )
+ {
+ Point aStart(aBLPos.X() + nRectWidth / 9,0);
+ for( USHORT i = 0; i < 3; i++ )
+ {
+ USHORT nY = 11 + i * 33;
+ aStart.Y() = aBLPos.Y() + nRectHeight * nY / 100;
+ String sText;
+ if(nPageType == NUM_PAGETYPE_BULLET)
+ {
+ sText = aBulletTypes[nItemId - 1];
+ aStart.Y() -= pDev->GetTextHeight()/2;
+ aStart.X() = aBLPos.X() + 5;
+ }
+ else
+ {
+ SvxExtNumType eNumType = aSglNumTypes[nItemId - 1];
+ sal_Unicode cChar = aNumChar[(USHORT)eNumType];
+
+ sText = sal_Unicode( aSglPostPreFixes[2 * (nItemId -1)] );
+ if(eNumType == SVX_NUM_ROMAN_UPPER||
+ eNumType == SVX_NUM_ROMAN_LOWER)
+ {
+
+ for(USHORT j = 0; j <= i; j++)
+ sText += cChar;
+ }
+ else
+ sText += (sal_Unicode)(cChar + i);
+ sText += aSglPostPreFixes[2 * (nItemId - 1) + 1];
+ // knapp neben dem linken Rand beginnen
+ aStart.X() = aBLPos.X() + 2;
+ aStart.Y() -= pDev->GetTextHeight()/2;
+ }
+ pDev->DrawText(aStart, sText);
+ }
+ }
+ else if(NUM_PAGETYPE_NUM == nPageType )
+ {
+ // Gliederungen werden komplett ins VDev gemalt,
+ // damit die Linien angepasst werden
+ pVDev->SetFillColor( Color( COL_WHITE ) );
+ pVDev->DrawRect(aOrgRect);
+ long nStartX = aOrgRect.TopLeft().X();
+ long nStartY = aOrgRect.TopLeft().Y();
+ USHORT nResId = RID_STR_FULLNUMS_START + nItemId - 1;
+ String sFormat(SVX_RES(nResId));
+ if(bHTMLMode && RID_STR_FULLNUMS_7 == nResId)
+ sFormat = String(SVX_RES(RID_STR_FULLNUMS_7_HTML));
+ for( xub_StrLen i = 0; i < 5; i++)
+ {
+ long nTop = nStartY + nRectHeight * (aLinesArr[2 * i + 11])/100 ;
+ Point aLeft(nStartX + nRectWidth * (aLinesArr[2 * i + 10])/ 100, nTop );
+ String sText = sFormat.GetToken(i,'|');
+ USHORT nText = (USHORT)sText.ToInt32();
+ if(nText > 1)
+ {
+ // jetzt kommt ein Bullet
+ sText = sal_Unicode(nText);
+ pVDev->SetFont(aRuleFont);
+ }
+ else
+ pVDev->SetFont(aFont);
+ aLeft.Y() -= (pDev->GetTextHeight()/2);
+ pVDev->DrawText(aLeft, sText);
+
+ long nLineTop = nStartY + nRectHeight * aLinesArr[2 * i + 1]/100 ;
+ Point aLineLeft(pDev->GetTextWidth(sText) + nStartX + nRectWidth * aLinesArr[2 * i] / 100, nLineTop );
+ Point aLineRight(nStartX + nRectWidth * 90 /100, nLineTop );
+ pVDev->DrawLine(aLineLeft, aLineRight);
+ }
+ pDev->DrawOutDev( aRect.TopLeft(), aRectSize,
+ aOrgRect.TopLeft(), aRectSize,
+ *pVDev );
+ }
+
+ pDev->SetFont(aOldFont);
+ pDev->SetLineColor(aOldColor);
+}
+
+/**************************************************************************/
+/* */
+/* */
+/**************************************************************************/
+
+SvxNumValueSet::SvxNumValueSet( Window* pParent, const ResId& rResId, USHORT nType ) :
+
+ ValueSet( pParent, rResId ),
+
+ pVDev ( NULL ),
+ nPageType ( nType ),
+ bHTMLMode ( FALSE ),
+ aLineColor ( COL_LIGHTGRAY )
+
+{
+ SetColCount( 4 );
+ SetStyle( GetStyle() | WB_ITEMBORDER | WB_DOUBLEBORDER );
+ if ( nType != NUM_PAGETYPE_BMP )
+ {
+ for ( USHORT i = 0; i < 8; i++ )
+ InsertItem( i + 1, i );
+ }
+}
+
+/*-----------------08.02.97 12.38-------------------
+
+--------------------------------------------------*/
+
+ SvxNumValueSet::~SvxNumValueSet()
+{
+ delete pVDev;
+}
+
+/**************************************************************************/
+/* */
+/* */
+/**************************************************************************/
+//Bug #51425# MSVC 4.1 Optimierungsproblem 10.20.6166
+#pragma optimize("g", off)
+SvxBitmapPickTabPage::SvxBitmapPickTabPage(Window* pParent,
+ const SfxItemSet& rSet) :
+ SfxTabPage( pParent, SVX_RES( RID_SVXPAGE_PICK_BMP ), rSet ),
+ aValuesGB( this, ResId(BG_VALUES) ),
+ pExamplesVS( new SvxBmpNumValueSet(this, ResId(VS_VALUES), aGrfNames )),
+ aErrorText( this, ResId(FT_ERROR)),
+ aLinkedCB( this, ResId(CB_LINKED)),
+ pActNum(0),
+ pSaveNum(0),
+ nActNumLvl( USHRT_MAX ),
+ bModified(FALSE),
+ bPreset(FALSE),
+ bHasChild(/*FALSE*/TRUE),
+ nNumItemId(SID_ATTR_NUMBERING_RULE)
+{
+ FreeResource();
+ SetExchangeSupport();
+ eCoreUnit = rSet.GetPool()->GetMetric(rSet.GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE));
+ pExamplesVS->SetSelectHdl(LINK(this, SvxBitmapPickTabPage, NumSelectHdl_Impl));
+ pExamplesVS->SetDoubleClickHdl(LINK(this, SvxBitmapPickTabPage, DoubleClickHdl_Impl));
+ aLinkedCB.SetClickHdl(LINK(this, SvxBitmapPickTabPage, LinkBmpHdl_Impl));
+
+ // Grafiknamen ermitteln
+
+ GalleryExplorer::FillObjList(GALLERY_THEME_BULLETS, aGrfNames);
+ pExamplesVS->SetHelpId(HID_VALUESET_NUMBMP );
+ for(USHORT i = 0; i < aGrfNames.Count(); i++)
+ {
+ pExamplesVS->InsertItem( i + 1, i);
+ String* pGrfNm = (String*) aGrfNames.GetObject(i);
+ *pGrfNm = URIHelper::SmartRelToAbs(*pGrfNm);
+ pExamplesVS->SetItemText( i + 1, *pGrfNm );
+ }
+ if(!aGrfNames.Count())
+ {
+ aErrorText.Show();
+ }
+ else
+ {
+ pExamplesVS->Show();
+ pExamplesVS->Format();
+ }
+
+}
+
+#pragma optimize("", on)
+
+/*-----------------12.02.97 07.46-------------------
+
+--------------------------------------------------*/
+
+ SvxBitmapPickTabPage::~SvxBitmapPickTabPage()
+{
+ String* pStr = (String*)aGrfNames.First();
+ while( pStr )
+ {
+ delete pStr;
+ pStr = (String*)aGrfNames.Next();
+ }
+ delete pExamplesVS;
+ delete pActNum;
+ delete pSaveNum;
+}
+
+/*-----------------12.02.97 07.46-------------------
+
+--------------------------------------------------*/
+
+SfxTabPage* SvxBitmapPickTabPage::Create( Window* pParent,
+ const SfxItemSet& rAttrSet)
+{
+ return new SvxBitmapPickTabPage(pParent, rAttrSet);
+}
+
+/*-----------------12.02.97 07.46-------------------
+
+--------------------------------------------------*/
+
+void SvxBitmapPickTabPage::ActivatePage(const SfxItemSet& rSet)
+{
+ const SfxPoolItem* pItem;
+ bPreset = FALSE;
+ BOOL bIsPreset = FALSE;
+// nActNumLvl = ((SwNumBulletTabDialog*)GetTabDialog())->GetActNumLevel();
+ const SfxItemSet* pExampleSet = GetTabDialog()->GetExampleSet();
+ if(pExampleSet)
+ {
+ if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_NUM_PRESET, FALSE, &pItem))
+ bIsPreset = ((const SfxBoolItem*)pItem)->GetValue();
+ if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_CUR_NUM_LEVEL, FALSE, &pItem))
+ nActNumLvl = ((const SfxUInt16Item*)pItem)->GetValue();
+ }
+ if(SFX_ITEM_SET == rSet.GetItemState(nNumItemId, FALSE, &pItem))
+ {
+ delete pSaveNum;
+ pSaveNum = new SvxNumRule(*((SvxNumBulletItem*)pItem)->GetNumRule());
+ }
+ if(*pSaveNum != *pActNum)
+ {
+ *pActNum = *pSaveNum;
+ pExamplesVS->SetNoSelection();
+ }
+ // ersten Eintrag vorselektieren
+ if(aGrfNames.Count() &&
+ (pActNum && (!lcl_IsNumFmtSet(pActNum, nActNumLvl) || bIsPreset)))
+ {
+ pExamplesVS->SelectItem(1);
+ NumSelectHdl_Impl(pExamplesVS);
+ bPreset = TRUE;
+ }
+ bPreset |= bIsPreset;
+ bModified = FALSE;
+}
+/*-----------------12.02.97 07.46-------------------
+
+--------------------------------------------------*/
+
+int SvxBitmapPickTabPage::DeactivatePage(SfxItemSet *pSet)
+{
+ if(pSet)
+ FillItemSet(*pSet);
+ return TRUE;
+}
+/*-----------------12.02.97 07.46-------------------
+
+--------------------------------------------------*/
+
+BOOL SvxBitmapPickTabPage::FillItemSet( SfxItemSet& rSet )
+{
+ if ( !aGrfNames.Count() )
+ {
+// das ist im SfxItemSet leider nicht zulaessig #52134#
+// rSet.DisableItem(SID_ATTR_NUMBERING_RULE);
+ return FALSE;
+ }
+ if(bPreset || bModified && pActNum)
+ {
+ *pSaveNum = *pActNum;
+ rSet.Put(SvxNumBulletItem( *pSaveNum ), nNumItemId);
+ rSet.Put(SfxBoolItem(SID_PARAM_NUM_PRESET, bPreset));
+ }
+
+ return bModified;
+}
+/*-----------------12.02.97 07.46-------------------
+
+--------------------------------------------------*/
+
+void SvxBitmapPickTabPage::Reset( const SfxItemSet& rSet )
+{
+ const SfxPoolItem* pItem;
+ //im Draw gibt es das Item als WhichId, im Writer nur als SlotId
+ SfxItemState eState = rSet.GetItemState(SID_ATTR_NUMBERING_RULE, FALSE, &pItem);
+ if(eState != SFX_ITEM_SET)
+ {
+ nNumItemId = rSet.GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE);
+ eState = rSet.GetItemState(nNumItemId, FALSE, &pItem);
+ }
+ DBG_ASSERT(eState == SFX_ITEM_SET, "kein Item gefunden!")
+ delete pSaveNum;
+ pSaveNum = new SvxNumRule(*((SvxNumBulletItem*)pItem)->GetNumRule());
+
+// nActNumLvl = ((SwNumBulletTabDialog*)GetTabDialog())->GetActNumLevel();
+
+ if(SFX_ITEM_SET == rSet.GetItemState(SID_PARAM_CHILD_LEVELS, FALSE, &pItem))
+ bHasChild = ((const SfxBoolItem*)pItem)->GetValue();
+ if(!pActNum)
+ pActNum = new SvxNumRule(*pSaveNum);
+ else if(*pSaveNum != *pActNum)
+ *pActNum = *pSaveNum;
+ if(!pActNum->IsFeatureSupported(NUM_ENABLE_LINKED_BMP))
+ {
+ aLinkedCB.Check(FALSE);
+ aLinkedCB.Enable(FALSE);
+ }
+ else if(!pActNum->IsFeatureSupported(NUM_ENABLE_EMBEDDED_BMP))
+ {
+ aLinkedCB.Check(TRUE);
+ aLinkedCB.Enable(FALSE);
+ }
+}
+
+/*-----------------12.02.97 07.53-------------------
+
+--------------------------------------------------*/
+
+IMPL_LINK(SvxBitmapPickTabPage, NumSelectHdl_Impl, ValueSet*, EMPTYARG)
+{
+ if(pActNum)
+ {
+ bPreset = FALSE;
+ bModified = TRUE;
+ USHORT nIdx = pExamplesVS->GetSelectItemId() - 1;
+
+ String* pGrfName = 0;
+ if(aGrfNames.Count() > nIdx)
+ {
+ pGrfName = (String*)aGrfNames.GetObject(nIdx);
+ *pGrfName = URIHelper::SmartRelToAbs(*pGrfName);
+ }
+ USHORT nMask = 1;
+ String aEmptyStr;
+ USHORT nSetNumType = SVX_NUM_BITMAP;
+ if(aLinkedCB.IsChecked())
+ nSetNumType |= LINK_TOKEN;
+ for(USHORT i = 0; i < pActNum->GetLevelCount(); i++)
+ {
+ if(nActNumLvl & nMask)
+ {
+ SvxNumberFormat aFmt(pActNum->GetLevel(i));
+ aFmt.SetNumType((SvxExtNumType)nSetNumType);
+ aFmt.SetPrefix( aEmptyStr );
+ aFmt.SetSuffix( aEmptyStr );
+ aFmt.SetCharFmt( sNumCharFmtName );
+
+ SvxBmpItemInfo* pInfo = pExamplesVS->FindInfo(nIdx + 1);
+ const Graphic* pGraphic = pInfo->pBrushItem->GetGraphic(SfxObjectShell::Current());
+ if(pGraphic)
+ {
+ Size aSize = SvxNumberFormat::GetGraphicSizeMM100(pGraphic);
+ SvxFrameVertOrient eOrient = SVX_VERT_LINE_CENTER;
+ aSize = OutputDevice::LogicToLogic(aSize, MAP_100TH_MM, (MapUnit)eCoreUnit);
+ aFmt.SetGraphicBrush( pInfo->pBrushItem, &aSize, &eOrient );
+ }
+ else if(pGrfName)
+ aFmt.SetGraphic( *pGrfName );
+ pActNum->SetLevel(i, aFmt);
+ }
+ nMask <<= 1 ;
+ }
+ }
+
+ return 0;
+}
+
+/*-----------------06.06.97 11.17-------------------
+
+--------------------------------------------------*/
+IMPL_LINK(SvxBitmapPickTabPage, DoubleClickHdl_Impl, ValueSet*, EMPTYARG)
+{
+ NumSelectHdl_Impl(pExamplesVS);
+ OKButton& rOk = GetTabDialog()->GetOKButton();
+ rOk.GetClickHdl().Call(&rOk);
+ return 0;
+}
+/* -----------------03.11.99 13:46-------------------
+
+ --------------------------------------------------*/
+IMPL_LINK(SvxBitmapPickTabPage, LinkBmpHdl_Impl, CheckBox*, pBox )
+{
+ if(!pExamplesVS->IsNoSelection())
+ {
+ NumSelectHdl_Impl(pExamplesVS);
+ }
+ return 0;
+}
+/*-----------------13.02.97 09.40-------------------
+
+--------------------------------------------------*/
+
+SvxBmpNumValueSet::SvxBmpNumValueSet( Window* pParent, const ResId& rResId, const List& rStrNames ) :
+
+ SvxNumValueSet( pParent, rResId, NUM_PAGETYPE_BMP ),
+
+ rStrList ( rStrNames ),
+ bGrfNotFound( FALSE )
+
+{
+ SetStyle( GetStyle() | WB_VSCROLL );
+ SetLineCount( 2 );
+ aFormatTimer.SetTimeout(300);
+ aFormatTimer.SetTimeoutHdl(LINK(this, SvxBmpNumValueSet, FormatHdl_Impl));
+}
+
+/*-----------------13.02.97 09.41-------------------
+
+--------------------------------------------------*/
+
+ SvxBmpNumValueSet::~SvxBmpNumValueSet()
+{
+ aFormatTimer.Stop();
+ SvxBmpItemInfo* pInfo = (SvxBmpItemInfo*)aGrfBrushItems.First();
+ while( pInfo )
+ {
+ delete pInfo->pBrushItem;
+ delete pInfo;
+ pInfo = (SvxBmpItemInfo*)aGrfBrushItems.Next();
+ }
+}
+/*-----------------13.02.97 14.19-------------------
+
+--------------------------------------------------*/
+
+SvxBmpItemInfo* SvxBmpNumValueSet::FindInfo(USHORT nInfo)
+{
+ SvxBmpItemInfo* pRet = 0;
+ for ( USHORT i = 0; i < aGrfBrushItems.Count(); i++ )
+ {
+ SvxBmpItemInfo* pInfo = (SvxBmpItemInfo*)aGrfBrushItems.GetObject(i);
+ if(pInfo->nItemId == nInfo)
+ {
+ pRet = pInfo; break;
+ }
+ }
+ return pRet;
+}
+
+/*-----------------13.02.97 09.41-------------------
+
+--------------------------------------------------*/
+
+void SvxBmpNumValueSet::UserDraw( const UserDrawEvent& rUDEvt )
+{
+ SvxNumValueSet::UserDraw(rUDEvt);
+
+ Rectangle aRect = rUDEvt.GetRect();
+ OutputDevice* pDev = rUDEvt.GetDevice();
+ USHORT nItemId = rUDEvt.GetItemId();
+ Point aBLPos = aRect.TopLeft();
+
+ int nRectHeight = aRect.GetHeight();
+ Size aSize(nRectHeight/8, nRectHeight/8);
+
+
+ if(rStrList.Count() > USHORT( nItemId - 1) )
+ {
+ String* pGrfName = (String*)rStrList.GetObject(nItemId - 1);
+ SvxBmpItemInfo* pInfo;
+ if(0 == (pInfo = FindInfo(nItemId)))
+ {
+ pInfo = new SvxBmpItemInfo();
+ pInfo->nItemId = nItemId;
+ String aEmptyStr;
+ pInfo->pBrushItem = new SvxBrushItem(*pGrfName, aEmptyStr, GPOS_AREA);
+ pInfo->pBrushItem->SetDoneLink(STATIC_LINK(
+ this, SvxBmpNumValueSet, GraphicArrivedHdl_Impl));
+ aGrfBrushItems.Insert(pInfo, aGrfBrushItems.Count());
+ }
+
+ const Graphic* pGraphic = pInfo->pBrushItem->GetGraphic(SfxObjectShell::Current());
+ if(pGraphic)
+ {
+ Point aPos(aBLPos.X() + 5, 0);
+ for( USHORT i = 0; i < 3; i++ )
+ {
+ USHORT nY = 11 + i * 33;
+ aPos.Y() = aBLPos.Y() + nRectHeight * nY / 100;
+ pGraphic->Draw(pDev, aPos, aSize);
+ }
+ }
+ else
+ {
+ bGrfNotFound = TRUE;
+ }
+ }
+}
+
+/*-----------------13.02.97 09.41-------------------
+
+--------------------------------------------------*/
+
+IMPL_STATIC_LINK(SvxBmpNumValueSet, GraphicArrivedHdl_Impl, SvxBrushItem*, pItem)
+{
+ // Ueber Timer wird ein Format angeworfen
+ pThis->aFormatTimer.Start();
+ return 0;
+}
+
+/*-----------------14.02.97 07.34-------------------
+
+--------------------------------------------------*/
+
+IMPL_LINK(SvxBmpNumValueSet, FormatHdl_Impl, Timer*, EMPTYARG)
+{
+ // nur, wenn eine Grafik nicht da war, muss formatiert werden
+ if(bGrfNotFound)
+ {
+ bGrfNotFound = FALSE;
+ Format();
+ }
+ Invalidate();
+ return 0;
+}
+/*-----------------01.12.97 16:15-------------------
+ Tabpage Numerierungsoptionen
+--------------------------------------------------*/
+#define NUM_NO_GRAPHIC 1000
+SvxNumOptionsTabPage::SvxNumOptionsTabPage(Window* pParent,
+ const SfxItemSet& rSet) :
+ SfxTabPage( pParent, SVX_RES( RID_SVXPAGE_NUM_OPTIONS ), rSet ),
+
+ aLevelGB( this, ResId(GB_LEVEL )),
+ aLevelLB( this, ResId(LB_LEVEL )),
+ aFormatGB( this, ResId(GB_FORMAT )),
+ aPrefixFT( this, ResId(FT_PREFIX )),
+ aPrefixED( this, ResId(ED_PREFIX )),
+ aFmtFT( this, ResId(FT_FMT )),
+ aFmtLB( this, ResId(LB_FMT )),
+ aSuffixFT( this, ResId(FT_SUFFIX )),
+ aSuffixED( this, ResId(ED_SUFFIX )),
+ aCharFmtFT( this, ResId(FT_CHARFMT )),
+ aCharFmtLB( this, ResId(LB_CHARFMT )),
+ aBulColorFT( this, ResId(FT_BUL_COLOR)),
+ aBulColLB( this, ResId(LB_BUL_COLOR)),
+ aBulRelSizeFT( this, ResId(FT_BUL_REL_SIZE)),
+ aBulRelSizeMF( this, ResId(MF_BUL_REL_SIZE)),
+ aAllLevelFT( this, ResId(FT_ALL_LEVEL)),
+ aAllLevelNF( this, ResId(NF_ALL_LEVEL)),
+ aStartFT( this, ResId(FT_START )),
+ aStartED( this, ResId(ED_START )),
+ aSameLevelGB( this, ResId(GB_SAME_LEVEL)),
+ aSameLevelCB( this, ResId(CB_SAME_LEVEL)),
+ aBulletPB( this, ResId(PB_BULLET )),
+ aBitmapFT( this, ResId(FT_BITMAP )),
+ aBitmapMB( this, ResId(MB_BITMAP )),
+ aRatioCB( this, ResId(CB_RATIO )),
+ aSizeFT( this, ResId(FT_SIZE )),
+ aWidthMF( this, ResId(MF_WIDTH )),
+ aMultFT( this, ResId(FT_MULT )),
+ aHeightMF( this, ResId(MF_HEIGHT )),
+ aOrientFT( this, ResId(FT_ORIENT )),
+ aOrientLB( this, ResId(LB_ORIENT )),
+ aPreviewGB( this, ResId(GB_PREVIEW )),
+ aUseBulletCB( this, ResId(CB_USE_BULLET)),
+ aAlignFT( this, ResId(FT_ALIGN )),
+ aAlignLB( this, ResId(LB_ALIGN )),
+ pPreviewWIN( new SvxNumberingPreview(this, ResId(WIN_PREVIEW ))),
+ sBullet(ResId(STR_BULLET)),
+ pActNum(0),
+ pSaveNum(0),
+ nActNumLvl(USHRT_MAX),
+ nBullet(0xff),
+ bHasChild(FALSE),
+ bLastWidthModified(FALSE),
+ bAutomaticCharStyles(TRUE),
+ bHTMLMode(FALSE),
+ bMenuButtonInitialized(FALSE),
+ nNumItemId(SID_ATTR_NUMBERING_RULE)
+{
+ sStartWith = aStartFT.GetText();
+ pPreviewWIN->SetBackground(Wallpaper(Color(COL_TRANSPARENT)));
+ SetExchangeSupport();
+ aActBulletFont = lcl_GetDefaultBulletFont();
+
+ aBulletPB.SetClickHdl(LINK(this, SvxNumOptionsTabPage, BulletHdl_Impl));
+ aFmtLB.SetSelectHdl(LINK(this, SvxNumOptionsTabPage, NumberTypeSelectHdl_Impl));
+ aBitmapMB.SetSelectHdl(LINK(this, SvxNumOptionsTabPage, GraphicHdl_Impl));
+ aLevelLB.SetSelectHdl(LINK(this, SvxNumOptionsTabPage, LevelHdl_Impl));
+ aCharFmtLB.SetSelectHdl(LINK(this, SvxNumOptionsTabPage, CharFmtHdl_Impl));
+ aWidthMF.SetModifyHdl(LINK(this, SvxNumOptionsTabPage, SizeHdl_Impl));
+ aHeightMF.SetModifyHdl(LINK(this, SvxNumOptionsTabPage, SizeHdl_Impl));
+ aRatioCB.SetClickHdl(LINK(this, SvxNumOptionsTabPage, RatioHdl_Impl));
+ aStartED.SetModifyHdl(LINK(this, SvxNumOptionsTabPage, EditModifyHdl_Impl));
+ aPrefixED.SetModifyHdl(LINK(this, SvxNumOptionsTabPage, EditModifyHdl_Impl));
+ aSuffixED.SetModifyHdl(LINK(this, SvxNumOptionsTabPage, EditModifyHdl_Impl));
+ aAllLevelNF.SetModifyHdl(LINK(this,SvxNumOptionsTabPage, AllLevelHdl_Impl));
+ aOrientLB.SetSelectHdl(LINK(this, SvxNumOptionsTabPage, OrientHdl_Impl));
+ aSameLevelCB.SetClickHdl(LINK(this, SvxNumOptionsTabPage, SameLevelHdl_Impl));
+ aBulRelSizeMF.SetModifyHdl(LINK(this,SvxNumOptionsTabPage, BulRelSizeHdl_Impl));
+ aBulColLB.SetSelectHdl(LINK(this, SvxNumOptionsTabPage, BulColorHdl_Impl));
+ aUseBulletCB.SetClickHdl(LINK(this, SvxNumOptionsTabPage, UseBulletHdl_Impl));
+
+ aBitmapMB.GetPopupMenu()->SetHighlightHdl(LINK(this, SvxNumOptionsTabPage, PopupActivateHdl_Impl));
+ PopupMenu* pPopup = new PopupMenu;
+ aBitmapMB.GetPopupMenu()->SetPopupMenu( MN_GALLERY, pPopup );
+
+ pPopup->InsertItem( NUM_NO_GRAPHIC, String(ResId(ST_POPUP_EMPTY_ENTRY)) );
+ pPopup->EnableItem( NUM_NO_GRAPHIC, FALSE );
+
+ eCoreUnit = rSet.GetPool()->GetMetric(rSet.GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE));
+
+ FreeResource();
+}
+
+/*-----------------01.12.97 16:30-------------------
+
+--------------------------------------------------*/
+SvxNumOptionsTabPage::~SvxNumOptionsTabPage()
+{
+ delete aBitmapMB.GetPopupMenu()->GetPopupMenu( MN_GALLERY );
+ String* pStr = (String*)aGrfNames.First();
+ while( pStr )
+ {
+ delete pStr;
+ pStr = (String*)aGrfNames.Next();
+ }
+ SvxBmpItemInfo* pInfo = (SvxBmpItemInfo*)aGrfBrushItems.First();
+ while( pInfo )
+ {
+ delete pInfo->pBrushItem;
+ delete pInfo;
+ pInfo = (SvxBmpItemInfo*)aGrfBrushItems.Next();
+ }
+ delete pActNum;
+ delete pPreviewWIN;
+ delete pSaveNum;
+}
+
+/*-----------------03.12.97 07:52-------------------
+
+--------------------------------------------------*/
+void SvxNumOptionsTabPage::SetMetric(FieldUnit eMetric)
+{
+ if(eMetric == FUNIT_MM)
+ {
+ aWidthMF .SetDecimalDigits(1);
+ aHeightMF .SetDecimalDigits(1);
+ }
+ aWidthMF .SetUnit( eMetric );
+ aHeightMF .SetUnit( eMetric );
+}
+
+/*-----------------01.12.97 16:30-------------------
+
+--------------------------------------------------*/
+SfxTabPage* SvxNumOptionsTabPage::Create( Window* pParent,
+ const SfxItemSet& rAttrSet)
+{
+ return new SvxNumOptionsTabPage(pParent, rAttrSet);
+};
+/*-----------------01.12.97 16:29-------------------
+
+--------------------------------------------------*/
+void SvxNumOptionsTabPage::ActivatePage(const SfxItemSet& rSet)
+{
+ const SfxPoolItem* pItem;
+ const SfxItemSet* pExampleSet = GetTabDialog()->GetExampleSet();
+ UINT16 nTmpNumLvl = USHRT_MAX;
+ if(pExampleSet)
+ {
+ if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_NUM_PRESET, FALSE, &pItem))
+ bPreset = ((const SfxBoolItem*)pItem)->GetValue();
+ if(SFX_ITEM_SET == pExampleSet->GetItemState(SID_PARAM_CUR_NUM_LEVEL, FALSE, &pItem))
+ nTmpNumLvl = ((const SfxUInt16Item*)pItem)->GetValue();
+ }
+ if(SFX_ITEM_SET == rSet.GetItemState(nNumItemId, FALSE, &pItem))
+ {
+ delete pSaveNum;
+ pSaveNum = new SvxNumRule(*((SvxNumBulletItem*)pItem)->GetNumRule());
+ }
+ //
+ bModified = (!pActNum->Get( 0 ) || bPreset);
+ if(*pActNum != *pSaveNum ||
+ nActNumLvl != nTmpNumLvl)
+ {
+ nActNumLvl = nTmpNumLvl;
+ USHORT nMask = 1;
+ aLevelLB.SetUpdateMode(FALSE);
+ aLevelLB.SetNoSelection();
+ aLevelLB.SelectEntryPos( pActNum->GetLevelCount(), nActNumLvl == USHRT_MAX);
+ if(nActNumLvl != USHRT_MAX)
+ for(USHORT i = 0; i < pActNum->GetLevelCount(); i++)
+ {
+ if(nActNumLvl & nMask)
+ aLevelLB.SelectEntryPos( i, TRUE);
+ nMask <<= 1 ;
+ }
+ aLevelLB.SetUpdateMode(TRUE);
+ *pActNum = *pSaveNum;
+ InitControls();
+ }
+
+}
+/*-----------------01.12.97 16:29-------------------
+
+--------------------------------------------------*/
+int SvxNumOptionsTabPage::DeactivatePage(SfxItemSet *pSet)
+{
+// ((SwNumBulletTabDialog*)GetTabDialog())->SetActNumLevel(nActNumLvl);
+ if(pSet)
+ FillItemSet(*pSet);
+ return TRUE;
+}
+/*-----------------01.12.97 16:29-------------------
+
+--------------------------------------------------*/
+BOOL SvxNumOptionsTabPage::FillItemSet( SfxItemSet& rSet )
+{
+ rSet.Put(SfxUInt16Item(SID_PARAM_CUR_NUM_LEVEL, nActNumLvl));
+ if(bModified && pActNum)
+ {
+ *pSaveNum = *pActNum;
+ rSet.Put(SvxNumBulletItem( *pSaveNum ), nNumItemId);
+ rSet.Put(SfxBoolItem(SID_PARAM_NUM_PRESET, FALSE));
+ }
+ return bModified;
+};
+/*-----------------01.12.97 16:29-------------------
+
+--------------------------------------------------*/
+void SvxNumOptionsTabPage::Reset( const SfxItemSet& rSet )
+{
+ const SfxPoolItem* pItem;
+ //im Draw gibt es das Item als WhichId, im Writer nur als SlotId
+ SfxItemState eState = rSet.GetItemState(SID_ATTR_NUMBERING_RULE, FALSE, &pItem);
+ if(eState != SFX_ITEM_SET)
+ {
+ nNumItemId = rSet.GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE);
+ eState = rSet.GetItemState(nNumItemId, FALSE, &pItem);
+ }
+ DBG_ASSERT(eState == SFX_ITEM_SET, "kein Item gefunden!")
+ delete pSaveNum;
+ pSaveNum = new SvxNumRule(*((SvxNumBulletItem*)pItem)->GetNumRule());
+
+ // Ebenen einfuegen
+ if(!aLevelLB.GetEntryCount())
+ {
+ for(USHORT i = 1; i <= pSaveNum->GetLevelCount(); i++)
+ aLevelLB.InsertEntry( UniString::CreateFromInt32(i));
+ if(pSaveNum->GetLevelCount() > 1)
+ {
+ String sEntry( UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "1 - " ) ) );
+ sEntry += UniString::CreateFromInt32( pSaveNum->GetLevelCount() );
+ aLevelLB.InsertEntry(sEntry);
+ aLevelLB.SelectEntry(sEntry);
+ }
+ else
+ aLevelLB.SelectEntryPos(0);
+ }
+ else
+ aLevelLB.SelectEntryPos(aLevelLB.GetEntryCount() - 1);
+
+// nActNumLvl = ((SwNumBulletTabDialog*)GetTabDialog())->GetActNumLevel();
+ USHORT nMask = 1;
+ aLevelLB.SetUpdateMode(FALSE);
+ aLevelLB.SetNoSelection();
+ if(nActNumLvl == USHRT_MAX)
+ {
+ aLevelLB.SelectEntryPos( pSaveNum->GetLevelCount(), TRUE);
+ }
+ else
+ for(USHORT i = 0; i < pSaveNum->GetLevelCount(); i++)
+ {
+ if(nActNumLvl & nMask)
+ aLevelLB.SelectEntryPos( i, TRUE);
+ nMask <<= 1 ;
+ }
+ aLevelLB.SetUpdateMode(TRUE);
+
+ if(SFX_ITEM_SET == rSet.GetItemState(SID_PARAM_CHILD_LEVELS, FALSE, &pItem))
+ bHasChild = ((const SfxBoolItem*)pItem)->GetValue();
+ if(!pActNum)
+ pActNum = new SvxNumRule(*pSaveNum);
+ else if(*pSaveNum != *pActNum)
+ *pActNum = *pSaveNum;
+ pPreviewWIN->SetNumRule(pActNum);
+ aSameLevelCB.Check(pActNum->IsContinuousNumbering());
+
+ //ColorListBox bei Bedarf fuellen
+ if(pActNum->IsFeatureSupported(NUM_BULLET_COLOR))
+ {
+ SfxObjectShell* pDocSh = SfxObjectShell::Current();
+ XColorTable* pColorTable = NULL;
+ FASTBOOL bKillTable = FALSE;
+ DBG_ASSERT( pDocSh, "DocShell not found!" );
+ if ( pDocSh && ( pItem = pDocSh->GetItem( SID_COLOR_TABLE ) ) )
+ pColorTable = ( (SvxColorTableItem*)pItem )->GetColorTable();
+
+ if ( !pColorTable )
+ {
+ pColorTable = new XColorTable( SFX_INIMANAGER()->Get( SFX_KEY_PALETTE_PATH));
+ bKillTable = TRUE;
+ }
+
+ for ( long i = 0; i < pColorTable->Count(); i++ )
+ {
+ XColorEntry* pEntry = pColorTable->Get(i);
+ aBulColLB.InsertEntry( pEntry->GetColor(), pEntry->GetName() );
+ }
+ if(bKillTable)
+ delete pColorTable;
+ }
+
+ SfxObjectShell* pShell;
+ if ( SFX_ITEM_SET == rSet.GetItemState( SID_HTML_MODE, FALSE, &pItem )
+ || ( 0 != ( pShell = SfxObjectShell::Current()) &&
+ 0 != ( pItem = pShell->GetItem( SID_HTML_MODE ) ) ) )
+ {
+ USHORT nHtmlMode = ((SfxUInt16Item*)pItem)->GetValue();
+ bHTMLMode = 0 != (nHtmlMode&HTMLMODE_ON);
+ }
+
+ BOOL bCharFmt = pActNum->IsFeatureSupported(NUM_CHAR_STYLE);
+ aCharFmtFT.Show(bCharFmt);
+ aCharFmtLB.Show(bCharFmt);
+
+ BOOL bContinuous = pActNum->IsFeatureSupported(NUM_CONTINUOUS);
+
+ BOOL bAllLevel = bContinuous && !bHTMLMode;
+ aAllLevelFT.Show(bAllLevel);
+ aAllLevelNF.Show(bAllLevel);
+
+ aSameLevelGB.Show(bContinuous);
+ aSameLevelCB.Show(bContinuous);
+ //wieder Missbrauch: im Draw gibt es die Numerierung nur bis zum Bitmap
+ // without SVX_NUM_NUMBER_NONE
+ if(!bContinuous)
+ {
+ USHORT nFmtCount = aFmtLB.GetEntryCount();
+ for(USHORT i = nFmtCount; i; i--)
+ {
+ USHORT nEntryData = (USHORT)(ULONG)aFmtLB.GetEntryData(i - 1);
+ if(SVX_NUM_NUMBER_NONE == nEntryData ||
+ SVX_NUM_BITMAP < nEntryData)
+ aFmtLB.RemoveEntry(i - 1);
+ }
+ }
+ //one must be enabled
+ if(!pActNum->IsFeatureSupported(NUM_ENABLE_LINKED_BMP))
+ {
+ long nData = SVX_NUM_BITMAP|LINK_TOKEN;
+ USHORT nPos = aFmtLB.GetEntryPos((void*)nData);
+ if(LISTBOX_ENTRY_NOTFOUND != nPos)
+ aFmtLB.RemoveEntry(nPos);
+ }
+ else if(!pActNum->IsFeatureSupported(NUM_ENABLE_EMBEDDED_BMP))
+ {
+ long nData = SVX_NUM_BITMAP;
+ USHORT nPos = aFmtLB.GetEntryPos((void*)nData);
+ if(LISTBOX_ENTRY_NOTFOUND != nPos)
+ aFmtLB.RemoveEntry(nPos);
+ }
+ if(pActNum->IsFeatureSupported(NUM_HIDDEN_SYMBOLS))
+ {
+ Size aSz(aFormatGB.GetSizePixel());
+ aSz.Height() = aLevelGB.GetSizePixel().Height();
+ aFormatGB.SetSizePixel(aSz);
+ aUseBulletCB.Show(TRUE);
+ }
+ if(pActNum->IsFeatureSupported(NUM_SYMBOL_ALIGNMENT))
+ {
+ aAlignFT.Show();
+ aAlignLB.Show();
+ Size aSz(aFormatGB.GetSizePixel());
+ aSz.Height() = aLevelGB.GetSizePixel().Height();
+ aFormatGB.SetSizePixel(aSz);
+ aAlignLB.SetSelectHdl(LINK(this, SvxNumOptionsTabPage, EditModifyHdl_Impl));
+ }
+
+ //MegaHack: Aufgrund eines nicht fixbaren 'designfehlers' im Impress
+ //Alle arten der numerischen Aufzaehlungen loeschen
+ if(pActNum->IsFeatureSupported(NUM_NO_NUMBERS))
+ {
+ USHORT nFmtCount = aFmtLB.GetEntryCount();
+ for(USHORT i = nFmtCount; i; i--)
+ {
+ USHORT nEntryData = (USHORT)(ULONG)aFmtLB.GetEntryData(i - 1);
+ if(nEntryData >= SVX_NUM_CHARS_UPPER_LETTER && nEntryData <= SVX_NUM_NUMBER_NONE)
+ aFmtLB.RemoveEntry(i - 1);
+ }
+ }
+
+ InitControls();
+ bModified = FALSE;
+
+}
+/*-----------------02.12.97 13:47-------------------
+
+--------------------------------------------------*/
+void SvxNumOptionsTabPage::InitControls()
+{
+ BOOL bShowBullet = TRUE;
+ BOOL bShowBitmap = TRUE;
+ BOOL bSameType = TRUE;
+ BOOL bSameStart = TRUE;
+ BOOL bSamePrefix = TRUE;
+ BOOL bSameSuffix = TRUE;
+ BOOL bAllLevel = TRUE;
+ BOOL bSameCharFmt = TRUE;
+ BOOL bSameVOrient = TRUE;
+ BOOL bSameSize = TRUE;
+ BOOL bSameBulColor = TRUE;
+ BOOL bSameBulRelSize= TRUE;
+ BOOL bSameUseBullets = TRUE;
+ BOOL bSameAdjust = TRUE;
+
+ const SvxNumberFormat* aNumFmtArr[SVX_MAX_NUM];
+ String sFirstCharFmt;
+ SvxFrameVertOrient eFirstOrient = SVX_VERT_NONE;
+ Size aFirstSize(0,0);
+ USHORT nMask = 1;
+ USHORT nLvl = USHRT_MAX;
+ USHORT nHighestLevel = 0;
+ String aEmptyStr;
+
+ BOOL bBullColor = pActNum->IsFeatureSupported(NUM_BULLET_COLOR);
+ BOOL bBullRelSize = pActNum->IsFeatureSupported(NUM_BULLET_REL_SIZE);
+ for(USHORT i = 0; i < pActNum->GetLevelCount(); i++)
+ {
+ if(nActNumLvl & nMask)
+ {
+ aNumFmtArr[i] = &pActNum->GetLevel(i);
+ bShowBullet &= aNumFmtArr[i]->GetNumType() == SVX_NUM_CHAR_SPECIAL;
+ bShowBitmap &= (aNumFmtArr[i]->GetNumType()&(~LINK_TOKEN)) == SVX_NUM_BITMAP;
+ if(USHRT_MAX == nLvl)
+ {
+ nLvl = i;
+ sFirstCharFmt = aNumFmtArr[i]->GetCharFmt();
+ eFirstOrient = aNumFmtArr[i]->GetVertOrient();
+ if(bShowBitmap)
+ aFirstSize = aNumFmtArr[i]->GetGraphicSize();
+ }
+ if( i > nLvl)
+ {
+ bSameType &= aNumFmtArr[i]->GetNumType() == aNumFmtArr[nLvl]->GetNumType();
+ bSameStart = aNumFmtArr[i]->GetStart() == aNumFmtArr[nLvl]->GetStart();
+
+ bSamePrefix = aNumFmtArr[i]->GetPrefix() == aNumFmtArr[nLvl]->GetPrefix();
+ bSameSuffix = aNumFmtArr[i]->GetSuffix() == aNumFmtArr[nLvl]->GetSuffix();
+ bAllLevel &= aNumFmtArr[i]->GetIncludeUpperLevels() == aNumFmtArr[nLvl]->GetIncludeUpperLevels();
+ bSameCharFmt &= sFirstCharFmt == aNumFmtArr[i]->GetCharFmt();
+ bSameVOrient &= eFirstOrient == aNumFmtArr[i]->GetVertOrient();
+ if(bShowBitmap && bSameSize)
+ bSameSize &= aNumFmtArr[i]->GetGraphicSize() == aFirstSize;
+ bSameBulColor &= aNumFmtArr[i]->GetBulletColor() == aNumFmtArr[nLvl]->GetBulletColor();
+ bSameBulRelSize &= aNumFmtArr[i]->GetBulletRelSize() == aNumFmtArr[nLvl]->GetBulletRelSize();
+ bSameUseBullets &= aNumFmtArr[i]->IsShowSymbol() == aNumFmtArr[nLvl]->IsShowSymbol();
+ bSameAdjust &= aNumFmtArr[i]->GetNumAdjust() == aNumFmtArr[nLvl]->GetNumAdjust();
+ }
+ nHighestLevel = i;
+ }
+ else
+ aNumFmtArr[i] = 0;
+
+ nMask <<= 1 ;
+
+ }
+ SwitchNumberType(bShowBullet ? 1 : bShowBitmap ? 2 : 0);
+ if(bShowBitmap)
+ {
+ if(!bSameVOrient || eFirstOrient == SVX_VERT_NONE)
+ aOrientLB.SetNoSelection();
+ else
+ aOrientLB.SelectEntryPos(eFirstOrient - 1);// kein SVX_VERT_NONE
+
+ if(bSameSize)
+ {
+ SetMetricValue(aHeightMF, aFirstSize.Height(), eCoreUnit);
+ SetMetricValue(aWidthMF, aFirstSize.Width(), eCoreUnit);
+ }
+ else
+ {
+ aHeightMF.SetText(aEmptyStr);
+ aWidthMF.SetText(aEmptyStr);
+ }
+ }
+
+ if(bSameType)
+ {
+ USHORT nLBData = (USHORT) aNumFmtArr[nLvl]->GetNumType();
+ aFmtLB.SelectEntryPos(aFmtLB.GetEntryPos( (void*) nLBData ));
+ }
+ else
+ aFmtLB.SetNoSelection();
+
+ aAllLevelNF.Enable(nHighestLevel > 0 && !aSameLevelCB.IsChecked());
+ aAllLevelNF.SetMax(nHighestLevel + 1);
+ if(bAllLevel)
+ {
+ aAllLevelNF.SetValue(aNumFmtArr[nLvl]->GetIncludeUpperLevels());
+ }
+ else
+ {
+ aAllLevelNF.SetText(aEmptyStr);
+ }
+ if(bSameUseBullets)
+ aUseBulletCB.Check(
+ aNumFmtArr[nLvl]->IsShowSymbol() ? STATE_CHECK : STATE_NOCHECK);
+ else
+ {
+ aUseBulletCB.EnableTriState(TRUE);
+ aUseBulletCB.SetState(STATE_DONTKNOW);
+ }
+ if(bSameAdjust)
+ {
+ USHORT nPos = 1; // zentriert
+ if(aNumFmtArr[nLvl]->GetNumAdjust() == SVX_ADJUST_LEFT)
+ nPos = 0;
+ else if(aNumFmtArr[nLvl]->GetNumAdjust() == SVX_ADJUST_RIGHT)
+ nPos = 2;
+ aAlignLB.SelectEntryPos(nPos);
+ }
+ else
+ {
+ aAlignLB.SetNoSelection();
+ }
+
+ if(bBullRelSize)
+ {
+ if(bSameBulRelSize)
+ aBulRelSizeMF.SetValue(aNumFmtArr[nLvl]->GetBulletRelSize());
+ else
+ aBulRelSizeMF.SetText(aEmptyStr);
+ }
+ if(bBullColor)
+ {
+ if(bSameBulColor)
+ aBulColLB.SelectEntry(aNumFmtArr[nLvl]->GetBulletColor());
+ else
+ aBulColLB.SetNoSelection();
+ }
+ switch(nBullet)
+ {
+ case SHOW_NUMBERING:
+ if(bSameStart)
+ {
+ aStartED.SetValue(aNumFmtArr[nLvl]->GetStart());
+ }
+ else
+ aStartED.SetText(aEmptyStr);
+ break;
+ case SHOW_BULLET:
+ {
+// const Font* pFnt = aNumFmtArr[Lvl]->GetBulletFont();
+// if(pFnt)
+// ChgTxtFont(aBulletFT, *pFnt);
+// aBulletFT.SetText(String((char)aNumFmtArr[nLvl]->GetBulletChar()));
+ }
+ break;
+ case SHOW_BITMAP:
+ break;
+ }
+
+ if(bSamePrefix)
+ aPrefixED.SetText(aNumFmtArr[nLvl]->GetPrefix());
+ else
+ aPrefixED.SetText(aEmptyStr);
+ if(bSameSuffix)
+ aSuffixED.SetText(aNumFmtArr[nLvl]->GetSuffix());
+ else
+ aSuffixED.SetText(aEmptyStr);
+
+ if(bSameCharFmt)
+ {
+ if(sFirstCharFmt.Len())
+ aCharFmtLB.SelectEntry(sFirstCharFmt);
+ else
+ aCharFmtLB.SelectEntryPos( 0 );
+ }
+ else
+ aCharFmtLB.SetNoSelection();
+}
+
+/*-----------------02.12.97 14:01-------------------
+ 0 - Nummer; 1 - Bullet; 2 - Bitmap
+--------------------------------------------------*/
+
+void SvxNumOptionsTabPage::SwitchNumberType( BYTE nType, BOOL bBmp )
+{
+ if(nBullet == nType)
+ return;
+ nBullet = nType;
+ BOOL bBitmap = FALSE;
+ BOOL bBullet = FALSE;
+ BOOL bEnableBitmap = FALSE;
+ if(nType == SHOW_NUMBERING)
+ {
+ // Label umschalten, alten Text merken
+ aStartFT.SetText(sStartWith);
+
+ }
+ else if(nType == SHOW_BULLET)
+ {
+ // Label umschalten, alten Text merken
+ aStartFT.SetText(sBullet);
+ bBullet = TRUE;
+ }
+ else
+ {
+ bBitmap = TRUE;
+ bEnableBitmap = TRUE;
+ }
+ BOOL bNumeric = !(bBitmap||bBullet);
+ aPrefixFT.Show(bNumeric);
+ aPrefixED.Show(bNumeric);
+ aSuffixFT.Show(bNumeric);
+ aSuffixED.Show(bNumeric);
+
+ BOOL bCharFmt = pActNum->IsFeatureSupported(NUM_CHAR_STYLE);
+ aCharFmtFT.Show(!bBitmap && bCharFmt);
+ aCharFmtLB.Show(!bBitmap && bCharFmt);
+
+ // das ist eigentlich Missbrauch, da fuer die vollst. Numerierung kein
+ // eigenes Flag existiert
+ BOOL bAllLevelFeature = pActNum->IsFeatureSupported(NUM_CONTINUOUS);
+ BOOL bAllLevel = bNumeric && bAllLevelFeature && !bHTMLMode;
+ aAllLevelFT.Show(bAllLevel);
+ aAllLevelNF.Show(bAllLevel);
+
+ aStartFT.Show(!bBitmap);
+ aStartED.Show(!(bBullet||bBitmap));
+
+ aBulletPB.Show(bBullet);
+ BOOL bBullColor = pActNum->IsFeatureSupported(NUM_BULLET_COLOR);
+ aBulColorFT.Show( !bBitmap && bBullColor );
+ aBulColLB.Show( !bBitmap && bBullColor );
+ BOOL bBullResSize = pActNum->IsFeatureSupported(NUM_BULLET_REL_SIZE);
+ aBulRelSizeFT.Show( !bBitmap && bBullResSize );
+ aBulRelSizeMF.Show( !bBitmap && bBullResSize );
+
+ aBitmapFT .Show(bBitmap);
+ aBitmapMB .Show(bBitmap);
+
+ aSizeFT .Show(bBitmap);
+ aWidthMF .Show(bBitmap);
+ aMultFT .Show(bBitmap);
+ aHeightMF .Show(bBitmap);
+ aRatioCB .Show(bBitmap);
+
+ aOrientFT .Show(bBitmap && bAllLevelFeature);
+ aOrientLB .Show(bBitmap && bAllLevelFeature);
+
+ aSizeFT .Enable(bEnableBitmap);
+ aWidthMF .Enable(bEnableBitmap);
+ aMultFT .Enable(bEnableBitmap);
+ aHeightMF .Enable(bEnableBitmap);
+ aRatioCB .Enable(bEnableBitmap);
+ aOrientFT .Enable(bEnableBitmap);
+ aOrientLB .Enable(bEnableBitmap);
+
+}
+/*-----------------02.12.97 13:51-------------------
+
+--------------------------------------------------*/
+IMPL_LINK( SvxNumOptionsTabPage, LevelHdl_Impl, ListBox *, pBox )
+{
+ USHORT nSaveNumLvl = nActNumLvl;
+ nActNumLvl = 0;
+ if(pBox->IsEntryPosSelected( pActNum->GetLevelCount() ) &&
+ (pBox->GetSelectEntryCount() == 1 || nSaveNumLvl != 0xffff))
+ {
+ nActNumLvl = 0xFFFF;
+ pBox->SetUpdateMode(FALSE);
+ for( USHORT i = 0; i < pActNum->GetLevelCount(); i++ )
+ pBox->SelectEntryPos( i, FALSE );
+ pBox->SetUpdateMode(TRUE);
+ }
+ else if(pBox->GetSelectEntryCount())
+ {
+ USHORT nMask = 1;
+ for( USHORT i = 0; i < pActNum->GetLevelCount(); i++ )
+ {
+ if(pBox->IsEntryPosSelected( i ))
+ nActNumLvl |= nMask;
+ nMask <<= 1;
+ }
+ pBox->SelectEntryPos( pActNum->GetLevelCount(), FALSE );
+ }
+ else
+ {
+ nActNumLvl = nSaveNumLvl;
+ USHORT nMask = 1;
+ for( USHORT i = 0; i < pActNum->GetLevelCount(); i++ )
+ {
+ if(nActNumLvl & nMask)
+ {
+ pBox->SelectEntryPos(i);
+ break;
+ }
+ nMask <<=1;
+ }
+ }
+ InitControls();
+ return 0;
+}
+/* -----------------24.11.98 15:41-------------------
+ *
+ * --------------------------------------------------*/
+IMPL_LINK( SvxNumOptionsTabPage, UseBulletHdl_Impl, TriStateBox*, pBox )
+{
+ pBox->EnableTriState(FALSE);
+ for(USHORT i = 0; i < pActNum->GetLevelCount(); i++)
+ {
+ USHORT nMask = 1;
+ for(USHORT i = 0; i < pActNum->GetLevelCount(); i++)
+ {
+ if(nActNumLvl & nMask)
+ {
+ SvxNumberFormat aNumFmt(pActNum->GetLevel(i));
+ aNumFmt.SetShowSymbol(pBox->IsChecked());
+ pActNum->SetLevel(i, aNumFmt);
+ }
+ nMask <<= 1;
+ }
+ }
+ SetModified();
+ return 0;
+}
+/*-----------------03.12.97 12:01-------------------
+
+--------------------------------------------------*/
+IMPL_LINK( SvxNumOptionsTabPage, AllLevelHdl_Impl, NumericField*, pBox )
+{
+ for(USHORT i = 0; i < pActNum->GetLevelCount(); i++)
+ {
+ USHORT nMask = 1;
+ for(USHORT i = 0; i < pActNum->GetLevelCount(); i++)
+ {
+ if(nActNumLvl & nMask)
+ {
+ SvxNumberFormat aNumFmt(pActNum->GetLevel(i));
+ aNumFmt.SetIncludeUpperLevels((BYTE) min(pBox->GetValue(), i + 1) );
+ pActNum->SetLevel(i, aNumFmt);
+ }
+ nMask <<= 1;
+ }
+ }
+ SetModified();
+ return 0;
+}
+
+/*-----------------02.12.97 08:56-------------------
+
+--------------------------------------------------*/
+IMPL_LINK( SvxNumOptionsTabPage, NumberTypeSelectHdl_Impl, ListBox *, pBox )
+{
+ String sSelectStyle;
+ SvxExtNumType eOldType;
+ BOOL bShowOrient = FALSE;
+ BOOL bBmp = FALSE;
+ String aEmptyStr;
+ USHORT nMask = 1;
+ for(USHORT i = 0; i < pActNum->GetLevelCount(); i++)
+ {
+ if(nActNumLvl & nMask)
+ {
+ SvxNumberFormat aNumFmt(pActNum->GetLevel(i));
+ eOldType = aNumFmt.GetNumType();
+ // PAGEDESC gibt es nicht
+ USHORT nNumType = (USHORT)(ULONG)pBox->GetEntryData(pBox->GetSelectEntryPos());
+ aNumFmt.SetNumType((SvxExtNumType)nNumType);
+ if(SVX_NUM_BITMAP == (aNumFmt.GetNumType()&(~LINK_TOKEN)))
+ {
+ bBmp |= 0 != aNumFmt.GetBrush();
+ aNumFmt.SetIncludeUpperLevels( FALSE );
+ aNumFmt.SetSuffix( aEmptyStr );
+ aNumFmt.SetPrefix( aEmptyStr );
+ if(!bBmp)
+ aNumFmt.SetGraphic(aEmptyStr);
+ pActNum->SetLevel(i, aNumFmt);
+ SwitchNumberType(SHOW_BITMAP, bBmp );
+ bShowOrient = TRUE;
+ }
+ else if( SVX_NUM_CHAR_SPECIAL == aNumFmt.GetNumType() )
+ {
+ aNumFmt.SetIncludeUpperLevels( FALSE );
+ aNumFmt.SetSuffix( aEmptyStr );
+ aNumFmt.SetPrefix( aEmptyStr );
+ if( !aNumFmt.GetBulletFont() )
+ aNumFmt.SetBulletFont(&aActBulletFont);
+ if( !aNumFmt.GetBulletChar() )
+ aNumFmt.SetBulletChar( SVX_DEF_BULLET );
+ pActNum->SetLevel(i, aNumFmt);
+ SwitchNumberType(SHOW_BULLET);
+ //ChgTxtFont(aBulletFT, *aNumFmt.GetBulletFont());
+ //aBulletFT.SetText( aNumFmt.GetBulletChar() );
+ // Zuweisung der Zeichenvorlage automatisch
+ if(bAutomaticCharStyles)
+ {
+ sSelectStyle = sBulletCharFmtName;
+ }
+ }
+ else
+ {
+ aNumFmt.SetPrefix( aPrefixED.GetText() );
+ aNumFmt.SetSuffix( aSuffixED.GetText() );
+// aNumFmt.SetBulletFont(0);
+ SwitchNumberType(SHOW_NUMBERING);
+ pActNum->SetLevel(i, aNumFmt);
+ // Zuweisung der Zeichenvorlage automatisch
+ if(bAutomaticCharStyles)
+ {
+ sSelectStyle = sNumCharFmtName;
+ }
+ }
+ }
+ nMask <<= 1;
+ }
+ BOOL bAllLevelFeature = pActNum->IsFeatureSupported(NUM_CONTINUOUS);
+ if(bShowOrient && bAllLevelFeature)
+ {
+ aOrientFT.Show();
+ aOrientLB.Show();
+ }
+ else
+ {
+ aOrientFT.Hide();
+ aOrientLB.Hide();
+ }
+ SetModified();
+ if(sSelectStyle.Len())
+ {
+ aCharFmtLB.SelectEntry(sSelectStyle);
+ CharFmtHdl_Impl(&aCharFmtLB);
+ // bAutomaticCharStyles wird im CharFmtHdl_Impl zurueckgesetzt
+ bAutomaticCharStyles = TRUE;
+ }
+ return 0;
+
+
+}
+/*-----------------03.12.97 16:43-------------------
+
+--------------------------------------------------*/
+IMPL_LINK( SvxNumOptionsTabPage, OrientHdl_Impl, ListBox *, pBox )
+{
+ USHORT nPos = pBox->GetSelectEntryPos();
+ nPos ++; // kein VERT_NONE
+
+ USHORT nMask = 1;
+ for(USHORT i = 0; i < pActNum->GetLevelCount(); i++)
+ {
+ if(nActNumLvl & nMask)
+ {
+ SvxNumberFormat aNumFmt(pActNum->GetLevel(i));
+ if(SVX_NUM_BITMAP == (aNumFmt.GetNumType()&(~LINK_TOKEN)))
+ {
+ const SvxBrushItem* pBrushItem = aNumFmt.GetBrush();
+ const Size& rSize = aNumFmt.GetGraphicSize();
+ SvxFrameVertOrient eOrient = (SvxFrameVertOrient)nPos;
+ aNumFmt.SetGraphicBrush( pBrushItem, &rSize, &eOrient );
+ pActNum->SetLevel(i, aNumFmt);
+ }
+ }
+ nMask <<= 1;
+ }
+ SetModified(FALSE);
+ return 0;
+
+}
+
+/*-----------------06.12.97 12:00-------------------
+
+--------------------------------------------------*/
+IMPL_LINK( SvxNumOptionsTabPage, SameLevelHdl_Impl, CheckBox *, pBox )
+{
+ BOOL bSet = pBox->IsChecked();
+ pActNum->SetContinuousNumbering(bSet);
+ BOOL bRepaint = FALSE;
+ for(USHORT i = 0; i < pActNum->GetLevelCount(); i++)
+ {
+ SvxNumberFormat aNumFmt(pActNum->GetLevel(i));
+ if(aNumFmt.GetNumType() < SVX_NUM_NUMBER_NONE)
+ {
+ bRepaint = TRUE;
+ break;
+ }
+ }
+ SetModified(bRepaint);
+ InitControls();
+ return 0;
+}
+/* -----------------16.11.98 14:20-------------------
+ *
+ * --------------------------------------------------*/
+IMPL_LINK( SvxNumOptionsTabPage, BulColorHdl_Impl, ColorListBox*, pBox )
+{
+ Color nSetColor = pBox->GetSelectEntryColor();
+
+ USHORT nMask = 1;
+ for(USHORT i = 0; i < pActNum->GetLevelCount(); i++)
+ {
+ if(nActNumLvl & nMask)
+ {
+ SvxNumberFormat aNumFmt(pActNum->GetLevel(i));
+ aNumFmt.SetBulletColor(nSetColor);
+ pActNum->SetLevel(i, aNumFmt);
+ }
+ nMask <<= 1;
+ }
+ SetModified();
+ return 0;
+}
+/* -----------------16.11.98 14:20-------------------
+ *
+ * --------------------------------------------------*/
+IMPL_LINK( SvxNumOptionsTabPage, BulRelSizeHdl_Impl, MetricField *, pField)
+{
+ USHORT nRelSize = (USHORT)pField->GetValue();
+
+ USHORT nMask = 1;
+ for(USHORT i = 0; i < pActNum->GetLevelCount(); i++)
+ {
+ if(nActNumLvl & nMask)
+ {
+ SvxNumberFormat aNumFmt(pActNum->GetLevel(i));
+ aNumFmt.SetBulletRelSize(nRelSize);
+ pActNum->SetLevel(i, aNumFmt);
+ }
+ nMask <<= 1;
+ }
+ SetModified();
+ return 0;
+}
+
+/*-----------------02.12.97 10:50-------------------
+
+--------------------------------------------------*/
+IMPL_LINK( SvxNumOptionsTabPage, GraphicHdl_Impl, MenuButton *, pButton )
+{
+ USHORT nItemId = pButton->GetCurItemId();
+ const Graphic* pGraphic = 0;
+ String aGrfName;
+ SvxImportGraphicDialog* pGrfDlg = 0;
+
+ if(MN_GALLERY_ENTRY <= nItemId )
+ {
+ aGrfName = *((String*)aGrfNames.GetObject( nItemId - MN_GALLERY_ENTRY));
+ SvxBmpItemInfo* pInfo = (SvxBmpItemInfo*)aGrfBrushItems.GetObject(nItemId - MN_GALLERY_ENTRY);
+ pGraphic = pInfo->pBrushItem->GetGraphic();
+ }
+ else
+ {
+ pGrfDlg = new SvxImportGraphicDialog( this,
+ SVX_RESSTR(RID_STR_EDIT_GRAPHIC), ENABLE_STANDARD );
+ if ( pGrfDlg->Execute() == RET_OK )
+ {
+ // ausgewaehlten Filter merken
+ aGrfName = pGrfDlg->GetPath();
+ pGraphic = pGrfDlg->GetGraphic();
+ }
+ }
+ if(pGraphic)
+ {
+ Size aSize = SvxNumberFormat::GetGraphicSizeMM100(pGraphic);
+ aSize = OutputDevice::LogicToLogic(aSize, MAP_100TH_MM, (MapUnit)eCoreUnit);
+
+ USHORT nMask = 1;
+ for(USHORT i = 0; i < pActNum->GetLevelCount(); i++)
+ {
+ if(nActNumLvl & nMask)
+ {
+ SvxNumberFormat aNumFmt(pActNum->GetLevel(i));
+ aNumFmt.SetCharFmt(sNumCharFmtName);
+ aNumFmt.SetGraphic(aGrfName);
+
+ // Size schon mal fuer spaeteren Groessenabgleich setzen
+ const SvxBrushItem* pBrushItem = aNumFmt.GetBrush();
+ SvxFrameVertOrient eOrient = aNumFmt.GetVertOrient();
+ aNumFmt.SetGraphicBrush( pBrushItem, &aSize, &eOrient );
+ aInitSize[i] = aNumFmt.GetGraphicSize();
+
+ pActNum->SetLevel(i, aNumFmt);
+ }
+ nMask <<= 1;
+ }
+ aRatioCB .Enable();
+ aSizeFT .Enable();
+ aMultFT.Enable();
+ aWidthMF .Enable();
+ aHeightMF.Enable();
+ SetMetricValue(aWidthMF, aSize.Width(), eCoreUnit);
+ SetMetricValue(aHeightMF, aSize.Height(), eCoreUnit);
+ aOrientFT.Enable();
+ aOrientLB.Enable();
+ SetModified();
+ }
+ delete pGrfDlg;
+ return 0;
+}
+/* -----------------27.07.99 12:20-------------------
+
+ --------------------------------------------------*/
+IMPL_LINK( SvxNumOptionsTabPage, PopupActivateHdl_Impl, Menu *, pMenu )
+{
+ if(!bMenuButtonInitialized)
+ {
+ bMenuButtonInitialized = TRUE;
+ EnterWait();
+ PopupMenu* pPopup = aBitmapMB.GetPopupMenu()->GetPopupMenu( MN_GALLERY );
+ GalleryExplorer::FillObjList(GALLERY_THEME_BULLETS, aGrfNames);
+ if(aGrfNames.Count())
+ {
+ pPopup->RemoveItem( pPopup->GetItemPos( NUM_NO_GRAPHIC ));
+ String aEmptyStr;
+ SfxObjectShell *pDocSh = SfxObjectShell::Current();
+ for(USHORT i = 0; i < aGrfNames.Count(); i++)
+ {
+ const String* pGrfName = (const String*)aGrfNames.GetObject(i);
+
+ SvxBrushItem* pBrushItem = new SvxBrushItem(*pGrfName, aEmptyStr, GPOS_AREA);
+ pBrushItem->SetDoneLink(STATIC_LINK(
+ this, SvxNumOptionsTabPage, GraphicArrivedHdl_Impl));
+
+ SvxBmpItemInfo* pInfo = new SvxBmpItemInfo();
+ pInfo->pBrushItem = pBrushItem;
+ pInfo->nItemId = MN_GALLERY_ENTRY + i;
+ aGrfBrushItems.Insert(pInfo, i);
+ const Graphic* pGraphic = pBrushItem->GetGraphic(pDocSh);
+
+ if(pGraphic)
+ {
+ Bitmap aBitmap(pGraphic->GetBitmap());
+ Size aSize(aBitmap.GetSizePixel());
+ if(aSize.Width() > MAX_BMP_WIDTH ||
+ aSize.Height() > MAX_BMP_HEIGHT)
+ {
+ BOOL bWidth = aSize.Width() > aSize.Height();
+ double nScale = bWidth ?
+ (double)MAX_BMP_WIDTH / (double)aSize.Width():
+ (double)MAX_BMP_HEIGHT / (double)aSize.Height();
+ aBitmap.Scale(nScale, nScale);
+
+ }
+ Image aImage(aBitmap);
+ pPopup->InsertItem(
+ pInfo->nItemId, *pGrfName, aImage );
+ }
+ else
+ {
+ Image aImage;
+ pPopup->InsertItem(
+ pInfo->nItemId, *pGrfName, aImage );
+ }
+ }
+ }
+ LeaveWait();
+ }
+ return 0;
+}
+
+/*-----------------02.12.97 10:58-------------------
+
+--------------------------------------------------*/
+IMPL_LINK( SvxNumOptionsTabPage, BulletHdl_Impl, Button *, pBtn )
+{
+ SvxCharacterMap* pMap = new SvxCharacterMap(this, TRUE);
+
+ USHORT nMask = 1;
+ const Font* pFmtFont = 0;
+ BOOL bSameBullet = TRUE;
+ unsigned char cBullet;
+ BOOL bFirst = TRUE;
+ for(USHORT i = 0; i < pActNum->GetLevelCount(); i++)
+ {
+ if(nActNumLvl & nMask)
+ {
+ const SvxNumberFormat& rCurFmt = pActNum->GetLevel(i);
+ if(bFirst)
+ {
+ cBullet = rCurFmt.GetBulletChar();
+ }
+ else if(rCurFmt.GetBulletChar() != cBullet )
+ {
+ bSameBullet = FALSE;
+ break;
+ }
+ if(!pFmtFont)
+ pFmtFont = rCurFmt.GetBulletFont();
+ bFirst = FALSE;
+ }
+ nMask <<= 1;
+
+ }
+
+ if(pFmtFont)
+ pMap->SetCharFont(*pFmtFont);
+ else
+ pMap->SetCharFont(aActBulletFont);
+ if(bSameBullet)
+ pMap->SetChar( cBullet );
+ if(pMap->Execute() == RET_OK)
+ {
+ // Font Numrules umstellen
+ aActBulletFont = pMap->GetCharFont();
+
+ USHORT nMask = 1;
+ for(USHORT i = 0; i < pActNum->GetLevelCount(); i++)
+ {
+ if(nActNumLvl & nMask)
+ {
+ SvxNumberFormat aNumFmt(pActNum->GetLevel(i));
+ aNumFmt.SetBulletFont(&aActBulletFont); ;
+ aNumFmt.SetBulletChar( pMap->GetChar() );
+ pActNum->SetLevel(i, aNumFmt);
+ }
+ nMask <<= 1;
+ }
+// ChgTxtFont(aBulletFT, aActBulletFont);
+// aBulletFT.SetText( pMap->GetChar() );
+
+ SetModified();
+ }
+ delete pMap;
+ return 0;
+}
+
+/*-----------------03.03.97 15:21-------------------
+
+--------------------------------------------------*/
+
+IMPL_LINK( SvxNumOptionsTabPage, SizeHdl_Impl, MetricField *, pField)
+{
+ BOOL bWidth = pField == &aWidthMF;
+ bLastWidthModified = bWidth;
+ BOOL bRatio = aRatioCB.IsChecked();
+ long nWidthVal = aWidthMF.Denormalize(aWidthMF.GetValue(FUNIT_100TH_MM));
+ long nHeightVal = aHeightMF.Denormalize(aHeightMF.GetValue(FUNIT_100TH_MM));
+ nWidthVal = OutputDevice::LogicToLogic( nWidthVal ,
+ MAP_100TH_MM, (MapUnit)eCoreUnit );
+ nHeightVal = OutputDevice::LogicToLogic( nHeightVal,
+ MAP_100TH_MM, (MapUnit)eCoreUnit);
+ double fSizeRatio;
+
+ BOOL bRepaint = FALSE;
+ USHORT nMask = 1;
+ for(USHORT i = 0; i < pActNum->GetLevelCount(); i++)
+ {
+ if(nActNumLvl & nMask)
+ {
+ SvxNumberFormat aNumFmt(pActNum->GetLevel(i));
+ if(SVX_NUM_BITMAP == (aNumFmt.GetNumType()&(~LINK_TOKEN)))
+ {
+ Size aSize(aNumFmt.GetGraphicSize() );
+ Size aSaveSize(aSize);
+
+ if (aInitSize[i].Height())
+ fSizeRatio = (double)aInitSize[i].Width() / (double)aInitSize[i].Height();
+ else
+ fSizeRatio = (double)1;
+
+ if(bWidth)
+ {
+ long nDelta = nWidthVal - aInitSize[i].Width();
+ aSize.Width() = nWidthVal;
+ if (bRatio)
+ {
+ aSize.Height() = aInitSize[i].Height() + (long)((double)nDelta / fSizeRatio);
+ aHeightMF.SetUserValue(aHeightMF.Normalize(
+ OutputDevice::LogicToLogic( aSize.Height(), (MapUnit)eCoreUnit, MAP_100TH_MM )),
+ FUNIT_100TH_MM);
+ }
+ }
+ else
+ {
+ long nDelta = nHeightVal - aInitSize[i].Height();
+ aSize.Height() = nHeightVal;
+ if (bRatio)
+ {
+ aSize.Width() = aInitSize[i].Width() + (long)((double)nDelta * fSizeRatio);
+ aWidthMF.SetUserValue(aWidthMF.Normalize(
+ OutputDevice::LogicToLogic( aSize.Width(), (MapUnit)eCoreUnit, MAP_100TH_MM )),
+ FUNIT_100TH_MM);
+ }
+ }
+ const SvxBrushItem* pBrushItem = aNumFmt.GetBrush();
+ SvxFrameVertOrient eOrient = aNumFmt.GetVertOrient();
+ if(aSize != aSaveSize)
+ bRepaint = TRUE;
+ aNumFmt.SetGraphicBrush( pBrushItem, &aSize, &eOrient );
+ pActNum->SetLevel(i, aNumFmt);
+ }
+ }
+ nMask <<= 1;
+ }
+ SetModified(bRepaint);
+ return 0;
+}
+
+/*------------------------------------------------------------------------
+ Beschreibung:
+------------------------------------------------------------------------*/
+
+IMPL_LINK( SvxNumOptionsTabPage, RatioHdl_Impl, CheckBox *, pBox )
+{
+ if (pBox->IsChecked())
+ {
+ if (bLastWidthModified)
+ SizeHdl_Impl(&aWidthMF);
+ else
+ SizeHdl_Impl(&aHeightMF);
+ }
+ return 0;
+}
+
+/*-----------------02.12.97 16:07-------------------
+
+--------------------------------------------------*/
+IMPL_LINK( SvxNumOptionsTabPage, CharFmtHdl_Impl, ListBox *, EMPTYARG )
+{
+ bAutomaticCharStyles = FALSE;
+ USHORT nEntryPos = aCharFmtLB.GetSelectEntryPos();
+ String sEntry = aCharFmtLB.GetSelectEntry();
+ USHORT nMask = 1;
+ String aEmptyStr;
+ for(USHORT i = 0; i < pActNum->GetLevelCount(); i++)
+ {
+ if(nActNumLvl & nMask)
+ {
+ SvxNumberFormat aNumFmt(pActNum->GetLevel(i));
+ if( 0 == nEntryPos )
+ aNumFmt.SetCharFmt(aEmptyStr);
+ else
+ {
+ if(SVX_NUM_BITMAP != (aNumFmt.GetNumType()&(~LINK_TOKEN)))
+ aNumFmt.SetCharFmt(sEntry);
+ }
+ pActNum->SetLevel(i, aNumFmt);
+ }
+ nMask <<= 1;
+ }
+ SetModified(FALSE);
+ return 0;
+
+};
+
+/*-----------------03.12.97 11:01-------------------
+
+--------------------------------------------------*/
+IMPL_LINK( SvxNumOptionsTabPage, EditModifyHdl_Impl, Edit *, pEdit )
+{
+ BOOL bPrefix = pEdit == &aPrefixED;
+ BOOL bSuffix = pEdit == &aSuffixED;
+ BOOL bStart = pEdit == &aStartED;
+ USHORT nMask = 1;
+ for(USHORT i = 0; i < pActNum->GetLevelCount(); i++)
+ {
+ if(nActNumLvl & nMask)
+ {
+ SvxNumberFormat aNumFmt(pActNum->GetLevel(i));
+ if(bPrefix)
+ aNumFmt.SetPrefix( aPrefixED.GetText() );
+ else if(bSuffix)
+ aNumFmt.SetSuffix( aSuffixED.GetText() );
+ else if(bStart)
+ aNumFmt.SetStart( (USHORT)aStartED.GetValue() );
+ else //align
+ {
+ USHORT nPos = aAlignLB.GetSelectEntryPos();
+ SvxAdjust eAdjust = SVX_ADJUST_CENTER;
+ if(nPos == 0)
+ eAdjust = SVX_ADJUST_LEFT;
+ else if(nPos == 2)
+ eAdjust = SVX_ADJUST_RIGHT;
+ aNumFmt.SetNumAdjust( eAdjust );
+ }
+ pActNum->SetLevel(i, aNumFmt);
+ }
+ nMask <<= 1;
+ }
+ SetModified();
+
+ return 0;
+}
+
+/*-----------------02.12.97 11:38-------------------
+
+--------------------------------------------------*/
+IMPL_STATIC_LINK(SvxNumOptionsTabPage, GraphicArrivedHdl_Impl, SvxBrushItem*, pItem)
+{
+ PopupMenu* pPopup = pThis->aBitmapMB.GetPopupMenu()->GetPopupMenu( MN_GALLERY );
+
+ SvxBmpItemInfo* pInfo = 0;
+ for ( USHORT i = 0; i < pThis->aGrfBrushItems.Count(); i++ )
+ {
+ SvxBmpItemInfo* pInfo = (SvxBmpItemInfo*)pThis->aGrfBrushItems.GetObject(i);
+ if(&pInfo->pBrushItem == &pItem)
+ {
+ pInfo = pInfo; break;
+ }
+ }
+ if(pInfo)
+ {
+ Image aImage(pItem->GetGraphic()->GetBitmap());
+ pPopup->SetItemImage( pInfo->nItemId, aImage );
+ }
+
+ return 0;
+}
+
+/*-----------------09.12.97 11:49-------------------
+
+--------------------------------------------------*/
+USHORT lcl_DrawGraphic(VirtualDevice* pVDev, const SvxNumberFormat &rFmt, USHORT nXStart,
+ USHORT nYStart, USHORT nDivision)
+{
+ const SvxBrushItem* pBrushItem = rFmt.GetBrush();
+ USHORT nRet = 0;
+ if(pBrushItem)
+ {
+ const Graphic* pGrf = pBrushItem->GetGraphic();
+ if(pGrf)
+ {
+ Size aGSize( rFmt.GetGraphicSize() );
+ aGSize.Width() /= nDivision;
+ nRet = (USHORT)aGSize.Width();
+ aGSize.Height() /= nDivision;
+ pGrf->Draw( pVDev, Point(nXStart,nYStart),
+ pVDev->PixelToLogic( aGSize ) );
+ }
+ }
+ return nRet;
+
+}
+
+/*-----------------09.12.97 11:54-------------------
+
+--------------------------------------------------*/
+USHORT lcl_DrawBullet(VirtualDevice* pVDev,
+ const SvxNumberFormat& rFmt, USHORT nXStart,
+ USHORT nYStart, const Size& rSize)
+{
+ Font aTmpFont(pVDev->GetFont());
+
+ //per Uno kann es sein, dass kein Font gesetzt ist!
+ Font aFont(rFmt.GetBulletFont() ? *rFmt.GetBulletFont() : aTmpFont);
+ Size aTmpSize(rSize);
+ aTmpSize.Width() *= rFmt.GetBulletRelSize();
+ aTmpSize.Width() /= 100 ;
+ aTmpSize.Height() *= rFmt.GetBulletRelSize();
+ aTmpSize.Height() /= 100 ;
+ // bei einer Hoehe von Null wird in Ursprungshoehe gezeichnet
+ if(!aTmpSize.Height())
+ aTmpSize.Height() = 1;
+ aFont.SetSize(aTmpSize);
+ aFont.SetTransparent(TRUE);
+ aFont.SetColor(rFmt.GetBulletColor());
+ pVDev->SetFont( aFont );
+ String aText(sal_Unicode(rFmt.GetBulletChar()));
+ long nY = nYStart;
+ nY -= ((aTmpSize.Height() - rSize.Height())/ 2);
+ pVDev->DrawText( Point(nXStart, nY), aText );
+ USHORT nRet = (USHORT)pVDev->GetTextWidth(aText);
+
+ pVDev->SetFont(aTmpFont);
+ return nRet;
+}
+
+/*-----------------02.12.97 10:34-------------------
+ Vorschau der Numerierung painten
+--------------------------------------------------*/
+void SvxNumberingPreview::Paint( const Rectangle& rRect )
+{
+ Size aSize(PixelToLogic(GetOutputSizePixel()));
+ Rectangle aRect(Point(0,0), aSize);
+
+ VirtualDevice* pVDev = new VirtualDevice(*this);
+ pVDev->SetMapMode(GetMapMode());
+ pVDev->SetOutputSize( aSize );
+
+
+ pVDev->SetFillColor( Color( COL_WHITE ) );
+ pVDev->DrawRect(aRect);
+
+ if(pActNum)
+ {
+ USHORT nWidthRelation;
+ if(nPageWidth)
+ {
+ nWidthRelation = USHORT (nPageWidth / aSize.Width());
+ if(bPosition)
+ nWidthRelation = nWidthRelation * 2 / 3;
+ else
+ nWidthRelation = nWidthRelation / 4;
+ }
+ else
+ nWidthRelation = 30; // Kapiteldialog
+
+ //Hoehe pro Ebene
+ USHORT nXStep = aSize.Width() / (3 * pActNum->GetLevelCount());
+ if(pActNum->GetLevelCount() < 10)
+ nXStep /= 2;
+ USHORT nYStart = 4;
+ // fuer ein einziges Level darf nicht die gesamte Hoehe benutzt werden
+ USHORT nYStep = (aSize.Height() - 6)/ (pActNum->GetLevelCount() > 1 ? pActNum->GetLevelCount() : 5);
+ aStdFont = System::GetStandardFont(STDFONT_SWISS);
+
+ //
+ USHORT nFontHeight = nYStep * 6 / 10;
+ if(bPosition)
+ nFontHeight = nYStep * 15 / 10;
+ aStdFont.SetSize(Size( 0, nFontHeight ));
+
+ SvxNodeNum aNum( (BYTE)0 );
+ USHORT nPreNum = pActNum->GetLevel(0).GetStart();
+
+ if(bPosition)
+ {
+ USHORT nLineHeight = nFontHeight * 8 / 7;
+ BYTE nStart = 0;
+ while( !(nActLevel & (1<<nStart)) )
+ {
+ nStart++;
+ }
+ if(nStart)
+ nStart--;
+ BYTE nEnd = min(nStart + 3, pActNum->GetLevelCount());
+ for( BYTE nLevel = nStart; nLevel < nEnd; ++nLevel )
+ {
+ const SvxNumberFormat &rFmt = pActNum->GetLevel(nLevel);
+ aNum.GetLevelVal()[ nLevel ] = rFmt.GetStart();
+ USHORT nXStart = rFmt.GetAbsLSpace() / nWidthRelation;
+ short nTextOffset = rFmt.GetCharTextDistance() / nWidthRelation;
+ USHORT nNumberXPos = nXStart;
+ USHORT nFirstLineOffset = (-rFmt.GetFirstLineOffset()) / nWidthRelation;
+
+ if(nFirstLineOffset <= nNumberXPos)
+ nNumberXPos -= nFirstLineOffset;
+ else
+ nNumberXPos = 0;
+
+ USHORT nBulletWidth = 0;
+ //im draw ist das zulaeesig
+ if(nTextOffset < 0)
+ nNumberXPos += nTextOffset;
+ if( SVX_NUM_BITMAP == (rFmt.GetNumType() &(~LINK_TOKEN)))
+ {
+ nBulletWidth = rFmt.IsShowSymbol() ? lcl_DrawGraphic(pVDev, rFmt,
+ nNumberXPos,
+ nYStart, nWidthRelation) : 0;
+ }
+ else if( SVX_NUM_CHAR_SPECIAL == rFmt.GetNumType() )
+ {
+ nBulletWidth = rFmt.IsShowSymbol() ?
+ lcl_DrawBullet(pVDev, rFmt, nNumberXPos, nYStart, aStdFont.GetSize()) : 0;
+ }
+ else
+ {
+ pVDev->SetFont(aStdFont);
+ aNum.SetLevel( nLevel );
+ if(pActNum->IsContinuousNumbering())
+ aNum.GetLevelVal()[nLevel] = nPreNum;
+ String aText(pActNum->MakeNumString( aNum ));
+ Font aSaveFont = pVDev->GetFont();
+ Font aColorFont(aSaveFont);
+ aColorFont.SetColor(rFmt.GetBulletColor());
+ pVDev->SetFont(aColorFont);
+ pVDev->DrawText( Point(nNumberXPos, nYStart), aText );
+ pVDev->SetFont(aSaveFont);
+ nBulletWidth = (USHORT)pVDev->GetTextWidth(aText);
+ nPreNum++;
+ }
+
+ USHORT nTextXPos = nXStart;
+ if(nTextOffset < 0)
+ nTextXPos += nTextOffset;
+ if(nNumberXPos + nBulletWidth + nTextOffset > nTextXPos )
+ nTextXPos = nNumberXPos + nBulletWidth + nTextOffset;
+
+ Rectangle aRect1(Point(nTextXPos, nYStart + nFontHeight / 2), Size(aSize.Width() / 2, 2));
+ pVDev->SetFillColor( Color( COL_BLACK ) );
+ pVDev->DrawRect( aRect1 );
+
+ Rectangle aRect2(Point(nXStart, nYStart + nLineHeight + nFontHeight / 2 ), Size(aSize.Width() / 2, 2));
+ pVDev->DrawRect( aRect2 );
+ nYStart += 2 * nLineHeight;
+ }
+ }
+ else
+ {
+ USHORT nLineHeight = nFontHeight * 3 / 2;
+ for( BYTE nLevel = 0; nLevel < pActNum->GetLevelCount();
+ ++nLevel, nYStart += nYStep )
+ {
+ const SvxNumberFormat &rFmt = pActNum->GetLevel(nLevel);
+ aNum.GetLevelVal()[ nLevel ] = rFmt.GetStart();
+ USHORT nXStart = (rFmt.GetAbsLSpace() / nWidthRelation) / 2 + 2;
+ USHORT nTextOffset = 2 * nXStep;
+ if( SVX_NUM_BITMAP == (rFmt.GetNumType()&(~LINK_TOKEN)) )
+ {
+ if(rFmt.IsShowSymbol())
+ {
+ nTextOffset = lcl_DrawGraphic(pVDev, rFmt, nXStart, nYStart, nWidthRelation);
+ nTextOffset += nXStep;
+ }
+ }
+ else if( SVX_NUM_CHAR_SPECIAL == rFmt.GetNumType() )
+ {
+// aNum.GetLevelVal()[ nLevel ] = 0;
+ if(rFmt.IsShowSymbol())
+ {
+ nTextOffset = lcl_DrawBullet(pVDev, rFmt, nXStart, nYStart, aStdFont.GetSize());
+ nTextOffset += nXStep;
+ }
+ }
+ else
+ {
+ Font aColorFont(aStdFont);
+ aColorFont.SetColor(rFmt.GetBulletColor());
+ pVDev->SetFont(aColorFont);
+ aNum.SetLevel( nLevel );
+ if(pActNum->IsContinuousNumbering())
+ aNum.GetLevelVal()[nLevel] = nPreNum;
+ String aText(pActNum->MakeNumString( aNum ));
+ pVDev->DrawText( Point(nXStart, nYStart), aText );
+ pVDev->SetFont(aStdFont);
+ nTextOffset = (USHORT)pVDev->GetTextWidth(aText);
+ nTextOffset += nXStep;
+ nPreNum++;
+ }
+ pVDev->SetFont(aStdFont);
+ String sMsg( RTL_CONSTASCII_USTRINGPARAM( "StarOffice") );
+ if(pOutlineNames)
+ sMsg = pOutlineNames[nLevel];
+ pVDev->DrawText( Point(nXStart + nTextOffset, nYStart), sMsg );
+ }
+ }
+ }
+ DrawOutDev( Point(0,0), aSize,
+ Point(0,0), aSize,
+ *pVDev );
+ delete pVDev;
+
+}
+
+/*-----------------02.12.97 12:55-------------------
+
+--------------------------------------------------*/
+NumMenuButton::~NumMenuButton()
+{
+}
+
+/*-----------------02.12.97 12:55-------------------
+
+--------------------------------------------------*/
+void NumMenuButton::MouseButtonDown( const MouseEvent& rMEvt )
+{
+ if(maClickHdl_Impl.IsSet())
+ maClickHdl_Impl.Call(this);
+ MenuButton::MouseButtonDown( rMEvt );
+}
+
+/*-----------------03.12.97 10:02-------------------
+
+--------------------------------------------------*/
+SvxNumPositionTabPage::SvxNumPositionTabPage(Window* pParent,
+ const SfxItemSet& rSet) :
+ SfxTabPage( pParent, SVX_RES( RID_SVXPAGE_NUM_POSITION ), rSet ),
+ aLevelGB( this, ResId(GB_LEVEL )),
+ aLevelLB( this, ResId(LB_LEVEL )),
+ aPositionGB( this, ResId(GB_POSITION )),
+ aAlignFT( this, ResId(FT_ALIGN )),
+ aAlignLB( this, ResId(LB_ALIGN )),
+ aDistBorderFT( this, ResId(FT_BORDERDIST )),
+ aDistBorderMF( this, ResId(MF_BORDERDIST )),
+ aDistNumFT( this, ResId(FT_NUMDIST )),
+ aDistNumMF( this, ResId(MF_NUMDIST )),
+ aRelativeCB( this, ResId(CB_RELATIVE )),
+ aIndentFT( this, ResId(FT_INDENT )),
+ aIndentMF( this, ResId(MF_INDENT )),
+ aStandardPB( this, ResId(PB_STANDARD )),
+ aPreviewGB( this, ResId(GB_PREVIEW )),
+ pPreviewWIN( new SvxNumberingPreview(this, ResId(WIN_PREVIEW ))),
+ bInInintControl(FALSE),
+ nActNumLvl( USHRT_MAX ),
+ pActNum(0),
+ pSaveNum(0),
+ nNumItemId(SID_ATTR_NUMBERING_RULE)
+{
+ FreeResource();
+ SetExchangeSupport();
+ pPreviewWIN->SetBackground(Wallpaper(Color(COL_TRANSPARENT)));
+
+ aRelativeCB.Check();
+ aAlignLB.SetSelectHdl(LINK(this, SvxNumPositionTabPage, EditModifyHdl_Impl));
+
+ Link aLk = LINK(this, SvxNumPositionTabPage, DistanceHdl_Impl);
+
+ aDistBorderMF.SetUpHdl(aLk);
+ aDistBorderMF.SetDownHdl(aLk);
+ aDistBorderMF.SetLoseFocusHdl(aLk);
+
+ aDistNumMF.SetUpHdl(aLk);
+ aDistNumMF.SetDownHdl(aLk);
+ aDistNumMF.SetLoseFocusHdl(aLk);
+
+ aIndentMF.SetUpHdl(aLk);
+ aIndentMF.SetDownHdl(aLk);
+ aIndentMF.SetLoseFocusHdl(aLk);
+
+ aLevelLB.SetSelectHdl(LINK(this, SvxNumPositionTabPage, LevelHdl_Impl));
+ aRelativeCB.SetClickHdl(LINK(this, SvxNumPositionTabPage, RelativeHdl_Impl));
+ aStandardPB.SetClickHdl(LINK(this, SvxNumPositionTabPage, StandardHdl_Impl));
+
+
+ aRelativeCB.Check(bLastRelative);
+ pPreviewWIN->SetPositionMode();
+ eCoreUnit = rSet.GetPool()->GetMetric(rSet.GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE));
+
+#ifdef DEBUG
+ pDebugFixedText = new FixedText(this, 0);
+ pDebugFixedText->Show();
+ Size aSize(200, 20);
+ Point aPos(250,0);
+
+ pDebugFixedText->SetPosSizePixel(aPos, aSize);
+ pDebugFixedText->SetText( UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "Das ist ein Debug-Text" ) ) );
+#endif
+}
+/*-----------------03.12.97 10:02-------------------
+
+--------------------------------------------------*/
+SvxNumPositionTabPage::~SvxNumPositionTabPage()
+{
+ delete pActNum;
+ delete pPreviewWIN;
+ delete pSaveNum;
+#ifdef DEBUG
+ delete pDebugFixedText;
+#endif
+}
+/*-------------------------------------------------------*/
+
+#ifdef DEBUG
+void lcl_PrintDebugOutput(FixedText& rFixed, const SvxNumberFormat& rNumFmt)
+{
+#define TWIP_TO_MM100(TWIP) ((TWIP) >= 0 ? (((TWIP)*127L+36L)/72L) : (((TWIP)*127L-36L)/72L))
+
+ sal_Char const sHash[] = " # ";
+ String sDebugText( UniString::CreateFromInt32( TWIP_TO_MM100(rNumFmt.GetAbsLSpace() ) ) );
+ sDebugText.AppendAscii( RTL_CONSTASCII_STRINGPARAM( sHash ) );
+ sDebugText += UniString::CreateFromInt32( TWIP_TO_MM100(rNumFmt.GetCharTextDistance() ) );
+ sDebugText.AppendAscii( RTL_CONSTASCII_STRINGPARAM( sHash ) );
+ sDebugText += UniString::CreateFromInt32( TWIP_TO_MM100(rNumFmt.GetFirstLineOffset() ) );
+ rFixed.SetText(sDebugText);
+}
+#endif
+
+/*-----------------03.12.97 10:06-------------------
+
+--------------------------------------------------*/
+void SvxNumPositionTabPage::InitControls()
+{
+ bInInintControl = TRUE;
+ BOOL bRelative = aRelativeCB.IsEnabled() && aRelativeCB.IsChecked();
+// SetMinDist();
+ BOOL bSingleSelection = aLevelLB.GetSelectEntryCount() == 1 && USHRT_MAX != nActNumLvl;
+ aDistBorderMF.Enable(bSingleSelection || bRelative );
+ aDistBorderFT.Enable(bSingleSelection || bRelative );
+ //HACK("der Wert sollte mal sinnvol gesetzt werden")
+ long nWidth = 10000;
+ nWidth = OutputDevice::LogicToLogic( nWidth,
+ (MapUnit)eCoreUnit, MAP_100TH_MM );
+
+ aDistBorderMF.SetMax(aDistBorderMF.Normalize( nWidth ), FUNIT_100TH_MM );
+ aDistNumMF .SetMax(aDistNumMF .Normalize( nWidth ), FUNIT_100TH_MM );
+
+ aIndentMF .SetMax(aIndentMF .Normalize( nWidth ), FUNIT_100TH_MM );
+ long nLast2 = nWidth /2;
+ aDistBorderMF.SetLast( aDistBorderMF.Normalize( nLast2 ), FUNIT_100TH_MM );
+ aDistNumMF .SetLast( aDistNumMF .Normalize( nLast2 ), FUNIT_100TH_MM );
+ aIndentMF .SetLast( aIndentMF .Normalize( nLast2 ), FUNIT_100TH_MM );
+
+
+ BOOL bSetDistEmpty = FALSE;
+// BOOL bSameDistBorder= TRUE;
+ BOOL bSameDistBorderNum = TRUE;
+ BOOL bSameDist = TRUE;
+ BOOL bSameIndent = TRUE;
+ BOOL bSameAdjust = TRUE;
+
+ const SvxNumberFormat* aNumFmtArr[SVX_MAX_NUM];
+// SvxFrameVertOrient eFirstOrient = SVX_VERT_NONE;
+ USHORT nMask = 1;
+ USHORT nLvl = USHRT_MAX;
+// long nFirstLSpace = 0;
+ long nFirstBorderText = 0;
+ long nFirstBorderTextRelative = -1;
+ for(USHORT i = 0; i < pActNum->GetLevelCount(); i++)
+ {
+ aNumFmtArr[i] = &pActNum->GetLevel(i);
+ if(nActNumLvl & nMask)
+ {
+ if(USHRT_MAX == nLvl)
+ {
+ nLvl = i;
+ nFirstBorderText = nLvl > 0 ?
+ aNumFmtArr[nLvl]->GetAbsLSpace() + aNumFmtArr[nLvl]->GetFirstLineOffset() -
+ aNumFmtArr[nLvl - 1]->GetAbsLSpace() + aNumFmtArr[nLvl - 1]->GetFirstLineOffset():
+ aNumFmtArr[nLvl]->GetAbsLSpace() + aNumFmtArr[nLvl]->GetFirstLineOffset();
+
+// nFirstLSpace = nLvl > 0 ?
+// aNumFmtArr[nLvl]->GetAbsLSpace() - aNumFmtArr[nLvl - 1]->GetAbsLSpace():
+// aNumFmtArr[nLvl]->GetAbsLSpace();
+ }
+
+ if( i > nLvl)
+ {
+ if(bRelative)
+ {
+ if(nFirstBorderTextRelative == -1)
+ nFirstBorderTextRelative =
+ (aNumFmtArr[i]->GetAbsLSpace() + aNumFmtArr[i]->GetFirstLineOffset() -
+ aNumFmtArr[i - 1]->GetAbsLSpace() + aNumFmtArr[i - 1]->GetFirstLineOffset());
+ else
+ bSameDistBorderNum &= nFirstBorderTextRelative ==
+ (aNumFmtArr[i]->GetAbsLSpace() + aNumFmtArr[i]->GetFirstLineOffset() -
+ aNumFmtArr[i - 1]->GetAbsLSpace() + aNumFmtArr[i - 1]->GetFirstLineOffset());
+
+// bSameDistBorder &= nFirstLSpace == (aNumFmtArr[i]->GetAbsLSpace() - aNumFmtArr[i - 1]->GetAbsLSpace());
+ }
+ else
+ bSameDistBorderNum &=
+ aNumFmtArr[i]->GetAbsLSpace() - aNumFmtArr[i]->GetFirstLineOffset() ==
+ aNumFmtArr[i - 1]->GetAbsLSpace() - aNumFmtArr[i - 1]->GetFirstLineOffset();
+
+// bSameDistBorder &= aNumFmtArr[i]->GetAbsLSpace() == aNumFmtArr[nLvl]->GetAbsLSpace();
+
+ bSameDist &= aNumFmtArr[i]->GetCharTextDistance() == aNumFmtArr[nLvl]->GetCharTextDistance();
+ bSameIndent &= aNumFmtArr[i]->GetFirstLineOffset() == aNumFmtArr[nLvl]->GetFirstLineOffset();
+ bSameAdjust &= aNumFmtArr[i]->GetNumAdjust() == aNumFmtArr[nLvl]->GetNumAdjust();
+
+ }
+ }
+// else
+// aNumFmtArr[i] = 0;
+ nMask <<= 1;
+
+ }
+ if(bSameDistBorderNum)
+// if(bSameDistBorder)
+ {
+ long nDistBorderNum;
+ if(bRelative)
+ {
+ nDistBorderNum = (long)aNumFmtArr[nLvl]->GetAbsLSpace()+ aNumFmtArr[nLvl]->GetFirstLineOffset();
+ if(nLvl)
+ nDistBorderNum -= (long)aNumFmtArr[nLvl - 1]->GetAbsLSpace()+ aNumFmtArr[nLvl - 1]->GetFirstLineOffset();
+ }
+ else
+ {
+ nDistBorderNum = (long)aNumFmtArr[nLvl]->GetAbsLSpace()+ aNumFmtArr[nLvl]->GetFirstLineOffset();
+ }
+ SetMetricValue(aDistBorderMF, nDistBorderNum, eCoreUnit);
+// so war es frher Abstand Text<->Rand
+// SetMetricValue(aDistBorderMF,
+// bRelative ? (long)nFirstLSpace : (long)aNumFmtArr[nLvl]->GetAbsLSpace(),
+// eCoreUnit);
+ }
+ else
+ bSetDistEmpty = TRUE;
+
+#ifdef DEBUG
+ lcl_PrintDebugOutput(*pDebugFixedText, *aNumFmtArr[nLvl]);
+#endif
+
+ String aEmptyStr;
+ if(bSameDist)
+ SetMetricValue(aDistNumMF, aNumFmtArr[nLvl]->GetCharTextDistance(), eCoreUnit);
+ else
+ aDistNumMF.SetText(aEmptyStr);
+ if(bSameIndent)
+ SetMetricValue(aIndentMF, - aNumFmtArr[nLvl]->GetFirstLineOffset(), eCoreUnit);
+ else
+ aIndentMF.SetText(aEmptyStr);
+
+ if(bSameAdjust)
+ {
+ USHORT nPos = 1; // zentriert
+ if(aNumFmtArr[nLvl]->GetNumAdjust() == SVX_ADJUST_LEFT)
+ nPos = 0;
+ else if(aNumFmtArr[nLvl]->GetNumAdjust() == SVX_ADJUST_RIGHT)
+ nPos = 2;